Before you dive into writing Super Nintendo programs, you need the necessary utilities and other things that will simplify your journey of learning how to program this beast.
Inside Qwertie’s package are a few key files you need to have on tap. They are qsnesdoc.html (in Mmio&PPU directory), the entire yoshi directory, and the 65816 primer._
I’ve heard all kinds of SNES assemblers - SNASM, TRASM, X816, etc, but for many reasons, we’ll be using WLA DX 9.2.
Stick wla-65816 and wlalink into:
C:\WINDOWS\system32\ /usr/local/bin/ for Linux users
This way you will be able to use them wherever you are, rather then having to put them in a certain directory.
Here is batch and shell script file which fully assembles projects into an SMC. Read their usage notes inside them. The batch is by Neviksti, shell script was converted by me.
Linux / Mac OS X :
#!/bin/sh echo '[objects]' > temp echo $1.obj >> temp wla-65816 -o $1.obj $1.asm wlalink -vr temp $1.smc rm $1.obj rm temp
@echo off goto continue # Notes: to compile EXAMPLE.ASM ---> EXAMPLE.SMC from the command prompt type: wla EXAMPLE :continue echo [objects] > temp.prj echo %1.obj >> temp.prj echo on wla-65816 -o %1.asm %1.obj wlalink -vr temp.prj %1.smc @echo off del %1.obj del temp.prj
Anything… notepad, wordpad, ultra-edit, Textmate some kind of word processor.
Ok, now you have a decent programming environment. Try to organize all the files so they are relative to each other. For instance, make a folder called SNES, and make a sub-directory named “docs,” another called “code,” etc. You don’t have to be organized, but it helps (I’ve even printed out some docs). Do whatever the hell you want, ok? Alright, we’ll start learning some 65816 ASM in the next tutorial.
On to Learning 65816 Assembly!
Tutorial by bazz