Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 49 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,23 @@ jobs:
shell: bash
run: |
set -euo pipefail
OUT="${GITHUB_WORKSPACE}/.cache/sdl3-src"
# Use repo-relative paths for tar: Windows GITHUB_WORKSPACE is D:\…
# and GNU tar treats drive-letter abs paths as remote hosts
# ("Cannot connect to D"). Prefer prefetch_sdl3.sh when present.
OUT=".cache/sdl3-src"
sdl3_env() {
local abs="${OUT}"
if command -v cygpath >/dev/null 2>&1; then
abs="$(cygpath -m "${OUT}")"
elif [[ -d "${OUT}" ]]; then
abs="$(cd "${OUT}" && pwd)"
fi
echo "PSX_SDL3_SOURCE_DIR=${abs}" >>"$GITHUB_ENV"
echo "SDL3 source ready: ${abs}"
}
if [[ -f "${OUT}/CMakeLists.txt" ]]; then
echo "PSX_SDL3_SOURCE_DIR=${OUT}" >>"$GITHUB_ENV"
echo "SDL3 source cache hit: ${OUT}"
sdl3_env
echo "SDL3 source cache hit"
exit 0
fi
if [[ -f psxrecomp/tools/ci/prefetch_sdl3.sh ]]; then
Expand All @@ -298,22 +311,26 @@ jobs:
fi
# Submodule may predate the helper — inline HTTP/1.1 prefetch.
echo "prefetch_sdl3.sh missing; using inline curl --http1.1"
mkdir -p "${GITHUB_WORKSPACE}/.cache"
mkdir -p .cache
VER=3.4.10
SHA=12b34280415ec8418c864408b93d008a20a6530687ee613d60bfbd20411f2785
URL="https://github.com/libsdl-org/SDL/releases/download/release-${VER}/SDL3-${VER}.tar.gz"
TAR="${GITHUB_WORKSPACE}/.cache/SDL3-${VER}.tar.gz"
TAR=".cache/SDL3-${VER}.tar.gz"
curl -fsSL --http1.1 --retry 5 --retry-all-errors --retry-delay 2 -o "${TAR}" "${URL}"
echo "${SHA} ${TAR}" | sha256sum -c -
rm -rf "${OUT}.extracting"
mkdir -p "${OUT}.extracting"
tar -xzf "${TAR}" -C "${OUT}.extracting"
# --force-local: belt-and-suspenders if a path ever gains a colon.
if tar --help 2>&1 | grep -q -- '--force-local'; then
tar --force-local -xzf "${TAR}" -C "${OUT}.extracting"
else
tar -xzf "${TAR}" -C "${OUT}.extracting"
fi
INNER="$(find "${OUT}.extracting" -mindepth 1 -maxdepth 1 -type d | head -n1)"
rm -rf "${OUT}"
mv "${INNER}" "${OUT}"
rm -rf "${OUT}.extracting"
echo "PSX_SDL3_SOURCE_DIR=${OUT}" >>"$GITHUB_ENV"
echo "SDL3 source ready: ${OUT}"
sdl3_env

