diff --git a/docs/architecture.md b/docs/architecture.md index 1e05da88..250c5018 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -301,13 +301,16 @@ keeps per-core data without locks and relies on that, so the host models it (`ru settings (limit, frame time limit, scanline sync, display sync, Reflex sleep, passive wait) once per change. Every orderly exit puts the profile back as it was before the run (`rtss_limit_restore`), and no want reaches it after that. What the profile held is also kept in `rtss-profile.txt` next to the executable, one line per profile, written - before the run's first change of it and removed once it is back: a start that finds a line left by a run that did - not close (a kill, a hang, the device-lost watchdog, a crash or a fatal error, whose ends make no call into RTSS's - library: `rtss_limit_crash`) puts that profile back first (`left_start`), unless the player changed it since; frame + before the run's first change of it, taking each later value before the profile does, and removed once the profile + is back: a start that finds a line left by a run that did not close (a kill, a hang, the device-lost watchdog, a + crash or a fatal error) puts that profile back first (`left_start`), unless the player changed it since; frame generation and low latency, which keep RTSS out, have the hooks library loaded for that one restore, and a start with - `NX2NAVI_RTSS=0` leaves the profile and the line as they are and says so in the log. A file that cannot be - written leaves the run as before, with a line in the log; profiles that versions before the file left with the - game's limit cannot be told from the player's own. + `NX2NAVI_RTSS=0` leaves the profile and the line as they are and says so in the log. A crash and a fatal error + (`rtss_limit_crash`) make no call into RTSS's library while the line is in the file; where the file could not be + written they put the profile back as an orderly exit does, never from RTSS's own thread, which may hold the lock + that takes. A file that cannot be written or read leaves the run as before, with a line in the log, and the lines of + other executables in it as they are; profiles that versions before the file left with the game's limit cannot be + told from the player's own. - Measuring pacing: `NX2NAVI_TRACE=present` logs a line per picture (the host present's interval, the game's present interval, the wait for the slot and how far past it the present went), `NX2NAVI_TRACE=perf` each wait's share of the frame ("bound:"), and `tools/perf_summary.py` condenses both. Both measure before the host present, so a wait RTSS diff --git a/docs/building.md b/docs/building.md index 19facf05..43733aba 100644 --- a/docs/building.md +++ b/docs/building.md @@ -493,13 +493,16 @@ hold (given up after 30 s, a minimised window not counted), no picture going out reasons, a want that must stay two polls and low latency switching at every poll, a movie at 144, 60 and 40, a closed run, a hooks library that does not load, and two limiters. It also checks the pacer's period beside RTSS (`rtss_pace_period`), the limit's rounding without a denominator, and the state file `rtss-profile.txt`: its lines, -its rewrite and what a start does with a line a run that did not close left. Statically, a crash and a fatal error +its rewrite and what a start does with a line a run that did not close left, the value written before the newest one +included. Statically, a crash and a fatal error (`main.c` `crash_handler`, `dispatch.c` `fatal_end`) go through `rtss_limit_crash`. On Windows it also builds the real `rtss_limit.c` against a fake RTSS (its registry key, hooks library, profile files and shared memory) and runs each scenario in a process of its own, among them a want after the exit's restore and one the worker read before it, a worker polling without pause while the want switches, the registry and file calls a present must not make, and a run killed while RTSS held its limit followed by the next start, each in a process of its own (a next start with a limit, -with frame generation on and with `NX2NAVI_RTSS=0`). No GPU, no RTSS, no game files. +with frame generation on and with `NX2NAVI_RTSS=0`, and a run killed inside the save of its second limit), put backs +that do not land, a state file that does not read, and a crash on RTSS's own thread with no line in the file. No GPU, +no RTSS, no game files. A change to how the mixer applies volumes (`runtime/audio_mixer.c` `accumulate_ramp`, the voice and splitter paths of `audio_mixer_render`) or to what it owes the device after a stall (`ring_pull`, `audio_mixer_owed`) passes