THUG2 thug2NX - Tony Hawk's Underground 2 port for Nintendo Switch
I own a modded Nintendo Switch and I can't get rid of the itch of playing my all-time TH game on to go.
Sure, I could've gotten a Steam Deck or similar, but why spend another $500?
So to any of you open to tinkering around --> this is the Xbox port of THUG2 for Switch! :)
______________
Repository with build instructions: https://github.com/ip-xc/thug2-nx/
______________
Technical overview:
x86 Recompiler:
- Converts original Xbox (x86) instructions into native C++ code.
- Emulates CPU registers, flags and FPU operations.
- Allows individual game functions to be replaced with custom implementations or HLE hooks.
Xbox Kernel:
- Implements essential Xbox system services.
- Supports threads, events, timers, DPCs, APCs and file operations.
- Handles memory management, cryptography and EEPROM access.
- Supports asynchronous I/O required by the game's streaming systems.
Memory Management:
- Reserves a 4 GB virtual address space for the emulated Xbox.
- Uses Switch code memory services to manage guest memory efficiently.
Direct3D 8 / Graphics:
- Reimplements the Xbox Direct3D 8 API.
- Translates vertex shaders and register combiners into modern shader formats.
- Converts textures and render targets for the Switch GPU.
- Uses deko3d for rendering, command buffers and frame presentation.
- Caches compiled shaders on the SD card to reduce loading times.
DirectSound / Audio:
- Implements software-based audio mixing.
- Supports Xbox ADPCM, audio streams and mix bins.
- Outputs audio through the Switch audio renderer.
Video & Media:
- Bink video playback and WMA decoding run through the recompiled game code.
Platform:
- Built for Nintendo Switch using libnx and deko3d.
- Uses the SD card for game data, disc images and shader caching.