Help My c64 caught on fire

https://news.ycombinator.com/rss Hits: 16
Summary

I flew back to Italy for the Christmas holidays, as I usually do. Here I have my childhood c64, the computer on which I learend how to program, and which in the last few years I took to refurbishing. In general, everytime I'm back to my parent's place I spend some time fixing and sorting out things, and this is one of them. Now it works like a charm, and of course I also added some bells and whistles, mostly stuff that allows me to easily tranfer programs from a PC (namely, a kung-fu cart and a pi1541) - so this year I thought it was the time to actually do something with it. So I decided to turn it into a cozy fireplace. I was quite surprised that it worked, that I managed to complete this project in a few hours over two days, and that it was, most of all, fun! I expected... more friction, having to work with arcane cross-platform toolchains and the like, but instead I completed almost of all it in a web-based IDE/emulator combo! Moreover, I am far from being an expert when it comes to c64 coding. Yes, I used to program with one... when I was six or seven! And yes, I do follow its demoscene, and over the years I've read quite a bit about its chips and inner workings, but I've never written any demo effect for it. In other words... if I managed, you can too! That's what made me want to write this post. All you need for Christmas... ...is a 6502. Here, I'll give you a crash course on the c64 - the key points of what I knew before starting this. If you know how modern CPUs work, and how to optimize for them - try to forget all of that. The 64 comes from an era where RAM was faster than compute! Lookup tables are your friend, as it is fully unrolling loops / code generation. We have no caches! Don't be surprised then to learn that the famous 6502 CPU has only one arithmetic register, the accumulator. There are two "index" registers used to offset memory locations, a status register, and a program counter - which is also the only 16-bit register, all the others are 8-bi...

First seen: 2025-12-23 20:42

Last seen: 2025-12-24 12:44