Entry 387
CONVERT carries a part's clear data into the next: the later titles read the previous part's saves on the same card, and ConvGame makes them theirs
This entry answers what was left open by The title screen from DEMO.PRG: boot, logos, menu, and the hand-off to the desktop, The later volumes' title: five items, the previous volume's save, every branch of the opening checked on the four volumes, Mutation's saves, its voices, and the recall's black fades.
Linked from Twenty-two play questions were already answered: the triage's list against the work since.
Files27 in 16 directories
savesys.rscard.rscrates/piney-demo/src/dataload.rscard.rsdialog.rsnewgame.rslib.rsseam.rscrates/piney-demo/examples/demo_probe.rscrates/piney-data/src/save.rspack.rscrates/piney-data/src/tables/title.rscrates/piney-gen/src/manifest.rscrates/piney-event/src/state.rscrates/piney-event/src/vm/mod.rscrates/piney-fieldui/examples/newgame_probe.rsfieldui_probe.rscrates/piney-desktop/examples/desktop_probe.rscrates/piney-game/src/session.rscrates/piney-game/src/session/tests/convert.rsending_save.rstools/test_demo_rs.pytest_save_init_rs.pydocs/engine/title.mddocs/formats/save.mdREADME.mdUNKNOWNS.mdIssue #55 (ThreePendant): Mutation's CONVERT did not see Infection's cleared save. It said "There is no .hack//MUTATION saved data." both with and without a Mutation save on the card, and after the Infection file was pasted into Mutation's folder.
How the game converts
The title's fourth item opens NextDataLoad_Control: Data_Control with
m_PrevFlg 1 (docs/engine/title.md, "CONVERT").
- The index. With the flag,
Slot_Selectand the re-reads callLoadInfoPrevReq(MUT 0x00171b50), notLoadInfoReq. It setsoperate2, which lets the card lack the played disc's own directory. Proccess 4 (MUT 0x00172514) readsmcDirName[volumeNum - 2]'s index intoinfoPrev. On Mutation that is Infection'sBASLUS-20267DOTHACK, on the same card. Without it the message names Infection (0x103b). - The list. Ok takes a record only when its
clearFlagis at leastvolumeNum - 1(LoadDataPrevReq, proccess 7).SetLoadParshows such a save as "Vol.N CLEAR" and any other used one as "No Data Flag". - The load. "Load this data?" (0x8012) yes is proccess 9. It reads
the previous part's slot at its own size (Infection 0x8530, the others
0x8d84), checks the sum against
infoPrevand copies it in member by member, as proccess 8 does. - The carry.
ccThDemothen callsccStartEventConvert(event 100·(volumeNum−1) done) andConvGame.ConvGameresets every character not inpartyMemberFlagtocharTbl, with empty items and skills, then runsLoadGameandInitTradeItemand setsnewGameFlag2. InitInfoclearsinfoPrev's records withinfo's, on every disc.
Cause
None of this was ported.
DataControlignoredm_PrevFlg: CONVERT ran Mutation's own LOAD (LoadInfoReq,operate1). Without a Mutation directory that is 0x103c, the message in the screenshot. With one it listed Mutation's saves, and ok did nothing.SaveSyshad no proccess 4, 7 or 9 and noinfoPrev. The card could read only its own disc's index.Request::ConvGamereached only the session's "title asks" log.
Fix
piney_desktop.MemoryCard::read_index(port, vol)isReadSys's volume argument;FilesCardreads<dir(vol)>/<dir(vol)>.SaveSysgainsinfo_prev,load_info_prev_req,load_data_prev_reqand proccess 4, 7 and 9. Oneread_indexand oneread_dataserve both loads, by volume.prev_volumeclamps as the game does.piney_demo::dataload.load_infopicks the request byprev_flg.Data_Selecttakes a cleared record only, andSetLoadPardraws CONVERT's panel and "No Data Flag" (STR_NOFLG_DETA, a newtitletable entry; data version 23).- The carry.
newgame::conv_gameandstart_event_convert, applied in the title whenMainreturns 4, asload_gameis for 3. The session treatsRequest::ConvGameasLoadGame(settings, volumes, display offset).NewGame's row copy andInitTradeItembecame functions both share. The VM's unused copy ofccStartEventConvertwent, and the done and closed bits arepiney_data::save::EVENT_DONE,EVENT_CLOSED. - Quarantine. Its
MainProccessleaves "Load complete." as 0x1017, not 0x2017 (savesys::load_done). Its recompiledData_Controlplays the cancel sound where a step acts on cancel, not inMain, and acknowledges messages with ok only (dataload::CancelSound). Both touch its LOAD as much as its CONVERT.
The port keeps one card for all four parts (memcard/slot1 in the
port's folder), as the console has one memory card, so nothing about
where saves live changed. The player's own steps: save after
Infection's staff roll into BASLUS-20267DOTHACK, leave it there, and
choose CONVERT on Mutation's title.
Checked
tools/test_demo_rs.py'stest_data_load_prev, new: CONVERT frame by frame against Mutation's, Outbreak's and Quarantine's own code (NextDataLoad_Control::Main_Control,ccSaveSysnative,ccMcardanswered from the card's files by the volume each call names). Cards hold the volume before's saves, cleared or not, with good and bad sums, missing and short files, and with and without the disc's own folder. It compares state, texts, packets, sounds and the whole slot after. The first Mutation run caughtInitInfo'sinfoPrevclear. The first Quarantine run caught 0x1017 and the moved cancel sound.test_data_load(LOAD) now runs on every disc withPINEY_VOLUME(the probe'sloadtakes the disc's volume, the harness the files and the slot with its extension). It passes on all four. The whole harness passes on Infection.test_boot_mem_cardpasses on Quarantine. The probe had not compiled since the title strings becameLazyLocks.tools/test_save_init_rs.py'sConvGameLaterVolumes:ccStartEventConvertandConvGameon six random records and extensions per later disc, party members none, all or some, against the port's, every byte of both.convert_carries_infection_s_clear_data_into_mutation: Mutation from power-on to CONVERT on a card with Infection's saves (one cleared, one not), without and with a Mutation save. The list holds Infection's records, ok on the uncleared one does nothing, and the cleared one carries over. Name, Kite's level, a member's level, the clear flag and play time are kept; a non-member is back tocharTblwith its items emptied; event 100 is done andnewGameFlagis 2. With the oldLoadInfoReqthe test never reaches the list.the_ending_s_save_converts_into_mutation: Infection's event 31 played to its save menus, the clear data saved to an empty card, then Mutation's title on that card. CONVERT lists it as Vol.1 CLEAR and carries the name, level and play time. Mutation's setup runs with its scripts (no name entry), and the desktop plays on the carried name.outbreak_and_quarantine_convert_the_part_before: Mutation's cleared save into Outbreak (event 200) and Outbreak's into Quarantine (event 300).mutation_s_convert_reads_infection_s_saves,later_converts_read_the_whole_slot: the card andSaveSysalone, the 0x103b message, the extension kept or read.- piney-game's suite (four threads), the suites of piney-data,
piney-desktop, piney-demo, piney-event, piney-fieldui and piney-gen,
clippy, fmt,
cairns checkandtools/docs.py checkpass.
nothing new from the console. The tests start from the port's own Infection saves and from the game's code on random cards. A save made on a PS2 and carried by a PS2 has not been compared, which needs a real memory card's Infection clear data and the Mutation slot a console makes from it (PCSX2 would do).