Libdragon

Libdragon is an open-source SDK for Nintendo 64. It aims for a complete N64 programming experience while providing programmers with modern approach to programming and debugging. These are the main features:


 * Based on modern GCC (10.2) and Newlib, for a full C11 programming experience. A Docker container is available to quickly set up the programming environment.
 * The GCC toolchain is 64 bit capable to be able to use the full R4300 capabilities (commercial games and libultra are based on a 32-bit ABI and is not possible to use 64-bit registers and opcodes with it)
 * Can be developed with newer-generation emulators (cen64, Ares, Dillonb's n64, m64p) or development cartridges (64drive, EverDrive64).
 * In-ROM filesystem implementation for assets. Assets can be loaded with  without having to do complex things to link them in.
 * Efficient interrupt-based timer library (also features a monotone 64-bit timer to avoid dealing with 32-bit overflows)
 * Graphics: easy-to-use API for 2D games, accelerated with RDP
 * Support for standard N64 controllers and memory paks.
 * Support for saving to flashes and EEPROMs (including a mini EEPROM filesystem to simplify serialization of structures).
 * Audio: advanced RSP-accelerated library, supporting up to 32 channels and streaming samples from ROM during playback for very low memory usage. Supports WAV files for sound effects and XM module format for background music. Can playback a 10-channel XM with < 3% CPU and < 10% RSP.
 * Debugging aids: console ( goes to screen) exception screen, many asserts (so that you get a nice error screen instead of a console lockup),   are redirected to your PC console in emulators and to USB via compatible tools (UNFLoader, g64drive).
 * Support to read/write to SD cards in development kits (64drive, EverDrive64), simply with
 * Simple and powerful Makefile-based build system for your ROMs and assets

There is currently no support for 3D programming. An effort has recently started to implement 3D using the OpenGL 1.5 API.

To attempt some 3D programming, please use this "ugfx library" that is left as a non-merged pull request to gain visibility.

How to get started with Libdragon development
The easiest way is to use the ready-to-use Docker toolchain and related command line tool.


 * 1) Download one of the pre-built binaries of the libdragon CLI tool. If you're not into downloading pre-built binaries, follow the instructions in the README to use npm to install it.
 * 2) Run   in a new empty directory. This will download the docker image of the toolchain, a copy of libdragon itself and get things ready.
 * 3) Try to compile and run one of the libdragon examples. For instance, go into libdragon/examples/spritemap and run

Hack away!