Tetris Duel with the Raspberry Pi

Tetris Duel

Building a multiplayer network game with multiple Raspberry Pis can be very difficult. Doing it in assembly is outright insane! This is exactly what a group of first year students at Imperial College London did; they created a network based multiplayer Tetris game for the Raspberry Pi.

[Han], [Piotr], [Michal], and [Utsav] have created this entire game from bare metal assembly, and it only consists of 4000 lines of code! The code is well documented, so be sure to look through their Github repository. This project is a great reference for those looking to learn bare metal assembly and networking. They even chose to use the old NES controllers, a very nice touch. While we have featured what seems like a million different Tetris games in the past, this is the first multiplayer version. See Tetris Duel in action in the video after the break!

This is a shout-out to all of you students out there. Take the time to create quality documentation for your class project, and upload it to the internet. Not only is it a great resume boost, but it could very well end up on Hackaday!

[Read more...]

Veronica Gets A Pair Of Gamepads And A Bugged Chip

veronica

[Quinn Dunki]‘s awesome 6502-based computer is coming right along, and she decided it’s time to add one of the most important features found in the 80s microcomputers she’s inspired by – gamepads.

There were two ways of implementing gamepads back in the 80s. The Apple II analog joysticks used a potentiometer for each joystick axis along with a 556 timer chip to convert the resistance of a pot into a digital value. Analog controls are awesome, but a lot of hardware is required. The other option is the Atari/Commodore joystick that uses buttons for each direction. Surprisingly, these joysticks are inordinately expensive on the vintage market but a similar hardware setup – NES gamepads – are common, dirt cheap, and extremely well documented.

[Quinn] wrote a few bits of 6502 assembly to read these Nintendo controllers with Veronica’s 6522 VIA with the help of an ATMega168, and then everything went to crap.

In testing her setup, she found that sometimes the data line from the controller would be out of sync with the clock line. For four months, [Quinn] struggled with this problem and came up with one of two possible problems: either her circuit was bad, or the 6522 chip in Veronica was bad. You can guess which option is correct, but you’ll probably be wrong.

The problem turned out to be the 6522. It turns out this chip has a bug when it’s used with an external clock. In 40 years of production this hasn’t been fixed, but luckily 6502 wizard [Garth Wilson] has a solution for this problem: just add a flip-flop and everything’s kosher. If only this bug were mentioned in the current datasheets…

Now Veronica has two NES controller inputs and the requisite circuitry to make everything work. Video evidence below.

[Read more...]

The smallest NES controller ever

A few months ago, [Ben] saw a video of the world’s largest NES controller. “I bet I could make the smallest,” he thought in a strange game of one-upmanship. Now [Ben] has the smallest fully functional NES compatible controller, a feat of engineering that can only end in very, very sore thumbs.

The old NES controller is a very simple device: eight buttons are connected directly to a 4021 shift register. Every time the NES is looking for a change in input, it reads out the data in the shift register and gets the status of all the buttons.

After finding the  smallest footprint 4021 shift register he thought he could solder, [Ben] found some very small SMD push buttons and a very tiny resistor network for the pull ups. The result is tiny, and thanks to the sacrifices of a few NES controller extension cables he found on Amazon, 100% compatible with his old NES.

You can grab all the schematics over on [Ben]‘s git. Tip ‘o the hat to [Troy] for sending this one in.

NES controller cannibalized for MP3 player enclosure

We know some folks are very upset by the scrapping on vintage hardware, so let’s all observe a moment of silence for this NES controller.

Now that that’s behind us we can live vicariously through [Burger King Diamond's] project. He polished up the NES controller and repurposed it as an enclosure for a portable MP3 player.

His first step was to remove some of the yellowing of the plastic using Retr0brite. He admits it wasn’t bad to start with but now it’s sparkling like new. Next, he started planning how everything would fit in the case. Luckily the MP3 player operates with one AAA battery which leaves plenty of room.

Just above the A and B buttons you can make out an opening that he cut in the case for the MP3 player’s LCD screen. The bezel from the original case works well for cleaning the rough cut opening. The buttons on the controller have been patched into the controls on the MP3 board, and the opening for the controller’s cable now holds the headphone jack. There’s also a USB port mounted next to it for easy file transfers.

The one thing we would like to see is a rechargeable battery so you don’t need to open the case to top off the power. But all in all this is a fantastic build!

Handy board plays music with an NES controller

[Alex Busman] has been working with an old microcontroller board called the Handy Board. Recently, he figured out how to interface an NES controller to play music. With 8 buttons on an NES controller, [Alex] has control over an entire musical scale, so he demonstrates this in his video by covering the Dr. Mario Theme.

The Handy Board is a microcontroller board originally designed in 1995 for LEGO robots. With a 68HC11 μC running at 2MHz and 32KB of RAM, the Handy Board has been superseded by the LEGO Mindstorms NTX NXT, the Handy Board is thankfully still being supported, and is still a great platform to learn embedded design.

It’s great to see a build on relatively obsolete hardware, especially considering this would be a trivial build with an Arduino. We think it’s great [Alex] is learning the ins and outs of ‘difficult’ hardware – it’s a great way to learn something. Check out the walk though of [Alex]‘s build after the break.

[Read more...]

NES controller connectors for sale

If you weren’t looking forward to trying to find a NES Four Score just to rip connectors out of it or were reluctant to cut the ends off your NES controllers and use different connectors for your NES hack, you’re in luck. Parallax has released an NES controller connector (7-pin, male) that is compatible with the Nintendo controller. They also provide the socket pinout. It’s interesting to see a product like this come out so long after the original console, a testament to the popularity.

[via Make]

iPod NES controller

[F00 f00] sent in his excellent piece of iPod artistry. It’s one of the most original iPod hacks I’ve seen yet. (Aside from his funky dock) I haven’t checked up on the latest iPod dock specification, but I’d guess he’s sending the command signals via the serial (TTL) interface with a microcontroller(pic/atmel etc) to encode the button presses.

Follow

Get every new post delivered to your Inbox.

Join 91,428 other followers