From df332e75fc70f81430b146ccb23481f80b89e8d3 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 8 Nov 2026 18:30:14 -0500 Subject: vgsp-disp: map class 0xc57b to its real control window (window-imm) The header labelled 0xc57b CURSOR and mapped it to the cursor-PIO block at 0x6d8000+n*0x1000, but 0xc57b is the immediate-mode window class whose control window is 0x690000+(n+32)*0x1000 = 0x6d0000+n*0x1000 (0xc57a is the PIO cursor channel, valid=0). The engine therefore polled the wrong window for every 0xc57b channel: their PUT was never seen, no UPDATE ever completed, and r1638's GZDoom-triggered mode set left X spinning in an RM ioctl after the window-imm flip. Rename the constants (WINDOW_IMM 0xc57b, CURSOR_PIO 0xc57a) and return the correct control offsets; cursor-PIO keeps 0x6d8000+n*0x1000. --- kernel/gsp_display_engine.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'kernel/gsp_display_engine.c') diff --git a/kernel/gsp_display_engine.c b/kernel/gsp_display_engine.c index 3e0c162..f96fc6a 100644 --- a/kernel/gsp_display_engine.c +++ b/kernel/gsp_display_engine.c @@ -310,7 +310,16 @@ static u32 gsp_disp_ctl_offset(u32 hclass, u32 instance) return GSP_DISP_CORE_CTL_BASE; case GSP_DISP_CLASS_WINDOW: return GSP_DISP_WIN_CTL_BASE + instance * 0x1000; - case GSP_DISP_CLASS_CURSOR: + case GSP_DISP_CLASS_WINDOW_IMM: + /* + * Immediate-mode window channels sit 32 windows above the + * ordinary window block (0x690000 + (instance+32)*0x1000 + * = 0x6d0000 + instance*0x1000). The old mapping put them + * in the cursor-PIO block at 0x6d8000, so their PUT was + * never seen and their flips never completed (r1638). + */ + return GSP_DISP_WIN_CTL_BASE + (instance + 32) * 0x1000; + case GSP_DISP_CLASS_CURSOR_PIO: return GSP_DISP_CURS_CTL_BASE + instance * 0x1000; default: return 0; -- cgit v1.2.3