commit - 188a4b42e70bce44d0e2caf07da2462c0bc40d20
commit + 830b524dd8e1b18caf0e5e3237a6b04e8a5be715
blob - afab9ce677416cc1b6b310459f62d5967d24d897
blob + 229bc8bfa94c4c29a2ab62e2404f861703ad7a4b
--- src/chip8.rs
+++ src/chip8.rs
// CLS
0x0E0 => {
self.video_driver.clear();
+ self.pc += 2;
},
// RET
0x0EE => {
},
// CALL
0x2 => {
- self.stack.push(self.pc + 1);
+ self.stack.push(self.pc + 2);
self.pc = nnn;
},
// SE
// skip next instruction if Vx == byte
if self.regs[reg as usize] == byte {
- self.pc = self.pc + 2;
+ self.pc = self.pc + 4;
}
},
_ => {
let ins: u16 = (hi << 8) | lo;
self.execute(ins)?;
- self.pc = self.pc + 2;
Ok(())
}