FOR MODDERS AND HACKERS

DATA.OVL index

DATA.OVL is the original program's initialized data, stored as a separate file. These rules give its conventions and an index of identified regions, so tables can be found. Each region's meaning is defined by the topic named beside it. Names and other text stored in the file are not reproduced here.

File identity and conventions

OVL-0001Original: EstablishedRedux: Matches

The shipped DATA.OVL is 48,464 bytes. It is the main program's initialized data segment, linked into a separate overlay file; the program's uninitialized data is not stored. Copies of DATA.OVL that survive in the original source tree match the shipped file only up to offset 28BE hex, so offsets must be checked against the shipped file.

  • Offsets in these rules are file offsets, in hex.
  • Multibyte values are little-endian.
  • Strings are zero-terminated 8-bit ASCII with no length prefix.
  • Coordinates are unsigned bytes held in separate X and Y tables.
  • Two-dimensional tables are stored row by row.
  • String pointer tables hold 16-bit data-segment offsets. Add 10 hex to a pointer to get its file offset; a zero pointer means no string.

Redux checks the shipped size and reads its tables at these file offsets.

Identified regions

OVL-0002Original: IncompleteRedux: Unverified

These regions were located by matching the original source's initialized tables against the shipped file:

OffsetBytesContentsMeaning
001066Runtime library notice (text)none
00524,964Name and label strings: weapons, creatures (singular and plural), items, armour, potions, reagents, spells, statuses, spell syllables, places, virtues, mantras, shops, and merchants. Place names start at 0A4D (towns to Iolo's Hut), 0AC1 (castles and keeps), and 0B5E (dungeons).EQUIP-0001, ENEMY-0001, MAP-0003
104C590Conversation word list: 118 words in token orderTALK-0002
129A284Names of the compressed filesGFX-0001
13CC384Creature attributes, 48 x 8 bytes in ENEMY-0001's column order: STR, DEX, INT, armour, damage, HP, number appearing, treasureENEMY-0001
154C96Creature ability words, 48 x 16-bitENEMY-0001
15AC, 15DC48 eachCreature range and missile typeENEMY-0001
160C, 1644, 1674, 16AC55, 48, 55, 55Equipment attack, defense, range, and attack typeEQUIP-0001, EQUIP-0002
1806 onwardvariousString pointer tables (see OVL-0001): weapons 1806, creatures 1866, creature plurals 18C6, items 1926, armour 1972, potions 19D2, reagents 19E2, spells 19F2, places 1E4A, virtues 1F5E, mantras 1F6E, shops 21DA, merchants 22DA, conversation words 24F8 (129 entries), file names 25FAas above
1E2A32Settlement ground-floor recordsMAP-0002
1E9A, 1EC240 eachEntrance X and YMAP-0004
1EEA56Moon phases, 28 days x 2MOON-0002
1F7E, 1F868 eachShrine X and YSHRINE-0001
3886256Britannia chunk indexMAP-0001
3A42, 3A6A40 eachReagent prices and quantitiesMERCH-0005
3A9296Arms base prices, 48 x 16-bitEQUIP-0003, MERCH-0004
3E886 x 113Hidden Search objects: tile, quantity or item, location, level, X, YCMD-0007
4D76, 4D7E8 eachFrigate and skiff prices, 4 x 16-bitMERCH-0008
4D86, 4D8A4 eachShip berth X and Y: Jhelom, Minoc, East Britanny, Buccaneer's DenMERCH-0008
4D8E, 4DD4, 4E8A, 4E906 eachInn prices, rooms, and bed X and YMERCH-0009
6A1A15,129Text used by the program's overlaysnone

Not yet identified: the first 12 bytes; two zero-filled ranges, 55B6-6A19 and A533-BD4F; and gaps between tables, the largest roughly 2636-2756, 2777-2BD0, 30FF-3666, 3AF2-3D96, 41E3-4B06, and 4E96-54E4. Some of these hold data from libraries whose source is not in the reviewed tree.

Redux reads the place names, word list, file names, entrances, chunk index, and ship berths at these offsets. It compiles many other tables into its own code; those copies have not been compared byte for byte with this file.