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!”

Hackaday Links Column Banner

Hackaday Links: December 29, 2019

The retrocomputing crowd will go to great lengths to recreate the computers of yesteryear, and no matter which species of computer is being restored, getting it just right is a badge of honor in the community. The case and keyboard obviously playing a big part in that look, so when a crowdfunding campaign to create new keycaps for the C64 was announced, Commodore fans jumped to fund it. Sadly, more than four years later, the promised keycaps haven’t been delivered. One disappointed backer, Jim Drew, decided he was sick of waiting, so he delved into the world of keycaps injection molding and started his own competing campaign. Jim details his adventures in his Kickstarter Indiegogo campaign, which makes for good reading even if you’re not into Commodore refurbishment. Here’s hoping Jim has better luck than the competition did.

Looking for anonymity in our increasingly surveilled world? You’re not alone, and in fact, we predict facial recognition spoofing products and methods will be a growth industry in the new decade. Aside from the obvious – and often illegal – approach of wearing a mask that blocks most of the features machine learning algorithms use to quantify your face, one now has another option, in the form of a colorful pattern that makes you invisible to the YOLOv2 algorithm. The pattern, which looks like a soft-focus crowd scene rendered in Mardi Gras colors, won’t make the algorithm think you’re someone else, but it will prevent you from being classified as a person. It won’t work with any other AI algorithm, but it’s still an interesting phenomenon.

We saw a great hack come this week about using an RTL-SDR to track down a water leak. Clayton’s water bill suddenly skyrocketed, and he wanted to track down the source. Luckily, his water meter uses the encoder receive-transmit (ERT) protocol on the 900 MHz ISM band to report his usage, so he threw an SDR dongle and rtlamr at the problem. After logging his data, massaging it a bit with some Python code, and graphing water consumption over time, he found that water was being used even when nobody was home. That helped him find the culprit – leaky flap valves in the toilets resulting in a slow drip that ran up the bill. There were probably other ways to attack the problem, but we like this approach just fine.

Are your flex PCBs making you cry? Friend of Hackaday Drew Fustini sent us a tip on teardrop pads to reduce the mechanical stress on traces when the board flexes. The trouble is that KiCad can’t natively create teardrop pads. Thankfully an action plugin makes teardrops a snap. Drew goes into a bit of detail on how the plugin works and shows the results of some test PCBs he made with them. It’s a nice trick to keep in mind for your flexible design work.

Chuck peddle father of 6502

Honoring Chuck Peddle; Father Of The 6502 And The Chips That Went With It

Chuck Peddle, the patriarch of the 6502 microprocessor, died recently. Most people don’t know the effect that he and his team of engineers had on their lives. We often take the world of microprocessor for granted as a commonplace component in computation device, yet there was a time when there were just processors, and they were the size of whole printed circuit boards.

Chuck had the wild idea while working at Motorola that they could shrink the expensive processor board down to an integrated circuit, a chip, and that it would cost much less, tens of dollars instead of ten thousand plus. To hear Chuck talk about it, he got a cease-and-desist letter from the part of Motorola that made their living selling $14,000 processor boards and to knock off all of the noise about a $25 alternative.

In Chuck’s mind this was permission to take his idea, and the engineering team, elsewhere. Chuck and his team started MOS Technologies in the 1970’s in Norristown PA, and re-purposed their work on the Motorola 6800 to become the MOS 6502. Lawsuits followed.

Continue reading “Honoring Chuck Peddle; Father Of The 6502 And The Chips That Went With It”

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!

Hackaday Links Column Banner

Hackaday Links: June 30, 2019

In our continuing series of, ‘point and laugh at this guy’, I present a Kickstarter for the, “World’s First Patented Unhackable Computer Ever”.  It’s also a real web site and there’s even a patent (US 10,061,923, not showing up on Google Patents for some reason), and a real product: you can get an unhackable laptop, and you can get it in either space gray or gold finish. This gets fun when you actually dig into the patent; it appears this guy invented protected memory, with one section of memory dedicated to the OS, and another dedicated to the browser. This is a valid, live patent, by the way.

The 2019 New York Maker Faire is off. Yeah, it says it’s still going to happen on the website, but trust me, it’s off, and you can call the New York Hall of Science to confirm that for yourself. Maker Media died recently, and there will be no more ‘Flagship’ Maker Faires. That doesn’t mean the ‘mini’ and ‘featured’ Maker Faires are dead, though: the ‘Maker Faire’ trademark is simply licensed out to those organizers. In the next few weeks, there is going to be a (mini) Maker Faire in Coeur d’Alene, Idaho, Gilroy, California, Edmonton, Alberta, Kingsport Tennessee, and a big ‘ol one in Detroit. This raises an interesting question: where is the money for the licensing going? I’m sure some Mini Maker Faire organizers are reading this; have your checks been cashed? What is the communication with Maker Media like?

