Infidel goes wild
Andrew Plotkin discovers a severe compiler and memory-corruption bug in Infocom's 1983 text adventure Infidel where dropping items in the desert overwrites low-memory text compression tables.
read it The detailed postmortem of a 40-year-old compiler bug and its memory-corruption mechanics offers a fascinating look at vintage game internals.
summary
Andrew Plotkin investigates an obscure routine in Infocom's 1983 text adventure Infidel that tracks objects dropped in the desert. He discovers that a compiler flaw in the ZIL language incorrectly treats a table's global variable index as a constant address, causing the game to overwrite memory starting at address 30. This corruption mangles the Z-machine's text compression abbreviations table when players drop enough items, leading to bizarre text hallucinations or interpreter crashes.
key points
- The DESERT-TO-TABLE routine in Infidel used a default argument that evaluated to a global variable index rather than the actual memory address.
- Writing to these low memory addresses unintentionally corrupted the Z-machine's text compression abbreviations table.
- Because dropping multiple items in the endless desert is rare and items frequently vanish randomly, players and playtesters never noticed the bug.
who should read it
Retro game developers, compiler enthusiasts, and fans of interactive fiction internals.
discussion positive
Let every 1980s game programmer who never shipped a memory-trashing bug raise their hand.
I thought so! :-)
It humorously highlights that memory-corruption bugs are a universal rite of passage for programmers.
Generated by an LLM from the article and thread. Check the sources before relying on it.