mdemu plays games for the Mega Drive, which is the Genesis in North America, and for both of its
add-ons. It opens cartridges and discs (.cue or .chd) straight from their files, also in a
.zip. Your own game is the only file it needs. It is an app of its own, and a libretro core for
RetroArch and other front ends too (Using mdemu).
It is early. Mega Drive and 32X games run. Many Mega CD games get into their intros, menus or
the game, and others do not yet. Status says what works and what does not.
Where it comes from
mdemu is ported from jgenesis, by jsgroth and the others
in its history. The processors, video, sound and most of the other hardware come from it, and
mdemu rests on its authors' research. The credits say what was ported,
from which commit, and what else helped.
The port was checked against it, frame by frame. With the same buttons, 84 Mega Drive files had
the same main memory after each of 252,000 frames, and 25 32X games after each of 75,000.
Status has the rest, with what differs.
What we added
- Our own Mega CD BIOS. A Mega CD game needs code that is in the console. We wrote a
replacement by working out what games expect as they run, without a Sega BIOS file. In a test of all
419 discs in our set, 406 showed more than ten different pictures. That does not say
that they can be played, and work on it goes on.
How it was made says what each part rests on, and
how it works has the details.
- Our own 32X boot code, in place of the console's boot ROMs. All 25 of the 32X games
that were compared show pictures of the game with it.
- Much less work for each frame, with the same output. Many parts of the console are left alone until
something could see what they do. Loops in which a processor only waits are passed, many dots
are drawn at a time, and sound is mixed once a frame. It is all safe Rust. No shortcut knows any game, and none
needs a special kind of processor or a setting. In ten games for all three consoles, the core took 32% of
the time that it took before this work, on one computer: 18 to 37% for the Mega Drive and the Mega CD, and 38 to 59% for
the 32X. The work was done in two parts, and each was compared with the core from before it: 163,500
frames of 67 games, and 178,500 frames of 72. Memory, picture, sound and state were the same in all of
them. These were parts of games, and not whole ones. Performance explains each change,
how it was timed
and what was checked.
- The region comes from the game itself, and not from a list of games: from what the cartridge's
header or the disc's security code says. A setting can change it.
- An app that is ready to play: a menu for a gamepad or the keyboard, ten savestate slots
with pictures for each game, buttons that can be changed, fast forward and screenshots. It is
shared by emuforge's emulators.
- Games run in a lab. Agents and people run whole collections without a window, look at what
stops games, and fix what they have in common. That is how much of the BIOS was found.
The lab also measures whether a game answers its controls. In the full run of build
9c0c0d9, each
of 1,857 releases ran for 60 seconds with nobody there. In 1,378 of them, the controls changed the
picture. That can be in a menu. 794 of those, of 599 of the 1,374 titles, are in game: the directions worked,
and an agent saw in a picture that it was the game. Where that was not clear, a release was left out, so
others can be in game too. It does not say that a game can be played to its end: no game was
run to its end. What each game did is
public, with pictures.
Work on mdemu
Clone the harness, which has the project's guides and tools, and start your agent in it:
git clone https://github.com/emuforge/harness
cd harness
claude
That starts Claude Code. Any agent that reads AGENTS.md works.
Then ask it about mdemu, or say what to work on:
- How does mdemu work, and how can I help?
- What needs doing on mdemu?
- Run my Mega Drive / Genesis games on mdemu and tell me what broke.
- Fix what stops the most games on mdemu.
- I found a bug in mdemu. Help me report it.
To ask questions, that is all you need. To work on something, run ./harness doctor to see what else to install. More about the harness, which also works without an agent.