C64 Runs On STM32F429 Discovery

There have been various reincarnations of the Commodore C64 over the years, and [Dave Van Wagner] has created one that can run on an STM32F429ZI Discovery development board. These dev boards have been around quite a few years and feature a 2.4 inch color TFT LCD in addition to the typical I/O circuitry, and are a pretty good value — [Dave] says they currently sell for under $30 through distribution.

The project began earlier this year when [Dave] set out to write a command line program in C# that emulated C64 Basic. He had written a 6502 emulator many years earlier, but had not tested it. [Dave] went on a programming binge in March and got it up and running over a very long weekend. He subsequently decided to add support for VIC-20, TED, and PET as well.

Even though [Dave] says C# is a beautiful language, he subsequently ported the program into C (an ugly language?) in order to run on the Discovery board, swapping the command line terminal interface for real LCD video and a USB keyboard. There’s also an Arduino version (terminal interface only). It runs about 15% slower than a real C64, and there are some limitations still like no SID. But overall, this is a great project and a low-cost way to emulate a C64 in an embedded format. If you want to explore further, here is the Mbed project for the STM32F429, and you can find the Arduino and C# versions on his GitHub page. You may remember [Dave] from the C128 video hack we wrote about last year.

Hackaday Podcast 078: Happy B-Day MP3, Eavesdropping On A Mars Probe, Shadowcasting 7-Segments, And A Spicy Commodore 64

Hackaday editors Elliot Williams and Mike Szczys go down the rabbit hole of hacky hacks. A talented group of radio amateurs have been recording and decoding the messages from Tianwen-1, the Mars probe launched by the Chinese National Space Administration on July 23rd. We don’t know exactly how magnets work, but know they do a great job of protecting your plasma cutter. You can’t beat the retro-chic look of a Commodore 64’s menu system, even if it’s tasked with something mundane like running a meat smoker. And take a walk with us down MP3’s memory lane.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (~65 MB)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 078: Happy B-Day MP3, Eavesdropping On A Mars Probe, Shadowcasting 7-Segments, And A Spicy Commodore 64”

Smoking Meat With A Commodore 64

When [Deadline] couldn’t find a replacement control module for his Masterbuilt electric smoker, he could have just tossed the thing in the trash. Instead, he decided to come up with his own system to take over for the smoker’s original brain. Basing it around the nearly 40 year old Commodore 64 probably wouldn’t have been our first choice, but it’s hard to argue with the end result.

Connectors to control the smoker’s hardware.

At the most basic level, controlling an electric smoker like this only requires a temperature sensor, a relay to control the heating element, and something to get those two devices talking to each other. But for the best results you’ll also want some kind of a timer, and an easy way to change the target temperature on the fly. Connecting the relay and temperature sensor up to the back of the C64 was easy enough, all he had to do was write the BASIC code to glue it all together.

This hack was made considerably easier thanks to the fact that the Masterbuilt’s original controller interfaced with the smoker by way of a couple relatively well documented connectors. So instead of having to mess with any of the mains voltage electronics, he simply had to bring a wire in the connector high to fire up the smoker’s heating element. This bodes well for anyone looking to replace the controller in a similar smoker, with a C64 or otherwise.

In the past we’ve seen some very impressive custom smoker controllers that look as though they could easily be adapted for use with these commercial units. Though the true smoke aficionados might prefer building the entire thing to their exacting specifications.

Continue reading “Smoking Meat With A Commodore 64”

Why You (Probably) Won’t Be Building A Replica Amiga Anytime Soon

Early in 2019, it  became apparent that the retro-industrial complex had reached new highs of innovation and productivity. It was now possible to create entirely new Commdore 64s from scratch, thanks to the combined efforts of a series of disparate projects. It seems as if the best selling computer of all time may indeed live forever.

Naturally, this raises questions as to the C64’s proud successor, the Amiga. Due to a variety of reasons, it’s less likely we’ll see scratch-build Amiga 500s popping out of the woodwork anytime soon. Let’s look at what it would take, and maybe, just maybe, in a few years you’ll be firing up Lotus II (or, ideally, Jaguar XJ220: The Game) on your brand new rig running Workbench 1.3. Continue reading “Why You (Probably) Won’t Be Building A Replica Amiga Anytime Soon”

