Add build scripts, documentation, and smooth camera analysis for ScummVM's Ultima VIII engine

- Introduced `build-scummvm.ps1` and `run-scummvm.ps1` scripts for building and running the ScummVM project with MSVC.
- Created `phase-0-evidence-compatibility-gate.md` to outline the evidence and compatibility gate for the Crusader project.
- Added `smooth-camera-analysis.md` detailing the proposed smooth camera behavior and regression checks.
- Documented the Visual Studio build process in `visual-studio-build.md`, including prerequisites and steps for generating the Ultima solution.
- Updated `startup-map-patch-file.md` to clarify the behavior of the fixed-map and glob archives in the GOG installation.
This commit is contained in:
Marco 2026-10-09 16:59:29 +02:00
commit 3b2561b053
10 changed files with 967 additions and 0 deletions

View file

@ -53,6 +53,27 @@ The nearby fixed-data loader path now closes this pretty tightly.
That means the printed line is specifically about an alternate fixed-map archive, not a config file, not a save file, and not a usecode package.
## Normal Archive And Current GOG Install
The base and patch paths use the same filename under different DOS roots.
In the live Remorse image:
- `g_pCDLetter` points to the string `d:`
- `g_fixedDatFilenamePtr` points to `fixed.dat`
- `FixedDat_LoadData()` calls `Filespec_GetFullPath("d:", "static", "fixed.dat", 0)`
- the normal archive is therefore `D:\STATIC\FIXED.DAT`
- the optional patch check is the literal relative path `static\fixed.dat`
The current GOG DOSBox configuration makes those paths distinct. Its `autoexec` mounts `F:\Apps\Crusader No Remorse` as DOS `C:`, mounts `GAME.GOG` as ISO drive `D:`, switches to `C:`, and launches `CRUSADER.EXE`. For this launch:
- base archive: `D:\STATIC\FIXED.DAT` inside `GAME.GOG`
- optional patch: `C:\STATIC\FIXED.DAT` in the installed game directory
Both files are present in the current install. The ISO contains a 3,734,592-byte `STATIC\FIXED.DAT`; the local `STATIC\FIXED.DAT` is 3,735,392 bytes. Their different sizes establish that the local file is not a byte-for-byte copy of the ISO archive. The local file makes the optional patch path exist, so this launch takes the patch-file branch.
The `D:` archive is the original map data shipped on the game disc. GOG ships the game with the later published floppy patch already applied in the local `C:\STATIC\FIXED.DAT`, including its map fixes. The GOG install therefore contains both versions: the original archive remains in `GAME.GOG`, while the patched copy is present from installation and selected through the executable's optional patch path. The files' different sizes are consistent with that history.
## What It Does At Runtime
The strongest currently recovered consumer is the fixed-map load path in the same item-cache family.
@ -77,6 +98,14 @@ Current safest interpretation:
Current evidence does **not** show a merge path.
### Map Entry Present Only In The Patch
`ItemCache_LoadMapFromActiveFixedDat()` selects the patch handle before reading the requested map entry. It does not first require that the map exist in the base archive. Therefore a valid patch entry at the requested map index can supply a map absent from the base archive, provided the base archive file itself is present. Once the patch handle is selected, missing entries are not read from the base archive.
### Patch File Present, Base Archive Missing
The base archive is opened first, before `ItemCache_InitAndLoadFixedDat()` checks for the relative patch file. `FixedDat_LoadData()` passes the resolved `D:\STATIC\FIXED.DAT` path to the fixed archive loader in read mode. That loader checks the file and routes a missing read-mode file into an assertion/error path, including an `INT3`, rather than treating the patch as a replacement for the missing base. The patch-only case is therefore not a supported fallback. This conclusion is from the live code path, not a runtime test with the ISO archive removed.
What is directly recovered:
- the game keeps two archive handles: base `DAT_1478_1060` and optional patch `DAT_1478_1064`
@ -120,6 +149,14 @@ It is also **not** currently evidenced as a merge-style overlay:
So the safest current wording is `replacement-preferred alternate FIXED.DAT source`, not `per-entry patch merge`.
## GLOB.FLX
Globs use a separate normal asset loader, not the fixed-map patch handle.
`ItemGlob_LoadData()` at `1098:0000` builds a path with `Filespec_GetFullPath(0, "static", g_globFlxFilenamePtr, 0)` and loads it through the Flex loader in read mode. `ItemGlob_Init()` initializes the glob cache through `ItemGlob_AllocAndInit()`. This path does not pass the explicit `D:` root used for base `FIXED.DAT`, and the startup code has no second glob handle or optional glob-patch existence check.
The current DOSBox launch starts from `C:` and the install has `C:\STATIC\GLOB.FLX`; the ISO also contains `D:\STATIC\GLOB.FLX`. Their sizes are 264,974 and 264,884 bytes respectively, so the local and ISO copies differ in length. The glob loader uses the normal/default Filespec path rather than the fixed archive's explicit `D:` path. In this setup the local `C:\STATIC\GLOB.FLX` is the expected source; there is no recovered merge or sidecar-patch mechanism for globs. Modifying that resolved local file is replacement at the normal asset path, not an additive overlay.
## Practical Meaning
When retail No Remorse prints `Using map patch file.` at startup, it means:
@ -132,6 +169,9 @@ In plain terms: the executable is telling you it found a replacement/patch copy
## Evidence Summary
- `1220:0070 Fastflex_1220_0070` checks the base file in read mode and enters an assertion/`INT3` path if it is absent
- `1098:0000 ItemGlob_LoadData` loads the ordinary `GLOB.FLX` through the default `static` Filespec path; no glob patch handle was recovered
- the current GOG DOSBox config mounts the install as `C:` and `GAME.GOG` as ISO `D:`; both `FIXED.DAT` and `GLOB.FLX` exist on each drive with different file sizes
- `1048:039b Init_Everything` checks `File_Exists("static\\fixed.dat")` and prints `1478:09cc` only on success
- `10a8:163a ItemCache_InitAndLoadFixedDat` loads base `fixed.dat` plus optional `static\\fixed.dat`
- `10b8:0616 FixedDat_LoadData` resolves the standard `fixed.dat` path from `g_fixedDatFilenamePtr`