diff --git a/src/cpu.rs b/src/cpu.rs index ad4250b..3c4b174 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -754,13 +754,13 @@ impl CPU { // Core Chip-8 instructions Insn::cls => self.clear_screen(bus), Insn::ret => self.ret(bus), - Insn::jmp { A } => self.jump(A), - Insn::call { A } => self.call(A, bus), - Insn::seb { B, x } => self.skip_equals_immediate(x, B), - Insn::sneb { B, x } => self.skip_not_equals_immediate(x, B), + Insn::jmp { A } => self.jump(A), + Insn::call { A } => self.call(A, bus), + Insn::seb { x, B } => self.skip_equals_immediate(x, B), + Insn::sneb { x, B } => self.skip_not_equals_immediate(x, B), Insn::se { y, x } => self.skip_equals(x, y), - Insn::movb { B, x } => self.load_immediate(x, B), - Insn::addb { B, x } => self.add_immediate(x, B), + Insn::movb { x, B } => self.load_immediate(x, B), + Insn::addb { x, B } => self.add_immediate(x, B), Insn::mov { y, x } => self.load(x, y), Insn::or { y, x } => self.or(x, y), Insn::and { y, x } => self.and(x, y), @@ -771,21 +771,21 @@ impl CPU { Insn::bsub { y, x } => self.backwards_sub(x, y), Insn::shl { y, x } => self.shift_left(x, y), Insn::sne { y, x } => self.skip_not_equals(x, y), - Insn::movI { A } => self.load_i_immediate(A), - Insn::jmpr { A } => self.jump_indexed(A), - Insn::rand { B, x } => self.rand(x, B), + Insn::movI { A } => self.load_i_immediate(A), + Insn::jmpr { A } => self.jump_indexed(A), + Insn::rand { x, B } => self.rand(x, B), Insn::draw { y, x, n } => self.draw(x, y, n, bus), - Insn::sek { x } => self.skip_key_equals(x), - Insn::snek { x } => self.skip_key_not_equals(x), - Insn::getdt { x } => self.load_delay_timer(x), - Insn::waitk { x } => self.wait_for_key(x), - Insn::setdt { x } => self.store_delay_timer(x), - Insn::movst { x } => self.store_sound_timer(x), - Insn::addI { x } => self.add_i(x), - Insn::font { x } => self.load_sprite(x), - Insn::bcd { x } => self.bcd_convert(x, bus), - Insn::dmao { x } => self.store_dma(x, bus), - Insn::dmai { x } => self.load_dma(x, bus), + Insn::sek { x } => self.skip_key_equals(x), + Insn::snek { x } => self.skip_key_not_equals(x), + Insn::getdt { x } => self.load_delay_timer(x), + Insn::waitk { x } => self.wait_for_key(x), + Insn::setdt { x } => self.store_delay_timer(x), + Insn::movst { x } => self.store_sound_timer(x), + Insn::addI { x } => self.add_i(x), + Insn::font { x } => self.load_sprite(x), + Insn::bcd { x } => self.bcd_convert(x, bus), + Insn::dmao { x } => self.store_dma(x, bus), + Insn::dmai { x } => self.load_dma(x, bus), // Super-Chip extensions Insn::scd { n } => self.scroll_down(n, bus), Insn::scr => self.scroll_right(bus), @@ -793,9 +793,9 @@ impl CPU { Insn::halt => self.flags.pause(), Insn::lores => self.init_lores(bus), Insn::hires => self.init_hires(bus), - Insn::hfont { x } => self.load_big_sprite(x), - Insn::flgo { x } => self.store_flags(x, bus), - Insn::flgi { x } => self.load_flags(x, bus), + Insn::hfont { x } => self.load_big_sprite(x), + Insn::flgo { x } => self.store_flags(x, bus), + Insn::flgi { x } => self.load_flags(x, bus), } } }