A chip-8 emulator in Rust, using raylib for graphics. For emulation learning purposes.
Based on:
- https://multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/
- https://tobiasvl.github.io/blog/write-a-chip-8-emulator/
$ git clone https://github.com/adoroburrito/crisp-ate
$ cd crip-ate
$ cargo run "<path to chip-8 rom>"
- basics
- memory (8-bit array with 4096 positions)
- registers
- opcode enums
- load program into memory
- emulation
- fetch and decode opcode at program counter
- opcode execution
- Call -> 0NNN (NNN)
- ClearDisplay -> 00E0
- Return -> 00EE
- Jump -> 1NNN (NNN)
- CallSubRoutine -> 2NNN (NNN)
- SkipIfVXEquals -> 3XNN (X, NN)
- SkipIfVXNotEqual -> 4XNN (X, NN)
- SkipIfVXEqualsVY -> 5XY0 (X, Y)
- SetVX -> 6XNN (X, NN)
- AddToVX -> 7XNN (X, NN)
- SetVXToVY -> 8XY0 (X, Y)
- SetVXToVXorVY -> 8XY1 (X, Y)
- SetVXToVXandVY -> 8XY2 (X, Y)
- SetVXToVXxorVY -> 8XY3 (X, Y)
- AddVYtoVX -> 8XY4 (X, Y)
- SubtractVYFromVX -> 8XY5 (X, Y)
- StoreLeastBitOfVXAndShiftVXRight -> 8XY6 (X)
- SetVXToVYMinusVX -> 8XY7 (X, Y)
- StoreMostBitOfVXAndShiftVXLeft -> 8XYE (X)
- SkipIfVXNotEqualVY -> 9XY0 (X, y)
- SetIAddress -> ANNN (NNN)
- JumpToAddress -> BNNN (NNN)
- SetVXToBitwiseANDWithSaltAndRandom -> CXNN (X, NN)
- DrawSpriteAt -> DXYN (X, Y, N)
- SkipIfKeyAtVXIsPressed -> EX9E (X)
- SkipIfKeyAtVXIsNotPressed -> EXA1 (X)
- SetVXToDelayValue -> FX07 (X)
- GetKeyToVX -> FX0A (X)
- SetDelayToVX -> FX15 (X)
- SetSoundToVX -> FX18 (X)
- AddVXToI -> FX1E (X)
- SetIToLocationOfVXChar -> FX29 (X)
- StoreBinaryCodedDecimalVX -> FX33 (X)
- StoreFromV0ToVXStartingFromI -> FX55 (X)
- FillFromV0ToVXStartingFromI -> FX65 (X)
- draw frame (with raylib)
- play sound timer beep (with raylib)
- completeness
- unit tests
- opcode decode
- opcode execution
- test system with test roms
- IBM Logo
- corax89’s chip8-test-rom
- The BonCoder/BestCoder test
- test system with games
- unit tests