How the Mega CD BIOS was made
A Mega CD game needs a BIOS: code in the console that loads the game and that the game calls
for the disc drive, the colours, saves and more. The real one belongs to Sega. mdemu has its
own, worked out from what games do when they run. No Sega BIOS file was used, and a game is all that a
player needs.
This page says how that was done, what was found, what each part rests on, and what went wrong on
the way. It is for people who want to check it, go on with it or use the same way for another console.
- How the Mega CD BIOS works is the technical breakdown: what runs when, memory, interrupts,
the drive, music and saves.
- The code is in
crates/mdemu-core/src/mega_cd/boot/ (main.s for the console and sub.s for
the second processor, the sub CPU).
- The notes at the top of
boot.rs, one folder up, have every call that mdemu has.
- Status says what works.
How this was tested: all 419 discs in the set were run with the old and new BIOS for 2,500 pictures
(about 40 seconds) each, with the same simple button presses. 406 show more than 10 different pictures, and 371 did before.
51 are better, and 6 were flagged as worse. Both releases of The Terminator now get to their menu and then
stop, where they were black. The pictures of the other four were looked at, and nothing that worked is broken in them. Dungeon Master II
shows the same screens about five seconds later. A picture does not
say that a game works, and of that version, only Lunar: The Silver Star is known to have been played (Microcosm, The Ninja Warriors and The Terminator were played with a later one): the person who played it said that it plays, and that the audio is solid. The public results are from a separate
run of the lab.
What it rests on, and what it does not
Used:
- Games, from outside: which BIOS calls they make, what they pass, which registers and
variables they read and write, and where they wait.
- What discs have outside their security code, such as their headers.
- The form of formatted save memory: its last 64 bytes, with their texts, come from jgenesis. They were not worked out
from games (more).
- How the hardware works: mdemu is a port of jgenesis, which has the Mega CD's hardware, and
ares was read to see how it handles word RAM and interrupts. Both are free software. Neither one's BIOS files were
used, and no BIOS code came from them.
- Written descriptions of two packed formats, on segaretro.org: "Nemesis compression" (revision 1172198, CC BY 4.0, as its
footer says) and "Enigma compression" (revision 375031). Only facts were used. They are credited in
ATTRIBUTION.md. That calls of the BIOS use these formats comes from a game (how).
- One thing from another project: the README of
bgyss/snatcher-port names the two addresses
where a disc's programs go. Space Ace runs from them. Nothing else from that project is in our BIOS.
Not used:
- A BIOS file, or a disassembly of one.
- Sega's own BIOS manual, which is confidential and leaked, or text that rests on it.
- The instructions of a disc's security code. Only its length, a checksum, its calls, where the
processor was and where it wrote were used.
- Code from another replacement BIOS.
- Any code that unpacks these formats, such as the listing of a game's code on the page about Nemesis. Both unpackers were written by
an agent that only had notes made from the descriptions and from our own logs, and not by the one that had seen the pages. It
reported where its first draft came close to code that it knew, and wrote that part in another way before any test. The finished code was then read for whether
it is our own.
What this does not prove:
- This was not a strict clean room. AI agents did the work with a person. What an agent learned in its
training cannot be ruled out, and the same agent watched games and wrote the code. The rule was not to
use names or tables of BIOS calls from memory, and to have something that games do for each part, or to
call it a guess or a choice of our own.
How something is found
Each thing was found in much the same way:
- Start our own BIOS, with calls that do nothing. A game stops, or waits for something. That
is the first clue.
- Find out where it waits, and for what. A changed copy of mdemu records both
processors:
- their place, registers and flags, but never the instructions;
- each BIOS call, with what was passed;
- the addresses they read and write, and the values of some hardware registers and of variables
that belong to the BIOS.
- Look for the same thing in other games. One game can do something unusual. When several games
pass values of the same kind, that shows what the values are for.
- Form an idea that can be wrong, and change one thing in a private version.
- Try the other answers too: all 256 values of a byte, each of its bits, each slot, or the
opposite answer. "It works now" is weak, and "only this one of 256 values works" is much stronger.
- Compare two runs. When one answer gets further, find the first place where the two differ. That
shows what the game tests, and can show that the answer was wrong.
- Look at the pictures. A count of different pictures can look good when the graphics are
scrambled, and bad when a game waits at a menu. Sound can be noise from a crash.
- Run other games, also ones that worked before. This can show that an idea was wrong.
- Write it down as known, a guess or our own choice, and test it. The tests of what is in mdemu are our
own programs. Faults are also planted in the boot code, to check that the tests find them.
The BIOS never recognises a game. An answer can depend on the console's region, but only where
games show that regions differ.
How sure each part is
| Word | What it means |
| Seen | A game shows it directly: it does the same work itself, sets the variables itself, or checks for that value |
| Tested | Other answers were tried, and they did not work, or it fits different games |
| Guess | It fits what was seen, but so could something else |
| Our own | Games need something here. How we do it, or how long it takes, is our own choice |
These words are about what was seen. They do not say that the real BIOS does the same inside.
Trying values in games
The tools for the first steps are in this repository. tools/bios.py logs what games read, where they wait and what they
call, and tries values (how to use it). It was written after the work of
2026-12-01, and gave the same results again for Microcosm and The Terminator. It also showed that what was first written
about The Terminator's second word was wrong. The Ninja Warriors was not tried again, as the BIOS has its fix. Some of what is in the table below, such as marks in registers, was done with private copies
of mdemu, and is not in it.
Some of this was brute force: when a game waits for an answer, give it all the possible answers, and see which one
lets it go on. This works on a game's own checks, while it runs in mdemu. It does not guess a key, or
get around a disc's protection, and nothing is read from a BIOS.
A game that waits does the same thing again and again, such as calling $81 and looking at a byte. Each time it
asks, it can be given another answer, so one run can try hundreds of them. The private copy of mdemu
can do this:
| What is tried | How | What it found |
| All 256 values of a byte | When the game has asked the same question some thousand times, each next question gets the next value. The log has the last one before it went on | $81's byte 0: 1 plays, 5 is paused, 8 looks for a place and $20 reads the contents. Byte 1: 1 for Ground Zero Texas, and 5 for Third World War |
| Random values in many bytes | Bytes 1 to 31 of the state get other random values at each question, and the log has those that let the game go on. This is done with many starting numbers, and then what they share is looked for | Lunar: The Silver Star went on with byte 7 at 0 and byte 15 below $80, 36 of 36 times, and with any value in byte 14. Fixed values did not let it go on: it waits for a change |
| What a call gives back | D0, D1 or carry gets another value when one call comes back, and nothing else changes | $5F16 with 0: with carry set, 13 of 91 games called 6, and five of them 0 again. So 6 formats the memory. Popful Mail needs D0 not to be 0. Dark Wizard looks at two bits of what $8A gives |
| Each bit by itself | One version of the BIOS for each bit | $308: bit 1, in eight games |
| Each place | One version for each slot, address or register | $35C is slot 1, and $310 goes on at A2 |
| A value in memory | One byte of the sub CPU's memory is set while a game runs, without a new version | $5E91: 14, 15 and 52 (below) |
| How long something takes | One version for each time | The Japanese $364: 181 pictures and more are enough, and 2, 30 and 120 are not |
| Marks in registers | A call comes back with marks in D0 to D7, to see which a game keeps | Two games keep the low byte of D7 after $29C |
| Whole rules | One version for each idea, on the same games | When a new sector can be taken: five ideas for Radical Rex (below) |
Nearly 200 private versions of the BIOS were kept. Many are small steps of the same idea.
What makes an answer count:
- Start from more than one value. A game can see a value one question late, so the last value in the log can be one
too many. Lunar went on after 0 and then 1. Starting with 1, it went on at once. Starting with 2, 4 and 8,
it waited through all the others, 0 too, until 1 came again. So it was 1.
- Give the game the value at the right time too. A byte can be right while the drive looks for a place, and wrong when it is
paused. "1 at all times" started Ground Zero Texas, and stopped Snatcher.
- Find out why. A value that lets a game go on can also skip a wait that it needs. Giving Lunar 1
started its next scene, still without music. The value showed what it waited for, and not the fault.
- Do it in the BIOS, for all games. A value that is put in from outside is only a test. The fix has to come from what
the BIOS knows, such as the disc's real last track, and then all discs are run again.
- Say how much it shows. "Only 1 of 256 values works" is strong for that game, and for that check. Other values can be right in
other games.
What it cannot find: a question that a game never asks, what a value means when several work, and how long something takes on a real
console. It also does not find a fault where the game does not wait. Radical Rex does not wait for an answer: its data was wrong,
and the crash came later.
Examples
A game that sets the variables itself: fades
WonderMega and Alshark call $390 and then $38C eight or nine times, mostly five pictures apart. A colour of
the console has eight levels of each of red, green and blue, so a fade from black takes eight steps.
That was only an idea.
F1 Circus never calls $390. It sets the BIOS's variables itself, and then calls $38C:
| Where | What it writes | What it is for |
$FFFE46 | $00 | The first colour |
$FFFE47 | $3F | How many there are, less one: 64 |
$FFFE48 | $000E | How dark they still are: $E, $C and so on to 0, which are eight steps |
$FFFE4A | $002026FC | Where the colours are |
Before this, F1 Circus called $38C 463 times and stayed black. With it, it calls it exactly eight times and
shows its first screen. How it knows that the fade is over was not found. It then calls $388 every five
pictures, which looked like a fade to black. With the zero flag set when all of the colours are black, it
goes on to its intro. With the opposite answer, it calls $388 only twice, and shows 72 pictures and not 264.
$390 takes the same kind of list as the call that loads colours ($2E4), which is a guess from the
two games that use it.
Trying every answer: where commands go
With each picture, the console sends the sub CPU 16 bytes. The sub CPU's program in several games takes them as four slots,
each a number and a value. Slot 0 goes to the BIOS call $5F22. Slots 1 and 3 go to other parts of
the game, where numbers that are multiples of 4 could be places in a table.
Our $35C used slot 0. The first new idea was slot 3, as $35C is the last of four calls next to each
other. That was wrong. Of the slots, only slot 1 worked. It took 14 releases past where they had been stuck,
though some of them needed more fixes.
$358 is slot 3: in Panic! and its Japanese version, Switch, only that slot gave sound.
$350 is slot 0: Final Fight gives it 3, then $19 with track $17, and then 4. These are
numbers of $5F22: pause, go to a track, and go on. This is from what it passes, as it changed no picture.
$354 could be slot 2. No game was seen to call it, so this was not added.
Comparing two runs: a byte of the drive's state
$81 gives a game the state of the drive. Byte 0 is 0 (stopped), 1 (plays), 5 (paused) or 8 (looks for a place).
What byte 1 is took several steps:
- Of all 256 values, only 1 started Ground Zero Texas. 1 at all times stopped Snatcher and Fresh Cleaner,
so it was 1 only while the drive looked for data or played it.
- Of all 256 values, only 5 started Third World War after
$18.
- The Terminator was still black. With 0 it read the disc again and again, and looked better. When
the two runs were compared, it was seen to be trying the same read again, so 0 was wrong.
- Its console tells its sub CPU to wait for 8. The sub CPU then sets a flag for 8 and clears it for 1.
So byte 1 has byte 0's numbers: 8 while the drive looks for data, and 1 while it reads. After
$18, it is 5. Both versions of The Terminator then reached their menus, and 22 related releases had
about the same counts as before. 1 in step 1 was right for that game, and not all of the answer.
A clock that was out of date
Final Fight's intro is a list of steps, each with a time, and it uses the time of the music in the
track. While the drive looks for a place, it gives no time, so ours still had 51 seconds and 34 sectors from
the last read. The whole intro was due at once, and ended in black. Clearing both times when the
drive starts to look for a place fixed all four versions.
That was only half of it, as each of these runs pressed buttons. They skip the intro. Without buttons, it was
still black, as a player found. The game calls $19 for the music and $04 to play it, 19 pictures later in the
American version. The drive was still on its way, and ignored $04. This was a fault in the drive, and
not in the BIOS: it now plays when it gets there. So a game is also to be run without buttons.
Two processors that wait for each other: how a game starts
The sub CPU of Psychic Detective sets its flag to 0, and goes on when the console's flag is 0. Its console clears its own flag until the
sub CPU's is 0. Our BIOS had cleared the console's flag before the game, so the sub CPU did not wait, and the console
did not see its 0.
The first experiment set the flag to other values and showed no change in pictures. It was a bad experiment,
as the flag was 0 for a moment before that. With no such moment, both went on to the next problem: the
console waited for word RAM, the memory that the two share. Both fixes together started the
game, and neither did alone. Novastorm needed only the second one.
A difference between regions
Daihoushinden's sub CPU counts 180 pictures before it does anything. On a Japanese console, the call
$364 therefore has to take longer than that. Waits of 2, 30 and 120 pictures had been tried before, and had led to a note that
said not to try a wait again. They were all too short.
The same wait stops some American and European games, such as Robo Aleste, so only a Japanese
console has it. It ends when the sub CPU makes its first BIOS call. That is our own choice, as two Japanese games
otherwise got ahead of their consoles. Dark Wizard (Japan) still needs something else.
Ishii Hisaichi no Daiseikai shows another difference. Its sub CPU reads a byte at $1F0 and compares it. With J
it starts, and with U, E or 0 it stops.
A game that shows where a program goes
F1 Circus loads a small program, which sets four registers and goes to $310:
| Register | Value | What it is for |
| A0 | $200000 | Where the new program is |
| A1 | $FF0800 | Where it goes |
| A2 | $FF0936 | Where it starts |
| D0 | $5000 | How many bytes there are. The game had read 10 sectors, which are $5000 bytes |
Copying the program and then going to A1 did not work. Going to A2 did. All five
discs of Sega Classics use this call too. They had shown the same scene again and again, and then went into
their games. Bytes and words gave them the same results, so the size in bytes is from F1 Circus.
It was not a bad copy
Death Bringer's console read from address $200 on, through nearly all addresses. That first looked like a copy
that had gone wrong. But it had read $1A4, where a cartridge's header says where its ROM ends, and added up every
word up to there. Ours had 0 there, so the sum went on for nearly all addresses. With a real end, the game
starts. After the sum, it reads $18E, where a cartridge's header has its checksum. With our BIOS's real sum there, with 0 (which
ours has) and with six other values, its pictures at frames 600, 1,200 and 1,800 were the same without buttons. What it does with the sum is
not known.
A list at address 0: Microcosm
All three releases stopped with an exception before their first picture. A private copy of mdemu logged each address of the BIOS that a game's own
code reads as data, without what it jumps to and the vectors that the processor itself reads. The log found what was known
already: Death Bringer's $1A4 and Ishii's $1F0. Just before it stops, Microcosm reads three entries of six bytes from address 0. It
follows a pointer that is 0, which nothing had set.
Then one place in the game was given other values at one address, and all else read what our BIOS has:
The word at $0 (USA) | What happens |
$0001, $00FF (ours was this) and $7FFF | Stops with exception 12 in frame 391, as before |
$0000 | Stops with exception 3 in frame 431 |
$8000, $FF00 and $FFFF | Goes on to its logo, its title and its film |
So it looks like a negative word ends the list. $00FF was the upper half of our first vector, the stack at $00FFFD00. The 68000 only
has 24 address lines, so $FFFFFD00 is the same place, and its upper half is negative. That is now the vector, for all games. The European and Japanese
releases stop with $00FF and $7FFF too, and go on with $8000 and $FFFF. That it is the word at $0 is our own choice: in the American
release, a negative word at $6 or $C also works. Why the pointer is 0 is not known.
Music that never started: Lunar: The Silver Star
A player said that it had no sound, and stopped at its first scene, though it seemed to go on. Runs of 2,500 frames (about 40
seconds) had ended before that. Scripts that press buttons for longer brought it back in two releases:
- A wrong lead that was a real fault: Lunar listed three saves in a cartridge, with scrambled names. Our
$FFFDAE only came back, with
carry clear, so games believed that there was a cartridge. Carry alone was not enough. Urusei Yatsura then said that the
cartridge was not formatted, as D1 still had an old value. With 1 or 2 in D1, Wing Commander and Shining Force CD nearly stopped.
With 0, games say that there is none. Lunar still stopped.
- Where it waits: its sub CPU copies all 32 bytes of the drive's state to word RAM for each picture. Its console
reads the first word and goes on looking. That was
$0500: paused.
- What it waits for: all values of byte 0, from more than one start, gave 1. So it waits for music to play.
But it never asked the BIOS for music.
- Where the music went: just before, the console sent its sub CPU the command
$0B with $0F. The
sub CPU's code took 15, read $5E91, and came back without a call. The flags after that read fit a
comparison with a lower number. Our BIOS never wrote there, so it was 0.
- The idea:
$5E91 is the disc's last track, and 15 was after 0. What was tried: with 0, the game never called for music. With 14,
it did once, with 15 twice, and with both it still stopped at about the same place. Why 15 was not enough was not looked into. With 52,
the disc's last track, the USA release called for music four times and went on. Sound was in 9,968 of 12,000 frames, and before in 2.
- The Japanese release then stopped at its welcome screen. It sent the drive to track 51 (
$33), and waited until byte 7 was $33. Ours
had two digits, $51. That had been marked as a guess. Up to track 9, both are the same. As a plain number, it
went on too, with 10,242 frames with sound.
Nothing was put in from outside in the last runs. Wing Commander has music with the same fix: 192 frames with sound became 2,562 (Japan),
and 161 became 2,731 (USA), of 3,500 without buttons. A player then said that Lunar plays and that its audio is solid.
Who takes the sector: Radical Rex
It stopped with the sub CPU's exception 3. With the buttons of the lab, the old BIOS ran on. With no buttons, the old one stopped at the same
place, so the fault was not new.
- Wrong data: its memory had sectors 63 to 118 twice, and nearly none from 119 on.
- Why: it loads
$B8 sectors to $24000. On the way, they go over a flag at $3FFFC, which it had cleared. Its own
level 5 code calls ours, and looks at that flag. When it is negative, it calls $8A, and takes sector 119 with $8B. Its main
program waits for that sector, gives up after a while, and reads all of them again, to the wrong place.
- The first idea, the time and mode in bytes 28 to 31, did not fix it. It fixed Pitfall (below).
- The second idea: games that turn level 5 off want it off. Radical Rex then runs, but Tomcat Alley, Fahrenheit, Midnight
Raiders and The Lawnmower Man are black. They turn it off in the same way (
$14 to $FF8033), and need it.
- The third idea: a game that turned level 5 off gets it back only for reads that go on until they are stopped. The Lawnmower Man and some
releases of Tomcat Alley run then, but Fahrenheit, Midnight Raiders and the other releases of Tomcat Alley are still black.
- The fourth idea: level 5 stays on, but its own code cannot have the sector that just came. Two rules were tried. One
went by the interrupt level when the game asks, and stopped Earthworm Jim. The other was a count that another interrupt clears, and nothing in the
64 discs of that test was broken. It is the one that mdemu has.
It was first written down wrongly, as if level 2 cleared that count. It is level 4. Two planted faults that
the tests did not find led to that. The count was already 0 when the test looked at it. The test now stops and
starts reads inside a level 5, where it is not.
The same value, but later: Pitfall
47 releases read bytes 28 to 31 of the drive's state, which were always 0. Radical Rex puts them together and decodes
them as digits. They were filled with the time and mode of the sector from $8B. Both releases of Pitfall, which had been black,
went on.
But then Midnight Raiders (USA) was black. It never reads those bytes itself. With the same value from $8D on, when the
game is done with the sector, it runs, and so does Pitfall. The value was right, and its time was not. Why Midnight
Raiders needs that is not known.
The same state in another place: The Ninja Warriors
It went black after its title without buttons. With buttons, it waited for the same byte in another place. The log of the BIOS's addresses (above) had its sub CPU reading the byte at
$5E80 more than 30,000 times, from the frame in which it went black. In that frame, it had started music with $12.
- All 256 values of that byte, in that loop: only 1 lets it go on. It then shows its story, its scores and its title again.
- 1 is what the first byte of the drive's state is while music plays. Ours became 1 33 frames after that call, but it was at
$5420, and $81 gave games that place. Nothing kept $5E80 up to date, as our stack only ends there.
- A second game fits. If the state starts at
$5E80, its byte 17 is $5E91. Our notes had that byte as the last track, as a guess. $5E91
had been found as the last track in Lunar: The Silver Star, without knowing of this. Lunar needs a plain number, and byte 17 had two digits.
So the state is now at $5E80, its bytes 16 and 17 are plain numbers, and nothing is written to $5E91 by itself. Night Striker,
Illusion City and Sonic CD (4) read $5E80 too. They show the same scenes as before, at slightly other times. An early test had only changed the game's first
read, long before that loop. It had no value that helped. It is the loop that says what a game waits for.
What is after the end of our code: The Terminator
Both releases stopped with an exception after START GAME. In the frame in which the console starts to copy data that was not all read
yet, it reads the long at $1C800. That is in the BIOS's 128 KB, and our code is only 13 KB, so it read 0.
The word at $1C800 (Europe), with 0 at $1C802 | What happens |
| 0 | Stops with exception 3 in frame 1,247, as before |
| 1 | Stops with exception 3 in frame 1,253 |
| The 515 others that were tried | It does not stop in 1,800 frames. With each of the four that were looked at for longer, it gets into its first level |
In the USA release, 0 and 1 stop it too, and the five others that were tried do not. The word at $1C802 makes no difference when the first one is 0. With 1 there, it does: the
Europe release stops with $0001 and 0, and does not with $0001 and $FFFF. So it looks like the size of the whole long counts. Nearly all values are enough, and there is no special
number to find. Why the game reads there is not known. What our code does not use is now $FF, as in a ROM where nothing was written, up to
$1FFFF. That is our own choice. In both releases, the same button presses as before now get into the first level, where the player runs and jumps. A person has also
played The Terminator, The Ninja Warriors and Microcosm, and said that they run and sound great. Which releases and how far were not said.
What there was first
boot.rs has every call, with the games that show it. In short:
| Part | What it does | How it was found |
| Loading a game | Puts both programs from the disc's first 16 sectors in memory, and starts them | Headers of 566 discs, and what runs. The addresses are from a README (above), and Space Ace runs from them |
| The sub CPU's program | $18 of its header says where its table of entries is: the first returns, the second is the game, and the third is called for level 2 | Seen in many games. What the fourth is for is not known |
| Where programs start | The console's at $FFFF0000, and the sub CPU's at the start of its sector | The Terminator's loop that clears memory, and Cobra, the only one of 419 discs that needs its sector's start |
| The console's calls | The video chip, colours, tiles, DMA, controllers, waiting for a picture, and exchanging messages | What games pass, what they do right after a call, and where they wait |
The exchange ($344) | The two processors take turns to send each other 16 bytes | Seen: Ishii and Sega Classics do all of it themselves |
Waiting for a picture ($308) | Sets bits 0 and 1 of $FFFE26 and waits until it is 0 | Tested: each bit, in eight games. Only bit 1 let three of them go on. Bit 0 came later |
The drive ($5F22) | Music, pause, seeking, reading, and the state of the drive | Games' waits, and all 256 values for parts of the state |
Sectors ($8A to $8D, $96) | Waits for sectors, sends them and ends that. $96 does not stop a read | How games call them, such as Dungeon Master II, which still takes a sector after $96 |
Saves ($5F16) | Finds, loads, saves, deletes and formats | What games pass and check. How files are kept is our own, so saves from elsewhere cannot be used |
The Japanese $364 | Waits up to 185 pictures | Daihoushinden. That it ends early, and the number 185, are our own |
| Level 2 | Reaches the game about 200 cycles late | Earnest Evans' console can otherwise miss its sub CPU's answer. How long it takes is our own |
What was found on 2026-11-30
These are newer, and all of them are in mdemu. Pictures are how many different ones a game showed in a short test run (mostly 2,500
frames, about 40 seconds). Button presses were the same simple ones for most games. With that version, only Lunar: The Silver Star is known to have
been played with it.
What the console has
| What | How sure | What showed it |
$350, $35C and $358 are slots 0, 1 and 3 | $35C and $358 tested; $350 seen in what is passed | Lords of Thunder, Formula One, Panic!, Final Fight and others. Before, mdemu had $35C as slot 0 |
$310 copies D0 bytes from A0 to A1, and goes to A2 | Seen, and A1 as the start was tested | F1 Circus: 10 sectors. Sega Classics (5): about 74 pictures to 423-779 |
$38C is a step of a fade from black, with variables from $FFFE46 on | Seen | F1 Circus sets them. It calls this 8 times, and not 463 |
$390 sets those variables from a list of colours at A1 | Guess | WonderMega and Alshark call it before $38C, and WonderMega then shows its background colour |
$388 is a step of a fade to black, and the zero flag says that it is done | Tested | F1 Circus: 8 pictures to 264 |
$FFFDAE is for saves in a cartridge. Without one, it sets carry and D1 is 0 | Tested: with carry clear, Lunar lists three saves that are not there. With D1 as it was, Urusei Yatsura says that the cartridge is not formatted. With 1 or 2, Wing Commander and Shining Force CD nearly stop | Burai: no crash in 2,500 frames, and 67 pictures to 220. 54 of the 419 discs call it |
$1A4 is the last address of the BIOS | Seen. The number, $1FFFF, is our own | Death Bringer: 2 pictures to 39 |
What the sub CPU has
| What | How sure | What showed it |
| Byte 1 of the drive's state is 8 while it looks for data, and 1 while it reads | Seen, and all values were tried in some games | Both versions of The Terminator: 1 picture to about 200. Both stop later |
| Byte 7 is the track for music, as a plain number, and 0 for data | Tested with track 51: the Japanese Lunar: The Silver Star goes there, waits for 51, and stayed at its first screen with two digits ($51). 0 for data was tested in one game | Tenkafubu: 4 pictures to 136. Lunar: The Silver Star waits for 0 after it has read data. With any of 13 other values that were tried, it is black |
| Both times are cleared when the drive starts to look for a place | Tested. What the real one gives then is not known | Final Fight (4): 8 pictures to 939-1472 |
After $02, the state is 0 | Tested. That the drive is only paused inside is our own: stopping it left out two releases | Three versions of Spider-Man vs. The Kingpin: 6 pictures to 481-494. Lethal Enforcers (6): sound for the first time. Both call it again while the state is 5 |
$5F0A sets the jumps at A0 from the header of a program at A1, and D0 is 0 after it | Tested: with a table at A1, it stops. Of D0 = 0 to 4 after it, only 0 lets the game's next call go on (boot.rs) | Dark Wizard (USA): 2 pictures to 25. Its title is only partly drawn |
$5E91 is the disc's last track, as a plain number | Tested: Lunar (USA) wants track 15. With 14 there it stops at the memorial, as with 0. With 52, its last track, it goes on. That it is the last track is the simplest reading, and not shown in another way | Lunar: The Silver Star (USA and Japan): music, and the story goes on. 2 frames with sound of 12,000 became about 10,000. Wing Commander (2) has music too |
Bytes 28 to 31 of the drive's state are the time and mode of the last sector that a game took, from $8D on | Tested. From $8B on, Midnight Raiders (USA) is black | Pitfall (2): 2 pictures to 523 and 775 |
| A sector that just came can only be taken after the next level 4 | That a game's own level 5 cannot have it at once was tested. Level 4 is our own | Radical Rex: its handler calls ours first, and then took a sector that its main program waited for. With level 5 off it ran too, but Tomcat Alley, Fahrenheit and others need it on |
$1F0 has the letter of the region | J was tested. U and E as the others' letters are a guess | Ishii: 2 pictures to 114, but scrambled |
$634 goes to the handler of the decoder's interrupt | Seen: the game always uses it, also after ours had moved | Flashback gets further. It is black in 2,500 pictures, and gets into the game in the lab's 60 seconds |
| That interrupt goes on after a read, and the decoder stops writing | Tested in one game. How it is done is our own | Flashback waits for it |
The sub CPU cannot write below $5400 | That it needs protection was seen. How much is our own | Pitfall reads a sector to address 0, over our BIOS. It no longer crashes there. What made it show pictures is bytes 28 to 31 of the drive's state, above |
How a game starts
| What | How sure | What showed it |
The console's flag ($A1200E) is not 0 | Tested: it cannot be 0 in between. Psychic Detective works with all nine values that were tried, but games take its bits as orders (see mistakes). $20 is our own | Psychic Detective (2): 1 picture to 100 and 218. AX-101 (2) |
| With word RAM as one block, the console has it. It is still in two banks at the start | Tested | Novastorm (2): 1 picture to 231 and 364. Psychic Detective needs it and the flag |
| The console starts a little after the sub CPU | Needed with that word RAM. The time, 1,000 rounds of a loop, is our own: 50 were too few, and 100 to 20,000 worked | Formula One (2) |
A change to the hardware, and not the BIOS
When the console sends the sub CPU an interrupt that is turned off, it is dropped, and not kept for later. Arslan Senki otherwise waits
forever, and with this it gets to the first turn of a battle (9 pictures to 181). ares does this too. One game and another
emulator are good evidence, and not proof. The code says that this is what it rests on. It still needs a
test on a console, or documentation.
From an idea to a published result
| Step | What is done | Why |
| 1. A narrow loop | One idea, on the games that show nothing and those that use the same thing | It takes minutes. It also hides what breaks elsewhere |
| 2. All 419 discs | 2,500 frames each, and everything that got worse is listed. It is compared with the BIOS on GitHub and with the published one | It takes about 8 minutes on 28 threads. Radical Rex had been missed, as it also stopped in the other comparison |
| 3. Looking | The pictures of everything that is listed, also without buttons, and for longer | Of the six on the last list, four were only other buttons, a menu, or a pause. The other two are The Terminator's |
| 4. Tests and faults | Our own programs, and a planted fault for each new rule | 212 of 212 are found. The last ones showed the mistake with level 2 and 4 |
| 5. The same bytes | boot.bin in mdemu is compared with the version that was tested | What was tested is what is sent |
| 6. The lab | The exact commit, with the public lab: 389 releases, 60 seconds each. It is compared with the published results | Fewer scenes are looked at too: SimEarth now asks whether to play without a cartridge, and the lab leaves it at "No". With "Yes", it gets into the game |
| 7. All pictures | Each of the pack's pictures is looked at before it is public. The first pack had 766 | Nothing private or unsuitable may be in it |
| 8. Known problems | Only what was seen in this build. Games that may have a problem are run for 120 seconds, and all their pictures are looked at | An older list was wrong. Panic! and Flashback get into the game now, and Dune's blocky graphics had been missed |
| 9. The live site | The pages themselves are read | See below |
The result of the lab for 57290d0: 380 of 389 releases show a picture, and 336 did before. None lost its picture. Seven crash, and eight did before. Only
The Terminator (2) is newly among them. It was black before.
The site first showed these results as the older ones. Results of one day were in the order of their names, so of
their commits' digits, and 57290d0 comes before deacbad. So the site said of 33 games that they may have broken, such as Pitfall, which had
got better. Every check had passed. It was found by reading Pitfall's page.
The first two ideas were workarounds: the time in the names of new results, and a new sweep only to get such a
name. The sweep was stopped, as neither changed what was wrong. Now each set of results says when it
was made, and only that puts them in order. When two of one day cannot be put in order, they are refused. The seven sets that were
already published have the time when their GitHub release was published, and nothing that they found was changed. In a trial
before anything was sent, the same results then gave 1 game that may have broken, and not 33: The Terminator. This is in forge and the rules of emuforge, so it is
for all emulators. nesemu had two sets in the wrong order as well. A run that ends well does not show that the page
is right.
Mistakes that are worth knowing
- A fix can work and show no new picture, because the next problem comes right after it. Look at where both processors wait, before and after.
- An experiment can undo itself. Psychic Detective's flag was 0 for a moment, and a value that was tried for
$364 was put in the
stack. Look at what the test does.
- Too short a wait is no answer. It only says something about that length. A wrong note can then stop others from trying again.
- Something that runs for longer can be worse. The Terminator read the disc again and again, and that was the same read that failed each time.
- Sound can be noise. Pitfall's frames with sound were most likely from a crash: they went away when it no longer overwrote our BIOS.
- A picture that changes does not say that a game can be played. Lunar: The Silver Star had changing pictures, and the list of what is wrong had only its missing sound.
A player found that it stops at its first scene. It waited for music that had never started.
- The first explanation can be a real fault, and not the one. Lunar's list of saves that are not there was one, and looked like the reason why it stopped. It was not.
- Look at which interrupt code is in. The change for Radical Rex was first written down as level 2. It is in the handler of level 4. Two planted faults
that were not found showed that.
- One game is not all games. Sending level 2 before every game's handler started three games and broke about 25 others.
- A button press can look like a difference. Scripts paused Lords of Thunder and Cadillacs and Dinosaurs. When a result is strange, run it with no buttons pressed.
- Some games change with small differences in time, such as Aisle Lord and Seirei Shinseiki. One better or worse result is not enough there.
- Test all games before a push. The private version was made with games that did not work. When all 419 discs were run, AX-101 was black, because 2 had been
chosen for the console's flag, where all values were right for the first game. 4 was right for both, and Cosmic Fantasy Stories was
black with it. 8,
$10 and $20 were right for all three, so all 419 discs were run with each. 8 made 58 discs worse than 4 had, $10 made 10
worse, and $20 none. A few games would not have shown this. Lunar: The Silver Star was black too. Its wait for byte 7
had been right with the old BIOS by accident, as both numbers were 0. These were fixed without recognising any game.
- Fewer pictures can be better. Night Trap showed 498 different pictures before and 297 after. Static counts as a different picture each
time, and the pictures show that there is less static now and that its clock gets further.
- The same screens can come later. Dungeon Master II shows the same screens, about 300 pictures (5 seconds) later
since the console has word RAM at the start. Why is not known.
- A failed build leaves the old program. A test of a new version that did not build tests the old one.
What was found on 2026-12-01
| What | How sure | What showed it |
The console's first vector, its stack, is $FFFFFD00 | That a negative word ends the list was tested. That it is the one at $0 is our own | Microcosm (3): nothing before, and now its logo and film (how) |
The drive's state is at $5E80, where games also read it without asking | Tested: of all 256 values, only 1 lets The Ninja Warriors go on. $5E91, the last track, is its byte 17. That it is the same 32 bytes is our own reading of these two | The Ninja Warriors goes on after its title (how) |
| Bytes 16 and 17 are the first and last track, as plain numbers | The last one was tested in Lunar, as $5E91. The first one is a guess | |
After our code, the BIOS is $FF | Tested that the long 0 and $00010000 stop the game, and that nearly all others do not. $FF is our own | The Terminator (2) gets into its first level (how) |
$2F0 unpacks tiles from A1 to A2 (Nemesis), and $330 a map of tiles, to which it adds the tile in D0 (Enigma) | Tested in one game: other ways to unpack them, and no tile in D0, have wrong pictures. boot.rs says what is a guess or our own | Dark Wizard (USA): its menu was black, and shows portraits, frames and text. Blocks of wrong tiles that stayed on a part of it were sprites from before it, which $2A0 clears (boot.rs). Its intro without buttons was blank, and shows small pictures. Whether their size and place are right is not known. One call takes almost five seconds. How long a real one takes is not known. No map or battle was reached, and nobody has played it. Of all 419 discs without buttons and 63 with them, with 18 pictures each, only Dark Wizard (USA)'s pictures differ. Sound was not compared in these, and was the same in Sonic CD and Lunar |
| While data is read, the drive's state is 8 until the first sector waits | Tested: the three releases of Starblade go on from their logo to their title and demo. Saying 8 for at least 6, 8 or 16 of the drive's clocks also does that, and 3 (before), 4, 5, 12 and 32 do not. What a real one says until then is not known | Starblade asks $8A for a sector when the state is 1. There was none yet, so it started the same read again, and never got it. A player saw it stop. With buttons, Starblade (Europe) and Microcosm (USA) get into their games, where they were black. All 419 discs were run for 5,401 frames without buttons: 358 have the same 18 pictures, three are Starblade's, and pictures of the 58 others were looked at. They show the same scenes at other times, or demos that go another way. Heimdall (USA) also shows a scene that was not in the older pictures that were compared. Of 63 discs with buttons, 48 are the same, and nothing looks worse in the others. Sound was not compared |
$308 makes $FFFE26 3, and not 2 | Tested: the player and the others in Wakusei Woodstock are there with 1, 3 and $FF, and not with 2, 6, 10 and $82. So it needs bit 0, and three other games need bit 1. That it is not more than these two is our own | A player saw it: the characters were only there after the menu was opened, and then followed the player. In 32 discs, each for 6,001 frames with and without buttons, only Wakusei Woodstock's pictures differ. Others were not run |
$1F0 is compared with J | Tested in a second game: of all 256 values, only J changes the pictures of Sega Classics (USA, 5-in-1) | It does not explain its scrambled menu |
All 419 discs were logged for 1,500 frames (about 25 seconds) without buttons. The stack and the drive's state, which nearly all games read, were left out.
What was tried, and did not get a game further:
- Links (USA, RE) reads the byte at
$0 in the frame in which it stops. All 256 values stop in the same way. The other release was not seen to read there.
- Microcosm's sub CPU reads the word at
$470. 517 values did not change that it stops.
- Dynamic Country Club's sub CPU reads the byte at
$0 once, with buttons. All 256 values show the same pictures. Pro Yakyuu Super League CD's
does too, and all but 0, which ours has, take its pictures away.
- The Terminator (Europe) also reads the long at
$11000. 10 values did not change where it stops.
- Dark Wizard (2) sets its stack from the sub CPU's first vector, which is a guess from how it stops with some of the values. No value that was tried shows a picture.
A test of a place that a game never gets to changes nothing, and that looks like a value that does not matter. It happened here with two
games. So each test has to say how often its value was read, and one where that never happened does not count.
All 419 discs were run with the new vector, for 5,401 frames without buttons, with a small picture each 300 frames. In 416, all 18 pictures are the same as
before. The three that differ are Microcosm's. The two other changes were then compared in the same way:
- With the state at
$5E80, 54 discs differ. Pictures of 53 were looked at side by side. All but The Ninja Warriors, which is fixed, show the same scenes at
slightly other times, or demos that go another way. The BIOS takes a little longer to start, which is likely why. Heimdall (USA) had one more blank picture at
frame 3,300. With a picture each 100 frames, it has the same scenes, about 100 frames later from there on, and one blank picture fewer.
- With
$FF after our code as well, 3 of the 419 differ: 3x3 Eyes and The Terminator (2), with the same scenes.
- 60 discs with buttons pressed: 12 chosen ones and 48 at random.
$FF changes three of them: The Terminator (2), which gets into its first level, and Dark Wizard (USA), with the
same scenes at other times. With both changes, 16 differ. The Ninja Warriors gets into its first stage, where it was black. Nothing looks worse in the others' pictures. As the
buttons come at slightly other moments, some games go another way.
- Starblade (Europe) is black after its title with these buttons, before and after these changes. Why is not known.
Sound, what comes later, and what is between the pictures were not compared.
517 values are all 256 of each byte with 0 in the other one, each bit, and a few patterns. They are not all 65,536.
What is not known
Of 46 releases that showed 10 pictures or fewer with the old BIOS, 35 show more now, and 11 do not. More pictures do
not mean that a game works: some of the 35 have scrambled or missing graphics, go black or stop. What is known to be wrong with a game is on its
page in the public results.
Still open:
- Games: Links (2), Dark Wizard (Japan) and WonderMega. Flashback and Dragon's Lair (Japan) show
almost nothing in these short runs, and get into the game in longer runs of the lab.
Slam City (USA) and Surgical Strike (Brazil) are also open. Their headers do not say that they need a 32X, so this
may not be the BIOS.
- Calls of the console that do nothing yet:
$294, $2A4 to $2AC, $2F4, $318, $30C, $340, $378 and $394 are called by games
that were looked at. $2F4 could have to do with sprites, as WonderMega gives it a place just before its colours.
- Of the sub CPU: the rest of the drive's state, how
$83 gives its answer, what $82 gives, and some of the numbers of $5F22.
- Saves in a cartridge: mdemu's hardware has one, and our BIOS says that there is none (more). To use it through the BIOS is still to be done. Aoki Ookami starts without one when C is pressed. When it goes back to the console's menu instead, it is black, as our BIOS has no menu.
- Times: how long real calls take. Ours are choices that let games work.
- The real BIOS: nothing here was compared with one. A game that works shows that our answer was good enough for what it
did, and not that the real one is the same.
How to check this, or go on with it
- Change one thing at a time, and say what would show that the idea is wrong. Then try other answers.
- Use games that you have. Say which release and region, what was run, and for how long. A game is only playable when it was run to its end: by a movie whose ending was seen, or by a person who played it.
- Never use a BIOS file, a disassembly of one, or leaked documents for this. Do not ask for them, offer them or link to them.
- Never publish a game's code, or a trace with its instructions. Places, registers, calls and counts are enough.
- Never make an answer depend on which game it is. It can depend on the region when games show that.
- Write down guesses as guesses. Add a test to
mega_cd/tests.rs, and plant a fault to see that the test finds it.
- Update
boot.rs, this page and how it works together. A changed finding has to say what it was before and why it changed.
- After a change to the boot code, run
tools/boot.sh and then tools/check.sh.
The tools that recorded the games, and the pictures, are not published: they were made for one person's games and
machine. What was found is here and in boot.rs, so that it can be checked with other tools.