summaryrefslogtreecommitdiff
path: root/src/chip8.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/chip8.rs')
-rw-r--r--src/chip8.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chip8.rs b/src/chip8.rs
index a172fa6..38e4831 100644
--- a/src/chip8.rs
+++ b/src/chip8.rs
@@ -135,6 +135,11 @@ impl Chip8 {
self.v[0xF] = if self.v[x] > self.v[y] { 1 } else { 0 };
self.v[x] = self.v[x].wrapping_sub(self.v[y]);
}
+ 0x000E => {
+ eprintln!("SHL V{}", x);
+ self.v[0xF] = if (self.v[x] >> 7) & 1 == 1 { 1 } else { 0 };
+ self.v[x] = self.v[x].wrapping_mul(2);
+ }
_ => unknown_opcode(opcode),
},
0x9000 => {