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