41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef __JABYENGINE_GPU_HPP__
|
|
#define __JABYENGINE_GPU_HPP__
|
|
#include "../System/IOPorts/GPU_IO.hpp"
|
|
|
|
#if !defined(JABYENGINE_NTSC) && !defined(JABYENGINE_PAL)
|
|
#error "JABYENGINE_NTSC or JABYENGINE_PAL must be defined"
|
|
#else
|
|
#if defined(JABYENGINE_NTSC) && defined(JABYENGINE_PAL)
|
|
#error "Please define only JABYENGINE_NTSC or JABYENGINE_PAL"
|
|
#endif
|
|
#endif
|
|
|
|
namespace GPU {
|
|
namespace Display {
|
|
#ifdef JABYENGINE_PAL
|
|
static constexpr size_t Width = 320;
|
|
static constexpr size_t Height = 256;
|
|
#else
|
|
static constexpr size_t Width = 320;
|
|
static constexpr size_t Height = 240;
|
|
#endif
|
|
|
|
static void enable() {
|
|
GP1.write(Command::GP1::SetDisplayState(DisplayState::On));
|
|
}
|
|
|
|
static void disable() {
|
|
GP1.write(Command::GP1::SetDisplayState(DisplayState::Off));
|
|
}
|
|
}
|
|
|
|
namespace Screen {
|
|
extern uint8_t CurrentDisplayAreaID;
|
|
|
|
namespace Range {
|
|
void set_offset(uint16_t x, uint16_t y);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif //!__JABYENGINE_GPU_HPP__
|