-some code and image cleanup
-added Abz to the list of testers -updated dutch.ini
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 964 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 888 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
data/images/loading.jpg
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/save.bin
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -58,7 +58,7 @@ static u8 *GetDol(u32 bootcontent, u64 title)
|
|||||||
|
|
||||||
u32 contentSize = 0;
|
u32 contentSize = 0;
|
||||||
|
|
||||||
u8 *data = ISFS_GetFile((u8 *) &filepath, &contentSize, -1);
|
u8 *data = ISFS_GetFile(filepath, &contentSize, -1);
|
||||||
if(data != NULL && contentSize != 0)
|
if(data != NULL && contentSize != 0)
|
||||||
{
|
{
|
||||||
if(isLZ77compressed(data))
|
if(isLZ77compressed(data))
|
||||||
@ -86,7 +86,7 @@ static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
|
|||||||
sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
|
sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
|
||||||
|
|
||||||
u32 size;
|
u32 size;
|
||||||
u8 *data = ISFS_GetFile((u8 *) &filepath, &size, -1);
|
u8 *data = ISFS_GetFile(filepath, &size, -1);
|
||||||
if(data == NULL || size < 0x208)
|
if(data == NULL || size < 0x208)
|
||||||
return ret;
|
return ret;
|
||||||
*IOS = data[0x18B];
|
*IOS = data[0x18B];
|
||||||
|
@ -20,8 +20,9 @@ typedef void (*app_init)(void (*report)(const char *fmt, ...));
|
|||||||
typedef void *(*app_final)();
|
typedef void *(*app_final)();
|
||||||
typedef void (*app_entry)(void (**init)(void (*report)(const char *fmt, ...)), int (**main)(), void *(**final)());
|
typedef void (*app_entry)(void (**init)(void (*report)(const char *fmt, ...)), int (**main)(), void *(**final)());
|
||||||
|
|
||||||
/* Apploader pointers */
|
/* pointers */
|
||||||
static u8 *appldr = (u8 *)0x81200000;
|
static u8 *appldr = (u8*)0x81200000;
|
||||||
|
static const char *GameID = (const char*)0x80000000;
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
#define APPLDR_OFFSET 0x910
|
#define APPLDR_OFFSET 0x910
|
||||||
@ -161,7 +162,7 @@ static void Anti_002_fix(void *Address, int Size)
|
|||||||
|
|
||||||
static void PrinceOfPersiaPatch()
|
static void PrinceOfPersiaPatch()
|
||||||
{
|
{
|
||||||
if(memcmp("SPX", (char*)Disc_ID, 3) != 0 && memcmp("RPW", (char*)Disc_ID, 3) != 0)
|
if(memcmp("SPX", GameID, 3) != 0 && memcmp("RPW", GameID, 3) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WIP_Code CodeList[5];
|
WIP_Code CodeList[5];
|
||||||
@ -186,7 +187,7 @@ static void PrinceOfPersiaPatch()
|
|||||||
static void NewSuperMarioBrosPatch()
|
static void NewSuperMarioBrosPatch()
|
||||||
{
|
{
|
||||||
WIP_Code CodeList[3];
|
WIP_Code CodeList[3];
|
||||||
if(memcmp("SMNE01", (char*)Disc_ID, 6) == 0)
|
if(memcmp("SMNE01", GameID, 6) == 0)
|
||||||
{
|
{
|
||||||
CodeList[0].offset = 0x001AB610;
|
CodeList[0].offset = 0x001AB610;
|
||||||
CodeList[0].srcaddress = 0x9421FFD0;
|
CodeList[0].srcaddress = 0x9421FFD0;
|
||||||
@ -199,7 +200,7 @@ static void NewSuperMarioBrosPatch()
|
|||||||
CodeList[2].dstaddress = 0x71000000;
|
CodeList[2].dstaddress = 0x71000000;
|
||||||
set_wip_list(CodeList, 3);
|
set_wip_list(CodeList, 3);
|
||||||
}
|
}
|
||||||
else if(memcmp("SMNP01", (char*)Disc_ID, 6) == 0)
|
else if(memcmp("SMNP01", GameID, 6) == 0)
|
||||||
{
|
{
|
||||||
CodeList[0].offset = 0x001AB750;
|
CodeList[0].offset = 0x001AB750;
|
||||||
CodeList[0].srcaddress = 0x9421FFD0;
|
CodeList[0].srcaddress = 0x9421FFD0;
|
||||||
@ -212,7 +213,7 @@ static void NewSuperMarioBrosPatch()
|
|||||||
CodeList[2].dstaddress = 0x38800071;
|
CodeList[2].dstaddress = 0x38800071;
|
||||||
set_wip_list(CodeList, 3);
|
set_wip_list(CodeList, 3);
|
||||||
}
|
}
|
||||||
else if(memcmp("SMNJ01", (char*)Disc_ID, 6) == 0)
|
else if(memcmp("SMNJ01", GameID, 6) == 0)
|
||||||
{
|
{
|
||||||
CodeList[0].offset = 0x001AB420;
|
CodeList[0].offset = 0x001AB420;
|
||||||
CodeList[0].srcaddress = 0x9421FFD0;
|
CodeList[0].srcaddress = 0x9421FFD0;
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
|
|
||||||
#include <ogcsys.h>
|
#include <ogcsys.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <malloc.h>
|
|
||||||
#include <ogc/isfs.h>
|
#include <ogc/isfs.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <malloc.h>
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
#include "gecko.h"
|
||||||
|
|
||||||
static fstats stats ATTRIBUTE_ALIGN(32);
|
static fstats stats ATTRIBUTE_ALIGN(32);
|
||||||
|
|
||||||
u8 *ISFS_GetFile(u8 *path, u32 *size, s32 length)
|
u8 *ISFS_GetFile(const char *path, u32 *size, s32 length)
|
||||||
{
|
{
|
||||||
*size = 0;
|
*size = 0;
|
||||||
|
gprintf("ISFS_GetFile %s", path);
|
||||||
s32 fd = ISFS_Open((const char *)path, ISFS_OPEN_READ);
|
s32 fd = ISFS_Open(path, ISFS_OPEN_READ);
|
||||||
u8 *buf = NULL;
|
u8 *buf = NULL;
|
||||||
|
|
||||||
if(fd >= 0)
|
if(fd >= 0)
|
||||||
@ -25,7 +25,7 @@ u8 *ISFS_GetFile(u8 *path, u32 *size, s32 length)
|
|||||||
if(length <= 0)
|
if(length <= 0)
|
||||||
length = stats.file_length;
|
length = stats.file_length;
|
||||||
if(length > 0)
|
if(length > 0)
|
||||||
buf = (u8 *)memalign(32, ALIGN32(length));
|
buf = (u8*)memalign(32, ALIGN32(length));
|
||||||
if(buf)
|
if(buf)
|
||||||
{
|
{
|
||||||
*size = stats.file_length;
|
*size = stats.file_length;
|
||||||
@ -38,11 +38,12 @@ u8 *ISFS_GetFile(u8 *path, u32 *size, s32 length)
|
|||||||
}
|
}
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*size > 0)
|
if(*size > 0)
|
||||||
{
|
{
|
||||||
|
gprintf(" succeed!\n");
|
||||||
DCFlushRange(buf, *size);
|
DCFlushRange(buf, *size);
|
||||||
ICInvalidateRange(buf, *size);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
gprintf(" failed!\n");
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
u8 *ISFS_GetFile(u8 *path, u32 *size, s32 length);
|
u8 *ISFS_GetFile(const char *path, u32 *size, s32 length);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ distribution.
|
|||||||
#include "LanguageCode.h"
|
#include "LanguageCode.h"
|
||||||
#include "AnimatedBanner.h"
|
#include "AnimatedBanner.h"
|
||||||
#include "gui/text.hpp"
|
#include "gui/text.hpp"
|
||||||
|
#include "memory/mem2.hpp"
|
||||||
#include "unzip/U8Archive.h"
|
#include "unzip/U8Archive.h"
|
||||||
#include "unzip/lz77.h"
|
#include "unzip/lz77.h"
|
||||||
#include "unzip/ash.h"
|
#include "unzip/ash.h"
|
||||||
@ -59,7 +60,7 @@ void AnimatedBanner::Clear()
|
|||||||
bool AnimatedBanner::LoadBanner()
|
bool AnimatedBanner::LoadBanner()
|
||||||
{
|
{
|
||||||
u32 banner_bin_size;
|
u32 banner_bin_size;
|
||||||
u8 *banner_bin = CurrentBanner.GetFile((char*)"banner.bin", &banner_bin_size);
|
u8 *banner_bin = CurrentBanner.GetFile("banner.bin", &banner_bin_size);
|
||||||
if(banner_bin == NULL)
|
if(banner_bin == NULL)
|
||||||
return false;
|
return false;
|
||||||
bool ret = LoadBannerBin(banner_bin, banner_bin_size);
|
bool ret = LoadBannerBin(banner_bin, banner_bin_size);
|
||||||
@ -67,7 +68,7 @@ bool AnimatedBanner::LoadBanner()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimatedBanner::LoadBannerBin(u8 *banner_bin, u32 banner_bin_size)
|
bool AnimatedBanner::LoadBannerBin(const u8 *banner_bin, u32 banner_bin_size)
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
layout_banner = LoadLayout(banner_bin, banner_bin_size, "banner", CONF_GetLanguageString());
|
layout_banner = LoadLayout(banner_bin, banner_bin_size, "banner", CONF_GetLanguageString());
|
||||||
@ -104,14 +105,14 @@ void AnimatedBanner::SetBannerTexture(const char *tex_name, const u8 *data, floa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Layout* AnimatedBanner::LoadLayout(u8 *bnr, u32 bnr_size, const std::string& lyt_name, const std::string &language)
|
Layout* AnimatedBanner::LoadLayout(const u8 *bnr, u32 bnr_size, const std::string& lyt_name, const std::string &language)
|
||||||
{
|
{
|
||||||
u32 brlyt_size = 0;
|
u32 brlyt_size = 0;
|
||||||
newBanner = DecompressCopy(bnr, bnr_size, &bnr_size);
|
newBanner = DecompressCopy(bnr, bnr_size, &bnr_size);
|
||||||
if(newBanner == NULL)
|
if(newBanner == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
const u8 *brlyt = u8_get_file(newBanner, (char*)fmt("%s.brlyt", lyt_name.c_str()), &brlyt_size);
|
const u8 *brlyt = u8_get_file(newBanner, fmt("%s.brlyt", lyt_name.c_str()), &brlyt_size);
|
||||||
if(!brlyt)
|
if(!brlyt)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -121,22 +122,22 @@ Layout* AnimatedBanner::LoadLayout(u8 *bnr, u32 bnr_size, const std::string& lyt
|
|||||||
u32 length_start = 0, length_loop = 0;
|
u32 length_start = 0, length_loop = 0;
|
||||||
|
|
||||||
u32 brlan_start_size = 0;
|
u32 brlan_start_size = 0;
|
||||||
const u8 *brlan_start = u8_get_file(newBanner, (char*)fmt("%s_Start.brlan", lyt_name.c_str()), &brlan_start_size);
|
const u8 *brlan_start = u8_get_file(newBanner, fmt("%s_Start.brlan", lyt_name.c_str()), &brlan_start_size);
|
||||||
const u8 *brlan_loop = 0;
|
const u8 *brlan_loop = 0;
|
||||||
|
|
||||||
// try the alternative file
|
// try the alternative file
|
||||||
if(!brlan_start)
|
if(!brlan_start)
|
||||||
brlan_start = u8_get_file(newBanner, (char*)fmt("%s_In.brlan", lyt_name.c_str()), &brlan_start_size);
|
brlan_start = u8_get_file(newBanner, fmt("%s_In.brlan", lyt_name.c_str()), &brlan_start_size);
|
||||||
|
|
||||||
if(brlan_start)
|
if(brlan_start)
|
||||||
length_start = Animator::LoadAnimators((const RLAN_Header *)brlan_start, *layout, 0);
|
length_start = Animator::LoadAnimators((const RLAN_Header *)brlan_start, *layout, 0);
|
||||||
|
|
||||||
u32 brlan_loop_size = 0;
|
u32 brlan_loop_size = 0;
|
||||||
brlan_loop = u8_get_file(newBanner, (char*)fmt("%s.brlan", lyt_name.c_str()), &brlan_loop_size);
|
brlan_loop = u8_get_file(newBanner, fmt("%s.brlan", lyt_name.c_str()), &brlan_loop_size);
|
||||||
if(!brlan_loop)
|
if(!brlan_loop)
|
||||||
brlan_loop = u8_get_file(newBanner, (char*)fmt("%s_Loop.brlan", lyt_name.c_str()), &brlan_loop_size);
|
brlan_loop = u8_get_file(newBanner, fmt("%s_Loop.brlan", lyt_name.c_str()), &brlan_loop_size);
|
||||||
if(!brlan_loop)
|
if(!brlan_loop)
|
||||||
brlan_loop = u8_get_file(newBanner, (char*)fmt("%s_Rso0.brlan", lyt_name.c_str()), &brlan_loop_size); // added for "artstyle" wiiware
|
brlan_loop = u8_get_file(newBanner, fmt("%s_Rso0.brlan", lyt_name.c_str()), &brlan_loop_size); // added for "artstyle" wiiware
|
||||||
|
|
||||||
if(brlan_loop)
|
if(brlan_loop)
|
||||||
length_loop = Animator::LoadAnimators((const RLAN_Header *)brlan_loop, *layout, 1);
|
length_loop = Animator::LoadAnimators((const RLAN_Header *)brlan_loop, *layout, 1);
|
||||||
@ -152,7 +153,7 @@ Layout* AnimatedBanner::LoadLayout(u8 *bnr, u32 bnr_size, const std::string& lyt
|
|||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 *DecompressCopy(u8 *stuff, u32 len, u32 *size)
|
u8 *DecompressCopy(const u8 *stuff, u32 len, u32 *size)
|
||||||
{
|
{
|
||||||
// check for IMD5 header and skip it
|
// check for IMD5 header and skip it
|
||||||
if(len > 0x40 && *(u32*)stuff == 0x494d4435) // IMD5
|
if(len > 0x40 && *(u32*)stuff == 0x494d4435) // IMD5
|
||||||
@ -160,7 +161,6 @@ u8 *DecompressCopy(u8 *stuff, u32 len, u32 *size)
|
|||||||
stuff += 0x20;
|
stuff += 0x20;
|
||||||
len -= 0x20;
|
len -= 0x20;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 *ret = NULL;
|
u8 *ret = NULL;
|
||||||
// determine if it needs to be decompressed
|
// determine if it needs to be decompressed
|
||||||
if(IsAshCompressed(stuff, len))
|
if(IsAshCompressed(stuff, len))
|
||||||
@ -183,13 +183,13 @@ u8 *DecompressCopy(u8 *stuff, u32 len, u32 *size)
|
|||||||
else if(*(u32*)(stuff) == 0x4C5A3737) // LZ77
|
else if(*(u32*)(stuff) == 0x4C5A3737) // LZ77
|
||||||
{
|
{
|
||||||
// LZ77 with a magic word
|
// LZ77 with a magic word
|
||||||
if(decompressLZ77content(stuff + 4, len - 4, &ret, &len ))
|
if(decompressLZ77content(stuff + 4, len - 4, &ret, &len))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// just copy the data out of the archive
|
// just copy the data out of the archive
|
||||||
ret = (u8*)memalign( 32, len );
|
ret = (u8*)MEM2_memalign(32, len);
|
||||||
if( !ret )
|
if( !ret )
|
||||||
{
|
{
|
||||||
gprintf( "out of memory\n" );
|
gprintf( "out of memory\n" );
|
||||||
|
@ -37,19 +37,19 @@ public:
|
|||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
bool LoadBanner();
|
bool LoadBanner();
|
||||||
bool LoadBannerBin(u8 *banner_bin, u32 banner_bin_size);
|
bool LoadBannerBin(const u8 *banner_bin, u32 banner_bin_size);
|
||||||
Layout *getBanner() const { return layout_banner; }
|
Layout *getBanner() const { return layout_banner; }
|
||||||
void SetBannerTexture(const char *tex_name, const u8 *data, float width, float height, u8 fmt);
|
void SetBannerTexture(const char *tex_name, const u8 *data, float width, float height, u8 fmt);
|
||||||
void SetBannerText(const char *text_name, const wchar_t *wText);
|
void SetBannerText(const char *text_name, const wchar_t *wText);
|
||||||
protected:
|
protected:
|
||||||
Layout* LoadLayout(u8 *bnr, u32 bnr_size, const std::string& lyt_name, const std::string &language);
|
Layout* LoadLayout(const u8 *bnr, u32 bnr_size, const std::string& lyt_name, const std::string &language);
|
||||||
Layout *layout_banner;
|
Layout *layout_banner;
|
||||||
u8 *newBanner;
|
u8 *newBanner;
|
||||||
u8 *sysFont1;
|
u8 *sysFont1;
|
||||||
u8 *sysFont2;
|
u8 *sysFont2;
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 *DecompressCopy(u8 *stuff, u32 len, u32 *size);
|
u8 *DecompressCopy(const u8 *stuff, const u32 len, u32 *size);
|
||||||
|
|
||||||
extern AnimatedBanner gameBanner;
|
extern AnimatedBanner gameBanner;
|
||||||
#endif
|
#endif
|
||||||
|
@ -148,7 +148,7 @@ bool Banner::GetName(wchar_t *name, int language)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 *Banner::GetFile(char *name, u32 *size)
|
u8 *Banner::GetFile(const char *name, u32 *size)
|
||||||
{
|
{
|
||||||
const u8 *bnrArc = (const u8 *)(((u8 *) imet) + sizeof(IMET));
|
const u8 *bnrArc = (const u8 *)(((u8 *) imet) + sizeof(IMET));
|
||||||
const u8* curfile = u8_get_file(bnrArc, name, size);
|
const u8* curfile = u8_get_file(bnrArc, name, size);
|
||||||
|
@ -68,7 +68,7 @@ class Banner
|
|||||||
|
|
||||||
bool GetName(u8 *name, int language);
|
bool GetName(u8 *name, int language);
|
||||||
bool GetName(wchar_t *name, int language);
|
bool GetName(wchar_t *name, int language);
|
||||||
u8 *GetFile(char *name, u32 *size);
|
u8 *GetFile(const char *name, u32 *size);
|
||||||
|
|
||||||
void GetBanner(u64 title, char *appname, bool imetOnly = false);
|
void GetBanner(u64 title, char *appname, bool imetOnly = false);
|
||||||
u8 *GetBannerFile() { return opening; }
|
u8 *GetBannerFile() { return opening; }
|
||||||
|
@ -65,7 +65,7 @@ bool NandSave::CheckSave()
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* extract our archive */
|
/* extract our archive */
|
||||||
decompressLZ77content(save_bin+4, save_bin_size-4, &u8_bin, &u8_bin_size);
|
decompressLZ77content(save_bin, save_bin_size, &u8_bin, &u8_bin_size);
|
||||||
if(u8_bin == NULL || u8_bin_size == 0)
|
if(u8_bin == NULL || u8_bin_size == 0)
|
||||||
goto error;
|
goto error;
|
||||||
/* grab cert.sys */
|
/* grab cert.sys */
|
||||||
|
@ -41,8 +41,8 @@ BlindDude, Bubba, DJTaz, OggZee, entropy, \
|
|||||||
Usptactical, WiiPower, Hermes, Spidy1000, megazig, \
|
Usptactical, WiiPower, Hermes, Spidy1000, megazig, \
|
||||||
Dimok, Kovani, Drexyl, DvZ, Etheboss, stfour, \
|
Dimok, Kovani, Drexyl, DvZ, Etheboss, stfour, \
|
||||||
GaiaKnight, nibb, NJ7, Plasma, Pakatus, giantpune, \
|
GaiaKnight, nibb, NJ7, Plasma, Pakatus, giantpune, \
|
||||||
wolf, ravmn, spidercaleb, Ziggy34, xFede, \
|
wolf, ravmn, spidercaleb, Ziggy34, xFede, Abz, \
|
||||||
And to anyone who has donated or \
|
and to anyone who has donated or \
|
||||||
contributed to Wiiflow that we missed!"
|
contributed to Wiiflow that we missed!"
|
||||||
|
|
||||||
#define THANKS_SITES \
|
#define THANKS_SITES \
|
||||||
|
@ -32,8 +32,9 @@ extern const u8 dvdskin_greentwo_jpg[];
|
|||||||
extern const u32 dvdskin_greentwo_jpg_size;
|
extern const u32 dvdskin_greentwo_jpg_size;
|
||||||
|
|
||||||
extern const u8 nopic_png[];
|
extern const u8 nopic_png[];
|
||||||
extern const u8 loading_png[];
|
|
||||||
extern const u8 flatnopic_png[];
|
extern const u8 flatnopic_png[];
|
||||||
|
extern const u8 loading_jpg[];
|
||||||
|
extern const u32 loading_jpg_size;
|
||||||
extern const u8 flatloading_jpg[];
|
extern const u8 flatloading_jpg[];
|
||||||
extern const u32 flatloading_jpg_size;
|
extern const u32 flatloading_jpg_size;
|
||||||
|
|
||||||
@ -1879,7 +1880,7 @@ bool CCoverFlow::start(const char *id)
|
|||||||
{
|
{
|
||||||
if(m_pngLoadCover.empty() || m_loadingTexture.fromImageFile(m_pngLoadCover.c_str(), GX_TF_CMPR, 32, 512) != TE_OK)
|
if(m_pngLoadCover.empty() || m_loadingTexture.fromImageFile(m_pngLoadCover.c_str(), GX_TF_CMPR, 32, 512) != TE_OK)
|
||||||
{
|
{
|
||||||
if(m_loadingTexture.fromPNG(loading_png, GX_TF_CMPR, 32, 512) != TE_OK)
|
if(m_loadingTexture.fromJPG(loading_jpg, loading_jpg_size, GX_TF_CMPR, 32, 512) != TE_OK)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(m_pngNoCover.empty() || m_noCoverTexture.fromImageFile(m_pngNoCover.c_str(), GX_TF_CMPR, 32, 512) != TE_OK)
|
if(m_pngNoCover.empty() || m_noCoverTexture.fromImageFile(m_pngNoCover.c_str(), GX_TF_CMPR, 32, 512) != TE_OK)
|
||||||
|
@ -43,7 +43,6 @@ u8 *ISFS_GetFile(const char *path, u32 *size, s32 length)
|
|||||||
{
|
{
|
||||||
//gprintf(" succeed!\n");
|
//gprintf(" succeed!\n");
|
||||||
DCFlushRange(buf, *size);
|
DCFlushRange(buf, *size);
|
||||||
ICInvalidateRange(buf, *size);
|
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
// gprintf(" failed!\n");
|
// gprintf(" failed!\n");
|
||||||
|
@ -1206,7 +1206,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
{
|
{
|
||||||
/* Read header */
|
/* Read header */
|
||||||
Disc_ReadHeader(&wii_hdr);
|
Disc_ReadHeader(&wii_hdr);
|
||||||
id = string((char*)wii_hdr.id, 6);
|
id = string((const char*)wii_hdr.id, 6);
|
||||||
}
|
}
|
||||||
gprintf("Game ID: %s\n", id.c_str());
|
gprintf("Game ID: %s\n", id.c_str());
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include <string.h>
|
|
||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include "gcard.h"
|
#include "gcard.h"
|
||||||
#include "http.h"
|
#include "http.h"
|
||||||
#include "loader/utils.h"
|
#include "loader/utils.h"
|
||||||
#include "gecko/gecko.hpp"
|
#include "gecko/gecko.hpp"
|
||||||
|
#include "memory/mem2.hpp"
|
||||||
|
|
||||||
#define MAX_URL_SIZE 178 // 128 + 48 + 6
|
#define MAX_URL_SIZE 178 // 128 + 48 + 6
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ u8 register_card_provider(const char *url, const char *key)
|
|||||||
{
|
{
|
||||||
if (strlen(url) > 0 && strlen(key) > 0 && strstr(url, "{KEY}") != NULL && strstr(url, "{ID6}") != NULL)
|
if (strlen(url) > 0 && strlen(key) > 0 && strstr(url, "{KEY}") != NULL && strstr(url, "{ID6}") != NULL)
|
||||||
{
|
{
|
||||||
providers = (struct provider *) realloc(providers, (amount_of_providers + 1) * sizeof(struct provider));
|
providers = (struct provider*)MEM2_realloc(providers, (amount_of_providers + 1) * sizeof(struct provider));
|
||||||
memset(&providers[amount_of_providers], 0, sizeof(struct provider));
|
memset(&providers[amount_of_providers], 0, sizeof(struct provider));
|
||||||
strncpy((char *) providers[amount_of_providers].url, url, 128);
|
strncpy((char *) providers[amount_of_providers].url, url, 128);
|
||||||
strncpy((char *) providers[amount_of_providers].key, key, 48);
|
strncpy((char *) providers[amount_of_providers].key, key, 48);
|
||||||
@ -44,17 +44,16 @@ void add_game_to_card(const char *gameid)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
char *url = (char *)malloc(MAX_URL_SIZE); // Too much memory, but only like 10 bytes
|
char *url = (char *)MEM2_alloc(MAX_URL_SIZE); // Too much memory, but only like 10 bytes
|
||||||
memset(url, 0, sizeof(url));
|
memset(url, 0, sizeof(url));
|
||||||
|
|
||||||
for (i = 0; i < amount_of_providers && providers != NULL; i++)
|
for(i = 0; i < amount_of_providers && providers != NULL; i++)
|
||||||
{
|
{
|
||||||
strcpy(url, (char *) providers[i].url);
|
strcpy(url, (char *) providers[i].url);
|
||||||
str_replace(url, (char *) "{KEY}", (char *) providers[i].key, MAX_URL_SIZE);
|
str_replace(url, "{KEY}", providers[i].key, MAX_URL_SIZE);
|
||||||
str_replace(url, (char *) "{ID6}", (char *) gameid, MAX_URL_SIZE);
|
str_replace(url, "{ID6}", gameid, MAX_URL_SIZE);
|
||||||
|
gprintf("Gamertag URL:\n%s\n", url);
|
||||||
gprintf("Gamertag URL:\n%s\n",(char*)url);
|
downloadfile(NULL, 0, url, NULL, NULL);
|
||||||
downloadfile(NULL, 0, (char *) url, NULL, NULL);
|
|
||||||
}
|
}
|
||||||
free(url);
|
MEM2_free(url);
|
||||||
}
|
}
|
@ -16,10 +16,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
#include "lz77.h"
|
#include "lz77.h"
|
||||||
#include "loader/utils.h"
|
#include "loader/utils.h"
|
||||||
|
#include "memory/mem2.hpp"
|
||||||
|
|
||||||
u32 packBytes(int a, int b, int c, int d)
|
u32 packBytes(int a, int b, int c, int d)
|
||||||
{
|
{
|
||||||
@ -46,7 +45,7 @@ s32 __decompressLZ77_11(const u8 *in, const u32 inputLen, u8 **output, u32 *outp
|
|||||||
|
|
||||||
//printf("Decompressed size : %i\n", decompressedSize);
|
//printf("Decompressed size : %i\n", decompressedSize);
|
||||||
|
|
||||||
out = malloc(ALIGN32(decompressedSize));
|
out = MEM2_memalign(32, decompressedSize);
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
{
|
{
|
||||||
printf("Out of memory\n");
|
printf("Out of memory\n");
|
||||||
@ -132,7 +131,7 @@ s32 __decompressLZ77_10(const u8 *in, u8 **output, u32 *outputLen)
|
|||||||
|
|
||||||
//printf("Decompressed size : %i\n", decompressedSize);
|
//printf("Decompressed size : %i\n", decompressedSize);
|
||||||
|
|
||||||
out = malloc(ALIGN32(decompressedSize));
|
out = MEM2_memalign(32, decompressedSize);
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
{
|
{
|
||||||
printf("Out of memory\n");
|
printf("Out of memory\n");
|
||||||
@ -182,7 +181,7 @@ s32 __decompressLZ77_10(const u8 *in, u8 **output, u32 *outputLen)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isLZ77compressed(u8 *buffer)
|
int isLZ77compressed(const u8 *buffer)
|
||||||
{
|
{
|
||||||
if((buffer[0] == LZ77_0x10_FLAG) || (buffer[0] == LZ77_0x11_FLAG))
|
if((buffer[0] == LZ77_0x10_FLAG) || (buffer[0] == LZ77_0x11_FLAG))
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
int isLZ77compressed(u8 *buffer);
|
int isLZ77compressed(const u8 *buffer);
|
||||||
int decompressLZ77content(const u8 *buffer, const u32 length, u8 **output, u32 *outputLen);
|
int decompressLZ77content(const u8 *buffer, const u32 length, u8 **output, u32 *outputLen);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -142,9 +142,9 @@ dl10=Doneer. Doe een gift\naan GameTDB.com
|
|||||||
dl12=GameTDB
|
dl12=GameTDB
|
||||||
dl13=Download volgorde
|
dl13=Download volgorde
|
||||||
dl14=Kies regios voor hoescontrole:
|
dl14=Kies regios voor hoescontrole:
|
||||||
dl15=Download instelling hoesje
|
dl15=Hoesje download instellingen
|
||||||
dl16=Voer in
|
dl16=Voer in
|
||||||
dl17=Download instelling hoesje
|
dl17=Hoesje download instellingen
|
||||||
dl18=Terug
|
dl18=Terug
|
||||||
dl19=Alleen Origineel
|
dl19=Alleen Origineel
|
||||||
dl2=Terug
|
dl2=Terug
|
||||||
@ -182,7 +182,7 @@ dlmsg3=Downloaden van %s
|
|||||||
dlmsg4=Opslaan van %s
|
dlmsg4=Opslaan van %s
|
||||||
dlmsg5=%i/%i bestanden gedownload
|
dlmsg5=%i/%i bestanden gedownload
|
||||||
dlmsg6=Annuleren...
|
dlmsg6=Annuleren...
|
||||||
dlmsg7=Genereren van lijst te downloaden hoesjes...
|
dlmsg7=Genereer hoesjeslijst om te downloaden...
|
||||||
dlmsg8=Volledige hoesje niet gevonden. Downloaden van %s
|
dlmsg8=Volledige hoesje niet gevonden. Downloaden van %s
|
||||||
dlmsg9=%i/%i bestanden gedownload. %i bevatten alleen de voorkant van het hoesje.
|
dlmsg9=%i/%i bestanden gedownload. %i bevatten alleen de voorkant van het hoesje.
|
||||||
DMLdef=Standaard
|
DMLdef=Standaard
|
||||||
@ -261,7 +261,7 @@ menu=Systeemmenu
|
|||||||
NANDfull=Volledig
|
NANDfull=Volledig
|
||||||
NANDoff=Uit
|
NANDoff=Uit
|
||||||
NANDpart=Gedeeltelijk
|
NANDpart=Gedeeltelijk
|
||||||
neek1=Start Title met neek2o
|
neek1=Start Titel met neek2o
|
||||||
neek2o=neek2o
|
neek2o=neek2o
|
||||||
neogeo=Neo-Geo
|
neogeo=Neo-Geo
|
||||||
nes=Nintendo
|
nes=Nintendo
|
||||||
|