If you want to play old Commodore games, there are C-64 emulators available for just about any platformβ but most of them are so high level, theyβre really meant for just that: playing games. [antirez] has a different goal with his c64-hw-sim projectβ itβs a lower-level emulation that simulates every chip and every connection on an ASSY 250407 motherboard, and all the chips on it, too. Ever wondered what happens when a specific chip is missing, or a random pin is shorted to ground or forced high? You can do all that in software, with no risk of harming antique hardware.
While that might be a fun bit of faffing about for a certain sort electronics sadist, the real utility is to learn about the hardware, both in the abstract and to help you troubleshoot a board you might have. Itβs likely that many given failure modes reproduce the same effectsβ lots of things can knock out the display output, for exampleβbut at least if youβve reproduced a flaw in software you can try testing the hardware to see if thatβs the cause of your problem. Assuming the simulation covers your hardware issue, anyway.
Thereβs cycle-accurate chip emulation for the processor, CIAs, SID and VIC-II via code by [Andre Weissflog], a.k.a. [flooh]. Meanwhile analog circuitry in the video, audio and power sections are not simulated so not everything fault will be replicable here. Still, it might be a neat toolβ just donβt try and run any games on it, because even on high-end modern hardware it only runs at about one-third speed. Thatβs fast enough for diagnostics, but not so much for Maniac Mansion,Β never mindΒ Elite.Β
Speaking ofΒ Elite,Β did you know the sourceβ both of the port and the originalβ is available with comments? If you want an emulator you can play, you can get it on everything from microcontrollers like Teensy to your personal computer.
Thanks to [Salvatore] for the tip!