From f42d7eec74a64063d95d89542191ec1207ff8fbd Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 12 Dec 2021 17:06:02 +0000 Subject: [PATCH] CDVD: Don't set as Reading when buffering. --- pcsx2/CDVD/CDVD.cpp | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 681bcfaa0d..62535d754d 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -1038,7 +1038,7 @@ __fi void cdvdActionInterrupt() cdvd.Spinning = true; cdvd.Ready |= CDVD_DRIVE_READY; //check (rama) cdvd.Sector = cdvd.SeekToSector; - cdvd.Status = CDVD_STATUS_READ; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nextSectorsBuffered = 0; cdvd.triggerDataReady = true; CDVDSECTORREADY_INT(cdvd.ReadTime); @@ -1049,7 +1049,7 @@ __fi void cdvdActionInterrupt() cdvd.Spinning = true; //check (rama) cdvd.Ready |= CDVD_DRIVE_READY; //check (rama) cdvd.Sector = cdvd.SeekToSector; - cdvd.Status = CDVD_STATUS_READ; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nextSectorsBuffered = 0; cdvd.triggerDataReady = true; CDVDSECTORREADY_INT(cdvd.ReadTime); @@ -1103,18 +1103,8 @@ __fi void cdvdSectorReady() } } - if (cdvd.nextSectorsBuffered == 16 && (cdvd.Ready & CDVD_DRIVE_READY)) - { - cdvd.Status = CDVD_STATUS_PAUSE; // Needed here but could be smth else than Pause (rama) - } - else - { - if (cdvd.nextSectorsBuffered < 16) - { - CDVDSECTORREADY_INT(cdvd.ReadTime); - cdvd.Status = CDVD_STATUS_READ; - } - } + if (cdvd.nextSectorsBuffered < 16) + CDVDSECTORREADY_INT(cdvd.ReadTime); } // inlined due to being referenced in only one place. @@ -1213,10 +1203,7 @@ __fi void cdvdReadInterrupt() iopIntcIrq(2); cdvd.Ready |= CDVD_DRIVE_READY; - if (cdvd.nextSectorsBuffered < 16) - cdvd.Status = CDVD_STATUS_READ; - else - cdvd.Status = CDVD_STATUS_PAUSE; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nCommand = 0; //DevCon.Warning("Scheduling interrupt in %d cycles", cdvd.ReadTime - ((cdvd.BlockSize / 4) * 12)); @@ -1623,7 +1610,7 @@ static void cdvdWrite04(u8 rt) cdvdSetIrq(); cdvd.nCommand = 0; //After Pausing needs to buffer the next sector - cdvd.Status = CDVD_STATUS_READ; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nextSectorsBuffered = 0; cdvd.triggerDataReady = true; CDVDSECTORREADY_INT(cdvd.ReadTime); @@ -1855,7 +1842,7 @@ static void cdvdWrite04(u8 rt) HW_DMA3_CHCR &= ~0x01000000; psxDmaInterrupt(3); //After reading the TOC it needs to go back to buffer the next sector - cdvd.Status = CDVD_STATUS_READ; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nextSectorsBuffered = 0; cdvd.triggerDataReady = true; CDVDSECTORREADY_INT(cdvd.ReadTime); @@ -1872,7 +1859,7 @@ static void cdvdWrite04(u8 rt) cdvdSetIrq(); cdvd.nCommand = 0; //After reading the key it needs to go back to buffer the next sector - cdvd.Status = CDVD_STATUS_READ; + cdvd.Status = CDVD_STATUS_PAUSE; cdvd.nextSectorsBuffered = 0; cdvd.triggerDataReady = true; CDVDSECTORREADY_INT(cdvd.ReadTime);