Platform:WonderSwan
Appearance
| Developer | Bandai |
|---|---|
| Versions | WonderSwan (1999), WonderSwan Color (2000), SwanCrystal (2002) |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Bandai's 1999 handheld designed by Gunpei Yokoi's team (WonderSwan, WonderSwan Color 2000, SwanCrystal 2002): an NEC V30MZ (80186-compatible) at 3.07 MHz with 16 KiB (colour: 64 KiB) of internal RAM, a 1 MiB real-mode address space and bank registers at I/O ports 0xC0-0xC3.
Overview
- CPU: NEC V30MZ, an x86 (8086/80186) compatible core (Beetle WonderSwan
v30mz.c, Mesen2WsCpu). The clock is 3.072 MHz: Beetle WonderSwan sets the frame rate as3072000.0 / (159.0 * 256.0)(256 cycles per scanline, 159 lines;libretro.c), sizes the RTC second counter at 3072000 cycles (mednafen/wswan/rtc.c) and sets the sound buffer clock rate to 3072000 (sound.c; commit 4b01295838). - Address space: 20-bit physical (1 MiB), segmented like real-mode x86. Reset runs at physical 0xFFFF0, which is the last 16 bytes of the last ROM bank; see Format:WonderSwan ROM image.
- RAM: 64 KiB at 0x00000-0x0FFFF in both Beetle and Mesen2 for colour; Mesen2 uses only 0x4000 on monochrome (
_workRamSize). Internal EEPROM: 128 bytes (mono) or 2 KiB (colour), holding the owner profile; Mesen2 copies cartridge-header data into it as the boot ROM would.
Memory map (physical)
| Range | Contents (Beetle wswan-memory.c, ReadMemCore)
|
|---|---|
| 0x00000-0x0FFFF | internal RAM |
| 0x10000-0x1FFFF | cartridge SRAM, bank = port 0xC1 |
| 0x20000-0x2FFFF | ROM window, bank = port 0xC2 |
| 0x30000-0x3FFFF | ROM window, bank = port 0xC3 |
| 0x40000-0xFFFFF | linear ROM: ROM bank = (port 0xC0 & 0xF) << 4 | (address >> 16), masked to the ROM size
|
Bank registers are I/O ports: 0xC0 (linear banks), 0xC1 (SRAM), 0xC2, 0xC3 (ROM windows). Cartridge EEPROM is at ports 0xC4-0xC8 in Mesen2 (WsCart.cpp). Interrupt control ports 0xB0, 0xB2, 0xB6 and the key matrix port 0xB5 are also in WritePortCore.
Identification
- Port 0xA0 reads as 0x86 on WonderSwan, 0x87 on WonderSwan Color in Beetle's
gfx.c.
Related
Platform:Game Boy (competitor), Platform:Neo Geo Pocket.
Code & repositories
- https://github.com/SourMesen/Mesen2 @
b9fa69ddc6d0a331fb103fdb5eef6904305703c2· license: GPL-3.0 (declared by the contributor; GitHub's detector did not recognize LICENSE)
Multi-system emulator with debugger; Core/SMS (Sega mapper, Codemasters), Core/PCE (MPR banking, SF2 mapper, CD-ROM), Core/WS (cart footer parsing)
Tested on: source read, not run: read the source, not built · checked 2026-10-18 - https://github.com/libretro/beetle-wswan-libretro @
4b01295838ea89e3f1355bbe4cb5cf98aa6108cd· license: GPL-2.0 (declared by the contributor; GitHub's detector did not recognize COPYING)
Mednafen WonderSwan core with Dox's WSTech document (wstech24.txt) describing the ROM header and I/O ports
Tested on: source read, not run: read the source, not built · checked 2026-10-18