Reference ยท Engine
Quarantine's field staff roll - STFROLL_VOL4
This page names 1 thing it does not know yet - see what.
Linked from The Quarantine DVD, The ALTIMIT desktop, The story maps - EVENTAREA01 (area 13), EVENTAREA02 (area 15), EVENTAREA03 (area 43), EVENTAREA04-06 (areas 66, 67, 91), EVENTAREA07 (area 16), EVENTAREAB0 (the boss arenas) and EVENTAREAB8 (Kyvia's disc), Event scripts, Sound - effects, music and the IOP sound driver, #465 Quarantine's field staff roll: STFROLL_VOL4 ported and checked frame by frame against the game's code, drawn on sysLayer, its music alone over field 126's empty event bank.
Covers31 in 3 groups
QUA SLUS_205.64:0x001c52e8 event opcode 169 (ending_kanji)QUA gcmn.prg:0x004f0a30 the roll's start0x004f0950 its thread0x004f0aa0 the object's constructor0x004f0d40 Init0x004f1880 main0x004f2f40 the scroll0x004f2fe0 the logo's fade0x004f31b0 the text and logo draw0x004f3370 the states0x004f1cb0 the animations' transparency0x004f2620 the animations' draw0x004f1d80 the generators0x004f2aa0 the phases0x004f1920 the late comets0x004f1ae0 the comets' frame0x004f12a0 a comet's path0x004f3ad0 a comet's step0x004f3d50 the Catmull-Rom point0x004f3990 a comet's generators ended0x004f3710 a line pushed0x004f36b0 a line dropped0x004f3890 the comet's constructor0x004f37f0 a comet's point0x005cee00 the generator rows0x005cf000 the particle rows0x005cf160 0x005cf180 0x005cf1a0 the comets' random ranges0x005cf1c0 the credits0x005cfc20 the last pageQUA SLUS_205.64:0x002095a0 sqDataEvent row 1260x0020a190 eventPlayTypeQuarantine's ending (event 314 "Ending") has one staff roll, its own,
not the desktop's: block 3 in field 126, Kite hidden, runs
ending_kanji (event opcode 169, which only Quarantine's executable
has). That starts STFROLL_VOL4, a thread in gcmn.prg with no symbol.
It draws the hacking logos, the credits as ccKanji lines, the ending
scene's ring and book, and particle comets, over the field's black. The
event's last block, back on the desktop, runs staff_roll, but
Quarantine's case 147 starts no desktop roll: it grants wallpapers 77-86
and opens the save menu (desktop.md).
The port is in four places:
crates/piney-effect/src/stfroll.rsholds the object's rules.piney_data::tables::stfrollholds its tables, generated by piney-gen'sstfrollgroup.AreaFx::ending(crates/piney-game/src/fx.rs) runs and draws it on the field's effect tasks.Wait::EndingKanji(piney-event) andEvHoststart and wait for it.
ending_kanji (opcode 169)
QUA main 0x001c52e8 (events.md, the Quarantine disc):
- It sets
game.pauseFlag(+0x7c) to 1, which keepsccThMother's pause for a pulled controller off untilccGame::Init(it is never cleared before), as in the port (overview.md, "The pause"). It puts the player (plw+0x20) at (0, 0, 0, 1). - It reads
KFED.BINandKFAED.BIN, which nothing reads, and frees them at the end. - It adds
ending.ccs(ccLoadFLAdd(0x00219340)). - gcmn 0x004f0a30 starts the thread 0x004f0950 at priority 66 with a 0x1000 stack. The call then breathes until the thread's tscb +0x14 is set.
The thread runs in this order:
- It names itself
STFROLL_VOL4. - It makes the 0x150-byte object, clearing the first nine words, and calls the constructor (0x004f0aa0).
- It sets the tscb's +0x40 to 0x004f0730 and calls
Init(0). - Each frame it breathes once and runs main (0x004f1880), until +0x108 (done) is set.
- It then sets the tscb's +0x14 and breathes forever. Main no longer runs, so nothing is drawn.
The object
| offset | field |
|---|---|
| +0x00, +0x0c, +0x18 | three vectors: the shown lines (pointers into the credit rows), the comets, freed comets' iterators |
| +0x24 | the last comet |
| +0x28 | the scroll, -0.55 a frame |
| +0x2c | a logo's hold (240) |
| +0x30, +0x34 | the book's wait; the book drawn |
| +0x38 | the logo (ccMask) |
| +0x3c, +0x40 | layers 100 and 129 (the text's, sysLayer's view) |
| +0x44 | 17 ccKanji (0xe8 each): Init(3, 16), type 4 (large fixed), sprite colour row 7 |
| +0x48 | ccAnm[2]: ANM_ring_anm_2 and ANM_book_anm2 of ending |
| +0x50, +0x60 | the camera's view and eye (0, -350, 0, 1) |
| +0x70, +0x80 | the ring's position (0, -50, 75, 1) and turn |
| +0xd0, +0xd4 | the two glow generators |
| +0x100, +0x108 | the next row; done |
| +0x10c, +0x110 | the line spacing, 20 and 5 |
| +0x114 | the table's end is in |
| +0x118, +0x11c | the state (0-3) and the animations' phase (1-5) |
| +0x120, +0x124 | the logo's fade a frame (0.025, negated at each turn) and its transparency |
| +0x128 | the phase's frame count |
| +0x12c-+0x134 | the late comets' timer, count and limit |
| +0x138, +0x13c, +0x140 | the ring's clip over; the last logo's wait (180); the tail (480) |
A frame
Main calls, in order:
- 0x004f2f40 moves the lines up.
- 0x004f2fe0 fades the logo.
- 0x004f31b0 draws the 17 lines (state 1), or else the logo.
- 0x004f3370 runs the states.
- 0x004f1cb0 sets the animations' transparency.
- 0x004f2620 draws them.
- 0x004f1d80 makes the phase's generators and comets.
- 0x004f2aa0 ends phases.
- 0x004f1920 makes the late comets.
- 0x004f1ae0 moves the comets and frees the done ones.
The states:
- 0:
TEX_hackrogo(".hack Quarantine") fades in by 0.025 a frame, holds 240 frames and fades out. ThenInit(1)runs:ccBgmPlay(2), state 1, phase 1, the tail 480, and the next logoTEX_hackrogo_2. - 1: the credits scroll up 0.55 a frame. A line above -20 leaves the
front of the list, and the next row goes on 25 below the last. The
table's end row (text NULL) going above 0 runs
Init(2): state 2, the last page's first row. - 2: the last page shows logo by logo.
TEX_hackrogo_2(Project .hack) fades in, holds and fades out. ThenTEX_hack_urlshows after a 180-frame wait. With the page's end in,Init(3): state 3.
The animations' phases:
- 1: the ring, 25 steps a frame, and its comets.
- 2: once its clip is over and its comets are done, the ring fades out.
- 3: the glows are killed and the book comes up, with its standing generators and comet.
- 4-5: once the book is drawn, the last comet.
Phase 5 ends once every comet is done and the tail of 480 frames has
run out. ccBgmStop then stops the music and sets done.
The comets are 0x80-byte objects (constructor 0x004f3890). Each
follows a Catmull-Rom path (0x004f3d50) through four points, drawn by
0x004f12a0 from the random ranges at 0x005cf160-0x005cf1a0. Their main
generator, and some subordinate ones, sync to the comet's +0x70. The
generator rows (0x005cee00) and particle rows (0x005cf000) are
piney_data::tables::stfroll's gens and ffs.
In the port's run of Quarantine's data:
| roll frame | event |
|---|---|
| 1-319 | the first logo |
| 320 | ccBgmPlay(2); the credits, the ring and the glows begin |
| 8002 | the first comet |
| 9657, 9658 | the ring's clip over; the book |
| 10416, 10417 | the book's last phases, the last comet |
| 11047 | the credits out; state 2 (Project .hack, then the URL) |
| 11742 | ccBgmStop, done |
Where it draws
-
The text. The 17 kanji draw on the roll's own layer 129. The layer takes sysLayer's view,
ccLayer::Init'sSetFrame(0, 0, 512, 384, 256, 192, 1, 1), so it is not centred. -
The logo. It is a
ccMasksprite on sysLayer (priority 0), the whole 512 by 384 frame. -
The ring and book. They draw through
ccAnm::Drawon the layerccLayer::activenames. In the ending that is sysLayer, for this reason:- Each frame
WORLD_MAN::SetActiveLayer(0)makes sysLayer active. ccLattice::Disp's path with nothing to draw (head == tail) stores its caller's stale$s0back intoccLayer::active.- Kite's
ArmsEffect(with a weapon that has no arms effect) would store -1 there. It is skipped for acts 12, 13, 14 and 24, andpc_act 0 6has put Kite in act 14.
So the anms draw on sysLayer with the camera the roll asked for (
changeCamera(3), eye and view). - Each frame
-
Lighting. None of
ending's 82 models hasmtypebit 0, so no light touches them. -
The pages.
ANM_book_anm2drawsMDL_xdhdpag_a0three times (its own entry and the ExtObj copiesOBJ_xdhdpag_dand_e) andMDL_xdhdpag_b0twice (with_f).- Each entry's Obj2 chunk names its own morpher (
MPH_xdhdpag_a0,_d,_e,_f), andDecode_ExtObj(INF 0x0014cb80) keeps it on the copy. - So
ccModel::Drawbends each page by its own weights, and the pages turn one after another. - The port once drew one page per model, morphed by every morpher of that model summed. The page went through the book (#75).
piney_world::town::object_morphnow takes the entry's modifier. Onlyendingand thefield_itowers have two morphers on one base model, on every disc.
- Each entry's Obj2 chunk names its own morpher (
The music
ccBgmPlay(2) streams VOICE/BGM.BIN track 2 from the roll's frame 320
to its end, and ccBgmStop ends it.
Field 126 asks ccSndSQLoad(5), the event bank, with row game.field
126. Quarantine's sqDataEvent runs to 127 rows, and row 126 is empty
(-1). eventPlayType[126] is 3. So no bank loads and no sequence plays:
the roll's music plays alone. sqVolTblEvent has only 126 rows, but an
empty row never reads its volumes.
How it was checked
- The rules, against the game's code.
tools/test_stfroll_rs.pyruns the game's own constructor,Initand main in eemu over 12000 frames, withending.ccsloaded and a stand-ingenrand. It compares every frame againstcrates/piney-effect/examples/stfroll_probe.rs: the object's fields, its vectors, the animations, the lines, the comets, the generators, the draw calls (kanji, mask, anm with its matrix) and the music and camera calls. All frames agree. - The whole event.
session::tests::ending::event_314_plays_through_field_126plays event 314 from its start under the pilot. The roll runs 11742 frames and the event ends.the_field_staff_roll_plays_alonehears the event throughcrate::handle. No sequence plays at any frame of the roll, and track 2 streams from frame 320 to 11742.staff_roll_shots(ignored) writes the main beats as PNGs.
- The music data.
piney-audio'sfield_126_has_no_bankchecks the bank row. - The active layer. It was found with piney-eemu's
ee_run(EE_PRINTprints each call with the active layer) over a save before 314's field part, withEE_THENstarting the roll by a stub task.
Unknown
- The pixels have not been compared with the game's output: piney-eemu draws nothing.
How this was found out
- #465 Quarantine's field staff roll: STFROLL_VOL4 ported and checked frame by frame against the game's code, drawn on sysLayer, its music alone over field 126's empty event bank24 Oct 2026
- #507 Quarantine's ending is the game's: the desktop set-up waits out event 314's streams at rate 2, its staff_roll grants wallpapers instead of a roll, and the book's pages bend by their own morphers29 Oct 2026