public:
static const u16 IO_BASE = 0xFF00;
+ static const u16 LCDC = 0xFF40; // LCD Control (R/W)
+ static const u16 STAT = 0xFF41; // LCD Status (R/W)
+ static const u16 SCY = 0xFF42; // Scroll Y (R/W)
+ static const u16 SCX = 0xFF43; // Scroll X (R/W)
+ static const u16 LY = 0xFF44; // LCDC Y coord (R)
+ static const u16 LYC = 0xFF45; // LY Compare (R/W)
+ static const u16 WY = 0xFF4A; // Window Y pos (R/W)
+ static const u16 WX = 0xFF4B; // Window X pos minus 7 (R/W)
+ static const u16 BGP = 0xFF47; // BG Pallette data (R/W)
+ static const u16 OBP0 = 0xFF48; // Object Pallete 0 data(R/W)
+ static const u16 OBP1 = 0xFF49; // Object Pallete 1 data(R/W)
+ static const u16 DMA = 0xFF46; // DMA Transfer & Start addr (W)
u8 read(int addr) const { return ports[addr-IO_BASE]; }
void write(int addr, u8 value) { ports[addr-IO_BASE] = value; }