Skip to content

thecristidima/chip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP 8 Emulator

This is a CHIP 8 emulator written in Rust. The aim of the project is to write more Rust code and to get into writing emulators (end goal: play Pokemon LeafGreen on my emulated GBA).

Implementation is based on Cowgod's documentation and other CHIP 8 emulators found online.

How to run

You will need to have the Rust toolchain installed. To run the emulator simply run:

cargo run -- $path_to_rom

Implementation goals

DISCLAIMER: I will probably not implement all of these, but I can still hope, right?

  • Unit test operations (shouldn't be too hard, just tedious) Test ROMs + unit tests for PC incrementation
  • Add sound support
  • Find a way to save state (and resume from it later on)
  • Customisable user settings (e.g. custom colour schemes)

Last couple of points are pretty easy to implement, but CHIP8 games are too short and I'm too lazy to refactor this. Will try to implement them in a GameBoy emulator (some day).

Issues I encountered during development

This section is meant to document issues I ran into while writing the emulator. I doubt anyone else will read this, but I'm sure it'll help me when I make the same mistake later on when working on other projects.

  • Debugging is a mess, need to work out some way of dumping out data in a readable format
  • Could not get screen to render correctly with SDL2 until I checked user input; Didn't bother to read the documentation (of course), but I still think this should've worked.
  • I kept incrementing the PC even after a jump; test ROMs didn't help with this, I had to dump registers and compare them with other emulators. Luckily, one of the ROMs had a jump instruction at the beginning.

About

Simple CHIP 8 emulator written in C# (previously Rust).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages