Commit 5df78ac
committed
HLE CD: signal completion via DSP RAM [\$F1B4C8] = \$FFFFFFFF
Per docs/cd-bios-calling-convention.md and the retail BIOS disassembly:
"The BIOS does NOT use CD_poll. It polls DSP RAM flag at [\$F1B4C8] —
the GPU ISR writes \$FFFFFFFF there when the transfer completes, and
the BIOS loops until negative."
HLEHandleCDRead now mirrors that contract: clear the flag at the start
of the read and write \$FFFFFFFF when the transfer finishes. This is
the hardware-correct completion primitive. Game boot stubs that follow
the BIOS convention will pick this up automatically.
The remaining failing CUE games (Baldies, BrainDead 13, Iron Soldier 2,
Primal Rage) do NOT poll [\$F1B4C8] — they either spin in STOP waiting
for a JERRY ext IRQ from BUTCH, or they read the BUTCH FIFO data
register (\$DFFF24/\$DFFF28) directly from the 68K. Both are separate,
larger problems (interrupt-driven streaming and direct-FIFO emulation)
tracked for follow-up work.
Test diagnostic: the boot smoke test now also dumps 32 bytes of code
around each visited PC when fewer than 32 unique PCs are seen, so the
wait-loop instruction stream can be decoded without re-running.
Result: 4 PASS / 5 FAIL (no regression vs prior baseline).
Made-with: Cursor1 parent a512f03 commit 5df78ac
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
231 | 239 | | |
232 | 240 | | |
233 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
234 | 247 | | |
235 | 248 | | |
236 | 249 | | |
| |||
468 | 481 | | |
469 | 482 | | |
470 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
471 | 489 | | |
472 | 490 | | |
473 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
224 | 240 | | |
225 | 241 | | |
226 | 242 | | |
| |||
0 commit comments