I've been learning how to make an SNES game in 65816 Assembly with the help of this guide. It's a really cool set of blog posts.
I've been learning how to make an SNES game in 65816 Assembly with the help of this guide. It's a really cool set of blog posts.
I spent my evening debugging a tricky issue in the 65816 assembly code of my SNES game. Before finding a debugger, I was able to find the line of code causing the problem, but couldn't figure out what the actual issue was!
It turns out I was pushing a value to the stack from an 8-bit register and comparing it with a 16-bit register, so instead of the loop ending at $0014, it was trying to loop until $8014 due to the adjacent memory on the stack!
Not the progress I'd hoped, but good learning!
Tonight's progress isn't really in the game itself, but in the tooling. I wrote a little 40 line program in C to help translate my sprite index values into hex to be pasted into the hex editor.
I'm sure appending the binary directly to the sprite file wouldn't be too hard, but I don't remember how to do that. I suppose `man 3 fwrite` could probably tell me...
Nah, that feels like work, this will do fine.
@adamp That's right! I briefly looked into its Lua scripting and support for exporting, but didn't immediately find a script for the SNES format. I'd been doing it by hand, so get the process, and it'd be reasonably trivial to do there, but I was intrigued by the idea of making a simple C CLI tool. I might revisit that later.
Have you used it and if so, do you have a good export script?