diff --git a/CHANGES b/CHANGES index 540ad89d1..283bedbc1 100644 --- a/CHANGES +++ b/CHANGES @@ -64,6 +64,7 @@ Bugfixes: - Qt: Fix a missing va_end call in the log handler lambda within the GameController constructor - GBA Cheats: Fix Pro Action Replay and GameShark issues when used together - Qt: Fix analog buttons not getting unmapped + - GBA Video: Prevent tiles < 512 from being used in modes 3 - 5 Misc: - Qt: Handle saving input settings better - Debugger: Free watchpoints in addition to breakpoints diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index 2d13b7340..eb793db23 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/gba/renderers/software-obj.c @@ -116,6 +116,9 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re x >>= 23; uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1]; unsigned charBase = GBAObjAttributesCGetTile(sprite->c) * 0x20; + if (GBARegisterDISPCNTGetMode(renderer->dispcnt) >= 3 && GBAObjAttributesCGetTile(sprite->c) < 512) { + return 0; + } int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) { int target2 = renderer->target2Bd << 4;