Tutorials n Tools

From en64 wiki
Jump to: navigation, search

Before reading any of the tutorials/guides, I want to address that essentially all the terminology you read here, on the forums, or on any forums/website for that matter is not proprietary/strictly set only towards Nintendo 64 hacking or any particular games. Pretty much ever term you hear that you may not comprehend can be found with the use of your favorite search engine... You can learn MIPS, you can learn overlays, you can learn compression algorithms, how to inject code into binary, how data is allocated in memory, and a myriad of computer concepts!


General Guides

Noob Portal (Beginner Guide)
Intermediate Hacking Guide
Advanced Hacking Guide
MIPS Assembly

Primary Hacking Guides

Tools

Emulators

Listed here are only Nintendo 64 emulators that contain debugging features.

Nemu64

It's features are explained in the guide below.

Guides
Using Nemu64's debugging features

Mupen64Plus

Source hacks

  • pure_interp.c modification for backtracing a stack. Further information, including how to use it is in the pastebin.

Bizhawk

BizHawk is a multi-platform emulator with full rerecording support and Lua scripting. BizHawk focuses on core accuracy and power user tools while still being an easy-to-use emulator for casual gaming.

Additional information


Memory Scanner/Debugger

Renegade

Guides n discussion

Cheat Engine

Cheat Engine, commonly abbreviated as CE, is an open source memory scanner/hex editor/debugger along with other features that can be read below.

Guides
Really good tutorial using Cheat Engine and basic MIPS introduction
Finding multilevel pointers
Finding X,Y,Z Coordinates
Dissect Data/Structs
Yet again, locating more address in RAM (Doesn't matter that it's MHS. Same can be done with CE or other programs.)
Helpful tools


Galatea

Galatea is a Swiss Army knife for hacking MIPS R3000 based software. This, of course, includes the N64, but in most cases it can be used for other MIPS platforms as well (f.ex. Playstation). At the moment it does very little. It implements a scant GUI to the GNU assembler (with the .org directive hacked in, a la Renegade) and the GNU C compiler - both targeting MIPS. In addition, there's a custom disassembler.

Guides n discussion

Assemblers n Disassemblers

CajeASM

is a fast MIPS R4300i Assembler specially made for N64 ROMs. CajeASM replaces the older LemASM, which only allowed line-for-line assembling while you assemble a text file with mips asm code into a N64 ROM with CajeASM, which is way faster than writing line for line in LemASM. Plus, CajeASM offers a lot of small additions like Labels, Defines and directives for a better control and overview over your ASM code.

Tutorials and discussion


MIPS N64 Disassembler
Requires .net 3.5. Open-source, written in Managed C++, disassemble N64 RAM dumps of MIPS 4300. Supports adding TLB segment to RAM, as well as parents, cross-refs, etc.

  • Download
  • (Galatea and Renegade64 has a disassembler too)


Toolchains

Main page for "Hacking with C!"
A toolchain is a set of programming tools that are linked/chained together by specific stages such as: GCC, binutils and newlib (which is the case with N64Toolchain). The tools basically work together to convert/build the C code source along with using/reading the rest of the files to produce an output that the GameShark can read, put simply. More relating to toolchains can be found with your favorite search engine. .All of the toolchains below use the GNU Compiler Collection (GCC), and as noted above, Galatea is capable of working with GCC. Note: as long as you move over the required files for compiling C to GameShark codes, you can easily use libdragon or n64chain for making codes/mods too given they're centered around GCC.

N64Toolchain

Please refer to the main page for more information (including various links to sources compiled with this toolchain).

Windows build

This toolchain is for Windows users. Refer to the "Hacking with C" page for further information.

Guides


libdragon

libdragon is meant to be a one stop library providing low level API for all hardware features of the N64. Currently, it provides basic console support, rudimentary higher level controller functions, a read only filesystem for appending data to the end of a rom and some 2D graphics functionality. It also includes bindings to newlib in order to provide a posix interface to the filesystem for easier code porting. It's an excellent toolchain to make Nintendo 64 games with. However, it's important to note though that it doesn't have support for rendering triangles.


n64chain

n64chain is a gcc-4.9.2 based toolchain (newer than the others). You get a few benefits using a newer version of GCC and C. For the most part, the benefits would be better optimization and certain C syntax updates, changes, etc. Unlike libdragon and the official Nintendo SDK, which operate in 32-bit mode, n64chain operates in 64-bit mode thus allowing more virtual address space, increased instruction length which intern leads to things such as the ability to preform arithmetic manipulation on 64 bit quantities as a whole. It also gives advantages with 64-bit load and store instructions, which accelerates basic libc functions (mem, str) by a good deal in some cases, but can also make load/store instructions take twice as long in others. The con, obviously being, bottlenecking issues due to the data bus being 32-bit. Moreover, also unlike libdragon, it utilizes full link-time optimization and a custom calling convention to reduce the amount of register spills. You must download the header file from libdragon (supplied in the link below the source) because of copyright reasons.

Guides

Viewers

Sound

  • N64 Midi Tool supports all the US known midi games, so good luck! The intent is for you to use it with your own programs and make your own midi instrument lookups.
  • N64 Sound Tool V1.2
  • N64 Soundbank Tool quite simply, rips and previews N64 Soundbanks into Soundfonts. It is the merging of the N64 Midi Tool and N64 Sound Tool, and is powered by VGMTran's DLSFile support and Seq64 for the EAD games sequence extraction.


Miscellaneous

N64Rip

  • N64Rip is a graphics editor for N64 games. It can be used to edit and rip textures and other graphics.


IEEE 754 float converter
http://jul.rustedlogic.net/thread.php?id=11679Float Converter


obj2c

  • obj2c is a program written by spinout to convert wavefront .obj to compilable F3DEX2 display lists. It is not limited to Zelda, it can be used with any N64 game which uses the F3DEX2 microcode, including homebrew games.


dl2c

  • dl2c is a program written by spinout to convert compiled F3DEX2 into compilable F3DEX2 display lists in C. It's use is not limited to Zelda, it can be used with any N64 game which uses the F3DEX2 microcode.


dlpos

  • dlpos lets you translate, rotate, and scale display lists. some notes, translations are done as signed short integers (-32768 to 32767), rotations are done in degrees, and scales are done on a 0 to 1 scale (meaning 1 = 100%; 1.5 = 150%; 2 = 200%; etc) (by SoD)


badrdp

Miscellaneous/extra hacking guides