all repos — mgba @ 11d1de39e15f4a348b42c8b14f6baab0db951161

mGBA Game Boy Advance Emulator

Fix non-zero character base
Jeffrey Pfau jeffrey@endrift.com
Mon, 22 Apr 2013 02:28:03 -0700
commit

11d1de39e15f4a348b42c8b14f6baab0db951161

parent

bcf446737c90d95f4914b96e9085befd063721df

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

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

@@ -220,7 +220,7 @@ xBase += ((outX + inX) & 0x100) << 5;

} 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) {