Behind the Code Examines The NES Punch-Out!! Boxer Engine

Here’s another of those deep-dive NES internal videos from Behind the Code, possibly the most complex one they’ve done to date. Most game engines, when you examine their basic logic, are basically physics simulations, with some AI included to determine how actors behave.

Not so with the Punch-Out!! games. They are essentially entirely different kinds of games from that. You have certain things you can do moment to moment, and opposing boxers do too. Each of those opponents basically runs a big script, made out of byte code, that determines their behavior throughout each round of each fight. I am struck both by the simplicity (no need to simulate gravity) and the complexity (boxers take all kinds of things into account) of the system.

One of the interesting things shown is that the engine can affect more than just the boxers, but can also subtly affect the crowd, which is how the previously-revealed fact that a specific camera person in the crowd uses his flash right at the moment the player must counter Bald Bull’s charge move. It turns out that this isn’t the only instance of this happening in the game!

You don’t need to know 6502 assembly code to get what the narrator is talking about, but a lot of code is shown, so those of you who understand it may get a bit more out of it. Here are a few basics to help you follow along.

The 6502 has only three registers (bits of memory internal to the CPU that can be accessed quickly), the Accumulator (sometimes called just A), the X register, and the Y register. Each is only one byte long. The Accumulator is by far the most flexible, but all three are general-purpose registers. The most common instructions are Loads (LDA, LDX, LDY), Stores (STA, STX, STY), Transfers between registers (TAX, TAY), Incrementing and Decrementing (INX, INY, DEX, DEY), Adding (ADC), Subtracting (SBC), Comparing (CMP), Branches (some of them, Branch Not-Equal to Zero: BNE, Branch Equal to Zero: BEQ, Branch of Carry Set: BCS, Branch on Carry Clear: BCC), Jump (JMP), Jump to Subroutine (JSR), and Return from Subroutine (RTS). While some instructions are just one byte long, the longest any 6502 instruction can be is three bytes, and the opcode (the command itself) is always just one.

(I wrote all of that from memory. I figured, I have all of this in my head from my coding youth, I might as well use some of it.)

The 6502 can only address 64K of memory, so often systems will use bank switching to connect various memories to it within that space. The great majority of NES/Famicom games had to do this. Punch-Out!! was unique on the NES in that it was the only game to use Nintendo’s MMC2 chip. (I wonder if the chip was designed ahead of time, and they made this game as an excuse to use it?) Punch-Out!! uses MMC2 to bank in each boxer’s large data script as needed.

Behind The Code: How Do Boxers Work in Mike Tyson’s Punch-Out!!? (Youtube, 20 minutes)

U Can Beat Video Games: Dragon Warrior III

I’ve been waiting for this one for a long time! U Can Beat Video Games has finally covered the best NES Dragon Warrior, the third game in the series. It was Dragon Quest III in Japan, due to some trademark issue with TSR I think. IV isn’t bad, and has fun characters, but there aren’t as many variant strategies in it, and in the last chapter you don’t get to control the actions of most of your party members. DWIII always gives you full control of your characters, plus it lets you create characters with names and classes of your choosing, meaning, like the first Final Fantasy, you can make completely custom parties and play the game in many different ways. It was the game that spawned the urban legend that the Japanese government requested that Enix release Dragon Quest games on weekends, because so many people ditched work to stand in line to buy it. (I don’t know if it’s true, but the story has often been passed around.)

It’s also the first Dragon Quest/Warrior game that allows for class changing, which resets a character to Level 1 (similar to an human AD&D character who dual-classed), but only halves their stats, and lets them keep all the spells they learned. Since they’re Level 1 again, they gain levels very rapidly for a while, allowing them to quickly surpass their previous heights. It’s kind of an early version of the “prestige” mode of clicker games, where you reset all your progress in exchange for faster progress afterward!

It also has a cool story that eventually connects with the first two games, and has a good variety of activity, including growing a town from scratch like 25 years before Breath of the Wild and betting on monster fights! It’s also got all the challenge of the early Dragon Quest games, with later monsters who can cast instant death spells on everyone in your party at once, as well as doing other horrible things to them.

Because Dragon Warrior III doesn’t pull its punches against the player, the various tricks that the narrator does to use the engine’s bugs against it feel like playing fair, and yet, even with full knowledge of the game and multiple player leveling and cash gaining strategies he still has problems once in a while. It’s a really tough game!

