Skip to content
AJ Kelly edited this page May 11, 2022 · 9 revisions

The Basics

If you have never hacked a video game before, this is where you'll want to start.

This article's core assumption is that you want to hack one (or more) of AKI Corporation's wrestling games on N64 (or PS1).

Information about post-N64/PS1 games (i.e. Def Jam Vendetta, Def Jam: Fight for NY) is lacking at the moment.

Required Items and Tools

You'll want to have the following items on hand for hacking any game:

  • the game itself (for N64 games, the Z64 ROM format is preferred)
  • an emulator with debugging capabilities
  • calculator that can do hex math
  • a hex editor
  • ROM format conversion tool (optional; only needed for the N64 games in case your copy of the game is not in Z64 format)

Emulators

Some emulators are more focused on playing the games, versus debugging, hacking, or developing them. In order to hack games, you will want a debugging emulator. While it is possible to hack games using an emulator without debugging tools, it requires external programs (e.g. Cheat Engine) and is beyond the scope of this wiki.

External scripting support is preferable, but not required.

Recommended N64 Debugging Emulators

In the old days, Nemu was the only usable emulator with debugging features. Luckily, those days are over.

  • Project64 (has JavaScript support; see docs)
  • BizHawk (has Lua support; see docs)
  • MAME (has Lua support; requires N64 system ROM files)
  • CEN64 (requires N64 system ROM files)

While Mupen64Plus can be used, the core needs to be built with DEBUGGER, and the front-end you use needs to support the debugger in some way (for the console front-end, this is via the --console argument).

This wiki will assume the use of Project64, but the concepts should be adaptable to other emulators.

Recommended PlayStation 1 Debugging Emulators

As usual, you will need to obtain a PlayStation 1 BIOS for games to work correctly.

Calculator

Your operating system's calculator should be good enough, assuming it can be put into a "Programmer" mode (or other mode that handles hex and binary numbers).

Hex Editor

In order to make changes to the ROM, you will need a hex editor. (Alternatively, you could create your own tools to handle game data, but this is a "Basics" article, so we're just going to assume the use of a hex editor.)

On Windows, the preferred free hex editor is HxD, though there are many other options, both free and commercial.

Hexadecimal

Humans prefer to use a base 10 counting system, often referred to as "decimal". Computers don't use base 10 by default, they use base 2, a.k.a. "binary". Of course, if we were forced to write/edit everything in binary, it would take forever to get anything done. For a large amount of computers, the smallest "regular" data type consists of 8 bits, or 1 byte. Each group of 4 bits makes a "single" hex character, with values ranging from 0 to F. That is to say, counting goes from 0-9 first, then 0xA to 0xF, followed by 0x10 (decimal 16).

(sub)Routines, Functions

These words mean roughly the same thing. Routines are code locations that can be called (on MIPS-family processors, like the ones on N64 and PS1) via jal or jalr. They typically end with a jr $ra instruction (but be aware of the delay slot; the instruction after the jr $ra also gets executed).

Pointers

Pointers are variables that point to locations in memory. These locations can be used as-is, or have offsets added to them to reach a specific point.

Data Types

(todo: explain data types, also explain how the CPU handles certain data types)

Text Encoding

Storing text is not exactly straightforward, given the amount of characters used in languages around the world.

ASCII

"Standard" character encoding, with English alphabet, numbers, and punctuation (among other characters).

EUC-JP is the Japanese variant of EUC. This format is used in WCW vs. nWo World Tour, Virtual Pro-Wrestling 64, and WCW/nWo Revenge.

It may or may not be used in the PS1 games. Games after WCW/nWo Revenge use Shift JIS instead.

Shift JIS is another (formerly) common encoding for Japanese characters. It is used in WWF WrestleMania 2000 and later (including some XML comments in Def Jam: Fight For NY).

(todo: more stuff for this doc)

Clone this wiki locally