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.

Documents

  1. One great assortment of files was gathered by Qwertie, it contains documents on the cpu, graphics, etc: snesbase.7z
  2. Yoshi's docs - Oh wait, that's in the zip above. :) (in the Misc Directory)
  3. 65816 Primer - wait, that's in the zip above as well. It's named 65816info.txt (in CPU dir)
  4. Asmtutor - Great read for learning 65816 assembly: Jay's ASM Tutorial.
  5. Save this more advanced, raw technical manual SNES Dev Manual
  6. eKid's pcx2snesWIN.7z for Windows / snesimg by Matthew Callis for macOS.

*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.

Development Kits

  1. Neviksti's Snes Starterkit SNES-starter-kit.7z

The ASSEMBLER

I've heard all kinds of SNES assemblers - SNASM, TRASM, X816, etc, but for many reasons, we'll be using wla-dx-9.2.7z / WLA DX 9.2.

Where to put all the executables

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 : wla.sh

#!/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

Windows : wla.bat

@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

The Text Editor

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