all repos — mgba @ 76cd71290726fa9466e6f6f5122168b43b4de6f2

mGBA Game Boy Advance Emulator

Fix modes 4 and 5
Jeffrey Pfau jeffrey@endrift.com
Fri, 26 Jul 2013 00:10:33 -0700
commit

76cd71290726fa9466e6f6f5122168b43b4de6f2

parent

3537099820219ae0ea4e7ea2a38b20ffaf310b09

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

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -127,7 +127,6 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRenderer* renderer, uint32_t address, uint16_t value) {

struct GBAVideoSoftwareRenderer* softwareRenderer = (struct GBAVideoSoftwareRenderer*) renderer; switch (address) { case REG_DISPCNT: - value &= 0xFFFB; softwareRenderer->dispcnt.packed = value; GBAVideoSoftwareRendererUpdateDISPCNT(softwareRenderer); break;

@@ -977,7 +976,7 @@ int outX;

for (outX = 0; outX < VIDEO_HORIZONTAL_PIXELS; ++outX) { BACKGROUND_BITMAP_ITERATE(160, 128); - color = ((uint16_t*)renderer->d.vram)[(localX >> 8) + (localY >> 8) * 160]; + color = ((uint16_t*)renderer->d.vram)[offset + (localX >> 8) + (localY >> 8) * 160]; color32 = 0; color32 |= (color << 3) & 0xF8; color32 |= (color << 6) & 0xF800;