v0.6.0 — Cartridge footer decode (bug #9)
Cartridge footer decode — community-bug ledger fully triaged.
format-ws now decodes the 16-byte cartridge footer into a typed CartHeader: publisher, system (WS/WSC), game id, version, ROM-size and save-type code tables, flags (orientation + bus width), mapper/RTC, the boot far-jump, and the checksum. Undocumented codes decode to explicit Other/Unknown/None — never guessed.
- Fixes community bug #9 (8-bit ROM bus). Footer flags byte (
0x0C) bit 2 givesBusWidth::{Eight,Sixteen}, surfaced byWsCartridge::bus_width. Hardcoding a 16-bit bus corrupts reads on the Pocket Challenge V2 and early carts. - Layout adversarially verified against WSMan, the WSdev wiki, ares, and Mednafen (5 source finders → reconcile → 6 adversarial verifiers). The pass fixed the bus-width bit to bit 2 (
0=8/1=16, over WSMan's contradictory cart-table reading) and corrected save-code0x01to 32 KiB. Citations, resolved disputes, and open gaps:docs/hardware/06-cartridge.md. - Promotes the provisional checksum to verified;
ws-cli --romprints the decoded header (derived facts only, no ROM bytes).
Community-bug ledger: 6 fixed · 3 partial · 0 pending (the partials #1/#7 are blocked on the unresolved cycle-unit question). 142 tests pass in debug and release; CI green.
Honest scope: still not a playable emulator. The next piece is the real WonderSwan memory map, which wires the fixed subsystems to their registers and consumes this decoded header.