Arbitrary Code Execution Explained Using Super Mario Bros.

Arbitrary Code Execution Explained Using Super Mario Bros.

Glitches in games can range from the ridiculous to the beautiful. But how about educational? A new YouTube channel, called “Retro Game Mechanics Explained”, is all about breaking down — and learning from — games (and their bugs in particular).

The most recent clip takes a look at a “warp” exploit in Nintendo’s Super Mario Bros. 3 that allows the player to complete the game in just a few minutes. Now, video of this bug can be found pretty much anywhere, but RGME actually explains how it works in detail:

The main idea is that we can write our own bytecode for the processor to execute by manipulating memory, such as sprite X-positions and force execution to jump to our code via a game-breaking crash.

In addition, the concepts are described with visual aids, such as this one showing the in-memory representation of object positions:

You have to feel sorry for those poor Koopa Troopas. This just adds another dimension to their terribleness as guards.

Super Mario Bros. 3 – Wrong Warp [YouTube]

Log in to comment on this story!