mirror of
https://github.com/TheBozos/TMB_Recomp.git
synced 2026-12-01 12:54:41 -10:00
USA by default (TMB_REGION=us), PAL with TMB_REGION=pal: each region has its disc folder, recompiler config, generated code and build, and everything hand-written is shared. - runtime/ marks the PAL addresses it uses (TMB_ADDR, TMB_GP); tools/tmb_region_map.py maps them to the region's executable by symbol (unnamed statics through the code using them) into tmb_region.h, with the generated function names and the override's registration (the override was only registered for SCES_503.60). - recomp/tmb_manual.toml: the hand-written stubs by symbol name (tools/tmb_manual_toml.py); recomp/tmb_scus97101.toml generated. - The disc image is the .iso that boots the executable; build_runtime.sh stages the DLLs on Windows; the scripts follow TMB_REGION. - Native path: NTSC's 640 x 224 field (the microcode's half height is 112.0 there). Native fixes, PAL and USA: the rigid strips' z / w scaled by VU 4.z as the microcode does (glows and smoke were cut by the scenery), VIF1's own STMASK/STROW/STCOL/STMOD seed the VU memory copy (the ribbons' inputs now match VU1 on 200 runs), the lens flares read the native frame's depth (TMB_NATIVE_FLARE_DEPTH=0 to compare), DIRECT packets that only draw can be drawn natively (none in a match), diagnostics. Runs: USA boots, menus, story intro and a match at 57.4 fps on the PS2 path, 54.1 native; PAL unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
12 lines
753 B
Bash
Executable File
12 lines
753 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds ps2EntryRunner with the region's generated code linked in -> build/game_us (or build/game for PAL)/PS2Recomp/
|
|
# ps2xRuntime/ps2EntryRunner
|
|
# Usage: scripts/build_runtime.sh [Release|RelWithDebInfo|Debug]
|
|
source "$(dirname "$0")/common.sh"
|
|
BUILD_TYPE="${1:-RelWithDebInfo}"
|
|
[ -f "$GENERATED/register_functions.cpp" ] || { echo "no generated code, run scripts/recomp.sh first"; exit 1; }
|
|
cmake -S "$ROOT" -B "$GAME_BUILD" -G Ninja -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DTMB_GENERATED_DIR="$GENERATED"
|
|
cmake --build "$GAME_BUILD" --target ps2EntryRunner -j "$JOBS"
|
|
# Windows (MSYS2): the DLLs next to the runner, so it starts outside the MSYS2 shell too.
|
|
case "$(uname -s)" in MINGW* | MSYS*) "$ROOT/scripts/stage_dlls.sh" ;; esac
|