mirror of https://github.com/mgba-emu/mgba.git
More sane way of writing 32-bit values to VRAM, palette
This commit is contained in:
parent
3a76cdc6e0
commit
e82fd991fa
|
@ -288,13 +288,11 @@ void GBAStore32(struct ARMMemory* memory, uint32_t address, int32_t value) {
|
|||
GBAIOWrite32(gbaMemory->p, address & (SIZE_IO - 1), value);
|
||||
break;
|
||||
case BASE_PALETTE_RAM:
|
||||
gbaMemory->p->video.palette[(address & (SIZE_PALETTE_RAM - 1)) >> 1] = value;
|
||||
gbaMemory->p->video.palette[((address & (SIZE_PALETTE_RAM - 1)) >> 1) + 1] = value >> 16;
|
||||
((int32_t*) gbaMemory->p->video.palette)[(address & (SIZE_PALETTE_RAM - 1)) >> 2] = value;
|
||||
break;
|
||||
case BASE_VRAM:
|
||||
if ((address & OFFSET_MASK) < SIZE_VRAM - 2) {
|
||||
gbaMemory->p->video.vram[(address & 0x0001FFFF) >> 1] = value;
|
||||
gbaMemory->p->video.vram[((address & 0x0001FFFF) >> 1) + 1] = value >> 16;
|
||||
((int32_t*) gbaMemory->p->video.vram)[(address & 0x0001FFFF) >> 2] = value;
|
||||
}
|
||||
break;
|
||||
case BASE_OAM:
|
||||
|
|
Loading…
Reference in New Issue