mirror of
https://github.com/FranLMSP/snes.git
synced 2026-08-03 08:30:01 -04:00
NOP
This commit is contained in:
@@ -206,6 +206,10 @@ impl CPU {
|
||||
pub fn increment_cycles_inc_dec_index(&mut self) {
|
||||
self.registers.increment_pc(1); self.cycles += 2;
|
||||
}
|
||||
|
||||
pub fn increment_cycles_nop(&mut self) {
|
||||
self.registers.increment_pc(1); self.cycles += 2;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -461,6 +461,10 @@ impl CPU {
|
||||
self.increment_cycles_clear();
|
||||
}
|
||||
|
||||
pub fn nop(&mut self) {
|
||||
self.increment_cycles_nop();
|
||||
}
|
||||
|
||||
pub fn execute_opcode(&mut self, opcode: u8, bus: &mut Bus) {
|
||||
type A = AddressingMode;
|
||||
type I = IndexRegister;
|
||||
@@ -623,6 +627,8 @@ impl CPU {
|
||||
0x46 => self.lsr(bus, A::DirectPage),
|
||||
0x5E => self.lsr(bus, A::AbsoluteIndexed(I::X)),
|
||||
0x56 => self.lsr(bus, A::DirectPageIndexed(I::X)),
|
||||
// NOP
|
||||
0xEA => self.nop(),
|
||||
_ => println!("Invalid opcode: {:02X}", opcode),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user