MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / hwDmacSrcChain

Function hwDmacSrcChain

pcsx2/Hw.cpp:326–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324 }
325}
326bool hwDmacSrcChain(DMACh& dma, int id)
327{
328 u32 temp;
329
330 switch (id)
331 {
332 case TAG_REFE: // Refe - Transfer Packet According to ADDR field
333 dma.tadr += 16;
334 // End the transfer.
335 return true;
336
337 case TAG_CNT: // CNT - Transfer QWC following the tag.
338 // Set MADR to QW after the tag, and TADR to QW following the data.
339 dma.madr = dma.tadr + 16;
340 dma.tadr = dma.madr;
341 return false;
342
343 case TAG_NEXT: // Next - Transfer QWC following tag. TADR = ADDR
344 // Set MADR to QW following the tag, and set TADR to the address formerly in MADR.
345 temp = dma.madr;
346 dma.madr = dma.tadr + 16;
347 dma.tadr = temp;
348 return false;
349
350 case TAG_REF: // Ref - Transfer QWC from ADDR field
351 case TAG_REFS: // Refs - Transfer QWC from ADDR field (Stall Control)
352 //Set TADR to next tag
353 dma.tadr += 16;
354 return false;
355
356 case TAG_END: // End - Transfer QWC following the tag
357 //Set MADR to data following the tag, and end the transfer.
358 dma.madr = dma.tadr + 16;
359 //Don't Increment tadr; breaks Soul Calibur II and III
360 return true;
361 // Undefined Tag handling ends the DMA, maintaining the bad TADR and Tag in upper CHCR
362 // Some games such as DT racer try to use RET tags on IPU, which it doesn't support
363 default:
364 return true;
365 }
366
367 return false;
368}
369

Callers 3

_dmaSPR1Function · 0.85
ProcessEETagFunction · 0.85
IPU1dmaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected