Permalink
Browse files

Removed increment of register I in opcode 0xF055 and 0xF065.

The original CHIP-8 design incremented I. However, on current implementations I is left unchanged.
Reference: https://en.wikipedia.org/wiki/CHIP-8#cite_note-memi-4
  • Loading branch information...
leemorgan committed Jun 25, 2015
1 parent e9417cd commit 9c9735c095f948967c200c9cf179425520d4fa0f
Showing with 1 addition and 3 deletions.
  1. +1 −3 Chip8/Chip8.c
View
@@ -44,7 +44,7 @@
The Chip8 system has a HEX based keypad (0x0 - 0xF).
Opcode Table
• NNN address
• NNN 12-bit address
• NN 8-bit constant
• N 4-bit constant
• X and Y 4-bit register identifier
@@ -562,15 +562,13 @@ void emulateCycle() {
for (unsigned char r = 0; r <= X; r++) {
memory[I+r] = V[r];
}
I = I + X + 1;
pc += 2;
}
else if (submaskedOpcode == 0x0065) {
unsigned char X = GetX(opcode);
for (unsigned char r = 0; r <= X; r++) {
V[r] = memory[I+r];
}
I = I + X + 1;
pc += 2;
}
else {

1 comment on commit 9c9735c

@coocos

This comment has been minimized.

coocos commented on 9c9735c Oct 18, 2017

I ran into the exact same problem as you and I was slowly going crazy trying to isolate the cause. Thankfully I ran into your blog post. Thanks a lot!

Please sign in to comment.