# Windows: build emitters with llvm-mingw from cmake-clang-v1 (static CLI).
# Zip still omits toolchain/ — fetch is for the build machine only.
Expand Down Expand Up @@ -487,6 +504,30 @@ jobs:
exit 1
fi
cmake --build build-ci --target psx-runtime -j"${JOBS}"
# Lobby list pin must match RELEASE_VERSION (package_setup_host enforces).
STAMP=""
for cand in \
build-ci/psx_game_version.txt \
build-ci/Release/psx_game_version.txt \
build-ci/*/psx_game_version.txt
do
if [[ -f "${cand}" ]]; then STAMP="${cand}"; break; fi
done
if [[ -z "${STAMP}" ]]; then
# Fallback: stamp next to the host exe
STAMP="$(find build-ci -name psx_game_version.txt -type f 2>/dev/null | head -n1 || true)"
fi
if [[ -z "${STAMP}" || ! -f "${STAMP}" ]]; then
echo "::error::missing psx_game_version.txt after build (update psxrecomp submodule)"
exit 1
fi
BUILT="$(tr -d '[:space:]' <"${STAMP}")"
BUILT="${BUILT#v}"
if [[ "${BUILT}" != "${RELEASE_VERSION}" ]]; then
echo "::error::lobby pin stamp ${BUILT} != RELEASE_VERSION ${RELEASE_VERSION} (${STAMP})"
exit 1
fi
echo "lobby pin ok: ${BUILT} (${STAMP})"

- name: Package setup zip
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "psxrecomp"]
path = psxrecomp
url = https://github.com/mstan/psxrecomp.git
branch = master
branch = feat/rbengine-bak

[submodule "recomp-ui"]
path = recomp-ui
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.migrate_extras.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Preserved notes after setup-host CMake rewrite:

- Old CMakeLists used EXTRAS_SOURCES — re-attach mod/plugin sources.
- Old CMakeLists copied mods/preloaded POST_BUILD — re-add if needed.

Full previous file: CMakeLists.txt.pre_migrate.bak
29 changes: 8 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ set(PSX_SETUP_WIZARD ON CACHE BOOL
"Advertise first-run setup wizard + Generate & rebuild in recomp-ui" FORCE)
include("${PSXRECOMP_ROOT}/runtime/runtime.cmake")

file(GLOB TOMBA_MOD_PLUGIN_SOURCES CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/mods/*.c")

psxrecomp_add_game_runtime(psx-runtime
# ENABLE_NETPLAY_IF_PRESENT
# NETPLAY_LOBBY_URL "ws://netplay.retcomm.net:8765"
Expand All @@ -28,32 +25,22 @@ psxrecomp_add_game_runtime(psx-runtime
DEFAULT_GAME_CONFIG_PATH "game.toml"
MAX_PLAYERS 1
LAUNCHER_BOXART "${CMAKE_CURRENT_SOURCE_DIR}/launcher_assets/img/boxart.tga"
APP_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/psxrecomp.ico"
GEN_MARKER "generated/SCUS_942.36_dispatch.c"
GEN_FULL_GLOB "generated/SCUS_942.36_full_*.c"
CODEGEN_SETUP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/codegen_setup.c"
)

target_sources(psx-runtime PRIVATE ${TOMBA_MOD_PLUGIN_SOURCES})

# Stage configs beside the binary for direct launches. Gate on EXISTS so a
# setup-host zip that forgot an optional file still links successfully.
foreach(TOMBA_RUNTIME_CONFIG game.toml game_options.toml)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${TOMBA_RUNTIME_CONFIG}")
# Stage runtime configs next to the exe for direct build/ launches. Only copy
# files that exist — never fail POST_BUILD when game_options.toml is absent.
foreach(_PSX_RUNTIME_CONFIG game.toml game_options.toml)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_PSX_RUNTIME_CONFIG}")
add_custom_command(TARGET psx-runtime POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/${TOMBA_RUNTIME_CONFIG}"
"$<TARGET_FILE_DIR:psx-runtime>/${TOMBA_RUNTIME_CONFIG}"
COMMENT "Staging ${TOMBA_RUNTIME_CONFIG} for direct Tomba launches"
"${CMAKE_CURRENT_SOURCE_DIR}/${_PSX_RUNTIME_CONFIG}"
"$<TARGET_FILE_DIR:psx-runtime>/${_PSX_RUNTIME_CONFIG}"
COMMENT "Staging ${_PSX_RUNTIME_CONFIG}"
VERBATIM)
endif()
endforeach()

set(TOMBA_PRELOADED_MODS "${CMAKE_CURRENT_SOURCE_DIR}/mods/preloaded")
if(EXISTS "${TOMBA_PRELOADED_MODS}/packages")
add_custom_command(TARGET psx-runtime POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${TOMBA_PRELOADED_MODS}"
"$<TARGET_FILE_DIR:psx-runtime>/mods"
COMMENT "Preloading the Tomba mod catalog"
VERBATIM)
endif()
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# TombaRecomp

<!-- retcomm-readme-metrics -->
[![GitHub downloads (all assets, all releases)](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/total)](https://github.com/TechnicallyComputers/TombaRecomp/releases)
[![GitHub downloads (latest release)](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/total)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)
[![GitHub release](https://img.shields.io/github/v/release/TechnicallyComputers/TombaRecomp)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)

[![Linux](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-linux-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)
[![Windows](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-windows-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)
[![macOS arm64](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-macos-arm64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)
[![macOS x64](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-macos-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest)
<!-- /retcomm-readme-metrics -->

> _This recompilation is a **byproduct of developing
> [psxrecomp](https://github.com/mstan/psxrecomp)** — the games are the proving ground, the framework is the goal.
> **These are in-development previews, not finished ports — expect rough
Expand All @@ -14,6 +25,31 @@ Tomba! (USA, SCUS-94236) statically recompiled to a native PC executable with

[![PSXRecomp demo](https://img.youtube.com/vi/CID9oVhgCyY/maxresdefault.jpg)](https://www.youtube.com/watch?v=CID9oVhgCyY)

<!-- retcomm-readme-launcher -->
## RetComM Launcher

You can run this title **standalone** (release zip + the built-in recomp-ui
Generate & Build flow), or manage installs, updates, ROM/BIOS wiring, and queued
builds more intuitively with
**[RetComM Launcher](https://github.com/TechnicallyComputers/RetComM-Launcher)** —
the Retro Compilation Manager hub for self-compiling recomps.

[Downloads](https://github.com/TechnicallyComputers/RetComM-Launcher/releases) ·
[Full README & features](https://github.com/TechnicallyComputers/RetComM-Launcher#readme)

<p align="center">
<img src="https://raw.githubusercontent.com/TechnicallyComputers/RetComM-Launcher/main/docs/screenshots/hub-and-game-launcher.png" alt="RetComM hub with a background build, next to a title’s recomp-ui launcher" width="720">
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/TechnicallyComputers/RetComM-Launcher/main/docs/screenshots/queue-and-background-build.png" alt="Background cmake build with titles queued" width="720">
</p>

RetComM checks for updates, rebuilds with existing build data when possible,
shares the portable toolchain used by per-title launchers, and automates
BIOS/ROM/save plumbing so you are not stuck repeating each game’s wizard by hand.
<!-- /retcomm-readme-launcher -->

## What This Is

This repository contains the game-specific configuration, seeds, tools, and
Expand Down
Binary file added assets/psxrecomp.ico
Binary file not shown.
Binary file added assets/psxrecomp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions assets/psxrecomp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion framework_pins.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
psxrecomp=13a5662 (13a56626d34cd34aabab56273e823ce7172378a9)
psxrecomp=958e09f (958e09faa3aea4dde6179fec5fd0257fa974b1f2)
recomp-ui=ad2f3e2 (ad2f3e293c6641c93ee69963dd669661f3e40290)
recomp-net=77a9e26 (77a9e26fa9197694fb8f3424005b3a0fd0a2a810)
retcomm-rbengine=8a25408 (8a254082fa77600c0fe482d22f23ddd117f1b774)
2 changes: 1 addition & 1 deletion psxrecomp
Submodule psxrecomp updated 160 files