Add PSP/GameCube/Wii save-device availability checks

PSP checks memory-stick reachability via sceIoGetstat. GameCube gets two
devices (CARD_SLOTA/CARD_SLOTB), each mounted via CARD_Init/CARD_Mount and
checked for free space via CARD_GetDirectory/CARD_GetBlockCount. Wii picks
between three storage methods at compile time (DUSK_SAVE_WII_METHOD =
NAND/CARD/SD in wii.cmake, default NAND via ISFS) since real hardware
behavior for the default is unverified.

Also fixes two pre-existing bugs found while build/runtime-testing this
across PPSSPP and Dolphin: wrong libogc language macros in
systemGetLocaleDolphin, and a missing SYS_STDIO_Report(true) call that
silently swallowed all guest console output in Dolphin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-14 16:20:28 -05:00
parent 45331c2a60
commit d7223d7387
16 changed files with 670 additions and 2 deletions
+7 -2
View File
@@ -12,6 +12,11 @@
#include "console/console.h"
errorret_t systemInitDolphin(void) {
// Routes newlib stdout/stderr (printf, and this project's logDebug/
// logError) through OSReport, which Dolphin's logger captures under the
// OSREPORT category - without this, guest console output goes nowhere.
SYS_STDIO_Report(true);
char_t *names[] = {
"4:3",
"16:9",
@@ -43,8 +48,8 @@ int32_t systemGetLanguageDolphin(void) {
const localeinfo_t * systemGetLocaleDolphin(void) {
switch(systemGetLanguageDolphin()) {
case CONF_LANG_JAPANESE: return &LOCALE_INFO_JP_JP;
case CONF_LANG_SPANISH: return &LOCALE_INFO_ES_MX;
case SYS_LANG_JAPANESE: return &LOCALE_INFO_JP_JP;
case SYS_LANG_SPANISH: return &LOCALE_INFO_ES_MX;
default: return &LOCALE_DEFAULT;
}
}