-changed and cleaned up GC disc booting, should be faster

now
-updated german.ini
-updated italian.ini (thanks xFede)
This commit is contained in:
fix94.1 2012-03-18 13:29:17 +00:00
parent fb881c9fa6
commit 137256fc70
6 changed files with 357 additions and 353 deletions

View File

@ -256,7 +256,7 @@ s32 Disc_Open(void)
ret = WDVD_ReadDiskId(diskid);
/* Directly set Audio Streaming for GC */
WDVD_setstreaming();
gprintf("Setting Audio Streaming for GC Games: 0x%08x\n", WDVD_SetStreaming());
return ret;
}

View File

@ -5,26 +5,26 @@
#include "gecko.h"
/* Constants */
#define IOCTL_DI_READID 0x70
#define IOCTL_DI_READ 0x71
#define IOCTL_DI_WAITCVRCLOSE 0x79
#define IOCTL_DI_GETCOVER 0x88
#define IOCTL_DI_RESET 0x8A
#define IOCTL_DI_OPENPART 0x8B
#define IOCTL_DI_CLOSEPART 0x8C
#define IOCTL_DI_UNENCREAD 0x8D
#define IOCTL_DI_SEEK 0xAB
#define IOCTL_DI_STOPLASER 0xD2
#define IOCTL_DI_OFFSET 0xD9
#define IOCTL_DI_DISC_BCA 0xDA
#define IOCTL_DI_REQUESTERROR 0xE0
#define IOCTL_DI_STOPMOTOR 0xE3
#define IOCTL_DI_SETWBFSMODE 0xF4
#define IOCTL_DI_DVDLowAudioBufferConfig 0xE4
#define IOCTL_DI_READID 0x70
#define IOCTL_DI_READ 0x71
#define IOCTL_DI_WAITCVRCLOSE 0x79
#define IOCTL_DI_GETCOVER 0x88
#define IOCTL_DI_RESET 0x8A
#define IOCTL_DI_OPENPART 0x8B
#define IOCTL_DI_CLOSEPART 0x8C
#define IOCTL_DI_UNENCREAD 0x8D
#define IOCTL_DI_SEEK 0xAB
#define IOCTL_DI_STOPLASER 0xD2
#define IOCTL_DI_OFFSET 0xD9
#define IOCTL_DI_DISC_BCA 0xDA
#define IOCTL_DI_REQUESTERROR 0xE0
#define IOCTL_DI_STOPMOTOR 0xE3
#define IOCTL_DI_DVDAUDIOBUFFERCFG 0xE4
#define IOCTL_DI_SETWBFSMODE 0xF4
#define IOCTL_DI_SETFRAG 0xF9
#define IOCTL_DI_GETMODE 0xFA
#define IOCTL_DI_HELLO 0xFB
#define IOCTL_DI_SETFRAG 0xF9
#define IOCTL_DI_GETMODE 0xFA
#define IOCTL_DI_HELLO 0xFB
/* Variables */
static u32 inbuf[8] ATTRIBUTE_ALIGN(32);
@ -33,39 +33,6 @@ static u32 outbuf[8] ATTRIBUTE_ALIGN(32);
static const char di_fs[] ATTRIBUTE_ALIGN(32) = "/dev/di";
static s32 di_fd = -1;
s32 WDVD_setstreaming()
{
u8 ioctl;
ioctl = IOCTL_DI_DVDLowAudioBufferConfig;
memset(inbuf, 0, 0x20);
memset(outbuf, 0, 0x20);
inbuf[0] = (ioctl << 24);
if ( (*(u32*)0x80000008)>>24 )
{
inbuf[1] = 1;
if( ((*(u32*)0x80000008)>>16) & 0xFF )
{
inbuf[2] = 10;
} else
{
inbuf[2] = 0;
}
}
else
{
inbuf[1] = 0;
inbuf[2] = 0;
}
DCFlushRange(inbuf, 0x20);
int Ret = IOS_Ioctl(di_fd, ioctl, inbuf, 0x20, outbuf, 0x20);
return ((Ret == 1) ? 0 : -Ret);
}
s32 WDVD_Init(void)
{
/* Open "/dev/di" */
@ -375,8 +342,6 @@ s32 WDVD_SetFragList(int device, void *fraglist, int size)
return (ret == 1) ? 0 : -ret;
}
#define IOCTL_DI_HELLO 0xFB
s32 WDVD_hello(u32 *status)
{
memset(inbuf, 0, sizeof(inbuf));
@ -395,3 +360,29 @@ s32 WDVD_hello(u32 *status)
return -ret;
}
s32 WDVD_SetStreaming(void)
{
memset(inbuf, 0, sizeof(inbuf));
inbuf[0] = IOCTL_DI_DVDAUDIOBUFFERCFG << 24;
if ((*(u32*)0x80000008)>>24)
{
inbuf[1] = 1;
if(((*(u32*)0x80000008)>>16) & 0xFF)
inbuf[2] = 10;
else
inbuf[2] = 0;
}
else
{
inbuf[1] = 0;
inbuf[2] = 0;
}
s32 ret = IOS_Ioctl(di_fd, IOCTL_DI_DVDAUDIOBUFFERCFG, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf));
if (ret < 0) return ret;
return (ret == 1) ? 0 : -ret;
}

View File

@ -26,7 +26,7 @@ s32 WDVD_SetUSBMode(u32, const u8 *, s32);
s32 WDVD_Eject(void);
s32 WDVD_Read_Disc_BCA(void *);
s32 WDVD_SetFragList(int device, void *fraglist, int size);
s32 WDVD_setstreaming();
s32 WDVD_SetStreaming(void);
#ifdef __cplusplus
}

