Code Monkey home page Code Monkey logo

libdragon's Introduction

Libdragon

Build Status

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:

  1. Create a directory and copy the build script there from the tools/ directory.
  2. Read the comments in the build script to see what additional packages are needed.
  3. Run ./build from the created directory, let it build and install the toolchain.
  4. Install libpng-dev if not already installed.

Below steps can also be executed by running build.sh at the top level.

  1. Make libdragon by typing 'make' at the top level.
  2. Install libdragon by typing 'make install' at the top level.
  3. Make the tools by typing 'make tools' at the top level.
  4. Install the tools by typing 'make tools-install' at the top level.
  5. Install libmikmod for the examples using it. See build.sh at the top level for details.
  6. 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/

RSP assembly

Libdragon uses assembly macros to program the RSP chip defined in ucode.S. These mainly wrap cop2, lwc2 and swc2 instructions.

The syntax is similar to that of Nintendo's but with a few changes. For example if we take vabs instruction;

vabs vd, vs, vt[e]

it becomes;

vabs vd, vs, vt, e

and element (e) is always required. It is also similar for load/store instructions. As an example, sbv instruction;

sbv vt[element], offset(base)

becomes;

sbv vt, element, offset, base

Basically all operands are required and separated by commas.

While using these custom instructions, you should use $v00-$v31 when naming vector registers and $0-$31 when naming scalar registers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.