This is a simple library for N64 that allows one to code using the gcc compiler suite and nothing else. No proprietary library is needed.
See docker wrapper to quickly get libdragon up and running.
To get started from scratch, follow the following steps:
- Create a directory and copy the build script there from the tools/ directory.
- Read the comments in the build script to see what additional packages are needed.
- Run ./build from the created directory, let it build and install the toolchain.
- Install libpng-dev if not already installed.
Below steps can also be executed by running
build.sh at the top level.
- Make libdragon by typing 'make' at the top level.
- Install libdragon by typing 'make install' at the top level.
- Make the tools by typing 'make tools' at the top level.
- Install the tools by typing 'make tools-install' at the top level.
- Install libmikmod for the examples using it. See
build.shat the top level for details.
- Compile the examples by typing 'make examples' at the top level.
You are now ready to run the examples on your N64. For more information, visit http://www.dragonminded.com/n64dev/
Libdragon uses assembly macros to program the RSP chip defined in
ucode.S. These mainly wrap
The syntax is similar to that of Nintendo's but with a few changes. For example if we take
vabs vd, vs, vt[e]
vabs vd, vs, vt, e
and element (
e) is always required. It is also similar for load/store instructions. As an example,
sbv vt[element], offset(base)
sbv vt, element, offset, base
Basically all operands are required and separated by commas.
While using these custom instructions, you should use
$v31 when naming vector registers and
$31 when naming scalar registers.