From 2e7e073b6380f524ca23867a39ab1ad77eed2a40 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 19:11:13 +0000 Subject: [PATCH 1/2] wolf: fix TI-99/4A console ROM location + add it via a tab-completing prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build succeeded, but the follow-up message pointed at "ti99sim-sdl's own README" for where the console ROM goes — useless, since that source tree lived inside the throwaway build container and was already gone by the time anyone could read it. Got the real answer from RetroPie's own configure_ti99sim(): it symlinks the console ROM into the emulator's own install directory, then cd's there before launching (pushd "$md_inst" && ./ti99sim-sdl "$@") — so ti99sim-sdl finds it via a plain relative lookup, not any search path. Caught a real bug this exposed: our own ES-DE line launched ti99sim-sdl by full path with no cd, so even a correctly-placed file would never have been found. Fixed to cd into emulators/ first, matching RetroPie's own pattern exactly. Also, instead of just printing the required path (emulators/TI-994A.ctg) and leaving it at that, now prompts for it directly with a tab-completing path picker (read -e -i, defaulting into the game storage dir) — if you already have the file somewhere, it copies it into place immediately instead of making you do it by hand afterward. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6 --- services/wolf.sh | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/services/wolf.sh b/services/wolf.sh index 3d21cc2..261860a 100644 --- a/services/wolf.sh +++ b/services/wolf.sh @@ -976,7 +976,7 @@ UDEV Texas Instruments TI-99/4A %ROMPATH%/ti994a .ctg .rpk .bin - %INJECT%=%BASENAME%.esprefix /home/retro/Applications/ti99sim-sdl --joystick1=1 %ROM% + %INJECT%=%BASENAME%.esprefix /bin/bash -c "cd /home/retro/Applications && ./ti99sim-sdl --joystick1=1 '%ROM%'" ti99 ti99 @@ -1044,9 +1044,33 @@ XMLEOF else log_info "ti99sim-sdl already present — skipping build." fi - log_info "The one thing this can't do for you: your own TI-99/4A console ROM + GROM dump" - log_info "(real console firmware, same legal situation as any other BIOS) — ti99sim-sdl's" - log_info "own README covers exactly where it expects that once you have it." + # The one thing that can't be automated: the console ROM+GROM dump + # itself (real copyrighted firmware). Per RetroPie's own + # configure_ti99sim() — it symlinks this into the emulator's own + # install dir, then cd's there before launching — ti99sim-sdl looks + # for it as a plain relative file named TI-994A.ctg in the same + # directory the binary itself runs from, i.e. emulators/ here (the + # command line above now cd's into that directory first, matching + # RetroPie's own pushd + relative-launch pattern exactly). + local _TI99_BIOS_DST="$GAME_STORAGE_DIR/emulators/TI-994A.ctg" + if [ ! -f "$_TI99_BIOS_DST" ]; then + echo "" + log_info "TI-99/4A needs your own console ROM+GROM dump, named exactly TI-994A.ctg" + log_info "(case-sensitive), placed at: $_TI99_BIOS_DST" + if [ "$UNATTENDED" != true ]; then + local _TI99_BIOS_SRC="" + read -e -r -p " If you already have that file somewhere, enter its path now to copy it into place (Tab completes, Enter to skip): " -i "$GAME_STORAGE_DIR/" _TI99_BIOS_SRC + if [ -n "$_TI99_BIOS_SRC" ] && [ -f "$_TI99_BIOS_SRC" ]; then + cp "$_TI99_BIOS_SRC" "$_TI99_BIOS_DST" + chown "$ACTUAL_USER:$ACTUAL_USER" "$_TI99_BIOS_DST" + log_success "Copied to $_TI99_BIOS_DST" + elif [ -n "$_TI99_BIOS_SRC" ]; then + log_warning "No file found at that path — skipped. Copy it to $_TI99_BIOS_DST whenever you have it." + else + log_info "Skipped — copy it to $_TI99_BIOS_DST whenever you have it." + fi + fi + fi log_info "Then just drop .ctg/.rpk/.bin cartridge files into roms/ti994a/" fi @@ -3538,10 +3562,16 @@ if the binary's already there. The one thing this can't do for you: your own TI-99/4A console ROM + GROM dump — same legal situation as any other console BIOS, and not something -any installer can supply. Per RetroPie's own documentation for this exact -emulator, it expects that combined into a single cartridge file named -\`TI-994A.ctg\` (case-sensitive). Then just drop \`.ctg\`/\`.rpk\`/\`.bin\` -cartridge files into \`roms/ti994a/\`. +any installer can supply. It needs to be named exactly \`TI-994A.ctg\` +(case-sensitive) and placed at \`emulators/TI-994A.ctg\` — the same +directory as the \`ti99sim-sdl\` binary itself, confirmed against +RetroPie's own \`ti99sim.sh\` (it symlinks the console ROM into the +emulator's install dir, then \`cd\`s there before launching; this repo's +own ES-DE command line does the same \`cd\`-first-then-relative-launch +before running \`ti99sim-sdl\`). If you already had the file somewhere +when the TI-99/4A prompt ran, the installer offered to copy it there for +you (tab-completing path prompt); otherwise copy it there by hand. Then +just drop \`.ctg\`/\`.rpk\`/\`.bin\` cartridge files into \`roms/ti994a/\`. ## MAME: sample packs showing up as games MAME sample packs (audio for a handful of older analog-sound games) use the From 0fe0c74235991e2fbf7bd59cd0b3941fafb22345 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 19:16:05 +0000 Subject: [PATCH 2/2] wolf: fix Dolphin Sys folder writing to the wrong directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Confirmed live: RetroArch's system_directory on this Wolf setup is "~/bioses" (GoW's own shipped default, confirmed by reading a real retroarch.cfg directly — wolf.sh never sets this itself), not RetroArch's usual default of ~/.config/retroarch/system. The Dolphin Sys-folder automation added earlier this session assumed the usual default and wrote to retroarch/system/dolphin-emu/Sys on the host — a path RetroArch's own config never actually reads, so it would have sat there doing nothing. Now reads the real configured system_directory value out of retroarch.cfg instead of assuming, and self-heals by moving a Sys folder that's already sitting in the old wrong location (from before this fix) into the correct one. Also corrects the same wrong assumption in the MAME samples-directory documentation, which pointed at the same retroarch/system/ default. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6 --- services/wolf.sh | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/services/wolf.sh b/services/wolf.sh index 261860a..32ede95 100644 --- a/services/wolf.sh +++ b/services/wolf.sh @@ -1874,7 +1874,28 @@ fuse scummvm" # own repo (Data/Sys), so fetch it here too instead of requiring that # GUI step. Sparse+shallow checkout — the full repo is large, this # folder isn't. - SYS_DIR="$GAME_DIR/retroarch/system/dolphin-emu/Sys" + # + # Confirmed live: RetroArch's own docs say this goes under + # system_directory/dolphin-emu/Sys, and GoW's own shipped + # retroarch.cfg sets system_directory = "~/bioses" — NOT RetroArch's + # usual default of ~/.config/retroarch/system. An earlier version of + # this script assumed the default and wrote to the wrong place + # (retroarch/system/dolphin-emu/Sys on the host, which the real + # config never reads). Read the actual configured value instead of + # assuming, and self-heal by moving a Sys folder that's already + # sitting in that old wrong location. + _RA_SYS_CFG=$(grep -i '^system_directory' "$GAME_DIR/retroarch/retroarch.cfg" 2>/dev/null \ + | sed -E 's/^system_directory[[:space:]]*=[[:space:]]*"([^"]*)".*/\1/') + case "$_RA_SYS_CFG" in + "~/.config/retroarch/system") SYS_DIR="$GAME_DIR/retroarch/system/dolphin-emu/Sys" ;; + *) SYS_DIR="$GAME_DIR/bios/dolphin-emu/Sys" ;; + esac + OLD_SYS_DIR="$GAME_DIR/retroarch/system/dolphin-emu/Sys" + if [ "$OLD_SYS_DIR" != "$SYS_DIR" ] && [ -d "$OLD_SYS_DIR" ] && [ ! -d "$SYS_DIR" ]; then + mkdir -p "$(dirname "$SYS_DIR")" + mv "$OLD_SYS_DIR" "$SYS_DIR" + echo "Moved Dolphin's Sys folder to the location RetroArch's own config actually reads: $SYS_DIR" + fi if [ -f "$CORES_DIR/dolphin_libretro.so" ] && [ ! -d "$SYS_DIR" ]; then echo "Fetching Dolphin's Sys folder (needed for GameCube/Wii to boot)..." SYS_TMP=$(mktemp -d) @@ -3579,13 +3600,17 @@ exact same \`.zip\`-per-game naming as real ROMs, so if they're sitting in \`roms/mame/\` alongside your actual ROM set, ES-DE/RetroArch's MAME core lists them as if they were games too — there's no reliable filename-only way to tell them apart (a samples zip and a ROM zip for the same game can -share the identical name). They belong in RetroArch's system directory -instead, under a MAME-core-specific \`samples/\` subfolder (e.g. -\`retroarch/system/mame2003-plus/samples/\` for MAME2003-Plus — the exact -subfolder name depends on which MAME core variant you're using), never in -\`roms/mame/\` itself. A samples zip's contents are almost entirely \`.wav\` -files where a real ROM zip's aren't, which is the practical way to tell -them apart if you're not sure which of your files are which. +share the identical name). They belong in RetroArch's \`system_directory\` +instead, under a MAME-core-specific \`samples/\` subfolder — check +\`retroarch/retroarch.cfg\`'s own \`system_directory\` value before assuming +a path (confirmed live: on this repo's Wolf setup it's actually \`bios/\`, +not RetroArch's usual default of \`retroarch/system/\` — the same thing +that bit Dolphin's \`Sys\` folder earlier), so most likely +\`bios/mame2003-plus/samples/\` for MAME2003-Plus (the exact subfolder name +depends on which MAME core variant you're using), never in \`roms/mame/\` +itself. A samples zip's contents are almost entirely \`.wav\` files where a +real ROM zip's aren't, which is the practical way to tell them apart if +you're not sure which of your files are which. ## Troubleshooting: app exits immediately ("Permission denied") If a launcher (Steam, etc.) closes the moment it opens, its Wolf-managed home