CPU_Def.i | |
General | |
RAM | |
PPU Display Control | |
PPU Display Control Registers | |
inidisp() | Encode value for INIDISP |
PPU Data Ports | |
PPU Data Port Registers | |
rgb() | Encode RGB values to SNES color word |
BG & OBJ Control | |
BG & OBJ Control Registers | |
objsel() | Encode value for OBJSEL |
bgmode() | Encode value for BGMODE |
bgsc() | Encode value for BGnSC |
bgnba() | Encode value for BG12NBA+BG34NBA |
bg12nba() | Encode value for BG12NBA |
bg34nba() | Encode value for BG34NBA |
Window Mask | |
Window Mask Registers | |
Screen Designation | |
Screen Designation Registers | |
tm() | Encode value for TM/TS/TMW/TSW |
Color Math | |
Color Math Registers | |
MMIO Math | |
MMIO Math Registers | |
APU & WRAM Data Ports | |
APU & WRAM Data Port Registers | |
Joypad | |
Joypad Registers | |
Interrupt & Status | |
Interrupt & Status Registers | |
DMA | |
DMA Registers |
VMAINC = $2115 ;VRAM Address Increment Mode VMADDL = $2116 ;VRAM Address (LSB) VMADDH = $2117 ;VRAM Address (MSB) VMDATAL = $2118 ;VRAM Data Write (LSB) VMDATAH = $2119 ;VRAM Data Write (MSB) VMDATALREAD = $2139 ;PPU1 VRAM Data Read (LSB) VMDATAHREAD = $213a ;PPU1 VRAM Data Read (MSB) OAMADDL = $2102 ;OAM Address (LSB) OAMADDH = $2103 ;OAM Address (MSB) + Priority Rotation OAMDATA = $2104 ;OAM Data Write (WRx2) OAMDATAREAD = $2138 ;PPU1 OAM Data Read CGADD = $2121 ;CGRAM Address CGDATA = $2122 ;CGRAM Data Write (WRx2) CGDATAREAD = $213b ;PPU2 CGRAM Data Read (WRx2)
OBJSEL = $2101 ;Object Size + Object Base BGMODE = $2105 ;BG Mode + BG Character Size BG1SC = $2107 ;BG1 Screen Base + Screen Size BG2SC = $2108 ;BG2 Screen Base + Screen Size BG3SC = $2109 ;BG3 Screen Base + Screen Size BG4SC = $210a ;BG4 Screen Base + Screen Size BG12NBA = $210b ;BG1/2 Character Data Area Designation BG34NBA = $210c ;BG3/4 Character Data Area Designation BG1HOFS = $210d ;BG1 Horizontal Scroll (WRx2) BG1VOFS = $210e ;BG1 Vertical Scroll (WRx2) BG2HOFS = $210f ;BG2 Horizontal Scroll (WRx2) BG2VOFS = $2110 ;BG2 Vertical Scroll (WRx2) BG3HOFS = $2111 ;BG3 Horizontal Scroll (WRx2) BG3VOFS = $2112 ;BG3 Vertical Scroll (WRx2) BG4HOFS = $2113 ;BG4 Horizontal Scroll (WRx2) BG4VOFS = $2114 ;BG4 Vertical Scroll (WRx2) MOSAIC = $2106 ;Mosaic Size + Mosaic Enable M7SEL = $211a ;Rotation/Scaling Mode Settings M7HOFS = BG1HOFS ;Horizontal Scroll (WRx2) M7VOFS = BG1VOFS ;Vertical Scroll (WRx2) M7A = $211b ;Rotation/Scaling Parameter A (WRx2) M7B = $211c ;Rotation/Scaling Parameter B (WRx2) M7C = $211d ;Rotation/Scaling Parameter C (WRx2) M7D = $211e ;Rotation/Scaling Parameter D (WRx2) M7X = $211f ;Rotation/Scaling Center Coordinate X (WRx2) M7Y = $2120 ;Rotation/Scaling Center Coordinate Y (WRx2)
Encode value for BGMODE
:in: mode Mode 0-7 :in: bg3_prio BG3 Priority bool (0 = normal, 1 = high) :in: bg1sz BG1 Size BG_SIZE_8X8 / BG_SIZE_16X16 :in: bg2sz BG2 Size BG_SIZE_8X8 / BG_SIZE_16X16 :in: bg3sz BG3 Size BG_SIZE_8X8 / BG_SIZE_16X16 :in: bg4sz BG4 Size BG_SIZE_8X8 / BG_SIZE_16X16
Encode value for BG12NBA+BG34NBA
:in: bg1 BG1 Character Area uint16 (truncated to 4K word alignment) :in: bg2 BG2 Character Area uint16 (truncated to 4K word alignment) :in: bg3 BG3 Character Area uint16 (truncated to 4K word alignment) :in: bg4 BG4 Character Area uint16 (truncated to 4K word alignment)
W12SEL = $2123 ;Window Mask Settings (BG1/2) W34SEL = $2124 ;Window Mask Settings (BG3/4) WOBJSEL = $2125 ;Window Mask Settings (OBJ/COLOR) WH0 = $2126 ;Window 1 Left Position WH1 = $2127 ;Window 1 Right Position WH2 = $2128 ;Window 2 Left Position WH3 = $2129 ;Window 2 Right Position WBGLOG = $212a ;Window 1/2 Mask Logic Settings (BG1-4) WOBJLOG = $212b ;Window 1/2 Mask Logic Settings (OBJ/MATH)
MPYL = $2134 ;PPU1 Signed Multiply Result (lower 8-bit) MPYM = $2135 ;PPU1 Signed Multiply Result (middle 8-bit) MPYH = $2136 ;PPU1 Signed Multiply Result (upper 8-bit) WRMPYM7A = M7A ;PPU1 Signed 16-bit Multiplicand WRMPYM7B = M7B ;PPU1 Signed 8-bit Multiplier RDDIVL = $4214 ;Unsigned Division Result (Quotient) (LSB) RDDIVH = $4215 ;Unsigned Division Result (Quotient) (MSB) RDMPYL = $4216 ;Unsigned Division Remainder / Multiply Product (LSB) RDMPYH = $4217 ;Unsigned Division Remainder / Multiply Product (MSB) WRMPYA = $4202 ;Unsigned 8-bit Multiplicand WRMPYB = $4203 ;Unsigned 8-bit Multiplier WRDIVL = $4204 ;Unsigned 16-bit Dividend (LSB) WRDIVH = $4205 ;Unsigned 16-bit Dividend (MSB) WRDIVB = $4206 ;Unsigned 8-bit Divisor
APUIO0 = $2140 ;Sound CPU Communication Port 0 APUIO1 = $2141 ;Sound CPU Communication Port 1 APUIO2 = $2142 ;Sound CPU Communication Port 2 APUIO3 = $2143 ;Sound CPU Communication Port 4 SMPIO0 = APUIO0 ;Aliases for APUIO SMPIO1 = APUIO1 SMPIO2 = APUIO2 SMPIO3 = APUIO3 WMDATA = $2180 ;WRAM Data Read/Write WMADDL = $2181 ;WRAM Address (lower 8-bit) WMADDM = $2182 ;WRAM Address (middle 8-bit) WMADDH = $2183 ;WRAM Address (upper 1-bit)
JOYFCL = $4016 ;Joypad Input Register (LSB) JOYFCH = $4017 ;Joypad Input Register (MSB) JOYWR = $4016 ;Joypad Output (W) JOYA = $4016 ;Joypad Input Register A (R) JOYB = $4017 ;Joypad Input Register B (R) WRIO = $4201 ;Joypad Programmable I/O Port RDIO = $4213 ;Joypad Programmable I/O Port JOY1L = $4218 ;Joypad 1 (LSB) JOY1H = $4219 ;Joypad 1 (MSB) JOY2L = $421a ;Joypad 2 (LSB) JOY2H = $421b ;Joypad 2 (MSB) JOY3L = $421c ;Joypad 3 (LSB) JOY3H = $421d ;Joypad 3 (MSB) JOY4L = $421e ;Joypad 4 (LSB) JOY4H = $421f ;Joypad 4 (MSB)
NMITIMEN = $4200 ;Interrupt Enable / Joypad Request HTIMEL = $4207 ;H-Count Timer Setting (LSB) HTIMEH = $4208 ;H-Count Timer Setting (MSB) VTIMEL = $4209 ;V-Count Timer Setting (LSB) VTIMEH = $420a ;V-Count Timer Setting (MSB) MEMSEL = $420d ;Access Cycle Designation RDNMI = $4210 ;V-Blank NMI Flag / CPU Version Number TIMEUP = $4211 ;H/V-Timer IRQ Flag HVBJOY = $4212 ;H/V-Blank Flag / Joypad Busy Flag SLHV = $2137 ;PPU1 Latch H/V-Counter OPHCT = $213c ;PPU2 Horizontal Counter Latch (read-twice) OPVCT = $213d ;PPU2 Vertical Counter Latch (read-twice) STAT77 = $213e ;PPU1 Status/Version STAT78 = $213f ;PPU2 Status/Version
MDMAEN = $420b ;General Purpose DMA Channel Designation & Trigger HDMAEN = $420c ;H-DMA Channel Designation DMA Control (channel n = 0-7) DMAPn = $43n0 ;DMA Parameters BBADn = $43n1 ;DMA I/O-Bus Address (B-Bus) A1TnL = $43n2 ;HDMA Table Start Address / DMA Current Address (LSB) A1TnH = $43n3 ;HDMA Table Start Address / DMA Current Address (MSB) A1Bn = $43n4 ;HDMA Table Start Address / DMA Current Address (BANK) DASnL = $43n5 ;Indirect HDMA Address / DMA Byte-Counter (LSB) DASnH = $43n6 ;Indirect HDMA Address / DMA Byte-Counter (MSB) DASBn = $43n7 ;Indirect HDMA Address (BANK) A2AnL = $43n8 ;HDMA Table Current Address (LSB) A2AnH = $43n9 ;HDMA Table Current Address (MSB) NTRLn = $43na ;HDMA Line-Counter