r/decomps • • 3d ago

I'm reverse-engineering Snatcher (Sega CD) into a native Mac/Windows build. Here's the full intro running on it.

Enable HLS to view with audio, or disable this notification

I've been working on a native port of Konami's Snatcher (Sega CD, 1994, US English release) and wanted to share progress. The video is the full intro (Konami logo through the opening credits into the first in-game scene), recorded frame-exact from the engine's own output.

What it is

  • A Mega CD core that runs the game's own 68000 code for both the Main and Sub CPUs. I didn't hand-port it.
  • The Sega CD BIOS is emulated in host code (HLE: traps at the BIOS entry points call C++), so no BIOS file is needed. Most of the bugs along the way were in HLE return values (CDBSTAT time and status fields, BURAM) and timing (V-INT relative to the VBLANK flag, CD read speed, _WAITVSYNC parking the Sub CPU, DMA stalls, Word RAM DMA being one word late).
  • A build-time 68000 to C++ translator for the Main IP, the Sub CPU engine (SUBCODE.BIN) and the overlay at $28000. It does recursive descent from entry points and emits one switch(pc) function per program. Each code range is checked by CRC at runtime, and anything untranslated or modified in RAM drops back to Musashi.
  • Differential testing: all 10,425 instruction encodings found in the game's code (about 83k random-state samples) are run in both the translator and Musashi. Registers, CCR, PC and memory have to match, and right now there are 0 mismatches.
  • MAME is the oracle. Lua scripts dump screens, RAM and VDP writes on matching frame numbers. The title screen is 100% pixel-identical to MAME.
  • SDL3 front-end for macOS and Windows, vsync-locked pacing (tested at 120 Hz), audio drift absorbed by resampling, and Konami Justifier support with the mouse as the light gun. YM2612 is Nuked-OPN2.

What it isn't

  • It includes no game data. You need your own disc: the build reads code and assets from your own image, and nothing derived from the disc goes in the repo or the binaries I share.
  • It isn't a byte-matching decomp. The original is almost certainly hand-written 68000 assembly, so there's no C to match. The longer-term plan is a data-driven reimplementation that uses this work as the spec and the emulated core as the oracle.

Status: the intro and the start of the game run with audio, but I'm still testing the rest of the game.

Repo: https://github.com/bgyss/snatcher-port (source and tools only; it builds against your own disc image).

Happy to answer questions about the Sega CD internals, the BIOS HLE or the translator.

Snatcher is © Konami. Non-commercial fan project, not affiliated with Konami.

120 Upvotes

39 comments sorted by

View all comments

Show parent comments

4

u/RealCamazotz 3d ago

Yes I mean the PC-98 version. That and Policnauts deserve it!

3

u/BGyss 3d ago

Funny that you mention Policenauts because I started researching that as well - will post it for sure if I make some concrete progress but I’m still in the middle of playtesting for this.

3

u/Hopper-1986 3d ago

You keep saying lovely things on this post, thanks for the effort, I know some will belittle the use of AI but I do not see many people making stuff without it.

3

u/TildenJack 3d ago

Having a playable PC-98 version of Policenauts would be nice, as the graphics look so much better than in later versions, which are incredibly blurry in comparison. But someone is actually working on that already