From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Platform:WonderSwan" |
|---|
| claim | "The WonderSwan cartridge bank registers are I/O ports 0xC0 (linear ROM bank high nibble), 0xC1 (SRAM bank), 0xC2 and 0xC3 (ROM bank windows at physical 0x20000 and 0x30000)." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:WonderSwan" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "ws_bank_ports" |
|---|
| size | 4 |
|---|
| address | | kind | "hardware" |
|---|
| value | "0xC0" |
|---|
|
|---|
| fields | | offset | "0x0" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "BANK_LINEAR" |
|---|
| notes | "low nibble used: ROM bank = (value & 0xF) << 4 | (address >> 16), masked to ROM size, for 0x40000-0xFFFFF" |
|---|
|
| offset | "0x1" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "BANK_SRAM" |
|---|
| notes | "SRAM window 0x10000-0x1FFFF" |
|---|
|
| offset | "0x2" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "BANK_ROM2" |
|---|
| notes | "ROM window 0x20000-0x2FFFF" |
|---|
|
| offset | "0x3" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "BANK_ROM3" |
|---|
| notes | "ROM window 0x30000-0x3FFFF" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "WritePortCore cases 0xC0-0xC3 store BankSelector[]; ReadMemCore uses them" |
|---|
| repo | "https://github.com/libretro/beetle-wswan-libretro" |
|---|
| commit | "4b01295838ea89e3f1355bbe4cb5cf98aa6108cd" |
|---|
| path | "mednafen/wswan/wswan-memory.c" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Cartridge bank registers" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T19:11:47.266Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T01:38:07.566Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched beetle-wswan wswan-memory.c at 4b01295: BankSelector[4]; port write cases 0xC0..0xC3 store BankSelector[0..3] (0xC0 masks V & 0xF), reads return them; exactly four ports, size 4." |
|---|
|
|
|---|