Commodore C16 Resurrection with a Raspberry Pi

[lactobacillusprime] had a non-working Commodore C16 and too many Raspberry Pi computers, so he decided to bring the C16 back to life by emulating it on the Pi. At the heart of the project is the Pi, along with a small board that converts the old style Commodore keyboards (and joysticks) to a USB port.

Once you have the keyboard as a USB port, the rest of the project is more or less mechanics and software. [lactobacillusprime] did a nice job of getting everything in the new case, along with all the I/O wires routed through the existing ports. For software, Emulation Station does the job of launching the Commodore emulation on the Pi.

Of course, there’s no reason to limit yourself to just the Commodore emulator. Emulation Station along with the right back end emulators will allow this machine to play games that no real Commodore C16 could.

Of course, we were happiest to see him boot up Commodore 64 BASIC. Perhaps we should complete all those half finished C64 BASIC projects we started back in the 1980’s. In general, we hate to see old computers gutted instead of repaired, but at least this one will continue running its software. If you are upset about seeing a machine gutted,  you can always switch over to our previous coverage of putting Commodore guts in a new box.

Continue reading “Commodore C16 Resurrection with a Raspberry Pi”

Virtual Physical Rehab with Kinect

Web sites have figured out that “gamifying” things increases participation. For example, you’ve probably boosted your postings on a forum just to get a senior contributor badge (that isn’t even really a badge, but a picture of one). Now [Yash Soni] has brought the same idea to physical therapy.

[Yash]’s father had to go through boring physical therapy to treat a slipped disk, and it prompted him into developing KinectoTherapy which aims to make therapy more like a video game. They claim it can be used to help many types of patients ranging from stroke victims to those with cerebral palsy.

Patients can see their onscreen avatar duplicate their motions and can provide audio and visual feedback when the player makes a move correctly or incorrectly. Statistical data is also available to the patient’s health care professionals.

Continue reading “Virtual Physical Rehab with Kinect”

1-Pixel Pacman

I usually see retro-gaming projects using tiny screens with a fair number of pixels (64×64) but what I really like is the look of making every pixel count. With this in mind I built 1-Pixel Pac-Man, the classic coin-op experience but with characters that consist of just one pixel. Playing a throw-back like this wouldn’t be the same without some vintage controls so I picked up an Atari joystick, patched it into a microcontroller, and started coding. Check it out:

Smartmatrix Bundle

This piece of hardware made the project build really easy: the Smartmatrix. [Louis Beaudioin] developed the Smartmatrix and it’s been in the Hackaday Store for a while now. The display module itself is a commodity item that is used in LED billboards. There are shrouded headers on the back of the panels, to the left and right sides, which allow them to be daisy chained. The Smartmatrix PCB plugs into one of these shields, provides a soldering footprint for the Teensy 3.1 which drives the display, and gives you the wiring to connect screw terminals from the PCB to the power terminals on the module. Why the need for beefy power jumpers? At full white the thing can draw about 3.5A — don’t worry there’s a power supply included in the bundle.

Also integral to making this look good is the diffuser panel which is frosted acrylic. The Smartmatrix is designed to be housed in a shadowbox frame; it even includes a frame backer board with a cut-out for the Teensy 3.1 so it can be programmed without opening the thing up. I like looking at the guts so I’m leaving my free floating until I come up with an interesting way to mount everything as one unit.

Programming Pac-Man from the Ground Up

matrix-man-code

If you haven’t looked into it before, the ghost AI and gameplay details for Pac-Man are absolutely brilliant. [Toru Iwatani] did a masterful job with the original, and you should take a look at all of the analysis that has been done over the years. The best collection I could find was the Pac-Man Dossier and I based most of my code on the rules described there.

Basically the ghosts have two modes, chase and scatter. The modes set the enemy targets differently; to points at the four corners of the board in scatter, and to points relative to the player in chase. The relative part is key; only the red enemy actually chases you. Another one of them looks at the red enemy’s distance and angle, and targets the reflection of that vector. Really easy, really clever, and results in enemy behavior that’s believable. It isn’t just the enemy movement, little touches like a speed penalty (1/60 of a second) for each dot the player gobbles up means the enemies can catch up if you continuously eat, but you can escape by taking the path already-eaten.

Library, DMA, and Extra Hardware

The hardware and software running the Smartmatrix made the display portions of the project really simple. First off, the Teensy 3.1 is fast, running at 96MHz in this case. Second, it has Direct Memory Access (DMA) which [Louis] used in the Smartmatrix library. This means that driving the display takes almost no CPU time at all, leaving the rest for your own use. This example of a game is under-utilizing this power… it’s totally capable of full-motion video and calculating amazing visualizations on the fly.

The PCB hosting the Teensy 3.1 breaks out several pins to one side. I’m not sure what I’ll add in the future so I actually used the extra surface-mount IO pins on the bottom of the Teensy to connect the Atari joystick (which is simply a set of switches). The are enough pads for two joysticks so I used pin sockets to interface the Teensy to the PCB so that I can get to it again later.

The kit also includes an IR receiver and remote, and also a microSD card to loading animations (there’s an SD socket on the PCB). The bundle in the Hackaday Store is a kit you solder yourself, but [Louis’] company, Pixelmatix, has a Kickstarter running for fully-assembled versions that come with a black remote and sound-visualization hardware.

Future Improvements

The game is fully working, but there are a few key things that I really want to add. The Teensy 3.1 has a single DAC pin available. I’m fairly certain the original coin-op game had mono audio. It should be possible to reproduce the sound quite accurately with this board. That would really make the project pop.

