Repository navigation
Conversation
The adjustable user clock had no snapshot entry, so a game that calls ClockSnapshot::CreateWithAdjustableSystemClock read through the SDK's time-service session, which the host never makes, into a null. The new entry fills the snapshot the way the standard one does (h_time_Snapshot) and sets the type byte at +0xcd: 1 for the standard clock, 2 for the adjustable one, which CalculateSpanBetween and the user-difference check read to tell the two clocks apart. With LNPANDY/NX2Apple#24 this got Tomodachi Life: Living the Dream to boot (reported there). t_time checks that the entry writes exactly the 0xd0 bytes of a ClockSnapshot (guard bytes either side), the calendar under DM_FIXED_TIME to the second, and that a change of type alone does not read as a user clock change: 24 checks, 0 failed. From LNPANDY/NX2Apple#26 (m1guelpf), as LNPANDY reviewed and merged it there (1f15ad6, which moved DM_FIXED_TIME before the first snapshot: h_time_GetCurrentTime reads it once).
Add the missing adjustable-clock snapshot takeover and set the SDK type byte for both snapshot variants. Both clocks already use host time, so the new entry shares the existing snapshot fill path without game gates. Verify the session access and type values in the original SDK, extend the contributed buffer/calendar tests to 28 checks, and document the ABI and gameplay validation limits. Correct the comment claiming the current host snapshot arithmetic inspects the type byte. The full host and Metal test targets and 379 Python tool tests passed (16 skipped). The final main-based clock and documentation checks pass. Odyssey's quick comparison was inconclusive: both runs missed the frame target, the candidate screenshot was missing and sampled FPS fell. No new shader failures, interface changes or red-log kinds were found. Tomodachi gameplay and a full gameplay regression remain untested. Co-authored-by: v0lumehi <aljic.zijad@gmail.com> Co-authored-by: Miguel Piedrafita <github@miguel.build>
|
Landed on The missing HLE registration was reproduced by running the contributed test against the original host. The original Tears of the Kingdom SDK confirms that both snapshot entries read the time-service session and pass type 1 for standard snapshots and 2 for adjustable snapshots. The fix applies to every caller of these SDK APIs, with no game-specific runtime conditions. Both entries share the existing host-clock snapshot fill path. One comment correction: the current host implementations of Validation:
Only Super Mario Odyssey was selected for a narrow shared-host regression check. It has no snapshot imports or snapshot fixups, and the new registration is unreferenced there; four additional unrelated routes would not exercise the changed APIs. Its quick result below is inconclusive, not a passing gameplay check: both revisions missed the route's frame target, the candidate screenshot was missing, and sampled FPS fell. Both logs contain focus changes. Shader/interface checks found no changes or new failures, and there were no new red-log kinds. Other game routes are unchecked. The full Odyssey attempt was stopped during its 32,864-pipeline prebuild, so no full gameplay regression is claimed. Odyssey quick regression report (earlier patch validation against c589ded)regress.py check (quick): NEW-FAILBaseline
SUPER MARIO ODYSSEY
|
Add the missing adjustable-clock snapshot takeover and set the SDK type byte for both snapshot variants. Both clocks already use host time, so the new entry shares the existing snapshot fill path without game gates. Verify the session access and type values in the original SDK, extend the contributed buffer/calendar tests to 28 checks, and document the ABI and gameplay validation limits. Correct the comment claiming the current host snapshot arithmetic inspects the type byte. The full host and Metal test targets and 379 Python tool tests passed (16 skipped). The final main-based clock and documentation checks pass. Odyssey's quick comparison was inconclusive: both runs missed the frame target, the candidate screenshot was missing and sampled FPS fell. No new shader failures, interface changes or red-log kinds were found. Tomodachi gameplay and a full gameplay regression remain untested. Co-authored-by: v0lumehi <aljic.zijad@gmail.com> Co-authored-by: Miguel Piedrafita <github@miguel.build>
ClockSnapshot::CreateWithAdjustableSystemClockhad no HLE entry. A game that snapshots the adjustable user clock went through the SDK's time-service session, which the host never makes, and read a null.Change
_ZN2nn4time13ClockSnapshot31CreateWithAdjustableSystemClockEPS1_reusesh_time_Snapshot, the standard snapshot's fill path, so both snapshots carry the same context, calendar, steady time point and location name.+0xcdis set: 1 for the standard clock, 2 for the adjustable one.CalculateSpanBetweenand the user-difference check read it to tell the two clocks apart. Before, the standard snapshot left it at 0 from thememset.This sits beside the existing
AdjustableUserSystemClock::GetCurrentTimetake-over and does not change it. #20 coveredAdjust/GetCurrentTime, not the snapshot.Tests
dm/host/tests/t_time.c:ClockSnapshot, with guard bytes on both sides.DM_FIXED_TIMEis right to the second.make -C dm/host/tests GAME=010015100B514000 build/t_timegivestime: 24 checks, 0 failedon this base (75065df).Context
This is m1guelpf's fix from LNPANDY/NX2Apple#26, kept with them as the author, in the form LNPANDY reviewed and landed it there (
DM_FIXED_TIMEis set before the first snapshot, becauseh_time_GetCurrentTimereads it once). Together with LNPANDY/NX2Apple#24 it got Tomodachi Life: Living the Dream to boot. Until it is here, the fork has to holdhle_time.cback from its upstream sync (LNPANDY/NX2Apple#29). Once it lands, the file comes back with the sync.