all repos — mgba @ 8132341b75684b1fd69680509ad1d9f6fe9f4d4a

mGBA Game Boy Advance Emulator

Support reading 8-bit values from palette RAM
Jeffrey Pfau jeffrey@endrift.com
Sun, 22 Sep 2013 16:45:36 -0700
commit

8132341b75684b1fd69680509ad1d9f6fe9f4d4a

parent

34ddb09516c584e7a47cf61e0ad3fe00c7e13c5a

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

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

@@ -251,6 +251,7 @@ case BASE_IO:

value = (GBAIORead(gbaMemory->p, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; break; case BASE_PALETTE_RAM: + value = ((int8_t*) gbaMemory->p->video.renderer->palette)[address & (SIZE_PALETTE_RAM - 1)]; break; case BASE_VRAM: break;