HiFi Audio On The Commodore 64 – 48KHz, Yo!

Prior to the development of CD-quality audio hardware in the mid-1990s, home computers and consoles typically made do with synthesized music. Due to the storage and RAM limitations of the time, there weren’t a whole lot of other practical options. If you’re willing to ignore practicality, however, you can do some wonderful things – such as playing high-quality audio on a Commodore 64!

The project is the work of [Antonio Savona], who set out to play hi-fi audio on a Commodore 64 using only period-correct hardware. That means no 16MB RAM expansions, and no crazy high-capacity carts. The largest carts of the era were just 1MB, as produced by Ocean, and [Antonio] intended to cram in a full 90 seconds of music.

Targeting a sample rate of 48 KHz with 8-bit samples would mean the cartridge could only fit 20 seconds of raw audio into its 1MB of storage. This wasn’t good enough, so the audio would have to be compressed, with the target being a 4:1 ratio to reach the 90 second goal. With the C64’s CPU running at just 1MHz, there are just 21 clock cycles to deal with each sample when playing at 48 KHz.

Obviously, [Antonio] had set quite the challenge, and some masterful assembly coding was used to get the job done. The final result has the audio sounding impressively good, given that it’s being pumped out by a 6502 that is surely sweating to get the job done.

We love a good C64 hack around these parts, and it’s now even possible to build a new one from scratch if that’s your particular itch. Video after the break.

Continue reading “HiFi Audio On The Commodore 64 – 48KHz, Yo!”

Secret C64 Program Found On A Christian Rock Band’s Vinyl Record

How often do you find Easter eggs in old vinyl records?

It sure was a surprise for [Robin Harbron] when he learned about a Commodore 64 program hidden on one of the sides of a record from the 1985 album of Christian rock band Prodigal. The host of the YouTube channel 8-Bit Show and Tell shows the “C-64” etching on one side of the vinyl, which he picked up after finding out online that the record contained the hidden program.

The run-out groove on records is typically an endless groove that keeps the record player from running off the record (unless there is an auto-return feature, which just replays the record). On side one of the vinyl, the run-out groove looks normal, but on side two, it’s a little thicker and contains some hidden audio. Recording the audio onto a cassette and loading it onto a dataset reveals a short C64 program.

The process is a little more troublesome that that, but after a few tries [Harbron] reveals a secret message, courtesy of Albert Einstein and Jesus Christ. It’s not the most impressive program ever written, but it’s pretty cool that programmers 35 years ago were able to fit it into only a few seconds of audio.

Unfortunately, we won’t be hearing much actual music from the album – [Harbron] chose not to play the songs to avoid copyright issues on YouTube.

Continue reading “Secret C64 Program Found On A Christian Rock Band’s Vinyl Record”

This Handheld C64 Design Study Needs To Be Made

The Commodore 64 remains the best selling home computer of all time, and is unlikely to be toppled anytime soon. It continues to inspire a diehard community of makers and hackers to this day. [Cem Tezcan] is one of those people, and his design study of a handheld C64 is utterly droolworthy.

It’s quite likely that you’d run out of power before the cassette finished loading, but hey, we can dream.

The study includes renders of the device from several angles, as well as a basic blueprint outlining the various components. It features period accurate hardware, using a membrane keyboard, micro-cassettes for data storage, and a 3.5″ CRT. Other nice touches are the big red textured FIRE button, and a horrible early 80s 3.5mm jack.

The C64 hardware of the time required both 12 V and 5V power, and the current draw of even a small CRT would be high. It’s likely such a handheld would have battery life measured in minutes. It’s a wonderful picture of what could have been, though we suspect that such a design would have pushed the limits of the technology of the time.

However, electronics has matured since, and we sit here rather comfortably in 2019. We’d love to see the best handheld C64 that the community can muster, and with 3D printers and FPGAs on hand, it’s an eminently achievable feat. Bonus points to anyone who can make a microdatasette interface, too. All submissions to the tips line, and meanwhile, consider how easy it is to build a new C64 from scratch. Happy hacking!