ui update

This commit is contained in:
2024-11-01 17:40:39 -04:00
parent d2537705b7
commit 4e52b5b05a
3 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -803,18 +803,24 @@ impl Chip8CpuInstructions {
let working_16_or = working_16_x | working_16_y;
// shift them back to 8 bit.
input.registers.poke(*x, working_16_or as u8);
// reset of VF quirk
input.registers.poke(0x0f, 0x00);
debug!("OrVxVy [0x{x:1x}] [0x{y:1x}]")
}
// 0x8xy2 Set Vx = Vx AND Vy
Chip8CpuInstructions::AND(x, y) => {
let lhs_16 = input.registers.peek(*x) as u16;
let rhs_16 = input.registers.peek(*y) as u16;
// reset of VF quirk
input.registers.poke(0x0f, 0x00);
input.registers.poke(*x, (lhs_16 & rhs_16) as u8);
}
// 0x8xy3 Set Vx = Vx XOR Vy
Chip8CpuInstructions::ORY(x, y) => {
let lhs_16 = input.registers.peek(*x) as u16;
let rhs_16 = input.registers.peek(*y) as u16;
// reset of VF quirk
input.registers.poke(0x0f, 0x00);
input.registers.poke(*x, (lhs_16 ^ rhs_16) as u8);
}
// 0x8xy4 Set Vx = Vx + Vy (SET VF on Carry)
@@ -1107,7 +1113,7 @@ impl Chip8CpuInstructions {
Chip8CpuInstructions::LDIX(x) => {
// Store registers V0 through Vx in memory starting at location I.
//
// The interpreter copies the values of registers V0 through Vx into memory,
// The interpreter copi=es the values of registers V0 through Vx into memory,
// starting at the address in I.
let offset = input.registers.peek_i();
for i in 0..=*x {