mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-fixed installing gamecube games with a disc two
-fixed booting wii games in neek mode (thanks skidau for finding the problem)
This commit is contained in:
parent
87d895e304
commit
e441320b8d
@ -112,17 +112,6 @@ static void PatchAHB()
|
||||
bool loadIOS(int ios, bool launch_game, bool emu_channel)
|
||||
{
|
||||
#ifndef DOLPHIN
|
||||
if(neek2o())
|
||||
{
|
||||
memset(&CurrentIOS, 0, sizeof(IOS_Info));
|
||||
CurrentIOS.Version = 254;
|
||||
CurrentIOS.Type = IOS_TYPE_D2X;
|
||||
CurrentIOS.Base = 254;
|
||||
CurrentIOS.Revision = 999;
|
||||
DCFlushRange(&CurrentIOS, sizeof(IOS_Info));
|
||||
return true;
|
||||
}
|
||||
|
||||
Close_Inputs();
|
||||
DeviceHandler::Instance()->UnMountAll();
|
||||
WDVD_Close();
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "alt_ios.h"
|
||||
#include "utils.h"
|
||||
#include "fs.h"
|
||||
#include "nk.h"
|
||||
#include "mload.h"
|
||||
#include "gecko/gecko.h"
|
||||
#include "memory/mem2.hpp"
|
||||
@ -96,12 +95,6 @@ u32 Title_GetSize_FromTMD(tmd *tmd_data)
|
||||
/* Check if the cIOS is a D2X. */
|
||||
bool IOS_D2X(u8 ios, u8 *base)
|
||||
{
|
||||
if(neek2o())
|
||||
{
|
||||
*base = (u8)IOS_GetVersion();
|
||||
return true;
|
||||
}
|
||||
|
||||
iosinfo_t *info = IOS_GetInfo(ios);
|
||||
if(!info)
|
||||
return false;
|
||||
|
@ -415,12 +415,10 @@ s32 GCDump::DumpGame()
|
||||
gc_done += __DiscWrite(gamepath, 0x2440+NextOffset, ApploaderSize, ReadBuffer);
|
||||
}
|
||||
|
||||
if(!Disc)
|
||||
snprintf(gamepath, sizeof(gamepath), "%s/%s [%.06s]/game.iso", fmt((strncmp(gamepartition, "sd", 2) != 0) ? usb_dml_game_dir : DML_DIR, gamepartition), gcheader.title, (char *)gcheader.id);
|
||||
else
|
||||
if(Disc)
|
||||
{
|
||||
char *ptz = (char *)NULL;
|
||||
ptz = strstr(gamepath, "game.iso");
|
||||
char *ptz = strstr(gamepath, "game.iso");
|
||||
if(ptz != NULL)
|
||||
strncpy(ptz, "gam1.iso", 8);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "loader/sys.h"
|
||||
#include "loader/wbfs.h"
|
||||
#include "loader/cios.h"
|
||||
#include "loader/nk.h"
|
||||
#include "menu/menu.hpp"
|
||||
|
||||
CMenu *mainMenu;
|
||||
@ -44,32 +45,48 @@ int main(int argc, char **argv)
|
||||
|
||||
char *gameid = NULL;
|
||||
bool Emulator_boot = false;
|
||||
bool iosOK = false;
|
||||
|
||||
for (int i = 0; i < argc; i++)
|
||||
for(u8 i = 0; i < argc; i++)
|
||||
{
|
||||
if (argv[i] != NULL && strcasestr(argv[i], "ios=") != NULL && strlen(argv[i]) > 4)
|
||||
if(argv[i] != NULL && strcasestr(argv[i], "ios=") != NULL && strlen(argv[i]) > 4)
|
||||
{
|
||||
while(argv[i][0] && !isdigit(argv[i][0])) argv[i]++;
|
||||
while(argv[i][0] && !isdigit(argv[i][0]))
|
||||
argv[i]++;
|
||||
if (atoi(argv[i]) < 254 && atoi(argv[i]) > 0)
|
||||
mainIOS = atoi(argv[i]);
|
||||
}
|
||||
else if (strlen(argv[i]) == 6)
|
||||
else if(strlen(argv[i]) == 6)
|
||||
{
|
||||
gameid = argv[i];
|
||||
for (int i=0; i < 5; i++)
|
||||
if (!isalnum(gameid[i]))
|
||||
for(u8 i = 0; i < 5; i++)
|
||||
{
|
||||
if(!isalnum(gameid[i]))
|
||||
gameid = NULL;
|
||||
}
|
||||
else if (argv[i] != NULL && strcasestr(argv[i], "EMULATOR_MAGIC") != NULL)
|
||||
}
|
||||
else if(argv[i] != NULL && strcasestr(argv[i], "EMULATOR_MAGIC") != NULL)
|
||||
Emulator_boot = true;
|
||||
}
|
||||
#ifndef DOLPHIN
|
||||
// Load Custom IOS
|
||||
if(neek2o())
|
||||
{
|
||||
iosOK = true;
|
||||
memset(&CurrentIOS, 0, sizeof(IOS_Info));
|
||||
CurrentIOS.Version = 254;
|
||||
CurrentIOS.Type = IOS_TYPE_D2X;
|
||||
CurrentIOS.Base = 254;
|
||||
CurrentIOS.Revision = 999;
|
||||
DCFlushRange(&CurrentIOS, sizeof(IOS_Info));
|
||||
}
|
||||
else
|
||||
{
|
||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||
bool iosOK = loadIOS(mainIOS, false, false);
|
||||
iosOK = iosOK && CurrentIOS.Type != IOS_TYPE_NO_CIOS;
|
||||
iosOK = loadIOS(mainIOS, false, false) && CurrentIOS.Type != IOS_TYPE_NO_CIOS;
|
||||
}
|
||||
#else
|
||||
bool iosOK = true;
|
||||
iosOK = true;
|
||||
#endif
|
||||
|
||||
// Init
|
||||
|
Loading…
Reference in New Issue
Block a user