From 11d1de39e15f4a348b42c8b14f6baab0db951161 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 22 Apr 2013 02:28:03 -0700 Subject: [PATCH] Fix non-zero character base --- src/gba/renderers/video-software.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 0d62b09d4..836e8275d 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -220,7 +220,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru } screenBase = (background->screenBase >> 1) + (xBase >> 3) + (yBase << 2); mapData.packed = renderer->d.vram[screenBase]; - charBase = ((background->charBase + mapData.tile << 5) >> 1) + ((inY & 0x7) << 1) + (((outX + inX) >> 2) & 1); + charBase = ((background->charBase + (mapData.tile << 5)) >> 1) + ((inY & 0x7) << 1) + (((outX + inX) >> 2) & 1); uint16_t tileData = renderer->d.vram[charBase]; tileData >>= ((outX + inX) & 0x3) << 2; if (tileData & 0xF) {