Generative AI Hits The Commodore 64

Image-generating AIs are typically trained on huge arrays of GPUs and require great wads of processing power to run. Meanwhile, [Nick Bild] has managed to get something similar running on a Commodore 64. (via Tom’s Hardware).

A figure generated by [Nick]’s C64. We shall name him… “Sword Guy”!
As you might imagine, [Nick’s] AI image generator isn’t churning out 4K cyberpunk stills dripping in neon. Instead, he aimed at a smaller target, more befitting the Commodore 64 itself. His image generator creates 8×8 game sprites instead.

[Nick’s] model was trained on 100 retro-inspired sprites that he created himself. He did the training phase on a modern computer, so that the Commodore 64 didn’t have to sweat this difficult task on its feeble 6502 CPU. However, it’s more than capable of generating sprites using the model, thanks to some BASIC code that runs off of the training data. Right now, it takes the C64 about 20 minutes to run through 94 iterations to generate a decent sprite.

8×8 sprites are generally simple enough that you don’t need to be an artist to create them. Nonetheless, [Nick] has shown that modern machine learning techniques can be run on slow archaic hardware, even if there is limited utility in doing so. Video after the break.

Continue reading “Generative AI Hits The Commodore 64”

Emulate A KIM-1 With A Commodore 64

When you think about virtualization, you usually think about making some CPU pretend to be another CPU. However, there are sometimes advantages to making a computer pretend to be the same computer.

That’s the case with [oldvcr]’s KIMplement, which emulates a KIM-1 with a 6502 using a Commodore 64, which also uses a 6502.The reason this makes sense is that you have total control over an emulated CPU. If a program, for example, writes to a critical memory location or tries to take over the screen or keyboard, you can easily make the emulator do something more appropriate. Things like breakpoints and single stepping also become trivial.

The virtual machine at the heart of it is 6o6 (6502 on 6502), and it seems to perform well. By virtualizing, you can easily protect the system from programs that try to, for example, take over an interrupt vector. This is similar to how x86 protected mode can run old real-mode code in a virtual environment and intervene for certain instructions. The emulation is good enough that the emulator can run the emulator, which then runs the emulator to actually run the real target. That’s wasteful, of course, but it does speak to the completeness of the pretend CPU.

If you want a KIM-1 (and an 1802 Elf) but only have an Arduino, you can emulate a different way. At least an emulated KIM-1 doesn’t develop bad memory chips.

You Can Use Visual Studio Code To Write Commodore 64 Assembly

Once upon a time, you might have developed for the Commodore 64 using the very machine itself. You’d use the chunky old keyboard, a tape drive, or the 1541 disk drive if you wanted to work faster. These days, though, we have more modern tools that provide a much more comfortable working environment. [My Developer Thoughts] has shared a guide on how to develop for the Commodore 64 using Visual Studio Code on Windows 11.

The video starts right at the beginning from a fresh Windows install, assuming you’ve got no dev tools to start with. It steps through installing git, Java, Kick Assembler, and Visual Studio Code. Beyond that, it even explains how to use these tools in partnership with VICE – the Versatile Commodore Emulator. That’s a key part of the whole shebang—using an emulator on the same machine is a far quicker way to develop than using real Commodore hardware. You can always truck your builds over to an actual C64 when you’ve worked the bugs out!

It’s a great primer for anyone who is new to C64 development and doesn’t know where to start. Plus, we love the idea of bringing modern version control and programming techniques to this ancient platform. Video after the break.

Continue reading “You Can Use Visual Studio Code To Write Commodore 64 Assembly”

Nearly-Destroyed Commodore Gets New Life

We all have our shiny, modern computers for interacting with the modern world, but at times they can seem a little monochromatic. Even the differences between something like macOS and Windows for the average user often boil down to which operating system loads an Internet browser. There are obviously more differences than that, but back in the 80s it was much more extreme with interoperability a pipe dream in most cases. What keeps drawing people to maintaining and using computers from that chaotic era is more tangible compared to modern machines, and that is meant quite literally; computers from this era can be saved from an extreme amount of degradation like this Commodore that was nearly completely destroyed before it was re-discovered.

The first step was to restore the case of this Commodore PC20-III, but the restoration of the computer’s internals took a bit more time. First, the entire board was de-soldered, with any rare chips being set aside for future use. Unfortunately the board itself was too corroded and otherwise damaged to be used, but since these were just two-layer boards it could be photographed and then re-created in CAD software to make a near-perfect duplicate of the original. The team at [The Cave] took the opportunity to add patch wires which would have been present in the original machine into the PCB, and made some other upgrades as well like adding sockets to various chips that would have been originally soldered to the board.

The passive components, especially capacitors, were brand new as well and some period-correct components such as a monitor and keyboard finish out the build. The computer boots on the first try, and is quickly put through its paces testing the hard disk drive, using the old floppy drive, and even playing a few video games from the era. The fact that retrocomputers like these are easy (by modern standards) to reverse engineer and restore surely leads to their continued popularity, and we’ve seen everything from C64s to this 128DCR get a similar full restoration.

