Skip to content

mgrz18/turok2-decomp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turok2-decomp

Work-in-progress decompilation of Turok 2: Seeds of Evil (Nintendo 64, US 1.0).

⚠️ Status: bootstrap verified. Toolchain runs end-to-end; ROM splat-disassembles into ~8.6M lines of MIPS asm. No matched C yet — segment boundaries and data/code separation are next.

Why

This decomp is a stepping stone. The end goals are:

  1. A native macOS (Apple Silicon) port via N64Recomp + RT64.
  2. Reusing ~70% of the work to port Armorines: Project S.W.A.R.M., which shares the Acclaim Studios London engine.
  3. Stretch goal: Android via RT64's Vulkan backend.

If you only want to play Turok 2, an emulator is 100× less work and totally fine. This project exists for native ports, modding (HD textures, real widescreen, 60 FPS), and preservation.

Engine

Acclaim Studios London engine — also used by Turok 3, Armorines, Re-Volt, Forsaken, parts of NBA Jam.

Required input

  • baserom.us.z64 — ROM dump from your own cartridge. Not committed, never will be.
    • Expected SHA1: fb0400f21e3f043939ab56500c7b12a3231006f1
    • Internal name: Turok 2: Seeds of Ev, cartridge ID NT2E, 32 MB.

Setup (Apple Silicon macOS)

# 1. Clone reference projects (gitignored, not part of this repo)
mkdir -p references && cd references
git clone --recursive https://github.com/Drahsid/turok3.git
git clone https://github.com/Drahsid/LibTEngine.git
cd ..

# 2. Pull SN64 toolchain + LibTEngine headers into the working tree
./scripts/setup-from-references.sh

# 3. Build the linux/amd64 container (needed because cc1 is i386 ELF
#    and asn64.exe is Win32 — Apple Silicon runs both via Rosetta-for-Linux)
brew install orbstack   # or Docker Desktop with Rosetta-for-Linux enabled
docker build --platform=linux/amd64 -t turok2-build .

# 4. Disasm the ROM
docker run --platform=linux/amd64 --rm -it -v "$PWD":/work turok2-build \
    bash -c "pip install -r tools/requirements.txt && make setup"

Standing on the shoulders of

Roadmap

Phase 1 — Bootstrap

  • Confirm ROM dump (SHA1 verified)
  • Toolchain working (Docker linux/amd64 + Rosetta-for-Linux + SN64 binaries)
  • First splat pass produces asm + linker script
  • Entry point confirmed at 0x80000400 (romMain)
  • Refine segment boundaries (code vs data vs assets vs audio)
  • Dump RSP ucode_text / ucode_data and diff against stock F3DEX

Phase 2 — Microcode triage

  • Quantify delta vs F3DEX
  • Decision: go/no-go on the native-port path

Phase 3 — Matching

  • Import structs from LibTEngine
  • First 50–100 matched functions
  • Byte-exact .z64 build (sha1sum build/turok2.us.z64 == sha1sum baserom.us.z64)

Phase 4 — Recomp

  • N64Recomp on the matched ELF
  • First window opens with RT64

Built with

This decomp is being developed with the assistance of Claude (Anthropic's Claude Code, Opus 4.7). Reverse-engineering work, splat configuration, toolchain scaffolding, and most of the prose in this repository were produced in collaboration with Claude under human direction.

Legal

The ROM is not distributed here. Provide your own dump from a cartridge you own. Original game code and assets are property of the Turok IP rights holders.

The reverse-engineered work in this repository (symbol names, struct definitions, splat configs, Makefiles, scripts) is released under CC0-1.0 — public domain. See LICENSE for the full text.

About

Work-in-progress decompilation of Turok 2: Seeds of Evil (N64). Stepping stone toward native macOS/Android ports of the Acclaim Studios London engine.

Resources

License

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors