Rust64 - a Commodore 64 emulator


#1

Hi everyone!

I wanted to share a Commodore 64 emulator (first one ever done in Rust?) project I’ve been working on for a while now. It’s quite a ride, especially since I’m learning Rust on the fly but so far I’ve been enjoying it and the progress has been steady. You can find the source code on Github:

At the time of writing this I got the CPU, memory and VIC-II (minus sprites) emulation working, I’m hoping to get a complete emulator done by the end of December so keep your fingers crossed!

Current screenshot (not as exciting as it will be when I get program loading + IO done!):


#2

Here’s a little update on my progress!
The emulator is mostly working now with only the SID chip and graphics sprites missing from the basic features. I’m currently debugging timing problems which causes some demos to break with an additional debugger I made for that purpose. I’ll start cracking on audio once I get rid of the more annoying bugs!

Debugger at work:

And some running intro previews:


#3

Shouldn’t the name Rust64 to something 64bit?


#4

It’s really not a fixed name, so I’ll likely change it to something more “Commodore-ish” later on.


#5

Good idea! Are the demos included?


#6

I’ll include some sample programs once the emulator is done, for now it’s possible to load a prg file from command line. I’m currently rewriting the CPU due to some critical timing bugs, so as of now more advanced programs may not work correctly. SOON though! :slight_smile:


#7

This is so great. You’re going to emulate the 1541 and the serial link too, down to the timing, right? Otherwise, how will the game fastloaders work??? </fanboy>


#8

That’s the ultimate goal!


#9

I’ll bet you’ve already covered these, but just in case:

You might find the visualchips project’s list of unsupported 6502 opcodes useful. They’re based on simulations driven by circuits derived from photographs of the actual die, so they’re pretty trustworthy. Their in-browser 6502 simulator is amazing.


#10

Yep, that’s one of the sites I’m using for reference. It’s still surprising how little official documentation on the hardware there is out there!