kpy3 / chip8-emulator

Chip-8 emulator written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chip8 Emulator

This is another Chip8 realisation written on Rust for education purposes (in both creating simple virtual machines and rust). It uses pixels for video, which I found ideally suitable for this project.

Build

This project requires stable rust installed, to build use

$ cargo build

Run

To run emulator use

$ cargo run -- <path to ROM file>

Play

Use following control keys for play:

Chip-8 Keypad              Keyboard
  +-+-+-+-+                +-+-+-+-+
  |1|2|3|C|                |1|2|3|4|
  +-+-+-+-+                +-+-+-+-+
  |4|5|6|D|                |Q|W|E|R|
  +-+-+-+-+       =>       +-+-+-+-+
  |7|8|9|E|                |A|S|D|F|
  +-+-+-+-+                +-+-+-+-+
  |A|0|B|F|                |Z|X|C|V|
  +-+-+-+-+                +-+-+-+-+

One can download Chip8 ROMs pack here.

Test

This realisation tested against two test ROMs:

  1. Chip8 test ROM
  2. BC_Test (explanation)

NOTE: There is at last one not documented error code in BC_Test with code E 34, in my case it pointed to wrong implementation of Fx55 and/or Fx65 operation codes.

TODO

  • Fix some minor bugs
  • Add audio
  • Add tests for Chip-8
  • Cleanup code

Useful Resources

About

Chip-8 emulator written in Rust

License:Apache License 2.0


Languages

Language:Rust 100.0%