Support reading 8-bit values from palette RAM

This commit is contained in:
Jeffrey Pfau 2013-09-22 16:45:36 -07:00
parent 34ddb09516
commit 8132341b75
1 changed files with 1 additions and 0 deletions

View File

@ -251,6 +251,7 @@ int8_t GBALoad8(struct ARMMemory* memory, uint32_t address, int* cycleCounter) {
value = (GBAIORead(gbaMemory->p, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; value = (GBAIORead(gbaMemory->p, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF;
break; break;
case BASE_PALETTE_RAM: case BASE_PALETTE_RAM:
value = ((int8_t*) gbaMemory->p->video.renderer->palette)[address & (SIZE_PALETTE_RAM - 1)];
break; break;
case BASE_VRAM: case BASE_VRAM:
break; break;