The WonderSwan SoC has three general blocks of I/O port accesses: {| class="wikitable" ! From !! To !! Holder !! Width !! Speed |- | $00 || $B7 || WonderSwan SoC || 16-bit || 1 cycle |- | $B8 || $BF || Internal EEPROM control || 16-bit || 1 cycle |- | $C0 || $FF || Cartridge bus || 8-bit || 1(color)/2 cycles (configurable) |} With the exception of internal EEPROM on the ASWAN, all unaligned 16-bit accesses can be converted to two 8-bit accesses with a 1-cycle penalty. == Device I/O ports == * Superscripts are used to mark ports specific to a given mode or platform: ** Color mode: (color). Such ports are only accessible when color mode is enabled through port $60. ** WS/WSC/SC console: (WS), (WSC), (SC). * If two Bits rows are provided, the second one refers to the "Color" mode. * The Type can be: R - readable, W - writable, L - writable before boot ROM lockout, 8/16 - width (byte/word). {| class="wikitable" ! Category ! Port ! Description ! Bits ! Type ! Notes |- ! rowspan="47" | [[Display]] ! $00 | [[Display/IO Ports#Display Control|Display Control]] | style="text-align: right" | ..wo Ws21 | RW8 | |- ! $01 | [[Display/IO Ports#Display Background|Display Background]] | style="text-align: right" | .... .sss pppp iiii | RW8 | Shade (s) Palette (p), Index (i) |- ! $02 | [[Display/IO Ports#Current Line|Display Current Line]] | style="text-align: right" | llll llll | R8 | Line (l) |- ! $03 | [[Display/IO Ports#Interrupt Line|Display Interrupt Line]] | style="text-align: right" | llll llll | RW8 | Line (l) |- ! $04 | [[Display/IO Ports#Sprite Table Address|Sprite Table Address]] | style="text-align: right" | ...a aaaa ..aa aaaa | RW8 | Address >> 9 (a) |- ! $05 | [[Display/IO Ports#Sprite Table First|Sprite Table First]] | style="text-align: right" | .iii iiii | RW8 | Index (i) |- ! $06 | [[Display/IO Ports#Sprite Table Count|Sprite Table Count]] | style="text-align: right" | cccc cccc | RW8 | Count (c) |- ! $07 | [[Display/IO Ports#Screen Address|Screen Address]] | style="text-align: right" | .222 .111 2222 1111 | RW8 | Screen 1 address >> 11 (1) Screen 2 address >> 11 (2) |- ! $08 | [[Display/IO Ports#Screen 2 Window|Screen 2 Window Left]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $09 | [[Display/IO Ports#Screen 2 Window|Screen 2 Window Top]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $0A | [[Display/IO Ports#Screen 2 Window|Screen 2 Window Right]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $0B | [[Display/IO Ports#Screen 2 Window|Screen 2 Window Bottom]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $0C | [[Display/IO Ports#Sprite Window|Sprite Window Left]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $0D | [[Display/IO Ports#Sprite Window|Sprite Window Top]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $0E | [[Display/IO Ports#Sprite Window|Sprite Window Right]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $0F | [[Display/IO Ports#Sprite Window|Sprite Window Bottom]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $10 | [[Display/IO Ports#Screen Scroll|Screen 1 Scroll X]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $11 | [[Display/IO Ports#Screen Scroll|Screen 1 Scroll Y]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $12 | [[Display/IO Ports#Screen Scroll|Screen 2 Scroll X]] | style="text-align: right" | xxxx xxxx | RW8 | Coordinate (x) |- ! $13 | [[Display/IO Ports#Screen Scroll|Screen 2 Scroll Y]] | style="text-align: right" | yyyy yyyy | RW8 | Coordinate (y) |- ! $14 | [[Display/IO Ports#LCD Control|LCD Control]] | style="text-align: right" | .... ..Ce | RW8 | Contrast (C)(WSC), Enable (e) |- ! $15 | [[Display/IO Ports#LCD Icon Control|LCD Icon Control]] | style="text-align: right" | ..32 1hvs | RW8 | Etc. 3 (3), Etc. 2 (2), Etc. 1 (1), Horizontal (h), Vertical (v), Sleep (s) |- ! $16 | [[Display/IO Ports#LCD Final Line|LCD Final Line]] | style="text-align: right" | llll llll | RW8 | Line (l) |- ! $17 | [[Display/IO Ports#LCD Back Porch Line|LCD Back Porch Line]](WSC) | style="text-align: right" | llll llll | RW8 | Line (l) |- ! $18 | [[Display/IO Ports#LCD Line Counter|LCD Line Counter]] | style="text-align: right" | llll llll | W8 | Line (l) |- ! $1A | [[Display/IO Ports#LCD Status|LCD Latched Icon Status]] | style="text-align: right" | ..cv vvhl | R8 | Cartridge icon (c), Volume icons (v), Headphone icon (h), Latch override (l) |- ! $1A | [[Display/IO Ports#LCD Status|LCD Latched Icon Control]] | style="text-align: right" | ..cs ...l | W8 | Cartridge (c), Sound (s), Latch override (l) |- ! $1C | [[Display/IO Ports#LCD Mono Shade LUT|LCD Mono Shade LUT 0/1]] | style="text-align: right" | 1111 0000 | RW8 | Shade index |- ! $1D | [[Display/IO Ports#LCD Mono Shade LUT|LCD Mono Shade LUT 2/3]] | style="text-align: right" | 3333 2222 | RW8 | Shade index |- ! $1E | [[Display/IO Ports#LCD Mono Shade LUT|LCD Mono Shade LUT 4/5]] | style="text-align: right" | 5555 4444 | RW8 | Shade index |- ! $1F | [[Display/IO Ports#LCD Mono Shade LUT|LCD Mono Shade LUT 6/7]] | style="text-align: right" | 7777 6666 | RW8 | Shade index |- ! $20 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 0]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $22 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 1]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $24 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 2]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $26 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 3]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $28 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 4]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $2A | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 5]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $2C | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 6]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $2E | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 7]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $30 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 8]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $32 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 9]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $34 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 10]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $36 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 11]] | style="text-align: right" | .333 .222 .111 .000 | RW16 | Shade LUT index |- ! $38 | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 12]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $3A | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 13]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $3C | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 14]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! $3E | [[Display/IO Ports#LCD Mono Palette|LCD Mono Palette 15]] | style="text-align: right" | .333 .222 .111 .... | RW16 | Shade LUT index |- ! rowspan="10" | [[DMA]](color) ! $40 | [[DMA#General DMA|GDMA Source Address Low]] | style="text-align: right" | llll llll llll lll. | RW16 | Linear address, low 16 bits (l) |- ! $42 | [[DMA#General DMA|GDMA Source Address High]] | style="text-align: right" | .... hhhh | RW8 | Linear address, high 4 bits (h) |- ! $44 | [[DMA#General DMA|GDMA Destination Address]] | style="text-align: right" | aaaa aaaa aaaa aaa. | RW16 | IRAM address (a) |- ! $46 | [[DMA#General DMA|GDMA Length]] | style="text-align: right" | bbbb bbbb bbbb bbb. | RW16 | Bytes (b) |- ! $48 | [[DMA#General DMA|GDMA Control]] | style="text-align: right" | ed.. .... | RW8 | Enable (e), Decrement (d) |- ! $4A | [[DMA#Sound DMA|SDMA Source Address Low]] | style="text-align: right" | llll llll llll llll | RW16 | Linear address, low 16 bits (l) |- ! $4C | [[DMA#Sound DMA|SDMA Source Address High]] | style="text-align: right" | .... hhhh | RW8 | Linear address, high 4 bits (h) |- ! $4E | [[DMA#Sound DMA|SDMA Length Low]] | style="text-align: right" | llll llll llll llll | RW16 | Length, low 16 bits (l) |- ! $50 | [[DMA#Sound DMA|SDMA Length High]] | style="text-align: right" | .... hhhh | RW8 | Length, high 4 bits (h) |- ! $52 | [[DMA#Sound DMA|SDMA Control]] | style="text-align: right" | ed.t rhff | RW8 | Enable (e), Decrement (d), Target (t), Repeat (r), Hold (h), Frequency (f) |- ! rowspan="2" | [[SoC]](color) ! $60 | [[SoC#System Control 2|System Control 2]] | style="text-align: right" | c4C. i.sl | RW8 | Color (c), 4BPP (4), Chunky (C),
Cart I/O wait state (i), SRAM wait state (s),
Cart clock speed (l). |- ! $62 | [[SoC#System Control 3|System Control 3]] | style="text-align: right" | S... ...p | RW8 | SwanCrystal (S), Power off (p) |- ! rowspan="4" | [[Hyper Voice]](color) ! $64 | [[Hyper Voice#Hyper Voice Output|Hyper Voice Left Output]] | style="text-align: right" | ssss ssss ssss ssss | W16 | Raw sample (s) |- ! $66 | [[Hyper Voice#Hyper Voice Output|Hyper Voice Right Output]] | style="text-align: right" | ssss ssss ssss ssss | W16 | Raw sample (s) |- ! $69 | [[Hyper Voice#Hyper Voice Input|Hyper Voice Right Input]] | style="text-align: right" | ssss ssss | W8 | Sample (s) |- ! $6A | [[Hyper Voice#Hyper Voice Control|Hyper Voice Control]] | style="text-align: right" | .ttc ???? errr ssvv | RW16 | Target (t), Channel reset (c), Enable (e), Rate (r), Sample (s), Shift (v) |- ! rowspan="8" | [[Display]](SC) ! $70 | LCD Timing Configuration 1? | style="text-align: right" | ???? ???? | RL8 | |- ! $71 | LCD Timing Configuration 2? | style="text-align: right" | ???? ???? | RL8 | |- ! $72 | LCD Timing Configuration 3? | style="text-align: right" | ???? ???? | RL8 | |- ! $73 | LCD Timing Configuration 4? | style="text-align: right" | ???? ???? | RL8 | |- ! $74 | LCD Timing Configuration 5? | style="text-align: right" | ???? ???? | RL8 | |- ! $75 | LCD Timing Configuration 6? | style="text-align: right" | ???? ???? | RL8 | |- ! $76 | LCD Timing Configuration 7? | style="text-align: right" | ???? ???? | RL8 | |- ! $77 | LCD Timing Configuration 8? | style="text-align: right" | ???? ???? | RL8 | |- ! rowspan="22" | [[Sound]] ! $80 | [[Sound#Sound Channel Frequency|Sound Channel 1 Frequency]] | style="text-align: right" | .... .ddd dddd dddd | RW16 | Divider (d) |- ! $82 | [[Sound#Sound Channel Frequency|Sound Channel 2 Frequency]] | style="text-align: right" | .... .ddd dddd dddd | RW16 | Divider (d) |- ! $84 | [[Sound#Sound Channel Frequency|Sound Channel 3 Frequency]] | style="text-align: right" | .... .ddd dddd dddd | RW16 | Divider (d) |- ! $86 | [[Sound#Sound Channel Frequency|Sound Channel 4 Frequency]] | style="text-align: right" | .... .ddd dddd dddd | RW16 | Divider (d) |- ! $88 | [[Sound#Sound Channel Volume|Sound Channel 1 Volume]] | style="text-align: right" | llll rrrr | RW8 | Left (l), Right (r) |- ! rowspan="2" | $89 | [[Sound#Sound Channel Volume|Sound Channel 2 Volume]] | style="text-align: right" | llll rrrr | RW8 | Left (l), Right (r) |- | [[Sound#Sound Channel 2 Voice Sample|Sound Channel 2 Voice Sample]] | style="text-align: right" | ssss ssss | RW8 | Sample (s) |- ! $8A | [[Sound#Sound Channel Volume|Sound Channel 3 Volume]] | style="text-align: right" | llll rrrr | RW8 | Left (l), Right (r) |- ! $8B | [[Sound#Sound Channel Volume|Sound Channel 4 Volume]] | style="text-align: right" | llll rrrr | RW8 | Left (l), Right (r) |- ! $8C | [[Sound#Sound Channel 3 Sweep Amount|Sound Channel 3 Sweep Amount]] | style="text-align: right" | vvvv vvvv | RW8 | Value (v) |- ! $8D | [[Sound#Sound Channel 3 Sweep Ticks|Sound Channel 3 Sweep Ticks]] | style="text-align: right" | ...t tttt | RW8 | Ticks (t) |- ! $8E | [[Sound#Sound Channel 4 Noise Control|Sound Channel 4 Noise Control]] | style="text-align: right" | ...e rttt | RW8 | Enable (e), Reset (r), Tap (t) |- ! $8F | [[Sound#Sound Wavetable Address|Sound Wavetable Address]] | style="text-align: right" | wwww wwww | RW8 | Address >> 6 (w) |- ! $90 | [[Sound#Sound Channel Control|Sound Channel Control]] | style="text-align: right" | nsv. 4321 | RW8 | Channel enable (1234) Noise (n), Sweep (s), Voice (v) |- ! $91 | [[Sound#Sound Output Control|Sound Output Control]] | style="text-align: right" | H... hrrs | RW8 | Headphones connected (H) Headphone output (h) Speaker output (s), range (r) |- ! $92 | [[Sound#Sound Channel 4 LFSR Register|Sound Channel 4 LFSR Register]] | style="text-align: right" | .rrr rrrr rrrr rrrr | R16 | PRNG state (r) |- ! $94 | [[Sound#Sound Channel 2 Voice Volume|Sound Channel 2 Voice Volume]] | style="text-align: right" | .... lLrR | RW8 | Left Half (l), Full (L) Right Half (r), Full (R) |- ! $95 | [[Sound#Sound Test|Sound Test]] | style="text-align: right" | cc5? ??sh | RW8 | |- ! $96 | [[Sound#Sound Channel Output Right|Sound Channel Output Right]] | style="text-align: right" | .... ..ss ssss ssss | R16 | Sample (s) |- ! $98 | [[Sound#Sound Channel Output Left|Sound Channel Output Left]] | style="text-align: right" | .... ..ss ssss ssss | R16 | Sample (s) |- ! $9A | [[Sound#Sound Channel Output Sum|Sound Channel Output Sum]] | style="text-align: right" | .... .sss ssss ssss | R16 | Sample (s) |- ! $9E | [[Sound#Sound Speaker Main Volume|Sound Speaker Main Volume]](color) | style="text-align: right" | .... ..vv | RW8 | Main volume (v) |- ! [[SoC]] ! $A0 | [[SoC#System Control|System Control]] | style="text-align: right" | C??? swcl | RW8 | Cartridge OK (C), ROM wait state (s), ROM width (w), Color system (c), Boot ROM lockout (l) |- ! [[Timers]] ! $A2 | [[Timers#Timer Control|Timer Control]] | style="text-align: right" | .... VvHh | RW8 | Horizontal enable (h), auto reload (H) Vertical enable (v), auto reload (V) |- ! [[SoC]] ! $A3 | [[SoC#System Test|System Test]] | style="text-align: right" | .... u?vh | RW8 | UART test (u), VBlank Timer test (v), HBlank Timer test (h) |- ! rowspan="4" | [[Timers]] ! $A4 | [[Timers#Timer Reload|Horizontal Blank Timer Reload]] | style="text-align: right" | tttt tttt tttt tttt | RW16 | Ticks (t) |- ! $A6 | [[Timers#Timer Reload|Vertical Blank Timer Reload]] | style="text-align: right" | tttt tttt tttt tttt | RW16 | Ticks (t) |- ! $A8 | [[Timers#Timer Counter|Horizontal Blank Timer Counter]] | style="text-align: right" | tttt tttt tttt tttt | R16 | Ticks (t) |- ! $AA | [[Timers#Timer Counter|Vertical Blank Timer Counter]] | style="text-align: right" | tttt tttt tttt tttt | R16 | Ticks (t) |- ! [[SoC]] ! $AC | ? | style="text-align: right" | .... ...p | W8? | Power off (p) |- ! rowspan="2" | [[Interrupts]] ! rowspan="2" | $B0 | [[Interrupts#Interrupt Vector Offset|Interrupt Vector Offset]] | style="text-align: right" | VVVV V... | W8 | Vector offset (V) |- | [[Interrupts#Interrupt Vector Request|Interrupt Vector Request]] | style="text-align: right" | vvvv vvvv | R8 | Requested vector offset (v) |- ! rowspan="2" | [[UART]] ! $B1 | [[UART#Serial Receive Data|Serial Receive Data]] | style="text-align: right" | dddd dddd | R8 | Receive buffer data (d) |- ! $B1 | [[UART#Serial Transmit Data|Serial Transmit Data]] | style="text-align: right" | dddd dddd | W8 | Transmit buffer data (d) |- ! [[Interrupts]] ! $B2 | [[Interrupts#Interrupt Enable|Interrupt Enable]] | style="text-align: right" | iiii iiii | RW8 | Interrupt index (i) |- ! rowspan="2" | [[UART]] ! $B3 | [[UART#Serial Status|Serial Status]] | style="text-align: right" | eb.. .tor | R8 | Enable (e), Baud rate (b), Transfer ready (t), Overrun (o), Receive ready (r) |- ! $B3 | [[UART#Serial Control|Serial Control]] | style="text-align: right" | ebO. .... | W8 | Enable (e), Baud rate (b), Reset Overrun (O) |- ! [[Interrupts]] ! $B4 | [[Interrupts#Interrupt Status|Interrupt Status]] | style="text-align: right" | iiii iiii | R8 | Interrupt index (i) |- ! [[Keypad]] ! $B5 | [[Keypad|Keypad Scan]] | style="text-align: right" | .iii oooo | RW8 | Input row (i), Output column (o) |- ! rowspan="2" | [[Interrupts]] ! $B6 | [[Interrupts#Interrupt Acknowledge|Interrupt Acknowledge]] | style="text-align: right" | iiii iiii | W8 | Interrupt index (i) |- ! $B7 | [[Interrupts#Interrupt NMI Control|Interrupt NMI Control]] | style="text-align: right" | ...b .... | RW8 | Low battery (b) |- ! rowspan="4" | [[EEPROM|Internal EEPROM]] ! $BA | [[EEPROM#Internal EEPROM Data|Internal EEPROM Data]] | style="text-align: right" | dddd dddd dddd dddd | RW16 | Data (d) |- ! $BC | [[EEPROM#Internal EEPROM Command|Internal EEPROM Command]] | | RW16 | |- ! rowspan="2" | $BE | [[EEPROM#Internal EEPROM Status|Internal EEPROM Status]] | style="text-align: right" | .... .... p... ..RD | R16 | Protected (p), Ready (R), Done (D) |- | [[EEPROM#Internal EEPROM Control|Internal EEPROM Control]] | style="text-align: right" | .... .... pewr .... | W16 | Protect (p), Erase (e), Write (w), Read (r) |- ! [[Mapper|Cartridge]] ! $C0
...
$FF | Cartridge I/O | | RW8 | Forwarded by the SoC |} == Standard cartridge I/O ports == While every cartridge is free to provide their own set of I/O ports (albeit with a few expectations set by the [[Boot ROM|boot ROM]]), all licensed cartridges appear to follow a shared layout. {| class="wikitable" ! Category ! Port ! 2001 ! 2003 ! Karnak ! Description ! Bits ! Type ! Notes |- ! rowspan="4" | Bankswitching ! $C0 | style="text-align: center" | ✓ (4 bits) || style="text-align: center" | ✓ (6 bits) || style="text-align: center" | ✓ | [[Mapper|ROM Linear (EX) Bank]] | style="text-align: right" | 00BB bbbb | RW8 | Bank at 0x40000 - 0xFFFFF. |- ! $C1 | style="text-align: center" | ✓ || style="text-align: center" | ✓ || style="text-align: center" | ✓ | [[Mapper|RAM Bank]] | style="text-align: right" | bbbb bbbb | RW8 | Bank at 0x10000 - 0x1FFFF. |- ! $C2 | style="text-align: center" | ✓ || style="text-align: center" | ✓ || style="text-align: center" | ✓ | [[Mapper|ROM0 Bank]] | style="text-align: right" | bbbb bbbb | RW8 | Bank at 0x20000 - 0x2FFFF. |- ! $C3 | style="text-align: center" | ✓ || style="text-align: center" | ✓ || style="text-align: center" | ✓ | [[Mapper|ROM1 Bank]] | style="text-align: right" | bbbb bbbb | RW8 | Bank at 0x30000 - 0x3FFFF. |- ! rowspan="5" | External EEPROM ! rowspan="2" | $C4 | rowspan="2" style="text-align: center" | ✓ || rowspan="2" style="text-align: center" | || rowspan="2" style="text-align: center" | | rowspan="2" | [[EEPROM#Cartridge EEPROM Data|External EEPROM Data]] | rowspan="2" style="text-align: right" | dddd dddd dddd dddd | R16 | Data read (d) |- | W16 | Data to write (d) |- ! $C6 | style="text-align: center" | ✓ || style="text-align: center" | || style="text-align: center" | | [[EEPROM#Cartridge EEPROM Command|External EEPROM Command]] | style="text-align: right" | 0001 CCaa aaaa aaaa
or 0000 01CC aaaa aaaa
or 0000 0001 CCaa aaaa | RW16 | Command and address |- ! rowspan=2 |$C8 | rowspan="2" style="text-align: center" | ✓ || rowspan="2" style="text-align: center" | || rowspan="2" style="text-align: center" | | [[EEPROM#Cartridge EEPROM Control|External EEPROM Control]] | style="text-align: right" | ASWR .... | W8 | Abort (A), Short (S), Write (W), Read (R) |- | [[EEPROM#Cartridge EEPROM Status|External EEPROM Status]] | style="text-align: right" | .... ..rd | R8 | Ready (r), Done (d) |- ! rowspan="3" | RTC ! rowspan="2" | $CA | rowspan="2" style="text-align: center" | || rowspan="2" style="text-align: center" | ✓ || rowspan="2" style="text-align: center" | | [[Bandai 2003|RTC Command]] | style="text-align: right" | ...1 CCCC | W8 | Command (C) |- | [[Bandai 2003|RTC Status]] | style="text-align: right" | R00B CCCC | R8 | Busy (B), Command (C), Ready (R) |- ! $CB | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | | [[Bandai 2003|RTC Payload]] | style="text-align: right" | dddd dddd | RW8 | Data (d) |- ! rowspan="2" | GPO ! $CC | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|GPO Data Direction]] | style="text-align: right" | 0000 oooo | RW8 | 1 = output, 0 = high-impedance (weak pull-down) |- ! $CD | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|GPO Data]] | style="text-align: right" | 0000 dddd | RW8 | 1 = 3V, if enabled by data direction |- ! Self-Flash ! $CE | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|Self-Flash Control]] | style="text-align: right" | 0000 000r | RW8 | RAM/Flash control (r) |- ! rowspan="4" | Extended bankswitching ! $CF | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | ROM Linear (EX) Bank | style="text-align: right" | 00bb bbbb | RW8 | Mirror of $C0 |- ! $D0 | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|RAM(/ROM) Bank]] | style="text-align: right" | 0000 00bb bbbb bbbb | RW16 | Bank at 0x10000 - 0x1FFFF. |- ! $D2 | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|ROM0 Bank]] | style="text-align: right" | 0000 00bb bbbb bbbb | RW16 | Bank at 0x20000 - 0x2FFFF. |- ! $D4 | style="text-align: center" | || style="text-align: center" | ✓ || style="text-align: center" | ? | [[Bandai 2003|ROM1 Bank]] | style="text-align: right" | 0000 00bb bbbb bbbb | RW16 | Bank at 0x30000 - 0x3FFFF. |- ! rowspan=3|Timer/ADPCM ! $D6 | style="text-align: center" | || style="text-align: center" | || style="text-align: center" | ✓ | [[KARNAK|Timer/ADPCM Control]] | style="text-align: right" | eppp pppp | RW8 | Enable (e); Period (p) |- ! $D8 | style="text-align: center" | || style="text-align: center" | || style="text-align: center" | ✓ | [[KARNAK|Sample input]] | style="text-align: right" | aaaa bbbb | W8 | Write one of two ADPCM nibbles, in order |- ! $D9 | style="text-align: center" | || style="text-align: center" | || style="text-align: center" | ✓ | [[KARNAK|Sample output]] | style="text-align: right" | ssss ssss | R8 | Read current sample output |} == I/O port routing == The [[NEC V30MZ]] supports 16-bit I/O port addresses. The WonderSwan SoC routes them using the following algorithm: * If an address is between $00B8 and $00BF inclusive, it is routed to the internal EEPROM control block. * If an address is between $00C0 and $00FF inclusive, it is routed to the cartride bus. * If an address's bits 0 through 8 inclusive are between $000 and $0B7 inclusive, they are routed to the SoC block. * If none of these conditions are reached, open bus is read. On the monochrome models, as well as color models in mono emulation, open bus is always 0x90.