all repos — mgba @ 0cace151e1148cfd12d4175f816a044871d8e113

mGBA Game Boy Advance Emulator

GBA Video: Fix wrapped sprite mosaic clamping (fixes #1432)
Vicki Pfau vi@endrift.com
Thu, 30 May 2019 11:59:07 -0700
commit

0cace151e1148cfd12d4175f816a044871d8e113

parent

9ce234daaca53093448c1b133c9e291385ee229e

M CHANGESCHANGES

@@ -18,6 +18,7 @@ - GBA BIOS: Fix multiboot entry point (fixes Magic Floor)

- GB Video: Delay LYC STAT check (fixes mgba.io/i/1331) - GB Video: Fix window being enabled mid-scanline (fixes mgba.io/i/1328) - GB I/O: Filter IE top bits properly (fixes mgba.io/i/1329) + - GBA Video: Fix wrapped sprite mosaic clamping (fixes mgba.io/i/1432) Other fixes: - Qt: Fix some Qt display driver race conditions - Core: Improved lockstep driver reliability (Le Hoang Quyen)
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -808,12 +808,12 @@ renderer->end = 0;

if ((y < sprite->y && (sprite->endY - 256 < 0 || y >= sprite->endY - 256)) || y >= sprite->endY) { continue; } - if (GBAObjAttributesAIsMosaic(sprite->obj.a)) { + if (GBAObjAttributesAIsMosaic(sprite->obj.a) && mosaicV > 1) { localY = mosaicY; - if (localY < sprite->y) { + if (localY < sprite->y && sprite->y < GBA_VIDEO_VERTICAL_PIXELS) { localY = sprite->y; } - if (localY >= sprite->endY) { + if (localY >= (sprite->endY & 0xFF)) { localY = sprite->endY - 1; } }