Skip to content

How to use

Eldred Habert edited this page Feb 22, 2025 · 1 revision

Customizing

Edit project.mk to customize most things specific to the project (like the game name, file name and extension, etc.). Detailed documentation of that file is available.

Everything in the src directory is the source, and can be freely modified however you want. Any .asm files in that directory (and its sub-directories, recursively) will be individually assembled, automatically. If you need some files not to be assembled directly (because they are only meant to be INCLUDEd), you can either rename them (typically, to .inc), or move them outside of src (typically, to a directory called include).

The file at src/assets/build_date.asm is compiled individually to include a build date in your ROM.

If you want to add resources, I recommend using the src/assets directory. Add rules in the Makefile; an example is provided for compressing files using PB16 (a variation of PackBits).

Building

Simply open you favorite command prompt / terminal, place yourself in the directory the Makefile is located in, and run the command make. This should create the output in the bin directory.

Pass the -s flag to make if it spews too much output for your tastes. Pass the -j <N> flag to make to build more things in parallel, replacing <N> with however many things you want to build in parallel; your number of (logical) CPU cores is often a good pick (so, -j 8 for me), run the command nproc to obtain it.

Tip

  • If you get errors that you don't understand, try running make clean.
  • If that gives the same error, try deleting the assets directory.
  • If that still doesn't work, try deleting the bin and obj directories as well.
  • If that still doesn't work, feel free to ask for help.
Clone this wiki locally