Tower of Babel Forum - A New Tower in the Making

The Matrix In The Tower - FAQ Tower Data in SAVE DISK Images

The Matrix In The Tower - FAQ Tower Data in SAVE DISK Images

I created new topic for informations about ToB SAVE DISK formats and tower data structures (later maybe informations about RToB SAVE DISK format)

For using original towers in RToB (ToB Remake) i've cracked some tower data of ST save disk images. Here are some informations about file structure of single tower saved on ST save disk image (starting with offset 0).


BASIS ELEMENTS
--------------

3bit-string:

Level0: bit 0 $00D8-$00EF [$007C-$0093]
Level1: bit 0 $00F0-$0107 [$0094-$00AB]
Level2: bit 0 $0108-$011F [$00AC-$00C3]
Level3: bit 0 $0120-$0137 [$00C4-$00DB]

(bit 0 means -> first 3bit-code is $D8(bit0)+$D9(bit7+6)

3 bits code * 8 lines * 8 fields = 192 bits (24 bytes) per level

3 bits code * 8 fields = 24 bits (3 bytes) per line (from left to right)

lines from north to south, bits per level:
168-191: line 0
144-167: line 1
120-143: line 2
096-119: line 3
072-095: line 4
048-071: line 5
024-047: line 6
000-023: line 7

basis-elements (3bit-code):

0: nothing
1: floor
2: box (with floor in next level)
3: up-lift (start)
4: down-lift (start)
5: up-lift (stop)
6: down-lift (stop)

ELEMENTS:
---------

elements in bits-string from bit0 $0138-$015B (35 bytes) [$00DC-$00FF]

14bits per element (object):

bits 0-2: X-Position (column -> 0 is left column)
bits 3-5: Z-Position (line -> 0 is south line)
bits 6-7: Y-Position (level -> 0 is bottom)
bits 8-13: object-index

object-index:

04: zapper
05: pusher
06: grabber
07: enemy zapper (n)
08: enemy zapper (e)
09: enemy zapper (s)
10: enemy zapper (w)
11: enemy pusher (n)
12: enemy pusher (e)
13: enemy pusher (s)
14: enemy pusher (w)
15: rotating zapper
16: rotating pusher
17: worm (ns)
18: worm (ew)
19: watcher
20: hopper
21: proximity mine
22: timebomb
23: push block
24: reflector (glass block)
25: prism (ne)
26: prism (se)
27: prism (sw)
28: prism (nw)
29: lizard (ns)
30: lizard (ew)
31: klondike
32: bonus flag
33: converter (ns)
34: converter (ew)
35: forcer up
36: forcer down
37: freezer
38: wiper
39: exchanger

TOWER DATA:
------------

Tower Name: from $005C (bit 7) - $007F (7bit-string ASCII), ends with 0, max. 40 chars [$0000-$0023]
Tower Author: from $0092 (bit 5) - $00B5 (7bit-string ASCII), ends with 0, max. 40 chars [$0036-$0059]

[$0075/$76] $00D1/$D2: FIN Time Limit seconds

[$0077] $00D3 - 3: BEH Cameras enable (0=yes,1=no)
[$0077] $00D3 - 2: FIN Time Limit use (0=enabled,1=disabled)
[$0077] $00D3 - 1: FX Lightning (0=enabled,1=disabled)
[$0077] $00D3 - 0: FX Meteor (0=enabled,1=disabled)

[$0078] $00D4 - 7: BEH Mines destroy floor (0=yes,1=no)
[$0078] $00D4 - 6: FX Blue Pulse (0=enabled,1=disabled)
[$0078] $00D4 - 5: BEH Timebomb speed bit 1 (0=slow,1=med,2=fast)
[$0078] $00D4 - 4: BEH Timebomb speed bit 0 (0=slow,1=med,2=fast)
[$0078] $00D4 - 3: FIN Klondikes to collect bit 2 (0-6)
[$0078] $00D4 - 2: FIN Klondikes to collect bit 1 (0-6)
[$0078] $00D4 - 1: FIN Klondikes to collect bit 0 (0-6)
[$0078] $00D4 - 0: FIN Robots to destroy bit 2 (0-6)

[$0079] $00D5 - 7: FIN Robots to destroy bit 1 (0-6)
[$0079] $00D5 - 6: FIN Robots to destroy bit 0 (0-6)
[$0079] $00D5 - 5: FX Star density bit 1 (0:None,1:Low,2:Med,3:High)
[$0079] $00D5 - 4: FX Star denisty bit 0 (0:None,1:Low,2:Med,3:High)
[$0079] $00D5 - 3: FX Tower Color Pattern bit 2 (0-4)
[$0079] $00D5 - 2: FX Tower Color Pattern bit 1 (0-4)
[$0079] $00D5 - 1: FX Tower Color Pattern bit 0 (0-4)
[$0079] $00D5 - 0: FX Moon Compass Heading enabled (1=None,0=see $00D6 bit 6/7)

[$007A] $00D6 - 7: FX Moon Compass Heading bit 1 (0=N,1=E,2=S,3=W)
[$007A] $00D6 - 6: FX Moon Compass Heading bit 0 (0=N,1=E,2=S,3=W)
[$007A] $00D6 - 5: FX Moon Type bit 2 (0-5)
[$007A] $00D6 - 4: FX Moon Type bit 1 (0-5)
[$007A] $00D6 - 3: FX Moon Type bit 0 (0-5)

[$007B] $00D7 - 6: FX Moon SkyPosition-X bit 4: (0-17???)
[$007B] $00D7 - 5: FX Moon SkyPosition-X bit 3: (0-17???)
[$007B] $00D7 - 4: FX Moon SkyPosition-X bit 2: (0-17???)
[$007B] $00D7 - 3: FX Moon SkyPosition-X bit 1: (0-17???)
[$007B] $00D7 - 2: FX Moon SkyPosition-X bit 0: (0-17???)
[$007B] $00D7 - 0: FX Moon SkyPosition-Y bit 3: (0-12???)

[$007C] $00D8 - 7: FX Moon SkyPosition-Y bit 2: (0-12)
[$007C] $00D8 - 6: FX Moon SkyPosition-Y bit 1: (0-12)
[$007C] $00D8 - 5: FX Moon SkyPosition-Y bit 0: (0-12)
[$007C] $00D8 - 2: FX Moon Rotation bit 1 (0=Clock,1=None,2=AntiClock)
[$007C] $00D8 - 1: FX Moon Rotation bit 0 (0=Clock,1=None,2=AntiClock)

[$0114] $0170 - 6: SFX Continous Backrgound Sound bit 1 (0=No Sound,1=Breath,2=Drone A,3=Drone B)
[$0114] $0170 - 5: SFX Continous Backrgound Sound bit 0 (0=No Sound,1=Breath,2=Drone A,3=Drone B)
[$0114] $0170 - 4: SFX Spiders walk (0=yes,1=no)
[$0114] $0170 - 3: SFX Other sounds (0=yes,1=no)

Atari ST: Colors in 9bit-string (RGB 3*3bit) from $15B bit0 to 16F (18 colors) [$00FF-$0113]
Amiag ADF: Colors in 12bit-string (RGB 3*4bit) from ...

00: Background (fixed,always black)
01: Square 1 (Side)
02: Square 1 (Top,unlit)
03: Square 1 (Top,lit)
04: Square 2 (Side)
05: Square 2 (Top,unlit)
06: Square 2 (Top,lit)
07: Sky Color (top)
08: Sky Color (horizont)
09: Object 1 (unlit)
10: Object 1 (lit)
11: Object 2 (unlit)
12: Object 2 (lit)
13: Lift (Top,unlit)
14: Lift (Top,lit)
15: Pointer/Menus (fixed)
16: Floor (lit)
17: Floor (unlit)


Fawlty wants to write a tool for converting tower groups between the different image formats, so this FAQ would grow more and more, if he adds some informations about ADF save disk format (if he still wants to do that)

Re: The Matrix In The Tower - FAQ Tower Data in SAVE DISK Images

Oh my god, this sounds like fun.....

Anyway, thanks for the information!!