Hacking Flappy Bird By Playing Mario

This is a hacking and gaming tour de force! [Seth Bling] executed a code injection hack in Super Mario World (SMW) that not only glitches the game, but re-programs it to play a stripped-down version of “Flappy Bird”. And he did this not with a set of JTAG probes, but by using the game’s own controller.

There are apparently a bunch of people working on hacking Super Mario World from within the game, and a number of these hacks use modified controllers to carry out the sequence of codes. The craziest thing about our hack here is that [Seth] did this entirely by hand. The complete notes are available here, but we’ll summarize the procedure for you. Or you can go watch the video below. It’s really incredible.

Continue reading “Hacking Flappy Bird By Playing Mario”

Winning The Console Wars – An In-Depth Architectural Study

From time to time, we at Hackaday like to publish a few engineering war stories – the tales of bravery and intrigue in getting a product to market, getting a product cancelled, and why one technology won out over another. Today’s war story is from the most brutal and savage conflicts of our time, the console wars.

The thing most people don’t realize about the console wars is that it was never really about the consoles at all. While the war was divided along the Genesis / Mega Drive and the Super Nintendo fronts, the battles were between games. Mortal Kombat was a bloody battle, but in the end, Sega won that one. The 3D graphics campaign was hard, and the Starfox offensive would be compared to the Desert Fox’s success at the Kasserine Pass. In either case, only Sega’s 32X and the British 7th Armoured Division entering Tunis would bring hostilities to an end.

In any event, these pitched battles are consigned to be interpreted and reinterpreted by historians evermore. I can only offer my war story of the console wars, and that means a deconstruction of the hardware.

Continue reading “Winning The Console Wars – An In-Depth Architectural Study”

bluetooth snes headphones

SNES Headphones Cry For Bluetooth Has Been Answered

A year and a half ago we ran a post about a SNES controller modified into a pair of headphones. They were certainly nice looking and creative headphones but the buttons, although present, were not functional. The title of the original post was (maybe antagonistically) called: ‘SNES Headphones Scream Out For Bluetooth Control‘.

Well, headphone modder [lyberty5] is back with a vengeance. He has heeded the call by building revision 2 of his SNES headphones… and guess what, they are indeed Bluetooth! Not only that, the A, B, X and Y buttons are functional this time around and have been wired up to the controls on the donor Bluetooth module.

To get this project started, the SNES controller was taken apart and the plastic housing was cut up to separate the two rounded sides. A cardboard form was glued in place so that epoxy putty could be roughly formed in order to make each part completely round. Once cured, the putty was sanded and imperfections filled with auto body filler. Holes were drilled for mounting to the headband and a slot was made for the Bluetooth modules’ USB port so the headphone can be charged. The headphones were then reassembled after a quick coat of paint in Nintendo Grey. We must say that these things look great.

If you’d like to make your own set of SNES Bluetooth Headphones, check out the build video after the break.

Continue reading “SNES Headphones Cry For Bluetooth Has Been Answered”

Wireless SNES Controller

SNES Controller Modified To Be Completely Wireless

[Pat] was looking for a way to wirelessly control his Fire TV unit. He could have just went with one of many possible consumer products, but he decided to take it a step further. He modified a unit to fit inside of an original SNES controller. All of the buttons are functional, and the controller even features a wireless charger.

[Pat] started out with a Bluetooth video game controller marketed more playing video games on tablets. The original controller looked sort of like an XBox controller in shape. [Pat] tore this controller open and managed to stuff the guts into an original SNES controller. He didn’t even have to remove the original SNES PCB. [Pat] mentions that it was rather tedious to rewire all of the buttons from the original controller, but in the end it wasn’t too difficult. The only externally visible modification to the original controller is a small hole that was made for a power button.

In order to make this unit completely wireless, [Pat] also installed a Qi wireless charging module. Now, placing the controller on a charging pad will charge up the small LiPo battery in just about 45 minutes. This controller would be the perfect addition to a RetroPi or other similar project. If you’re not into Bluetooth, you can try using a Logitech receiver instead. Continue reading “SNES Controller Modified To Be Completely Wireless”

Mario Hack

Reprogramming Super Mario World From Inside The Game

[SethBling] recently set a world record speed run of the classic Super Nintendo game Super Mario World on the original SNES hardware. He managed to beat the game in five minutes and 59.6 seconds. How is this possible? He actually reprogrammed the game by moving specific objects to very specific places and then executing a glitch. This method of beating the game was originally discovered by Twitch user [Jeffw356] but it was performed on an emulator. [SethBling] was able to prove that this “credits warp” glitch works on the original hardware.

If you watch the video below, you’ll see [SethBling] visit one of the first available levels in the game. He then proceeds to move certain objects in the game to very specific places. What he’s doing here is manipulating the game’s X coordinate table for the sprites. By moving objects to specific places, he’s manipulating a section of the game’s memory to hold specific values and a specific order. It’s a meticulous process that likely took a lot of practice to get right.