There are also a bunch of touch-ups that need to happen. I’d like to add an animation when the player is eaten by an enemy, and a countdown before the level restarts. The score, shown in binary on the right column, should be scrolled out in decimal when the game ends, and what’s a coin-op recreation without a high-score screen?

Hackaday Prize Entry: A Pic32 Game Console

The official theme of the 2015 Hackaday Prize is to build something that matters. Solving the challenges facing the world is hard, and retro video games, despite what you read on Hackaday, do not matter.

That doesn’t mean there’s not space for the weird, esoteric builds out there; we have a best product prize that will dump $100k, a six month residency in the Hackaday Design Lab, and contacts with a lot of engineers with expertise in manufacturing. [Alex]’s extremely ow cost game console on a Pic32 is exactly what this prize category is looking for.

[Alex]’s project – XORYA – is based on the Pic32MX170F256, a chip that runs up to 50MHz, has 256kB of flash, and a full 64k of RAM. This is far beyond what the guys at Atari imagined back in the 70s, allowing the XORYA to have some amazing graphics.

Right now most of the build is dedicated to fleshing out the video system, and [Alex] has a great demo: rendering the Mandelbrot set in real time in 16 colors on an NTSC display with a resolution of 160×100. That’s a single-chip game console that’s right up there with the Uzebox, and a great example of the potential of the best product category for this year’s Hackaday Prize.


The 2015 Hackaday Prize is sponsored by:

Rocket Controls Fit for a Kerbal

Kerbal Space Program is a space simulation game. You design spacecraft for a fictional race called Kerbals, then blast those brave Kerbals into space. Sometimes they don’t make it home.

If controlling spacecraft with your WASD keys isn’t immersive enough for you, [marzubus] has created a fully featured KSP control console. It sports a joystick, multiple displays, and an array of buttons and switches for all your flight control needs. The console was built using a modular approach, so different controls can be swapped in and out as needed.

Under the hood, three Arduinos provide the interface between the game and the controls. One Arduino Mega runs HoodLoader2 to provide joystick data over HID. A second Mega uses KSPSerialIO to communicate with the game over a standard COM port interface. Finally, a Due interfaces with the displays, which provide information on the current status of your spacecraft.

All of the parts are housed in an off the shelf enclosure, which has a certain Apollo Mission Control feel to it. All [marzubus] needs now is a white vest with a Kerbal badge on it.

Add Extra Storage to Your PS4 With Retro Flair

[Frank] came up with a clever way to extend the storage of his PS4. He’s managed to store his digital PS4 games inside of storage devices in the shape of classic NES cartridges. It’s a relatively simple hack on the technical side of things, but the result is a fun and interesting way to store your digital games.

He started out by designing his own 3D model of the NES cartridge. He then printed the cartridge on his Ultimaker 3D printer. The final print is a very good quality replica of the old style cartridge. The trick of this build is that each cartridge actually contains a 2.5″ hard drive. [Frank] can store each game on a separate drive, placing each one in a separate cartridge. He then prints his own 80’s style labels for these current generation games. You would have a hard time noticing that these games are not classic NES games at first glance.

Storing the game in cartridge form is one thing, but reading them into the PS4 is another. The trick is to use a SATA connector attached to the PS4’s motherboard. [Frank’s] project page makes it sound like he was able to plug the SATA cable in without opening the PS4, by attaching the connector to a Popsicle stick and then using that to reach in and plug the connector in place. The other end of the SATA cable goes into a custom 3D printed housing that fits the fake NES cartridges. This housing is attached to the side of the PS4 using machine screws.

Now [Frank] can just slide the cartridge of his choice into the slot and the PS4 instantly reads it. In an age where we try to cram more and more bits into smaller and smaller places, this may not be the most practical build. But sometimes hacking isn’t about being practical. Sometimes it’s simply about having fun. This project is a perfect example. Continue reading “Add Extra Storage to Your PS4 With Retro Flair”

Pac-Man Clock Eats Time, Not Pellets

[Bob’s] Pac-Man clock is sure to appeal to the retro geek inside of us all. With a tiny display for the time, it’s clear that this project is more about the art piece than it is about keeping the time. Pac-Man periodically opens and closes his mouth at random intervals. The EL wire adds a nice glowing touch as well.

The project runs off of a Teensy 2.0. It’s a small and inexpensive microcontroller that’s compatible with Arduino. The Teensy uses an external real-time clock module to keep accurate time. It also connects to a seven segment display board via Serial. This kept the wiring simple and made the display easy to mount. The last major component is the servo. It’s just a standard servo, mounted to a customized 3D printed mounting bracket. When the servo rotates in one direction the mouth opens, and visa versa. The frame is also outlined with blue EL wire, giving that classic Pac-Man look a little something extra.

The physical clock itself is made almost entirely from wood. [Bob] is clearly a skilled wood worker as evidenced in the build video below. The Pac-Man and ghosts are all cut on a scroll saw, although [Bob] mentions that he would have 3D printed them if his printer was large enough. Many of the components are hot glued together. The electronics are also hot glued in place. This is often a convenient mounting solution because it’s relatively strong but only semi-permanent.

[Bob] mentions that he can’t have the EL wire and the servo running at the same time. If he tries this, the Teensy ends up “running haywire” after a few minutes. He’s looking for suggestions, so if you have one be sure to leave a comment. Continue reading “Pac-Man Clock Eats Time, Not Pellets”