This may end up being U Can Beat Video Games’ magnum opus, at least of the NES era, it’s a really long game that takes three videos, of almost 12 hours total length, to cover in its entirety! Here they are:

EPISODE ONE: Creating Your Party Through to Getting the Ship (3 hours, 59 minutes)

EPISODE TWO: Getting the Ship through to Defeating Archfiend Baramos (4 hours, 22 minutes)

EPISODE THREE: The Dark World to the Final Boss, Plus Extras (3 hours, 35 minutes)

Please enjoy, and Rubiss help us all!

Sundry Sunday: Lego Dimensions has GlaDOS meet HAL 9000

Lego Dimensions was much too awesome for this decayed world. Sadly, many of its greatest moments were part of DLC locked to various figures you had to collect individually.

But if you had the right bits of plastic, you could witness moments of pop cultural crossover greatness. Witness then this meeting between Portal’s GlaDOS and 2001: A Space Odyssey‘s HAL 9000, with the voices of each, sort of interacting with each other in their various impersonal AI ways.

Sundry Sunday: The People’s Mario

Content warning: cartoon blood, violence against Goombas.

This one goes back a ways. I wonder how many people have viewed this in the past decade? It was popular enough once to get up to nearly half a million views, but who knows how many since its original upload in 2007?

A reference to the website of an ancient meme (it seems to have died in 2007), itself riffing on the white flag with a red star that goes up when Mario reaches a castle. This realistically-proportioned Mario ruthlessly smashes and crunches Goombas in a variety of ways, armed with the People’s Hammer, while stirring Russian choral music plays in the background. The video is a rendering of a Newgrounds flash animation, that seems to still be up, and even playable (I assume they’re just using a recording of a higher-quality rendering of the Flash file).

While Russia’s actions as of late are not a laughing matter (except perhaps in the sense of laughing at incompetence at war), we can separate the action in a 2007 meme from their current misadventures, right? Freedom for Ukraine!

Investigating Bootleg Battletoads

The Youtube channel of chirinea mostly hosts cover songs, but they just posted an interesting short video (about 13 minutes), both explaining the Brazilian NES game scene and figuring out why the author’s Battletoads cart skips level 2.

During much of the NES’s life, Nintendo has no distribution deal to release consoles or games in Brazil, leaving the market open for a legion of bootleg cartridge manufacturers. The video author had some of these games, which were usually straight dumps of the originals, but their version of Battletoads was not.

It had been slightly localized, with its intro text translated into Portuguese. But there were some other minor changes too. Players started with an extra life, and had infinite continues. But also, for an unknown reason, the game completely skipped the second level, the one right before the game’s infamous Turbo Tunnel.

Was it a change in the game’s code, or a malfunction caused by his NES hardware? chirinea had a bit of an adventure in figuring out how to get the code off of his cartridge into an emulator so it could be compared with the official release, and ultimately found out that yes, the code was different, and it was probably done to avoid problems with Brazilian bootleg NESes crashing on level two.

It’s an interesting journey, and worth the fairly brief runtime to find out how he did it.

What’s wrong with this Brazilian bootleg Battletoads? (Youtube, 13 minutes)

EDIT: Pronoiac offers this logo for the post and video, from the Teenage Mutant Ninja Turtles Logo Generator! You see, the internet is still full of things!

AGDQ 2023 Selections #2: Tuesday & Wednesday

Some more selections possibly of interest from AGDQ 2023. Note that times given in the text are not the length of the run, but as according to our usual policy the run length of the video itself.

Ape Escape 2 (1:04):

Goat Simulator (34m):

Castlevania: Aria of Sorrow Any% No 0HP race (42m) – at 19:40 in begins an extra Julius Any% run:

Super Mario Galaxy 2 four-player Any% race (3:27):

Jak II Any% (1:19):

Outer Wilds (53m):

Ratchet & Clank: Up Your Arsenal (1:35):

FEZ (35m):

Stardew Valley (58m):

Pokemon Yellow (2:24):

The Legend of Zelda: Ocarina of Time 3D (48m):

Stray (1:16):

Sundry Sunday: Commercial for Atari Mario Bros.

We love weird old game commercials from before (or in this case during) the crash, before games and game ads began skew quite so much towards the stereotypical tastes of teenage males, and before companies like Nintendo became such jealous guardians of their products.

