Summary

Nintendo has made many game consoles in its long history — one that famously overlaps that of the Ottoman Empire — but only one of them was ever Super. It’s that console, the Super Nintendo Entertainment System, that [Inkbox] has decided to delve deeply into as he crafts a game in assembly using all the hardware tricks he can. Hardware tricks he’ll need, given he’s limited to the two 64 kB RAM banks and 3.58 MHz Ricoh 6502-based CPU. Even the 4 MB limit he sets for a historically-accurate homemade cartridge seems positively claustrophobic by modern standards. The game he’s after making is a top-down adventure game a la Zelda, and [Inkbox] gets right into the weeds explaining how the SNES works as he shows his work in this nearly hour long video. If you’re looking for a deep dive into the architecture, along with how it is meant to be used, you could certainly find worse sources. Everything from the different graphics modes to what registers handle sound are covered in this and the previous video in the series. We can’t help but call out his dedication to open source — the SNES Sound Engine he has put up on GitHub looks like it could be a real asset to anyone else doing this kind of homebrew. The game itself is on itch.io and is pay-what-you-want. [Inkbox] doesn’t just limit himself to the SNES’s 6502-esqe assembly — he’s done impressive work in x86 ASM, too. Isn’t the SNES a 65816? It’s the NES that’s a 6502. Why limit yourself by staying in 8-bit mode? If you’re gonna do that, then why not target the old NES? The 65816 is based on the 6502 (like the 80386 is based on the 80286). It’s basically a 6502 with 16-bit registers and a few more instructions and the ability to relocate the famous zero page from the 6502 (that is quite handy for optimizations). It’s a really crappy CPU if you compare it e.g. with the Motorola 68000, and there is no decent C compiler for it. So unless your SNES game is quite simple, assembly coding is mandatory. BTW I have designed a SNES based cartridge and programmer that can hold up to 64 megabits (8 megabytes) using ExHiROM mode that is official, it’s in SNES official docs. Only two SNES games used ExHiROM: Tales of Phantasia and another japanese game whose title I cannot remember. But there you have it: https://gitlab.com/doragasu/xirom-cart

By Tyler August

Original Article