GBA Video: Fix x offset in 256-color BG mosaic (fixes #1684)
Vicki Pfau vi@endrift.com
Mon, 22 Mar 2021 23:09:45 -0700
2 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -63,6 +63,7 @@ - GBA Video: Fix Hblank timing
- GBA Video: Implement green swap (fixes mgba.io/i/1609) - GBA Video: Emulate sprite cycle limits in OpenGL renderer (fixes mgba.io/i/1635) - GBA Video: Fix OBJWIN erratic rendering in OpenGL renderer + - GBA Video: Fix x offset in 256-color BG mosaic (fixes mgba.io/i/1684) - SM83: Emulate HALT bug - SM83: Improve mid-M-cycle interrupts - SM83: HALT should not consume an extra T-state
M
src/gba/renderers/software-mode0.c
→
src/gba/renderers/software-mode0.c
@@ -387,7 +387,7 @@ localY = 7 - localY; \
} \ charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \ tileData = carryData; \ - for (x = 0; x < 8 && length; ++x, --length) { \ + for (; x < 8 && length; ++x, --length) { \ if (!mosaicWait) { \ if (UNLIKELY(charBase >= 0x10000)) { \ carryData = 0; \@@ -419,6 +419,7 @@ --mosaicWait; \
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \ ++pixel; \ } \ + x = 0; \ } #define DRAW_BACKGROUND_MODE_0(BPP, BLEND, OBJWIN) \