From 1e05d75fe75ff7ad2057e7808892ba455df536f9 Mon Sep 17 00:00:00 2001 From: emu_kidid Date: Wed, 1 Nov 2023 13:53:13 +1030 Subject: [PATCH] - Add SD2SP2 support (GameCube) - Update README.md --- README.md | 6 ++++-- fileBrowser/fileBrowser-libfat.c | 35 +++++++++++++++++--------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f5fb8fa..9c483cc 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ * To install: Extract the contents of the latest release zip to the root of your SD card * For SD/USB: Put ROMs in the directory named /wii64/roms, All save types will automatically be placed in /wii64/saves - * For DVD: ROMs may be anywhere on the disc (requires DVDxV2 on Wii) + * For DVD: ROMs may be anywhere on the disc (requires a compatible Wii) * Load the desired executable from the HBC or in the loader of your choice, the emulator is shipped with 2 graphics plugins now. * **Rice GFX Plugin version** * Slightly faster and has fixed sky boxes in games but isn't as refined as glN64 - * Supports hi-res texture pak via Wii64 specific [texture packer](https://github.com/emukidid/Wii64/releases/tag/texturepacker_1.2) + * Experimental support for hi-res texture paks via Wii64 specific [texture packer](https://github.com/emukidid/Wii64/releases/tag/texturepacker_1.2) * **glN64 GFX Plugin version** * Slightly slower than Rice GFX on certain games * FrameBuffer texture support (OoT subscreen) @@ -74,6 +74,8 @@ The "-exp.dol" versions attempt to support the expansion pak by removing the min The "-basic.dol" versions remove boxart support and the mini menu in an attempt to have more free memory available to avoid crashes. +Lastly, the regular .dol version has boxart support but no expansion pak support. + ### "WiiVC" Version This version isn't really supported much due to the niche nature of it. It enables DRC (Wii U GamePad) support, and also takes advantage of unlocked CPU multiplier support if enabled. The gist of it is that you can run Wii64 on a Wii U in "Wii mode" but with Wii U Game Pad support and (optionally) the CPU multiplier unlocked. To boot this version you can either just use the vWii mode to use the GamePad, or to unlock the CPU multiplier you'll need to be well versed in Wii U homebrew setups (essentially there's a process that exists to inject homebrew into a WiiVC title - e.g. Wii titles were available on the Wii U via the eShop) and there's a thing called [sign_c2w_patcher](https://github.com/FIX94/sign_c2w_patcher) that you must boot before loading this title to unlock the CPU multiplier. This version is shipped as "Wii64 | Rice GFX | WiiVC" and "Wii64 | glN64 GFX | WiiVC" in the archive. diff --git a/fileBrowser/fileBrowser-libfat.c b/fileBrowser/fileBrowser-libfat.c index 8681086..89d32a6 100644 --- a/fileBrowser/fileBrowser-libfat.c +++ b/fileBrowser/fileBrowser-libfat.c @@ -43,10 +43,15 @@ extern int stop; #include const DISC_INTERFACE* frontsd = &__io_wiisd; const DISC_INTERFACE* usb = &__io_usbstorage; -#endif const DISC_INTERFACE* carda = &__io_gcsda; const DISC_INTERFACE* cardb = &__io_gcsdb; +#else +const DISC_INTERFACE* carda = &__io_gcsda; +const DISC_INTERFACE* cardb = &__io_gcsdb; +const DISC_INTERFACE* sd2sp2 = &__io_gcsd2; +#endif + // Threaded insertion/removal detection #define THREAD_SLEEP 100 #define FRONTSD 1 @@ -60,8 +65,6 @@ static char sdMounted = 0; static char sdNeedsUnmount = 0; static char usbMounted = 0; static char usbNeedsUnmount = 0; -#else -static char sdMounted = 0; #endif fileBrowser_file topLevel_libfat_Default = @@ -321,20 +324,17 @@ int fileBrowser_libfat_init(fileBrowser_file* f){ continueRemovalThread(); return res; #else - if(!sdMounted) { //GC has only SD - if(carda->startup()) { - res = fatMountSimple ("sd", carda); - if(res) - sdMounted = CARD_A; - } - if(!res && cardb->startup()) { - res = fatMountSimple ("sd", cardb); - if(res) - sdMounted = CARD_B; - } - return res; + // GC has only SD + if(sd2sp2->startup()) { + res = fatMountSimple ("sd", sd2sp2); } - return 1; // Already mounted + if(carda->startup()) { + res = fatMountSimple ("sd", carda); + } + if(!res && cardb->startup()) { + res = fatMountSimple ("sd", cardb); + } + return res; #endif } @@ -343,6 +343,9 @@ int fileBrowser_libfat_deleteFile(fileBrowser_file* file){ } int fileBrowser_libfat_deinit(fileBrowser_file* f){ + if(f->name[0] == 's') { //SD + fatUnmount("sd"); + } return 0; }