mirror of https://github.com/PCSX2/pcsx2.git
DEV9: Rewrite suppression of diagnostics IRQ during reset
This commit is contained in:
parent
1a95bd3088
commit
a8a0c5c0bf
|
@ -234,8 +234,8 @@ private:
|
|||
void HDD_WriteDMA(bool isLBA48);
|
||||
|
||||
void PreCmdExecuteDeviceDiag();
|
||||
void PostCmdExecuteDeviceDiag();
|
||||
void HDD_ExecuteDeviceDiag();
|
||||
void PostCmdExecuteDeviceDiag(bool sendIRQ);
|
||||
void HDD_ExecuteDeviceDiag(bool sendIRQ);
|
||||
|
||||
void PostCmdNoData();
|
||||
void CmdNoDataAbort();
|
||||
|
|
|
@ -317,8 +317,7 @@ void ATA::ResetEnd(bool hard)
|
|||
mdmaMode = 2;
|
||||
}
|
||||
|
||||
regControlEnableIRQ = false;
|
||||
HDD_ExecuteDeviceDiag();
|
||||
HDD_ExecuteDeviceDiag(false);
|
||||
regControlEnableIRQ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,20 +12,22 @@ void ATA::PreCmdExecuteDeviceDiag()
|
|||
//dev9.spd.regIntStat &= unchecked((UInt16)~DEV9Header.ATA_INTR_DMA_RDY); //Is this correct?
|
||||
}
|
||||
|
||||
void ATA::PostCmdExecuteDeviceDiag()
|
||||
void ATA::PostCmdExecuteDeviceDiag(bool sendIRQ)
|
||||
{
|
||||
regStatus &= ~ATA_STAT_BUSY;
|
||||
regStatus |= ATA_STAT_READY;
|
||||
|
||||
SetSelectedDevice(0);
|
||||
|
||||
if (regControlEnableIRQ)
|
||||
// If Device Diagnostics is performed as part of a reset
|
||||
// then we don't raise an IRQ or set pending interrupt
|
||||
if (regControlEnableIRQ && sendIRQ)
|
||||
_DEV9irq(ATA_INTR_INTRQ, 1);
|
||||
}
|
||||
|
||||
//GENRAL FEATURE SET
|
||||
|
||||
void ATA::HDD_ExecuteDeviceDiag()
|
||||
void ATA::HDD_ExecuteDeviceDiag(bool sendIRQ)
|
||||
{
|
||||
PreCmdExecuteDeviceDiag();
|
||||
//Perform Self Diag
|
||||
|
@ -44,5 +46,5 @@ void ATA::HDD_ExecuteDeviceDiag()
|
|||
regStatus &= ~ATA_STAT_ECC;
|
||||
regStatus &= ~ATA_STAT_ERR;
|
||||
|
||||
PostCmdExecuteDeviceDiag();
|
||||
PostCmdExecuteDeviceDiag(sendIRQ);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ void ATA::IDE_ExecCmd(u16 value)
|
|||
HDD_SeekCmd();
|
||||
break;
|
||||
case 0x90:
|
||||
HDD_ExecuteDeviceDiag();
|
||||
HDD_ExecuteDeviceDiag(true);
|
||||
break;
|
||||
case 0x91:
|
||||
HDD_InitDevParameters();
|
||||
|
|
Loading…
Reference in New Issue