all repos — mgba @ a20117ec1434c54a8cda6efaa488b60f0e43b9f2

mGBA Game Boy Advance Emulator

Fix Huffman destinations
Jeffrey Pfau jeffrey@endrift.com
Sun, 13 Oct 2013 12:14:16 -0700
commit

a20117ec1434c54a8cda6efaa488b60f0e43b9f2

parent

9d08997fdcccf8fd5c0909e2ae8f8902c7db436c

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

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

@@ -263,13 +263,13 @@ break;

case 0x13: switch (gba->cpu.gprs[1] >> BASE_OFFSET) { case REGION_WORKING_RAM: - _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->memory.wram)[(gba->cpu.gprs[1] & (SIZE_WORKING_RAM - 3))]); + _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->memory.wram)[(gba->cpu.gprs[1] & (SIZE_WORKING_RAM - 3)) >> 2]); break; case REGION_WORKING_IRAM: - _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->memory.iwram)[(gba->cpu.gprs[1] & (SIZE_WORKING_IRAM - 3))]); + _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->memory.iwram)[(gba->cpu.gprs[1] & (SIZE_WORKING_IRAM - 3)) >> 2]); break; case REGION_VRAM: - _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->video.renderer->vram)[(gba->cpu.gprs[1] & 0x0001FFFC)]); + _unHuffman(&gba->memory, gba->cpu.gprs[0], &((uint32_t*) gba->video.renderer->vram)[(gba->cpu.gprs[1] & 0x0001FFFC) >> 2]); break; default: GBALog(gba, GBA_LOG_WARN, "Bad Huffman destination");