mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Insert step on swap for Generic Detect before type detect
This commit is contained in:
parent
880107e72b
commit
9109751ff0
|
@ -626,10 +626,10 @@ s32 cdvdCtrlTrayClose()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DevCon.WriteLn(Color_Green, L"Seeking media");
|
DevCon.WriteLn(Color_Green, L"Detecting media");
|
||||||
cdvd.Ready &= ~CDVD_DRIVE_READY;
|
cdvd.Ready &= ~CDVD_DRIVE_READY;
|
||||||
cdvd.Status = CDVD_STATUS_SEEK;
|
cdvd.Status = CDVD_STATUS_SEEK;
|
||||||
cdvd.Tray.trayState = CDVD_DISC_SEEKING;
|
cdvd.Tray.trayState = CDVD_DISC_DETECTING;
|
||||||
cdvd.Tray.cdvdActionSeconds = 3;
|
cdvd.Tray.cdvdActionSeconds = 3;
|
||||||
}
|
}
|
||||||
cdvdDetectDisk();
|
cdvdDetectDisk();
|
||||||
|
@ -664,7 +664,9 @@ static bool cdvdIsDVD()
|
||||||
|
|
||||||
static int cdvdTrayStateDetecting()
|
static int cdvdTrayStateDetecting()
|
||||||
{
|
{
|
||||||
|
if (cdvd.Tray.trayState == CDVD_DISC_DETECTING)
|
||||||
|
return CDVD_TYPE_DETCT;
|
||||||
|
|
||||||
if (cdvdIsDVD())
|
if (cdvdIsDVD())
|
||||||
{
|
{
|
||||||
u32 layer1Start;
|
u32 layer1Start;
|
||||||
|
@ -857,7 +859,7 @@ void cdvdNewDiskCB()
|
||||||
DevCon.WriteLn(Color_Green, L"Seeking new media");
|
DevCon.WriteLn(Color_Green, L"Seeking new media");
|
||||||
cdvd.Ready &= ~CDVD_DRIVE_READY;
|
cdvd.Ready &= ~CDVD_DRIVE_READY;
|
||||||
cdvd.Status = CDVD_STATUS_SEEK;
|
cdvd.Status = CDVD_STATUS_SEEK;
|
||||||
cdvd.Tray.trayState = CDVD_DISC_SEEKING;
|
cdvd.Tray.trayState = CDVD_DISC_DETECTING;
|
||||||
cdvd.Tray.cdvdActionSeconds = 3;
|
cdvd.Tray.cdvdActionSeconds = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1274,6 +1276,11 @@ void cdvdUpdateTrayState()
|
||||||
case CDVD_DISC_EJECT:
|
case CDVD_DISC_EJECT:
|
||||||
cdvdCtrlTrayClose();
|
cdvdCtrlTrayClose();
|
||||||
break;
|
break;
|
||||||
|
case CDVD_DISC_DETECTING:
|
||||||
|
DevCon.WriteLn(Color_Green, L"Seeking new disc");
|
||||||
|
cdvd.Tray.trayState = CDVD_DISC_SEEKING;
|
||||||
|
cdvd.Tray.cdvdActionSeconds = 2;
|
||||||
|
break;
|
||||||
case CDVD_DISC_SEEKING:
|
case CDVD_DISC_SEEKING:
|
||||||
case CDVD_DISC_ENGAGED:
|
case CDVD_DISC_ENGAGED:
|
||||||
cdvd.Tray.trayState = CDVD_DISC_ENGAGED;
|
cdvd.Tray.trayState = CDVD_DISC_ENGAGED;
|
||||||
|
@ -1407,8 +1414,8 @@ u8 cdvdRead(u8 key)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CDVD_LOG("cdvdRead0F(Disc Type) Detecting %x", (cdvd.Tray.trayState == CDVD_DISC_SEEKING) ? 1 : 0);
|
CDVD_LOG("cdvdRead0F(Disc Type) Detecting %x", (cdvd.Tray.trayState <= CDVD_DISC_SEEKING) ? cdvdTrayStateDetecting() : 0);
|
||||||
return (cdvd.Tray.trayState == CDVD_DISC_SEEKING) ? cdvdTrayStateDetecting() : 0; // Detecting Disc / No Disc
|
return (cdvd.Tray.trayState <= CDVD_DISC_SEEKING) ? cdvdTrayStateDetecting() : 0; // Detecting Disc / No Disc
|
||||||
}
|
}
|
||||||
|
|
||||||
case 0x13: // UNKNOWN
|
case 0x13: // UNKNOWN
|
||||||
|
|
|
@ -79,6 +79,7 @@ struct cdvdRTC
|
||||||
enum TrayStates
|
enum TrayStates
|
||||||
{
|
{
|
||||||
CDVD_DISC_ENGAGED,
|
CDVD_DISC_ENGAGED,
|
||||||
|
CDVD_DISC_DETECTING,
|
||||||
CDVD_DISC_SEEKING,
|
CDVD_DISC_SEEKING,
|
||||||
CDVD_DISC_EJECT
|
CDVD_DISC_EJECT
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue