mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-06-26 18:02:55 +00:00
Real RSP DMA hardware advances SP_MEM_ADDR and SP_DRAM_ADDR by (length + 1) after each transfer (verified against Ares' n64/rsp/dma.cpp: pbusAddress += 8 / dramAddress += 8 per 8-byte chunk). The runtime's DO_DMA_READ / DO_DMA_WRITE macros didn't replicate this, so any ucode that fires DMAs in a loop without re-writing SP_MEM_ADDR/SP_DRAM_ADDR each iteration would reload the same DMEM region forever. Observed as Pokemon Stadium's aspMain hanging in its dispatch loop: the L_10EC <-> L_11B4 DMA pump (which walks through the audio command stream chunk by chunk on real hardware) collapsed into a tight no-progress cycle. With the auto-increment in place the dispatch makes forward progress and aspMain advances past the hang point. (A downstream UnhandledJumpTarget then surfaces — a separate issue with the recompiler's static indirect-branch-target list, not this layer.) Diff verified via diff_aspmain.py against the standalone Ares oracle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| include/librecomp | ||
| src | ||
| CMakeLists.txt | ||