*Disabled NTFS write because the installer is still unstable and made NTFS mount read only
*Changed cache size for mounts higher again which speeds up everything especially from SD *Fixed bug when loading OCARINA+Alternative DOL. (Wasn't booting at all)
This commit is contained in:
parent
f0ca11506b
commit
095d09eb93
6 changed files with 35 additions and 26 deletions
|
@ -2,8 +2,8 @@
|
||||||
<app version="1">
|
<app version="1">
|
||||||
<name> USB Loader GX</name>
|
<name> USB Loader GX</name>
|
||||||
<coder>USB Loader GX Team</coder>
|
<coder>USB Loader GX Team</coder>
|
||||||
<version>1.0 r932</version>
|
<version>1.0 r933</version>
|
||||||
<release_date>201005290827</release_date>
|
<release_date>201005291607</release_date>
|
||||||
<short_description>Loads games from USB-devices</short_description>
|
<short_description>Loads games from USB-devices</short_description>
|
||||||
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
|
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
|
||||||
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.
|
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "gecko.h"
|
#include "gecko.h"
|
||||||
|
|
||||||
//these are the only stable and speed is good
|
//these are the only stable and speed is good
|
||||||
#define CACHE 8
|
#define CACHE 32
|
||||||
#define SECTORS 64
|
#define SECTORS 64
|
||||||
#define SECTORS_SD 32
|
#define SECTORS_SD 32
|
||||||
|
|
||||||
|
@ -188,16 +188,16 @@ s32 MountNTFS(u32 sector)
|
||||||
// }
|
// }
|
||||||
/* Mount device */
|
/* Mount device */
|
||||||
// if (!ntfsMount("NTFS", &__io_wiiums, sector, CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER)) {
|
// if (!ntfsMount("NTFS", &__io_wiiums, sector, CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER)) {
|
||||||
ret = ntfsMount("NTFS", &__io_usbstorage2, sector, CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER);
|
ret = ntfsMount("NTFS", &__io_usbstorage2, sector, CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_READ_ONLY | NTFS_RECOVER);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
} else if (wbfsDev == WBFS_DEVICE_SDHC) {
|
} else if (wbfsDev == WBFS_DEVICE_SDHC) {
|
||||||
if (sdhc_mode_sd == 0) {
|
if (sdhc_mode_sd == 0) {
|
||||||
ret = ntfsMount("NTFS", &__io_sdhc, 0, 8, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER);
|
ret = ntfsMount("NTFS", &__io_sdhc, 0, CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_READ_ONLY | NTFS_RECOVER);
|
||||||
} else {
|
} else {
|
||||||
ret = ntfsMount("NTFS", &__io_sdhc, 0, 8, SECTORS_SD, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER);
|
ret = ntfsMount("NTFS", &__io_sdhc, 0, CACHE, SECTORS_SD, NTFS_SHOW_HIDDEN_FILES | NTFS_READ_ONLY | NTFS_RECOVER);
|
||||||
}
|
}
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return -5;
|
return -5;
|
||||||
|
|
|
@ -577,9 +577,8 @@ int MenuDiscList() {
|
||||||
w.Append(&sdcardBtn);
|
w.Append(&sdcardBtn);
|
||||||
w.Append(&poweroffBtn);
|
w.Append(&poweroffBtn);
|
||||||
w.Append(&gameInfo);
|
w.Append(&gameInfo);
|
||||||
if (Settings.godmode) {
|
if (Settings.godmode && load_from_fs != PART_FS_NTFS)
|
||||||
w.Append(&installBtn);
|
w.Append(&installBtn);
|
||||||
}
|
|
||||||
w.Append(&homeBtn);
|
w.Append(&homeBtn);
|
||||||
w.Append(&settingsBtn);
|
w.Append(&settingsBtn);
|
||||||
w.Append(&DownloadBtn);
|
w.Append(&DownloadBtn);
|
||||||
|
@ -802,11 +801,21 @@ int MenuDiscList() {
|
||||||
}
|
}
|
||||||
} else if (installBtn.GetState() == STATE_CLICKED) {
|
} else if (installBtn.GetState() == STATE_CLICKED) {
|
||||||
gprintf("\n\tinstallBtn clicked");
|
gprintf("\n\tinstallBtn clicked");
|
||||||
choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No"));
|
if (load_from_fs == PART_FS_NTFS)
|
||||||
if (choice == 1) {
|
{
|
||||||
menu = MENU_INSTALL;
|
choice = 0;
|
||||||
|
WindowPrompt(tr("Install not possible"), tr("You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible."), tr("OK"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No"));
|
||||||
|
if (choice == 1)
|
||||||
|
{
|
||||||
|
if (load_from_fs == PART_FS_NTFS)
|
||||||
|
menu = MENU_INSTALL;
|
||||||
break;
|
break;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
installBtn.ResetState();
|
installBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list) {
|
if (Settings.gameDisplay==list) {
|
||||||
gameBrowser->SetFocus(1);
|
gameBrowser->SetFocus(1);
|
||||||
|
@ -816,7 +825,7 @@ int MenuDiscList() {
|
||||||
gameCarousel->SetFocus(1);
|
gameCarousel->SetFocus(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if ((covert & 0x2)&&(covert!=covertOld)) {
|
} else if ((covert & 0x2)&&(covert!=covertOld) && load_from_fs != PART_FS_NTFS) {
|
||||||
gprintf("\n\tNew Disc Detected");
|
gprintf("\n\tNew Disc Detected");
|
||||||
choice = WindowPrompt(tr("New Disc Detected"),0,tr("Install"),tr("Mount DVD drive"),tr("Cancel"));
|
choice = WindowPrompt(tr("New Disc Detected"),0,tr("Install"),tr("Mount DVD drive"),tr("Cancel"));
|
||||||
if (choice == 1) {
|
if (choice == 1) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ typedef struct _dolheader {
|
||||||
static dolheader *dolfile;
|
static dolheader *dolfile;
|
||||||
|
|
||||||
|
|
||||||
u32 load_dol_image(void *dolstart) {
|
u32 load_dol_image(void *dolstart, u8 videoSelected, u8 patchcountrystring, u8 vipatch, u8 cheat) {
|
||||||
|
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
|
@ -105,15 +105,19 @@ u32 load_dol_image(void *dolstart) {
|
||||||
dolfile = (dolheader *) dolstart;
|
dolfile = (dolheader *) dolstart;
|
||||||
for (i = 0; i < 7; i++) {
|
for (i = 0; i < 7; i++) {
|
||||||
if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) continue;
|
if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) continue;
|
||||||
VIDEO_WaitVSync();
|
|
||||||
ICInvalidateRange ((void *) dolfile->text_start[i],dolfile->text_size[i]);
|
ICInvalidateRange ((void *) dolfile->text_start[i],dolfile->text_size[i]);
|
||||||
memmove ((void *) dolfile->text_start[i],dolstart+dolfile->text_pos[i],dolfile->text_size[i]);
|
memmove ((void *) dolfile->text_start[i],dolstart+dolfile->text_pos[i],dolfile->text_size[i]);
|
||||||
|
gamepatches((void *) dolfile->text_start[i], dolfile->text_size[i], videoSelected, patchcountrystring, vipatch, cheat);
|
||||||
|
Remove_001_Protection((void *) dolfile->data_start[i], dolfile->data_size[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 11; i++) {
|
for (i = 0; i < 11; i++) {
|
||||||
if ((!dolfile->data_size[i]) || (dolfile->data_start[i] < 0x100)) continue;
|
if ((!dolfile->data_size[i]) || (dolfile->data_start[i] < 0x100)) continue;
|
||||||
VIDEO_WaitVSync();
|
|
||||||
memmove ((void *) dolfile->data_start[i],dolstart+dolfile->data_pos[i],dolfile->data_size[i]);
|
memmove ((void *) dolfile->data_start[i],dolstart+dolfile->data_pos[i],dolfile->data_size[i]);
|
||||||
|
gamepatches((void *) dolfile->data_start[i], dolfile->data_size[i], videoSelected, patchcountrystring, vipatch, cheat);
|
||||||
|
Remove_001_Protection((void *) dolfile->data_start[i], dolfile->data_size[i]);
|
||||||
DCFlushRangeNoSync ((void *) dolfile->data_start[i],dolfile->data_size[i]);
|
DCFlushRangeNoSync ((void *) dolfile->data_start[i],dolfile->data_size[i]);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -223,9 +227,9 @@ u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u
|
||||||
|
|
||||||
gamepatches(offset, len, videoSelected, patchcountrystring, vipatch, cheat);
|
gamepatches(offset, len, videoSelected, patchcountrystring, vipatch, cheat);
|
||||||
|
|
||||||
DCFlushRange(offset, len);
|
|
||||||
|
|
||||||
Remove_001_Protection(offset, len);
|
Remove_001_Protection(offset, len);
|
||||||
|
|
||||||
|
DCFlushRange(offset, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ extern "C" {
|
||||||
|
|
||||||
/* not the full path is needed here, the path where the dol is */
|
/* not the full path is needed here, the path where the dol is */
|
||||||
|
|
||||||
bool Load_Dol(void **buffer, int* dollen, char * path);
|
bool Load_Dol(void **buffer, int* dollen, char * path, u8 videoSelected, u8 patchcountrystring, u8 vipatch, u8 cheat);
|
||||||
bool Remove_001_Protection(void *Address, int Size);
|
bool Remove_001_Protection(void *Address, int Size);
|
||||||
u32 load_dol_image(void * dolstart);
|
u32 load_dol_image(void * dolstart);
|
||||||
u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u8 vipatch, u8 cheat);
|
u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u8 vipatch, u8 cheat);
|
||||||
|
|
|
@ -390,14 +390,10 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
|
||||||
void *dolbuffer;
|
void *dolbuffer;
|
||||||
int dollen;
|
int dollen;
|
||||||
|
|
||||||
bool dolloaded = Load_Dol(&dolbuffer, &dollen, Settings.dolpath);
|
bool dolloaded = Load_Dol(&dolbuffer, &dollen, Settings.dolpath, videoSelected, patchcountrystring, vipatch, cheat);
|
||||||
if (dolloaded) {
|
if (dolloaded)
|
||||||
Remove_001_Protection(dolbuffer, dollen);
|
{
|
||||||
|
|
||||||
gamepatches(dolbuffer, dollen, videoSelected, patchcountrystring, vipatch, cheat);
|
|
||||||
|
|
||||||
DCFlushRange(dolbuffer, dollen);
|
DCFlushRange(dolbuffer, dollen);
|
||||||
|
|
||||||
/* Set entry point from apploader */
|
/* Set entry point from apploader */
|
||||||
*entry = (entry_point) load_dol_image(dolbuffer);
|
*entry = (entry_point) load_dol_image(dolbuffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue