diff --git a/cube/swiss/source/devices/deviceHandler.h b/cube/swiss/source/devices/deviceHandler.h index 3b3c1609..f3f0a4b2 100644 --- a/cube/swiss/source/devices/deviceHandler.h +++ b/cube/swiss/source/devices/deviceHandler.h @@ -111,9 +111,10 @@ typedef char* (* _fn_status)(file_handle*); // Device quirks #define QUIRK_NONE 0x0 -#define QUIRK_GCLOADER_NO_DISC_2 0x1 -#define QUIRK_GCLOADER_NO_PARTIAL_READ 0x2 -#define QUIRK_GCLOADER_WRITE_CONFLICT 0x4 +#define QUIRK_EXI_SPEED 0x1 +#define QUIRK_GCLOADER_NO_DISC_2 0x2 +#define QUIRK_GCLOADER_NO_PARTIAL_READ 0x4 +#define QUIRK_GCLOADER_WRITE_CONFLICT 0x8 // Device emulated features #define EMU_READ 0x80000000 diff --git a/cube/swiss/source/devices/fat/deviceHandler-FAT.c b/cube/swiss/source/devices/fat/deviceHandler-FAT.c index 2a0db94c..ce09156e 100644 --- a/cube/swiss/source/devices/fat/deviceHandler-FAT.c +++ b/cube/swiss/source/devices/fat/deviceHandler-FAT.c @@ -339,35 +339,29 @@ s32 deviceHandler_FAT_init(file_handle* file) { // SD Card - Slot A if(isSDCard && slot == 0) { setSDGeckoSpeed(slot, swissSettings.exiSpeed); - __device_sd_a.features |= FEAT_BOOT_GCM; file->status = fatFs_Mount(DEV_SDA, "sda:/"); - if(file->status != FR_OK) { - setSDGeckoSpeed(slot, false); - __device_sd_a.features &= ~FEAT_BOOT_GCM; - file->status = fatFs_Mount(DEV_SDA, "sda:/"); - } + if(sdgecko_getSpeed(slot) < EXI_SPEED32MHZ) + __device_sd_a.quirks |= QUIRK_EXI_SPEED; + else + __device_sd_a.quirks &= ~QUIRK_EXI_SPEED; } // SD Card - Slot B if(isSDCard && slot == 1) { setSDGeckoSpeed(slot, swissSettings.exiSpeed); - __device_sd_b.features |= FEAT_BOOT_GCM; file->status = fatFs_Mount(DEV_SDB, "sdb:/"); - if(file->status != FR_OK) { - setSDGeckoSpeed(slot, false); - __device_sd_b.features &= ~FEAT_BOOT_GCM; - file->status = fatFs_Mount(DEV_SDB, "sdb:/"); - } + if(sdgecko_getSpeed(slot) < EXI_SPEED32MHZ) + __device_sd_b.quirks |= QUIRK_EXI_SPEED; + else + __device_sd_b.quirks &= ~QUIRK_EXI_SPEED; } // SD Card - SD2SP2 if(isSDCard && slot == 2) { setSDGeckoSpeed(slot, swissSettings.exiSpeed); - __device_sd_c.features |= FEAT_BOOT_GCM; file->status = fatFs_Mount(DEV_SDC, "sdc:/"); - if(file->status != FR_OK) { - setSDGeckoSpeed(slot, false); - __device_sd_c.features &= ~FEAT_BOOT_GCM; - file->status = fatFs_Mount(DEV_SDC, "sdc:/"); - } + if(sdgecko_getSpeed(slot) < EXI_SPEED32MHZ) + __device_sd_c.quirks |= QUIRK_EXI_SPEED; + else + __device_sd_c.quirks &= ~QUIRK_EXI_SPEED; } // IDE-EXI - Slot A if(!isSDCard && slot == 0) { diff --git a/cube/swiss/source/gui/settings.c b/cube/swiss/source/gui/settings.c index 20f67cc3..382880ef 100644 --- a/cube/swiss/source/gui/settings.c +++ b/cube/swiss/source/gui/settings.c @@ -60,7 +60,7 @@ static char *tooltips_global[PAGE_GLOBAL_MAX+1] = { "Hide unknown file types:\n\nDisabled - Show all files (default)\nEnabled - Swiss will hide unknown file types from being displayed\n\nKnown file types are:\n GameCube Executables (.bin/.dol/.elf)\n Disc images (.gcm/.iso/.nkit.iso/.tgc)\n MP3 Music (.mp3)\n WASP/WKF Flash files (.fzn)\n GameCube Memory Card Files (.gci/.gcs/.sav)\n GameCube Executables with parameters appended (.dol+cli)", "Flatten directory:\n\nFlattens a directory structure matching a glob pattern.", "Stop DVD Motor at startup:\n\nDisabled - Leave it as-is (default)\nEnabled - Stop the DVD drive from spinning when Swiss starts\n\nThis option is mostly for users booting from game\nexploits where the disc will already be spinning.", - "SD/IDE Speed:\n\nThe speed to try and use on the EXI bus for SD Card Adapters or IDE-EXI devices.\n32 MHz may not work on some SD cards.", + "SD/IDE Speed:\n\nThe clock speed to try using on the EXI bus for SD Card Adapter\nand IDE-EXI devices. 32 MHz may not work with some SD cards\nor SD card adapters.", "AVE Compatibility:\n\nSets the compatibility mode for the used audio/video encoder.\n\nAVE N-DOL - Output PAL as NTSC 50\nAVE P-DOL - Disable progressive scan mode\nCMPV-DOL - Enable 1080i & 540p\nGCVideo - Apply general workarounds for GCVideo (default)\nAVE-RVL - Support 960i & 1152i without WiiVideo", "Force DTV Status:\n\nDisabled - Use detect signal from the Digital AV Out (default)\nEnabled - Force detection in the case of a hardware fault", "Optimise for RetroTINK-4K:\n\nRequires GCVideo-DVI v3.0 or later with Fix Resolution Off.", diff --git a/cube/swiss/source/swiss.c b/cube/swiss/source/swiss.c index bfaa0efc..51fcb8c8 100644 --- a/cube/swiss/source/swiss.c +++ b/cube/swiss/source/swiss.c @@ -1999,6 +1999,11 @@ void load_game() { msgBox = DrawPublish(DrawMessageBox(D_WARN, "Device does not support audio streaming.\nThis may impact playability.")); sleep(5); } + if(swissSettings.exiSpeed && (devices[DEVICE_CUR]->quirks & QUIRK_EXI_SPEED)) { + DrawDispose(msgBox); + msgBox = DrawPublish(DrawMessageBox(D_WARN, "Device is operating in a degraded state.\nThis may impact playability.")); + sleep(5); + } DrawDispose(msgBox); // Find the config for this game, or default if we don't know about it @@ -2229,13 +2234,7 @@ void load_file() memset(&GCMDisk, 0, sizeof(DiskHeader)); } else { - uiDrawObj_t *msgBox = NULL; - if(devices[DEVICE_CUR] == &__device_sd_a || devices[DEVICE_CUR] == &__device_sd_b || devices[DEVICE_CUR] == &__device_sd_c) { - msgBox = DrawPublish(DrawMessageBox(D_WARN, "Device does not support disc images.\nSet EXI Speed to 16 MHz to bypass.")); - } - else { - msgBox = DrawPublish(DrawMessageBox(D_WARN, "Device does not support disc images.")); - } + uiDrawObj_t *msgBox = DrawPublish(DrawMessageBox(D_WARN, "Device does not support disc images.")); sleep(5); DrawDispose(msgBox); }