Just because you can, doesn’t mean you should. It’s valuable words of wisdom like that and can apply to many things. Commenting on blog posts, for example. Yes, you can throw sticks at a wasp’s nest, that doesn’t mean you should. Yes, you can 3D print Heely adapters for your shoes, but it doesn’t mean you should. It does look dope, though and you’re automatically a thousand times cooler than everyone else.

The C64 Mini is a pocket-sized Linux device with an HDMI port meant to play C64 games.   There were high hopes when the C64 Mini was announced, but it turned out the keyboard isn’t actually a mini keyboard. Now someone had the good sense to combine one of these ‘smartphone chips running an emulator in a retro case’ products with a full-sized keyboard. The C64 will be around by Christmas, and yeah, it has a full working keyboard.

The Benefits Of Restoring A C64 With A Modern FPGA Board

The Commodore 64 was the highest selling computer of all time, and will likely forever remain that way due to the fragmentation of models in the market ever since. Due to this, it’s hardly surprising that it still has a strong following many years after its heyday. This means that the avid restorer has a wide range of parts and support available at the click of a button. [DusteD] is just one such person who had a busted-up C64 laying around, and decided to make it a project.

[DusteD] wanted to reuse the original case, and decided it should remain a Commodore 64 after an initial attempt at a mini-ITX swap went awry. Desiring a reliable machine, an Ultimate64 FPGA board was selected to replace the original faulty motherboard. This has the benefit of being hardware compatible with the classic C64, while allowing [DusteD] to tinker and program to his heart’s content, without having to worry about blowing up valuable original parts. It also provides several interesting modern features, like HDMI output, USB, and even Ethernet connectivity. This allows one to experiment with the platform without the hassles of all the inherent limitations of 1980s technology.

As a fan of the classic SID sound chip, [DusteD] was also highly interested in the audio output of the Ultimate64. Recordings were made of the emulated output from the FPGA, as well as the sound output from a real SID installed in the board, both through the mixed output and directly from the chip via a SIDTAP. Those interested can download the 800MB of recordings and compare the output; there’s a summary of the differences noted listed on the site as well.

[DusteD] makes a great argument for the benefits of building up a C64 rig in this way. It’s a great way to get started for those eager to explore the world of Commodore’s 8-bit hardware without the hassles and expenses of buying all the real gear. As it stands, the C64 aftermarket is so advanced now, that you can build an entirely new machine from scratch if you so desire. Go forth and enjoy!

That Super Mario Bros. C64 Port Was Too Good For This World

It was foolish to think that the adventure of the Mario Bros. would ever exist outside of the castle walls of the Nintendo Entertainment System. Except for that one time it did. The Hudson Soft company was a close collaborator with Nintendo, and parlayed that favor into being tasked with bringing Super Mario Bros. to platforms beyond the NES. The result of that collaboration would be 1986’s Super Mario Special, a port for the NEC PC-88 line of desktop computers. What ended up on that 5.25″ floppy sounded reminiscent of the Famicom original, but with a grand total of four colors (including black) and not a single scrolling screen in sight; Super Mario Special felt decidedly less than spectacular to play. Those eternally flickering sprites mixed with jarring blank screen transitions would never make it outside of Japan, so for a large swath of the world Mario would remain constrained to a gray plastic cartridge for years to come.

There are no shortage of ways to play Super Mario Bros. these days. Emulation in all of its various official and unofficial forms has taken care of that. Virtually everything with a processor more capable than the NES’s 6502 can play host to the Mushroom Kingdom, however, machines more contemporary with the NES still lacked access to the iconic title.

Enter the 2019 port of Super Mario Bros. for the Commodore 64 by [ZeroPaige]. A culmination of seven years work to port the game onto one of the most prolific computers of the eighties was a clear feat of brilliance and an amazing bit of programming that would have taken 1986 by storm. No pale imitation, this was Mario on the C64. Despite all of the nuance in recreating the jump-and-run model of the original paired with enveloping all eight sound channels of a dual SID chip setup, Nintendo saw fit to stifle the proliferation of this incredible 170 kB of software because they claim it infringes on their copyright.

Continue reading “That Super Mario Bros. C64 Port Was Too Good For This World”