void DiscOpenLid()
{
	TermDrive();
	NullDriveDiscType = Open;
	gd_setdisc();
	sns_asc = 0x29;
	sns_ascq = 0x00;
	sns_key = 0x6;
}
Exemple #2
0
void EXPORT_CALL handle_SwitchDisc(u32 id,void* w,void* p)
{
	//msgboxf("This feature is not yet implemented",MB_ICONWARNING);
	//return;
	TermDrive();
	
	NullDriveDiscType=Busy;
	DriveNotifyEvent(DiskChange,0);
	mdelay(150);	//busy for a bit

	NullDriveDiscType=Open;
	DriveNotifyEvent(DiskChange,0);
	mdelay(150); //tray is open

	while(!InitDrive(2))//no "cancel"
		msgboxf("Init Drive failed, disc must be valid for swap",0x00000010L);

	DriveNotifyEvent(DiskChange,0);
	//new disc is in
}
Exemple #3
0
bool InitDrive_(wchar* fn)
{
	TermDrive();

	//try all drivers
	for (int i=0;drivers[i] && !(disc=drivers[i](fn));i++) ;

	if (disc!=0)
	{
		NullDriveDiscType=Busy;
		DriveNotifyEvent(DiskChange,0);
		mdelay(400); //busy for a bit
		return true;
	}
	else
	{
		NullDriveDiscType=NoDisk; //no disc :)
	}
	return false;
}
bool InitDrive_(wchar* fn)
{
	TermDrive();

	//try all drivers
	disc = OpenDisc(fn);

	if (disc != NULL)
	{
		printf("gdrom: Opened image \"%s\"\n",fn);
		NullDriveDiscType = Busy;
	}
	else
	{
		printf("gdrom: Failed to open image \"%s\"\n",fn);
		NullDriveDiscType = NoDisk; //no disc :)
	}
	libCore_gdrom_disc_change();

	return disc != NULL;
}
//called when exiting from sh4 thread , from the new thread context (for any thread specific init) :P
void libGDR_Term()
{
	TermDrive();
}
Exemple #6
0
//called when exiting from sh4 thread , from the new thread context (for any thread speciacific de init) :P
void FASTCALL TermGDR()
{
	TermDrive();
}