Underground 2 comes to life in native C: 27,742 functions instead of an emulator

image

The original Need for Speed: Underground 2 (2004) has received a true native port — no emulator and no wrappers. Developer codepdbh statically recompiled the x86 binary SPEED2.EXE into plain C, and the game already runs as a rebuilt program. The project is open on GitHub, but it only works with your own copy of the game.

How it works

It is based on pcrecomp — a binary translation tool that converts x86 machine instructions directly into compilable C, rather than reconstructing the source code from scratch. The author took an extended fork with patches: MMX/SSE/SSE2 support was added, along with preservation of CPU flags and the x87 context, and correct handling of signed conditions. The output is clean C99 without JIT, a virtual machine, or runtime translation overhead.

This is a fundamentally different path from emulation: the rebuilt program executes the original game logic itself, not through a compatibility layer. Not to be confused with the fan remake of Underground 2 on Unreal Engine — here it is precisely the original 2004 binary that is preserved.

The numbers

Static lifting was performed on the retail build of SPEED2.EXE (about 4.8 MB in size, image date — February 9, 2005):

  • 27,742 functions were lifted from x86 to C;
  • about 8.9 million lines of generated code;
  • zero lifting failures — every function was lifted without errors;
  • launching requires a verified image: SHA-256 f9dd86c054878ce6276beb07c1fd61874f7a1e4bf1f241b084c65b73e24168a7.

What already works

On a Windows host via MSVC x86, the entire path from C generation to the first frame has been completed: game startup, work with the registry, timers and threads, initialization of Direct3D 9 and the window. Intro FMV videos play, menus render, and keyboard and controller input is accepted. A separate milestone was fixing a bug with the signed 16-bit flag, after which car bodies, vinyls and headlights began displaying correctly. Track loading and gameplay are marked as playable: Resort Loop and Quick Race work, along with acceleration, steering, nitrous and AI traffic.

Android and plans

Since the logic has been turned into portable C, it is no longer held back by x86. Replacing Win32 and Direct3D 9 with SDL2 and Vulkan/OpenGL ES opens the way to an ARM64 build: the Android port is already playable, on Snapdragon 8 Gen 3 (Samsung Galaxy S24 Ultra) it delivers 35–51+ FPS at 1170×540, supports touch controls, gyroscope tilt and audio via AAudio, while graphics are translated by the built-in DXVK Native port. Next up are Linux handhelds such as Steam Deck and Apple Silicon, and without Box64 and FEX-Emu.

On legality

The repository contains no game code, textures, music or models — only the author's own tooling under the MIT license. The port must be assembled locally from your own licensed copy of Underground 2. The project is declared research and archival, and all rights to the series remain with Electronic Arts.

👉 Sources: AllNight.city, GitHub — codepdbh/nfsu2-recompiled

Would you play Underground 2 without an emulator? Share your opinion in the comments and keep an eye on updates at nfs.com.ru!

Comments

What do you think about this news? Agree or disagree in the comments.

Reviews: 0
Sign in  or  sign up  Sign in or sign up to leave a comment.