mirror of
https://github.com/FranLMSP/snes.git
synced 2026-08-03 08:30:01 -04:00
fix infinite loop
This commit is contained in:
@@ -16,8 +16,8 @@ pub struct LDX {
|
|||||||
impl LDX {
|
impl LDX {
|
||||||
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
||||||
match registers.is_16bit_index() {
|
match registers.is_16bit_index() {
|
||||||
true => Box::new(LDX{addressing_mode: self.addressing_mode}),
|
true => Box::new(LDX16{addressing_mode: self.addressing_mode}),
|
||||||
false => Box::new(LDX{addressing_mode: self.addressing_mode}),
|
false => Box::new(LDX8{addressing_mode: self.addressing_mode}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ pub struct LDY {
|
|||||||
impl LDY {
|
impl LDY {
|
||||||
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
||||||
match registers.is_16bit_index() {
|
match registers.is_16bit_index() {
|
||||||
true => Box::new(LDY{addressing_mode: self.addressing_mode}),
|
true => Box::new(LDY16{addressing_mode: self.addressing_mode}),
|
||||||
false => Box::new(LDY{addressing_mode: self.addressing_mode}),
|
false => Box::new(LDY8{addressing_mode: self.addressing_mode}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ pub struct LSR {
|
|||||||
impl LSR {
|
impl LSR {
|
||||||
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
|
||||||
match registers.is_16bit_mode() {
|
match registers.is_16bit_mode() {
|
||||||
true => Box::new(LSR{addressing_mode: self.addressing_mode}),
|
true => Box::new(LSR16{addressing_mode: self.addressing_mode}),
|
||||||
false => Box::new(LSR{addressing_mode: self.addressing_mode}),
|
false => Box::new(LSR8{addressing_mode: self.addressing_mode}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user