mirror of https://github.com/PCSX2/pcsx2.git
Give more information about the active disk even in Release builds.
Remove unnecessary re-checks at startup, so the cdvd info only shows up once (and every time the plugin notifies of a disk change). Add a condition to print which shouldn't be printing always. Add a little "hack" to Mechacon command 0x80 ... will get rid of it later if it doesn't help. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1525 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
21dac50152
commit
437d05e9f8
|
@ -517,14 +517,14 @@ void SaveState::cdvdFreeze()
|
|||
}
|
||||
|
||||
// Modified by (efp) - 16/01/2006
|
||||
void cdvdNewDiskCB()
|
||||
|
||||
void cdvdDetectDisk()
|
||||
{
|
||||
DoCDVDresetDiskTypeCache();
|
||||
cdvd.Type = DoCDVDdetectDiskType();
|
||||
|
||||
char str[g_MaxPath];
|
||||
int result = GetPS2ElfName(str);
|
||||
|
||||
|
||||
// Now's a good time to reload the ELF info...
|
||||
if( ElfCRC == 0 )
|
||||
{
|
||||
|
@ -534,6 +534,13 @@ void cdvdNewDiskCB()
|
|||
}
|
||||
}
|
||||
|
||||
void cdvdNewDiskCB()
|
||||
{
|
||||
DoCDVDresetDiskTypeCache();
|
||||
|
||||
cdvdDetectDisk();
|
||||
}
|
||||
|
||||
void mechaDecryptBytes( u32 madr, int size )
|
||||
{
|
||||
int i;
|
||||
|
@ -904,7 +911,7 @@ u8 cdvdRead(u8 key)
|
|||
break;
|
||||
|
||||
case 0x08: // STATUS
|
||||
CDR_LOG("cdvdRead0A(Status) %x", cdvd.Status);
|
||||
CDR_LOG("cdvdRead08(Status) %x", cdvd.Status);
|
||||
return cdvd.Status;
|
||||
break;
|
||||
|
||||
|
@ -1348,7 +1355,15 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
cdvd.Result[4] = 0x01;//hour
|
||||
cdvd.Result[5] = 0x30;//min
|
||||
break;
|
||||
|
||||
|
||||
case 0x80: // completely stupid code, but might even work... whatever it is menat to be for :P
|
||||
SetResultSize(1);
|
||||
if((CDVD.getDiskType()==CDVD_TYPE_NODISC)||(CDVD.getTrayStatus()==CDVD_TRAY_OPEN))
|
||||
cdvd.Result[0] = 0x80;
|
||||
else
|
||||
cdvd.Result[0] = 0x00;
|
||||
break;
|
||||
|
||||
default:
|
||||
SetResultSize(1);
|
||||
cdvd.Result[0] = 0x80;
|
||||
|
|
|
@ -101,6 +101,7 @@ extern void cdvdActionInterrupt();
|
|||
extern void cdvdReadInterrupt();
|
||||
|
||||
// We really should not have a function with the exact same name as a callback except for case!
|
||||
extern void cdvdDetectDisk();
|
||||
extern void cdvdNewDiskCB();
|
||||
extern u8 cdvdRead(u8 key);
|
||||
extern void cdvdWrite(u8 key, u8 rt);
|
||||
|
@ -112,5 +113,4 @@ extern CDVDplugin CDVD;
|
|||
extern CDVDplugin ISO;
|
||||
extern CDVDplugin NODISC;
|
||||
|
||||
|
||||
#endif /* __CDVD_H__ */
|
||||
|
|
|
@ -137,13 +137,13 @@ int FindDiskType(int mType)
|
|||
switch(iCDType)
|
||||
{
|
||||
case CDVD_TYPE_DETCTCD:
|
||||
DevCon::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", params tn.etrack-tn.strack+1,tn.strack,tn.etrack);
|
||||
Console::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", params tn.etrack-tn.strack+1,tn.strack,tn.etrack);
|
||||
break;
|
||||
case CDVD_TYPE_DETCTDVDS:
|
||||
DevCon::Status(" * CDVD Disk Open: DVD, Single layer or unknown:");
|
||||
Console::Status(" * CDVD Disk Open: DVD, Single layer or unknown:");
|
||||
break;
|
||||
case CDVD_TYPE_DETCTDVDD:
|
||||
DevCon::Status(" * CDVD Disk Open: DVD, Double layer:");
|
||||
Console::Status(" * CDVD Disk Open: DVD, Double layer:");
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -164,12 +164,12 @@ int FindDiskType(int mType)
|
|||
if(td.type==CDVD_AUDIO_TRACK)
|
||||
{
|
||||
audioTracks++;
|
||||
DevCon::Status(" * * Track %d: Audio (%d sectors)", params i,tlength);
|
||||
Console::Status(" * * Track %d: Audio (%d sectors)", params i,tlength);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataTracks++;
|
||||
DevCon::Status(" * * Track %d: Data (Mode %d) (%d sectors)", params i,((td.type==CDVD_MODE1_TRACK)?1:2),tlength);
|
||||
Console::Status(" * * Track %d: Data (Mode %d) (%d sectors)", params i,((td.type==CDVD_MODE1_TRACK)?1:2),tlength);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,8 @@ static void FindLayer1Start()
|
|||
layer1start=-2;
|
||||
}
|
||||
|
||||
Console::Status("found at 0x%8.8x\n", params layer1start);
|
||||
if(layer1start>=0)
|
||||
Console::Status("found at 0x%8.8x\n", params layer1start);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -496,7 +496,6 @@ void cdrInterrupt() {
|
|||
}
|
||||
|
||||
void cdrReadInterrupt() {
|
||||
u8 buf[2352];
|
||||
|
||||
if (!cdr.Reading)
|
||||
return;
|
||||
|
|
|
@ -970,7 +970,7 @@ int OpenPlugins(const char* pTitleFilename)
|
|||
(!OpenSPU2()) || (!OpenDEV9()) || (!OpenUSB()) || (!OpenFW()))
|
||||
return -1;
|
||||
|
||||
if (!only_loading_elf) cdvdNewDiskCB();
|
||||
if (!only_loading_elf) cdvdDetectDisk();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
case ID_CONFIG_CDVDROM:
|
||||
if (CDVD.configure) CDVD.configure();
|
||||
if (CDVD_plugin.configure) CDVD_plugin.configure();
|
||||
break;
|
||||
|
||||
case ID_CONFIG_DEV9:
|
||||
|
|
Loading…
Reference in New Issue