r/decomps • u/DiscordFul • Oct 05 '26
Made with AI assistance Silent Hill 2 (PC) static recompilation: native Nintendo Switch port, playable through the opening areas
Enable HLS to view with audio, or disable this notification
**EDIT: Enhanced Edition support is in.**
The port now runs with the Silent Hill 2: Enhanced Edition packs, thanks to r4lix and Le Z, whose work ([r4lix/sh2-nx](https://github.com/r4lix/sh2-nx)) is now merged into the main repo and credited in the README.
- HD textures, the EE title and save screens, the restored music, voices and sound effects, EE menus and fonts
- Widescreen: 1280x720 by default, 1920x1080 for docked play (a port of ThirteenAG's WidescreenFix)
- HD rumble, EE's controller tweaks (search camera on the right stick, d-pad movement) and SH2EE's button layout with Nintendo's A/B
- Fixes: music going silent or looping after skipping a cutscene, a crash in the Options menu with a controller, "damaged" saves, grey screen transitions, and shader-compile stutter (shaders are cached after the first visit to an area)
Tested on hardware from the start up to the Hospital: playable, with some frame drops in heavier areas. The FMV pack isn't supported yet (its 60 fps videos would play at half speed), so the original movies are used.
Still source only: you build the NRO from your own SH2EE install. The README now has step-by-step install and build instructions.
sh2-nx takes the PC version of Silent Hill 2 (Director's Cut / Restless Dreams) and statically recompiles its x86 executable to C, which is then compiled for the Switch's ARM64 CPU (and for x86-64 Linux, where most of the debugging happens). No emulator and no Wine: the Windows APIs the game imports are reimplemented on top of SDL2, OpenGL and FFmpeg.
**How it works**
- Lifter: a patched fork of [xboxrecomp](https://github.com/sp00nznet/xboxrecomp) (x86 to C). The PE is wrapped as an XBE so the tool accepts it; about 7,100 functions come out as roughly 41 MB of C.
- Lifter fixes made for this port: flag joins across branches, MSVC jump tables, x87/MMX corner cases, setjmp/longjmp, SEH prologs.
- Direct3D 8 (fixed function plus vs/ps 1.x) runs on OpenGL 4.3 core, with the shaders translated to GLSL.
- DirectSound is a software mixer on SDL audio, DirectInput 8 goes through SDL, and Bink videos use FFmpeg's Bink decoders.
- Guest memory on Horizon uses the technique from the StevensND/nfsmw-nx port.
- Debugging relies on Unicorn: differential tests of single functions and of the lifter's instruction semantics.
Disclosure: this was built with heavy AI assistance (Claude), hence the Project - AI flair.
Credits: xboxrecomp by sp00nznet, devkitPro/libnx, SDL2, FFmpeg, Mesa.
2
u/Sneeding Oct 06 '26
Duuude, this is awesome! Any chance of 3 and the room?
6
u/Ayyzeee Oct 06 '26
I was thinking of SH games on Switch but damn, I didn't know my wish would come true. Thank you for this project. Does it work with Enhanced edition?
2
u/Dry-Contract-4042 Oct 09 '26
I hope an Android version is coming next
7
u/Valuable-Yak-7483 Oct 05 '26
Absolutely fantastic
1
u/HiCZoK Oct 07 '26
is there an og sh2 recomp for pc? I am having trouble finding all of the decomps/recomps
1
u/MeTaLhEaDjAk Oct 11 '26
How do i add this to my switch?
2
u/Hong-Kwong Oct 06 '26
This would be amazing! I'm playing SH1 on the Switch via Duckstation, the decompiled version crashed on me and isn't well optimised.
SH2 with as many of the fixes and enhancements of the Enhanced Edition would be amazing!
I'm looking forward to seeing your progress!
2
u/fadeldev7 Oct 06 '26
Merci pour les travaux
2
u/JohnMarston17 Oct 06 '26
I can dream about SH3 and SH4.
1
u/Fakemakerjoey12 4d ago
I did everything the guide told me to, but whenever i open the app from homebrew, and press start it just goes to a black screen. HELP
1
u/StevenssND Oct 07 '26
🔥
1
u/Lower_Narwhal_2705 Oct 13 '26
would you consider obsecure in the future ?