Saturday, October 31, 2026

480 Games, 4 Gigabits, One Cartridge

 


We dumped and emulated what is, as far as we know, the largest Mega Drive multicart ever read out: 512 MiB of flash, 480 games, one menu and a mapper nobody had documented.

The cartridge

On the outside it is an ordinary Mega Drive cartridge. Inside sit three chips:

  • an ALTERA MAX CPLD that does all the address decoding and bank switching;
  • an F0095H0 BGA flash: 4 Gbit, which is 512 MiB;
  • a 256 KiB SRAM (M5M5V208) for game saves.

Power it up and you get a menu titled SUPER 480 IN 1: Ryu on the right, games sorted A to Z. The menu header reads SEGA GENESIS (C) 1999 KANEDA, with a leftover BMP 2 TILE DEMO as its internal name.

The problem is simple arithmetic. The cartridge slot exposes address lines VA1 to VA21, which is 4 MiB. The flash is 128 times bigger. Everything beyond the first 4 MiB sits behind a mapper, and nobody had documented this one.

The dump: a ten-version fight

The first attempt used a FlashKit MD Plus. It read the menu fine but had no way to reach anything behind it, and its fixed logic could not be taught new tricks. So the cartridge went onto a bare Arduino Mega 2560: address lines on PORTA, PORTC and PORTL; data on PORTF, PORTK and four digital pins; plus /TIME, /CE_0, /CAS0, /LWR and /VRES.

It took ten firmware generations:

  1. V4 read garbage in the top nibble. VD12 to VD15 had been read on the analog pins A12 to A15 instead of digital pins D12 to D15. V5P fixed it, and the 4 MiB menu view finally matched the FlashKit dump byte for byte.
  2. V7 hammered the $A130xx register range with 2,048 read pulses. The cartridge went into strange half-mirrored states, but no game appeared.
  3. V9 tried the read sequence we had pulled from the menu ROM, minus one detail. Ten tries, no bank switch.
  4. V10 added that detail: a single write to $A13002 before the reads. The hex dump changed. Baby's Day Out (Beta) appeared where the menu used to be.

From there it was engineering. V10d read the flash as 512 one-MiB segments, each read twice and checked with CRC32 per 2 KiB block and SHA-256 per segment, with resume support. V10e and V10f traded speed against USB serial timeouts, until the last segment came in.

The secret knock

The mapper is switched by reading ROM addresses, not by writing bank numbers. The disassembled launch routine, which the menu copies to RAM at $FF1000 before it runs, makes this plain:

move.w  D0,$A13002        ; arm the mapper
move.w  $020400+v0*2,D0   ; R0 = f1 bits 1-4
move.w  $020420+v1*2,D0   ; R1 = f1 bits 5-8
move.w  $020440+v2*2,D0   ; R2 = f1 bits 9-12
move.w  $020460+v3*2,D0   ; R3 = f2 (bit 0: upper 256 MiB, bit 3: SRAM)
move.w  $020480+v4*2,D0   ; R4 = f5 (lock / run mode)
movea.l $0.w,A7           ; new stack pointer from the new bank
movea.l $4.w,A0
jmp     (A0)              ; and go

In other words, it is a tiny register file:

  • address lines A5 to A7 pick one of five registers;
  • A1 to A4 carry a 4-bit value;
  • the data that comes back is ignored.

The bank bits are then OR-ed onto the CPU address rather than added. That explains an odd observation from the Arduino: with Baby's Day Out selected, the 4 MiB window showed Baby, Barkley, Baby, Barkley.

The menu code also corrected one of our own assumptions. We had believed the fifth read took the third table field. In fact it takes the fifth, 0x10 for every game, which is exactly what the Arduino firmware had been sending all along. The third field turned out to be something else entirely: the flash address of the game's save slot.

Before every launch, the menu does three things with the flash, using Intel-style commands (block erase, then buffered programming of 512 words):

  1. It writes a "last played" record, so it can reopen on the same entry next time.
  2. It copies the SRAM into the save slot of the game you played before.
  3. It copies the new game's save slot back into SRAM.

Any of the 37 save games gets its progress back, even though the SRAM is shared by all of them.

Is it all there?

Yes. A 512 MiB file proves nothing on its own, so we checked it several ways:

  • 255 of the 480 games are bit-exact No-Intro matches. They are split almost evenly: 129 in the lower 256 MiB and 126 in the upper. That confirms the order of the two halves, the start offsets, the byte order and the data, across the whole chip.
  • No aliasing. The only repeated 1 MiB blocks are deliberate copies: Sonic & Knuckles appears three times, Sonic 3 twice.
  • All 480 start offsets land on real game images, and the first 4 MiB match the independently verified menu dump.

The other 225 are not read errors. This cart is a time capsule of the 1990s copier scene:

  • 24 games carry "Dumped By TSD" or "Copied By TSD" in their ROM headers.
  • Seven say "Released by Vertigo 2099".
  • There are BBS intros from Magical and Premiere, a "Cracked by Jarre" tag and a trainer menu "Trained by Schlappi".
  • Betas and leftovers: Baby's Day Out is labelled (BETA) in its header, and Doom Troopers contains a BETA1 08:04:95 string. Thunder Force III even apologises in its header: "its not corrupt, its Taiwan Rip".
  • The Death and Return of Superman image has fragments of Microsoft Schedule+ in its padding: memory from whatever PC built it.

There are also games no menu entry points to. Between the regular titles sit a Japanese Columns (modified, so it stops on its own red checksum-error screen), an unlicensed Super Ping-Pong, and a pirate "Super Flicky" with a level select. All three boot when you aim the mapper at them by hand. The last 512 KiB of the chip hold nothing but noise.

Making it playable

We added the cartridge to Genesis Plus GX, as a libretro core for RetroArch. The new mapper module keeps the whole 512 MiB image in memory and maps 64 KiB pages straight into it. It emulates:

  • the arm-and-read register file;
  • the SRAM switch at $A130F1;
  • SSF2-style banking, because the cart carries the full 5 MiB Super Street Fighter II and that game uses it;
  • enough of the flash command set for the menu's save shuffling.

Flash changes never touch the dump. They go into a small side file in RetroArch's save folder.

Then a headless test host drove the original menu: set the cursor, press Start, take screenshots. It did this 480 times. Every entry booted, and every bank the menu selected matched the offset we had predicted. The save path also round-trips:

  1. Light Crusader writes its SRAM.
  2. Reset to the menu and start another game: the menu copies the old SRAM into Light Crusader's flash slot.
  3. In a fresh session, start Light Crusader again: the menu restores exactly those bytes.

The emulator even reproduces one of the cart's quirks. Entry "Sonic Knuckles 2" contains Sonic 2 for the lock-on, but it boots as plain Sonic & Knuckles. That is because the save flag maps SRAM over the very address where S&K looks for the second cartridge. We tried it on the real cart, and it does exactly the same.


 

What's left

The dump is done. The mapper model now explains everything the hardware has done so far. A few details are still inferred rather than measured. 

So getting this booting in MAME should be possible soon. 

No comments:

Post a Comment