summaryrefslogtreecommitdiff
path: root/src/chip8.rs
diff options
context:
space:
mode:
authorSamuel Perrouault <samuel.perrouault@gmail.com>2025-03-26 13:54:02 +0100
committerSamuel Perrouault <samuel.perrouault@gmail.com>2025-03-26 13:54:02 +0100
commit65e8ed900d238f46cc2af7a57e558b9b911966aa (patch)
treeb7cb8e974f6ef66304f1e48cd42a702745e04a78 /src/chip8.rs
parente63cd0f86c3aa6f66f616a1fe907263ccd679fb8 (diff)
handle SNE instruction
Diffstat (limited to 'src/chip8.rs')
-rw-r--r--src/chip8.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chip8.rs b/src/chip8.rs
index 0ea6d6d..773df97 100644
--- a/src/chip8.rs
+++ b/src/chip8.rs
@@ -77,6 +77,12 @@ impl Chip8 {
self.pc += 2;
}
}
+ 0x4000 => {
+ eprintln!("SNE V{}, {}", x, nn);
+ if self.v[x] != nn {
+ self.pc += 2;
+ }
+ }
0x6000 => {
eprintln!("LD V{}, {}", x, nn);
self.v[x] = nn;