# The boot ROM WSDEV "Boot ROM", "Splash animation", "Internal EEPROM" at the pinned revisions; WSHW for start registers. ## What it is and where 4 KiB at FF000h (ASWAN), 8 KiB at FE000h (SPHINX, SPHINX2), visible until a write sets port A0h bit 0 (lockout). The CPU starts at FFFF:0000 (FFFF0h), the top of the boot ROM. The player supplies it; the board identifies it by SHA-1 (census.md) and never ships one. ## What it does Checks the cartridge self-test bit (A0h bit 7); on colour, checks the header; enters the setup menu if START is held; updates the internal EEPROM's history fields; plays the splash (the built-in one, or on colour a custom one from the internal EEPROM); then copies a stub to RAM at 0400h that locks the boot ROM out and jumps to FFFF:0000 in the cartridge. Pin strapping: before lockout, the boot ROM checks whether keypad output rows read high with all inputs disabled; row 0 jumps to 4000:0000 before the cartridge self-test, row 1 to 4000:0010 after it. The Pocket Challenge V2 boots this way (its start registers are much closer to power-on's). ## Startup state (FluBBa's research, as recorded by WSDEV) - Power-on: CS FFFFh, IP 0, DS/ES/SS 0, FLAGS F002h; many I/O ports 00h, some random, some differing by SoC (03h, 16h, 17h, 1Ah, A0h: 04h on ASWAN, 06h on SPHINX). - Cartridge start (SPHINX2, default splash; other SoCs and custom splashes still TODO): AX FF85h (WS) or FF87h (WSC/SC) with AL equal to port A0h, BX 0040h or 0043h, SP 2000h, CS FFFFh, DS FF00h or FE00h, the listed I/O changes (A0h = 87h on colour, B6h = FFh, 9Eh = 03h, ...), RAM cleared except the stub at 0400h-040Ch (WS) or 0400h-040Ah (WSC/SC), colour palette filled with FFh. - WSHW: SP 2000h on all boot ROMs in all modes; CS = start segment (4000h in PCV2 mode); DS = FF00h (ASWAN) or FE00h (SPHINX/SPHINX2). ## Skip-boot A "skip-boot" start (the family habit for test sweeps: the Game Boy line's `--skip-boot`) needs this table. It exists only for SPHINX2 with the default splash; for ASWAN and SPHINX it is HYPOTHESIS until a trace of the real boot ROM fills it (the board can produce that trace itself once the boot ROM runs, and MAME's boot trace is a detector for it). Pass lists are taken with the real boot ROM where the player has one (open decision 3). ## MAME's view MAME 0.285's `wswan` trace from reset starts at FFFF0h with `br 0FF00h:0h` in the same register state (mame-oracle.md); 7,148 instructions run in the first frame, including a 24,579-clock RAM clear. MAME's `wscolor` refuses to start without a cartridge; `wswan` starts without one.