all repos — mgba @ 6a97b1dbf50f8b4dc9a5e58aa6b8acc95f3f622a

mGBA Game Boy Advance Emulator

GBA Memory: Minor code simplification
Vicki Pfau vi@endrift.com
Sat, 29 Aug 2020 22:51:53 -0700
commit

6a97b1dbf50f8b4dc9a5e58aa6b8acc95f3f622a

parent

1d186dd9ea95d3e699569ce8870f83146580d677

1 files changed, 8 insertions(+), 8 deletions(-)

jump to
M src/gba/memory.csrc/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;