Compare commits

...
3 Commits
Author SHA1 Message Date
Outis f27fdad711 Merge pull request #421 from outis1one/claude/wolf-pair-port-conflict-7nz8qg
Claude/wolf pair port conflict 7nz8qg
2026-09-02 14:58:43 -04:00
Claude e965c2bd76 wolf: build ti99sim-sdl from the real SDL2-native upstream, not a stale fork
You were right to push back on this earlier — the original ask was SDL2,
same as RetroPie, and I substituted a different thing (SDL1-compat) without
checking what RetroPie actually does first.

Checked RetroPie's own ti99sim.sh scriptmodule directly: it doesn't build
from billzajac/ti99sim (the GitHub fork the last two attempts used) at
all. It fetches upstream v0.16.0 straight from the original author's own
site (mrousseau.org), applies exactly one trivial patch (a missing
#include <cstring> for modern g++), and builds against libsdl2-dev +
libssl-dev directly — no SDL1 compatibility layer, because that source
genuinely supports SDL2 natively. The GitHub fork used previously was
just a stale, pre-SDL2-port copy under a different account.

Verified the download URL actually serves the real tarball (fetched real
binary content, confirmed the 7zXZ header) and the patch's exact content
before using either — same real-source-first standard as the wolf.sh
fixes earlier this session. Tested the sed insertion that replaces
applying the .diff against a stand-in file matching the patch's real
context before trusting it.

Also documents the exact BIOS-equivalent filename RetroPie's own docs
give for this emulator: TI-994A.ctg (case-sensitive) — a real, useful
detail that was missing before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6
2026-09-02 18:47:07 +00:00
Claude c7cc7176f0 wolf: fix ti99sim-sdl build — it needs real SDL 1.2, not SDL2
Confirmed live: the previous sdl-config shim got past the tooling
problem, but hit a much deeper one — ti99sim's SDL frontend
(src/sdl/main.cpp) is written against the actual SDL 1.2 API and uses
symbols SDL2 genuinely removed (SDL_keysym, SDL_WM_SetCaption,
SDL_EnableUNICODE, SDL_JoystickOpened, the old integer-index
SDL_JoystickName). No shim can paper over missing symbols — this needed
the real thing.

Swapped libsdl2-dev + the hand-rolled sdl-config shim for
libsdl1.2-compat-dev — the SDL project's own official compatibility
package (libsdl-org/sdl12-compat, packaged in Ubuntu's universe repo):
genuine SDL 1.2 headers and its own real sdl-config, implemented on top
of actual SDL2 underneath. The code compiles against the API it was
actually written for, while still running on modern SDL2 at runtime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6
2026-09-02 18:40:55 +00:00
+36 -34
View File
@@ -945,9 +945,12 @@ UDEV
# TI-99/4A emulator, a separate non-Wolf service) is deliberately not
# used here — it's not something ES-DE can launch as a system.
#
# ti99sim-sdl (billzajac/ti99sim) is the real target — genuine SDL2
# joystick/gamepad support, confirmed against its own README — but it's
# source-only with no AppImage, so unlike Azahar/PCSX2/Dolphin/Cemu this
# ti99sim-sdl is the real target — genuine SDL2 joystick/gamepad
# support (v0.16.0 from the original author, mrousseau.org — the same
# source RetroPie's own ti99sim.sh scriptmodule builds from; an older
# GitHub fork under a different account turned out to still target
# SDL 1.2 and was dropped after failing to compile against SDL2) — but
# it's source-only with no AppImage, so unlike Azahar/PCSX2/Dolphin/Cemu this
# installer can't just download a working binary. Building it against the
# HOST's glibc/SDL2 risks a mismatch against the ES-DE container's own
# (different) runtime, so instead it's built INSIDE a throwaway container
@@ -1003,34 +1006,31 @@ XMLEOF
# it (copies to /opt/ti99sim/bin, symlinks into
# /usr/local/bin), so use that instead of guessing the exact
# build subpath.
# ti99sim's own Makefile.linux calls the old SDL 1.x `sdl-config`
# tool, which no longer exists — modern libsdl2-dev ships only
# pkg-config .pc files (and sometimes sdl2-config, itself already
# a thin wrapper over pkg-config). Confirmed live: without this,
# every sdl-config call silently returns nothing, so the compile
# gets no -I/-L flags at all and fails on "SDL.h: No such file or
# directory" — not a real incompatibility, just a stale tool
# name. A tiny shim mapping the handful of flags this build
# actually uses (--cflags/--libs/--version) onto pkg-config sdl2
# fixes it without patching the project's own Makefiles.
# billzajac/ti99sim on GitHub (used in the two previous attempts)
# turned out to be a stale fork whose SDL frontend still targets
# the real SDL 1.2 API — confirmed live, it fails to compile
# against SDL2 outright on symbols SDL2 removed. RetroPie's own
# ti99sim.sh scriptmodule doesn't build from that fork at all:
# it fetches upstream v0.16.0 directly from the original
# author's own site (mrousseau.org), applies exactly one trivial
# patch (a missing #include <cstring> for modern g++), and
# builds straight against libsdl2-dev + libssl-dev with no SDL1
# compatibility layer — confirming v0.16.0 genuinely supports
# SDL2 natively, unlike the old fork. Verified the download URL
# actually serves the real tarball, and the patch content,
# before using either.
if docker run --rm -u root --entrypoint /bin/bash \
-v "$GAME_STORAGE_DIR/emulators:/output" \
ghcr.io/games-on-whales/es-de:edge -c '
set -e
apt-get update -qq
apt-get install -y -qq git build-essential libsdl2-dev pkgconf ca-certificates
cat > /usr/local/bin/sdl-config << "SDLCFG"
#!/bin/sh
case "$1" in
--cflags) exec pkg-config sdl2 --cflags ;;
--libs) exec pkg-config sdl2 --libs ;;
--version) exec pkg-config sdl2 --modversion ;;
*) exec pkg-config sdl2 --cflags --libs ;;
esac
SDLCFG
chmod +x /usr/local/bin/sdl-config
git clone -q https://github.com/billzajac/ti99sim.git /tmp/ti99sim
apt-get install -y -qq build-essential libsdl2-dev libssl-dev ca-certificates curl xz-utils
mkdir -p /tmp/ti99sim
curl -fsSL -o /tmp/ti99sim.tar.xz \
https://www.mrousseau.org/programs/ti99sim/archives/ti99sim-0.16.0.src.tar.xz
tar -xJf /tmp/ti99sim.tar.xz -C /tmp/ti99sim --strip-components 1
cd /tmp/ti99sim
sed -i "s/#include <regex>/#include <cstring>\n#include <regex>/" src/core/device-support.cpp
make
make install
cp /usr/local/bin/ti99sim-sdl /output/ti99sim-sdl
@@ -3527,18 +3527,20 @@ service, which is browser-based and isn't something ES-DE can launch as a
system.
The emulator itself, \`ti99sim-sdl\` (real SDL2 gamepad support), has no
AppImage — so instead of a plain host build (which risks a glibc/SDL2
mismatch against the ES-DE container's own runtime), this installer builds
it inside a throwaway container running the exact same image ES-DE itself
runs (\`ghcr.io/games-on-whales/es-de:edge\`), guaranteeing compatibility,
and drops the result at \`emulators/ti99sim-sdl\` automatically. Re-run
\`sudo ./setup.sh wolf\` if the build ever needs retrying (network hiccup,
etc.) — it skips the build if the binary's already there.
AppImage — this installer builds it from source (v0.16.0, the original
author's own release — the same one RetroPie's own ti99sim.sh
scriptmodule builds from) inside a throwaway container running the exact
same image ES-DE itself runs (\`ghcr.io/games-on-whales/es-de:edge\`),
guaranteeing compatibility, and drops the result at
\`emulators/ti99sim-sdl\` automatically. Re-run \`sudo ./setup.sh wolf\` if
the build ever needs retrying (network hiccup, etc.) — it skips the build
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 — ti99sim-sdl's own README covers exactly where
it expects that once you have it. Then just drop \`.ctg\`/\`.rpk\`/\`.bin\`
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/\`.
## MAME: sample packs showing up as games