| 360 | |
| 361 | |
| 362 | int _SPR1chain() |
| 363 | { |
| 364 | tDMA_TAG *pMem; |
| 365 | |
| 366 | if (spr1ch.qwc == 0) return 0; |
| 367 | |
| 368 | pMem = SPRdmaGetAddr(spr1ch.madr, false); |
| 369 | if (pMem == NULL) return -1; |
| 370 | int partialqwc = 0; |
| 371 | // Taking an arbitary small value for games which like to check the QWC/MADR instead of STR, so get most of |
| 372 | // the cycle delay out of the way before the end. |
| 373 | partialqwc = std::min(spr1ch.qwc, 0x400u); |
| 374 | |
| 375 | SPR1transfer(pMem, partialqwc); |
| 376 | spr1ch.madr += partialqwc * 16; |
| 377 | spr1ch.qwc -= partialqwc; |
| 378 | |
| 379 | hwDmacSrcTadrInc(spr1ch); |
| 380 | |
| 381 | return (partialqwc); |
| 382 | } |
| 383 | |
| 384 | __fi void SPR1chain() |
| 385 | { |
no test coverage detected