all repos — mgba @ 3ccd29245cc01e76790519636a8aa9ab50ad05fd

mGBA Game Boy Advance Emulator

DS GX: Hack to prevent FIFO from overflowing during STMs
Vicki Pfau vi@endrift.com
Mon, 20 Mar 2017 10:09:50 -0700
commit

3ccd29245cc01e76790519636a8aa9ab50ad05fd

parent

35b6b7ddb407136ccaebf02b12f8ff4afe2e0d32

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M src/ds/gx.csrc/ds/gx.c

@@ -1672,7 +1672,9 @@ static void DSGXWriteFIFO(struct DSGX* gx, struct DSGXEntry entry) {

if (CircleBufferSize(&gx->fifo) == (DS_GX_FIFO_SIZE * sizeof(entry))) { mLOG(DS_GX, INFO, "FIFO full"); if (gx->p->cpuBlocked & DS_CPU_BLOCK_GX) { - abort(); + // Can happen from STM + mTimingDeschedule(&gx->p->ds9.timing, &gx->fifoEvent); + _fifoRun(&gx->p->ds9.timing, gx, 0); } gx->p->cpuBlocked |= DS_CPU_BLOCK_GX; gx->outstandingEntry = entry;