mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-06 04:34:24 -04:00
650d88d31b5b17ea6c174b5f1a112bf8b988079e
* func000034d0 * func000034d8 * func00009a80 * func00009a88 * func00009a90 * func00009a98 * func00009aa8 * func0000fe18 * func000121e0 * func00012a0c * func00013750 * func00013790 * func0f016444 * func0f01a4a0 * func0f0c4d98 * func0f0edb64 * func0f110bf0 * func0f11df8c * func0f11ed70 * func0f11ed78 * func0f11edb0 * func0f11edb8 * func0f11ee20 * func0f11ee88 * func0f11eea8 * func0f11eef0 * func0f11ef78 * func0f147570 * func0f149864 * func0f14a3bc * func0f15b51c * func0f175f50 * func0f175f90 * func0f1790fc * func0f17ffdc * func0f180e1c * func0f180e24 * func0f180e2c * func0f181944 * func0f182b9c * func0f184d84 * func0f188bcc * func0f18bb1c * func0f18bb24 * func0f18bb88 * func0f18db7c
Perfect Dark Decompilation (WIP)
This repository contains a work-in-progress decompilation of Perfect Dark for the Nintendo 64.
Roadmap
| Section | Progress |
|---|---|
| 0x40 rspboot | Won't disassemble as source is likely ASM |
| 0x1000 boot | 22/52 functions done (42.31%) |
| 0x3050 library | 1/931 functions done (0.11%) |
| 0x39850 setup | About 50% identified |
| 0x4e850 rarezip | 2/8 functions done (25.00%) |
| 0x5032e game | 316/4174 functions done (7.57%) |
| Lang files | Done |
| Setup files | Done |
| Prop files | Not started |
| Character files | Not started |
| Gun files | Not started |
| BG files | Not started |
| Pad files | Not started |
| Tile files | Done |
If you want to browse the stage setup files, use this table to find the filename:
| Stage | File |
|---|---|
| Defection | setupame.c |
| Investigation | setupear.c |
| Extraction | setupark.c |
| Villa | setupeld.c |
| Chicago | setuppete.c |
| G5 Building | setupdepo.c |
| Infiltration | setuplue.c |
| Rescue | setuplip.c |
| Escape | setuptra.c |
| Air Base | setupcave.c |
| Air Force One | setuprit.c |
| Crash Site | setupazt.c |
| Pelagic II | setupdam.c |
| Deep Sea | setuppam.c |
| Defense | setupimp.c |
| Attack Ship | setuplee.c |
| Skedar Ruins | setupsho.c |
| MBR | setupwax.c |
| Maian SOS | setupsev.c |
| WAR! | setupstat.c |
| The Duel | setupate.c |
| CI Training | setupdish.c |
There is also a stagetable.txt in the repository root which includes multiplayer stages.
Installation Requirements
- make
- mips build tools (Debian/Ubuntu: binutils-mips-linux-gnu, Arch: mips64-elf-binutils from AUR)
- Python 3
Extracting the base ROM
Before you do anything you need an existing ROM to extract assets from.
- Save your existing ROM file into the root of the repository with the name
pd.ntsc-final.z64. It should not be byteswapped (the first four bytes should be0x80371240). - Run
make extract. This will create anextracted/ntsc-finaldirectory containing assets from your ROM.
Compiling
The project can do the following:
- Build individual ucode binaries (boot, library, setup, rarezip and game) which match the ones extracted from the base ROM.
- Build a functioning ROM by splicing your stage setup and lang files into an existing ROM.
The project does NOT build a full ROM using the C code yet.
- Run
maketo build the individual ucode binaries. These files will be written tobuild/ntsc-final. - Run
make romto build a ROM from the stage setup and lang files. The ROM will be written tobuild/ntsc-final/pd.z64.
How do I know the built files are matching?
Run make followed by make test. If make test produces no output then everything is matching.
Languages
C
87.2%
Linker Script
4.5%
Python
4%
Assembly
3.3%
C++
0.8%
Other
0.2%