Remove support for No screen code all together
This commit is contained in:
parent
86df7e72e0
commit
ac95ff11e5
|
@ -64,20 +64,7 @@ namespace ScreenCenter {
|
||||||
static const char*const Name = "PSYQ";
|
static const char*const Name = "PSYQ";
|
||||||
|
|
||||||
static void set_offset(uint16_t x, uint16_t y) {
|
static void set_offset(uint16_t x, uint16_t y) {
|
||||||
x += 78;
|
GPU::Display::set_offset(x, y);
|
||||||
y += 43;
|
|
||||||
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + GPU::Display::Width) << 3));
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + GPU::Display::Height));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace No$PSX {
|
|
||||||
static const char*const Name = "No$PSX";
|
|
||||||
|
|
||||||
static void set_offset(uint16_t x, uint16_t y) {
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange(x, (x + GPU::Display::Width*8)));
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y - (ScanlinesV/2), y + (ScanlinesV/2)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,8 +74,7 @@ namespace ScreenCenter {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Formular ScreenFormulars[] = {
|
static const Formular ScreenFormulars[] = {
|
||||||
Formular{.name = PSYQ::Name, .function = PSYQ::set_offset},
|
Formular{.name = PSYQ::Name, .function = PSYQ::set_offset}
|
||||||
Formular{.name = No$PSX::Name, .function = No$PSX::set_offset}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const auto frame = Frame::create();
|
static const auto frame = Frame::create();
|
||||||
|
@ -110,7 +96,8 @@ namespace ScreenCenter {
|
||||||
const auto controller = Periphery::get_primary_controller_as<Periphery::GenericController>();
|
const auto controller = Periphery::get_primary_controller_as<Periphery::GenericController>();
|
||||||
|
|
||||||
if(controller.button.went_up(GenericButton::R1) || controller.button.went_up(GenericButton::L1)) {
|
if(controller.button.went_up(GenericButton::R1) || controller.button.went_up(GenericButton::L1)) {
|
||||||
formular_sel ^= 1;
|
// Only one mode supported
|
||||||
|
//formular_sel ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(controller.button.went_down(GenericButton::ST)) {
|
if(controller.button.went_down(GenericButton::ST)) {
|
||||||
|
|
|
@ -73,20 +73,13 @@ namespace JabyEngine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USE_NO$PSX
|
void Display :: set_offset(uint16_t x, uint16_t y) {
|
||||||
void Display :: set_offset(uint16_t x, uint16_t y) {
|
x += 78;
|
||||||
x += 78;
|
y += 35;
|
||||||
y += 43;
|
|
||||||
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + Display::Width) << 3));
|
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + Display::Width) << 3));
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + Display::Height));
|
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + Display::Height));
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
void Display :: set_offset(uint16_t x, uint16_t y) {
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange(x, (x + Display::Width*8)));
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y - (ScanlinesV/2), y + (ScanlinesV/2)));
|
|
||||||
}
|
|
||||||
#endif //USE_NO$PSX
|
|
||||||
|
|
||||||
uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen) {
|
uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen) {
|
||||||
// Waits for finish FIFO
|
// Waits for finish FIFO
|
||||||
|
|
Loading…
Reference in New Issue