Separate between Display and Screen
This commit is contained in:
parent
97226300d6
commit
69a84952ba
|
@ -27,7 +27,9 @@ namespace GPU {
|
|||
static void disable() {
|
||||
GP1.write(Command::GP1::SetDisplayState(DisplayState::Off));
|
||||
}
|
||||
}
|
||||
|
||||
namespace Screen {
|
||||
void set_offset(uint16_t x, uint16_t y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <PSX/System/IOPorts/GPU_IO.hpp>
|
||||
|
||||
namespace GPU {
|
||||
namespace Display {
|
||||
namespace Screen {
|
||||
struct Mode {
|
||||
enum struct TVEncoding {
|
||||
NTSC = 0,
|
||||
|
@ -45,12 +45,12 @@ namespace GPU {
|
|||
static constexpr uint16_t FirstVisiblePixelV = 0xA3;
|
||||
|
||||
GP1.write(Command::GP1::DisplayMode(Mode::PAL()));
|
||||
GPU::Display::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
GPU::Screen::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
#else
|
||||
static constexpr uint16_t FirstVisiblePixelV = 0x88;
|
||||
|
||||
GP1.write(Command::GP1::DisplayMode(Mode::NTSC()));
|
||||
GPU::Display::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
GPU::Screen::set_offset(FirstVisiblePixelH, FirstVisiblePixelV);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace GPU {
|
|||
|
||||
void setup() {
|
||||
GP1.write(Command::GP1::Reset());
|
||||
Display::configurate();
|
||||
Screen::configurate();
|
||||
|
||||
quick_fill_fast(Color24::Black(), PositionU16(0, 0), SizeU16(640, 480));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <PSX/GPU/GPU.hpp>
|
||||
|
||||
namespace GPU {
|
||||
namespace Display {
|
||||
namespace Screen {
|
||||
#ifdef JABYENGINE_PAL
|
||||
static constexpr uint16_t ScanlinesV = 288;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue