Skip to content

Fix aga bplcon0 bpu3#7

Merged
Vairn merged 1 commit intoVairn:AGAfrom
kwn:fix-aga-bplcon0-bpu3
Apr 26, 2026
Merged

Fix aga bplcon0 bpu3#7
Vairn merged 1 commit intoVairn:AGAfrom
kwn:fix-aga-bplcon0-bpu3

Conversation

@kwn
Copy link
Copy Markdown

@kwn kwn commented Apr 26, 2026

Summary

Fix AGA BPLCON0 bitplane count setup for viewports below 8 BPP.

Previously, the AGA path in viewLoad() always set BPU3 (BV(4)) in BPLCON0. This makes hardware interpret the viewport as using an 8-bitplane mode even when the requested viewport depth is lower, e.g. 5 BPP. In practice this can result in a blank screen while the rest of the program continues running.

This change sets BPU3 only when the requested bitplane count actually needs it.

Details

  • Preserve the existing lower 3-bit BPP setup via (ubBpp & 0x07) << 12.
  • Set BPU3 only when ubBpp & 0x08 is true.
  • This keeps AGA viewport setup correct for both lower depths (1-7 BPP) and 8 BPP.

Test

Tested with an AGA-enabled ACE project using a 5 BPP viewport on an A1200 FS-UAE configuration. Before the fix, palette updates and game logic worked, but bitmap/sprite output was blank. After the fix, graphics and sprites render correctly.

@kwn kwn changed the base branch from master to AGA April 26, 2026 20:42
@Vairn Vairn merged commit d05622f into Vairn:AGA Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants