NESHacker on Basic NES Platformer Movement

A 6502 is not a bad little machine, but it does require efficient coding to get decent real-time results. NESHacker dives into basic Mario-style platformer movement in a 10-minute video

The main portion of the video goes into subpixel movement, a term you may have heard speedrunners use. Many NES platformer heroes don’t jump immediately to movement when a control is pressed, but instead increase acceleration, and that acceleration is measured, in the case of Mario, in 16ths of a pixel.

The process of conversion is pretty slick though. It doesn’t use floating point math but fixed point. Mario’s position isn’t stored just in hardware screen coordinates but in a number with four extra bits off the right side. This larger number is what acceleration math is performed on, and when it comes time to position Mario’s sprite matrix (he’s not properly a sprite because he’s made of several), the code divides by 16 by just rolling the bits to the right, which is a very time performant operation on a 6502.

Other useful tricks are explicated, like storing controller states in a single byte (easily done since NES controllers have precisely eight buttons) and jumping. It’s not a general guide into general platformer implementation, but that’s okay, as there already exists a terrific example of that.

The KIM-1 Programmer’s Guide to the MOS 6502

The KIM-1, 50 years old as of 2026, was the first 6502-based home computer, designed by the legendary Chuck Peddle and sold by MOS Technologies themselves. (Well, we’re not sure if the Apple I or the KIM-1 was first. Or maybe it was the JOLT? As I’ve said before, there’s always something you’ve never heard of before out there, waiting to make you look like a fool.)

Someone on Mastodon (I can’t find the post now) mentioned that the KIM-1 had excellent programming guides, as it rightfully must have had, considering a freshly-assembled KIM had to have been programmed in raw machine code, and coming from an era before the World Wide Web. I had a look and, lo, it did!

Have a look for yourself, from a copy hosted by Rich’s Classic Computer Pages (PDF). Explained in an early chapter is how to properly add together numbers of arbitrary sizes, something that I had to find out from random sources. I wish I had this book when I was programming on the Commodore 64; I did have the famous Programmer’s Reference Guide, but that’s just it. It’s a reference work, and very difficult to learn the principles of assembly coding through it directly. (That said, there are pages in the C64 PRG that will look very familiar to someone flipping through the KIM-1 Programmer’s Guide.)

The cover of the Book itself

If you sat down and read this all the way through, and it’s quite readable for a programming manual, you’d be well placed to write code for, not just the KIM-1, but any 6502 computer. While for other machines you would need more information, like memory maps and hardware documentation, and you might like to have an assembler too, you’d still have a great foundation for whatever crazy programming adventure you were about to embark upon. I love it.

The Issues With NES Teenage Mutant Ninja Turtles

The title refers to the original NES TMNT, not the arcade version or the NES game based on it. This is the version that Konami released under their Ultra label. It sold well (real well!) but is widely considered an inferior game for a number of reasons. Those reasons are the subject of these three videos, from Youtube channel Displaced Gamers. I recommend them, even if I think every place they say gamer it would be more proper to say player.

The first video:

In a long and difficult game, one of the hardest sections comes relatively early. The only swimming section in the entire game, players must maneuver their supposedly-aquatic surrogates through a difficult course that has imprecise movement, water currents, high damage, instant kill hazards, a strict time limit, and, as the video shows, buggy implementation. Many players in the NES era gave up at this point, which is rather a shame considering it’s only at the end of level two. This video examines the code and demonstrates why it’s so challenging, and how it could be made fairer.

The second video:

TMNT has notoriously floaty jumps, a low frame rate, and a fairly weird implementation of gravity. Any platform game that allows players to adjust their jump height according to how long the hold down the jump button is fudging its physics behind the scenes, but TMNT does it rather poorly.

The third video:

Displaced Gamers examines additional problems with the game’s timing, particular with that of its input reading and attack animation. Like the other two videos, they suggest code changes (sometimes in the form of Game Genie codes) that fix the problem, if you happen to have a fondness for 6502 assembly. (I do!)

If you’d like to try NES Teenage Mutant Turtles, it’s included in the “Cowabunga Collection” that was released for Switch, Xbox X/S and Playstations 4 and 5. Fortunately, it also includes twelve much more playable titles.