-back to ppc r30 and libogc 1.8.19 - dosbox wii plugin doesn't like ppc r33 and libogc 1.8.21

This commit is contained in:
Fledge68 2018-11-25 17:37:55 -06:00
parent cef988d763
commit 39308a921e
14 changed files with 36 additions and 32 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -54,7 +54,7 @@ char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
static u8 *GetDol(u32 bootcontent, u64 title) static u8 *GetDol(u32 bootcontent, u64 title)
{ {
memset(filepath, 0, ISFS_MAXPATH); 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; u32 contentSize = 0;
@ -83,7 +83,7 @@ static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
bool ret = false; bool ret = false;
memset(filepath, 0, ISFS_MAXPATH); 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; u32 size;
u8 *data = ISFS_GetFile(filepath, &size, -1); u8 *data = ISFS_GetFile(filepath, &size, -1);

View File

@ -42,8 +42,8 @@ bool Identify(u64 titleid)
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
memset(filepath, 0, ISFS_MAXPATH); memset(filepath, 0, ISFS_MAXPATH);
gprintf("Reading TMD for %08x %08x...", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); gprintf("Reading TMD for %08lx %08lx...", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid));
u32 tmdSize; u32 tmdSize;
u8 *tmdBuffer = ISFS_GetFile(filepath, &tmdSize, -1); u8 *tmdBuffer = ISFS_GetFile(filepath, &tmdSize, -1);
if (tmdBuffer == NULL || tmdSize == 0) if (tmdBuffer == NULL || tmdSize == 0)

View File

@ -901,11 +901,11 @@ void Nand::CreateTitleTMD(dir_discHdr *hdr)
u32 highTID = *(u32*)(titleTMD+0x18c); u32 highTID = *(u32*)(titleTMD+0x18c);
u32 lowTID = *(u32*)(titleTMD+0x190); u32 lowTID = *(u32*)(titleTMD+0x190);
CreatePath("%s/title/%08x/%08x/data", FullNANDPath, highTID, lowTID); CreatePath("%s/title/%08lx/%08lx/data", FullNANDPath, highTID, lowTID);
CreatePath("%s/title/%08x/%08x/content", FullNANDPath, highTID, lowTID); CreatePath("%s/title/%08lx/%08lx/content", FullNANDPath, highTID, lowTID);
char nandpath[MAX_FAT_PATH]; 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)) if(fsop_FileExist(nandpath))
{ {

View File

@ -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_NAME "WiiFlow Lite"
#define APP_VERSION "5.0.1" #define APP_VERSION "5.0.1"

View File

@ -60,8 +60,8 @@ static const devoptab_t gecko_out = {
NULL, // device chmod_r NULL, // device chmod_r
NULL, // device fchmod_r NULL, // device fchmod_r
NULL, // device rmdir_r NULL, // device rmdir_r
NULL, // lstat_r //NULL, // lstat_r
NULL, // utimes_r //NULL, // utimes_r
}; };
static void USBGeckoOutput() static void USBGeckoOutput()

View File

@ -566,7 +566,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor)
static const struct { u32 x; u32 y; } blurRes[] = { static const struct { u32 x; u32 y; } blurRes[] = {
{ 64, 48 }, { 96, 72 }, { 128, 96 }, { 192, 144 } { 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.width = blurRes[i].x;
m_effectTex.height = blurRes[i].y; m_effectTex.height = blurRes[i].y;
if(m_effectTex.data != NULL) if(m_effectTex.data != NULL)
@ -574,7 +574,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor)
free(m_effectTex.data); free(m_effectTex.data);
m_effectTex.data = NULL; 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); m_blurFactor = min(max(1.f, blurFactor), 2.f);
} }
@ -2955,7 +2955,7 @@ void * CCoverFlow::_coverLoader(void *obj)
u32 i, j; u32 i, j;
bool hq_req = cf->m_useHQcover; bool hq_req = cf->m_useHQcover;
bool cur_pos_hq = false; 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) while(cf->m_loadingCovers)
{ {

View File

@ -168,9 +168,9 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp
{ {
if(buffer == NULL) if(buffer == NULL)
return false; return false;
fSize = min(max(6u, size), 1000u); fSize = min(max(6ul, size), 1000ul);
lineSpacing = min(max(6u, lspacing), 1000u); lineSpacing = min(max(6ul, lspacing), 1000ul);
weight = min(w, 32u); weight = min(w, 32ul);
index = idx;// currently not used index = idx;// currently not used
if(data != NULL) if(data != NULL)
@ -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) bool SFont::fromFile(const char *path, u32 size, u32 lspacing, u32 w, u32 idx, const char *fontname)
{ {
fSize = min(max(6u, size), 1000u); fSize = min(max(6ul, size), 1000ul);
weight = min(w, 32u); weight = min(w, 32ul);
index = idx;// currently not used index = idx;// currently not used
lineSpacing = min(max(6u, lspacing), 1000u); lineSpacing = min(max(6ul, lspacing), 1000ul);
if(data != NULL) if(data != NULL)
free(data); free(data);

View File

@ -292,8 +292,8 @@ void CVideo::shiftViewPort(float x, float y)
void CVideo::set2DViewport(u32 w, u32 h, int x, int y) void CVideo::set2DViewport(u32 w, u32 h, int x, int y)
{ {
m_width2D = std::min(std::max(512u, w), 800u); m_width2D = std::min(std::max(512ul, w), 800ul);
m_height2D = std::min(std::max(384u, h), 600u); m_height2D = std::min(std::max(384ul, h), 600ul);
m_x2D = std::min(std::max(-50, x), 50); m_x2D = std::min(std::max(-50, x), 50);
m_y2D = std::min(std::max(-50, y), 50); m_y2D = std::min(std::max(-50, y), 50);
} }

View File

@ -153,7 +153,11 @@ void writeStub()
DCFlushRange((void*)0x80001800, StubSize); DCFlushRange((void*)0x80001800, StubSize);
/* And free the memory again */ /* And free the memory again */
if(Stub != NULL) #ifdef APP_WIIFLOW
if(Stub != wfstub_bin)
#else
if(Stub != stub_bin)
#endif
free(Stub); free(Stub);
} }

View File

@ -90,7 +90,7 @@ void wiiLightSetLevel(int level)
*/ */
void *light_loop() void *light_loop()
{ {
struct timespec timeon; /*struct timespec timeon;
struct timespec timeoff; struct timespec timeoff;
// Loop whilst the light is still 'on' // Loop whilst the light is still 'on'
@ -100,13 +100,13 @@ void *light_loop()
timeoff = light_timeoff; timeoff = light_timeoff;
// Turn on the light and sleep for a bit // Turn on the light and sleep for a bit
wiiLightOn(); wiiLightOn();
nanosleep(&timeon, NULL); //nanosleep(&timeon, NULL);
//nanosleep(&timeon); //nanosleep(&timeon);
// Turn off the light (if required) and sleep for a bit // Turn off the light (if required) and sleep for a bit
if(timeoff.tv_nsec > 0) if(timeoff.tv_nsec > 0)
wiiLightOff(); wiiLightOff();
nanosleep(&timeoff, NULL); //nanosleep(&timeoff, NULL);
//nanosleep(&timeoff); //nanosleep(&timeoff);
} }*/
return NULL; return NULL;
} }

View File

@ -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) 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) if (ret == 2)
{ {
*(gameconf + (gameconfsize / 4)) = 0; *(gameconf + (gameconfsize / 4)) = 0;
@ -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) 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); &codeaddr2, &codeval2);
if (ret == 4) if (ret == 4)
{ {
@ -196,7 +196,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer)
== 13) == 13)
{ {
ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset); ret = sscanf((char *) (tempgameconf + i), "( %lx%ln", &codeval, &tempoffset);
if (ret == 1) if (ret == 1)
{ {
gameconfsize += 4; gameconfsize += 4;
@ -207,10 +207,10 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
gameconfsize += 4; gameconfsize += 4;
temp++; temp++;
i += tempoffset; 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; *(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); &codeoffset, &codeval2);
if (ret == 4) if (ret == 4)
{ {

View File

@ -17,7 +17,7 @@ void AddLanguage(char *Path)
char lng[32]; char lng[32];
memset(lng, 0, 32); memset(lng, 0, 32);
char *lang_chr = strrchr(Path, '/')+1; 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); languages_available.push_back(lng);
} }