Fix modes 4 and 5
Jeffrey Pfau jeffrey@endrift.com
Fri, 26 Jul 2013 00:10:33 -0700
1 files changed,
1 insertions(+),
2 deletions(-)
M
src/gba/renderers/video-software.c
→
src/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;