Super Mario on a Human-Machine-Interface!

super mario

Getting Super Mario to work on your TI-83 calculator is almost a rite of passage for young geeks, so we really liked this project where [Chad Boughton] managed to get it running on a PLC’s HMI screen instead!

He’s using a Danfoss DP600LX microcontroller with an HMI display along with a CAN bus joystick. This kind of equipment is typically used to control hydraulic systems, as well as display sensor data — [Chad] was curious to see if he could do animation with it as well — it looks like he’s succeeded! The funny thing is we’ve seen those “joysticks” before and it’s cool to see them used for something like this — like [Chad] said, they’re normally used for actuating hydraulic and pneumatic cylinders.

Stick around after the break to see Mario eat some mushrooms.

[Read more...]

A Deep Dive Into NES Tetris

Tetris AI

Back in 1989, Nintendo released Tetris for the NES. This detailed article first explains the mechanics of how Tetris works, then builds an AI to play the game.

To understand the mechanics of the game, the ROM source was explored. Since the NES was based of the MOS 6502 microprocessor, this involves looking at the 6502 assembly. The article details how the blocks (called Tetriminos) are created and how they move across the screen. The linear feedback shift register used for random number generation is examined. Even details of the legal screen and demo mode are explained.

After the tour through how Tetris works, an algorithm for the AI is presented. This AI is implemented in Lua inside of the FCEUX NES/Famicom emulator. It works by evaluating all of the possible places to put each new Tetrimino, and choosing the best based on a number of criteria. The weighting for each criterion was determined by using a particle swarm optimization.

The source for both the Lua version and a Java version of the code is available with the article. Everything you need to run the AI is available for free, except the Tetris ROM. If you’re interested in how 8 bit games were built, this dissection is a great read.

[via Reddit]

Teaching Mario to Play Pong and Snake Through Innumerable Exploits

mario-full
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.

[Read more...]

NESPoise – a Nice Looking NES Clone

[Dave] tipped us about the latest project he just finished: a posable, desktop NES clone arcade machine. This idea came to be when its creator gathered a few bits and pieces he had lying around: an NES Retro Entertainment System (Retrobit RES, found for less than $25) and an arcade stick with its buttons. [Dave] then bought a 7″ car DVD screen (less than $40) and started a first standard arcade-looking design with OpenSCAD. As the first draft was relatively boring, he let it mature for a bit until he got another idea, shown in the picture above.

The final result is made of 3D printed PLA and varnished luaun plywood which gives the console a VCS style retro look. Many hours were required to 3D print the different parts using a Makerbot Replicator 2. [Dave] disassembled his Retrobit RES to layout its parts inside the case and  also replaced the original voltage regulator with a 7805 on a big heatsink. This may be one of the best ‘nintendo’ hacks we have received over the years, but there have been others that also take cartridges.

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.

Original NES Advantage Controller Stuffed with Clone NES

famiclone-inside-NES-advantage

Like all good hackers [Osgeld] makes regular appearances at the thrift store to scavenge for raw materials. This summer he was lucky enough to come across a couple of NES clone games. These are controllers that emulate the original Nintendo Entertainment System by connecting to a television using composite video. The mechanics of the controllers were pretty much shot, but he knew he could do something with the boards inside. It was a small gamble at a dollar apiece anyway.

As you can see above, he upgraded a vintage NES Advantage controller by stuffing it full of the emulator hardware. To start he disassembled the arcade-like peripheral and gave everything a thorough cleaning. Since he was going to be soldering onto the PCBs anyway he upgraded the controller by swapping out the original switches for a different set of tactile switches. The large base provided plenty of room for [Osgeld] to fit the emulator (with included ROMs) and now he’s Playing with Power.

The NES Advantage is a very nostalgic controller. Even the Ghostbusters hacked on it!

Finding Shiny Pokemon Automatically

pkmn

In case you’re not up to speed with the world of Pokemon, nearly every species of this game’s titular creatures have a ‘shiny’ variety – a differently colored sprite for each pokemon. As far as gameplay goes, they’re exactly the same as their non-shiny brethren, but the shiny varieties are so impossibly rare not many players have seen them. [dekuNukem] over on Youtube has come up with a great way to find these shiny Pokemon automatically with the Hackaday reader’s favorite tools – an Arduino and a few parts from Sparkfun.

The build hinges on the fact that all shiny pokemon have a short animation whenever the player encounters them in the wild. This setup uses a fishing rod, so an Arduino Micro first presses the Y button to cast the rod, while the ‘duinos ADC listens to the audio signal until a bite is indicated.

A light sensor taped to the bottom screen of the 3DS then measures the amount of time the screen is blacked out. The extra animation for every shiny pokemon means this blackout period is about half a second longer. If the Arduino doesn’t see a shiny, it ‘runs away’, but if a shiny is detected a buzzer sounds to tell the extremely lazy pokemon trainer they have a shiny on their line.

From the video, it took about 36 minutes to find a single shiny pokemon, and about 8 shinies in the three hours of testing this rig has under its belt.

[Read more...]

Follow

Get every new post delivered to your Inbox.

Join 91,345 other followers