all repos — mgba @ 0a37300bcf05385da830c45c57e2bfc5e41d2a6b

mGBA Game Boy Advance Emulator

Improve LDR/STR cycle counting
Jeffrey Pfau jeffrey@endrift.com
Sat, 11 May 2013 14:55:29 -0700
commit

0a37300bcf05385da830c45c57e2bfc5e41d2a6b

parent

013e322c0b3ee8f90faa7f052b98028b7985182b

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

jump to
M src/gba/gba-memory.csrc/gba/gba-memory.c

@@ -158,7 +158,7 @@ }

if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 2 + wait; } // Unaligned 32-bit loads are "rotated" so they make some semblance of sense int rotate = (address & 3) << 3;

@@ -221,7 +221,7 @@ break;

} if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 2 + wait; } return value; }

@@ -276,7 +276,7 @@ break;

} if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 2 + wait; } return value; }

@@ -318,7 +318,7 @@ break;

} if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 1 + wait; } }

@@ -364,7 +364,7 @@ break;

} if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 1 + wait; } }

@@ -410,7 +410,7 @@ break;

} if (cycleCounter) { - *cycleCounter += wait; + *cycleCounter += 1 + wait; } }