GBA Video: Fix x offset in 256-color BG mosaic (fixes #1684)

This commit is contained in:
Vicki Pfau 2021-03-22 23:09:45 -07:00
parent 601ece2e2a
commit 118bee2fa2
2 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,7 @@ Emulation fixes:
- 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

View File

@ -387,7 +387,7 @@
} \
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 @@
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
++pixel; \
} \
x = 0; \
}
#define DRAW_BACKGROUND_MODE_0(BPP, BLEND, OBJWIN) \