Improve LDR/STR cycle counting
Jeffrey Pfau jeffrey@endrift.com
Sat, 11 May 2013 14:55:29 -0700
1 files changed,
6 insertions(+),
6 deletions(-)
jump to
M
src/gba/gba-memory.c
→
src/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; } }