Skip to content

Repository files navigation

Commodore 64 emulator written in Go

A functional (albeit not feature complete) Commodore64 emulator, running in your terminal. This software comes as-is, and it's not meant to be production-ready. Use it at your own risk!

Requirements

For the emulator, all you need is a properly set up Go installation. To run the debug client, you'll have to install Angular6+, then install the dependencies via npm.

How to build the emulator

Run make build in the root directory.

How to run the emulator

Run make run to fire up the emulator with the official C64 BASIC rom, with logs disabled.

Loading & running binaries

By default, the emulator will load the official C64 BASIC ROM. If you'd like to specify a custom binary, you can use the --prg-path flag (see makefile for examples).

Running unit tests

Run make test in the root directory

Running built-in profiler

The emulator is running the built-it go profiler by default.

  • You can access it by opening a browser and navigating to http://<hostname>:8888/debug/pprof.
  • It's also possible to generate a flame diagram with the hotspots by running docker run uber/go-torch -u http://<host_ip>:8888/debug/pprof -p -t=30 > torch.svg

Using the internal debug server

  1. Start the emulator with the -debug=true flag, or run make debug
  2. Start the Angular application by running make debug-client

Misc

For debugging, you can load and run a complete 6502 instruction set test suite by running make debug-test-suite. Or alternatively, try one of the compiled PRGs from the _resources/prg folder (see Makefile for details).

References & thanks

I'd like to list a few references that I used to learn more about C64, Assembly, etc. They're all invaluable, and were massive help during development.

Special thanks to Balazs Molnar for providing the initial test assembly apps & references!

Releases

Packages

Used by

Contributors

Languages