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”

Running a Laundromat with an Arduino

Wasch_140

[Hubert] sent us a tip about a friend’s project to rescue a laundromat from its failing electronics. We’re not entirely sure what went wrong with the old control center, but considering a replacement would have cost nearly 25,000 EUR, we think [Stefan] found the perfect solution: he gave it an Arduino and Android overhaul (translated).

Although [Stefan] explains that the boards were defective, perhaps one of our German readers can help us out with a more specific translation. More clear, however, are the steps taken to upgrade the system. The situation at the laundromat was a bit of an emergency: there was no way for customers to pay for use of the machines. As a result, [Stefan] had free reign to overhaul things as he saw fit. He decided to remove the complex button setup in favor of a touchscreen Android tablet, which provided users with a simple interface to make selections. The tablet serves only as an input device. The heavy lifting is handled by an Arduino Mega 2560, which hooks up to what remains of the original system and controls the 27 machines in the laundromat.

[Stefan] admits that he isn’t a particular fan of the Arduino, but that for the price, it’s a tough solution to beat. He’s not the only one overhauling with Arduinos. Check out some other examples of upgraded machines, like the Arduino-enhanced PopCARD vending machine.

UPDATE: [Andreas] sent in a better translation of the project page which we’ve included below. He worries his written English isn’t the best, but we think it is a lot easier to understand than the machine translation. Thank you for you work [Andreas!]

Continue reading “Running a Laundromat with an Arduino”

Custom Arcade Control Panel

customArcadeControlPanel

Anybody can fire up an emulator and play arcade games of yesteryear, but if you want to capture more of the nostalgia, you should build a custom arcade control panel. [Quinn] started her build by narrowing down which games she was most interested in playing, and decided on a straightforward 2-player setup. The biggest challenge was finding joysticks that would allow for switchable 4-way or 8-way control: some games such as Ms. Pac Man were made for 4-way joystick input, and the added positions on a 8-way can lead to confused inputs and frustrated players.

[Quinn] found the solution with a pair of Ultimarc Servo Stik joysticks, which use a servo motor to swap between 4 and 8-way mode. The output from both the joysticks and the buttons feed into an iPac encoder, which converts the signal to emulate a USB keyboard. The panel was first mocked up on butcher paper, with dimensions borrowed from various games: the panel itself resembles Mortal Kombat 2, while the buttons are spaced to match X-Men vs Street Fighter 2. [Quinn] chose some spare melamine—plywood with a plastic coating—to construct the panel, drilled some holes and used a router to carve out space for the joysticks. A USB hub was added to power the servos and to make room for future additions, which [Quinn] will have no difficulty implementing considering that her electrical layout is enviably clean. To cap it all off, she fit two “coin slot” buttons: a quarter placed into a slot serves as a start button when pressed.

Be sure to see the videos after the break that demonstrate the coin buttons and the servos, then check out a different retro joystick hack for a tripod controller, or look to the future with the Steam Controller.

Continue reading “Custom Arcade Control Panel”

This piggy bank is our stock broker

piggy-bank-stock-buy

[Johna and Justin] are working to take the emotion out of playing the market. They built this piggy bank which automatically purchases stock when your coinage totals the cost of a single share. That’s right, just turn the selector to one of your three chosen stocks (Google, Facebook, and Apple are used in this example) and plug in some coins. The bank counts your money, compares it to the current online stock price, and pulls the trigger if you have enough dough. You can check out a demo clip after the jump.

The hardware is rather simple thanks to Adafruit’s programmable multi-coin acceptor. It handles the cash and it’s pretty easy to interface with the Arduino which handles the rest of the work. It connects to a computer via USB, depending on a PHP script to poll the current price. We dug through the code repository just a bit but didn’t find the snippet that does the actual stock purchase. Whether or not they actually implemented that, it’s certainly an interesting concept.

Continue reading “This piggy bank is our stock broker”

Coin-based Rube Goldberg helps bring in donations

This kiosk was conceived as an interactive poster to help raise donations for a German relief organization. Instead of just providing a coin jar, the piece puts on a little show of transporting a two-Euro coin from the slot at the top to the repository in the base. Along the way many of the parts move, telling a story in that Rube Goldberg sort of way.

What is surprising to us is how much this looks like one of our own projects — at least up to the point that the display is painted. The link above shows off some pictures from the development stages. The prototype shapes up on an oddly shaped scrap of plywood with the coin’s path plotted out. After the particulars of a trip from point A to point B were established the empty spaces were filled in to add visual interest. If you take a gander at the back of the plywood you get an eyeful of protoboard and draped wires. A camera, Mac Mini, and Dropbox were included in the mix to share an image of the donor on the group’s Facebook page (with the donor’s consent of course).

The piece had a month-long home in the Hamburg airport earlier this year. See what that looked like in the video clip after the break.

Continue reading “Coin-based Rube Goldberg helps bring in donations”

Donation meter raises alarm when not plugged with coins

This is something of a mandatory donation meter. If you don’t feed it with coins it sounds a very loud alarm continuously.

[Piet De Vaere] built the device for a free festival in Ghent, Belgium. The intent is to help raise awareness that although free of an admission price, the success of the event depends on donations. It works much like a parking meter. When you feed it coins time is added to the meter. When it runs all the way down that large loudspeaker on the right side of the case sounds the alarm.

In the video after the break [Piet] walks us through a demonstration, followed by a tour of the hardware. The pointer on the meter is a piece of cardboard connected to a servo. An Arduino board controls the servo, adding time in two-minute intervals whenever a coin enters the chute and passes by an optical sensor. There is no distinction between types of coins.

The use of a pizza box as a prototyping board shows that you don’t have to be fancy to build something neat.

Continue reading “Donation meter raises alarm when not plugged with coins”

Bronze casting with MakerBot

That, dear readers, is the smell of a new Hackspace opening up in Davenport Iowa. It is also the lovely scent of burning plastic. Because how do you celebrate a new Hackerspace? By casting bronze coins of course!

Begin by having a MakerBot extrude plastic coins, then compact the plastic coin in sand to produce a mold. Heat up your bronze in a trashcan furnace and pour it into the mold. The plastic melts away and you’re left with a bronze coin.

There are probably some safety measures and precautions that should be followed as well…