CDVD: Adjust abort behaviour on action.

This commit is contained in:
refractionpcsx2 2023-12-15 15:10:45 +00:00
parent c2bd21922f
commit a7271697a2
1 changed files with 8 additions and 7 deletions

View File

@ -1146,23 +1146,24 @@ int cdvdReadSector()
// inlined due to being referenced in only one place.
__fi void cdvdActionInterrupt()
{
u8 ready_status = CDVD_DRIVE_READY;
if (cdvd.AbortRequested)
{
Console.Warning("Action Abort");
Console.Warning("Action Abort %d", cdvd.Action);
cdvd.Error = 0x1; // Abort Error
cdvdUpdateReady(CDVD_DRIVE_READY | CDVD_DRIVE_ERROR);
ready_status |= CDVD_DRIVE_ERROR;
cdvdUpdateReady(ready_status);
cdvdUpdateStatus(CDVD_STATUS_PAUSE);
cdvd.WaitingDMA = false;
CDVDCancelReadAhead();
cdvdSetIrq();
return;
psxRegs.interrupt &= ~(1 << IopEvt_Cdvd); // Stop any current reads
}
switch (cdvd.Action)
{
case cdvdAction_Seek:
cdvd.Spinning = true;
cdvdUpdateReady(CDVD_DRIVE_READY);
cdvdUpdateReady(ready_status);
cdvd.CurrentSector = cdvd.SeekToSector;
cdvdUpdateStatus(CDVD_STATUS_PAUSE);
CDVDSECTORREADY_INT(cdvd.ReadTime);
@ -1171,7 +1172,7 @@ __fi void cdvdActionInterrupt()
case cdvdAction_Standby:
DevCon.Warning("CDVD Standby Call");
cdvd.Spinning = true; //check (rama)
cdvdUpdateReady(CDVD_DRIVE_READY);
cdvdUpdateReady(ready_status);
cdvd.CurrentSector = cdvd.SeekToSector;
cdvdUpdateStatus(CDVD_STATUS_PAUSE);
cdvd.nextSectorsBuffered = 0;
@ -1180,7 +1181,7 @@ __fi void cdvdActionInterrupt()
case cdvdAction_Stop:
cdvd.Spinning = false;
cdvdUpdateReady(CDVD_DRIVE_READY);
cdvdUpdateReady(ready_status);
cdvd.CurrentSector = 0;
cdvdUpdateStatus(CDVD_STATUS_STOP);
break;