Files
libretroadmin 183434d8e1 Arcade: a COH-H BIOS boots as the arcade board it belongs to
A BIOS whose ROMVER says zone T, model Z is a COH-H, the BIOS of the
arcade boards built on the PS2 (Konami Python and the like), and the
core now sets BiosIsArcade for it. With it:

- MagicGate loads the key store's arcade key set rather than the
  retail one, and, as an arcade mechacon does, decrypts a KELF of
  application type 0x07 with a Kbit and Kc of its own, read from
  mg_kelf07_kbit.bin and mg_kelf07_kc.bin (16 bytes each) beside the
  BIOS. Without them such a KELF is refused with 0x81; any other
  type, and any non-arcade mechacon, goes by the header's keys.
- The NVRAM is read as it is. A COH-H keeps no language or PStwo
  region block, and finding those blank no longer makes the core
  replace the board's NVRAM with console defaults.
- The IOP's TOOL registers read as the board's: config switches at
  0x1f803100 with only bit 3 set (no CD-ROM drive, which the BIOS
  checks), board id 0x7c at 0x1f803204. A console still reads the
  switches all high.

A memory card can also answer MagicGate with an ID of its own: eight
bytes in <image>.id beside the card image (dongle.ps2, dongle.id).
The mechacon keeps that ID as the card's key, so a real dongle's dump
and ID unwrap the KELFs bound to that dongle; a card without one keeps
the emulated card's ID. MemoryCardFile reads the file with the image
and MemoryCardProtocol hands it over as each handshake starts.

None of this is savestate data: the arcade key set, the type 0x07 keys
and the card IDs come from files at load, like the key store itself.

Tests: tests/mg drives a type 0x07 KELF through an arcade mechacon with
and without its keys, through a retail one, and from the key files;
binds a KELF to a card with its own ID. tests/cdvdscmd loads an NVRAM
with blank language and region under a COH-H BIOS and a console's.
tests/iopcoh reads the TOOL registers both ways, tests/mcdid opens
cards with and without a .id file; each fails on the code before this.
tests/biosver pins down the ROMVER zones BiosIsArcade rests on (COH-H
against T10K), which the old code already told apart.
2026-11-08 16:29:30 +01:00
..