all repos — mgba @ df3ee0e2be38095bbfc2385d430fa82542c64334

mGBA Game Boy Advance Emulator

GBA Video: Fix OAM and palette initialization
Jeffrey Pfau jeffrey@endrift.com
Wed, 09 Dec 2015 21:22:35 -0800
commit

df3ee0e2be38095bbfc2385d430fa82542c64334

parent

08a2b24eac387539179b81f4c3f44469bbeab9e1

2 files changed, 3 insertions(+), 7 deletions(-)

jump to
M CHANGESCHANGES

@@ -39,6 +39,7 @@ - ARM7: Fix STRT/STRBT

- ARM7: Implement undefined STRH/LDRH/LDRSH/LDRSB versions - ARM7: Fix bank switching with LDR[B]T/STR[B]T - Qt: Fix crash when closing multiplayer windows + - GBA Video: Fix OAM and palette initialization Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M src/gba/video.csrc/gba/video.c

@@ -88,13 +88,8 @@ }

video->vram = anonymousMemoryMap(SIZE_VRAM); video->renderer->vram = video->vram; - int i; - for (i = 0; i < 128; ++i) { - STORE_16(0x0200, i * 8 + 0, video->oam.raw); - STORE_16(0x0000, i * 8 + 2, video->oam.raw); - STORE_16(0x0000, i * 8 + 4, video->oam.raw); - STORE_16(0x0000, i * 8 + 6, video->oam.raw); - } + memset(video->palette, 0, sizeof(video->palette)); + memset(video->oam.raw, 0, sizeof(video->oam.raw)); video->renderer->deinit(video->renderer); video->renderer->init(video->renderer);