summaryrefslogtreecommitdiff
path: root/cpu_opcodes_ud.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-06-08 17:32:05 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-06-08 17:32:05 +0200
commit412b2ef851516c1de8ba5006ddd284192cbcaf9b (patch)
treee8b68d60125bf89e375ec9acc4e7833825abbfaa /cpu_opcodes_ud.c
parent6dd73982c514445c4d2a4787c37666d0812a3dad (diff)
tests
Diffstat (limited to 'cpu_opcodes_ud.c')
-rw-r--r--cpu_opcodes_ud.c18
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));
}