emu_main: IGC drain-wait completion is NONZERO status, not zero (per-page done flag; loop exits when [page]!=0)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-15 18:05:13 -05:00
co-authored by Claude Opus 4.8
parent 051544fed6
commit 170b35d812
+4 -3
View File
@@ -111,9 +111,10 @@ class MainRunner:
self.heap = [0x08010000, 0x0c010000] # bump allocator over the DRAM banks
def h_igcwait(self, cpu):
# Post-flush drain wait: the firmware polls [r16] until the IGC clears
# it after consuming the region queue. We are the IGC: consume instantly.
cpu.mem.w32(cpu.rd(16), 0)
# Post-flush drain wait: the firmware polls [page] until the IGC writes a
# NONZERO completion status after consuming it (loop at 0xf0421504: exits
# the per-page wait when [r16] != 0). We are the IGC: complete instantly.
cpu.mem.w32(cpu.rd(16), 1)
cpu.step()
return True