fix direct page indexed

This commit is contained in:
2024-01-28 19:23:18 -05:00
parent 22b537546c
commit f0b21853b3
+1 -1
View File
@@ -89,7 +89,7 @@ pub fn absolute_long_indexed(bus: &mut Bus, pc_addr: u32, xy: u16) -> u32 {
/// OPCODE dp,X /// OPCODE dp,X
/// OPCODE dp,Y /// OPCODE dp,Y
pub fn direct_page_indexed(bus: &mut Bus, pc_addr: u32, direct_page_register: u16, xy: u16) -> u32 { pub fn direct_page_indexed(bus: &mut Bus, pc_addr: u32, direct_page_register: u16, xy: u16) -> u32 {
direct_page(bus, pc_addr, direct_page_register) + (xy as u32) (direct_page(bus, pc_addr, direct_page_register) + (xy as u32)) & 0xFFFF
} }
/// OPCODE (dp,X) /// OPCODE (dp,X)