all repos — mgba @ 4ca8d75082407d049f867a7866c848f6661328de

mGBA Game Boy Advance Emulator

GBA BIOS: Fix misaligned RLUnCompReadNormalWrite*
Jeffrey Pfau jeffrey@endrift.com
Tue, 17 Nov 2015 19:48:10 -0800
commit

4ca8d75082407d049f867a7866c848f6661328de

parent

7c9b619f7b777bb920bb95ea7c5c02920c882f5b

2 files changed, 3 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -30,6 +30,7 @@ - Qt: Add additional checks in CheatModel to prevent crashes

- GBA Hardware: Fix Game Boy Player rumble in Pokemon Pinball - OpenGL: Fix fast-forward on some OpenGL drivers where it may block early - GBA BIOS: Fix Sqrt sign + - GBA BIOS: Fix misaligned RLUnCompReadNormalWrite* Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M src/gba/bios.csrc/gba/bios.c

@@ -482,8 +482,8 @@ }

static void _unRl(struct GBA* gba, int width) { struct ARMCore* cpu = gba->cpu; - uint32_t source = cpu->gprs[0] & 0xFFFFFFFC; - int remaining = (cpu->memory.load32(cpu, source, 0) & 0xFFFFFF00) >> 8; + uint32_t source = cpu->gprs[0]; + int remaining = (cpu->memory.load32(cpu, source & 0xFFFFFFFC, 0) & 0xFFFFFF00) >> 8; int padding = (4 - remaining) & 0x3; // We assume the signature byte (0x30) is correct int blockheader;