Once the table was setup properly, [SethBling] needed a way to get the SNES to execute the X table as CPU instructions. In Super Mario World, there are special items that Mario can obtain that act as a power up. For example, the mushroom will make him grow in size. Each sprite in the game has a flag to tell the SNES that the item is able to act as a power up. Mario can either collect the power up by himself, or he can use his friendly dinosaur Yoshi to eat the power up, which will also apply the item’s effects to Mario.

The next part of the speed run involves something called the item swap glitch. In the game, Mario can collect coins himself, or Yoshi can also collect them by eating them. A glitch exists where Yoshi can start eating a coin, but Mario jumps off of Yoshi and collects the coin himself simultaneously. The result is that the game knows there is something inside of Yoshi’s mouth but it doesn’t know what. So he ends up holding an empty sprite with no properties. The game just knows that it’s whatever sprite is in sprite slot X.

Now comes the actual item swap. There is an enemy in the game called Chargin’ Chuck. This sprite happens to have the flag set as though it’s a power up. Normally this doesn’t matter because it also has a set flag to tell the game that it cannot be eaten by Yoshi. Also, Chuck is an enemy so it actually hurts Mario rather than act as a power up. So under normal circumstances, this sprite will never actually act as a power up. The developers never programmed the game to properly handle this scenario, because it was supposed to be impossible.

If the coin glitch is performed in a specific location within the level, a Chargin’ Chuck will spawn just after the coin is collected. When the Chuck spawns, it will take that empty sprite slot and suddenly the game believes that Yoshi is holding the Chuck in his mouth. This triggers the power up condition, which as we already know was never programmed into the game. The code ends up jumping to an area of memory that doesn’t contain normal game instructions.

The result of all of this manipulation and glitching is that all of the values in the sprite X coordinate table are executed as CPU instructions. [SethBling] setup this table to hold values that tell the game to jump to the end credits. The console executes them and does as commanded, and the game is over just a few minutes after it began. The video below shows the speed run but doesn’t get too far into the technical details, but you can read more about it here.

This isn’t the first time we’ve seen this type of hack. Speed runs have been performed on Pokemon with very similar techniques. Another hacker managed to program and execute a version of single player pong all from within Pokemon Blue. We can’t wait to see what these game hackers come up with next. Continue reading “Reprogramming Super Mario World From Inside The Game”

Teaching Mario To Play Pong And Snake Through Innumerable Exploits

This is the coolest classic Super Nintendo Entertainment System (SNES) hack we’ve seen in quite a while. What you’re seeing is called “Super Mario World (Total Control)” by [Masterjun]. Our first recommendation is that you watch the video, then come back here for an explanation. Similar to what we saw for Pokemon Yellow on Gameboy, [Masterjun] created entire Pong and Snake clones within Super Mario World. He also created a menu and ending screen, along with his trademark smiley face graphic. Even more amazing is that this was unveiled live on a real SNES running an unmodified game cartridge. [Masterjun] actually used dual multitap cables, effectively connecting 8 controllers to a SNES. This gave him enough bandwidth to quickly download his new binary through the controller ports alone.

Welcome to the world of Tool Assisted Speedruns (TAS), where emulators and scripts are used to create high-speed runs through video games. The runners often work frame by frame, painstakingly inputting commands to create the perfect run. Game bugs and glitches are often exploited in these speed runs. In fact, in runs such as this one, the speed run takes second place to showing off the exploit. The output of speed run creation is a script file of control inputs which can be executed on an emulator to “re-run” the TAS at any time. This script can also be saved to a PC or Raspberry Pi and played back into the controller port of a real game system. A PIC based hardware translator is used to convert the data to NES or SNES controller format. As one might expect, these scripts run open loop. With no feedback from the running game, they can and do become desynchronized due to differences in console hardware, such as the tolerance of the oscillator crystal. When everything is in sync and does work , the results are awesome.

Continue reading “Teaching Mario To Play Pong And Snake Through Innumerable Exploits”

Wireless SNES Controller For Logitech Receiver

SNES

A while back, Logitech introduced their version of a wireless interface for keyboards, mice, and other human-oriented peripherals. Yes, they could have used Bluetooth, but that’s neither here nor there. What we do know, though, is that it’s now possible to stuff one of these Logitech transmitters into a Super Nintendo controller, allowing it to operate with your fancy-schmancy wireless keyboards and mice.

[Warrior_Rocker] wanted to retain as much of the stock appearance of the original controller as possible. To do this, he salvaged the Logitech transmitter from an old handheld Logitech keyboard/touchpad combo. The membrane of the keyboard connected directly to the transmitter, meaning tracing out the connections of the membrane to each pin was required to get a button mapping that made sense.

Once the lines of the SNES controller were wired up to the transmitter, [Warrior] needed a way to power his new wireless controller. The old keyboard used a pair of AA cells wired in parallel. With two AA cells, the keyboard had about a year of battery life, so with a single AAA cell, [Warrior]’s SNES controller should last a few months or more.

Except for a switch and a missing cable, [Warrior]’s wireless controller looks exactly like a stock controller. Pretty impressive, given this build is the product of stuff he just had lying around.