Remove the fork gitlink, CMake branch, old recompiler/IOP/PGO steps and pack-tool fallbacks. Route the retained
build/run shortcuts through the native pipeline and keep native frame pacing unconditional.
Pin BozoEngine's reviewed timing/heat-haze changes. Prepare both a separate-install ZIP and a compatible
in-place-update ZIP with the same native payload, audit out the retired runtime, document CPU requirements,
and add migration/timing CI and current build/release guidance.
Co-Authored-By: Codex <[email protected]>
A double-click on ps2EntryRunner.exe is now the full native port: TMB_NATIVE defaults to 1 (tmb::native::enabled and
the existing setEnvDefault block), so everything scripts/run_native.sh exports is a default; variables still win.
The fps counter is off (F3, PS2X_SHOW_FPS=1; run_native.sh sets it), scripts/run.sh sets TMB_NATIVE=0 to stay the
PS2 path. CMake names the app for the fork's ps2_app.h (title "Twisted Metal: Black", %APPDATA%\TMB_Recomp,
$XDG_DATA_HOME/tmb_recomp, game/SCUS_971.01) and builds the runner GUI-subsystem with runtime/app/tmb.rc (a
placeholder icon as GLFW_ICON, version information). Cards, input.ini, video.ini, imgui.ini, logs/ (last 3 runs)
and crashes/ in the user folder, the old cards and settings copied once. The mesh and texture packs fall back to the
file next to the ELF or the runner when the build's path is absent. README "As a PC game", RECOMP_NOTES.
Checked: a copy of the runner with game/ (disc files, ISO) beside it, started as Explorer starts it with only
PS2X_CAPTURE_WINDOW_DIR set: movies, menus, a Challenge match in Suburbs natively with sound, cards and video.ini
migrated, log written; arena.sh with main's runner, this one, and this one without the native variables: the same
menus (no fps counter now), matches native with the mixer playing, the terminal output unchanged and equal to the log;
PS2X_TEST_CRASH in a match: report and message box, addr2line resolving frame 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
verify (ISO9660 .iso / .bin / .cue, SYSTEM.CNF's BOOT2, SCUS_971.01's SHA-1; the European disc named as such) ->
extract (fork tools/ps2_disc.py, and the image as <game>/disc.iso: the game reads raw sectors too) -> tools ->
recompile -> packs -> iop (the IRX loaded offline at the bases recomp/tmb_iop_modules.json records, fork
tools/irx_load.py: byte-identical to the PS2X_IOP_DUMP_MODULES dumps, no boot) -> configure -> compile -> stage (the
DLLs from the PE import tables, Play TMB.cmd). PROGRESS / PERCENT / SKIP / DONE / ERROR / RESULT lines for a launcher,
resumable by step keys, logs per step. From an empty folder: 530 s; generated/ equal to main's generated_us/ (3576
files); the staged folder reaches a Challenge match at 59.5 fps with the nine native IOP modules.
scripts/iop_recomp.sh offline by default (--boot keeps the dump path and prints the bases), scripts/extract_iso.sh
without bsdtar. Fork 88a34e8 (native/build-pipeline). README "Build and run", RECOMP_NOTES section.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
tools/tmb_texture_pack.py converts the disc's .TEX (zip, raw deflate) and .RTX files and the ELF's font into a
native pack in the build tree (scripts/recomp.sh); a file's last record, whose size the game fills in when it
links the files, is sized from its format, and the car files' padding is left out. runtime/tmb_textures.cpp
follows TMB's texture code at hooks: which disc file goes where (fileReadf, zipInflateAll, file*TexFile,
file*ResFile), each texture's id as texmSetupTexture sets it up (the n-th setup is the pack's n-th record) and
each palette's or H texture's VRAM block as texmLoadResTexture loads it (sceGsSetDefLoadImage from there), both
checked against the pack's format and size; a draw's TEX0 finds its texture through the game's texInfo table
(TBP -> id) and its palette by CBP. The adapter hands it to the renderer (fork native/renderer 84ec62e:
Renderer::draw with the texture handed over). Shell and Junkyard: every record matched, no draw without its
texture.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scripts/iop_recomp.sh recompiles every module the game loads (989SND, LIBSD, PADMAN, SIO2MAN, MTAPMAN, MCMAN, MCSERV, USBD, LGDEV), for both releases: none left interpreted. With TMB_NATIVE=1 the overrides also set PS2X_IOP_NATIVE, PS2X_SPU2_WALLCLOCK and PS2X_IOP_WALLCLOCK by default (only scripts/run_native.sh did): the check runs measured the sound driver interpreted. Check runs, TMB_NATIVE=1 only: US 58.8 fps (p10 58.5), PAL 49.5 (p10 49.3), 9 modules native, nothing stuck or stalled.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Menus, HUD, fonts, movies and the 3D now all draw through OpenGL, the native 3D in the same render targets at its GS markers. Fork a4c4819 (a target holding native draws covers the rows its scissor reaches: the 3D was black). US 58.9 fps mean, p10 58.5; PAL 49.4, p10 49.3. PS2X_GS_RENDERER=parallel or cpu keeps the emulated GS.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
What runs natively and what is still the PS2 path, part by part; the native switches; scripts/run_native.sh launches the native port (TMB_NATIVE, the recompiled sound driver when generated, the wall-clock SPU2 and IOP).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fork's tools/iop_recomp.py recompiles the IRX modules from the images the IOP loaded; scripts/iop_recomp.sh
boots the game to dump them and writes generated/iop/ (derived from the game's IRX files, never committed, as
generated/), which the build compiles into its own object library. Match run with them native: 49.8 fps, no stall;
the sound matches the interpreted run's recording where the runs are the same (boot and menus).
Fork bumped to native/renderer 1e08a79 (IOP recompilation, blocking imports in native code).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
common.sh runs the scripts with set -u, so the test stopped the script after ps2_recomp, before the VU1 microcode and
the copy into generated/.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- scripts/regress.sh <build-dir> <out-dir>: the fork's port regression run for TMB (boot movies, menus, a
Skyscrapers match under the bench lock), summary.txt in the shared key=value format (tools/regress_summary.py),
last_frame.png. First run: route reached, 49.2 fps mean, p10 48.3, no error.
- tools/arena_script.py: the Challenge-mode pad script, from the scratchpad into the repo.
- TMB_TRACE_FRAMES lines count the frames over 25 ms in each window of 100.
- TMB_ENEMY_HEALTH_CAP walks TheGame's vehicle array (TheGame + i * 0x2D00, count at +0x1B3DB4, as
TheGame::GetVehicleFromName) instead of assuming a contiguous one; not run through story mode yet.
- TMB_PLAYER_GOD=1 keeps the player car at its highest health seen.
- TMB_AB=fill: the GS drawing-time model at 8 against 4 pixels per GS cycle (neutral on TMB).
- Notes: the rear view draws the scene twice; the CPU renderer on main and gs/gpu-renderer's CPU path; Prison
Passage can't be picked in Challenge.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scripts/recomp.sh generates the VU1 microcode with PS2X_VU_AOT_FAST=1 (TMB_VU1_EXACT=1 for the exact model).
Four alternated play runs: fps mean 45.0/45.3 against 41.0/43.0, worst tenth 35.5/39.4 against 27.3/33.4,
VIF1 thread ~10 ms a frame against ~12.5; same pictures, no freeze.
tools/vu_disasm.py disassembles VU microcode. The hottest program (pc 0x1d40, a third of VU1's cycles) is the
rain: 16000 drops a frame, 3.3 ms on the fast path; notes on lifting it to native code.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The GS draws on the GPU (paraLLEl-GS) unless PS2X_GS_RENDERER=cpu: 20-23 ms per frame in the match against
24-27 with the CPU rasterizer. Without a Vulkan device it falls back to the CPU by itself.
- TMB_TRACE_TIMELINE: the GS thread is GSFrontend since the sc3 backport, and every vblank is marked from the
scheduler's tick (the vblank handler only runs during movies). The match is bound by VIF1/VU1, with the GS
thread following it and the game thread waiting for both.
- TMB_PGO=GENERATE|USE and scripts/pgo.sh: profile-guided build of the runtime, IOP and compiled VU1 microcode.
The VU1 replay is ~12% faster; no measurable gain in the game yet, so it stays opt-in.
- tmb_vu1_replay takes PS2X_PROFILE on Windows.
- README: the status is ~40 fps with sound, on Linux and Windows.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Arzaroth's sc3/bringup (Soulcalibur III) on top of our fork, without its VU1 rework (it drops our per-fragment
VU1 AOT), its pad script parser and the cores-2 raster default. 546 fork tests pass, TMB reaches the match with
0 falls in the bots match; about 10% slower per frame, not investigated yet. RECOMP_NOTES lists what came in.
scripts/stage_dlls.sh: DLLs staged by an earlier run are refreshed and counted too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- runtime/tmb_host.cpp: the thread CPU times behind TMB_TRACE_FRAMES and TMB_TRACE_TIMELINE (/proc and
clock_gettime on Linux; Toolhelp32, GetThreadDescription and QueryThreadCycleTime on Windows) and setenv.
Outside the unity batches and the PCH: <windows.h> clashes with raylib.
- scripts/stage_dlls.sh copies the MinGW and FFmpeg DLLs next to ps2EntryRunner.exe.
- .gitattributes keeps the scripts LF where git converts line endings.
- Skipping the copyright movie hung the game: after videoDecAbort, updateMpegMovieDecoding loops on
switchThread (RotateThreadReadyQueue(1), written for ezmpeg's priority-1 main loop) at priority 0, and the
priority-1 decode thread never ran to acknowledge. switchThread now drops a priority-0 caller to
priority 1 for the rotation and restores it when it runs again.
- Fork bump: Windows build fixes (FFmpeg via pkg-config on MinGW, x86 flags, raylib before winmm).
Menus, movies and the first match run on Windows, with the CPU rasterizer and with paraLLEl-GS.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cars move by their velocity times the vblank fields since the previous frame and test the collisions once,
after the move. The PS2 runs the match at one field per frame; at the 2-4 fields of a slow host each step went
2-4 times as far and fast cars landing on a slope went under it. TheGame::Update now runs once per field (at
most TMB_SUBSTEPS, default 4), the fields, update rate and frame time split over the steps, each step returning
through the dispatcher to a padding address that starts the next one. Bots scenario (scripts/bots.sh, player
idle, 10 min): 11 falls under the arena in 19371 vblanks before, 0 in 25857 after, no measurable cost.
TMB_TRACE_POS traces every vehicle.
Fork: the macro VU0 VLQI/VSQI/VLQD/VSQD used EE RAM instead of VU0 data memory and VSQI swapped its fields
(TMB's matrix stack wrote vf10 three times into low EE RAM); VDIV by zero gives +-max.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- scripts: build_tools.sh builds ps2_vu_aot, recomp.sh writes the compiled
VU1 microcode to generated/vu1/ (-O3, no debug info, outside the unity
batches); tmb_vu1_replay checks it against recorded runs.
- runtime/tmb_overrides.cpp: GS rasterization on 4 worker threads
(TMB_GS_SERIAL=1 keeps the GS thread alone).
- README/notes: the earlier 26 fps was a near-empty view; the match runs at
10-13 fps, bound by the rasterizer.
- Fork bump: VU1 inline semantics, exact fast FMAC flags, ps2_vu_aot.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- videoCallback stubbed (ret1): its viBuf copy only feeds the IPU, which
the libmpeg HLE replaces; the full ring made videoDecFlush spin
- videoDecAbort override ends the HLE playback on movie skip
- fork bump: program end code ends HLE movies, abortMpegPlayback
- TMB_TRACE_MOVIE=1 movie player diagnostics
- recomp.sh stages output and rsyncs by content (incremental rebuilds)
- tools/iso_lbn.py maps disc sectors to files
- notes and README status
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- recomp/ for the recompiler config, runtime/ for the override module
- README in the sibling ports' style: disc hash, milestones, how it works,
build and run, options, layout, credits
- docs/RECOMP_NOTES.md bring-up log
- drop the MIT LICENSE: the port links the GPL PS2Recomp runtime, as the
sibling projects do
- submodule bump: GCC/Clang -march fix in the fork
Co-Authored-By: Claude Fable 5.1 <[email protected]>
- PS2Recomp fork as submodule
- analyzer-generated recompiler config for the PAL ELF
- top-level CMake linking generated code into ps2EntryRunner
- helper scripts for extract/analyze/recomp/build/run
- game override stub
Co-Authored-By: Claude Fable 5.1 <[email protected]>