diff --git a/tools/ingame/README.md b/tools/ingame/README.md new file mode 100644 index 00000000..bd03a447 --- /dev/null +++ b/tools/ingame/README.md @@ -0,0 +1,104 @@ +# In-game run tools + +One in-game run of a WrongGPU candidate build, with evidence and a byte-for-byte restore. Used for Model L in +Cyberpunk 2077 and Resident Evil Requiem (#89). Windows only, Python 3, no GPU work of their own except +`offline_create.py`. + +Nothing in these tools is specific to one PC. Every path comes from a game config (`run.py --config`) or from +arguments (`offline_create.py`, `make_record.py`). + +## Before a game: the offline create test + +``` +python offline_create.py build --work +python offline_create.py create --work --runtime-dir --model --model-sha [--extra l_post=own] [-- ] +``` + +`create` runs the interop harness once: +- `model=L` and `executor=dx12`; +- 600 frames, 1280x720 to 1920x1080, with a launch trace. + +It passes only if all of these hold: +- the runtime ran on D3D12; +- the timing windows came back; +- Model L kernels appear in the trace. + +Run it before every game run with a new build. + +`timing` measures Model L against Model M on six shapes, interleaved, and writes `l-timing-harness.json`. + +Everything after a lone `--` wraps each GPU run, for example a GPU-slot tool. + +## The game run + +1. Copy `examples/.json` and fill in every ``: + - `game_root`, `exe_dir`, `exe`, `launchers`; + - `out`: an empty folder for this run; + - `launcher_package` and `payload`: from `build.py --model-l`; + - `model`: the file and its SHA-256; + - `aside`: files moved out of the game for the run, then moved back. Never opened, only hashed and renamed; + - `hash_only`: files hashed before and after but never touched, for example a script loader the game needs; + - `settings`: the file, its format (`ini` or `cp2077`) and the keys to set; + - `gpu_flag`: the GPU flag file; + - `disk_free_gb`: minimum free space per drive. + + `%VARIABLES%` are expanded. `exe_dir` is relative to `game_root`. Optional `runtime_options_extra` adds runtime + options to every model choice (e.g. `l_post=own`); `--extra` on `prepare`, `use-m` or `use-l` replaces it for that + choice (`--extra ''` for none), so two variants can run in one session. + +2. Run the phases: + +``` +python run.py --config my.json all --dry-run every phase, nothing changed +python run.py --config my.json preflight +python run.py --config my.json prepare +python run.py --config my.json launch then start the game in its launcher +python run.py --config my.json hold +python run.py --config my.json shot