View File

@ -622,17 +622,17 @@ void CMenu::_launch(dir_discHdr *hdr)
switch(m_current_view)
{
case COVERFLOW_HOMEBREW:
_launchHomebrew( (char *)hdr->path, m_homebrewArgs );
_launchHomebrew((char *)hdr->path, m_homebrewArgs);
break;
case COVERFLOW_CHANNEL:
_launchChannel( hdr );
_launchChannel(hdr);
break;
case COVERFLOW_DML:
_launchGC( hdr, true );
_launchGC(hdr, true);
break;
case COVERFLOW_USB:
default:
_launchGame( hdr, false );
_launchGame(hdr, false);
break;
}
}
@ -697,6 +697,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
WDVD_Close();
}
}
else
gprintf("Booting GC game\n");
memcpy((char *)0x80000000, id, 6);
if(((id[3] == 'P') && (DMLvideoMode == 0)) || (DMLvideoMode == 1))
@ -714,16 +716,17 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
m_cfg.save(true);
CheckGameSoundThread();
_hideWaitMessage();
cleanup();
Close_Inputs();
USBStorage_Deinit();
SDHC_Init();
if(DML)
SDHC_Init();
_hideWaitMessage();
Nand::Instance()->Disable_Emu();
if(WII_LaunchTitle(0x100000100LL) < 0 )
if(WII_LaunchTitle(0x100000100LL) < 0)
Sys_LoadMenu();
}
@ -950,7 +953,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
string id = string((const char *) hdr->hdr.id);
Nand::Instance()->Disable_Emu();
bool gc = false;
if (dvd)
{
u32 cover = 0;
@ -985,7 +987,15 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
if (BTN_B_PRESSED) return;
}
else
gc = true;
{
/* Read GC disc header */
struct gc_discHdr *gcHeader = (struct gc_discHdr *)MEM2_alloc(sizeof(struct gc_discHdr));
Disc_ReadGCHeader(gcHeader);
memcpy(hdr->hdr.id, gcHeader->id, 6);
SAFE_FREE(gcHeader);
/* Launching GC Game */
_launchGC(hdr, false);
}
}
/* Read header */
@ -1039,20 +1049,21 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
}
}
int gameIOS = 0;
int userIOS = 0;
if (m_gcfg2.getInt(id, "ios", &userIOS) && _installed_cios.size() > 0)
int gameIOS = 0;
int userIOS = 0;
if (m_gcfg2.getInt(id, "ios", &userIOS) && _installed_cios.size() > 0)
{
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
{
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
if(itr->second == userIOS || itr->first == userIOS)
{
if(itr->second == userIOS || itr->first == userIOS)
{
gameIOS = itr->first;
break;
}
else gameIOS = 0;
gameIOS = itr->first;
break;
}
else
gameIOS = 0;
}
}
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
hooktype = (u32) m_gcfg2.getInt(id, "hooktype", 0); // hooktype is defined in patchcode.h
@ -1199,7 +1210,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
return;
}
if (Disc_Open() < 0)
{
error(L"Disc_Open failed");
@ -1214,17 +1224,9 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
if(currentPartition == 0)
SDHC_Init();
if(gc)
{
memcpy((char*)hdr->hdr.id, id.c_str(),6);
_launchGC( hdr, false );
}
else
{
gprintf("Booting game\n");
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio) < 0)
Sys_LoadMenu();
}
gprintf("Booting game\n");
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio) < 0)
Sys_LoadMenu();
}
void CMenu::_initGameMenu(CMenu::SThemeData &theme)

View File

@ -170,7 +170,7 @@ lngspa=Spanisch
lngsys=Konsole
lngtch=Chinesisch (traditionell)
main1=Installieren
main2=Willkommen zu WiiFlow.\n\nEs wurde kein Spiel gefunden.\nKlicke Installieren um Spiele zu installieren oder Partition um eine Partition zu wählen.
main2=Willkommen zu WiiFlow.\n\nKeine Spiele gefunden.\nklicke auf Installieren oder Partition um eine andere Partition zu wählen.
main3=Partition
mastersystem=Sega Master System
menu=System Menü

View File

@ -1,4 +1,4 @@

[ITALIAN]
about1=Loader originale a cura di:\n%s
about2=Interfaccia grafica a cura di:\n%s
@ -62,10 +62,12 @@ cfgg2=Modalità video
cfgg21=Ritorna al canale
cfgg22=Debugger
cfgg23=Scaricando trucchi...
cfgg24=Emulazione salvataggi
cfgg24=Emulazione NAND
cfgg25=Password sbagliata
cfgg26=Disabilita IOS Reload Block
cfgg27=Formato TV
cfgg28=NMM
cfgg29=Patch NO-DVD
cfgg3=Lingua
cfgg4=Patch codice regione
cfgg5=Ocarina
@ -178,6 +180,13 @@ NANDpart=Parziale
neogeo=Neo-Geo
nes=Nintendo
nintendo64=Nintendo64
NMMDef=Predefinita
NMMOff=Disattivata
NMMon=Attivata
NMMdebug=Debug
NoDVDDef=Predefinita
NoDVDOff=Disattivata
NoDVDon=Attivata
off=Off
on=On
players=Giocatori
@ -187,8 +196,10 @@ SaveFull=Completa
SaveFullG=Completa
SaveOff=Off
SaveOffG=Off
SavePart=Parziale
SavePartG=Parziale
SavePart=Salvataggio
SavePartG=Salvataggio
SaveReg=Cambia regione
SaveRegG=Cambia regione
snes=Super Nintendo
sys1=Aggiorna Wiiflow
sys2=Versione di Wiiflow: