Skip to content

A study hub for SNES programming with assembly

Notifications You must be signed in to change notification settings

maganharenan/SNES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly SNES Study Hub

Platform

Welcome to my SNES Assembly Study hub! Here, you'll find various examples for programming for Super Nintendo Entertainment System (SNES) using assembly language.

About

This repository serves as a learning hub for SNES assembly development. If you're a beginner like me, you maybe can find valuable resources to help you understand and improve SNES programming here.

Getting Started

  1. Clone this repo to your local machine;
  2. Navigate to the desired study topic;

Generating the ROM file

To generate the rom file you will need to install an assembler. I am currently using the assembler WLA-DX. I work on a macbook so I install it using Homebrew

brew install wla-dx

In each project folder I have included a shell script called wla.sh. This script is responsible for generating the ROM. Here is the script content:

echo '[objects]' > temp
echo $1.obj >> temp

wla-65816 -o $1.obj $1.asm
wlalink -r temp $1.smc

rm $1.obj
rm temp

In the original example the wlalink line was like this: wlalink -vr temp $1.smc but everytime I tried that I got and error, so I replaced the -vr with -r

Well, to generate the rom, you only need to navigate to the desired project folder and run the command:

./wla.sh main

Remember that main is just the name of the project, it stands for main.asm. If you named your project different than that, so make sure of replacing when running the shell script.

Another important thing is that you will probably face an permisson error when trying to run the script. To quickly solve that you can just run this command before executing the script:

chmod +x wla.sh

Running the ROMs

I personaly recommend using the bsnes to run the rom files. I don't linke to use OpenEmu because I always have some problem related to the keyboard.

Contents

Contributing

If you'd like to contribute to this repository by adding new projects, improving existing ones, or fixing issues, feel free to submit a pull request. Your contributions are greatly appreciated!

Recommended Resources

Websites
  • SFC Development Wiki - A wonderful wiki with a lot of resources about programming for SNES. By the way, the very first program that I wrote using assembly I followed the Bazz's tutorials.
  • Super NES Programming - Another cool site to learn how to program for SNES. There are some tutorials, another cool resources and some techniques there.
  • SNES Assembly Adventure - This one id new for me, but I really liked it. You should check it out.
Youtube Channels
  • ChibiAkumas - Great channel! I followed his tutorials to make the complex examples like the hello-world and the bitmap related stuff.
  • Manual do Código - If you speak portuguese you need to know this channel. Great content, very well explained.
Books
Libs, SDKs, etc
  • PVSnesLib - Great lib! I used it a lot in some other stuff that I wrote in C.