more docs

This commit is contained in:
Maddo 2026-04-05 09:55:21 +02:00
commit a70ec15899
21 changed files with 1357 additions and 25 deletions

View file

@ -151,14 +151,76 @@ What is now materially tighter:
- it uses the token as the `path` component to `Filespec_GetFullPath`
- it uses the mutable filename template at `1478:07a0`, which is `eusecode.flx`, as the fixed `filename` component
- it forces that template's first byte to `'e'` before the existence probe and final load call
- the path builder uses DOS-style backslashes via the literal `"\\"` string from `FILE\\FILESPEC.C`
- the existence probe goes through the DOS file-search path in `File_Exists`, so the override must resolve inside the game's DOS-visible filesystem
- the parser copies the token into the `0x1e`-byte buffer at `1478:065a`, so the practical maximum is `29` visible characters plus the terminator
So the safest current retail read is:
- `-u <arg>` expects a directory/resource-root style path argument for the standard `eusecode.flx` archive family
- it does **not** currently look like a free-form arbitrary filename override
- the safest token spelling uses DOS-style backslashes, not forward slashes
That gives a direct explanation for failed attempts like:
- `-u USECODE/FLICTEST.FLX`
- `-u FLICTEST.FLX`
- `-u C:\MADDOCODE` when that path only exists on the Windows host and not inside the guest DOS drive mapping
Those forms fit the recovered helper badly because the token is used as the `Filespec_GetFullPath` path component while the filename remains the fixed template `eusecode.flx`. Current safest interpretation is therefore:
- pass a directory or resource-root to `-u`
- put the replacement archive at `<that root>/EUSECODE.FLX`
- do not expect `-u` to open `FLICTEST.FLX` directly as the final archive name
The current safest syntax examples are:
- `-u MADDOCODE`
- `-u .\MADDOCODE`
- `-u \MADDOCODE`
- `-u C:\MADDOCODE`
But for real DOS-facing installs, the safer practical examples are the `8.3`-safe variants:
- `-u MADDOC~1`
- `-u .\MADDOC~1`
with these current best path interpretations:
- `MADDOCODE` = relative to the game's current DOS working directory
- `.\MADDOCODE` = explicit relative DOS path
- `\MADDOCODE` = root-relative path on the current DOS drive
- `C:\MADDOCODE` = absolute DOS path on drive `C:` as seen by the DOS game, not automatically the Windows host path
In the current GOG install used for this investigation, Windows reports the short alias:
- `MADDOCODE` -> `MADDOC~1`
That makes `MADDOC~1` the highest-probability next token for this specific setup.
Current safest negative guidance:
- avoid forward slashes for `-u`
- avoid long path tokens because silent truncation at `1478:065a` can change the real lookup target
- do not use the archive filename itself as the `-u` argument
- prefer `8.3`-safe directory names or explicit DOS short aliases when testing under DOSBox-like environments
But the important uncertainty is now only `exact naming rules`, not `whether the switch is real`. In the regular non-Japanese `CRUSADER.EXE`, the switch is clearly still live.
## Expected Console Output For `-u`
Current best answer: probably none.
The recovered `-u` parser case does not print a banner, and the startup helper that probes and swaps the override path also has no recovered `ConsolePrintf` call. So unlike `-debug`, `-warp`, `-skill`, `-mapoff`, `-egg`, or `-demo`, `-u` does not currently appear to advertise itself on the console before the game loads.
The safest current expectation is:
- success: no dedicated `-u` console message
- missing path/file: no dedicated `-u` console message, likely silent fallback to stock usecode
- malformed but existing replacement: no dedicated `-u` status line from the parser/helper path; later behavior depends on the deeper loader/runtime path
This also sharpens the practical diagnosis for the current `MADDOCODE` setup. In the tested GOG install, only `EUSECODE.FLX` differs between `USECODE` and `MADDOCODE`; the sidecar files are byte-identical. So if replacing `USECODE\EUSECODE.FLX` with the hacked file produces the expected obvious no-usecode-style breakage, but `-u MADDOCODE` behaves like stock gameplay instead, the strongest current read is that the override path was probably not accepted and startup silently fell back to the stock usecode root.
This also aligns with the already-stronger JP Win32 result, where the matching `-u` lane was recovered as the same kind of usecode override.
For the deeper runtime-side investigation of whether `-u` replaces or augments the stock usecode root, and what game systems that replacement feeds, see [docs/usecode-startup-override.md](docs/usecode-startup-override.md).