Configurate Screen

This commit is contained in:
Jaby
2022-10-03 15:38:54 +02:00
parent 9e69aec9bd
commit 83c00992aa
5 changed files with 83 additions and 21 deletions

View File

@@ -1,5 +1,16 @@
#include <PSX/GPU/GPU.hpp>
namespace GPU {
namespace Display {
#ifdef JABYENGINE_PAL
static constexpr uint16_t ScanlinesV = 288;
#else
static constexpr uint16_t ScanlinesV = 240;
#endif //JABYENGINE_PAL
void set_offset(uint16_t x, uint16_t y) {
GP1.write(Command::GP1::HorizontalDisplayRange(x, (x + Display::Width*8)));
GP1.write(Command::GP1::VerticalDisplayRange(y - (ScanlinesV/2), y + (ScanlinesV/2)));
}
}
}