Git Product home page Git Product logo

rust64's Introduction

Build Status

Rust64 - a C64 emulator written in Rust

This is my attempt to study the Rust programming language and have fun at the same time. The goal is to present in the least obfuscated way how the Commodore 64 works and what's happening behind the scenes once you start a program. Emulation is cycle based and fairly accurate at this point.

The emulator has a built-in visual debugger which lets you view the contents of each memory page in RAM, Color RAM, VIC registers, CIA registers and SID registers. The VIC window is a ICU64-style raster debugger where each pixel represents one VIC cycle and any events occuring at that time.

Major dependencies

Requires Rust 1.58.0 or higher to compile and run.

Youtube demo #1:

Screenshot

Youtube demo #2:

Screenshot

Screenshot:

Screenshot

Build instructions

cargo build
cargo run --release

You can pass a .prg file as a command line parameter to load it into memory once the emulator boots (just type RUN to start the program):

cargo run --release prgs/colors.prg

To run with double-sized window:

cargo run --release x2 prgs/colors.prg

To run with double-sized window and debug windows enabled:

cargo run --release x2 debugger prgs/colors.prg

C64 and special key mappings

ESC     - Run/Stop
END     - Restore
TAB     - Control
LCTRL   - C=
`       - <-
-       - +
INS     - &
HOME    - CLR/Home
BSPACE  - INST/DEL
[       - @
]       - *
DEL     - ^
;       - :
'       - ;
\       - =
F11     - start asm output to console (very slow!)
F12     - reset C64
RCTRL   - joystick fire button
NUMLOCK - toggle between joystick ports 1 and 2 (default: port 2)

In debugger window:
PGUP/PGDWN - flip currently displayed memory page
HOME/END   - switch currently displayed memory banks between RAM, Color RAM, VIC, CIA and SID

TODO

  • serial bus/disk drives (d64, t64, tap)
  • implement remaining undocumented ops
  • switch from SDL2 to cpal for audio once it supports OSX
  • improve SID emulation

Known Issues

  • missing serial bus may cause some very specific programs to perform incorrectly or get stuck in infinite loops
  • elaborate programs that require very precise timing are not running correctly yet

This is an on-off WIP project, so update frequency may vary.

Resources

The following documents and websites have been used to create this emulator:

Special thanks

rust64's People

Contributors

emoon avatar jackpot51 avatar kondrak avatar sajattack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.