Scarface decomp

Scarface: The World Is Yours

Fans rebuilding the 2006 game's source code, one function at a time, so it can be preserved, fixed and modded.

The world is … yours.

… of … functions rebuilt so far.

PC version
…
Xbox version
…
Bytes matched
…
Compiler
cl.exe 13.10.3052

Loading the latest numbers…

How it works

Every game starts as code written by people. A program called a compiler turns that code into the machine code your PC or Xbox runs. Scarface's original code was never released.

So we write it again. Each small piece of the game, called a function, is rewritten in C++ and run through the same compiler the developers used: Microsoft Visual C++ 7.1, from 2003. When the result is identical to the game, byte for byte, that function is done. Nobody has to take anyone's word for it: the compiler decides.

  • Same bytesSame length and same machine code as the original game.
  • Same connectionsEvery jump, call and variable points where the original did.
  • No shortcutsMemory addresses from 2006 can't be typed in as numbers.
  • Real C++No hidden assembly or tricks that just copy the bytes.

Full rules and compiler notes: METHODOLOGY.md.

Progress

Most work happens on the Xbox version: it shares the engine with the PC version, and only part of the PC game can be read as plain code.

PC Scarface.exe 1.00.2
…
Xbox default.xbe
…

Rebuilt functions by size

Small ones get done first. The bigger ones are where help is needed most.

People who helped

Everyone who rebuilds a function through the portal is credited here.

    Help rebuild it

    You don't need to be an expert. If you can read a little C++, or want to learn, small functions take minutes. You'll need your own copy of the game. Everything runs on your computer and your game files are never uploaded.

    1. Install PythonGet Python 3 from python.org. On Windows, tick Add python.exe to PATH on the installer's first screen.
    2. Download the projectOn GitHub, press Code, then Download ZIP, and unzip it anywhere. If you use Git:
      git clone https://github.com/scarface-decomp/scarface_decomp.git
    3. Add your game filesCopy Scarface.exe (PC version 1.00.2) and/or default.xbe (from the Xbox disc) into the project's binaries folder.
    4. Start the portalOn Windows, double-click START_PORTAL.bat. On Mac or Linux, run sh start_portal.sh. Your browser opens the portal at localhost:8085.
    5. Pick a function and solve itChoose a small one, then press decomp.me. It opens in your browser with the same compiler. Change the C++ until it shows 100%, then paste it back into the portal.
    6. Verify itPress Compile & Verify to record it under your name. That needs the 2003 compiler, installed once from your own VCToolkitSetup.exe:
      python scripts/setup_msvc71.py VCToolkitSetup.exe
      No compiler? Post your 100% decomp.me link in a GitHub issue and a maintainer will verify it and credit you.

    The code so far

    Every rebuilt function and its C++. Select one to read it.

    Loading…