Inform - Support - Patches

About Patches  


DM4 Errata  

Issue C63005     [previous patch]

Backpatch errors in large V8 games
Submitted by: Cedric Knight     Appeared in: Compiler 6.15 or before     Fixed in: Compiler 6.31

If the code size of a V8 game exceeds 256K, backpatching and other strange errors occur. This is a rare occurrence, since strings usually take more space than code, but is made more likely when using Infix debugging.


Backpatch information is stored in 3-byte records when compiling to Z-code, with the address to be patched in bytes 1 and 2, and bits 5-6 of byte 0. This should be fixed by converting to a 4-byte format.


In section (2) of output_file_z()

  +++ files.c Wed Mar 24 18:01:54 2004
  @@ -326,6 +326,10 @@
           if (backpatch_marker >= 0x80) long_flag = FALSE;
           backpatch_marker &= 0x7f;
           offset = offset + (backpatch_marker/32)*0x10000;
  +        while (offset+0x30000 < j) {
  +            offset += 0x40000;
  +            long_flag = !long_flag;
  +        }
           backpatch_marker &= 0x1f;

           while (j<offset)

Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.