Skip to content

Fix fmode 1 and 2#8

Merged
Vairn merged 1 commit intoVairn:AGAfrom
kwn:fix-fmode-1-and-2
Apr 26, 2026
Merged

Fix fmode 1 and 2#8
Vairn merged 1 commit intoVairn:AGAfrom
kwn:fix-fmode-1-and-2

Conversation

@kwn
Copy link
Copy Markdown

@kwn kwn commented Apr 26, 2026

Summary

Add proper AGA FMODE=1/2 data fetch setup for simplebuffer.

Details

Previously, simplebuffer only special-cased FMODE=3, while FMODE=1 and FMODE=2 still used the default ECS/OCS-style data fetch window. On AGA, FMODE=1/2 use 32-bit bitplane fetches, so the data fetch stop position and scroll compensation need to differ from FMODE=0.

This change:

  • Adds FMODE=1/2 handling when calculating DDFSTOP.
  • Uses the 32-bit fetch window for FMODE=1/2, e.g. 320px lowres now resolves to DDFSTOP=$00c8 instead of $00d0.
  • Adjusts the extra fetch, modulo, and bitplane offset used by X-scrolled simplebuffer displays from 2-byte to 4-byte units.
  • Preserves the existing FMODE=0 and FMODE=3 behavior.

Test

Tested with an AGA-enabled ACE project using a 320px lowres simplebuffer viewport in FMODE=1.

Before the fix, the display was visibly skewed/blurred with diagonal line offsets. After the fix, the title/menu screen renders correctly.

Before

Screenshot 2026-04-26 at 23 17 55

After

Screenshot 2026-04-26 at 23 23 37

@Vairn Vairn merged commit 6ac2a41 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