Simulating The Commodore PET

A view of the schematics for each major component.

Over on his blog our hacker [cpt_tom] shows us how to simulate the hardware for a Commodore PET. Two of them in fact, one with static RAM and the other with dynamic RAM.

This project is serious business. The simulation environment used is Digital. Digital is a digital logic designer and circuit simulator designed for educational purposes. It’s a Java program that runs under the JVM. It deals in .dig files which are XML files that represent the details of the simulated hardware components. You don’t need to write the XML files by hand, there is a GUI for that.

This digital simulation from [cpt_tom] is based on the original schematics. To run [cpt_tom]’s code you first need to clone his GitHub repository: https://github.com/innot/PET-Digital-Simulation. You will need to install Digtial and configure it with the PETComponentsDigitalPlugin.jar Java library that ships with [cpt_tom]’s code (the details are in the blog post linked above).

What’s not in the documentation is that you will need to update the paths to the binaries for the ROMs. This means searching in the .dig XML files for “C:\Users\thoma\Documents\Projects\PET-Digital-Simulation” and replacing that path to whichever path actually contains your ROM binaries (they will be in the code from GitHub and have the same directory structure). This simulation is complete and the hardware components defined can actually run the binaries in the emulated ROMs.

It is immensely satisfying after you’ve got everything running to enter at the keyboard:

10 PRINT "HELLO, WORLD"
RUN

To be greeted with:

HELLO, WORLD
READY.

This is what technology is all about! :)

If you do go through the process of downloading this code and loading it in the Digital simulator you will be presented with a complete schematic comprised of the following components: CPU, IEEE-488 Interface, Cassette and Keyboard, ROMS, RAMS, Master Clock, Display Logic, and Display RAMs. All the bits you need for a complete and functional computer!

If you’re interested in the Commodore PET you might also like to check out A Tricky Commodore PET Repair And A Lesson About Assumptions.

Thanks to [Thomas Holland] for writing in to let us know about this one.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.