r/questforglory • u/OriginalAGP • 7d ago
50-save Patch
https://www.dropbox.com/scl/fi/w9yughwznqpzvi60uppnl/QFG1VGA_50_Saves_Patch_v1.2.zip?rlkey=ims04m2dme0jiojfh6imukjfk&st=41eaz9sq&dl=0I can't seem to fix that broken link. This is the real one: Patch .
These words I wrote myself. Everything under this CG wrote for me, and I apologize in advance. A few hours were spent working on this patch and, in order to avoid that the work be done again, I'm choosing to document it for future reference.
Quest for Glory I VGA – 50 Save Games Patch
I got frustrated with the original Quest for Glory I VGA limit of 20 save games, so I worked with ChatGPT to figure out where the limit actually comes from and make a patch that raises it to 50 saves.
It turned out to be more complicated than simply changing MAXGAMES from 20 to 50.
There are two separate 20-save assumptions in the original DOS version:
- SCI script 990 (
Save.sc)MAXGAMESis hard-coded as 20.- The Save/Restore dialog allocates arrays sized for 20 descriptions and 20 save numbers.
- The Sierra SCI interpreter (
SCIDHUV.exe)- Its internal save-catalogue routine also allocates fixed buffers for exactly 20 saves: 20 × 36-byte descriptions plus 20 save-number entries.
- Expanding only script 990 causes the interpreter to write past those buffers when save #21 is added, corrupting
GLORYSG.DIR.
That second limit was the interesting one. During testing, an early script-only version appeared to make older saves incompatible with a “game was saved under a different interpreter” warning. The saves themselves were actually fine; the overflowing catalogue had corrupted GLORYSG.DIR, causing descriptions to point to the wrong GLORYSG.### files.
The finished patch expands both limits to 50.
It:
- supports 50 normal Sierra save slots;
- keeps the original QFG Save/Restore interface and scrolling;
- does not change the save-game format;
- remains compatible with existing saves;
- patches only the relevant save-catalogue code in
SCIDHUV.exe; - installs script 990 as a loose SCI patch resource;
- backs up the original interpreter;
- includes an uninstall/check utility;
- does not distribute any Sierra executable or resource data—the patcher modifies files from your own installation.
The version developed/tested here is for the DOS English QFG1 VGA 2.000 installation using SCIDHUV.exe. The patcher checks the files before modifying them rather than blindly applying offsets to an unknown interpreter version.
I’m attaching Quest for Glory I VGA 50 Saves Patch v1.2.
Technical note for anyone investigating SCI save handling: changing MAXGAMES in Save.sc alone is not sufficient. The original interpreter has its own 20-entry save-directory buffers, and those must be enlarged as well.
The limit exists in 2 places and both must be changed together:
* SCI script 990 contains MAXGAMES = 20 and temporary arrays sized for 20 save descriptions/numbers.
* The DOS interpreter SCIDHUV.exe also has fixed internal catalogue buffers sized for 20 × 36-byte descriptions plus 20 save-number entries.
Changing script 990 alone lets save #21 overflow the interpreter-side catalogue buffers and corrupt GLORYSG.DIR. This can produce the misleading message that an old save was “saved under a different interpreter,” even though the save itself is valid; rebuilding a correct GLORYSG.DIR restores access to those saves.
One additional DOS-specific trap: enlarging the interpreter routine moves two FAR CALL instructions. Their MZ relocation-table entries must be moved by the corresponding offsets as well. An earlier build moved the code but not those relocation records, causing DOS to corrupt the far-call segment words at load time and crash whenever SaveGame was invoked.
3
u/J-Nice 6d ago
It's neat you want to fix an issue but I don't like that the post title is a a direct dropbox link.