Setup DisplayArea
This commit is contained in:
@@ -45,12 +45,12 @@ namespace GPU {
|
||||
static constexpr uint16_t FirstVisiblePixelV = 0xA3;
|
||||
|
||||
GP1.write(Command::GP1::DisplayMode(Mode::PAL()));
|
||||
GPU::Screen::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
GPU::Screen::set_offset(78, 43);
|
||||
#else
|
||||
static constexpr uint16_t FirstVisiblePixelV = 0x88;
|
||||
|
||||
GP1.write(Command::GP1::DisplayMode(Mode::NTSC()));
|
||||
GPU::Screen::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
GPU::Screen::set_offset(78, 45);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ namespace GPU {
|
||||
Display::disable();
|
||||
|
||||
// Upload SplashScreen picture
|
||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(93, 0, 0, 0));
|
||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(0, 0, 0, 0));
|
||||
while(state.process((sizeof(SplashScreen)/sizeof(uint32_t))));
|
||||
|
||||
Display::enable();
|
||||
@@ -18,7 +18,8 @@ namespace GPU {
|
||||
void setup() {
|
||||
GP1.write(Command::GP1::Reset());
|
||||
Screen::configurate();
|
||||
|
||||
|
||||
quick_fill_fast(Color24::Black(), PositionU16(0, 0), SizeU16(640, 480));
|
||||
GP1.write(Command::GP1::DisplayArea(0, 0));
|
||||
}
|
||||
}
|
@@ -8,9 +8,16 @@ namespace GPU {
|
||||
static constexpr uint16_t ScanlinesV = 240;
|
||||
#endif //JABYENGINE_PAL
|
||||
|
||||
#ifndef USE_NO$PSX
|
||||
void set_offset(uint16_t x, uint16_t y) {
|
||||
GP1.write(Command::GP1::HorizontalDisplayRange((x << 3), (x + Display::Width) << 3));
|
||||
GP1.write(Command::GP1::VerticalDisplayRange(y, y + Display::Height));
|
||||
}
|
||||
#else
|
||||
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)));
|
||||
}
|
||||
#endif //USE_NO$PSX
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user