Merge pull request #450 from RetroPortingToolKit/fix/mmx6-composite-screen-tags-20261001

Keep Ilumina and other large screen composites assembled in widescreen
This commit is contained in:
Matt Stanley
2026-09-30 21:40:37 -07:00
committed by GitHub
2 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -9,7 +9,9 @@
extern "C" {
#endif
#define WS_HUD_ANCHOR_TABLE_SIZE 256u
/* Large screen-space composites can exceed 256 packets (MMX6 Ilumina).
* Keep both pending display buffers' pieces anchored together. */
#define WS_HUD_ANCHOR_TABLE_SIZE 4096u
#define WS_HUD_ANCHOR_PROBES 8u
#define WS_HUD_ANCHOR_FRESH_FRAMES 2u
+12
View File
@@ -69,6 +69,18 @@ int main(void) {
assert(!ws_hud_anchor_lookup(tags, WS_HUD_ANCHOR_TABLE_SIZE,
0x80010004u, packet, 4u, 20u, &anchor));
/* Two pending 1000-piece composites, with MMX6's 40-byte packet stride.
* Losing early arm pieces splits Ilumina when world origin shifts. */
for (uint32_t i = 0; i < 2000u; ++i)
ws_hud_anchor_insert(tags, WS_HUD_ANCHOR_TABLE_SIZE,
0x10004u + i * 40u, 0, &guard, 30u + i / 1000u);
for (uint32_t i = 0; i < 2000u; ++i) {
anchor = 99;
assert(ws_hud_anchor_lookup(tags, WS_HUD_ANCHOR_TABLE_SIZE,
0x10004u + i * 40u, packet, 4u, 31u, &anchor));
assert(anchor == 0);
}
puts("ws_hud_anchor_test: PASS");
return 0;
}