mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 11:19:17 +01:00
*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
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>1.0 r932</version>
|
||||
<release_date>201005290827</release_date>
|
||||
<version>1.0 r933</version>
|
||||
<release_date>201005291607</release_date>
|
||||
<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.
|
||||
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "gecko.h"
|
||||
|
||||
//these are the only stable and speed is good
|
||||
#define CACHE 8
|
||||
#define CACHE 32
|
||||
#define SECTORS 64
|
||||
#define SECTORS_SD 32
|
||||
|
||||
@ -188,16 +188,16 @@ s32 MountNTFS(u32 sector)
|
||||
// }
|
||||
/* Mount device */
|
||||
// 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) {
|
||||
return -2;
|
||||
}
|
||||
// }
|
||||
} else if (wbfsDev == WBFS_DEVICE_SDHC) {
|
||||
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 {
|
||||
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) {
|
||||
return -5;
|
||||
|
@ -577,9 +577,8 @@ int MenuDiscList() {
|
||||
w.Append(&sdcardBtn);
|
||||
w.Append(&poweroffBtn);
|
||||
w.Append(&gameInfo);
|
||||
if (Settings.godmode) {
|
||||
if (Settings.godmode && load_from_fs != PART_FS_NTFS)
|
||||
w.Append(&installBtn);
|
||||
}
|
||||
w.Append(&homeBtn);
|
||||
w.Append(&settingsBtn);
|
||||
w.Append(&DownloadBtn);
|
||||
@ -802,11 +801,21 @@ int MenuDiscList() {
|
||||
}
|
||||
} else if (installBtn.GetState() == STATE_CLICKED) {
|
||||
gprintf("\n\tinstallBtn clicked");
|
||||
choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No"));
|
||||
if (choice == 1) {
|
||||
menu = MENU_INSTALL;
|
||||
if (load_from_fs == PART_FS_NTFS)
|
||||
{
|
||||
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;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
installBtn.ResetState();
|
||||
if (Settings.gameDisplay==list) {
|
||||
gameBrowser->SetFocus(1);
|
||||
@ -816,7 +825,7 @@ int MenuDiscList() {
|
||||
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");
|
||||
choice = WindowPrompt(tr("New Disc Detected"),0,tr("Install"),tr("Mount DVD drive"),tr("Cancel"));
|
||||
if (choice == 1) {
|
||||
|
@ -97,7 +97,7 @@ typedef struct _dolheader {
|
||||
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;
|
||||
|
||||
@ -105,15 +105,19 @@ u32 load_dol_image(void *dolstart) {
|
||||
dolfile = (dolheader *) dolstart;
|
||||
for (i = 0; i < 7; i++) {
|
||||
if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) continue;
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
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]);
|
||||
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++) {
|
||||
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]);
|
||||
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]);
|
||||
}
|
||||
/*
|
||||
@ -223,9 +227,9 @@ u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u
|
||||
|
||||
gamepatches(offset, len, videoSelected, patchcountrystring, vipatch, cheat);
|
||||
|
||||
DCFlushRange(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 */
|
||||
|
||||
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);
|
||||
u32 load_dol_image(void * dolstart);
|
||||
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;
|
||||
int dollen;
|
||||
|
||||
bool dolloaded = Load_Dol(&dolbuffer, &dollen, Settings.dolpath);
|
||||
if (dolloaded) {
|
||||
Remove_001_Protection(dolbuffer, dollen);
|
||||
|
||||
gamepatches(dolbuffer, dollen, videoSelected, patchcountrystring, vipatch, cheat);
|
||||
|
||||
bool dolloaded = Load_Dol(&dolbuffer, &dollen, Settings.dolpath, videoSelected, patchcountrystring, vipatch, cheat);
|
||||
if (dolloaded)
|
||||
{
|
||||
DCFlushRange(dolbuffer, dollen);
|
||||
|
||||
/* Set entry point from apploader */
|
||||
*entry = (entry_point) load_dol_image(dolbuffer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user