GBA Memory: Minor code simplification
Vicki Pfau vi@endrift.com
Sat, 29 Aug 2020 22:51:53 -0700
1 files changed,
8 insertions(+),
8 deletions(-)
jump to
M
src/gba/memory.c
→
src/gba/memory.c
@@ -484,7 +484,7 @@ }
if (cycleCounter) { wait += 2; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -603,7 +603,7 @@ }
if (cycleCounter) { wait += 2; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -714,7 +714,7 @@ }
if (cycleCounter) { wait += 2; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -840,7 +840,7 @@ }
if (cycleCounter) { ++wait; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -956,7 +956,7 @@ }
if (cycleCounter) { ++wait; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -1039,7 +1039,7 @@ }
if (cycleCounter) { ++wait; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -1454,7 +1454,7 @@ }
if (cycleCounter) { ++wait; - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;@@ -1572,7 +1572,7 @@ break;
} if (cycleCounter) { - if (address >> BASE_OFFSET < REGION_CART0) { + if (address < BASE_CART0) { wait = GBAMemoryStall(cpu, wait); } *cycleCounter += wait;