Skip to content

Commit

Permalink
Add comment about implementing SChip's quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
leonmavr committed Aug 12, 2024
1 parent c008d6c commit 0e27f90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/chip8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ void Chip8::Exec(const opcode_t& opc) {
static std::mt19937 seed(std::random_device{}());
static std::uniform_int_distribution<uint8_t> rng(0, 255);

// NOTES: The implementation below follows Erik Bryntse's instructions.
// (http://devernay.free.fr/hacks/chip8/schip.txt). It does implement
// SCHIP-1.x's quirks #5, #6, #11 described here:
// https://chip8.gulrak.net
// Without them, I found out that several ROMs were crashing.
#define EXEC_INSTRUCTION \
/* assembly, condition, instruction(s) */ \
X("CLS" , prefix == 0x0 && nnn == 0x0e0 , Cls();) \
Expand Down

0 comments on commit 0e27f90

Please sign in to comment.