GIF: Separate GIF Reset and GIF DMA Reset

The two shouldn't be reset together anyway, the GIF has no control over the DMA.
This commit is contained in:
refractionpcsx2 2022-01-12 08:59:12 +00:00
parent 0c0a866481
commit e270c46703
2 changed files with 4 additions and 3 deletions

View File

@ -86,9 +86,9 @@ void GIF_Fifo::init()
memzero(data); memzero(data);
fifoSize = 0; fifoSize = 0;
gifRegs.stat.FQC = 0; gifRegs.stat.FQC = 0;
CSRreg.FIFO = CSR_FIFO_EMPTY;
gif.gifstate = GIF_STATE_READY; gif.gifstate = GIF_STATE_READY;
gif.gspath3done = false; gif.gspath3done = true;
gif.gscycles = 0; gif.gscycles = 0;
gif.prevcycles = 0; gif.prevcycles = 0;

View File

@ -542,12 +542,13 @@ struct Gif_Unit
} }
// Resets Gif HW Regs // Resets Gif HW Regs
// Warning: Do not mess with the DMA here, the reset does *NOT* touch this.
void ResetRegs() void ResetRegs()
{ {
gifRegs.stat.reset(); gifRegs.stat.reset();
gifRegs.ctrl.reset(); gifRegs.ctrl.reset();
gifRegs.mode.reset(); gifRegs.mode.reset();
gif_fifo.init(); CSRreg.FIFO = CSR_FIFO_EMPTY; // This is the GIF unit side FIFO, not DMA!
} }
// Adds a finished GS Packet to the MTGS ring buffer // Adds a finished GS Packet to the MTGS ring buffer