Routines
Address
Label
Description
AF6C
START
Cold start
AF7F
start_menu
Restart after a game
AF88
main
Set up and play
AFB7
player_dies
Start a life
AFBA
game_loop
Enter a room
AFBD
onscreen_loop
Walk the object table
AFC7
update_sprite_loop
Next object
AFD5
jump_to_upd_object
Dispatch on object type
AFDB
jump_to_tbl_entry
Jump through a table of addresses
AFE4
ret_from_tbl_jp
One object done
B000
end_of_frame
End of frame
B035
game_delay
Wait one unit
B038
delay_loop
Frame delay loop
B03F
no_delay
Redraw the whole screen on entering a room
B074
next_frame_or_die
Next frame, or lose a life
B088
reset_objs_wipe_flag
Clear every object's wipe flag
B090
clear_wipe_flag_loop
Clear one wipe flag
B2B6
play_audio_wait_key
Play the menu tune once per visit
B2BE
play_audio_until_keypress
Play a tune until a key is pressed
B2C5
keypress_tune_note
Play one note of a tune that a key can stop
B2CF
play_audio
Play a tune
B2D9
end_audio
End of a tune
B2DA
play_note
Play one note
B2F9
calc_duration
Multiply the waves by the length
B2FF
restore_tune_ptr
Restore the tune pointer
B300
note_wave
One wave
B304
note_first_half
First half-wave
B30F
note_second_half
Second half-wave
B31C
snd_delay
Rest
B327
rest_unit
One unit of rest
B328
rest_countdown
Rest countdown
B3E9
sound_movable_block
Sound: the movable block's blip
B403
sound_sparkle
Sound: sparkle
B40D
sparkle_blip
One blip of the sparkle
B419
sound_materialise
Sound: materialising
B423
materialise_sweep
One step of the materialising sweep
B42E
sound_thud
Sound: thud
B433
thud_blip
One blip of the thud
B441
sound_jump
Sound: jump
B443
jump_sweep
One step of the jump sweep
B451
sound_pitch_from_z
Sound: a note pitched by height
B454
sound_pitch_from_a
Sound: a note pitched by A
B45D
sound_pitch_from_x
Sound: a note pitched by X
B462
sound_pitch_from_y
Sound: a note pitched by Y
B467
sound_pitch_from_xyz
Sound: a note pitched by position
B472
sound_transform
Sound: changing between man and werewolf
B47D
transform_warble
One step of the warble
B489
sound_portcullis_crash
Sound: the portcullis lands
B495
crash_blip
One blip of the crash
B4A3
toggle_audio_hw_x16
Sound: a plain beep of 16 waves
B4A8
toggle_audio_hw_x24
Sound: a plain beep of 24 waves
B4AD
audio_guard_wizard
Sound: a guard's or the wizard's footstep
B4BB
sound_walk_step
Sound: Sabreman's footstep while walking
B4C1
sound_footstep
Sound: Sabreman's footstep
B4C6
footstep_pitch
Footstep pitch
B4D1
footstep_length
Footstep length
B4E6
toggle_audio_hw_xC
Sound: C waves at one pitch
B4ED
toggle_audio_hw
Sound: one wave
B4F2
speaker_on_wait
First half of the wave
B4F9
speaker_off_wait
Second half of the wave
B4FD
do_any_objs_intersect
Does this object overlap any other?
B510
overlap_test_obj
Test one object for overlap
B524
overlap_done
Overlap found, or none
B52E
overlap_next_obj
Next object
B538
is_object_not_ignored
Does this object take part in collisions?
B544
shuffle_objects_required
Rotate the list of objects the cauldron wants
B54C
rotate_wanted_once
Rotate once
B555
rotate_wanted_entry
Move one entry down
B566
upd_131_to_133
Handler: the finale sparks (types 131 to 133)
B593
p4_m4
Spark direction: dX -4, dY +4
B596
save_dX_dY
Store the spark's direction and pick a frame
B5A4
set_spark_frame
Set the spark's frame
B5A9
spark_tone_and_move
Leave the spark's height for the finale tone
B5AF
dec_dZ_wipe_and_draw
Move under gravity and flag for redrawing
B5B5
p4_p4
Spark direction: dX +4, dY +4
B5BA
m4_m4
Spark direction: dX -4, dY -4
B5BF
m4_p4
Spark direction: dX +4, dY -4
B5C4
spark_near_player
Is the spark near Sabreman?
B5CF
spark_check_y
Near on X; and on Y?
B5DE
spark_touch
Near on X; near on Y?
B5E3
spark_home_in
Fly at Sabreman
B5F7
read_port
Read one or more keyboard half-rows
B5FF
upd_182_183
Bouncing ball (types 182 and 183)
B626
bounce_ball_set_sense
Bouncing ball: set the chase direction and the bounce height
B63C
bounce_ball_on_landing
Bouncing ball: on landing, bounce
B64F
bounce_ball_pick_axis
Bouncing ball: choose X or Y and compare with the player
B65D
bounce_ball_y_sense
Bouncing ball: the patched jump for Y
B661
bounce_ball_set_dy
Bouncing ball: head along Y
B668
bounce_ball_animate
Bouncing ball: animate and draw
B66E
bounce_ball_x_axis
Bouncing ball: compare X with the player
B676
bounce_ball_x_sense
Bouncing ball: the patched jump for X
B67A
bounce_ball_set_dx
Bouncing ball: head along X
B683
upd_91
Dropping block (type 91)
B69F
drop_block_draw
Dropping block: draw
B6A2
upd_143
Collapsing block (type 143)
B6B1
upd_55
Shuttling block, north-south (type 55)
B6B9
upd_54
Shuttling block, east-west (type 54)
B6BF
shuttle_block
Shuttling block: the common part
B6DB
shuttle_block_target
Shuttling block: the target
B6DE
shuttle_block_step
Shuttling block: step towards the target
B6EF
shuttle_block_move
Shuttling block: move
B6F9
upd_144_to_149_152_to_157
Walking legs (types 144 to 149 and 152 to 157)
B716
legs_unmirrored
Walking legs: unmirrored
B71A
legs_animate_and_draw
Walking legs: animate and draw
B720
legs_face_minus_x
Walking legs: facing -X
B726
legs_moving_in_y
Walking legs: moving along Y
B730
legs_mirrored
Walking legs: mirrored
B736
legs_face_plus_y
Walking legs: facing +Y
B73C
upd_150_151
Guard walking east-west (types 150 and 151)
B749
guard_ew_move
Guard east-west: move and turn
B763
guard_ew_legs
Guard east-west: take the legs along
B76C
set_guard_wizard_sprite
Choose a guard's or the wizard's frame from its direction
B783
guard_unmirrored
Guard or wizard: unmirrored
B788
guard_face_minus_x
Guard or wizard: facing -X
B78E
guard_moving_in_y
Guard or wizard: moving along Y
B798
guard_mirrored
Guard or wizard: mirrored
B79D
guard_face_plus_y
Guard or wizard: facing +Y
B7A3
upd_22
Gargoyle (type 22)
B7A9
upd_63
Spiked ball (type 63)
B7CD
spiked_ball_drop
Spiked ball: fall
B7D9
draw_spiked_ball
Spiked ball: draw
B7DC
spiked_ball_landed
Spiked ball: landed
B7E7
upd_23
Spike (type 23)
B7ED
upd_86_87
Fire moving east-west (types 86 and 87)
B7FE
fire_ew_move
Fire east-west: move
B80F
upd_180_181
Fire moving north-south (types 180 and 181)
B820
fire_ns_move
Fire north-south: move
B82F
fire_turn_if_blocked
Fire: turn round if blocked
B83A
fire_flicker_and_draw
Fire: flicker and draw
B83F
upd_176_177
Fire standing still (types 176 and 177)
B856
set_deadly_wipe_and_draw_flags
Make an object deadly and mark it to be wiped and redrawn
B85C
set_both_deadly_flags
Make an object deadly both ways
B865
upd_178_179
Ball bouncing on the spot (types 178 and 179)
B876
ud_ball_rise_or_fall
Ball bouncing on the spot: rise or fall
B892
ud_ball_draw
Ball bouncing on the spot: draw
B894
ball_up
Ball bouncing on the spot: rise
B8A9
init_cauldron_bubbles
Start the cauldron bubbles
B8DA
upd_160_to_163
Cauldron bubbles (types 160 to 163)
B916
bubbles_draw
Cauldron bubbles: draw
B919
bubbles_turn_hostile
Cauldron bubbles: turn hostile
B923
upd_168_to_175
The object the wizard wants, shown in the bubbles (types 168 to 175)
B92C
upd_164_to_167
Chasing sparkles (types 164 to 167)
B942
chaser_speed_fast
Chasing sparkles: fast
B945
chaser_chase
Chasing sparkles: chase
B95E
upd_111
Make an object vanish (type 111)
B962
sound_wipe_and_draw
Play a sound, then wipe and draw
B965
move_towards_plyr
Point an object at the player
B973
towards_plyr_y
Point at the player: Y
B981
towards_plyr_set_dy
Point at the player: set dY
B985
toggle_next_prev_sprite
Flip between an object's two frames
B98C
next_graphic_no_mod_4
Step an object through four frames
B998
save_graphic_no
Store an object's type
B99C
upd_141
The cauldron (type 141)
B99F
upd_142
The cauldron's top (type 142)
B9A5
upd_30_31_158_159
Guard walking round the room, and the wizard (types 30, 31, 158 and 159)
B9CC
move_guard_wizard_NSEW
Choose a walking guard's next heading
B9E0
guard_W
Walking guard heading -X
B9EB
next_guard_dir
Walking guard: next heading
B9FB
guard_N
Walking guard heading +Y
BA08
guard_E
Walking guard heading +X
BA15
guard_S
Walking guard heading -Y
BA22
game_over
Game over
BA29
game_over_summary
The game-over summary screen
BA79
print_charms_and_show
Print the charms count and show the summary
BA87
await_restart
Wait, play the game-over tune, and start again
BA9B
wait_for_key_press
Wait a while or until a key is pressed
BA9E
wait_key_poll
One poll of the keyboard
BAAB
game_complete_msg
The quest is complete
BC10
calc_and_display_percent
Count the rooms visited and print the percentage of the quest
BC18
count_screens
Count the visited bits in one byte
BC1B
count_visited_bit
Test one bit of the visited map
BC1F
next_visited_bit
Next bit, next byte, then work out the percentage
BC38
scale_to_percent
Add 100/156 per point
BC61
print_percent_two_digits
Print a percentage under 100
BC66
print_days
Print the day count on the panel
BC7A
print_lives_gfx
Draw the lives icon on the panel
BCA3
print_lives
Print the number of lives
BCAE
print_BCD_number
Print BCD numbers in the standard font
BCB6
print_BCD_byte
Print both digits of one BCD byte
BCC0
print_BCD_lsd
Print the low digit of a BCD byte
BCCA
display_day
Draw the day label on the panel
BD0C
do_menu_selection
The control-method menu
BD15
clear_menu_flash
Clear the FLASH bit on every menu line, then draw the menu
BD23
menu_loop
The menu loop
BD3E
check_for_kempston_joystick
Key 2: Kempston joystick
BD46
check_for_cursor_joystick
Key 3: cursor joystick
BD4E
check_for_interface_ii
Key 4: Interface II joystick
BD54
check_for_directional_control
Store the method, then key 5: directional control
BD6C
check_for_start_game
Start the game?
BD85
clr_debounce
Key 5 released
BD89
flash_menu
Flash the selected menu lines
BE31
print_text_single_colour
Print a string in one given colour
BE45
print_text_std_font
Print a string with its colour byte, in the standard font
BE4C
print_text
Print a string with its colour byte
BE56
text_attr_addr
Find the attribute address for the string
BE5F
print_text_char
Print one character of a string
BE72
print_text_last
Print the last character of a string
BE7F
print_8x8
Print one 8x8 character into the buffer
BE91
print_8x8_row
Copy one row of the glyph
BEA3
toggle_selected
Set the FLASH bit on one of a list of colours
BEA6
flash_this_one
Flash this colour
BEAA
flash_next_one
Count down to the chosen colour
BEAD
unflash_this_one
Do not flash this colour
BEAF
flash_list_step
Next colour in the list
BEB3
display_menu
Draw the menu
BEBF
display_text_list
Print a list of strings
BEE4
multiple_print_sprite
Print a sprite several times in a line
BEFE
upd_120_to_126
Player appearing, frames 120 to 126
BF11
upd_127
Player appearing, last frame
BF21
init_death_sparkles
Start the sparkle an object vanishes in
BF2B
upd_112_to_118_184
Sparkle, frames 112 to 118 (and type 184)
BF31
sparkle_sound_and_draw
Sparkle sound and redraw
BF37
upd_185_187
Vanish and leave the special-object table
BF3F
upd_119
Sparkle, last frame: vanish
BF45
display_objects_carried
Redraw the carried objects if they changed
BF4E
display_objects
Draw the three carried objects on the panel
BF59
display_object
Draw one carried object
BF91
show_carried_slot
Show one carried object and colour it
BFFB
chk_pickup_drop
Is the pick-up/drop control pressed?
C00B
test_pickup_bit
Test the pick-up bit
C00E
handle_pickup_drop
Pick up or drop an object
C041
start_pickup_drop
Look for a charm to pick up
C06F
try_pickup_loop
Try each special-object record
C08C
find_free_record
Nothing to pick up: find a free record to drop into
C093
find_free_record_loop
Is this record free?
C09D
done_pickup_drop
Pick-up or drop done
C0A9
wait_pickup_release
Wait for the pick-up key to be released
C0B2
room_to_drop
Drop the oldest charm carried
C0DD
place_under_player
Put the charm under the player
C106
drop_object
Fill in a dropped charm's record
C12B
adjust_carried
Shift the carried slots along
C141
pickup_object
Pick up a charm
C172
can_pickup_spec_obj
Can this special object be picked up?
C17A
is_on_or_near_obj
Is the player on or next to this object?
C19F
near_obj_done
Result of the touch test
C1A1
is_obj_moving
Is the object moving?
C1AB
upd_103
Special object $67: the extra life
C1EE
extra_life_fall
Fall and settle like any other object
C1F1
upd_104_to_110
A charm on its way into the cauldron, types $68 to $6E
C202
steer_to_centre_y
Steer towards the centre in y
C213
check_over_centre
Over the centre yet?
C222
rise_over_cauldron
Rise to a height of $98
C22C
store_rise_speed
Set the vertical speed
C22F
move_charm_to_cauldron
Move it
C232
click_wipe_and_draw
Click and redraw
C238
centre_of_room
Over the centre: fall into the cauldron
C245
add_obj_to_cauldron
A charm lands in the cauldron
C265
cauldron_consume
Use the charm up
C274
ret_next_obj_required
Which charm the wizard wants next
C28B
upd_96_to_102
Special objects $60 to $66: a charm lying in a room
C29B
settle_charm
Stop the charm and redraw it
C2A5
cycle_colours_with_sound
Cycle the screen's colours with a sound
C2A7
cycle_colours_pass
One pass over the attributes
C2AD
cycle_attribute_mem
Step one cell's ink
C2C3
cycle_colours_pause
Pause between passes
C2CB
no_update
Handler that does nothing
C2CC
prepare_final_animation
Start the final animation
C2DC
final_clear_loop
Erase the next of records 3 to 13
C2EE
blocks_to_rising
Turn a stone block into a rising block
C2F9
final_next_record
Next record in the stone-block scan
C306
chk_and_init_transform
Start the transformation if one is due
C337
upd_92_to_95
The transformation in progress (types 92 to 95)
C349
transform_step
One step of the transformation
C357
rand_legs_sprite
Show a random transformation sprite
C369
set_transform_sprite
Set the transformation sprite
C377
finish_transform
End the transformation
C394
transform_done_draw
Draw the finished player
C397
print_sun_moon
Move the sun or moon on
C3A4
display_sun_moon_frame
Place the sun or moon, and redraw its window
C3C3
display_frame
Draw the sun and moon window
C3FF
toggle_day_night
Swap the sun and moon
C419
inc_days
A new day
C432
blit_2x8
Copy a 16 by 8 pixel patch from the buffer to the screen
C46D
init_sun
Start the first day
C47E
init_special_objects
Shuffle the special objects
C489
init_obj_loop
Set up one special-object entry
C4AA
upd_62
The block type called moveable (type 62)
C4B6
upd_85
A chest (type 85)
C4C3
upd_84
A table (type 84)
C4C6
dec_dZ_upd_XYZ_wipe_if_moving
Move under gravity, and redraw if moved
C4D3
upd_128_to_130
Drawing offset X -8, Y -2 (types 128 to 130)
C4D8
adj_m4_m12
Drawing offset X -12, Y -4
C4DD
adj_m6_m12
Drawing offset X -12, Y -6
C4E0
jp_set_pixel_adj
Jump to set the drawing offset
C4E3
upd_6_7
Drawing offset X -16, Y -8 (types 6 and 7)
C4E8
upd_10
Drawing offset X -20, Y -1 (type 10)
C4ED
upd_11
Drawing offset X -12, Y -2 (type 11)
C4F2
upd_12_to_15
Drawing offset X -8, Y -4 (types 12 to 15)
C4F7
adj_m8_m12
Drawing offset X -12, Y -8
C4FC
adj_m7_m12
Drawing offset X -12, Y -7
C501
adj_m12_m12
Drawing offset X -12, Y -12
C506
upd_88_to_90
Drawing offset X -16, Y -12 (types 88 to 90)
C50B
adj_p7_m12
Drawing offset X -12, Y +7
C510
adj_p3_m12
Drawing offset X -12, Y +3
C515
fill_window
Fill a rectangle of bytes
C518
fill_window_row
Fill one row
C51A
fill_window_byte
Fill one byte
C525
find_special_objs_here
Bring in the special objects for a new room
C530
find_spec_obj_loop
Check one special-object entry
C572
next_spec_obj_slot
Next special-object entry
C583
clear_spare_spec_records
Clear the unused special-object records
C591
update_special_objs
Remember where the special objects were left
C595
save_spec_obj_loop
Write back one special object
C5B7
save_spec_obj_next
Next special-object record
C5C8
upd_80_to_83
A ghost (types 80 to 83)
C5DD
ghost_new_direction
Give a ghost a new direction
C5FD
ghost_animate
Animate a ghost
C603
calc_ghost_sprite
Choose a ghost's sprite from its direction
C60C
ghost_abs_dy
The size of dy
C616
ghost_pick_view
Mostly along x, or mostly along y?
C624
set_ghost_hflip
Mirror the ghost
C629
ghost_x_negative
Moving towards -x
C62F
ghost_mostly_y
Moving mostly along y
C63A
clr_ghost_hflip
Don't mirror the ghost
C63F
ghost_y_negative
Moving towards -y
C645
get_delta_from_tbl
Look up a speed
C65E
upd_8
A portcullis at rest (type 8)
C685
init_portcullis_down
Start a portcullis falling
C691
count_moving_portcullis
Count the moving portcullis
C692
set_wipe_and_draw_flags
Mark an object to be wiped and redrawn
C69D
set_wipe_and_draw_IY
Mark the object at IY to be wiped and redrawn
C6AD
init_portcullis_up
Start a portcullis rising
C6BD
upd_9
A moving portcullis (type 9)
C6E0
stop_portcullis
Stop a portcullis
C6EA
move_portcullis_up
Raise a portcullis
C700
dec_dZ_and_update_XYZ
Apply gravity and move
C706
add_dXYZ
Move by the velocity
C722
upd_3_5
The second pillar of an arch (types 3 and 5)
C72B
set_pixel_adj
Set the drawing offset
C732
adj_3_5_hflip
The second pillar, mirrored
C737
adj_m3_p1
The first pillar of a tree arch, facing east or west
C73C
upd_2_4
The first pillar of an arch (types 2 and 4)
C74C
arch_ew_doorway
The middle of an east or west arch
C760
arch_check_doorway
Check the player against the doorway
C76C
adj_2_4_hflip
The first pillar, mirrored: a north or south arch
C785
arch_nudge_to_centre
Nudge the player towards the middle of an arch
C791
arch_nudge_loop
Nudge one record
C7B1
adj_ew
Nudge along y, for an east or west arch
C7BF
nudge_y_store
Store the y nudge
C7C4
adj_ns
Nudge along x, for a north or south arch
C7D2
nudge_x_store
Store the x nudge
C7D5
arch_nudge_done
Nudge done
C7D6
arch_nudge_next
Next record to nudge
C7DB
chk_plyr_spec_near_arch
Is the player in the doorway?
C7E4
near_arch_loop
Check one record against the doorway
C7F9
near_arch_next
Next record for the doorway check
C7FE
is_near_to
Is an object near a point?
C808
near_check_y
Within the limit along x?
C814
near_check_z
Within the limit along y?
C820
near_z_compare
Within 4 along z?
C823
upd_16_to_21_24_to_29
The knight's legs (types 16 to 21 and 24 to 29)
C828
upd_48_to_53_56_to_61
The werewolf's legs (types 48 to 53 and 56 to 61)
C82B
upd_player_bottom
Update the player's legs
C83E
player_controls
Read the controls and act on them
C855
player_move_and_draw
Move the player and count down the room-entry walk
C86A
player_redraw
Have the player redrawn
C86D
plyr_OOB
In a doorway: allow no rising
C87A
chk_plyr_OOB
Is the player inside the room's walls?
C891
oob_test_x
Test X, then work out the Y distance
C89D
oob_test_y
Test Y
C89F
handle_left_right
Turn the player
C8BE
directional_pick
Directional control: right, down or left
C8CD
chk_facing_N
Directional control: face N
C8D2
chk_facing_ne_result
Directional control: walk, or turn towards N or E
C8D5
turn_by_parity
Directional control: turn left or right
C8D9
chk_facing_E
Directional control: face E
C8E0
chk_facing_S
Directional control: face S
C8E5
chk_facing_sw_result
Directional control: walk, or turn towards S or W
C8E9
chk_facing_W
Directional control: face W
C8EF
flag_forward
Directional control: walk
C8F2
left_right_rotational
Rotational control: turn a quarter
C8FD
rotational_turn
Rotational control: start a turn
C915
start_turn_delay
Rotational control: set the pause and choose the direction
C91F
left_right_calc_sprite
Turn the player one quarter
C927
turn_toggle_view
Turn: change between back and front view
C92F
turn_toggle_mirror
Turn: mirror the sprite, and turn the top half to match
C940
turn_right
Turn right
C948
handle_jump
Start a jump
C969
handle_forward
Step the legs
C97A
walk_step_sound
Footstep, then the next leg frame
C97F
animate_human_legs
Next frame of a walk cycle
C98B
store_leg_frame
Store the new leg frame
C994
legs_to_rest
Bring the legs to rest
C9A1
move_player
Move the player
C9AB
move_player_xy
Is the player moving forward?
C9BC
move_player_walk
Take a step forward
C9C1
apply_gravity
Gravity
C9CC
gravity_extra
Gravity's second unit
C9CD
move_player_apply
Resolve and apply the move
C9F3
clear_dX_dY
Clear dX and dY
C9FB
calc_plyr_dXY
Add a step in the facing direction
CA17
dispatch_on_facing
Jump by the object's facing
CA1E
get_sprite_dir
Which way does the object face?
CA3A
move_plyr_W
Step west
CA3F
store_plyr_dX
Store dX
CA43
move_plyr_E
Step east
CA4A
move_plyr_N
Step north
CA4F
store_plyr_dY
Store dY
CA53
move_plyr_S
Step south
CA5A
adj_dZ_for_out_of_bounds
Shorten dZ at the floor
CA5E
clip_dZ_to_floor
Shorten dZ at the floor: the loop
CA70
handle_exit_screen
Has the player walked out of the room?
CA89
shorten_delta
Shorten a movement by one unit
CA90
shorten_delta_dec
Shorten a movement: subtract one
CA9A
screen_west
Leave by the west wall?
CAB3
screen_e_w
Keep an east-west move within the row
CABA
exit_screen
Go into the next room
CAF3
screen_east
Leave by the east wall?
CB0E
screen_north
Leave by the north wall?
CB29
screen_south
Leave by the south wall?
CB45
adj_for_out_of_bounds
Cut a move short against the room and the other objects
CB6A
dZ_ok
Cut a move short: X
CB7B
dX_done
Cut a move short: Y
CB8C
store_clipped_move
Store the move as cut
CB9A
adj_dX_for_obj_intersect
Shorten dX against the other objects
CBA0
dX_obj_loop
Shorten dX: is this object in line?
CBAF
dX_obj_hit_test
Shorten dX: does the move hit it?
CBD9
dX_obj_shorten
Shorten dX by one and try the same object again
CBE1
dX_obj_next
Shorten dX: the next object
CBE9
adj_dY_for_obj_intersect
Shorten dY against the other objects
CBEF
dY_obj_loop
Shorten dY: is this object in line?
CBFE
dY_obj_hit_test
Shorten dY: does the move hit it?
CC28
dY_obj_shorten
Shorten dY by one and try the same object again
CC30
dY_obj_next
Shorten dY: the next object
CC38
adj_dZ_for_obj_intersect
Shorten dZ against the other objects
CC3E
dZ_obj_loop
Shorten dZ: is this object above or below?
CC4D
dZ_obj_hit_test
Shorten dZ: does the move hit it?
CC81
dZ_ride_dY
Shorten dZ: ride with the obstacle's dY
CC8D
dZ_obj_shorten
Shorten dZ by one and try the same object again
CC95
dZ_obj_next
Shorten dZ: the next object
CC9D
do_objs_intersect_on_x
Do two objects overlap in X?
CCB0
intersect_x_result
Overlap in X: compare
CCB2
do_objs_intersect_on_y
Do two objects overlap in Y?
CCC5
intersect_y_result
Overlap in Y: compare
CCC7
do_objs_intersect_on_z
Do two objects overlap in Z?
CCD6
intersect_z_result
Overlap in Z: compare
CCD8
intersect_z_above
Overlap in Z: the other object is lower
CCDD
adj_dX_for_out_of_bounds
Shorten dX at the walls
CCEC
clip_dX_to_walls
Shorten dX at the walls: distance from the centre
CCF6
clip_dX_test
Shorten dX at the walls: test and shorten
CD07
dX_ok
Shorten dX at the walls: done
CD08
adj_dY_for_out_of_bounds
Shorten dY at the walls
CD17
clip_dY_to_walls
Shorten dY at the walls: distance from the centre
CD21
clip_dY_test
Shorten dY at the walls: test and shorten
CD32
dY_ok
Shorten dY at the walls: done
CD33
calc_2d_info
Work out an object's screen rectangle
CD43
store_2d_size
Store the sprite's width and height
CD4D
set_draw_objs_overlapped
Mark every object the moving object's old or new rectangle touches
CD6C
union_right_edge
Union rectangle: right-hand edge
CD7A
union_width_bottom
Union rectangle: width, and the lower edge
CD87
union_top_edge
Union rectangle: the upper edge
CD99
union_height
Union rectangle: the height
CD9B
test_overlap_obj
Test one object against the union rectangle
CDB3
overlap_x_decided
Horizontal overlap decided
CDBC
overlap_y_decided
Vertical overlap decided: mark the object
CDC2
next_overlap_obj
Next object for the overlap test
CDCC
obj_starts_left
Object starts to the left of the union
CDD3
obj_starts_below
Object starts below the union
CDDA
upd_32_to_47
Object types 32 to 47: the knight's head
CDDF
upd_64_to_79
Object types 64 to 79: the werewolf's head
CDE2
upd_player_top
Update the player's head
CDEF
head_follows_legs
The head follows the legs
CE14
choose_head_sprite
Choose the head sprite
CE22
set_top_sprite
Set the head's sprite
CE27
head_on_shoulders
Put the head on the shoulders
CE33
head_frame_six
Head frame 6
CE3A
hold_head_frame
Hold the chosen head frame
CE40
head_frame_seven
Head frame 7
CE49
save_2d_info
Remember an object's screen rectangle
CE62
list_objects_to_draw
List the objects to be drawn this frame
CE72
list_test_obj
Test one object for the draw list
CE80
list_next_obj
Next object for the draw list
CEBB
calc_display_order_and_render
Draw the listed objects, back to front
CEC3
process_remaining_objs
Start a pass: find the first object not yet drawn
CEC6
skip_drawn_entries
Skip entries already drawn
CEDB
compare_next_obj
Compare the candidate with the next undrawn object
CF15
z_code_overlap
Z code: the boxes overlap in height
CF16
compare_along_y
Compare the boxes along Y
CF39
add_y_code
Add the Y code
CF3C
compare_along_x
Compare the boxes along X
CF5F
add_x_code
Add the X code
CF62
act_on_comparison
Act on the comparison
CF9F
order_unconstrained
Pair with no order between them
CFA2
candidate_already_first
Candidate is behind the other object
CFA5
iy_goes_first
The other object must be drawn first
CFAD
search_chain
Search the candidate chain
CFB8
iy_becomes_candidate
IY becomes the candidate
CFCE
break_order_cycle
Break a cycle in the order
CFD1
find_iy_entry
Find IY's entry and draw it
CFE1
objs_coincide
Two boxes occupy the same space
CFF0
check_iy_collectable
Is the other one a collectable?
CFFD
coincide_done
Continue after two boxes intersect
D000
render_obj_no1
Draw the candidate
D003
render_obj
Draw an object and start the next pass
D015
render_done
All listed objects drawn
D022
check_user_input
Read the controls
D03E
interface_ii
Interface II joysticks
D046
reverse_if2_bits
Reverse the 1 to 5 bits
D05C
if2_up
Interface II up
D062
if2_down
Interface II down
D068
if2_right
Interface II right
D06E
if2_left
Interface II left
D074
if2_done
Interface II done
D077
kempston
Kempston joystick
D081
kempston_left
Kempston left
D087
kempston_down
Kempston down
D08D
kempston_up
Kempston up
D093
kempston_fire
Kempston fire
D099
kempston_done
Kempston done
D09C
cursor
Cursor keys
D0A9
cursor_second_row
Cursor keys: the 6 to 0 half-row
D0B4
cursor_up
Cursor up
D0BA
cursor_right
Cursor right
D0C0
cursor_down
Cursor down
D0C8
keyboard
Keyboard
D0E4
keyboard_m
Keyboard: M
D0EA
keyboard_n
Keyboard: N
D0F0
keyboard_b
Keyboard: B
D0F6
keyboard_forward
Keyboard: walk forward
D0FF
keyboard_jump
Keyboard: jump
D108
keyboard_pickup
Keyboard: pick up and drop
D111
finished_input
Finish reading the controls
D125
store_input
Store the control bits
D12A
lose_life
Start a life
D1B1
init_start_location
Set up the player for a new game
D1E6
build_screen_objects
Build the room the player is in
D1EF
build_room
Fill the object table for the new room
D219
flag_room_visited
Mark the player's room as visited
D237
transfer_sprite
Copy a sprite's four bytes into the drawing record
D24C
transfer_sprite_and_print
Copy a sprite's four bytes and draw it
D255
display_panel
Draw the scroll-work at the foot of the screen
D296
print_border
Draw the border round the play area
D2EF
colour_panel
Colour the sun and moon window's frame
D30D
colour_sun_moon
Colour the sun or the moon
D317
fill_sun_moon_colour
Fill the window's colour
D320
adjust_plyr_xyz_for_room_size
Put the player in the doorway he came through
D33F
enter_arch_s
Enter through the south arch
D34A
adjust_plyr_y
Set the player's Y
D34D
plyr_redraw_copy_xy
Redraw the player and line the head up with the legs
D362
enter_arch_n
Enter through the north arch
D36F
enter_arch_w
Enter through the west arch
D37A
adjust_plyr_x
Set the player's X
D37F
enter_arch_e
Enter through the east arch
D38C
adjust_plyr_Z_for_arch
Stand the player on the floor of the arch
D395
check_next_arch
Look at the next arch
D3A9
adj_plyr_Z
Take the arch's Z
D3B5
get_ptr_object
Object index to record address
D3C6
retrieve_screen
Build the objects of the room the player has entered
D3CF
find_screen
Find the room's record
D3E2
zero_end_of_graphic_objs_tbl
Clear the object records from DE to the end of the table
D3F0
found_screen
Take the room's colour and size from its record
D41E
next_bg_obj
Next background in the room's list
D432
next_bg_obj_sprite
Copy one background template into an object record
D44C
find_fg_objs
Start on the room's foreground objects
D452
next_fg_obj
Read a foreground group: its type, count and first location
D46B
next_fg_obj_in_count
Place one more of the same type
D46C
next_fg_obj_sprite
Build one object record from a foreground template and a location
D4CD
zero_fg_obj_tail
Clear the rest of a foreground record, then carry on
D4EA
end_of_fg_objs
The room record is used up
D4F2
add_HL_A
Add A to HL
D4F9
HL_equals_DE_x_A
HL = DE * A
D4FF
mult_step
One bit of the multiply
D504
mult_next_bit
Next bit of the multiply
D508
zero_DE
Clear B bytes at DE
D509
fill_DE
Fill B bytes at DE with A
D50E
handle_pause
Pause if SPACE is pressed
D519
debounce_space_press
Wait for SPACE to be let go, then sound
D525
wait_for_space
Paused: wait for SPACE again
D52E
debounce_space_release
Wait for SPACE to be let go, sound, and carry on
D53A
clr_mem
Clear BC bytes at HL
D53C
clr_byte
Fill BC bytes at HL with E
D544
clr_bitmap_memory
Clear the display bitmap
D54C
clr_attribute_memory
Set every attribute to bright yellow on black
D556
fill_attr
Set every attribute to A
D55F
clear_scrn
Clear the screen and make the border black
D567
clear_scrn_buffer
Clear the screen buffer
D56F
update_screen
Copy the whole buffer to the display, clearing it as it goes
D578
update_screen_row
One row of the whole-screen copy
D57B
update_screen_byte
Copy and clear a row, then step to the display line above
D59A
update_screen_next_row
Next row of the whole-screen copy
D59F
render_dynamic_objects
Redraw what changed and copy it to the display
D5B2
wipe_next_object
Wipe the next object that moved
D5DB
wipe_right_edge
Find the right edge of the area to wipe
D5F6
wipe_width
The width of the area, and its bottom edge
D60B
wipe_top_edge
Find the top edge of the area to wipe
D61C
wipe_height
The height of the area, cut off at the top of the screen
D62C
wipe_rect
Wipe the area in the buffer and remember it
D649
wipe_left_is_new
The new x is the further left
D64E
wipe_bottom_is_new
The new y is the lower
D653
draw_and_copy_rects
Draw the objects, then copy the wiped areas to the display
D666
copy_next_rect
Copy the next wiped area to the display
D679
copy_rects_done
All copied
D67C
blit_to_screen
Copy a rectangle of the buffer to the display
D69A
blit_next_row
Next row of the rectangle
D69E
build_lookup_tbls
Build the lookup tables
D6A0
shift_tbl_value
Start on one byte value
D6A7
shift_tbl_entry
Store the value shifted one place further
D6BB
reverse_tbl_value
Start reversing one byte value
D6BE
reverse_tbl_bit
Move one bit across
D6C9
calc_pixel_XY
Project an object's position onto the screen
D6EF
flip_sprite
Find an object's sprite and make it face the right way
D704
calc_pixel_XY_and_render
Draw one object from the render list
D710
project_and_draw
Project the object and draw it if it is on the screen
D718
print_sprite
Draw an object's sprite into the buffer, through its mask
D73C
patch_sprite_rows
Patch the row loop for this width, and cut the height to the screen
D75A
draw_sprite_rows
Draw the rows
D76F
sprite_aligned
The byte-aligned case, and the start of its unrolled run
D790
sprite_aligned_tail
The last three units of an aligned row
D7AA
sprite_row
Start a row
D7AC
sprite_row_jump
Jump into the row, then the shifted run
D7FF
sprite_row_end
Step to the row above
D800
sprite_next_row
Move BC up a row, and loop
D811
calc_vidbuf_addr
Buffer address of a pixel position
D826
calc_vram_addr
Display address of a pixel position
D848
calc_attrib_addr
Attribute address of a pixel position
D865
vflip_sprite_data
Turn a sprite's stored data to face the way its object wants
D88C
vflip_row_pair
Swap the next pair of rows
D88D
vflip_sprite_line_pair
Swap two rows byte by byte, working backwards
D8A2
hflip_sprite_data
Mirror the sprite if its object wants it the other way round
D8BF
hflip_read_row
Push a row's pairs, each byte reversed
D8CD
hflip_write_row
Write the row back in the reverse order
D8DC
flip_done
Return with DE on the header