Roger Firth's IF pages | ![]() |
InfLight -- Inform debugging | ![]() |
![]() |
Before we look at what we can discover while running a game, we should mention other techniques for examining Inform files from the outside.
Part of the Ztools package, infodump reads a compiled Inform program file and reports on the contents of its low memory -- the various data tables such as the header, the globals and the dictionary. Like the compiler, it's not a Windows application, so you can either type in an MS-DOS window, or use a batch file (say CLOAKINFO.BAT):
infodump -f Cloak.z5 >CloakInfo.txt |
Double-click on the CLOAKINFO.BAT icon
to dump the information to a file (it's really too long to display in the window).
Various command-line switches control the output:
-i for the header (that's the default anyhow), -m for the memory map,
-a for any abbreviations, -o for the objects, -t for the object tree,
-g for grammar information, -d for the dictionary, or -f for all of them.
Story file is Cloak.z5
**** Story file header ****
Z-code version: 5
Interpreter flags: None
Release number: 1
Size of resident memory: 2608
Start PC: 2609
Dictionary address: 1a67
Object table address: 010a
Global variables address: 0823
Size of dynamic memory: 126f
Game flags: Supports undo
Serial number: 000326
Abbreviations address: 0042
File size: 13750
Checksum: 37a7
Terminating keys address: 126e
Keys used:
Header extension address: 0102
Inform Version: 6.21
Header extension length: 0003
Unicode table address: 0000
**** Story file map ****
Base End Size
0 3f 40 Story file header
40 41 2 Abbreviation data
42 101 c0 Abbreviation pointer table
102 109 8 Header extension table
10a 31d 214 Object table
31e 5fc 2df Property data
5fd 822 226
823 a02 1e0 Global variables
a03 126e 86c
126f 1342 d4 Grammar pointer table
1343 1970 62e Grammar data
1971 1a64 f4 Action routine table
1a65 1a66 2
1a67 2607 ba1 Dictionary
2608 1374f 11148 Paged memory
**** Abbreviations ****
[ 0] " "
|
txd is the other major component in the Ztools package. It too reads a compiled Inform program file and reports on the contents of its high memory -- the routines and strings. Again, it's not a Windows application, so you can either type in an MS-DOS window, or use a batch file (say CLOAKTXD.BAT):
txd -agn Cloak.z5 >CloakTxd.txt |
Double-click on the CLOAKTXD.BAT icon
to dump the information to a file (it's far far too long to display in the window):
[Start of code at 2608] Main routine 2608, 0 locals 2609: call_vs 2610 -> gef 260e: quit Routine 2610, 0 locals 2611: call_vn 10c88 #0016 #0049 2619: rtrue Routine 261c, 0 locals 261d: rtrue Routine 2620, 1 local 2621: call_vs 11bd8 local0 #00 -> sp 2628: pull gef 262b: je gef #61 #65 #69 2644 2632: je gef #6f #75 #41 2644 2639: je gef #45 #49 #4f 2644 2640: je gef #55 ~2645 2644: rtrue 2645: rfalse |
Definitely not an easy or friendly read, but this (or the compiler's a and t switches) are just about the only way of discovering the structure of the Z-machine's high memory -- as we said before, you've no direct access to this area from a running program.
Just for completeness, we should mention disinform (or uninform, or deinform; the nomenclature seems confused), which maps the output from infodump and txd into something closer to Inform syntax. Development of this seems to have stopped some way short of completeness; what you get looks like this:
![Main routine]
![_______________________________________________________________________];
[rn_2608 ;
gef=rn_2610();
@quit ;
];
![_______________________________________________________________________];
[rn_2610 ;
rn_10c88(16,49);
rtrue;
];
![_______________________________________________________________________];
[rn_261c ;
rtrue;
];
![_______________________________________________________________________];
[rn_2620 local0 ;
gef=rn_11bd8(local0,00);
if (gef~=61 or 65 or 69)&&(gef~=6f or 75 or 41)&&(gef==45 or 49 or 4f) ||(gef==55)
{
rtrue;
}
rfalse;
];
|
Realistically, this isn't a useful tool as it currently stands.
Having inspected a game from the outside, the obvious next step to to take it for a test drive.