And just look at all the effort that must have gone into this commercial! This isn’t just people sitting in front of a TV raving about a game, these actors are wearing costumes and running from puppet creatures on an actual set! And this may well be the first human actor to ever portray Luigi in front of a camera (he may look like Mario with his color scheme, but his hat says Luigi, and he’s calling Mario for help). It even calls back to the theme song of Car 54 Where Are You. It’s a shame that the game couldn’t possibly have moved enough units to justify this production.

AGDQ 2023 Selections #1: Sunday and Monday

I didn’t get to watch AGDQ realtime this year, but here are some selected videos from the first two days that might be interesting….

Splatoon 3 Any% led off the show (1 hour 30 minutes):

Followed by Breath of the Wild Any% in 29 minutes, always a crowd pleaser:

Symphony of the Night All Bosses on the Xbox 360 version:

Borderlands: Game of the Year Edition Enhanced, Any% Unrestricted (1:47):

Pokémon Mystery Dungeon: Explorers of Sky Randomizer, 10 Dungeon Blitz (1:03)Ax Battler: A Legend of Golden Axe:

Ax Battler: A Legend of Golden Axe 100% on Game Gear (29m):

Bomberman 64: The Second Attack Any% (37m):

Superliminal All Collectables (51m):

Shovel Knight Dig Any% Race (45m):

Teenage Mutant Ninja Turtles: Shredder’s Revenge Co-op 2v2 Any% Arcade Chill Race (that was a mouthful, 1:25):

Marvel’s Spider-Man: Miles Morales Any % (2:50):

and Fable Anniversary (1:32):

We’ll pull out a few more next week!

Sundry Sunday: PAC-TOM

suckerpinch, a.k.a. Tom7, is a regular presenter at SIGBOVIK and no stranger to the intelligent-but-fun video presentation field. This isn’t the first time we’ve posted his work here, and I’m sure it won’t be the last.

Previously he’s run automated tournaments of extremely stupid chess-playing algorithms, wrote programs to try to learn to play NES games by watching memory, and tried to generalize the idea of uppercase and lowercase letters in order to make hypothetical letters that are more uppercase and more lowercase. Among other things.

This time he tells us of the culmination of a sixteen year project to walk down every street in Pittsburgh. Come for that, stay for the moving Pac-Man costume he makes for himself at the end!

How I Ran the Length of Every Street in Pittsburgh: PAC TOM (Youtube, 32 minutes)

Masahiro Sakurai talks about Kirby Air Ride

Just about everyone respects Masahiro Sakurai! I’m no different! He’s made some wonderful games, and even his more obscure works are really cool and fun!

I’ve linked to his series on game design before, released on Youtube with Nintendo’s help. It’s really popular! We try not to link too frequently to the same series or blog, instead waiting to find something in it that connects with me personally, in the hopes that whatever it is will be something that connects with my readers as well, and that’s why I’m linking to him talking a bit about Kirby Air Ride.


Like The Speed Rumbler, I feel like I have to say something really specific and detailed about KAR. (What a cool and appropriate acronym, both in the context of Kirby and Speed Rumbler!) Especially City Trial, which I think is just waiting for some interested party to revisit an expand. In the meantime though, enjoy Sakurai talking about what may be the most unique Kirby game, even in a series containing Star Stacker, Pinball Land and Tilt ‘n Tumble.

Masahiro Sakurai on Creating Games: Kirby Air Ride (Youtube, 7 minutes)

Sundry Sunday: The “Music” of Crazy Bus

Remember Crazy Taxi? How they got licensed punk music from Bad Religion and The Offspring for it? Remember how awesome that was? I’m not even a music person mostly, but I could still recognize that the soundtrack of those games was special. (I’m talking about the arcade and Dreamcast versions-other versions may or may not have that soundtrack, probably due to licensing issues.)

You want to know what game doesn’t have a great sound track? Crazy Bus.

Crazy Bus is a homebrew Sega Genesis/Mega Drive game that was created as a test for the programmer’s BASIC compiler. It wasn’t meant to be a real game. As a result, its soundtrack is almost a masterpiece in cacaphony. Listen for yourself… but you’re going to want to turn the volume down for this one.

It’s awe-ful-some. I encourage you to play it for for friends, family, co-workers, prospective employers, random strangers and household pets. I’m certain nothing bad will come of it!