mirror of https://github.com/PCSX2/pcsx2.git
CDVD:
- First version of a disc swap that actually works. May not work yet. :p - It's ugly and incomplete but it works in Star Ocean 3. (I blame the heat!) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3432 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
284f1c9f4c
commit
a213da2346
|
@ -476,6 +476,13 @@ s32 cdvdReadSubQ(s32 lsn, cdvdSubQ* subq)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void openVirtualTray()
|
||||
{
|
||||
DiscSwapTimerSeconds = cdvd.RTC.second;
|
||||
cdvd.Status = CDVD_STATUS_TRAY_OPEN;
|
||||
cdvd.Ready = CDVD_NOTREADY;
|
||||
}
|
||||
|
||||
s32 cdvdCtrlTrayOpen()
|
||||
{
|
||||
s32 ret = CDVD->ctrlTrayOpen();
|
||||
|
@ -916,6 +923,16 @@ void cdvdVsync() {
|
|||
if (cdvd.RTCcount < ((gsRegionMode == Region_NTSC) ? 60 : 50)) return;
|
||||
cdvd.RTCcount = 0;
|
||||
|
||||
if ( cdvd.Status == CDVD_STATUS_TRAY_OPEN )
|
||||
{
|
||||
if ( cdvd.RTC.second != DiscSwapTimerSeconds)
|
||||
{
|
||||
Console.Warning("Close virtual disk tray");
|
||||
cdvd.Status = CDVD_STATUS_PAUSE;
|
||||
cdvd.Ready = CDVD_READY1;
|
||||
}
|
||||
}
|
||||
|
||||
cdvd.RTC.second++;
|
||||
if (cdvd.RTC.second < 60) return;
|
||||
cdvd.RTC.second = 0;
|
||||
|
|
|
@ -144,5 +144,6 @@ extern u8 cdvdRead(u8 key);
|
|||
extern void cdvdWrite(u8 key, u8 rt);
|
||||
|
||||
extern void cdvdReloadElfInfo(wxString elfoverride = wxEmptyString);
|
||||
extern void openVirtualTray();
|
||||
|
||||
extern wxString DiscSerial;
|
||||
|
|
|
@ -136,6 +136,7 @@ static const uint PSX_DVD_READSPEED = 1382400 + 256000; // normal is 1 Byte Time
|
|||
|
||||
static const uint Cdvd_FullSeek_Cycles = (PSXCLK*100) / 1000; // average number of cycles per fullseek (100ms)
|
||||
static const uint Cdvd_FastSeek_Cycles = (PSXCLK*30) / 1000; // average number of cycles per fastseek (37ms)
|
||||
short DiscSwapTimerSeconds = 0;
|
||||
|
||||
static const char *mg_zones[8] = {"Japan", "USA", "Europe", "Oceania", "Asia", "Russia", "China", "Mexico"};
|
||||
|
||||
|
|
|
@ -400,6 +400,9 @@ void DoCDVDclose()
|
|||
CDVD->close();
|
||||
|
||||
DoCDVDresetDiskTypeCache();
|
||||
|
||||
Console.Warning("Closing CDVD plugin > open virtual disk tray");
|
||||
openVirtualTray();
|
||||
}
|
||||
|
||||
s32 DoCDVDreadSector(u8* buffer, u32 lsn, int mode)
|
||||
|
|
Loading…
Reference in New Issue