NPU who? Nah, I'll do my AI image generation on a Commodore 64 thanks very much

AI image generation is all the rage, and you could be forgiven for thinking with all this talk of AI PCs, NPUs and Nvidia H100s that it's only ultra-modern hardware that's up to the task. Turns out, however, that even the elderly Commodore 64 can get in on the action, thanks to some algorithm wrangling and a good dose of old-fashioned ingenuity.

Hackaday user Nick Bild has put together a project detailing how the now 42-year-old machine was made to perform a task traditionally thought of as very hardware intensive, through the adaptation of a probabilistic PCA algorithm, which was then used to produce 8x8 retro game sprites. 

An initial model was built using modified Python code, before being trained on around 100 sprites created with the use of a custom spreadsheet on a modern PC. The parameter values produced were then plugged into a script using simplified logic to run the generative and randomised parts of the algorithm, which, thanks to that simplification, could then be converted into BASIC code to run on the Commodore 64.

That code, once run on the aged machine, created unique 8x8 images that were then expanded to 64x64 (4K eat your heart out) which were then displayed as an output on the screen. Nick says that it took around 20 minutes to create 94 iterations, which given the processing power here—a 1.023MHz CPU with 64KB of RAM— is really quite a speedy result.

Ok, so the output might be more than a little simplistic by modern, Stable Diffusion-based AI image generation standards, and a lot of the hard work was performed on a modern machine, but the fact the little Commodore 64 was capable of being part of the process at all is impressive.

My favourite part of the whole project is the listing of the bill of materials at the bottom of the page, which equates to, err, one Commodore 64 and nothing else. The sprites themselves are charming too, with models that look like they could have been taken straight from an actual retro game.

While I doubt Meta or OpenAI will be investing heavily in truckloads of relatively ancient computing power anytime soon, as they have with Nvidia's H100 GPUs, this is a charming project and a great example of older hardware brought into the modern day through some creative thinking.

The real question here is: does this make the Commodore 64 an AI PC? Well, while it doesn't fit the Microsoft definition—given its lack of an NPU with a minimum of 45 TOPS of processing power—it does have a keyboard that's ripe for the addition of a handy Copilot sticker.

It might not be the real thing, but given the achievement here I think this little machine deserves one regardless, or at the very least, a gold star for its excellent work. 

Best gaming PCBest gaming laptop


Best gaming PC: The top pre-built machines.
Best gaming laptop: Great devices for mobile gaming.

TOPICS
Andy Edser
Hardware Writer

Andy built his first gaming PC at the tender age of 12, when IDE cables were a thing and high resolution wasn't. After spending over 15 years in the production industry overseeing a variety of live and recorded projects, he started writing his own PC hardware blog in the hope that people might send him things. And they did! Now working as a hardware writer for PC Gamer, Andy's been jumping around the world attending product launches and trade shows, all the while reviewing every bit of PC hardware he can get his hands on. You name it, if it's interesting hardware he'll write words about it, with opinions and everything.