• Stars
    star
    396
  • Rank 108,801 (Top 3 %)
  • Language
    C
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A decompilation of Goldeneye 007 brought to you by a bunch of clever folks. (MIRROR of https://gitlab.com/kholdfuzion/goldeneye_src)

Goldeneye 007

NTSC-Status JP-Status PAL-Status

This is a WIP decompilation of Goldeneye 007!

It builds the following ROMs:

  • ge007.u.z64 sha1: abe01e4aeb033b6c0836819f549c791b26cfde83
  • ge007.j.z64 sha1: 2a5dade32f7fad6c73c659d2026994632c1b3174
  • ge007.e.z64 sha1: 167c3c433dec1f1eb921736f7d53fac8cb45ee31

Note: This repository does not include all assets necessary for compiling the ROMs. A prior copy of the game is required to extract the assets.

Installation

Linux (Native or under WSL / VM)

Step 1: Install build dependencies

The requirements for Debian / Ubuntu should be:

sudo apt-get update
sudo apt-get install binutils-mips-linux-gnu make git python3
sudo apt-get install libcapstone-dev pkg-config

If you don't have host development tools already installed then you will also need to install build-essential:

sudo apt-get install build-essential

Additionally qemu-irix is needed. Download the package to a desired location and install with:

sudo dpkg -i qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb

Step 2: Recompile IDO

Recompile IDO for your platform for increased compile speed

cd tools/ido5.3_recomp 
make

Step 3: Clone the repository

Clone this repository where you wish to have the project, with a command such as:

git clone https://github.com/kholdfuzion/goldeneye_src

Step 4: Prepare baserom(s) for asset extraction

Place an unmodified copy of your existing NTSC (US) ROM inside the root of this repository with the name baserom.u.z64.

To extract the baserom assets run:

./extract_baserom.u.sh

For JP and PAL (EU) versions support, place each existing ROM in the root of this repository with the name baserom.<VERSION>.z64 (where <VERSION> is the country code, j, or e).

Extracting NTSC (US) baserom assets is mandatory before extracting JP or PAL assets.

To extract JP assets run:

./extract_baserom.u.sh && ./extract_diff.j.sh

To extract PAL assets run:

./extract_baserom.u.sh && ./extract_diff.e.sh

Other options to extract baserom assets or extract diff:

./extract_baserom.u.sh /path_to/rom.n64 # ROM in another directory
./extract_baserom.u.sh /mnt/e/Goldeneye.n64 # ROM located on EverDrive
./extract_baserom.u.sh files # Extract files only
./extract_baserom.u.sh images # Extract images only

Note: If you are upgrading from an old repository, run:

./clean_baserom.sh && ./extract_baserom.u.sh && make clean

Build the ROM

Run make to build the ROM (defaults to VERSION=US).

make

If all goes well, resulting artifacts can be found in the build directory and the following text should be printed:

build/u/ge007.u.z64: OK

Other examples:

make VERSION=JP -j4       # build JP version instead with 4 jobs
make VERSION=EU COMPARE=0 # build PAL (EU) version but do not compare ROM hashes

The full list of configurable variables are listed below, with the default being the first listed:

  • VERSION: US, JP, EU
  • COMPARE: 1 (compare ROM hash), 0 (do not compare ROM hash)
  • IDO_RECOMP: YES (build with IDO recomp), NO (build using qemu-irix)
  • FINAL: YES (builds final version with -O2 optimization), NO (debug)
  • VERBOSE: 0 (quiet), 1

Additional documentation of the build process can be found here.

Project Structure

goldeneye_src
|-- .github/workflows: GitHub use only
β”œβ”€β”€ assets: game assets
β”‚Β Β  β”œβ”€β”€ font: font data
β”‚Β Β  β”œβ”€β”€ images: image data
β”‚Β Β  β”‚Β Β  └── split: split image data
β”‚Β Β  β”œβ”€β”€ music: music data
β”‚Β Β  β”œβ”€β”€ obseg: animation data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ bg: bg data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ brief: briefing data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ chr: c model data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ gun: g model data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ prop: p model data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ setup: setup data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ stan: stan data
β”‚Β Β  β”‚Β Β  └── text: text data
β”‚Β Β  └── ramrom: demo data
β”œβ”€β”€ bin: files that haven't been touched
β”œβ”€β”€ build: output directory
β”œβ”€β”€ include: header files
β”œβ”€β”€ rsp: Custom GBI code (Assembly) (C0 and 4Tri)
β”œβ”€β”€ src: C source code for game
β”‚Β Β  β”œβ”€β”€ game: core ge specific code 0x7f000000 range
β”‚Β Β  β”œβ”€β”€ inflate: statically linked initial decompression code
β”‚Β Β  β”œβ”€β”€ libultra: currently used libultra.s
β”‚Β Β  └── libultrarare: libultra modified by Rare
└── tools: build tools

Documentation has been moved to https://github.com/kholdfuzion/goldeneye_docs/tree/master/notes

Style Guide is https://github.com/kholdfuzion/goldeneye_src/blob/AIListLogic/notes/StyleGuide.md

This decompilation was only made possible thanks to many awesome 00 Agents who will be revealed only if they wish.

GE and PD documentation made by Zoinkity.