diff options
Diffstat (limited to 'cpu_opcodes_ud.c')
| -rw-r--r-- | cpu_opcodes_ud.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpu_opcodes_ud.c b/cpu_opcodes_ud.c index 44c1c8a..e884ed4 100644 --- a/cpu_opcodes_ud.c +++ b/cpu_opcodes_ud.c @@ -43,7 +43,7 @@ static void opcode_nop_absx(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->x; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); // T3 dummy read } @@ -131,7 +131,7 @@ static void opcode_lax_absy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -150,7 +150,7 @@ static void opcode_lax_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -293,7 +293,7 @@ static void opcode_dcp_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -422,7 +422,7 @@ static void opcode_isc_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -552,7 +552,7 @@ static void opcode_slo_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -697,7 +697,7 @@ static void opcode_rla_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -843,7 +843,7 @@ static void opcode_sre_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } @@ -985,7 +985,7 @@ static void opcode_rra_indy(struct nes_state *state) { uint16_t base = lo | (hi << 8); uint16_t addr = base + cpu->y; - if((base & 0xff00) != (addr & 0xff00)) { + if(PAGE_CROSSED(base, addr)) { memory_read_dummy(state, (base & 0xff00) | (addr & 0x00ff)); } |
