diff --git a/CHANGES b/CHANGES index 11ae7fe30..f1375dd48 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,7 @@ Emulation fixes: - GBA Video: Fix double-size OBJ wrapping in GL renderer (fixes mgba.io/i/1712) - GBA Video: Simplify sprite cycle counting (fixes mgba.io/i/1279) - GBA Video: Add sprite cycle counting to GL (fixes mgba.io/i/1635) + - GBA Video: Fix sprite/backdrop blending regression - SM83: Emulate HALT bug Other fixes: - 3DS: Fix framelimiter on newer citro3d (fixes mgba.io/i/1771) diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0000.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0000.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0000.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0001.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0001.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0001.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0002.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0002.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0002.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0003.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0003.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0003.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0004.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0004.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0004.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0005.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0005.png new file mode 100644 index 000000000..a957df258 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0005.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0006.png b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0006.png new file mode 100644 index 000000000..2e3ff4860 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/baseline_0006.png differ diff --git a/cinema/gba/blend/bof-obj-backdrop-blend/test.mvl b/cinema/gba/blend/bof-obj-backdrop-blend/test.mvl new file mode 100644 index 000000000..5733101f7 Binary files /dev/null and b/cinema/gba/blend/bof-obj-backdrop-blend/test.mvl differ diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index 73df3ddc1..d533de9ee 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/gba/renderers/software-obj.c @@ -165,7 +165,7 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re int variant = (renderer->target1Obj || GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); - if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT || objwinSlowPath) { + if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT || (renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || objwinSlowPath) { int target2 = renderer->target2Bd; target2 |= renderer->bg[0].target2; target2 |= renderer->bg[1].target2;