Compare commits

...

5 Commits

Author SHA1 Message Date
thepikachugamer 1e7baa10b6
Merge d11b6381e4 into 608d954afe 2024-04-24 23:45:51 +00:00
Naim2000 d11b6381e4 typod IS_WIIU 2024-04-24 18:45:41 -05:00
Naim2000 3ca05bb55d ?? 2024-04-24 18:38:09 -05:00
thepikachugamer 608d954afe
Merge pull request #10 from MikeIsAStar/handle-all-known-product-areas
Handle all known product areas
2024-03-22 22:31:15 -05:00
MikeIsAStar 13dd003f3d Handle all known product areas 2024-03-16 17:41:48 -04:00
2 changed files with 7 additions and 9 deletions

View File

@ -29,7 +29,7 @@ typedef struct
} cIOSInfo;
// _Static_assert(sizeof(cIOSInfo) == 0x40, "Incorrect cIOSInfo struct size, do i really need to pack this..?");
#define IS_WIIU (*(vu16*)0xCD005A0 == 0xCAFE)
#define IS_WIIU (*(vu16*)0xCD0005A0 == 0xCAFE)
extern u32 boot2version;

View File

@ -187,16 +187,17 @@ static bool GetRegionFromTXT(char* region)
{
start++;
if (!strncmp(start, "JPN", 3))
if (!strncmp(start, "JPN", 3) || !strncmp(start, "TWN", 3) || !strncmp(start, "ROC", 3))
*region = 'J';
else if (!strncmp(start, "TWN", 3))
*region = 'J';
else if (!strncmp(start, "USA", 3))
else if (!strncmp(start, "USA", 3) || !strncmp(start, "BRA", 3) || !strncmp(start, "HKG", 3) ||
!strncmp(start, "ASI", 3) || !strncmp(start, "LTN", 3) || !strncmp(start, "SAF", 3))
*region = 'U';
else if (!strncmp(start, "EUR", 3))
else if (!strncmp(start, "EUR", 3) || !strncmp(start, "AUS", 3))
*region = 'E';
else if (!strncmp(start, "KOR", 3))
*region = 'K';
else if (!strncmp(start, "CHN", 3))
printf("Error! GetRegionFromTXT: Unhandled product area \"CHN\"!\n");
if (*region != 0)
{
@ -728,9 +729,6 @@ s32 Wad_Install(FILE *fp)
__aligned(0x20)
cIOSInfo build_tag = {};
printf("build_tag@%p\n", &build_tag);
__asm__ volatile ( ".long -1" );
ret = FSOPReadOpenFile(fp, (void*)&build_tag, content0_offset, sizeof(cIOSInfo));
if (ret != 1)
goto err;