Fix 8-bit VRAM writes

This commit is contained in:
Jeffrey Pfau 2013-10-13 15:23:39 -07:00
parent ee44e2ac89
commit 67007ee002
1 changed files with 2 additions and 1 deletions

View File

@ -458,7 +458,8 @@ void GBAStore8(struct ARMMemory* memory, uint32_t address, int8_t value, int* cy
GBALog(gbaMemory->p, GBA_LOG_GAME_ERROR, "Cannot Store8 to OBJ: 0x%08X", address);
break;
}
gbaMemory->p->video.renderer->vram[(address >> 1) & 0xFFFF] = (value) | (value << 8);
((int8_t*) gbaMemory->p->video.renderer->vram)[address & 0x1FFFE] = value;
((int8_t*) gbaMemory->p->video.renderer->vram)[(address & 0x1FFFE) | 1] = value;
break;
case BASE_OAM:
GBALog(gbaMemory->p, GBA_LOG_GAME_ERROR, "Cannot Store8 to OAM: 0x%08X", address);