Skip to content

Map the dictionary ROM through ports 0xF0/0xF1 - #36

Merged
bubio merged 2 commits into
mainfrom
feat/dictionary-rom
Oct 16, 2026
Merged

bubio merged 2 commits into
mainfrom
feat/dictionary-rom

Conversation

@bubio

@bubio bubio commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Ports 0xF0/0xF1 were a stub, so the PC-8801MA system disk (N88-日本語BASIC) stopped at boot with 「ジショROMガアリマセン!」: it maps bank 0 at 0xC000 and checks for 44 10.

  • With JISYO.ROM loaded, port 0xF1 bit 0 = 0 shows the 16KB bank selected by port 0xF0 at 0xC000-0xFFFF for reads. GVRAM wins when selected; writes still reach RAM/TVRAM underneath. Without the ROM the ports do nothing.
  • Following XM8 1.20: a bank of 0x20 or more is ignored (not masked), and port 0xF1 takes only 0x00/0x01. Reset returns to bank 0, unmapped.
  • New API: PC88.loadDictionaryROM(_:), a BootSnapshot.capture overload taking dictionaryROM:, and b88_load_rom kind 6. Additive only, so this wants a minor release; a PC88.ROM case was tried first, but check-api.sh rightly flagged it as breaking exhaustive switches. Kind 6 is a value an older DLL already ignores, so the C ABI only grows.
  • Save states carry the mapping in a separate DICT section, so older versions still read them and the format version stays.
  • BootTester loads JISYO.ROM.

Verification

  • swift test: 1053 tests pass, including new bus, save-state and ROM-loading tests.
  • Regression suite: 20/20 PASS.
  • N88-日本語BASIC: boots to the BASIC prompt (before this change it showed the error). Typing in kanji input mode and pressing 変換 makes hundreds of bank switches and returns dictionary candidates (e.g. にほ → 二歩).

The app side (loading JISYO.ROM, docs, pin bump) follows in bubio/Bubilator88 after this is released.

🤖 Generated with Claude Code

Ports 0xF0/0xF1 were a stub, so N88-日本語BASIC, which checks for the
dictionary at boot, stopped with "ジショROMガアリマセン!". With JISYO.ROM
loaded, port 0xF1 bit 0 = 0 now shows the 16KB bank that port 0xF0
selects at 0xC000-0xFFFF for reads, behind GVRAM; writes still reach RAM.
Following XM8 1.20, a bank of 0x20 or more and port 0xF1 values other
than 0x00/0x01 are ignored.

PC88.ROM gains .dictionary, b88_load_rom takes kind 6, BootTester loads
JISYO.ROM, and save states carry the mapping in a DICT section of its
own so the format version stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding PC88.ROM.dictionary broke the public API: the enum is not
frozen, so a client switching over it exhaustively would stop
compiling. PC88.loadDictionaryROM(_:) takes its place, as
loadCDBios does for the CD BIOS, and BootSnapshot.capture gains an
overload with a dictionaryROM argument so Quick Look thumbnails still
get it. b88_load_rom kind 6 stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubio
bubio merged commit 08ba7dc into main Oct 16, 2026
3 checks passed
@bubio
bubio deleted the feat/dictionary-rom branch October 16, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant