From 5760ae321e8a581ed649f68cfd56fd002993a500 Mon Sep 17 00:00:00 2001 From: Extrems Date: Sat, 17 Jun 2023 12:00:50 -0400 Subject: [PATCH] - Update No-Intro database. - Move EAR initialization. --- cube/asm.h | 2 ++ cube/swiss/source/aram/sidestep.c | 5 ----- cube/swiss/source/devices/filemeta.c | 7 +++++-- cube/swiss/source/gui/settings.c | 2 +- cube/swiss/source/gui/settings.h | 2 +- cube/swiss/source/nkit.c | 3 ++- cube/swiss/source/patcher.c | 1 + 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cube/asm.h b/cube/asm.h index 37c23621..8677c2ed 100644 --- a/cube/asm.h +++ b/cube/asm.h @@ -127,6 +127,8 @@ #define SPRG2 274 #define SPRG3 275 +#define EAR 282 + #define DABR 1013 #define IABR 1010 diff --git a/cube/swiss/source/aram/sidestep.c b/cube/swiss/source/aram/sidestep.c index 1d9ba7a6..76b18231 100644 --- a/cube/swiss/source/aram/sidestep.c +++ b/cube/swiss/source/aram/sidestep.c @@ -105,11 +105,6 @@ static void ARAMStub(void) asm("bdnz flush"); asm("isync"); - /*** Enable external control ***/ - asm("lis 8,0x8000"); - asm("ori 8,8,0x000c"); - asm("mtear 8"); - /*** Party! ***/ asm("mtlr 3"); asm("li 0,0"); diff --git a/cube/swiss/source/devices/filemeta.c b/cube/swiss/source/devices/filemeta.c index 07b57180..64ec7e30 100644 --- a/cube/swiss/source/devices/filemeta.c +++ b/cube/swiss/source/devices/filemeta.c @@ -159,12 +159,15 @@ void populate_game_meta(file_handle *f, u32 bannerOffset, u32 bannerSize) { if(!memcmp(banner->magic, "BNR1", 4)) { f->meta->bannerSum = fletcher16(banner, bannerSize); memcpy(f->meta->banner, banner->pixelData, f->meta->bannerSize); - memcpy(&f->meta->bannerDesc, &banner->desc[0], sizeof(f->meta->bannerDesc)); + memcpy(&f->meta->bannerDesc, &banner->desc[SYS_LANG_ENGLISH], sizeof(f->meta->bannerDesc)); } else if(!memcmp(banner->magic, "BNR2", 4)) { f->meta->bannerSum = fletcher16(banner, bannerSize); memcpy(f->meta->banner, banner->pixelData, f->meta->bannerSize); - memcpy(&f->meta->bannerDesc, &banner->desc[swissSettings.sramLanguage], sizeof(f->meta->bannerDesc)); + if(in_range(swissSettings.sramLanguage, SYS_LANG_ENGLISH, SYS_LANG_DUTCH)) + memcpy(&f->meta->bannerDesc, &banner->desc[swissSettings.sramLanguage], sizeof(f->meta->bannerDesc)); + else + memcpy(&f->meta->bannerDesc, &banner->desc[SYS_LANG_ENGLISH], sizeof(f->meta->bannerDesc)); } fixBannerDesc(f->meta->bannerDesc.gameName, BNR_SHORT_TEXT_LEN); if(strnlen(f->meta->bannerDesc.gameName, BNR_SHORT_TEXT_LEN)) diff --git a/cube/swiss/source/gui/settings.c b/cube/swiss/source/gui/settings.c index 2f435b3b..52802508 100644 --- a/cube/swiss/source/gui/settings.c +++ b/cube/swiss/source/gui/settings.c @@ -40,7 +40,7 @@ char *igrTypeStr[] = {"Disabled", "Reboot", "igr.dol"}; char *aveCompatStr[] = {"CMPV-DOL", "GCVideo", "AVE-RVL", "AVE N-DOL"}; char *fileBrowserStr[] = {"Standard", "Carousel"}; char *bs2BootStr[] = {"No", "Yes", "Sound 1", "Sound 2"}; -char *sramLang[] = {"English", "German", "French", "Spanish", "Italian", "Dutch", "Japanese"}; +char *sramLang[] = {"English", "German", "French", "Spanish", "Italian", "Dutch", "Japanese", "English (US)"}; char *recentListLevelStr[] = {"Off", "Lazy", "On"}; static char *tooltips_global[PAGE_GLOBAL_MAX+1] = { diff --git a/cube/swiss/source/gui/settings.h b/cube/swiss/source/gui/settings.h index 7d4c0b7c..0fdf6569 100644 --- a/cube/swiss/source/gui/settings.h +++ b/cube/swiss/source/gui/settings.h @@ -147,7 +147,7 @@ extern char *aveCompatStr[]; extern char *fileBrowserStr[]; extern char *bs2BootStr[]; extern char *recentListLevelStr[]; -#define SRAM_LANG_MAX 6 +#define SRAM_LANG_MAX 7 extern char *sramLang[]; int show_settings(int page, int option, ConfigEntry *config); void refreshSRAM(); diff --git a/cube/swiss/source/nkit.c b/cube/swiss/source/nkit.c index f8eda5a0..0a14ffab 100644 --- a/cube/swiss/source/nkit.c +++ b/cube/swiss/source/nkit.c @@ -2090,6 +2090,7 @@ static const struct { { "GLJEGG\x00\x00", false, 1, 0x3684, 0xC411F2F8, 577157120, +883148800, 0xED983A4B64245ED8, { 560702976, +882822244, 6496, 0x83D8 }, "Radio Allergy" }, { "GMPP01\x00\x00", false, 1, 0x39B0, 0xB7DA63ED, 607344640, +852633600, 0x895DFE61A45E24FC, { 559136944, +232500, 8096, 0x03FE }, "Mario Party 4" }, { "GMPP01\x00\x02", false, 1, 0x9D34, 0xF0DE4105, 607346688, +852631552, 0x895DFE61A45E24FC, { 559137448, +264764, 8096, 0x03FE }, "Mario Party 4" }, + { "GMSP01\x00\x00", false, 1, 0x6C8C, 0xF968261A, 404224000, +100352, 0x784E17B83254CEE8, { 404214580, +70348, 8096, 0x4911 }, "Super Mario Sunshine" }, { "GMUP5D\x00\x00", false, 1, 0xEE0B, 0xD442A6BF, 1425692672, +34285568, 0x436DC9BED493D5DE, { 6644012, +5580500, 6496, 0x093D }, "Dr. Muto" }, { "GNDP8P\x01\x01", false, 1, 0x6F6A, 0x81525825, 894347264, +565630976, 0x7B6CD8E32A668D95, { ~0, +0, 0, 0xFFFF }, "Need for Speed: Underground" }, { "GP5P01\x00\x00", false, 1, 0xFBF1, 0x9DC1BB2A, 922845184, +537133056, 0xC5CD32D7C41AAE3D, { 14902032, +41916, 8096, 0x3D31 }, "Mario Party 5" }, @@ -2126,7 +2127,7 @@ static const struct { { "RELSAB\x01\x01", false, 1, 0xA47D, 0xBB46463A, 482416640, +977561600, 0x7A5CBC4681D2D704, { 3936256, +28760, 6496, 0x3FED }, "Rayman Arena" }, { "RELSAB\x01\x01", true, 1, 0x771E, 0x17B30888, 134633472, +1325344768, 0x3E5C6F107670681B, { ~0, +0, 0, 0xFFFF }, "Crazy Taxi" }, { "TESTNA\x00\x00", false, 1, 0x0C28, 0x6254FB97, 26834944, -1658, 0xAA2E5EDD0EF81992, { ~0, +0, 0, 0xFFFF }, "Dodger Demo" }, -#define VALID_COUNT (REDUMP_COUNT + 84) +#define VALID_COUNT (REDUMP_COUNT + 85) { "101E01\x00\x05", true, 1, 0xB6FD, 0x4BB518CD, 1435949056, +24029184, 0x27CFAD706924A030, { ~0, +0, 0, 0xFFFF }, "Hontai Kensa Disc DOL-USA" }, { "101J01\x00\x03", true, 1, 0xA361, 0x1A7B7608, 1459453952, +524288, 0x6E2DA2E062EF73BA, { ~0, +0, 0, 0xFFFF }, "Hontai Kensa Disc DOL" }, { "101J01\x00\x06", true, 1, 0x402F, 0xC3C5D3D6, 1459453952, +524288, 0x946298C97236262D, { ~0, +0, 0, 0xFFFF }, "Hontai Kensa Disc DOL" }, diff --git a/cube/swiss/source/patcher.c b/cube/swiss/source/patcher.c index 7d3fb081..32e271cf 100644 --- a/cube/swiss/source/patcher.c +++ b/cube/swiss/source/patcher.c @@ -333,6 +333,7 @@ int install_code(int final) _sync(); if (top_addr != 0x81800000) mtspr(DABR, 0x800000E8 | 0b110); + mtspr(EAR, 0x8000000C); } return 1; }