mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
sync to sourceforge r1266
* Added 2 new Nintendont settings (CC Rumble and IPL choices). (Greywolf) * Updated all the sources to compile with devkitPPC r28 and r29-1. (Greywolf) * Fixed loading banners from EmuNAND with a long path. (Greywolf) * Updated Libcustomfat to 1.1.1 + Ustealth. (Greywolf, Cyan) * Added support for Open source HBC TitleID.
This commit is contained in:
parent
6a2d30beb3
commit
b0352c301e
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>3.0 r1263</version>
|
||||
<release_date>20161106144602</release_date>
|
||||
<version>3.0 r1264</version>
|
||||
<release_date>20170810090107</release_date>
|
||||
<!-- // remove this line to enable arguments
|
||||
<arguments>
|
||||
<arg>--ios=250</arg>
|
||||
|
2
Makefile
2
Makefile
@ -65,7 +65,7 @@ endif
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS = -g -ggdb -O3 -Wall -Wno-multichar -Wno-unused-parameter -Wextra $(MACHDEP) $(INCLUDE) -DBUILD_IOS=$(IOS)
|
||||
CFLAGS = -g -ggdb -O3 -Wall -Wno-multichar -Wno-unused-parameter -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE -DBUILD_IOS=$(IOS)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,wiiuse_register
|
||||
|
||||
|
@ -163,7 +163,7 @@ u8 * Channels::GetDol(const u64 &title, u8 *tmdBuffer)
|
||||
if(tmd_file->contents[i].index == tmd_file->boot_index)
|
||||
continue; // Skip loader
|
||||
|
||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", high, low, tmd_file->contents[i].cid);
|
||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", (unsigned int)high, (unsigned int)low, (unsigned int)tmd_file->contents[i].cid);
|
||||
|
||||
s32 fd = ISFS_Open(filepath, ISFS_OPEN_READ);
|
||||
if(fd < 0)
|
||||
@ -191,7 +191,7 @@ u8 * Channels::GetDol(const u64 &title, u8 *tmdBuffer)
|
||||
gprintf("Loading boot content index\n");
|
||||
}
|
||||
|
||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", high, low, bootcontent);
|
||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", (unsigned int)high, (unsigned int)low, (unsigned int)bootcontent);
|
||||
gprintf("Loading Channel DOL: %s\n", filepath);
|
||||
|
||||
if (NandTitle::LoadFileFromNand(filepath, &buffer, &filesize) < 0)
|
||||
@ -255,7 +255,7 @@ u8 *Channels::GetTMD(const u64 &tid, u32 *size, const char *prefix)
|
||||
if(!prefix)
|
||||
prefix = "";
|
||||
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/title.tmd", prefix, TITLE_UPPER(tid), TITLE_LOWER(tid));
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/title.tmd", prefix, (unsigned int)TITLE_UPPER(tid), (unsigned int)TITLE_LOWER(tid));
|
||||
|
||||
u8 *tmdBuffer = NULL;
|
||||
u32 tmdSize = 0;
|
||||
@ -480,7 +480,7 @@ bool Channels::emuExists(char *tmdpath)
|
||||
return false;
|
||||
|
||||
//! tmdpath has length of 1024
|
||||
snprintf(ptr+1, 1024-(ptr+1-tmdpath), "%08x.app", cid);
|
||||
snprintf(ptr+1, 1024-(ptr+1-tmdpath), "%08x.app", (unsigned int)cid);
|
||||
|
||||
FILE *f = fopen(tmdpath, "rb");
|
||||
if(!f)
|
||||
@ -605,7 +605,7 @@ bool Channels::GetEmuChanTitle(char *tmdpath, int language, std::string &Title)
|
||||
return false;
|
||||
|
||||
//! tmdpath has length of 1024
|
||||
snprintf(ptr+1, 1024-(ptr+1-tmdpath), "%08x.app", cid);
|
||||
snprintf(ptr+1, 1024-(ptr+1-tmdpath), "%08x.app", (unsigned int)cid);
|
||||
|
||||
FILE *f = fopen(tmdpath, "rb");
|
||||
if(!f)
|
||||
@ -671,13 +671,13 @@ u8 *Channels::GetOpeningBnr(const u64 &title, u32 * outsize, const char *pathPre
|
||||
u32 high = TITLE_UPPER(title);
|
||||
u32 low = TITLE_LOWER(title);
|
||||
|
||||
char *filepath = (char *) memalign(32, ISFS_MAXPATH);
|
||||
char *filepath = (char *) memalign(32, ISFS_MAXPATH + strlen(pathPrefix));
|
||||
if(!filepath)
|
||||
return NULL;
|
||||
|
||||
do
|
||||
{
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/title.tmd", pathPrefix, high, low);
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/title.tmd", pathPrefix, (unsigned int)high, (unsigned int)low);
|
||||
|
||||
u8 *buffer = NULL;
|
||||
u32 filesize = 0;
|
||||
@ -712,7 +712,7 @@ u8 *Channels::GetOpeningBnr(const u64 &title, u32 * outsize, const char *pathPre
|
||||
if(!found)
|
||||
break;
|
||||
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/%08x.app", pathPrefix, high, low, bootcontent);
|
||||
snprintf(filepath, ISFS_MAXPATH, "%s/title/%08x/%08x/content/%08x.app", pathPrefix, (unsigned int)high, (unsigned int)low, (unsigned int)bootcontent);
|
||||
|
||||
if(pathPrefix && *pathPrefix != 0)
|
||||
ret = LoadFileToMem(filepath, &buffer, &filesize);
|
||||
|
@ -43,11 +43,11 @@ private:
|
||||
void RenderHighliter(Mtx &modelview);
|
||||
void UpdateTooltips(void);
|
||||
|
||||
static const float gridwidth = 2048.f;
|
||||
static const float gridheight = 288.f;
|
||||
static constexpr float gridwidth = 2048.f;
|
||||
static constexpr float gridheight = 288.f;
|
||||
|
||||
static const float chanWidth = 128.f;
|
||||
static const float chanHeight = 96.f;
|
||||
static constexpr float chanWidth = 128.f;
|
||||
static constexpr float chanHeight = 96.f;
|
||||
|
||||
const int XOffset;
|
||||
const int YOffset;
|
||||
|
@ -66,6 +66,8 @@ enum ninconfig
|
||||
NIN_CFG_NATIVE_SI = (1<<14), // v2.189
|
||||
NIN_CFG_WIIU_WIDE = (1<<15), // v2.258
|
||||
NIN_CFG_ARCADE_MODE = (1<<16), // v4.424
|
||||
NIN_CFG_CC_RUMBLE = (1 << 17),// v4.43x
|
||||
NIN_CFG_SKIP_IPL = (1 << 18),// v4.43x
|
||||
};
|
||||
|
||||
enum ninvideomode
|
||||
|
@ -36,13 +36,13 @@ class GuiSound
|
||||
//!\param sound Pointer to the sound data
|
||||
//!\param filesize Length of sound data
|
||||
GuiSound(const char * filepath);
|
||||
GuiSound(const u8 * sound, int filesize, int volume, int voice = -1);
|
||||
GuiSound(const u8 * sound, s32 filesize, int volume, int voice = -1);
|
||||
//!Destructor
|
||||
virtual ~GuiSound();
|
||||
//!Load a file and replace the old one
|
||||
virtual bool Load(const char * filepath);
|
||||
//!Load a file and replace the old one
|
||||
bool Load(const u8 * sound, int filesize);
|
||||
bool Load(const u8 * sound, s32 filesize);
|
||||
//!For quick playback of the internal soundeffects
|
||||
bool LoadSoundEffect(const u8 * snd, s32 len);
|
||||
//!Start sound playback
|
||||
|
@ -71,7 +71,7 @@ bool SystemMenuResources::Init()
|
||||
}
|
||||
// build file path
|
||||
char path[ ISFS_MAXPATH ]__attribute__((aligned( 32 )));
|
||||
sprintf( path, "/title/00000001/00000002/content/%08x.app", contents[ idx ].cid );
|
||||
sprintf( path, "/title/00000001/00000002/content/%08x.app", (unsigned int)contents[ idx ].cid );
|
||||
|
||||
// get resource archive
|
||||
u8* resourceArc = NULL;
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include "prompts/ProgressWindow.h"
|
||||
#include "FileOperations/fileops.h"
|
||||
#include "ZipFile.h"
|
||||
|
@ -173,7 +173,7 @@ bool OpeningBNR::LoadWiiBanner(const discHdr * header)
|
||||
if (!disc)
|
||||
return false;
|
||||
|
||||
wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
wiidisc_t *wdisc = wd_open_disc((s32(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
if (!wdisc)
|
||||
{
|
||||
WBFS_CloseDisc(disc);
|
||||
@ -247,7 +247,7 @@ const u16 * OpeningBNR::GetIMETTitle(int lang)
|
||||
return imetHdr->names[lang];
|
||||
}
|
||||
|
||||
static int GC_Disc_Read(void *fp, u32 offset, u32 count, void*iobuf)
|
||||
static s32 GC_Disc_Read(void *fp, u32 offset, u32 count, void*iobuf)
|
||||
{
|
||||
if(fp)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ void hexdump(void *d, int len)
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t __out_write(struct _reent *r, int fd, const char *ptr, size_t len)
|
||||
static ssize_t __out_write(struct _reent *r, void *fd, const char *ptr, size_t len)
|
||||
{
|
||||
if(len > 0)
|
||||
usb_sendbuffer(1, ptr, len);
|
||||
@ -130,6 +130,7 @@ static const devoptab_t gecko_out = {
|
||||
NULL, // device deviceData
|
||||
NULL, // device chmod_r
|
||||
NULL, // device fchmod_r
|
||||
NULL, // device rmdir_r
|
||||
};
|
||||
|
||||
void USBGeckoOutput()
|
||||
|
@ -233,7 +233,7 @@ bool gettextLoadLanguage(const char* langFile)
|
||||
}
|
||||
const char *gettext(const char *msgid)
|
||||
{
|
||||
if(!msgid) return NULL;
|
||||
if(!msgid[0]) return NULL;
|
||||
MSG *msg = findMSG(hash_string(msgid));
|
||||
if (msg && msg->msgstr) return msg->msgstr;
|
||||
return msgid;
|
||||
|
Binary file not shown.
@ -497,7 +497,7 @@ s32 wbfs_add_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *cal
|
||||
break;
|
||||
}
|
||||
//ERROR("read error");
|
||||
printf("\rWARNING: read (%u) error (%d)\n", offset, ret);
|
||||
printf("\rWARNING: read (%u) error (%d)\n", (unsigned int)offset, ret);
|
||||
}
|
||||
|
||||
//fix the partition table
|
||||
@ -727,7 +727,7 @@ u32 wbfs_size_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *ca
|
||||
//int (*read_wiidisc_callback_t)(void*fp,u32 offset,u32 count,void*iobuf);
|
||||
|
||||
// connect wiidisc to wbfs_disc
|
||||
int read_wiidisc_wbfsdisc(void*fp, u32 offset, u32 count, void*iobuf)
|
||||
s32 read_wiidisc_wbfsdisc(void*fp, u32 offset, u32 count, void*iobuf)
|
||||
{
|
||||
return wbfs_disc_read((wbfs_disc_t*) fp, offset, count, iobuf);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ extern "C"
|
||||
//
|
||||
|
||||
// callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..)
|
||||
typedef int (*rw_sector_callback_t)(void*fp, u32 lba, u32 count, void*iobuf);
|
||||
typedef s32 (*rw_sector_callback_t)(void*fp, u32 lba, u32 count, void*iobuf);
|
||||
typedef void (*progress_callback_t)(s64 status, s64 total);
|
||||
|
||||
typedef struct wbfs_s
|
||||
|
@ -11,7 +11,7 @@ extern "C"
|
||||
#endif
|
||||
// callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..)
|
||||
// offset points 32bit words, count counts bytes
|
||||
typedef int (*read_wiidisc_callback_t)(void*fp, u32 offset, u32 count, void*iobuf);
|
||||
typedef s32 (*read_wiidisc_callback_t)(void*fp, u32 offset, u32 count, void*iobuf);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -16,8 +16,8 @@ public:
|
||||
|
||||
void CMEM2Alloc::init(unsigned int size)
|
||||
{
|
||||
m_baseAddress = (SBlock *) std::max(((u32)SYS_GetArena2Lo() + 31) & ~31, IOS_RELOAD_AREA);
|
||||
m_endAddress = (SBlock *) ((char *)m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31));
|
||||
m_baseAddress = (SBlock *) std::max(((u32)SYS_GetArena2Lo() + 31) & ~31, (u32)IOS_RELOAD_AREA);
|
||||
m_endAddress = (SBlock *) ((char *)m_baseAddress + std::min((u32)(size * 0x100000), SYS_GetArena2Size() & ~31));
|
||||
if (m_endAddress > (SBlock *) 0x93300000) //rest is reserved for usb/usb2/network and other stuff... (0xE0000 bytes)
|
||||
m_endAddress = (SBlock *) 0x93300000;
|
||||
SYS_SetArena2Lo(m_endAddress);
|
||||
|
@ -187,7 +187,7 @@ void WDMMenu::CheckGameFiles(const struct discHdr * header)
|
||||
return;
|
||||
}
|
||||
|
||||
wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
wiidisc_t *wdisc = wd_open_disc((s32(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
if (!wdisc)
|
||||
{
|
||||
WindowPrompt(tr( "ERROR:" ), tr( "Could not open Disc" ), tr( "OK" ));
|
||||
|
@ -139,7 +139,7 @@ static int ListCompare(const void *a, const void *b)
|
||||
Link_Info *ab = (Link_Info*) a;
|
||||
Link_Info *bb = (Link_Info*) b;
|
||||
|
||||
return stricmp((char *) ab->URL, (char *) bb->URL);
|
||||
return strcasecmp((char *) ab->URL, (char *) bb->URL);
|
||||
}
|
||||
void URL_List::SortList()
|
||||
{
|
||||
|
@ -46,14 +46,14 @@ static bool networkHalt = true;
|
||||
/****************************************************************************
|
||||
* Initialize_Network
|
||||
***************************************************************************/
|
||||
void Initialize_Network(void)
|
||||
void Initialize_Network(int retries)
|
||||
{
|
||||
|
||||
if (networkinitialized) return;
|
||||
|
||||
s32 result;
|
||||
|
||||
result = if_config(IP, NULL, NULL, true);
|
||||
result = if_config(IP, NULL, NULL, true, retries);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
@ -147,7 +147,7 @@ s32 network_request(s32 connect, const char * request, char * filename)
|
||||
ptr = strstr(buf, "Content-Length:");
|
||||
if (!ptr) return NET_SIZE_UNKNOWN;
|
||||
|
||||
sscanf(ptr, "Content-Length: %u", &size);
|
||||
sscanf(ptr, "Content-Length: %lu", &size);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define NET_SIZE_UNKNOWN -0xFFFFFFF
|
||||
#define NET_DEFAULT_SOCK -0xFFFFFFE
|
||||
|
||||
void Initialize_Network(void);
|
||||
void Initialize_Network(int retries = 0);
|
||||
void DeinitNetwork(void);
|
||||
bool IsNetworkInit(void);
|
||||
char * GetNetworkIP(void);
|
||||
|
@ -54,70 +54,70 @@ extern void multidolhook(u32 address);
|
||||
extern void langvipatch(u32 address, u32 len, u8 langbyte);
|
||||
extern void vipatch(u32 address, u32 len);
|
||||
|
||||
static const u32 multidolpatch1[2] = {
|
||||
0x3C03FFB4,0x28004F43
|
||||
};
|
||||
//static const u32 multidolpatch1[2] = {
|
||||
// 0x3C03FFB4,0x28004F43
|
||||
//};
|
||||
|
||||
static const u32 healthcheckhook[2] = {
|
||||
0x41810010,0x881D007D
|
||||
};
|
||||
//static const u32 healthcheckhook[2] = {
|
||||
// 0x41810010,0x881D007D
|
||||
//};
|
||||
|
||||
static const u32 updatecheckhook[3] = {
|
||||
0x80650050,0x80850054,0xA0A50058
|
||||
};
|
||||
//static const u32 updatecheckhook[3] = {
|
||||
// 0x80650050,0x80850054,0xA0A50058
|
||||
//};
|
||||
|
||||
static const u32 multidolpatch2[2] = {
|
||||
0x3F608000, 0x807B0018
|
||||
};
|
||||
//static const u32 multidolpatch2[2] = {
|
||||
// 0x3F608000, 0x807B0018
|
||||
//};
|
||||
|
||||
static const u32 recoveryhooks[3] = {
|
||||
0xA00100AC,0x5400073E,0x2C00000F
|
||||
};
|
||||
//static const u32 recoveryhooks[3] = {
|
||||
// 0xA00100AC,0x5400073E,0x2C00000F
|
||||
//};
|
||||
|
||||
static const u32 nocopyflag1[3] = {
|
||||
0x540007FF, 0x4182001C, 0x80630068
|
||||
};
|
||||
//static const u32 nocopyflag1[3] = {
|
||||
// 0x540007FF, 0x4182001C, 0x80630068
|
||||
//};
|
||||
|
||||
static const u32 nocopyflag2[3] = {
|
||||
0x540007FF, 0x41820024, 0x387E12E2
|
||||
};
|
||||
//static const u32 nocopyflag2[3] = {
|
||||
// 0x540007FF, 0x41820024, 0x387E12E2
|
||||
//};
|
||||
|
||||
// this one is for the GH3 and VC saves
|
||||
//static const u32 nocopyflag3[5] = {
|
||||
// 0x2C030000, 0x40820010, 0x88010020, 0x28000002, 0x41820234
|
||||
//};
|
||||
|
||||
static const u32 nocopyflag3[5] = {
|
||||
0x2C030000, 0x41820200,0x48000058,0x38610100
|
||||
};
|
||||
//static const u32 nocopyflag3[5] = {
|
||||
// 0x2C030000, 0x41820200,0x48000058,0x38610100
|
||||
//};
|
||||
// this removes the display warning for no copy VC and GH3 saves
|
||||
static const u32 nocopyflag4[4] = {
|
||||
0x80010008, 0x2C000000, 0x4182000C, 0x3BE00001
|
||||
};
|
||||
//static const u32 nocopyflag4[4] = {
|
||||
// 0x80010008, 0x2C000000, 0x4182000C, 0x3BE00001
|
||||
//};
|
||||
|
||||
static const u32 nocopyflag5[3] = {
|
||||
0x801D0024,0x540007FF,0x41820024
|
||||
};
|
||||
//static const u32 nocopyflag5[3] = {
|
||||
// 0x801D0024,0x540007FF,0x41820024
|
||||
//};
|
||||
|
||||
static const u32 movedvdpatch[3] = {
|
||||
0x2C040000, 0x41820120, 0x3C608109
|
||||
};
|
||||
//static const u32 movedvdpatch[3] = {
|
||||
// 0x2C040000, 0x41820120, 0x3C608109
|
||||
//};
|
||||
|
||||
static const u32 regionfreehooks[5] = {
|
||||
0x7C600774, 0x2C000001, 0x41820030,0x40800010,0x2C000000
|
||||
};
|
||||
//static const u32 regionfreehooks[5] = {
|
||||
// 0x7C600774, 0x2C000001, 0x41820030,0x40800010,0x2C000000
|
||||
//};
|
||||
|
||||
static const u32 cIOScode[16] = {
|
||||
0x7f06c378, 0x7f25cb78, 0x387e02c0, 0x4cc63182
|
||||
};
|
||||
//static const u32 cIOScode[16] = {
|
||||
// 0x7f06c378, 0x7f25cb78, 0x387e02c0, 0x4cc63182
|
||||
//};
|
||||
|
||||
static const u32 cIOSblock[16] = {
|
||||
0x2C1800F9, 0x40820008, 0x3B000024
|
||||
};
|
||||
//static const u32 cIOSblock[16] = {
|
||||
// 0x2C1800F9, 0x40820008, 0x3B000024
|
||||
//};
|
||||
|
||||
static const u32 fwritepatch[8] = {
|
||||
0x9421FFD0,0x7C0802A6,0x90010034,0xBF210014,0x7C9B2378,0x7CDC3378,0x7C7A1B78,0x7CB92B78 // bushing fwrite
|
||||
};
|
||||
//static const u32 fwritepatch[8] = {
|
||||
// 0x9421FFD0,0x7C0802A6,0x90010034,0xBF210014,0x7C9B2378,0x7CDC3378,0x7C7A1B78,0x7CB92B78 // bushing fwrite
|
||||
//};
|
||||
|
||||
static const u32 vipatchcode[3] = {
|
||||
0x4182000C,0x4180001C,0x48000018
|
||||
@ -175,17 +175,17 @@ static const u32 langpatch[3] = {
|
||||
0x7C600775, 0x40820010, 0x38000000
|
||||
};
|
||||
|
||||
static const u32 oldpatch002[3] = {
|
||||
0x2C000000, 0x40820214, 0x3C608000
|
||||
};
|
||||
|
||||
static const u32 newpatch002[3] = {
|
||||
0x2C000000, 0x48000214, 0x3C608000
|
||||
};
|
||||
|
||||
static const u32 dczeropatch[4] = {
|
||||
0x7C001FEC, 0x38630020, 0x4200FFF8, 0x4E800020
|
||||
};
|
||||
//static const u32 oldpatch002[3] = {
|
||||
// 0x2C000000, 0x40820214, 0x3C608000
|
||||
//};
|
||||
//
|
||||
//static const u32 newpatch002[3] = {
|
||||
// 0x2C000000, 0x48000214, 0x3C608000
|
||||
//};
|
||||
//
|
||||
//static const u32 dczeropatch[4] = {
|
||||
// 0x7C001FEC, 0x38630020, 0x4200FFF8, 0x4E800020
|
||||
//};
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
void dogamehooks(u32 hooktype, void *addr, u32 len)
|
||||
@ -453,7 +453,7 @@ static void app_loadgameconfig()
|
||||
}
|
||||
if (strncasecmp("poke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4)
|
||||
{
|
||||
ret = sscanf((char *) tempgameconf + i, "( %x , %x", &codeaddr, &codeval);
|
||||
ret = sscanf((char *) tempgameconf + i, "( %x , %x", (unsigned int *)&codeaddr, (unsigned int *)&codeval);
|
||||
if (ret == 2)
|
||||
{
|
||||
*(gameconf + (gameconfsize / 4)) = 0;
|
||||
@ -469,7 +469,7 @@ static void app_loadgameconfig()
|
||||
}
|
||||
if (strncasecmp("pokeifequal", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11)
|
||||
{
|
||||
ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", &codeaddr, &codeval, &codeaddr2, &codeval2);
|
||||
ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", (unsigned int *)&codeaddr, (unsigned int *)&codeval, (unsigned int *)&codeaddr2, (unsigned int *)&codeval2);
|
||||
if (ret == 4)
|
||||
{
|
||||
*(gameconf + (gameconfsize / 4)) = 0;
|
||||
@ -487,7 +487,7 @@ static void app_loadgameconfig()
|
||||
}
|
||||
if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 13)
|
||||
{
|
||||
ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset);
|
||||
ret = sscanf((char *) (tempgameconf + i), "( %x%n", (unsigned int *)&codeval, (int *)&tempoffset);
|
||||
if (ret == 1)
|
||||
{
|
||||
gameconfsize += 4;
|
||||
@ -498,10 +498,10 @@ static void app_loadgameconfig()
|
||||
gameconfsize += 4;
|
||||
temp++;
|
||||
i += tempoffset;
|
||||
ret = sscanf((char *) (tempgameconf + i), " %x%n", &codeval, &tempoffset);
|
||||
ret = sscanf((char *) (tempgameconf + i), " %x%n", (unsigned int *)&codeval, (int *)&tempoffset);
|
||||
}
|
||||
*(gameconf + (gameconfsize / 4) - temp - 1) = temp;
|
||||
ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2, &codeoffset, &codeval2);
|
||||
ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", (unsigned int *)&codeaddr, (unsigned int *)&codeaddr2, (unsigned int *)&codeoffset, (unsigned int *)&codeval2);
|
||||
if (ret == 4)
|
||||
{
|
||||
*(gameconf + (gameconfsize / 4)) = codeaddr;
|
||||
|
@ -40,10 +40,10 @@ class BannerWindow : public GuiWindow
|
||||
void Animate(void);
|
||||
void ChangeGame(bool playsound);
|
||||
|
||||
static const float fBannerWidth = 608.f;
|
||||
static const float fBannerHeight = 448.f;
|
||||
static const float fIconWidth = 128.f;
|
||||
static const float fIconHeight = 96.f;
|
||||
static constexpr float fBannerWidth = 608.f;
|
||||
static constexpr float fBannerHeight = 448.f;
|
||||
static constexpr float fIconWidth = 128.f;
|
||||
static constexpr float fIconHeight = 96.f;
|
||||
|
||||
static BannerFrame bannerFrame;
|
||||
|
||||
|
@ -44,7 +44,7 @@ int DiscBrowse(const char * GameID, char * alternatedname, int alternatedname_si
|
||||
return ret;
|
||||
}
|
||||
gprintf("wd_open_disc\n");
|
||||
wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
wiidisc_t *wdisc = wd_open_disc((s32(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
if (!wdisc)
|
||||
{
|
||||
ResumeGui();
|
||||
@ -80,7 +80,7 @@ int DiscBrowse(const char * GameID, char * alternatedname, int alternatedname_si
|
||||
|
||||
if (fileext && strcasecmp(fileext, ".dol") == 0)
|
||||
{
|
||||
options.SetName(position, "%s %03i", tr("Offset"), i);
|
||||
options.SetName(position, "%s %03i", tr("Offset"), (int)i);
|
||||
options.SetValue(position, filename);
|
||||
position++;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ static void UpdateProgressValues(GuiImage *progressbarImg, GuiText *prTxt, GuiTe
|
||||
|
||||
if (showTime == true)
|
||||
{
|
||||
timeTxt->SetTextf("%s %d:%02d:%02d", tr( "Time left:" ), h, m, s);
|
||||
timeTxt->SetTextf("%s %d:%02d:%02d", tr( "Time left:" ), (int)h, (int)m, (int)s);
|
||||
}
|
||||
|
||||
if (showSize == true)
|
||||
|
@ -299,13 +299,13 @@ void WindowCredits()
|
||||
#ifdef FULLCHANNEL
|
||||
snprintf(SvnRev, sizeof(SvnRev), "Rev%sc IOS%u (Rev %u)%s", GetRev(), IOS_GetVersion(), IOS_GetRevision(), (*(vu32*)0xcd800064 == 0xFFFFFFFF)? " + AHB" : "" );
|
||||
#else
|
||||
snprintf(SvnRev, sizeof(SvnRev), "Rev%s IOS%u (Rev %u)%s", GetRev(), IOS_GetVersion(), IOS_GetRevision(), (*(vu32*)0xcd800064 == 0xFFFFFFFF)? " + AHB" : "" );
|
||||
snprintf(SvnRev, sizeof(SvnRev), "Rev%s IOS%u (Rev %u)%s", GetRev(), (unsigned int)IOS_GetVersion(), (int)IOS_GetRevision(), (*(vu32*)0xcd800064 == 0xFFFFFFFF)? " + AHB" : "" );
|
||||
#endif
|
||||
|
||||
char IosInfo[80] = "";
|
||||
iosinfo_t * info = IosLoader::GetIOSInfo(IOS_GetVersion());
|
||||
if(info)
|
||||
snprintf(IosInfo, sizeof(IosInfo), "(%s v%i%s base%i)", info->name, info->version, info->versionstring, info->baseios);
|
||||
snprintf(IosInfo, sizeof(IosInfo), "(%s v%i%s base%i)", info->name, (int)info->version, info->versionstring, (int)info->baseios);
|
||||
|
||||
// Check if DIOS MIOS (Lite) is available
|
||||
char GCInfo[80] = "";
|
||||
|
@ -170,7 +170,7 @@ bool TitleSelector(char output[])
|
||||
if (r < num_titles)
|
||||
{
|
||||
u64 tid = titleList[r];
|
||||
sprintf(output, "%08x", TITLE_LOWER( tid ));
|
||||
sprintf(output, "%08x", (unsigned int)TITLE_LOWER( tid ));
|
||||
}
|
||||
else output[0] = 0;
|
||||
ret = true;
|
||||
|
@ -154,7 +154,7 @@ bool operator<(const BROWSERENTRY &f1, const BROWSERENTRY &f2)
|
||||
if (f1.isdir && !(f2.isdir)) return true;
|
||||
if (!(f1.isdir) && f2.isdir) return false;
|
||||
|
||||
return stricmp(f1.filename, f2.filename) < 0;
|
||||
return strcasecmp(f1.filename, f2.filename) < 0;
|
||||
}
|
||||
|
||||
int ParseFilter(FILTERCASCADE *Filter, BROWSERENTRY* Entry)
|
||||
@ -208,7 +208,7 @@ int ParseDirectory(const char* Path, int Flags, FILTERCASCADE *Filter)
|
||||
}
|
||||
for (i = 0; i < browsers.size(); i++) // searchs the browser who match the path
|
||||
{
|
||||
if (strnicmp(fulldir, browsers[i].rootdir, strlen(browsers[i].rootdir) - 1 /*means without trailing '/'*/)
|
||||
if (strncasecmp(fulldir, browsers[i].rootdir, strlen(browsers[i].rootdir) - 1 /*means without trailing '/'*/)
|
||||
== 0)
|
||||
{
|
||||
browser = &browsers[curDevice];
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <gccore.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#define MAXJOLIET 255
|
||||
#define MAXDISPLAY MAXPATHLEN
|
||||
|
@ -197,7 +197,7 @@ bool CGameSettings::Save()
|
||||
fprintf(f, "iosreloadblock:%d; ", GameList[i].iosreloadblock);
|
||||
fprintf(f, "patchcountrystrings:%d; ", GameList[i].patchcountrystrings);
|
||||
fprintf(f, "loadalternatedol:%d; ", GameList[i].loadalternatedol);
|
||||
fprintf(f, "alternatedolstart:%d; ", GameList[i].alternatedolstart);
|
||||
fprintf(f, "alternatedolstart:%d; ", (int)GameList[i].alternatedolstart);
|
||||
fprintf(f, "alternatedolname:%s; ", GameList[i].alternatedolname.c_str());
|
||||
fprintf(f, "returnTo:%d; ", GameList[i].returnTo);
|
||||
fprintf(f, "sneekVideoPatch:%d; ", GameList[i].sneekVideoPatch);
|
||||
@ -223,6 +223,8 @@ bool CGameSettings::Save()
|
||||
fprintf(f, "NINVideoOffset:%d; ", GameList[i].NINVideoOffset);
|
||||
fprintf(f, "NINRemlimit:%d; ", GameList[i].NINRemlimit);
|
||||
fprintf(f, "NINArcadeMode:%d; ", GameList[i].NINArcadeMode);
|
||||
fprintf(f, "NINCCRumble:%d; ", GameList[i].NINCCRumble);
|
||||
fprintf(f, "NINSkipIPL:%d; ", GameList[i].NINSkipIPL);
|
||||
fprintf(f, "NINMCEmulation:%d; ", GameList[i].NINMCEmulation);
|
||||
fprintf(f, "NINMCSize:%d; ", GameList[i].NINMCSize);
|
||||
fprintf(f, "NINUSBHID:%d; ", GameList[i].NINUSBHID);
|
||||
@ -441,6 +443,16 @@ bool CGameSettings::SetSetting(GameCFG & game, const char *name, const char *val
|
||||
game.NINArcadeMode = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "NINCCRumble") == 0)
|
||||
{
|
||||
game.NINCCRumble = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "NINSkipIPL") == 0)
|
||||
{
|
||||
game.NINSkipIPL = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if(strcmp(name, "NINMCEmulation") == 0)
|
||||
{
|
||||
game.NINMCEmulation = atoi(value);
|
||||
@ -669,6 +681,8 @@ void CGameSettings::SetDefault(GameCFG &game)
|
||||
game.NINVideoOffset = INHERIT - 20;
|
||||
game.NINRemlimit = INHERIT;
|
||||
game.NINArcadeMode = INHERIT;
|
||||
game.NINCCRumble = INHERIT;
|
||||
game.NINSkipIPL = INHERIT;
|
||||
game.NINMCEmulation = INHERIT;
|
||||
game.NINMCSize = INHERIT;
|
||||
game.NINUSBHID = INHERIT;
|
||||
|
@ -47,6 +47,8 @@ typedef struct _GameCFG
|
||||
short NINVideoOffset;
|
||||
short NINRemlimit;
|
||||
short NINArcadeMode;
|
||||
short NINCCRumble;
|
||||
short NINSkipIPL;
|
||||
short NINMCEmulation;
|
||||
short NINMCSize;
|
||||
short NINUSBHID;
|
||||
|
@ -188,10 +188,12 @@ void CSettings::SetDefault()
|
||||
NINDeflicker = OFF;
|
||||
NINPal50Patch = OFF;
|
||||
NINWiiUWide = widescreen;
|
||||
NINVideoScale = 40;
|
||||
NINVideoScale = 0;
|
||||
NINVideoOffset = 0;
|
||||
NINRemlimit = OFF;
|
||||
NINArcadeMode = OFF;
|
||||
NINCCRumble = OFF;
|
||||
NINSkipIPL = OFF;
|
||||
NINMCEmulation = ON;
|
||||
NINMCSize = 2;
|
||||
NINAutoboot = ON;
|
||||
@ -357,9 +359,9 @@ bool CSettings::Save()
|
||||
fprintf(file, "ShowFreeSpace = %d\n", ShowFreeSpace);
|
||||
fprintf(file, "InstallToDir = %d\n", InstallToDir);
|
||||
fprintf(file, "GameSplit = %d\n", GameSplit);
|
||||
fprintf(file, "InstallPartitions = %08X\n", InstallPartitions);
|
||||
fprintf(file, "InstallPartitions = %08X\n", (unsigned int)InstallPartitions);
|
||||
fprintf(file, "PlaylogUpdate = %d\n", PlaylogUpdate);
|
||||
fprintf(file, "ParentalBlocks = %08X\n", ParentalBlocks);
|
||||
fprintf(file, "ParentalBlocks = %08X\n", (unsigned int)ParentalBlocks);
|
||||
fprintf(file, "returnTo = %s\n", returnTo);
|
||||
fprintf(file, "HomeMenu = %d\n", HomeMenu);
|
||||
fprintf(file, "MultiplePartitions = %d\n", MultiplePartitions);
|
||||
@ -373,7 +375,7 @@ bool CSettings::Save()
|
||||
fprintf(file, "EnabledCategories = ");
|
||||
for(u32 i = 0; i < EnabledCategories.size(); ++i)
|
||||
{
|
||||
fprintf(file, "%i", EnabledCategories[i]);
|
||||
fprintf(file, "%i", (int)EnabledCategories[i]);
|
||||
if(i+1 < EnabledCategories.size())
|
||||
fprintf(file, ",");
|
||||
}
|
||||
@ -381,7 +383,7 @@ bool CSettings::Save()
|
||||
fprintf(file, "RequiredCategories = ");
|
||||
for(u32 i = 0; i < RequiredCategories.size(); ++i)
|
||||
{
|
||||
fprintf(file, "%i", RequiredCategories[i]);
|
||||
fprintf(file, "%i", (int)RequiredCategories[i]);
|
||||
if(i+1 < RequiredCategories.size())
|
||||
fprintf(file, ",");
|
||||
}
|
||||
@ -389,7 +391,7 @@ bool CSettings::Save()
|
||||
fprintf(file, "ForbiddenCategories = ");
|
||||
for(u32 i = 0; i < ForbiddenCategories.size(); ++i)
|
||||
{
|
||||
fprintf(file, "%i", ForbiddenCategories[i]);
|
||||
fprintf(file, "%i", (int)ForbiddenCategories[i]);
|
||||
if(i+1 < ForbiddenCategories.size())
|
||||
fprintf(file, ",");
|
||||
}
|
||||
@ -449,6 +451,8 @@ bool CSettings::Save()
|
||||
fprintf(file, "NINVideoOffset = %d\n", NINVideoOffset);
|
||||
fprintf(file, "NINRemlimit = %d\n", NINRemlimit);
|
||||
fprintf(file, "NINArcadeMode = %d\n", NINArcadeMode);
|
||||
fprintf(file, "NINCCRumble = %d\n", NINCCRumble);
|
||||
fprintf(file, "NINSkipIPL = %d\n", NINSkipIPL);
|
||||
fprintf(file, "NINMCEmulation = %d\n", NINMCEmulation);
|
||||
fprintf(file, "NINMCSize = %d\n", NINMCSize);
|
||||
fprintf(file, "NINAutoboot = %d\n", NINAutoboot);
|
||||
@ -974,6 +978,16 @@ bool CSettings::SetSetting(char *name, char *value)
|
||||
NINArcadeMode = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "NINCCRumble") == 0)
|
||||
{
|
||||
NINCCRumble = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "NINSkipIPL") == 0)
|
||||
{
|
||||
NINSkipIPL = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "NINMCEmulation") == 0)
|
||||
{
|
||||
NINMCEmulation = atoi(value);
|
||||
|
@ -196,6 +196,8 @@ class CSettings
|
||||
short NINVideoOffset;
|
||||
short NINRemlimit;
|
||||
short NINArcadeMode;
|
||||
short NINCCRumble;
|
||||
short NINSkipIPL;
|
||||
s8 NINMCEmulation;
|
||||
short NINMCSize;
|
||||
short NINAutoboot;
|
||||
|
@ -312,7 +312,7 @@ int FeatureSettingsMenu::GetMenuInternal()
|
||||
|
||||
if(gameList[i]->tid != 0) //! Channels
|
||||
{
|
||||
snprintf(nandPath, sizeof(nandPath), "/title/%08x/%08x/data", (u32) (gameList[i]->tid >> 32), (u32) gameList[i]->tid );
|
||||
snprintf(nandPath, sizeof(nandPath), "/title/%08x/%08x/data", (unsigned int) (gameList[i]->tid >> 32), (unsigned int) gameList[i]->tid );
|
||||
snprintf(filePath, sizeof(filePath), "%s%s", Settings.NandEmuChanPath, nandPath);
|
||||
}
|
||||
else //! Wii games
|
||||
|
@ -198,6 +198,8 @@ void GCGameLoadSM::SetOptionNames()
|
||||
Options->SetName(Idx++, "%s", tr( "Ocarina" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Remove Read Speed Limit" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Triforce Arcade Mode" ));
|
||||
Options->SetName(Idx++, "%s", tr("CC Rumble"));
|
||||
Options->SetName(Idx++, "%s", tr("Skip IPL"));
|
||||
Options->SetName(Idx++, "%s", tr( "Memory Card Emulation" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Memory Card Blocks Size" ));
|
||||
Options->SetName(Idx++, "%s", tr( "USB-HID Controller" ));
|
||||
@ -402,6 +404,18 @@ void GCGameLoadSM::SetOptionValues()
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINArcadeMode]));
|
||||
|
||||
//! Settings: NIN CC Rumble
|
||||
if (GameConfig.NINCCRumble == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINCCRumble]));
|
||||
|
||||
//! Settings: NIN Skip IPL
|
||||
if (GameConfig.NINSkipIPL == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINSkipIPL]));
|
||||
|
||||
//! Settings: NIN Memory Card Emulation
|
||||
if(GameConfig.NINMCEmulation == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
@ -743,6 +757,18 @@ int GCGameLoadSM::GetMenuInternal()
|
||||
if (++GameConfig.NINArcadeMode >= MAX_ON_OFF) GameConfig.NINArcadeMode = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: NIN CC Rumble
|
||||
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
|
||||
{
|
||||
if (++GameConfig.NINCCRumble >= MAX_ON_OFF) GameConfig.NINCCRumble = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: NIN Skip IPL
|
||||
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
|
||||
{
|
||||
if (++GameConfig.NINSkipIPL >= MAX_ON_OFF) GameConfig.NINSkipIPL = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: NIN Memory Card Emulation
|
||||
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
|
||||
{
|
||||
|
@ -355,9 +355,9 @@ void GameLoadSM::SetOptionValues()
|
||||
else
|
||||
{
|
||||
if(GameConfig.alternatedolname.size() != 0)
|
||||
Options->SetValue(Idx++, "%i <%s>", GameConfig.alternatedolstart, GameConfig.alternatedolname.c_str());
|
||||
Options->SetValue(Idx++, "%i <%s>", (int)GameConfig.alternatedolstart, GameConfig.alternatedolname.c_str());
|
||||
else
|
||||
Options->SetValue(Idx++, "%i", GameConfig.alternatedolstart);
|
||||
Options->SetValue(Idx++, "%i", (int)GameConfig.alternatedolstart);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,7 +612,7 @@ int GameLoadSM::GetMenuInternal()
|
||||
{
|
||||
GameConfig.alternatedolname = tmp;
|
||||
GameConfig.alternatedolstart = res;
|
||||
snprintf(tmp, sizeof(tmp), "%s %.6s - %i", tr( "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." ), (char *) GameConfig.id, GameConfig.alternatedolstart);
|
||||
snprintf(tmp, sizeof(tmp), "%s %.6s - %i", tr( "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." ), (char *) GameConfig.id, (int)GameConfig.alternatedolstart);
|
||||
WindowPrompt(0, tmp, tr( "OK" ));
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ void GameSettingsMenu::CreateSettingsMenu(int menuNr)
|
||||
char nandPath[512];
|
||||
if(DiscHeader->tid != 0) //! Channels
|
||||
{
|
||||
snprintf(nandPath, sizeof(nandPath), "/title/%08x/%08x/data", (u32) (DiscHeader->tid >> 32), (u32) DiscHeader->tid);
|
||||
snprintf(nandPath, sizeof(nandPath), "/title/%08x/%08x/data", (unsigned int) (DiscHeader->tid >> 32), (unsigned int) DiscHeader->tid);
|
||||
snprintf(filePath, sizeof(filePath), "%s%s", Settings.NandEmuChanPath, nandPath);
|
||||
}
|
||||
else //! Wii games
|
||||
|
@ -236,6 +236,8 @@ LoaderSettings::LoaderSettings()
|
||||
Options->SetName(Idx++, "%s", tr( "Video offset" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Remove Read Speed Limit" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Triforce Arcade Mode" ));
|
||||
Options->SetName(Idx++, "%s", tr("CC Rumble"));
|
||||
Options->SetName(Idx++, "%s", tr("Skip IPL"));
|
||||
Options->SetName(Idx++, "%s", tr( "Memory Card Emulation" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Memory Card Blocks Size" ));
|
||||
Options->SetName(Idx++, "%s", tr( "USB-HID Controller" ));
|
||||
@ -430,7 +432,7 @@ void LoaderSettings::SetOptionValues()
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.NINWiiUWide]));
|
||||
|
||||
//! Settings: NIN VideoScale
|
||||
Options->SetValue(Idx++, "%d (40~120)", Settings.NINVideoScale);
|
||||
Options->SetValue(Idx++, "%d (0, 40~120)", Settings.NINVideoScale);
|
||||
|
||||
//! Settings: NIN VideoOffset
|
||||
Options->SetValue(Idx++, "%d (-20~20)", Settings.NINVideoOffset);
|
||||
@ -441,6 +443,12 @@ void LoaderSettings::SetOptionValues()
|
||||
//! Settings: NIN Arcade Mode
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.NINArcadeMode]));
|
||||
|
||||
//! Settings: NIN CC Rumble
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.NINCCRumble]));
|
||||
|
||||
//! Settings: NIN Skip IPL
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.NINSkipIPL]));
|
||||
|
||||
//! Settings: NIN Memory Card Emulation
|
||||
Options->SetValue(Idx++, "%s", tr(NINMCText[Settings.NINMCEmulation]));
|
||||
|
||||
@ -807,7 +815,7 @@ int LoaderSettings::GetMenuInternal()
|
||||
snprintf(entrie, sizeof(entrie), "%i", Settings.NINVideoScale);
|
||||
int ret = OnScreenNumpad(entrie, sizeof(entrie));
|
||||
if(ret)
|
||||
Settings.NINVideoScale = LIMIT(atoi(entrie), 40, 120);
|
||||
Settings.NINVideoScale = (atoi(entrie) == 0) ? 0 : LIMIT(atoi(entrie), 40, 120);
|
||||
}
|
||||
|
||||
//! Settings: NIN VideoOffset
|
||||
@ -832,6 +840,18 @@ int LoaderSettings::GetMenuInternal()
|
||||
if (++Settings.NINArcadeMode >= MAX_ON_OFF) Settings.NINArcadeMode = 0;
|
||||
}
|
||||
|
||||
//! Settings: NIN CC Rumble
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
if (++Settings.NINCCRumble >= MAX_ON_OFF) Settings.NINCCRumble = 0;
|
||||
}
|
||||
|
||||
//! Settings: NIN Skip IPL
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
if (++Settings.NINSkipIPL >= MAX_ON_OFF) Settings.NINSkipIPL = 0;
|
||||
}
|
||||
|
||||
//! Settings: NIN Memory Card Emulation
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
|
@ -140,11 +140,11 @@ int UninstallSM::GetMenuInternal()
|
||||
else if(DiscHeader->type == TYPE_GAME_EMUNANDCHAN && DiscHeader->tid != 0)
|
||||
{
|
||||
// Remove ticket
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", Settings.NandEmuChanPath, (u32) (DiscHeader->tid >> 32), (u32) DiscHeader->tid);
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", Settings.NandEmuChanPath, (unsigned int) (DiscHeader->tid >> 32), (unsigned int) DiscHeader->tid);
|
||||
RemoveFile(filepath);
|
||||
|
||||
// Remove contents / data
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/", Settings.NandEmuChanPath, (u32) (DiscHeader->tid >> 32), (u32) DiscHeader->tid);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/", Settings.NandEmuChanPath, (unsigned int) (DiscHeader->tid >> 32), (unsigned int) DiscHeader->tid);
|
||||
RemoveDirectory(filepath);
|
||||
|
||||
Channels::Instance()->GetEmuChannelList();
|
||||
|
@ -203,8 +203,9 @@ void Sys_BackToLoader(void)
|
||||
|
||||
#define HBC_HAXX 0x0001000148415858LL
|
||||
#define HBC_JODI 0x000100014A4F4449LL
|
||||
#define HBC_1_0_7 0x00010001AF1BF516LL
|
||||
#define HBC_1_0_7 0x00010001AF1BF516LL
|
||||
#define HBC_LULZ 0x000100014c554c5aLL
|
||||
#define HBC_OHBC 0x000100014F484243LL
|
||||
|
||||
void Sys_LoadHBC(void)
|
||||
{
|
||||
@ -213,11 +214,13 @@ void Sys_LoadHBC(void)
|
||||
WII_Initialize();
|
||||
|
||||
// Try launching all known HBC titles in reversed released order
|
||||
WII_LaunchTitle(HBC_OHBC);
|
||||
WII_LaunchTitle(HBC_LULZ);
|
||||
WII_LaunchTitle(HBC_1_0_7);
|
||||
WII_LaunchTitle(HBC_JODI);
|
||||
WII_LaunchTitle(HBC_HAXX);
|
||||
|
||||
//Todo : jump to 0x80001800, which is what libogc does when you return from main(), not hardcode any ID, so it works with everything
|
||||
|
||||
//Back to system menu if all fails
|
||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ iosinfo_t *IosLoader::GetIOSInfo(s32 ios)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(filepath, sizeof(filepath), "/title/%08x/%08x/content/%08x.app", 0x00000001, ios, *(u8 *)((u32)TMD+0x1E7));
|
||||
snprintf(filepath, sizeof(filepath), "/title/%08x/%08x/content/%08x.app", 0x00000001, (unsigned int)ios, (unsigned int)(*(u8 *)((u32)TMD+0x1E7)));
|
||||
|
||||
free(TMD);
|
||||
|
||||
|
@ -39,15 +39,19 @@ static const u8 di_readlimit_patch[] = { 0x7e, 0xd4 };
|
||||
|
||||
static const u8 isfs_permissions_old[] = { 0x42, 0x8B, 0xD0, 0x01, 0x25, 0x66 };
|
||||
static const u8 isfs_permissions_patch[] = { 0x42, 0x8B, 0xE0, 0x01, 0x25, 0x66 };
|
||||
#if 0
|
||||
static const u8 setuid_old[] = { 0xD1, 0x2A, 0x1C, 0x39 };
|
||||
static const u8 setuid_patch[] = { 0x46, 0xC0 };
|
||||
#endif
|
||||
static const u8 es_identify_old[] = { 0x28, 0x03, 0xD1, 0x23 };
|
||||
static const u8 es_identify_patch[] = { 0x00, 0x00 };
|
||||
static const u8 hash_old[] = { 0x20, 0x07, 0x23, 0xA2 };
|
||||
static const u8 hash_patch[] = { 0x00 };
|
||||
static const u8 new_hash_old[] = { 0x20, 0x07, 0x4B, 0x0B };
|
||||
#if 0
|
||||
static const u8 addticket_vers_check[] = { 0xD2, 0x01, 0x4E, 0x56 };
|
||||
static const u8 addticket_patch[] = { 0xE0 };
|
||||
#endif
|
||||
static const u8 es_set_ahbprot_old[] = { 0x68, 0x5B, 0x22, 0xEC, 0x00, 0x52, 0x18, 0x9B, 0x68, 0x1B, 0x46, 0x98, 0x07, 0xDB };
|
||||
static const u8 es_set_ahbprot_patch[] = { 0x01 };
|
||||
|
||||
@ -92,10 +96,12 @@ static const u8 Kill_AntiSysTitleInstallv3_pt3_old[] = { 0x68, 0xFB, 0x2B, 0x00,
|
||||
static const u8 Kill_AntiSysTitleInstallv3_pt3_patch[] = { 0x68, 0xFB, 0x2B, 0x00, 0xDB, 0x10 };
|
||||
|
||||
/* ISFS_SetAttr patches made by megazig */
|
||||
#if 0
|
||||
static const u8 isfs_setattr_pt1_old[] = { 0x42, 0xAB, 0xD0, 0x02, 0x20, 0x66 };
|
||||
static const u8 isfs_setattr_pt1_patch[] = { 0x42, 0xAB, 0xE0, 0x02, 0x20, 0x66 };
|
||||
static const u8 isfs_setattr_pt2_old[] = { 0x2D, 0x00, 0xD0, 0x02, 0x20, 0x66 };
|
||||
static const u8 isfs_setattr_pt2_patch[] = { 0x2D, 0x00, 0xE0, 0x02, 0x20, 0x66 };
|
||||
#endif
|
||||
|
||||
static u8 apply_patch(const char *name, const u8 *old, u32 old_size, const u8 *patch, size_t patch_size, u32 patch_offset, bool verbose) {
|
||||
u8 *ptr_start = (u8*)*((u32*)0x80003134), *ptr_end = (u8*)0x94000000;
|
||||
|
@ -49,7 +49,7 @@ extern "C" {
|
||||
//==============================================================================
|
||||
// Extra standard declarations
|
||||
//==============================================================================
|
||||
typedef signed int s32;
|
||||
//typedef signed int s32;
|
||||
//==============================================================================
|
||||
|
||||
//==============================================================================
|
||||
|
@ -975,7 +975,9 @@ int GameBooter::BootNintendont(struct discHdr *gameHdr)
|
||||
u8 ninPal50PatchChoice = game_cfg->NINPal50Patch == INHERIT ? Settings.NINPal50Patch : game_cfg->NINPal50Patch;
|
||||
u8 ninRemlimitChoice = game_cfg->NINRemlimit == INHERIT ? Settings.NINRemlimit : game_cfg->NINRemlimit;
|
||||
u8 ninArcadeModeChoice = game_cfg->NINArcadeMode == INHERIT ? Settings.NINArcadeMode : game_cfg->NINArcadeMode;
|
||||
|
||||
u8 ninCCRumbleChoice = game_cfg->NINCCRumble == INHERIT ? Settings.NINCCRumble : game_cfg->NINCCRumble;
|
||||
u8 ninSkipIPLChoice = game_cfg->NINSkipIPL == INHERIT ? Settings.NINSkipIPL : game_cfg->NINSkipIPL;
|
||||
|
||||
const char *ninLoaderPath = game_cfg->NINLoaderPath.size() == 0 ? Settings.NINLoaderPath : game_cfg->NINLoaderPath.c_str();
|
||||
|
||||
|
||||
@ -1421,7 +1423,11 @@ int GameBooter::BootNintendont(struct discHdr *gameHdr)
|
||||
nin_config->Config |= NIN_CFG_WIIU_WIDE; // v2.258+
|
||||
if(ninArcadeModeChoice)
|
||||
nin_config->Config |= NIN_CFG_ARCADE_MODE; // v4.424+ Triforce Arcade Mode
|
||||
|
||||
if (ninCCRumbleChoice)
|
||||
nin_config->Config |= NIN_CFG_CC_RUMBLE; // v4.424+ Classic Controller Rumble
|
||||
if (ninSkipIPLChoice)
|
||||
nin_config->Config |= NIN_CFG_SKIP_IPL; // v4.424+ Skip Gamecube BIOS
|
||||
|
||||
// Max Pads
|
||||
nin_config->MaxPads = ninMaxPadsChoice; // NIN_CFG_VERSION 2 r42
|
||||
|
||||
|
@ -35,7 +35,7 @@ void CreateTitleTMD(const char *path, const struct discHdr *hdr)
|
||||
if (!disc)
|
||||
return;
|
||||
|
||||
wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
wiidisc_t *wdisc = wd_open_disc((s32(*)(void *, u32, u32, void *)) wbfs_disc_read, disc);
|
||||
if (!wdisc)
|
||||
{
|
||||
WBFS_CloseDisc(disc);
|
||||
|
@ -97,7 +97,7 @@ int split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill)
|
||||
int fd;
|
||||
if (lba >= s->total_sec)
|
||||
{
|
||||
fprintf(stderr, "SPLIT: invalid sector %u / %u\n", lba, (u32) s->total_sec);
|
||||
fprintf(stderr, "SPLIT: invalid sector %u / %u\n", (unsigned int)lba, (unsigned int)s->total_sec);
|
||||
return -1;
|
||||
}
|
||||
int idx;
|
||||
@ -150,7 +150,7 @@ int split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill)
|
||||
return fd;
|
||||
}
|
||||
|
||||
int split_read_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
s32 split_read_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
{
|
||||
split_info_t *s = _fp;
|
||||
int fd;
|
||||
@ -166,7 +166,7 @@ int split_read_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
fd = split_get_file(s, lba + i, &chunk, 1);
|
||||
if (fd < 0)
|
||||
{
|
||||
fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, count, _fp);
|
||||
fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, (int)count, _fp);
|
||||
split_error( "error seeking in disc partition" );
|
||||
return 1;
|
||||
}
|
||||
@ -174,7 +174,7 @@ int split_read_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
ret = read(fd, ptr, chunk * 512);
|
||||
if (ret != chunk * 512)
|
||||
{
|
||||
fprintf(stderr, "error reading %u %u [%u] %u = %u\n", lba, count, i, chunk, ret);
|
||||
fprintf(stderr, "error reading %u %u [%u] %u = %u\n", (unsigned int)lba, (unsigned int)count, i, (unsigned int)chunk, ret);
|
||||
split_error( "error reading disc" );
|
||||
return 1;
|
||||
}
|
||||
@ -182,7 +182,7 @@ int split_read_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int split_write_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
s32 split_write_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
{
|
||||
split_info_t *s = _fp;
|
||||
int fd;
|
||||
@ -200,7 +200,7 @@ int split_write_sector(void *_fp, u32 lba, u32 count, void*buf)
|
||||
// fprintf(stderr, "WRITE CHUNK %d %d/%d\n", lba+i, chunk, count);
|
||||
if (fd < 0 || !chunk)
|
||||
{
|
||||
fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, count, _fp);
|
||||
fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, (int)count, _fp);
|
||||
split_error( "error seeking in disc partition" );
|
||||
return 1;
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ extern "C"
|
||||
int split_open_file(split_info_t *s, int idx);
|
||||
int split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill);
|
||||
int split_fill(split_info_t *s, int idx, u64 size);
|
||||
int split_read_sector(void *_fp, u32 lba, u32 count, void*buf);
|
||||
int split_write_sector(void *_fp, u32 lba, u32 count, void*buf);
|
||||
s32 split_read_sector(void *_fp, u32 lba, u32 count, void*buf);
|
||||
s32 split_write_sector(void *_fp, u32 lba, u32 count, void*buf);
|
||||
void split_init(split_info_t *s, char *fname);
|
||||
void split_set_size(split_info_t *s, u64 split_size, u64 total_size);
|
||||
void split_close(split_info_t *s);
|
||||
|
@ -240,7 +240,7 @@ u64 WBFS_EstimeGameSize(void)
|
||||
return WbfsList[Settings.partition]->EstimateGameSize();
|
||||
}
|
||||
|
||||
int WBFS_GetFragList(u8 *id)
|
||||
s32 WBFS_GetFragList(u8 *id)
|
||||
{
|
||||
int part_num = gameList.GetPartitionNumber(id);
|
||||
if(!VALID(part_num))
|
||||
|
@ -33,7 +33,7 @@ extern "C"
|
||||
s32 WBFS_ReIDGame(u8 *discid, const void *newID);
|
||||
u64 WBFS_EstimeGameSize(void);
|
||||
|
||||
int WBFS_GetFragList(u8 *id);
|
||||
s32 WBFS_GetFragList(u8 *id);
|
||||
|
||||
s32 WBFS_OpenAll();
|
||||
s32 WBFS_OpenPart(int part_num);
|
||||
|
@ -17,7 +17,7 @@ class Wbfs
|
||||
s32 CheckGame(u8 *);
|
||||
s32 GameSize(u8 *, f32 *);
|
||||
bool IsMounted() { return hdd == 0; };
|
||||
virtual int GetFragList(u8 *id) { return 0; };
|
||||
virtual s32 GetFragList(u8 *id) { return 0; };
|
||||
|
||||
virtual s32 Open() = 0;
|
||||
virtual void Close() {};
|
||||
|
@ -849,7 +849,7 @@ void Wbfs_Fat::CleanTitleCharacters(char *title)
|
||||
}
|
||||
}
|
||||
|
||||
int Wbfs_Fat::GetFragList(u8 *id)
|
||||
s32 Wbfs_Fat::GetFragList(u8 *id)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Wbfs_Fat: public Wbfs
|
||||
|
||||
void AddHeader(struct discHdr *discHeader);
|
||||
|
||||
virtual int GetFragList(u8 *);
|
||||
virtual s32 GetFragList(u8 *);
|
||||
virtual u8 GetFSType(void) { return PART_FS_FAT; }
|
||||
|
||||
static bool CheckLayoutB(char *fname, int len, u8* id, char *fname_title);
|
||||
@ -55,7 +55,7 @@ class Wbfs_Fat: public Wbfs
|
||||
|
||||
void mk_gameid_title(struct discHdr *header, char *name, int re_space, int layout);
|
||||
|
||||
static int nop_rw_sector(void *_fp, u32 lba, u32 count, void* buf) { return 0; }
|
||||
static s32 nop_rw_sector(void *_fp, u32 lba, u32 count, void* buf) { return 0; }
|
||||
};
|
||||
|
||||
#endif //_WBFS_FAT_H
|
||||
|
@ -32,7 +32,7 @@ class Wbfs_Wbfs: public Wbfs
|
||||
s32 ReIDGame(u8 *, const void *);
|
||||
|
||||
u64 EstimateGameSize();
|
||||
int GetFragList(u8 *id);
|
||||
s32 GetFragList(u8 *id);
|
||||
private:
|
||||
WBFS_PartInfo PartInfo;
|
||||
};
|
||||
|
@ -364,7 +364,7 @@ auth_md5Ctx *auth_md5SumCtx(auth_md5Ctx *ctx, const unsigned char *src, const in
|
||||
(ctx->b_used)++;
|
||||
if (64 == ctx->b_used)
|
||||
{
|
||||
Permute(ctx->ABCD, ctx->block);
|
||||
Permute((uint32_t *)ctx->ABCD, ctx->block);
|
||||
ctx->b_used = 0;
|
||||
}
|
||||
}
|
||||
@ -415,7 +415,7 @@ auth_md5Ctx *auth_md5CloseCtx(auth_md5Ctx *ctx, unsigned char *dst)
|
||||
*/
|
||||
if (56 < ctx->b_used)
|
||||
{
|
||||
Permute(ctx->ABCD, ctx->block);
|
||||
Permute((uint32_t *)ctx->ABCD, ctx->block);
|
||||
for (i = 0; i < 64; i++)
|
||||
ctx->block[i] = 0;
|
||||
}
|
||||
@ -429,7 +429,7 @@ auth_md5Ctx *auth_md5CloseCtx(auth_md5Ctx *ctx, unsigned char *dst)
|
||||
for (i = 0; i < 4; i++)
|
||||
ctx->block[56 + i] |= GetLongByte( l, i );
|
||||
ctx->block[60] = ((GetLongByte( ctx->len, 3 ) & 0xE0) >> 5); /* See Above! */
|
||||
Permute(ctx->ABCD, ctx->block);
|
||||
Permute((uint32_t *)ctx->ABCD, ctx->block);
|
||||
|
||||
/* Now copy the result into the output buffer and we're done.
|
||||
*/
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gecko.h"
|
||||
|
||||
#define GP_FIFO_SIZE (256 * 1024 * 3)
|
||||
static unsigned int *xfb[2] = { NULL, NULL }; // Double buffered
|
||||
static u32 *xfb[2] = { NULL, NULL }; // Double buffered
|
||||
static int whichfb = 0; // Switch
|
||||
static unsigned char *gp_fifo = NULL;
|
||||
Mtx44 FSProjection2D;
|
||||
|
@ -127,8 +127,8 @@ bool NandTitle::GetName(u64 tid, int language, wchar_t* name)
|
||||
return false;
|
||||
}
|
||||
|
||||
snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", TITLE_UPPER( tid ), TITLE_LOWER( tid ),
|
||||
titleTmd->contents[i].cid);
|
||||
snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", (unsigned int)TITLE_UPPER( tid ), (unsigned int)TITLE_LOWER( tid ),
|
||||
(unsigned int)titleTmd->contents[i].cid);
|
||||
//gprintf("%s\n", app );
|
||||
|
||||
if (language > CONF_LANG_KOREAN) language = CONF_LANG_ENGLISH;
|
||||
@ -212,8 +212,8 @@ bool NandTitle::Exists(u64 tid)
|
||||
}
|
||||
if (!ok) return false;
|
||||
|
||||
snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", TITLE_UPPER( tid ), TITLE_LOWER( tid ),
|
||||
titleTmd->contents[i].cid);
|
||||
snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", (unsigned int)TITLE_UPPER( tid ), (unsigned int)TITLE_LOWER( tid ),
|
||||
(unsigned int)titleTmd->contents[i].cid);
|
||||
s32 fd = ISFS_Open(app, ISFS_OPEN_READ);
|
||||
if (fd >= 0) ISFS_Close(fd);
|
||||
|
||||
|
@ -189,12 +189,12 @@ bool Wad::UnInstall(const char *installpath)
|
||||
int result = true;
|
||||
|
||||
// Remove ticket
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", installpath, (unsigned int)(tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
if(!RemoveFile(filepath))
|
||||
result = false;
|
||||
|
||||
// Remove contents / data
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
if(!RemoveDirectory(filepath))
|
||||
result = false;
|
||||
|
||||
@ -211,22 +211,22 @@ bool Wad::Install(const char *installpath)
|
||||
tmd *tmd_data = (tmd *) SIGNATURE_PAYLOAD((signed_blob *) p_tmd);
|
||||
|
||||
// Create necessary folders if not existing
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/", installpath, (u32) (tmd_data->title_id >> 32));
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/", installpath, (unsigned int) (tmd_data->title_id >> 32));
|
||||
CreateSubfolder(filepath);
|
||||
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
CreateSubfolder(filepath);
|
||||
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/data/", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/data/", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
CreateSubfolder(filepath);
|
||||
|
||||
// Write ticket file
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/ticket/%08x/%08x.tik", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
if(!WriteFile(filepath, p_tik, header->tik_len))
|
||||
return false;
|
||||
|
||||
// Write tmd file
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/title.tmd", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/title.tmd", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id);
|
||||
if(!WriteFile(filepath, p_tmd, header->tmd_len))
|
||||
return false;
|
||||
|
||||
@ -332,7 +332,7 @@ bool Wad::InstallContents(const char *installpath)
|
||||
}
|
||||
else {
|
||||
// private content
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/%08x.app", installpath, (u32) (tmd_data->title_id >> 32), (u32) tmd_data->title_id, content->cid);
|
||||
snprintf(filepath, sizeof(filepath), "%s/title/%08x/%08x/content/%08x.app", installpath, (unsigned int) (tmd_data->title_id >> 32), (unsigned int) tmd_data->title_id, (unsigned int) content->cid);
|
||||
}
|
||||
|
||||
// Create file
|
||||
@ -356,7 +356,7 @@ bool Wad::InstallContents(const char *installpath)
|
||||
return false;
|
||||
}
|
||||
|
||||
snprintf(progressTxt, sizeof(progressTxt), "%s %08x.app", tr("Installing content"), content->cid);
|
||||
snprintf(progressTxt, sizeof(progressTxt), "%s %08x.app", tr("Installing content"), (unsigned int) content->cid);
|
||||
|
||||
// Go to position
|
||||
fseek(pFile, offset, SEEK_SET);
|
||||
@ -462,7 +462,7 @@ int Wad::CheckContentMap(const char *installpath, tmd_content *content, char *fi
|
||||
content_map_size++;
|
||||
|
||||
map = (map_entry_t *) content_map;
|
||||
sprintf(map[next_entry].name, "%08x", next_entry);
|
||||
sprintf(map[next_entry].name, "%08x", (unsigned int)next_entry);
|
||||
memcpy(map[next_entry].hash, content->hash, 20);
|
||||
|
||||
// write new content.map
|
||||
@ -470,7 +470,7 @@ int Wad::CheckContentMap(const char *installpath, tmd_content *content, char *fi
|
||||
if(!WriteFile(filepath, content_map, content_map_size * sizeof(map_entry_t)))
|
||||
return -1;
|
||||
|
||||
snprintf(filepath, 1024, "%s/shared1/%08x.app", installpath, next_entry);
|
||||
snprintf(filepath, 1024, "%s/shared1/%08x.app", installpath, (unsigned int)next_entry);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user