1 Commits
Author SHA1 Message Date
libretroadmin 516d2829bb SIF: the three DMA channels and the EE DMAC channel helpers in C89
Sif0, Sif1 and sif2 become C. The DMAC channel helpers they run on (tag
latch, address resolution, the source-chain walks) move out of Dmac.cpp
and Hw.cpp into DmacChannel.c with C linkage; the DMACh members stay as
inline forwarders for the C++ channels, and CPU_INT gets C linkage. The
SIF fifo accessors become C inline functions, and the copies between the
fifo and either side's memory live in Sif.c.

Those copies no longer leave the memory they address: an IOP run across
the top of its RAM wraps, an EE run past the end of main RAM or the
scratchpad resolves its next address again (a bus error part way stops
there), reading the SIF2 register with an empty fifo no longer drives it
negative, a loaded fifo is put back in range, and SIF1 no longer spins
for ever with 1-3 words of room after a TTE tag. tests/iopsif replays the
channels against the transcript the C++ made and checks each of these.
2026-11-09 03:38:50 +01:00