An Emulated Commodore 64 Operating System For The Raspberry Pi
It's no secret that Commodore users love their old machines with the Commodore C64 being chief among them with 27 Million units sold worldwide. Speaking as a former Commodore Business Machines (CBM) engineer the real surprise for us is the ongoing interest and devotion to an era typified by lumbering 8 bit machines and a color palette consisting of 16 colors. Come to think about it, that's the description of Minecraft!
Jump forward to today and it's a generation later. We find that the number of working units is diminishing as age and the laws of entropy and physics take their toll.
Enter the Commodore Pi, an emulated Commodore 64 operating system for the Raspberry Pi. The goals of the project include an HDMI and composite compatible video output, SID based sound, Sprites and other notable Commodore features. They also plan to have hooks for more modern technology to include Ethernet, GPIO and expansion RAM.
A video demo of the emulator can be found below. If you're just warming up to the Commodore world, you'll definitely want to know the real story behind the C128.
Thanks to [Terry Fisher], head of PCB development at Commodore Business Machines for the lead.
Posted in Raspberry PiTagged c64, commodore, commodore 64, emulator
← Turning An Analog Scope Into A Logic Analyzer
Resetting DRM On 3D Printer Filament →
39 thoughts on "An Emulated Commodore 64 Operating System For The Raspberry Pi"
Frank Buss says:
Nice, but why is it so slow? I've tried Raspberry Pi with VICE once and it runs in native C64 speed. I don't know if it is a good idea to use a discontinued emulator, at least http://zimmers.net/anonftp/pub/cbm/crossplatform/emulators/cb64/index.html says so.
ldm r0!, {r1-r10} says:
I'd *suspect* that it currently uses naive implementations of software blitting (memory copying) to display video, and thus this is taking up most of the CPU time. Possibly they are also updating way more of the screen than they really need to as well.
It seems this is a very early version, give them time and they'll likely sort out their performance issues :)
lis0r says:
The C64 is the least suitable choice for such an environment! There's no useful abstraction! None of the custom firmware had any support, so you had to poke/sys low level numbers to use them. The hardware on the Pi is way too complex for that to be realistic. On top of that, access to I/O was baroque to say the least, given the DOS ran offboard.
I'd say that basing this on something like the beeb would be much more sensible, but RISCOS is already available for the Pi.
Greenaum says:
True, the 8-bit Ataris were as bad. All that lovely hardware, and the only access from BASIC was by looking up the addresses in the manual (if it had them) and POKEing in unexplained values to unexplained locations. What did they fill the BASIC ROM with anyway?
justice099 says:
For me, the biggest reason for my love affair with the Commodore 64 is that it was my first computer. It is what launched me into my career. I was still Commodore only right up until 1994 when Commodore went out of business.
What I would love to see is just a modern commodore 64. No special bells and whistles, just a respin of what it was with modern manufacturing and shrinking processes. For me, that means a hardware SID and and VIC which is what made the C64 special in our eyes.
As far as bells and whistles, maybe modern storage and modern peripherals like keyboards, etc.. Nothing fancy is needed or desired for me. I never used the C64 to get on the internet and really don't need to. I don't need 720p or 16 million colors. I have other machines capable of this. I am happy with what the C64 *is.*
That is what seems to be missing and wanted. Every effort so far has tried to add bells and whistles and failed because that is not the C64 we fell in love with.
foo says:
I think you'd like one of these: https://en.wikipedia.org/wiki/C64_Direct-to-TV
It's a full C64 on a chip, and while it's wrapped in what's effectively a disposable toy, there are pads to connect a PS/2 keyboard and C64 serial bus.
I have several of those, including the Hummer version that I hacked into a handheld. However, they don't have a real SID or VIC which is what I was talking about above. And even the joystick ports are not properly brought out, the user port isn't there, etc…
No, I meant a REAL commodore 64 just respun. Not hardware emulation, not software emulation.
Lwatcdr says:
There was one. It was the C64 Direct to Tv http://en.wikipedia.org/wiki/C64_Direct-to-TV
Single chip and it could be moded to add a keyboard and IO.
Frankly the Pi could be the new C64. You have an SD card for storage and two USBs for a keyboard and a mouse and you can use a TV for a monitor. . Four USB ports would have been better so you could have have one for storage and one more for wifi but you can always use a hub.
So compare the pi to the 64.
Cheap? Yes.
Expandable using an external serial connections? Yes.
Document for programming. The C64 is still ahead of the pi but the pi is not terrible unless you want to write drivers.
Powerful enough to be useful? Yes. You could write papers on the pi and surf the web.
Hackable? Yes.
If their was just games to support the pi and if it was widely available in a still cheap but slightly more end user friendly package in a case and a pretty box ready to use it could be this generations C64.
pidge says:
How about teh Turbo Chamleon 64? http://www.syntiac.com/chameleon.html. C64 in a FPGA and that also use a realy C64 for the real hardware and keyboard. Faster that the SuperCPU-64, too.
Galane says:
The German demo group FarbRausch (literal translation "color rush") did a 64K demo that's a Commodore 64 emulator, and includes a C64 demo program that can be loaded. A 64K demo that runs a demo. 'Tis no wonder it was a top placer at Breakpoint 2006.
fr-051: brotkaestchen http://www.pouet.net/prod.php?which=24547
Despite what any AV software claims, none of farbrausch's demos are any sort of malware. What's real disappointing is that none of the AV companies will study those demos to reduce the number of false positives their software reports. I keep having to specifically exclude those demos and rescue them from the AV software's bit bucket..
Dave Haynie says:
Folks are emulating a C64 to have access to a C64… sure, there are better ways to go if your goal is understand the some of the workings of the Raspberry Pi.
But as @lis0r points out, even the Raspberry Pi , very simple and basic by modern computer standards, has complex hardware.
The allure of the C64 and other vintage machines to their fans is often that lost simplicity. A single person really can learn just about everything there is to know about the C64. There are guys out there who know every peek and poke, who read 6502 machine language in hex, and really aren't looking for more than that.
It's not always obvious if you weren't around in computing in the 8-bit days, but for much of that era, you didn't buy a computer to, say, do your taxes or edit photos or support some other hobby. Ratger, you bought that computer AS your hobby. This started to change on the C64, the first computing platform to have so many applications. But not for everyone. And most users today are in that group: the C64 is the hobby.
"This started to change on the C64, the first computing platform to have so many applications."
I would say that started with the Apple II and VisiCalc. By the time the C64 came out you already had WordStar on CP/M and VisiCalc on the Apple II so applications became common. The Commodore 64 changed everything because it was affordable. The C64 became the computer of the masses. The Atari 400/800 the Coco, the TI99/4a, the Apple II, and the Commodore 64 where all great machines for people to learn about computers.
Exactly. Here is somebody that "gets it."
Dave doesn't just get it, he's one of the the guys that made it!
Indeed. :)
Bil Herd says:
I am definitely from the group that stops once the Blue Screen comes up welcoming me; I like to take a moment and bask in it's blueness. Like an old friend it assures me that the correct number of bytes is available (trust me, sometimes it used to come up with the wrong number) and you can also get a sense of the C64's health by how bad it "sparkles"
Very little sparkle in the Pi version.
LABandit says:
Wow! Bil Herd! I just have to say thanks for your work . I was about 7 when I started asking my parents for a computer. It didn't happen until my dad watched Wargames. Then he brought home a beautiful, tan and brown c64. Later on, my friend down the street had a hard time explaining to me why his dad's much more expensive IBM was so much better than my "stupid little toy computer." I would just say "colors?" "sound?" "Peripherals?" Eventually, they bought a new graphics board and upgraded that machine to cga. I was watching excitedly when they turned it on. But then: "4 colors? That's it?! 4?! Ha!"
These days I tinker with things via emulator occasionally, but I'd love to have a real c64 around. Got my own kids who could learn a lot on that brown keyboard. It is definitely a nostalgia thing for me!
Lol… first time I saw War Games was on a very long flight from Tokyo to New York, I was so very very bored that I think I actually cackled when I realized that they were playing a sorta-cool movie. Come to think about it, I had headphones on and may have cackled extra loud…. hey anything to get more room in the row.
Thanks for the kind words. Also the guy who showed me this link headed up the PCB layout on a whole bunch of computers post C64 era,.
… And Dave Haynie above was also part of the team.
Bill, Im honored at your response. Im the author of this project. It certainly has gotten some unexpected but welcome exposure. If anything it shows the resiliency of the famed C64 (and your own work), as well as the flexibility of the Pi. Love it when old and new tech come together, and im having a great time working on this project. Anyway, thank you for all you have done for the community!
Michael Haworth says:
OK, so the C64 was my first love – I had my first one when I was 6 and have never loved or learned a computer better than my C64. My love came from the following:
1) my C64, cartridges, and joysticks all fit in my backpack and could go to a friends house so that I could play games with them.
2) I knew basic before I was in third grade and was working on mastering LOGO and Simon's Basic before my grade school tech teacher even knew what the acronym meant – I was the smartest kid in grade school and had no regrets that I wasn't invited to swap baseball cards with the cool kids.
3) This was before any Google, Gopher, or any other search engines – I had to LEARN everything that I typed in. I could lay down a few hundred lines of basic and have that little computer doing all sorts of magic tricks!
My Father-in-Law still has a working C64 in his basement that has been modified slightly to run packet relay traffic over shortwave – I love to get on it and bang around still (40 column CRT display and all). I have built much better rigs over the years, but the C64 is my first and best love – no way around it. If my new fling (RPi) could be dedicated to C64 emulation – seriously, I would show up at one of my old friends house and ask him if he wanted another go at Raid on Bungeling Bay or The Last Ninja…
Yeah, my friend might think I have a wire loose somewhere, but it would be fun to be 16 again for a few hours.
I used to see more Vic20's on the radio gear as the VIC20 is a little quieter than the C64 as far as RF emissions. I believe that this was mostly due to the fact that the processor and graphics chips weren't battling it out for control of the address/data bus on almost every single cycle.
Willie... says:
I remember finding a Morse code decoding program for the VIC20! It was well under 1K bytes, but it was amazing! It adapted to speed variations, which made it ideal for decoding hand-sent CW! It worked with the SHIFT key! I rigged up some op amps as an audio bandpass filter, a transistor, and a small relay to close contacts across the easily-accessible shift-lock connections of the VIC keyboard, and had that thing decoding CW signals like crazy! Fast, slow, didn't matter! :) It turned the beeps into letters on the screen!
You've got Bill writing regular pieces for Hackaday? I love you guys!!! Reading Bill's articles is almost as good as going through old Transactor issues.
Brian Benchoff says:
Yep. Bil's an official Hackaday-er now. He's got some crazy, crazy stuff coming, too.
The Frodo emmulator on a Wii runs quite well. I got chills when I heard the intro tune for Jumpman after more than 20 years. My son even got into it for a day or two, before getting distracted by Pokemon Black and Minecraft. :-)
Backwoods Engineer says:
Bil Herd — Wow, it's great that you're posting on HaD. I'm a fan of your work. I was a fan when I first got hold of a Commodore 128 when I was a teenager, but I didn't know your name until I read "The Rise and Fall of Commodore". That dual-boot hack in the C128 was awesome. Thanks for helping me become an engineer.
It would have been different to have had social media back in the days when we were doing this stuff. Our only exposure to the public was at a CES show when we would make sure we all showered and otherwise groomed. Add to that some users groups and chat sessions (2400 baud) but that was about it. Come to think about it, had someone tweeted about what was being worked on they probably would have been shown the door.
Dan Fabrizio says:
I still have a C64 with the monitor and disk drive and bunch of games and apps. When I hear anything Commodore related in the news, many great memories come flooding back. It was my first engineering position after college and will always be my favorite.
Dan Fabrizio
Mr.Handyman says:
I still have vice on the RPi running since last year working very well,but buggy with most speedcoded sources and with emulated SID. whats with your System ist it working 100% with i.e. CREST Demos?
trishaxuk says:
Omg – so cool to read this thread. I was taught binary, m/c, assembler, sprite design and general hacking of code by a friend when I was about 8 or 9. The C64 was both my first physical touch to a thing which controlled the pictures on a television, and it gave me the grounding and interest to forge what is my career now.
An absolute honour to even write on the same thread as you Bill. Much rispek :)
Moser Labs says:
* have to agree 105% with this. C64 was my 8 year old intro into computing. That blue screen in all it's glory… learning to program while my friends were out playing football… Intro to life as a nerd…
Bil thanks for all you've contributed to the computing world!
Wow! FINALLY… I have tried to find some ACTIVE C= 64 stuff on these Interwebs for a while, now! ;) I had some links, but they are now dead. I'm glad I came across this! See my WEBsite to see some of the cool stuff I have done with my C64 gear! (I still have *SEVERAL*) Did I *LOVE* this machine? OH YES! :) It will ALWAYS have a special place in my heart! My first ever computer was a VIC20, but not too long after, I saved up and got a C= 64! Oh my word… the stuff I did!! :) I made a hardware interface to control a light show for a friends parties. It was a huge hit! (Used a little bit of ML along with BASIC!) I even hacked and enhanced a "BASIC Extension" that was in COMPUTE!'s Gazette, from 4 commands to dozens. :) I even used a C128d in the broadcast radio station I worked in for 20 years! It served us for about 2 years, with all custom code and interfacing! FUN STUFF!!! :D
You can read more on my WEBsite. :)
I just noticed that my name hides the link to my WEBsite, so here it is in a more visible format:
http://www.mymorninglight.org/C64
Mark Wolfe says:
With the new RPi3B coupled with the even newer digital audio add on board that handles hi def audio in and out of the Pi, has anyone considered making a Pi based SID player?
I was thinking that the dual SID breadboards available over the years we've all used to upgrade our C64s could be co-opted to work on a Pi based add-on that could work in conjunction with the C64 emulator to make use of dual SID chips to create an inexpensive SID player with the added benefit of the existing MIDI capabilities of the Pi… the new HD Audio board, while otptional, would give you a cool little toy that shouldn't cost more than about $45 in addition to your current Pi setup running the emulator.
I wish I knew how to solder and code, or I would take a stab at it myself.
Michael G. Hazelett says:
Sir, I need a schedmadic or drawing of placeing the raspberry pi inside a commondore 64 and setting all up for packet.
bleughbleugh says:
Boo, their website is down, anyone know where it's gone to?
Base20 says:
https://github.com/xlar54/Commodore-Pi
I was looking around for them, they seem to have retreated to GitHub
Scott Hutter says:
Guys, this project has been superceded by BMC64: https://github.com/randyrossi/bmc64 . He has taken the VICE emulation code and made it baremetal like my project. Speed is much better, and is very usable.