Page Byte Address Description
64 0 4000
Screen
91 0 5B00
Variables
91 77 5B4D
Data block at 5B4D
96 0 6000
Sprites
156 80 9C50
Data block at 9C50
156 86 9C56
Draw game screen
157 64 9D40
Calculate address in the mini-map (MiniMap table)
157 86 9D56
Calculate address in the mini-map (MiniMap table) and Get
157 95 9D5F
Check value in the mini-map (MiniMap table), if row and column in range 0..31
157 121 9D79
Calculate address in the mini-map (MiniMap table) and Set
157 132 9D84
Generate next pseudo-random 16-bit value
157 164 9DA4
Data block at 9DA4
157 165 9DA5
Fill block at HL with A
157 170 9DAA
Prepare the mini-map (MiniMap table)
159 129 9F81
Carve tunnel in world map: random-walk cave generator
160 59 A03B
Carve tunnel in world map: random-walk cave generator (rightward)
160 245 A0F5
Calculate address in relief block
161 41 A129
Calculate address in relief block and Get tile nummber
161 50 A132
Data block at A132
161 76 A14C
Get screen attribute address
161 100 A164
Convert char coords HL to ZX screen address
161 118 A176
Draw tile 16x8 at the screen
161 135 A187
Draw tile 8x8 at the screen
161 147 A193
Generate static object placements (chests, pearls/shells) across the map
162 126 A27E
Table of objects on the map; each record is 4 bytes wide
164 27 A41B
Data block at A41B
164 221 A4DD
Relief construction blocks, 8x8 tiles = 64x64 pixels
172 93 AC5D
Relief mini-map 32x32 = 1024 bytes
176 93 B05D
Data block at B05D
176 125 B07D
Table of objects on the screen
176 169 B0A9
Draw static objects on the screen; prepare LB07D table
177 108 B16C
Sprites for objects
177 212 B1D4
Select 8 random objects from the object pool
178 16 B210
Data block at B210
178 19 B213
Animate and draw rising air bubbles, plus Octopus
178 192 B2C0
Octopus delay and process
178 206 B2CE
Draw tile 8x8 with XOR
178 219 B2DB
Draw tile 16x8 with XOR
178 238 B2EE
Sprite 8x8 address, 8 bytes
178 246 B2F6
Sprite 16x16, 32 bytes; first lower part then upper
179 22 B316
Data block at B316
179 23 B317
Process Octopus, draw if needed
179 93 B35D
Draw Octopus sprite
179 146 B392
Unused?
179 160 B3A0
Insert or remove object from packed record list
180 112 B470
Draw object sprite, clipped to viewport
181 114 B572
Copy records forward
181 126 B57E
Remove first record: shift list backward by one slot
181 152 B598
Copy records backward
181 164 B5A4
Shift record block forward/backward by direction (Y axis)
181 224 B5E0
Clip object position to viewport, allocate/free screen slot
182 118 B676
Slot allocation bitmap, 16 slots, bit7 = slot used
182 134 B686
Screen attribute change for object edges (vertical and horizontal)
183 15 B70F
Screen attribute change for horizontally oriented object
183 55 B737
Update fish object: advance shift, draw, run moving procedure
183 185 B7B9
Data block at B7B9
183 187 B7BB
Update object: advance shift, draw, run moving procedure
184 54 B836
No-op moving procedure (empty stub)
184 55 B837
Screen attribute change for vertically oriented object
184 133 B885
Moving procedure for fish object moving horizontal
185 114 B972
Moving procedure for fish object moving vertical
186 100 BA64
Moving procedure for fish object moving diagonal
189 131 BD83
Set random speed and initial direction for spawned object
189 169 BDA9
Data block at BDA9
189 186 BDBA
Draw records for current mini-map row band
189 233 BDE9
Unused
189 234 BDEA
Update records for current mini-map row band, with delay
190 64 BE40
Process 26-byte records in group II
190 88 BE58
Process 26-byte records in group II
190 109 BE6D
Process 26-byte records in group III
190 133 BE85
Process 26-byte records in group III
190 154 BE9A
Process 21-byte records in group I: Boat, meduzas, round fishes
190 178 BEB2
Process 21-byte records in group I: Boat, meduzas, round fishes
190 199 BEC7
Reset slot allocation bitmap and buffer pointer
190 219 BEDB
Initialize level: place random objects (groups I-V), boat objects
191 160 BFA0
Data block at BFA0
191 176 BFB0
Spawn N objects of one type at random positions from template table
192 7 C007
Data block at C007
192 9 C009
Place N objects at random screen positions, avoiding the boat
192 146 C092
Object records
194 10 C20A
Record templates
196 49 C431
Update group IV and V object records (movement)
196 92 C45C
Draw group IV and V object records
196 129 C481
Object idle animation state machine (frame cycle + random wait)
196 213 C4D5
Delay loop (busy-wait via LDIR)
196 231 C4E7
Data block at C4E7
196 240 C4F0
Data block at C4F0
197 0 C500
Unused
217 144 D990
Game
218 57 DA39
Clear screen, fill attributes with A
218 89 DA59
Print char and shift current position right
218 152 DA98
Print string
218 173 DAAD
Prepare game screen and some variables
219 194 DBC2
Initialize variables depending of Game level
220 9 DC09
Texts for indicator panel
220 128 DC80
Tiles 8x8
221 240 DDF0
Blocks of 14 bytes to copy to 5B27, blocks aligned to 16 bytes
222 46 DE2E
Update gauge indicator on the screen
222 62 DE3E
Update Depth indicator
222 85 DE55
Data block at DE55
222 93 DE5D
Update Oxygen indicator, maximum is $FFFF
222 133 DE85
Print decimal number
222 217 DED9
Print high score number
222 229 DEE5
Print score number
222 241 DEF1
Print HELD number
222 253 DEFD
Data block at DEFD
223 37 DF25
Table: Angle 0..15 -> (DX, DY)
223 69 DF45
Data block at DF45
223 213 DFD5
Update diver position, angle and sprite from movement state
226 168 E2A8
Diver frame update: speed timer moves diver, input timer reads keys
226 219 E2DB
Read and process keyboard input
227 59 E33B
Diver object record
227 100 E364
Diver per-frame logic: oxygen drain, drowning, object interaction
228 27 E41B
Drowned diver: periodic 180-degree turn
228 58 E43A
Diver explosion
228 118 E476
Interact with object, like take Oxygen or pick up pearls
229 210 E5D2
DE = (L5B33) - HELD
229 224 E5E0
Dividers used to print decimal number, see PrintDec
229 236 E5EC
Play melody
230 4 E604
Melodies
230 21 E615
Play melody $E60B
230 28 E61C
Melodies
230 69 E645
Play melody $E629
230 82 E652
Sprites divers on the boat
230 130 E682
Draw Divers on the Boat
230 171 E6AB
Reset oxygen, draw divers on boat, position diver at dive start
231 103 E767
Diver on boat: idle, embark and disembark state machine
233 21 E915
Diver reaches boat: check collision, start climb sequence
233 176 E9B0
Plus one live
233 209 E9D1
Data block at E9D1
233 218 E9DA
Score table, 160 bytes
234 122 EA7A
Insert new high-score table entry if Score qualifies
234 222 EADE
Show Game Over screen and high-score table, prompt for name
235 130 EB82
Read player name for high-score entry (up to 6 chars)
235 219 EBDB
Print 16-bit number at TAB position (score table)
235 238 EBEE
Texts used for indicator panel
236 124 EC7C
Redefine keys
236 235 ECEB
Wait for keypress (with click sound), return key-row mask
237 35 ED23
UDG symbols $90..$93 used for Redefine keys
237 67 ED43
Text for Redefine keys
237 213 EDD5
Melody
237 223 EDDF
Starting point
238 28 EE1C
Main menu: wait for K/L/S/skill key, dispatch action
238 173 EEAD
Attract-mode demo: idle timeout starts animated level preview
239 58 EF3A
Data block at EF3A
239 127 EF7F
Message at EF7F
239 147 EF93
Message at EF93
239 166 EFA6
Unused
240 0 F000
Draw buffer