mirror of
https://github.com/TheBozos/TMB_Recomp.git
synced 2026-12-05 19:35:03 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
601cb31a95 | ||
|
|
88beda600e | ||
|
|
5864909a50 | ||
|
|
f7c06f2912 | ||
|
|
372a05850f | ||
|
|
4cdb0ec911 | ||
|
|
0ca92a14ad | ||
|
|
86179adf38 | ||
|
|
b066822107 | ||
|
|
57cf629e50 | ||
|
|
9217669e76 |
No files matched your search
+19
-1
@@ -7,6 +7,23 @@ under "Unreleased" as they land, then move them under the new version's heading
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.8.1] - 2026-12-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Red flashes after retrying a lost level** (reported on Prison Passage in story mode). The level's reload left the
|
||||
loading bar's vblank callback running, and the native 2D drew the last load's full bar over the match's frames. It is
|
||||
now drawn only while the game shows it (as the game's own `informProgressBar` does too).
|
||||
- Linux: closing the game from the launcher sends it one stop signal, not one a frame (a second one could kill the game
|
||||
while it was closing).
|
||||
- The packages no longer carry Python's bytecode cache (`source/tools/__pycache__`), which held the build machine's
|
||||
paths.
|
||||
|
||||
### Added
|
||||
|
||||
- Testing switches: `TMB_KILL_PLAYER=<s>` (player 1's car takes a fatal hit every `<s>` seconds) and
|
||||
`TMB_PLAYER_LIVES=<n>` (player 1's story lives kept at most `n`), to reach a lost level and its retry in a script.
|
||||
|
||||
## [0.8.0] - 2026-12-02
|
||||
|
||||
### Added
|
||||
@@ -331,7 +348,8 @@ The first release. You build the game on your own PC from your own USA disc; not
|
||||
- Technical: built from TMB_Recomp's code and the PS2Recomp fork (`native/renderer`) with the build kit's GCC 16.2,
|
||||
FFmpeg 9.0.2 and Python 3.14; the default mode has no GS, VU or SPU2 emulation and no IOP hardware model.
|
||||
|
||||
[Unreleased]: https://github.com/TheBozos/TMB_Recomp/compare/v0.8.0...HEAD
|
||||
[Unreleased]: https://github.com/TheBozos/TMB_Recomp/compare/v0.8.1...HEAD
|
||||
[0.8.1]: https://github.com/TheBozos/TMB_Recomp/compare/v0.8.0...v0.8.1
|
||||
[0.8.0]: https://github.com/TheBozos/TMB_Recomp/compare/v0.7.3...v0.8.0
|
||||
[0.7.3]: https://github.com/TheBozos/TMB_Recomp/compare/v0.7.2...v0.7.3
|
||||
[0.7.2]: https://github.com/TheBozos/TMB_Recomp/compare/v0.7.1...v0.7.2
|
||||
|
||||
@@ -3,6 +3,48 @@
|
||||
Use a scratch `PS2X_USER_DIR` for every automated run. Keep game data and generated code out of Git and release ZIPs.
|
||||
Publication is separate from a successful build; this checklist records what was actually verified.
|
||||
|
||||
v0.8.1 was published on 2026-12-03 after tagged CI and the owner's release request. Its draft assets were checked
|
||||
locally before publication, and the published files are byte-identical to the checked ones:
|
||||
- both player ZIPs pass the SHA-256 and package audits, carry an identical 8,027-file payload, and are stamped with
|
||||
the release commit and engine version `0.7.8`; the sources ZIP matches its hash; both carry the commit's
|
||||
`recomplauncher.json`; no package holds Python's bytecode cache any more (#131);
|
||||
- the Linux archive matches its hash and passes `verify_tar`; its `source/` is the zips' but for line ends;
|
||||
- the release's fix (red flashes after a lost level's retry, #133) was reproduced and checked before tagging: Prison
|
||||
Passage driven by the story pad script to a game over and its retry (`TMB_KILL_PLAYER=15 TMB_PLAYER_LIVES=1`),
|
||||
about 1,040 captures, had 4 solid-red and 7 half-red frames before the fix and none after;
|
||||
- Windows: a fresh install in a path with spaces and accents was built offline from the disc with only the bundled
|
||||
kit, stopped and resumed, played and exited normally, with menu/movie timing passing; the v0.8.0 install was
|
||||
updated by its own updater, rebuilt and played (a first run failed movie 1 at 28.4 pictures/s with the game clock
|
||||
at 0.991; the rerun passed at 29.97); the v0.3.2 updater accepted the migration ZIP; player data was kept in both
|
||||
update cases; Enhanced textures made 2,190 replacements;
|
||||
- Linux (Docker, Ubuntu 24.04, Mesa llvmpipe, Xvfb): the archive unpacked into a path with spaces and accents passes
|
||||
the launcher's self-check; the launcher's self-test prepared the game from the disc (stopped and resumed), played
|
||||
40 s and closed it with exit code 0 (the close-signal fix, #131); RecompLauncher's prepare through `kit/python3`
|
||||
built the game in 186 s ("Ready to play"), said "Already built" when run again, and its start played 600 frames.
|
||||
|
||||
v0.8.0 was published on 2026-12-02 after tagged CI and the owner's release request. Its draft assets were checked
|
||||
locally before publication:
|
||||
- both player ZIPs pass the SHA-256 and package audits, carry an identical 8,028-file payload, and are stamped with
|
||||
the release commit and engine version `0.7.8`; the sources ZIP matches its hash; both carry the commit's
|
||||
`recomplauncher.json`;
|
||||
- the Linux archive (`TMB_Recomp-0.8.0-linux.tar.gz`, new) matches its hash and passes `verify_tar`. Its `source/`
|
||||
is the zips' but for line ends; `tmb-launcher`, `kit/python3` and Real-ESRGAN are executable;
|
||||
- the release's engine change (BozoEngine 0.7.8, #129) was checked before tagging: headless 1P (9,500 frames) and 4P
|
||||
(8,500 frames) Windows records are identical to engine 0.6.0's, and the Linux build's game state equals Windows' on
|
||||
every frame (the draw hash differs by GCC's fused multiply-adds only);
|
||||
- Windows: a fresh install in a path with spaces and accents was built offline from the disc with only the bundled
|
||||
kit, stopped and resumed, played and exited normally, with menu/movie timing passing; the v0.7.3 install was
|
||||
updated by its own updater, rebuilt and played; the v0.3.2 updater accepted the migration ZIP; player data was kept
|
||||
in both update cases; Enhanced textures made 2,190 replacements;
|
||||
- Linux (Docker, Ubuntu 24.04, Mesa llvmpipe, Xvfb): the archive unpacked into a path with spaces and accents passes
|
||||
the launcher's self-check; the launcher's self-test prepared the game from the disc (stopped and resumed) in 3:49
|
||||
and played 40 s, but reported a failure when closing it: the game was killed by a repeated close signal (exit 143),
|
||||
a self-test-only problem fixed after the release (#131, checked on this archive: exit 0). RecompLauncher's prepare
|
||||
through `kit/python3` built the game in 160 s ("Ready to play"), said "Already built" when run again, and its start
|
||||
played 600 frames with the cards in `recompdata`;
|
||||
- known leftover: `source/tools/__pycache__/tmb_build.cpython-314.pyc` is in every package, as in earlier releases
|
||||
(removed for the next one, #131).
|
||||
|
||||
v0.7.3 was published on 2026-12-01 after tagged CI and the owner's release request. Its draft assets were checked
|
||||
locally before publication:
|
||||
- both player ZIPs pass the SHA-256 and package audits, carry an identical 8,011-file payload, and are stamped with
|
||||
|
||||
@@ -327,6 +327,7 @@ namespace plat
|
||||
{
|
||||
pid_t pid = 0;
|
||||
bool group = false, reaped = false;
|
||||
bool closeAsked = false; // requestClose's SIGTERM: sent once
|
||||
int status = 0;
|
||||
int readFd = -1;
|
||||
std::thread reader;
|
||||
@@ -493,6 +494,7 @@ namespace plat
|
||||
return false;
|
||||
}
|
||||
impl->pid = pid;
|
||||
impl->closeAsked = false;
|
||||
impl->group = captureOutput;
|
||||
if (captureOutput)
|
||||
{
|
||||
@@ -545,8 +547,13 @@ namespace plat
|
||||
|
||||
void Process::requestClose()
|
||||
{
|
||||
if (impl->pid > 0 && !impl->reap())
|
||||
// Once: the game's SDL turns SIGTERM into a quit, then restores the default handlers as it shuts down, so a
|
||||
// second one (a caller asking every frame, as WM_CLOSE may be on Windows) would kill it mid-shutdown (exit 143).
|
||||
if (impl->pid > 0 && !impl->closeAsked && !impl->reap())
|
||||
{
|
||||
impl->closeAsked = true;
|
||||
::kill(impl->pid, SIGTERM);
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
|
||||
+7
-1
@@ -803,6 +803,9 @@ namespace tmb::twod
|
||||
informProgressBar__Ff_0x1fc8d0(rdram, ctx, runtime);
|
||||
if (!on())
|
||||
return;
|
||||
// Without a bar shown (gp - 0x3280 zero) the game's informProgressBar returns at once: nothing drawn either.
|
||||
if (word(rdram, gp + kGpBarShown) == 0u)
|
||||
return;
|
||||
noteGp(gp);
|
||||
g_barGp.store(gp, std::memory_order_relaxed);
|
||||
g_rdram.store(rdram, std::memory_order_relaxed);
|
||||
@@ -1046,7 +1049,10 @@ namespace tmb::twod
|
||||
}
|
||||
setWord(rdram, gp + kGpBarFlip, word(rdram, gp + kGpBarFlip) ^ 1u);
|
||||
setWord(rdram, gp + kGpBarProgress, std::min<uint32_t>(word(rdram, gp + kGpBarProgress) + 1u, 0x400u));
|
||||
loadingBar(rdram, gp);
|
||||
// Still called once a load in a match (a lost level's retry) has ended, with the bar hidden (gp - 0x3280
|
||||
// zero): drawn then, the bar covered the match's frames in red.
|
||||
if (word(rdram, gp + kGpBarShown) != 0u)
|
||||
loadingBar(rdram, gp);
|
||||
ctx->pc = getRegU32(ctx, 31); // jr $ra
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,6 +350,10 @@ namespace tmb::cheats
|
||||
std::fprintf(stderr, "[tmb:cheats] story starts at level %s\n", kLevelNames[start]);
|
||||
}
|
||||
s_lastLevel = static_cast<int32_t>(word(rdram, progress + kStoryLevel));
|
||||
// TMB_PLAYER_LIVES=<n> (testing, story's game over): player 1's lives (InitPlayerLives' + 0x2370) kept at most n.
|
||||
static const int s_lives = [] { const char *v = std::getenv("TMB_PLAYER_LIVES"); return v && *v ? std::atoi(v) : -1; }();
|
||||
if (s_lives >= 0 && static_cast<int32_t>(word(rdram, progress + 0x2370u)) > s_lives)
|
||||
setWord(rdram, progress + 0x2370u, static_cast<uint32_t>(s_lives));
|
||||
}
|
||||
static const bool s_on = std::getenv("TMB_LOG_PROGRESS") != nullptr;
|
||||
if (!s_on)
|
||||
|
||||
@@ -862,6 +862,44 @@ namespace
|
||||
const char *value = std::getenv("TMB_KILL_ENEMIES");
|
||||
return value && *value ? static_cast<uint32_t>(std::atof(value) * 50.0) : 0u;
|
||||
}();
|
||||
// TMB_KILL_PLAYER=<s> (testing, story's lost lives and game over): player 1's car takes the same hit every <s>
|
||||
// seconds.
|
||||
static const uint32_t s_playerInterval = []
|
||||
{
|
||||
const char *value = std::getenv("TMB_KILL_PLAYER");
|
||||
return value && *value ? static_cast<uint32_t>(std::atof(value) * 50.0) : 0u;
|
||||
}();
|
||||
static uint32_t s_playerUpdates = 0;
|
||||
if (s_playerInterval != 0u && g_theGame != 0u && ++s_playerUpdates % s_playerInterval == 0u)
|
||||
{
|
||||
float health = 0.0f;
|
||||
std::memcpy(&health, rdram + ((0x00257B50u + 1012u) & 0x1FFFFFFu), 4);
|
||||
if (health > 0.0f)
|
||||
{
|
||||
rdram[0x00257B50u + 0x475u] = 1u; // takes hits (0 in a story started past the first level)
|
||||
R5900Context call = *ctx;
|
||||
SET_GPR_U32(&call, 4, 0x00257B50u);
|
||||
SET_GPR_U32(&call, 5, 0x00257B50u);
|
||||
SET_GPR_U32(&call, 6, 10000u);
|
||||
// The attacker: the first opponent still alive (the player's own index, 0, does no damage).
|
||||
int32_t count = 0, attacker = 1;
|
||||
std::memcpy(&count, rdram + ((g_theGame + 0x001B3DB4u) & 0x1FFFFFFu), 4);
|
||||
for (int32_t index = 1; index < std::min(count, 64); ++index)
|
||||
{
|
||||
float other = 0.0f;
|
||||
std::memcpy(&other, rdram + ((g_theGame + static_cast<uint32_t>(index) * 0x2D00u + 1012u) & 0x1FFFFFFu), 4);
|
||||
if (other > 0.0f)
|
||||
{
|
||||
attacker = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
SET_GPR_U32(&call, 7, static_cast<uint32_t>(attacker));
|
||||
vehicleTakeHit__7VehicleP8_fvectorii_0x1ad208(rdram, &call, runtime);
|
||||
std::memcpy(&health, rdram + ((0x00257B50u + 1012u) & 0x1FFFFFFu), 4);
|
||||
std::fprintf(stderr, "[tmb:kill] player 1 hit by vehicle %d: health %.0f\n", attacker, health);
|
||||
}
|
||||
}
|
||||
static uint32_t s_updates = 0;
|
||||
if (s_interval == 0u || g_theGame == 0u || ++s_updates % s_interval != 0u)
|
||||
return;
|
||||
|
||||
@@ -266,6 +266,24 @@ class ReleaseTests(unittest.TestCase):
|
||||
archive.writestr('TMB_Recomp_Bozo/source/hidden.dat', b'\x7fELF' + b'\0' * 100)
|
||||
self.assertTrue(any('an ELF file' in error for error in make_release.verify_zip(path)))
|
||||
|
||||
def test_no_bytecode_cache_in_a_release(self):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
stage = Path(folder) / 'stage'
|
||||
(stage / 'source/tools/__pycache__').mkdir(parents=True)
|
||||
(stage / 'source/tools/__pycache__/tmb_build.cpython-314.pyc').write_bytes(b'cache')
|
||||
(stage / 'source/tools/tmb_build.py').write_text('x')
|
||||
make_release.remove_bytecode_caches(str(stage))
|
||||
self.assertFalse((stage / 'source/tools/__pycache__').exists())
|
||||
self.assertTrue((stage / 'source/tools/tmb_build.py').exists())
|
||||
path = Path(folder) / 'cached.zip'
|
||||
with zipfile.ZipFile(path, 'w') as archive:
|
||||
for name in REQUIRED:
|
||||
archive.writestr('TMB_Recomp_Bozo/' + name, b'fixture')
|
||||
archive.writestr('TMB_Recomp_Bozo/source/tools/__pycache__/tmb_build.cpython-314.pyc', b'cache')
|
||||
self.assertTrue(any('bytecode cache' in p for p in make_release.verify_zip(str(path))))
|
||||
tar = self.linux_release(folder, [('source/tools/__pycache__/x.pyc', b'cache')])
|
||||
self.assertTrue(any('bytecode cache' in p for p in make_release.verify_tar(str(tar))))
|
||||
|
||||
def linux_release(self, folder, extra=()):
|
||||
stage = Path(folder) / 'stage'
|
||||
for name in make_release.LINUX_REQUIRED:
|
||||
|
||||
@@ -271,6 +271,15 @@ def parse_ini(path):
|
||||
return out
|
||||
|
||||
|
||||
def remove_bytecode_caches(folder):
|
||||
"""Python's bytecode caches (__pycache__/) a step left in the release folder (importing tmb_build from the
|
||||
exported source writes one): they hold the build machine's paths, and the player's Python makes its own."""
|
||||
for dirpath, dirnames, _files in os.walk(folder):
|
||||
if '__pycache__' in dirnames:
|
||||
rmtree(os.path.join(dirpath, '__pycache__'))
|
||||
dirnames.remove('__pycache__')
|
||||
|
||||
|
||||
def pe_imports_of(path, tools_dir):
|
||||
sys.path.insert(0, tools_dir)
|
||||
try:
|
||||
@@ -805,6 +814,7 @@ class Release:
|
||||
return '_A test build: no changelog entry for %s._' % self.version
|
||||
|
||||
def step_zip(self):
|
||||
remove_bytecode_caches(self.stage)
|
||||
problems = [p for p in audit_tree(self.stage, allow_pe=True)]
|
||||
if problems:
|
||||
raise ReleaseError('the release folder holds what looks like game data:\n ' + '\n '.join(problems[:20]))
|
||||
@@ -1108,6 +1118,7 @@ class LinuxRelease(Release):
|
||||
f.write(manifest)
|
||||
|
||||
def step_tar(self):
|
||||
remove_bytecode_caches(self.stage)
|
||||
problems = audit_tree(self.stage, allow_pe=True)
|
||||
problems = [p for p in problems if not p.startswith(tuple(n + ':' for n in LINUX_PROGRAMS))]
|
||||
if problems:
|
||||
@@ -1246,6 +1257,8 @@ def verify_zip(path, top=TOP):
|
||||
continue
|
||||
if game_name(rel) or (rel.lower().endswith(GAME_EXTENSIONS) and not allowed_extension(rel)):
|
||||
problems.append('%s: named like a file of the game' % n)
|
||||
if rel.startswith('source/') and ('/__pycache__/' in rel or rel.endswith('.pyc')):
|
||||
problems.append('%s: a Python bytecode cache (it holds the build machine paths)' % n)
|
||||
with zf.open(info) as f:
|
||||
head = f.read(0x8006)
|
||||
if head[:4] == b'\x7fELF':
|
||||
@@ -1303,6 +1316,8 @@ def verify_tar(path, top=TOP):
|
||||
continue
|
||||
if game_name(rel) or (rel.lower().endswith(GAME_EXTENSIONS) and not allowed_extension(rel)):
|
||||
problems.append('%s: named like a file of the game' % n)
|
||||
if rel.startswith('source/') and ('/__pycache__/' in rel or rel.endswith('.pyc')):
|
||||
problems.append('%s: a Python bytecode cache (it holds the build machine paths)' % n)
|
||||
head = tf.extractfile(m).read(0x8006)
|
||||
if head[:4] == b'\x7fELF' and rel not in LINUX_PROGRAMS:
|
||||
problems.append('%s: an ELF file' % n)
|
||||
|
||||
Reference in new issue
Block a user