Entry 398
Every town's ranch plays the breeder's tune: bgmBreed reads each town's breeder after the load that clears its place, and the later volumes' crisis rows are six on
Documented in Sound - effects, music and the IOP sound driver.
Files18 in 6 directories
driver.rslib.rscrates/piney-audio/tests/driver.rsdriver_fixture.txtdriver_fixture_mut.txtdriver_fixture_out.txtdriver_fixture_qua.txthsyn.rsrender.rsstream.rscrates/piney-game/src/world.rssession.rscrates/piney-game/src/session/tests/ranch_music.rssurvey.rsskeith.rsparty_leave.rstools/sound_ee.pydocs/engine/sound.mdIssue #62 (build 4cce396): in Mutation, Carmina Gadelica's Grunty ranch played the town's theme, not the ranch's.
What the game does
-
ccSoundMainrunsbgmBreedeach frame whileccSnd +0x105is 3: any town but Mac Anu. It is the same on all four volumes (MUT main 0x0017eda0).- Once (
+0x114), it copies the town file'sDMY_merchant6to+0x120. Every town stands its breeder at that dummy. - Within 1000 of it, sequence 0 fades out and sequence 1 (the ranch's tune) fades in. Beyond 1200, the reverse.
- From Mutation on it does nothing while
+0x13a(the Flag Race) is set. Outbreak's and Quarantine's fades go through a helper (OUT 0x0017bde0); the steps are the same.
- Once (
-
ccSndSQLoadzeroesfree[4](+0x108-+0x114) in two places:- a town other than Mac Anu (INF 0x00182448);
- area 15's event bank (0x00182528).
No other load touches them. So
bgmBreedreads each town's own breeder. Every town's bank but Mac Anu's has the ranch's tune as sequence 1.
Cause
- The port latched the breeder's place once a session (
Driver::breederwas never cleared). From the second town on, the tune listened at the first town's breeder. A player who had been to Dun Loireag heard the town's theme at Carmina Gadelica's ranch. - The driver cleared
+0x108on every load and+0x10cand+0x114on none.
Found on the way
The driver fixture made again on the later executables turned up these:
-
The crisis rows. From Mutation on
sqDataTown's crisis rows are 6 on, not 5 (MUT 0x00185c08):- row 5 is empty;
- rows 6-9 are Infection's 5-8;
- Lia Fail's crisis row is an eleventh row past the symbol's ten.
Outbreak's and Quarantine's new games start in the crisis. The port loaded row
town + 5there:- Mac Anu got the empty row and was silent;
- Dun Loireag got Mac Anu's crisis bank, with no ranch's tune.
-
Empty sound effects. From Mutation on
ccSeOnandccSeOnNotesend nothing for a row whose program is below 0 (MUT 0x0017c310, 0x0017c3f4). These are rows 233 and 234. The port sent program 127. -
The desktop's music. From Outbreak on, the desktop case of
ccSndBgmCtrlstarts sequence 1 fordtBgm47 too (OUT 0x0017dca8). -
The race's hold. Every town's load clears
+0x13a(MUT 0x00185cb0). The port cleared it only at the race's end.
Fix
SqContext::Town { town, crisis }: the row istown_row(volume, town, crisis), sopicktakes the volume.Pick::clears_sceneis set for a town other than Mac Anu and for area 15.sq_loadthen clearsscene_bgm,church_blockandbreeder, and clears nothing on other loads. Every town's load ends the race's hold.Driver::se_onandse_noteare methods; they check the program from Mutation on.bgm_plantakes the volume, anddesktop_secondgives row 47.
Checked
-
Against the game's code. tools/sound_ee.py gained the scene sounds:
- steps
breeder,kite,cameraandblock; scene, which isccSoundMain's dispatch tobgmChurchandbgmBreed;- test_anim's VU0 machine, for
ccGetDist.
Six new scenarios run the ranch near and far, two towns in a row, Mac Anu and a field between them, and the church with and without the ranch's tune before it.
The fixture is now made on each executable:
driver_fixture.txt,driver_fixture_mut.txt,_outand_qua. Each has 237 sound effects, 30 notes, 51 desktops, 6 volumes, 10 jukebox changes and 376 sequences. The driver matches all four on their own discs. Before the fix the two-town scenarios failed on every volume. - steps
-
Played. In piney-game,
every_ranch_plays_the_breeders_tuneroutes every frame's events from the session's start throughcrate::handleinto a headless engine. On Mutation, and on Outbreak and Quarantine in the crisis, Kite logs in to Dun Loireag. The console'stown Ntakes him to Carmina Gadelica, Fort Ouph, Lia Fail and back to Dun Loireag.- In each town he walks round the walls to the ranch (survey.rs's
planner, now
path_widewith aLook). - At each ranch sequence 1 must play and sequence 0 be off.
- Before the fix it failed at Mutation's Carmina Gadelica (
[true, false, false]). With the crisis rows 5 on, it failed at Outbreak's Dun Loireag.
- In each town he walks round the walls to the ranch (survey.rs's
planner, now
-
piney-audio's tests, piney-game's suite (four threads), clippy, fmt,
cairns checkandtools/docs.py checkpass.
Still unknown: nothing.