Skip to content

Commit

Permalink
-back to ppc r30 and libogc 1.8.19 - dosbox wii plugin doesn't like p…
Browse files Browse the repository at this point in the history
…pc r33 and libogc 1.8.21
  • Loading branch information
Fledge68 committed Nov 25, 2018
1 parent cef988d commit 39308a9
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 32 deletions.
Binary file modified out/bins/ext_booter.bin
Binary file not shown.
Binary file modified out/boot.dol
Binary file not shown.
4 changes: 2 additions & 2 deletions resources/wiiflow_game_booter/source/ChannelHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
static u8 *GetDol(u32 bootcontent, u64 title)
{
memset(filepath, 0, ISFS_MAXPATH);
sprintf(filepath, "/title/%08x/%08x/content/%08x.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent);
sprintf(filepath, "/title/%08lx/%08lx/content/%08lx.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent);

u32 contentSize = 0;

Expand Down Expand Up @@ -83,7 +83,7 @@ static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
bool ret = false;

memset(filepath, 0, ISFS_MAXPATH);
sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));

u32 size;
u8 *data = ISFS_GetFile(filepath, &size, -1);
Expand Down
4 changes: 2 additions & 2 deletions source/channel/channel_launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ bool Identify(u64 titleid)
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
memset(filepath, 0, ISFS_MAXPATH);

gprintf("Reading TMD for %08x %08x...", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
gprintf("Reading TMD for %08lx %08lx...", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
u32 tmdSize;
u8 *tmdBuffer = ISFS_GetFile(filepath, &tmdSize, -1);
if (tmdBuffer == NULL || tmdSize == 0)
Expand Down
6 changes: 3 additions & 3 deletions source/channel/nand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,11 @@ void Nand::CreateTitleTMD(dir_discHdr *hdr)
u32 highTID = *(u32*)(titleTMD+0x18c);
u32 lowTID = *(u32*)(titleTMD+0x190);

CreatePath("%s/title/%08x/%08x/data", FullNANDPath, highTID, lowTID);
CreatePath("%s/title/%08x/%08x/content", FullNANDPath, highTID, lowTID);
CreatePath("%s/title/%08lx/%08lx/data", FullNANDPath, highTID, lowTID);
CreatePath("%s/title/%08lx/%08lx/content", FullNANDPath, highTID, lowTID);

char nandpath[MAX_FAT_PATH];
snprintf(nandpath, sizeof(nandpath), "%s/title/%08x/%08x/content/title.tmd", FullNANDPath, highTID, lowTID);
snprintf(nandpath, sizeof(nandpath), "%s/title/%08lx/%08lx/content/title.tmd", FullNANDPath, highTID, lowTID);

if(fsop_FileExist(nandpath))
{
Expand Down
2 changes: 1 addition & 1 deletion source/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//#define APP_WIIFLOW
//#define APP_WIIFLOW //uncomment this line to compile wfl as wiiflow

#define APP_NAME "WiiFlow Lite"
#define APP_VERSION "5.0.1"
Expand Down
4 changes: 2 additions & 2 deletions source/gecko/gecko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ static const devoptab_t gecko_out = {
NULL, // device chmod_r
NULL, // device fchmod_r
NULL, // device rmdir_r
NULL, // lstat_r
NULL, // utimes_r
//NULL, // lstat_r
//NULL, // utimes_r
};

static void USBGeckoOutput()
Expand Down
6 changes: 3 additions & 3 deletions source/gui/coverflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,15 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor)
static const struct { u32 x; u32 y; } blurRes[] = {
{ 64, 48 }, { 96, 72 }, { 128, 96 }, { 192, 144 }
};
u32 i = min(max(0u, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1u);
u32 i = min(max(0ul, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1ul);
m_effectTex.width = blurRes[i].x;
m_effectTex.height = blurRes[i].y;
if(m_effectTex.data != NULL)
{
free(m_effectTex.data);
m_effectTex.data = NULL;
}
m_blurRadius = min(max(1u, blurRadius), 3u);
m_blurRadius = min(max(1ul, blurRadius), 3ul);
m_blurFactor = min(max(1.f, blurFactor), 2.f);
}

Expand Down Expand Up @@ -2955,7 +2955,7 @@ void * CCoverFlow::_coverLoader(void *obj)
u32 i, j;
bool hq_req = cf->m_useHQcover;
bool cur_pos_hq = false;
u32 bufferSize = min(cf->m_numBufCovers * max(2u, cf->m_rows), 80u);
u32 bufferSize = min(cf->m_numBufCovers * max(2ul, cf->m_rows), 80ul);

while(cf->m_loadingCovers)
{
Expand Down
12 changes: 6 additions & 6 deletions source/gui/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp
{
if(buffer == NULL)
return false;
fSize = min(max(6u, size), 1000u);
lineSpacing = min(max(6u, lspacing), 1000u);
weight = min(w, 32u);
fSize = min(max(6ul, size), 1000ul);
lineSpacing = min(max(6ul, lspacing), 1000ul);
weight = min(w, 32ul);
index = idx;// currently not used

if(data != NULL)
Expand All @@ -190,11 +190,11 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp

bool SFont::fromFile(const char *path, u32 size, u32 lspacing, u32 w, u32 idx, const char *fontname)
{
fSize = min(max(6u, size), 1000u);
weight = min(w, 32u);
fSize = min(max(6ul, size), 1000ul);
weight = min(w, 32ul);
index = idx;// currently not used

lineSpacing = min(max(6u, lspacing), 1000u);
lineSpacing = min(max(6ul, lspacing), 1000ul);

if(data != NULL)
free(data);
Expand Down
4 changes: 2 additions & 2 deletions source/gui/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ void CVideo::shiftViewPort(float x, float y)

void CVideo::set2DViewport(u32 w, u32 h, int x, int y)
{
m_width2D = std::min(std::max(512u, w), 800u);
m_height2D = std::min(std::max(384u, h), 600u);
m_width2D = std::min(std::max(512ul, w), 800ul);
m_height2D = std::min(std::max(384ul, h), 600ul);
m_x2D = std::min(std::max(-50, x), 50);
m_y2D = std::min(std::max(-50, y), 50);
}
Expand Down
6 changes: 5 additions & 1 deletion source/homebrew/homebrew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ void writeStub()
DCFlushRange((void*)0x80001800, StubSize);

/* And free the memory again */
if(Stub != NULL)
#ifdef APP_WIIFLOW
if(Stub != wfstub_bin)
#else
if(Stub != stub_bin)
#endif
free(Stub);
}

Expand Down
8 changes: 4 additions & 4 deletions source/hw/Gekko.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void wiiLightSetLevel(int level)
*/
void *light_loop()
{
struct timespec timeon;
/*struct timespec timeon;
struct timespec timeoff;
// Loop whilst the light is still 'on'
Expand All @@ -100,13 +100,13 @@ void *light_loop()
timeoff = light_timeoff;
// Turn on the light and sleep for a bit
wiiLightOn();
nanosleep(&timeon, NULL);
//nanosleep(&timeon, NULL);
//nanosleep(&timeon);
// Turn off the light (if required) and sleep for a bit
if(timeoff.tv_nsec > 0)
wiiLightOff();
nanosleep(&timeoff, NULL);
//nanosleep(&timeoff, NULL);
//nanosleep(&timeoff);
}
}*/
return NULL;
}
10 changes: 5 additions & 5 deletions source/loader/fst.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
}
if (strncasecmp("poke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4)
{
ret = sscanf((char *) tempgameconf + i, "( %x , %x", &codeaddr, &codeval);
ret = sscanf((char *) tempgameconf + i, "( %lx , %lx", &codeaddr, &codeval);
if (ret == 2)
{
*(gameconf + (gameconfsize / 4)) = 0;
Expand All @@ -176,7 +176,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
}
if (strncasecmp("pokeifequal", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11)
{
ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", &codeaddr, &codeval,
ret = sscanf((char *) (tempgameconf + i), "( %lx , %lx , %lx , %lx", &codeaddr, &codeval,
&codeaddr2, &codeval2);
if (ret == 4)
{
Expand All @@ -196,7 +196,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer)
== 13)
{
ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset);
ret = sscanf((char *) (tempgameconf + i), "( %lx%ln", &codeval, &tempoffset);
if (ret == 1)
{
gameconfsize += 4;
Expand All @@ -207,10 +207,10 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
gameconfsize += 4;
temp++;
i += tempoffset;
ret = sscanf((char *) (tempgameconf + i), " %x%n", &codeval, &tempoffset);
ret = sscanf((char *) (tempgameconf + i), " %lx%ln", &codeval, &tempoffset);
}
*(gameconf + (gameconfsize / 4) - temp - 1) = temp;
ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2,
ret = sscanf((char *) (tempgameconf + i), " , %lx , %lx , %lx , %lx", &codeaddr, &codeaddr2,
&codeoffset, &codeval2);
if (ret == 4)
{
Expand Down
2 changes: 1 addition & 1 deletion source/menu/menu_config_adv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void AddLanguage(char *Path)
char lng[32];
memset(lng, 0, 32);
char *lang_chr = strrchr(Path, '/')+1;
memcpy(lng, lang_chr, min(31u, (u32)(strrchr(lang_chr, '.')-lang_chr)));
memcpy(lng, lang_chr, min(31ul, (u32)(strrchr(lang_chr, '.')-lang_chr)));
languages_available.push_back(lng);
}

Expand Down

0 comments on commit 39308a9

Please sign in to comment.