# ROM Manifest The emulator accepts exactly the 16 files of MAME's non-merged `galaga` romset, "Galaga (Namco rev. B)", 1981, driver `src/mame/namco/galaga.cpp`. Every size, CRC32 and SHA-1 below was read from the reference archive on disk and compared against the `ROM_LOAD` lines of `ROM_START( galaga )` in galaga.cpp, `ROM_START( namco_51xx )` in namco51.cpp and `ROM_START( namco_54xx )` in namco54.cpp, and again against `mame -listxml galaga` from the installed MAME 0.285. All 16 match on all three fields; nothing is flagged. ## Archive identity The reference archive is a torrentzipped `galaga.zip`: 24,396 bytes, SHA-1 `bf07d0b87e621ac4d89cf814566ee7d5bcb41978`, 16 members, 39,968 bytes of member data. The archive hash identifies this one file; it is not what the loader checks. Users' archives differ in compression, ordering and nesting, so identity is established per member, never per archive. ## Why only the parent `galaga` galaga.cpp's `GAME` table lists the parent plus clones `galagao` (Namco, earlier revision: different program ROMs in `maincpu`, `sub` and `sub2`, same graphics and PROMs), `galagamw` and `galagamf` (Midway licence, Midway-numbered program ROMs and a different input-port definition; `galagamf` swaps in a "fast shoot" hacked `sub` ROM), `galagamk` (Midway set 2, a mix of Midway and Namco program ROMs), and the bootlegs `gallag`, `gatsbee` and `nebulbee`, which use a different machine configuration (`galagab`) with a fourth Z80 standing in for the Namco custom MCUs and are marked imperfect-sound because the 54XX explosion circuit is absent. As galemu did for Galaxian, this project targets one set with one board configuration so that every behaviour can be compared against MAME running the same bytes. The program-ROM clones would add untested code paths and the bootlegs would add a different board; neither pays for itself. ## Members Offsets are within the named MAME region. `maincpu`, `sub` and `sub2` are declared 0x10000 bytes each because they are Z80 address spaces; only the first 0x4000, 0x1000 and 0x1000 bytes respectively are ROM. Do not treat the rest of those regions as populated. | File | Size | CRC32 | SHA-1 | Region | Offset | Purpose | |---|---|---|---|---|---|---| | `gg1_1b.3p` | 4096 | `ab036c9f` | `ca7f5da42d4e76fd89bb0b35198a23c01462fbfe` | `maincpu` | `0x0000` | main CPU (Z80 #1) program | | `gg1_2b.3m` | 4096 | `d9232240` | `ab202aa259c3d332ef13dfb8fc8580ce2a5a253d` | `maincpu` | `0x1000` | main CPU program | | `gg1_3.2m` | 4096 | `753ce503` | `481f443aea3ed3504ec2f3a6bfcf3cd47e2f8f81` | `maincpu` | `0x2000` | main CPU program | | `gg1_4b.2l` | 4096 | `499fcc76` | `ddb8b121903646c320939c7d13f4aa4ebb130378` | `maincpu` | `0x3000` | main CPU program | | `gg1_5b.3f` | 4096 | `bb5caae3` | `e957a581463caac27bc37ca2e2a90f27e4f62b6f` | `sub` | `0x0000` | sub CPU (Z80 #2) program | | `gg1_7b.2c` | 4096 | `d016686b` | `44c1a04fba3c7c826ff484185cb881b4b22e6657` | `sub2` | `0x0000` | sub2 CPU (Z80 #3) program | | `gg1_9.4l` | 4096 | `58b2f47c` | `62f1279a784ab2f8218c4137c7accda00e6a3490` | `gfx1` | `0x0000` | character tiles, 8x8, 2 bpp | | `gg1_11.4d` | 4096 | `ad447c80` | `e697c180178cabd1d32483c5d8889a40633f7857` | `gfx2` | `0x0000` | sprite tiles, 16x16, 2 bpp (first half) | | `gg1_10.4f` | 4096 | `dd6f1afc` | `c340ed8c25e0979629a9a1730edc762bd72d0cff` | `gfx2` | `0x1000` | sprite tiles (second half) | | `prom-5.5n` | 32 | `54603c6b` | `1a6dea13b4af155d9cb5b999a75d4f1eb9c71346` | `proms` | `0x0000` | palette PROM, 32 RGB entries | | `prom-4.2n` | 256 | `59b6edab` | `0281de86c236c88739297ff712e0a4f5c8bf8ab9` | `proms` | `0x0020` | character colour lookup | | `prom-3.1c` | 256 | `4a04bb6b` | `cdd4bc1013f5c11984fdc4fd10e2d2e27120c1e5` | `proms` | `0x0120` | sprite colour lookup | | `prom-1.1d` | 256 | `7a2815b4` | `085ada18c498fdb18ecedef0ea8fe9217edb7b46` | `namco` | `0x0000` | WSG sound waveform PROM | | `prom-2.5c` | 256 | `77245b66` | `0c4d0bee858b97632411c440bea6948a74759746` | `namco` | `0x0100` | timing PROM; not used by MAME | | `51xx.bin` | 1024 | `c2f57ef8` | `50de79e0d6a76bda95ffb02fcce369a79e6abfec` | `51xx:mcu` | `0x0000` | Namco 51XX (MB8843) I/O MCU program | | `54xx.bin` | 1024 | `ee7357e0` | `01bdf984a49e8d0cc8761b2cc162fd6434d5afbe` | `54xx:mcu` | `0x0000` | Namco 54XX (MB8844) noise MCU program | Notes by region, each from the MAME source named: - `gfx1` and `gfx2`: `GFXDECODE_START( gfx_galaga )` in galaga.cpp decodes `gfx1` with `charlayout_2bpp` and `gfx2` with `spritelayout_galaga`, 64 colour codes each, sprites based at palette entry 256. Unlike Galaxian there are separate character and sprite ROMs. Bit layouts belong to the video document. - `proms`: a 0x220-byte region. The 32-byte palette PROM comes first, then the two 256-byte lookup PROMs; the char lookup at 0x020 and the sprite lookup at 0x120. galaga.cpp labels the three exactly so. - `namco`: the region shares its name with the WSG sound device tag. The device (`src/devices/sound/namco.cpp`) resolves its wave table from the region of the same name as itself and installs only 0x00-0xff of it as wave ROM, so `prom-1.1d` is the entire sound waveform table. `prom-2.5c` sits above that window; galaga.cpp labels it a timing PROM that the emulation does not use. The same 256-byte image (CRC `77245b66`) appears at 5C in every Bosconian set in the same driver, so it is a board-family timing part, not Galaga-specific. The loader must still require and verify it: it is part of the set's identity. - `51xx:mcu` and `54xx:mcu`: each MCU is its own MAME device with a private 0x400-byte `mcu` region holding the internal program ROM. `mame -listxml` reports these two files under the `namco51` and `namco54` device entries, not under `galaga` itself, and MAME's split and merged set layouts keep them in `namco51.zip` and `namco54.zip`. In the non-merged layout used here both ship inside `galaga.zip`. The loader should look for them in `galaga.zip` first and may fall back to `namco51.zip` / `namco54.zip` beside it. [unverified whether a fallback is worth implementing; no reference archive of that layout on hand] ## Loader rule The loader verifies every member by size, CRC32 and SHA-1 against this table before a single byte is placed on any bus. A member that is missing, the wrong size, or wrong on either hash aborts the load with a message naming the file and the field that failed; there is no partial start and no "close enough". Member names are matched the way galemu's `roms.py` does it: the archive is searched for entries whose basename, after normalising backslashes to slashes and folding case, equals the expected name, so `GG1_1B.3P` and `galaga/gg1_1b.3p` both resolve. If several entries share a basename, the one whose size and CRC32 match is taken; if none or more than one does, the load fails rather than guessing. An extracted directory is accepted on the same terms as a ZIP. ## Never committed No ROM, PROM or MCU image, and no fragment or transformation of one, is ever committed to this repository, published with the site, or embedded in test fixtures. Tests that need real bytes read them from the user's own archive at run time and skip when it is absent. This document carries hashes only.