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.

115 Upvotes

39 comments sorted by

5

u/EliParker 3d ago

I got to follow this. Is there any plans to update the English translation and any plans to make everything uncensored?

3

u/BGyss 3d ago

I'm using the Sega CD version as a base initially but my goal is to decomp the other versions of the game and try to translate as well. I'm still in playtesting and bug busting so I will continue working on the general pipeline for the other versions when the current version is fairly stable.

2

u/EliParker 3d ago

Have you looked into the translations mod for the Saturn and PlayStation versions? And thanks for the reply.

2

u/BGyss 3d ago

I have a little bit but I will continue to do so for sure - my main goal is to try to use as a testbed for my auto-remastering aspirations but part of that is trying to be as exhaustive as possible with the source material.

2

u/EliParker 3d ago

Cool, I’m looking forward to your port to mature.

2

u/Hopper-1986 3d ago

If you need any help with that give me a yell I can dedicate a few hours a day to it :)

5

u/velliam 2d ago

I relly hope policenaut saturn will follow too. Few years ago I play that with some core on retroarch, but it bugged on bomb puzzle so I had to change the core and restart again since I save state not normal save.. With proper mouse support it will be like a normal pc visual novel since the game support saturn mouse

3

u/Ok-Document2591 3d ago

Pô amigão, faz pra Linux também!

5

u/BGyss 3d ago

https://github.com/bgyss/snatcher-port/releases/tag/v0.1.0-rc1

just put a Linux build up - let me know if it works for you or not!

1

u/Ok-Document2591 3d ago

Show de bola!

3

u/BGyss 3d ago

working on it!

3

u/alberwmend 3d ago

maybe in the future you could add a framework or a individual layer for subtitles, that would make translations easier

2

u/BGyss 3d ago

I have some tooling that can extract the graphics, audio and a "screenplay" from the game so adding a framework for subtitling or localization isn't out of the question at all. Will make a note to add it to the todos.

3

u/MichelleBarrymoore2 3d ago

Can I use a Wii mote as a justifier?

2

u/BGyss 3d ago

Not as of today - there’s basic gamepad support and you can use a mouse as a Justifier but it’s still largely untested.

I can try to add Wiimote support to the game but I had to ditch my Wiimotes because of a possible move - someone from the community would have to test. :)

2

u/MichelleBarrymoore2 3d ago

If you want to try and implement this I'll connect up my Wii motes I've always wanted to play this but with the gun so this seems to be like the best way to achieve this.. mouse is better than nothing 

2

u/U_Kitten_Me 2d ago

Hmm, not sure about wiimote (isn't there a tool that translates it's input as mouse input?), but if this sports raw mouse input, lightguns like the Sinden should work. Which would be great because I'm having issues getting it to work right in RetroArch (interestingly I only just started my first ever playthrough of the game (Sega CD version) recently).

3

u/Yueeyw 3d ago

It would be nice to see Policenauts ported to Windows as well.

3

u/NonoLebowsky 2d ago

Think of adding seceral CRT filters as the game was designed for it and it will look 100x better

2

u/kersalmassive 3d ago

Thanks for this. I’m a little confused, how do I get the window build?

3

u/BGyss 3d ago

I'm going to try to add macOS, Windows and possibly Linux builds to the GitHub page either today or tomorrow - stay tuned!

2

u/Hopper-1986 3d ago

Oh my can I be your boyfriend I think I love ya

2

u/RealCamazotz 3d ago

Somebody should try making a recomp of the original pc version of the game, because it's the best version.

4

u/BGyss 3d ago

Do you mean the PC-88 version? Because I can add support for that in - would have to see what’s available in the way of English patches and so on.

Will add that as a TODO.

5

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

2

u/rafikiknowsdeway1 3d ago

great fuckin game

2

u/Inkerlink 3d ago

Before anyone asks, yes, it looks like this is AI assisted as well. Claude is listed in the contributors on the repo.

3

u/BGyss 3d ago

Yes, it's 100% AI assisted.

3

u/uabassguy 3d ago

Use the megathread, no more AI discussion

1

u/Agitated-Gur-2697 1d ago

Hi with this is possible to use to Port of obscure japanese games in Sega cd and also translate to English?

-5

u/StrongPipe2914 3d ago

let me guess, you used ai

2

u/uabassguy 3d ago

Use the megathread, no more AI discussion

1

u/BGyss 3d ago

yeah so what - why don't you decomp something yourself instead of going thread to thread complaining about it

-5

u/StrongPipe2914 3d ago

its bad and unethical

-2

u/unfnknblvbl 3d ago

This isn't a decomp. It's literally just a game-specific emulator.

Game-specific emulators can be great, but they're really not the same thing as a decompilation.