Continue reading “Nearly-Destroyed Commodore Gets New Life”

The experimental setup – a Commodore 64 is connected to a monitor through a composite video to HDMI converter, with the code cartridge inserted into the expansion port.

Trolling IBM’s Quantum Processor Advantage With A Commodore 64

The memory map ofthe implementation, as set within the address space of the Commodore 64 - about 15kB of the accessible 64kB RAM is used. 8kB of this is reserved for code, although most of this is unused. Each of the two bitstrings for each Pauli string is stored separately (labeled as Pauli String X/Z) for more efficient addressing.
The memory map of
the implementation, as set within the address space of the Commodore 64 – about 15kB of the accessible 64kB RAM is used.

There’s been a lot of fuss about the ‘quantum advantage’ that would arise from the use of quantum processors and quantum systems in general. Yet in this high-noise, high-uncertainty era of quantum computing it seems fair to say that the advantage part is a bit of a stretch. Most recently an anonymous paper (PDF, starts at page 199) takes IBM’s claims with its 127-bit Eagle quantum processor to its ludicrous conclusion by running the same Trotterized Ising model on the ~1 MHz MOS 6510 processor in a Commodore 64. (Worth noting: this paper was submitted to Sigbovik, the conference of the Association for Computational Heresy.)

We previously covered the same claims by IBM already getting walloped by another group of researchers (Tindall et al., 2024) using a tensor network on a classical computer. The anonymous submitter of the Sigbovik paper based their experiment on a January 2024 research paper by [Tomislav Begušić] and colleagues as published in Science Advances. These researchers also used a classical tensor network to run the IBM experiment many times faster and more accurately, which the anonymous researcher(s) took as the basis for a version that runs on the C64 in a mere 15 kB of RAM, with the code put on an Atmel AT28C256 ROM inside a cartridge which the C64 then ran from.

The same sparse Pauli dynamics algorithm was used as by [Tomislav Begušić] et al., with some limitations due to the limited amount of RAM, implementing it in 6502 assembly. Although the C64 is ~300,000x slower per datapoint than a modern laptop, it does this much more efficiently than the quantum processor, and without the high error rate. Yes, that means that a compute cluster of Commodore 64s can likely outperform a ‘please call us for a quote’ quantum system depending on which linear algebra problem you’re trying to solve. Quantum computers may yet have their application, but this isn’t it, yet.

Thanks to [Stephen Walters] and [Pio] for the tip.

Commodore CHESSmate Replica Runs On The ESP32

The Commodore CHESSmate chess computer might not be terribly well known, but that doesn’t make it any less worthy of being reproduced. If anything it is more important, as it gives more people an opportunity to use one of these devices, yet beyond a purely emulated experience the real user interface is harder to experience.

Internals of the reproduction Commodore ChessMate (Credit: Michael Gardi)

This is where [Michael Gardi]’s modernized replica provides a highly accessible version, consisting of a custom PCB with an ESP32 as the brains of the system. Although decidedly overkill next to the 6502 in the original CHESSmate, it makes the project far easier for others to assemble as it contains few components that shouldn’t be readily available.

The ESP32 is mounted on a small daughterboard which plugs into the main PCB with the buttons, LEDs and indicators. The whole stack is then inserted into the 3D printed reproduction case. These 3D models along with the ESP32 port of the CHESSmate firmware can be found in the GitHub repository, along with a minimalist frame and a ‘CHESSmate Lite’ version as alternative enclosure options for those who somehow don’t appreciate the delightful 1980s aesthetics.

We covered the Commodore CHESSmate last year, including a highly faithful reproduction built by [Hans Otten], which [Michael] read the day after meeting [Peter Jennings], the author of MicroChess (which the CHESSmate uses internally) at an event at York University. Taking this as a sign, he set to work on this particular project.

We’re not sure if there’s really a cosmic force directing [Michael] towards his next project, but if there is, we’d like to take this opportunity to thank it for doing a fantastic job so far.

Making The Commodore SX-64 Mini

When you find a portable TV from the 1980s, and it reminds you of the portable Commodore 64, there’s only one thing to be done. [Aaron Newcomb] brings us the story of taking an Emerson PC-6 and mating it to the guts of his THEC64 Mini. It’s a bit of a journey, as the process includes modding the TV to include a composite input and trimming some unused PCB off the TV’s mainboard. Then some USB ports and a three-and-a-half inch floppy drive were shoehorned into the chassis, with the rear battery compartment holding the parts from THEC64 Mini.

The build was not entirely without issue. It turns out the degaussing coil connector can plug perfectly into the service port, and Murphy’s law proved itself true again. But no harm was done, and the error was quickly discovered. All that was left was to button the chassis back up and add some paint and 3d-printed trim details. The build looks great! Come back after the break to watch the video from the [Retro Hack Shack] for yourself.

Continue reading “Making The Commodore SX-64 Mini”