Making NSFs under UNIX

Update: I've written a replacement for MCKC that targets playroutines on various platforms. I'm going to try and release it soon enough. Keep an eye on my homepage for updates. Hopefully this will be sometime before the end of 2005.

A lot of the NSF resources are aimed at windows. If you want to write NSFs under UNIX (or, really, anywhere with a C compiler), you should download MCKC (local, alt link) and NESASM.

MCKC can be compiled just by entering the source directory in the archive provided, and executing:

% gcc -o mckc *.c -lm

NESASM can be compiled by entering SRC/AS in the provided archive, and executing: (note the newlines in the for command)

% for i in * ../../BIN
do
    mv $i `echo $i | tr A-Z a-z`
done
% make -f makefile.unx
This produces ../../bin/nesasm.

You will probably want to read this document (alt. link, local) translated by virt.

To start a new song, I put these files in a fresh directory, and then write the music in an MML file in that directory. Then, I run this script (which has sloppy, unsafe temp file handling) like this:

% makensf my_song
assuming my_song.mml (and the contents of templates.tgz) is in the current directory. Ideally, this should produce my_song.nsf, which you can play with festalon or nosefart or whatever.

Make sure that the mckc and nesasm binaries somewhere in your path before you run the script.