From: slack Date: Tue, 10 Jun 2008 22:47:47 +0000 (+0200) Subject: IO video register names in GBIO X-Git-Tag: v0.1~57 X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=977b2ccfdafe39a2e5e56a71aafd86911c6947e5;p=wenboi.git IO video register names in GBIO --- diff --git a/GBMemory.h b/GBMemory.h index 562d9b0..5a30559 100644 --- a/GBMemory.h +++ b/GBMemory.h @@ -12,6 +12,18 @@ class GBIO 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; }