# TMNT (MAME set 'tmnt', World 4 Players, version X) - 68000 program symbols
#
# Addresses and names only: no game data lives in this file.
# Format:  ADDRESS  KIND  NAME  [LAYOUT]   [# comment]
#   KIND: func = function entry, code = code label, data = data label
# Addresses are the 68000's, 000000-05FFFF (the program has no mirrors).
#
# LAYOUT, for data tables that hold code addresses the analysis cannot see the code load
# (tools/core/m68000/analysis.py reads record=, code= and count=):
#   record=N        the table is an array of N-byte records
#   count=N         ... of N records
#   code=A          every record holds a 32-bit code address at offset A
# Sizes, offsets and counts are decimal.
#
# The analysis starts at the exception vectors (the reset at 001000, the VBLANK's IRQ5 at 003DC4) and finds the
# code without traces, following what the address registers hold into the tables of handlers; the lines here
# are what it cannot work out, each with how it was found (kref --jumps: where a jump through a register went).

# ======== tables of records with a code address ========

# four records of three work RAM addresses and a handler, which the loop at 004722 walks from the last one:
# 00475E calls the handler (kref --jumps: 00475E -> 0048B2, 0048E6, 00491A, 00494E)
0047C8  data  channel_records  record=16 code=12 count=4

# nozzle_row_run's routines by nozzle_status, 0-2 (0109F8 "lea $10a0e.l, A6", 010A06 "movea.l (A6,D7.w), A6"): three,
# the code of the first follows them (010A1A "bsr $1831e", whose 6100 7902 read as a fourth entry made 007902 a function)
010A0E  data  nozzle_row_routines  record=4 count=3 code=0

# ======== the C's files ========
# ADDRESS file PATH  # description: the functions from ADDRESS up to the next file line go to src/PATH.c (a file may
# take several stretches)
001000  file  system/boot         # the reset, the RAM and ROM tests, and the main loop that runs the jobs the frames queue
00193E  file  system/test_mode    # the exceptions' handler and the test mode's pages: the RAM and ROM check, the mask ROM check, the inputs, the sounds, the DIP switches
001E98  file  video/texts         # the texts: from the program's tables of texts into the fixed layer, big characters, numbers
003B5C  file  system/frame        # the VBLANK interrupt: the inputs, the frame's work, the game's states and the job queue
00467C  file  scenes/demo         # the players' inputs, the demos' recorded ones, and the demo game
004982  file  scenes/attract      # the attract mode's steps: the title, the coin's screen, the opening's steps, a character's profile, BEST 10 PLAYERS, its end
004CA4  file  scenes/demo         # (the demo game)
004EC4  file  scenes/attract      # (a character's profile and the attract mode's end)
0056C2  file  system/test_mode    # (the test mode's pages)
0061CE  file  scenes/game         # the game's scenes: a new game, the players' turtles, an area's set-up, its story and title screens, the play, the area's exit
006BE4  file  scenes/ending       # the ending after the last boss: the Technodrome explodes, the epilogue, the staff roll, GAME OVER
00781E  file  scenes/continue     # the continue's countdown and the GAME OVER after it
007B0C  file  scenes/ranking      # the ranking after a game: the players' places, their columns, the name entry, and the ranking's defaults
00843E  file  system/animation_viewer    # an unused viewer of the objects' animations with their palettes, worked with the players' buttons
0088C0  file  scenes/attract      # (the coin's screen, the opening's steps, BEST 10 PLAYERS; the turtles' pictures and the scroll reset the scenes share)
0091A4  file  system/sound_commands    # the commands to the sound board, queued and sent one a frame
009242  file  video/palettes      # the palettes: requests queued and done a frame later, the palette effects
009C18  file  system/palette_editor    # an unused colour editor for the palette RAM, worked with the first player's joystick
00DF7E  file  objects/krang       # Krang's android body (area 9), his fist, his lasers and the curtain he appears behind
00F8DA  file  objects/scenery     # the areas' scenery and traps: balls, hydrants, signs, rats, oil drums, turrets, nozzles, electric beams, spiked poles, the parked car
010ED0  file  objects/explosions  # the explosions other objects start
011116  file  objects/scenery     # (the sewer's spiked poles and missiles)
01154E  file  objects/rock_soldiers    # the two rock soldier bosses (areas 7 and 8), their shots, bars and rubble
011DFA  file  objects/helpers     # small routines the objects of these files share: their stats, moves, free objects, the bosses' targets
011F32  file  objects/rock_soldiers
012A2E  file  objects/scenery     # (the parked car of area 4 and its soldiers)
012D4E  file  objects/air_attacks # the helicopters of the skateboard ride, the missiles that fall on idle turtles, the flying drones
013C32  file  objects/stockman    # Baxter Stockman (area 3) and the Mousers he drops
0180E0  file  objects/helpers     # (set_object_stats to remove_object)
018334  file  video/tile_blocks   # blocks of tiles drawn into the layers, and texts typed a character at a time
0184D2  file  objects/helpers     # (boss_direction_to_target, place_at_object)
018588  file  video/tile_blocks
019B3A  file  objects/turtles     # the turtles: joining the game, the area's start and entry, and every turtle's frame: the controls, the moves and the scroll they push, the jumps, the attacks, the hits and the floor map's walls
01A704  file  stage/scroll        # the areas' scroll segments: the layers' limits and speeds
01A876  file  stage/area_clear    # the checks for the end of each area: the scroll locked, every player ready and no enemy left, then the area cleared
01AB2C  file  objects/turtles     # (turtle_collide to the turtles' walls)
01ACDA  file  stage/scroll        # (auto_scroll)
01ADA0  file  objects/turtles
01DE3E  file  stage/floor_map     # the floor map's cells around an object, for the turtles, the enemies and the missiles
01E050  file  stage/layers        # the areas' layers: their maps of blocks drawn as the scroll goes on
01FDCA  file  stage/fire          # the fire's tiles redrawn in the first two areas
02B25C  file  scenes/area_exits   # the areas' exits: the turtles walk out, and the cutscenes between the areas (Shredder takes April, the villains' picture, the van, April's thanks, the van's crash, Splinter freed)
02F5F0  file  stage/scroll        # (the time played, and the scroll held while the screen has too many enemies)
02F790  file  scenes/opening      # the attract mode's opening: the city at night, the manhole, the turtles leap out, their four pictures
02FF44  file  scenes/area_exits   # (the Technodrome's screen: area 7's exit and the ending)
02FFDA  file  video/speech_balloons    # the speech balloons in the fixed layer with their speeches, and the lines said with them
0303CE  file  stage/drill_arrival     # the drill pod that comes down through the ceiling in areas 1 and 7 and lets out Rocksteady or the flying drones
0308D6  file  scenes/intro        # the story before area 0: the rooftop, "Fire!!", the climb, the burning roof
031230  file  scenes/area_exits   # (clear_layers: the three layers cleared between the scenes' screens)
046EEA  file  engine/sprites      # the sprite engine: the objects' animations, their sprites into the K051960, their boxes
04791E  file  objects/spawns      # the enemies' spawn lists, by the scroll
047BF2  file  engine/sprites      # (setting an object's animation)
047D98  file  engine/directions   # the direction from one object to another
048236  file  objects/states      # the objects' state dispatcher and the objects' handlers (provisional: by subject later)

# ======== the boot ========
# the ROM test: sums every other byte of each area of the table at 0016CC into the work RAM from 060018, a word an
# area, writing the watchdog after each block; it keeps its return address in A6 (the boot has no stack yet: it
# tests the RAM). The board puts its own in its place (runtime/replaced.txt): the game has no ROM chips to sum
001850  func  sum_program_chips

# ======== the sprite engine ========
# An object (0x50 bytes in work RAM, 062000 on) shows an animation: +36 holds where its frame is, +33 how many
# more frames to show it. tools/data_walk.py walks the animations, their sprite lists and boxes from what the
# code hands set_animation (its A6), as these functions read them.

# A6 -> +36 of the object in A0, and the frame's count (+ the object's +43) -> +33; every animation starts here
047BF2  func  set_animation
# steps the object in A0 on to its animation's next frame when +33 runs out, without drawing it
0471AE  func  step_animation
# every object of the draw list (061400) into the K051960's sprite RAM (140400): its frame's sprites, its
# shadow sprite (+3A, when +1 has bit 7), and the animation stepped on
046F92  func  draw_sprites
# 8 sizes of 8 bytes, by the top 3 bits of a sprite's code: the bounds draw_sprites keeps a sprite of that
# size on screen by (046FDC "lea $4716e.l, A6", 046FF4/047004/04701C read them)
04716E  data  sprite_sizes
# 4-byte records (half the width, the height) at the offset a frame gives (+6): the collision code reads them
# (047268 "lea $53756.l, A3"; 047534 and 047662 the same)
053756  data  body_boxes

# ======== the layers' maps ========
# A layer (the K052109's tile layers) is drawn from a map: rows of 16-bit offsets into a table of blocks, a block
# 4 x 4 tiles (17 bytes: a colour byte, then the 16 tile codes; 33 with a floor: the colour, 16 bytes of the floor
# map at 061800, the tiles). tools/data_walk.py walks them from area_layers and from the maps the code stores.

# 10 records of 36 bytes, by the area (060121): layer A's x and y (32-bit), layer B's, A's map and blocks, B's
# map and blocks, A's map width in bytes and B's (01E258-01E2B6 copy them into 063340 and 063380)
01E5A0  data  area_layers  record=36 count=10 data=16,20,24,28

# ======== the palettes ========
# D7 = kind << 8 | the banks' mask, A6 = the data: queued at 060B00 (6 bytes a request), and done by 009272
# a frame later (the kinds' handlers, by 009310)
009242  func  post_palette_request
# 16 colours from each palette of the list in A6 (D7 + 1 of them) into the palette RAM at A5
0095E6  func  copy_palette_list
# the palette lists' counts less one, a byte a bank (0095E6's D7: 00938A "move.b (A5,D6.w), D7")
0095D2  data  palette_bank_counts
# where each bank starts in the palette RAM (0093A8 "movea.l (A5,D6.w), A5" after "movea.l #$95d6, A5")
0095D6  data  palette_bank_addresses  record=4 count=4 data=0
# a palette set (4 lists, a bank each) by the area: request kind 1 (00935A "movea.l #$9f56, A6", then the area)
009F56  data  area_palettes
# A5 = palette sets one after the other, D6's high byte = the banks: kept at 063414 and 063418 (02F8F4 "lea $a0ae.l,
# A5", D6 = $0C02); over the next frames (063411 the step) the palette RAM is read into 063800, moved a step toward
# the sets and written back: a fade, not a copy (tools/data_walk.py looks the function up by this name)
00961C  func  copy_palette_sets
comment copy_palette_sets the palettes faded toward a list of palette sets, over the next frames

# ======== the enemies ========
# the area's spawn list (area_spawn_lists) -> 061200, its scroll variables -> 061210 and 061214, its start -> 061218
04791E  func  start_area_spawns
# every frame: the next enemy of the spawn list (061200) when the scroll (061218) reaches its x, into a free object
047A32  func  spawn_enemies
# A1 = spawn_offsets' record for the kind of the spawn record in A0
047B98  func  spawn_offset
# A2 = the first free object (flags 0) of the group the spawn record's flags pick (+5 bits 4-5: 047BB0 "andi.w #$30,
# D0", object_groups and object_group_counts), Z set when there is one (047BCC "tst.b ($0,A2)")
047BAC  func  take_free_object
# an address an area (060120): its spawn list (04792E "move.l (A0,D0.w), $61200.l" after "lea $4796a.l, A0")
04796A  data  area_spawn_lists  record=4 count=10 data=0
# two work RAM addresses an area: the scroll variables spawn_enemies follows (04793E, 04794A)
047992  data  area_spawn_scrolls
# an area's start of the spawn scroll, x and y (16.16) -> 061218, 06121C (047958, 047960)
0479E2  data  area_spawn_starts
# 4 bytes by an enemy's kind (the low 7 bits of a spawn record's +7): its x from the spawn point (047AF2)
053A5E  data  spawn_offsets

# ======== the fire ========
# areas 0 and 1 (the burning building, April's apartment): the fire's blocks redrawn in the tile RAM, a frame
# every 4 frames of the game (060121 picks the table: 01FEBA in area 0, 01FF1C elsewhere)
01FDCA  func  animate_fire_tiles
0203D2  data  fire_tiles_area_0
0200F2  data  fire_tiles
# the blocks the fire's frames give offsets of (01FED2/01FF34 "lea $32312.l, A1")
032312  data  fire_blocks
# the effects of the list in A6 (a count, then their addresses) into free slots of 060480 (10 bytes each)
00987E  func  start_palette_effects
# every frame: each effect's step on when its count runs out (colour cycles, flashes)
009902  func  step_palette_effects

# ======== the tile blocks ========
# the block in A6 (its width and height less one, then its tiles: code and colour) into the tile RAM at the
# address tile_block_places gives for D7
0183FA  func  draw_tile_block
0187BC  data  tile_block_places
# an object's tile block by its kind (+3): the offset into object_tile_blocks (04CBFC "lea $4cbb4.l, A6")
04CBB4  data  object_tile_block_offsets
# 10 bytes each: the object's +20 and +46, the tile block draw_tile_block draws (04CC82 "movea.l (A5)+, A6"),
# its place (D7) and its frames (+46: 0, the last)
04CBC0  data  object_tile_blocks  record=10 count=6 data=4
# 12 bytes by an object's kind (04CD8C "lea $4cd44.l, A6" + the kind's offset): its +20, two places (D7) and
# the two tile blocks draw_tile_block draws there (04CDBE, 04CDCE)
04CD44  data  object_tile_block_pairs  record=12 count=5 data=4,8

# ======== tables of numbers ========
# the direction (D0: bits 6-7 the quadrant, the rest from direction_table) from the object in A0 to D1, D2
047D98  func  direction_to
# 32 offsets of 16 bits, a row of direction_table each (047DE0 "adda.w (A4,D2.w), A5")
047DF6  data  direction_rows
# 32 x 32 bytes: the direction within the quadrant, by dy and dx scaled to under 32 (047DE4)
047E36  data  direction_table

# ======== the texts ========
# the text D7 of a table into the fixed layer (001EB2 on: '/' a new line at the address after it, '?' the end;
# bit 9 of D7 another colour)
001EAC  func  print_game_text
001E98  func  print_demo_text
001EA2  func  print_test_text
# "PLAYER ONE", "THE END", "PRESS START", "ONE PLAYER ONLY"...
00292A  data  game_texts
# "PRESS START DEMO", "OPENING DEMO", "TITLE DEMO", "CHARACTER INFORMATION"...
0030AE  data  demo_texts
# the test mode's: "IO READ TEST", the inputs, "COLOR TEST"...
005E1E  data  test_mode_texts
# the text D6 of positioned_texts into the layer text_layer_places gives for D7 (& 3), at the offsets it holds
00275E  func  print_text_at
0035AC  data  positioned_texts
0027A2  data  text_layer_places
# the character D7 of big_font (36 bytes: 9 rows of 8 cells, a nibble each) drawn in tiles: big_font_tiles by the
# nibble, from big_font_place (a tile RAM address); text_colours, a colour by D7 (00280C)
0027B2  func  draw_big_character
002802  data  big_font_place
002806  data  big_font_tiles
00388C  data  big_font
001F1A  data  text_colours

# ======== the scroll ========
# the area's scroll segment at 0633C0 (a word, 4 a segment) into the layers' limits and speeds
01A704  func  start_scroll_segment
0205F2  data  area_scroll_segments
# the picture in layer A (13 rows of 24 tiles: 01F94E-01F95A): each tile's colour byte plus D5 to the even address
# (01F952-01F956), the chip's colour and code bank, then its code to the odd one (01F958)
01F93C  func  draw_screen_picture
01FAA8  data  screen_picture_colours
01F970  data  screen_picture_tiles

# ======== the demos ========
# the demo 0600B6: its area and settings, and its players' input streams (004D70-004D88 -> 0600AA, 0600AE,
# 0600D2, 0600D6), which play_demo_inputs (004714 on) reads a pair of bytes at a time
004D2E  code  start_demo
004E88  data  demo_settings
004E94  data  demo_inputs
# ======== the typed texts ========
# a text typed a character at a time (the story's screens): A6 its first line's header (the tile RAM address, the
# frames between characters, a colour), into 063420-06342B; 018340 types it on, '/' a new line, '!' the end
0183B6  func  start_typed_text
# the same for one of several at once (the record in A4: 0185D2 types it on)
01863A  func  start_typed_line

# ======== unused ========
# unused: no code reads it (no reference, no read in the scenarios); its 307 entries are all animations, the
# ones the code starts and 25 more no code reaches
05D03A  data  unused_animation_list

# ======== code no path reaches ========
# routines the analysis does not reach from the vectors and the tables, and no scenario runs: they decode to a
# return or a jump, or run on into code the analysis knows (each one unknown bytes in coverage.py until here)
001D9E  func  add_mask_rom_bits_to_sums
003DAA  func  fill_tile_column
004068  func  run_on_into_set_screen_flip
0044EE  func  queue_player_boxes
# copies the 8 sprites at 005294 into the K051960's sprite RAM (140400)
005266  func  copy_sprites_and_fill_layer_b
005C0C  func  lone_return_before_dip_switch_page
005CF6  func  show_free_play_setting
# The name is contradicted: the analysis reaches it now through attract_best_players' table at 008E6A (its entry 1,
# 008E54 "lea $8e6a.l, A6"), and the attract scenario runs it (index.txt: 6/6 ran, attract frames 2784-3040).
# BEST 10 PLAYERS' scene 1, by its step (008F7E "lea $8f94.l, A6", 008F84 "move.b $60007.l, D7")
008F7E  func  best_players_show
009264  func  post_palette_request_list
# two longs after game_step_palettes (009A5C "lea $9a7c.l, A6"), which no code reads: 0000D2C4 and 0000D2E6, the
# game over's palette effect lists (007A52 "lea $d2c4.l, A6", 007A5E "lea $d2e6.l, A6"); the line here made them a routine
009AA0  data  unused_game_over_effect_lists
00E364  func  lone_return_before_krang_explode_next
01845E  func  show_spawn_scroll_place
01AC7E  func  jump_to_read_floor_cells
047B1C  func  spawn_enemy_level_with_scroll
047D0E  func  speeds_from_direction_unscaled
048480  func  enemy_target_distance_band
# the hammer soldier's flinch hunched over: a table of states like its neighbours' (its start, then enemy_flinch_end),
# which no code loads: enemy_flinch_hunched_hammer hands run_object_state the flinch back's (04B70A "lea $4b6ce.l,
# A6"); the line here took the table for code
04B716  data  enemy_flinch_hunched_hammer_states  record=4 count=2 code=0
04B71E  func  enemy_flinch_hunched_hammer_start
04BF5A  func  shuriken_struck_without_sound
# the analysis reaches it now: the bullet's table of states (04BFBE, kind 5F) is start, fly, vanish, FFFFFFFF (no state
# 3) and this, state 4, struck, which the attack checks give what they strike (0472CE, 0473D6, 0474E6 "move.w #$400,
# ($4,A1)"); the profile's TABLE_UNUSED_ENTRIES. No scenario runs it: the checks strike only an object with bit 1 of its
# flags (04723E, 047458 "btst #$1, ($0,A1)"), which the bullet never has (04BFF2 "ori.b #$85, ($0,A0)"; the
# shuriken's start, 04BF0A "ori.b #$86, ($0,A0)", has it)
04C086  func  rocksteady_bullet_burst

# ======== tables of records symbols.txt describes for the walk ========
# 4 records of an animation and a word for +1C of four objects the loop at 030DCA starts ("movea.l (A5)+, A6",
# "move.w (A5)+, ($1c,A0)" after "lea $30dfc.l, A5")
030DFC  data  intro_object_animations  record=6 count=4 data=0
00218A  func  word_to_decimal_digits
0025C8  func  draw_box_frame_by_rows
00456A  func  clear_players_and_ram
004620  func  zero_ram_below_object_0
0099B4  func  stop_every_palette_effect
# unused: a colour editor no code calls, a frame's step by 063408 (009C20 "move.b $63408.l, D0", 009C28 "movea.l
# (A2,D0.w), A2"): the first player's joystick (009C86 "move.b $a0003.l, $6.w") picks one of six numbers (063404) and
# changes it: the bank, the palette and the colour of a palette RAM entry, and that colour's three parts, written
# into the palette RAM (009DA2 "movea.l #$8000c, A4") and shown in tiles
009C18  func  palette_editor
# its first step: the page (009C38 "lea $9c5c.l, A5", 009C3E "bsr $4184"), the numbers cleared (009C48 "clr.l (A6)")
009C38  func  palette_editor_start
# every 4 frames (009C6A "andi.w #$3, D0"): the numbers drawn, left and right pick one (009C9A "btst #$1, D0", 009CBA
# "btst #$0, D0"), up and down change it (009D0E "btst #$3, D0", 009D26 "btst #$2, D0"); a colour's part into the
# entry and into the palette RAM (009DA8 "move.b D1, ($3,A6)", 009DAC "move.b D1, ($3,A4)")
009C64  func  palette_editor_frame
# the chosen entry's colour into the palette RAM's colour 6 (009DC0 "move.b ($1,A6), $8000d.l")
009DBC  func  palette_editor_show_colour
# the numbers in tiles (009DD2 "movea.l $9f1a.l, A6"), the colour's three parts (009E40 "bsr $9ea2", 009E4A "lsr.w #5,
# D1"), the one picked in another colour (009E7E "move.b #$1f, ($1,A6)", 009E9A "move.b #$10, ($1,A6)")
009DD2  func  palette_editor_draw
# a colour's part (5 bits) as two digits (009EA4 "andi.w #$1f, D3", 009EBE "movea.l #$9f46, A5")
009EA2  func  palette_editor_draw_part
# the palette RAM entry picked: the bank's address (009ED2 "lea $9efa.l, A6"), plus 64 a palette and 4 a colour (009EEA
# "lsl.w #6, D7", 009EF4 "lsl.w #2, D7")
009ED2  func  palette_editor_entry

comment palette_editor Unused: a colour editor for the palette, run a step at a time
comment palette_editor_start Unused: the colour editor's page, its numbers cleared
comment palette_editor_frame Unused: the joystick picks one of the colour editor's numbers and changes it
comment palette_editor_show_colour Unused: the colour picked is shown
comment palette_editor_draw Unused: the colour editor's numbers drawn, the one picked in another colour
comment palette_editor_draw_part Unused: a part of a colour drawn as two digits
comment palette_editor_entry Unused: the palette entry the colour editor's numbers pick
0186E2  func  start_wide_box_opening
030062  func  say_speedy
0492EC  func  enemy_retreat
00462E  func  zero_ram_below_object_12
03006C  func  say_zappy
00463C  func  zero_ram_below_object_24

# ======== the enemies' definitions ========
# 9 records of 136 bytes, one an enemy kind: an object's +24 points at its kind's (048A2C, 04ACFC... store them);
# +4 four chances (048D26 "move.b ($4,A6,D6.w), D6"), +28 on 12-byte records of its attacks (048D16 reads +8 of
# them), +58 a byte by the player's direction (048E9A "tst.b (A6,D1.w)" after "adda.w #$58, A6")
053EFE  data  enemy_definitions
# unused: no code names or reads it (no reference, no read in the scenarios): the addresses of 8 records of 104
# bytes (054406 on), 32 bytes all of them point at (+40), and the records: an older shape of enemy_definitions
0543C6  data  unused_enemy_definitions
00464A  func  zero_ram_below_object_4
# the test mode's page 5, COIN COUNTER TEST, by its steps (0059F8 "lea $5a12.l, A6", 0059FE "move.b $60007.l, D7"):
# unused, page 5 goes on to page 6 at once (skip_coin_counter_test)
0059F8  func  coin_counter_test_page
comment coin_counter_test_page Unused: the test mode's coin counter test
004658  func  zero_ram_below_object_32

# ======== the areas' settings (006710-006766, by the area 060121) ========
# the K052109's tile banks, registers 1D80 and 1F00 (2 bytes an area: 006746, 006756)
00676E  data  area_tile_banks
# the layers' priority -> 0C0001 (00671E)
006782  data  area_layer_priorities
# whether the turtles come into the area without blinking, a byte an area (006736 "move.b (A6,D7.w), $60127.l"): 1 in
# stage 0 only; renamed from area_settings_060127 (batch 4: entry_without_blink is what it sets)
00678C  data  area_entry_without_blink

# ======== the game's structures ========
# struct and field lines (tools/core/disassemble.py load_names): a structure's fields by their offset (hexadecimal)
# and type; a struct name after the type says the field points at one (u32 its address; u16 the low half of a work
# RAM address, which the code puts in the work RAM's page). The work RAM and the program's data run the other way
# round in the host's memory, so ram.h declares the fields from the structure's end (decompiler/pointers.py,
# REVERSED). A field nothing names here is unk_XX in the C, at the width the code uses it most.

# An object: 0x50 bytes, 50 of them from 062000 (the profile's STRUCT_ARRAYS: 046F08 walks 0x32 of them 0x50 apart);
# the first four are the turtles, the object loop (0477EA) runs the rest from 062140
struct object 50
# bit 7 drawn (046F22 "tst.b ($0,A0)" bmi: into the draw list), bit 6 its sprites flipped across (draw_sprites 046FEC
# "lsl.b #1" then bpl: a turtle faces left, an enemy right, 0485D6-0485E6), bit 4 it stands on another object (the
# collision check 0475F2 "ori.b #$10, ($0,A0)"), bit 3 its attack hit (0472D4 "bset #$3, ($0,A0)"), bit 2 attacking
# and bit 1 can be hit (047224, 04723E: the attack check), bit 0 in use (spawn_enemies 047ABA "move.w #$100, ($0,A2)")
field object 00 flags u8
# what it touches: bit 0 it stands on the floor or on an object, bits 1-4 a side blocked by the floor map (061800)
# or by a solid object (the collision checks 047632 "or.b D1, ($1,A0)"; move_object_blocked tests them), bit 7 in
# the air, which draws its shadow sprite (+3A: draw_sprites 04709E "tst.b ($1,A0)" bpl)
field object 01 contacts u8
# the kind: its low 7 bits pick the kind's routines in the object loop (0477EA: "(+2 & 0x7F) << 2" into the table
# at 053896); spawn_enemies sets it from the spawn record (+6)
field object 02 kind u8
# what the code that starts it gives it: spawn_enemies the spawn record's last byte (047AC0 "move.w ($6,A0),
# ($2,A2)": +6 the kind, +7 this); a foot soldier takes its way in from the high nibble (04DC56 on)
field object 03 parameter u8
# the routine the object loop runs, by the kind's table of routines (0477EA: "+4 << 2")
field object 04 routine u8
# the state the routine's dispatcher (048236) runs, by the table the routine hands it in A6
field object 05 state u8
# the attack it does: its kind in the low 7 bits, bit 7 set when it faces left (0485EC "ori.b #$80, D7" with
# flags bit 6); the attack check gives it to what the attack hits (0472E0 "move.b ($6,A0), ($7,A1)")
field object 06 attack u8
# the attack that hit it (the attacker's attack; the third loop of the attack check turns its bit 7 over,
# 0474FE "bchg #$7, ($7,A1)"): the enemies' hit reactions pick their way by it (048DBA)
field object 07 hit u8
# its health in bars: the attack check takes the attacker's damage off health and, when health runs out, leaves
# health_bars as it is; with none left the hit kills it (0472E6-047314: the player's score, 0472FE "move.w
# #$400, D7"); a knocked-down enemy with no bar left dies (04A1A2 "tst.b ($8,A0)")
field object 08 health_bars u8
field object 09 health u8
# what its attack takes off what it hits (the attack check 0472EA "sub.b ($b,A0), D2", 0472F6 "sub.w ($a,A0), D2")
field object 0A damage u16
# where it is on the screen: draw_sprites adds them to every sprite's x and y (046FF8, 047014)
field object 0C screen_x u16
field object 0E screen_y u16
# its height (8.8): draw_sprites adds its whole part to every sprite's y (04700C "move.b ($10,A0), D2");
# spawn_enemies sets it from the spawn record's height (+4); the jumps add a speed to it
field object 10 height u16
field object 10 height_whole u8
# where it is in the area, 24.8: spawn_enemies sets them to the spawn record's x and y shifted left 8
field object 12 x u32
field object 16 y u32
# its speeds in x, y and height (8.8): what stands on an object whose kind has bit 7 (a platform) moves with it
# (047616 "move.w ($1a,A3), D2", 047620 "move.w ($1c,A3), D2", 04762A "move.w ($1e,A3), D2"); the enemies'
# moves add them (048244 "move.w ($1e,A0), D0", 04824C "move.w ($1a,A0), D0")
field object 1A x_speed s16
field object 1C y_speed s16
field object 1E height_speed s16
# the height of what it stands on: the collision check sets it to the top of the object under it (047600
# "move.b D0, ($32,A0)", with flags bit 4) and clears it when it is off (04754A); 0 the ground
field object 32 floor_height u8
# half its depth in the screen's y: the attack check adds the victim's to the attack's reach in y (047258
# "add.w ($34,A1), D2"), the collision check both objects' (047576); the draw list sorts by screen_y plus it
# (046F30 "move.w ($34,A0), D0")
field object 34 depth u16
# the frames left on the animation's frame (+36): set_animation sets it to the frame's time plus +43, the sprite
# engine steps on when it runs out (0471B6 "subq.b #1, ($33,A0)")
field object 33 frame_time u8
# the animation's frame it shows (set_animation 047BFC "move.l A6, ($36,A0)"; draw_sprites draws its sprites)
field object 36 frame u32 animation_frame
# its shadow's sprite (draw_sprites 0470A6 "movea.l ($3a,A0), A4")
field object 3A shadow u32 sprite
# the next object drawn in the same row of the draw list (046F08 links them; draw_sprites 047154 "move.w ($3e,A0),
# D6" into the work RAM's page)
field object 3E draw_next u16 object
# the routine and state it was in when an attack hit it (the attack check 0472C8 "move.w ($4,A1), ($40,A1)",
# then routine 4); the enemies' hit reaction looks at it (048DD4 "cmpi.b #$3, ($40,A0)")
field object 40 hit_routine u16
# its state byte (Shredder's 052BE2 "cmpi.b #$4, ($41,A0)")
field object 41 hit_state u8
# the colour of its sprites (draw_sprites 047058: negative, each sprite's own; else this one with the sprite's bits
# 0x90); spawn_enemies sets it to FF
field object 42 colour u8
# frames added to every frame's time (set_animation "add.b ($43,A0), D1")
field object 43 animation_delay u8
# the object that hit it (the attack check "move.w A0, ($4c,A1)": the attacker's address, in the page)
field object 4C attacker u16 object
# whether a turtle's combo throws it, bit 7 (01BF7A "tst.b ($4b,A6)" on the object it grabs): every object the engine
# starts has it cleared (spawn_enemies 047AD4 "clr.b ($4b,A2)", start_object_from_record 047C50 "clr.b ($4b,A6)",
# start_shot 047C7E "clr.b ($4b,A6)"), the enemies' starts set it (048A16 "move.b #$84, ($4b,A0)"); the sewer's end
# counts the objects that have it (check_cleared_sewer 01A9AA "tst.b ($4b,A0)")
field object 4B throw u8
# the object its attack hit last (the attack check's second and third loops 0473E6, 0474DC "move.w A1, ($4e,A0)")
field object 4E hit_object u16 object
# the sound a turtle's reaction makes by what hit it (turtle_hit: 01C2DA "movea.l ($28,A0), A6" the turtle's hit_by,
# 01C2DE "move.w ($28,A6), D0", 01C2E2 "lsr.w #2, D0", 01C2E4 "lea $1d556.l, A6" turtle_hit_sounds): an enemy's move
# picks it (enemy 28 move), the debris, rockets, shots and cars keep their own (their families' hit_sound)
field object 28 hit_sound u16

# An animation's frame (data_walk.py: animations): 10 bytes, 18 with an attack box (attack_frame). After the first
# frame, a frame whose time is 0 ends the animation: last_sprite 0 stays on the frame before, else sprites is the
# frame it goes on from (step_animation 0471CE-0471E0)
struct animation_frame 0A rom
# the frames it is shown (0 at the animation's end); its sprites less one (draw_sprites 046FCC: the dbra's count)
field animation_frame 00 time u8
field animation_frame 01 last_sprite u8
# its sprite list (draw_sprites 046FD0 "movea.l ($2,A3), A4")
field animation_frame 02 sprites u32 sprite
# its body box: the offset into body_boxes (the attack check 047264 "move.w ($6,A3), D2", then 04726E)
field animation_frame 06 body_box u16
# its attack box's depth: negative, none (the frame is 10 bytes); else the box's 8 more bytes follow (step_animation
# 0471C2 "tst.w (-$2,A3)" past the 10 bytes, 0471CA past the 8 more)
field animation_frame 08 attack_depth s16
# a frame with its attack box, as the attack check reads it (047204: the attacker's frame)
struct attack_frame 12 rom
field attack_frame 00 time u8
field attack_frame 01 last_sprite u8
field attack_frame 02 sprites u32 sprite
field attack_frame 06 body_box u16
# how far up or down from the attacker it reaches (047254 "add.w ($8,A2), D2" to the screen y's difference)
field attack_frame 08 attack_depth s16
# its x from the attacker (047270, negated when it faces left), half its width (04728C), its height above the
# attacker's (04729C) and its height (0472AA)
field attack_frame 0A attack_x s16
field attack_frame 0C attack_y s16
field attack_frame 0E attack_width s16
field attack_frame 10 attack_height s16

# A sprite of a frame's sprite list (draw_sprites 046FD4-047096, into the K051960's sprite RAM): its size (top 3
# bits) and the high bits of its code, the code's low byte, its colour, its flips (bit 7 across, bit 6 down), its x
# and y from the object's place on the screen
struct sprite 08 rom
field sprite 00 size_code u8
field sprite 01 code u8
field sprite 02 colour u8
field sprite 03 flips u8
field sprite 04 x s16
field sprite 06 y s16

# A sprite size's bounds (sprite_sizes, by the size: draw_sprites 046FDC): the x a sprite must be past to be drawn
# (047004), the y it must be under (04701C), its width (046FF4: a flipped sprite's x less it)
struct sprite_size 08 rom
field sprite_size 00 left s16
field sprite_size 02 bottom s16
field sprite_size 04 width s16

# A body box (body_boxes, at the offset a frame gives): half its width and its height (the attack check 04728C,
# 0472AA)
struct body_box 04 rom
field body_box 00 half_width s16
field body_box 02 height s16

# ======== the structures' pointers where the code works them out ========
# step_animation and draw_sprites walk an animation's frames: past an attack box (8 more bytes), and on from the end
# of an animation to the frame it goes on from, the pointer is a frame again
param step_animation a3 frame animation_frame
local step_animation 0471CA a3 frame animation_frame
local step_animation 0471DC a3 frame animation_frame
local draw_sprites 04712A a3 frame animation_frame
local draw_sprites 04713C a3 frame animation_frame
# draw_sprites: the bounds of the sprite's size (sprite_sizes plus the size times 8)
local draw_sprites 046FE2 a6 size sprite_size
# the attack check reads the attacker's frame with its attack box (it checks attack_depth first)
local check_attacks 04722E a2 attack attack_frame
local check_attacks 047336 a2 attack attack_frame
local check_attacks 047444 a2 attack attack_frame
# the body boxes the attack and the collision checks read: body_boxes plus the frame's offset
local check_attacks 04726E a3 box body_box
local check_attacks 04737A a3 box body_box
local check_attacks 047488 a3 box body_box
local turtle_collide_with_objects 04755C a4 box body_box
local turtle_collide_with_objects 047590 a5 other_box body_box
local enemy_collide_with_objects 04768C a4 box body_box
local enemy_collide_with_objects 0476C0 a5 other_box body_box

# ======== the game's variables in work RAM ========
# ADDRESS var NAME TYPE (tools/core/disassemble.py load_names): a variable of the work RAM, by what the code shows

# the game's states, one inside the other: the VBLANK's frame work runs by game_state (003F78, 0040B4, 004124 for 0,
# 1 and 2; with 3 it leaves out 003B5C and 003D1E), game_state 0's steps by game_step (003F7A, 003FD8 on to the
# next), the scenes by scene (00415E), each scene's steps by scene_step and scene_substep (the scenes' switches)
060001  var  game_state     u8
060003  var  game_step      u8
060005  var  scene          u8
060007  var  scene_step     u8
060009  var  scene_substep  u8
# what the program writes to 0A0001 (coin counters, the sound board's IRQ, IRQ5 on): the boot sets bit 5 (00138A)
# and writes it out (001392); the VBLANK handler clears bit 5 to lower the IRQ5
060058  var  board_control  u8
# the frames: the VBLANK adds one (003DF8); the attack check takes every other one by its bit 0 (04720A); a demo
# keeps it in 0600BE (004D1E) and puts it back (004CAE)
0600A4  var  frame_count    u16
# the demo the attract mode plays (start_demo: demo_settings by it)
0600B6  var  demo           u8
# the four players' recorded inputs in a demo (start_demo 004D70-004D88: from demo_inputs), which the demo's
# play reads a pair of bytes at a time
0600AA  var  demo_inputs_1  u32
0600AE  var  demo_inputs_2  u32
0600D2  var  demo_inputs_3  u32
0600D6  var  demo_inputs_4  u32
# the area the game plays (0-9: start_area_spawns reads area_spawn_lists by it; the demos set it from
# demo_settings), and the stage it is drawn as (0062EE: from the table at 00634D by the area), by which the
# areas' layers, tile banks, palettes, fire and scroll segments are read
060120  var  area           u8
060121  var  stage          u8
# the next record of the area's spawn list (start_area_spawns: from area_spawn_lists; spawn_enemies moves it 8 on
# as each enemy comes in)
061200  var  spawn_next     u32 spawn_record
# the draw list's first row with an object and how many objects it has (046F08 builds it, draw_sprites draws it)
061204  var  draw_first     u16
061206  var  draw_count     u8
# the draw list: a row a depth (the object's depth + screen_y + 0x38, even, below 0x180: 046F30-046F46), each the
# low half of the first object on that row (046F16 "lea $61400.l, A1", 046F80 "move.w A0, (A1,D0.w)"), the others
# chained through their draw_next (046F66 "move.w A0, ($3e,A2)"); draw_sprites walks it to its end (046FB2 "cmpa.l
# #$61580, A1") and clears it as it goes
061400  var  draw_list[192]  u16  object
# the scroll spawn_enemies follows: the address of the two speeds it adds (x, y) and of the two bytes whose bit 7
# says their direction (start_area_spawns: from area_spawn_scrolls), and where the scroll is, x and y in 24.8
# (from area_spawn_starts): an enemy comes in when spawn_x reaches its record's x
061210  var  spawn_speeds      u32 spawn_speed
061214  var  spawn_directions  u32 spawn_direction
061218  var  spawn_x        u32
06121C  var  spawn_y        u32

# ---- the game's steps and their timers ----
# a frame count for the steps of game_state 0 and of the attract mode: startup_wait sets 1 (00401E "move.b D0,
# $60002.l") and startup_end moves to the attract mode when it runs out (00402C "subq.b #1, $60002.l"); the profile's
# pauses (004F1A "move.b #$2, $60002.l") and its text's time (005142 "move.b #$64, $60002.l", 005170 "subq.b #1,
# $60002.l"), BEST 10 PLAYERS' (008FAC "move.b #$ff, $60002.l", 008FB6 "subq.b #1, $60002.l")
060002  var  step_timer  u8
# a frame count for steps that end by moving scene on: MASK ROM CHECK's (0019F0 "move.b #$80, $60004.l", 001A64 "subq.b
# #1, $60004.l", then 001A6E "addq.b #1, $60005.l"), the attract mode's end (005220 "move.b #$1, $60004.l", 005230
# "subq.b #1, $60004.l"), the coin's screen, a count every 64 frames (008A9E "move.b #$a, $60004.l", 008AFA "subq.b #1,
# $60004.l")
060004  var  scene_timer  u8
# the continue's count: 20 at its start (00789A "move.b #$14, $60006.l"), one less each time continue_count_time runs
# out (007922 "subq.b #1, $60006.l") and shown (007928 "move.b $60006.l, D7", 00792E "bsr $27b2"), GAME OVER at 0
# (007910 "tst.b $60006.l"); then GAME OVER's frames (007A3A "move.b #$f0, $60006.l", 007A94 "subq.b #1, $60006.l"),
# which a button cuts short after the first 0x40 (007AD2 "cmpi.b #-$50, $60006.l")
060006  var  continue_count  u8
# the frames to the continue's next count: 0x48 (00791A "move.b #$48, $60008.l", 007906 "subq.b #1, $60008.l"); a
# player without lives who presses a button makes it 1, every 8 frames (00796A "move.b (A6)+, D0", 007974 "tst.w
# ($0,A5)", 00798A "move.b #$1, $60008.l"): the count speeds up
060008  var  continue_count_time  u8
# the step under scene_substep: the staff roll's steps (006ED0 "lea $6ee6.l, A6", 006ED6 "move.b $6000b.l, D7") and the
# ending's GAME OVER's (0070A8 "lea $70be.l, A6", 0070AE "move.b $6000b.l, D7"), moved on by them (006F20 "addq.b #1,
# $6000b.l", 00707E "subq.b #3, $6000b.l" back to the next credit), cleared with the other steps (0069AA "clr.b
# $6000b.l")
06000B  var  scene_subsubstep  u8
# the frames the attract mode's title and opening wait: the banner's 20 (004C02 "move.b #$14, $600a8.l", 004C12
# "subi.b #$1, $600a8.l"), the title's 0xF0 (004C4A "move.b #$f0, $600a8.l"), the opening's 0xB2 (008DCE "move.b #$b2,
# $600a8.l", 008E12 "subi.b #$1, $600a8.l"); in a demo it is also the first player's demo hold (004D90 "move.b #$1,
# $600a8.l"; the table at 0047C8 gives it to update_game_inputs: 00472A "movea.l ($4,A6,D6.w), A4", 00473A "subq.b #1,
# ($0,A4)")
0600A8  var  attract_timer  u8
# frame_count kept while a demo plays: begin_demo keeps it and clears it (004D1E "move.w $600a4.l, $600be.l", 004D28
# "clr.w $600a4.l"), end_demo puts it back (004E16 "move.w $600be.l, $600a4.l")
0600BE  var  saved_frame_count  u16
# the frames a demo has played: 0 at its start (004DB0 "clr.w $600c0.l"), one more a frame (004DCE "addq.w #1,
# $600c0.l"), the demo over at 900 (004DD4 "cmpi.w #$384, $600c0.l", 004DE6 "move.b #$8, $60005.l")
0600C0  var  demo_frames  u16
# a frame count for the game's scenes: the area's title (006560 "move.b #$b4, $600c2.l", 006596 "subq.b #1, $600c2.l"),
# the ending (006CA6 "move.b #$28, $600c2.l"), the staff roll (007034 "move.b #$14, $600c2.l"), the ending's GAME OVER
# (00712E "move.b #$fa, $600c2.l", 00714C "subq.b #1, $600c2.l")
0600C2  var  game_scene_timer  u8

# ---- the job queue, the sound queue ----
# where queue_job puts the next job: written and moved on 2 bytes (004164 "movea.l $60010.l, A6", 00416A "move.w D7,
# (A6)+", 00417C "move.l A6, $60010.l"), back to the queue's start after 0603FF (00416C "cmpa.l #$603ff, A6", 004176
# "movea.l #$60380, A6")
060010  var  job_queue_write  u32
# the next job the main loop runs: it waits while the word there is negative (0013C8 "movea.l $60014.l, A0", 0013CE
# "move.w (A0), D1", 0013D0 "bmi $13c2"), marks it done and moves on (00139E "move.w #$ffff, (A0)+", 0013B0 "move.l A0,
# $60014.l")
060014  var  job_queue_read  u32
# the jobs, job << 8 | parameter (0013D4 "move.b D1, D7", 0013D6 "andi.w #$3f00, D1"), FFFF a free word: all FFFF at
# the boot (00120E "move.l #$ffffffff, D0", 001218 "move.l D0, (A0)+" from 0011FC "lea $60380.l, A0")
060380  var  job_queue[64]  u16
# the jobs the scene waits for: one more when it queues one (003FDE "move.b #$1, $60082.l", 004A14 "addq.b #1,
# $60082.l"), one less when the job is done (001E74 "subq.b #1, $60082.l" clear_layers_job, 001A90 sum_mask_roms), and
# the steps wait for 0 (004008 "tst.b $60082.l")
060082  var  jobs_pending  u8
# where queue_sound puts the next sound command (0091D4 "movea.l $60018.l, A6", 0091DA "move.b D7, (A6)+", 0091EC
# "move.l A6, $60018.l"), back to the start after 06043F (0091DC "cmpa.l #$6043f, A6", 0091E6 "lea $60400.l, A6")
060018  var  sound_queue_write  u32
# the next command the VBLANK sends to the sound board, one a frame, while it is behind sound_queue_write (009202
# "movea.l $6001c.l, A6", 009208 "cmpa.l $60018.l, A6", 009212 "move.b (A6)+, D7", 00922A "move.b D7, $a0009.l")
06001C  var  sound_queue_read  u32
# the sound commands queued (0091DA "move.b D7, (A6)+", 009212 "move.b (A6)+, D7"; 060400-06043F)
060400  var  sound_queue[64]  u8

# ---- the DIP switches and what the boot takes from them ----
# DSW1 (0A0011) as read at the boot, the bits turned on (001224 "move.b $a0011.l, D0", 00122A "not.b D0", 00122C
# "move.b D0, $60030.l"): the coinage, low nibble (00125A "andi.b #$f, D1") into 060303/060304, high nibble (001284
# "andi.b #$f0, D2") into 06030B/06030C
060030  var  dip_switches_1  u8
# DSW2 (001232 "move.b $a0013.l, D0", 00123A "move.b D0, $60031.l"): the lives a credit (0012A8 "andi.b #$3, D0"),
# the difficulty (001306 "andi.b #$60, D0"; again at a new game: 00622E "move.b $60031.l, D0"), the demo sounds
# (001318 "andi.b #$80, D0")
060031  var  dip_switches_2  u8
# DSW3 (001240 "move.b $a0019.l, D0", 001248 "move.b D0, $60032.l"): the screen's flip (004086 "btst #$0, $60032.l"),
# the test switch (003FCC "btst #$2, $60032.l"; queue_sound queues every sound with it: 0091A4 "btst #$2, $60032.l")
060032  var  dip_switches_3  u8
# the lives a credit gives: 1, 2, 3 or 5 from the table at 001426 by DSW2's low bits (0012AC "lea $1426.l, A0",
# 0012B2 "move.b (A0,D0.w), $60090.l"), added in BCD to the player's lives (003D40 "move.b $60090.l, D5", 003D4E "abcd
# D5, D4")
060090  var  lives_per_credit  u8
# free play: the boot would set it with DSW1's coinage at 0xF (00125E "cmpi.b #$f, D1"), but the instruction that
# would is a nop (001264 "nop"), so it stays 0 (001266 "move.b D0, $60091.l"); with it a coin switch starts the attract
# mode at once (00404A "tst.b $60091.l") and the coin's screen counts it as credits (0089B6 "or.b $60091.l, D0")
060091  var  free_play  u8
# the demo sounds (DSW2 bit 7, 0x80 when on: 001318 "andi.b #$80, D0", 00131C "move.b D0, $60092.l"): out of a game
# and the test, a sound is queued only with it (0091CA "tst.b $60092.l"), and the areas' music never (0091BA "cmpi.b
# #$60, D7", 0091C2 "cmpi.b #$6b, D7")
060092  var  demo_sounds  u8
# the difficulty of the DIP switches, 0 easy to 3 the hardest (001306 "andi.b #$60, D0", 00130A "lsr.b #5, D0",
# 00130C "move.b D0, $60094.l"; 0 in a demo: 004D12 "clr.b $60094.l"): the base of difficulty (006A58 "move.b $60094.l,
# $60130.l"), and the helicopters', drones' and Stockman's waits (013142 "move.b $60094.l, D7")
060094  var  difficulty_setting  u8
# the program's version: 0 from the boot (0012CE "move.b #$0, $6009f.l"); the title's logo animations by it (004AE0
# "move.b $6009f.l, D7", 004AE6 "lsl.w #3, D7"), bit 0 the copyright texts with HERO instead of NINJA (004C5E "btst
# #$0, $6009f.l", 004C6A "lea $4c7c.l, A5"), bit 1 the banner's place (004BE0 "btst #$1, $6009f.l")
06009F  var  version  u8

# ---- the inputs ----
# the four players' controls this frame, the bits turned on (003EBA "move.b $a0003.l, D0", 003EC2 "move.b D0,
# $60034.l"; P2 0A0005, P3 0A0007, P4 0A0015), read by player (check_starts: 0041AA "lea $60034.l, A5", 0041BA
# "move.b (A5,D0.w), D1"); with the three frames before it a block of 16 bytes the name entry ORs (007E74 "move.l
# ($0,A6), D7", 007E80 "or.l ($c,A6), D7")
060034  var  player_inputs[4]  u8
# the same a frame before (003E84 "move.l $60034.l, $60038.l"): a button counts when it was not pressed then (0041C6
# "move.b ($4,A5,D0.w), D1", 003EC8 "move.b $60038.l, D1")
060038  var  player_inputs_last_frame[4]  u8
# two frames before (003E7A "move.l $60038.l, $6003c.l") and three (003E70 "move.l $6003c.l, $60040.l"); only the name
# entry reads them (007E7C "or.l ($8,A6), D7")
06003C  var  player_inputs_2_frames_ago  u32
060040  var  player_inputs_3_frames_ago  u32
# what each player pressed this frame that was not pressed the last (003ECE "not.b D1", 003ED0 "and.b D1, D0",
# 003ED2 "move.b D0, $60050.l"): the test mode's next page (005DA4 "btst #$4, $60050.l"), the skips of the title texts,
# the staff roll and GAME OVER (0073D4 "move.b $60050.l, D7", 0073DA "or.b $60051.l, D7"); one byte a player, as
# player_inputs (no code indexes it: named as an array for that; four names otherwise)
060050  var  player_presses[4]  u8
# the coin and service switches this frame, the bits turned on (003EAC "move.b $a0001.l, D0", 003EB4 "move.b D0,
# $60044.l"), and the three frames before (003EA2 "move.b $60044.l, $60045.l", 003E98 "move.b $60045.l, $60046.l",
# 003E8E "move.b $60046.l, $60047.l"): a switch counts when it was on two frames ago and off since (003BFE "move.b
# $60044.l, D0", 003C04 "or.b $60045.l, D0", 003C0C "and.b $60046.l, D0")
060044  var  coin_switches  u8
060045  var  coin_switches_last_frame  u8
060046  var  coin_switches_2_frames_ago  u8
060047  var  coin_switches_3_frames_ago  u8
# the controls the turtles read, one a turtle (01A43A "lea $60020.l, A1", 01A554 "addq.l #1, A1", 01AE04 "move.b (A1),
# D0"; they also clear and mask them: 01B7EC "clr.b (A1)"): in a game the players' (0046A4 "move.b $60034.l,
# $60020.l"), in a demo the recorded ones (004752 "move.b D0, ($0,A3)"); the name entry ORs four frames into it
# (007E84 "move.l D7, $60020.l")
060020  var  turtle_inputs[4]  u8
# the same a frame before (00469A "move.l $60020.l, $60024.l"; in a demo 00470A "move.l $60048.l, $60024.l"), for the
# presses (004774 "move.b $60024.l, D1", 00477A "not.b D1")
060024  var  turtle_inputs_last_frame  u32
# two and three frames before (004690 "move.l $60024.l, $60028.l", 004686 "move.l $60028.l, $6002c.l"); nothing else
# reads them
060028  var  turtle_inputs_2_frames_ago  u32
06002C  var  turtle_inputs_3_frames_ago  u32
# what each turtle pressed this frame that was not pressed the last: the players' (0046CC "move.b $60050.l,
# $6004c.l") or a demo's worked out (00477C "and.b D1, D0", 00477E "move.b D0, $6004c.l"), read by turtle (01A440 "lea
# $6004c.l, A2", 01A556 "addq.l #1, A2", 01B76A "btst #$5, (A2)")
06004C  var  turtle_presses[4]  u8
# in a demo the byte each player's recording holds (00471C "lea $60048.l, A0", 004756 "move.b D0, (A0,D7.w)"), given to
# the turtles again every frame it holds (004764 "move.b (A0,D7.w), ($0,A3)"); cleared at the demo's start (004D62 "clr.l
# $60048.l")
060048  var  demo_held_inputs[4]  u8
# in a demo, the frames the second, third and fourth players' recorded byte still holds (the first's is attract_timer):
# the table at 0047C8 gives update_game_inputs each player's (00472A "movea.l ($4,A6,D6.w), A4", 00473A "subq.b #1,
# ($0,A4)", 004744 "move.b (A5)+, ($0,A4)"); 1 at the demo's start (004D98 "move.b #$1, $600a9.l", 004DA0 "move.b #$1,
# $600d0.l", 004DA8 "move.b #$1, $600d1.l")
0600A9  var  demo_hold_2  u8
0600D0  var  demo_hold_3  u8
0600D1  var  demo_hold_4  u8

# ---- the coins ----
# the coin and service switches let go this frame (003BF0 "bsr $3bfe", 003BF4 "move.b D0, $60325.l"): bits 0-3 a coin
# in slots 1-4 (003C54 "move.b $60325.l, D0", 003C68 "bsr $3ce8"), bits 4-7 the service switches, a credit each
# (003C7C "lsr.b #4, D0", 003C94 "addi.w #$1, ($6,A0)")
060325  var  new_coin_switches  u8
# a credit given this frame, by coins or by a service switch: cleared every frame (003B5C "clr.b $60327.l"), set by
# count_coin and the service switches (003CFC "move.b #$1, $60327.l", 003C8C "move.b #$1, $60327.l"); the attract mode
# goes to the coin's screen with it (0049AC "tst.b $60327.l", 004036 "tst.b $60327.l")
060327  var  new_credit  u8
# set when a coin goes in out of a game, which stops the sound first (003C2E "move.b #$ff, D7", 003C3E "move.b #$1,
# $60152.l"); cleared every frame (003E00 "clr.b $60152.l"); the screens with music start it again (008AD8 "tst.b
# $60152.l", 008AE2 "move.w #$6f, D7")
060152  var  sound_stopped_by_coin  u8

# ---- the players ----
# a game is played (not a demo): set when a player starts (0041FC "move.b #$1, $600a3.l", 00427A), cleared at the
# start and back in the attract mode (003FC6 "clr.b $600a3.l", 008012 "clr.b $600a3.l"); the turtles take the
# players' inputs with it (00467C "tst.b $600a3.l"), points and every sound only with it (001F3A "tst.b $600a3.l",
# 0091B0 "tst.b $600a3.l")
0600A3  var  game_on  u8
# the players in play, a bit each: those who start or join (0041F0 "move.b D1, $600a1.l", 00426E "or.b D1, $600a1.l"),
# out when their lives run out (004330 "bclr D7, $600a1.l"); a demo's from demo_settings (004D46 "move.b ($1,A0,D0.w),
# $600a1.l"); the enemies pick their target among them (011E12 "btst D6, $600a1.l")
0600A1  var  players_in_play  u8
# the players who have just joined: set with players_in_play (0041F6 "move.b D1, $600a6.l", 004274 "or.b D1,
# $600a6.l"), their turtles brought in by join_players, which clears it (004378 "tst.b $600a6.l", 0043E0 "clr.b
# $600a6.l")
0600A6  var  players_joining  u8
# the players whose turtle ran out of bars this frame (01C26A "bset D0, $600a0.l"): respawn_players takes a life of
# each and brings back the ones still in play (0043E8 "tst.b $600a0.l", 004432 "move.b $600a1.l, D7", 004438 "and.b
# $600a0.l, D7", 004456 "clr.b $600a0.l"); the enemies leave them alone meanwhile (011E1C "btst D6, $600a0.l")
0600A0  var  players_knocked_out  u8
# the players whose lives a credit just raised (003D36 "bset D3, $600a2.l"): their boxes redrawn (004362 "add.b
# $600a2.l, D7", 004370 "clr.b $600a2.l"; on the coin's screen 008B0C "or.b $600a2.l, D7")
0600A2  var  players_credited  u8
# the players whose lives ran out (004336 "bset D7, $600b3.l"): the knocked-out head under the box for four rounds
# (00273E "bclr D7, $600b3.l"), or until a credit (003D96 "bclr D7, $600b3.l")
0600B3  var  players_out_of_lives  u8
# the players whose record has lives (003D8C "tst.w ($0,A0)", 003D94 "bset D7, D6", 003DA2 "move.b D6, $600b7.l"):
# PRESS START under their boxes (00446A "move.b $600b7.l, D1"), the ranking goes on to BEST 10 PLAYERS only with none
# (007FD4 "tst.b $600b7.l")
0600B7  var  players_with_lives  u8
# PRESS START left out under the boxes, the turtle's head alone (0026C4 "tst.b $600b8.l", 0026CE "moveq #$8, D6"):
# set while the turtles come into an area (00686A "move.b #$1, $600b8.l", 0068CE "clr.b $600b8.l") and through the
# area's exit (006B6E "move.b #$1, $600b8.l")
0600B8  var  hide_press_start  u8
# the turtle each player plays, a byte a player: 00 01 02 03 in this set (0062A8 "move.l #$10203, $600c4.l"; cleared
# first: 006296 "move.l #$0, $600c4.l"), read by player for the turtles' pictures (008B60 "lea $600c4.l, A4", 008B6E
# "move.b (A4,D6.w), D5")
0600C4  var  player_turtles[4]  u8
# the turtles' held prompt shown, a byte a player: turtle_show_prompt shows it only while 0 (01D266 "lea $6014c.l, A6",
# 01D272 "tst.b (A6,D0.w)") and turtle_erase_prompt marks it (01D354 "move.b #$ff, (A6,D0.w)"); all cleared at each
# area's start (01E252 "move.l D0, $6014c.l"), and the player's when his last life goes (01B8E4 "tst.w (A6,D1.w)",
# 01B8F4 "move.b D0, (A6,D2.w)")
06014C  var  prompt_shown[4]  u8
# the top score, BCD: a player's score that passes it becomes it (001FA8 "lea $60076.l, A6", 001FAE "cmp.w (A6), D7",
# 001FB4 "move.w D7, (A6)"), drawn by draw_top_score (002022 "lea $60076.l, A6"); 1000 when the ranking is reset (0082C4
# "move.w #$1000, $60076.l")
060076  var  top_score  u16
# a word of the record the boot takes from the table at 00142A by DSW2 bits 3-4 (0012E6 "lea $142a.l, A0", 0012FE
# "move.l (A0), (A1)"), which every player record copies (004342 "move.w $6009a.l, ($2,A6)"); nothing reads either
# copy, and MAME calls those switches unused
06009A  var  unused_dip_setting  u16

# ---- the play ----
# the music the play plays: the stage's from the table at 006B0C when it is 0 (006AC2 "move.b $60080.l, D7", 006AD2
# "move.b $60121.l, D7", 006ADE "move.b D7, $60080.l"), a boss's when he comes (0115FE "move.b D7, $60080.l"); 0 at the
# area's start (006858 "clr.b $60080.l")
060080  var  music  u8
# the area goes on with the scene before (bit 7, from the table at 00634C by the area: 0062FE "move.b (A0,D1.w),
# $60122.l"; areas 1, 3, 4, 6 and 9): no "SCENE n" title (00653C "tst.b $60122.l"), and the turtles keep the bars they
# had (019C16 "btst #$7, $60122.l", 019C22 "move.w #$a03, ($8,A0)")
060122  var  area_continues_scene  u8
# the turtles come into the area without blinking: from area_entry_without_blink by the stage (006736 "move.b (A6,D7.w),
# $60127.l"; 1 in stage 0 only), cleared once the area's turtles are in (00682C "clr.b $60127.l"); joins and respawns
# blink only without it (019B6A "tst.b $60127.l", 019B74 "ori.b #$80, ($2d,A0)")
060127  var  entry_without_blink  u8
# the attract mode's character profile: the text and picture by it (004FAC "move.b $60128.l, D7", 005034 "move.b
# $60128.l, D7"), the next one each time (00517C "addq.b #1, $60128.l"), six of them (005182 "cmpi.b #$6, $60128.l",
# 00518E "clr.b $60128.l")
060128  var  profile_character  u8
# set when an area's exit plays its cutscene (02B8A6 "move.b #$ff, $60129.l" Shredder escapes, 02C41A the van drives
# off, 02D07A at the building site): no players join meanwhile (006B32 "tst.b $60129.l", 006B3C "bra $434c"); cleared
# at the area's set-up (00631A "clr.b $60129.l")
060129  var  exit_cutscene  u8
# the difficulty the enemies read: difficulty_setting plus a level a player in play plus the time without a knock-out
# (006A58 "move.b $60094.l, $60130.l", 006A70 "addq.b #1, $60130.l", 006A80 "add.b D7, $60130.l"), 7 at most (006A92
# "move.b #$7, $60130.l"), 2 in a demo (006A46 "move.b #$2, $60130.l"); the spawn records (047AA4 "cmp.b $60130.l,
# D0"), the enemies' health (0485AE "move.b $60130.l, D7"), the bosses' choices (052A0E "move.b $60130.l, D0")
060130  var  difficulty  u8
# the frames since a turtle last ran out of bars: one more a frame of play (02F5F0 "addq.w #1, $60150.l"), its high
# byte / 32 the level it adds to difficulty (02F5F6 "move.b $60150.l, D0", 02F5FC "lsr.b #5, D0", 02F5FE "move.b D0,
# $6111e.l"); cleared when a turtle is knocked out (01C25C "clr.w D0", 01C25E "move.w D0, $60150.l"), at a demo and
# at the intro (004D18 "clr.w $60150.l", 0308D8 "move.w D0, $60150.l")
060150  var  time_without_knockout  u16
# the area cleared: turtle_run_all takes it from 0 to FF once the stage's check has cleared the area (0633C8, set by
# check_cleared_building and the like) and no turtle is busy (01A690 "tst.b $633c8.l", 01A69A "tst.b $633ca.l", 01A6A4
# "subq.b #1, $600bd.l"); then with no player down or out the play goes to the area's exit (006976
# "tst.b $600bd.l", 0069B2 "move.b #$5, $60005.l"); cleared at the area's set-up and by the exits (006324 "clr.b
# $600bd.l", 02CD94 "clr.b $600bd.l")
0600BD  var  area_cleared  u8

# ---- the video registers' copies, the scroll ----
# what the program writes to the priority register 0C0001 (bits 2-3 the sprites against the layers): the boot's
# (001368 "move.b D1, $60059.l", 00136E "move.b D1, $c0001.l"), the stage's (00671E "move.b (A6,D7.w), $60059.l",
# 006726 "move.b $60059.l, $c0001.l"), the fire's flicker (0069EC "move.b #$4, $60059.l")
060059  var  layer_priority  u8
# what the program writes to the K051937's control register 140000 (the SPRITE_CONTROL_140000 of the C): bit 3 the
# flip (004082 "andi.b #$f7, D6", 004096 "eori.b #$8, D6", 0040A6 "move.b D6, $6005a.l", 0040AC "move.b D6,
# $140000.l"), bit 5 the sprite ROM read by the ROM check (001B1C "bset #$5, $6005a.l", 001B24 "move.b $6005a.l,
# $140000.l")
06005A  var  sprite_control  u8
# what the program writes to the K052109's flip register 1E80 (106D00): bit 0 the screen's flip (00407E "andi.b #$fe,
# D7", 004092 "eori.b #$1, D7", 00409A "move.b D7, $6005b.l", 0040A0 "move.b D7, $106d00.l"), the test mode's flips
# (005DE2 "eori.b #$7, D7", 005DEC "move.b D7, $106d00.l")
06005B  var  tile_flip  u8
# what the program writes to the K052109's tile bank registers: 1D80 (106B00), banks 0 and 1 (003F9E "move.b D7,
# $60064.l", 003FA4 "move.b D7, $106b00.l", 00674E "move.b (A6,D7.w), $60064.l"), and 1F00 (106E00), banks 2 and 3,
# which a balloon changes the high nibble of (03023A "move.b $60065.l, D5", 030240 "andi.b #$f, D5", 03024C "move.b D5,
# $106e00.l")
060064  var  tile_banks_0_1  u8
060065  var  tile_banks_2_3  u8
# layer A's x: set_layers_scroll's (01ECB6 "move.w D0, $6005c.l"), written less 0x60 to the K052109's x scroll every
# VBLANK (003F3C "move.w $6005c.l, D7", 003F42 "subi.w #$60, D7", 003F46 "move.b D7, $106400.l", 003F4E "move.b D7,
# $106402.l"); the parked car sets it (012B8C "move.w ($24,A0), $6005c.l")
06005C  var  layer_a_scroll_x  u16
# layer A's y: its low byte goes to the K052109 (003F32 "move.b $6005f.l, $106018.l", 01ECD6 "move.b D0, $6005f.l"),
# the word is set and cleared whole (012B94 "move.w ($26,A0), $6005e.l", 006222 "clr.w $6005e.l"); the C shows the
# byte through this word (no name for 06005F)
06005E  var  layer_a_scroll_y  u16
# layer B's x (01ECC8 "move.w D0, $60060.l", 003F5E "move.w $60060.l, D7", 003F68 "move.b D7, $106401.l"; the title's
# 004A6E "move.w #$60, $60060.l"), shaken by the exits (02D6A2 "add.w D1, $60060.l")
060060  var  layer_b_scroll_x  u16
# layer B's y: its low byte to the K052109 (003F54 "move.b $60063.l, $106019.l", 01ECE4 "move.b D0, $60063.l",
# 00720E "move.b D7, $60063.l" the Technodrome's shake), the word set whole (004A66 "move.w #$0, $60062.l")
060062  var  layer_b_scroll_y  u16

# ---- the texts, the balloons ----
# the colour the texts are printed in: text_colours by D7 (001F0A "lea $1f1a.l, A6", 001F10 "move.b (A6,D7.w),
# $6007a.l"), read for each text (001EC0 "move.b $6007a.l, D7", 00277C "move.b $6007a.l, D4")
06007A  var  text_colour  u8
# the same set by job 3 (001F2A "lea $1f1a.l, A6", 001F30 "move.b (A6,D7.w), $6007b.l"), which nothing reads
06007B  var  spare_text_colour  u8
# a byte, word or long the code keeps for a moment, four uses: check_starts' and check_joins' starting players
# (00419C "clr.b $60066.l", 0041D2 "bset D0, $60066.l", 0041E6 "move.b $60066.l, D1"), a demo's recorded byte for the
# join handlers (004748 "move.b D0, $60066.l", 0048B2 "tst.b $60066.l"), turtle_start_area's record pointer across
# a call (019BFE "move.l A2, $60066.l", 019C10 "movea.l $60066.l, A2"), show_balloon's side across erase_balloon
# (030204 "move.w D0, $60066.l", 030222 "move.w $60066.l, D0"). The long overlaps balloon_kept_y. Three widths: the
# caller may keep only the long and the byte
060066  var  scratch  u32
060066  var  scratch_byte  u8
060066  var  scratch_word  u16
# show_balloon's y, line and tile bank kept while the balloon on the screen is erased (03020A "move.w D2, $60068.l",
# 030210 "move.w D3, $6006a.l", 030216 "move.w D4, $6006c.l", 03021C "jsr $3030c.l", 030228 "move.w $60068.l, D2"):
# the y gives the row (0302BE "cmpi.w #$70, D2"), the line the record of 030350 (030266 "move.b (A6,D3.w), D7"), the
# bank the high nibble of tile_banks_2_3 (030244 "or.b D4, D5")
060068  var  balloon_kept_y  u16
06006A  var  balloon_kept_line  u16
06006C  var  balloon_kept_bank  u16

# ---- the palettes ----
# a palette request under way: set while run_palette_requests has a bank still to do (0092FC "move.l $60bf8.l, D7",
# 009306 "move.b #$1, $60083.l"), and the scenes wait for 0 (004012 "tst.b $60083.l")
060083  var  palettes_busy  u8
# where post_palette_request puts the next request, 6 bytes on (009242 "movea.l $60bf0.l, A5", 009248 "move.w D7,
# (A5)+", 00924A "move.l A6, (A5)+", 00925C "move.l A5, $60bf0.l"), back to 060B00 after 060BEF (00924C "cmpa.l
# #$60bef, A5")
060BF0  var  palette_queue_write  u32  palette_request
# the next request run_palette_requests takes (0092B8 "movea.l $60bf4.l, A0", 0092BE "move.w (A0), D0", 0092E4 "move.l
# A0, $60bf4.l"), a 0 word when there is none (0092C0 "beq $92f6")
060BF4  var  palette_queue_read  u32  palette_request
# the banks still to do of the request under way, one bank a frame: kind 1, the area's set (00937C "move.b D7,
# $60bf8.l", 009272 "tst.b $60bf8.l"), kind 2, a set (009416 "move.b D7, $60bf9.l"), kind 6, black (00957E "move.b D7,
# $60bfa.l")
060BF8  var  palette_area_banks  u8
060BF9  var  palette_set_banks  u8
060BFA  var  palette_black_banks  u8
# the kind whose sprites' second half comes next (0093CA "move.b #$1, $60bfb.l", 009456 "move.b #$2, $60bfb.l", 0094D4
# "move.b #$3, $60bfb.l", 0095B4 "move.b #$6, $60bfb.l"): run the next frame by it (00929C "move.b $60bfb.l, D7",
# 0092A2 "lea $9334.l, A0"), and while it runs the colours go 0x200 further on (0093AC "tst.b $60bfb.l", 0093B6 "adda.l
# #$200, A5")
060BFB  var  palette_second_half  u8
# the palette set or list a request copies, kept for its next banks and its second half (0093EE "move.l A6,
# $60bfc.l", 00946A "movea.l $60bfc.l, A6", 0094CE "move.l A6, $60bfc.l", 0094E2 "movea.l $60bfc.l, A6")
060BFC  var  palette_set  u32 rom

# ---- the VBLANK ----
# the registers the VBLANK keeps while it runs (003DC4 "movem.l D0-D7/A0-A6, $60440.l", 003E44 "movem.l $60440.l,
# D0-D7/A0-A6"): 060440-06047B; the C does not show it (the decompiler leaves the handler's movem out)
060440  var  vblank_registers[15]  u32

# ---- the scroll ----
# the area's scroll segment, 4 a segment (an offset into the stage's list of area_scroll_segments): start_scroll_segment
# reads it (01A718 "move.w $633c0.l, D0", 01A71E "movea.l (A6,D0.w), A6"), the next when the layer passes the segment's
# end (01A6EE "cmp.l ($2,A0), D0", 01A6FE "addq.w #4, $633c0.l"); area 2's diagonal stretch is segment 1 (01A3DC
# "cmpi.w #$4, $633c0.l")
0633C0  var  scroll_segment  u16
# the scroll held on each side: the segment's four bytes (01A7C4 "move.l ($6,A6), $633c2.l"), all four when the area's
# end comes (01A8BE "moveq #-$1, D0", 01A8C0 "move.l D0, $633c2.l")
0633C2  var  scroll_held  u32
# held to the left: a turtle at the left edge does not push it (01ADFA "tst.b $633c2.l", 01AE00 "bne $1aef4")
0633C2  var  scroll_held_left  u8
# held to the right (01AFE0 "tst.b $633c3.l"): the drill's arrival (030438 "move.b #$ff, $633c3.l", 030870 "clr.b
# $633c3.l"), the lift (01F4C8 "move.b #$ff, $633c3.l"), too many enemies (02F6EC "move.b D0, $633c3.l")
0633C3  var  scroll_held_right  u8
# held up (01B1B6 "tst.b $633c4.l", 01B1BC "bne $1b2c6")
0633C4  var  scroll_held_up  u8
# held down (01B3A4 "tst.b $633c5.l"; the street's too many enemies: 02F6E6 "move.b D0, $633c5.l")
0633C5  var  scroll_held_down  u8
# the segment's kind, its first byte (01A722 "move.b ($0,A6), $633c9.l"): 0 the area's last, the end check from then on
# (01A72A "beq $1a876"); positive, the turtles push the scroll within the limits (01A72E "bpl $1a7c4"); negative, it
# moves by itself at the segment's speeds (auto_scroll: 01ACDA "tst.b $633c9.l", 01ACE0 "bmi $1ace6"); the skateboard
# ride and the lift set it so (01AA56 "move.b D0, $633c9.l", 01F502 "move.b #$ff, $633c9.l")
0633C9  var  scroll_mode  s8
# the tile RAM of the layer the working layer's new rows and columns go into, layer A's or B's (01F228 "move.l
# #$102000, $633cc.l", 01ED6E "move.l #$104000, $633cc.l"; 01E9F8 "add.l $633cc.l, D0")
0633CC  var  working_layer_tiles  u32 io
# the times the layer went round a stretch: the skateboard road's rounds, 20 a stretch (01FCB4 "cmpi.b #$14, $633d0.l",
# 01FCD6 "addq.b #1, $633d0.l"); the Technodrome's lift shaft, gone round once and then 80, the ride slowing (01F606
# "move.b $633d0.l, D0", 01F628 "addq.b #1, $633d0.l", 01F632 "move.b #$80, $633d0.l", 01F556 "move.b $633d0.l, D0",
# 01F55C "bmi $1f58c")
0633D0  var  layer_loops  s8
# the stage's layers' step: the Technodrome's (to the lift, the ride, off it: 01F422 "move.b $633d2.l, D0", 01F54E
# "addq.b #1, $633d2.l"), the highway's cars (01F814 "move.b $633d2.l, D0", 01F864 "addq.b #1, $633d2.l"), the
# skateboard road's stretches (01FC4C "move.b $633d2.l, D0")
0633D2  var  layers_step  u8
# the area's last segment reached: the stage's end check runs every frame (01A680 "tst.b $633ec.l", 01A68A "jsr
# $1a876.l"), which sets it (01A8C6 "move.b D0, $633ec.l"); the hurry count stops meanwhile (01EC0E "or.b $633ec.l, D0")
0633EC  var  last_segment  u8
# the burning building's scroll to the right held while it is set too (02F6D6 "tst.b $633f5.l", 02F6DC "beq $2f6ec",
# 02F6EC "move.b D0, $633c3.l"); nothing in the program writes it
0633F5  var  building_scroll_hold  u8
# the frames the layers stand still, not at the area's end, with fewer than 3 enemies (01EC18 "addq.w #1, $633f6.l",
# 01EC1E "cmpi.b #$3, $6120c.l"): from 0x100 the HURRY sign (01EC2A "tst.b $633f6.l", 01EC34 "lea $62f50.l, A0"); with
# enemies about it waits at 0x100 (01EC80 "move.w #$100, $633f6.l"), with none at 0x600 the missiles fall (01EC8A
# "cmpi.w #$600, $633f6.l", 01EC96 "jsr $13354.l"); cleared while the drill arrives (03042A "clr.w $633f6.l")
0633F6  var  hurry_time  u16
# the floor map walled off at the area's far end, once (01ED88 "tst.b $633fd.l", 01EDAC "moveq #-$2, D3", 01EDC4 "subq.b
# #1, $633fd.l"; the sewer and the lift's end too: 01F1C4 "subq.b #1, $633fd.l", 01F78A "subq.b #1, $633fd.l")
0633FD  var  floor_end_walled  u8

# ---- the area's end ----
# the stage's check has found the area beaten (01A900 "move.b #$ff, $633c8.l", 01A97C "move.b #$ff, $633c8.l"): the
# turtles start no attack or jump (01B952 "tst.b $633c8.l", 01B958 "bne $1b976"), and once none is busy area_cleared is
# set (01A690 "tst.b $633c8.l", 01A69A "tst.b $633ca.l", 01A6A4 "subq.b #1, $600bd.l"); the exits clear it at their end
# (02CD8E "clr.b $633c8.l")
0633C8  var  area_beaten  u8
# the turtles in a jump or an attack this frame, counted down from 0 (01A418 "move.b D0, $633ca.l", 01B7A0 "subq.b #1,
# $633ca.l", 01BD50 "subq.b #1, $633ca.l"): the area is not over while one is (01A69A "tst.b $633ca.l")
0633CA  var  turtles_busy  u8
# area 0's end: 0x60 frames once every player is ready and no enemy is left (01A8EC "move.b #$60, $633ed.l", 01A8F6
# "subq.b #1, $633ed.l"), sounds at 0x40 (01A90A "cmpi.b #$40, $633ed.l", 01A914 "move.b #$ba, D7"), then area_beaten
0633ED  var  building_clear_wait  u8

# ---- the floor map's cells around an object (read_floor_cells_at) ----
# The floor map (061800, 0x40 cells a row of 8 pixels) read at the object's x, at its floor level (y + floor_height:
# 01DE8C "add.b ($32,A0), D6") and at its height (y + height: 01DE92 "add.b D4, D5"). Codes: 01 floor, FF wall, FE and
# FD walls on one side, FA-FC stairs (01D9AE "cmpi.b #-$6, $633d3.l").
# the cell at its floor level (01DEC0 "move.b (A6), $633d3.l"; 0 when y is negative: 01E048 "clr.b $633d3.l"); the
# enemies follow its stairs (048914 "move.b $633d3.l, D0")
0633D3  var  floor_cell  u8
# the one above it (01DED6 "move.b (-$40,A6), $633d4.l"; row 0 takes row 31's: 01DEE2 "move.b ($7c0,A6), $633d4.l")
0633D4  var  floor_cell_up  u8
# right of it (01DEF8 "move.b ($1,A6), $633d5.l"); a wall there stops a turtle (01ABB8 "tst.b $633d5.l")
0633D5  var  floor_cell_right  u8
# left of it (01DF16 "move.b (-$1,A6), $633d6.l")
0633D6  var  floor_cell_left  u8
# above and right (01DF4C "move.b (-$3f,A4), $633d7.l"; the turtles' corners: 01DC64 "move.b $633d7.l, D1")
0633D7  var  floor_cell_up_right  u8
# above and left (01DF72 "move.b (-$41,A4), $633d8.l"; 01DC86 "move.b $633d8.l, D1")
0633D8  var  floor_cell_up_left  u8
# at its height: the one above (01DF9C "move.b (-$40,A5), $633d9.l"; 01D742 "move.b $633d9.l, D2")
0633D9  var  height_cell_up  u8
# right (01DFBE "move.b ($1,A5), $633da.l"; 01DAC2 "cmpi.b #-$5, $633da.l")
0633DA  var  height_cell_right  u8
# left (01DFDC "move.b (-$1,A5), $633db.l"; 01D98E "cmpi.b #-$6, $633db.l")
0633DB  var  height_cell_left  u8
# above and right (01E012 "move.b (-$3f,A4), $633dc.l"; 01DC5E "move.b $633dc.l, D2")
0633DC  var  height_cell_up_right  u8
# above and left (01E038 "move.b (-$41,A4), $633dd.l"; 01DC80 "move.b $633dd.l, D2")
0633DD  var  height_cell_up_left  u8
# the cell at its height itself (01DEC6 "move.b (A5), $633f4.l")
0633F4  var  height_cell  u8

# ---- the fire (animate_fire_tiles) ----
# which of the apartment's four fire spots is redrawn this time (01FEE2 "addq.b #1, $633c6.l", 01FEE8 "cmpi.b #$4,
# $633c6.l", 01FF14 "move.b $633c6.l, D0", 01FF1C "lea $200f2.l, A0")
0633C6  var  apartment_fire_spot  u8
# the apartment fire's frame, 0-7, one on after every spot (01FEFA "addq.b #1, $633c7.l", 01FF00 "cmpi.b #$8, $633c7.l",
# 01FF28 "move.b $633c7.l, D0", 01FF30 "movea.l (A0,D0.w), A0")
0633C7  var  apartment_fire_frame  u8
# frame_count's low byte when the fire was last redrawn: once a frame (01FE62 "move.b $600a5.l, D0", 01FE68 "cmp.b
# $633f1.l, D0", 01FE70 "move.b D0, $633f1.l")
0633F1  var  fire_last_frame  u8
# the same as apartment_fire_spot for the burning building's (01FE76 "addq.b #1, $633f2.l", 01FEB2 "move.b $633f2.l,
# D0", 01FEBA "lea $203d2.l, A0")
0633F2  var  building_fire_spot  u8
# the burning building fire's frame (01FE8E "addq.b #1, $633f3.l", 01FE94 "cmpi.b #$8, $633f3.l", 01FEC6 "move.b
# $633f3.l, D0")
0633F3  var  building_fire_frame  u8

# ---- the entries', exits' and story's cutscenes ----
# the turtles still on their way in an entry or an exit: cleared, one less for each turtle not at its place yet (019F4E
# "clr.b $633cb.l", 01A05A "subq.b #1, $633cb.l"; 02B6BC "subq.b #1, $633cb.l"), and when 0 the step is over (01A124
# "tst.b $633cb.l", 01A12E "move.b #$ff, $61109.l"; 02B6E6 "tst.b $633cb.l")
0633CB  var  turtles_on_the_way  u8
# (optional) turtle_start_marker keeps the turtle there across set_animation (019F0C "move.l A0, $633de.l", 019F1C
# "movea.l $633de.l, A0"); the C shows AT32(unk_0633DE, -3) today
0633DE  var  saved_turtle  u32 object
# the cutscenes' long waits (02BA8E "move.w #$108, $633de.l", 02BAAA "subq.w #1, $633de.l", 02BAB4 "cmpi.w #$f0,
# $633de.l"; 02BE5C "move.w #$130, $633de.l"); the car street's sets cutscene_wait 0 and cutscene_count 0x97 at once
# (02BF82 "move.w #$97, $633de.l")
0633DE  var  cutscene_time  u16
# the cutscenes' wait, its high byte (02B7D2 "move.b #$20, $633de.l", 02B7F2 "subq.b #1, $633de.l"; finish_area_exit:
# 02CD84 "subq.b #1, $633de.l"), the hug picture's time (02C65C "subq.b #1, $633de.l", 02C684 "cmpi.b #-$30,
# $633de.l"); the van rocking's step (02C364 "move.b $633de.l, D0", 02C36A "addq.b #1, $633de.l")
0633DE  var  cutscene_wait  u8
# a second count of a cutscene: the van's engine running down (02C2C6 "subq.b #1, $633df.l", 02C2EE "cmpi.b #$60,
# $633df.l"), the last exit's shake step (02D680 "move.b $633df.l, D0", 02D686 "addq.b #1, $633df.l", 02D692 "lea
# $30652.l, A6"), the opening's sweeps (02FA52 "addq.b #1, $633df.l", 02FA5E "cmpi.b #$3, $633df.l")
0633DF  var  cutscene_count  u8
# another count of a cutscene: the building's exit's last wait (02B6F0 "move.b #$20, $633e2.l", 02B65C "subq.b #1,
# $633e2.l"), the turtles to stand behind April in the hug (02C4FC "addq.b #1, $633e2.l", 02C5FC "subq.b #1,
# $633e2.l"), the story's fire frame (031028 "addq.b #4, $633e2.l", 03102E "cmpi.b #$c, $633e2.l")
0633E2  var  cutscene_counter  u8
# the hug picture's turtles' colours, one a player (02C4E8 "lea $633e6.l, A1", 02C4EE "move.l #$8090a0b, (A1)"), FF
# for one not in play (02C506 "move.b #$ff, (A1)") or already placed (02C622 "move.b #$ff, (-$1,A1)"); the colour
# goes into the object's colour (02C61A "move.b (A1)+, D0", 02C61E "move.b D0, ($42,A0)")
0633E6  var  hug_turtle_colours[4]  u8
# the step of the area's entry, of its exit, of the opening and of the story before area 0 (019FCA "move.b $633ea.l,
# D0"; 02B714 "move.b $633ea.l, D0"; 02F8AC "move.b $633ea.l, D0"; 03097C "move.b $633ea.l, D0"); next_area_step
# (02B7DA "addq.b #1, $633ea.l")
0633EA  var  cutscene_step  u8
# the car street's exit: set by a turtle not yet standing at its place (walking to it, boarding, jumping: 02C0C2
# "move.b #$ff, $633eb.l", 02C106 "move.b #$ff, $633eb.l"); while no turtle sets it the van comes (02BF2C "move.b D0,
# $633eb.l", 02BF8E "tst.b $633eb.l", 02BFB4 "lea $62c80.l, A0")
0633EB  var  turtles_not_waiting  u8

# ---- the speech balloons ----
# the balloon's place in the tile RAM (0302E2 "addi.l #$100000, D1", 0302EA "move.l D1, $633f8.l"), where erase_balloon
# blanks it (03030C "movea.l $633f8.l, A6")
0633F8  var  balloon_place  u32 io
# the frames the balloon stays, from its record (030272 "move.b ($4,A6,D3.w), $633fc.l"), counted down in play, in the
# entries, the exits and the story, and at 0 erased (02F60E "subq.b #1, $633fc.l", 02F618 "jsr $3030c.l"; 019F3E
# "subq.b #1, $633fc.l")
0633FC  var  balloon_time  u8

# ---- the players' markers ----
# frames each player's marker (objects 40-43, 062C80 on: the object 40 places after its turtle, turtle_start_marker)
# stays on its turtle: 0x80 when the turtle joins, comes back or starts the area (019B5A "lea $61100.l, A6", 019B60
# "move.b #$80, (A6,D0.w)"); update_players moves the marker with the turtle while it counts down and takes it off at
# 0 (01A33A "tst.b (A6)", 01A340 "move.l ($c,A4), ($c,A5)", 01A34C "subq.b #1, (A6)", 01A352 "clr.b (A5)"); the area's
# exit clears them (02B27E "move.b D0, (A6)")
061100  var  marker_times[4]  u8

# ---- the speech balloons and the lines said with them ----
# the frames since the last balloon, or since the area or its exit began: one more a frame (01EBCE "addq.w #1,
# $61104.l"; the exit's 02B5F4 "addq.w #1, $61104.l"), 0 at each balloon (030258 "clr.w $61104.l") and at the area's
# start (01E20A "move.w D0, $61104.l"); the lines wait on it: the first cry 0x30 frames in (01ED1E "cmpi.w #$30,
# $61104.l", 01EE4A "cmpi.w #$30, $61104.l"), Bebop's lines 0x80 and 0x60 after the one before (05040C "cmpi.w #$80,
# $61104.l", 050442 "cmpi.w #$60, $61104.l"), the turtle's answer 0xA0 after (01F018 "cmpi.w #$a0, $61104.l")
061104  var  time_since_balloon  u16
# the balloons shown in the area so far: one more each (030252 "addq.b #1, $61106.l"); the lines said once test it,
# the first cry when none was (01ED14 "tst.b $61106.l", 01EE40 "tst.b $61106.l"; area 7's "We gotta save Splinter":
# 01A0A8 "tst.b $61106.l"), the drill pod's line when only one was (0306AC "cmpi.b #$1, $61106.l"); the apartment's
# exit sets 2 so April does not cry for help again (02B33C "move.b #$2, $61106.l")
061106  var  balloons_said  u8
# the lines said of the street's exchange (area 2): Bebop's "You're dead, shell-brain" (02FFFE "addq.b #1,
# $61112.l"), the turtle's answer "They ain't getting any prettier!" (0300DA "addq.b #1, $61112.l"), Bebop's "Watch your
# mouth, slime ball!" (0300F0 "addq.b #1, $61112.l"); each waits for the one before (050402 "tst.b $61112.l", 01F00C
# "cmpi.b #$1, $61112.l", 050436 "cmpi.b #$2, $61112.l"), and the turtle's line out of a manhole only comes before the
# exchange or 0x80 frames after it (03009A "tst.b $61112.l", 0300A4 "cmpi.b #$3, $61112.l", 0300B4 "cmpi.w #$80,
# $61104.l"); 0 at the area's start (01E24C "move.b D0, $61112.l")
061112  var  bebop_exchange_lines  u8
# a narrow balloon put to the right of its speaker, not the left: from D0 (0301D8 "move.b D0, $61113.l", 0301DE "bne
# $301ea", 0301EA "addi.w #$20, D1"); its pointer is drawn only when it is on the left (02FFDA "tst.b $61113.l",
# 02FFE0 "beq $3019a")
061113  var  balloon_on_right  u8

# ---- the area's stages ----
# area 2's diagonal stretch: FF while stage 2 scrolls segment 4, else 0, set every frame (01A3CA "clr.b $61107.l",
# 01A3D0 "cmpi.b #$2, $60121.l", 01A3DC "cmpi.w #$4, $633c0.l", 01A3E8 "subq.b #1, $61107.l"); with it a new row of the
# layers also scrolls them across (01B52C "tst.b $61107.l", 01B532 "bne $1b4c6": push_scroll_diagonally), the turtles'
# limits change (01AFAE "tst.b $61107.l"), and an enemy hit from behind takes reaction 0x24 whatever its definition
# says (048E4A "tst.b $61107.l", 048E50 "bmi $48e68")
061107  var  diagonal_scroll  s8
# the story before area 0 is over: 0 at its start (0308F0 "move.b D0, $61108.l"), FF when the turtles land on the
# roof (031014 "subq.b #1, $61108.l"); area_title_intro_run ends the story on it (006416 "tst.b $61108.l")
061108  var  intro_over  u8
# the turtles' way into the area is done: cleared when it starts (006808 "clr.b $61109.l"; turtle_init too: 019C96
# "clr.l D1", 019CA8 "move.b D1, $61109.l"), FF when the entry ends (019FBA "move.b #$ff, $61109.l", 01A12E "move.b
# #$ff, $61109.l", 01A2C2 "move.b #$ff, $61109.l"); then the markers are drawn (019F6A "tst.b $61109.l") and the play
# starts (00687E "tst.b $61109.l", 006884 "bne $68a2")
061109  var  area_entry_done  u8
# the drill pod's arrival (areas 1 and 7): the frames of the rumbling, 0xC0 (030440 "move.w #$c000, $6110e.l", 03046E
# "subq.b #1, $6110e.l", 030474 "beq $30568"), then of its door's wait, 0x70: the shake until 0x30, then still to 0
# (03070A "move.b #$70, $6110e.l", 03071C "move.b $6110e.l, D0", 030726 "cmpi.b #$30, D0", 0307DE "subq.b #1,
# $6110e.l")
06110E  var  drill_arrival_time  u8
# the shake's next offset, of the 8 at 030652, every other frame (030486 "move.b $6110f.l, D0", 03048C "addq.b #1,
# $6110f.l", 030492 "andi.w #$7, D0", 030498 "lea $30652.l, A6"); 0 when the rumbling starts (030440)
06110F  var  shake_step  u8
# the street's TV in the shop window (stage 2): its frames from when layer B passes 0x12000 (01EFFC "addq.w #1,
# $61110.l", 01F006 "subq.w #1, $61110.l": no further than FFFF); April's picture at 0 (01EEF8 "tst.w $61110.l"),
# "Help meeee...!" at 0x10 (01EF12 "cmpi.w #$10, $61110.l"), Shredder's line at 0xB0 (01EF2A "cmpi.w #$b0,
# $61110.l"), the screen off at 0x170, also set at once past 0x1E000 (01EEEC "move.w #$170, $61110.l")
061110  var  tv_time  u16

# ---- the difficulty ----
# the levels of difficulty the time without a knock-out adds: its high byte / 32 (02F5FC "lsr.b #5, D0", 02F5FE
# "move.b D0, $6111e.l"), added to difficulty (006A7A "move.b $6111e.l, D7", 006A80 "add.b D7, $60130.l"); 0 at a new
# game (006240 "clr.b $6111e.l") and at the intro (0308DE "move.b D0, $6111e.l")
06111E  var  difficulty_from_time  u8

# ---- the floor map ----
# the floor map: 32 rows of 0x40 cells (one an 8-pixel column) that the layers' blocks fill and the objects read
# (01DEB4 "lea $61800.l, A6"); the rows wrap, the first's row up is the last and the last's row down is the first
# (01DF2C "cmpa.l #$61840, A6", 01DF36 "adda.w #$800, A4", 01DF7C "cmpa.l #$61fc0, A6", 01DF86 "suba.w #$800, A4";
# 048966 "cmpa.l #$62000, A6", 048970 "suba.w #$800, A6"). The C writes its addresses as numbers today (0x61800u,
# 0x61840u, 0x61C30u...). 061830 is its cell 0x30 of row 0, where the Technodrome's lift walls the shaft, 16 columns
# down 0x20 rows (01F66A "lea $61830.l, A0", 01F67E "move.b D3, (A1)", 01F680 "adda.w #$40, A1"), and which the lift's
# end tests before walling it again (01F716 "lea $61830.l, A0", 01F71C "cmpi.b #-$1, (A0)"): floor_map(0x30)
061800  var  floor_map[2048]  u8
# the cell below the object's at its floor level (the row after: 01DF8A "move.b ($40,A4), $61118.l"; the last row's
# is the first's: 01DF7C "cmpa.l #$61fc0, A6", 01DF86 "suba.w #$800, A4"), the counterpart of floor_cell_up; a wall
# there blocks an enemy's way down (0487E0 "move.b $61118.l, D3", 0487EA "bset #$2, D7")
061118  var  floor_cell_down  u8
# where an enemy's floor cell is in the floor map, kept from read_floor_cells_on_screen (048780 "jsr $1de3e.l", 048786
# "move.l A6, $61248.l"; that cell: 01DEC0 "move.b (A6), $633d3.l"), from which it follows the stairs a row at a time
# (04890E "movea.l $61248.l, A6", 048962 "adda.w #$40, A6")
061248  var  enemy_floor_cell_place  u32
# the floor height an enemy climbing stairs goes no higher than, by the area from the table at 048830 (0477D0 "lea
# $48830.l, A6", 0477E0 "move.b (A6,D0.w), $6124c.l": 0x50 in area 2, 0x18 in 3, 0x20 in 7, else 0): 8 a row up
# (048994 "addi.b #$8, ($32,A0)", 04899A "move.b $6124c.l, D0", 0489A0 "cmp.b ($32,A0), D0", 0489A8 "move.b D0,
# ($32,A0)")
06124C  var  stairs_top_height  u8

# ---- the enemies' engine ----
# the turtles in play: update_player_slots counts the slots whose turtle is in use (04784A "tst.b (A5)", 047854
# "addq.w #1, D1", 04787E "move.b D1, $61207.l"); with none the nearest ones are not looked for (04835E "tst.b
# $61207.l"); the parked car lets out four soldiers with 2 or more (012B1C "cmpi.b #$2, $61207.l"), Shredder makes
# clones by it (0528DC "move.b $61207.l, D0")
061207  var  turtles_in_play  u8
# the slot with the fewest enemies (update_player_slots: 047856 "cmp.b ($4,A6), D0", 04785E "move.b ($4,A6), D0",
# 047862 "move.l A6, $61208.l"): an enemy whose two nearest slots have their share goes after it (048ADA "movea.l
# $61208.l, A6", 048AE0 "cmp.b ($4,A6), D0")
061208  var  least_crowded_slot  u32  player_slot
# the enemies in play: each start counts one more (0489E8 "addq.b #1, $6120c.l" and the other kinds' starts), each
# removal one less, never under 0 (048B3C "subq.b #1, $6120c.l", 048B46 "clr.b $6120c.l"); an area is not cleared
# while any is left (01A93E "tst.b $6120c.l"), and the scroll is held while there are too many (02F6CC "cmp.b
# $6120c.l, D1")
06120C  var  enemies_on_screen  u8
# each turtle's share of the enemies: enemies_on_screen / turtles_in_play, at least 1 (047888 "move.b $6120c.l, D0",
# 04788E "divu.w D1, D0", 047892 "addq.w #1, D0", 047894 "move.b D0, $6120d.l"); an enemy keeps to the nearest slot
# that has fewer, then the second nearest, then the least crowded, else the nearest (048AC2 "move.b $6120d.l, D0",
# 048AC8 "cmp.b ($4,A6), D0", 048ACC "bhi $48aea", 048AE8 "exg A5, A6")
06120D  var  enemies_per_turtle  u8
# random_below's seed: stirred with frame_count and the object's place, times 0x17 (04844A "move.w $6120e.l, D7", 048450
# "add.w $600a4.l, D7", 04846A "mulu.w #$17, D7", 04846E "move.w D7, $6120e.l"); 0 in a demo for the same play each time
# (0068BC "clr.w $6120e.l"); its bits as a coin's toss (049392 "tst.b $6120e.l", 04F840 "btst #$7, $6120f.l")
06120E  var  random_seed  u16
# the nearest player's slot to the enemy, by |dx| + |dy| to its turtle (0483DE "lea $62fa0.l, A3", 048416 "movea.l
# A3, A6", 04842C "move.l A6, $61226.l"), kept for when no turtle is in play (04843A "movea.l $61226.l, A6"); slot 0
# at the area's start (0477BC "move.l #$62fa0, $61226.l")
061226  var  nearest_slot  u32  player_slot
# the second nearest (048412 "exg A6, A5", 048422 "movea.l A3, A5", 048432 "move.l A5, $6122a.l", 048440 "movea.l
# $6122a.l, A5")
06122A  var  second_nearest_slot  u32  player_slot
# the nearest turtle to the enemy (objects 0-3: 04836A "lea $62000.l, A4", 0483A0 "movea.l A4, A6", 0483B6 "move.l A6,
# $6122e.l"), kept for when none is in play (0483C4 "movea.l $6122e.l, A6"); turtle 0 at the area's start (0477C6
# "move.l #$62000, $6122e.l")
06122E  var  nearest_turtle  u32  object
# the second nearest (0483AC "movea.l A4, A5", 0483BC "move.l A5, $61232.l", 0483CA "movea.l $61232.l, A5")
061232  var  second_nearest_turtle  u32  object

# ---- Rocksteady and Bebop ----
# Rocksteady's object when he comes beside Bebop (area 4's spawn list: 04F26C "move.l A0, $61220.l"); Bebop's pincer
# charge watches him and, when they meet, crashes them both (050A10 "movea.l $61220.l, A6", 050A16 "jsr $482fa.l",
# 050A7E "move.w A0, ($4c,A6)")
061220  var  rocksteady  u32  object
# Bebop's frames to the next pincer charge beside Rocksteady: 0x168 at his start (050248 "move.w #$168, $61224.l"),
# counted down while he thinks, and at 0 the charge (0504BE "subq.w #1, $61224.l", 0504C8 "move.w #$1e, $61224.l",
# 0504D0 "move.b #$1, $61240.l"); 0x168 again when it is called off, 0x708 after a crash (050AAE "move.w #$168,
# $61224.l", 050AC6 "move.w #$708, $61224.l")
061224  var  pincer_charge_wait  u16
# Rocksteady and Bebop still about: one more at each one's start (04F206 "addq.b #1, $61236.l", 0501F8 "addq.b #1,
# $61236.l"), one less as each falls beaten; at the last, the area's boss is down and the music stops (05010C "subq.b
# #1, $61236.l", 050112 "bne $5012e", 050116 "move.b #$1, $6131d.l", 050122 "move.b D7, $60080.l"; Bebop's 050EDC)
061236  var  bosses_left  u8
# the hits Rocksteady takes before he strikes back, by the difficulty from the table at 04F5B4 (4, 4, 4, 3, 2...:
# 04F21C "move.b (A6,D0.w), $61237.l", again as he gets up: 05004E), one less a hit (04F622 "subq.b #1, $61237.l");
# at 0 his flinch ends in his close blow at once (04FE92 "tst.b $61237.l", 04FEA2 "move.b #$1, ($48,A0)")
061237  var  rocksteady_hits_to_strike_back  u8
# the attack Rocksteady picked last (04F52A "move.w ($28,A0), $61238.l"): bare-handed, no attack from afar while it
# was the charge (move 88: 04F4E4 "tst.b ($2a,A0)", 04F4EC "cmpi.w #$88, $61238.l", 04F4F4 "beq $4f53e")
061238  var  rocksteady_last_attack  u16
# the door of area 4 is open: Rocksteady and Bebop come out (04A7C4 "move.b #$ff, $6123d.l"; 04F35E "tst.b $6123d.l",
# 050392 "tst.b $6123d.l")
06123D  var  bosses_come_out  u8
# the turtle the pincer charge goes at: Bebop's (0504D8 "move.w A1, $6123e.l"), which Rocksteady takes as his target
# (04F416 "move.w $6123e.l, ($20,A0)"; the bosses' target is a turtle's object: 04F3E6 "move.l #$62000, D0")
06123E  var  pincer_charge_target  u16  object
# the pincer charge is on: Bebop starts it (0504D0 "move.b #$1, $61240.l"), Rocksteady joins it (04F40C "tst.b
# $61240.l", 04F41E "move.w #$98, ($28,A0)"); a hit on either calls it off (04F632 "clr.b $61240.l", 05062C "clr.b
# $61240.l"), and so does one of them running into a wall (04FBE6 "clr.b $61240.l", 050AA8 "clr.b $61240.l"); with it
# and pincer_charge_crash clear the charge is over (04FAA2 "tst.b $61240.l", 04FAAC "tst.b $61247.l")
061240  var  pincer_charge  u8
# the screen's edges the charge has taken: bit 6 the left, bit 7 the right (0504DE "clr.b $61241.l", 05090A "bset #$6,
# $61241.l", 050912 "bne $5092c", 05092C "bset #$7, $61241.l")
061241  var  pincer_charge_edges  u8
# the edges reached: each ors its edge's bit in when it gets there (04FB2C "move.b ($45,A0), D0", 04FB30 "or.b D0,
# $61242.l"), and both charge when it is C0 (04FB3C "cmpi.b #-$40, $61242.l", 050988 "cmpi.b #-$40, $61242.l")
061242  var  pincer_charge_at_edges  u8
# no pincer charge: Bebop alone (area 2: 050222 "move.b #$ff, $61243.l"; beside Rocksteady 050250 "clr.b $61243.l") or
# one of them beaten (0500AE "move.b #$ff, $61243.l", 050E8E "move.b #$ff, $61243.l"); Bebop does not count down to it
# then (0504B4 "tst.b $61243.l", 0504BA "bne $504fe")
061243  var  no_pincer_charge  u8
# they ran into each other in the charge (050A4E "move.b #$1, $61247.l"): Rocksteady crashes too (04FBC4 "tst.b
# $61247.l", 04FBCE "lea $5ad06.l, A6"); cleared as a charge starts (0504EA "clr.b $61247.l")
061247  var  pincer_charge_crash  u8

# ---- Shredder and Rodney ----
# Shredder is beaten: his clones vanish (053418 "move.b #$ff, $6123a.l"; 052920 "tst.b $6123a.l", 052936 "move.w #$dc,
# ($28,A0)"); 0 at his start (05280A "clr.b $6123a.l")
06123A  var  shredder_beaten  u8
# Shredder himself (health_bars FF, not a clone) is firing his ray: none while it is set (052AE6 "tst.b ($8,A0)", 052AEE
# "tst.b $6123b.l", 052B18 "move.w #$b0, ($28,A0)", 052B30 "move.b #$ff, $6123b.l"); cleared when it ends or he is hit
# (053742 "clr.b $6123b.l", 052BDC "clr.b $6123b.l")
06123B  var  shredder_firing_ray  u8
# the clones Shredder has made: one more each (052904 "addq.b #1, $6123c.l", 05290A "move.w #$f0, ($28,A0)"), while
# the enemies are no more than the turtles and they are no more than the table at 052918 by the turtles (0, 3, 6, 9,
# 0xC: 0528E2 "cmp.b $6120c.l, D0", 0528F6 "lea $52918.l, A6", 0528FC "cmp.b (A6,D0.w), D1"); 0 at his start (052816
# "clr.b $6123c.l")
06123C  var  shredder_clones_made  u8
# a Rodney has said "Do not resist us" in this area: only one says it (052296 "tst.b $61244.l", 0522AC "jsr $30024.l",
# 0522B2 "move.b #$ff, $61244.l")
061244  var  rodney_line_said  u8

# ---- the bosses' common flags ----
# one of the turtles in play, not out and not being hit, to pick from at random: their numbers (011E00 "lea $61306.l,
# A5", 011E06 "clr.l $61306.l", 011E30 "move.b D6, (A5,D7.w)", 011E46 "jsr $48448.l", 011E4C "move.b (A5,D7.w), D7",
# 011E50 "mulu.w #$50, D7"); boss_pick_target's
061306  var  boss_target_choices[4]  u8
# the Mousers break down: the rock soldier or Stockman is beaten (011AC0 "move.b #$1, $61313.l", 013F58 "move.b #$1,
# $61313.l"; 051162 "tst.b $61313.l"); 0 at their starts (0115DE "clr.b $61313.l", 013C96 "clr.b $61313.l")
061313  var  mousers_break_down  u8
# the area's boss is down (the last of Rocksteady and Bebop: 050116 "move.b #$1, $6131d.l", 050EE6 "move.b #$1,
# $6131d.l"; the rock soldier: 011AC8 "move.b #$1, $6131d.l"): the other enemies go at once (048B04 "tst.b $6131d.l",
# 048B38 "clr.w ($0,A0)", 048B3C "subq.b #1, $6120c.l"; Rodney: 051DEE "tst.b $6131d.l")
06131D  var  boss_defeated  u8

# ---- the scenery and the air attacks ----
# the broken hydrant sprays to the left: set by the last hit's way (00FC50 "clr.b $61300.l", 00FC5C "tst.b ($7,A0)",
# 00FC6A "move.b #$1, $61300.l"), each jet starts left of it and flies left (00FCEC "tst.b $61300.l", 00FCF6 "not.w D7",
# 00FD24 "tst.b $61300.l", 00FD2E "ori.b #$80, ($2f,A6)")
061300  var  hydrant_sprays_left  u8
# the grille's object, left by its start (010E64 "move.l A0, $61302.l"); nothing reads it, and nothing starts kind 40
061302  var  unused_grille  u32  object
# the helicopters about (area 6): one more at each start (012DC6 "addq.b #1, $6130a.l"), one less when one is
# destroyed or leaves (012F54 "subq.b #1, $6130a.l", 013034 "subq.b #1, $6130a.l"); sound 0A while any is
# (006AF6 "tst.b $6130a.l", 006B00 "move.w #$a, D7"), 09 when the last one is struck (012EE0 "cmpi.b #$1, $6130a.l",
# 012EEC "move.w #$9, D7")
06130A  var  helicopter_count  u8
# the spiked poles' phase, shared by the six (area 3): 0 still, 1 the first is on the screen, 2 they drop, 3 down, 4
# they rise (011142 "clr.b $61310.l", 011170 "move.b #$1, $61310.l", 0111A4 "move.b #$2, $61310.l", 0111F4 "move.b
# #$3, $61310.l", 01121C "move.b #$4, $61310.l", 01126E "clr.b $61310.l"); each waits on it (011178 "cmpi.b #$1,
# $61310.l")
061310  var  spiked_poles_phase  u8
# the flying drones are let out (area 7: 013420 "clr.b $61311.l", 01349E "move.b #$1, $61311.l"; 013528 "tst.b
# $61311.l")
061311  var  flying_drones_released  u8
# the flying drones about (013426 "clr.b $61312.l", 0134E6 "addq.b #1, $61312.l", 0135D8 "subq.b #1, $61312.l", 0136F8
# "subq.b #1, $61312.l"; 013A30 "tst.b $61312.l")
061312  var  flying_drone_count  u8
# the drones' sound is on: set when they are let out (0134A6 "move.b #$1, $61318.l"), off when none is left (013A26
# "tst.b $61318.l", 013A66 "clr.b $61318.l")
061318  var  drone_sound_on  u8
# frames to the drones' next sound 38: 0x20-0x80 from the table at 013A74 at random (013A3A "subq.b #1, $61319.l",
# 013A40 "bcc $13a72", 013A54 "move.b (A6,D7.w), $61319.l", 013A5C "move.w #$38, D7")
061319  var  drone_sound_wait  u8

# ---- the rock soldiers' missiles ----
# a missile is out: the Technodrome's rock soldier fires none while it is set (0123F8 "tst.b $6130b.l", 0123FE "bne
# $1241e"), and a missile's explosion clears it at its end (012856 "clr.b $6130b.l"); nothing sets it, so the limit
# never applies (symbols.txt says so at 0123F8)
06130B  var  missile_out  u8
# the spent missiles are kept: with it a missile whose explosion has ended stays in use, not drawn, and missile_out
# stays (012846 "move.b #$1, ($0,A0)", 01284C "tst.b $6130c.l", 012852 "bne $12862"; without it: 01285C "jmp
# $1832a.l"); nothing sets it
06130C  var  hold_spent_missiles  u8

# ---- Krang ----
# the curtain Krang appears from (kind 68): its start leaves its object (00E986 "move.l A0, $61314.l"), Krang waits
# until it is gone (00DFF6 "movea.l $61314.l, A6", 00DFFC "tst.w ($0,A6)")
061314  var  krang_curtain  u32  object
# Krang's lasers not yet on their way: one more at each one's start (00EA96 "addq.b #1, $6131a.l"), one less when its
# delay is over (00EB36 "subq.b #1, $6131a.l"); he waits until 0 (00E1E4 "tst.b $6131a.l")
06131A  var  krang_lasers_waiting  u8
# Krang's fist is flying: set as it flies off (00E174 "move.b #$1, $6131b.l"), cleared off the screen (00EC8C "clr.b
# $6131b.l"); he waits meanwhile (00E182 "tst.b $6131b.l")
06131B  var  krang_fist_flying  u8
# Krang's last move was the pose: its cry only the first time in a row (00E5FC "tst.b $6131c.l", 00E606 "move.b #$1,
# $6131c.l", 00E60E "move.w #$8f, D7"); his other moves clear it (00E5E0 "clr.b $6131c.l", 00E624 "clr.b $6131c.l")
06131C  var  krang_posed_last  u8

# ---- the leftovers of areas A and B (nothing reads them, or nothing writes them) ----
# a second set of the layers' four scroll words: reset_layers_scroll clears each right after the layers' own, from the
# same register (008C72 "move.w D0, $6005c.l", 008C8A "move.w D0, $600c8.l"; 008C78 "move.w D1, $6005e.l", 008C90
# "move.w D1, $600ca.l"; 008C7E "move.w D2, $60060.l", 008C96 "move.w D2, $600cc.l"; 008C84 "move.w D3, $60062.l",
# 008C9C "move.w D3, $600ce.l"); nothing else touches them
0600C8  var  unused_layer_a_scroll_x_copy  u16
0600CA  var  unused_layer_a_scroll_y_copy  u16
0600CC  var  unused_layer_b_scroll_x_copy  u16
0600CE  var  unused_layer_b_scroll_y_copy  u16
# 1 when DSW2 bit 2 is off (0012BC "btst #$2, $60031.l", 0012C4 "bne $12c8", 0012C6 "addq.b #1, D0", 0012C8 "move.b
# D0, $60093.l"); nothing reads it, and MAME calls the switch unused
060093  var  unused_dip_flag  u8
# the first of the record the boot takes by DSW2 bits 3-4 from the table at 00142A, 1 or 0 (0012DC "andi.b #$18, D0",
# 0012E6 "lea $142a.l, A0", 0012EE "move.w (A0)+, D0", 0012F0 "move.b D0, $60095.l"); unused_dip_setting is its third
060095  var  unused_dip_setting_flag  u8
# the record's second, 00200000, 00300000 or 0 (0012F6 "lea $60096.l, A1", 0012FC "move.l (A0)+, (A1)+")
060096  var  unused_dip_setting_value  u32
# 4, or 6 with DSW3 bit 3 on (001322 "moveq #$4, D0", 001324 "btst #$3, $60032.l", 00132E "moveq #$6, D0", 001330
# "move.b D0, $600b9.l"); nothing reads it, and MAME calls the switch unused
0600B9  var  unused_dip_number  u8
# credits apart from the slots': the coin's screen goes on with them as with lives or free play (0089BC "or.b
# $60320.l, D0") and counts them with the slots' credits (008A4A "add.b $60320.l, D0", 008A50 "add.w $60306.l, D0");
# nothing writes it, so it is always 0
060320  var  extra_credits  u8
# bit 7 of a typed text header's colour number, which the colour is taken without (0183CC "clr.b $6342a.l", 0183D2
# "tst.b D7", 0183D8 "bclr #$7, D7", 0183DC "move.b #$1, $6342a.l"); nothing reads it
06342A  var  unused_typed_text_flag  u8

# ---- the drill's arrival ----
# 0 not yet, 1 arriving, FF over (030430 "move.b #$1, $633fe.l", 030876 "move.b #$ff, $633fe.l"; 0303CE "tst.b
# $633fe.l", 0303D4 "bmi $30650"); the fire's flicker of the priority meanwhile (0069D8 "cmpi.b #-$1, $633fe.l"); area
# 1's end waits for it (01A948 "tst.b $633fe.l", 01A94E "bpl $1a95a")
0633FE  var  drill_arrival  s8
# its step (0303E0 "move.b $633ff.l, D0", 03064A "addq.b #1, $633ff.l")
0633FF  var  drill_arrival_step  u8
# the drill's rumble on, sound 34 (030452 "move.b #$34, D7", 03045C "move.b #$ff, $63488.l") until the pod opens
# (030732 "clr.b $63488.l"); the area's music gives it again meanwhile (006AA8 "tst.b $63488.l", 006AB2 "move.b #$34,
# D7")
063488  var  drill_rumbling  u8

# ---- the palette editor (unused) ----
# the bank, the palette and the colour picked at 1, 2 and 3 (palette_editor_entry: 009EDA "move.b ($1,A0), D7", 009EE6
# "move.b ($2,A0), D7", 009EF0 "move.b ($3,A0), D7"), turned up and down by the pick + 1 (009D06 "move.b ($4,A0), D7",
# 009D0A "addi.b #$1, D7", 009D2E "addq.b #1, (A0,D7.w)"); 0 only cleared (009C48 "clr.l (A6)")
063400  var  palette_editor_numbers[4]  u8
# which of the six numbers the joystick changes (009CA2 "addq.b #1, ($4,A0)", 009CA6 "cmpi.b #$6, ($4,A0)"): 0-2 the
# entry, 3-5 its colour's parts (009CD0 "cmpi.b #$3, ($4,A0)")
063404  var  palette_editor_pick  u8
# the pick drawn last time, to draw the new one in another colour (009C80 "move.b ($4,A0), ($5,A0)", 009E66 "cmp.b
# ($5,A0), D7")
063405  var  palette_editor_last_pick  u8
# the colour's part picked, from 009F16 (009D54 "move.b (A6,D7.w), ($7,A0)")
063407  var  palette_editor_part  u8
# the editor's step (009C20 "move.b $63408.l, D0", 009C54 "addq.b #1, $63408.l")
063408  var  palette_editor_step  u8

# ---- the fade (copy_palette_sets) ----
# its four bytes: fading, fade_pass_step, fade_part and fade_lists_left, cleared together when a pass is over (00973C
# "clr.l $63410.l") and by the scenes that start one (007A6A "clr.l $63410.l", 02F790 "clr.l $63410.l")
063410  var  fade_state  u32
# a pass of the fade under way (009642 "move.b #$1, $63410.l"); the scenes wait for it (007AB2 "tst.b $63410.l", 02F8EA
# "tst.b $63410.l")
063410  var  fading  u8
# the pass's step: start, read, move, write (009622 "move.b $63411.l, D7", 00964A "addq.b #1, $63411.l", 0096CA "addq.b
# #1, $63411.l")
063411  var  fade_pass_step  u8
# the part of the palette RAM, 0-4 (00967A "move.b $63412.l, D7", 009680 "btst D7, $63418.l", 009690 "cmpi.b #$5,
# $63412.l")
063412  var  fade_part  u8
# the target's lists of 16 colours left for the part, 8 (0097C6 "move.b #$8, $63413.l", 0097F6 "subq.b #1, $63413.l")
063413  var  fade_lists_left  u8
# the target palette sets (009662 "move.l A5, $63414.l", 009782 "movea.l $63414.l, A5", 0097C2 "movea.l (A5,D6.w), A4";
# 02F8F4 "lea $a0ae.l, A5")
063414  var  fade_target  u32 palette_pointer
# the parts to fade, a bit a part (00965C "move.w D6, $63418.l", 009680 "btst D7, $63418.l")
063418  var  fade_part_mask  u8
# how far a colour's red, green and blue move toward the target's a pass (009778 "move.b $63419.l, D0", 00977E "andi.w
# #$f, D0")
063419  var  fade_rate  u8
# the place in the fade's buffer (063800) the next part goes to or comes from (009668 "lea $63800.l, A5", 00966E "move.l
# A5, $6341a.l", 009754 "movea.l $6341a.l, A5")
06341A  var  fade_buffer_place  u32

# ---- the typed texts ----
# where the next character goes in the tile RAM: the line's header (0183B6 "move.l (A6)+, $63420.l"; 01988E's header is
# 001004B8), on 2 a character (01837E "move.b $6342b.l, (A5)+", 018388 "move.b D7, (A5)+", 018390 "move.l A5,
# $63420.l")
063420  var  typed_text_place  u32 io
# the next character of the text, 0 none (0183C6 "move.l A6, $63424.l", 018340 "tst.l $63424.l", 018354 "movea.l
# $63424.l, A6"; '!' the end: 018362 "cmpi.b #$21, D7", 0183A8 "clr.l $63424.l")
063424  var  typed_text  u32 text
# frames to the next character (01834A "subq.b #1, $63428.l", 018350 "bcc $183a0")
063428  var  typed_text_wait  u8
# the frames between characters, from the header (0183BC "move.b (A6)+, $63429.l", 018396 "move.b $63429.l, $63428.l")
063429  var  typed_text_delay  u8
# the characters' colour: text_colours by the header's number (0183E4 "lea $1f1a.l, A6", 0183EA "move.b (A6,D7.w),
# $6342b.l")
06342B  var  typed_text_colour  u8

# ---- the staff roll and the ending ----
# the staff roll's credit, 0-0xD (006F72 "clr.b $6342e.l", 006F90 "cmpi.b #$e, $6342e.l", 006FAA "move.b $6342e.l, D7",
# 007078 "addq.b #1, $6342e.l"); the name's text by it (0074A8 "move.b $6342e.l, D6", 0074AE "lsl.w #4, D6")
06342E  var  staff_roll_credit  u8
# the typed passes still going (struct typed_pass): 7 or 8 started (007450 "move.b #$7, $6342f.l", 0185AC "move.b #$8,
# $6342f.l"), one less as each ends (00758A "subq.b #1, $6342f.l", 018632 "subq.b #1, $6342f.l"); the profiles and the
# ending wait for 0 (005138 "tst.b $6342f.l", 006E7E "tst.b $6342f.l")
06342F  var  typed_passes_left  u8
# the Technodrome's explosions started: the next at one of 8 places by it (00728E "move.b $63480.l, D7", 007294 "andi.b
# #$7, D7", 0072DA "addq.b #1, $63480.l")
063480  var  technodrome_explosions  u8

# ---- the box opening the screen (start_box_opening, grow_tile_box) ----
# its top left corner in the tile RAM (01866E "movea.l $1867e.l, A6", 018674 "move.l A6, $63490.l"; 01867E holds
# 001007BE), a tile left and a row up each frame (0186BA "subi.l #$2, $63490.l", 0186D6 "subi.l #$80, $63490.l")
063490  var  box_place  u32 io
# its width in tiles less one, 2 more each frame (018656 "move.b #$1, $63494.l", 01869E "move.b $63494.l, D5", 0186B4
# "addq.b #2, $63494.l")
063494  var  box_width  u8
# its height in rows less one, up to 0x1F (01865E "move.b #$1, $63495.l", 0186C4 "cmpi.b #$1d, $63495.l", 0186D0 "addq.b
# #2, $63495.l")
063495  var  box_height  u8
# the tile its edge is drawn with, 0x10 the blank one (018666 "move.b #$10, $63496.l", 018698 "move.b $63496.l, D7")
063496  var  box_tile  u8
# the frames it still grows, 20 (01864E "move.b #$14, $63497.l", 0186AE "subq.b #1, $63497.l"); the ending waits for it
# (006C9C "tst.b $63497.l")
063497  var  box_frames_left  u8
# the unused animation viewer's entry in animation_viewer_animations and animation_viewer_counts, a button forward or
# back (0084F2 "addq.b #1, $63498.l", 008530 "subq.b #1, $63498.l", 008590 "move.b $63498.l, D6")
063498  var  viewer_entry  u8
# and its animation in that entry's table, another button on to the next (0084BA "addq.b #1, $63499.l", 008596
# "move.b $63499.l, D7", 0085A2 "lsl.w #2, D7")
063499  var  viewer_animation  u8

# ---- the ranking ----
# a name was entered (007F78 "move.b #$1, $634a0.l"): then BEST 10 PLAYERS follows (007FDE "tst.b $634a0.l"); cleared
# at the ranking's start (007C00 "clr.b $634a0.l")
0634A0  var  name_entered  u8
# the ranking's 99 scores, BCD, and at the end the one being put in (007C16 "lea $63500.l, A6", 007C3C "move.w #$c4, D6",
# 007C4E "cmp.w D0, D1", 007C54 "move.w ($2,A6,D6.w), (A6,D6.w)"); its defaults at the reset (0082B8 "lea $63500.l,
# A6"); BEST 10 PLAYERS (0090C4 "lea $63500.l, A5"). The test mode's MASK ROM CHECK keeps its six sums in the first 12
# bytes (0019BC "lea $63500.l, A0", 001AC8 "move.w D7, ($0,A0)"); the next reset puts the defaults back.
063500  var  ranking_scores[100]  u16
# the place a player's score goes in, below the 99th (007C40 "move.w ($4,A3), ($2,A6,D6.w)" with D6 0xC4): named on its
# own because the C writes it by its address (ranking.c: unk_0635C6 = PLAYER(player)->score)
0635C6  var  ranking_new_score  u16
# the top ten's initials, 4 bytes each (three letters and 0), and the new one's after them (007C1C "lea $635c8.l, A5",
# 007C8C "move.l (A5,D2.w), ($4,A5,D2.w)"); the letter a player enters (007E62 "lea $635c8.l, A4", 007F00 "move.b
# (A4,D5.w), D4", 007F1A "move.b D4, (A4,D5.w)"); BEST 10 PLAYERS (009048 "lea $635c8.l, A5")
0635C8  var  ranking_initials[44]  u8
# the new score's initials, "AAA" to start (007C34 "move.l #$41414100, ($28,A5)"); named on its own for the same reason
0635F0  var  ranking_new_initials  u32
# each player's place, BCD, 0 none (007C22 "lea $635f4.l, A4", 007C66 "sbcd D1, D0", 007C68 "move.b D0, (A4,D7.w)"; 007BD0
# "move.l D0, $635f4.l"); a player in the top ten enters a name (007D4A "cmpi.b #$11, (A6,D7.w)")
0635F4  var  ranking_places[4]  u8
# the ranking's waits: 0x1E0 frames to look (007D7C "move.w #$1e0, $635f8.l"), 0x5DC for the names (007DE6 "move.w
# #$5dc, $635f8.l", 007E30 "subq.w #1, $635f8.l"), 0x78 and 0x3C after (007F80 "move.w #$78, $635f8.l", 007FB6 "move.w
# #$3c, $635f8.l"). Also the sound test's wait (005C00 "move.w #$12c, $635f8.l") and BEST 10 PLAYERS' sprite x
# (008FF0 "addi.w #$4, $635f8.l")
0635F8  var  ranking_time  u16
# before that its high byte: the turtles still to draw in black, a bit a player (007CEA "move.b #$4f, $635f8.l", 007D1A
# "bclr D0, $635f8.l", 007D72 "move.b $635f8.l, D7"); the unused coin counter test's pulse time (005A5E "subq.b #1,
# $635f8.l", 005B22 "move.b #$20, $635f8.l")
0635F8  var  turtles_in_black  u8
# the initials each player has entered, 3 done (007DB8 "clr.b (A5,D7.w)" with 007D9C "lea $635fa.l, A5"; 007ECE "addq.b
# #1, (A3,D7.w)" with 007E5C "lea $635fa.l, A3"); the title's banner's speed uses its first word (004BB0 "move.w #$7,
# $635fa.l", 004BCC "subq.w #1, $635fa.l") and the test mode its bytes (005A80 "addq.b #1, $635fa.l", 005BF4 "addq.b #1,
# $635fa.l")
0635FA  var  initials_entered[4]  u8
# the players entering a name, a bit each (007DCC "move.b D6, $635fe.l", 007E4A "btst D7, $635fe.l")
0635FE  var  players_entering_names  u8
# the players whose attack or jump was held the last time, a bit each: a new press takes the next initial (007EC2 "bset
# D7, D1", 007EC4 "btst D7, $635ff.l", 007F60 "move.b D1, $635ff.l")
0635FF  var  initials_buttons_held  u8

# ---- the test mode's MASK ROM CHECK (in ranking_scores' RAM; a name at its own address wins over the array) ----
# the ROM bank read: the sprites' through the K051960 (001B2E "move.b $63518.l, $6350e.l", 001B46 "move.b $6350e.l, D7",
# 001B4C "move.b D7, $140003.l"), the tiles' banks through the K052109 (001BEA "move.b $6350e.l, D7", 001BF6 "move.b
# $60064.l, $106b00.l", 001CB8 "addi.b #$44, $6350e.l")
06350E  var  mask_rom_bank  u8
# a byte of two bits from each of the four bytes read, added to a sum (001D0E "clr.b $6350f.l", 001D1E "ori.b #$1,
# $6350f.l", 001D8A "move.b $6350f.l, D3", 001D90 "add.w D3, (A6)+")
06350F  var  mask_rom_bits  u8
# the four running sums, two of them a chip's sum (001D08 "lea $63510.l, A6", 001D90 "add.w D3, (A6)+"; 001AC0 "move.w
# ($0,A6), D7", 001AC4 "add.w ($2,A6), D7", 001AC8 "move.w D7, ($0,A0)")
063510  var  mask_rom_part_sums[4]  u16
# the first and the last sprite ROM bank to read (001AA4 "move.b #$0, $63518.l", 001AAC "move.b #$3, $63519.l"; 001AE6
# "move.b #$40, $63518.l", 001BB4 "move.b $63519.l, D7", 001BBA "cmp.b $6350e.l, D7")
063518  var  mask_rom_first_bank  u8
063519  var  mask_rom_last_bank  u8

# ======== tables of the objects' addresses ========
# the objects the attack check takes one a frame, by frame_count & 3 (047204's last loop)
0471F4  table  attack_check_objects  u32 object
# where each group of objects new ones are taken from starts (take_free_object: by bits 4-5 of a spawn record's flags;
# take_free_object_in_group by D0), and how many objects each has, less one (the dbra's count)
047BE2  table  object_groups  u32 object
047BDE  table  object_group_counts  u8
# set_animation takes the animation's first frame in A6 (it goes into the object's frame)
param set_animation a6 animation animation_frame

# ======== the players' slots the enemies go after ========
# 062FA0: four records of 16 bytes, one a turtle (04776E sets their first long to the turtles' objects): an enemy
# keeps the one it goes after (enemy target) and counts itself in it
struct player_slot 10
# the turtle (04776E "move.l #$62000, $62fa0.l"; the enemies read it: 048B4E "movea.l (A1), A6")
field player_slot 00 turtle u32 object
# how many enemies go after it: an enemy adds itself when it takes the slot (048B00 "addq.b #1, ($4,A6)") and takes
# itself off when it leaves (048AB8 "subq.b #1, ($4,A1)"); the enemies pick the slot with fewer (048AC8)
field player_slot 04 enemies u8
# the sides of the turtle taken by an enemy that stands by it: bit 6 one, bit 7 the other (048BB6 "bset #$7,
# ($5,A1)", 048BCA "bset #$6, ($5,A1)"); both taken (C0 and up) and the others keep away (048B76 "cmpi.b #-$40,
# ($5,A1)")
field player_slot 05 sides u8
# frames an enemy holds its turtle: one grabbing it sets 0x60 and keeps it so while it holds (049CD0 "move.b #$60,
# ($8,A1)", 049D06), and no other grabs it meanwhile (049CA6 "tst.b ($8,A1)")
field player_slot 08 grab_time u8

# ---- the players' slots' fields ----
# the sides of the turtle taken by the Rodneys, kept apart from the other enemies' (sides): bit 7 one, bit 6 the other
# (051E64 "bset #$7, ($6,A1)", 051E78 "bset #$6, ($6,A1)"); both taken (C0 and up) and the next Rodney keeps away
# (051E3C "cmpi.b #-$40, ($6,A1)"); given back when it leaves the turtle (051FE8 "and.b D0, ($6,A1)")
field player_slot 06 rodney_sides u8
# the same for the Mousers (0511FC "bset #$7, ($7,A1)", 051210 "bset #$6, ($7,A1)", 0511CA "cmpi.b #-$40, ($7,A1)",
# 051306 "and.b D0, ($7,A1)")
field player_slot 07 mouser_sides u8
# the slot's last four bytes: nothing but the clears reaches them (start_player_slots' 04779C "movem.l D0-D2,
# $62fa4.l", which clears +04 to +0F)
field player_slot 0C unused u32
# +0C: no field. Nothing reads or writes a slot's +0C but the clears (04779C "movem.l D0-D2, $62fa4.l", which clears
# +04 to +0F; clear_objects). The C's PLAYER_SLOT(a1)->unk_0C (states.c 12104, 13414, 13519) is not a slot: there A1 is
# the turtle's object, and +0C/+0E are its screen_x and screen_y (04F972 "add.w ($c,A1), D1", 04F976 "move.w ($e,A1),
# D2"); see "seen on the way".


# Rocksteady's and Bebop's target (+20) is a turtle's object, not a slot: they take it from enemy_nearest_turtles
# (04F3DC "jsr $4835e.l", 04F3E2 "move.w A6, ($20,A0)") in the 062000 page, and enemy_boss_attack_move hands it to their
# moves in A1 (04F5EE "move.l #$62000, D0", 04F5F4 "move.w ($20,A0), D0", 04F5F8 "movea.l D0, A1"), which the dispatcher
# also runs with a slot in A1 for the other enemies' attacks (048D94 "movea.l D0, A1"); their moves read its screen
# place (04F972 "add.w ($c,A1), D1", 04F976 "move.w ($e,A1), D2"; 05072A, 050874) and height (04FDE2 "cmpi.b #$40,
# ($10,A1)")
scoped object enemy_rocksteady 20 target u16 object.turtle
scoped object enemy_bebop 20 target u16 object.turtle
local enemy_rocksteady_think 04F3F0 a1 turtle object.turtle
local enemy_bebop_think 050498 a1 turtle object.turtle
local enemy_boss_attack_move 04F5F8 a1 turtle object.turtle
param enemy_rocksteady_close_in_step a1 turtle object.turtle
param enemy_rocksteady_shoot_start a1 turtle object.turtle
param enemy_bebop_walk_to_front_step a1 turtle object.turtle
param enemy_bebop_close_in_step a1 turtle object.turtle

# ======== the players' records, the coin slots, the palette effects and requests (batch 4) ========
# the profile's STRUCT_ARRAYS lays each run out (the first, how many): PLAYER(PLAYER_ADDRESS(n)) for player n + 1

# the players' records: four of 8 bytes from 060100, one a player (004284 "lea $60100.l, A6", 004294 "lea $60108.l, A6",
# 003D78 "adda.l #$8, A1" in add_credit_lives' loop over the four)
struct player 08
# the lives, BCD, 999 at most: the credits turn into lives (003D46 "move.w ($0,A1), D4", 003D4E "abcd D5, D4", 003D58
# "cmpi.w #$999, D4", 003D64 "move.w D4, ($0,A1)"); draw_lives shows them (0023CC "move.w (A4,D4.w), D4")
field player 00 lives u16
# the lives' two low digits, which use_life takes one from (00430A "move.b ($1,A6), D1", 00430E "sbcd D0, D1"; a borrow
# takes one from the hundreds, 00431C "subq.b #1, ($0,A6)")
field player 01 lives_low u8
# a copy of unused_dip_setting made with the score (004342 "move.w $6009a.l, ($2,A6)"): nothing reads it
field player 02 unused_setting_copy u16
# the score, BCD: the enemies defeated (00433E "clr.w ($4,A6)"; add_point adds to it from its low byte: 001F4E "lea
# $60106.l, A4", 001FA0 "abcd -(A5), -(A4)"); draw_score_player_1 draws it (001FEA "lea $60104.l, A6")
field player 04 score u16
# the health bars the player's turtle has, kept between areas (004328 "move.b #$a, ($6,A6)"; 019C6A "move.b $60106.l,
# $62008.l" into the turtle's health_bars, 01A366 back; draw_health_bar: 002474 "move.b ($6,A4,D4.w), D4")
field player 06 health_bars u8
# the message under the player's box and its state (002692 "move.b #$1, ($7,A6)", 0026EE "move.b #$4, ($7,A6)", 002728
# "addi.b #$20, ($7,A6)")
field player 07 message u8

# the coin slots: four of 8 bytes from 060300, one a slot (003D1E "lea $60300.l, A0", 003D72 "adda.l #$8, A0")
struct coin_slot 08
# coins still to count on the slot's coin counter (003CE8 "addq.b #1, ($0,A0)", 003CD6 "subq.b #1, ($0,A0)")
field coin_slot 00 coins_to_count u8
# coins toward the next credit (003CEC "addq.b #1, ($1,A0)", 003D18 "clr.b ($1,A0)")
field coin_slot 01 coins u8
# the counter's pulse, 60 frames a coin (003CE0 "move.b #$3c, ($2,A0)")
field coin_slot 02 counter_pulse u8
# coins a credit and the credits they give, from the DIP switches (001274 "move.b (A0,D1.w), $60303.l", 00127C "move.b
# ($1,A0,D1.w), $60304.l"): only the first slot's are read, for every slot (003CF4 "cmp.b $60303.l, D7", 003D06 "move.b
# $60304.l, D7"); the second slot's get DSW1's high nibble (001290 "move.b (A0,D2.w), $6030b.l") and nothing reads them
field coin_slot 03 coins_per_credit u8
field coin_slot 04 credits_per_coins u8
# the counter on, into board_control's coin counter bit (003CDC "move.b D1, ($5,A0)", 003BC6 "tst.b ($5,A0)")
field coin_slot 05 counter_on u8
# credits not turned into lives yet (003D0C "add.w ($6,A0), D7", 003D68 "subq.w #1, ($6,A0)")
field coin_slot 06 credits u16

# the palette effects' slots: 64 of 10 bytes from 060480 (009888 "lea $60480.l, A5", 00989C "cmpa.l #$60700, A5")
struct palette_effect 0A
# bit 7 in use (00988E "btst #$7, (A5)"), bit 6 going backwards (0099A4 "bset #$6, ($0,A6)"), bits 0-1 the bank
field palette_effect 00 flags u8
# frames left of the step (00991C "subq.b #1, ($1,A6)")
field palette_effect 01 time u8
# the effect's step in the program's data (0098E0 "move.l A4, ($2,A5)", 009928 "movea.l ($2,A6), A5")
field palette_effect 02 step u32 rom
# the colour it writes in the palette RAM (0098E4 "move.l A3, ($6,A5)", 009950 "movea.l ($6,A6), A4")
field palette_effect 06 colour u32 io

# the palette requests: 40 of 6 bytes from 060B00, done a frame after they are queued (0011DE "lea $60b00.l, A0", 00924C
# "cmpa.l #$60bef, A5")
struct palette_request 06
# the kind << 8 | the banks' mask, 0 a free one (009248 "move.w D7, (A5)+", 0092BE "move.w (A0), D0")
field palette_request 00 kind u16
# its data (00924A "move.l A6, (A5)+", 0092C8 "movea.l ($2,A0), A6")
field palette_request 02 data u32 rom

# ---- struct layer (063300 WORKING_LAYER, 063340 LAYER_A, 063380 LAYER_B) ----
# The K052109's two scrolling layers keep 64 bytes each, layer A at 063340 and layer B at 063380; the code copies one
# into 063300, works on the copy and copies it back (01E708 "lea $63340.l, A3", 01E718 "lea $63300.l, A4", 01E720
# "move.l (A3)+, (A4)+"; 01E728 "lea $63340.l, A4"). Bytes 36-3F of each are never touched by name.
struct layer 40
# its place across, 24.8 (pixels << 8): the K052109's x scroll is it >> 8, 9 bits (01ECAA "move.l $63340.l, D0", 01ECB0
# "lsr.l #8, D0", 01ECB2 "andi.w #$1ff, D0", 01ECB6 "move.w D0, $6005c.l"); the area's start sets A's and B's from
# area_layers (01E26E "move.l (A6,D0.w), $63340.l", 01E27E "move.l ($8,A6,D0.w), $63380.l"); the stages compare layer
# B's with places in the area (01F258 "cmpi.l #$33000, $63380.l")
field layer 00 x u32
# x's 256-pixel page: 8 of the map's 32-pixel blocks, the map's column to draw from (01E122 "move.b $63301.l, D0",
# 01E128 "lsl.b #4, D0": 16 bytes, 8 map entries, a page); the skateboard road loops every 512 pixels (01FCC0 "btst #$1,
# $63301.l")
field layer 01 x_page u8
# its place up, 24.8 like x (01AD6A "add.l D0, $63304.l"; 02BD06 "move.l #$10000, $63344.l")
field layer 04 y u32
# y's 256-pixel page: 8 rows of the map's blocks (01E12A "move.b $63305.l, D1", 01E130 "lsl.w #3, D1", 01E138 "mulu.w
# D2, D1")
field layer 05 y_page u8
# y's pixel within its page: the K052109's y scroll is it negated (01ECCE "move.b $63346.l, D0", 01ECD4 "neg.b D0",
# 01ECD6 "move.b D0, $6005f.l"; layer B's shaken: 0116BC "add.b $63386.l, D7"); the floor map's row is read from it
# (01DE98 "sub.b $63306.l, D6")
field layer 06 y_pixel u8
# x's place within its 8-pixel tile column, times 32: the speed << 5 is added to it (01ACEC "move.w D0, D1", 01ACEE
# "lsl.w #5, D1", 01AD36 "add.w D1, $63308.l") and its carry brings a new column into view (01AD3C "bcc $1ad4c", 01AD40
# "move.l D0, $6332c.l"); set from x (01FCF0 "andi.w #$700, D0", 01FCF4 "lsl.w #5, D0", 01FCF6 "move.w D0, $63308.l")
field layer 08 column_phase u16
# the same for y and the rows (01AD76 "add.w D1, $6330a.l", 01AD7C "bcs $1b520"; 01B520 "move.l D0, $63330.l")
field layer 0A row_phase u16
# how far x moves a frame (no sign: x_direction says which way): auto_scroll adds or subtracts it (01ACE6 "move.w
# $6330c.l, D0", 01AD24 "add.l D0, $63300.l", 01AD04 "sub.l D0, $63300.l"); the segment's speed (01A732 "move.w ($6,A6),
# $6334c.l"), the lift's ride speeds up (01F560 "addq.w #4, $6330c.l", 01F56C "cmpi.w #$400, $6330c.l")
field layer 0C x_speed u16
# the same up and down (01AD4C "move.w $6330e.l, D0", 01AD6A "add.l D0, $63304.l"; 01A73A "move.w ($8,A6), $6334e.l";
# the opening's sweep: 02F9AA "addi.w #$40, $6330e.l")
field layer 0E y_speed u16
# the bytes of one of the map's rows: a row up is this less (01E132 "move.w $63310.l, D2", 01E13A "sub.w $63310.l, D1",
# 01E1AC "move.w $63310.l, D0", 01E1B2 "suba.l D0, A2"); 0x20, 16 blocks, for the pictures (02BE00 "move.w #$20,
# $63310.l"); area_layers gives A's and B's (01E2AE "move.w ($20,A6,D0.w), $63350.l")
field layer 10 map_width u16
# the map: words, each a block's offset in blocks (01E142 "movea.l $63312.l, A2", 01E152 "move.w (A3)+, D0", 01E154
# "movea.l $63316.l, A4", 01E15A "adda.l D0, A4"); the pictures' maps (02BDEC "move.l #$314c4, $63312.l")
field layer 12 map u32 map_entry
# the blocks: 4 by 4 tiles, the colour then the tile codes (01E15E "move.b ($0,A4), D1", 01E172 "move.b ($1,A4),
# ($1,A0)"; with the floor cells first in some: 01E0C2 "move.b ($11,A4), ($1,A0)"); 02BDF6 "move.l #$315c4, $63316.l"
field layer 16 blocks u32 block_byte
# which way y moves: 0 not at all, 7F up (y grows), 80 down (auto_scroll: 01AD5C "tst.b $6331a.l", 01AD66 "bmi $1ad82",
# 01AD82 "sub.l D0, $63304.l"); a turtle pushing the scroll up sets 7F (01B322 "move.b #$7f, $6331a.l"), down 80
# (01B536 "move.b #$80, $6331a.l"); the objects move the other way (01A5D8 "tst.b $6331a.l")
field layer 1A y_direction s8
# which way x moves: 0 not at all, 80 right (x grows), 7F left (01ACF6 "tst.b $6331b.l", 01AD00 "bmi $1ad24", 01AD24
# "add.l D0, $63300.l"; 01AF32 "move.b #$7f, $6331b.l", 01B11C "move.b #$80, $6331b.l"); the segment's (01A772
# "move.b ($f,A6), $6335b.l"); layer A's or B's moving stops the hurry count (01EC02 "move.b $6335b.l, D0", 01EC08
# "or.b $6339b.l, D0")
field layer 1B x_direction s8
# the segment's limits (01A7CC "move.l ($a,A6), $6335c.l"), copied to the working layer from the layer the stage
# scrolls (01A822 "move.l $6335c.l, $6331c.l", 01A84C "move.l $6339c.l, $6331c.l"): x no further right than this
# (01B146 "add.l D0, $63300.l", 01B158 "move.l $6331c.l, D2", 01B15E "cmp.l $63300.l, D2")
field layer 1C x_max u32
# y no further up (01B354 "add.l D0, $63304.l", 01B360 "move.l $63320.l, D2", 01B366 "cmp.l D0, D2")
field layer 20 y_max u32
# x no further left (01AF5C "sub.l D0, $63300.l", 01AF70 "cmp.l $63324.l, D2"; held there: 01AED2 "move.l $63324.l,
# $63300.l")
field layer 24 x_min u32
# y no further down (01B568 "sub.l D0, $63304.l", 01B57C "cmp.l $63328.l, D2"; 01B416 "move.l $63328.l, $63304.l")
field layer 28 y_min u32
# the x of the column that has come into view, the right edge's or the left's (01AD30 "addi.l #$15800, D0", 01AD10
# "subi.l #$1800, D0", 01AD40 "move.l D0, $6332c.l"), which draw_new_row_and_column draws (01EAB6 "move.l $6332c.l,
# D0"); layer A follows layer B's in the sewer (01F1F0 "move.l $633ac.l, $6336c.l")
field layer 2C new_column_x u32
# the y of the row that has come into view (01B520 "move.l D0, $63330.l", 01E9CC "move.l $63330.l, D0")
field layer 30 new_row_y u32
# not 0: a row to draw at new_row_y (01B526 "subq.b #1, $63334.l", 01E9C2 "tst.b $63334.l"); cleared every frame with
# new_column (01A406 "move.w D0, $63334.l")
field layer 34 new_row u8
# not 0: a column to draw at new_column_x (01AD46 "subq.b #1, $63335.l", 01EAAA "tst.b $63335.l"; layer A takes layer
# B's: 01F218 "move.b $633b5.l, $63375.l")
field layer 35 new_column u8


# the passes of a text typed several times over in colours (the staff roll's credit name, the profiles' and the
# ending's texts): 8 records of 10 bytes walked down from 063476 (007430 "lea $63476.l, A4", 007446 "suba.l #$a, A4";
# 0185B6 "lea $63476.l, A4", 0185C6 "suba.l #$a, A4"), the lowest at 063430
struct typed_pass 0A
# the tile RAM address of its next character (00750C "movea.l ($0,A4), A5", 00756E "addi.l #$4, ($0,A4)")
field typed_pass 00 place u32 io
# its next character, 0 the pass over (0074B2 "move.l A5, ($4,A4)", 0074F8 "tst.l ($4,A4)", 007508 "movea.l ($4,A4),
# A6")
field typed_pass 04 text u32 text
# frames to its next character (007442 "move.b D6, ($8,A4)", 007500 "subq.b #1, ($8,A4)")
field typed_pass 08 wait u8
# the frames between characters (00749A "move.b #$4, ($9,A4)", 007576 "move.b ($9,A4), ($8,A4)")
field typed_pass 09 delay u8

# ======== the enemies ========
# The Foot soldiers and the other enemies share one engine (048236-0537xx): routine 0 starts them (by kind), 1 their
# way in (enter), 2 the thinking (think: goes after a turtle and picks a move from its definition), 3 an attack, 4
# the hit (the attack check sets it), 5 the hit's reaction, 6 a step over the floor's edge. Their functions are
# enemy_...; a kind's own enemy_KIND_..., a move's own enemy_MOVE_... when it keeps something else in a field.

# the slot of the turtle it goes after (062FA0 on): the start takes the nearest (0489F8 "move.w A6, ($20,A0)"), the
# thinking another one every 16 frames (048AFA)
scoped object enemy 20 target u16 player_slot
# frames left of its move; at 0 the thinking picks another (048D3E "tst.b ($22,A0)"); a change of approach clears it
# (048B86 "clr.b ($22,A0)")
scoped object enemy 22 move_time u8
# frames until it looks for a turtle again (048AA0 "subq.b #1, ($23,A0)", 048AA8 "move.b #$10, ($23,A0)")
scoped object enemy 23 retarget_time u8
# its kind's record in enemy_definitions (0489EE: 048A2A "move.l #$53efe, ($24,A0)"): the moves by approach (048D46
# "movea.l ($24,A0), A6" + approach * 8), the attacks (048CEA, +28), the reactions to a hit (+58)
scoped object enemy 24 definition u32 enemy_definition
# the move it makes, times 4: the thinking's moves (048D72 "move.w D6, ($28,A0)", run through 053C26 at 048D7A), an
# attack (048D2C, through 053D2A at 048DAA), a reaction to a hit, a way in, a step over an edge
scoped object enemy 28 move u16
# how it stands to its turtle: 0 away, 1 by its side (within 0x40: 048BA2 "move.b #$1, ($2a,A0)"), 2 its sides
# are taken (048B80), 3 keep off it while it is down (048C50), 4 out of the way of its attack (048CB2); the thinking
# picks a move from the definition's record of it (048D4C "move.b ($2a,A0), D0" + "lsl.w #3, D0")
scoped object enemy 2A approach u8
# where its turtle is (0482FA: 048336 "move.b D0, ($2b,A0)"): bit 6 to the left, bits 6-7 C0/80 below, bit 5 more
# across than up or down; how far across and up or down (04833A "move.w D1, ($2c,A0)", 04833E "move.w D2,
# ($2e,A0)")
scoped object enemy 2B target_direction u8
scoped object enemy 2C target_dx u16
scoped object enemy 2E target_dy u16
# the direction it last turned to (0486FC "move.b D0, ($30,A0)"; 0484E6 turns again only when it changes)
scoped object enemy 30 facing u8
# the chance in 100 it gets out of the way of its turtle's attack, when the turtle attacks it face to face (048C9E
# "jsr $48448.l" + 048CA4 "cmp.b ($31,A0), D7")
scoped object enemy 31 dodge_chance u8
# bit 7: its turtle faces it (0482FA: 048342 "lsl.b #1, D3", 048358 "move.b D3, ($44,A0)"; the thinking 048C94)
scoped object enemy 44 target_faces u8
# bit 7: the side of the turtle it took is bit 6 of the slot's sides, else bit 7 (048BD2 "bset #$7, ($45,A0)",
# 048BC0; 0486D6 gives it back)
scoped object enemy 45 side u8
# bit 7: a turtle can grab it and throw it, the low bits which throw (01BF7A "tst.b ($4b,A6)", 01C05E "move.b
# ($4b,A5), D3"); a Foot soldier's start sets it (048A16 "move.b #$84, ($4b,A0)")
scoped object enemy 4B throw u8

# ---- the objects' state dispatcher and moves (every kind of 048236-0537xx) ----
# the state the object in A0 is in (+5) runs from the table of handlers in A6 (048238 "move.b ($5,A0), D0", "lsl.w
# #2, D0", "movea.l (A6,D0.w), A6", "jmp (A6)")
048236  func  run_object_state
# height += height_speed, then move_object (048244 "move.w ($1e,A0), D0" + "add.w D0, ($10,A0)")
048244  func  move_object_with_height
# x += x_speed, y += y_speed (04824C-04828C "add.l D0, ($12,A0)", "add.l D0, ($16,A0)")
04824C  func  move_object
048262  func  move_object_with_height_blocked
# move_object but not into a side the contacts say is blocked (04826A on: bits 3-4 across, 1-2 up and down)
04826A  func  move_object_blocked
# a random number below D7 (048448: a seed at 06120E stirred with frame_count and the object's place, times 0x17,
# "mulu.w D6, D7" + "swap D7")
048448  func  random_below

# ---- the enemies' helpers ----
# the definition's attack records (A6, 4 of 12 bytes): the chance of the first whose reach holds target_dy (+0) and
# target_dx (+1-+2); none, -1 (0482B6 on)
0482B6  func  enemy_attack_chance
# where its turtle (A6) is: target_direction, target_dx, target_dy, target_faces; a turtle close in front of it
# hears it behind (048352 "move.b #$ff, ($44,A6)")
0482FA  func  enemy_look_at_target
# the two nearest turtles' objects (04835E: objects 0-3 by |dx| + |dy|), kept at 06122E and 061232
04835E  func  enemy_nearest_turtles
# the two nearest players' slots (0483D2: the slots at 062FA0 by |dx| + |dy| to their turtles), kept at 061226, 06122A
0483D2  func  enemy_nearest_slots
# the animation of the table in A5 toward the object in A6 (+4 when it is below), flipped to face it
0484B2  func  enemy_face_object
0484B6  func  enemy_set_facing_animation
# the same, only when the direction changed (0484E6 "eor.b D7, ($30,A0)")
0484E2  func  enemy_turn_to_object
0484E6  func  enemy_turn_animation
# the facing bits toward the object in A6: bit 7 below it by 4 or more, bit 6 by the direction in D0 (048516)
048516  func  enemy_facing_bits
04853E  func  enemy_face_direction
048546  func  enemy_turn_to_direction
# the facing bits of a direction (04854C: bit 7 for 84-FC, bit 6 by bit 6)
04854C  func  direction_facing_bits
# the screen's edges are walls: contacts bit 3 past 0x170, bit 4 before 0x80 (04857A "bset #$3, ($1,A0)")
048570  func  enemy_keep_on_screen
# whether it is on the screen, 0x70 to 0x190 across (048592)
048592  func  enemy_on_screen
# health_bars and health from the table in A6 by the players' setting (0485AE "move.b $60130.l, D7")
0485AE  func  enemy_set_health
# health only, from the same table (0485CE "move.b ($1,A6,D7.w), ($9,A0)")
0485C2  func  enemy_refill_health
# turns to its turtle (flags bit 6) and gives its attack the direction (0485EC "ori.b #$80, D7", "move.b D7, ($6,A0)")
0485D6  func  enemy_face_target
# back to thinking: routine 2, state 0, move_time 0, not attacking (0485F6 "bclr #$2, ($0,A0)", 0485FC "move.w #$200, ($4,A0)")
0485F6  func  enemy_back_to_thinking
# the same, and it can be hit again (048608 "bset #$1, ($0,A0)")
048608  func  enemy_back_to_thinking_hittable
# on the floor again (04861A: height under floor_height, or wrapped past F0): height = floor_height, Z set
04861A  func  enemy_landed
# starts an arc from the record in A6: x_speed, height_speed, and a step across (04863E "move.w (A6), ($1a,A0)",
# "move.w ($4,A6), ($1e,A0)")
04863E  func  enemy_start_arc
# a frame of the arc: x_speed and height_speed change by the record's steps, height_speed down to its least (048696)
048696  func  enemy_arc_step
# gives the side back if it stands by its turtle (0486CC "cmpi.b #$1, ($2a,A0)")
0486CC  func  enemy_leave_side
# gives the side of the slot back (0486D6: bit 6 or 7 by side) and goes back to approach 0
0486D6  func  enemy_give_side_back
# the animation of the table in A6 by target_direction (048702 "lsr.w #3, D7"), turned to the turtle
0486F6  func  enemy_face_target_animation
# with 6 bars or fewer, colour D7 flashing every 4 frames (048724 "cmpi.b #$6, ($8,A0)")
048724  func  enemy_flash_when_weak
# the floor under it: 0x18 in the sewers (area 3) past y 0x5800, else 0 (048746)
048746  func  enemy_set_floor
# the floor map's cells where it is (01DE3E) and its edges into the contacts (04876C, 048798)
04876C  func  enemy_floor_contacts
048798  func  enemy_floor_edges
# off the floor it stood on, or at an edge of the floor map: a step over the edge (routine 6, move by the edge:
# 04883A on, "move.w #$600, ($4,A0)"); Z clear then
04883A  func  enemy_check_floor_edge
# on the stairs of the floor map (0633D3 FA-FC): floor_height up or down 8 a row (048954, 048994)
04890E  func  enemy_follow_stairs
048938  func  enemy_follow_stairs_down
048954  func  enemy_stairs_down
04897C  func  enemy_follow_stairs_up
048994  func  enemy_stairs_up

# ---- the enemies' routines ----
# routine 1: its way in, the states of the table the move picks from 053ED6 (048A80 "lea $53ed6.l, A6")
048A60  func  enemy_enter
# routine 2: goes after a turtle (a slot, every 16 frames), stands by its side or away, attacks by the definition's
# chances (routine 3) or picks a move by its approach (the table at 053C26)
048A94  func  enemy_think
# routine 3: its attack, from the table at 053D2A by move (048DAA "lea $53d2a.l, A6")
048D8A  func  enemy_attack
# routine 4: hit (the attack check sets it): picks the reaction by the hit and the definition (+58), routine 5
048DBA  func  enemy_hit
# routine 5: the reaction to the hit, by move
048EDA  func  enemy_react
# routine 6: a step over the floor's edge, by move (the table at 048F36)
048F02  func  enemy_step_over_edge

# ---- the enemies' moves (the thinking's: 053C26 by move; each a table of states for run_object_state) ----
# a sidestep in its stance (animation 054A18, then 054A38 back and forth at 0x100), four times, then a new target and
# move (049260 "move.b #$4, ($46,A0)", 0492B0 "subq.b #1, ($46,A0)", 0492DE)
049234  func  enemy_shuffle
049260  func  enemy_shuffle_start
049276  func  enemy_shuffle_step
0492A8  func  enemy_shuffle_turn
0492DE  func  enemy_shuffle_end
# its sidesteps left
scoped object enemy_shuffle 46 steps u8
# runs round its turtle for 180 frames (04937C "move.b #$b4, ($22,A0)") at 0x180, one way or the other at random
# (+4A), the other way when it bumps into something (0493DA "bchg #$0, ($4a,A0)")
049344  func  enemy_circle
049378  func  enemy_circle_start
0493A2  func  enemy_circle_aim
0493CA  func  enemy_circle_step
scoped object enemy_circle 4A clockwise u8
# runs at its turtle at 0x300 (049432 "move.l #$3000000, ($1a,A0)", animation 054A78) and brakes past it (04949E
# "addi.w #$80"...)
049408  func  enemy_charge
049420  func  enemy_charge_start
049468  func  enemy_charge_run
04949E  func  enemy_charge_brake
# walks to its turtle (speed 0x100 in hit_routine's place, the animations by direction 049258 in +46), aiming again
# every 8 frames (0495EE "move.w #$100, ($40,A0)", "move.l #$49258, ($46,A0)"; 04961E "move.w ($40,A0), D1")
0495CA  func  enemy_walk_to_target
0495DE  func  enemy_walk_to_target_start
049604  func  enemy_walk_to_target_step
# walks to its turtle's side (speed 0x140, 04966E), sometimes crouches (0496FA: animation 0549E4 one frame in 8), and
# keeps level with it
04964E  func  enemy_walk_to_side
04966E  func  enemy_walk_to_side_start
049694  func  enemy_walk_to_side_step
0496FA  func  enemy_walk_to_side_crouch
04971E  func  enemy_walk_to_side_turn
04973E  func  enemy_walk_to_side_hold
# the walks' speed and their animations by direction
scoped object enemy_walk 40 speed u16
scoped object enemy_walk 46 animations u32 rom
# keeps 0x50 to 0x70 away from its turtle: backs off when nearer, closes in when farther (0497C2)
04978A  func  enemy_keep_distance
0497A6  func  enemy_keep_distance_start
0497C2  func  enemy_keep_distance_watch
04984C  func  enemy_keep_distance_back_off
049868  func  enemy_keep_distance_close_in
# walks away from its turtle for 40 frames (0498B8 "move.b #$28, ($46,A0)"), crouches, and waits while the turtle is
# down (04991E: its routine 4)
04989A  func  enemy_back_off
0498B2  func  enemy_back_off_start
0498EE  func  enemy_back_off_walk
04991E  func  enemy_back_off_wait
scoped object enemy_back_off 46 time u8
# runs away from its turtle at 0x200 for 8 frames (049948)
049934  func  enemy_run_away
049948  func  enemy_run_away_start
049980  func  enemy_run_away_step
# walks across toward its turtle at 0x100 for 120 frames (0499B8 "move.b #$78, ($22,A0)")
0499A4  func  enemy_walk_across
0499B8  func  enemy_walk_across_start
0499EA  func  enemy_walk_across_step

# ---- the enemies' attacks (053D2A by move) ----
# a hit with its animation (damage 0x201, flags bit 2 while it lasts: 049A26 "move.w #$201, ($a,A0)", "bset #$2"),
# then back to thinking when the animation ends (049A42)
049A06  func  enemy_jab
049A1A  func  enemy_jab_start
049A42  func  enemy_attack_end
049A52  func  enemy_chop
049A66  func  enemy_chop_start
049A8E  func  enemy_swing
049AA2  func  enemy_swing_start
049ACA  func  enemy_high_kick
049ADE  func  enemy_high_kick_start
# a flying kick: crouch (054ACE), the arc of 049B22 (or 049BD8) with animation 054B1C, land (049B56, 049B82)
049B06  func  enemy_jump_kick
049B2E  func  enemy_jump_kick_crouch
049B56  func  enemy_jump_kick_leap
049B82  func  enemy_jump_kick_fly
049BBC  func  enemy_long_jump_kick
049BE4  func  enemy_long_jump_kick_crouch
049C0C  func  enemy_long_jump_kick_leap
049C38  func  enemy_long_jump_kick_fly
# runs at its turtle with its arms out for 60 frames and holds it (attack 0E); only one at a time: the slot's
# grab_time (049CD0 "move.b #$60, ($8,A1)")
049C76  func  enemy_grab
049C92  func  enemy_grab_start
049D06  func  enemy_grab_run
049D7E  func  enemy_grab_hold
049DD0  func  enemy_grab_end
scoped object enemy_grab 46 time u8

# ---- the enemies' reactions to a hit (enemy_react by move; enemy_hit picks the move) ----
# four flinches, by the hit's pose (animations 054B4E, 054B82, 054BAC, 054BD6), back to thinking when they end
# (049E08 "jmp $48608.l": it can be hit again)
049DDC  func  enemy_flinch_back
049DF0  func  enemy_flinch_back_start
049E00  func  enemy_flinch_end
049E10  func  enemy_flinch_bent
049E24  func  enemy_flinch_bent_start
049E34  func  enemy_flinch_reel
049E48  func  enemy_flinch_reel_start
049E58  func  enemy_flinch_hunched
049E6C  func  enemy_flinch_hunched_start
# killed: knocked flying on its back (the arc 049EA0, animation 054C54), splat on a wall it meets (sound 89,
# 054EAC, sliding down: 049F78 "subi.w #$100, ($10,A0)"), else lying (054C6A); then move 1C (049F38 "move.w #$1c,
# ($28,A0)"), one enemy less on its turtle's slot (049F64 "subq.b #1, ($4,A1)")
049E7C  func  enemy_killed_back
049EAC  func  enemy_killed_back_start
049EC8  func  enemy_killed_back_fly
049F38  func  enemy_killed_back_lie
049F6A  func  enemy_killed_back_on_wall
049F78  func  enemy_killed_back_slide_down
049FA0  func  enemy_killed_back_down
# killed, falling on its face (the arc 049FDC, animation 054BEC, a wall 054E62, lying 054BF6): then move 18
049FB8  func  enemy_killed_forward
049FE8  func  enemy_killed_forward_start
04A004  func  enemy_killed_forward_fly
04A074  func  enemy_killed_forward_lie
04A0A6  func  enemy_killed_forward_on_wall
04A0B4  func  enemy_killed_forward_slide_down
04A0DC  func  enemy_killed_forward_down
# knocked down on its face (the arc 04A114, 054BEC): lies 30 frames (04A198 "move.b #$1e, ($46,A0)"), dies with no
# bar left (move 18), else gets up (054C16)
04A0F4  func  enemy_knocked_forward
04A120  func  enemy_knocked_forward_start
04A13C  func  enemy_knocked_forward_fly
04A176  func  enemy_knocked_forward_lie
04A1BA  func  enemy_knocked_forward_wait
# knocked down on its back (the arc 04A5C2, 054C54, lying 054C6A), the same with move 1C, getting up 054C94; up, it
# has its health back if it ran out (04A6AA "move.b #$6, ($9,A0)")
04A5A2  func  enemy_knocked_back
04A5CE  func  enemy_knocked_back_start
04A5F8  func  enemy_knocked_back_fly
04A632  func  enemy_knocked_back_lie
04A676  func  enemy_knocked_back_wait
04A690  func  enemy_knocked_back_get_up
# the frames it lies
scoped object enemy_knocked 46 down_time u8
# thrown by a turtle (its move is the turtle's throw, 01C072 by turtle: Leonardo C4, Michelangelo 88, Donatello 80,
# Raphael BC): held by the turtle a while
# (04A214 "subq.b #1, ($22,A0)"), placed by the turtle (04A2E4: the record's offsets from the attacker, 4C),
# 6 damage, then knocked flying on its back (04A5CE)
04A1D4  func  enemy_thrown_by_donatello
04A214  func  enemy_thrown_by_donatello_swing
04A368  func  enemy_thrown_by_michelangelo
04A3A8  func  enemy_thrown_by_michelangelo_swing
04A426  func  enemy_thrown_by_raphael
04A466  func  enemy_thrown_by_raphael_swing
04A4E4  func  enemy_thrown_by_leonardo
04A524  func  enemy_thrown_by_leonardo_swing
04A25A  func  enemy_thrown_fly
# health less D7 as the attack check takes it (04A2CE "sub.b D7, D2"; the bar runs out, it stays)
04A2CA  func  enemy_take_damage
# placed at the offsets of the record in A5 from the object in A6 (x mirrored when it faces right), at its height
04A2E4  func  enemy_place_by
# dies: sound 10, animation 054DBA, gone when it ends (04A6C6, 04A6EE "clr.w ($0,A0)": one enemy less, 06120C)
04A6B2  func  enemy_die
04A6C6  func  enemy_die_start
04A6E6  func  enemy_die_vanish
# dies on its back: sound 10, animation 054E16 (04A718), gone when it ends
04A704  func  enemy_die_on_back
04A718  func  enemy_die_on_back_start

# ======== the enemies, the rest of the first half ========
# ---- the starts of the bare-handed, sword and hammer soldiers (kinds 00, 01, 02) ----
# kind 00, the bare-handed Foot soldier: its floor, one more enemy (0489E8 "addq.b #1, $6120c.l"), then the setup
0489E2  func  enemy_foot_soldier_start
# its target slot, bars, definition 053EFE (048A2A "move.l #$53efe, ($24,A0)"), shadow; with a parameter, its way in
# (routine 1, move from the parameter: 048A56 "move.w D0, ($28,A0)"), else straight to thinking with 0547C6
0489EE  func  enemy_foot_soldier_setup
# kind 01, the sword soldier (animations 055722, definition 053F86) and kind 02, the hammer soldier (057B46,
# 05400E: the hammer over its shoulder in the frames)
04ACB0  func  enemy_sword_soldier_start
04AD3C  func  enemy_hammer_soldier_start

# ---- stepping over the floor's edges (enemy_step_over_edge: 048F36 by move) ----
# a crouch (054ACE), the hop (height_speed by the area: 048F8C "move.w (A6,D0.w), ($1e,A0)"; down the screen, right,
# left: y_speed 0x100, x_speed 0x100, -0x100), the fall (height_speed less 0x40 a frame) and 16 frames still
# (048FFA "subq.b #1, ($22,A0)") before thinking again
048F62  func  enemy_hop_crouch
048F72  func  enemy_hop_down
048FBA  func  enemy_hop_fall
048FFA  func  enemy_hop_land
04901A  func  enemy_hop_right
049078  func  enemy_hop_left
# up a step: a crouch (04CF3E), height_speed 0x400 (0490EE "move.w #$400, ($1e,A0)"), up the screen, right or left
0490D6  func  enemy_hop_up_crouch
0490E6  func  enemy_hop_up
04911C  func  enemy_hop_up_fall
04916C  func  enemy_hop_up_right
0491A8  func  enemy_hop_up_fall_blocked
0491F8  func  enemy_hop_up_left

# ---- the ways in (enemy_enter: 053ED6 by move, the parameter's high nibble) ----
# 1: walks in from the right on the ledge (floor 0x50: 04CF84 "move.b #$50, ($32,A0)") and jumps down unless the
# nearest turtle is up there too
04CF74  func  enemy_walk_in_on_ledge_start
04CF9A  func  enemy_walk_in_on_ledge_walk
# the jump down off a ledge (height_speed 0x200, up the screen 0x80) and the landing (04CB1E)
04CFD6  func  enemy_jump_down_leap
04D006  func  enemy_jump_down_fall_stairs
04D00C  func  enemy_jump_down_fall
04D04A  func  enemy_jump_down_land
# 2: steps out of a door or a lift, up the screen for 32 frames (04C860 "subq.b #1, ($46,A0)")
04C824  func  enemy_step_out_start
04C840  func  enemy_step_out_wait
04C860  func  enemy_step_out_walk
# 3: a step forward (04C444), then the jump down off its ledge
04D072  func  enemy_step_down_start
04D08E  func  enemy_step_down_wait
# 4: leaps up out of the sewer's water (height_speed 0x600: 04D2DE "move.w #$600, ($1e,A0)")
04D2D4  func  enemy_leap_out_start
04D2FE  func  enemy_leap_out_fly
04D330  func  enemy_leap_out_land
# 5: hangs by its hands (05C52C) moving across for 96 frames (04D82A "move.b #$60, ($46,A0)"), then drops (04CF68)
04D820  func  enemy_hang_in_start
04D856  func  enemy_hang_in_move
04D884  func  enemy_hang_in_drop
04D8AC  func  enemy_hang_in_land
# 6: runs in at 0x300 for 40 frames (054A78) and flies in with a kick (the arc 04D8D4, 054B1C, attacking)
04D8E0  func  enemy_kick_in_start
04D91C  func  enemy_kick_in_run
04D93A  func  enemy_kick_in_leap
04D96C  func  enemy_kick_in_fly
04D9A6  func  enemy_kick_in_land
# 7: runs in at 0x180 for 126 frames (04D9C2 "move.b #$7e, ($46,A0)", 054908)
04D9C2  func  enemy_run_in_start
04D9F8  func  enemy_run_in_run
# 8: runs in on the ledge at 0x300 and dives off it (05C566), curls (054AEE), lands (054AE4)
04DA2C  func  enemy_dive_in_start
04DA58  func  enemy_dive_in_run
04DA92  func  enemy_dive_in_leap
04DACA  func  enemy_dive_in_dive
04DAF6  func  enemy_dive_in_curl
04DB1A  func  enemy_dive_in_uncurl
04DB36  func  enemy_dive_in_land
# 9: walks in at 0x140 for 26 frames and stands ready (05C5A4) for 48
04DB76  func  enemy_walk_in_start
04DBAE  func  enemy_walk_in_walk
04DBD4  func  enemy_walk_in_ready

# ---- the sword soldier's and the hammer soldier's moves (their animations by direction: 04ADC0, 04B046) ----
04ADAC  func  enemy_walk_to_target_sword
04ADC8  func  enemy_walk_to_target_sword_start
04ADEE  func  enemy_walk_to_side_sword
04AE0E  func  enemy_walk_to_side_sword_start
04AE34  func  enemy_walk_to_side_sword_crouch
04AE58  func  enemy_walk_to_side_sword_turn
# walks across past its turtle (speed in +40) while it is not level with it, then up or down to its line (04AEBC)
04AE78  func  enemy_walk_past_sword
04AE8C  func  enemy_walk_past_sword_start
04AEBC  func  enemy_walk_past_sword_step
04AF24  func  enemy_back_off_sword
04AF3C  func  enemy_back_off_sword_start
04AF78  func  enemy_back_off_sword_walk
04AFA8  func  enemy_back_off_sword_wait
# walks up or down the screen toward its turtle's line for 16 frames (04AFD2 "move.b #$10, ($22,A0)")
04AFBE  func  enemy_walk_to_line_sword
04AFD2  func  enemy_walk_to_line_sword_start
04B00A  func  enemy_walk_to_line_sword_step
04B032  func  enemy_walk_to_target_hammer
04B04E  func  enemy_walk_to_target_hammer_start
04B074  func  enemy_walk_to_side_hammer
04B08C  func  enemy_walk_to_side_hammer_start
# the walk to the side that stops 0x40 across (04B17A "cmpi.w #$40, ($2c,A0)")
04B0B2  func  enemy_walk_to_side_far_step
04B118  func  enemy_walk_to_side_far_hold
# the hammer soldier closes in across, then waits with the hammer up (057BF2) and steps to its turtle's line by turns
# (04B1AC: +46 the turns, +47 the frames: 04B1CE "move.b #$30, ($47,A0)")
04B12E  func  enemy_stalk_hammer
04B146  func  enemy_stalk_hammer_start
04B168  func  enemy_stalk_hammer_approach
04B1AC  func  enemy_stalk_hammer_step
scoped object enemy_stalk 46 turns u8
scoped object enemy_stalk 47 time u8
# walks away for 64 frames, then waits with the hammer up while its turtle is down
04B238  func  enemy_walk_away_hammer
04B250  func  enemy_walk_away_hammer_start
04B284  func  enemy_walk_away_hammer_walk
04B2BC  func  enemy_walk_away_hammer_wait

# ---- the sword soldier's and the hammer soldier's attacks ----
# slashes (055948 attack 0, 05598C attack 1; damage 0x302: 04B2FA "move.w #$302, ($a,A0)")
04B2DA  func  enemy_slash_sword
04B2EE  func  enemy_slash_sword_start
04B316  func  enemy_low_slash_sword
04B32A  func  enemy_low_slash_sword_start
# a leap at its turtle, as far as it is (x_speed 6 times the distance past 16: 04B3C6 "mulu.w D0, D1"), slashing
# (attack 7, damage 0x403)
04B352  func  enemy_leaping_slash_sword
04B37A  func  enemy_leaping_slash_sword_start
04B3A2  func  enemy_leaping_slash_sword_leap
04B3F0  func  enemy_leaping_slash_sword_fly
# a jump slashing (the arc 04B446, damage 0x303)
04B42A  func  enemy_jump_slash_sword
04B452  func  enemy_jump_slash_sword_start
04B47A  func  enemy_jump_slash_sword_leap
04B4A6  func  enemy_jump_slash_sword_fly
# a long leap slashing (the arc 04B4FC, damage 0x503), turning over in the air after 72 frames (04B588)
04B4E0  func  enemy_flying_slash_sword
04B508  func  enemy_flying_slash_sword_start
04B530  func  enemy_flying_slash_sword_leap
04B588  func  enemy_flying_slash_sword_fly
# a blow with the hammer (057BFE, sound 8, damage 0x303), 58 frames
04B5D6  func  enemy_smash_hammer
04B5EA  func  enemy_smash_hammer_start
04B622  func  enemy_smash_hammer_end
# the sword soldier's flinches (0558AA, 0558DE, 055908, 055932) and the hammer soldier's (057C62, 057C96)
04B632  func  enemy_flinch_back_sword
04B646  func  enemy_flinch_back_sword_start
04B656  func  enemy_flinch_bent_sword
04B66A  func  enemy_flinch_bent_sword_start
04B67A  func  enemy_flinch_reel_sword
04B68E  func  enemy_flinch_reel_sword_start
04B69E  func  enemy_flinch_hunched_sword
04B6B2  func  enemy_flinch_hunched_sword_start
04B6C2  func  enemy_flinch_back_hammer
04B6D6  func  enemy_flinch_back_hammer_start
04B6E6  func  enemy_flinch_bent_hammer
04B6FA  func  enemy_flinch_bent_hammer_start
04B70A  func  enemy_flinch_hunched_hammer

# ---- kind 56, the Foot soldier with a rocket on its shoulder (05C92A) ----
# comes in slowly from the right (x_speed -0x40), lines up with the nearest turtle (its object in +20, every 8
# frames: 04D5A6 "move.l A6, ($20,A0)"), fires the rocket (kind 6F: 04D60C "jsr $47c5a.l") and goes on as a
# bare-handed soldier (kind 0: 04D624); hit with the rocket on, it drops it (04D64C) and takes the hit as one
04D564  func  enemy_rocket_soldier_start
04D58E  func  enemy_rocket_soldier_line_up
04D5EE  func  enemy_rocket_soldier_fire
04D624  func  enemy_rocket_soldier_unarmed
04D64C  func  enemy_rocket_soldier_struck
scoped object enemy_rocket_soldier 20 turtle u32 object
scoped object enemy_rocket_soldier 46 aim_time u8

# ---- the Mouser's steps over the floor's edges (as enemy_hop_..., its own animations 058134, 0581BA) ----
0514EE  func  enemy_mouser_hop_down
05152C  func  enemy_mouser_hop_fall
05156C  func  enemy_mouser_hop_land
051588  func  enemy_mouser_hop_right
0515D8  func  enemy_mouser_hop_left
051628  func  enemy_mouser_hop_up
051654  func  enemy_mouser_hop_up_fall
0516A0  func  enemy_mouser_hop_up_right
0516D2  func  enemy_mouser_hop_up_fall_blocked
05171E  func  enemy_mouser_hop_up_left

# ---- Rocksteady alone ----
# Rocksteady put in for his fight (kind 11 at 0x168, 0x114: 04F710 "move.l #$16800, ($12,A6)"), from 030716
04F6E6  func  start_rocksteady

# ======== the turtles ========
# The four player objects (062000, 062050, 0620A0, 0620F0; kind 0-3, Leonardo first). The functions whose own object
# (A0) is a turtle are named turtle_...; their fields as the turtle code uses them. Evidence from build/listing/tmnt.s.

# ---- the turtle family's fields ----

# the turtle that pushes the scroll this frame (not carried back by it): cleared every frame (01ADA2 "move.b D0,
# ($3,A0)"), 0x7F when it pushes the scroll across (01AF46, 01B130 "move.b #$7f, ($3,A0)"), bit 7 when it pushes it
# up or down (01B32A, 01B53E "ori.b #$80, ($3,A0)"); turtle_run_all moves the others with the scroll: x unless the low
# bits (01A5AA "move.b ($3,A0), D2" + "andi.b #$7f, D2"), y unless bit 7 (01A5D0 "tst.b ($3,A0)" bmi). Nothing starts a
# turtle with a parameter (turtle_init clears it)
scoped object turtle 03 scroll_push u8
# how fast its height goes up or down in a jump, a fall or a knock (8.8, a size: falling says which way): the jump
# starts it at 0x500 (01B7B6 "move.l D0, ($1a,A0)" with 0x0500_0010; a jump attack: 01BA4C "move.w #$500,
# ($1a,A0)"), gravity takes 0x50 a frame going up (01BAC0 "subi.w #$50,
# ($1a,A0)"), it is added to the height going up (01BACA "add.w D0, ($10,A0)") and taken off it coming down (01BC66
# "sub.w D0, ($10,A0)", up to 0x500: 01BC52); the knocks' arc the same (01D49A-01D4BE). Not the x speed of the
# common field: the turtle moves across by its stick (turtle_move)
scoped object turtle 1A jump_speed u16
# 0 going up, else coming down: turned over at the top of the arc (01BBA8 "not.b ($1c,A0)", 01D4B4 "subq.b #1,
# ($1c,A0)"), tested to add or take off jump_speed (01BAFC "tst.b ($1c,A0)", 01BE22, 01D492)
scoped object turtle 1C falling u8
# frames counted down for the move it is in: how long holding jump keeps the jump rising (16 at the start: 01B7B6
# "move.l D0, ($1a,A0)" with 0x0500_0010; 01BAA8 "subq.b #1, ($1d,A0)" and 01BAB0 "btst #$4, (A1)": released, cleared
# at 01BAB8), the wait on a wall before kicking off it (01BB6C "move.b #$8, ($1d,A0)", 01BCE8-01BCF0), the wait
# after landing in an area's entry (01A080 "move.b #$8, ($1d,A0)", 01A0CC "subq.b #1, ($1d,A0)")
scoped object turtle 1D move_timer u8
# frames standing still: every 0x18 the idle animation goes on to its next state (turtle_stand 01B990 "addq.b #1,
# ($1e,A0)", 01B994 "cmpi.b #$18, ($1e,A0)"); a new state clears it (turtle_set_state 01B918 "clr.b ($1e,A0)")
scoped object turtle 1E idle_time u8
# a jump's turn: set when the somersault at the top starts (01BBC4 "subq.b #1, ($1f,A0)", and turtle_jump_top goes
# on falling when its animation ends: 01BAE2 "tst.b ($1f,A0)"); kicking off a wall, set when the wall is on the right
# (01BB42 "move.b #$ff, ($1f,A0)", cleared for a wall on the left: 01BB56), and the kick goes the other way (01BD0C
# "tst.b ($1f,A0)": 0x300 left or right); the jump clears it (01B7BA "clr.b ($1f,A0)")
scoped object turtle 1F jump_flip u8
# its speed across when it is knocked: from the knock's table (01C4C4 "move.w (-$10,A6,D2.w), ($20,A0)"), added to x
# or taken off it by the knock's side (01D462-01D466 "add.l D0, ($12,A0)", 01D4F2-01D4F6 "sub.l D0, ($12,A0)") and
# slowed down to 0x200 (01D47E "sub.w D7, ($20,A0)", 01D482); in an area's exit, the speed it drifts across by
# (02D298 "move.w ($6,A6,D1.w), ($20,A0)", 02D528 "move.w ($20,A0), D0" + "add.l D0, ($12,A0)")
scoped object turtle 20 drift_speed u16
# the side it is knocked to: bit 0 to the left, bit 7 hit from behind (01C30E-01C33C: from its facing, flags bit 6,
# and the attacker's, hit bit 7; 01C33C "move.b D0, ($22,A0)"); the knocks move it left with bit 0 (01C6DE "btst #$0,
# ($22,A0)" then "neg.w D0"; 01D44C), a knock-down from behind turns it round (01C482 "tst.b ($22,A0)" bpl, 01C492
# "eori.b #$40, (A0)"), and turtle_collide checks the walls on that side (01AB70 "btst #$0, ($22,A0)")
scoped object turtle 22 knockback_flags u8
# which reaction to a hit it is in: picks the reaction's handler (01C222 "move.b ($23,A0), D0", the table at 01C272)
# and is set with the reaction's state (01C44A "move.b D1, ($23,A0)", the state from the table at 01D3FC)
scoped object turtle 23 hit_reaction u8
# the step of the reaction (FF: over): the steps' handlers by it (01C666 "move.b ($24,A0), D0"), the next one (01C732
# "addq.b #1, ($24,A0)"), and turtle_hit ends the reaction with FF (01C234 "cmpi.b #-$1, ($24,A0)")
scoped object turtle 24 reaction_step u8
# which sequence of steps the reaction follows: frame_count's bit 0, +2 near the screen's edges (01C4D0-01C4DA "move.b
# D0, ($25,A0)", 01C518 "addq.b #2, ($25,A0)"), or by the bars left (01C53E); it picks the steps' table (01C738
# "move.b ($25,A0), D0") and the far ones slide faster (01C6CE "cmpi.b #$2, ($25,A0)")
scoped object turtle 25 reaction_variant u8
# frames to wait or slide in a reaction (01C688 "move.b #$8, ($26,A0)", 01C6C6 "subq.b #1, ($26,A0)", 01CA50
# "move.b #$60, ($26,A0)"), and in an area's exit (02BD72 "move.b #$20, ($26,A0)", 02BD94 "subq.b #1, ($26,A0)")
scoped object turtle 26 wait_timer u8
# the buttons pressed while an enemy holds it: one more for each press (01CECA "tst.b (A2)", 01CED0 "addq.b #1,
# ($27,A0)"), and at 8 it breaks free (01CED4 "cmpi.b #$8, ($27,A0)"; 6 at 01CFDA, 0x10 at 01D126)
scoped object turtle 27 escape_presses u8
# the enemy that hit it, or holds it: the attack check's second loop (0473DC "move.l A0, ($28,A1)"); the reaction reads
# its attack's sound by it (01C2DA "movea.l ($28,A0), A6"), and breaking free makes it let go (01CEEA "movea.l ($28,A0),
# A6" + "move.b #$3, ($5,A6)")
scoped object turtle 28 hit_by u32 object
# the step of its walk out in an area's exit: each step's handler by it (02BADA "move.b ($2c,A0), D0", 02BF54), the next
# one (02BB7C "addq.b #1, ($2c,A0)"); the exit's start clears it (02B304 "clr.b ($2c,A0)")
scoped object turtle 2C exit_step u8
# frames it cannot be hit for: 0x7F when it comes in (019CB8 "move.b #$7f, ($2d,A0)"); while it counts down
# (01B6AA "subq.b #1, ($2d,A0)") flags bit 1 (can be hit) stays clear, set only at 0 (01B6A2 "tst.b ($2d,A0)",
# 01B6D8 "ori.b #$2, (A0)"); with bit 7 (019B74 "ori.b #$80, ($2d,A0)") it also blinks (01B6D0 "eori.b #$80, (A0)")
# until 0x80 (01B6B2)
scoped object turtle 2D invulnerable_time u8
# which attack of its combo it is at: 0 the first, 1 the second (01B840 "move.b #$1, ($2e,A0)", 01BF56 "addq.b #1,
# ($2e,A0)"), 2 after breaking free (01CF02 "move.b #$2, ($2e,A0)"); turtle_attack_over picks the next attack by it
# (01BF40 "tst.b ($2e,A0)", 01BF48 "cmpi.b #$1, ($2e,A0)")
scoped object turtle 2E combo_step u8
# frames since the attack button was last pressed (cleared by a press: 01B6E8 "btst #$5, D2" + 01B6F0 "clr.b
# ($31,A0)", 01B6F4 "addq.b #1, ($31,A0)" held at 255); an attack pressed within 13 frames goes on with the combo
# (01BEF6 "cmpi.b #$d, ($31,A0)")
scoped object turtle 31 attack_press_time u8
# an enemy is close behind it: cleared every frame by the object loop (04783C, 047850 "clr.b ($44,A5)" through the
# list of the turtles at 062FA0) and set by an enemy within 0x40 across and 6 deep on its back (0482FA, 048352 "move.b
# #$ff, ($44,A6)", A6 the turtle from that list); the attack button then starts the combos from 12 on, with the attack
# that hits behind (01B838 "tst.b ($44,A0)", 01B846 "addi.w #$c, D7")
scoped object turtle 44 enemy_behind u8
# the combo it does: 3 bytes a combo (its three attacks) in its table of attacks (01D5F2, by the turtle): one of the
# first four at random (01B80C-01B820 "move.w D7, ($46,A0)" after "jsr $48448.l"), +12 with an enemy behind (01B84A),
# +24 for the throw (01BFDC "addi.w #$18, ($46,A0)"); its next attack read by it (01C102 "move.w ($46,A0), D7" +
# "move.b ($1,A4,D7.w), D0")
scoped object turtle 46 combo u16
# the blink of the "press the buttons" prompt drawn while an enemy holds it: 0x40 at the start (019CA2 "move.b #$40,
# ($48,A0)"), counted down every frame of a hold (01D28E "subq.b #1, ($48,A0)"), the picture changed at each 0x80
# (01D296-01D29A, 01D316 "move.b #$c0, ($48,A0)") and drawn again at 0x3F and 0xBF (01D29E, 01D2A8)
scoped object turtle 48 prompt_time u8
# which of the prompt's two pictures is drawn (01D27A-01D288: 01D35C or 01D3AC by 01D280 "tst.b ($49,A0)"; turned over at
# 01D310 "eori.b #$ff, ($49,A0)")
scoped object turtle 49 prompt_frame u8
# the enemy its attack hit last: the attack check's first loop (0472C4 "move.l A1, ($4a,A0)"); its combo throws it
# when it can be (01BF76 "movea.l ($4a,A0), A6" + "tst.b ($4b,A6)") and the throw sets it flying (01C35E, 01C36A
# "move.w #$500, ($4,A6)"). Its low half is where the common attacker is: no code writes a turtle's attacker (the
# attack check's second loop gives it hit_by instead)
scoped object turtle 4A hit_target u32 object
# where the prompt is in the fixed layer (an offset from 100000, by its place on the screen: 01D2C0-01D2EE "move.w D1,
# ($4e,A0)"), drawn there again (01D2B8 "adda.w ($4e,A0), A5") and erased (01D32C "adda.w ($4e,A0), A6"); a turtle
# is never an attacker of the attack check's second and third loops, so the common hit_object never lands here
scoped object turtle 4E prompt_place u16

# ---- the jump into area 4 (turtle_jump_in_...): +1E is a speed across, not idle_time and jump_flip ----
# its speed across while it jumps in: from the area's table of places (019DF4 "move.w ($4,A6,D1.w), ($1e,A0)"),
# added to x every frame (01A28C "move.w ($1e,A0), D1" + 01A292 "add.l D1, ($12,A0)")
scoped object turtle_jump_in 1E jump_in_speed s16

# ---- the functions whose own object is a turtle ----

# 004378 hands it the players who have just put a coin in (0600A6): for each bit of D7 (019B48 "lsr.b #1, D7") the
# turtle starts (019B50 "bsr $19c94"), full health (019B54 "move.w #$a03, ($8,A0)"), its marker (019B66), blinking
# (019B74 "ori.b #$80, ($2d,A0)")
019B3A  func  turtle_join
# 0043E8 hands it the players whose turtle was knocked out and still have lives (0600A1 & 0600A0): the same with D6
# clear (019BA6 "clr.b D6"): back at the start point, never in the area's entry
019B92  func  turtle_respawn
# 0067BC (the area's start) hands it the players in play: each turtle starts with the area's entry (019C0A "moveq
# #-$1, D6") and the bars the player had (019C6A "move.b $60106.l, $62008.l"; full and saved when 060122 bit 7 is
# clear: 019C22-019C28)
019BEA  func  turtle_start_area
# the object cleared (019C9A "move.l D1, (A0)+"), its kind the player (019CAE "move.b D0, ($2,A0)"), in use and drawn
# (019CB2 "move.w #$8101, ($0,A0)"), 0x7F frames it cannot be hit (019CB8), its depth, shadow and colour; then placed
# by the area's entry (019D3E "lea $19d54.l, A6", by the stage) or at the start point
019C94  func  turtle_init
# its place from the start points (019CE2 "lea $19e62.l, A6"; 019E72 in area 3) by the turtle, and the animation
# of its state (019D1C "jmp $1b920.l")
019CDE  func  turtle_place_at_start
# the entry of areas 2, 3 and 7 (019D54): its place and height from 019E82 (019E9A in area 3), falling (019DC8
# "move.w #$203, ($4,A0)": routine 2 state 3)
019D7C  func  turtle_start_fall_in
# the entry of area 4 (019D54): its place and speed across from 019EB2, going up (019E10 "move.w #$800, ($1a,A0)",
# 019E16 "move.w #$201, ($4,A0)"), and the object at 062DC0 started (019E24-019E58)
019DD4  func  turtle_jump_in_start
# the object 40 places after it (A1) cleared and put at the turtle's place (019EE0-019EF2), with its animation by
# the player (019F02 "lea $19f24.l, A6"); update_players keeps it on the turtle for 0x80 frames (019B60 "move.b
# #$80, (A6,D0.w)" at 061100)
019ECA  func  turtle_start_marker
# areas 2, 3 and 7, every frame of the entry: each turtle in the air falls in across (01A060 "addi.l #$300,
# ($12,A0)", 01A072 "subi.w #$600, ($10,A0)"), lands (01A080 "move.b #$8, ($1d,A0)") and stands after move_timer
# (01A0CC-01A0D4 "clr.b ($4,A0)"); in area 7 the object at 062DC0 drives off (01A110 "addi.w #$2, ($c,A0)")
01A02C  func  turtle_fall_in
# area 4, every frame of the entry: the object at 062DC0 bounces across (01A16E-01A1A4), each turtle jumps in on
# its arc (01A20C "add.w D1, ($10,A0)", 01A266) with its speed across (01A28C) and stands after landing (01A286
# "move.b #$8, ($1d,A0)", 01A1E4 "clr.w ($4,A0)")
01A160  func  turtle_jump_in_step
# area 6 (01A562 "cmpi.b #$6, $60121.l"): each turtle's shadow sprite changes every 4 frames between the two of its
# record (01A2E4 "btst #$2, $600a5.l", 01A2F2 "move.l (A6,D0.w), ($3a,A0)")
01A2D6  func  turtle_skateboard_shadow
# every turtle in play (01A434 "lea $62000.l, A0", 01A446 "btst #$0, (A0)"): its controls (01A44E "bsr $1b69e"),
# its move (01A452 "bsr $1ada0"), kept within the screen (01A4D4-01A524); the scroll; carried by the scroll
# (01A5C4, 01A5E6), its screen place (01A5F2-01A604), its floor and walls (01A616 "bsr $1ab2c"); the next segment
01A3CA  func  turtle_run_all
# when it is being hit or thrown, the stick as if pushed the way it goes (01AB6E-01AB7C "move.b D0, (A1)"); the solid
# objects (01AB7E "jsr $47534.l"), the floor map (01AB84 "jsr $1de62.l"), the walls by the stick (01ABD6 "jsr
# $1ac84.l"); not on a floor, not jumping and not hit, it falls 0x400 a frame (01AC10 "subi.w #$400, ($10,A0)") and
# lands with a sound (01AC44 "move.b #$12, D7", 0x30 in area 3)
01AB2C  func  turtle_collide
# the walls' check by the stick's direction (01AC84 "move.b ($0,A1), D0" + "andi.w #$f, D0", the table at 01AC9A)
01AC84  func  turtle_check_walls
# the stick moves it (01ADA6 "move.b (A1), D0"): left faces left (01ADB8 "ori.b #$40, ($0,A0)") and takes its speed off
# x (01AF2A "sub.l D1, ($12,A0)"), right (01B104 "add.l D1, ($12,A0)"), up and down y (01B31C, 01B4C0), blocked by
# its walls (01AF1A "btst #$4, ($1,A0)"); at the screen's edges it pushes the scroll instead (01AE36 "bsr $1af32")
01ADA0  func  turtle_move
# the scroll pushed left by the turtle's speed (01AF32 "move.b #$7f, $6331b.l", 01AF3E "move.w (A6,D0.w),
# $6330c.l", 01AF46 "move.b #$7f, ($3,A0)"), carry when it reaches the area's left limit (01AF70 "cmp.l $63324.l, D2")
01AF32  func  turtle_push_scroll_left
# the same to the right (01B11C "move.b #$80, $6331b.l", 01B146 "add.l D0, $63300.l"), against the right limit
# (01B15E "cmp.l $63300.l, D2" after "move.l $6331c.l, D2")
01B11C  func  turtle_push_scroll_right
# the same up (the stick's bit 2: 01B17C on), 01B322 "move.b #$7f, $6331a.l", 01B32A "ori.b #$80, ($3,A0)", an eighth
# of the speed while attacking (01B338-01B342 "lsr.w #3, D0"), against the upper limit (01B366 "cmp.l D0, D2" after
# "move.l $63320.l, D2")
01B322  func  turtle_push_scroll_up
# the same down (the stick's bit 3: 01B36A on), 01B536 "move.b #$80, $6331a.l", 01B568 "sub.l D0, $63304.l", against
# the lower limit (01B57C "cmp.l $63328.l, D2")
01B536  func  turtle_push_scroll_down
# A6 the walking speeds (01B59E "lea $1b5b2.l, A6": across, across on a diagonal, up/down, up/down on a diagonal),
# D0 the turtle's (01B5A4 "move.b ($2,A0), D0" + "lsl.w #3, D0") +2 on a diagonal (01B59C "moveq #$2, D2")
01B584  func  turtle_walk_speed
# carry when another turtle in play (01B5E0 "cmpa.l A0, A6", 01B5E6 "btst #$0, ($0,A6)") is at the edge D0 names:
# right (01B5F0 "cmpi.l #$16000, ($12,A6)"), left (01B622 #$9100), top and bottom (01B65A #$a000, 01B688 #$1100,
# with its height): the scroll is not pushed away from it
01B5D2  func  turtle_other_at_edge
# every frame (turtle_run_all 01A44E): not hittable (01B69E "andi.b #$fd, (A0)") while invulnerable_time counts, the
# blinking, attack_press_time (01B6F4), and its routine's handler (01B708 "lea $1b714.l, A6": stand, walk, jump,
# attack, hit, 5)
01B69E  func  turtle_control
# flags bits 2-3 cleared (01B74A "andi.b #$f3, (A0)"), walking (01B74E "move.w #$100, D0", +1 up: 01B75C-01B764); on
# the skateboard area (01B740 "cmpi.b #$6, $60121.l") it stands instead (01B72C)
01B740  func  turtle_start_walk
# jump pressed on a floor: with attack too (01B76A "btst #$5, (A2)") the special attack (attack 7 for Donatello, 8 with
# 01B792 "move.w #$900, ($1a,A0)"); else the jump (01B7B0-01B7C8: jump_speed 0x500, move_timer 16, height +0x500,
# routine 2 state 1)
01B76A  func  turtle_start_jump
# attack pressed: faces by the stick (01B7D0-01B7E8), a combo at random (01B810 "jsr $48448.l", 01B820), its first
# attack from the turtle's table (01B82E "lea $1d5f2.l, A6", 01B858 "move.b (A6,D7.w), D0"), or the attack behind
# with an enemy there (01B838 "tst.b ($44,A0)")
01B7D0  func  turtle_start_combo
# the attack D0 from the combo's first step (01B85E "clr.b ($2e,A0)")
01B85C  func  turtle_start_attack
# attacking (01B866 "ori.b #$4, (A0)"), its attack's kind by the turtle (01B86A "lea $1c20e.l, A6") with its facing
# (01B884 "ori.b #$80, D1"; attack 3 hits behind: 01B890 "eori.b #$80, D1") into attack (01B894), its sound
# (01B8A0 "lea $1d526.l, A6"), its damage (01B8B8 "move.w (A6,D1.w), ($a,A0)"), routine 3 (01B8BE "addi.w #$300, D0")
01B862  func  turtle_set_attack
# routine and state from D0 (01B91C "move.w D0, ($4,A0)"), idle_time cleared (01B918) and the animation; dying
# (0x411: 01B8C2 "cmpi.w #$411, D0") with a sound, and with no lives left (01B8E4 "tst.w (A6,D1.w)" at 060100) the
# tile block drawn at its place (01B90E "jsr $30076.l")
01B8C2  func  turtle_set_state
# the animation of its routine and state (01B928 "lea $208c0.l, A6" by the turtle, then 01B932 "move.b ($4,A0), D3"
# and 01B93C "move.b ($5,A0), D3")
01B920  func  turtle_set_animation
# routine 0 (the table at 01B714): jump (01B966 "andi.b #$10, D2" on a floor) or attack (01B96E "andi.b #$20, D3")
# pressed, the stick walks (01B97C "bne $1b740"); still, the idle animation (01B990); once the area is cleared
# (01B952 "tst.b $633c8.l") no jumps nor attacks
01B94C  func  turtle_stand
# routine 1: the same, standing when the stick lets go (01B9F6 "beq $1b72c"), walking up or across by the stick's
# bit 2 (01B9FA "andi.b #$4, D1")
01B9BA  func  turtle_walk
# routine 2: attack pressed in the air (01BA26 "btst #$5, (A2)") the jump attack by its height above the floor
# (01BA40-01BA6A: attack 10, 9 or 11); else its state's handler (01BA7C "lea $1ba88.l, A6")
01BA1C  func  turtle_jump
# states 0-1: going up, gravity left out while move_timer counts and jump is held (01BAA0-01BAB4), its height up by
# jump_speed (01BACA), state 2 under 0x400 (01BACE "cmpi.w #$400, ($1a,A0)", 01BAD8 "move.w #$202, D0")
01BAA0  func  turtle_jump_rise
# state 2: the somersault under 0x380 (01BBB6, 01BBC8 "move.w #$204, D0"), falling when it ends (01BAF2 "move.w
# #$203, D0"); high enough and pushing into a wall (01BB28-01BB52) it kicks off it (01BB62 "move.w #$205, D0",
# 01BB72 "move.b #$4, ($5,A0)")
01BAE2  func  turtle_jump_top
# state 3: lands on a floor (01BC70 "btst #$0, ($1,A0)", 01BC84 "bra $1bcae"), else falls faster (01BC88 "addi.w
# #$50, ($1a,A0)", at most 0x500) down to the ground (01BCA6 "bcc $1bbac")
01BC70  func  turtle_jump_fall
# on the ground: height 0 (01BCAA "clr.w ($10,A0)"), then lands
01BCAA  func  turtle_land_on_ground
# no shadow (01BCAE "andi.b #$7f, ($1,A0)"), standing (01BCC0 "bsr $1b8c2"), the landing's sound (01BCC4 "move.b
# #$12, D7"; 0x30 on the ground of area 3)
01BCAE  func  turtle_land
# state 4: on the wall for move_timer frames (01BCE8-01BCF4), then away from it 0x300 a frame (01BD1E "addi.l #$300,
# ($12,A0)", 01BD34) falling (01BD3C "addi.w #$28, ($1a,A0)") until it lands
01BCE6  func  turtle_wall_jump
# routine 3: the jump attacks (states 8 on: 01BDD6-01BE96, forward 0x400, 0x280 or 0x200 on their arc); the others
# end with their animation (01BD60 "tst.b ($33,A0)", 01BEA4), step forward with the stick (01BDA6 "move.l #$40, D0", 01BDCC "add.l D0, ($12,A0)"),
# Donatello's attack 7 goes forward 0x300 (01BD72-01BD9C)
01BD50  func  turtle_attack
# the attack's animation is over: after a throw the player credited as for a defeated enemy (the attack check does the same: 0472FE) (01BEC2 "move.w #$401, D7", 01BEF0 "jsr
# $4164.l"); attack pressed again within 13 frames (01BEF6) after a hit (01BF32 "btst #$3, (A0)") the combo's next
# attack (01BF56, 01C168), or the throw (01BF96-01C06C: the enemy +5/+28/+30, state 5); else back to stand, walk,
# jump or a new combo (01BF00)
01BEA4  func  turtle_attack_over
# routine 4 (01B714): the reaction starts at state 0 (01C2DA: the hitter's sound, knockback_flags, the reaction by
# the hit (01C3C0 "move.b ($7,A0), D1")); then the reaction's handler (01C228 "lea $1c272.l, A6"); over (01C234),
# standing again with bars left (01C24C), else out of play (01C264 "move.b D0, (A0)", 01C26A "bset D0, $600a0.l")
01C212  func  turtle_hit
# reactions 0-3, 6 and 13: over when the animation ends (01C59E "tst.b ($33,A0)", 01C5A6 "move.b #$ff, ($24,A0)")
01C59E  func  turtle_hit_wait
# reactions 17-20: full health again at once (01C5B4 "move.w #$a03, ($8,A0)") and the bars saved (01C5BA "bra
# $1d416")
01C5AE  func  turtle_refill_health
# reaction 25: forward 0x200 a frame (01C630-01C640) until it is past the screen's edge (01C644, 01C650), then over
01C630  func  turtle_walk_off_screen
# reaction 4: the steps by reaction_step (01C66C "lea $1c678.l, A6")
01C664  func  turtle_knocked_down
# step 0: on the knock's arc (01C68E "moveq #$60, D7", 01C690 "bsr $1d43a") until it lands on a floor
01C688  func  turtle_knocked_down_fly
# step 1: slides 0x100 (0x280 for the far ones: 01C6D8) while wait_timer counts (01C6C6), within the walls and the
# screen (01C6EC "btst D1, ($1,A0)", 01C6FA, 01C710); the next step when the animation ends
01C6B0  func  turtle_knocked_down_slide
# steps 2-3: on its floor (01C724 "bsr $1c786") until the animation ends
01C724  func  turtle_knocked_down_lie
# the next step's state from the variant's table (01C73E "lea $1c764.l, A6"); a negative entry ends the steps
# (01C75E "move.b D0, ($24,A0)")
01C732  func  turtle_knocked_down_next
# not on a floor: height down 0x300 to its floor (01C790 "subi.w #$300, ($10,A0)"), and on it (01C7AA "ori.b #$1,
# ($1,A0)")
01C786  func  turtle_drop_to_floor
# reaction 5: the steps by reaction_step (01C7C4 "lea $1c7d0.l, A6")
01C7BC  func  turtle_knocked_back
# step 0: when the animation ends the far ones are pushed 0x1800 (01C85A-01C876), the next step
01C7E0  func  turtle_knocked_back_start
# step 1: on its floor, slides 0x280 for the far ones (01C7F6-01C800) within the walls and the screen
01C7EA  func  turtle_knocked_back_slide
# steps 2-3: on its floor until the animation ends (01C84C-01C854)
01C84C  func  turtle_knocked_back_lie
# the next step from the variant's table (01C886 "lea $1c8ca.l, A6"); at the end the near ones pushed 0x1000
# (01C8B2 "move.l #$1000, D0")
01C87A  func  turtle_knocked_back_next
# reaction 7 (the table at 01C272: it is not unreached: index.txt 6/6 ran), and the reaction a hit that takes the last
# bar gives (01C40A "moveq #$7, D1"): its steps (01C8EC "lea $1c8f8.l, A6")
01C8E4  func  turtle_knocked_flying
# step 0: against a wall a crash (01C924 "move.b #$89, D7") and the wall's variant; else on the knock's arc (01C944
# "moveq #$50, D7", 01C946 "bsr $1d43a") until it lands, the variant by the bars left (01C964-01C97E)
01C908  func  turtle_knocked_flying_fly
# step 1: the wall's variants drop to the floor (01C9F2-01CA2A), the others slide 0x100 while wait_timer counts
# (01C9A2-01C9E0); the next step when the animation ends
01C986  func  turtle_knocked_flying_slide
# steps 2-3: on its floor; state 0x11 waits wait_timer frames (01CA36 "cmpi.b #$11, ($5,A0)", 01CA4A)
01CA32  func  turtle_knocked_flying_lie
# wait_timer 0x60 (01CA50 "move.b #$60, ($26,A0)"), the next step
01CA50  func  turtle_knocked_flying_wait
# the next step from the variant's table (01CA62 "lea $1ca82.l, A6")
01CA56  func  turtle_knocked_flying_next
# the reaction's last step: over when wait_timer runs out (01CDA0 "subq.b #1, ($26,A0)", 01CD84 "move.b #$ff,
# ($24,A0)")
01CDA0  func  turtle_hit_countdown
# reaction 14 (the table at 01C272): its steps (01CE46 "lea $1ce52.l, A6")
01CE3E  func  turtle_held
# held: the prompt (01CE6A "bsr $1d25c"); a bar off every 128 frames (01CEA6-01CEB8); each press can be hit and counts
# (01CEC6 "ori.b #$2, (A0)", 01CED0); at 8 free: the holder lets go (01CEEE "move.b #$3, ($5,A6)"), health 3, the
# escape attack (01CF08 "moveq #$6, D0"); no bars left: dies (01CF0E)
01CE5A  func  turtle_held_struggle
# dying while held: the prompt erased (01CF0E "bsr $1d31e"), the holder lets go unless it is being hit (01CF16-01CF20),
# state 0x411 for 0x60 frames (01CF2A, 01CF30)
01CF0E  func  turtle_held_dies
# reaction 21: its steps (01CF42 "lea $1cf4e.l, A6")
01CF3A  func  turtle_held_briefly
# the prompt (01CF66); when the animation ends it is held as reaction 14 (01CF9C "move.b #$e, ($23,A0)", 01CFA6
# "move.w #$422, D0"); at 6 presses (01CFDA "cmpi.b #$6, ($27,A0)") free with the escape attack
01CF56  func  turtle_held_briefly_struggle
# reaction 15: its steps (01D01C "lea $1d028.l, A6")
01D014  func  turtle_held_knock_off
# the prompt (01D040), on its floor (01D05A); a bar off every 64 frames (01D076-01D088); at 8 presses free and the
# holder knocked (01D0B6 "move.b #$2, ($4,A6)")
01D030  func  turtle_held_knock_off_struggle
# reaction 16: its steps (01D0F4 "lea $1d100.l, A6")
01D0EC  func  turtle_held_throw_off
# the prompt (01D118); a bar off every 64 frames (01D138-01D14A); each press struggles (01D17C "move.w #$427, D0"); at
# 8 presses free: the holder thrown (01D1BA "move.w #$500, ($4,A6)", 01D1C4 "move.w #$94, ($28,A6)") and the player credited as for a defeated
# enemy (01D190 "lea $1d200.l, A6", 01D19E "jsr $4164.l"); no bars left: the holder lets go (01D204-01D220) and it dies
01D108  func  turtle_held_throw_off_struggle
# reactions 22-23: on the knock's arc (01D23C "moveq #$50, D7") until it lands on a floor (01D24A), over (01D254)
01D23C  func  turtle_hit_fly
# while a game is played (01D25C "tst.b $600a3.l") and the player's prompt is on (01D272 at 06014C): the prompt's
# picture (01D27A "lea $1d35c.l, A6", 01D288 "lea $1d3ac.l, A6") into the fixed layer near the turtle (01D2C0-01D2FE)
01D25C  func  turtle_show_prompt
# the prompt's tiles blank (01D338 "move.b D0, (A6)+", 01D33A "move.b D1, (A6)+" with 0x10), and off for the player (01D354 "move.b #$ff,
# (A6,D0.w)" at 06014C)
01D31E  func  turtle_erase_prompt
# the bars into the player's record (01D416 "lea $60106.l, A6", 01D424 "move.b ($8,A0), (A6,D0.w)") and the health
# bar shown again (01D42A "move.w #$b20, D7" + the player's bit, 01D434 "jmp $4164.l")
01D416  func  turtle_save_health
# a knock's arc (D7 its gravity): across by drift_speed to knockback_flags' side within the walls and the screen
# (01D44C-01D48C, 01D4E8-01D50E), up and down by jump_speed (01D492-01D4C6), on its floor when it lands (01D4D6
# "ori.b #$1, ($1,A0)")
01D43A  func  turtle_knockback_arc
# on top of another object (flags bit 4: 01D6BE "btst #$4, (A0)" then "bne $1d692"): on it (bit 0) when its floor
# cell is 1 and it is at its floor height (01D69E-01D6AA), else in the air (01D6B2 "ori.b #$80, D0"), into its
# contact bits (01D6B6 "or.b D0, ($1,A0)")
01D692  func  turtle_floor_contact
# no stick (01AC84's table): the walls around (01D6BC-01D704, 01D742), or off its floor cell by knockback_flags' side
# (01D6D0 "btst #$0, ($22,A0)", 01D9A2 or 01DAD6)
01D6BC  func  turtle_walls_still
# stick up (bit 2: 01AC84's table, entry 4): on its floor cell the walls around (01D742), else its floor raised
# (01D718 "bne $1d7c0")
01D708  func  turtle_walls_up
# the walls from the cells around (0633D4-0633DB): up (01D760 "ori.b #$2, D0"), right (01D78C "ori.b #$8, D0"), left
# (01D7B8 "ori.b #$10, D0"), and the corners
01D742  func  turtle_wall_contacts
# its floor raised a level (01D7E4 "addi.b #$8, ($32,A0)") for each wall cell above it in the floor map (01D7EA "suba.w
# #$40, A6"), up to 20 (else it is put back at 0xC000, 0x2000: 01D832-01D848)
01D7C0  func  turtle_raise_floor
# stick down (bit 3): the walls around (01D856-01D896), else its floor lowered (01D89A "bsr $1d8a8") and down 0x400
01D84C  func  turtle_walls_down
# its floor lowered a level (01D8AC "subi.b #$8, ($32,A0)") for each wall cell below it in the floor map (01D8BA "adda.w
# #$40, A6")
01D8A8  func  turtle_lower_floor
# stick right (bit 1): the walls up and to the sides (01D8F0-01D99E); off its floor cell, 01D9A2. Also used by the
# object routine 0127D6 (its +01 bit 3: a wall on the right)
01D8E6  func  turtle_walls_right
# off its floor cell going right: at its floor height, unless the cell lets it through (01D9AE-01D9CE: cells -6, -4,
# -1), pushed back left 0x1000 (0x1800 when knocked far: 01D9D8-01D9EC) with every wall (01D9F4 "ori.b #$7b, D0");
# in the air over a step (cells -5, -4: 01D9FC-01DA0E) its floor raised; else lowered and on 0x400 (01DA12-01DA16)
01D9A2  func  turtle_leave_floor_right
# stick left (bit 0): the walls up and to the sides (01DA2A-01DAD2); off its floor cell, 01DAD6
01DA20  func  turtle_walls_left
# off its floor cell going left: the same the other way (01DAE2-01DB52: cells -5, -4, -1 let it through, pushed back
# right 0x1000, cells -6, -4 a step up)
01DAD6  func  turtle_leave_floor_left
# stick up and left (5): on its floor cell the walls of the diagonal (01DB84), else as going left (01DB66 "bne $1dad6")
01DB54  func  turtle_walls_up_left
# stick up and right (6, 7): on its floor cell the walls of the diagonal, else as going right (01DB80 "bne $1d9a2")
01DB6E  func  turtle_walls_up_right
# the walls going up diagonally: on its floor or in the air (01DB84-01DBA6), up when both cells above are the same wall
# (01DBAA-01DC06), right and left (01DC0A-01DC5A), and the corners
01DB84  func  turtle_walls_up_diagonal
# the corners: up-right (01DC7C "ori.b #$20, D0") and up-left (01DC9E "ori.b #$40, D0") from the cells there, then into
# its contact bits (01DCA2 "bra $1d6b6")
01DC5E  func  turtle_corner_contacts
# stick down and right (10 on): the walls; off its floor cell (unless cell -5) lowered a level and moved down-right
# (01DD72-01DD96: x +0x400, y -0x400, height +0x400)
01DCA6  func  turtle_walls_down_right
# the right (01DD34 "ori.b #$8, D0") and left (01DD5E "ori.b #$10, D0") walls, and the corners
01DD0E  func  turtle_side_contacts
# stick down and left (9): the same the other way (01DE14-01DE38: x -0x400)
01DD9C  func  turtle_walls_down_left
# the area's exit starts (006B4E): each turtle in play drawn (02B278 "ori.b #$80, (A0)" in the loop of 02B25C "lea
# $62000.l, A0"), its marker off (02B27C "move.b D0, (A1)", 02B27E "move.b D0, (A6)"), nothing more that keeps it from
# being hit (02B280 "move.b D0, ($2d,A0)"); the area's own start of the exit by the stage (02B2BA "lea $2b2c6.l, A6")
02B25C  func  turtle_start_area_exit
# area 0: each turtle walks (02B308 "move.w #$100, D0", up when y is under 0x5000: 02B318 "addq.w #1, D0"; 02B31A "jsr
# $1b8c2.l"), facing right (02B2FE "andi.b #$bf, ($0,A0)"), exit_step 0 (02B304 "clr.b ($2c,A0)")
02B2EE  func  turtle_exit_building_start
# area 1: each turtle stands (02B352 "move.w #$0, D0", 02B356 "jsr $1b8c2.l"), the exit waits 0x20 frames (02B334
# "move.b #$20, $633de.l")
02B334  func  turtle_exit_apartment_start
# area 2: each turtle walks (02B390 "move.w #$100, D0"), facing left past 0x13C00 (02B380 "cmpi.l #$13c00, ($12,A0)",
# 02B38C "ori.b #$40, (A0)"), exit_step 0 (02B37C "clr.b ($2c,A0)"), a sound (02B3AE "move.b #$73, D7")
02B36A  func  turtle_exit_street_start
# area 3: each turtle walks (02B3D4 "move.w #$100, D0") facing left (02B3C6 "ori.b #$40, (A0)"), no shadow (02B3CA
# "bclr #$7, ($1,A0)"), exit_step 0 (02B3D0 "clr.b ($2c,A0)"), a sound (02B3F6 "move.b #$6e, D7")
02B3B8  func  turtle_exit_sewer_start
# area 4: the objects 24-31 gone (02B400 "lea $62780.l, A0", 02B406 "clr.b (A0)"), each turtle walks facing the side of
# its place (02B42A "lea $2c0f0.l, A6", 02B448 "ori.b #$40, ($0,A0)"), exit_step 0 (02B452 "move.b D0, ($2c,A0)")
02B400  func  turtle_exit_car_street_start
# area 5: each turtle crouches for a jump (02B4BC "move.b #$10, ($1d,A0)", 02B4C2 "move.w #$200, D0"), a sound (02B4D8
# "move.b #$fe, D7")
02B4AA  func  turtle_exit_highway_start
# area 7: the objects 24-31 gone (02B506 "lea $62780.l, A0"), the object at 062DC0 started (02B51A "lea $62dc0.l, A0",
# 02B526 "jsr $47bf2.l"); each turtle walks up (02B554 "move.w #$101, D0"), its animation held (02B55E "clr.b ($33,A0)")
02B506  func  turtle_exit_building_site_start
# area 8: each turtle walks (02B58E "move.w #$100, D0", up when y is under 0x5000: 02B59E "addq.w #1, D0"), the layers'
# priority, 0xC0 frames (02B5C2 "move.b #$c0, $633de.l")
02B578  func  turtle_exit_technodrome_start
# area 9: 0xC0 frames (02B5D4 "move.w #$c000, $633de.l"), each turtle's animation held (02B5E2 "clr.b ($33,A0)")
02B5D4  func  turtle_exit_final_start
# area 0, every frame: each turtle walks to (0x170, 0x50) (02B6CA "jsr $47d98.l", 02B6D4 "jsr $2c7e6.l") and is hidden
# there (02B6B2 "andi.b #$7f, ($0,A0)"); 0x20 frames after the last (02B6F0 "move.b #$20, $633e2.l") the exit is over
# (02B65C "subq.b #1, $633e2.l", 02B672 "addq.b #1, $60007.l")
02B652  func  turtle_exit_building
# area 2, every frame: each turtle's exit_step (02BADA "move.b ($2c,A0), D0"); the exit over when the wait runs out
02BACA  func  turtle_exit_street
# exit_step 0: walks to (0x13C, 0x34) (02BB40 "move.w #$13c, D1", 02BB48 "jsr $47d98.l"); there it jumps (02BB58 "move.w
# #$700, ($1a,A0)", 02BB72 "move.w #$201, D0") and goes on to exit_step 1 (02BB7C "addq.b #1, ($2c,A0)")
02BB22  func  turtle_exit_street_walk
# exit_step 1: the jump's arc (02BBAA "move.w #$203, D0" at its top) towards (0x13C, 0x34); landed there, its animation
# by the turtle (02BC42 "lea $2bc56.l, A6", 02BC4C "jsr $47bf2.l"), exit_step 2
02BB82  func  turtle_exit_street_jump
# exit_step 2: hidden when its animation ends (02BC66 "tst.b ($33,A0)", 02BC76 "andi.b #$7f, (A0)")
02BC66  func  turtle_exit_street_vanish
# area 3, step 0: each turtle's exit_step (02BCBA "move.b ($2c,A0), D0"); when none is left, the next screen's layers and
# palette (02BD1A "jsr $31230.l", 02BD30 "lea $a16e.l, A6")
02BCA4  func  turtle_exit_sewer
# exit_step 0: walks left to 0x9000 (02BD5E "subi.l #$300, ($12,A0)"), then crouches 0x20 frames (02BD72 "move.b #$20,
# ($26,A0)", 02BD78 "move.w #$200, D0") and exit_step 1
02BD4C  func  turtle_exit_sewer_walk
# exit_step 1: after wait_timer (02BD94 "subq.b #1, ($26,A0)") the jump (02BD9A "move.w #$201, D0"); up 0x800 a frame
# (02BDBC "addi.w #$800, ($10,A0)") to 0x4000 (02BDCA "move.w #$202, D0")
02BD86  func  turtle_exit_sewer_jump
# area 4, step 0: each turtle in play by its exit_step (02BF54 "move.b ($2c,A0), D0"); when they all wait, the objects 40
# and 41 come in together (02BFB4 "lea $62c80.l, A0", 02C030 "lea $2d8c8.l, A6")
02BF24  func  turtle_exit_car_street
# exit_step 0: walks to its place by the turtle (02C05E "lea $2c0f0.l, A6", 02C0E0 "jsr $47d98.l"), there it stands
# facing its side and waits (02C096 "move.b #$10, ($1d,A0)", 02C0B2 "move.w #$101, D0")
02C058  func  turtle_exit_car_street_wait
# exit_step 1: once the objects 40 and 41 have stopped (02C10E "lea $62c80.l, A6"), after move_timer (02C1C6 "subq.b #1,
# ($1d,A0)") it walks to (0xD0, 0x4D) (02C224 "move.w #$d0, D1") and jumps (02C238 "addq.b #1, ($2c,A0)", 02C23C
# "move.w #$400, ($1a,A0)", 02C24C "move.w #$200, D0"); those objects slow down
02C100  func  turtle_exit_car_street_board
# exit_step 2: after move_timer (02C26C "subq.b #1, ($1d,A0)") the jump (02C27A "move.w #$201, D0"); its arc, hidden
# when it comes down under 0x1800 (02C2BE "andi.b #$7f, ($0,A0)")
02C256  func  turtle_exit_car_street_jump
# area 5, every frame: each turtle after move_timer jumps (02C846 "move.w #$201, D0"), then goes off to the right 4 a
# frame (02C86C "addq.w #4, ($c,A0)") rising 0x600 (02C882 "addi.w #$600, ($10,A0)"), hidden past 0x1A0 (02C85A "cmpi.w
# #$1a0, ($c,A0)")
02C80E  func  turtle_exit_highway
# area 6, step 0: each turtle to its place (02C962 "bsr $2cdc0"); then the objects 40 and 41 come in together (02C97C
# "lea $62c80.l, A0", 02C9E2 "lea $2d8c8.l, A6")
02C952  func  turtle_exit_skateboard_gather
# walks to its place by the turtle (02CDC0 "lea $2ce62.l, A6", 02CE52 "jsr $47d98.l") and stands there (02CE24 "move.w
# #$100, D0")
02CDC0  func  turtle_exit_go_to_place
# area 6, step 1: the objects 40 and 41 slow down (02CA0C "lea $62c80.l, A0"); each turtle walks to (0xA0, 0x50) (02CB0A "move.w
# #$a0, D1") and jumps (02CA90 "move.w #$400, ($1a,A0)", 02CA9C "move.w #$200, D0", 02CAB6 "move.w #$201, D0"), hidden
# when it comes down under 0x1800 (02CAFA "andi.b #$7f, (A0)"); next when none is drawn
02CA0C  func  turtle_exit_skateboard_board
# area 7, step 1: after the wait each turtle walks (02CF10 "move.w #$101, D0")
02CEFA  func  turtle_exit_building_site_walk
# area 7, step 2: each turtle walks to (0x100, 0x90) (02CF6C "move.w #$100, D1") and jumps (02CF9E "move.w #$200, D0",
# 02CFB6 "move.w #$201, D0", 02CFC0 "move.w #$500, ($1a,A0)"), hidden when it comes down (02D00C "andi.b #$7f, (A0)");
# then the objects gone and the next screen's layers and palette (02D082 "jsr $31230.l", 02D09A "lea $a12e.l, A6")
02CF2A  func  turtle_exit_building_site_jump
# area 7, step 5: each turtle at its place by the turtle (02D278 "lea $2d304.l, A6"), height and drift_speed from there
# (02D298 "move.w ($6,A6,D1.w), ($20,A0)"), falling (02D2B2 "move.w #$203, D0"); the scroll and a sound (02D2F6 "move.b
# #$75, D7")
02D25E  func  turtle_exit_building_site_drop
# area 7, step 6: each turtle falls in across (02D350 "addi.l #$300, ($12,A0)", 02D362 "subi.w #$600, ($10,A0)"), lands
# (02D370 "move.b #$8, ($1d,A0)"), then walks after move_timer (02D3A0 "move.w #$101, D0")
02D324  func  turtle_exit_building_site_land
# area 7, step 7: a wait with an effect at the first turtle (02D416 "cmpi.b #$70, $633de.l", 02D452 "jmp $2fff6.l"), the
# turtles crouch at 8 (02D472 "move.w #$200, D0") and jump at the end (02D3EA "move.w #$201, D0")
02D3D2  func  turtle_exit_building_site_wait
# area 7, step 8: each turtle goes up 0x600 a frame (02D4AE "addi.l #$600, ($16,A0)") until its screen y is 0x100, then
# its animation by the turtle (02D4C4 "lea $2d4f4.l, A6")
02D48A  func  turtle_exit_building_site_rise
# area 7, step 9: each turtle drifts across by drift_speed (02D528 "move.w ($20,A0), D0") and down 0x100 (02D542 "subi.l
# #$100, ($16,A0)") while its animation runs, hidden when it ends; the exit over when none is left
02D504  func  turtle_exit_building_site_leave
# area 8, every frame: each turtle walks to (0x198, 0x58) (02D5A4 "move.w #$198, D1") and is hidden past 0x18800 (02D5BC
# "cmpi.l #$18800, ($12,A0)", 02D5C8 "bclr #$7, (A0)"); over when none is left and the wait is out
02D56E  func  turtle_exit_technodrome
# area 9, step 0: at 0x80 the turtles turn left and walk (02D64E "bset #$6, (A0)", 02D652 "move.w #$100, D0") with a
# sound (02D668 "move.b #$34, D7"); the screen shakes (02D692 "lea $30652.l, A6", 02D6A2 "add.w D1, $60060.l"); each
# walks left to 0x4000 (02D708 "subi.l #$300, ($12,A0)")
02D61E  func  turtle_exit_final_walk

# ---- comments ----
comment turtle_join a player who has just put a coin in comes into the game with full health, blinking, with its marker
comment turtle_respawn a player whose turtle was knocked out comes back at the start point with full health
comment turtle_start_area every player's turtle starts the area with the health bars it had
comment turtle_init a turtle's object set up for its player, invulnerable for a while, and placed by the area's entry
comment turtle_place_at_start the turtle at its start point, standing
comment turtle_start_fall_in the turtle starts the area falling in from above
comment turtle_jump_in_start the turtle starts area 4 jumping in, and the object that comes in with them
comment turtle_start_marker the player's marker object starts at the turtle's place
comment turtle_fall_in every frame of the entry: the turtles fall in across, land, wait and stand
comment turtle_jump_in_step every frame of area 4's entry: the object that came with them bounces away, the turtles jump in, land and stand
comment turtle_skateboard_shadow on the skateboard the turtles' shadows change every four frames
comment turtle_run_all every turtle in play a frame: controls, move, the screen's limits, the scroll, floor and walls
comment turtle_collide the turtle against solid objects, the floor map and its walls, and falling when nothing holds it
comment turtle_check_walls the walls around the turtle checked by the way its stick pushes
comment turtle_move the stick moves the turtle across and up or down, or pushes the scroll at the screen's edges
comment turtle_push_scroll_left the turtle at the left edge moves the scroll left at its walking speed
comment turtle_push_scroll_right the turtle at the right edge moves the scroll right at its walking speed
comment turtle_push_scroll_up the turtle at the top moves the scroll up at its walking speed
comment turtle_push_scroll_down the turtle at the bottom moves the scroll down at its walking speed
comment turtle_walk_speed the turtle's walking speeds, straight or on a diagonal
comment turtle_other_at_edge whether another turtle stands at the opposite edge, so the scroll cannot move away from it
comment turtle_control every frame: the time it cannot be hit, the blinking, and its routine (stand, walk, jump, attack, hit)
comment turtle_start_walk the turtle starts walking, across or up, or stands on the skateboard
comment turtle_start_jump the jump button starts a jump, or the special attack with the attack button too
comment turtle_start_combo the attack button starts a combo at random, or the attack behind when an enemy is there
comment turtle_start_attack an attack from the first step of the combo
comment turtle_set_attack the attack's kind, sound and damage, and the turtle attacking
comment turtle_set_state a new routine and state for the turtle with its animation
comment turtle_set_animation the turtle's animation for its routine and state
comment turtle_stand standing: jump, attack, walk, or the idle animation
comment turtle_walk walking: jump, attack, stand, or across and up by the stick
comment turtle_jump in the air: a jump attack by its height, or the jump's state
comment turtle_jump_rise the jump going up, higher while the button is held
comment turtle_jump_top the top of the jump: the somersault, or kicking off a wall it is pushed against
comment turtle_jump_fall the jump coming down until it lands
comment turtle_land_on_ground the turtle lands on the ground
comment turtle_land the turtle lands and stands, with the landing's sound
comment turtle_wall_jump the turtle on a wall for a moment, then away from it falling
comment turtle_attack attacking: the jump attacks' arcs, steps forward, the end of the attack
comment turtle_attack_over the attack ended: the combo's next attack, the throw, or back to standing
comment turtle_hit hit: the reaction by the attack that hit it, and out of play when its bars run out
comment turtle_hit_wait the reaction lasts its animation
comment turtle_refill_health the turtle's health full again
comment turtle_walk_off_screen the turtle walks off the screen
comment turtle_knocked_down knocked down: flies, slides, lies, gets up
comment turtle_drop_to_floor the turtle comes down to its floor
comment turtle_knocked_back knocked back: pushed, slides, gets up
comment turtle_knocked_flying knocked flying, or knocked out by the hit that takes its last bar
comment turtle_hit_countdown the reaction's last wait
comment turtle_held held by an enemy until it breaks free or its health runs out
comment turtle_held_struggle held: the prompt, the health draining, the presses to break free
comment turtle_held_dies the turtle's health ran out while held: the holder lets go and it dies
comment turtle_held_briefly held by an enemy for a moment, free after fewer presses
comment turtle_held_knock_off held by an enemy that is knocked away when the turtle breaks free
comment turtle_held_throw_off held by an enemy the turtle throws when it breaks free
comment turtle_hit_fly knocked into the air until it lands
comment turtle_show_prompt the prompt to press the buttons drawn blinking near the held turtle
comment turtle_erase_prompt the prompt erased
comment turtle_save_health the turtle's health bars kept for its player and shown again
comment turtle_knockback_arc the turtle on a knock's arc across and through the air, until it lands
comment turtle_floor_contact on another object: whether the turtle stands on it or is in the air
comment turtle_wall_contacts the walls around the turtle from the floor map's cells around it
comment turtle_raise_floor the turtle steps up a level of the floor map
comment turtle_lower_floor the turtle steps down a level of the floor map
comment turtle_start_area_exit the area is cleared: the turtles start walking out
comment turtle_exit_street area 2's exit: the turtles walk to one place and jump in there

# ---- functions of the same files that are not the turtles' ----

# the stage's checks for the end of the area (01A880 "lea $1a88c.l, A6" by 060121): run by start_scroll_segment
# when the area's last segment comes (01A72A "beq $1a876") and every frame after it (01A68A "jsr $1a876.l")
01A876  func  check_area_cleared
# area 0: the scroll locked (01A8C0 "move.l D0, $633c2.l"); every player ready and no enemy left (01A8DE "bsr $1aaf6",
# 01A8E4 "tst.b $6120c.l") starts 0x60 frames (01A8EC), sounds at 0x40, then cleared (01A900 "move.b #$ff, $633c8.l")
01A8B4  func  check_cleared_building
# area 1: the same once 0633FE is negative (01A948-01A94E)
01A928  func  check_cleared_apartment
01A95C  func  check_cleared_street
# area 3: every 256 frames the objects 12-23 that went far down are gone (01A990-01A9C4 "subq.b #1, $6120c.l")
01A986  func  check_cleared_sewer
01AA00  func  check_cleared_car_street
01AA2A  func  check_cleared_highway
# area 6: the scroll goes on by itself (01AA56 "move.b D0, $633c9.l")
01AA54  func  check_cleared_skateboard
01AA7E  func  check_cleared_building_site
01AAA8  func  check_cleared_technodrome
01AAD2  func  check_cleared_final
# zero when a player in play (0600A1) has no turtle or it is being hit (01AB08 "btst #$0, (A6)", 01AB10 "cmpi.b #$4,
# ($4,A6)")
01AAF6  func  players_ready
# a segment that scrolls by itself (01ACDA "tst.b $633c9.l" bmi): the layers' places moved by the segment's speeds
# (01AD04 "sub.l D0, $63300.l", 01AD6A "add.l D0, $63304.l") and a new column or row to draw when a tile is passed
01ACDA  func  auto_scroll
# area 2's diagonal stretch (061107, set at 01A3E8): the scroll also goes right 0x120 (01B4E2 "move.w #$120, D0") unless a
# turtle is at the left edge or it already moves
01B4C6  func  push_scroll_diagonally
# a new row of the layers to draw (01B520 "move.l D0, $63330.l", 01B526 "subq.b #1, $63334.l")
01B520  func  queue_scroll_row
# every frame of an area's start (006874): the area's entry by the stage (019F54 "lea $19f92.l, A6"); when it is
# over (019F6A "tst.b $61109.l") the markers drawn (019F84 "move.b #$81, (A0)" for the objects 40-43)
019F34  func  run_area_entry
# areas 0, 1, 5, 6, 8, 9: the layers drawn (019FC2 "jmp $1e1ba.l") and the entry over at once (019FBA "move.b #$ff,
# $61109.l")
019FBA  func  area_entry_standing
# areas 2, 3, 7: the entry's steps by 0633EA (019FD2 "lea $19fde.l, A6")
019FC8  func  area_entry_fall_in
# the layers drawn; in area 7 the object at 062DC0 (019FF8-01A01E); the next step
019FE6  func  start_fall_in_entry
# area 4: the entry's steps (01A142 "lea $1a14e.l, A6")
01A138  func  area_entry_jump_in
# the layers drawn, the next step
01A156  func  start_jump_in_entry
# every frame of play (0068E2): each marker (objects 40-43) on its turtle while it counts down (01A33A-01A352), the
# turtles' bars kept (01A366-01A384), and every turtle run (01A3A8 "bsr $1a3ca") with the layers the stage scrolls
# (01A396 "lea $1a3c0.l, A6")
01A328  func  update_players
# the floor map's cells (061800) around the object's place on the screen (01DE3E "move.w ($c,A0), D7"), as read_floor_cells
01DE3E  func  read_floor_cells_on_screen
# the floor map's cells around the object's place in the area (01DE62 "move.l ($12,A0), D7")
01DE62  func  read_floor_cells
# its cell and the ones above, right, left and in the corners, at its feet and at its height, into 0633D3-0633DD
# (01DEC0 "move.b (A6), $633d3.l" ... 01E038)
01DE84  func  read_floor_cells_at
# every frame of an area's exit (006B80): the stage's exit (02B61E "lea $2b62a.l, A6", by the stage)
02B5F4  func  run_area_exit
# the next step of an area's entry or exit (02B7DA "addq.b #1, $633ea.l")
02B7DA  func  next_area_step
# the object a step at speed D1 the way D0 points (02C7E6 "jsr $47ccc.l", added to x and y), and its screen place
02C7E6  func  move_in_direction
# its screen place from its place in the area (02C7F8-02C80C)
02C7F8  func  update_screen_place
# the exit over after its wait (02CD84 "subq.b #1, $633de.l", 02CD8E "clr.b $633c8.l")
02CD84  func  finish_area_exit
# area 1's exit: its steps by 0633EA (02B6FA)
02B6FA  func  run_exit_apartment
# area 3's exit: its steps
02BC7C  func  run_exit_sewer
# area 4's exit: its steps
02BEF4  func  run_exit_car_street
# area 6's exit: the shadows, the scroll and its steps
02C8A0  func  run_exit_skateboard
# area 7's exit: its steps
02CE72  func  run_exit_building_site
# area 9's exit: its steps
02D600  func  run_exit_final

# ======== the structures' pointers where the objects' code works them out ========
# enemy_look_at_target reads the turtle the enemy goes after (its slot's turtle) and tells it an enemy is behind it
param enemy_look_at_target a6 turtle object.turtle


# ======== the enemies, second half (04DC04-04F68A, 04F722-051492, 051750-051AB0, 051C44-05373A, 02FFFE-03015C) ========
# Kinds (enemy_definitions by the start's "move.l #..., ($24,A0)"; the frames rendered from the starts' and attacks'
# animations): 03 a Foot soldier with knives (stabs, kicks, throws knives: kind 04), 05 with a spear (thrusts it,
# throws it: kind 06), 07 with axes (throws three: kind 08), 09 with a gun (fires four shots: kind 0A, clubs with it),
# 0B the bare-handed one that throws a boomerang (kind 0C), 0D the bare-handed one that throws shuriken (kind 0E), 69
# the Foot soldiers on rocket skateboards of area 6 (a gun, axe or knife soldier by the parameter), 11 Rocksteady, 10
# Bebop, 4E a Mouser, 53 a Roadkill Rodney (one wheel: rushes and brakes; a whip arm and a laser), 0F Shredder (and
# his clones, parameter bit 7).

# ---- the sub-families' fields ----

# the spear soldier: hits with the spear left before it throws it; the start sets it by the players' setting
# (04DCE6 "lea $4dd2c.l, A6", 04DCEC "move.b (A6,D0.w), ($4a,A0)"); a thrust that hits takes one off and at 0 it
# throws the spear (04E312 "subq.b #1, ($4a,A0)", 04E31A "move.w #$4c, ($28,A0)")
scoped object enemy_spear 4A hits_left u8
# the throws of knives, shuriken and axes: frames until it lets go of the next one (04E526 "move.b #$14, ($46,A0)",
# 04E53C "subq.b #1, ($46,A0)"; 04F0AA, 04F0C0; 04EC3E "move.b #$10, ($46,A0)") and how many it still throws (the
# axes: 04EC0A "move.w #$1003, ($46,A0)", 04EC44 "subq.b #1, ($47,A0)")
scoped object enemy_throw 46 throw_time u8
scoped object enemy_throw 47 throws_left u8
# the gun soldier's shots: frames to the next and how many left (04ED0A "move.w #$804, ($46,A0)",
# 04ED20 "subq.b #1, ($46,A0)", 04ED44 "subq.b #1, ($47,A0)")
scoped object enemy_shoot 46 shot_time u8
scoped object enemy_shoot 47 shots_left u8
# the boomerang it threw (04F176 "move.l A6, ($46,A0)" after 047C5A spawns it; 04F186 "movea.l ($46,A0), A6" waits for
# its routine 4)
scoped object enemy_boomerang 46 boomerang u32 object

# Rocksteady: 1 with the gun out, 0 bare-handed: turned over when mode_time runs out (04F434 "bchg #$0, ($2a,A0)");
# his moves and attacks by it (04F43C "move.b ($2a,A0), D0" into 04F58C; 04F51E into 04F5BC/04F5C0), his hit
# animations by it (04FE6A "move.b ($2a,A0), D0")
scoped object enemy_rocksteady 2A armed u8
# frames counted down by his way in (04F24A "move.b #$a, ($40,A0)", 04F2AE "subq.b #1, ($40,A0)",
# 04F302 "move.b #$78, ($40,A0)")
scoped object enemy_rocksteady 40 timer u8
# frames until he draws or puts away the gun (04F1F4 "move.w #$12c, ($46,A0)", 04F42C "subq.w #1, ($46,A0)", reset
# from 04F594 by the players: 04F466 "move.w (A5,D1.w), ($46,A0)")
scoped object enemy_rocksteady 46 mode_time u16
# frames until his next blow close to his turtle and his next attack from afar (04F1FA "move.w #$1010, ($48,A0)",
# 04F4BA "subq.b #1, ($48,A0)" within 0x32 across, 04F4DC "subq.b #1, ($49,A0)" farther; reset by 04F4D2 and 04F508)
scoped object enemy_rocksteady 48 close_attack_wait u8
scoped object enemy_rocksteady 49 far_attack_wait u8
# his walk round the turtle: frames to the next aim, and 0 or 0x40 added to the direction to it
# (04F836 "move.b #$1, ($40,A0)", 04F866 "subq.b #1, ($40,A0)"; 04F84C "move.b #$40, ($4a,A0)",
# 04F880 "add.b ($4a,A0), D0")
scoped object enemy_rocksteady_circle 40 aim_time u8
scoped object enemy_rocksteady_circle 4A turn u8
# his walk up to the turtle with the gun level: frames to the next aim (04F93C "move.b #$1, ($31,A0)",
# 04F956 "subq.b #1, ($31,A0)", 04F994 "move.b #$8, ($31,A0)")
scoped object enemy_rocksteady_close_in 31 aim_time u8
# his shots: the bullet's spawn record (04FDF8 "move.l (A5), ($24,A0)", 04FE14 "movea.l ($24,A0), A5" for 047C5A),
# frames to the next shot and shots left (04FDCE "move.w #$104, ($40,A0)", 04FE02 "subq.b #1, ($40,A0)",
# 04FE2E "subq.b #1, ($41,A0)"), the aim: 1 up at a turtle in the air (04FDEC "move.b #$1, ($4a,A0)"), given to the
# bullet (04FE22 "move.b ($4a,A0), ($3,A6)")
scoped object enemy_rocksteady_shoot 24 bullet u32 rom
scoped object enemy_rocksteady_shoot 40 shot_time u8
scoped object enemy_rocksteady_shoot 41 shots_left u8
scoped object enemy_rocksteady_shoot 4A aim u8
# the shots all round: the list of aims, kept where the speeds are (04F9F6 "move.l #$4f9d4, ($1a,A0)",
# 04FA28 "movea.l ($1a,A0), A4", 04FA30 "move.l A4, ($1a,A0)")
scoped object enemy_rocksteady_shoot_around 1A aims u32 aim
# knocked down and defeated: the animations he falls, lies and gets up by (04FF80 "move.l A6, ($24,A0)",
# 04FFBE "movea.l ($24,A0), A6" then 04FFC2 "movea.l ($4,A6), A6"; 0500D8, 050142), frames he lies
# (04FFF0 "move.b #$1e, ($4a,A0)", 04FFFC "subq.b #1, ($4a,A0)") or blinks before he is gone
# (050174 "move.b #$78, ($4a,A0)", 050190 "subq.b #1, ($4a,A0)")
scoped object enemy_rocksteady_knocked_down 24 animations u32 rom
scoped object enemy_rocksteady_knocked_down 4A lie_time u8
scoped object enemy_rocksteady_defeated 24 animations u32 rom
scoped object enemy_rocksteady_defeated 4A blink_time u8

# Bebop: the plan the thinking picks at random from 050602 (0505C4 "move.b D6, ($2a,A0)"): 0 to his turtle's front, 1
# close in, 2 level with it, 3 stand; the attack he may make by it (050544 "move.b ($2a,A0), D0" into 0505E2); after a
# hit he strikes back with plan 1 (050D1E "move.b #$1, ($2a,A0)")
scoped object enemy_bebop 2A plan u8
# frames counted down: his way in (0502B8 "move.b #$5a, ($46,A0)"), his walks' aims (0506F2 "move.b #$1, ($46,A0)",
# 050764 "move.b #$4, ($46,A0)"), lying and blinking (050E22 "move.b #$14, ($46,A0)", 050F42 "move.b #$78, ($46,A0)")
scoped object enemy_bebop 46 timer u8
# the frames added to each of his punch's frames (050AF0 "move.b ($4a,A0), ($43,A0)"): 3
# (0501E4 "move.b #$3, ($4a,A0)"), 1 when he strikes back after a hit (050D24 "move.b #$1, ($4a,A0)"), and then he
# lunges (050B38 "cmpi.b #$1, ($43,A0)")
scoped object enemy_bebop 4A punch_delay u8
# his walk in beside Rocksteady (0503A0 "move.b #$20, ($40,A0)", 0503B2 "subq.b #1, ($40,A0)")
scoped object enemy_bebop_enter 40 walk_time u8
# his shots: frames to the next and shots left (050C98 "move.w #$1403, ($40,A0)", 050CAE "subq.b #1, ($40,A0)",
# 050CD2 "subq.b #1, ($41,A0)")
scoped object enemy_bebop_shoot 40 shot_time u8
scoped object enemy_bebop_shoot 41 shots_left u8

# a Mouser: frames to its next aim, run or pause (05177A "move.b #$8, ($46,A0)", 0517D6 "subq.b #1, ($46,A0)";
# 0518DE "move.b #$20, ($46,A0)"; 051812 "move.b #$78, ($46,A0)") and how long it chases before it pauses
# (05178A "move.b D7, ($47,A0)" at random under 0xF0, 0517BA "subq.b #1, ($47,A0)")
scoped object enemy_mouser 46 timer u8
scoped object enemy_mouser 47 chase_time u8

# a Roadkill Rodney: what it adds to its x speed every frame as it brakes or slides (0520D8 "move.w #$20, ($48,A0)",
# 052252 "move.w #$ffe0, ($48,A0)", 052116 "move.w ($48,A0), D0" + 05211A "add.w D0, ($1a,A0)")
scoped object enemy_rodney 48 brake s16
# the frames it waits to come up through the floor, at most (051C8E "move.b #$b4, ($46,A0)",
# 051CD2 "subq.b #1, ($46,A0)")
scoped object enemy_rodney 46 wait u8
# its laser: frames to the next bolt and bolts left (0523B0 "move.w #$103, ($46,A0)", 0523C6 "subq.b #1, ($46,A0)",
# 0523F4 "subq.b #1, ($47,A0)")
scoped object enemy_rodney_shoot 46 shot_time u8
scoped object enemy_rodney_shoot 47 shots_left u8
# its whip: the arm it throws (0524FA "move.l A6, ($24,A0)", the arm keeps it: 0524FE "move.l A0, ($24,A6)"), how far
# the arm reaches (052572 "move.b D0, ($46,A0)", 052598 "addq.b #1, ($46,A0)", up to 0xD), the bits the two pass each
# other (052576 "bset #$5, ($4a,A0)", 05258E "btst #$1, ($4a,A0)", 0525DC "btst #$2, ($4a,A0)",
# 0525AA "bset #$6, ($4a,A0)", 0525EE "bset #$7, ($4a,A0)")
scoped object enemy_rodney_whip 24 arm u32 object
scoped object enemy_rodney_whip 46 arm_length u8
scoped object enemy_rodney_whip 4A arm_flags u8

# Shredder: hits until one knocks him back (0527B0 "move.b #$3, ($24,A0)", 053264 "subq.b #1, ($24,A0)", reset 05326C)
scoped object enemy_shredder 24 hits_to_knock_back u8
# frames until he checks whether to guard against his turtle's attack (0527C6 "move.b (A6,D0.w), ($31,A0)" from
# 052A60, 052A06 "subq.b #1, ($31,A0)"; then approach 2 when it attacks him face to face: 052A44 "tst.b ($44,A0)")
scoped object enemy_shredder 31 guard_wait u8
# frames until he fires his ray (0527E0 "move.w (A6,D0.w), ($46,A0)" from 052B3A, 052AF8 "subq.w #1, ($46,A0)",
# 052B18 "move.w #$b0, ($28,A0)")
scoped object enemy_shredder 46 ray_wait u16
# frames counted down by his moves (052CEE "move.b #$20, ($48,A0)", 053108 "move.b #$28, ($48,A0)",
# 053628 "move.b #$f0, ($48,A0)", 05340E "move.b #$78, ($48,A0)")
scoped object enemy_shredder 48 timer u8
# frames until his next blow by how far his turtle is (0527D2 "move.b (A6,D0.w), ($4a,A0)" from 052ADE,
# 052A74 "subq.b #1, ($4a,A0)", 052ABA "move.w ($8,A6), ($28,A0)" from 052ACE)
scoped object enemy_shredder 4A attack_wait u8

# ======== the speech balloons (02FFFE-03015C) ========
# Each shows a balloon of 4 rows of tiles in the fixed layer next to D1, D2 and plays its speech (0301F0: the record
# at 030350 + D3, 5 bytes: the speech, the first tile, the colour, the width less one; 03027E "jsr $91a4.l"). The
# texts are the tiles' (rendered from the tile ROM: bank 2 for 0301D8's, 13 for 0300E0 "moveq #-$30, D4"); the 8-wide
# ones put the balloon 0x20 to one side (0301D8 "move.b D0, $61113.l") and 02FFDA redraws its pointer
# 030004 "moveq #$14, D3": "You're dead, shell-brain" (speech AD); counts the lines said
# (02FFFE "addq.b #1, $61112.l"); Bebop's in area 2 (050430 "jsr $2fffe.l")
02FFFE  func  say_youre_dead_shell_brain
# 03000C "moveq #$19, D3": "Tonight I dine on turtle soup" (speech AF)
03000C  func  say_turtle_soup
# 030014 "moveq #$1e, D3": "I'm invincible!" (speech B0)
030014  func  say_im_invincible
# 03001C "moveq #$23, D3": "Crash the turtles!" (speech B1)
03001C  func  say_crash_the_turtles
# 030024 "moveq #$28, D3": "Do not resist us" (speech B2); a Rodney's, once (0522AC "jsr $30024.l",
# 0522B2 "move.b #$ff, $61244.l")
030024  func  say_do_not_resist_us
# 03002C "moveq #$2d, D3": "Help meeee...!" (speech C1)
03002C  func  say_help_me
# 030034 "moveq #$32, D3": "Attaaaack!" (speech B3)
030034  func  say_attack
# 030058 "moveq #$46, D3": "Pizza time!" (speech B7), above the height (030054 "add.b ($10,A0), D2")
030054  func  say_pizza_time
# 03007A "moveq #$55, D3": "Shell Shock" (speech BB), above the height (030076 "add.b ($10,A0), D2")
030076  func  say_shell_shock
# 030084 "moveq #$5a, D3": "Yippee-I-Ay!" (speech BF)
030084  func  say_yippee_i_ay
# 03008E "moveq #$5f, D3" + 030090 "moveq #$20, D4": "Say your prayers, toitles" (speech AE, 12 tiles wide);
# Rocksteady's as he comes in (04F2F4 "jsr $3008e.l")
03008E  func  say_your_prayers_toitles
# 0300E6 "moveq #$69, D3" + 0300E0 "moveq #-$30, D4": "They ain't getting any prettier!" (speech BD)
0300DA  func  say_they_aint_getting_prettier
# 0300FC "moveq #$6e, D3" + 0300F6 "moveq #-$30, D4": "Watch your mouth, slime ball!" (speech BE); Bebop's second line
# in area 2 (050466 "jsr $300f0.l")
0300F0  func  say_watch_your_mouth
# 030108 "moveq #$73, D3" + 030106 "moveq #-$30, D4": "Oh no, it's that overgrown cork-screw again" (speech C0)
030106  func  say_overgrown_cork_screw
# the wide balloons' pointer: tiles EE EF FE FF into the bottom row (030180 "move.b #$ee, ($191,A6)",
# 03018C "move.b #$fe, ($18b,A6)"); where 03008E, 0300DA and 0300F0 end (030096 "bra $3015c")
03015C  func  draw_wide_balloon_pointer

# ======== the Foot soldiers' kinds ========
# kind 03: 04DC4E "move.l #$54096, ($24,A0)" (enemy_definitions' 4th), 04DC32 "move.b #$87, ($4b,A0)",
# 04DC76 "lea $56f42.l, A6"; it stabs with a knife and throws knives (04E548 "lea $4e50a.l, A5": kind 04, a knife)
04DC04  func  enemy_knife_soldier_start
# kind 05: 04DCF8 "move.l #$5411e, ($24,A0)", 04DD20 "lea $55c60.l, A6"; a spear (its thrown spear: kind 06, 04E388)
04DC9E  func  enemy_spear_soldier_start
# kind 07: 04E6E6 "move.l #$541a6, ($24,A0)", 04E70E "lea $575aa.l, A6"; it throws axes (04EC32 "lea $4ebee.l, A5":
# kind 08)
04E6A2  func  enemy_axe_soldier_start
# kind 09: 04E77A "move.l #$5422e, ($24,A0)", 04E7A2 "lea $56a08.l, A6"; it fires a gun (04ED32 "lea $4ecee.l, A5":
# kind 0A, four shots)
04E736  func  enemy_gun_soldier_start
# kind 0B: 04EE78 "move.l #$542b6, ($24,A0)", 04EEA0 "lea $547c6.l, A6" (the bare-handed soldier's); its own attack
# throws a boomerang (04F162 "lea $4f104.l, A5": kind 0C, a crescent the thrower waits for)
04EE2E  func  enemy_boomerang_soldier_start
# kind 0D: 04EF0C "move.l #$5433e, ($24,A0)", 04EF34 "lea $547c6.l, A6"; its own attack throws a shuriken
# (04F0D6 "lea $4f08e.l, A5": kind 0E)
04EEC8  func  enemy_shuriken_soldier_start

# kind 69, with kind 43 the only enemies of area 6 (area_spawn_lists): a gun, axe or knife soldier by its parameter
# (04EF8C "lea $4efd0.l, A6" colour, 04EF98 "lea $4efe0.l, A6" definition 05422E/0541A6/054096,
# 04EFA6 "lea $4efd4.l, A6" animation) on a rocket skateboard: its shadow sprite is the board
# (04EFBC "move.l #$5ca54, ($3a,A0)", rendered), always in the air (04F050 "bset #$7, ($1,A0)"), the flame flickering
# every 4 frames (04F062 "move.l #$5ca5c, ($3a,A0)"), carried across with the ride (04EFF2 "addi.l #$600, ($12,A0)")
04EF58  func  enemy_skateboard_soldier_start
04EFEC  func  enemy_skateboard_think
04F002  func  enemy_skateboard_attack
04F014  func  enemy_skateboard_hit
04F026  func  enemy_skateboard_react
# its standing animation by the parameter, every frame of the thinking (04EFFA "bsr $4f038";
# 04F040 "lea $4efd4.l, A6"), then the board (04F050 on, where the routines end: 04F010 "bra $4f050")
04F038  func  enemy_skateboard_stand

# ======== the spear soldier's moves (definition 05411E: approaches 0-4, attacks 12/13, reactions 12/14) ========
# walk to its turtle with the spear's animations (04DD66 "lea $4dd48.l, A5", 04DD6C "move.l A5, ($46,A0)",
# 04DD5A "move.w #$100, ($40,A0)"), then enemy_walk_to_target_step (table 04DD40)
04DD34  func  enemy_walk_to_target_spear
04DD50  func  enemy_walk_to_target_spear_start
# to its turtle's side (04DD8E "move.b #$f0, ($22,A0)", 04DDA2 "lea $4dd48.l, A5"), then 04B0B2 and 04B118 (the side,
# 0x40 across) as the sword's 04B074
04DD76  func  enemy_walk_to_side_spear
04DD8E  func  enemy_walk_to_side_spear_start
# 180 frames off its turtle's line (04DDC8 "move.b #$b4, ($22,A0)"): up or down while level with it
# (04DE0E "cmpi.w #$20, ($2e,A0)", 04DE1C "move.w #$100, ($1c,A0)"), else across at its speed
# (04DE36 "move.w ($40,A0), ($1a,A0)"), turning back within 0x40 (04DE3C "cmpi.w #$40, ($2c,A0)")
04DDB4  func  enemy_walk_off_line_spear
04DDC8  func  enemy_walk_off_line_spear_start
04DDF8  func  enemy_walk_off_line_spear_step
# 32 frames away across (04DE82 "move.b #$20, ($46,A0)", 04DE8C "move.w #$100, ($1a,A0)"), crouches
# (04DED0 "lea $55d62.l, A6"), then enemy_back_off_wait (table 04DE6C)
04DE60  func  enemy_back_off_spear
04DE78  func  enemy_back_off_spear_start
04DEB2  func  enemy_back_off_spear_walk
# out of the way of its turtle's attack (approach 4): 16 frames up or down and away (04DEF6 "move.b #$10, ($22,A0)",
# 04DF00 "move.b #$60, D0", 04DF1C "move.w #$100, D1"), then approach 0 (04DF48 "clr.b ($2a,A0)")
04DEE2  func  enemy_step_aside_spear
04DEF6  func  enemy_step_aside_spear_start
04DF40  func  enemy_step_aside_spear_step
# the thrust: animation 055D6C, damage 0x202 (04E2E4 "move.w #$202, ($a,A0)"); when it hits, hits_left goes down and
# at 0 it throws the spear (04E31A "move.w #$4c, ($28,A0)", 04E320 "move.w #$300, ($4,A0)"), else back to thinking
# (04E32E "jmp $485f6.l")
04E2C4  func  enemy_spear_thrust
04E2D8  func  enemy_spear_thrust_start
04E300  func  enemy_spear_thrust_end
# the throw: faces its turtle, animation 055DB6 (04E374), after 20 frames the spear (04E388 "lea $4e34e.l, A5": kind
# 06) and it cannot be hit (04E394 "bclr #$1, ($0,A0)"); then it is a bare-handed soldier: kind 00 started again
# (04E3B2 "clr.w ($2,A0)", 04E3B6 "jsr $489ee.l")
04E336  func  enemy_spear_throw
04E354  func  enemy_spear_throw_start
04E380  func  enemy_spear_throw_release
04E3A0  func  enemy_spear_throw_end

# ======== the knife soldier's moves (definition 054096: approaches 0-4, attacks 15-18, reactions 16/17) ========
04DF64  func  enemy_walk_to_target_knife
# 04DF8A "move.w #$140, ($40,A0)", 04DF96 "lea $4df78.l, A5"
04DF80  func  enemy_walk_to_target_knife_start
04DFA6  func  enemy_walk_to_side_knife
# 04DFC8 "move.w #$140, ($40,A0)", 04DFD2 "lea $4df78.l, A5"; then 04B0B2, 04B118
04DFBE  func  enemy_walk_to_side_knife_start
# enemy_circle at 0x140 (04E01C "move.b #$b4, ($22,A0)", 04E056 "move.w #$140, D1", 04E07A "bchg #$0, ($4a,A0)")
04DFE4  func  enemy_circle_knife
04E018  func  enemy_circle_knife_start
04E042  func  enemy_circle_knife_aim
04E06A  func  enemy_circle_knife_step
# enemy_keep_distance with its animations (04E0CE "lea $4dff8.l, A6"; 04E102 "cmpi.w #$50, ($2c,A0)",
# 04E128 "cmpi.w #$70, ($2c,A0)")
04E0A8  func  enemy_keep_distance_knife
04E0C4  func  enemy_keep_distance_knife_start
04E0E0  func  enemy_keep_distance_knife_watch
04E16A  func  enemy_keep_distance_knife_back_off
04E186  func  enemy_keep_distance_knife_close_in
# away at 0x140 for 30 frames (04E1D6 "move.b #$1e, ($46,A0)", 04E1F2 "move.w #$140, D1"), turns, and waits while the
# turtle is down (04E240 "cmpi.b #$4, ($4,A6)")
04E1B8  func  enemy_back_off_knife
04E1D0  func  enemy_back_off_knife_start
04E20A  func  enemy_back_off_knife_walk
04E23E  func  enemy_back_off_knife_wait
# 8 frames up or down away from its turtle (04E268 "move.b #$8, ($22,A0)", 04E276 "move.w #$140, ($1c,A0)"), then
# approach 0 (04E2A8)
04E254  func  enemy_step_aside_knife
04E268  func  enemy_step_aside_knife_start
04E2A0  func  enemy_step_aside_knife_step
# the stab: animation 0570AA (04E3D8 "lea $570aa.l, A6"), damage 0x202, attack 3; then enemy_attack_end
04E3C4  func  enemy_knife_stab
04E3D8  func  enemy_knife_stab_start
# the high kick (rendered): animation 05714C, damage 0x302, attack 2 (04E420 "move.w #$302, ($a,A0)")
04E400  func  enemy_high_kick_knife
04E414  func  enemy_high_kick_knife_start
# enemy_jump_kick with its animations: crouch (04E464 "lea $57088.l, A6", damage 0x303), the arc of 04E458
# (04E49A "jsr $4863e.l"), lands (04E4D0 "jsr $4861a.l")
04E43C  func  enemy_jump_kick_knife
04E464  func  enemy_jump_kick_knife_crouch
04E48C  func  enemy_jump_kick_knife_leap
04E4B8  func  enemy_jump_kick_knife_fly
# faces its turtle, animation 0570DC, after 20 frames the knife (04E548 "lea $4e50a.l, A5", 04E54E "jmp $47c5a.l"),
# then back to thinking when the animation ends (04E55E)
04E4F2  func  enemy_throw_knife
04E510  func  enemy_throw_knife_start
04E53C  func  enemy_throw_knife_release
04E556  func  enemy_throw_knife_end

# ======== the gun soldier's moves (definition 05422E: approaches 0-4, attacks 1C/1D, reactions 1E/1F) ========
04E7AE  func  enemy_walk_to_target_gun
# 04E7D8 "move.w #$120, ($40,A0)", 04E7E4 "lea $4e7c2.l, A5"
04E7CE  func  enemy_walk_to_target_gun_start
04E7F4  func  enemy_walk_to_side_gun
# 04E816 "move.w #$100, ($40,A0)", 04E820 "lea $4e7c2.l, A5"; then 04B0B2, 04B118
04E80C  func  enemy_walk_to_side_gun_start
# to 0x5A across from its turtle, level with it, and stands there in its animation's third pose
# (04E884 "cmpi.w #$5a, ($2c,A0)", 04E8B8 "cmpi.w #$2, ($2e,A0)", 04E8C8 "movea.l ($8,A5), A6"); off the line again,
# it walks again (04E8E4 "subq.b #1, ($5,A0)")
04E832  func  enemy_walk_to_range_gun
04E84A  func  enemy_walk_to_range_gun_start
04E870  func  enemy_walk_to_range_step
04E8D8  func  enemy_walk_to_range_hold
# 32 frames away (04E918 "move.b #$20, ($46,A0)"), crouches (04E970 "lea $56b1e.l, A6"), waits while its turtle is
# down
04E8FA  func  enemy_back_off_gun
04E912  func  enemy_back_off_gun_start
04E94C  func  enemy_back_off_gun_walk
04E97C  func  enemy_back_off_gun_wait
# 8 frames straight away at 0x100 (04E9A6 "move.b #$8, ($22,A0)", 04E9B2 "addi.b #-$80, D0"), then approach 0
04E992  func  enemy_run_away_gun
04E9A6  func  enemy_run_away_gun_start
04E9DE  func  enemy_run_away_gun_step
# the gun swung like a club (rendered): animation 056AB4, damage 0x302, attack 1 (04ECBA "move.w #$302, ($a,A0)")
04EC9A  func  enemy_gun_swing
04ECAE  func  enemy_gun_swing_start
# four shots 8 frames apart (04ED0A "move.w #$804, ($46,A0)"), each with the sound 18 and a shot of kind 0A
# (04ED28 "move.b #$18, D7", 04ED32 "lea $4ecee.l, A5")
04ECD6  func  enemy_shoot_gun
04ECF4  func  enemy_shoot_gun_start
04ED20  func  enemy_shoot_gun_fire

# ======== the axe soldier's moves (definition 0541A6: approaches 0-4, attacks 1A/1B, reactions 1A/1C) ========
04EA06  func  enemy_walk_to_target_axe
# 04EA30 "move.w #$140, ($40,A0)", 04EA3C "lea $4ea1a.l, A5"
04EA26  func  enemy_walk_to_target_axe_start
04EA4C  func  enemy_walk_to_side_axe
# 04EA6E "move.w #$140, ($40,A0)"; then 04B0B2, 04B118
04EA64  func  enemy_walk_to_side_axe_start
# 04EAAC "move.w #$100, ($40,A0)", 04EAB6 "lea $4ea1a.l, A5"; then 04E870, 04E8D8
04EA8A  func  enemy_walk_to_range_axe
04EAA2  func  enemy_walk_to_range_axe_start
# 40 frames away (04EAE6 "move.b #$28, ($46,A0)"), crouches (04EB40 "lea $576e4.l, A6"), waits while its turtle is
# down
04EAC8  func  enemy_back_off_axe
04EAE0  func  enemy_back_off_axe_start
04EB1C  func  enemy_back_off_axe_walk
04EB4C  func  enemy_back_off_axe_wait
# 8 frames straight away at 0x180 (04EB86 "move.w #$180, D1"), then approach 0
04EB62  func  enemy_run_away_axe
04EB76  func  enemy_run_away_axe_start
04EBAE  func  enemy_run_away_axe_step
# three axes 16 frames apart (04EC0A "move.w #$1003, ($46,A0)"), each with the sound 2 and an axe of kind 08
# (04EC32 "lea $4ebee.l, A5")
04EBD6  func  enemy_throw_axes
04EBF4  func  enemy_throw_axes_start
04EC20  func  enemy_throw_axes_release
# the high kick (rendered): animation 05773A, damage 0x302, attack 2 (04EC7E "move.w #$302, ($a,A0)")
04EC5E  func  enemy_high_kick_axe
04EC72  func  enemy_high_kick_axe_start

# ======== the thrown boomerang and shuriken (attacks 0A and 09 of definitions 0542B6 and 05433E) ========
# faces its turtle, 20 frames, then the sound 2A and a shuriken of kind 0E (04F0AA "move.b #$14, ($46,A0)",
# 04F0D6 "lea $4f08e.l, A5")
04F076  func  enemy_throw_shuriken
04F094  func  enemy_throw_shuriken_start
04F0C0  func  enemy_throw_shuriken_release
# winds up (animation 055ABE), throws (055AF2) after 16 frames a boomerang of kind 0C that keeps it
# (04F172 "move.l A0, ($20,A6)"), then waits for it: back to thinking when the boomerang's routine is 4
# (04F18A "cmpi.b #$4, ($4,A6)"), after 60 frames (04F17A "move.b #$3c, ($22,A0)") the animation 055B3A and the
# attack's end
04F0E4  func  enemy_boomerang_throw
04F10A  func  enemy_boomerang_throw_wind_up
04F11A  func  enemy_boomerang_throw_aim
04F150  func  enemy_boomerang_throw_release
04F186  func  enemy_boomerang_throw_wait

# ======== the Foot soldiers' hit animations (react moves 48-7C: the animation, then enemy_hit's 049E00) ========
# The four poses match the bare-handed soldier's react moves 00/04/08/0C (049DDC/049E10/049E34/049E58, rendered: head
# thrown back, bent over, reeling with a leg up, hunched); the definitions pick them by the hit (+58) spear:
# 04E57E "lea $55e30.l, A6", 04E5A2 "lea $55e64.l, A6", 04E5C6 "lea $55e8e.l, A6", 04E5EA "lea $55eb8.l, A6"
04E566  func  enemy_flinch_back_spear
04E57A  func  enemy_flinch_back_spear_start
04E58A  func  enemy_flinch_bent_spear
04E59E  func  enemy_flinch_bent_spear_start
04E5AE  func  enemy_flinch_reel_spear
04E5C2  func  enemy_flinch_reel_spear_start
04E5D2  func  enemy_flinch_hunched_spear
04E5E6  func  enemy_flinch_hunched_spear_start
# knife: 04E60E "lea $571c2.l, A6", 04E632 "lea $571f6.l, A6", 04E656 "lea $57220.l, A6", 04E67A "lea $5724a.l, A6"
04E5F6  func  enemy_flinch_back_knife
04E60A  func  enemy_flinch_back_knife_start
04E61A  func  enemy_flinch_bent_knife
04E62E  func  enemy_flinch_bent_knife_start
04E63E  func  enemy_flinch_reel_knife
04E652  func  enemy_flinch_reel_knife_start
04E662  func  enemy_flinch_hunched_knife
04E676  func  enemy_flinch_hunched_knife_start
# gun: 04ED76 "lea $56b7c.l, A6", 04ED9A "lea $56bb0.l, A6"
04ED5E  func  enemy_flinch_back_gun
04ED72  func  enemy_flinch_back_gun_start
04ED82  func  enemy_flinch_bent_gun
04ED96  func  enemy_flinch_bent_gun_start
# axe: 04EDBE "lea $5777e.l, A6", 04EDE2 "lea $577b2.l, A6", 04EE06 "lea $577dc.l, A6"
04EDA6  func  enemy_flinch_back_axe
04EDBA  func  enemy_flinch_back_axe_start
04EDCA  func  enemy_flinch_bent_axe
04EDDE  func  enemy_flinch_bent_axe_start
04EDEE  func  enemy_flinch_reel_axe
04EE02  func  enemy_flinch_reel_axe_start

# ======== Rocksteady (kind 11; rendered: the rhino in a vest, with a gun) ========
# targets the nearest turtle (04F1D2 "jsr $4835e.l"), counts as a boss (04F206 "addq.b #1, $61236.l"), the hits he
# takes before he strikes back by the players (04F21C "move.b (A6,D0.w), $61237.l"); parameter 0: alone, as 04F6E6
# puts him in (04F6F8 "move.w #$1100, ($2,A6)"), the music faded and his way in (04F250 "addq.b #1, ($4,A0)",
# 04F25A "lea $59cba.l, A6"); else beside Bebop (area 4's spawn list, parameter 1), waiting
# (04F26C "move.l A0, $61220.l", 04F272 "move.w #$104, ($4,A0)"); the parameter is then his weak flash's colour (0C or
# 0A)
04F1D2  func  enemy_rocksteady_start
# routine 1, his way in (table 04F296)
04F28A  func  enemy_rocksteady_enter
# 10 frames, then his laugh's animation (04F2C0 "lea $59cb0.l, A6")
04F2AE  func  enemy_rocksteady_enter_wait
# the boss music 64 and the balloon "Say your prayers, toitles" (04F2D4 "move.w #$64, D7", 04F2F4 "jsr $3008e.l"), at
# y 0x6C (04F2FA "move.l #$6c00, ($16,A0)")
04F2CE  func  enemy_rocksteady_enter_taunt
# his health (04F322 "lea $54746.l, A6", 04F328 "jsr $485ae.l") and his walk (04F334 "lea $596ba.l, A6")
04F318  func  enemy_rocksteady_enter_ready
# walks down 16 frames (04F354 "addi.l #-$100, ($16,A0)"), then can be hit and thinks (04F348 "bset #$1, ($0,A0)")
04F340  func  enemy_rocksteady_enter_walk_in
# beside Bebop: waits for area 4's signal (04F35E "tst.b $6123d.l": set by kind 1C's object with the boss music,
# 04A7C4)
04F35E  func  enemy_rocksteady_enter_wait_for_signal
# walks in 32 frames, his health and palette (04F38E "lea $54766.l, A6", 04F3A4 "jsr $9242.l"), then thinks
04F380  func  enemy_rocksteady_enter_walk_in_with_bebop
# routine 2: another turtle every 16 frames (04F3DC "jsr $4835e.l"); when Bebop holds the pincer charge, his part of
# it (04F40C "tst.b $61240.l", 04F41E "move.w #$98, ($28,A0)"); the gun drawn or put away when mode_time runs out; a
# blow close by or an attack from afar when their waits run out (04F4BA, 04F4DC); else a move by armed from 04F5D4
# (04F546)
04F3BA  func  enemy_rocksteady_think
# the attack of 04F5BC or 04F5C0 by armed into move (04F524 "move.w (A6,D0.w), ($28,A0)"), kept in 061238 (04F52A),
# and a random 0-3 for the next wait (04F536 "moveq #$4, D7", 04F538 "jmp $48448.l")
04F51C  func  enemy_rocksteady_pick_attack
# routine 3: his weak flash (04F5E8 "jsr $48724.l"), then the bosses' attack
04F5E4  func  enemy_rocksteady_attack
# routine 4: one hit less before he strikes back (04F622 "subq.b #1, $61237.l"), the pincer charge called off
# (04F632 "clr.b $61240.l"); defeated (move 9C), knocked down (98), hit from behind (A0), else by the hit from 04F6B6
# (A4 or A8)
04F622  func  enemy_rocksteady_hit
# routine 5: his weak flash, then the bosses' reaction
04F680  func  enemy_rocksteady_react

# ---- shared by Rocksteady and Bebop (and Shredder's moves) ----
# the bosses' routine 3: look at the turtle, the walls, the screen's edges, then the attack by move
# (04F612 "lea $53d2a.l, A6"); Rocksteady's 04F5E4 runs into it, Bebop's jumps to it (05061C "jmp $4f5ee.l")
04F5EE  func  enemy_boss_attack_move
# the bosses' routine 5: the reaction by move (04F6AA "lea $53dea.l, A6"); Bebop's jumps to it (050678 "jmp $4f68a.l")
04F68A  func  enemy_boss_react_move
# looks at its turtle and turns to it (04F9A2 "jsr $482fa.l", 04F9B8 "bset #$6, ($0,A0)")
04F9A0  func  enemy_boss_face_target
# the pincer charge: takes the left edge (bit 6 of 061241) if it is left of 0x100 and it is free, else the right one
# (bit 7), keeps it in side and runs to it at 0x200 (05090A "bset #$6, $61241.l", 050922 "move.w #$fe00, ($1a,A0)",
# 05092C "bset #$7, $61241.l"); Rocksteady's start jumps to it (04FB00 "jmp $508fc.l")
0508FC  func  enemy_pincer_charge_take_edge

# ---- Rocksteady's moves (053C26: 2E-35, 3A) ----
# the taunts (rendered: raising his fist, shaking it, laughing) and the gun drawn or put away: an animation, then the
# thinking again when it ends (04F7E8 "clr.b ($22,A0)") or when move_time runs out (04F7AC "subq.b #1, ($22,A0)")
04F722  func  enemy_rocksteady_raise_fist
04F736  func  enemy_rocksteady_raise_fist_start
# 136 frames of his laugh (04F768 "move.b #$88, ($22,A0)", 04F772 "lea $59d58.l, A6": the one of his way in)
04F750  func  enemy_rocksteady_laugh
04F764  func  enemy_rocksteady_laugh_start
# 64 frames (04F796 "move.b #$40, ($22,A0)", 04F7A0 "lea $59cc4.l, A6")
04F77E  func  enemy_rocksteady_shake_fist
04F792  func  enemy_rocksteady_shake_fist_start
04F7AC  func  enemy_rocksteady_hold_pose
04F7E0  func  enemy_rocksteady_pose_end
# when armed turns to 1 (04F58C: move B8), animation 05A08A (rendered: from bare hands to the gun)
04F7B2  func  enemy_rocksteady_draw_gun
04F7C6  func  enemy_rocksteady_draw_gun_start
# when armed turns to 0 (move BC), animation 05A0D2 (rendered: the gun put away)
04F7EE  func  enemy_rocksteady_put_gun_away
04F802  func  enemy_rocksteady_put_gun_away_start
# 180 frames walking round his turtle at 0x160 (04F830 "move.b #$b4, ($22,A0)", 04F884 "move.w #$160, D1"), aiming
# every 8
04F81C  func  enemy_rocksteady_circle
04F830  func  enemy_rocksteady_circle_start
04F862  func  enemy_rocksteady_circle_step
# with the gun up (04F8C0 "lea $5979c.l, A6"): across at 0x200 until 0x50 from his turtle, then level with it
# (04F8D4 "cmpi.w #$50, ($2c,A0)", 04F8EC "move.w #$200, ($1c,A0)")
04F89C  func  enemy_rocksteady_line_up
04F8B0  func  enemy_rocksteady_line_up_start
04F8CC  func  enemy_rocksteady_line_up_step
# with the gun level (04F946 "lea $59618.l, A6"): to 0x20 in front of his turtle at 0x180, aiming every 8 frames
# (04F962 "move.w #$20, D1", 04F980 "move.w #$180, D1")
04F922  func  enemy_rocksteady_close_in
04F936  func  enemy_rocksteady_close_in_start
04F952  func  enemy_rocksteady_close_in_step
# six aims from 04F9D4 (level, up, down, each way), three shots each 8 frames apart (04FA22 "move.b #$3, ($41,A0)",
# 04FA70 "move.b #$8, ($40,A0)"), the sound 18 and a bullet (04FA84 "jsr $47c5a.l")
04F9C0  func  enemy_rocksteady_shoot_around
04F9F2  func  enemy_rocksteady_shoot_around_start
04FA0A  func  enemy_rocksteady_shoot_around_fire

# ---- Rocksteady's attacks (053D2A: 22-26) ----
# the pincer charge with Bebop (move 98): to an edge (04FB06: until the wall, then 04FB30 "or.b D0, $61242.l"), waits
# for Bebop at the other (04FB3C "cmpi.b #-$40, $61242.l"), then charges (04FB48 "lea $5983e.l, A6") until the wall,
# or until they crash into each other (04FBC4 "tst.b $61247.l", 04FBCE "lea $5ad06.l, A6") and he is knocked down
# (04FBF6 "move.w #$98, ($28,A0)", 04FBFC "move.w #$500, ($4,A0)"); called off when 061240 and 061247 are clear
# (04FAA2, 04FAAC)
04FA96  func  enemy_rocksteady_pincer_charge
04FAE6  func  enemy_rocksteady_pincer_charge_start
04FB06  func  enemy_rocksteady_pincer_charge_run_to_edge
04FB3C  func  enemy_rocksteady_pincer_charge_wait_for_bebop
04FB82  func  enemy_rocksteady_pincer_charge_get_ready
04FB86  func  enemy_rocksteady_pincer_charge_run
04FBEE  func  enemy_rocksteady_pincer_charge_crash
# the charge (rendered, move 88): damage 0x103, attack 7, not hittable (04FC28 "move.w #$103, ($a,A0)",
# 04FC38 "andi.b #$f5, ($0,A0)"), 30 frames, then across at 0x380 (04FC5C "move.w #$fc80, ($1a,A0)") following his
# turtle's row until a wall (04FC84 "andi.b #$10, D0")
04FC04  func  enemy_rocksteady_charge
04FC1C  func  enemy_rocksteady_charge_start
04FC4A  func  enemy_rocksteady_charge_get_ready
04FC76  func  enemy_rocksteady_charge_run
# the punch (rendered, move 8C, bare-handed): animation 059FAA, damage 0x203, attack 7
# (04FCF4 "move.w #$203, ($a,A0)")
04FCD4  func  enemy_rocksteady_punch
04FCE8  func  enemy_rocksteady_punch_start
# the gun's butt (rendered, move 90, armed): animation 059FD2, damage 0x203, attack 0 (04FD72 "move.b #$0, D7")
04FD4C  func  enemy_rocksteady_gun_butt
04FD60  func  enemy_rocksteady_gun_butt_start
# the blow's animation over: hittable, thinking (04FD3A "bset #$1, ($0,A0)", 04FD40 "move.w #$200, ($4,A0)")
04FD2C  func  enemy_rocksteady_blow_end
# a shot (move 94): level, or up at a turtle above 0x40 (04FDE2 "cmpi.b #$40, ($10,A1)"), the sound 18 and a bullet
04FD88  func  enemy_rocksteady_shoot
04FDB8  func  enemy_rocksteady_shoot_start
04FE02  func  enemy_rocksteady_shoot_fire

# ---- Rocksteady's reactions (053DEA: A0-A8 flinches, 98 knocked down, 9C defeated) ----
# a hit's animation by armed (04FE62 "lea $4fe56.l, A6"; 04FECA "lea $4febe.l, A6"; from behind
# 04FF02 "lea $4fef6.l, A6"), then 04FE7A
04FE42  func  enemy_rocksteady_flinch
04FE5E  func  enemy_rocksteady_flinch_start
04FEAA  func  enemy_rocksteady_reel
04FEC6  func  enemy_rocksteady_reel_start
04FEE2  func  enemy_rocksteady_flinch_from_behind
04FEFE  func  enemy_rocksteady_flinch_from_behind_start
# the animation over: hittable and thinking, but with no hit left to take not hittable and his close blow at once
# (04FE92 "tst.b $61237.l", 04FE9C "bclr #$1, ($0,A0)", 04FEA2 "move.b #$1, ($48,A0)")
04FE7A  func  enemy_rocksteady_flinch_end
# knocked down: the arc of 04FF52 (04FF68 "jsr $4863e.l"), lands, slides, lies 30 frames, his health again
# (050020 "jsr $485c2.l"), gets up (05002E), the hits he takes before he strikes back again
# (05004E "move.b (A6,D0.w), $61237.l")
04FF1A  func  enemy_rocksteady_knocked_down
04FF5E  func  enemy_rocksteady_knocked_down_start
04FF98  func  enemy_rocksteady_knocked_down_fall
04FFCE  func  enemy_rocksteady_knocked_down_slide
04FFFC  func  enemy_rocksteady_knocked_down_lie
050036  func  enemy_rocksteady_knocked_down_get_up
# defeated: no pincer charge (0500AE "move.b #$ff, $61243.l"), the arc, lands: one boss less, the last one clears the
# area and stops the music (05010C "subq.b #1, $61236.l", 050116 "move.b #$1, $6131d.l"), slides, blinks 120 frames
# and is gone (050198 "clr.w ($0,A0)")
050076  func  enemy_rocksteady_defeated
0500AE  func  enemy_rocksteady_defeated_start
0500F0  func  enemy_rocksteady_defeated_fall
050152  func  enemy_rocksteady_defeated_slide
050180  func  enemy_rocksteady_defeated_blink

# ======== Bebop (kind 10; rendered: the warthog with a mohawk and a gun) ========
# parameter 0: alone (area 2), drawn, his floor at 0x28 (05021C "move.b #$28, ($32,A0)"), no pincer charge
# (050222 "move.b #$ff, $61243.l"), his palette (05023E "jmp $9242.l"); else beside Rocksteady (area 4): the pincer
# charge in 360 frames (050248 "move.w #$168, $61224.l"), waiting (050262 "move.w #$106, ($4,A0)"); the parameter is
# then his weak flash's colour
0501C6  func  enemy_bebop_start
# routine 1, his way in (table 050286)
05027A  func  enemy_bebop_enter
# until the scroll reaches him (0502A6 "cmpi.l #$8c000, $63380.l"), the music faded, his health
# (0502D4 "jmp $485ae.l")
0502A6  func  enemy_bebop_enter_wait_for_scroll
0502DC  func  enemy_bebop_enter_wait
# drops onto that floor (0502F8 "addi.w #-$60, ($1e,A0)"), lands (050306 "move.b #$3e, D7")
0502F2  func  enemy_bebop_enter_drop
# jumps forward (050326 "move.w #$600, ($1e,A0)"), lands (050354 "move.b #$3f, D7"), then thinks with the boss music
# (050382 "move.w #$64, D7")
050320  func  enemy_bebop_enter_jump
050340  func  enemy_bebop_enter_in_air
05036E  func  enemy_bebop_enter_ready
# beside Rocksteady: waits for area 4's signal (050392 "tst.b $6123d.l"), walks in 32 frames
# (0503E2 "addi.l #-$100, ($16,A0)"), his health and palette
050392  func  enemy_bebop_enter_wait_for_signal
0503B2  func  enemy_bebop_enter_walk_in
# routine 2: in area 2 his two balloons (050430 "jsr $2fffe.l", 050466 "jsr $300f0.l"); another turtle every 16
# frames; beside Rocksteady, every 061224 frames the pincer charge (0504D0 "move.b #$1, $61240.l",
# 0504F0 "move.w #$84, ($28,A0)"); a punch when close (05053A "move.w #$7c, ($28,A0)"), an attack by plan (0505E2),
# else a plan (050602)
0503EC  func  enemy_bebop_think
# routine 3: his weak flash, then the bosses' attack (05061C "jmp $4f5ee.l")
050612  func  enemy_bebop_attack
# routine 4: the pincer charge called off (05062C "clr.b $61240.l"); defeated (B8), knocked down (B4), hit from behind
# (B0), else his flinch (AC)
050622  func  enemy_bebop_hit
# routine 5: his weak flash, then the bosses' reaction (050678 "jmp $4f68a.l")
05066E  func  enemy_bebop_react

# ---- Bebop's moves (053C26: 36-39) ----
# 120 frames facing his turtle in one of four animations at random (0506A8 "move.b #$78, ($22,A0)",
# 0506C2 "lea $50692.l, A6")
05067E  func  enemy_bebop_stand
0506A2  func  enemy_bebop_stand_start
0506D2  func  enemy_bebop_stand_wait
# the walks: 240 frames walking (050802 "move.b #$f0, ($22,A0)", 050812 "lea $5a430.l, A6"), aiming every 4 frames
050802  func  enemy_bebop_walk_start
# to 0x50 in front of his turtle at 0x200 (05071A "move.w #$50, D1", 050738 "move.w #$200, D1")
0506D8  func  enemy_bebop_walk_to_front
0506EC  func  enemy_bebop_walk_to_front_start
050708  func  enemy_bebop_walk_to_front_step
# level with his turtle, then toward it (050796 "cmpi.w #$4, ($2e,A0)", 0507A4 "move.w #$80, ($1a,A0)",
# 0507D0 "move.w #$100, ($1c,A0)")
050770  func  enemy_bebop_walk_level
050784  func  enemy_bebop_walk_level_step
# to 0x30 in front of his turtle at 0x180, stopping when level (050864 "move.w #$30, D1", 050882 "move.w #$180, D1")
0507EE  func  enemy_bebop_close_in
05081E  func  enemy_bebop_close_in_step

# ---- Bebop's attacks (053D2A: 1E-21) ----
# the pincer charge (move 84): to an edge, waits for Rocksteady (050988 "cmpi.b #-$40, $61242.l"), charges; meeting
# Rocksteady (050A10 "movea.l $61220.l, A6") they crash (050A4E "move.b #$1, $61247.l", 050A86 "lea $5ad12.l, A6", the
# sounds 3E and 8F), and when it ends the next one in 1800 frames and he is knocked down
# (050AC6 "move.w #$708, $61224.l", 050ACE "move.w #$b4, ($28,A0)"); at a wall alone, the next in 360 (050AAE)
0508A0  func  enemy_bebop_pincer_charge
0508F0  func  enemy_bebop_pincer_charge_start
050952  func  enemy_bebop_pincer_charge_run_to_edge
050988  func  enemy_bebop_pincer_charge_wait_for_rocksteady
0509CE  func  enemy_bebop_pincer_charge_get_ready
0509D2  func  enemy_bebop_pincer_charge_run
050AB8  func  enemy_bebop_pincer_charge_crash
# the punch (move 7C): damage 0x203, attack 7 (050AF6 "move.w #$203, ($a,A0)"), animation 05A9BE slowed by
# punch_delay; struck back (delay 1) he lunges 0x80 a frame (050B4C "move.w #$80, D0")
050ADC  func  enemy_bebop_punch
050AF0  func  enemy_bebop_punch_start
050B38  func  enemy_bebop_punch_end
# the charge (rendered, move 78): damage 0x103, attack 7, 30 frames, across at 0x380 until a wall, then the walk to
# his turtle's front (050C56 "move.w #$d8, ($28,A0)")
050B8C  func  enemy_bebop_charge
050BA4  func  enemy_bebop_charge_start
050BD2  func  enemy_bebop_charge_get_ready
050BFE  func  enemy_bebop_charge_run
# three shots 12 frames apart (050C98 "move.w #$1403, ($40,A0)", 050CCC "move.b #$c, ($40,A0)"), the sound 2 and a
# bullet of kind 64 (050CC0 "lea $50c7c.l, A5")
050C68  func  enemy_bebop_shoot
050C82  func  enemy_bebop_shoot_start
050CAE  func  enemy_bebop_shoot_fire

# ---- Bebop's reactions (053DEA: AC-B8) ----
# knocked back (rendered: 05AB38), then strikes back
050CE6  func  enemy_bebop_flinch
050CFA  func  enemy_bebop_flinch_start
# the animation over: his punch at once, plan 1, punch_delay 1 (050D12 "move.w #$300, ($4,A0)",
# 050D18 "move.w #$7c, ($28,A0)", 050D24 "move.b #$1, ($4a,A0)")
050D0A  func  enemy_bebop_strike_back
# hit from behind (rendered: 05AAF6, staggering forward), 48 frames (050D44 "move.b #$30, ($22,A0)"), then strikes
# back
050D2C  func  enemy_bebop_flinch_from_behind
050D40  func  enemy_bebop_flinch_from_behind_start
050D56  func  enemy_bebop_flinch_from_behind_end
# knocked down: the arc of 050D98, lands, slides, lies 20 frames, his health again (050E52 "jsr $485c2.l"), gets up
# and strikes back (state 4 is 050D0A)
050D78  func  enemy_bebop_knocked_down
050DA4  func  enemy_bebop_knocked_down_start
050DCC  func  enemy_bebop_knocked_down_fall
050E00  func  enemy_bebop_knocked_down_slide
050E2E  func  enemy_bebop_knocked_down_lie
# defeated: as Rocksteady's (050EDC "subq.b #1, $61236.l", 050EE6 "move.b #$1, $6131d.l"), blinks 120 frames, gone
050E66  func  enemy_bebop_defeated
050E8E  func  enemy_bebop_defeated_start
050EC0  func  enemy_bebop_defeated_fall
050F20  func  enemy_bebop_defeated_slide
050F4E  func  enemy_bebop_defeated_blink

# ======== the Mouser (kind 4E; rendered: the small round robot; it bites a turtle and hangs on) ========
# a slot like the soldiers' (050F98 "jsr $483d2.l"), one bar (050FC0 "move.w #$101, ($8,A0)"); parameter bit 7:
# thinking at once (050FCE "bclr #$7, ($3,A0)"), 1-3: its way in, 0: on the floor (050FE6 "jsr $48746.l")
050F98  func  enemy_mouser_start
# routine 1 (table 05100E): its floor from 051036 by the parameter (051056 "move.b (A6,D0.w), ($32,A0)"), the hop of
# 05102A (05108A "move.w (A6,D0.w), ($1c,A0)"), falls (0510B8 "addi.w #-$40, ($1e,A0)"), lands
# (0510CC "move.b #$39, D7"), then thinks
051002  func  enemy_mouser_enter
05103A  func  enemy_mouser_enter_start
05106E  func  enemy_mouser_enter_hop
0510B2  func  enemy_mouser_enter_fall
0510E4  func  enemy_mouser_enter_land
# routine 2: every 16 frames the slot with the fewest enemies (051122 "move.b $6120d.l, D0"); when the area's boss is
# down, it breaks down (051162 "tst.b $61313.l", 05116C "move.w #$e0, ($28,A0)"); takes a side of its turtle in the
# slot's byte 7 (0511FC "bset #$7, ($7,A1)"), approach 2 while the turtle is down (051272); bites within 0x30
# (0512A6 "move.w #$300, ($4,A0)"); else a move by approach from 0512E4 (0512CA)
0510F4  func  enemy_mouser_think
# gives its side of the slot back when it stands by its turtle (0512EA "cmpi.b #$1, ($2a,A0)";
# 0512F8 "bclr #$7, ($45,A0)", 051306 "and.b D0, ($7,A1)")
0512EA  func  enemy_mouser_leave_side
0512F4  func  enemy_mouser_give_side_back
# routine 3, the bite (table 051340): leaps (05135C "lea $58134.l, A6", 051368 "move.w #$103, ($a,A0)", the arc of
# 051350); when it hits, it is no longer drawn and hangs on (0513C4 "andi.w #$7100, ($0,A0)",
# 0513CA "move.b #$3, ($5,A0)"), gone when its turtle is not held any more (05142E "cmpi.b #$4, ($4,A6)",
# 051438 "clr.w ($0,A0)"); missing, it lands and waits 16 frames (0513EA "move.b #$10, ($22,A0)")
051314  func  enemy_mouser_bite
05135C  func  enemy_mouser_bite_start
0513A2  func  enemy_mouser_bite_fly
051404  func  enemy_mouser_bite_land
051414  func  enemy_mouser_bite_hold
# routine 4: hit; if it had bitten, the held turtle is let go (051478 "move.b #$10, ($27,A6)"); knocked flying
# (05147E "move.w #$90, ($28,A0)")
05144E  func  enemy_mouser_hit
# routine 6: a step over the floor's edge, by move from 0514C6 (0514B2 "lea $514c6.l, A6")
051492  func  enemy_mouser_step_over_edge
# chases its turtle at 0xC0, aiming every 8 frames (0517F2 "move.w #$c0, D1"), for a random time under 240 frames or
# until close (0517A0 "cmpi.w #$3e, ($2c,A0)"), then sits 120 frames (051812 "move.b #$78, ($46,A0)") and chases again
051750  func  enemy_mouser_chase
051774  func  enemy_mouser_chase_start
0517A0  func  enemy_mouser_chase_run
051812  func  enemy_mouser_chase_pause
05181C  func  enemy_mouser_chase_wait
# to 0x20 beside its turtle at 0x80 by its side (05186A "btst #$7, ($45,A0)", 051890 "move.w #$80, D1")
05182A  func  enemy_mouser_creep_to_side
05183E  func  enemy_mouser_creep_to_side_start
05185C  func  enemy_mouser_creep_to_side_step
# away from its turtle 32 frames (0518DE "move.b #$20, ($46,A0)", 0518EC "addi.b #-$80, D0"), sits, waits while it is
# down
0518B0  func  enemy_mouser_back_off
0518D4  func  enemy_mouser_back_off_start
05190E  func  enemy_mouser_back_off_run
05194C  func  enemy_mouser_back_off_wait
# one of two sitting animations at random (051930 "move.w #$2, D7", 05193C "lea $518cc.l, A6")
05192C  func  enemy_mouser_sit
# thrown off by the turtle it held (turtle_held_throw_off_struggle 01D1C4 "move.w #$94, ($28,A6)"), the way +30 says
# (05198C "btst #$7, ($30,A0)")
051968  func  enemy_mouser_thrown_off
051980  func  enemy_mouser_thrown_off_start
# the boss down: hops off (0519E4 "lea $519d8.l, A6") and breaks
0519C0  func  enemy_mouser_break_down
0519E4  func  enemy_mouser_break_down_start
# knocked flying by a hit (051A2C "jsr $512ea.l", 051A48 "lea $51a20.l, A6")
051A08  func  enemy_mouser_knocked_flying
051A2C  func  enemy_mouser_knocked_flying_start
# the three: flies until it lands (051A84 "jsr $4861a.l"), the sound F and its wreck (051AA2 "lea $581d0.l, A6"); gone
# when the animation ends (051AB8 "clr.w ($0,A0)", 051ABC "subq.b #1, ($4,A1)")
051A6C  func  enemy_mouser_fly_and_crash
051AB0  func  enemy_mouser_remove

# ======== the Roadkill Rodney (kind 53; rendered: a round robot with a whip arm; it rushes and brakes) ========
# one bar of 0x0C (051C70 "move.w #$10c, ($8,A0)"); parameter bit 7 (all of the spawn lists' are 80): its way in, 180
# frames at most (051C8E "move.b #$b4, ($46,A0)")
051C44  func  enemy_rodney_start
# routine 1 (table 051CB8): until on screen (051CC8 "cmpi.w #$140, ($c,A0)"), the sound 2E and the floor breaking
# (051CEE "lea $58960.l, A6", rendered: cracks, then it comes up), out with a jump (051D12 "move.w #$400, ($1e,A0)"),
# falls to the floor, lands, thinks
051CAC  func  enemy_rodney_enter
051CC8  func  enemy_rodney_enter_wait
051CFC  func  enemy_rodney_enter_burst_out
051D36  func  enemy_rodney_enter_fall
051D72  func  enemy_rodney_enter_land
# routine 2: the slot with the fewest enemies every 16 frames; gone when the area is cleared (051DEE "tst.b $6131d.l")
# or with flags bit 5 (051DF8 "btst #$5, ($0,A0)"); takes a side of its turtle in the slot's byte 6
# (051E64 "bset #$7, ($6,A1)"); an attack of 051F94 by the distance and chance (051F26 "lea $51f94.l, A6"); else a
# move by approach from 051F9C (051F6A)
051D80  func  enemy_rodney_think
# routine 4: the sound 5; knocked back while it has health (051FAA "move.w #$40, D0"), destroyed when not
# (051FB6 "move.w #$74, D0")
051FA0  func  enemy_rodney_hit
# gives its side of the slot (byte 6) back (051FCC "cmpi.b #$1, ($2a,A0)", 051FE8 "and.b D0, ($6,A1)")
051FCC  func  enemy_rodney_leave_side
051FD6  func  enemy_rodney_give_side_back
# rushes at 0x300 to 0x20 above or below its turtle or straight across (052052 "move.w #$300, D1"), 180 frames, past
# it, then brakes (0520D8 "move.w #$20, ($48,A0)", 0520EC "move.w #$ffc0, ($1c,A0)")
051FF6  func  enemy_rodney_rush
05200E  func  enemy_rodney_rush_start
05207A  func  enemy_rodney_rush_run
# the brake: brake added to the x speed until the animation ends, then thinking (052116 "move.w ($48,A0), D0",
# 052126 "move.w #$200, ($4,A0)")
052116  func  enemy_rodney_brake
# by its turtle's side: rushes across at 0x300 (052152 "move.w #$fd00, ($1a,A0)"), past it brakes toward its row
# (0521FA "move.w ($2e,A0), D0", 052200 "move.w D0, ($1c,A0)")
052136  func  enemy_rodney_rush_across
05214E  func  enemy_rodney_rush_across_start
052188  func  enemy_rodney_rush_across_run
# its turtle's sides taken: slides back (052244 "move.b #$8c, D7", 052258 "move.w #$200, ($1a,A0)"), turns, waits
# while the turtle is down (0522F2 "cmpi.b #$4, ($4,A6)")
052228  func  enemy_rodney_back_off
052244  func  enemy_rodney_back_off_start
0522CC  func  enemy_rodney_back_off_turn
0522F0  func  enemy_rodney_back_off_wait
# the slide slowed to a stop (052286 "move.w ($48,A0), D0" + 05228A "add.w D0, ($1a,A0)"), then "Do not resist us"
# once a game (052296 "tst.b $61244.l", 0522AC "jsr $30024.l")
052286  func  enemy_rodney_slide_to_stop
# the laser (move B8): slides back, turns (05239A "lea $587fa.l, A6"), three bolts 4 frames apart of kind 58
# (0523CE "move.b #$4, ($46,A0)", 0523D4 "lea $5232a.l, A5") the way it faces (0523EA "move.b D0, ($3,A6)")
052306  func  enemy_rodney_shoot
052330  func  enemy_rodney_shoot_start
052378  func  enemy_rodney_shoot_turn
0523A8  func  enemy_rodney_shoot_ready
0523C6  func  enemy_rodney_shoot_fire
05240E  func  enemy_rodney_shoot_end
# the whip (move BC, rendered: the arm thrown out, then a lash): following its turtle's row all along (052510), slides
# back, winds up (0524BA "move.b #$2a, D7", 0524C4 "lea $588bc.l, A6"), throws its arm, kind 5D
# (0524EA "lea $5244a.l, A5"); when the arm hits, the lash (05257C "move.b #$5, ($5,A0)", 052582 "lea $59150.l, A6"),
# else the arm reaches on up to 0xD (052598 "addq.b #1, ($46,A0)"), then is drawn back
052422  func  enemy_rodney_whip
052484  func  enemy_rodney_whip_start
05248C  func  enemy_rodney_whip_slow_down
052494  func  enemy_rodney_whip_wind_up
0524D2  func  enemy_rodney_whip_throw_arm
052530  func  enemy_rodney_whip_reach
0525D0  func  enemy_rodney_whip_lash
# the arm drawn in: its pose by arm_length (0525AA "bset #$6, ($4a,A0)", 0525B8 "lea $52450.l, A6"), then arm_length
# counted down to the thinking (0525E6 "subq.b #1, ($46,A0)", 0525EE "bset #$7, ($4a,A0)")
0525AA  func  enemy_rodney_whip_pull_in
0525E6  func  enemy_rodney_whip_retract
# toward its turtle's row at 0x200 (052510 "move.w #$200, D1", 05252A "add.l D1, ($16,A0)")
052510  func  enemy_rodney_follow_row
# knocked back (react 40): faces, the arc of 0526C0, lands, thinks hittable (05269C "bset #$1, ($0,A0)")
052600  func  enemy_rodney_knocked_back
052624  func  enemy_rodney_knocked_back_start
05265C  func  enemy_rodney_knocked_back_fall
05268A  func  enemy_rodney_knocked_back_end
# destroyed (react 74): the arc, lands with the sound F (052720 "move.b #$f, D7"), its wreck, gone
# (05275E "clr.w ($0,A0)")
0526A4  func  enemy_rodney_destroyed
0526CC  func  enemy_rodney_destroyed_start
052704  func  enemy_rodney_destroyed_fall
05273C  func  enemy_rodney_destroyed_land
052756  func  enemy_rodney_destroyed_end

# ======== Shredder (kind 0F, area 9; rendered: armour, cape and a sword) ========
# His health_bars FF (054786's first byte) marks him (tst.b ($8,A0) bmi), his clones (parameter bit 7: 052D5A's kind
# word is 0F80) have one bar (0547B6) the timers by the players (0527C6 from 052A60, 0527D2 from 052ADE, 0527E0 from
# 052B3A), routine 1; himself: the clones' count cleared and his appearing (05281C "move.w #$ec, ($28,A0)"); a clone:
# drawn and its appearing (05282A "move.w #$a8, ($28,A0)")
052790  func  enemy_shredder_start
# routine 1: the move without thinking (052830 "lea $53c26.l, A6")
052830  func  enemy_shredder_enter
# routine 2: another slot every 16 frames; himself makes clones while the enemies are no more than the turtles
# (0528E2 "cmp.b $6120c.l, D0", 05290A "move.w #$f0, ($28,A0)"); when he is beaten the clones vanish
# (052920 "tst.b $6123a.l", 052936 "move.w #$dc, ($28,A0)"); a side of his turtle (slot byte 5), approach 2 when it
# attacks him face to face, 3 when it is down; a blow by the distance when attack_wait runs out
# (052A9C "lea $52ace.l, A6"); the ray when ray_wait runs out (052B18 "move.w #$b0, ($28,A0)"); else a move by
# approach from 052B7C
052840  func  enemy_shredder_think
# routine 3: ray_wait kept from 0 (052B84 "subq.w #1, ($46,A0)"), then the attack by move (052BB8 "lea $53d2a.l, A6")
052B84  func  enemy_shredder_attack
# routine 4: the sound 92; a hit during the ray's first states fires it again at once (052BE2 "cmpi.b #$4, ($41,A0)");
# no health: vanish (clone) or defeated (052C02, 052C0C); a bar gone (052C1E "move.w #$cc, ($28,A0)"); in the air the
# hit is shrugged off (052C3C "move.b #$2, ($4,A0)", 052C42 "rts"); else flinch from the front or behind (052C54,
# 052C5E)
052BC8  func  enemy_shredder_hit
# routine 5: the reaction by move (052C8A "lea $53dea.l, A6")
052C68  func  enemy_shredder_react

# ---- Shredder's moves (053C26: 2A, 3B-40) ----
# his appearing (move EC): when he is the only enemy left (052CAE "cmpi.b #$1, $6120c.l"), drawn with the sound 16 out
# of the screen (052CCE "lea $5ad40.l, A6", rendered: the monitor), his music 6A and the speech A7, steps out 32
# frames, hittable, his health (052D34 "lea $54786.l, A6")
052C96  func  enemy_shredder_appear
052CAE  func  enemy_shredder_appear_wait
052CDC  func  enemy_shredder_appear_step_out
052D20  func  enemy_shredder_appear_walk_in
# a clone (move F0): not hittable, a clone of kind 0F parameter 80 (052D96 "lea $52d5a.l, A5", 052D9C "jsr $47c30.l")
# with his bars, the sound 3D, he blinks 32 frames (052DB2 "bchg #$7, ($0,A0)")
052D46  func  enemy_shredder_split
052D62  func  enemy_shredder_split_start
052DB2  func  enemy_shredder_split_blink
# a clone's appearing (move A8): blinks 32 frames moving back (052E0C "move.w #$ff00, ($1a,A0)"), its health
# (052E34 "lea $547a6.l, A6"), thinks
052DD0  func  enemy_shredder_clone_appear
052DE4  func  enemy_shredder_clone_appear_start
052E1A  func  enemy_shredder_clone_appear_blink
# to his turtle's side at 0x180 (052EE6 "move.w #$180, ($1c,A0)"), sometimes crouching (052F20 "move.b $600a4.l, D0",
# 052F32 "lea $5b9b2.l, A6"), keeping level: enemy_walk_to_side with his own animations (052E74, 052E7C)
052E54  func  enemy_shredder_walk_to_side
052E84  func  enemy_shredder_walk_to_side_start
052EAE  func  enemy_shredder_walk_to_side_step
052F20  func  enemy_shredder_walk_to_side_crouch
052F52  func  enemy_shredder_walk_to_side_turn
052F80  func  enemy_shredder_walk_to_side_hold
# to his turtle at 0x180, aiming every 8 frames (053040 "move.w #$180, D1", 053052 "move.b #$8, ($22,A0)")
052FD8  func  enemy_shredder_walk_to_target
052FEC  func  enemy_shredder_walk_to_target_start
053016  func  enemy_shredder_walk_to_target_step
# guards when his turtle attacks him (approach 2): not hittable 30 frames (05309E "andi.b #$f1, ($0,A0)",
# 0530A4 "move.b #$1e, ($22,A0)"), then a blow by the distance (0530BC "lea $52ace.l, A6",
# 0530DC "move.w #$300, ($4,A0)")
053070  func  enemy_shredder_guard
053084  func  enemy_shredder_guard_start
0530B0  func  enemy_shredder_guard_counter
# away from his turtle 40 frames (053108 "move.b #$28, ($48,A0)", 053130 "addi.b #-$80, D0"), waits while it is down
0530EA  func  enemy_shredder_back_off
053102  func  enemy_shredder_back_off_start
05314C  func  enemy_shredder_back_off_walk
053198  func  enemy_shredder_back_off_wait

# ---- Shredder's attacks (053D2A: 28-2C) ----
# the blows (rendered): a kick (damage 0x301, attack 2: 0534F2 "move.w #$301, ($a,A0)"), a thrust
# (053552 "move.w #$301, ($a,A0)", 053546 "lea $5bb54.l, A6"), a slash that knocks down
# (05359C "move.w #$103, ($a,A0)"), a low sweep (0535E6 "move.w #$203, ($a,A0)"), each by the distance (052ACE);
# 05350E ends them (05351C "jmp $485f6.l")
0534C4  func  enemy_shredder_kick
0534D8  func  enemy_shredder_kick_start
053524  func  enemy_shredder_thrust
053538  func  enemy_shredder_thrust_start
05356E  func  enemy_shredder_slash
053582  func  enemy_shredder_slash_start
0535B8  func  enemy_shredder_sweep
0535CC  func  enemy_shredder_sweep_start
05350E  func  enemy_shredder_blow_end
# the ray (move B0): lines up with his turtle at 0x280 (053664 "move.w #$280, ($1c,A0)") for 240 frames at most,
# charges (0536DC "lea $5bf8a.l, A6"), fires a ray of kind 6D that keeps him (053708 "lea $53622.l, A5",
# 053714 "move.l A0, ($24,A6)", the sound 1C), 60 frames (053722 "move.b #$3c, ($48,A0)")
053602  func  enemy_shredder_ray
053628  func  enemy_shredder_ray_start
053644  func  enemy_shredder_ray_line_up
0536CA  func  enemy_shredder_ray_charge
0536EA  func  enemy_shredder_ray_fire
05373A  func  enemy_shredder_ray_end

# ---- Shredder's reactions (053DEA: CC-DC) ----
# his colour flashing 0B and FF every other 2 frames (05322E "btst #$1, $600a5.l", 05323C "move.b D0, ($42,A0)")
05322C  func  enemy_shredder_flash
# a bar gone (move CC): flashes, a piece of him flies off after 12 frames (0531D2 "move.b #$c, ($48,A0)",
# 05321E "lea $531c2.l, A5": kind 6C), his health again (0531F6 "lea $54796.l, A6"), thinks hittable
# (053210 "jmp $48608.l")
0531AE  func  enemy_shredder_lose_bar
0531C8  func  enemy_shredder_lose_bar_start
0531E4  func  enemy_shredder_lose_bar_end
# hit from the front (D0) or behind (D4): every third hit knocks him back at 0x200 for 16 frames
# (053264 "subq.b #1, ($24,A0)", 05327C "move.w #$200, ($1a,A0)"), flashes, thinks hittable
053242  func  enemy_shredder_flinch
053256  func  enemy_shredder_flinch_start
0532D4  func  enemy_shredder_flinch_from_behind
0532E8  func  enemy_shredder_flinch_from_behind_start
0532AA  func  enemy_shredder_flinch_end
# beaten (move D8, himself): the arc of 05335C, lands, the music stopped and the sound 81 (0533F4 "move.w #$0, D7",
# 053404 "move.b #$81, D7"), the clones told to vanish (053418 "move.b #$ff, $6123a.l"), 120 frames, one enemy less,
# and he stays
05333C  func  enemy_shredder_defeated
053368  func  enemy_shredder_defeated_start
053398  func  enemy_shredder_defeated_fall
0533D2  func  enemy_shredder_defeated_land
053422  func  enemy_shredder_defeated_wait
05343E  func  enemy_shredder_defeated_stay
# a clone beaten or told to vanish (move DC): leaves its side (05345E "jsr $486cc.l"), its animation, blinks 120
# frames, gone (0534AE "clr.w ($0,A0)")
053440  func  enemy_shredder_vanish
053458  func  enemy_shredder_vanish_start
053482  func  enemy_shredder_vanish_wait
053496  func  enemy_shredder_vanish_blink

# ======== comments (one line each, in the game's terms) ========
comment say_youre_dead_shell_brain the balloon and speech "You're dead, shell-brain", counted among the lines said
comment say_turtle_soup the balloon and speech "Tonight I dine on turtle soup"
comment say_im_invincible the balloon and speech "I'm invincible!"
comment say_crash_the_turtles the balloon and speech "Crash the turtles!"
comment say_do_not_resist_us the balloon and speech "Do not resist us"
comment say_help_me the balloon and speech "Help meeee...!"
comment say_attack the balloon and speech "Attaaaack!"
comment say_pizza_time the balloon and speech "Pizza time!" above the speaker's height
comment say_shell_shock the balloon and speech "Shell Shock" above the speaker's height
comment say_yippee_i_ay the balloon and speech "Yippee-I-Ay!"
comment say_your_prayers_toitles the wide balloon and speech "Say your prayers, toitles"
comment say_they_aint_getting_prettier the wide balloon and speech "They ain't getting any prettier!"
comment say_watch_your_mouth the wide balloon and speech "Watch your mouth, slime ball!"
comment say_overgrown_cork_screw the wide balloon and speech "Oh no, it's that overgrown cork-screw again"
comment draw_wide_balloon_pointer the wide balloon's pointer drawn into its bottom row
comment enemy_knife_soldier_start a Foot soldier with knives: its definition, colour, bars and first move by its parameter
comment enemy_spear_soldier_start a Foot soldier with a spear, and the hits it lands before it throws the spear
comment enemy_axe_soldier_start a Foot soldier with throwing axes
comment enemy_gun_soldier_start a Foot soldier with a gun
comment enemy_boomerang_soldier_start a bare-handed Foot soldier that also throws a boomerang
comment enemy_shuriken_soldier_start a bare-handed Foot soldier that also throws shuriken
comment enemy_skateboard_soldier_start a gun, axe or knife soldier on a rocket skateboard, by its parameter
comment enemy_skateboard_think the thinking, carried along with the ride, standing on the board
comment enemy_skateboard_attack the attack, carried along with the ride
comment enemy_skateboard_hit the hit, carried along with the ride
comment enemy_skateboard_react the reaction to a hit, carried along with the ride
comment enemy_skateboard_stand its standing pose, then the board with its flickering flame under it
comment enemy_walk_to_target_spear walks to its turtle with the spear
comment enemy_walk_to_side_spear walks to its side of its turtle with the spear
comment enemy_walk_off_line_spear keeps off its turtle's line, crossing the screen
comment enemy_back_off_spear walks away, crouches and waits while its turtle is down
comment enemy_step_aside_spear steps up or down out of the way of its turtle's attack
comment enemy_spear_thrust thrusts the spear; enough hits and it throws it next
comment enemy_spear_throw throws its spear and fights on bare-handed
comment enemy_walk_to_target_knife walks to its turtle with the knife
comment enemy_walk_to_side_knife walks to its side of its turtle with the knife
comment enemy_circle_knife runs round its turtle with the knife
comment enemy_keep_distance_knife keeps its distance from its turtle with the knife
comment enemy_back_off_knife walks away, turns and waits while its turtle is down
comment enemy_step_aside_knife steps up or down out of the way of its turtle's attack
comment enemy_knife_stab stabs with the knife
comment enemy_high_kick_knife a high kick
comment enemy_jump_kick_knife a flying kick
comment enemy_throw_knife throws a knife
comment enemy_walk_to_target_gun walks to its turtle with the gun
comment enemy_walk_to_side_gun walks to its side of its turtle with the gun
comment enemy_walk_to_range_gun walks to its turtle's row at shooting distance and stands there
comment enemy_walk_to_range_step walks to its turtle's row at 0x5A across, then stands in its ready pose
comment enemy_walk_to_range_hold stands ready while level with its turtle, walks again when off its row
comment enemy_back_off_gun walks away, crouches and waits while its turtle is down
comment enemy_run_away_gun runs straight away from its turtle for a moment
comment enemy_gun_swing swings the gun like a club
comment enemy_shoot_gun fires four shots
comment enemy_walk_to_target_axe walks to its turtle with the axes
comment enemy_walk_to_side_axe walks to its side of its turtle with the axes
comment enemy_walk_to_range_axe walks to its turtle's row at throwing distance and stands there
comment enemy_back_off_axe walks away, crouches and waits while its turtle is down
comment enemy_run_away_axe runs straight away from its turtle for a moment
comment enemy_throw_axes throws three axes
comment enemy_high_kick_axe a high kick
comment enemy_throw_shuriken throws a shuriken
comment enemy_boomerang_throw throws a boomerang and waits for it to come back
comment enemy_flinch_back_spear hit: its head thrown back
comment enemy_flinch_bent_spear hit: bent over
comment enemy_flinch_reel_spear hit: reeling
comment enemy_flinch_hunched_spear hit: hunched
comment enemy_rocksteady_start Rocksteady comes in alone or beside Bebop, counted as a boss
comment enemy_rocksteady_enter his way in: a laugh and his taunt, or waiting for Bebop, then walking in
comment enemy_rocksteady_think his thinking: the gun drawn or put away in turns, blows close by, shots from afar, the pincer charge with Bebop
comment enemy_rocksteady_pick_attack picks his attack by whether he has the gun out
comment enemy_rocksteady_attack his attack, flashing when weak
comment enemy_rocksteady_hit hit: his reaction by what is left of his health and where the hit came from
comment enemy_rocksteady_react his reaction to a hit, flashing when weak
comment enemy_boss_attack_move Rocksteady's and Bebop's attack by their move
comment enemy_boss_react_move Rocksteady's and Bebop's reaction by their move
comment enemy_boss_face_target looks at its turtle and turns to it
comment enemy_pincer_charge_take_edge takes a free edge of the screen for the pincer charge and runs to it
comment enemy_rocksteady_raise_fist raises his fist at his turtle
comment enemy_rocksteady_laugh laughs at his turtle
comment enemy_rocksteady_shake_fist shakes his fist at his turtle
comment enemy_rocksteady_hold_pose holds the pose until his move's time runs out
comment enemy_rocksteady_pose_end the move is over when its animation ends
comment enemy_rocksteady_draw_gun draws his gun
comment enemy_rocksteady_put_gun_away puts his gun away
comment enemy_rocksteady_circle walks round his turtle
comment enemy_rocksteady_line_up lines up with his turtle with the gun up
comment enemy_rocksteady_close_in walks up to his turtle with the gun level
comment enemy_rocksteady_shoot_around fires three shots each way round
comment enemy_rocksteady_pincer_charge charges across from his edge while Bebop charges from the other
comment enemy_rocksteady_charge charges across the screen
comment enemy_rocksteady_punch punches
comment enemy_rocksteady_gun_butt hits with the gun's butt
comment enemy_rocksteady_blow_end the blow over, back to thinking
comment enemy_rocksteady_shoot shoots, up at a turtle in the air
comment enemy_rocksteady_flinch hit from the front
comment enemy_rocksteady_reel hit from the front, the other way
comment enemy_rocksteady_flinch_from_behind hit from behind
comment enemy_rocksteady_flinch_end back to thinking, or striking back at once when he has taken enough hits
comment enemy_rocksteady_knocked_down knocked down, lies, gets up with his health back
comment enemy_rocksteady_defeated defeated: falls, the last boss clears the area, blinks and is gone
comment enemy_bebop_start Bebop comes in alone or beside Rocksteady, counted as a boss
comment enemy_bebop_enter his way in: drops in, then jumps forward to the ground, or waits for Rocksteady and walks in
comment enemy_bebop_think his thinking: his two taunts, the pincer charge with Rocksteady, a punch when close, an attack or a move by plan
comment enemy_bebop_attack his attack, flashing when weak
comment enemy_bebop_hit hit: his reaction by what is left of his health and where the hit came from
comment enemy_bebop_react his reaction to a hit, flashing when weak
comment enemy_bebop_stand stands facing his turtle
comment enemy_bebop_walk_start starts one of his walks
comment enemy_bebop_walk_to_front walks to his turtle's front
comment enemy_bebop_walk_level walks level with his turtle, then to it
comment enemy_bebop_close_in walks up close to his turtle
comment enemy_bebop_pincer_charge charges across from his edge while Rocksteady charges from the other, crashing into him
comment enemy_bebop_punch punches, lunging when he strikes back
comment enemy_bebop_charge charges across the screen
comment enemy_bebop_shoot fires three shots
comment enemy_bebop_flinch hit from the front, then strikes back
comment enemy_bebop_strike_back punches at once after a hit
comment enemy_bebop_flinch_from_behind hit from behind, then strikes back
comment enemy_bebop_knocked_down knocked down, lies, gets up with his health back and strikes back
comment enemy_bebop_defeated defeated: falls, the last boss clears the area, blinks and is gone
comment enemy_mouser_start a Mouser: one bar, thinking at once, hopping in or on the floor by its parameter
comment enemy_mouser_enter hops in from its parameter's height onto the floor
comment enemy_mouser_think goes after the turtle with the fewest enemies and bites it; breaks down when the boss is beaten
comment enemy_mouser_leave_side gives its side of its turtle back when it stands by it
comment enemy_mouser_give_side_back gives its side of its turtle back
comment enemy_mouser_bite leaps at its turtle and hangs on to it, gone when the turtle is free
comment enemy_mouser_hit hit: lets go of the turtle it held and is knocked flying
comment enemy_mouser_step_over_edge a step over the floor's edge
comment enemy_mouser_chase chases its turtle, sitting now and then
comment enemy_mouser_creep_to_side creeps to its side of its turtle
comment enemy_mouser_back_off runs away, sits and waits while its turtle is down
comment enemy_mouser_sit sits in one of two poses
comment enemy_mouser_thrown_off thrown off by the turtle it held
comment enemy_mouser_break_down hops away and breaks when the boss is beaten
comment enemy_mouser_knocked_flying knocked flying by a hit
comment enemy_mouser_fly_and_crash flies until it hits the floor and breaks
comment enemy_mouser_remove gone when its wreck's animation ends
comment enemy_rodney_start a Roadkill Rodney: one bar, coming up through the floor
comment enemy_rodney_enter comes up through the floor with a jump and lands
comment enemy_rodney_think goes after the turtle with the fewest enemies: rushes at it, whips or shoots it; gone when the area is cleared
comment enemy_rodney_hit hit: knocked back, or destroyed with no health left
comment enemy_rodney_leave_side gives its side of its turtle back when it stands by it
comment enemy_rodney_give_side_back gives its side of its turtle back
comment enemy_rodney_rush rushes at and past its turtle, then brakes
comment enemy_rodney_brake brakes to a stop, then thinks
comment enemy_rodney_rush_across rushes across past its turtle, then brakes toward its row
comment enemy_rodney_back_off slides back and waits while its turtle is down
comment enemy_rodney_slide_to_stop slows its slide to a stop, saying "Do not resist us" once
comment enemy_rodney_shoot slides back, turns and fires three laser bolts
comment enemy_rodney_whip throws its whip arm at its turtle and lashes it with it
comment enemy_rodney_follow_row keeps toward its turtle's row
comment enemy_rodney_knocked_back knocked back by a hit
comment enemy_rodney_destroyed destroyed: falls, lands as a wreck, gone
comment enemy_shredder_start Shredder or one of his clones, by the parameter
comment enemy_shredder_enter his first move, without thinking
comment enemy_shredder_think his thinking: clones, guards, blows by the distance and his ray
comment enemy_shredder_attack his attack, keeping his ray's time
comment enemy_shredder_hit hit: shrugged off in the air, else his reaction by his health
comment enemy_shredder_react his reaction to a hit
comment enemy_shredder_appear comes out of the screen when he is the last enemy, with his music
comment enemy_shredder_split makes a clone of himself, blinking
comment enemy_shredder_clone_appear a clone comes in blinking
comment enemy_shredder_walk_to_side walks to his side of his turtle
comment enemy_shredder_walk_to_target walks to his turtle
comment enemy_shredder_guard guards against his turtle's attack, then strikes back
comment enemy_shredder_back_off walks away and waits while his turtle is down
comment enemy_shredder_kick kicks
comment enemy_shredder_thrust thrusts the sword
comment enemy_shredder_slash slashes with the sword, knocking down
comment enemy_shredder_sweep sweeps low with the sword
comment enemy_shredder_blow_end the blow over, back to thinking
comment enemy_shredder_ray lines up with his turtle and fires his ray
comment enemy_shredder_flash his colour flashing while hit
comment enemy_shredder_lose_bar a bar gone: a piece of him flies off, his health back
comment enemy_shredder_flinch hit from the front, knocked back every third hit
comment enemy_shredder_flinch_from_behind hit from behind, knocked back every third hit
comment enemy_shredder_defeated beaten: falls, the music stops, his clones vanish
comment enemy_shredder_vanish a clone beaten or told to vanish blinks and is gone


# ======== the objects that are not enemies (proposal: kinds3) ========
# The kinds of the kind table (053896) whose objects are thrown or fired things, scenery, and the places Foot
# soldiers come out of; their routines (the table each kind's entry points at) are in objects/states.c. What each
# kind is comes from its code and from its animations, rendered from the addresses its set_animation calls take.
# Fields: only what a kind's own code uses that the common object fields do not name.
# "Gone off the screen" below is flags bit 5, which the objects' screen places set when an object is out of the
# bounds its kind has in spawn_offsets (047916 "bset #$5, ($0,A0)", after 0478DA "lea $53a5e.l, A4"); "struck" is
# routine 4, which the attack check sets on an object a turtle's attack hits (0472CE "move.w #$400, ($4,A1)").
#
# kind 04 knife: a Foot soldier's thrown knife (04E548 "lea $4e50a.l, A5": the record's kind is 04)
# kind 06 spear: the spear a Foot soldier throws after its thrusts (04E388 "lea $4e34e.l, A5": kind 06)
# kind 08 axe: a Foot soldier's thrown axe, spinning (04EC32 "lea $4ebee.l, A5": kind 08)
# kind 0A gun_shot: a Foot soldier's gun shot, which drops to the ground as it flies (04ED32 "lea $4ecee.l, A5")
# kind 0C boomerang: a Foot soldier's boomerang, which flies out and back (04F162 "lea $4f104.l, A5")
# kind 0E shuriken: a Foot soldier's thrown shuriken (04F0D6 "lea $4f08e.l, A5")
# kind 12 kicked_door: a door in area 0 a Foot soldier kicks down; the object becomes that soldier (spawn lists)
# kind 13 elevator: an elevator in area 0 whose doors open to let out one or two Foot soldiers (spawn lists)
# kind 14 manhole_soldier: a Foot soldier of area 2 that comes up out of a manhole and throws its cover (spawn lists)
# kind 15 window_soldier_drop: a Foot soldier that jumps out through a window of areas 2 and 7, breaking its glass
# kind 16 window_soldier_dive: a Foot soldier that dives out through a window of area 2, breaking its glass
# kind 17 sewer_ripple: a ripple on the sewer's water (area 3) a Foot soldier leaps out of in a splash
# kind 18 bomber: a Foot soldier (areas 0, 2, 7) that leans out from cover, throws dynamite, then walks in
# kind 19 rolling (manhole cover): the manhole cover kind 14 throws, rolling (04CAAA "lea $4c9b6.l, A5")
# kind 1A door_piece: a piece of the door kind 12 breaks, flying off (04C52C "lea $4c4c6.l, A5": four of them)
# kind 1B double_door: two doors of area 4 that swing open to let out two Foot soldiers (spawn lists)
# kind 1C boss_shutter: the roll-up door of area 4 that opens for Bebop and Rocksteady (spawn lists; 04A7C4 their
#   signal)
# kind 1F glass_shards: the shards of a window kinds 15 and 16 break (04CC58 "lea $4cbac.l, A5", 04CDEC)
# kind 3B foot_car: the hit box of the car full of Foot soldiers that drives across area 5; the car itself is the
#   picture draw_screen_picture puts in layer A (stage 5's layers: 01ECEC's sixth entry is 01F7EC), and the object
#   is never drawn: it starts in use only (04A91C "move.w #$100, ($0,A6)") and its start sets only bit 2 (04A99C
#   "bset #$2, ($0,A0)")
# kind 3C scenery (lamp): a floor lamp; no spawn list, record or code starts kind 3C, and no scenario runs it
# kind 3D scenery (chair): a toppled chair; no spawn list, record or code starts kind 3D, and no scenario runs it
# kind 3E scenery (fire): flames on the floor of area 0, three sizes by the parameter (spawn lists)
# kind 3F scenery (open manhole): the hole kind 14 leaves (04CA5A "lea $4c9be.l, A5"); a turtle that steps on it
#   falls in: its attack 0C is turtle_hit's reaction 12 (the table at 01C272), which takes a bar (01CDCE "subq.b #1,
#   ($8,A0)") and puts the turtle where the hole is (01CDF4 "move.l D0, ($12,A0)")
# kind 45 technodrome_door: a door of area 8 that opens and lets out Foot soldiers one after another (spawn lists)
# kind 47 falling_debris: a burning piece that falls from the ceiling of area 0 and burns on the floor (spawn lists)
# kind 4F mouser_hole: a wall of areas 3 and 7 that breaks and lets out Mousers (kind 4E) one after another
# kind 58 laser_bolt: a Roadkill Rodney's laser bolt (0523D4 "lea $5232a.l, A5": kind 58)
# kind 5D whip_arm: a Roadkill Rodney's whip arm, which can catch a turtle and drag it (0524EA "lea $5244a.l, A5")
# kind 5F rocksteady_bullet: Rocksteady's bullet, level or up at a turtle in the air (records 04FD9C, 04FDA2)
# kind 64 bebop_shot: Bebop's ring-shaped shot (050CC0 "lea $50c7c.l, A5": kind 64)
# kind 6A tire_soldier: a Foot soldier of area 5 that comes up out of a tire and throws it (spawn lists)
# kind 6B rolling (tire): the tire kind 6A throws, rolling (04C976 "lea $4c894.l, A5")
# kind 6C shredder_piece: a piece of Shredder that flies off and bounces when he loses a bar (05321E "lea
#   $531c2.l, A5")
# kind 6D shredder_ray: Shredder's ray (053708 "lea $53622.l, A5")
# kind 6F rocket: the rocket the Foot soldiers of area 5 (kind 56) carry and throw, which explodes where it lands
#   (04D606 "lea $4d558.l, A5", 04D60C "jsr $47c5a.l")
# kind 70 dynamite: the stick of dynamite kind 18 throws, which bounces and explodes (04D4D8 "lea $4d466.l, A5")
# kind 71 motorbike: a Foot soldier on a motorbike of area 5; hit, the soldier falls off and the bike rides on

# ---- the families' fields ----

# the sound a turtle it hits makes: a move's number times 4 like an enemy's move, which turtle_hit reads off the
# object that hit it (01C2DE "move.w ($28,A6), D0", 01C2E4 "lea $1d556.l, A6"); these objects set their own:
# 04A98A "move.w #$d4, ($28,A0)"
scoped object foot_car 28 hit_sound u16
# 04A830 "move.w #$dc, ($28,A0)" (the same as foot_car's hit_sound)
scoped object scenery_open_manhole 28 hit_sound u16
# 04AA98 "move.w #$70, ($28,A0)" (the same as foot_car's hit_sound)
scoped object falling_debris 28 hit_sound u16
# 04AB70 "move.w #$44, ($28,A0)" (the same as foot_car's hit_sound)
scoped object motorbike 28 hit_sound u16
# 04BA6E "move.w #$44, ($28,A0)", 04C132 "move.w #$44, ($28,A0)" (the same as foot_car's hit_sound)
scoped object rolling 28 hit_sound u16
# 04C27C "move.w #$70, ($28,A0)" (the same as foot_car's hit_sound)
scoped object rocket 28 hit_sound u16
# 04C348 "move.w #$70, ($28,A0)" (the same as foot_car's hit_sound)
scoped object dynamite 28 hit_sound u16

# the Foot soldier that threw it (04F172 "move.l A0, ($20,A6)" after 04F168 "jsr $47c5a.l"): while the soldier
# reacts to a hit the boomerang flies on and does not come back (04BE7C "movea.l ($20,A0), A6", 04BE80 "cmpi.b #$5,
# ($4,A6)")
scoped object boomerang 20 thrower u32 object
# frames it flies out and then back: 32 out (04BE44 "move.b #$20, ($46,A0)"), then it turns round (04BE5A "subq.b #1,
# ($46,A0)", 04BE62 "neg.w ($1a,A0)") and flies 32 more before it is gone (04BEA8 "subq.b #1, ($46,A0)", 04BEB0
# "clr.w ($0,A0)")
scoped object boomerang 46 flight_time u8

# the Roadkill Rodney whose arm it is (0524FE "move.l A0, ($24,A6)" after 0524F0 "jsr $47c5a.l"): the arm goes by
# his arm_flags and arm_length (04B828 "movea.l ($24,A0), A1", 04B82C "btst #$7, ($4a,A1)", 04B97E "move.b ($46,A1),
# D0"); typed with the enemies' proposal's family enemy_rodney_whip
scoped object whip_arm 24 rodney u32 object.enemy_rodney_whip

# the animation of its burst, from the table by its aim (04C048 "move.l ($4,A5,D5.w), ($24,A0)"): set when its attack
# hits (04C06E "bne $4c090", 04C09C "movea.l ($24,A0), A6")
scoped object rocksteady_bullet 24 burst u32 animation_frame

# its landings, from FF (04C182 "move.b #$ff, ($4a,A0)"): the first one sets its turning animation (04C1D8 "addq.b #1,
# ($4a,A0)", 04C1E0 "lea $5b5c8.l, A6")
scoped object shredder_piece 4A landings u8

# frames it lasts (04C226 "move.b #$3c, ($22,A0)", 04C24A "subq.b #1, ($22,A0)")
scoped object shredder_ray 22 time_left u8
# Shredder, who fires it (053714 "move.l A0, ($24,A6)"): it is gone as soon as he is hit (04C23C "movea.l ($24,A0),
# A6", 04C240 "cmpi.b #$5, ($4,A6)")
scoped object shredder_ray 24 shredder u32 object

# the bounces before it goes off (04C34E "move.b #$3, ($4a,A0)", 04C3BE "subq.b #1, ($4a,A0)")
scoped object dynamite 4A bounces_left u8

# the turtle it rides at: the nearest, again every 8 frames (04ABD8 "jsr $4835e.l", 04ABDE "move.l A6, ($20,A0)",
# 04ABE2 "movea.l ($20,A0), A6")
scoped object motorbike 20 target_turtle u32 object
# frames to its next look for the nearest turtle (04ABBE "move.b #$1, ($46,A0)", 04ABCA "subq.b #1, ($46,A0)",
# 04ABD2 "move.b #$8, ($46,A0)")
scoped object motorbike 46 aim_time u8
# 1 once it has reared up at a turtle (04ABFC "move.b #$1, ($4a,A0)"): hit, its rider falls from higher up and the
# bike lands from the wheelie (04AC38 "tst.b ($4a,A0)", 04AC40 "lea $5c6b0.l, A6", 04AC46 "lea $4ab56.l, A5")
scoped object motorbike 4A wheelie u8

# frames before a turtle's attack can hit it, once thrown or knocked back (04BA94 "move.b #$a, ($22,A0)", 04BAB2
# "subq.b #1, ($22,A0)", 04BABE "bset #$1, ($0,A0)"; 04BB06 "move.b #$a, ($22,A0)")
scoped object rolling 22 hit_delay u8

# the screen x it comes up at: 0x160, 0xA0 when it faces the other way (04C9D2 "move.w #$160, ($20,A0)", 04C9E8
# "move.w #$a0, ($20,A0)", 04CA06 "move.w ($20,A0), D0" + 04CA0A "cmp.w ($c,A0), D0")
scoped object manhole_soldier 20 trigger_x u16
# the same for the tire: 0x168 or 0xA0 (04C8AC "move.w #$168, ($20,A0)", 04C8E0 "move.w ($20,A0), D0")
scoped object tire_soldier 20 trigger_x u16

# the screen x it jumps out at, from its record in object_tile_blocks (04CC14 "move.w (A5)+, ($20,A0)", 04CC2E
# "move.w ($20,A0), D0" + 04CC32 "cmp.w ($c,A0), D0")
scoped object window_soldier_drop 20 trigger_x u16
# the rest of the record: the tile blocks of the broken window, each with its place and a byte, 0 on the last (04CC1C
# "move.l A5, ($24,A0)", 04CC82 "movea.l (A5)+, A6", 04CC88 "move.b (A5)+, ($46,A0)")
scoped object window_soldier_drop 24 blocks u32 window_break_step
# frames from the jump to the window drawn broken (04CC52 "move.b #$4, ($46,A0)", 04CC76 "subq.b #1, ($46,A0)"); then
# each block's last byte (04CC96 "tst.b ($46,A0)")
scoped object window_soldier_drop 46 break_time u8
# frames it waits on the screen before it jumps: the record's second word (04CC18 "move.w (A5)+, ($46,A0)", 04CC3A
# "subq.b #1, ($47,A0)")
scoped object window_soldier_drop 47 delay u8

# the screen y it dives out at, from its record in object_tile_block_pairs (04CD94 "move.w (A6)+, ($20,A0)", 04CDAA
# "move.w ($20,A0), D0" + 04CDAE "cmp.w ($e,A0), D0")
scoped object window_soldier_dive 20 trigger_y u16
# the rest of the record: the places and tile blocks of the broken window (04CD98 "move.l A6, ($24,A0)", 04CDB6
# "movea.l ($24,A0), A5", 04CDBE "movea.l ($2,A5), A6")
scoped object window_soldier_dive 24 blocks u32 dive_window

# its stop, by the parameter: the screen x it waits for and the frames before it opens (04C6EE "lea $4c6e0.l, A6",
# 04C702 "move.l A6, ($24,A0)", 04C716 "movea.l ($24,A0), A1", 04C724 "move.b ($2,A1), ($46,A0)")
# type: elevator_stops, its stop's record (x, wait): 04C716 "movea.l ($24,A0), A1" 04C724 "move.b ($2,A1), ($46,A0)"
scoped object elevator 24 stop u32 elevator_stop
# frames before it opens (04C730 "subq.b #1, ($46,A0)")
scoped object elevator 46 wait u8

# frames from the door open to its signal to the bosses (04A778 "move.b #$5a, ($46,A0)", 04A7B8 "subq.b #1, ($46,A0)")
scoped object boss_shutter 46 open_time u8

# frames it swims before the soldier leaps out (04D1C4 "move.b #$5a, ($46,A0)", 04D228 "subq.b #1, ($46,A0)")
scoped object sewer_ripple 46 swim_time u8

# frames counted down: leaning out (04D492 "move.b #$4a, ($22,A0)"), to the throw (04D4BC "move.b #$48, ($22,A0)",
# 04D4D0 "subq.b #1, ($22,A0)"), walking in (04D50E "move.b #$1e, ($22,A0)", 04D532 "subq.b #1, ($22,A0)")
scoped object bomber 22 timer u8

# frames to the next Foot soldier (04D7A6 "move.b #$18, ($46,A0)", 04D7E8 "subq.b #1, ($46,A0)")
scoped object technodrome_door 46 spawn_time u8
# the soldiers still to come, by the players' setting (04D7BC "move.b (A6,D0.w), ($47,A0)" after 04D7B6 "lea $4d764.l,
# A6", 04D802 "subq.b #1, ($47,A0)")
scoped object technodrome_door 47 soldiers_left u8

# frames to the next Mouser: 16, then 60 (051BE2 "move.b #$10, ($22,A0)", 051BF4 "subq.b #1, ($22,A0)", 051C06
# "move.b #$3c, ($22,A0)")
scoped object mouser_hole 22 spawn_time u8
# its record of three (051B90 "movea.l (A6,D0.w), A6", 051B94 "move.l A6, ($24,A0)"): the wall's two animations, then
# the Mouser's spawn record, where it moves on to once the wall breaks (051BC6 "move.l A4, ($24,A0)", 051BFC "movea.l
# ($24,A0), A5")
scoped object mouser_hole 24 hole u32 rom
# the Mousers still to come, by the hole and the players' setting (051B7A "move.b (A6,D0.w), ($46,A0)", 051C0C
# "subq.b #1, ($46,A0)")
scoped object mouser_hole 46 mousers_left u8

# ---- the functions ----

# -- kind 04: the knife --
# routine 0: damage 0x202, can be hit, flies at 0x400 the way it faces (04BB46 "move.w #$202, ($a,A0)", 04BB5E
# "move.l #$4000000, ($1a,A0)"), carried with the ride in area 6 (04BB32 "cmpi.b #$6, $60120.l", 04BB3E "addi.l #$600,
# ($12,A0)")
04BB32  func  knife_start
# routine 1: gone off the screen (04BB9C "btst #$5, ($0,A0)"); its attack hit, the burst (04BBA6 "btst #$3, ($0,A0)")
04BB88  func  knife_fly
# routine 2: gone when the burst ends (04BBCA "tst.b ($33,A0)", 04BBD2 "clr.w ($0,A0)")
04BBB6  func  knife_vanish
# routine 4, struck by a turtle: sound 25, the burst (04BBD8 "move.b #$25, D7", 04BBEE "lea $5712c.l, A6")
04BBD8  func  knife_struck

# -- kind 06: the spear --
# routine 0: damage 0x303, can be hit, flies at 0x600 (04BC0E "move.w #$303, ($a,A0)", 04BC26 "move.l #$6000000,
# ($1a,A0)")
04BC0E  func  spear_start
# routine 1: on through what it hits, gone off the screen (04BC50 "btst #$5, ($0,A0)")
04BC50  func  spear_fly
# routine 2: gone when its breaking ends (04BC60 "tst.b ($33,A0)")
04BC60  func  spear_vanish
# routine 4, struck by a turtle: sound 25, the spear breaks (04BC6E "move.b #$25, D7", 04BC84 "lea $55e06.l, A6")
04BC6E  func  spear_struck

# -- kind 08: the axe --
# routine 0: damage 0x301, it cannot be hit (04BCB8 "ori.b #$84, ($0,A0)"), flies at 0x400, spinning (04BCE2 "lea
# $576f0.l, A6")
04BC98  func  axe_start
# routine 1: on through what it hits, gone off the screen (04BD02 "btst #$5, ($0,A0)")
04BCEE  func  axe_fly

# -- kind 0A: the gun shot --
# routine 0: damage 0x301, flies at 0x600 dropping (04BD44 "move.l #$6000000, ($1a,A0)", 04BD5E "move.w #$fe00,
# ($1e,A0)")
04BD2C  func  gun_shot_start
# routine 1: gone off the screen; its attack hit, the burst (04BD82 "btst #$3, ($0,A0)"); on the ground, a puff (04BD8C
# "tst.b ($10,A0)", 04BDEE "lea $56b3c.l, A6")
04BD78  func  gun_shot_fly
# routine 2: gone when the burst or the puff ends (04BD9E "tst.b ($33,A0)")
04BD9E  func  gun_shot_vanish
# routine 4, struck: sound 25 and the burst (04BDC0 "move.b #$25, D7"); the shot can never be hit (04BD38 "ori.b #$85,
# ($0,A0)"), so only its end runs, for the shot's own hit (04BD88 "bne $4bdca")
04BDC0  func  gun_shot_struck

# -- kind 0C: the boomerang --
# routine 0: damage 0x201, can be hit, flies out at 0x580 for 32 frames (04BE2A "move.l #$5800000, ($1a,A0)", 04BE44
# "move.b #$20, ($46,A0)")
04BE12  func  boomerang_start
# routine 1: out until flight_time runs out, then turned round (04BE62 "neg.w ($1a,A0)", 04BE66 "bchg #$7, ($6,A0)")
04BE5A  func  boomerang_fly_out
# routine 2: back for flight_time frames, then gone (04BEA8 "subq.b #1, ($46,A0)", 04BEB0 "clr.w ($0,A0)")
04BE92  func  boomerang_fly_back
# routine 3, once its thrower is hit: straight on until it is off the screen (04BEBA "btst #$5, ($0,A0)")
04BEBA  func  boomerang_fly_on
# routine 4, struck by a turtle: sound 25, it breaks (04BED2 "move.b #$25, D7", 04BEDC "lea $55c2c.l, A6")
04BECE  func  boomerang_struck
# routine 5: gone when its breaking ends (04BEE8 "tst.b ($33,A0)")
04BEE8  func  boomerang_vanish

# -- kind 0E: the shuriken --
# routine 0: damage 0x301, can be hit, flies at 0x500 (04BF10 "move.w #$301, ($a,A0)", 04BF22 "move.l #$5000000,
# ($1a,A0)"), its sprite never flipped (04BF2A "bclr #$6, ($0,A0)")
04BF0A  func  shuriken_start
# routine 1: gone off the screen; its attack hit, the burst (04BF4C "btst #$5, ($0,A0)", 04BF56 "bra $4bf70")
04BF4C  func  shuriken_fly
# routines 2 and 3: gone when the burst ends (04BF96 "tst.b ($33,A0)")
04BF96  func  shuriken_vanish
# routine 4, struck by a turtle: sound 25, knocked away (04BFA8 "move.b #$25, D7", 04BFB2 "lea $55a9e.l, A6")
04BFA4  func  shuriken_struck

# -- kind 12: the door a Foot soldier kicks down --
# routine 0: drawn, the closed door (04C4E6 "move.b #$81, ($0,A0)", 04C4F0 "lea $4c410.l, A6")
04C4E6  func  kicked_door_start
# routine 1: under 0x100 across on the screen, sound 0D and the kick (04C4FC "cmpi.w #$100, ($c,A0)", 04C514
# "lea $4c41a.l, A6")
04C4FC  func  kicked_door_wait
# routine 2: when the kick ends, the door's four pieces fly (04C52C "lea $4c4c6.l, A5", 04C532 "jsr $47c30.l")
04C522  func  kicked_door_break
# routine 3: the object is the Foot soldier now (04C558 "move.w #$0, ($2,A0)", 04C55E "clr.w ($4,A0)")
04C552  func  kicked_door_become_foot_soldier

# -- kind 13: the elevator --
# routine 0: its stop by the parameter, the closed doors (04C6EE "lea $4c6e0.l, A6", 04C70A "lea $4c65e.l, A6")
04C6E8  func  elevator_start
# routine 1: until its screen x reaches its stop (04C71A "move.w (A1), D0", 04C71C "cmp.w ($c,A0), D0")
04C716  func  elevator_wait_on_screen
# routine 2: after its wait, sound 36, the doors open, one Foot soldier, two with three turtles or more in play (04C738
# "move.b #$36, D7", 04C752 "cmpi.b #$3, $61207.l")
04C730  func  elevator_open
# routine 3: gone off the screen once open (04C784 "tst.b ($33,A0)", 04C78C "btst #$5, ($0,A0)")
04C784  func  elevator_scroll_off

# -- kind 14: the Foot soldier in the manhole --
# routine 0: counted as an enemy, its cover in place (04C9C6 "addq.b #1, $6120c.l", 04C9FA "lea $54f56.l, A6")
04C9C6  func  manhole_soldier_start
# routine 1: at trigger_x it comes up holding the cover (04CA12 "subi.l #$1000, ($16,A0)", 04CA1E "lea $54eec.l, A6")
04CA06  func  manhole_soldier_wait
# routine 2: up out of it, the open manhole left behind (04CA50 "move.w #$400, ($1e,A0)", 04CA5A "lea $4c9be.l, A5")
04CA2C  func  manhole_soldier_jump_out
# routine 3: its arc down to the ground (04CA6E "addi.w #-$40, ($1e,A0)", 04CA8A "lea $54f20.l, A6")
04CA68  func  manhole_soldier_fly
# routine 4: sound 8, the cover thrown (04CAA0 "move.b #$8, D7", 04CAAA "lea $4c9b6.l, A5", 04CAC4 "lea $54f36.l, A6")
04CA98  func  manhole_soldier_throw
# routine 5 of kinds 14 and 6A: when the throw ends the object is a Foot soldier (04CADA "move.w #$8100, ($0,A0)",
# 04CAE0 "clr.w ($2,A0)")
04CAD2  func  thrower_become_foot_soldier

# -- kind 6A: the Foot soldier with the tire --
# routine 0: counted as an enemy, the tire lying there (04C89C "addq.b #1, $6120c.l", 04C8D4 "lea $5c890.l, A6")
04C89C  func  tire_soldier_start
# routine 1: at trigger_x it comes up out of the tire (04C8EC "subi.l #$1000, ($16,A0)", 04C8F8 "lea $5c846.l, A6")
04C8E0  func  tire_soldier_wait
# routine 2: when that ends it jumps (04C92A "move.w #$400, ($1e,A0)")
04C906  func  tire_soldier_jump
# routine 3: its arc until it lands (04C942 "jsr $4861a.l", 04C956 "lea $5c87a.l, A6")
04C936  func  tire_soldier_fly
# routine 4: sound 8, the tire thrown (04C96C "move.b #$8, D7", 04C976 "lea $4c894.l, A5")
04C964  func  tire_soldier_throw

# -- kinds 19 and 6B: the manhole cover and the tire, thrown and rolling --
# kind 19's routine 0: damage 0x306, attack 7, rolls at 0x400, not hittable for hit_delay (04BA62 "move.w #$306,
# ($a,A0)", 04BA74 "move.b #$87, ($6,A0)", 04BAA6 "lea $54f60.l, A6")
04BA56  func  rolling_manhole_cover_start
# kind 6B's: the same with damage 0x606, wider (04C126 "move.w #$606, ($a,A0)", 04C12C "move.w #$12, ($34,A0)")
04C11A  func  rolling_tire_start
# routine 1: rolls, and can be hit once hit_delay runs out (04BAB2 "subq.b #1, ($22,A0)", 04BABE "bset #$1, ($0,A0)")
04BAB2  func  rolling_wait_hittable
# routine 2: rolls; gone off the screen, one enemy fewer (04BAC4 "btst #$5, ($0,A0)", 04BACE "subq.b #1, $6120c.l")
04BAC4  func  rolling_roll
# routine 4, struck by a turtle: sound 25 (41 for the tire), back the other way, not hittable for a while (04BAEC
# "cmpi.b #$19, ($2,A0)", 04BB0C "bchg #$7, ($6,A0)", 04BB12 "neg.w ($1a,A0)")
04BAE8  func  rolling_struck

# -- kind 15: the Foot soldier that jumps out through a window --
# routine 0: its record in object_tile_blocks by the parameter (04CBFC "lea $4cbb4.l, A6", 04CC02 "lea $4cbc0.l, A5")
04CBFC  func  window_soldier_drop_start
# routine 1: at trigger_x and after delay, drawn in the air, the glass shards, the jump (04CC42 "bset #$7, ($0,A0)",
# 04CC58 "lea $4cbac.l, A5", 04CC68 "lea $4cafe.l, A6")
04CC2E  func  window_soldier_drop_jump_out
# routine 2: after break_time the window drawn broken (04CC90 "jsr $183fa.l"), falling meanwhile
04CC76  func  window_soldier_drop_break_window
# routine 3 (and routine 2 meanwhile): forward and down until it lands (04CCA0 "addi.l #-$80, ($16,A0)", 04CCDE
# "lea $4cb1e.l, A6")
04CCA0  func  window_soldier_drop_fall
# routine 4 of kinds 15 and 16: when the landing ends the object is a Foot soldier (04CCF4 "move.w #$0, ($2,A0)")
04CCEC  func  window_soldier_become_foot_soldier

# -- kind 16: the Foot soldier that dives out through a window --
# routine 0: its record in object_tile_block_pairs by the parameter (04CD8C "lea $4cd44.l, A6")
04CD80  func  window_soldier_dive_start
# routine 1: at trigger_y the window drawn broken (04CDC2 "jsr $183fa.l", 04CDD2 "jsr $183fa.l"), the glass, the dive
# (04CDEC "lea $4cd3c.l, A5", 04CDF8 "lea $4cd10.l, A6")
04CDAA  func  window_soldier_dive_wait
# routine 2: across and down until it lands (04CE06 "addi.l #-$280, ($12,A0)", 04CE44 "lea $4cd26.l, A6")
04CE06  func  window_soldier_dive_fall

# -- kind 1F: the glass shards --
# routine 0: their animation and drift by the parameter's bit 7, sound 40 (04CEDC "tst.b ($3,A0)", 04CF00 "move.b #$40,
# D7")
04CECA  func  glass_shards_start
# routine 1: falling until the animation ends (04CF10 "tst.b ($33,A0)", 04CF22 "addi.w #-$40, ($1e,A0)")
04CF10  func  glass_shards_fall

# -- kind 1A: a piece of the kicked door --
# routine 0: its animation, height speed and direction by the parameter, at 0x500 (04C602 "lea $4c5d4.l, A6", 04C622
# "move.w #$500, D1")
04C5F4  func  door_piece_start
# routine 1: on until it is off the screen (04C63A "btst #$5, ($0,A0)")
04C63A  func  door_piece_fly

# -- kind 17: the ripple in the sewer --
# routine 0: counted as an enemy, swims left at 0x80 (04D1AE "addq.b #1, $6120c.l", 04D1BA "move.w #$ff80, ($1a,A0)")
04D1AE  func  sewer_ripple_start
# routine 1: back and forth between 0xA0 and 0x160 on the screen (04D1DE "cmpi.w #$a0, ($c,A0)", 04D1F2 "cmpi.w #$160,
# ($c,A0)"); gone off the screen, one enemy fewer; after swim_time sound 0E and the splash (04D234 "move.b #$e, D7")
04D1DE  func  sewer_ripple_swim
# routine 2: when the splash ends a Foot soldier leaps out, facing its way (04D254 "lea $4d100.l, A6", 04D276 "andi.b
# #$41, ($0,A6)"); with no free object, routine 4 (04D282 "addq.b #2, ($4,A0)")
04D24C  func  sewer_ripple_leap_out
# routine 3: gone when the leap ends, one enemy fewer (04D290 "clr.w ($0,A0)", 04D294 "subq.b #1, $6120c.l")
04D288  func  sewer_ripple_vanish
# routine 4: back to swimming when the leap ends (04D2AE "move.b #$1, ($4,A0)", 04D2B4 "move.b #$5a, ($46,A0)")
04D2A6  func  sewer_ripple_swim_again

# -- kind 18: the Foot soldier that throws dynamite --
# routine 0: its walk's speeds (04D46C "move.b #$10, D0", 04D470 "move.w #$180, D1")
04D46C  func  bomber_start
# routine 1: on the screen, drawn, leaning out (04D488 "cmpi.w #$160, ($c,A0)", 04D4A2 "lea $4d35c.l, A6")
04D488  func  bomber_wait
# routine 2: after timer, the throw's animation (04D4B0 "subq.b #1, ($22,A0)", 04D4C2 "lea $5ca64.l, A6")
04D4B0  func  bomber_lean_out
# routine 3: the dynamite thrown when timer runs out (04D4D8 "lea $4d466.l, A5", 04D4DE "jsr $47c5a.l"), then it steps
# out (04D4F0 "lea $4d3a8.l, A6")
04D4D0  func  bomber_throw
# routine 4: turned round, walking (04D506 "addi.l #$1000, ($12,A0)", 04D514 "bset #$6, ($0,A0)", 04D51E "lea
# $547f8.l, A6")
04D4FE  func  bomber_step_out
# routine 5: walks for timer frames, then it is a Foot soldier (04D52C "jsr $4824c.l", 04D53A "clr.w ($2,A0)")
04D52C  func  bomber_walk_in

# -- kind 70: the dynamite --
# routine 0: damage 0x206, attack 7, its burning fuse, three bounces (04C32A "move.w #$206, ($a,A0)", 04C33C "lea
# $5cb10.l, A6", 04C34E "move.b #$3, ($4a,A0)")
04C32A  func  dynamite_start
# routine 1: thrown at the nearest turtle at 0x100 (04C35E "jsr $4835e.l", 04C36A "move.w #$100, D1", 04C37C "move.w
# #$400, ($1e,A0)")
04C35E  func  dynamite_throw
# routine 2: flashing (04C396 "move.b (A6,D0.w), ($42,A0)"), each landing a lower bounce (04C3B8 "asr.w #1, D0"); at
# the last, sound 11 and the explosion, attacking (04C3D0 "lea $5ceee.l, A6", 04C3E2 "bset #$2, ($0,A0)")
04C386  func  dynamite_bounce
# routine 3: gone when the explosion ends (04C3F2 "tst.b ($33,A0)")
04C3F2  func  dynamite_explode

# -- kind 1B: the double door --
# routine 0: nothing yet (04D6C8 "addq.b #1, ($4,A0)")
04D6C8  func  double_door_start
# routine 1: under 0x100 across on the screen, drawn, opening with sound 3F, its tiles taken off the layer, two Foot
# soldiers (04D6DE "lea $5cda0.l, A6", 04D6EA "move.b #$3f, D7", 04D6FE "jsr $183fa.l", 04D708 "lea $4d6b8.l, A5")
04D6CE  func  double_door_wait
# routine 2: when it is open, gone and the open doorway drawn in the layer (04D728 "clr.w ($0,A0)", 04D730 "lea
# $19100.l, A6", 04D740 "lea $19152.l, A6")
04D722  func  double_door_open

# -- kind 1C: the bosses' roll-up door in area 4 --
# routine 0: drawn, its palette, closed (04A74E "move.w #$43a, D7", 04A758 "jsr $9242.l", 04A75E "lea $5ce06.l, A6")
04A744  func  boss_shutter_start
# routine 1: once the scroll reaches it, the music off, sound 36, it opens (04A76A "cmpi.l #$3f000, $63380.l", 04A782
# "move.w #$fe, D7", 04A79C "lea $5ce10.l, A6")
04A76A  func  boss_shutter_wait
# routine 2: open, not drawn; after open_time gone, the bosses' signal and their music (04A7B2 "bclr #$7, ($0,A0)",
# 04A7C4 "move.b #$ff, $6123d.l", 04A7CC "move.w #$64, D7")
04A7AA  func  boss_shutter_open

# -- kind 3B: the car full of Foot soldiers in area 5 --
# the car's object: kind 3B in object group 2 (04A90E "move.b #$2, D0"), behind the screen's left edge (04A922
# "move.w #$3b00, ($2,A6)", 04A940 "subi.l #$18000, D1"); stage 5 starts it with the car's picture (01F858 "jsr
# $1f93c.l", 01F85E "jsr $4a90e.l")
04A90E  func  start_foot_car
# routine 0: attack 87 (a knock flying), damage 0x403, attacking, deep, across at 0x400 (04A97E "move.b #$87, ($6,A0)",
# 04A984 "move.w #$403, ($a,A0)", 04A99C "bset #$2, ($0,A0)", 04A9A2 "move.w #$400, ($1a,A0)")
04A97E  func  foot_car_start
# routine 1: on until it is past 0x1E0 on the screen (04A9B6 "cmpi.w #$1e0, ($c,A0)", 04A9C0 "clr.w ($0,A0)")
04A9B6  func  foot_car_drive

# -- kinds 3C, 3D, 3E and 3F: scenery --
# kind 3C's routine 0: drawn, the lamp (04A7F8 "ori.b #$80, ($0,A0)", 04A808 "lea $4a7e6.l, A6")
04A7F8  func  scenery_lamp_start
# kind 3D's: the toppled chair (04A890 "lea $4a86e.l, A6")
04A880  func  scenery_chair_start
# kind 3E's: the fire by the parameter (04A8E6 "lea $4a8a4.l, A6", 04A8EE "move.b ($3,A0), D0")
04A8E6  func  scenery_fire_start
# kind 3F's: attacking with attack 0C and no damage (04A836 "ori.b #$4, ($0,A0)", 04A83C "move.b #$c, ($6,A0)", 04A842
# "clr.w ($a,A0)")
04A830  func  scenery_open_manhole_start
# routine 1 of kinds 3C and 3D: nothing (04A814 "rts")
04A814  func  scenery_stay
# routine 1 of kinds 3E and 3F: gone off the screen (04A856 "btst #$5, ($0,A0)", 04A860 "clr.w ($0,A0)")
04A856  func  scenery_gone_off_screen

# -- kind 45: the Technodrome's door --
# routine 0: drawn, closed (04D76C "bset #$7, ($0,A0)", 04D776 "lea $5ce9e.l, A6")
04D76C  func  technodrome_door_start
# routine 1: under 0x140 on the screen, a Foot soldier, sound 36, it opens (04D782 "cmpi.w #$140, ($c,A0)", 04D790 "lea
# $4d75c.l, A5", 04D79C "move.b #$36, D7", 04D7C2 "lea $5cea8.l, A6")
04D782  func  technodrome_door_wait
# routine 2: not drawn when it is open (04D7DC "bclr #$7, ($0,A0)")
04D7D0  func  technodrome_door_open
# routine 3: a Foot soldier every spawn_time; gone after the last (04D7F6 "lea $4d75c.l, A5", 04D802 "subq.b #1,
# ($47,A0)", 04D80A "clr.w ($0,A0)")
04D7E8  func  technodrome_door_let_out

# -- kind 47: the falling debris --
# routine 0: attack 0, damage 0x103, its falling animation (04AA82 "move.b #$0, ($6,A0)", 04AA88 "move.w #$103,
# ($a,A0)", 04AA9E "lea $4a9da.l, A6")
04AA82  func  falling_debris_start
# routine 1: drops when it is under 0x100 across on the screen or a turtle is within 0x10 (04AAAA "cmpi.w #$100,
# ($c,A0)", 04AAC0 "cmpi.w #$10, D1"): drawn, attacking (04AAD0 "move.b #$85, ($0,A0)", 04AAD6 "move.w #$ff00,
# ($1e,A0)")
04AAAA  func  falling_debris_wait
# routine 2: falls; on the floor, sound 31, burning there, harmless (04AB08 "move.b #$81, ($0,A0)", 04AB12 "move.b
# #$31, D7", 04AB1C "lea $4aa16.l, A6")
04AAE4  func  falling_debris_fall
# routine 3: gone off the screen (04AB2A "btst #$5, ($0,A0)")
04AB2A  func  falling_debris_burn

# -- kind 4F: the Mousers' hole --
# routine 0: the Mousers' count and the hole's record by the parameter, the whole wall (051B60 "lea $51aee.l, A6",
# 051B80 "lea $51ae2.l, A6", 051B98 "movea.l ($0,A6), A6")
051B56  func  mouser_hole_start
# routine 1: under 0x100 across on the screen, six enemies counted, sound 31, the wall breaks (051BAC "addi.b #$6,
# $6120c.l", 051BB8 "movea.l ($4,A4), A6", 051BCE "move.b #$31, D7")
051BA2  func  mouser_hole_wait
# routine 2: not drawn when the wall is down (051BE8 "andi.b #$1, ($0,A0)")
051BDA  func  mouser_hole_open
# routine 3: a Mouser every spawn_time; after the last, gone and the six enemies off the count (051C00 "jsr
# $47c30.l", 051C18 "subi.b #$6, $6120c.l")
051BF4  func  mouser_hole_let_out

# -- kind 58: Roadkill Rodney's laser bolt --
# routine 0: damage 0x201, it cannot be hit, 0x800 the way it faces (04B9C8 "ori.b #$85, ($0,A0)", 04B9DA "move.l
# #$8000000, ($1a,A0)")
04B9C2  func  laser_bolt_start
# routine 1: gone off the screen; its attack hit, the burst (04BA0E "btst #$3, ($0,A0)", 04BA28 "lea $58892.l, A6")
04BA04  func  laser_bolt_fly
# routine 2: gone when the burst ends (04BA34 "tst.b ($33,A0)")
04BA34  func  laser_bolt_vanish

# -- kind 5D: Roadkill Rodney's whip arm --
# routine 0: no damage, can be hit, attack 0F, which a turtle reacts to as held (04B7F8 "move.w #$0, ($a,A0)", 04B80A
# "move.b #$8f, ($6,A0)"; turtle_held_knock_off is reaction 15)
04B7F8  func  whip_arm_start
# routine 1: by Rodney's arm_flags: put away, gone (04B82C "btst #$7, ($4a,A1)"); drawn in, not attacking (04B83C "btst
# #$6, ($4a,A1)"); a turtle caught, routine 3 (04B850 "btst #$5, ($4a,A1)", 04B85A "move.b #$3, ($4,A0)"); its pose by
# arm_length (04B9A6 "move.b ($46,A1), D0")
04B828  func  whip_arm_follow
# routine 2, which the held turtle breaking free sets (01D0B6 "move.b #$2, ($4,A6)"): Rodney told it let go (04B892
# "bset #$2, ($4a,A1)"), routine 1
04B88E  func  whip_arm_let_go
# routine 3: the caught turtle held at the arm's end (04B8D0 "move.l D2, ($16,A2)", 04B8FA "move.l D1, ($12,A2)");
# Rodney hit, the turtle let go (04B8B8 "move.b #$10, ($27,A2)") and the arm gone
04B89E  func  whip_arm_drag
# routine 4, struck by a turtle: a held turtle let go, Rodney told the arm was struck (04B930 "bset #$1, ($4a,A1)"),
# routine 1
04B900  func  whip_arm_struck
# at Rodney's place plus its offset by arm_length (04B984 "move.w (A6,D0.w), D1", 04B996 "add.l ($12,A1), D1"); Rodney
# hit, gone (04B950 "cmpi.b #$5, ($4,A1)", 04B976 "clr.w ($0,A0)")
04B950  func  whip_arm_place

# -- kind 5F: Rocksteady's bullet --
# routine 0: damage 0x101, it cannot be hit, 0x600 level or up by its parameter (04BFF2 "ori.b #$85, ($0,A0)", 04C026
# "move.w #$600, D1", 04C034 "move.w D7, ($1e,A0)"), its animation and burst (04C044 "movea.l (A5,D5.w), A6")
04BFE6  func  rocksteady_bullet_start
# routine 1: gone under the ground or off the screen (04C054 "cmpi.b #-$8, ($10,A0)", 04C05E "btst #$5, ($0,A0)"); its
# attack hit, the burst (04C068 "btst #$3, ($0,A0)")
04C054  func  rocksteady_bullet_fly
# routine 2: gone when the burst ends (04C078 "tst.b ($33,A0)")
04C078  func  rocksteady_bullet_vanish

# -- kind 64: Bebop's shot --
# routine 0: damage 0x401, it cannot be hit, 0x400 the way it faces (04C0AE "move.w #$401, ($a,A0)", 04C0C6 "move.l
# #$4000000, ($1a,A0)", 04C0E4 "lea $5a7ca.l, A6")
04C0AE  func  bebop_shot_start
# routine 1: on through what it hits until it is off the screen (04C0F0 "btst #$5, ($0,A0)")
04C0F0  func  bebop_shot_fly

# -- kind 6C: the piece of Shredder --
# routine 0: drawn, away at 0x300, up at 0x100 (04C188 "move.w #$300, ($1a,A0)", 04C1A0 "move.w #$100, ($1e,A0)")
04C17C  func  shredder_piece_start
# routine 1: falls and bounces at half the speed (04C1D2 "asr.w #1, D0"); gone off the screen (04C1EC "btst #$5,
# ($0,A0)")
04C1B6  func  shredder_piece_bounce

# -- kind 6D: Shredder's ray --
# routine 0: damage 0xA03, attack 18, its 60 frames (04C204 "move.w #$a03, ($a,A0)", 04C210 "move.b #$98, ($6,A0)",
# 04C226 "move.b #$3c, ($22,A0)")
04C204  func  shredder_ray_start
# routine 1: gone after time_left or when Shredder is hit (04C240 "cmpi.b #$5, ($4,A6)", 04C252 "clr.w ($0,A0)")
04C23C  func  shredder_ray_shine

# -- kind 6F: the rocket --
# routine 0: damage 0x102, 0x400 the way it faces (none with a parameter), up at 0x200 (04C270 "move.w #$102, ($a,A0)",
# 04C282 "move.w #$400, ($1a,A0)", 04C290 "clr.w ($1a,A0)", 04C2B0 "move.w #$200, ($1e,A0)")
04C264  func  rocket_start
# routine 1: its arc; landed, sound 13 and the explosion, damage 0x303 and attack 7 (04C2E4 "move.b #$13, D7", 04C2EE
# "movea.l $15258.l, A6", 04C300 "ori.b #$7, ($6,A0)")
04C2CE  func  rocket_fly
# routine 2: gone when the explosion ends (04C30C "tst.b ($33,A0)")
04C30C  func  rocket_explode

# -- kind 71: the motorbike --
# routine 0: sound 3A, one bar, damage 0x206 and attack 7, can be hit, rides at 0x300 (04AB76 "move.w #$101, ($8,A0)",
# 04AB7C "move.b #$3a, D7", 04AB86 "ori.b #$86, ($0,A0)", 04AB90 "move.w #$fd00, ($1a,A0)")
04AB5E  func  motorbike_start
# routine 1: at a turtle within 0x40 across and 8 deep it rears up (04ABEC "cmpi.w #$8, D2", 04ABF4 "cmpi.w #$40, D1",
# 04AC02 "lea $5c686.l, A6")
04ABCA  func  motorbike_ride
# routine 2, its rider gone: on until it is off the screen (04AC0E "btst #$5, ($0,A0)")
04AC0E  func  motorbike_ride_off
# routine 4, struck: sound A8, its rider a Foot soldier knocked off with no health (04AC52 "jsr $47c30.l", 04AC68
# "move.w #$500, ($4,A6)", 04AC6E "clr.w ($8,A6)"), counted as an enemy; the bike rides off (04AC8C "move.w #$200,
# ($4,A0)")
04AC22  func  motorbike_struck

# ---- comments ----
comment knife_start a thrown knife flies the way its thrower faces; on the skateboards it is carried along with the ride
comment knife_fly the knife flies until it hits a turtle or leaves the screen
comment knife_vanish the knife's burst ends and it is gone
comment knife_struck a turtle's attack knocks the knife away
comment spear_start a thrown spear flies the way its thrower faces
comment spear_fly the spear flies through what it hits until it leaves the screen
comment spear_vanish the broken spear is gone
comment spear_struck a turtle's attack breaks the spear
comment axe_start a thrown axe flies spinning the way its thrower faces; it cannot be hit
comment axe_fly the axe flies through what it hits until it leaves the screen
comment gun_shot_start a gun shot flies the way the soldier faces, dropping as it goes
comment gun_shot_fly the shot flies until it hits a turtle, the ground, or leaves the screen
comment gun_shot_vanish the shot's burst ends and it is gone
comment gun_shot_struck the shot bursts; a turtle's attack can never strike it
comment boomerang_start a thrown boomerang flies out
comment boomerang_fly_out the boomerang flies out a while, then turns back
comment boomerang_fly_back the boomerang flies back a while and is gone
comment boomerang_fly_on the boomerang's thrower was hit: it flies on off the screen
comment boomerang_struck a turtle's attack breaks the boomerang
comment boomerang_vanish the broken boomerang is gone
comment shuriken_start a thrown shuriken flies the way its thrower faces
comment shuriken_fly the shuriken flies until it hits a turtle or leaves the screen
comment shuriken_vanish the shuriken's burst ends and it is gone
comment shuriken_struck a turtle's attack knocks the shuriken away
comment kicked_door_start a closed door
comment kicked_door_wait on the screen, a Foot soldier kicks the door down
comment kicked_door_break the door's pieces fly off
comment kicked_door_become_foot_soldier the soldier who kicked the door goes on as a Foot soldier
comment elevator_start an elevator with its doors closed
comment elevator_wait_on_screen the elevator waits until the scroll brings it to its place
comment elevator_open the elevator's doors open and a Foot soldier comes out, two with three turtles or more in play
comment elevator_scroll_off the open elevator is gone once it leaves the screen
comment manhole_soldier_start a manhole with a Foot soldier under its cover, counted as an enemy
comment manhole_soldier_wait the soldier comes up out of the manhole holding its cover
comment manhole_soldier_jump_out the soldier jumps out and leaves the manhole open
comment manhole_soldier_fly the soldier's jump comes down to the ground
comment manhole_soldier_throw the soldier throws the manhole cover
comment thrower_become_foot_soldier after its throw the soldier goes on as a Foot soldier
comment tire_soldier_start a tire with a Foot soldier behind it, counted as an enemy
comment tire_soldier_wait the soldier comes up out of the tire
comment tire_soldier_jump the soldier jumps
comment tire_soldier_fly the soldier's jump comes down until it lands
comment tire_soldier_throw the soldier throws the tire
comment rolling_manhole_cover_start a thrown manhole cover rolls at the turtles, knocking them flying
comment rolling_tire_start a thrown tire rolls at the turtles, knocking them flying
comment rolling_wait_hittable it rolls, and a turtle can hit it after a few frames
comment rolling_roll it rolls on until it leaves the screen
comment rolling_struck a turtle's attack sends it rolling back the other way
comment window_soldier_drop_start a Foot soldier behind a window, waiting for its place on the screen
comment window_soldier_drop_jump_out the soldier jumps out through the window and the glass shatters
comment window_soldier_drop_break_window the window is drawn broken
comment window_soldier_drop_fall the soldier comes down from the window until it lands
comment window_soldier_become_foot_soldier the soldier who came out of the window goes on as a Foot soldier
comment window_soldier_dive_start a Foot soldier behind a window, waiting for its place on the screen
comment window_soldier_dive_wait the window is drawn broken and the soldier dives out through the glass
comment window_soldier_dive_fall the soldier's dive comes down until it lands
comment glass_shards_start a window's glass shatters into shards
comment glass_shards_fall the glass shards fall until they are gone
comment door_piece_start a piece of the kicked door flies off
comment door_piece_fly the door's piece flies until it leaves the screen
comment sewer_ripple_start a ripple on the sewer's water, a Foot soldier under it, counted as an enemy
comment sewer_ripple_swim the ripple moves back and forth, then splashes
comment sewer_ripple_leap_out the soldier leaps out of the water
comment sewer_ripple_vanish the splash ends and the ripple is gone
comment sewer_ripple_swim_again no room for the soldier: the ripple swims on
comment bomber_start a Foot soldier behind cover with a stick of dynamite
comment bomber_wait on the screen, the soldier leans out
comment bomber_lean_out the soldier gets ready to throw
comment bomber_throw the soldier throws the dynamite, then steps out
comment bomber_step_out the soldier turns and walks out
comment bomber_walk_in the soldier walks in and goes on as a Foot soldier
comment dynamite_start a stick of dynamite with its fuse burning
comment dynamite_throw the dynamite is thrown at the nearest turtle
comment dynamite_bounce the dynamite bounces, flashing, and explodes on its last bounce
comment dynamite_explode the explosion ends and the dynamite is gone
comment double_door_start two closed doors
comment double_door_wait the doors swing open and two Foot soldiers come out
comment double_door_open the open doorway stays in the layer and the doors are gone
comment boss_shutter_start the closed roll-up door of area 4, with its colours
comment boss_shutter_wait the scroll reaches the door: the music stops and it rolls up
comment boss_shutter_open the door stays open, then Bebop and Rocksteady are told to come out, with their music
comment start_foot_car the car full of Foot soldiers starts behind the screen's left edge
comment foot_car_start the car drives across, knocking flying the turtles it runs into
comment foot_car_drive the car drives on until it is past the screen
comment scenery_lamp_start a floor lamp
comment scenery_chair_start a toppled chair
comment scenery_fire_start flames on the floor, of the size its parameter gives
comment scenery_open_manhole_start an open manhole a turtle can fall into
comment scenery_stay the scenery stays as it is
comment scenery_gone_off_screen the scenery is gone once it leaves the screen
comment technodrome_door_start a closed door of the Technodrome
comment technodrome_door_wait on the screen, the door opens and the first Foot soldier comes out
comment technodrome_door_open the door is open
comment technodrome_door_let_out more Foot soldiers come out, as many as the players' setting gives
comment falling_debris_start a burning piece of the ceiling, hidden until it falls
comment falling_debris_wait the debris falls when a turtle comes under it
comment falling_debris_fall the debris falls and burns on the floor
comment falling_debris_burn the burning debris is gone once it leaves the screen
comment mouser_hole_start a wall with Mousers behind it
comment mouser_hole_wait on the screen, the wall breaks open
comment mouser_hole_open the broken wall is down
comment mouser_hole_let_out Mousers come out of the hole one after another until the last
comment laser_bolt_start a laser bolt flies the way Rodney faces
comment laser_bolt_fly the bolt flies until it hits a turtle or leaves the screen
comment laser_bolt_vanish the bolt's burst ends and it is gone
comment whip_arm_start Rodney's whip arm, whose grab holds a turtle
comment whip_arm_follow the arm reaches out, is drawn in or put away as Rodney does it
comment whip_arm_let_go the turtle broke free of the arm
comment whip_arm_drag the arm drags the turtle it caught
comment whip_arm_struck a turtle's attack hits the arm, which lets go of a turtle it holds
comment whip_arm_place the arm at Rodney's side, as long as Rodney stretches it
comment rocksteady_bullet_start Rocksteady's bullet flies level, or up at a turtle in the air
comment rocksteady_bullet_fly the bullet flies until it hits a turtle or leaves the screen
comment rocksteady_bullet_vanish the bullet's burst ends and it is gone
comment bebop_shot_start Bebop's shot flies the way he faces
comment bebop_shot_fly the shot flies through what it hits until it leaves the screen
comment shredder_piece_start a piece of Shredder flies off
comment shredder_piece_bounce the piece bounces lower and lower until it leaves the screen
comment shredder_ray_start Shredder's ray
comment shredder_ray_shine the ray lasts a second, less if Shredder is hit
comment rocket_start a rocket is fired the way the soldier faces, or dropped when the soldier is hit
comment rocket_fly the rocket comes down and explodes
comment rocket_explode the explosion ends and the rocket is gone
comment motorbike_start a Foot soldier rides in on a motorbike
comment motorbike_ride the motorbike rides on and rears up at a turtle in its way
comment motorbike_ride_off the riderless motorbike rides on off the screen
comment motorbike_struck the rider is knocked off the motorbike

# ---- the pointers where these objects' code works them out ----
# the turtle a whip arm caught: its attack hit it last (hit_object, put in the work RAM's page): breaking it free sets
# its escape_presses (04B8B8 "move.b #$10, ($27,A2)", 04B916 "move.b #$10, ($27,A2)", 04B970 "move.b #$10, ($27,A2)")
local whip_arm_drag 04B8AC a2 turtle object.turtle
# the same turtle when the arm is struck (04B90A "move.l #$62000, D7", 04B910 "move.w ($4e,A0), D7")
local whip_arm_struck 04B914 a2 turtle object.turtle
# the same turtle when Rodney is hit (04B964 "move.l #$62000, D7", 04B96A "move.w ($4e,A0), D7")
local whip_arm_place 04B96E a2 turtle object.turtle

# the enemies' routines keep their turtle's slot in A1 (target, a link in the work RAM's page) for their moves
# and the slot the retargeting picked, which it keeps as its target (048AFA "move.w A6, ($20,A0)", 048AFE "movea.l A6, A1")
local enemy_think 048A9E,048AFE a1 slot player_slot
local enemy_attack 048D94 a1 slot player_slot
local enemy_react 048EE4 a1 slot player_slot
local enemy_step_over_edge 048F0C a1 slot player_slot
local enemy_enter 048A6A a1 slot player_slot
# the second nearest slot the retargeting swaps in (048AD0 "exg A5, A6", 048AD2 "cmp.b ($4,A6), D0") may be no slot:
# enemy_nearest_slots leaves A5 as it found it when it finds one player (in the continue scenario, frame 4212, A5
# holds 048A94, a handler's address, and the byte read is its code's: data_assets.py's
# second_player_through_a_stale_pointer), so that read goes over the bus, as the original's, not into a slot; the
# same retargeting in the Mousers', Rodney's and Shredder's thinking (051130, 051DBC, 05287C "exg A5, A6"). A5 is
# the address the object routines' dispatcher called the handler at: enemy_think's, the skateboard soldier's
# (04EFEC, which calls enemy_think), the Mousers', Rodney's and Shredder's, each read at its fifth byte
# (data_assets.py's second_player_through_the_skateboard_soldier, _the_mouser, _rodney, _shredder)
local enemy_think 048AD0 a6 second_slot none
local enemy_mouser_think 051130 a6 second_slot none
local enemy_rodney_think 051DBC a6 second_slot none
local enemy_shredder_think 05287C a6 second_slot none


# ======== the objects' helpers (0180E0-01832A, 0184D2, 018574; 011DFA-011E6A) ========
# Small routines the objects of objects/scenery.c, objects/krang.c, objects/rock_soldiers.c, objects/air_attacks.c and
# objects/stockman.c share, each on the object in A0 (and the one in A6 when it starts another)
# the object's attack and hit, health_bars and health, depth and the sound a turtle it hits makes, from a 10-byte record
# (0180E0 "move.w ($0,A6), ($6,A0)", 0180E6 "move.l ($2,A6), ($8,A0)", 0180EC "move.w ($6,A6), ($34,A0)", 0180F2
# "move.w ($8,A6), ($28,A0)"): every kind of these files starts with one
0180E0  func  set_object_stats
# the sound a turtle these objects hit makes, which turtle_hit reads off the object that hit it (01C2DE "move.w
# ($28,A6), D0"): from the record (0180F2 "move.w ($8,A6), ($28,A0)"); the enemies keep their move there
scoped object set_object_stats 28 hit_sound u16

# the record set_object_stats reads, 10 bytes (0180E0 "move.w ($0,A6), ($6,A0)": attack and hit; 0180E6 "move.l ($2,A6),
# ($8,A0)": health_bars, health and damage; 0180EC "move.w ($6,A6), ($34,A0)": depth; 0180F2 "move.w ($8,A6), ($28,A0)":
# the hit sound), 50 of them from 0180FA to 0182ED, each kind's start loading its own into A6 ("lea $18104.l, A6" and
# the like, then "bsr $180e0")
struct object_stats 0A rom
field object_stats 00 attack u8
field object_stats 01 hit u8
field object_stats 02 health_bars u8
field object_stats 03 health u8
field object_stats 04 damage u16
field object_stats 06 depth u16
field object_stats 08 hit_sound u16
param set_object_stats a6 stats object_stats
# the records, by the kind whose start loads each; the four pizzas' through pizza_stats_by_kind; two that no code reads
# (tools/data_walk.py walks the 50 as one table, FIXED)
# 00FBBA "lea $180fa.l, A6" (hydrant_start)
0180FA  data  hydrant_stats
# 00FC88 "lea $18104.l, A6" (hydrant_struck: the hydrant knocked over, no attack)
018104  data  hydrant_struck_stats
# 00FD40 "lea $1810e.l, A6" (hydrant_water_start: the jet of water, attack 80)
01810E  data  hydrant_water_stats
# 00FDFC "lea $18118.l, A6" (roadside_pole_start)
018118  data  roadside_pole_stats
# 01002C "lea $18122.l, A6" (alligator_start)
018122  data  alligator_stats
# 0102A2 "lea $1812c.l, A6" (billboard_wait: the billboard that topples onto the turtles, attack 07)
01812C  data  billboard_stats
# the pizzas' records by their parameter, pizza_stats_by_kind's four entries (01010E "lea $10148.l, A6", 01011C
# "movea.l (A6,D7.w), A6", 010120 "jsr $180e0.l"): attacks 11-14, which turtle_hit's table at 01C272 all sends to
# turtle_refill_health, and hit sounds C4-D0. What each opened box says, from pizza_animations' entries 4-7
# (rendered): SPEEDY, WHIRLY, ENERGY and ZAPPY. Every pizza the spawn lists place is parameter 2 (ENERGY: areas 2-5,
# 7 and 8, the read in those scenarios); no spawn record places the other three
018136  data  speedy_pizza_stats
018140  data  whirly_pizza_stats
01814A  data  energy_pizza_stats
018154  data  zappy_pizza_stats
# 010432 "lea $1815e.l, A6" (oil_drum_start; 01049E oil_drum_become_wreck again)
01815E  data  oil_drum_stats
# 0110EA "lea $18168.l, A6" (the five explosions' start: explosion_small_start to explosion_medium_start, attack 07)
018168  data  explosion_stats
# 0100B2 "lea $18172.l, A6" (skateboarder_start)
018172  data  skateboarder_stats
# 01056A "lea $1817c.l, A6" (turret_start)
01817C  data  turret_stats
# 0106A8 "lea $18186.l, A6" (turret_struck)
018186  data  turret_struck_stats
# 010832 "lea $18190.l, A6" (turret_shot_start)
018190  data  turret_shot_stats
# 0108E0 "lea $1819a.l, A6" (waiting_soldier_start)
01819A  data  waiting_soldier_stats
# no attack, no health, depth 4: what twelve kinds that neither hit nor can be hit start with (00E96E krang_curtain_start,
# 00FEE8 rat_start, 0101FE billboard_start, 0109D8 nozzle_row_start, 012A34 parked_car_start... "lea $181a4.l, A6")
0181A4  data  inert_stats
# 010B28 "lea $181ae.l, A6" (freeze_nozzle_start)
0181AE  data  freeze_nozzle_stats
# a record no code loads (no lea or table names 0181B8): freeze_nozzle_stats' attack 09 (frozen in a block of ice),
# depth and hit sound D8, without its health bar and damage: something that freezes the turtles and nothing can strike
0181B8  data  unused_freezing_stats
# 010C5C "lea $181c2.l, A6" (electric_beam_start)
0181C2  data  electric_beam_stats
# 01157C "lea $181cc.l, A6" (rock_soldier_site_start: 0x28 bars)
0181CC  data  rock_soldier_site_stats
# 01202A "lea $181d6.l, A6" (gun_blast_start)
0181D6  data  gun_blast_stats
# 012C22 "lea $181e0.l, A6" (car_hit_box_start)
0181E0  data  car_hit_box_stats
# 010DAE "lea $181ea.l, A6" (electric_column_start)
0181EA  data  electric_column_stats
# a record no code loads (no lea or table names 0181F4): attack 07 (knocked flying), damage 0x410, depth 0, no health
# and no hit sound, like falling_missile_at_turtle_stats: something that knocks the turtles flying and nothing can strike
0181F4  data  unused_knock_flying_stats
# 012D54 "lea $181fe.l, A6" (helicopter_start)
0181FE  data  helicopter_stats
# 0131C2 "lea $18208.l, A6" (copter_bullet_start)
018208  data  copter_bullet_stats
# 0132AC "lea $18212.l, A6" (falling_missile_start: the helicopter's missile, parameter 0)
018212  data  falling_missile_stats
# 0132BA "lea $1821c.l, A6" after 0132B2 "tst.b ($3,A0)" (falling_missile_start: parameter 1, the missile dropped on an
# idle turtle, knocking it flying)
01821C  data  falling_missile_at_turtle_stats
# 0121BC "lea $18226.l, A6" (rock_soldier_technodrome_start: 0x28 bars)
018226  data  rock_soldier_technodrome_stats
# 012784 "lea $18230.l, A6" (missile_start)
018230  data  missile_stats
# 0126A6 "lea $1823a.l, A6" (wall_slab_start)
01823A  data  wall_slab_stats
# 0129A6 "lea $18244.l, A6" (shock_bars_hit_box_start)
018244  data  shock_bars_hit_box_stats
# 011484 "lea $1824e.l, A6" (sewer_missile_start)
01824E  data  sewer_missile_stats
# 01112C "lea $18258.l, A6" (spiked_pole_start)
018258  data  spiked_pole_stats
# 01350E "lea $18262.l, A6" (flying_drone_start)
018262  data  flying_drone_stats
# 013B02 "lea $1826c.l, A6" (drone_shot_start)
01826C  data  drone_shot_stats
# 00FDF2 "lea $18276.l, A6" (roadside_cone_start)
018276  data  roadside_cone_stats
# 010934 "lea $18280.l, A6" (one_way_sign_start)
018280  data  one_way_sign_stats
# 013C6C "lea $1828a.l, A6" (stockman_start: 0x18 bars)
01828A  data  stockman_stats
# 01433C "lea $18294.l, A6" (falling_mouser_start)
018294  data  falling_mouser_stats
# 00F970 "lea $1829e.l, A6" (ball_start)
01829E  data  ball_stats
# 00FABE "lea $182a8.l, A6" (technodrome_ball_start)
0182A8  data  technodrome_ball_stats
# 00F8DA "lea $182b2.l, A6" (ball_dropper_start)
0182B2  data  ball_dropper_stats
# 00FA1C "lea $182bc.l, A6" (road_barrier_start)
0182BC  data  road_barrier_stats
# 00FA6E "lea $182c6.l, A6" (tire_stack_start)
0182C6  data  tire_stack_stats
# 00DFA4 "lea $182d0.l, A6" (krang_appear_setup: Krang's 0x34 bars)
0182D0  data  krang_stats
# 00EABC "lea $182da.l, A6" (krang_laser_start)
0182DA  data  krang_laser_stats
# 00EC04 "lea $182e4.l, A6" (krang_fist_start)
0182E4  data  krang_fist_stats
# x += x_speed, y += y_speed, height += height_speed (0182F4 "add.l D7, ($12,A0)", 0182FE "add.l D7, ($16,A0)", 018306
# "add.w D7, ($10,A0)"): move_object_with_height with D7
0182EE  func  move_by_speeds
# the first object not in use (its flags 0) of the D7 from A6 on, 0x50 apart: D7 0 when there is none (01830C "tst.b
# ($0,A6)", 018314 "adda.w #$50, A6", 018318 "subq.b #1, D7")
01830C  func  find_free_object
# gone when the objects' screen places say it is off the screen: flags bit 5 (01831E "btst #$5, ($0,A0)")
01831E  func  remove_if_off_screen
# the object out of use: flags, contacts, kind, parameter, routine and state cleared (01832A "clr.w ($0,A0)", 01832E
# "clr.l ($2,A0)")
01832A  func  remove_object
# the object in A6 at the place of the one in A0: x, y and height (018574 "move.l ($12,A0), ($12,A6)", 01857A "move.l
# ($16,A0), ($16,A6)", 018580 "move.w ($10,A0), ($10,A6)")
018574  func  place_at_object

# the bosses' target: Krang, the rock soldiers, Baxter Stockman and the flying drones go after one turtle, whose object
# they keep at +20 (011E5C "move.l A6, ($20,A0)")
scoped object boss 20 target u32 object
# the explosions of a defeated boss so far: boss_start_explosion places the next one by it (010EF0 "move.b ($2f,A0), D7")
scoped object boss 2F explosions u8
# one of the turtles in play (0600A1 their bits), not out of the game (0600A0) and not being hit (011E26 "cmpi.b #$4,
# ($4,A6)"), at random (011E46 "jsr $48448.l"): it goes to target, and the boss aims at it; D7 0 when there is none
011DFA  func  boss_pick_target
# x_speed and y_speed toward the target, from a table by boss_direction_to_target (011E70 "lea $11eb2.l, A6" for kind
# 1E, 011E80 "lea $11ef2.l, A6" for the others), and the boss turned the way it goes (011EAA "ori.b #$40, ($0,A0)")
011E6A  func  boss_aim_at_target
# the direction (0-15) from the boss to its target: by the signs of the differences across and up or down and by
# their ratio (0184D2 "movea.l ($20,A0), A5", 0184E2 "move.w ($c,A5), D0", 0184E6 "sub.w ($c,A0), D0", then "mulu.w
# #$3e8" and "divu.w" into the table at 018550)
0184D2  func  boss_direction_to_target

# ======== the sound queue (0091A4-009200) ========
# the sound or voice D7 into the queue the frames send to the sound board (0091D4 on): not while 060032 bit 2 or 0600A3
# is set (0091A4 "btst #$2, $60032.l", 0091B0 "tst.b $600a3.l"), never the musics 60-6B (0091BA "cmpi.b #$60, D7",
# 0091C2 "cmpi.b #$6b, D7"), and only when 060092 lets sounds play (0091CA "tst.b $60092.l")
0091A4  func  queue_sound
# D7 into the queue at 060400-06043F, the next place kept at 060018 (0091D4 "movea.l $60018.l, A6", 0091DA "move.b D7,
# (A6)+", 0091E6 "lea $60400.l, A6")
0091D4  func  queue_sound_command
# queue_sound with the sound in D0 (0091F8 "move.b D0, D7", 0091FA "bsr $91a4")
0091F4  func  queue_sound_d0

# ======== Krang (kind 65, area 9; and kinds 66, 67, 68) ========
# kind 65 krang: Krang's android body (area 9, one spawn record at 05F3F0): rendered (00EC9C on: a huge humanoid body
#   with Krang in its belly); it waits for the curtain (kind 68) to go, walks at the turtles, kicks a turtle close by,
#   punches with a fist that flies off its arm (kind 66), fires laser bolts (kind 67) at a turtle in front; with no hit
#   left it bursts in ten explosions and Krang flies off in his pod (00ECC0-00ECC8: his head alone, then flying),
#   saying say_im_invincible; it counts as an enemy (06120C) until he is gone
# kind 66 krang_fist: the fist that flies off Krang's arm across the screen at 0x680, knocking turtles flying
#   (00EB8C starts it: 00EBA4 "move.w #$6600, ($2,A6)"; its record 0182E4: attack 87)
# kind 67 krang_laser: a laser bolt from Krang, in a stream of five down to the floor at one of three angles (00EA20
#   starts them: 00EA26 "move.w #$6700, ($2,A6)"; rendered 00F760: a thin slanting bolt, the last one a spark)
# kind 68 krang_curtain: a striped curtain where Krang appears (area 9, one record at 05F3E8, at Krang's place): it
#   shimmers (015E02), breaks up with sound 16 (015E06), and when it is gone Krang starts (00DFF6 reads its flags
#   through 061314)

# the hits Krang takes: health_bars plus 2 a player in the game (00DFB0 "move.b ($8,A0), ($24,A0)", 00DFCC "add.b D7,
# ($24,A0)"), one less a hit (00E22C "subq.b #1, ($24,A0)"); under 30 he flashes and kicks with another animation
# (00E7EE "cmpi.b #$1e, ($24,A0)", 00E6BA)
scoped object krang 24 hits_left u8
# frames before he can be hit again after a hit (00E2C8 "move.b #$c, ($2a,A0)", 00E7E0 "subq.b #1, ($2a,A0)", 00E7E8
# "ori.b #$2, ($0,A0)")
scoped object krang 2A hit_delay u8
# 0x80 while he is hurt (00E220 "move.b #$80, ($2d,A0)"), cleared when he recovers (00E2C4 "clr.b ($2d,A0)"); nothing
# reads it
scoped object krang 2D hurt u8
# the turtle close to him: its bit and bit 7 when it is to his left (00E8B2 "ori.b #$80, D0", 00E8CC "bset D6, D0",
# 00E066 "move.b D0, ($2e,A0)"); his kick turns to it (00E640 "tst.b ($2e,A0)")
scoped object krang 2E close_turtle u8
# the angle of his lasers, 0 the shallowest, 2 the steepest (00E674 "move.b #$2, ($2f,A0)", 00E68C "move.b #$1,
# ($2f,A0)"; 00EA8C "move.b ($2f,A0), ($3,A6)": the lasers' parameter)
scoped object krang 2F laser_angle u8
# frames counted down: after his lasers (00E1F2 "move.b #$14, ($30,A0)", 00E200 "subq.b #1, ($30,A0)"), before he
# bursts (00E300 "move.b #$8c, ($30,A0)"), between his explosions (00E33C "move.b #$e, ($30,A0)")
scoped object krang 30 timer u8
# frames left of his walk (00E6F8 "move.b (A6,D7.w), ($31,A0)", 00E09C "subq.b #1, ($31,A0)")
scoped object krang 31 move_time u8
# his explosions so far, to ten (00E384 "addq.b #1, ($2f,A0)", 00E388 "cmpi.b #$a, ($2f,A0)")
scoped object krang_explode 2F explosions u8

# Krang who fired it (00EBE4 "move.l A0, ($20,A6)"); nothing reads it
scoped object krang_fist 20 shooter u32 object
# bit 7: it flies to the left (00EBCC "ori.b #$80, ($2f,A6)", 00EC22 "tst.b ($2f,A0)")
scoped object krang_fist 2F flipped u8
# Krang who fired it (00EA78 "move.l A0, ($20,A6)"); nothing reads it
scoped object krang_laser 20 shooter u32 object
# bit 7: it goes to the left (00EA56 "ori.b #$80, ($2f,A6)", 00EAE8 "tst.b ($2f,A0)")
scoped object krang_laser 2F flipped u8
# frames before it goes, two more each in the stream (00E9FA "move.b D7, ($30,A6)", 00EB2A "subq.b #1, ($30,A0)")
scoped object krang_laser 30 delay u8
# bit 7 on the stream's last laser, which sparks on the floor (00EA06 "ori.b #$80, ($31,A6)", 00EB4E "tst.b ($31,A0)")
scoped object krang_laser 31 last u8

# -- kind 65: Krang --
# routine 0: his appearance, by state (00DF7E "lea $df92.l, A6", 00DF90 "jmp (A6)")
00DF7E  func  krang_appear
# drawn, his stats (00DFA4 "lea $182d0.l, A6"), hits_left by the players, standing (00DFD0 "movea.l $ec9c.l, A6")
00DF9E  func  krang_appear_setup
# waits until the curtain is gone (00DFF6 "movea.l $61314.l, A6", 00DFFC "tst.w ($0,A6)"); then sound B0 and his arms
# raised (00E008 "move.b #$b0, D7", 00E012 "movea.l $eca0.l, A6")
00DFF6  func  krang_appear_wait
# when that animation ends he can be hit and hurts (00E02E "ori.b #$6, ($0,A0)") and picks his first move
00E020  func  krang_appear_end
# routine 1: walking (or his pose, state 3); a turtle close to him (krang_find_close_turtle) and 9 chances in 16
# (00E05E "cmpi.b #$7, D7"): a kick, steep lasers or the pose (00E06A "bra $e56a": the table at 00E582)
00E03C  func  krang_walk
# state 0: walks at his target (00E092 "lea $e718.l, A6") for move_time, then the next move by row 1
00E092  func  krang_walk_at_target
# state 1: the same, then the next move by row 2 (00E0AC "lea $e718.l, A6", 00E0BE "moveq #$2, D0")
00E0AC  func  krang_walk_on
# state 2: runs at his target at 0x300 (00E0C6 "lea $e708.l, A6": the table at 00E790), then row 3
00E0C6  func  krang_charge
# state 3: when the pose ends, the next move by row 4 (00E0E0 "tst.b ($33,A0)", 00E0E8 "moveq #$4, D0")
00E0E0  func  krang_pose_end
# aims again every 16 frames (00E0F0 "move.b $600a5.l, D7", 00E0FE "jsr (A6)") and moves every other frame (00E110 "bsr
# $e826")
00E0F0  func  krang_walk_step
# a turtle in front of him (krang_find_turtle_in_front): lasers, a punch or the pose at random (00E11C "bne $e52e": the
# table at 00E546); else the next move by the row in D0 (00E120 "bra $e4ca")
00E116  func  krang_next_move
# routine 2: the kick (state 0) and the punch (states 1 and 2) (00E128 "lea $e13c.l, A6")
00E124  func  krang_melee
# when the kick ends, walking again with row 6 (00E148 "tst.b ($33,A0)", 00E198 "move.b #$1, ($4,A0)", 00E1A2 "moveq #$6,
# D0")
00E148  func  krang_kick_end
# when he has drawn back his arm: the arm thrown out (00E168 "movea.l $ecd0.l, A6"), the fist flies off (00E174
# "move.b #$1, $6131b.l", 00E17C "bsr $eb8c"); he cannot be hit meanwhile (00E15E "bclr #$1, ($0,A0)")
00E152  func  krang_punch_throw
# waits while the fist flies (00E182 "tst.b $6131b.l"), then can be hit and walks again with row 6
00E182  func  krang_punch_wait
# routine 3: his lasers (00E1AC "lea $e1c0.l, A6")
00E1A8  func  krang_fire_lasers
# when he has aimed: five lasers from the free objects 32-39 (00E9D8 "lea $62a00.l, A6", 00E9F0 "bsr $ea20"), sound 1B
# (00EA14 "move.w #$1b, D7"); he cannot be hit meanwhile (00E1D6 "bclr #$1, ($0,A0)")
00E1CC  func  krang_lasers_fire
# until every laser is on its way (00E1E4 "tst.b $6131a.l"), then 20 frames and he can be hit (00E1F2 "move.b #$14,
# ($30,A0)", 00E1F8 "bset #$1, ($0,A0)")
00E1E4  func  krang_lasers_wait
# then walking again with row 7 (00E200 "subq.b #1, ($30,A0)", 00E214 "moveq #$7, D0")
00E200  func  krang_lasers_end
# routine 4, struck by a turtle: a hit less (00E22C "subq.b #1, ($24,A0)"); with hits left, 10 bars again (1 for the
# last) and sound 82 (00E234 "move.b #$a, ($8,A0)", 00E25A "move.b #$82, D7"), routine 5; with none, sounds 00 and 8E
# and routine 6 (00E286 "move.b #$8e, D7", 00E290 "addq.b #2, ($4,A0)")
00E21A  func  krang_struck
# routine 5: the hit's animation, then hit_delay 12 frames and the next move with row 6 (00E2C8 "move.b #$c, ($2a,A0)",
# 00E2D4 "moveq #$6, D0")
00E2A8  func  krang_recoil
# routine 6: his end, by state (00E2DC "lea $e2f0.l, A6")
00E2DC  func  krang_explode
# 140 frames (00E300 "move.b #$8c, ($30,A0)") and his shadow (00E306 "lea $f66c.l, A6")
00E300  func  krang_explode_start
# then the body falling apart (00E322 "movea.l $ecbc.l, A6")
00E316  func  krang_explode_wait
# an explosion on him (00E35C "bne $10ee8": boss_start_explosion in a free object of 24-31), floating (00E338 "bsr
# $e46a"); 14 frames to the next (00E33C "move.b #$e, ($30,A0)")
00E330  func  krang_explode_burst
# in the air (00E36E "ori.b #$80, ($1,A0)"); after the 14 frames the next explosion, after ten routine 7 (00E388
# "cmpi.b #$a, ($2f,A0)", 00E392 "addq.b #1, ($4,A0)")
00E366  func  krang_explode_next
# routine 7: Krang's escape (00E39C "lea $e3b0.l, A6")
00E39C  func  krang_escape
# his pod (00E3C4 "movea.l $ecc0.l, A6"), sound B0, his balloon (00E3EA "jsr $30014.l": say_im_invincible)
00E3C4  func  krang_escape_start
# floating until that ends; then the pod takes off (00E3FE "movea.l $ecc4.l, A6", 00E40A "move.w #$280, ($1e,A0)")
00E3F6  func  krang_escape_wait
# it dips, slower each frame (00E41A "sub.w D7, ($10,A0)", 00E41E "subi.w #$20, ($1e,A0)"); then sound 11 and it flies
# (00E428 "move.w #$11, D7", 00E43E "move.w #$500, ($1e,A0)")
00E416  func  krang_escape_dip
# up off the screen (00E44E "add.w D7, ($10,A0)", 00E452 "cmpi.w #-$1000, ($10,A0)")
00E44A  func  krang_escape_fly
# one enemy less (00E45E "subq.b #1, $6120c.l") and gone
00E45E  func  krang_gone
# floating: his height 0x4000 plus a wave by frame_count (00E46A "lea $e48a.l, A6", 00E480 "addi.w #$4000, D7")
00E46A  func  krang_hover
# his next move at random by the chances of the row D0 (00E4D8 "lea $e4fe.l, A6", 00E4E2 "sub.b (A6,D6.w), D7"): walk
# at a turtle, walk on, charge or the pose (the table at 00E51E)
00E4CA  func  krang_pick_move
# a target (00E58E "jsr $11dfa.l": none, the pose) and walking at it (00E5AC "move.w #$100, ($4,A0)", 00E5B2 "movea.l
# $eca4.l, A6")
00E58E  func  krang_start_walk
# walking on (00E5D0 "move.w #$101, ($4,A0)")
00E5BE  func  krang_start_walk_on
# a charge (00E5EA "move.w #$102, ($4,A0)")
00E5D8  func  krang_start_charge
# the pose (00E5F6 "move.w #$103, ($4,A0)", 00E618 "movea.l $ecb4.l, A6"), its sound 8F once in a row (00E5FC "tst.b
# $6131c.l", 00E60E "move.w #$8f, D7")
00E5F2  func  krang_start_pose
# the kick (00E62E "move.w #$200, ($4,A0)", 00E662 "movea.l $eca8.l, A6"), turned to the close turtle, sound 08
00E624  func  krang_start_kick
# lasers at the steepest angle (00E674 "move.b #$2, ($2f,A0)", 00E67A "move.w #$300, ($4,A0)")
00E66E  func  krang_start_lasers_steep
# lasers at the middle angle (00E68C "move.b #$1, ($2f,A0)")
00E686  func  krang_start_lasers
# lasers at the shallowest angle (00E6A4 "clr.b ($2f,A0)", 00E6A8 "move.w #$300, ($4,A0)")
00E69E  func  krang_start_lasers_far
# the punch: drawing back his arm (00E6DA "move.w #$201, ($4,A0)", 00E6E0 "movea.l $ecb0.l, A6")
00E6D0  func  krang_start_punch
# move_time at random from the table at 00E700 (00E6F2 "lea $e700.l, A6", 00E6F8 "move.b (A6,D7.w), ($31,A0)")
00E6EC  func  krang_set_move_time
# aims the charge: the speeds of 0x300 by the direction to his target (00E708 "jsr $184d2.l", 00E70E "lea $e790.l, A6")
00E708  func  krang_aim_charge
# aims the walk: the speeds of 0x200 (00E718 "jsr $184d2.l", 00E71E "lea $e750.l, A6")
00E718  func  krang_aim_walk
# x_speed and y_speed from the table by the direction, turned the way he goes (00E72A "move.w D7, ($1a,A0)", 00E748
# "ori.b #$40, ($0,A0)")
00E724  func  krang_set_speeds
# hit_delay counted down to his being hittable (00E7E0 "subq.b #1, ($2a,A0)"); under 30 hits he flashes, faster under 20
# and 10 (00E7F8 "moveq #$3c, D7", 00E804 "moveq #$8, D7", 00E810 "moveq #$1, D7")
00E7D0  func  krang_count_down
# move_by_speeds, kept within 0x1000-0x8000 up and down the screen and pushed on past the left edge (00E838 "move.l
# #$8000, ($16,A0)", 00E84C "move.l #$1000, ($16,A0)", 00E85C "addi.l #$800, ($12,A0)")
00E826  func  krang_move
# a turtle in play within 0x0B up or down and 0x3A across of him (00E89E "cmpi.w #$b, D5", 00E8B8 "cmpi.w #$3a, D5")
00E866  func  krang_find_close_turtle
# a turtle in play within 0x0B up or down and 0x3E or more in front of him (00E910 "btst #$6, ($0,A0)", 00E940 "cmpi.w
# #$3e, D5")
00E8D0  func  krang_find_turtle_in_front
# the laser D0 of the stream: in use, kind 67 (00EA26 "move.w #$6700, ($2,A6)"), at Krang's place plus the offsets of
# the table at 00EA9E by the angle (00EA3C "lea $ea9e.l, A5"), flipped with him, the angle its parameter (00EA8C
# "move.b ($2f,A0), ($3,A6)"); one more laser on its way (00EA96 "addq.b #1, $6131a.l")
00EA20  func  krang_start_laser
# the fist from the free objects 24-31 (00EB8C "lea $62780.l, A6"), kind 66, 0x45 in front of him at height 0x32
# (00EBBA "move.w #$4500, D7", 00EBDE "move.w #$3200, ($10,A6)"); it sets his own flip, not the fist's (00EBF2 "ori.b
# #$40, ($0,A0)"), which he has already
00EB8C  func  krang_start_fist

# -- kind 66: Krang's fist --
# routine 0: drawn, its stats (00EC04 "lea $182e4.l, A6"), 0x680 across (00EC16 "move.w #$680, ($1a,A0)"), the other
# way when flipped (00EC36 "not.w ($1a,A0)")
00EBFE  func  krang_fist_start
# routine 1: when it has come off, flying (00EC54 "movea.l $f678.l, A6"), sound 06, hurting (00EC6A "ori.b #$4,
# ($0,A0)")
00EC4C  func  krang_fist_launch
# routine 2: across until it is off the screen (00EC76 "btst #$5, ($0,A0)"); then Krang's punch is over (06131B)
00EC76  func  krang_fist_fly

# -- kind 67: Krang's lasers --
# routine 0: drawn and hurting (00EAB6 "ori.b #$84, ($0,A0)"), its speeds and animation by the angle (00EACE "lea
# $eb1e.l, A6", 00EB00 "lea $f760.l, A6")
00EAB6  func  krang_laser_start
# routine 1: its delay (00EB2A "subq.b #1, ($30,A0)"); then on its way (00EB36 "subq.b #1, $6131a.l")
00EB2A  func  krang_laser_wait
# routine 2: down to the floor (00EB44 "tst.w ($10,A0)"); the last one sparks there (00EB64 "movea.l $f76c.l, A6"), the
# others are gone
00EB3E  func  krang_laser_fly
# routine 3: gone when the spark ends (00EB70 "tst.b ($33,A0)")
00EB70  func  krang_laser_spark

# -- kind 68: the curtain --
# routine 0: drawn, colour 8 (00E968 "move.w #$800, ($42,A0)"), shimmering (00E97A "movea.l $15e02.l, A6"); Krang
# watches it (00E986 "move.l A0, $61314.l")
00E962  func  krang_curtain_start
# routine 1: when that ends, sound 16 and it breaks up (00E99A "move.w #$16, D7", 00E9A4 "movea.l $15e06.l, A6")
00E992  func  krang_curtain_open
# routine 2: gone when that ends (00E9B6 "tst.b ($33,A0)", 00E9BE "jmp $1832a.l")
00E9B6  func  krang_curtain_end

# ======== the sewer's traps (area 3: kinds 50, 51, 52) ========
# kind 52 spiked_pole: six spiked poles hanging in a row across the sewer (area 3, the records at 05DDFC-05DE24, 0x0B
#   apart, height 0x80; rendered 01583C: a pole with spikes), which drop to just over the floor and rise again, all
#   together (061310 their phase), knocking turtles flying (its record 018258: attack 07); every 16 frames the ones
#   that hurt swap (011284 "bchg #$2, ($0,A0)"): those with an odd parameter start hurting (011126 "ori.b #$4,
#   ($0,A0)"); the first (parameter 80) starts them when it is on the screen, the ones with a parameter time them
# kind 51 sewer_launcher: something under the sewer's water (area 3, two records, not drawn: 01129C "bclr #$7,
#   ($0,A0)") that drifts up and down the screen; when a turtle is level with it and 0x30 or more across, ripples show
#   (0157A4) and a missile (kind 50) leaps out at it, then it hides 100 frames; twelve missiles and it is gone
# kind 50 sewer_missile: the missile: it rises out of the water to height 0x20 (011498-0114CC), then flies across at
#   0x480 at the turtle, knocking it flying (its record 01824E: attack 07); a turtle's hit bursts it (014C3A)

# frames counted down: the phases' times kept by the poles with a parameter (011188 "move.b #$a, ($30,A0)", 0111EE
# "move.b #$28, ($30,A0)", 011268 "move.b #$1e, ($30,A0)", 01119C "subq.b #1, ($30,A0)")
scoped object spiked_pole 30 timer u8
# bit 0: it drifts down the screen, else up; turned at y 0x800 and 0x4000 (011380 "move.b ($2f,A0), D7", 0113B6 "bchg
# #$0, ($2f,A0)")
scoped object sewer_launcher 2F drift u8
# frames before it fires: 40 at first, 100 after each missile (0112B8 "move.b #$28, ($30,A0)", 011354 "move.b #$64,
# ($30,A0)", 011330 "subq.b #1, ($30,A0)")
scoped object sewer_launcher 30 delay u8
# the missiles still to fire, less one (0112BE "move.b #$c, ($31,A0)", 01135E "subq.b #1, ($31,A0)")
scoped object sewer_launcher 31 missiles_left u8
# 1 when its turtle is to the right (011470 "move.b #$1, ($2f,A6)"): it flies right (0114DE "tst.b ($2f,A0)")
scoped object sewer_missile 2F goes_right u8

# -- kind 52: the spiked poles --
# routine 0: drawn, hurting by the parameter, its stats (01112C "lea $18258.l, A6"), the phase 0 (011142 "clr.b
# $61310.l")
011116  func  spiked_pole_start
# routine 1: the first starts the drops when it is under 0x160 on the screen (011166 "cmpi.w #$160, ($c,A0)", 011170
# "move.b #$1, $61310.l"); then all of them wait 10 frames
01115A  func  spiked_pole_wait
# routine 2: up; the timers' frames, then phase 2: the drop at 0x600 (0111A4 "move.b #$2, $61310.l", 0111B8 "move.w
# #$600, ($1e,A0)")
011190  func  spiked_pole_hold_up
# routine 3: down to height 0x18 (0111CE "sub.w D7, ($10,A0)", 0111D2 "cmpi.w #$1800, ($10,A0)"); sound 24 and 40 frames
# down (0111FC "move.b #$24, D7")
0111C6  func  spiked_pole_drop
# routine 4: down; then phase 4: up at 0x300 (01121C "move.b #$4, $61310.l", 011230 "move.w #$300, ($1e,A0)")
011208  func  spiked_pole_hold_down
# routine 5: up to height 0x80 (01124A "cmpi.w #-$8000, ($10,A0)"), routine 2 again with 30 frames (01125A "move.b #$2,
# ($4,A0)", 011268 "move.b #$1e, ($30,A0)")
01123E  func  spiked_pole_rise
# every 16 frames it hurts or stops hurting (011276 "move.b $600a5.l, D7", 011284 "bchg #$2, ($0,A0)")
011276  func  spiked_pole_swap_hurting

# -- kind 51: the launcher under the water --
# routine 0: not drawn, its stats (0112A2 "lea $181a4.l, A6"), 40 frames, 12 missiles (0112BE "move.b #$c, ($31,A0)")
01129C  func  sewer_launcher_start
# routine 1: drifting; after its delay, a turtle in line (0112F2 "bsr $113c6"): a missile from the free objects 32-39
# (0112FE "lea $62a00.l, A6", 011316 "bsr $1144a"), and the ripples drawn (01131E "ori.b #$80, ($0,A0)", 011324
# "movea.l $157a4.l, A6")
0112DA  func  sewer_launcher_wait
# routine 2: when the ripples end, hidden 100 frames (01134E "bclr #$7, ($0,A0)", 011354 "move.b #$64, ($30,A0)");
# with no missile left, gone (01135E "subq.b #1, ($31,A0)")
01133A  func  sewer_launcher_fired
# routine 3, and gone off the screen or out of missiles (011374 "bra $1832a")
011374  func  sewer_launcher_remove
# up or down the screen by drift (011378 "lea $113be.l, A6", 01139A "add.l D7, ($16,A0)"), turned at its edges
011378  func  sewer_launcher_drift
# a turtle in play within 4 up or down and 0x30 or more across (0113FE "cmpi.w #$4, D5", 01141A "cmpi.w #$30, D5"): its
# bit, bit 7 when it is to the left
0113C6  func  sewer_launcher_find_turtle
# the missile: kind 50 (011450 "move.w #$5000, ($2,A6)") at the launcher's place, turned to the turtle (011476 "ori.b
# #$40, ($0,A6)")
01144A  func  sewer_launcher_start_missile

# -- kind 50: the missile --
# routine 0: drawn, hurting, can be hit (01147E "ori.b #$86, ($0,A0)"), its stats (011484 "lea $1824e.l, A6"), rising
# at 0x200 (01149E "move.w #$200, ($1e,A0)"), sound 0E
01147E  func  sewer_missile_start
# routine 1: up to height 0x20, then across at 0x480 (0114CC "cmpi.w #$2000, ($10,A0)", 0114DA "move.w #$fb80, D7")
0114C6  func  sewer_missile_rise
# routine 2: across until it is off the screen (0114F6 "bsr $182ee", 0114FA "bra $1831e")
0114F6  func  sewer_missile_fly
# routine 3: gone (0114FE "bra $1832a")
0114FE  func  sewer_missile_remove
# routine 4, struck: it neither hurts nor can be hit (011502 "bclr #$2, ($0,A0)", 011508 "bclr #$1, ($0,A0)"), sound
# 0F and its burst (01151C "movea.l $14c3a.l, A6")
011502  func  sewer_missile_struck
# routine 5: gone when the burst ends (011528 "tst.b ($33,A0)")
011528  func  sewer_missile_vanish

# ---- comments ----
comment set_object_stats an object's attack, health, depth and the sound a turtle it hits makes, from its record
comment move_by_speeds moves the object by its speeds across, up or down the screen, and in height
comment find_free_object finds an object not in use among the next ones
comment remove_if_off_screen the object is gone once it is off the screen
comment remove_object the object is gone: out of use
comment place_at_object puts the other object where this one is
comment boss_pick_target picks one of the turtles in play at random as the boss's target and aims at it; none, none picked
comment boss_aim_at_target sets the boss's speeds toward its target and turns it that way
comment boss_direction_to_target the direction, one of sixteen, from the boss to its target
comment queue_sound queues a sound or a voice for the sound board, when the game lets sounds play; never a music
comment queue_sound_command puts a command into the sound board's queue
comment queue_sound_d0 queue_sound with the sound in another register
comment krang_appear Krang's appearance, step by step
comment krang_appear_setup Krang stands ready, with his hits by the number of players
comment krang_appear_wait Krang waits for the curtain to go, then raises his arms
comment krang_appear_end Krang can be hit and starts his first move
comment krang_walk Krang walks; with a turtle close by, he may kick it, fire steep lasers or pose instead
comment krang_walk_at_target Krang walks at his target a while
comment krang_walk_on Krang walks on at his target a while
comment krang_charge Krang runs at his target a while
comment krang_pose_end Krang's pose ends and he picks his next move
comment krang_walk_step every 16 frames Krang aims again, and he moves every other frame
comment krang_next_move with a turtle in front of him Krang fires lasers, punches or poses; else he picks another walk
comment krang_melee Krang's kick or punch, step by step
comment krang_kick_end Krang's kick ends and he walks again
comment krang_punch_throw Krang throws his arm out and his fist flies off it
comment krang_punch_wait Krang waits for his fist to fly off the screen
comment krang_fire_lasers Krang's lasers, step by step
comment krang_lasers_fire Krang fires a stream of five lasers
comment krang_lasers_wait Krang waits for all his lasers to be on their way
comment krang_lasers_end after his lasers Krang walks again
comment krang_struck a turtle's attack takes one of Krang's hits; with none left he starts to burst
comment krang_recoil Krang recovers from a hit and goes on
comment krang_explode Krang's end, step by step
comment krang_explode_start Krang stops, with his shadow, before he bursts
comment krang_explode_wait Krang's body falls apart
comment krang_explode_burst an explosion bursts on Krang's body as it floats
comment krang_explode_next the next of Krang's ten explosions
comment krang_escape Krang's escape, step by step
comment krang_escape_start Krang's head comes out in his pod, saying he is invincible
comment krang_escape_wait the pod floats a while, then takes off
comment krang_escape_dip the pod dips, slower and slower
comment krang_escape_fly the pod flies up off the screen
comment krang_gone Krang is gone: one enemy less
comment krang_hover Krang floats up and down
comment krang_pick_move picks Krang's next walk, charge or pose by its chances
comment krang_start_walk Krang picks a turtle and walks at it; with none, he poses
comment krang_start_walk_on Krang walks on at his target
comment krang_start_charge Krang runs at his target
comment krang_start_pose Krang poses, with his cry the first time in a row
comment krang_start_kick Krang kicks the turtle close to him
comment krang_start_lasers_steep Krang aims his lasers steeply, at a turtle close by
comment krang_start_lasers Krang aims his lasers at the middle angle
comment krang_start_lasers_far Krang aims his lasers at the shallowest angle, far in front of him
comment krang_start_punch Krang draws back his arm to punch
comment krang_set_move_time how long Krang's walk lasts, at random
comment krang_aim_charge aims Krang's run at his target
comment krang_aim_walk aims Krang's walk at his target
comment krang_set_speeds Krang's speeds in the direction picked, and he turns that way
comment krang_count_down Krang can be hit again after a while; weak, he flashes faster and faster
comment krang_move Krang moves, kept on the floor and on the screen
comment krang_find_close_turtle which turtle is close to Krang, and on which side
comment krang_find_turtle_in_front which turtle is level with Krang and in front of him, far enough
comment krang_start_laser one laser of Krang's stream, from his body at the angle he aims
comment krang_start_fist Krang's fist flies off his arm
comment krang_fist_start Krang's fist sets off across the screen
comment krang_fist_launch the fist comes off and flies, hurting
comment krang_fist_fly the fist flies across; off the screen, Krang's punch is over
comment krang_laser_start a laser of Krang's stream, at its angle
comment krang_laser_wait the laser waits its turn in the stream
comment krang_laser_fly the laser goes down to the floor; the stream's last one sparks there
comment krang_laser_spark the laser's spark ends and it is gone
comment krang_curtain_start the curtain where Krang appears shimmers
comment krang_curtain_open the curtain breaks up
comment krang_curtain_end the curtain is gone, and Krang starts
comment spiked_pole_start a spiked pole hangs over the sewer
comment spiked_pole_wait the first pole on the screen starts the row dropping
comment spiked_pole_hold_up the poles wait up a while, then drop
comment spiked_pole_drop the pole drops to just over the floor
comment spiked_pole_hold_down the poles wait down a while, then rise
comment spiked_pole_rise the pole rises back up
comment spiked_pole_swap_hurting the poles that hurt and the ones that do not swap now and then
comment sewer_launcher_start something lies hidden under the sewer's water
comment sewer_launcher_wait it drifts under the water; with a turtle in line, a missile leaps out at it
comment sewer_launcher_fired its ripples end and it hides a while; out of missiles, it is gone
comment sewer_launcher_remove the launcher is gone
comment sewer_launcher_drift it drifts up and down the screen under the water
comment sewer_launcher_find_turtle which turtle is in line with it across the water, far enough
comment sewer_launcher_start_missile a missile leaps out at the turtle
comment sewer_missile_start the missile rises out of the water
comment sewer_missile_rise the missile rises, then flies at the turtle
comment sewer_missile_fly the missile flies across until it leaves the screen
comment sewer_missile_remove the missile is gone
comment sewer_missile_struck a turtle's attack bursts the missile
comment sewer_missile_vanish the missile's burst ends and it is gone

# ---- the pointers where these objects' code works them out ----
# the lasers krang_lasers_fire starts (find_free_object from the objects 32-39) and krang_start_laser fills
local krang_lasers_fire 00E9D8,00E9E4 a6 laser object.krang_laser
param krang_start_laser a6 laser object.krang_laser
# the fist krang_start_fist starts (find_free_object from the objects 24-31)
local krang_start_fist 00EB8C,00EB98 a6 fist object.krang_fist
# the missile the launcher starts
param sewer_launcher_start_missile a6 missile object.sewer_missile


# ======== the scenery, the hazards and the explosions (00F8DA-011115) ========
# The kinds of the kind table (053896) whose routines are at 00F8DA-011115: scenery of the areas a turtle can break or
# knock away, hazards that hit the turtles (and the enemies: the attack check's third loop), and the explosions. What
# each kind is comes from its code, its spawn records (area_spawn_lists: +6 the kind, +7 the parameter) and its
# animations, rendered from the addresses its set_animation calls take. Their stats come from set_object_stats'
# 10-byte records (+0 attack and hit, +2 health_bars, health and damage, +6 depth, +8 the hit sound). "Struck" is
# routine 4, which the attack check sets on an object a turtle's attack hits (0472CE "move.w #$400, ($4,A1)"); "gone
# off the screen" is remove_if_off_screen (flags bit 5). A turtle's reaction to an attack is turtle_hit's table at
# 01C272: attack 04 knocked down, 07 knocked flying, 09 frozen in a block of ice (the turtle's state 1C, then 1D
# breaking out: rendered), 0A electrocuted (state 1E, the skeleton flashing: rendered), 11-13 turtle_refill_health.
#
# kind 63 ball_dropper: an unseen spot high up in area 0 (one spawn record, height C0) that drops four balls (kind
#   60) as the screen reaches it: screen x 0x140, 0x100, 0xD0, 0xA0 (the table at 00F938 by balls_left)
# kind 60 ball: a dark ball that drops from the dropper's height and bounces away, back and to the right, knocking
#   flying the turtles it hits (attack 07); it cannot be hit (00F94C starts it: 00F952 "move.w #$6000, ($2,A6)")
# kind 61 road_barrier: a striped barrier lying across the highway (area 5, six records): parameter 0 the barrier,
#   drawn and harmless; parameter 1 one of its hit boxes, not drawn, knocking turtles down (attack 04)
# kind 62 tire_stack: tires lying on the highway (area 5, four records): two stacked by parameter 0, one by 1;
#   harmless, it cannot be hit
# kind 6E technodrome_ball: the ball of area 8 (ten records along a diagonal, at heights in a wave): it moves along
#   the diagonal every frame, drops in and bounces off to the right, knocking turtles flying (attack 87)
# kind 20 hydrant: a fire hydrant of area 2 (two records): when its four bars are gone it breaks and sprays four jets
#   of water (kind 21) the way the last hit sent it
# kind 21 hydrant_water: a jet of water from a broken hydrant, weaker each time (three animations, 0144E8 by its
#   jet), flying across at 0x580 (00FCD0 starts it: 00FCD6 "move.w #$2100, ($2,A6)")
# kinds 22, 59 and 5A roadside: things by the road a turtle's hit sends flying, knocking down what they hit (attack
#   84): kind 22 a parking meter (area 2, five records; its record 01452A), kind 59 a "20 MPH" speed limit sign on a
#   pole (area 4, one record; 01456A), kind 5A a traffic cone (area 4, six records; 015AF6); each record holds the
#   standing animation and then the one knocked flying
# kind 23 rat: a sewer rat (area 3, five records) that drops in, then runs, stops with a squeak, runs again; harmless
# kind 24 alligator: an alligator swimming slowly left in the sewer's water (area 3, one record), which snaps its jaws
#   with sound 12 when it is under 0xC0 on the screen; harmless
# kind 25 skateboarder: a woman on a skateboard gliding across the street (area 2, one record; the board under her
#   feet in both frames): a turtle's hit makes her duck with a cry (speech BA); no scenario runs it
# kind 26 pizza: a pizza box (areas 2-5 one each, areas 7 and 8 three each, all parameter 02): taken, it opens with
#   its name and refills the turtle's health: its attack 11-13 by the parameter (the records at 010148) is turtle_hit's
#   turtle_refill_health; the opened boxes say SPEEDY, WHIRLY and ENERGY (parameters 0, 1, 2)
# kind 27 billboard: a "Stunner" billboard high up in area 2 (one record, height 0x40): at one of four places on the
#   screen two Foot soldiers (kind 2A) jump down from it and it topples onto the turtles (attack 07), then lies drawn
#   in the layer; no scenario runs it
# kind 2A billboard_soldier: a Foot soldier who jumps down from the billboard and then is a boomerang soldier (kind
#   0B) (010306 starts it: 01030C "move.w #$2a00, ($2,A6)")
# kind 28 oil_drum: a "DANGER" oil drum (area 4 two, area 7 three): when its three bars are gone its fuse is lit, it
#   blows up (an explosion of kind 33, knocking flying) and leaves its wreck (kind 2D)
# kind 2D oil_drum (wreck): the burnt drum left after the explosion (0104B6 "move.w #$2d00, ($2,A0)"), until it leaves
#   the screen
# kinds 29, 2B and 37 turret: a gun on top of a tall lattice column (area 7 two, area 8 three, all kind 2B; 29 and 37
#   have the same table, 01053C, and nothing starts them), which slides back and forth in depth and fires bursts of
#   four shots (kind 2C); when its four bars are gone it is destroyed and seven explosions (kind 31) climb its column
# kind 2C turret_shot: the turret's shot, four beads in a row, flying at 0x800 and knocking turtles down (attack 04),
#   a burst when it hits (0107C0 starts it: 0107C6 "move.w #$2c00, ($2,A6)")
# kind 4B waiting_soldier: a Foot soldier of area 7 (one record) standing with his back turned, blade raised, who is a
#   knife soldier (kind 03) once he is under 0x140 on the screen or a turtle hits him; no scenario runs it
# kind 5B one_way_sign: a ONE WAY sign on a pole in area 4 (one record): a turtle's hit spins it, and while it spins it
#   knocks flying what it hits (attack 07); it cannot be broken (its bars back to 16 at each hit)
# kind 2F nozzle_row: two little triangles on the Technodrome's floor (area 8, five records 0x40 apart), each the
#   head of a row of five nozzle places going into the screen (the lists at 010AB2 by the parameter): a turtle within
#   0x40 to its left and level with one of them makes a nozzle (kind 2E) come up there
# kind 2E freeze_nozzle: a nozzle that comes up out of the floor and sprays a cloud of gas to the left that freezes
#   turtles in ice (attack 09), then sinks back; it can be broken (010AF0 starts it: 010AF6 "move.w #$2e00, ($2,A6)")
# kind 30 electric_beam (electric): a tall vertical bolt of lightning in the Technodrome (area 8, two records), which
#   comes for 60 frames after a random wait and electrocutes turtles (attack 0A)
# kind 39 electric_vent (electric): an unseen spot on the floor of area 7 (three records) that now and then shoots an
#   electric column (kind 3A) up
# kind 3A electric_column (electric): a column that shoots up out of the floor, blinks, and goes on up out of sight,
#   electrocuting turtles (attack 0A, the electric beam's record values) (010D7A starts it: 010D80 "move.w #$3a00,
#   ($2,A6)")
# kind 40 grille: a slanted grille in two pieces (its frames); no spawn list, record or code starts kind 40, and the
#   address it leaves in 061302 (010E64 "move.l A0, $61302.l") nothing reads
# kind 31 explosion (small): a small explosion (up to 32 pixels); started harmless by the turret's wreck and the
#   broken nozzle (010ED6 "move.w #$3100, ($2,A6)"), attacking only by code no path reaches (011006)
# kind 32 explosion (big): a big explosion (up to 128 pixels), for the bosses' defeats (010F86 "move.w #$3200,
#   ($2,A6)"; also 010FD4)
# kind 33 explosion (drum): a big explosion, attacking (010F96 "move.w #$500, ($0,A6)", 010F9C "move.w #$3300,
#   ($2,A6)"): only the oil drum starts it
# kind 42 explosion (rocket): the rocket's explosion's animation (015258, which the rocket sets itself, 04C2EE
#   "movea.l $15258.l, A6", and so does code at 012824 and 013334); nothing starts kind 42
# kind 57 explosion (medium): an explosion up to 64 pixels (01101C "move.w #$5700, ($2,A6)"), started only from
#   func_013656 (0136B4 "bne $11016"), which no scenario runs
# All five explosions knock flying what they hit when they are started attacking (their record 018168: attack 07,
# damage 0x510).
#
# One function starts at the return of a call (00FC00, hydrant_spray_jet): hydrant_spray runs on into it.
# 010FEE (explode_small) is a routine no path reaches: the analysis takes it from its func line here.

# ---- the families' fields ----

# the balls still to drop, less one: 3 at the start (00F8EA "move.b #$3, ($2f,A0)"), one fewer at each ball (00F928
# "subq.b #1, ($2f,A0)"), gone after the last; it picks the screen x of the next ball (00F8FA "move.b ($2f,A0), D7",
# 00F904 "cmp.w ($c,A0), D7")
scoped object ball_dropper 2F balls_left u8

# frames its shadow is drawn after its first landing (00FB1C "move.b #$32, ($30,A0)", 00FB48 "subq.b #1, ($30,A0)",
# 00FB50 "bclr #$7, ($1,A0)": contacts bit 7 draws the shadow)
scoped object technodrome_ball 30 shadow_time u8

# frames counted down: to the next jet while it sprays (00FC0A "move.b #$4, ($30,A0)", 00FBDE "subq.b #1, ($30,A0)"),
# before it can be hit again after a hit (00FC2E "move.b #$28, ($30,A0)", 00FCA6 "subq.b #1, ($30,A0)")
scoped object hydrant 30 timer u8
# the jets still to spray: 4 when it breaks (00FC82 "move.b #$4, ($31,A0)", 00FBE6 "subq.b #1, ($31,A0)"); the jet's
# strength goes by it (00FD08 "cmpi.b #$3, ($31,A0)", 00FD18 "tst.b ($31,A0)")
scoped object hydrant 31 jets_left u8

# the jet: 0 the first and strongest, 1 the two in the middle, 2 the last (00FD04 "clr.b ($2f,A6)", 00FD12 "move.b #$1,
# ($2f,A6)", 00FD20 "addq.b #1, ($2f,A6)"), bit 7 to the left (00FD2E "ori.b #$80, ($2f,A6)"); its animation by it
# (00FD80 "move.b ($2f,A0), D7", 00FD84 "andi.b #$3, D7") and its way (00FD58 "tst.b ($2f,A0)", 00FD60 "not.w ($1a,A0)")
scoped object hydrant_water 2F jet u8

# frames counted down: running (00FFFA "move.w #$8, D7", 01000A "move.b (A6,D7.w), ($30,A0)": one of eight from 0xE0
# down to 8), sitting (00FF94 "move.b #$40, ($30,A0)", 00FFA0 "subq.b #1, ($30,A0)", 00FFC4 "subq.b #1, ($30,A0)")
scoped object rat 30 timer u8

# 1 once it said its "pizza time" (010142 "clr.b ($2f,A0)", 010162 "tst.b ($2f,A0)", 01016A "move.b #$1, ($2f,A0)")
scoped object pizza 2F announced u8

# the screen x the soldiers jump down at: one of four by the frame count (010216 "move.w $600a4.l, D7", 010226 "move.w
# (A6,D7.w), ($20,A0)", 01023A "move.w ($20,A0), D7" + 01023E "cmp.w ($c,A0), D7")
scoped object billboard 20 trigger_x u16

# bit 7: its sprites flipped across, for the soldier on the billboard's left (010342 "ori.b #$80, ($2f,A6)", 010366
# "tst.b ($2f,A0)", 01036E "ori.b #$40, ($0,A0)")
scoped object billboard_soldier 2F flipped u8
# frames counted down: before it jumps (010380 "move.b #$28, ($30,A0)", 010398 "subq.b #1, ($30,A0)"), crouched after
# the landing (0103E6 "move.b #$14, ($30,A0)", 0103F2 "subq.b #1, ($30,A0)")
scoped object billboard_soldier 30 timer u8

# frames counted down: before it can be hit again (0104D4 "move.b #$28, ($30,A0)", 010520 "subq.b #1, ($30,A0)"), its
# fuse (010512 "move.b #$3c, ($30,A0)", 010458 "subq.b #1, ($30,A0)"), the explosion (010464 "move.b #$1e, ($30,A0)",
# 010490 "subq.b #1, ($30,A0)")
scoped object oil_drum 30 timer u8

# while it works, bit 0 is the way it slides (010712 "move.b ($2f,A0), D7", 01071A "lsl.w #2, D7", 01076E "bchg #$0,
# ($2f,A0)"); destroyed, the explosions so far, seven in all, each one higher up its column (010658 "addq.b #1,
# ($2f,A0)", 01065C "cmpi.b #$7, ($2f,A0)", 010E82 "move.b ($2f,A0), D7")
scoped object turret 2F phase u8
# frames counted down: a random wait before a burst (0107A6 "move.b (A6,D7.w), ($30,A0)", 0105A2 "subq.b #1,
# ($30,A0)"), between shots (0105EC "move.b #$3, ($30,A0)"), between explosions (010622 "move.b #$4, ($30,A0)"),
# before it can be hit again (010686 "move.b #$28, ($30,A0)", 0106DA "subq.b #1, ($30,A0)")
scoped object turret 30 timer u8
# the shots of the burst still to fire (0105B0 "move.b #$4, ($31,A0)", 0105C8 "subq.b #1, ($31,A0)")
scoped object turret 31 shots_left u8

# 1 when its turret faces right: it flies right, flipped (0107FA "move.b #$1, ($2f,A6)", 010848 "tst.b ($2f,A0)",
# 010852 "bset #$6, ($0,A0)")
scoped object turret_shot 2F flipped u8

# 0 watching for a turtle, 1 a nozzle up, 2 its nozzle broken: the routine it runs by the table at 010A0E (0109EE
# "clr.b ($2f,A0)", 010A00 "move.b ($2f,A0), D7", 010AAA "move.b #$1, ($2f,A0)"); the nozzle sets it back through
# its row_status (010BF2 "clr.b ($0,A6)", 010C10 "move.b #$2, ($0,A6)")
scoped object nozzle_row 2F nozzle_status u8

# the address of its row's nozzle_status (010B10 "adda.w #$2f, A5", 010B14 "move.l A5, ($20,A6)", 010BEE "movea.l
# ($20,A0), A6", 010C0C "movea.l ($20,A0), A6")
# type: the nozzle_row's nozzle_status (+2F): 010B10 "adda.w #$2f, A5" 010B14 "move.l A5, ($20,A6)"
scoped object freeze_nozzle 20 row_status u32 object.nozzle_row+2F
# frames counted down: rising (010B3E "move.b #$15, ($30,A0)", 010B4A "subq.b #1, ($30,A0)"), before it sprays
# (010B5A "move.b #$a, ($30,A0)"), spraying (010B96 "move.b #$3c, ($30,A0)"), sinking (010BC6 "move.b #$15, ($30,A0)",
# 010BE0 "subq.b #1, ($30,A0)")
scoped object freeze_nozzle 30 timer u8

# the electric hazards (the beam, the vent and its column) share their random wait (010D48 "move.b (A5,D7.w),
# ($30,A0)"): frames counted down: the beam's wait and its time on (010C82 "subq.b #1, ($30,A0)", 010C92 "move.b #$3c,
# ($30,A0)", 010CBE "subq.b #1, ($30,A0)"), the vent's wait (010CFE "subq.b #1, ($30,A0)"), the column's blinking
# (010DDC "move.b #$30, ($30,A0)", 010DEC "subq.b #1, ($30,A0)")
scoped object electric 30 timer u8
# the vent's: 1 when its column is gone (010E22 "move.b #$1, ($2f,A6)", 010D36 "tst.b ($2f,A0)", 010D42 "clr.b
# ($2f,A0)")
scoped object electric 2F column_done u8
# the column's: the vent that shot it (010D9A "move.l A0, ($20,A6)", 010E1E "movea.l ($20,A0), A6")
scoped object electric 20 vent u32 object.electric

# ---- the functions ----

# -- kind 63: the ball dropper --
# routine 0: no stats (00F8DA "lea $182b2.l, A6"), four balls (00F8EA "move.b #$3, ($2f,A0)")
00F8DA  func  ball_dropper_start
# routine 1: at the screen x of the next ball (00F8F2 "lea $f938.l, A6", 00F904 "cmp.w ($c,A0), D7"), a ball from a
# free object (00F90C "lea $62140.l, A6", 00F924 "bsr $f94c"); gone after the last (00F928 "subq.b #1, ($2f,A0)",
# 00F930 "jmp $1832a.l")
00F8F2  func  ball_dropper_wait
# a ball (kind 60) at the dropper's place (00F952 "move.w #$6000, ($2,A6)", 00F95E "jsr $18574.l")
00F94C  func  ball_dropper_drop_ball

# -- kind 60: the ball --
# routine 0: drawn, attack 07, 16 bars (00F96A "ori.b #$80, ($0,A0)", 00F970 "lea $1829e.l, A6"), the ball (00F97C
# "movea.l $15d68.l, A6")
00F96A  func  ball_start
# routine 1: drops 0x480 a frame (00F98E "subi.w #$480, ($10,A0)"); under 0x30 it bounces away right and back with its
# shadow, sound 24, attacking (00F994 "cmpi.w #$3000, ($10,A0)", 00F9A8 "move.w #$1e0, ($1a,A0)", 00F9AE "move.w #$fe20,
# ($1c,A0)", 00F9B4 "move.w #$400, ($1e,A0)", 00F9C0 "lea $16660.l, A6", 00F9CA "move.b #$24, D7", 00F9D4 "ori.b #$4,
# ($0,A0)")
00F98E  func  ball_drop
# routine 2: moves, falls (00F9DC "jsr $182ee.l", 00F9E2 "subi.w #$60, ($1e,A0)"); gone behind the area's back (00F9E8
# "tst.w ($16,A0)", 00F9F0 "jmp $1832a.l"); each landing a bounce and sound 24 (00F9FE "move.w #$400, ($1e,A0)", 00FA08
# "move.b #$24, D7")
00F9DC  func  ball_bounce

# -- kind 61: the road barrier --
# routine 0: knocks down, damage 0x103 (00FA1C "lea $182bc.l, A6"); attacking and not drawn (00FA28 "ori.b #$4,
# ($0,A0)", 00FA2E "movea.l $15ec2.l, A6"), but parameter 0 drawn and harmless, the barrier (00FA34 "tst.b ($3,A0)",
# 00FA3C "bclr #$2, ($0,A0)", 00FA42 "ori.b #$80, ($0,A0)", 00FA48 "movea.l $15ebe.l, A6")
00FA1C  func  road_barrier_start
# routine 1: gone off the screen (00FA5A "jmp $1831e.l")
00FA5A  func  road_barrier_stay

# -- kind 62: the tires on the highway --
# routine 0: drawn, harmless (00FA68 "ori.b #$80, ($0,A0)", 00FA6E "lea $182c6.l, A6"), two tires, one by a parameter
# (00FA7A "movea.l $15eea.l, A6", 00FA88 "movea.l $15eee.l, A6")
00FA68  func  tire_stack_start
# routine 1: gone off the screen (00FA9A "jmp $1831e.l")
00FA9A  func  tire_stack_stay

# -- kind 6E: the ball of area 8 --
# routine 0: its colour, drawn, attack 87 (00FAB2 "move.w #$900, ($42,A0)", 00FABE "lea $182a8.l, A6"), the ball (00FACA
# "movea.l $15d68.l, A6")
00FAAC  func  technodrome_ball_start
# routine 1: drops 0x480 a frame and moves right 0x480 (00FAE2 "addi.l #$480, ($12,A0)", 00FAEA "subi.w #$480, ($10,A0)"); on
# the ground it bounces off to the right, with its shadow for a while, sound 24, attacking (00FAFC "move.w #$3c0,
# ($1a,A0)", 00FB06 "move.w #$4e0, ($1e,A0)", 00FB1C "move.b #$32, ($30,A0)", 00FB22 "move.b #$24, D7")
00FADC  func  technodrome_ball_drop
# routine 2: moves and falls (00FB3A "jsr $182ee.l", 00FB56 "subi.w #$40, ($1e,A0)"), its shadow until shadow_time runs
# out (00FB50 "bclr #$7, ($1,A0)"); gone past 0x1A0 on the screen (00FB5C "cmpi.w #$1a0, ($c,A0)"); each landing a
# bounce and sound 24 (00FB74 "move.w #$4e0, ($1e,A0)")
00FB34  func  technodrome_ball_bounce
# every frame: along the area's diagonal (00FB8A "addi.l #$400, ($12,A0)", 00FB92 "subi.l #$400, ($16,A0)")
00FB8A  func  technodrome_ball_drift

# -- kind 20: the fire hydrant --
# routine 0: drawn, can be hit, four bars (00FBB4 "ori.b #$82, ($0,A0)", 00FBBA "lea $180fa.l, A6"), the hydrant (00FBC6
# "movea.l $1443e.l, A6")
00FBB4  func  hydrant_start
# routines 1 and 3: gone off the screen (00FBD8 "jmp $1831e.l")
00FBD8  func  hydrant_stay
# routine 2: every 4 frames a jet while jets are left (00FBDE "subq.b #1, ($30,A0)", 00FBE6 "subq.b #1, ($31,A0)",
# 00FBEE "lea $62140.l, A6"); then routine 3 (00FC12 "addq.b #1, ($4,A0)")
00FBDE  func  hydrant_spray
# the return of 00FBFA "jsr $1830c.l": with a free object a jet and 4 frames to the next (00FC00 "tst.b D7", 00FC06
# "bsr $fcd0", 00FC0A "move.b #$4, ($30,A0)"), with none the spray ends; run_object_state's switch also holds it
00FC00  func  hydrant_spray_jet
# (batch 8a: run_object_state's switch no longer holds it, nor 00FA00, 00FFC0 and 00FFE0, three places in the middle of
# an instruction that symbols.txt named ball_land, rat_run_on and rat_squeak: four enemies' tables of states were read
# past their end into the arcs after them, 049BD8 enemy_long_jump_kick_arc, 04B36E, 04B4FC and 0519D8, whose words
# 0000FFE0, 0000FC00, 0000FFC0 and 0000FA00 decode; game_profile.py TABLE_ENDS_BEFORE_UNUSED)
# routine 4, struck: bars left, sound 5, a spark and it cannot be hit for a while (00FC1C "tst.b ($8,A0)", 00FC2E
# "move.b #$28, ($30,A0)", 00FC34 "andi.b #$fd, ($0,A0)", 00FC44 "movea.l $14442.l, A6"); none, it breaks the way the hit
# sent it, which the jets go by (00FC50 "clr.b $61300.l", 00FC5C "tst.b ($7,A0)", 00FC6A "move.b #$1, $61300.l"),
# routine 2 with four jets, no more stats (00FC78 "move.b #$2, ($4,A0)", 00FC82 "move.b #$4, ($31,A0)", 00FC88 "lea
# $18104.l, A6")
00FC1C  func  hydrant_struck
# routine 5: after timer it can be hit again (00FCA6 "subq.b #1, ($30,A0)", 00FCB4 "move.b #$1, ($4,A0)", 00FCC0 "ori.b
# #$2, ($0,A0)")
00FCA6  func  hydrant_recover
# a jet (kind 21) at the hydrant's place, 0x20 to the side it sprays, 10 up, its strength by jets_left (00FCD6 "move.w
# #$2100, ($2,A6)", 00FCE8 "move.w #$2000, D7", 00FCEC "tst.b $61300.l", 00FCFE "move.w #$a00, ($10,A6)", 00FD08
# "cmpi.b #$3, ($31,A0)")
00FCD0  func  hydrant_start_water

# -- kind 21: the hydrant's water --
# routine 0: drawn and attacking (00FD3A "move.b #$85, ($0,A0)", 00FD40 "lea $1810e.l, A6"), at 0x580 the way of its
# jet (00FD4C "move.w #$580, ($1a,A0)", 00FD58 "tst.b ($2f,A0)", 00FD60 "not.w ($1a,A0)"), its animation by it (00FD78
# "lea $144e8.l, A6", 00FD84 "andi.b #$3, D7"), sound 0E (00FD94 "move.b #$e, D7")
00FD3A  func  hydrant_water_start
# routine 1: on across until it is off the screen (00FDA4 "jsr $1831e.l", 00FDB0 "add.l D7, ($12,A0)")
00FDA4  func  hydrant_water_fly

# -- kinds 22, 59 and 5A: the parking meter, the speed limit sign and the traffic cone --
# kind 5A's routine 0: the cone's stats, depth 6 (00FDF2 "lea $18276.l, A6", 00FDF8 "bra $fe02")
00FDF2  func  roadside_cone_start
# routine 0 of kinds 22 and 59: the pole's stats, attack 84, depth 4 (00FDFC "lea $18118.l, A6")
00FDFC  func  roadside_pole_start
# the stats, drawn, can be hit (00FE02 "jsr $180e0.l", 00FE08 "ori.b #$82, ($0,A0)"), the standing animation of its
# kind's record (00FE14 "cmpi.b #$22, ($2,A0)", 00FE24 "cmpi.b #$59, ($2,A0)", 00FE2E "lea $15af6.l, A6", 00FE34
# "movea.l ($0,A6), A6")
00FE02  func  roadside_stand
# routine 1: gone off the screen (00FE44 "jsr $1831e.l")
00FE44  func  roadside_stay
# routine 2: flies on until it is off the screen (00FE4C "jsr $1831e.l", 00FE58 "add.l D7, ($12,A0)")
00FE4C  func  roadside_fly
# kind 59's routine 4, struck: the sign's record, at 0x500 (00FE5E "lea $1456a.l, A6", 00FE64 "move.w #$500, ($1a,A0)")
00FE5E  func  roadside_speed_sign_struck
# kind 5A's routine 4, struck: the cone's record, at 0x600 (00FE6E "lea $15af6.l, A6", 00FE74 "move.w #$600,
# ($1a,A0)")
00FE6E  func  roadside_cone_struck
# kind 22's routine 4, struck: the meter's record, at 0x400 (00FE7E "lea $1452a.l, A6", 00FE84 "move.w #$400, ($1a,A0)")
00FE7E  func  roadside_parking_meter_struck
# the way the hit sent it (00FE8A "tst.b ($7,A0)", 00FE98 "not.w ($1a,A0)"), knocked flying (00FEAA "movea.l ($4,A6),
# A6"), sound 5 (00FEB4 "move.b #$5, D7"), routine 2, attacking, it cannot be hit (00FEBE "move.b #$2, ($4,A0)", 00FEC4
# "andi.b #$fd, ($0,A0)", 00FECA "ori.b #$4, ($0,A0)")
00FE8A  func  roadside_knock_away

# -- kind 23: the rat --
# routine 0: drawn, harmless (00FEE2 "ori.b #$80, ($0,A0)", 00FEE8 "lea $181a4.l, A6"), runs at 0x1C0 right with
# parameter bit 7, else left (00FEF4 "move.w #$1c0, D7", 00FEFE "tst.b ($3,A0)"), its place by the parameter (00FF18
# "lea $ff60.l, A6", 00FF2A "sub.l D7, ($12,A0)"); running (00FF2E "movea.l $145a0.l, A6", 00FF34 "move.b #$3,
# ($4,A0)"), or dropping when it has a height (00FF3A "tst.w ($10,A0)", 00FF42 "movea.l $14598.l, A6", 00FF4E "move.w
# #$500, ($1e,A0)"); a random run (00FF5A "bsr $fffa")
00FEE2  func  rat_start
# routine 1: drops until it is under 0x18, then sits (00FF74 "sub.w D7, ($10,A0)", 00FF78 "cmpi.w #$1800, ($10,A0)",
# 00FF82 "movea.l $1459c.l, A6", 00FF94 "move.b #$40, ($30,A0)")
00FF70  func  rat_drop
# routine 2: after timer it runs again for a random time (00FFA0 "subq.b #1, ($30,A0)", 00FFA8 "movea.l $145a0.l,
# A6", 00FFB4 "bsr $fffa")
00FFA0  func  rat_sit
# routine 3: gone off the screen (00FFBE "jsr $1831e.l"), then runs
00FFBE  func  rat_run
# runs until timer runs out (00FFC4 "subq.b #1, ($30,A0)", 00FFD2 "add.l D7, ($12,A0)"), then sits with a squeak:
# sound 32, routine 2 (00FFD8 "movea.l $1459c.l, A6", 00FFE4 "move.b #$32, D7", 00FFF4 "subq.b #1, ($4,A0)")
00FFC4  func  rat_run_step
# one of eight run times (00FFFA "move.w #$8, D7", 00FFFE "jsr $48448.l", 010004 "lea $10012.l, A6")
00FFFA  func  rat_random_run_time

# -- kind 24: the alligator --
# routine 0: drawn, harmless (010026 "ori.b #$80, ($0,A0)", 01002C "lea $18122.l, A6"), swimming (010038 "movea.l
# $145fc.l, A6"), left at 0x40 (010044 "move.w #$ffc0, ($1a,A0)")
010026  func  alligator_start
# routine 1: under 0xC0 on the screen, sound 12 and its jaws snap (01005C "cmpi.w #$c0, ($c,A0)", 01006A "move.b #$12,
# D7", 010074 "movea.l $14600.l, A6")
010058  func  alligator_swim
# routine 2: swims on (010080 "bsr $10086")
010080  func  alligator_snap
# kinds 24 and 25: on across at x_speed until it is off the screen (010086 "jsr $1831e.l", 010092 "add.l D7, ($12,A0)")
010086  func  move_across_screen

# -- kind 25: the skateboarder --
# routine 0: drawn, can be hit, one bar (0100AC "ori.b #$82, ($0,A0)", 0100B2 "lea $18172.l, A6"), gliding left at
# 0x200 (0100BE "movea.l $1461a.l, A6", 0100CA "move.w #$fe00, ($1a,A0)")
0100AC  func  skateboarder_start
# routines 2 and 3, which no code sets, and the end of skateboarder_start: nothing (0100D4 "rts")
0100D4  func  skateboarder_idle
# routine 1: glides on (0100D6 "bsr $10086")
0100D6  func  skateboarder_glide
# routine 4, struck: she cannot be hit again, ducks with a cry, gliding on (0100DA "bclr #$1, ($0,A0)", 0100E0 "move.b
# #$1, ($4,A0)", 0100E6 "move.w #$ba, D7": speech, 0100F0 "movea.l $1461e.l, A6")
0100DA  func  skateboarder_struck

# -- kind 26: the pizza --
# routine 0: drawn, attacking (010108 "ori.b #$84, ($0,A0)"), its attack and box by the parameter (01010E "lea $10148.l,
# A6", 010126 "lea $14636.l, A6"), not announced (010142 "clr.b ($2f,A0)")
010108  func  pizza_start
# routine 1: under 0x170 on the screen, once, sound B7 and "pizza time" (010158 "cmpi.w #$170, ($c,A0)", 010170 "move.w
# #$b7, D7", 010198 "jsr $30054.l"); gone off the screen; taken (its attack hit), the open box, harmless, sound 19
# (0101A4 "btst #$3, ($0,A0)", 0101B4 "moveq #$4, D7", 0101C6 "andi.b #$fb, ($0,A0)", 0101CC "move.w #$19, D7")
010158  func  pizza_wait
# routine 2: gone when the open box's animation ends (0101DC "tst.b ($33,A0)", 0101E2 "jmp $1832a.l")
0101DC  func  pizza_vanish

# -- kind 27: the billboard --
# routine 0: drawn (0101F8 "ori.b #$80, ($0,A0)"), the board (01020A "movea.l $1480e.l, A6"), trigger_x by the frame
# count (010216 "move.w $600a4.l, D7", 010226 "move.w (A6,D7.w), ($20,A0)")
0101F8  func  billboard_start
# routine 1: at trigger_x two soldiers (01023E "cmp.w ($c,A0), D7", 010260 "bsr $10306", 01027E "bsr $10306"); it
# topples, attacking with attack 07 (010282 "ori.b #$4, ($0,A0)", 01028C "move.w #$480, ($1e,A0)", 0102A2 "lea
# $1812c.l, A6", 0102AE "movea.l $14812.l, A6")
01023A  func  billboard_wait
# routine 2: falls to the ground, sound 3E, harmless (0102C0 "sub.w D7, ($10,A0)", 0102CA "move.b #$3e, D7", 0102D4
# "andi.b #$fb, ($0,A0)")
0102BC  func  billboard_fall
# routine 3: the fallen board drawn in the layer, the object gone (0102E0 "lea $18854.l, A6", 0102EA "jsr $183fa.l",
# 0102F0 "jmp $1832a.l")
0102E0  func  billboard_land
# a soldier (kind 2A) at the board's place, 0x20 to the right, or to the left and flipped for the second, colour 6,
# counted as an enemy (01030C "move.w #$2a00, ($2,A6)", 010312 "move.w #$600, ($42,A6)", 01031E "move.w #$2000, D7",
# 010342 "ori.b #$80, ($2f,A6)", 010348 "addq.b #1, $6120c.l")
010306  func  billboard_start_soldier

# -- kind 2A: the soldier on the billboard --
# routine 0: drawn (010354 "move.b #$81, ($0,A0)"), crouched on the board (010386 "movea.l $14860.l, A6") for 0x28
# frames (010380 "move.b #$28, ($30,A0)")
010354  func  billboard_soldier_start
# routine 1: after timer, the jump (010398 "subq.b #1, ($30,A0)", 0103A2 "movea.l $14864.l, A6", 0103AE "move.w #$400,
# ($1e,A0)", 0103B4 "move.w #$100, ($1c,A0)")
010398  func  billboard_soldier_wait
# routine 2: down to the ground, then crouched 0x14 frames (0103C6 "sub.l D7, ($16,A0)", 0103CE "sub.w D7, ($10,A0)",
# 0103D6 "movea.l $14868.l, A6", 0103E6 "move.b #$14, ($30,A0)")
0103C0  func  billboard_soldier_jump_down
# routine 3: after timer the object is a boomerang soldier (kind 0B), one enemy fewer (its start counts it) (0103FC
# "move.l #$81000b00, ($0,A0)", 010408 "subq.b #1, $6120c.l")
0103F2  func  billboard_soldier_become_boomerang_soldier

# -- kind 28: the oil drum (2D its wreck) --
# routine 0: drawn, can be hit, three bars (01042C "ori.b #$82, ($0,A0)", 010432 "lea $1815e.l, A6"), the drum
# (01043E "movea.l $1488a.l, A6")
01042C  func  oil_drum_start
# routines 1 and 6, and kind 2D's routine 0: gone off the screen (010450 "jsr $1831e.l")
010450  func  oil_drum_stay
# routine 2: when the fuse burns out, the drum shakes in an explosion (kind 33, attacking) 2 behind it with sound 13
# (010458 "subq.b #1, ($30,A0)", 01046A "movea.l $14896.l, A6", 01048A "bne $10f96", 010F9C "move.w #$3300, ($2,A6)",
# 010FAE "subi.l #$200, ($16,A6)", 010FBE "move.b #$13, D7")
010458  func  oil_drum_blow_up
# routine 3: after the explosion, harmless, the wreck, kind 2D (010498 "andi.b #$f9, ($0,A0)", 0104AA "movea.l
# $1489a.l, A6", 0104B6 "move.w #$2d00, ($2,A0)")
010490  func  oil_drum_become_wreck
# routine 4, struck: bars left, it flashes and cannot be hit for a while (0104C2 "tst.b ($8,A0)", 0104D4 "move.b #$28,
# ($30,A0)", 0104EA "movea.l $1488e.l, A6"); none, sound 5 and its fuse lit for 60 frames (0104F6 "move.b #$5, D7",
# 010500 "movea.l $14892.l, A6", 010512 "move.b #$3c, ($30,A0)")
0104C2  func  oil_drum_struck
# routine 5: after timer it can be hit again (010520 "subq.b #1, ($30,A0)", 010534 "ori.b #$2, ($0,A0)")
010520  func  oil_drum_recover

# -- kinds 29, 2B and 37: the turret --
# routine 0: drawn, can be hit, with its shadow (010554 "ori.b #$82, ($0,A0)", 01055A "ori.b #$80, ($1,A0)", 010560
# "lea $16660.l, A6"), four bars (01056A "lea $1817c.l, A6"), flipped by parameter bit 7 (010582 "tst.b ($3,A0)"), a
# random wait (010590 "bsr $10796")
010554  func  turret_start
# routine 1: slides; after the wait a burst of four (01059E "bsr $106f6", 0105A2 "subq.b #1, ($30,A0)", 0105B0 "move.b
# #$4, ($31,A0)")
01059E  func  turret_move
# routine 2: slides; a shot every 4 frames (0105C8 "subq.b #1, ($31,A0)", 0105D0 "lea $62a00.l, A6", 0105E8 "bsr $107c0",
# 0105EC "move.b #$3, ($30,A0)"); after the last, routine 1 and a random wait (0105F4 "subq.b #1, ($4,A0)", 0105F8 "bsr
# $10796")
0105BC  func  turret_fire
# routine 3, destroyed: by its state (010602 "lea $10616.l, A6", 01060A "move.b ($5,A0), D7", 010614 "jmp (A6)")
010602  func  turret_wreck
# state 0: an explosion (kind 31) at the height of the next one and its sound (010628 "addq.b #1, ($5,A0)", 010E7A "lea
# $10eae.l, A5", 010E8C "bsr $10ed0", 010E90 "lea $10eaa.l, A6"); no free object, state 2 (010644 "move.b #$2,
# ($5,A0)")
010622  func  turret_wreck_explode
# state 1: after 4 frames the next one; after the seventh, state 2 (01064C "subq.b #1, ($30,A0)", 010658 "addq.b #1,
# ($2f,A0)", 01065C "cmpi.b #$7, ($2f,A0)")
01064C  func  turret_wreck_next
# state 2: gone off the screen (01066E "jmp $1831e.l")
01066E  func  turret_wreck_stay
# routine 4, struck: bars left, sound 5, it flashes and cannot be hit for a while (010674 "tst.b ($8,A0)", 010686
# "move.b #$28, ($30,A0)", 01069C "movea.l $14a2a.l, A6"); none, destroyed: no stats, the wreck, routine 3, harmless
# (0106A8 "lea $18186.l, A6", 0106B4 "movea.l $14a2e.l, A6", 0106C0 "move.b #$3, ($4,A0)", 0106CE "andi.b #$f9,
# ($0,A0)")
010674  func  turret_struck
# routine 5: slides; after timer it can be hit again (0106D6 "bsr $106f6", 0106DA "subq.b #1, ($30,A0)", 0106EE "ori.b
# #$2, ($0,A0)")
0106D6  func  turret_recover
# gone off the screen; slides across and in depth at the parameter's speed, the way of its phase (0106FC "lea $10776.l,
# A6", 010728 "add.l D6, ($12,A0)", 01072C "add.l D7, ($16,A0)"), and turns at the back and the front (01073A "cmpi.l
# #$7000, ($16,A0)", 010746 "cmpi.l #$1000, ($16,A0)", 01076E "bchg #$0, ($2f,A0)")
0106F6  func  turret_slide
# one of four waits (010796 "move.w #$4, D7", 01079A "jsr $48448.l", 0107A0 "lea $107ae.l, A6")
010796  func  turret_random_wait
# a shot (kind 2C) at the turret's place, 8 up, 0x20 ahead the way it faces (0107C6 "move.w #$2c00, ($2,A6)", 0107DC
# "addi.w #$800, ($10,A6)", 0107E2 "btst #$6, ($0,A0)", 0107F0 "subi.l #$2000, ($12,A6)", 010800 "addi.l #$2000,
# ($12,A6)")
0107C0  func  turret_start_shot

# -- kind 2C: the turret's shot --
# routine 0: drawn and attacking with its shadow (01080A "move.b #$85, ($0,A0)", 01081C "cmpi.b #$8, $60121.l"), attack
# 04 (010832 "lea $18190.l, A6"), at 0x800 left, or right when flipped (01083E "move.w #$f800, D7", 010848 "tst.b
# ($2f,A0)"), the shot and sound 0B (010864 "movea.l $14aa2.l, A6", 010870 "move.b #$b, D7")
01080A  func  turret_shot_start
# routine 1: gone off the screen (010880 "btst #$5, ($0,A0)"); its attack hit, the burst without its shadow (01088A
# "btst #$3, ($0,A0)", 0108A4 "bclr #$7, ($1,A0)", 0108AA "movea.l $14aa6.l, A6")
010880  func  turret_shot_fly
# routine 2: gone when the burst ends (0108B6 "tst.b ($33,A0)", 0108BA "beq $1832a")
0108B6  func  turret_shot_vanish

# -- kind 4B: the soldier waiting in area 7 --
# routine 0: drawn, can be hit, colour 7, one bar (0108D4 "ori.b #$82, ($0,A0)", 0108DA "move.w #$700, ($42,A0)", 0108E0
# "lea $1819a.l, A6"), his pose (0108F0 "movea.l $156fe.l, A6")
0108D4  func  waiting_soldier_start
# routines 1-3: under 0x140 on the screen he is a knife soldier (0108FC "cmpi.w #$140, ($c,A0)"); gone off the screen
# (010906 "jmp $1831e.l")
0108FC  func  waiting_soldier_wait
# routine 4 (struck) and on the screen: the object is a knife soldier, kind 03 (01090C "move.l #$81000300, ($0,A0)")
01090C  func  waiting_soldier_become_knife_soldier

# -- kind 5B: the ONE WAY sign --
# routine 0: drawn, can be hit, attack 07, 16 bars (01092E "ori.b #$82, ($0,A0)", 010934 "lea $18280.l, A6"), the sign at
# rest (010940 "movea.l $15b36.l, A6")
01092E  func  one_way_sign_start
# routine 1: gone off the screen (010952 "jmp $1831e.l")
010952  func  one_way_sign_stay
# routine 2: when the spin ends, harmless and it can be hit again (010958 "tst.b ($33,A0)", 010960 "bclr #$2, ($0,A0)",
# 010966 "bset #$1, ($0,A0)", 01096C "subq.b #1, ($4,A0)")
010958  func  one_way_sign_spin
# routine 3, which no code sets, and the end of one_way_sign_spin: nothing (010970 "rts")
010970  func  one_way_sign_idle
# routine 4, struck: spins one way or the other by the hit (010972 "lea $15b36.l, A6", 010978 "tst.b ($7,A0)", 010980
# "adda.l #$4, A6", 010998 "movea.l ($4,A6), A6"), sound 5, attacking, its 16 bars back (0109B2 "move.w #$1001,
# ($8,A0)", 0109B8 "bset #$2, ($0,A0)", 0109BE "bclr #$1, ($0,A0)")
010972  func  one_way_sign_struck

# -- kind 2F: the row of nozzles --
# routine 0: drawn, the triangles (0109D2 "ori.b #$80, ($0,A0)", 0109E2 "movea.l $156f0.l, A6"), watching (0109EE "clr.b
# ($2f,A0)")
0109D2  func  nozzle_row_start
# routine 1: by nozzle_status (0109F8 "lea $10a0e.l, A6", 010A00 "move.b ($2f,A0), D7", 010A0A "jmp ($0,A6)")
0109F8  func  nozzle_row_run
# nozzle_status 0: gone off the screen; each turtle in play and not struck (010A40 "btst D6, $600a1.l", 010A4A "cmpi.b
# #$4, ($4,A5)") within 0x40 to its left (010A60 "cmpi.w #$40, D5") and 8 of one of its places (010A1E "lea $10ab2.l,
# A6", 010A6C "sub.w D0, D5", 010A78 "cmpi.w #$8, D5"): a nozzle there, nozzle_status 1 (010AA6 "bsr $10af0", 010AAA
# "move.b #$1, ($2f,A0)")
010A1A  func  nozzle_row_watch
# nozzle_status 1, a nozzle up: gone off the screen (010AD0 "bra $1831e")
010AD0  func  nozzle_row_wait
# nozzle_status 2, its nozzle broken, and routine 2: gone off the screen (010AD4 "bra $1831e")
010AD4  func  nozzle_row_done
# a nozzle (kind 2E) at the row's place less the place's offset in y, given the address of nozzle_status (010AF6
# "move.w #$2e00, ($2,A6)", 010B0A "sub.l D0, ($16,A6)", 010B14 "move.l A5, ($20,A6)")
010AF0  func  nozzle_row_start_nozzle

# -- kind 2E: the freezing nozzle --
# routine 0: drawn, attack 09 (010B22 "ori.b #$80, ($0,A0)", 010B28 "lea $181ae.l, A6"), coming up (010B32 "movea.l
# $14ad6.l, A6", 010B3E "move.b #$15, ($30,A0)")
010B22  func  freeze_nozzle_start
# routine 1: up, it can be hit (010B4A "subq.b #1, ($30,A0)", 010B54 "ori.b #$2, ($0,A0)", 010B5A "move.b #$a, ($30,A0)")
010B4A  func  freeze_nozzle_rise
# routine 2: by its state (010B6A "lea $10b7e.l, A6", 010B72 "move.b ($5,A0), D7", 010B7C "jmp (A6)")
010B6A  func  freeze_nozzle_spray
# state 0: after timer, attacking, sound 1F, the cloud for 60 frames (010B90 "ori.b #$4, ($0,A0)", 010B96 "move.b #$3c,
# ($30,A0)", 010BA0 "move.b #$1f, D7", 010BAA "movea.l $14ada.l, A6")
010B86  func  freeze_nozzle_spray_start
# state 1: after timer, harmless, it sinks (010BC0 "andi.b #$f9, ($0,A0)", 010BC6 "move.b #$15, ($30,A0)", 010BD4
# "movea.l $14ade.l, A6")
010BB6  func  freeze_nozzle_spray_stop
# routine 3: after timer gone, its row watching again (010BE0 "subq.b #1, ($30,A0)", 010BEA "bsr $1832a", 010BF2 "clr.b
# ($0,A6)")
010BE0  func  freeze_nozzle_sink
# routine 4, struck: harmless, its row done (010C02 "andi.b #$f9, ($0,A0)", 010C10 "move.b #$2, ($0,A6)"), sound 5,
# broken (010C20 "movea.l $14ae2.l, A6"), a small explosion 0x10 up with sound 11 (010C40 "bne $10ebc", 010EBE "move.w
# #$1000, D7", 010EC6 "move.b #$11, D7")
010BF8  func  freeze_nozzle_struck
# routine 5: gone off the screen (010C46 "bra $1831e")
010C46  func  freeze_nozzle_broken

# -- kind 30: the electric beam --
# routine 0: in use only, not drawn (010C56 "move.b #$1, ($0,A0)"), attack 0A (010C5C "lea $181c2.l, A6"), a random wait
# (010C66 "lea $10d5a.l, A5", 010C6C "bsr $10d48")
010C56  func  electric_beam_start
# routine 1: gone off the screen; after the wait, drawn and attacking for 60 frames, sound 20, the beam (010C8C "ori.b
# #$84, ($0,A0)", 010C92 "move.b #$3c, ($30,A0)", 010C9C "move.w #$20, D7", 010CA6 "movea.l $14ba0.l, A6")
010C76  func  electric_beam_wait
# routine 2: gone off the screen; after timer, hidden with a new wait (010CBE "subq.b #1, ($30,A0)", 010CC8 "clr.b
# ($4,A0)", 010CCC "bra $10c56")
010CB2  func  electric_beam_shine

# -- kind 39: the electric vent --
# routine 0: in use only (010CDA "move.b #$1, ($0,A0)", 010CE0 "lea $181a4.l, A6"), a random wait (010CEA "lea $10d62.l,
# A5")
010CDA  func  electric_vent_start
# routine 1: gone off the screen; after the wait a new one and, with a free object, a column (010CFE "subq.b #1,
# ($30,A0)", 010D10 "lea $62a00.l, A6", 010D28 "bsr $10d7a", 010D30 "clr.b ($2f,A0)")
010CFA  func  electric_vent_wait
# routine 2: back to routine 1 when its column is gone (010D36 "tst.b ($2f,A0)", 010D3E "subq.b #1, ($4,A0)")
010D36  func  electric_vent_wait_column
# kinds 30 and 39: one of eight waits from the table in A5 (010D48 "move.w #$8, D7", 010D4C "jsr $48448.l", 010D52
# "move.b (A5,D7.w), ($30,A0)")
010D48  func  electric_random_wait
# a column (kind 3A) at the vent's place, 0x10 back, which knows its vent (010D80 "move.w #$3a00, ($2,A6)", 010D92
# "subi.l #$1000, ($16,A6)", 010D9A "move.l A0, ($20,A6)")
010D7A  func  electric_vent_start_column

# -- kind 3A: the electric column --
# routine 0: drawn and attacking, attack 0A (010DA8 "ori.b #$84, ($0,A0)", 010DAE "lea $181ea.l, A6"), rising (010DB8
# "movea.l $150e8.l, A6"), sound 1B (010DC4 "move.b #$1b, D7")
010DA8  func  electric_column_start
# routine 1: when it is up, 0x30 frames (010DD4 "tst.b ($33,A0)", 010DDC "move.b #$30, ($30,A0)")
010DD4  func  electric_column_rise
# routine 2: blinking; after timer it leaves upward, drawn (010DE8 "bsr $10e2c", 010DEC "subq.b #1, ($30,A0)", 010DF4
# "movea.l $150ec.l, A6", 010E04 "ori.b #$80, ($0,A0)")
010DE8  func  electric_column_flicker
# routine 3: 0x10 up the screen a frame while it goes (010E14 "subi.l #$1000, ($16,A0)"); at the end its vent told and
# gone (010E1E "movea.l ($20,A0), A6", 010E22 "move.b #$1, ($2f,A6)", 010E28 "bra $1832a")
010E0C  func  electric_column_leave
# drawn on every other frame (010E32 "move.b $600a5.l, D7", 010E38 "btst #$0, D7", 010E40 "bclr #$7, ($0,A0)")
010E2C  func  electric_column_blink

# -- kind 40: the grille --
# routine 0: drawn (010E50 "ori.b #$80, ($0,A0)"), its address left in 061302 (010E64 "move.l A0, $61302.l"), the
# grille (010E6A "movea.l $1519c.l, A6"); nothing starts kind 40
010E50  func  grille_start
# routine 1: nothing (010E76 "rts")
010E76  func  grille_idle

# -- the explosions' starts --
# kinds 29, 2B, 37 and 2E: a small explosion (kind 31), in use only, harmless (010ED0 "move.w #$100, ($0,A6)", 010ED6
# "move.w #$3100, ($2,A6)", 010EE2 "bsr $1104a")
010ED0  func  start_small_explosion
# Krang and the rock soldiers defeated (00E35C "bne $10ee8", 011A44 "bne $10ee8"): a big explosion at one of their
# places by their +2F (010EE8 "lea $10f1c.l, A5", 010EF0 "move.b ($2f,A0), D7", 010EFE "bsr $10f80"), sound 11 or 13
# (010F02 "lea $10f44.l, A5", 010F0E "andi.b #$1, D7")
010EE8  func  boss_start_explosion
# a big explosion (kind 32), harmless (010F80 "move.w #$100, ($0,A6)", 010F86 "move.w #$3200, ($2,A6)", 010F92 "bra
# $1104a"); also Stockman's (013F38 "bne $10f46")
010F80  func  start_big_explosion
# no path reaches it: a small explosion at the object's place (010FEE "clr.w D6", 010FF2 "bsr $11000") with sound 11
# (010FF6 "move.b #$11, D7")
010FEE  func  explode_small
# a small explosion (kind 31) attacking (011000 "move.w #$500, ($0,A6)", 011006 "move.w #$3100, ($2,A6)", 011012 "bra
# $1104a"); only explode_small calls it
011000  func  start_small_blast
# the explosion at the object's height plus D7, x plus D6, y less its depth and 2 (01104A "move.w ($10,A0), ($10,A6)",
# 011050 "add.w D7, ($10,A6)", 01105C "add.l D6, ($12,A6)", 011068 "move.w ($34,A0), D7", 01106E "addi.w #$200, D7",
# 011072 "sub.l D7, ($16,A6)")
01104A  func  place_explosion

# -- kinds 31, 32, 33, 42 and 57: the explosions --
# kind 31's routine 0: the small explosion (0110A8 "movea.l $14c3a.l, A6"), drawn, knocks flying (0110E0 "ori.b #$80,
# ($0,A0)", 0110EA "lea $18168.l, A6")
0110A8  func  explosion_small_start
# kind 32's: the big explosion (0110B2 "movea.l $14c86.l, A6")
0110B2  func  explosion_big_start
# kind 33's: the oil drum's (0110BC "movea.l $14d1c.l, A6")
0110BC  func  explosion_drum_start
# kind 42's: the rocket's explosion (0110C6 "movea.l $15258.l, A6"); nothing starts kind 42
0110C6  func  explosion_rocket_start
# kind 57's: the medium explosion (0110D0 "movea.l $15aa0.l, A6")
0110D0  func  explosion_medium_start
# routine 1 of all five: gone when the explosion ends (0110F4 "tst.b ($33,A0)", 0110F8 "beq $1832a")
0110F4  func  explosion_end

# ---- comments ----
comment ball_dropper_start an unseen spot high up that will drop four balls
comment ball_dropper_wait a ball drops each time the screen reaches the next place; the dropper is gone after the last
comment ball_dropper_drop_ball a ball at the dropper's place
comment ball_start a dark ball, high up
comment ball_drop the ball drops and starts bouncing away, knocking turtles flying
comment ball_bounce the ball bounces on until it is gone at the area's back
comment road_barrier_start a barrier across the highway, or one of its unseen parts that knock turtles down
comment road_barrier_stay the barrier stays until it leaves the screen
comment tire_stack_start tires lying on the highway, two or one by the parameter
comment tire_stack_stay the tires stay until they leave the screen
comment technodrome_ball_start a ball high up in the Technodrome
comment technodrome_ball_drop the ball drops and starts bouncing off to the right, knocking turtles flying
comment technodrome_ball_bounce the ball bounces on until it is past the screen's right edge
comment technodrome_ball_drift the ball moves along the area's diagonal
comment hydrant_start a fire hydrant with four bars
comment hydrant_stay the hydrant stays until it leaves the screen
comment hydrant_spray the broken hydrant sprays a jet of water every few frames until jets_left runs out
comment hydrant_spray_jet a jet of water if there is room for it, else the spray ends
comment hydrant_struck a turtle's hit sparks on the hydrant, or breaks it and starts the spray the way the hit sent it
comment hydrant_recover the hydrant can be hit again
comment hydrant_start_water a jet of water from the hydrant, weaker as the jets go
comment hydrant_water_start a jet of water flies across, hitting what it meets
comment hydrant_water_fly the water flies on until it leaves the screen
comment roadside_cone_start a traffic cone
comment roadside_pole_start a parking meter or a speed limit sign
comment roadside_stand the thing stands by the road, and a turtle can hit it
comment roadside_stay it stays until it leaves the screen
comment roadside_fly it flies on until it leaves the screen
comment roadside_speed_sign_struck a turtle's hit sends the speed limit sign flying
comment roadside_cone_struck a turtle's hit sends the traffic cone flying
comment roadside_parking_meter_struck a turtle's hit sends the parking meter flying
comment roadside_knock_away it flies off the way the hit sent it, knocking down what it hits
comment rat_start a sewer rat, which drops in or runs
comment rat_drop the rat drops in and sits
comment rat_sit the rat sits a while, then runs
comment rat_run the rat runs, and is gone once it leaves the screen
comment rat_run_step the rat runs a while, then stops with a squeak
comment rat_random_run_time how long the rat runs, at random
comment alligator_start an alligator swims slowly in the sewer's water
comment alligator_swim the alligator swims, and snaps its jaws as it comes on
comment alligator_snap the alligator swims on
comment move_across_screen it moves across until it leaves the screen
comment skateboarder_start a woman on a skateboard glides across the street
comment skateboarder_idle nothing
comment skateboarder_glide she glides on until she leaves the screen
comment skateboarder_struck a turtle's hit makes her duck with a cry
comment pizza_start a pizza box, whose taking refills a turtle's health
comment pizza_wait as the pizza comes on the screen it is announced; a turtle that takes it gets its health back
comment pizza_vanish the opened box is gone
comment billboard_start a billboard high up, with Foot soldiers behind it
comment billboard_wait two Foot soldiers jump down and the billboard topples onto the turtles
comment billboard_fall the billboard falls to the ground with a crash
comment billboard_land the fallen billboard stays in the background
comment billboard_start_soldier a Foot soldier on the billboard, counted as an enemy
comment billboard_soldier_start the soldier crouches on the billboard
comment billboard_soldier_wait the soldier jumps
comment billboard_soldier_jump_down the soldier comes down to the ground and lands
comment billboard_soldier_become_boomerang_soldier the soldier goes on as a Foot soldier with a boomerang
comment oil_drum_start an oil drum with three bars
comment oil_drum_stay the drum, or its wreck, stays until it leaves the screen
comment oil_drum_blow_up the drum blows up, knocking flying what is near
comment oil_drum_become_wreck the burnt wreck of the drum is left
comment oil_drum_struck a turtle's hit makes the drum flash, or lights its fuse
comment oil_drum_recover the drum can be hit again
comment turret_start a gun on a tall column, with four bars
comment turret_move the turret slides, waiting to fire
comment turret_fire the turret slides and fires a burst of four shots
comment turret_wreck the destroyed turret's explosions
comment turret_wreck_explode an explosion on the destroyed turret's column
comment turret_wreck_next the next explosion, higher up, until seven
comment turret_wreck_stay the wreck stays until it leaves the screen
comment turret_struck a turtle's hit makes the turret flash, or destroys it
comment turret_recover the turret can be hit again
comment turret_slide the turret slides back and forth in depth
comment turret_random_wait how long the turret waits before its next burst, at random
comment turret_start_shot a shot from the turret's gun
comment turret_shot_start the turret's shot flies the way the turret faces, knocking turtles down
comment turret_shot_fly the shot flies until it hits or leaves the screen
comment turret_shot_vanish the shot's burst ends and it is gone
comment waiting_soldier_start a Foot soldier standing with his back turned
comment waiting_soldier_wait the soldier waits until he is well on the screen
comment waiting_soldier_become_knife_soldier the soldier goes on as a Foot soldier with knives
comment one_way_sign_start a ONE WAY sign on a pole
comment one_way_sign_stay the sign stays until it leaves the screen
comment one_way_sign_spin the sign spins, knocking flying what it hits, until it stops
comment one_way_sign_idle nothing
comment one_way_sign_struck a turtle's hit sets the sign spinning
comment nozzle_row_start the marks of a row of nozzles in the Technodrome's floor
comment nozzle_row_run the row watches for turtles, waits for its nozzle, or is done
comment nozzle_row_watch a turtle near one of the row's places makes a nozzle come up there
comment nozzle_row_wait a nozzle is up
comment nozzle_row_done the row's nozzle was broken: no more come up
comment nozzle_row_start_nozzle a nozzle at one of the row's places
comment freeze_nozzle_start a nozzle comes up out of the floor
comment freeze_nozzle_rise the nozzle is up and can be hit
comment freeze_nozzle_spray the nozzle gets ready, then sprays
comment freeze_nozzle_spray_start the nozzle sprays a cloud that freezes turtles in ice
comment freeze_nozzle_spray_stop the spray stops and the nozzle sinks
comment freeze_nozzle_sink the nozzle is gone and its row watches again
comment freeze_nozzle_struck a turtle's hit breaks the nozzle in a small explosion
comment freeze_nozzle_broken the broken nozzle stays until it leaves the screen
comment electric_beam_start an electric beam, off for a while
comment electric_beam_wait the beam comes on and electrocutes turtles
comment electric_beam_shine the beam stays on a second, then goes off again
comment electric_vent_start a spot in the floor that shoots electric columns
comment electric_vent_wait now and then the vent shoots an electric column
comment electric_vent_wait_column the vent waits for its column to be gone
comment electric_random_wait how long the electric hazard waits, at random
comment electric_vent_start_column an electric column at the vent
comment electric_column_start an electric column shoots up out of the floor, electrocuting turtles
comment electric_column_rise the column is up
comment electric_column_flicker the column blinks a while, then goes
comment electric_column_leave the column goes on up out of sight and tells its vent
comment electric_column_blink the column shows on every other frame
comment grille_start Unused: a slanted grille
comment grille_idle Unused: nothing
comment start_small_explosion a small explosion, harmless
comment boss_start_explosion one of the explosions of a defeated boss, with its sound
comment start_big_explosion a big explosion, harmless
comment explode_small Unused: an attacking small explosion where the object is, with its sound
comment start_small_blast Unused: a small explosion that knocks flying what it hits
comment place_explosion the explosion where the object is, moved across and up
comment explosion_small_start a small explosion
comment explosion_big_start a big explosion
comment explosion_drum_start the oil drum's explosion
comment explosion_rocket_start Unused: an explosion like the rocket's
comment explosion_medium_start a medium explosion
comment explosion_end the explosion ends and it is gone

# ---- the pointers where these objects' code works them out ----
# the objects these functions start, in A6 from their callers (find_free_object): their fields by the new kind's
# family (the writes 00FD2E "ori.b #$80, ($2f,A6)", 010342 "ori.b #$80, ($2f,A6)", 0107FA "move.b #$1, ($2f,A6)",
# 010B14 "move.l A5, ($20,A6)", 010D9A "move.l A0, ($20,A6)")
param hydrant_start_water a6 water object.hydrant_water
param billboard_start_soldier a6 soldier object.billboard_soldier
param turret_start_shot a6 shot object.turret_shot
param nozzle_row_start_nozzle a6 nozzle object.freeze_nozzle
param electric_vent_start_column a6 column object.electric
# the vent the column tells it is gone (010E1E "movea.l ($20,A0), A6", 010E22 "move.b #$1, ($2f,A6)")
local electric_column_leave 010E1E a6 vent object.electric


# ======== the rock soldiers and their shots (01154E-012A2D) ========
# The two bosses made of rock (kinds 1E and 1D) and the objects their code starts. What each kind is comes from its
# code, its spawn records (area_spawn_lists: +6 the kind, +7 the parameter) and its animations, rendered from the
# addresses its set_animation calls take; nothing in the program names the two bosses, so they go by their areas. Their
# stats come from set_object_stats' 10-byte records (+0 attack and hit, +2 health_bars, health and damage, +6 depth, +8
# the hit sound). "Struck" is routine 4, which the attack check sets on an object a turtle's attack hits
# (0472CE "move.w #$400, ($4,A1)"); "gone off the screen" is flags bit 5 (remove_if_off_screen). The turtles they look
# for are the first four objects whose player is in play and not out (0600A1 and not 0600A0) and that are not being hit
# (routine 4: 011AE4 "btst D6, $600a1.l", 011AEE "btst D6, $600a0.l", 011AF8 "cmpi.b #$4, ($4,A6)").
#
# kind 1E rock_soldier_site: the boss of area 7, the building site (one spawn record, 05F10C, at height 0x80): a big
#   humanoid of rock with a gun (rendered: 014E52 aims it). He drops in from above once the scroll reaches 0x6E000,
#   lands shaking the screen to the boss music and "Crash the turtles!", then walks at a turtle, stands or jumps
#   (landing with the screen shaking), strikes a turtle close by, and fires bursts of gun blasts (kind 34) at a turtle
#   in front within 0x8C. He takes 40 hits (his stats' bars) and 2 more for each player in play
#   (011588 "move.b ($8,A0), ($24,A0)", 0115A6 "lsl.w #1, D7"); every hit takes one. No scenario reaches him (index.txt:
#   0 ran).
# kind 1D rock_soldier_technodrome: the boss of area 8, the Technodrome (one spawn record, 05F3DE): a rock soldier with
#   a missile launcher (rendered: 01548A, a missile fired from it, the launcher's smoke ring). Unseen until the scroll
#   reaches 0xD1000, he appears with the boss music, a wall slab (kind 48) flying off and the shock bars (kinds 4C and
#   4D); then walks at a turtle, stands or taunts (speech A6, or B1 "Crash the turtles!"), strikes a turtle close by,
#   and fires a missile (kind 49) at a turtle in front at least 0x46 away. He takes 40 hits and one more for each player
#   (0121E6 "add.b D7, ($24,A0)"). The scenario area8 beats him.
# Both: struck, a flinch (or, with no hits left, the defeat: 10 explosions, then four pieces of rubble, kind 41, fall
#   off him and he stays as a heap of rocks: rendered 014F9E and 015672); his colour flashes more as he weakens. Kind 1E
#   runs his own moves (011C0E) and 1D his (012452) from the shared code by the kind (0119CE "cmpi.b #$1e, ($2,A0)"), so
#   the static analysis sees both kinds reach both.
# kind 34 gun_blast: kind 1E's gun blast (01186C starts it: 011FD2 "move.w #$3400, ($2,A6)"): 0x48 in front of him at
#   height 0x30, it flies at 0x400 for its animation's 22 frames (rendered 014FC2: a small blast that swells into a
#   burst), attack 0B (turtle_hit's table at 01C272 has the same reaction for 0A and 0B); it tells the soldier when it
#   hits. No scenario runs it.
# kind 41 rubble: a piece of rock that falls off a defeated rock soldier (011A78 starts four:
#   0120BA "move.w #$4100, ($2,A6)") and stays on the ground (rendered 0151BA, 0151C4, 0151CE: lumps of rock, by the
#   parameter)
# kind 48 wall_slab: a big slanted slab (rendered 0156DE) that flies off left at 0x800 as kind 1D appears, knocking
#   turtles flying (attack 07); as it starts a block of 6 by 17 tiles is drawn into a layer (0126DA "lea $191a4.l, A6",
#   0126E4 "jsr $183fa.l") (012668 starts it: 01266E "move.w #$4800, ($2,A6)")
# kinds 49 and 4A missile: kind 1D's missile (rendered 01569A: a missile with its flame; 012716 starts kind 49:
#   01271C "move.w #$4900, ($2,A6)"), which flies at 0x300 knocking turtles flying (attack 87) and explodes against a
#   wall or outside 0x60-0x17F across on the screen; a turtle can hit it out of the air. Kind 4A has the same routines
#   (the table at 0126FE) and no spawn list, record or code starts it.
# kind 4C shock_bars: three tall posts in a row (rendered 015752: white bars) that appear with kind 1D, 0x8A nearer the
#   front than him (012894: 01289A "move.w #$4c00, ($2,A6)", 0128AC "addi.l #$8a00, ($16,A6)"), blinking faster and
#   faster until they flicker on, until he is defeated, then blinking slower and slower until they are gone; they do not
#   attack
# kind 4D shock_bars (hit box): not drawn, the bars' picture with its attack box (0129B4 "movea.l $1574e.l, A6"), at
#   kind 1D's place as he appears (012984: 01298A "move.w #$4d00, ($2,A6)"): while the bars flicker on it attacks one
#   frame in 16 with attack 0A, which electrocutes a turtle (the electric beam's attack, kind 30)
#
# Two routines no path reaches are named here (0116A2, 0129C0): the analysis takes them from their func lines.
# 06130B and 06130C, which 0123F8 and 012830 test, are never set by any code
# (the only writes clear 06130B: 01221C, 012856), so the missile's limit they would make never applies.

# ---- the families' fields ----

# the hits it still takes: its bars from its stats plus 2 for each player in play (kind 1D: plus 1) at its start
# (011588 "move.b ($8,A0), ($24,A0)", 0115A8 "add.b D7, ($24,A0)", 0121E6 "add.b D7, ($24,A0)"); each hit one less, the
# last one defeats it (01190E "subq.b #1, ($24,A0)", 011912 "beq $1195a"); its flashing goes by it
# (011F5C "cmpi.b #$1c, ($24,A0)", 011F68 "cmpi.b #$14, ($24,A0)", 011F74 "cmpi.b #$a, ($24,A0)")
scoped object rock_soldier 24 hits_left u8
# the blows it struck since its last hit, up to 3 (011D04 "addq.b #1, ($26,A0)", 011D12 "move.b #$3, ($26,A0)",
# 011936 "clr.b ($26,A0)"): with the turtles in play they pick the blow's animation, slower as they go
# (011CEC "add.b ($26,A0), D7", 011CF0 "move.b (A6,D7.w), D7") and the chance of the next one
# (0116F6 "move.b ($26,A0), D1")
scoped object rock_soldier 26 blows u8
# frames after it recovers before it can be hit again (0119C0 "move.b #$8, ($2a,A0)", 011F4E "subq.b #1, ($2a,A0)",
# 011F56 "ori.b #$2, ($0,A0)")
scoped object rock_soldier 2A hit_delay u8
# the players in play at its start (0115A2 "move.b D7, ($2b,A0)", 0121E2 "move.b D7, ($2b,A0)"); nothing reads it
scoped object rock_soldier 2B players u8
# bit 7 when one of its gun blasts hit a turtle (0120A0 "move.b #$80, ($2c,A6)"): after the burst's least time that ends
# the burst (011884 "tst.b ($2c,A0)", 011888 "bmi $118b2"); cleared as a burst or a missile starts
# (011C78 "clr.b ($2c,A0)", 0124BC "clr.b ($2c,A0)")
scoped object rock_soldier 2C shot_hit u8
# 0x80 when it is struck (0118EC "move.b #$80, ($2d,A0)"), cleared when it recovers or its attack ends
# (0119BC "clr.b ($2d,A0)", 0118E2 "clr.b ($2d,A0)"); nothing reads it
scoped object rock_soldier 2D hurt u8
# the turtle close by it strikes (find_close_turtle's bits, bit 7 when the turtle is on its left:
# 01173E "move.b D0, ($2e,A0)"), kept while it turns to it (011CBA "tst.b ($2e,A0)", 011CC2 "ori.b #$40, ($0,A0)",
# 011CCE "clr.b ($2e,A0)")
scoped object rock_soldier 2E close_turtle u8
# the explosions so far when it is defeated, 10 in all (011A5C "addq.b #1, ($2f,A0)", 011A60 "cmpi.b #$a, ($2f,A0)"):
# boss_start_explosion places each one by it (010EF0 "move.b ($2f,A0), D7"); cleared as each move starts
# (011D40 "clr.b ($2f,A0)")
scoped object rock_soldier 2F explosions u8
# frames counted down: the waits of its way in (01160E "move.b #$50, ($30,A0)", 01167C "move.b #$28, ($30,A0)"), the
# burst's length (011C8C "move.b (A6,D7.w), ($30,A0)", 011870 "subq.b #1, ($30,A0)"), the flinch
# (01193A "move.b #$1c, ($30,A0)", 0119B0 "subq.b #1, ($30,A0)"), the defeat's steps (011A0A "move.b #$64, ($30,A0)",
# 011A24 "move.b #$c, ($30,A0)", 011A70 "move.b #$96, ($30,A0)"), when the rubble falls (011A80 "move.b ($30,A0), D7")
scoped object rock_soldier 30 timer u8
# frames its move lasts: a walk or a stand by chance (011DE6 "move.b (A6,D7.w), ($31,A0)",
# 0117BC "subq.b #1, ($31,A0)"), the jump and its landing (011D8E "move.b #$28, ($31,A0)",
# 011848 "subq.b #1, ($31,A0)"), the least a burst fires (011C92 "move.b #$20, ($31,A0)", 011878 "subq.b #1, ($31,A0)")
scoped object rock_soldier 31 move_time u8

# the rock soldier that fired it (01200A "move.l A0, ($20,A6)"): told when the blast hits
# (01209C "movea.l ($20,A0), A6", 0120A0 "move.b #$80, ($2c,A6)")
scoped object gun_blast 20 shooter u32 object.rock_soldier
# bit 7 when it flies left, the way its rock soldier faces (011FFA "ori.b #$80, ($2f,A6)", 012042 "tst.b ($2f,A0)",
# 012056 "not.w ($1a,A0)")
scoped object gun_blast 2F flies_left u8

# the rock soldier that fired it (012754 "move.l A0, ($20,A6)"); nothing reads it
scoped object missile 20 shooter u32 object.rock_soldier
# bit 7 when it flies left (012744 "ori.b #$80, ($2f,A6)", 0127A2 "tst.b ($2f,A0)", 0127B6 "not.w ($1a,A0)")
scoped object missile 2F flies_left u8

# what it goes by: the bars' (kind 4C) the rock soldier, whose defeat (routine 6) makes them go
# (0128B4 "move.l A0, ($20,A6)", 012928 "movea.l ($20,A0), A6", 01292C "cmpi.b #$6, ($4,A6)"); the hit box's (kind 4D)
# the bars, by whose routine it attacks or goes (01299C "move.l A5, ($20,A6)", 0129E2 "movea.l ($20,A0), A6",
# 0129E6 "move.b ($4,A6), D7")
scoped object shock_bars 20 leader u32 object
# the frames from one frame drawn to the next, less one: 0x3D at first, 4 less every 16 frames down to 1
# (0128E2 "move.b #$3d, ($2e,A0)", 012910 "subq.b #4, ($2e,A0)", 012914 "cmpi.b #$1, ($2e,A0)"), then one more every 8
# frames up to 0x28 when they go (01294E "addq.b #1, ($2e,A0)", 012952 "cmpi.b #$28, ($2e,A0)")
scoped object shock_bars 2E blink_period u8
# frames to the next frame drawn (012966 "subq.b #1, ($30,A0)", 01296E "move.b ($2e,A0), ($30,A0)",
# 012974 "bset #$7, ($0,A0)")
scoped object shock_bars 30 blink_timer u8

# ---- the functions ----

# -- kind 1E: the rock soldier of the building site --
# routine 0, his way in, by the state (011554 "moveq #$0, D7", 01155C "movea.l (A6,D7.w), A6": the table at 011562)
01154E  func  rock_soldier_site_enter
# state 0: drawn, his stats, the hits he takes (011576 "ori.b #$80, ($0,A0)", 01157C "lea $181cc.l, A6",
# 0115A8 "add.b D7, ($24,A0)"), standing (0115AC "movea.l $14da0.l, A6"), counted as an enemy, the boss not down and the
# area not cleared (0115D8 "addq.b #1, $6120c.l", 0115DE "clr.b $61313.l", 0115E4 "clr.b $6131d.l")
011576  func  rock_soldier_site_start
# state 1: once the scroll reaches 0x6E000 the music fades (0115EC "cmpi.l #$6e000, $63380.l",
# 0115FA "move.w #$fe, D7"), 80 frames (01160E "move.b #$50, ($30,A0)")
0115EC  func  rock_soldier_site_enter_wait_for_scroll
# state 2: after the 80 frames, his jump's animation and down at 0x800 (01161E "movea.l $14da4.l, A6",
# 01162A "move.w #$f800, ($1e,A0)")
011616  func  rock_soldier_site_enter_wait
# state 3: drops (01163C "bsr $11f94") until he is on the ground (011640 "tst.w ($10,A0)"): sound 3E, the boss music 64
# and the balloon "Crash the turtles!" beside him (011648 "move.w #$3e, D7", 011652 "move.w #$64, D7",
# 011676 "jsr $3001c.l"), 40 frames (01167C "move.b #$28, ($30,A0)")
01163C  func  rock_soldier_site_enter_drop
# state 4: the screen shakes for the 40 frames (011690 "bsr $116b0"), then he can be hit and attacks
# (011696 "ori.b #$6, ($0,A0)") and his first move (01169C "moveq #$0, D0", 01169E "bra $11c0e")
011688  func  rock_soldier_site_enter_land
# no path reaches it: the timers cleared, the next routine at its first state (0116A2 "clr.w ($30,A0)",
# 0116A6 "clr.b ($5,A0)", 0116AA "addq.b #1, ($4,A0)")
0116A2  func  rock_soldier_site_enter_end
# a layer's scroll byte (060063) from its place (063386) less 0 or 4 by the frame count (0116B0 "move.b $600a5.l, D7",
# 0116B6 "andi.b #$2, D7", 0116BC "add.b $63386.l, D7", 0116C4 "move.b D7, $60063.l"): the screen shakes
0116B0  func  rock_soldier_site_shake_screen
# routine 1: his flashing (0116CC "bsr $11f3e"); in the air or landing, the state (0116D0 "cmpi.b #$3, ($5,A0)",
# 0116DA "cmpi.b #$4, ($5,A0)"); else a turtle close by (0116E4 "bsr $11ad8") is struck at a chance from 01175A by
# blows, whether the turtle is in front and the turtles in play (0116EE "lea $1175a.l, A6",
# 011720 "move.b $61207.l, D7", 011732 "jsr $48448.l"): turned to it, sound 08, the blow's animation by the turtles in
# play and blows (011CA8 "move.w #$300, ($4,A0)", 011CD2 "move.b #$8, D7", 011CE6 "lea $11d1a.l, A6",
# 011CF4 "lea $14da0.l, A6"); else the state (011746 "lea $11782.l, A6")
0116CC  func  rock_soldier_site_think
# state 0: walks at his target (move_by_speeds within y 0x10-0x78 every other frame: 0117B8 "bsr $11f94"), aiming at it
# every 16 frames (0117A4 "bsr $11e6a"); move_time over, the move's end (0117C4 "moveq #$1, D0")
011796  func  rock_soldier_site_walk
# state 1: the same, moving two frames in four (0117DE "btst #$1, $600a5.l", 0117EA "bsr $11f94",
# 0117F6 "moveq #$2, D0")
0117CC  func  rock_soldier_site_walk_on
# state 2: stands until move_time is over (0117FE "subq.b #1, ($31,A0)", 011806 "moveq #$3, D0")
0117FE  func  rock_soldier_site_stand
# state 3: in the air, falling 0x80 faster each frame (011812 "add.w D7, ($10,A0)", 01181E "subi.w #$80, ($1e,A0)");
# down, sound 3F, on the ground with no shadow (011826 "move.w #$3f, D7", 011838 "bclr #$7, ($1,A0)")
01180E  func  rock_soldier_site_jump
# state 4: the screen shakes until move_time is over (011844 "bsr $116b0"), then he can be hit again and the move's end
# (011850 "ori.b #$2, ($0,A0)", 011856 "moveq #$4, D0")
011844  func  rock_soldier_site_jump_land
# a move over: a turtle in front within 0x8C (01185E "bsr $11b42"): the burst, routine 2, of 32 to 80 frames by chance,
# 32 at the least, the gun aimed (011C72 "move.w #$200, ($4,A0)", 011C8C "move.b (A6,D7.w), ($30,A0)",
# 011C92 "move.b #$20, ($31,A0)", 011C98 "movea.l $14db0.l, A6"); else the next move by D0 (011868 "bra $11c0e")
01185E  func  rock_soldier_site_move_done
# routine 2: his flashing; every 4 frames a gun blast from a free object of 24-31 (01188C "move.b ($30,A0), D7",
# 011890 "andi.b #$3, D7", 011898 "lea $62780.l, A6", 0118A4 "jsr $1830c.l"): 0x48 in front at height 0x30, flying his
# way, with him as its shooter (011FE8 "move.w #$4800, D7", 012004 "move.w #$3000, ($10,A6)",
# 01200A "move.l A0, ($20,A6)"); when timer runs out, or once move_time is over and a blast hit, routine 3 with the gun
# aimed again (011884 "tst.b ($2c,A0)", 0118B2 "addq.b #1, ($4,A0)", 0118BE "movea.l $14db0.l, A6")
01186C  func  rock_soldier_site_fire
# routine 3: when the blow's or the aimed gun's animation ends (0118CE "tst.b ($33,A0)"), routine 1 and the next move
# (0118D8 "move.b #$1, ($4,A0)", 0118E6 "moveq #$5, D0")
0118CA  func  rock_soldier_site_finish_attack
# the next move: a random 0-15 against the weights of D0's row in 011C42 (011C0E "move.w #$10, D7",
# 011C1C "lea $11c42.l, A6", 011C26 "sub.b (A6,D6.w), D7"), the move from 011C5E (011C34 "lea $11c5e.l, A6"); none, a
# stand (011C32 "moveq #$2, D6")
011C0E  func  rock_soldier_site_next_move
# move 0: a turtle to go after (011D2E "bsr $11dfa"); none, a stand (011D34 "beq $11d6a"); else walking at it
# (011D44 "move.w #$100, ($4,A0)", 011D4A "movea.l $14da8.l, A6")
011D2E  func  rock_soldier_site_walk_start
# move 1: walks on as he was (011D62 "move.w #$101, ($4,A0)")
011D56  func  rock_soldier_site_walk_on_start
# move 2: stands, a shorter time (011D6A "move.w #$4, D7", 011D76 "move.w #$102, ($4,A0)",
# 011D7C "movea.l $14dac.l, A6")
011D6A  func  rock_soldier_site_stand_start
# move 3: jumps where he is, not hittable, up at 0x400 with his shadow (011D88 "bclr #$1, ($0,A0)",
# 011D94 "move.w #$400, ($1e,A0)", 011DA4 "bset #$7, ($1,A0)", 011DAA "lea $16c50.l, A6"); one in 4,
# "Crash the turtles!" (011DB4 "move.w #$4, D7", 011DC4 "move.w #$b1, D7")
011D88  func  rock_soldier_site_jump_start
# move_time from 011DF2 by a random below D7 (011DDA "jsr $48448.l", 011DE6 "move.b (A6,D7.w), ($31,A0)")
011DDA  func  rock_soldier_site_random_move_time
# his flashing colours, 0D and 08 (011F3E "move.b #$8, D5", 011F42 "move.b #$d, D6")
011F3E  func  rock_soldier_site_weak_flash
# move_by_speeds, y kept within 0x1000 and 0x7800 (011F94 "jsr $182ee.l", 011F9A "cmpi.l #$7800, ($16,A0)",
# 011FAE "cmpi.l #$1000, ($16,A0)")
011F94  func  rock_soldier_site_move

# -- kind 1D: the rock soldier of the Technodrome --
# routine 0, his way in, by the state (01219E "moveq #$0, D7", 0121A6 "movea.l (A6,D7.w), A6": the table at 0121AC)
012198  func  rock_soldier_technodrome_enter
# state 0: his stats and hits (0121BC "lea $18226.l, A6", 0121E6 "add.b D7, ($24,A0)"), not drawn, standing
# (0121EA "movea.l $153d8.l, A6"), counted as an enemy, the boss not down and the area not cleared
# (012216 "addq.b #1, $6120c.l", 012222 "clr.b $61313.l", 012228 "clr.b $6131d.l")
0121BC  func  rock_soldier_technodrome_start
# state 1: once the scroll reaches 0xD1000 the music fades, 80 frames (012230 "cmpi.l #$d1000, $63380.l",
# 01223E "move.w #$fe, D7", 012252 "move.b #$50, ($30,A0)")
012230  func  rock_soldier_technodrome_enter_wait_for_scroll
# state 2: then the boss music 64, 40 frames (012262 "move.w #$64, D7", 012272 "move.b #$28, ($30,A0)")
01225A  func  rock_soldier_technodrome_enter_wait
# state 3: then drawn, hittable and attacking, his first move (012286 "ori.b #$86, ($0,A0)", 01228C "moveq #$0, D0",
# 01228E "bsr $12452"), with free objects of 24-31 the wall slab (0122AA "bsr $12668"), the shock bars and their hit box
# (0122C2 "bne $12894", 0128D2 "bne $12984")
01227E  func  rock_soldier_technodrome_enter_appear
# routine 1: his flashing (0122C8 "bsr $11f32"); taunting, the state (0122CC "cmpi.b #$3, ($5,A0)"); else a turtle close
# by (0122D6 "bsr $11ad8") is struck at a chance from 012338, from 01234C when he has fewer than 20 hits left
# (0122E0 "lea $12338.l, A6", 0122F0 "lea $1234c.l, A6", 012310 "jsr $48448.l"): turned to it, sound 08, the blow by the
# turtles in play and blows (0124EC "move.w #$300, ($4,A0)", 01252A "lea $1255e.l, A6", 012538 "lea $153d8.l, A6"); else
# the state (012324 "lea $12360.l, A6")
0122C8  func  rock_soldier_technodrome_think
# state 0: walks at his target (move_by_speeds within y 0xF610-0xF680 every other frame: 012392 "bsr $12630"), aiming
# every 16 frames (01237E "bsr $11e6a"); move_time over, the move's end (01239E "moveq #$1, D0")
012370  func  rock_soldier_technodrome_walk
# state 1: the same, moving two frames in four (0123B8 "btst #$1, $600a5.l", 0123D0 "moveq #$2, D0")
0123A6  func  rock_soldier_technodrome_walk_on
# state 2: stands until move_time is over (0123D8 "subq.b #1, ($31,A0)", 0123E0 "moveq #$3, D0")
0123D8  func  rock_soldier_technodrome_stand
# state 3: until the taunt's animation ends (0123E8 "tst.b ($33,A0)", 0123F0 "moveq #$4, D0")
0123E8  func  rock_soldier_technodrome_taunt
# a move over: a turtle in front at least 0x46 away (012402 "bsr $11b42"), one in 4 (01240C "move.w #$10, D7",
# 012416 "cmpi.b #$4, D7"): routine 2, and with a free object of 24-31 a missile and its firing
# (0124B6 "move.w #$200, ($4,A0)", 0124D8 "bsr $12716", 0124DC "movea.l $153e8.l, A6"), with none move 0; else the next
# move (01241E "bra $12452"); never while 06130B is set, which nothing sets (0123F8 "tst.b $6130b.l")
0123F8  func  rock_soldier_technodrome_move_done
# routine 2: when the missile's firing ends (012426 "tst.b ($33,A0)"), routine 1 and the next move
# (01243E "move.b #$1, ($4,A0)", 01244C "moveq #$5, D0")
012422  func  rock_soldier_technodrome_fire
# routine 3: the same when the blow's animation ends (012434 "tst.b ($33,A0)")
012430  func  rock_soldier_technodrome_finish_blow
# the next move: a random 0-15 against the weights of D0's row in 012486 (012452 "move.w #$10, D7",
# 012460 "lea $12486.l, A6"), the move from 0124A2 (012478 "lea $124a2.l, A6"); none, a stand (012476 "moveq #$2, D6")
012452  func  rock_soldier_technodrome_next_move
# move 0: a turtle to go after (012572 "bsr $11dfa"); none, a taunt (012578 "beq $125da"); else walking at it
# (012588 "move.w #$100, ($4,A0)", 01258E "movea.l $153e0.l, A6")
012572  func  rock_soldier_technodrome_walk_start
# move 1: walks on as he was (0125A6 "move.w #$101, ($4,A0)")
01259A  func  rock_soldier_technodrome_walk_on_start
# move 2: stands, a shorter time (0125AE "move.w #$4, D7"): standing, crouched on his way in
# (0125B6 "movea.l $153d8.l, A6", 0125BC "tst.b ($4,A0)", 0125C4 "movea.l $153dc.l, A6")
0125AE  func  rock_soldier_technodrome_stand_start
# move 3: the taunt (rendered 015460: hunched, his arms over his head), speech A6 or one in 4 "Crash the turtles!"
# (0125DE "move.w #$103, ($4,A0)", 0125F0 "move.w #$a6, D7", 0125FA "move.w #$b1, D7", 012604 "movea.l $153e4.l, A6")
0125DA  func  rock_soldier_technodrome_taunt_start
# move_time from 012628 by a random below D7 (012610 "jsr $48448.l", 01261C "move.b (A6,D7.w), ($31,A0)")
012610  func  rock_soldier_technodrome_random_move_time
# move_by_speeds, y kept within 0xF61000 and 0xF68000 (012630 "jsr $182ee.l", 012636 "cmpi.l #$f68000, ($16,A0)",
# 01264A "cmpi.l #$f61000, ($16,A0)")
012630  func  rock_soldier_technodrome_move
# the wall slab (kind 48) at his place, 0x10 off in y and 4 higher (01266E "move.w #$4800, ($2,A6)",
# 012680 "subi.l #$800, ($16,A6)", 012690 "addi.w #$400, ($10,A6)")
012668  func  rock_soldier_technodrome_start_wall_slab
# a missile (kind 49) 0x40 in front of him at height 0x38, his way, in the air with its shadow
# (01271C "move.w #$4900, ($2,A6)", 012732 "move.w #$4000, D7", 01274E "move.w #$3800, ($10,A6)",
# 01276C "bset #$7, ($1,A6)", 012772 "lea $16f20.l, A5"); the flip it sets lands on him, who has it already
# (012758 "btst #$6, ($0,A0)", 012762 "ori.b #$40, ($0,A0)")
012716  func  rock_soldier_technodrome_start_missile
# his flashing colours, 0E and 08 (011F32 "move.b #$8, D5", 011F36 "move.b #$e, D6")
011F32  func  rock_soldier_technodrome_weak_flash

# -- both rock soldiers --
# routine 4, struck: his own colours, his animations by the kind (0118F2 "move.b #$ff, ($42,A0)",
# 0118FE "cmpi.b #$1e, ($2,A0)", 011908 "lea $153d8.l, A1"); a hit less (01190E "subq.b #1, ($24,A0)"): with hits left,
# health_bars 10 (1 when one hit is left) and health 1, routine 5, not hittable, 28 frames of flinch, PCM effect 82, the
# flinch (011916 "move.b #$a, ($8,A0)", 011926 "move.b #$1, ($8,A0)", 01193A "move.b #$1c, ($30,A0)",
# 011946 "move.b #$82, D7", 011950 "movea.l ($18,A1), A6"); with none, the defeat's animation, the sound reset when he
# is the last enemy, PCM effect 88, routine 6, not hittable nor attacking (01195A "movea.l ($1c,A1), A6",
# 011964 "cmpi.b #$1, $6120c.l", 011970 "move.b #$0, D7", 01197A "move.b #$88, D7", 011984 "addq.b #2, ($4,A0)",
# 011998 "andi.b #$f9, ($0,A0)")
0118EC  func  rock_soldier_struck
# routine 5: colour 08 when he has fewer than 20 hits left (0119A0 "cmpi.b #$14, ($24,A0)",
# 0119AA "move.b #$8, ($42,A0)"); when timer runs out, hittable in 8 frames, his own colours, the next move of his kind
# (0119C0 "move.b #$8, ($2a,A0)", 0119CC "moveq #$6, D0", 0119D4 "beq $11c0e", 0119D8 "bra $12452")
0119A0  func  rock_soldier_recover
# routine 6, defeated, by the state (0119E4 "moveq #$0, D7", 0119EC "movea.l (A6,D7.w), A6": the table at 0119F2)
0119DE  func  rock_soldier_defeated
# state 0: 100 frames (011A0A "move.b #$64, ($30,A0)")
011A0A  func  rock_soldier_defeated_start
# state 1: until they are over (011A16 "subq.b #1, ($30,A0)")
011A16  func  rock_soldier_defeated_wait
# state 2: an explosion from a free object of 24-31 (011A30 "lea $62780.l, A6", 011A44 "bne $10ee8"), 12 frames to the
# next (011A24 "move.b #$c, ($30,A0)"); with none, state 4 (011A48 "move.b #$4, ($5,A0)")
011A24  func  rock_soldier_defeated_explode
# state 3: after the 12 frames the next explosion; after 10, state 4 for 150 frames (011A5C "addq.b #1, ($2f,A0)",
# 011A60 "cmpi.b #$a, ($2f,A0)", 011A70 "move.b #$96, ($30,A0)")
011A50  func  rock_soldier_defeated_next_explosion
# state 4: at four of the frames (011A86 "lea $11ad2.l, A6") a piece of rubble with its number, from a free object of
# 32-39, colour 08, at its offset from 012108 by the number, at height 0x80 (011A9A "lea $62a00.l, A6",
# 0120C0 "move.b D0, ($3,A6)", 0120C4 "move.w #$800, ($42,A6)", 0120D0 "lea $12108.l, A5",
# 0120FC "move.w #$8000, ($10,A6)"); when timer runs out, one enemy less, the boss down and the area cleared
# (011ABA "subq.b #1, $6120c.l", 011AC0 "move.b #$1, $61313.l", 011AC8 "move.b #$1, $6131d.l")
011A78  func  rock_soldier_defeated_crumble
# state 5: nothing (011AD6 "rts")
011AD6  func  rock_soldier_defeated_stay
# a turtle within 0x0C deep and 0x3C across of him: D0 the turtle's bit (011B3E "bset D6, D0"), and bit 7 when it is on
# his left (011B10 "cmpi.w #$c, D5", 011B24 "ori.b #$80, D0", 011B2A "cmpi.w #$3c, D5")
011AD8  func  rock_soldier_find_close_turtle
# a turtle within 0x0B deep in front of him: kind 1E's within 0x8C, kind 1D's at least 0x46 away; D7 the turtle's bit
# (011B7A "cmpi.w #$b, D5", 011B82 "cmpi.b #$1d, ($2,A0)", 011BA4 "cmpi.w #$8c, D5", 011BE0 "cmpi.w #$46, D5",
# 011C0A "bset D6, D7")
011B42  func  rock_soldier_find_turtle_ahead
# hittable again when hit_delay runs out (011F4E "subq.b #1, ($2a,A0)", 011F56 "ori.b #$2, ($0,A0)"); with fewer than 28
# hits left his colour is D6, flashing D5 4 frames in 32, 8 in 16 under 20 and every other frame under 10
# (011F66 "moveq #$1c, D7", 011F72 "moveq #$8, D7", 011F7E "moveq #$1, D7", 011F80 "move.b D6, ($42,A0)",
# 011F8E "move.b D5, ($42,A0)")
011F46  func  rock_soldier_weak_flash

# -- kind 34: the gun blast --
# routine 0: drawn, attacking, its stats (attack 0B, damage 0x310), 0x400 its way (012024 "ori.b #$84, ($0,A0)",
# 01202A "lea $181d6.l, A6", 01203C "move.w #$400, ($1a,A0)", 012056 "not.w ($1a,A0)"), its animation and sound 06
# (01205A "movea.l $14fbe.l, A6", 012066 "move.b #$6, D7")
012024  func  gun_blast_start
# routine 1: gone when its animation ends or off the screen (012076 "tst.b ($33,A0)", 01207E "btst #$5, ($0,A0)"); on;
# its attack hit, its rock soldier told (012092 "btst #$3, ($0,A0)", 0120A0 "move.b #$80, ($2c,A6)")
012076  func  gun_blast_fly

# -- kind 41: the rubble --
# routine 0: drawn, harmless, falling at 0x600, its lump by the parameter (012110 "ori.b #$80, ($0,A0)",
# 01212A "move.w #$fa00, ($1e,A0)", 012130 "lea $151aa.l, A6", 012138 "move.b ($3,A0), D7")
012110  func  rubble_start
# routine 1: falls until it is under the ground: on it, stopped, sound 31 (012152 "tst.w ($10,A0)",
# 01215A "clr.w ($10,A0)", 01216A "move.w #$31, D7")
01214E  func  rubble_fall
# routine 2: nothing (01217A "rts")
01217A  func  rubble_stay

# -- kind 48: the wall slab --
# routine 0: drawn, attacking, knocks flying (0126A0 "move.b #$85, ($0,A0)", 0126A6 "lea $1823a.l, A6"), left at 0x800
# (0126B0 "move.w #$f800, ($1a,A0)"), the slab and sound 3E (0126C4 "movea.l $156da.l, A6", 0126D0 "move.b #$3e, D7"),
# the tile block (0126DA "lea $191a4.l, A6", 0126E4 "jsr $183fa.l")
0126A0  func  wall_slab_start
# routine 1: on until it is off the screen (0126F0 "btst #$5, ($0,A0)", 0126FA "bra $182ee")
0126F0  func  wall_slab_fly

# -- kinds 49 and 4A: the missile --
# routine 0: drawn, can be hit, attacking, knocks flying, one bar (01277E "ori.b #$86, ($0,A0)",
# 012784 "lea $18230.l, A6"), 0x300 its way (012796 "move.w #$300, ($1a,A0)", 0127A2 "tst.b ($2f,A0)",
# 0127B6 "not.w ($1a,A0)"), its flame and sound 06 (0127BA "movea.l $15692.l, A6", 0127C6 "move.b #$6, D7")
01277E  func  missile_start
# routine 1: on while it is within 0x60-0x17F on the screen and no wall on its right (0127D6 "cmpi.w #$60, ($c,A0)",
# 0127E0 "cmpi.w #$180, ($c,A0)", 0127F4 "jsr $1de3e.l", 0127FA "jsr $1d8e6.l", 012800 "btst #$3, ($1,A0)"); else
# routine 2, sound 13, the explosion (012816 "addq.b #1, ($4,A0)", 01281A "move.b #$13, D7",
# 012824 "movea.l $15258.l, A6")
0127D6  func  missile_fly
# routine 2: the explosion down to the ground (012838 "subi.w #$400, ($10,A0)"); when it ends, in use only and gone
# (012846 "move.b #$1, ($0,A0)", 01285C "jmp $1832a.l"), unless 06130C is set, which nothing sets
# (01284C "tst.b $6130c.l")
012830  func  missile_explode
# routine 3, which nothing sets, and the end of missile_explode: nothing (012862 "rts")
012862  func  missile_idle
# routine 4, struck: not hittable, routine 5, the small explosion (012864 "bclr #$1, ($0,A0)",
# 01286E "movea.l $14c3a.l, A6")
012864  func  missile_struck
# routine 5: gone when it ends (01287A "tst.b ($33,A0)", 01287E "beq $1832a")
01287A  func  missile_vanish

# -- kinds 4C and 4D: the shock bars --
# kind 4C's routine 0: harmless, blinking every 0x3D frames, the bars (0128D8 "lea $181a4.l, A6",
# 0128E2 "move.b #$3d, ($2e,A0)", 0128F2 "movea.l $1574e.l, A6")
0128D8  func  shock_bars_start
# routine 1: blinking, 4 frames faster every 16 down to every other frame (0128FE "bsr $12960",
# 012910 "subq.b #4, ($2e,A0)", 01291E "addq.b #1, ($4,A0)")
0128FE  func  shock_bars_blink_in
# routine 2: flickering until their rock soldier is defeated (012928 "movea.l ($20,A0), A6",
# 01292C "cmpi.b #$6, ($4,A6)")
012924  func  shock_bars_on
# routine 3: blinking a frame slower every 8 until every 0x28 frames, then gone (01294E "addq.b #1, ($2e,A0)",
# 012952 "cmpi.b #$28, ($2e,A0)", 01295A "bra $1832a")
01293C  func  shock_bars_blink_out
# drawn only on the frame blink_timer runs out, which then starts again from blink_period (012960 "bclr #$7, ($0,A0)",
# 01296E "move.b ($2e,A0), ($30,A0)", 012974 "bset #$7, ($0,A0)")
012960  func  shock_bars_blink
# kind 4D's routine 0: its stats (attack 0A, damage 0x210, no depth), the bars' picture with its attack box, not drawn
# (0129A6 "lea $18244.l, A6", 0129B4 "movea.l $1574e.l, A6")
0129A6  func  shock_bars_hit_box_start
# no path reaches it: as the bars' blink_in without the blinking (0129C0 "move.b $600a5.l, D7",
# 0129CE "subq.b #4, ($2e,A0)", 0129DC "addq.b #1, ($4,A0)")
0129C0  func  shock_bars_hit_box_blink_in
# routine 1: gone when the bars blink out (0129EA "cmpi.b #$3, D7", 0129EE "beq $1832a"); while they flicker on,
# attacking one frame in 16 (0129F2 "bclr #$2, ($0,A0)", 0129F8 "cmpi.b #$2, D7", 012A06 "andi.b #$f, D7",
# 012A0E "bset #$2, ($0,A0)")
0129E2  func  shock_bars_hit_box_zap

# ---- comments ----
comment rock_soldier_site_enter the building site's rock soldier comes in, by the state of his way in
comment rock_soldier_site_start the rock soldier waits high up, his hits set by the players in play; the area is not cleared
comment rock_soldier_site_enter_wait_for_scroll once the scroll reaches him the music fades
comment rock_soldier_site_enter_wait after a while he drops
comment rock_soldier_site_enter_drop he drops to the ground, then the boss music and his balloon "Crash the turtles!"
comment rock_soldier_site_enter_land the screen shakes from his landing, then he fights
comment rock_soldier_site_enter_end Unused: ends the way in, the next routine
comment rock_soldier_site_shake_screen the screen shakes
comment rock_soldier_site_think he strikes a turtle close by at a chance, else goes on with his move
comment rock_soldier_site_walk he walks at his target, aiming at it now and then
comment rock_soldier_site_walk_on he walks on at his target
comment rock_soldier_site_stand he stands a while
comment rock_soldier_site_jump he is in the air until he lands
comment rock_soldier_site_jump_land the screen shakes from his landing, then he can be hit again
comment rock_soldier_site_move_done a move over: a burst at a turtle in front within reach, else the next move
comment rock_soldier_site_fire he fires gun blasts until the burst is over
comment rock_soldier_site_finish_attack the blow, or the gun held up after the burst, plays out; then the next move
comment rock_soldier_site_next_move the next move by chance, by what he did before
comment rock_soldier_site_walk_start he picks a turtle and walks at it, or stands if there is none
comment rock_soldier_site_walk_on_start he walks on as he was
comment rock_soldier_site_stand_start he stands a while
comment rock_soldier_site_jump_start he jumps where he stands, now and then with "Crash the turtles!"
comment rock_soldier_site_random_move_time how long the move lasts, at random
comment rock_soldier_site_weak_flash his flashing as he weakens, in his colours
comment rock_soldier_site_move he moves by his speeds within the area's depth
comment rock_soldier_technodrome_enter the Technodrome's rock soldier comes in, by the state of his way in
comment rock_soldier_technodrome_start the rock soldier waits unseen, his hits set by the players in play; the area is not cleared
comment rock_soldier_technodrome_enter_wait_for_scroll once the scroll reaches him the music fades
comment rock_soldier_technodrome_enter_wait the boss music starts
comment rock_soldier_technodrome_enter_appear he appears and fights, with the wall slab flying off and the shock bars
comment rock_soldier_technodrome_think he strikes a turtle close by at a chance, more often as he weakens, else goes on with his move
comment rock_soldier_technodrome_walk he walks at his target, aiming at it now and then
comment rock_soldier_technodrome_walk_on he walks on at his target
comment rock_soldier_technodrome_stand he stands a while
comment rock_soldier_technodrome_taunt he taunts until the animation ends
comment rock_soldier_technodrome_move_done a move over: now and then a missile at a turtle far enough in front, else the next move
comment rock_soldier_technodrome_fire the missile's firing plays out, then the next move
comment rock_soldier_technodrome_finish_blow the blow plays out, then the next move
comment rock_soldier_technodrome_next_move the next move by chance, by what he did before
comment rock_soldier_technodrome_walk_start he picks a turtle and walks at it, or taunts if there is none
comment rock_soldier_technodrome_walk_on_start he walks on as he was
comment rock_soldier_technodrome_stand_start he stands a while, crouched on his way in
comment rock_soldier_technodrome_taunt_start he taunts with a speech
comment rock_soldier_technodrome_random_move_time how long the move lasts, at random
comment rock_soldier_technodrome_move he moves by his speeds within the area's depth
comment rock_soldier_technodrome_start_wall_slab the wall slab flies off where he appears
comment rock_soldier_technodrome_start_missile a missile from his launcher, the way he faces
comment rock_soldier_technodrome_weak_flash his flashing as he weakens, in his colours
comment rock_soldier_struck a hit makes the rock soldier flinch, or the last one defeats him
comment rock_soldier_recover the rock soldier gets over the hit and moves on
comment rock_soldier_defeated the defeated rock soldier, by the state of his defeat
comment rock_soldier_defeated_start the defeated rock soldier stands a while
comment rock_soldier_defeated_wait he stands until the explosions
comment rock_soldier_defeated_explode an explosion on him
comment rock_soldier_defeated_next_explosion the next explosion, until ten
comment rock_soldier_defeated_crumble rubble falls off him; then the boss is down and the area cleared
comment rock_soldier_defeated_stay he stays a heap of rocks
comment rock_soldier_find_close_turtle a turtle close enough to strike, and on which side
comment rock_soldier_find_turtle_ahead a turtle in front of him at the range of his weapon
comment rock_soldier_weak_flash he can be hit again after a while, and flashes more as he weakens
comment gun_blast_start a gun blast flies the way the rock soldier faces
comment gun_blast_fly the blast swells as it flies, and tells its rock soldier when it hits a turtle
comment rubble_start a piece of rock falls off the defeated rock soldier
comment rubble_fall the piece falls to the ground
comment rubble_stay the piece stays on the ground
comment wall_slab_start a slab of the wall flies off to the left, knocking turtles flying
comment wall_slab_fly the slab flies until it leaves the screen
comment missile_start a missile flies the way the rock soldier faces, knocking turtles flying
comment missile_fly the missile flies until it meets a wall or reaches the screen's sides, and explodes
comment missile_explode the explosion ends and the missile is gone
comment missile_idle nothing
comment missile_struck a turtle's attack bursts the missile
comment missile_vanish the burst ends and the missile is gone
comment shock_bars_start the shock bars appear, blinking
comment shock_bars_blink_in the bars blink faster until they flicker on
comment shock_bars_on the bars flicker until their rock soldier is defeated
comment shock_bars_blink_out the bars blink slower until they are gone
comment shock_bars_blink the bars show now and then
comment shock_bars_hit_box_start the unseen part of the bars that electrocutes turtles
comment shock_bars_hit_box_blink_in Unused: counts down as the bars blink in
comment shock_bars_hit_box_zap while the bars flicker on it electrocutes turtles now and then; it goes with them

# ---- the pointers where these objects' code works them out ----
# the gun blast rock_soldier_site_fire starts, a free object of 24-31 (011898 "lea $62780.l, A6",
# 0118A4 "jsr $1830c.l"): its fields by its family (011FFA "ori.b #$80, ($2f,A6)", 01200A "move.l A0, ($20,A6)")
local rock_soldier_site_fire 011898,0118A4 a6 blast object.gun_blast
# the rock soldier a gun blast tells it hit (01209C "movea.l ($20,A0), A6", 0120A0 "move.b #$80, ($2c,A6)")
local gun_blast_fly 01209C a6 shooter object.rock_soldier
# the rubble rock_soldier_defeated_crumble starts (011A9A "lea $62a00.l, A6", 011AA6 "jsr $1830c.l")
local rock_soldier_defeated_crumble 011A9A,011AA6 a6 rubble object
# the shock bars and their hit box rock_soldier_technodrome_enter_appear starts (0122AE "lea $62780.l, A6",
# 0122BA "jsr $1830c.l"; 0128BE "lea $62780.l, A6", 0128CA "jsr $1830c.l"): their leader (0128B4 "move.l A0, ($20,A6)",
# 01299C "move.l A5, ($20,A6)")
local rock_soldier_technodrome_enter_appear 0122AE,0122BA a6 bars object.shock_bars
local rock_soldier_technodrome_enter_appear 0128BE,0128CA a6 hit_box object.shock_bars
# the objects these functions start, in A6 from their callers (01229E "jsr $1830c.l", 0124CC "jsr $1830c.l")
param rock_soldier_technodrome_start_wall_slab a6 slab object
param rock_soldier_technodrome_start_missile a6 missile object.missile


# ======== Baxter Stockman, the helicopters, the drones and the car (012A2E-0143BF) ========
# The kinds of the kind table (053896) whose routines are at 012A2E-0143BF. What each kind is comes from its code, its
# spawn records (area_spawn_lists: +6 the kind, +7 the parameter) and its animations, rendered from the addresses its
# set_animation calls take (the car: from the tile block it draws, with area 4's tile banks). Their stats come from
# set_object_stats' 10-byte records (+0 attack and hit, +2 health_bars, health and damage, +6 depth, +8 the hit sound).
# "Struck" is routine 4, which the attack check sets on an object a turtle's attack hits
# (0472CE "move.w #$400, ($4,A1)"); "gone off the screen" is remove_if_off_screen (flags bit 5). "With the ride" is
# carry_with_ride: in area 6 (stage 6) these objects move 0x600 a frame across with the scroll, as the knife does
# (04BB32). A smaller y is nearer the front (down the screen: Rocksteady "walks down" with
# 04F354 "addi.l #-$100, ($16,A0)"). The free objects they take are find_free_object's from object 4, 12, 24 or 32
# (062140, 0623C0, 062780, 062A00), among the next 8 or 12.
#
# kind 35 parked_car: a big car of area 4, the street of cars (one spawn record, 05E0CE). The car is a picture of 22 by
#   14 tiles the object draws into a layer (012A72 "lea $18c28.l, A6", 012A7C "jsr $183fa.l"; rendered: a sedan facing
#   the front right) and keeps where the object is by that layer's scroll (012B8C "move.w ($24,A0), $6005c.l",
#   012B94 "move.w ($26,A0), $6005e.l"); the object itself shows a piece of wall at its place (rendered 015052: a window
#   with 555-4321 under it). Once the object is under 0xE0 on the screen (012A8C "cmpi.w #$e0, ($c,A0)") the car drives
#   off to the front right for 56 frames, 4 pixels a frame (012AFE "subi.w #$4, ($24,A0)",
#   012B0A "subi.b #$4, ($27,A0)"), with three unseen hit boxes (kind 36) going the same way, the layer's rows blanked
#   one every other frame from its last row up (012BA8 "move.b #$0, (A6,D7.w)", 012BAE "move.b #$10, ($1,A6,D7.w)": the
#   high byte the colour, the low the code, tile 0x10 colour 0 being empty); then three Foot soldiers, four when 061207
#   (the turtles in play) is 2 or more, leap out of where it stood (kind 38). Harmless itself (its stats 0181A4: no
#   attack, no bars). No scenario runs the drive (index.txt: 012AA6 0 ran).
# kind 36 car_hit_box: one of the car's three unseen hit boxes (012BCC starts them: 012BD2 "move.w #$3600, ($2,A6)"), at
#   the car's place plus an offset from 012C10 by its number; not drawn (012C1C "move.b #$5, ($0,A0)": in use and
#   attacking), it moves with the car, 0x400 across and 0x400 toward the front (012C2C "move.w #$400, ($1a,A0)",
#   012C70 "sub.l D7, ($16,A0)"), knocking flying what it hits (its stats 0181E0: attack 07, damage 0x310), sound 3A as
#   each starts; its frame (01505C, rendered: a puff) only gives its attack box
# kind 38 car_soldier: a Foot soldier who leaps out of where the car stood (012C7E starts it:
#   012C84 "move.w #$3800, ($2,A6)"; rendered 015092: a Foot soldier in mid leap) to the front right until his screen y
#   is under the one of his number, then is a gun soldier (kind 09: 012D18 "move.l #$81000900, ($0,A0)",
#   enemy_gun_soldier_start)
#
# kind 43 helicopter: a small helicopter of area 6, the highway on skateboards (87 spawn records: parameter 00 16 times,
#   01 32, 80 39; with kind 69 the area's only enemies): rendered 0152F6 and 015320, the same helicopter in two colours
#   (palettes 0E and 0A by the parameter's bit 0): a rotor over a small cabin on skids. In the air with its shadow, 0x40
#   high and bobbing, it keeps in front of the turtles for 900 frames, drifting back and forth in depth, then falls
#   behind and is gone; by the parameter, bit 0 clear: bursts of four bullets (kind 44) fired down at a slant; set:
#   three missiles (kind 46) dropped; bit 7: it faces right. Four bars, attack 07 (it knocks flying the turtles it
#   touches); destroyed, a big explosion (kind 32). Sound 0A plays while any helicopter is about
#   (006AF6 "tst.b $6130a.l", 006B00 "move.w #$a, D7"), 09 when the last one is gone; 06130A counts them.
# kind 44 copter_bullet: the helicopter's bullet (013168 starts it: 01316E "move.w #$4400, ($2,A6)"; rendered 015370: a
#   small bullet with a trail, slanting down), 0x500 across and 0x500 down from in front of the helicopter's cabin,
#   knocking turtles down (attack 04); on the road a spark (rendered 015396), harmless, then gone
# kind 46 falling_missile: a missile that drops straight down and explodes on the ground (rendered 0153CE and 01534E: a
#   missile; the explosion is the rocket's, 01525C): parameter 0 the helicopter's (01327A starts it), knocking down
#   (attack 04), 0x300 a frame; parameter 1 one at each turtle in play when no enemy has been about for a while: the
#   layers' code of every area counts the frames with fewer than three enemies, shows the "HURRY!" arrow (rendered
#   02DB76) after 0x100, and with none at all at 0x600 drops these (01EC8A "cmpi.w #$600, $633f6.l",
#   01EC96 "jsr $13354.l"), from height 0xF0 at 0x800 a frame, knocking flying (attack 07, damage 0xB10)
#
# kind 54 flying_drone: a flying machine of area 7, the building site (rendered 015886-0158F4: a round body under a
#   rotor, with a gun that points to the front, across or to the back; 0158FE resting, 01592C wrecked). The scene at
#   030716 (which puts Rocksteady in in area 1) starts seven of them far back, out of the area
#   (0307E8 "cmpi.b #$7, $60121.l", 0307F4 "jsr $133fe.l", 013448 "move.l #$13800, ($16,A6)"), resting, and later
#   releases them all (030860 "jsr $1349e.l"): each takes off on its own heading, then for 1800 frames weaves at a
#   turtle, firing bursts of four shots (kind 55), and then rises out of sight. Two bars, attack 07; destroyed, a medium
#   explosion (kind 57). While any is about, sound 38 every 32 to 128 frames (013A1A). 061312 counts them. No scenario
#   runs them.
# kind 55 drone_shot: the drone's shot (013A8C starts it: 013A92 "move.w #$5500, ($2,A6)"): a flash at the gun, then a
#   streak (rendered 015954-0159EA by the gun's aim) that drops to the ground at 0x400 a frame while it flies the aim's
#   way, then a flash on the ground (rendered 0159FC); it knocks turtles flying (attack 07) at the gun and on the
#   ground, not on its way
#
# kind 5C stockman: Baxter Stockman, the boss of area 3, the sewers (one spawn record, 05DF94), in his flying machine
#   (rendered 015C80: a seat under a canopy, two claws below; 015CD6 the claws opening), from which he drops Mousers
#   (kind 5E, which turn into Mousers, kind 4E: 0143A8 "move.l #$81004e80, ($0,A0)"). He waits until he is the only
#   enemy left, comes in to the boss music saying "Yippee-I-Ay!" (013D92 "jsr $30084.l"), then for 3600 frames weaves at
#   a turtle dropping Mousers, and then rises out of sight and is gone. 24 bars, one a hit (01828A); the last one: four
#   big explosions and the boss down (013F58 "move.b #$1, $61313.l").
# kind 5E falling_mouser: a Mouser Stockman drops (0142D6 starts it: 0142F6 "move.w #$5e00, ($2,A6)"; rendered 015D4E: a
#   Mouser seen from above), with its shadow: it falls 0x400 a frame to the floor and turns into a Mouser that thinks at
#   once (kind 4E, parameter 80); it cannot be hit (014336 "move.b #$81, ($0,A0)")
#
# Left unnamed: the kinds' data (the hit boxes' offsets 012C10, the soldiers' stops 012CFE, the helicopter's tables
# 013092, 0130F4, 0130FC, 013150, the drones' 013486, 01348E, 013496, 0138AC, 0138B4, 0139A2, 0139D6, 0139DA, 013A74,
# 013AE4, 013B72, Stockman's 013E30, 01416E, 014176, 014194, 0141B4, 01424A, 01426A, the state tables 0134CA, 013C46,
# 013F08, the animation tables 01584E and 015938): batch 4's records. The work RAM they use (06130A, 061311, 061312,
# 061318, 061319, 0633F6, 060080, 060083, 060094, 061207, 061313), cited by address. The +2F that kinds 35, 36, 44, 46
# and 5E only clear, Stockman's +31 that he only clears (013E5E "clr.b ($31,A0)"), and the car's byte +27 (the low byte
# of its scroll_y, which a field of its own cannot overlap): nothing reads them as their own.

# ---- the families' fields ----

# the address in the tile RAM of the layer's row it blanks next: the last row first
# (012A52 "move.l #$102f80, ($20,A0)"), one row up after each (012B9E "movea.l ($20,A0), A6",
# 012BBC "subi.w #$80, ($22,A0)"): a pointer into the K052109's tile RAM
scoped object parked_car 20 blank_row u32 io
# the layer's x scroll that keeps the car's picture with the object: moved by what the object moved on the screen
# (012B82 "add.w D7, ($24,A0)", 012B86 "andi.w #$1ff, ($24,A0)"), 4 a frame as it drives off
# (012AFE "subi.w #$4, ($24,A0)"); written out every frame (012B8C "move.w ($24,A0), $6005c.l")
scoped object parked_car 24 scroll_x u16
# the layer's y scroll (012A4E "clr.w ($26,A0)", 012B94 "move.w ($26,A0), $6005e.l"); its low byte 4 less a frame as it
# drives off (012B0A "subi.b #$4, ($27,A0)")
scoped object parked_car 26 scroll_y u16
# its screen x the frame before (012A68 "move.w ($c,A0), ($2a,A0)", 012B74 "move.w ($2a,A0), D7",
# 012B78 "sub.w ($c,A0), D7", 012B7C "move.w ($c,A0), ($2a,A0)")
scoped object parked_car 2A last_screen_x u16
# frames before it drives off (012A96 "move.b #$a, ($30,A0)", 012AAA "subq.b #1, ($30,A0)"), frames of the drive
# (012AE2 "addq.b #1, ($30,A0)", 012AE6 "cmpi.b #$38, ($30,A0)", 012AF0 "btst #$0, ($30,A0)"), then the soldiers still
# to come (012B16 "move.b #$3, ($30,A0)", 012B28 "move.b #$4, ($30,A0)", 012B44 "subq.b #1, ($30,A0)"), each one's
# number (012CA6 "move.b ($30,A0), ($2f,A6)")
scoped object parked_car 30 counter u8
# frames to its next soldier (012B2E "clr.b ($31,A0)", 012B3C "subq.b #1, ($31,A0)", 012B68 "move.b #$8, ($31,A0)")
scoped object parked_car 31 soldier_time u8

# the screen y it leaps to, from 012CFE by its number: 0x6C, 0x54, 0x3C or 0x24 (012CE0 "move.w (A6,D7.w), ($20,A0)",
# 012D06 "move.w ($e,A0), D7", 012D0A "cmp.w ($20,A0), D7")
scoped object car_soldier 20 stop_y u16
# the soldiers still to come after it, its car's counter (012CA6 "move.b ($30,A0), ($2f,A6)"): its stop
# (012CDA "move.b ($2f,A0), D7")
scoped object car_soldier 2F number u8

# frames it stays in front of the turtles: 900 (012D84 "move.w #$384, ($2c,A0)", 013010 "subq.w #1, ($2c,A0)"); then it
# falls behind (013018 "clr.w ($2c,A0)", 01301C "subi.l #$100, ($12,A0)")
scoped object helicopter 2C stay_time u16
# bit 0, the way it drifts in depth: 0x100 a frame to the back, set to the front (012F64 "move.b ($2f,A0), D7",
# 012F68 "andi.b #$1, D7", 012F6E "move.w (A6,D7.w), D7"); turned over outside 0x1000-0x77FF
# (012F78 "cmpi.l #$7800, ($16,A0)", 012F90 "bchg #$0, ($2f,A0)")
scoped object helicopter 2F drift u8
# frames counted down: the wait before it fires, at random less 8 times 060094 (01313C "move.b (A6,D7.w), ($30,A0)",
# 01314A "sub.b D7, ($30,A0)", 012DD6 "subq.b #1, ($30,A0)"), between its bullets and missiles
# (012E3A "move.b #$5, ($30,A0)", 012E84 "move.b #$7, ($30,A0)"), the hit's shaking (012EB6 "move.b #$28, ($30,A0)",
# 012F24 "subq.b #1, ($30,A0)")
scoped object helicopter 30 timer u8
# the bullets or missiles still to fire (012DEE "move.b #$4, ($31,A0)", 012DFA "move.b #$3, ($31,A0)",
# 012E16 "subq.b #1, ($31,A0)", 012E60 "subq.b #1, ($31,A0)")
scoped object helicopter 31 shots_left u8

# the turtle it goes at: boss_pick_target's (013592 "bsr $11dfa"), again every 128 frames (013724 "move.w $600a4.l, D7",
# 01372A "andi.w #$7f, D7"), none clear (01373E "clr.l ($20,A0)"); it weaves toward its screen place
# (013742 "movea.l ($20,A0), A6", 013754 "cmp.w ($c,A6), D7", 013806 "cmp.w ($e,A6), D7") and faces it
# (013920 "movea.l ($20,A0), A6", 013932 "cmp.w ($c,A6), D7")
scoped object flying_drone 20 target u32 object
# frames it stays: 1800 (0135A4 "move.w #$708, ($24,A0)", 0135E2 "subq.w #1, ($24,A0)"); then it rises out of sight
# (0135B4 "tst.w ($24,A0)", 0135C4 "addq.b #1, ($10,A0)")
scoped object flying_drone 24 time_left u16
# the step of its bob, the height it adds from 0138B4 (0134F6 "move.b D7, ($2a,A0)", 013866 "move.b ($2a,A0), D7",
# 013878 "addq.b #1, ($2a,A0)", 0138A0 "addq.b #1, ($2a,A0)")
scoped object flying_drone 2A bob u8
# how fast its heading turns, by its number (013476 "move.b (A5,D0.w), ($2b,A6)", 013766 "move.b ($2b,A0), D7",
# 01376A "add.w D7, ($2c,A0)")
scoped object flying_drone 2B turn_speed u8
# the way it flies: the high byte one of 16 directions, 0 across to the right, 4 to the back, 8 to the left, C to the
# front (0139DA's moves), the low byte its fraction (01345A "move.b (A5,D0.w), ($2c,A6)", 013460 "clr.b ($2d,A6)",
# 01378E "sub.w D7, ($2c,A0)", 013792 "andi.b #$f, ($2c,A0)"); the direction picks its move and its picture
# (0138FC "move.b ($2c,A0), D7", 013948 "move.b ($2c,A0), D7")
scoped object flying_drone 2C heading u16
scoped object flying_drone 2C direction u8
# the way the heading turns, turned over at directions 4 and C, so that the heading swings through the half toward its
# target (01346A "move.b (A5,D0.w), ($2e,A6)", 01375C "tst.b ($2e,A0)", 01377E "bchg #$0, ($2e,A0)")
scoped object flying_drone 2E turning u8
# the way its gun points, 0 to the front, 1 across, 2 to the back (01397E "move.b D7, ($2f,A0)"): its picture and its
# shot's place, speeds and picture (013AC0 "add.b ($2f,A0), D7", 013AD8 "move.b ($2f,A0), ($2f,A6)"); at its start its
# number, which sets its bob (01347C "move.b D0, ($2f,A6)", 0134F0 "move.b ($2f,A0), D7")
scoped object flying_drone 2F aim u8
# frames counted down: its take-off (013556 "move.b #$12, ($30,A0)", 013566 "subq.b #1, ($30,A0)"), the wait before it
# fires, at random less 8 times 060094 (0139C2 "move.b (A6,D7.w), ($30,A0)", 0139D0 "sub.b D7, ($30,A0)"), between shots
# (013640 "move.b #$7, ($30,A0)"), the hit's shaking (01366E "move.b #$1e, ($30,A0)", 0136CE "subq.b #1, ($30,A0)")
scoped object flying_drone 30 timer u8
# the shots still to fire (013600 "move.b #$4, ($31,A0)", 01361C "subq.b #1, ($31,A0)")
scoped object flying_drone 31 shots_left u8

# its drone's aim (013AD8 "move.b ($2f,A0), ($2f,A6)"): its flash, streak, speeds (013B24 "move.b ($2f,A0), D7",
# 013B4A "add.b ($2f,A0), D7", 013B9A "move.b ($2f,A0), D7")
scoped object drone_shot 2F aim u8

# the turtle he goes at: boss_pick_target's (013D70 "bsr $11dfa"), again every 64 frames (013FC8 "move.w $600a4.l, D7",
# 013FCE "andi.w #$3f, D7"), none clear (013FE2 "clr.l ($20,A0)"); he weaves toward its screen place
# (013FE6 "movea.l ($20,A0), A6", 013FF8 "cmp.w ($c,A6), D7", 0140AA "cmp.w ($e,A6), D7")
scoped object stockman 20 target u32 object
# frames he stays: 3600 (013D6A "move.w #$e10, ($24,A0)", 013DD0 "subq.w #1, ($24,A0)"); then he rises out of sight
# (013DAC "tst.w ($24,A0)", 013DB8 "addq.b #1, ($10,A0)"); at his start it gets his bars, which nothing reads before
# (013C78 "move.b ($8,A0), ($24,A0)")
scoped object stockman 24 time_left u16
# the step of his bob, the height it adds from 0141B4 (013D60 "move.b #$0, ($2a,A0)", 014128 "move.b ($2a,A0), D7",
# 014162 "addq.b #1, ($2a,A0)")
scoped object stockman 2A bob u8
# how fast his heading turns: 0x20 (013D5A "move.b #$20, ($2b,A0)", 01400A "move.b ($2b,A0), D7")
scoped object stockman 2B turn_speed u8
# the way he flies, as the drone's (013D4E "move.w #$800, ($2c,A0)", 01400E "add.w D7, ($2c,A0)",
# 014012 "andi.b #$f, ($2c,A0)"); the direction picks his move from 01426A (0141FC "move.b ($2c,A0), D7")
scoped object stockman 2C heading u16
scoped object stockman 2C direction u8
# the way his heading turns (013D54 "move.b #$1, ($2e,A0)", 014000 "tst.b ($2e,A0)", 014022 "bchg #$0, ($2e,A0)")
scoped object stockman 2E turning u8
# the explosions so far when he is defeated, four in all (013EA8 "clr.b ($2f,A0)", 013F54 "addq.b #1, ($2f,A0)",
# 013F60 "cmpi.b #$4, ($2f,A0)"): each one's place and sound by it (010F4E "move.b ($2f,A0), D7",
# 010F0A "move.b ($2f,A0), D7")
scoped object stockman 2F explosions u8
# frames counted down: his wait to come in (013CD8 "move.b #$64, ($30,A0)", 013CEE "subq.b #1, ($30,A0)"), to his next
# drop, at random less 8 times 060094, at least 1 (014228 "move.b (A6,D7.w), ($30,A0)", 014236 "sub.b D7, ($30,A0)",
# 014242 "move.b #$1, ($30,A0)", 013DDC "subq.b #1, ($30,A0)"), the hit's shaking (013E7C "move.b #$1e, ($30,A0)"),
# between explosions (013F18 "move.b #$c, ($30,A0)", 013F48 "subq.b #1, ($30,A0)")
scoped object stockman 30 timer u8

# ---- the functions ----

# -- kind 35: the parked car --
# routine 0: drawn, harmless (012A2E "ori.b #$80, ($0,A0)", 012A34 "lea $181a4.l, A6"), the piece of wall
# (012A3E "movea.l $15042.l, A6"), the layer's scroll 0 (012A4A "clr.w ($24,A0)", 012A4E "clr.w ($26,A0)"), its last row
# to blank first (012A52 "move.l #$102f80, ($20,A0)")
012A2E  func  parked_car_start
# routine 1: the car's picture into the layer (012A72 "lea $18c28.l, A6", 012A78 "move.w #$5, D7",
# 012A7C "jsr $183fa.l"), the scroll with the object (012A6E "bsr $12b74")
012A68  func  parked_car_draw
# routine 2: the scroll with the object; under 0xE0 on the screen, 10 frames (012A8C "cmpi.w #$e0, ($c,A0)",
# 012A96 "move.b #$a, ($30,A0)")
012A88  func  parked_car_wait
# routine 3: after the 10 frames, three hit boxes from free objects 4-11 (012AB2 "moveq #$2, D0",
# 012AB4 "lea $62140.l, A6", 012ACC "bsr $12bcc")
012AA6  func  parked_car_start_drive
# routine 4: 56 frames (012AE6 "cmpi.b #$38, ($30,A0)"): every other one a row blanked (012AFA "bsr $12b9e"), the
# layer's scroll 4 less across and in depth (012AFE "subi.w #$4, ($24,A0)", 012B0A "subi.b #$4, ($27,A0)"); then three
# soldiers to come, four when 061207 is 2 or more (012B1C "cmpi.b #$2, $61207.l")
012AE2  func  parked_car_drive_off
# routine 5: every 8 frames a soldier from free objects 12-23 (012B4C "lea $623c0.l, A6", 012B64 "bsr $12c7e",
# 012B68 "move.b #$8, ($31,A0)"); after the last, gone (012B70 "bra $1832a")
012B3C  func  parked_car_release_soldiers
# the layer's x scroll moved by what the object moved on the screen (012B78 "sub.w ($c,A0), D7",
# 012B82 "add.w D7, ($24,A0)"), then written out
012B74  func  parked_car_follow_object
# the layer's scroll written out (012B8C "move.w ($24,A0), $6005c.l", 012B94 "move.w ($26,A0), $6005e.l")
012B8C  func  parked_car_set_scroll
# 64 tiles of the row in blank_row set to tile 0x10, colour 0, then the row above (012BA2 "move.w #$3f, D6",
# 012BAE "move.b #$10, ($1,A6,D7.w)", 012BBC "subi.w #$80, ($22,A0)")
012B9E  func  parked_car_blank_row
# a hit box (kind 36) at the car's place plus an offset from 012C10 by its number (012BD2 "move.w #$3600, ($2,A6)",
# 012BDE "jsr $18574.l", 012BE4 "lea $12c10.l, A5", 012BF8 "add.l D7, ($12,A6)")
012BCC  func  parked_car_start_hit_box
# a soldier (kind 38) in colour 05 at the car's place, 0x10 across and 0x20 back, with its number
# (012C84 "move.w #$3800, ($2,A6)", 012C8A "move.w #$500, ($42,A6)", 012C96 "addi.l #$1000, ($12,A6)",
# 012C9E "addi.l #$2000, ($16,A6)", 012CA6 "move.b ($30,A0), ($2f,A6)")
012C7E  func  parked_car_start_soldier

# -- kind 36: the car's hit box --
# routine 0: in use and attacking, not drawn (012C1C "move.b #$5, ($0,A0)"), knocks flying (012C22 "lea $181e0.l, A6"),
# 0x400 across and in depth (012C2C "move.w #$400, ($1a,A0)", 012C32 "move.w #$400, ($1c,A0)"), its box
# (012C3C "movea.l $15046.l, A6"), sound 3A (012C48 "move.b #$3a, D7")
012C1C  func  car_hit_box_start
# routine 1: gone under 0x10 on the screen (012C58 "cmpi.w #$10, ($c,A0)"); else across and to the front
# (012C68 "add.l D7, ($12,A0)", 012C70 "sub.l D7, ($16,A0)")
012C58  func  car_hit_box_move

# -- kind 38: the car's soldier --
# routine 0: drawn, 0x300 across and 0x300 to the front (012CB2 "move.b #$81, ($0,A0)", 012CC2 "move.w #$300, ($1a,A0)",
# 012CC8 "move.w #$fd00, ($1c,A0)"), stop_y by number (012CE0 "move.w (A6,D7.w), ($20,A0)"), leaping
# (012CE6 "movea.l $1504e.l, A6"), one enemy more (012CF2 "addq.b #1, $6120c.l")
012CB2  func  car_soldier_start
# routine 1: on (012D12 "bsr $182ee") until his screen y is under stop_y: a gun soldier, kind 09, one enemy less, as the
# gun soldier's start counts him again (012D0A "cmp.w ($20,A0), D7", 012D18 "move.l #$81000900, ($0,A0)",
# 012D2A "subq.b #1, $6120c.l", 04E75E "addq.b #1, $6120c.l")
012D06  func  car_soldier_leap

# -- kind 43: the helicopter --
# routine 0: drawn, can be hit, attacking (012D4E "ori.b #$86, ($0,A0)", 012D54 "lea $181fe.l, A6"), its colours by the
# parameter's bit 0 (012D64 "btst #$0, ($3,A0)", 012D6E "movea.l $152f2.l, A6"), sound 0A (012D7A "move.b #$a, D7"), 900
# frames (012D84 "move.w #$384, ($2c,A0)"), in the air with its shadow (012D8A "ori.b #$80, ($1,A0)",
# 012DB0 "move.l A6, ($3a,A0)"), facing right by bit 7 (012D9E "ori.b #$40, ($0,A0)"), its wait (012DB4 "bsr $1311c"),
# one enemy and one helicopter more (012DC0 "addq.b #1, $6120c.l", 012DC6 "addq.b #1, $6130a.l")
012D4E  func  helicopter_start
# routine 1: bobs and flies (012DCE "bsr $130be", 012DD2 "bsr $12f5c"); when the wait is over, by the parameter's bit 0
# four bullets (routine 2) or three missiles (routine 3) (012DE4 "btst #$0, ($3,A0)", 012DEE "move.b #$4, ($31,A0)",
# 012E00 "addq.b #2, ($4,A0)")
012DCE  func  helicopter_hover
# routine 2: every 5 frames a bullet from free objects 32-39 (012E1E "lea $62a00.l, A6", 012E36 "bsr $13168",
# 012E3A "move.b #$5, ($30,A0)"); after the last, or with none free, routine 1 and a new wait
# (012E42 "subq.b #1, ($4,A0)")
012E06  func  helicopter_fire_bullets
# routine 3: every 7 frames a missile from free objects 24-31 (012E68 "lea $62780.l, A6", 012E80 "bsr $1327a",
# 012E84 "move.b #$7, ($30,A0)"); after the last, routine 1 (012E8C "subq.b #2, ($4,A0)")
012E50  func  helicopter_drop_missiles
# routine 4, struck: with bars left, colour 09, routine 5 for 40 frames, not hittable, sound 05
# (012EA6 "move.b #$9, ($42,A0)", 012EB6 "move.b #$28, ($30,A0)", 012EBC "andi.b #$fd, ($0,A0)",
# 012EC2 "move.b #$5, D7"); with none, routine 6, neither hittable nor attacking (012ECC "move.b #$6, ($4,A0)",
# 012EDA "andi.b #$f9, ($0,A0)"), sound 09 if it is the last helicopter (012EE0 "cmpi.b #$1, $6130a.l",
# 012EEC "move.w #$9, D7"), a big explosion from free objects 24-31 (012F0A "bne $10fca")
012E9A  func  helicopter_struck
# routine 5: shakes (012F10 "bsr $13096"), its colours back after 8 frames (012F1E "move.b #$ff, ($42,A0)"); after the
# 40, routine 1, hittable (012F32 "move.b #$1, ($4,A0)", 012F38 "ori.b #$2, ($0,A0)")
012F10  func  helicopter_recover
# routine 6: the wreck stays behind; gone off the screen, one enemy and one helicopter less (012F40 "jsr $1831e.l",
# 012F4E "subq.b #1, $6120c.l", 012F54 "subq.b #1, $6130a.l")
012F40  func  helicopter_destroyed
# drifts in depth by drift (012F74 "add.l D7, ($16,A0)", 012F90 "bchg #$0, ($2f,A0)"); looks at the turtles in play and
# not being hit (012FA0 "btst D7, $600a1.l", 012FB4 "cmpi.b #$4, ($4,A6)"): the right-most one, the left-most when it
# faces right, and whether it is level with it (012FFE "cmpi.w #$6, D4"); while stay_time lasts it flies at 0x80 a
# frame, 0x200 when level, to 0x10-0x4F beyond that turtle by the frame count (013058 "move.w $600a4.l, D7",
# 01305E "andi.w #$3f, D7", 013074 "move.w #$ff80, D7", 01307E "lsl.w #2, D7"); after it, 0x100 a frame behind the
# scroll, and under 0x10 on the screen gone (01301C "subi.l #$100, ($12,A0)", 013024 "cmpi.w #$10, ($c,A0)"), the last
# one with sound 09 (013044 "move.w #$9, D7")
012F5C  func  helicopter_fly
# with the ride whatever the area, its height 0x40 shaken by the frame count (013096 "addi.l #$600, ($12,A0)",
# 0130A6 "move.b $600a5.l, D7", 0130B4 "addi.w #$4000, D7")
013096  func  helicopter_shake
# its height 0x40 plus a bob from 0130FC by the frame count (0130C6 "move.b $600a5.l, D7", 0130D6 "addi.w #$4000, D7"),
# then with the ride
0130BE  func  helicopter_bob
# in area 6 the object moves across with the ride (0130DE "cmpi.b #$6, $60121.l", 0130EA "addi.l #$600, ($12,A0)")
0130DE  func  carry_with_ride
# the wait before it fires: from 013150, 013154 for the missile ones, by a random 0-3, less 8 times 060094
# (01311C "move.w #$4, D7", 013120 "jsr $48448.l", 013136 "lea $13154.l, A6", 013148 "lsl.b #3, D7")
01311C  func  helicopter_random_wait
# a bullet (kind 44) 0x38 in front of it, 0x22 lower (013174 "move.w #$ff00, ($42,A6)", 01316E "move.w #$4400, ($2,A6)",
# 013188 "subi.w #$2200, ($10,A6)", 01318E "move.l #$3800, D7"), facing right with it (01319E "ori.b #$40, ($0,A6)")
013168  func  helicopter_start_bullet
# a missile (kind 46) 0x10 higher than it (013280 "move.w #$4600, ($2,A6)", 013292 "addi.w #$1000, ($10,A6)")
01327A  func  helicopter_start_missile

# -- kind 44: the helicopter's bullet --
# routine 0: drawn, attacking (0131BC "ori.b #$84, ($0,A0)"), knocks down (0131C2 "lea $18208.l, A6"), 0x500 across its
# way and 0x500 down (0131CC "move.w #$fb00, D7", 0131EA "move.w #$fb00, ($1e,A0)"), the bullet and sound 17
# (0131F0 "movea.l $15360.l, A6", 0131FC "move.b #$17, D7")
0131B8  func  copter_bullet_start
# routine 1: with the ride, on (013210 "jsr $182ee.l"); its attack hit, the burst, routine 3
# (013216 "btst #$3, ($0,A0)", 01324A "addq.b #2, ($4,A0)", 013254 "movea.l $14aa6.l, A6"); on the road, harmless, the
# spark, routine 2 (013224 "bmi $1322a", 01322A "bclr #$2, ($0,A0)", 013238 "movea.l $15368.l, A6")
01320C  func  copter_bullet_fly
# routine 2: gone when its animation ends (013264 "tst.b ($33,A0)", 013268 "beq $1832a"); the spark stays on the road
013264  func  copter_bullet_vanish
# routine 3: the burst with the ride (013260 "bsr $130de"), then gone when it ends
013260  func  copter_bullet_burst

# -- kind 46: the falling missile --
# routine 0: with the ride, drawn, attacking (0132A6 "ori.b #$84, ($0,A0)"), its stats by the parameter
# (0132AC "lea $18212.l, A6", 0132BA "lea $1821c.l, A6"), down at 0x300, 0x800 with parameter 1
# (0132CC "move.w #$300, ($1e,A0)", 0132DA "move.w #$800, ($1e,A0)"), the missile and sound 03
# (0132FA "move.b #$3, D7"), one enemy more (013308 "addq.b #1, $6120c.l")
0132A2  func  falling_missile_start
# routine 1: with the ride, down (013318 "sub.w D7, ($10,A0)"); on the ground, sound 13 and the explosion
# (013322 "clr.w ($10,A0)", 01332A "move.b #$13, D7", 013334 "movea.l $15258.l, A6")
013310  func  falling_missile_fall
# routine 2: gone when the explosion ends, one enemy less (013340 "tst.b ($33,A0)", 013348 "subq.b #1, $6120c.l")
013340  func  falling_missile_explode
# the layers' code (01EBCE), after 0x600 frames with no enemy about: a missile at each turtle in play from free objects
# 12-23 (01335C "btst D5, $600a1.l", 013366 "lea $623c0.l, A6", 01337E "bsr $1338c")
013354  func  rain_missiles_on_turtles
# a missile, parameter 1 (013392 "move.w #$4601, ($2,A6)"), at the turtle's place on the screen by the scroll
# (01339E "move.l $61218.l, D7", 0133AC "move.w ($c,A5), D6", 0133B8 "move.l $6121c.l, D7"), at height 0xF0
# (0133D2 "move.w #$f000, ($10,A6)")
01338C  func  start_falling_missile_at_turtle

# -- kind 54: the flying drones --
# the scene of area 7 (0307F4 "jsr $133fe.l"): seven drones from free objects 12-23 (0133FE "moveq #$6, D0",
# 013400 "lea $623c0.l, A6", 013418 "bsr $1342e"), not released and none counted yet (013420 "clr.b $61311.l",
# 013426 "clr.b $61312.l")
0133FE  func  start_flying_drones
# a drone with its number, far back out of the area (013434 "move.w #$5400, ($2,A6)",
# 013448 "move.l #$13800, ($16,A6)"), its heading, turning and turn speed by the number
# (01345A "move.b (A5,D0.w), ($2c,A6)", 01346A "move.b (A5,D0.w), ($2e,A6)", 013476 "move.b (A5,D0.w), ($2b,A6)",
# 01347C "move.b D0, ($2f,A6)")
01342E  func  start_flying_drone
# the scene of area 7 (030860 "jsr $1349e.l"): the drones released, their sound on (01349E "move.b #$1, $61311.l",
# 0134A6 "move.b #$1, $61318.l", 0134AE "clr.b $61319.l")
01349E  func  release_flying_drones
# routine 0, its way in, by the state (0134BE "move.b ($5,A0), D7", 0134C4 "movea.l (A6,D7.w), A6": the table at 0134CA)
0134B6  func  flying_drone_enter
# state 0: drawn, one enemy and one drone more (0134DA "ori.b #$80, ($0,A0)", 0134E0 "addq.b #1, $6120c.l",
# 0134E6 "addq.b #1, $61312.l"), its bob by its number (0134F6 "move.b D7, ($2a,A0)"), no target, still, its stats
# (0134FE "clr.l ($20,A0)", 01350E "lea $18262.l, A6"), resting (013518 "movea.l $1587e.l, A6")
0134DA  func  flying_drone_start
# state 1: bobs low (013524 "bsr $1385e") until the drones are released (013528 "tst.b $61311.l"): in the air with its
# shadow at y 0x88 (013536 "ori.b #$80, ($1,A0)", 01354E "move.l #$8800, ($16,A0)"), 18 frames
# (013556 "move.b #$12, ($30,A0)"), its picture
013524  func  flying_drone_wait
# state 2: the 18 frames on its heading (013562 "bsr $138f4"), up 1 a frame to 0x2C (01356E "addi.w #$100, ($10,A0)",
# 01357E "move.w #$2c00, ($10,A0)")
013562  func  flying_drone_take_off
# state 3: can be hit (01358C "ori.b #$2, ($0,A0)"), a target (013592 "bsr $11dfa"), its wait (0135A0 "bsr $139b2"),
# 1800 frames (0135A4 "move.w #$708, ($24,A0)"), routine 1
01358C  func  flying_drone_ready
# routine 1: while time_left lasts it bobs, weaves at its target (0135E6 "bsr $13884", 0135EA "bsr $13724",
# 0135EE "bsr $13918"); when its wait is over four shots, routine 2 (013600 "move.b #$4, ($31,A0)",
# 013606 "addq.b #1, ($4,A0)"); after it, up out of sight and gone, one enemy and one drone less
# (0135C4 "addq.b #1, ($10,A0)", 0135C8 "cmpi.b #-$20, ($10,A0)", 0135D8 "subq.b #1, $61312.l")
0135B4  func  flying_drone_fly
# routine 2: every 7 frames a shot from free objects 32-39 (013624 "lea $62a00.l, A6", 01363C "bsr $13a8c",
# 013640 "move.b #$7, ($30,A0)"); after the last, routine 1 and a new wait (013648 "subq.b #1, ($4,A0)",
# 01364C "bsr $139b2")
01360C  func  flying_drone_fire
# routines 3 and 4, struck: with bars left, colour 08, routine 5 for 30 frames, not hittable, sound 05
# (01365E "move.b #$8, ($42,A0)", 01366E "move.b #$1e, ($30,A0)", 01367A "move.b #$5, D7"); with none, routine 6,
# neither hittable nor attacking, wrecked (013684 "move.b #$6, ($4,A0)", 01368E "andi.b #$f9, ($0,A0)",
# 013694 "movea.l $15882.l, A6"), a medium explosion from free objects 24-31 (0136B4 "bne $11016")
013656  func  flying_drone_struck
# routine 5: shakes (0136BA "bsr $13704"), its colours back after 8 frames (0136C8 "move.b #$ff, ($42,A0)"); after the
# 30, routine 1, hittable (0136DC "move.b #$1, ($4,A0)", 0136E2 "ori.b #$2, ($0,A0)")
0136BA  func  flying_drone_recover
# routine 6: gone when the wreck's animation ends, one enemy and one drone less (0136EA "tst.b ($33,A0)",
# 0136F8 "subq.b #1, $61312.l")
0136EA  func  flying_drone_destroyed
# its height 0x2C shaken by the frame count (01370C "move.b $600a5.l, D7", 01371A "addi.w #$2c00, D7")
013704  func  flying_drone_shake
# a target again every 128 frames; with one, the heading turns by turn_speed toward the target's side, swinging between
# directions 4 and C (013764-0137F8: 013774 "cmpi.b #$c, ($2c,A0)", 013798 "cmpi.b #$4, ($2c,A0)"), 1 a frame in depth
# toward it (0137FC "move.l #$100, D6", 013810 "add.l D6, ($16,A0)"), the move by the heading, kept in the area
# (013814 "bsr $138f4", 013818 "bsr $1381e")
013724  func  flying_drone_steer
# under 0x20 on the screen pushed 0x20 on, its y kept within 0x1000-0x7C00 (013828 "addi.l #$2000, ($12,A0)",
# 013830 "cmpi.l #$7c00, ($16,A0)", 013854 "move.l #$1000, ($16,A0)"); also the drone's shot (013BBC "jsr $1381e.l")
01381E  func  flying_drone_keep_in_area
# its height 0x20 plus the bob from 0138B4, 32 steps (01386C "move.w (A6,D7.w), D7", 013870 "addi.w #$2000, D7",
# 01387C "andi.b #$1f, ($2a,A0)")
01385E  func  flying_drone_bob_low
# its height 0x2C plus the bob, 32 steps of 2 frames (013890 "andi.w #$3e, D7", 013898 "addi.w #$2c00, D7",
# 0138A4 "andi.b #$3f, ($2a,A0)")
013884  func  flying_drone_bob
# x and y moved by its direction's step from 0139DA (0138F4 "lea $139da.l, A6", 013908 "add.l D6, ($12,A0)",
# 013912 "add.l D6, ($16,A0)")
0138F4  func  flying_drone_move
# with a target it faces it, its aim from 0139A2 by the direction; with none the direction gives both
# (013936 "bcc $13940", 01393A "ori.b #$40, ($0,A0)", 013950 "andi.b #$3, D7", 013978 "ori.b #$40, ($0,A0)"); aim set,
# its picture by the aim and the frame count (01397E "move.b D7, ($2f,A0)", 013982 "lea $1584e.l, A6",
# 01398A "move.b $600a5.l, D6")
013918  func  flying_drone_animate
# the wait before it fires: from 0139D6 by a random 0-3, less 8 times 060094 (0139B2 "move.w #$4, D7",
# 0139BC "lea $139d6.l, A6", 0139CE "lsl.b #3, D7")
0139B2  func  flying_drone_random_wait
# every frame of play (00694A "jsr $13a1a.l"): in area 7 with the drones' sound on, while any drone is about, sound 38
# every 32-128 frames by a random 0-3 (013A1A "cmpi.b #$7, $60121.l", 013A30 "tst.b $61312.l",
# 013A4E "lea $13a74.l, A6", 013A5C "move.w #$38, D7"); with none, the sound off (013A66 "clr.b $61318.l")
013A1A  func  sound_flying_drones
# a shot (kind 55) at the gun's place by its aim and its facing, from 013AE4 (013A92 "move.w #$5500, ($2,A6)",
# 013AB6 "ori.b #$40, ($0,A6)", 013AC0 "add.b ($2f,A0), D7", 013ACC "add.l D6, ($12,A6)", 013AD4 "add.w D6, ($10,A6)"),
# with the aim (013AD8 "move.b ($2f,A0), ($2f,A6)")
013A8C  func  flying_drone_start_shot

# -- kind 55: the drone's shot --
# routine 0: drawn, attacking, knocks flying (013AFC "ori.b #$84, ($0,A0)", 013B02 "lea $1826c.l, A6"), the flash by the
# aim (013B28 "lsl.w #3, D7", 013B2A "movea.l (A6,D7.w), A6"), its speeds from 013B72 by the aim and facing, down at
# 0x400 (013B50 "move.w (A6,D7.w), ($1a,A0)", 013B5C "move.w #$fc00, ($1e,A0)"), sound 14 (013B62 "move.b #$14, D7")
013AFC  func  drone_shot_start
# routine 1: when the flash ends, the streak, not attacking (013B8A "tst.b ($33,A0)", 013BA0 "movea.l ($4,A6,D7.w), A6",
# 013BAE "bclr #$2, ($0,A0)")
013B8A  func  drone_shot_flash
# routine 2: on, kept in the area (013BB6 "jsr $182ee.l", 013BBC "jsr $1381e.l"); its attack hit, the burst, routine 4
# (013BC2 "btst #$3, ($0,A0)", 013BF6 "addq.b #2, ($4,A0)"); on the ground, attacking again, the flash there, routine 3
# (013BD6 "ori.b #$4, ($0,A0)", 013BE4 "movea.l $15950.l, A6")
013BB6  func  drone_shot_fly
# routines 3 and 4: gone when its animation ends (013C0C "tst.b ($33,A0)", 013C10 "beq $1832a")
013C0C  func  drone_shot_vanish

# -- kind 5C: Baxter Stockman --
# routine 0, his way in, by the state (013C3A "move.b ($5,A0), D7", 013C40 "movea.l (A6,D7.w), A6": the table at 013C46)
013C32  func  stockman_enter
# state 0: drawn, with his shadow (013C56 "ori.b #$80, ($0,A0)", 013C5C "ori.b #$80, ($1,A0)",
# 013C68 "move.l A6, ($3a,A0)"), his stats (013C6C "lea $1828a.l, A6"), flying (013C7E "movea.l $15c70.l, A6"), still,
# the boss not down (013C96 "clr.b $61313.l"), one enemy more (013CA4 "addq.b #1, $6120c.l")
013C56  func  stockman_start
# state 1: once he is the only enemy left (013CAC "cmpi.b #$1, $6120c.l"): the music fades (013CB8 "move.w #$fe, D7"),
# his palette (013CC8 "lea $c6c4.l, A6", 013CD2 "jsr $9242.l"), 100 frames (013CD8 "move.b #$64, ($30,A0)")
013CAC  func  stockman_wait_for_last_enemy
# state 2: with 060083 clear, after the 100 frames: sound 33, the boss music 64, sound BF (the speech of
# "Yippee-I-Ay!"), and he flies in, 0x300 a frame to the left and up 1 (013CE4 "tst.b $60083.l",
# 013CF6 "move.w #$33, D7", 013D00 "move.w #$64, D7", 013D10 "move.w #$bf, D7", 013D1A "move.w #$fd00, ($1a,A0)",
# 013D24 "move.w #$100, ($1e,A0)")
013CE4  func  stockman_wait
# state 3: until he is left of x 0x470 (013D3A "cmpi.l #$47000, ($12,A0)"): can be hit, heading left, turning, turn
# speed 0x20, 3600 frames (013D48 "ori.b #$2, ($0,A0)", 013D4E "move.w #$800, ($2c,A0)",
# 013D6A "move.w #$e10, ($24,A0)"), a target (013D70 "bsr $11dfa"), his drop's wait (013D7E "bsr $14218"), the balloon
# "Yippee-I-Ay!" by him (013D8E "addi.w #$20, D2", 013D92 "jsr $30084.l"), at height 0x2C
# (013D98 "move.w #$2c00, ($10,A0)"), routine 1
013D30  func  stockman_fly_in
# routine 1: while time_left lasts he bobs and weaves at his target (013DD4 "bsr $14120", 013DD8 "bsr $13fc8"); when the
# drop's wait is over, if the enemies are no more than 6-9 by the highest player in play (013DE4 "jsr $142aa.l",
# 013DEA "lea $13e30.l, A6", 013DF4 "cmp.b $6120c.l, D7"), with a free object of 12-23 a Mouser and his claws open,
# routine 2 (013E16 "bsr $142d6", 013E1A "movea.l $15c74.l, A6"), else a new wait; after time_left, up out of sight and
# gone, one enemy less (013DB8 "addq.b #1, ($10,A0)", 013DC6 "subq.b #1, $6120c.l")
013DA8  func  stockman_fly
# routine 2: bobs and weaves until his claws' animation ends (013E42 "tst.b ($33,A0)"), then routine 1, flying, a new
# wait (013E4A "subq.b #1, ($4,A0)", 013E4E "movea.l $15c70.l, A6", 013E5A "bsr $14218")
013E36  func  stockman_drop_mouser
# routine 3, which nothing sets: nothing (013E64 "rts")
013E64  func  stockman_idle
# routine 4, struck: with bars left, routine 5 for 30 frames, not hittable, hurt, sound 05 (013E78 "addq.b #1, ($4,A0)",
# 013E7C "move.b #$1e, ($30,A0)", 013E88 "movea.l $15c78.l, A6", 013E94 "move.b #$5, D7"); with none, routine 6, neither
# hittable nor attacking, defeated (013E9E "move.b #$6, ($4,A0)", 013EAC "andi.b #$f9, ($0,A0)",
# 013EB2 "movea.l $15c7c.l, A6")
013E66  func  stockman_struck
# routine 5: shakes and weaves (013EC4 "bsr $13f82", 013EC8 "bsr $13fc8"); after the 30 frames flying, routine 1,
# hittable (013ED4 "movea.l $15c70.l, A6", 013EE6 "move.b #$1, ($4,A0)", 013EEC "ori.b #$2, ($0,A0)")
013EC0  func  stockman_recover
# routine 6, defeated, by the state (013EFC "move.b ($5,A0), D7", 013F02 "movea.l (A6,D7.w), A6": the table at 013F08)
013EF4  func  stockman_defeated
# state 0: 12 frames, state 1, a big explosion from free objects 24-31 at its place by explosions, sound 11 or 13
# (013F18 "move.b #$c, ($30,A0)", 013F24 "lea $62780.l, A6", 013F38 "bne $10f46"); with none free, state 2
# (013F3C "move.b #$2, ($5,A0)")
013F14  func  stockman_defeated_explode
# state 1: after the 12 frames the next explosion, the boss down (013F54 "addq.b #1, ($2f,A0)",
# 013F58 "move.b #$1, $61313.l"); after 4, state 2 (013F60 "cmpi.b #$4, ($2f,A0)")
013F44  func  stockman_defeated_next_explosion
# state 2: gone when the defeat's animation ends, one enemy less (013F72 "tst.b ($33,A0)", 013F78 "subq.b #1, $6120c.l")
013F72  func  stockman_defeated_vanish
# his height by his depth from 014176/014194 plus a shake from 01416E by the frame count (013F8A "move.b $600a5.l, D7",
# 013F98 "lea $14176.l, A6", 013FB6 "lea $14194.l, A6", 013FC2 "move.w D7, ($10,A0)")
013F82  func  stockman_shake
# a target again every 64 frames; with one, the heading turns by turn_speed toward the target's side, swinging between
# directions 4 and C (014018 "cmpi.b #$c, ($2c,A0)", 01403C "cmpi.b #$4, ($2c,A0)"), 1 a frame in depth toward it
# (0140A0 "move.l #$100, D6", 0140B4 "add.l D6, ($16,A0)"), the move by the heading, kept in his part of the area
# (0140B8 "bsr $141f4", 0140BC "bsr $140c2")
013FC8  func  stockman_steer
# x kept within 0x3C0-0x470, y within 0x18-0x78 (0140C2 "cmpi.l #$47000, ($12,A0)", 0140EA "move.l #$3c000, ($12,A0)",
# 01410C "move.l #$7800, ($16,A0)", 014116 "move.l #$1800, ($16,A0)")
0140C2  func  stockman_keep_in_area
# his height by his depth plus the bob from 0141B4, 32 steps of 2 frames (014120 "lea $141b4.l, A6",
# 01412C "andi.w #$3e, D7", 014152 "lea $14194.l, A6", 01415E "move.w D7, ($10,A0)")
014120  func  stockman_bob
# x and y moved by his direction's step from 01426A (0141F4 "lea $1426a.l, A6", 014208 "add.l D6, ($12,A0)",
# 014212 "add.l D6, ($16,A0)")
0141F4  func  stockman_move
# the wait to his next drop: from 01424A by a random 0-7, less 8 times 060094, at least 1 (014218 "move.w #$8, D7",
# 01421C "jsr $48448.l", 014236 "sub.b D7, ($30,A0)", 014242 "move.b #$1, ($30,A0)")
014218  func  stockman_random_drop_time
# his floor 0x18 from y 0x60 back, else 0 (014252 "clr.b ($32,A0)", 014256 "cmpi.l #$6000, ($16,A0)",
# 014262 "move.b #$18, ($32,A0)")
014252  func  stockman_set_floor
# the number of the highest player in play, 0-3: how many of the players' bits are left as 0600A1 shifts down
# (0142AE "move.b $600a1.l, D5", 0142B4 "lsr.b #1, D5", 0142BA "addq.b #1, D7")
0142AA  func  highest_player_in_play
# not over y 0x38-0x67 (0142D6 "cmpi.l #$3800, ($16,A0)", 0142E2 "cmpi.l #$6800, ($16,A0)"): a Mouser (kind 5E) in the
# air with its shadow at his place, 2.5 pixels back and 8 lower, one enemy more (0142F6 "move.w #$5e00, ($2,A6)",
# 014302 "ori.b #$80, ($1,A6)", 01430E "move.l A5, ($3a,A6)", 014318 "addi.l #$280, ($16,A6)",
# 014320 "subi.w #$800, ($10,A6)", 01432A "addq.b #1, $6120c.l")
0142D6  func  stockman_start_mouser

# -- kind 5E: the Mouser Stockman drops --
# routine 0: drawn, not hittable (014336 "move.b #$81, ($0,A0)"), its stats (01433C "lea $18294.l, A6"), down at 0x400
# (01434E "move.w #$400, ($1e,A0)"), the Mouser (014354 "movea.l $15d4a.l, A6")
014336  func  falling_mouser_start
# routine 1: down (01436A "sub.w D7, ($10,A0)"); from y 0x48 back it lands at height 0x18 on that floor
# (014376 "cmpi.l #$4800, ($16,A0)", 01439C "move.w #$1800, ($10,A0)", 0143A2 "move.b #$18, ($32,A0)"), else on the
# ground; there a Mouser that thinks at once, one enemy less, as the Mouser's start counts it again
# (0143A8 "move.l #$81004e80, ($0,A0)", 0143B4 "subq.b #1, $6120c.l", 050FBA "addq.b #1, $6120c.l")
014366  func  falling_mouser_fall
# routines 2 and 3, which nothing sets, and the end of falling_mouser_fall: nothing (0143BA "rts")
0143BA  func  falling_mouser_idle
# routine 4, struck, which nothing reaches (it cannot be hit): a Mouser on the floor, one enemy less
# (0143BC "move.l #$81004e00, ($0,A0)", 0143C8 "clr.b ($32,A0)")
0143BC  func  falling_mouser_struck

# ---- comments ----
comment parked_car_start the car's spot shows a piece of wall; the car's picture will go into the layer
comment parked_car_draw the parked car is drawn into the layer, where the object is
comment parked_car_wait the car waits until it is well on the screen
comment parked_car_start_drive after a moment the car's three unseen hit boxes start
comment parked_car_drive_off the car drives off to the front right, its picture blanked row by row as it goes
comment parked_car_release_soldiers Foot soldiers leap out one after another, then the car's spot is gone
comment parked_car_follow_object the car's picture keeps with the object as the screen scrolls
comment parked_car_set_scroll the layer's scroll for the car's picture
comment parked_car_blank_row a row of the layer blanked, then the one above next time
comment parked_car_start_hit_box an unseen hit box along the car's body
comment parked_car_start_soldier a Foot soldier where the car stood
comment car_hit_box_start an unseen box that knocks flying the turtles in the car's way
comment car_hit_box_move the box goes with the car until it is off the screen
comment car_soldier_start a Foot soldier leaps out
comment car_soldier_leap the soldier leaps to his place, then is a gun soldier
comment helicopter_start a helicopter comes in the air, its sound on
comment helicopter_hover the helicopter hovers in front of the turtles until it fires
comment helicopter_fire_bullets the helicopter fires a burst of bullets
comment helicopter_drop_missiles the helicopter drops its missiles
comment helicopter_struck a hit makes the helicopter shake, or the last one destroys it in an explosion
comment helicopter_recover the helicopter gets over the hit
comment helicopter_destroyed the wreck stays behind until it leaves the screen
comment helicopter_fly the helicopter drifts in depth and keeps in front of the turtles; after a while it falls behind and is gone
comment helicopter_shake the hit helicopter shakes, carried with the ride
comment helicopter_bob the helicopter bobs in the air, carried with the ride
comment carry_with_ride in the skateboard ride the object moves on with the scroll
comment helicopter_random_wait how long until the helicopter fires, at random
comment helicopter_start_bullet a bullet from the front of the helicopter
comment helicopter_start_missile a missile from the helicopter
comment copter_bullet_start a bullet flies down at a slant, knocking turtles down
comment copter_bullet_fly the bullet bursts on what it hits, or sparks on the road
comment copter_bullet_vanish the bullet is gone when its spark or burst ends
comment copter_bullet_burst the bullet's burst goes on with the ride
comment falling_missile_start a missile drops from above
comment falling_missile_fall the missile drops until it hits the ground and explodes
comment falling_missile_explode the explosion ends and the missile is gone
comment rain_missiles_on_turtles missiles drop on the turtles that dawdle
comment start_falling_missile_at_turtle a missile high above a turtle
comment start_flying_drones the drones wait far back
comment start_flying_drone a drone with its own way to fly
comment release_flying_drones the drones come out, their sound on
comment flying_drone_enter the drone comes in, by the state of its way in
comment flying_drone_start the drone rests
comment flying_drone_wait the drone bobs until it is released, then takes off
comment flying_drone_take_off the drone flies out on its own way, rising
comment flying_drone_ready the drone picks a turtle and can be hit
comment flying_drone_fly the drone weaves at its turtle until it fires; after a while it rises out of sight
comment flying_drone_fire the drone fires a burst of shots
comment flying_drone_struck a hit makes the drone shake, or the last one wrecks it in an explosion
comment flying_drone_recover the drone gets over the hit
comment flying_drone_destroyed the wreck is gone when its animation ends
comment flying_drone_shake the hit drone shakes
comment flying_drone_steer the drone weaves toward its turtle
comment flying_drone_keep_in_area the drone or its shot is kept on the screen and within the area's depth
comment flying_drone_bob_low the resting drone bobs
comment flying_drone_bob the flying drone bobs
comment flying_drone_move the drone moves the way it flies
comment flying_drone_animate the drone faces its turtle and points its gun, the rotor turning
comment flying_drone_random_wait how long until the drone fires, at random
comment sound_flying_drones while drones are about their sound plays now and then
comment flying_drone_start_shot a shot from the drone's gun
comment drone_shot_start the shot flashes at the gun
comment drone_shot_flash after the flash the shot streaks down
comment drone_shot_fly the shot drops until it hits the ground and flashes there
comment drone_shot_vanish the shot is gone when its flash ends
comment stockman_enter Stockman comes in, by the state of his way in
comment stockman_start Stockman waits in his flying machine
comment stockman_wait_for_last_enemy once he is the last enemy the music fades
comment stockman_wait then the boss music, and he flies in
comment stockman_fly_in he flies in, picks a turtle and says "Yippee-I-Ay!"
comment stockman_fly he weaves at his turtle and now and then drops a Mouser; after a while he rises out of sight
comment stockman_drop_mouser his claws open as the Mouser drops
comment stockman_idle Unused: nothing
comment stockman_struck a hit makes him shake, or the last one defeats him
comment stockman_recover he gets over the hit
comment stockman_defeated the defeated Stockman, by the state of his defeat
comment stockman_defeated_explode an explosion on his machine
comment stockman_defeated_next_explosion the next explosion, until four; the boss is down
comment stockman_defeated_vanish he is gone when his defeat's animation ends
comment stockman_shake the hit machine shakes at its height
comment stockman_steer he weaves toward his turtle
comment stockman_keep_in_area he is kept within his part of the sewer
comment stockman_bob he bobs in the air at a height by how far back he is
comment stockman_move he moves the way he flies
comment stockman_random_drop_time how long until his next drop, at random
comment stockman_set_floor the floor under him, higher at the back
comment highest_player_in_play the number of the highest player in play
comment stockman_start_mouser a Mouser drops from his claws, unless he is over the middle of the sewer
comment falling_mouser_start a Mouser falls from Stockman's claws
comment falling_mouser_fall the Mouser falls to the floor and is a Mouser that goes after the turtles
comment falling_mouser_idle nothing
comment falling_mouser_struck Unused: the falling Mouser cannot be hit; it would be a Mouser on the floor

# ---- the pointers where these objects' code works them out ----
# the soldier parked_car_start_soldier starts, in A6 from its caller (012B4C "lea $623c0.l, A6", 012B58 "jsr $1830c.l"):
# its number (012CA6 "move.b ($30,A0), ($2f,A6)")
param parked_car_start_soldier a6 soldier object.car_soldier
# the drone start_flying_drone sets up, in A6 from its caller (013400 "lea $623c0.l, A6", 01340C "jsr $1830c.l"): its
# heading, turning, turn speed and number (01345A "move.b (A5,D0.w), ($2c,A6)", 01347C "move.b D0, ($2f,A6)")
param start_flying_drone a6 drone object.flying_drone
# the shot flying_drone_start_shot starts, in A6 from its caller (013624 "lea $62a00.l, A6", 013630 "jsr $1830c.l"): its
# aim (013AD8 "move.b ($2f,A0), ($2f,A6)")
param flying_drone_start_shot a6 shot object.drone_shot

# ######## batch 3 of the names: every function of the 68000 program ########
# ======== the boot (001000-00193D) ========
# The reset: the boot screen, the RAM and ROM check (no stack: the routines come back by a jump through a register),
# then the work RAM, the DIP switches and the main loop.
# the reset (vector 1): the chips' registers cleared (00108A "bsr $10bc", 00109A "bsr $10d2"), the RAM test (00106E "jmp
# $1492.l"), the cross hatch (001170-00118A), the work RAM zeroed (0011BE "movem.l D1-D6/A1-A2, -(A0)"), the queues
# (0011CC "lea $60400.l, A0", 0011FC "lea $60380.l, A0"), the DIP switches (00122C "move.b D0, $60030.l" on), IRQ5 on
# (00138A "ori.b #$20, $60058.l") and the main loop: the fire's tiles, then each job of the queue (0013C2 "jsr $1fdca.l",
# 0013B6 "lea $13de.l, A0", 0013C0 "jsr (A0)")
001000  func  reset
# the K051960's registers 1-3 to 0 (0010BE "move.b D7, $140001.l", 0010CA "move.b D7, $140002.l")
0010BC  func  clear_sprite_chip_registers
# the K052109's registers at 106900, 106B00, 106E00 and 106C00 to 0 (0010D4 "move.b D7, $106900.l", 0010E6 "move.b D7,
# $106c00.l")
0010D2  func  clear_tile_chip_registers
# the tile RAM: the fixed layer's 0x800 tiles (0010F4 "lea $100000.l, A0", 0010FA "move.w #$7ff, D7") and the two
# layers' 0x2000 (00110C "lea $102000.l, A0") to tile 0x10, the blank one; the layers' scroll registers to 0 (001120
# "move.b D0, $106402.l")
0010EE  func  clear_tile_ram
# D1-D6, A1 and A2 to 0, for the movem that zeroes the work RAM (0011BC "bsr $114c", 0011BE "movem.l D1-D6/A1-A2,
# -(A0)")
00114C  func  zero_boot_fill_registers
# the boot screen: one palette of 16 colours into the first 16 palettes (001712 "lea $191e.l, A1", 00171C "move.b
# (A1)+, ($1,A6)"), the rest black (001730 "lea $80400.l, A6"), the fixed layer blank, and "RAM ROM CHECK" (001776
# "move.w #$0, D3", 00177A "jmp $18e2.l")
001708  func  start_boot_screen
# the 4 hexadecimal digits of D4 written backwards at A4 (001788 "andi.w #$f, D6", 001794 "addi.w #$7, D6", 001798
# "move.b D6, -(A4)"): the program chips' sums when one is bad (00156A "move.w (A0)+, D4", 001572 "jmp $1782.l"); no
# scenario has a bad chip
001782  func  print_boot_hex
# a RAM tested by bytes: 0, 0x55, 0xAA and 0xFF written and read back at each even and odd byte (0017B2 "move.b D1,
# (A1)", 0017C0 "move.b D1, ($1,A1)", 0017EE "addi.b #$55, D1"), a bad one's bits from A2 into D7 (0017BC "or.b
# ($0,A2), D7"): the tile RAM, the work RAM and the sprite RAM (0014B4 "lea $100000.l, A0", 0014DA "lea $60000.l, A0",
# 0014FE "lea $140400.l, A0")
0017A6  func  test_ram
# the same for the palette RAM, whose bytes are every other one (001806 "move.b D1, ($1,A1)", 001818 "move.b D1,
# ($3,A1)"; 00149A "lea $80000.l, A0")
0017F6  func  test_palette_ram
# the check's results: the screen cleared, "RAM ROM CHECK" and the chips' "OK" (0018AE "move.w #$1, D3"), then a "BAD"
# for each bit of D7 (0018C8 "lsr.l #1, D6", 0018CE "lea $18d8.l, A4", 0018D4 "bra $18e2")
001890  func  show_boot_check
# the text D3 of the boot's table (0018E2 "lea $15ac.l, A6"): 16-bit offsets into the fixed layer (0018FA "adda.w
# (A5)+, A6"), its characters less 0x30 (00190C "subi.b #$30, D4"), '/' a new place, '?' the end; it comes back by
# A4 (00191C "jmp (A4)")
0018E2  func  print_boot_text

# ======== the test mode's mask ROM check (001942-001E97) ========
# the exceptions' handler (the vectors' other entries): it loops until the watchdog resets the board (00193E "nop",
# 001940 "bra $193e")
00193E  func  exception_hang
# test page 1, MASK ROM CHECK, by its steps (001942 "lea $1958.l, A6", 001948 "move.b $60007.l, D7")
001942  func  mask_rom_check_page
# its first step: the three layers cleared (job 0 with 7: 001972 "move.w #$7, D7", 001976 "jsr $4164.l")
00196C  func  mask_rom_check_clear
# "MASK ROM CHECK" (00198E "move.w #$8, D7", 001992 "jsr $22aa.l") and the test's palette (001998 "lea $a07e.l, A6")
001984  func  draw_mask_rom_check
# the sums at 063500 cleared and the job that works them out queued (0019BC "lea $63500.l, A0", 0019CE "move.w
# #$1100, D7")
0019AE  func  start_mask_rom_sums
# the six sums against the right ones (0019F8 "lea $1e34.l, A0", 001A0E "cmp.w (A6)+, D7"): "OK", or each chip's "OK"
# and a "BAD" for the wrong ones (001A22 "move.w #$9, D7", 001A32 "move.w #$a, D7", 001A40 "move.w #$b, D1"); then
# 0x80 frames (0019F0 "move.b #$80, $60004.l")
0019E0  func  show_mask_rom_check
# the next page when the 0x80 frames run out (001A64 "subq.b #1, $60004.l", 001A6E "addq.b #1, $60005.l"), the
# buttons as on every page (001A7A "bra $5da4")
001A5A  func  mask_rom_check_wait
# job 0x11: the mask ROMs summed into 063500, the sprites' (two halves) and the tiles' (001A84 "bsr $1a98", 001A88
# "bsr $1ada", 001A8C "bsr $1bd6")
001A7E  func  sum_mask_roms
# the sprites' ROM banks 0-3 read through the K051960 (001AA4 "move.b #$0, $63518.l", 001AAC "move.b #$3,
# $63519.l"), two sums kept (001AC8 "move.w D7, ($0,A0)", 001AD4 "move.w D7, ($2,A0)")
001A98  func  sum_sprite_roms_low
# banks 0x40-0x43 (001AE6 "move.b #$40, $63518.l"), into the third and fourth sums (001B0A "move.w D7, ($4,A0)")
001ADA  func  sum_sprite_roms_high
# the K051960's ROM read on (001B1C "bset #$5, $6005a.l"), each bank (001B4C "move.b D7, $140003.l") read 4 bytes at
# a time through 140004-140007 (001B6C "move.b $140004.l, D4") and summed (001B9C "bsr $1d06")
001B1C  func  sum_sprite_rom_banks
# the tiles' ROM read through the K052109 (001C2A "bset #$7, $60058.l": 0A0001 bit 7), each byte read until it reads
# the same twice (001C44 "move.b ($0,A2), D3", 001C4C "cmp.b D3, D4") and summed (001C80 "bsr $1d06")
001BD6  func  sum_tile_roms
# 4 bytes read: their bits taken two by two into 4 bytes added to the sums at 063510 (001D18 "btst D2, D4", 001D50
# "btst D3, D4", 001D90 "add.w D3, (A6)+")
001D06  func  add_to_rom_sums
# job 0: the layers D7's bits pick cleared (001E44 "btst #$0, D7" the fixed layer, 001E54 "btst #$1, D7" layer A,
# 001E64 "btst #$2, D7" layer B), then one job fewer to wait for (001E74 "subq.b #1, $60082.l")
001E42  func  clear_layers_job
# the blank tile: colour 0, code 0x10 (001E7C "moveq #$0, D1", 001E7E "moveq #$10, D2")
001E7C  func  blank_tile
# the fixed layer's 0x800 tiles blank (001E82 "move.w #$7ff, D0")
001E82  func  clear_fixed_layer
# a layer's 0x1000 tiles from A6 blank (001E8A "move.w #$fff, D0", 001E8E "move.b D1, (A6)+")
001E8A  func  clear_scroll_layer

# ======== the texts and the players' boxes (001EB2-003B5B) ========
# the text D7 of the table in A6 (print_game_text, print_demo_text, print_test_text) into the fixed layer: its place
# (001EC6 "movea.l (A6)+, A4"), the colour 06007A (001EC0 "move.b $6007a.l, D7"), each character less 0x30 (001ED8
# "subi.b #$30, D6"); with bit 9 of D7 it is erased (001F04 "move.b #$10, (A4)+")
001EB2  func  print_table_text
# job 2: the texts' colour 06007A from text_colours by D7 (001F0A "lea $1f1a.l, A6", 001F10 "move.b (A6,D7.w),
# $6007a.l")
001F0A  func  set_text_colour
# job 3: the same into 06007B (001F30 "move.b (A6,D7.w), $6007b.l"), which nothing reads; no scenario runs it
001F2A  func  set_spare_text_colour
# job 4, an enemy defeated (the attack check's 0472FE "move.w #$400, D7"): in a game (001F3A "tst.b $600a3.l") a point
# to the score of each player D7's bits pick (001F4E "lea $60106.l, A4", 001F54 "bsr $1f92"), the scores redrawn
# (001F8E "bra $1fb8")
001F3A  func  add_point
# a point (the BCD 0001 at 002030) added to the score before A4 (001F92 "lea $2032.l, A5", 001FA0 "abcd -(A5),
# -(A4)"), the top score 060076 kept (001FA8 "lea $60076.l, A6", 001FB4 "move.w D7, (A6)")
001F92  func  add_point_to_score
# the scores of the players D4's bits pick, in their boxes (001FB8 "btst #$0, D4", 001FC0 "bsr $1fea")
001FB8  func  draw_scores
# the first player's score (060104) in his box (001FEA "lea $60104.l, A6", 001FF0 "lea $1001a4.l, A4")
001FEA  func  draw_score_player_1
# the second's (001FF8 "lea $6010c.l, A6", 001FFE "lea $1001b6.l, A4")
001FF8  func  draw_score_player_2
# the third's (002006 "lea $60114.l, A6")
002006  func  draw_score_player_3
# the fourth's (002014 "lea $6011c.l, A6")
002014  func  draw_score_player_4
# the top score (002022 "lea $60076.l, A6", 002028 "lea $1001c2.l, A4"), after HIGH (002102's); no scenario runs it
002022  func  draw_top_score
# a BCD word as four digits at A4, the leading zeros blank (002034 "lsr.b #4, D6", 00203A "bsr $208c", 002066 on
# "bsr $2090")
002032  func  draw_score_digits
# a blank instead of a leading zero (00208C "move.b #$10, D6")
00208C  func  draw_blank_digit
# the digit D6 at A4, colour 0 (002090 "move.b #$0, (A4)+", 002094 "move.b D6, (A4)+")
002090  func  draw_digit
# job 5: the scores of the players D7's bits 0-3 pick and, with bit 4, the top score to 0 (00209E "clr.w $60104.l",
# 0020CE "clr.w $60076.l")
002098  func  clear_scores
# the characters at A5 into A4 up to '?', less 0x30, colour 0 (0020D6 "move.b (A5)+, D6", 0020DE "subi.b #$30, D6")
0020D6  func  print_plain_text
# job 6: the labels "1UP"-"4UP" (00212C "lea $20ec.l, A5", 002148 "lea $20f4.l, A5") and, with bit 1, "HIGH" and the top
# score (002112 "lea $20fc.l, A5", 002120 "bsr $2022"); no scenario runs it: the boxes have their own labels
002102  func  draw_score_labels
# the text D7 of colour_texts (0022AA "lea $2f36.l, A6"): its place, its colour byte (0022C0 "move.b (A6)+, D6") and its
# characters less 0x30; with bit 9 it is erased (0022F8 "move.b #$10, (A4)+"): "CREDIT", "MASK ROM CHECK", "OK", "BAD"
0022AA  func  print_colour_text
# job 9: the picture D7 of the table at 0031F2 (002300 "lea $31f2.l, A6"): rows of tiles (a place, a length, a colour:
# 00231A "movea.l (A6)+, A4", 00231E "move.b (A6)+, D4") with their codes after the rows (002314 "lea (A6,D7.w),
# A5"); no scenario runs it
002300  func  draw_tile_picture
# job 0xB: the boxes of the players D7's bits 0-3 pick (002338 "btst D6, D7", 00233E "bsr $2368"), and with bit 6
# and no bit 7 their scores (002362 "bsr $1fb8")
002336  func  draw_player_boxes
# a player's box from its record at 0032C2 (002368 "movea.l #$32c2, A6", 002370 "lsl.w #4, D5"): with bit 6 its frame
# and label (00237E "bsr $23a4"), bit 4 its lives (00238E "bsr $23b2"), bit 5 its health bar (00239E "bsr $245a")
002368  func  draw_player_box
# the box's frame and label in the player's colour (0023A4 "bsr $24a6", 0023A8 "bsr $2546", 0023AC "bsr $2584")
0023A4  func  draw_box_frame_and_label
# the player's lives (060100 on, 8 bytes a player: 0023C2 "lea $60100.l, A4", 0023CC "move.w (A4,D4.w), D4") in the
# box's digits (0023D0 "lea $33a2.l, A4"): units, tens (blank when 0 and no hundreds: 002428 "move.b #$10, ($3,A5)"),
# hundreds; with bit 7 only blanks
0023B2  func  draw_lives
# the player's health (+6 of the record: 002474 "move.b ($6,A4,D4.w), D4") as the four tiles of its bar (002478 "lea
# $334a.l, A4", 002482 "mulu.w #$8, D4")
00245A  func  draw_health_bar
# the player's colour: text_colours by the player, odd (0024A6 "lea $1f1a.l, A4", 0024B0 "ori.b #$1, D0")
0024A6  func  player_box_colour
# the lives' place blank (0024CC "move.b #$5e, ($1,A5)", 0024DE "move.b #$6e, ($81,A5)") with its left edge (0024F8
# "move.b #$1a, (-$1,A5)")
0024B6  func  clear_lives_digits
# the health bar's place blank (00250C "move.b #$5e, ($1,A5,D4.w)") and its end (002530 "move.b #$1d, ($1,A5,D4.w)")
002506  func  clear_health_bar
# the box's frame, the text at 003302 (002546 "lea $3302.l, A4"), each tile 0x5E with bit 7 (002572 "move.b #$5e, D2")
002546  func  draw_box_frame
# the box's label "1UP"-"4UP": four tiles from the player's entry of 00332A (002590 "lea $332a.l, A4", 0025AE "move.b
# ($0,A4), ($1,A5)")
002584  func  draw_box_label
# job 0xC: the stage's title from the table at 003402 by the stage (002604 "movea.l #$3402, A6", 00260C "move.b
# $60121.l, D7"): "STAGE 1 FIRE APART" ...; no scenario runs it
002604  func  print_stage_title
# job 0xD: the message under the box of the player D7 & 3 (002644 "andi.w #$3, D6", 002660 "adda.w D6, A6"), by D7's
# bits 2-5 (002662 "lea $2678.l, A5", 00266C "andi.b #$3c, D6"), in the player's colour (00264E "move.b ($1,A5,D6.w),
# $6007a.l")
00263C  func  draw_player_message
# "INSERT COIN(S)" in the box (positioned text 0: 002698 "moveq #$0, D6"), once (002692 "move.b #$1, ($7,A6)"):
# seen in one_player (frame 718, boxes 2-4)
002688  func  message_insert_coin
# "PRESS START" under the box, blinking every 16 frames (0026B4 "move.b $600a5.l, D6", 0026D0 "btst #$4, $600a5.l"),
# texts 2 and 3; with 0600B8 set the head alone, 8 and 9 (0026C4 "tst.b $600b8.l", 0026CE "moveq #$8, D6"): one_player
# frames 730 and 750
0026A0  func  message_press_start
# the knocked-out head of a player out of lives (0600B3: 004336 "bset D7, $600b3.l"): texts 4-7 in turn (002708 "move.b
# $600a5.l, D5", 00270E "andi.b #$18, D5"), four rounds (002728 "addi.b #$20, ($7,A6)"), then he is no longer out
# (00273E "bclr D7, $600b3.l"): one_player frames 3040-3070
0026E4  func  message_out_of_lives
# the line under the box cleared (positioned text 1: 002756 "moveq #$1, D6"), in play
002746  func  message_clear
# draw_big_character's colour: text_colours by D7 (00280C "lea $1f1a.l, A3", 002812 "move.b (A3,D7.w), D7")
00280C  func  big_character_colour
# job 0xF: the text D7 of the table at 00375C ("BEST 10 PLAYERS", "CONTINUE", "GAME OVER", "1ST"...: 002818 "lea
# $375c.l, A6") in tall characters, two tiles a character from the font at 002884 (00281E "lea $2884.l, A5", 00285A
# "bsr $2862"); with bit 7 erased (002824 "btst #$7, D7", 002902 "bsr $2908")
002818  func  print_tall_text
# a tall character: its top tile and its bottom one a row below (00286C "move.b D4, ($80,A4)", 002870 "move.b
# ($1,A5,D6.w), ($81,A4)"); 0xFE a space left as it is (002862 "cmpi.b #-$2, D6")
002862  func  draw_tall_character
# a tall character erased (002908 "move.b #$0, ($80,A4)", 00290E "move.b #$10, ($81,A4)"); no scenario erases one
002908  func  erase_tall_character
# the tall text's colour: text_colours by its colour byte (00291E "lea $1f1a.l, A3", 002924 "move.b (A3,D4.w), D4")
00291E  func  tall_text_colour

# ======== the frame (003B5C-00467B) ========
# Each player's coin slot has 8 bytes at 060300: +0 the coins left to count on the coin counter, +1 the coins towards a
# credit, +2 the counter's pulse, +5 the counter on, +6 the credits not given yet. Each player's record has 8 bytes at
# 060100: +0 the lives (BCD), +2 a value from the DIP switches (06009A), +4 the score (BCD), +6 the health, +7 the message
# under the box.
# every frame: the coin counters pulsed (003BC2 "bsr $3cb0"), board_control's bit 0 on while one is on (003BE0 "andi.b
# #$fe, D7", 003BEA "move.b D7, $a0001.l"), the coins just inserted counted (003C68 "bsr $3ce8") and the service
# switches' credits (003C94 "addi.w #$1, ($6,A0)")
003B5C  func  update_coins
# the coin and service switches pressed two frames ago and not in the two before (003BFE "move.b $60044.l, D0", 003C0C
# "and.b $60046.l, D0"), with the coin's sound: out of a game the sound stopped first (003C2E "move.b #$ff, D7",
# 003C36 "move.b #$86, D7")
003BFE  func  new_coin_presses
# the slot's coin counter: on for 30 frames of 60 for each coin still to count (003CD6 "subq.b #1, ($0,A0)", 003CE0
# "move.b #$3c, ($2,A0)", 003CC0 "cmpi.b #$1e, D0")
003CB0  func  pulse_coin_counter
# a coin in the slot: one more for the counter (003CE8 "addq.b #1, ($0,A0)"), and every 060303 coins 060304 credits
# (003CF4 "cmp.b $60303.l, D7", 003D06 "move.b $60304.l, D7", 003D0C "add.w ($6,A0), D7"): the coinage DIP switches
# (001274 "move.b (A0,D1.w), $60303.l")
003CE8  func  count_coin
# each slot's credits into its player's lives: 060090 lives a credit (the DIP switch: 0012B2 "move.b (A0,D0.w),
# $60090.l") added in BCD up to 999 (003D4E "abcd D5, D4", 003D58 "cmpi.w #$999, D4"), the player marked for his
# box (003D36 "bset D3, $600a2.l"); the players with lives into 0600B7 (003DA2 "move.b D6, $600b7.l")
003D1E  func  add_credit_lives
# the IRQ5: the registers kept at 060440 (003DC4 "movem.l D0-D7/A0-A6, $60440.l"), the IRQ lowered, frame_count (003DF8
# "addi.w #$1, $600a4.l"), the sound queue (003E06 "bsr $9202"), the inputs, the coins, the palettes (003E22 "jsr
# $9272.l"), and the game state's frame (003E38 "lea $3e60.l, A0", 003E42 "jsr (A0)"), back by rtr
003DC4  func  vblank_interrupt
# the inputs: each frame's coins and four players kept for four frames (003E70 "move.l $6003c.l, $60040.l", 003EC2
# "move.b D0, $60034.l"), the buttons pressed this frame (003ED2 "move.b D0, $60050.l"), and the layers' scroll copies
# into the K052109 (003F32 "move.b $6005f.l, $106018.l", 003F46 "move.b D7, $106400.l")
003E70  func  read_inputs
# game state 0, after the reset: its steps (003F7A "move.b $60003.l, D0", 003F82 "lea $3f8e.l, A0")
003F78  func  run_startup
# its first step: the K052109's and K051960's registers, the screen's flip, and with the test switch the test mode
# (003FCC "btst #$2, $60032.l", 003FFE "move.b #$3, $60001.l"); else the layers cleared (003FEA "bsr $4164") and the
# palettes (003FF8 "bsr $9242")
003F9A  func  startup_begin
# the next step when the jobs are done (004008 "tst.b $60082.l", 004012 "tst.b $60083.l")
004008  func  startup_wait
# the attract mode (game state 1: 004056 "addi.b #$1, $60001.l") after its frame, or at once with a coin (004036 "tst.b
# $60327.l", 004040 "move.b $60044.l, D0")
00402C  func  startup_end
# the screen's flip from the DIP switch (004086 "btst #$0, $60032.l") into the K052109 (0040A0 "move.b D7, $106d00.l")
# and the K051960 (0040AC "move.b D6, $140000.l")
004072  func  set_screen_flip
# game state 1, the attract mode: its step (0040BE "lea $4100.l, A0"), the players' starts (0040CA "bsr $419c"), and
# when one starts the game (game state 2: 0040F8 "addq.b #1, $60001.l") with the sound stopped (0040D8 "move.b #$0, D7")
0040B4  func  run_attract
# game state 2, the game: its scene (004126 "move.b $60005.l, D0", 00412E "lea $413a.l, A0")
004124  func  run_game
# game state 3, the test mode (00415E "jmp $5684.l")
00415E  func  run_test_mode
# the job D7 (its number in the high byte, its parameter in the low one) into the queue at 060380-0603FF the main loop
# runs (004164 "movea.l $60010.l, A6", 00416A "move.w D7, (A6)+", 004176 "movea.l #$60380, A6")
004164  func  queue_job
# the jobs of the list in A5 up to FFFF (004184 "move.w (A5)+, D7", 004186 "cmpi.w #-$1, D7", 00418C "bsr $4164")
004184  func  queue_jobs
# the IRQ6's handler (vector 30), which the board never raises (004194 "clr.b $600d0.l", 00419A "rte")
004190  func  irq6_interrupt
# in the attract mode: the players with lives (00419C on: 0041B2 "move.w ($0,A6), D1") whose attack or jump is pressed
# this frame and not the last (0041BA "move.b (A5,D0.w), D1", 0041BE "andi.b #$30, D1", 0041C6 "move.b ($4,A5,D0.w),
# D1") start the game: they join (0041F0 "move.b D1, $600a1.l", 0041F6 "move.b D1, $600a6.l"), a game on (0041FC
# "move.b #$1, $600a3.l")
00419C  func  check_starts
# the same in a game, for the players not in it yet (004224 "btst D0, $600a1.l"): they join (00426E "or.b D1,
# $600a1.l", 004274 "or.b D1, $600a6.l")
004206  func  check_joins
# the first player's record: his score and its +2 (004284 "lea $60100.l, A6", 00428A "bsr $433e"), his health (00428E
# "clr.b ($6,A6)")
004284  func  reset_player_1
# the second's (004294 "lea $60108.l, A6")
004294  func  reset_player_2
# the third's (0042A4 "lea $60110.l, A6")
0042A4  func  reset_player_3
# the fourth's (0042B4 "lea $60118.l, A6")
0042B4  func  reset_player_4
# a life of the first player's used (0042C4 "lea $60100.l, A6", 0042CA "move.b #$0, D7", 0042CE "bsr $4304")
0042C4  func  use_life_player_1
# of the second's (0042D4 "lea $60108.l, A6")
0042D4  func  use_life_player_2
# of the third's (0042E4 "lea $60110.l, A6")
0042E4  func  use_life_player_3
# of the fourth's (0042F4 "lea $60118.l, A6")
0042F4  func  use_life_player_4
# a life taken off (BCD: 00430A "move.b ($1,A6), D1", 00430E "sbcd D0, D1") and the health full (004328 "move.b #$a,
# ($6,A6)"); with none left the player is out of the game (004330 "bclr D7, $600a1.l") and out of lives (004336
# "bset D7, $600b3.l")
004304  func  use_life
# the score to 0 and +2 from 06009A (00433E "clr.w ($4,A6)", 004342 "move.w $6009a.l, ($2,A6)")
00433E  func  reset_score
# every frame of play: the players who join (00434C "bsr $4378"), the boxes whose lives changed (004350 "bsr $435e"),
# the turtles who come back (004354 "bsr $43e8"), the messages under the boxes (004358 "bsr $445e")
00434C  func  update_players_in_game
# the boxes of the players whose lives a credit changed (00435E "move.w #$b00, D7", 004362 "add.b $600a2.l, D7")
00435E  func  redraw_new_lives
# the players who join (004378 "tst.b $600a6.l"): their turtles in (004388 "jsr $19b3a.l"), a life each (00439A "bsr
# $42c4"), their boxes (0043D8 "ori.b #$30, D7", 0043DC "bsr $2336")
004378  func  join_players
# the players whose turtle was knocked out (0043E8 "tst.b $600a0.l"): a life each (0043FE "bsr $42c4"), the ones still in
# come back (004432 "move.b $600a1.l, D7", 00443E "jsr $19b92.l"), their boxes
0043E8  func  respawn_players
# the four messages under the boxes (00445E "moveq #$3, D0", 004460 "bsr $446a")
00445E  func  update_player_messages
# the player D0's message (job 0xD: 0044E4 "addi.w #$d00, D7"): with lives and not playing PRESS START (0044CE "ori.b
# #$4, D7"), out of lives the knocked-out head (0044DA "ori.b #$8, D7"), no lives INSERT COIN(S) (0044C8 "moveq #$0,
# D7"), in play the line cleared (0044C0 "ori.b #$c, D7")
00446A  func  update_player_message
# the play's work cleared: the palette effects (0044F8 "bsr $9a3a"), the objects and the sprites (0044FC "bsr $4604",
# 004500 "bsr $4612"), the engine's variables (004504 "bsr $45da", 004508 "bsr $455c", 00450C "bsr $45e8")
0044F8  func  clear_play
# D0 + 1 blocks of 256 bytes below A0 to 0 (00451A "movem.l D1-D7/A1, -(A0)" eight times; 004540 the same 32 bytes at a
# time)
004512  func  zero_ram_below
# D1-D7 and A1 to 0, for that movem (00454A "moveq #$0, D1", 004558 "movea.l D1, A1")
00454A  func  zero_fill_registers
# 061100-0612FF and 063100-0631FF to 0 (00455C "bsr $45be", 004560 "bsr $45cc", 004564 "bsr $45f6")
00455C  func  clear_area_variables
# the first player's record to 0 (004592 "lea $60100.l, A0", 0045B8 "move.l D0, (A0)+"); only clear_players_and_ram calls it
004592  func  clear_player_1
# the second's (00459C "lea $60108.l, A0")
00459C  func  clear_player_2
# the third's (0045A6 "lea $60110.l, A0")
0045A6  func  clear_player_3
# the fourth's (0045B0 "lea $60118.l, A0")
0045B0  func  clear_player_4
# 061100-0611FF to 0 (0045BE "lea $61200.l, A0", 0045C4 "move.w #$0, D0"): the area's counters (061104)
0045BE  func  clear_area_counters
# 061200-0612FF to 0 (0045CC "lea $61300.l, A0"): spawn_next, the draw list's head, the enemies on screen (06120C)
0045CC  func  clear_enemy_variables
# 061100-0613FF to 0 (0045DA "lea $61400.l, A0", 0045E0 "move.w #$2, D0")
0045DA  func  clear_engine_variables
# 061000-0617FF to 0 (0045E8 "lea $61800.l, A0", 0045EE "move.w #$7, D0"), the draw list's rows at 061400 among them
0045E8  func  clear_engine_ram
# 063100-0631FF to 0 (0045F6 "lea $63200.l, A0"), which no instruction names otherwise
0045F6  func  clear_spare_ram
# the 50 objects (062000-062F9F) to 0 (004604 "lea $62fa0.l, A0", 00460A "move.w #$7c, D0")
004604  func  clear_objects
# it works down from the objects' end (004604 "lea $62fa0.l, A0", 00460E "bra $453c", 004540 "movem.l D1-D7/A1,
# -(A0)"), which is where the
# players' slots start: the address points at no slot (none), whatever the pointers would make of it
local clear_objects 004604 a0 objects_end none
# the K051960's sprite RAM (140400-1407FF) to 0 (004612 "lea $140800.l, A0", 004618 "move.w #$3, D0")
004612  func  clear_sprite_ram

# ======== the demos and the players' inputs (00467C-005265) ========
# the inputs the turtles read: in a game the players' own (004686 "move.l $60028.l, $6002c.l", 0046A4 "move.b $60034.l,
# $60020.l", 0046CC "move.b $60050.l, $6004c.l"); in a demo each player's recorded stream (004716 "lea $47c8.l, A6"):
# a byte and its frames at a time (004742 "move.b (A5)+, D0", 004744 "move.b (A5)+, ($0,A4)"), its handler (00475E "jsr
# (A2)"), and the presses worked out (00477E "move.b D0, $6004c.l")
00467C  func  update_game_inputs
# code no path reaches (no call, jump or table names 004808), which the data walk took for the end of a table: a demo's
# recorder, update_game_inputs' playback the other way round. For each of four channels, from the last (004808 "moveq
# #$3, D7", 00480A "lea $4872.l, A6"), the work RAM long that holds where its stream is written (004814 "movea.l
# (A6,D6.w), A5", 004818 "movea.l ($0,A5), A4") and the player's inputs (00481C "movea.l ($4,A6,D6.w), A3", 004824
# "move.b ($0,A3), D0"): the same inputs as the pair being written count one frame more (00482E "move.b ($1,A4), D1",
# 004832 "addq.b #1, D1", 004838 "move.b D1, ($1,A4)"), up to 255; other inputs start a pair, an input and 1
# (004854 "lea ($2,A4), A4", 004858 "move.b D0, (A4)", 004860 "move.b #$1, ($1,A4)"), and call the channel's join
# routine with them in 060066 (00485A "move.b D0, $60066.l", 00486A "jsr (A2)"): the demos' streams' format
# (demo_input_stream), recorded
004808  func  record_demo_inputs
# the recorder's four channels, 16 bytes each (00480A "lea $4872.l, A6", 004812 "lsl.w #4, D6"): the work RAM long
# that holds where the channel's stream is written (063800, 063A00, 063C00, 063E00: 0x200 bytes apart), the player's
# inputs (060034-060037), the join routine (demo_join_player_1-4, 004820 "movea.l ($8,A6,D6.w), A2"), and a long of 0
004872  data  demo_recorder_channels  record=16 code=8 count=4
# the recorder's names, as update_game_inputs': 00480A "lea $4872.l, A6" the channels' records (a join routine leaves A6 at
# the joining player's record, 0048D8 "bsr $4284": what the channels after it read is then the work RAM past it, so the C
# reads them through the bus, as update_game_inputs does)
local record_demo_inputs 00480A a6 channels
# 004810 "move.w D7, D6" 004812 "lsl.w #4, D6" the channel times 16, its record in demo_recorder_channels
local record_demo_inputs 004810,004812 d6 channel_offset
# 004814 "movea.l (A6,D6.w), A5" the work RAM long that holds where the channel's stream is written
local record_demo_inputs 004814 a5 record_place
# 004818 "movea.l ($0,A5), A4" 004840 "lea ($2,A4), A4" 004854 "lea ($2,A4), A4" the pair being written in the stream, an
# input and its frames
local record_demo_inputs 004818,004840,004854 a4 record
# 00481C "movea.l ($4,A6,D6.w), A3" where the player's inputs are
local record_demo_inputs 00481C a3 inputs_place
# 004820 "movea.l ($8,A6,D6.w), A2" the channel's join routine
local record_demo_inputs 004820 a2 join_routine
# 004824 "move.b ($0,A3), D0" the player's inputs this frame
local record_demo_inputs 004824 d0 inputs
# 00482E "move.b ($1,A4), D1" 004832 "addq.b #1, D1" the pair's frames, one more
local record_demo_inputs 00482E,004832 d1 frames
# in a demo, a recorded byte with bit 7 (0048B2 "tst.b $60066.l") brings the first player in, with a life (0048CC "or.b
# D0, $600a1.l", 0048DC "move.b #$1, $60100.l")
0048B2  func  demo_join_player_1
# the second (0048F0 "btst #$1, $600a1.l", 004910 "move.b #$1, $60108.l")
0048E6  func  demo_join_player_2
# the third (004924 "btst #$2, $600a1.l", 004944 "move.b #$1, $60110.l")
00491A  func  demo_join_player_3
# the fourth (004958 "btst #$3, $600a1.l", 004978 "move.b #$1, $60118.l")
00494E  func  demo_join_player_4
# layer B all one tile: 0x30 + D6 (004986 "addi.b #$30, D6", 00498E "lea $104000.l, A6") in the colour D7 picks
# (004982 "bsr $499e")
004982  func  fill_layer_b
# text_colours by D7 (00499E "lea $1f1a.l, A6", 0049A4 "move.b (A6,D7.w), D7")
00499E  func  fill_colour
# nothing: a return the title's and the play's steps call (0049AA "rts"; 004A62 "bsr $49aa", 006874's, 0068E2's)
0049AA  func  do_nothing
# attract step 3, the title (one_player and attract frames 745-1105), by its scene (0049C4 "lea $49da.l, A6"); a coin
# (0049AC "tst.b $60327.l") plays 7E and goes to the coin's screen (0049C0 "bra $8b1e")
0049AC  func  attract_title
# the title's set-up, by its step (0049E2 "lea $49f8.l, A6")
0049E2  func  title_setup
# the play's work cleared (004A0E "jsr $44f8.l") and the layers (004A1A "move.w #$7, D7")
004A04  func  title_clear
# the attract mode's palettes and palette effects (004A34 "jsr $9a5c.l", 004A40 "jsr $9aa8.l")
004A2A  func  title_palettes
# layer B one blue tile (004A76 "moveq #$1, D7", 004A78 "moveq #$3, D6", 004A7A "bsr $4982"), its y (004A6E "move.w
# #$60, $60060.l"), the sprites hidden (004A7E "jsr $46eea.l")
004A4E  func  title_background
# the title's logo, by its step (004A92 "lea $4ab4.l, A6"), then the sprites drawn (004AA8 "jsr $46f08.l", 004AAE "jmp
# $46f92.l")
004A92  func  title_logo
# objects 12-14: "TURTLES" and the banner "TEENAGE MUTANT NINJA", their animations from 0151D8 by the title's version
# 06009F (004AD8 "lea $151d8.l, A6", 004AE0 "move.b $6009f.l, D7"), their places (004B14 "lea $4b58.l, A6")
004AC4  func  start_title_logo
# the banner's moves, by scene_substep (004B70 "lea $4b88.l, A6", 004B76 "move.b $60009.l, D7")
004B70  func  title_banner_move
# the banner (object 14) down 7 a frame to the middle (004B94 "lea $62460.l, A6", 004B9A "subi.w #$7, ($e,A6)", 004BA0
# "cmpi.w #$58, ($e,A6)"): attract frame 790
004B94  func  title_banner_drop
# then back up with a speed from 7 to -7 (004BC0 "cmpi.w #-$7, $635fa.l", 004BD8 "sub.w D7, ($e,A6)") to the top
# (004BDC "move.w #$c0, D7"; 0xD0 for another version): frame 805
004BBA  func  title_banner_bounce
# 20 frames (004C02 "move.b #$14, $600a8.l"; 004C12 "subi.b #$1, $600a8.l")
004C12  func  title_banner_wait
# "TURTLES" (object 12) in from the right, 10 a frame to 0x100 (004C2E "lea $623c0.l, A6", 004C34 "subi.w #$a, ($c,A6)"),
# then the copyright texts (004C58 "lea $4c76.l, A5", 004C70 "bsr $4184") and 0xF0 frames (004C4A "move.b #$f0,
# $600a8.l"): frames 840-900
004C2E  func  title_turtles_slide_in
# the next attract step when the frames run out (004C82 "subi.b #$1, $600a8.l", 004C90 "addq.b #1, $60003.l")
004C82  func  title_wait
# attract step 4, the demo game (attract frames 1105-2020): the game's scenes from a table of its own (004CBC "lea
# $4cd2.l, A6"); a coin puts frame_count back and goes to the coin's screen (004CAE "move.w $600be.l, $600a4.l")
004CA4  func  attract_demo
# its first scene: the play's work cleared (004CF6 "bsr $44f8"), the players' health and the difficulty 0 (004CFA
# "clr.b $60106.l", 004D12 "clr.b $60094.l"), frame_count kept in 0600BE (004D1E "move.w $600a4.l, $600be.l"), then
# start_demo
004CF6  func  begin_demo
# the demo's play: the game's play scene (004DE0 "jmp $6672.l") for 900 frames (004DCE "addq.w #1, $600c0.l", 004DD4
# "cmpi.w #$384, $600c0.l") while a player is in (004DC4 "tst.b $600a1.l"), then the demo's end (004DE6 "move.b #$8,
# $60005.l")
004DC4  func  demo_play
# the demo's end: the sound stopped (004DF6 "move.b #$0, D7"), frame_count back, the next of the three demos (004E20
# "addq.b #1, $600b6.l", 004E26 "cmpi.b #$3, $600b6.l"), the players out (004E38 "clr.b $600a1.l"), the next step
004DF6  func  end_demo
# attract step 5, a character's profile (attract frames 2020-2780), by its scene (004ED2 "lea $4ee8.l, A6"); a coin
# goes to the coin's screen (004ECE "bra $8b1e")
004EC4  func  attract_profile
# the profile's set-up, by its step (004EF0 "lea $4f06.l, A6")
004EF0  func  profile_setup
# 2 frames (004F1A "move.b #$2, $60002.l")
004F1A  func  profile_pause
# then the play's work cleared (004F34 "subq.b #1, $60002.l", 004F3E "jsr $44f8.l")
004F2A  func  profile_clear
# the layers cleared (004F56 "addq.b #1, $60082.l", 004F5C "move.w #$7, D7")
004F4C  func  profile_clear_layers
# the palettes and palette effects (004F76 "jsr $9a5c.l", 004F82 "jsr $9aa8.l")
004F6C  func  profile_palettes
# the profile's text of the character 060128 (004FA4 "lea $19272.l, A6", 004FAC "move.b $60128.l, D7") typed in colours
# (004FBA "jsr $18588.l"), the typing sound (004FC6 "move.w #$78, D7"): "NAME LEONARDO", "AGE 16"... (frame 2400)
004F90  func  profile_start_text
# the profile's show, by its step (004FDE "lea $5000.l, A6"), the sprites drawn (004FF4 "jsr $46f08.l")
004FDE  func  profile_show
# object 12 the character's picture: its animation from 0143D4 by 060128 (00502C "lea $143d4.l, A6", 005040 "jsr
# $47bf2.l"), its place, end place and speeds from 005078 (005046 "lea $5078.l, A6", 005058 "move.w (A6)+, ($c,A0)")
005010  func  profile_start_picture
# the picture moved by its speeds until it reaches its place (0050F2 "move.w ($1a,A0), D7", 0050FA "cmp.w ($20,A0),
# D7", 005122 "tst.l ($1a,A0)"); the typing sound again after a coin's sound (0050D8 "tst.b $60152.l", 0050E2 "move.w
# #$78, D7")
0050D8  func  profile_move_picture
# the text typed on (005132 "jsr $185b6.l") until it is done (005138 "tst.b $6342f.l"), then 100 frames and the sound
# stopped (005142 "move.b #$64, $60002.l", 005150 "move.w #$fe, D7")
005132  func  profile_type_text
# when the frames run out the next of the six profiles (00517C "addq.b #1, $60128.l", 005182 "cmpi.b #$6, $60128.l")
# and the next attract step (005194 "addq.b #1, $60003.l")
005170  func  profile_wait
# attract step 8, the end of the attract mode (attract frame 3045), by its scene (0051B8 "lea $51ce.l, A6"); a coin goes
# to the coin's screen (0051B2 "jmp $8b1e.l")
0051A8  func  attract_end
# the play's work, the palettes and the layers cleared (0051DA "jsr $44f8.l", 0051E0 "jsr $9a5c.l", 0051EC "move.w
# #$7, D7")
0051DA  func  attract_end_clear
# when the jobs are done: the layers' priority bit 2 off (005210 "andi.b #$fb, $60059.l"), the screen's flip (005218
# "bsr $4072"), 008C6A (00521C "bsr $8c6a"), a frame (005220 "move.b #$1, $60004.l")
0051FC  func  attract_end_reset
# then the attract mode from its first step (00523A "clr.b $60003.l", 005240 "clr.b $60005.l")
005230  func  attract_end_restart

# ======== the test mode's pages (005684-005E1D) ========
# The test mode's pages by 060005 (00568A "move.b $60005.l, D7", 005694 "movea.l (A6,D7.w), A6"), each by its steps
# (060007); the first player's jump goes to the next page (005DA4).
# page 0, the start: by its steps (0056C2 "lea $56d8.l, A6")
0056C2  func  test_mode_start
# its first step: the layers cleared (0056E4 "bra $5d8e": 005D94 "move.w #$7, D7")
0056E4  func  test_start_clear
# the test's palette (0056F2 "lea $a07e.l, A6", 0056FC "bsr $9242")
0056E8  func  test_start_palette
# then page 1 (005712 "addq.b #1, $60005.l")
005708  func  test_start_next
# page 2, the cross hatch (test_mode frames 150-9010), by its steps (005720 "lea $5736.l, A6")
005720  func  cross_hatch_page
# the cross hatch in the fixed layer: tiles 2C-2F (005746 "moveq #$2c, D1", 00574C "moveq #$2f, D4", 005752 "move.b
# D0, ($80,A6)")
00573E  func  draw_cross_hatch
# page 3, COLOR TEST (test_mode frames 9010-9310), by its steps (00577E "lea $5794.l, A6")
00577E  func  color_test_page
# its layers cleared (0057A0 "bra $5d8e")
0057A0  func  color_test_clear
# "COLOR TEST" (0057AE "lea $5846.l, A5"), 8 rows of 8 colours (0057CA "moveq #$31, D6", 0057CE "move.b D7, (A6)+") and
# 4 rows of 16 in the texts' colours (0057E6 "lea $1f1c.l, A4", 0057FE "move.b D3, ($0,A6)")
0057A4  func  draw_color_test
# text_colours by D7 (00583A "lea $1f1a.l, A0", 005840 "move.b (A0,D7.w), D7")
00583A  func  color_test_colour
# page 4, IO READ TEST (test_mode frames 9310-9930), by its steps (005854 "lea $586a.l, A6")
005854  func  io_test_page
# its layers cleared (005876 "bra $5d8e")
005876  func  io_test_clear
# its texts: "IO READ TEST", "1P 2P 3P 4P", "LEFT"..., "COIN1"..., "DIP SW1"... (005884 "lea $5896.l, A5", 00588A "bsr
# $4184")
00587A  func  draw_io_test
# every frame: the players' inputs, the coins and the DIP switches (0058A4 "bsr $58b4", 0058A8 "bsr $5902", 0058AC "bsr
# $594e")
0058A4  func  show_inputs
# the four players' inputs (0058B6 "lea $59a6.l, A6", 0058C4 "move.b ($0,A6), D5"), a 0 or 1 each in their column
# (0058EC "bsr $5990")
0058B4  func  show_player_inputs
# the coin switches and the service switches of 0A0001 (005902 "movea.l $59c6.l, A6", 005932 "lsr.b #4, D5")
005902  func  show_coin_inputs
# the three DIP switch banks' bits (005950 "lea $59d2.l, A6", 005978 "moveq #$3, D6": the third has four)
00594E  func  show_dip_switches
# the next bit of D5 as a 0 or a 1 (005992 "lsr.b #1, D5", 0059A0 "move.b D4, ($1,A6)")
005990  func  show_input_bit
# page 5 left out: on to page 6 at once (0059EA "addq.b #1, $60005.l"), so the coin counter test is never shown
0059EA  func  skip_coin_counter_test
# the coin counter test's layers cleared (005A1E "bra $5d8e")
005A1E  func  coin_counter_test_clear
# "COIN COUNTER TEST" (005A2C "lea $5a58.l, A5": test text 0x16), its counts cleared (005A3C "clr.b $635f8.l")
005A22  func  draw_coin_counter_test
# each coin counter in turn pulsed (005B14 "bset D6, D7", 005B16 "move.b D7, $a0001.l") every 0x20 frames (005B22
# "move.b #$20, $635f8.l"), the counts shown (005AE0 "move.b #$0, ($0,A6)"), then page 6 (005B32 "addq.b #1, $60005.l")
005A5E  func  pulse_coin_counters
# page 6, SOUND TEST (test_mode frames 9930-10270), by its steps (005B48 "lea $5b5e.l, A6")
005B48  func  sound_test_page
# its layers cleared (005B6A "bra $5d8e")
005B6A  func  sound_test_clear
# "SOUND TEST", "SOUND CODE" (005B78 "lea $5b9c.l, A5"), the time and the list's place cleared (005B82 "clr.w $635f8.l")
005B6E  func  draw_sound_test
# every 0x12C frames or when the attack is pressed (005BA2 "subq.w #1, $635f8.l", 005BAC "btst #$5, $60050.l") the
# sound stopped and the next of the list at 006146 played (005BC2 "lea $6146.l, A6", 005BD8 "jsr $5dfe.l"), its code
# shown (005BEE "jsr $1848c.l"); at the list's end page 7
005BA2  func  sound_test_play
# page 7, DIP SW SELECT (test_mode frames 10270-10570), by its steps (005C1C "lea $5c32.l, A6")
005C1C  func  dip_switch_page
# its layers cleared (005C3E "bra $5d8e")
005C3E  func  dip_switch_clear
# "DIP SW SELECT", "DIFFICULTY", "PLAYERS", "DEMO SOUND", "SCREEN" (005C4C "lea $5c5e.l, A5")
005C42  func  draw_dip_switch_page
# every frame each setting (005C64 "bsr $5c80" ... 005C78 "bsr $5d68")
005C64  func  show_dip_settings
# the coinage: coins and credits of each slot from the first bank (005C84 "move.b $a0011.l, D6", 005C90 "lea $1452.l,
# A6"), as digits (005CAC "move.b D0, ($1,A6)"), "COIN"/"COINS" (005CC8 "move.b #$23, D4"), the line (005CEC "move.w
# #$1007, D7")
005C80  func  show_coinage
# the difficulty: the second bank's bits 5-6 (005D08 "andi.b #$60, D7"), EASY to VERY DIFFICULT (005D0E "addi.b #$9,
# D7")
005CFE  func  show_difficulty
# the lives a credit gives ("PLAYERS"): the second bank's bits 0-1 by the table at 001426 (005D16 "lea $1426.l, A6",
# 005D26 "andi.b #$3, D7"), a digit (005D3A "move.b D7, ($1,A6)")
005D16  func  show_lives_setting
# the demo sound: OFF or ON by the second bank's bit 7 (005D40 "moveq #$d, D7", 005D42 "btst #$7, $a0013.l")
005D40  func  show_demo_sound
# the screen: NORMAL or UPSIDE DOWN by the third bank's bit 0 (005D54 "moveq #$f, D7", 005D56 "btst #$0, $a0019.l")
005D54  func  show_screen_setting
# GAME MODE or TEST MODE by the third bank's bit 2 (005D68 "moveq #$11, D7", 005D6A "btst #$2, $a0019.l")
005D68  func  show_test_switch
# page 8: back to page 0 (005D80 "clr.b $60005.l"); 005D8E on is the pages' first step: the layers cleared (005D94
# "move.w #$7, D7") and the next step
005D80  func  test_mode_restart
# every page: the first player's jump (005DA4 "btst #$4, $60050.l") the next page with the sound stopped (005DB0
# "addq.b #1, $60005.l", 005DBC "bsr $5df4"), and the K052109's flip by the DIP switch (005DD6 "btst #$0, $a0019.l",
# 005DEC "move.b D7, $106d00.l")
005DA4  func  test_page_controls
# sound 0, the sound stopped (005DF4 "move.b #$0, D7", 005DF8 "bsr $5dfe")
005DF4  func  stop_test_sound
# D7 into the sound queue at 060400-06043F as queue_sound_command does (005DFE "movea.l $60018.l, A6", 005E04 "move.b
# D7, (A6)+")
005DFE  func  queue_test_sound

# ======== the sound queue (0091A4-009241) ========
# the next command of the queue (009202 "movea.l $6001c.l, A6", 009212 "move.b (A6)+, D7") into the sound latch
# (00922A "move.b D7, $a0009.l"), with 0A0001's bit 3 raised (009236 "ori.b #$8, D6"): its fall at the next write of
# board_control interrupts the Z80
009202  func  send_sound_command

# ---- their one-line comments ----
comment reset the board's start: the RAM and ROM check, the work RAM, the DIP switches, then the main loop that runs the queued jobs
comment clear_sprite_chip_registers the sprite chip's registers cleared
comment clear_tile_chip_registers the tile chip's registers cleared
comment clear_tile_ram the three tile layers blank and their scroll at 0
comment zero_boot_fill_registers zeroes for the boot's clearing of the work RAM
comment start_boot_screen the boot's screen: a palette, the fixed layer blank and "RAM ROM CHECK"
comment print_boot_hex a number as four hexadecimal digits, for a bad program chip's sum
comment test_ram a RAM written and read back with four patterns, its bad chips marked
comment test_palette_ram the palette RAM written and read back with four patterns
comment show_boot_check the check's results: each chip OK or BAD
comment print_boot_text a text of the boot's screen
comment exception_hang an exception: the program stops until the watchdog resets the board
comment mask_rom_check_page the test mode's mask ROM check
comment mask_rom_check_clear the layers cleared for the mask ROM check
comment draw_mask_rom_check the mask ROM check's heading and palette
comment start_mask_rom_sums the mask ROMs' sums started
comment show_mask_rom_check each mask ROM's sum shown OK or BAD
comment mask_rom_check_wait the results shown a while, then the next page
comment sum_mask_roms the graphics ROMs summed through the video chips
comment sum_sprite_roms_low the sprite ROMs' first half summed
comment sum_sprite_roms_high the sprite ROMs' second half summed
comment sum_sprite_rom_banks the sprite ROMs' banks read through the sprite chip and summed
comment sum_tile_roms the tile ROMs read through the tile chip and summed
comment add_to_rom_sums four bytes of a graphics ROM added to its sums
comment clear_layers_job the tile layers chosen cleared
comment blank_tile the blank tile and its colour
comment clear_fixed_layer the fixed layer blank
comment clear_scroll_layer a scrolling layer blank
comment print_table_text a text of a table of texts into the fixed layer, or erased
comment set_text_colour the colour of the texts printed next
comment set_spare_text_colour a second texts' colour no text uses
comment add_point an enemy defeated: a point to the players' scores, the top score kept
comment add_point_to_score a point to a player's score and the top score kept
comment draw_scores the chosen players' scores drawn in their boxes
comment draw_score_player_1 the first player's score in his box
comment draw_score_player_2 the second player's score in his box
comment draw_score_player_3 the third player's score in his box
comment draw_score_player_4 the fourth player's score in his box
comment draw_top_score the top score after HIGH
comment draw_score_digits a score's four digits, without leading zeros
comment draw_blank_digit a blank in place of a leading zero
comment draw_digit a digit of a score
comment clear_scores the chosen scores to 0
comment print_plain_text a short text in the plain colour
comment draw_score_labels unused: the labels 1UP to 4UP and the top score
comment print_colour_text a text of the test mode's and the credits' table, in its own colour
comment draw_tile_picture unused: a picture of rows of tiles
comment draw_player_boxes the chosen players' boxes, and their scores
comment draw_player_box a player's box: its frame and label, its lives, its health bar
comment draw_box_frame_and_label a player's box frame and label in his colour
comment draw_lives a player's lives in his box
comment draw_health_bar a player's health bar in his box
comment player_box_colour a player's colour in the boxes
comment clear_lives_digits the lives' place in a box blank
comment clear_health_bar the health bar's place in a box blank
comment draw_box_frame a player's box frame
comment draw_box_label a player's box label 1UP to 4UP
comment print_stage_title unused: the stage's number and its name of the development
comment draw_player_message the message under a player's box
comment message_insert_coin INSERT COIN(S) in a player's box
comment message_press_start PRESS START blinking under a player's box
comment message_out_of_lives the knocked-out head of a player who lost his last life
comment message_clear the line under a player's box cleared
comment big_character_colour the colour of a big character
comment print_tall_text a text in tall characters: the rankings, CONTINUE, GAME OVER
comment draw_tall_character a tall character
comment erase_tall_character a tall character erased
comment tall_text_colour the colour of a text in tall characters
comment update_coins the coins: the coin counters, the coins inserted turned into credits
comment new_coin_presses the coin switches just pressed, with the coin's sound
comment pulse_coin_counter a coin slot's counter pulsed for each coin
comment count_coin a coin inserted, counted towards the slot's credits
comment add_credit_lives each slot's credits added to its player's lives
comment vblank_interrupt the frame's interrupt: the inputs, the coins, the sound, the palettes and the game state's frame
comment read_inputs the coins and the four players' inputs read, and the layers' scroll written
comment run_startup the steps after the reset
comment startup_begin the video chips set, the test mode when its switch is on, else the screen cleared
comment startup_wait the screen cleared
comment startup_end on to the attract mode
comment set_screen_flip the screen flipped by its DIP switch
comment run_attract the attract mode's frame, and a game when a player starts
comment run_game the game's frame by its scene
comment run_test_mode the test mode's frame
comment queue_job a job into the main loop's queue
comment queue_jobs a list of jobs into the main loop's queue
comment irq6_interrupt the second interrupt, which the board never raises
comment check_starts in the attract mode, the players with lives who press a button start the game
comment check_joins in a game, the players with lives who press a button join it
comment reset_player_1 the first player's score and health reset
comment reset_player_2 the second player's score and health reset
comment reset_player_3 the third player's score and health reset
comment reset_player_4 the fourth player's score and health reset
comment use_life_player_1 a life of the first player's used
comment use_life_player_2 a life of the second player's used
comment use_life_player_3 a life of the third player's used
comment use_life_player_4 a life of the fourth player's used
comment use_life a life used and the health full; with none left the player is out
comment reset_score a player's score reset
comment update_players_in_game the players who join or come back, their boxes and messages
comment redraw_new_lives the boxes whose lives a coin changed
comment join_players the players who join: their turtles in, a life each
comment respawn_players the players whose turtle was knocked out: a life each, the turtle back
comment update_player_messages the messages under the four boxes
comment update_player_message the message under a player's box by how he stands
comment clear_play the objects, the sprites, the palette effects and the play's variables cleared
comment zero_ram_below a stretch of work RAM zeroed
comment zero_fill_registers zeroes for the clearing of the work RAM
comment clear_area_variables the area's and the play's variables cleared
comment clear_player_1 the first player's record cleared
comment clear_player_2 the second player's record cleared
comment clear_player_3 the third player's record cleared
comment clear_player_4 the fourth player's record cleared
comment clear_area_counters the area's counters cleared
comment clear_enemy_variables the spawns' and the enemies' variables cleared
comment clear_engine_variables the engine's variables cleared
comment clear_engine_ram the engine's variables and the draw list cleared
comment clear_spare_ram a stretch of work RAM nothing uses cleared
comment clear_objects every object cleared
comment clear_sprite_ram the sprite chip's sprites cleared
comment update_game_inputs the players' inputs for the turtles, or a demo's recorded ones
comment record_demo_inputs Unused: the four players' inputs recorded as a demo's streams, an input and its frames at a time
comment demo_join_player_1 in a demo, the first player joins
comment demo_join_player_2 in a demo, the second player joins
comment demo_join_player_3 in a demo, the third player joins
comment demo_join_player_4 in a demo, the fourth player joins
comment fill_layer_b layer B all one tile
comment fill_colour the colour of the tile layer B is filled with
comment do_nothing nothing
comment attract_title the title screen
comment title_setup the title's screen set up
comment title_clear the title's screen cleared
comment title_palettes the title's palettes
comment title_background the title's blue background
comment title_logo the title's logo
comment start_title_logo the logo's pieces placed
comment title_banner_move the banner's moves
comment title_banner_drop the banner drops to the middle
comment title_banner_bounce the banner bounces back to the top
comment title_banner_wait the banner stays a moment
comment title_turtles_slide_in TURTLES slides in, then the copyright
comment title_wait the title stays, then the attract mode goes on
comment attract_demo the demo game
comment begin_demo the demo's start: the play cleared and the demo's settings
comment demo_play the demo plays for a while
comment end_demo the demo's end: the next demo, the players out
comment attract_profile a character's profile
comment profile_setup the profile's screen set up
comment profile_pause a short pause
comment profile_clear the play cleared
comment profile_clear_layers the layers cleared
comment profile_palettes the profile's palettes
comment profile_start_text the profile's text starts typing
comment profile_show the profile's picture and text
comment profile_start_picture the character's picture placed
comment profile_move_picture the picture moves into its place
comment profile_type_text the text typed on
comment profile_wait the profile stays, then the next character's comes next time
comment attract_end the attract mode's end
comment attract_end_clear the screen cleared
comment attract_end_reset the video set back
comment attract_end_restart the attract mode from its beginning
comment test_mode_start the test mode's start
comment test_start_clear the layers cleared
comment test_start_palette the test mode's palette
comment test_start_next on to the mask ROM check
comment cross_hatch_page the test mode's cross hatch
comment draw_cross_hatch the cross hatch drawn
comment color_test_page the test mode's colour test
comment color_test_clear the layers cleared
comment draw_color_test the colour bars drawn
comment color_test_colour a colour of the colour test
comment io_test_page the test mode's input test
comment io_test_clear the layers cleared
comment draw_io_test the input test's texts
comment show_inputs every input shown
comment show_player_inputs the four players' inputs shown
comment show_coin_inputs the coin and service switches shown
comment show_dip_switches the DIP switches shown
comment show_input_bit an input shown as 0 or 1
comment skip_coin_counter_test the coin counter test left out
comment coin_counter_test_clear unused: the layers cleared
comment draw_coin_counter_test unused: the coin counter test's texts
comment pulse_coin_counters unused: each coin counter pulsed in turn
comment sound_test_page the test mode's sound test
comment sound_test_clear the layers cleared
comment draw_sound_test the sound test's texts
comment sound_test_play the next sound played, by itself or by the button
comment dip_switch_page the test mode's DIP switch settings
comment dip_switch_clear the layers cleared
comment draw_dip_switch_page the settings' names
comment show_dip_settings every setting shown
comment show_coinage the coins and credits of each slot
comment show_difficulty the difficulty
comment show_lives_setting the lives a credit gives
comment show_demo_sound the demo sound on or off
comment show_screen_setting the screen normal or upside down
comment show_test_switch the test switch
comment test_mode_restart back to the test mode's start
comment test_page_controls the button to the next page, and the screen's flip
comment stop_test_sound the sound stopped
comment queue_test_sound a sound into the sound board's queue
comment send_sound_command the next sound command to the sound board

# ======== the game's scenes (0061CE-006BE3) ========
# Game state 2, the game, runs the scene (060005) by the table at 00413A (00412E "lea $413a.l, A0"): 0 a new game, 1 the
# players' turtles, 2 an area's set-up, 3 its story and title screens, 4 the play, 5 the area's exit, 6 the ending, 7 the
# continue, 8 the ranking. Each scene runs its steps (060007, then 060009 and 06000B) by tables of its own, and most
# steps wait for the jobs they queue (060082) and the palette requests under way (060083). The demo runs scenes 1, 2, 3
# and 5-7 by a table of its own (attract_demo: 004CBC "lea $4cd2.l, A6"); 0600C2 is the scenes' frame counter.

# scene 0, a new game (one_player frames 761-762), by its step (0061CE "lea $61e8.l, A6"), then the players who join
# (0061E4 "bra $4206")
0061CE  func  scene_new_game
# when the jobs are done (0061F0 "tst.b $60082.l"): the play's work cleared (0061FA "bsr $44f8"), the four players' records
# (0061FE "bsr $4284", 00620A "bsr $42b4"), their four scores to 0 (00620E "move.w #$50f, D7", 006212 "bsr $2098"), the
# layers' scroll copies (006216 "clr.w $6005c.l", 006228 "clr.w $60062.l"), the difficulty from the DIP switches
# (00622E "move.b $60031.l, D0", 006234 "andi.b #$60, D0", 00623A "move.b D0, $60094.l"), the play time (006240 "clr.b
# $6111e.l"); then the next step
0061F0  func  new_game_reset
# the first area (006254 "clr.b $60120.l") and the next scene (00625A "addq.b #1, $60005.l")
006254  func  new_game_first_area

# scene 1, the players' turtles (one_player frames 763-765), by its step (006268 "lea $6282.l, A6"): the turtle each
# player's picture shows, a byte a player at 0600C4 (draw_turtle_pictures 008B60 "lea $600c4.l, A4"). This set has no
# choice: player N plays turtle N (the tall texts' "SELECT YOUR TURTLE", text 0xB of 00375C, is never printed)
006268  func  scene_choose_turtles
# all four on the first turtle (006296 "move.l #$0, $600c4.l")
006296  func  choose_turtles_clear
# then each player his own, Leonardo first (0062A8 "move.l #$10203, $600c4.l")
0062A8  func  choose_turtles_fixed
# the next scene (0062BA "addq.b #1, $60005.l")
0062BA  func  choose_turtles_done

# scene 2, an area's set-up (one_player frames 766-768; after each area's exit: 006BC6 "move.b #$2, $60005.l"), by its
# step (0062C8 "lea $62e2.l, A6")
0062C8  func  scene_area_setup
# the area's 060122 and its stage from the table at 00634C by the area (0062FE "move.b (A0,D1.w), $60122.l", 006306
# "move.b ($1,A0,D1.w), $60121.l"), 060123, 060124 and 060129 cleared, the play's work cleared (006320 "bsr $44f8"), the
# area not cleared yet (006324 "clr.b $600bd.l"), the three layers cleared (006342 "move.w #$7, D7", 006346 "bsr $4164")
0062EE  func  area_setup_variables
# when the layers are clear (006360 "tst.b $60082.l") the objects (00636A "jsr $4604.l")
006360  func  area_setup_clear_objects
# the next scene (006378 "addq.b #1, $60005.l")
006378  func  area_setup_done

# scene 3, the area's story and title screens (one_player frames 769-1025), by its step (006386 "lea $63a0.l, A6")
006386  func  scene_area_title
# step 0: in a game's first area the intro (0063AC "cmpi.b #$0, $60120.l", 0063B8 "tst.b $600a3.l"), by its substep
# (0063C2 "lea $63d8.l, A6"); else its end at once (0063B4 "bne $6484")
0063AC  func  area_title_intro
# the intro started: 0xB4 frames before it can be skipped (0063E6 "move.b #$b4, $600c2.l"), the layers' priority 0
# (0063EE "move.b #$0, $c0001.l"), the objects and the sprites cleared, start_intro (00640A "jsr $308d6.l"): one_player
# frame 770
0063E0  func  area_title_intro_start
# run_intro (006472 "jsr $30960.l") and the sprites drawn, until the intro says it is over (006416 "tst.b $61108.l") or,
# after the 0xB4 frames, a player's attack or jump (00645C "andi.b #$30, D7") skips it with sound 7E (006464 "move.w #$7e,
# D7"): one_player frames 770-965, skipped by the jump at 960
006416  func  area_title_intro_run
# the intro's end: the palette effects, the objects, the sprites and the layers cleared (006484 "jsr $9a3a.l", 006496
# "jsr $31230.l"), the next step (00649C "addq.b #1, $60007.l")
006484  func  area_title_intro_end
# step 1, the area's title screen, by its substep (0064B0 "lea $64c6.l, A6")
0064B0  func  area_title_screen
# the layers cleared (0064E2 "move.w #$7, D7") and the area's palettes (0064EA "lea $9f56.l, A6", 0064F4 "jsr $9242.l")
0064D6  func  area_title_clear
# when the jobs and the palettes are done (0064FC "tst.b $60082.l", 006506 "tst.b $60083.l"): the objects cleared and
# the layers' scroll reset (006516 "jsr $8c6a.l")
0064FC  func  area_title_reset
# the texts' colour (00652A "move.w #$200, D7"); in a game, for an area whose 060122 has no bit 7 (areas 0, 2, 5, 7, 8:
# 00653C "tst.b $60122.l"), its text, "SCENE N" and its line, from the table at 019866 by the stage (006546 "lea
# $19866.l, A6", 00655A "jsr $18334.l"), 0xB4 frames (006560 "move.b #$b4, $600c2.l") and the players' boxes (006568
# "move.w #$b7f, D7"); else the next step at once: one_player frame 970, "SCENE 1 / FIRE! WE GOTTA GET APRIL OUT!!"
006524  func  area_title_start_text
# every frame the health bars filled (006574 "bsr $65fc") and redrawn (006580 "addi.w #$b20, D7", 006584 "jsr
# $2336.l"), the text typed on (006590 "jsr $18340.l"); when the frames run out or, after 0x28 of them, at a player's
# attack or jump (0065A0 "cmpi.b #-$74, $600c2.l", 0065C4 "andi.b #$30, D7") the players' health full (0065DE "move.b
# #$a, ($6,A6)") and the next step: one_player frames 970-1025
006574  func  area_title_wait
# after the first 10 frames (0065FC "cmpi.b #-$56, $600c2.l"), every 8 (00660E "andi.b #$7, D7") a bar more to the health
# of each player in play below 10 (00662A "cmpi.b #$a, ($6,A6)", 006634 "addq.b #1, ($6,A6)"), with sound 1 (00664C
# "move.w #$1, D7"): the bars fill up under SCENE N (one_player frame 1020)
0065FC  func  refill_health_bars
# the next scene, the play (006658 "addq.b #1, $60005.l")
006658  func  area_title_done

# scene 4, the play (one_player frames 1025-3073; the demo's play: demo_play 004DE0 "jmp $6672.l"), by its step (006672
# "lea $6688.l, A6")
006672  func  scene_play
# step 0, the area's entry, by its substep (006690 "lea $66a6.l, A6")
006690  func  play_entry
# the layers cleared (0066C0 "move.w #$7, D7"), the area's palettes (0066C8 "lea $9f56.l, A6") and palette effects
# (0066D8 "jsr $9afe.l")
0066BA  func  play_entry_palettes
# when they are done: the layers' scroll reset (0066FA "jsr $8c6a.l"), the objects cleared, the players' boxes (006706
# "move.w #$b7f, D7"), and by the stage the layers' priority (006710 "lea $6782.l, A6", 006726 "move.b $60059.l,
# $c0001.l"), 060127 (006736 "move.b (A6,D7.w), $60127.l") and the tile banks (006746 "move.b (A6,D7.w), $106b00.l")
0066E6  func  play_entry_layers
# out of a game, the GAME OVER box the demos show (0067A0 "tst.b $600a3.l", 0067AA "move.w #$1, D7", 0067AE "jsr
# $22aa.l"): attract frame 1200
006796  func  play_entry_show_game_over
# when the jobs are done: in a demo a life for each player in play (0067E4 "move.w #$1, ($0,A0)"), frame_count and the
# difficulty 0 (0067FC "clr.w $600a4.l", 006802 "clr.b $60130.l"); the turtles in (006820 "jsr $19bea.l") for the
# players in play who have not just joined (00681C "not.b D6", 00681E "and.b D6, D7"), the players who join (006826 "jsr
# $434c.l"), the scores (006836 "bsr $1fb8"), the area's spawns (00683A "jsr $4791e.l"), the players' slots, the objects
# run twice (00684C "jsr $477ea.l"), the music (006858 "clr.b $60080.l", 00685E "jsr $6a9c.l"): one_player frame 1030
0067BC  func  play_entry_start
# the turtles' entry (006888 "jsr $19f34.l"), the attacks and the sprites, until it is done (00687E "tst.b $61109.l");
# then the boxes (0068A2 "move.w #$b7f, D7"), in a demo frame_count and the random seed 06120E to 0 (0068BC "clr.w
# $6120e.l"), and step 1 (0068C2 "addq.b #1, $60007.l"): one_player frames 1030-1035
006874  func  play_entry_run
# step 1: the turtles' inputs (0068D6 "bsr $467c"), the play's frame (0068DA "bsr $68e2") and the players who join
# (0068DE "bra $4206"): one_player frames 1035-3073
0068D6  func  play_main
# the play's frame: in a demo the GAME OVER box blinking (0068F4 "andi.b #$f, D7", 006908 "ori.b #$80, D7", 00690C "jsr
# $22aa.l"); the players who join, the difficulty (00691C "bsr $6a46"), the play time (006920 "jsr $2f5f0.l"), the
# turtles (006926 "jsr $1a328.l"), the layers (00692C "jsr $1ebce.l"), the objects (006932 "jsr $477ea.l"), the attacks,
# the sprites, the drones' sound (00694A "jsr $13a1a.l"), in stages 0 and 1 the fire's flicker (006950 "cmpi.b #$2,
# $60121.l", 00695C "bsr $69ce"); with no player in play, joining or out of lives the continue (006960 "move.b $600b3.l,
# D7", 00696C "or.b $600a1.l, D7", 006996 "move.b #$7, $60005.l"); with the area cleared (006976 "tst.b $600bd.l") and no
# turtle knocked out or out of lives (006980 "move.b $600a0.l, D7", 006986 "or.b $600b3.l, D7") the area's exit (0069B2
# "move.b #$5, $60005.l")
0068E2  func  play_frame
# stages 0 and 1, the burning building and April's apartment: the sprites' priority against the layers (0C0001's bit 2,
# tmnt.cpp's priority_w) 4 or 0 in turn by frame_count, 4 on five frames of eight (0069F6 "lea $6a18.l, A6", 006A02
# "andi.w #$7, D7", 006A10 "move.b D7, $c0001.l"): the fire flickers over the turtles; while 0633FE is neither 0 nor FF
# (the drill's arrival: 030430 "move.b #$1, $633fe.l") fixed at 4 (0069E4 "move.b #$4, $c0001.l")
0069CE  func  flicker_fire_priority
# the difficulty 060130 the enemies read (spawn_enemies 047AA4 "cmp.b $60130.l, D0"): 2 in a demo (006A46 "move.b #$2,
# $60130.l"), in a game the DIP switches' (006A58 "move.b $60094.l, $60130.l"), one more for each player in play (006A70
# "addq.b #1, $60130.l"), plus the play time 06111E (006A80 "add.b D7, $60130.l"), 7 at most (006A92 "move.b #$7,
# $60130.l")
006A46  func  update_difficulty
# in a game: the music 060080 (the bosses set theirs: 0115FE "move.b D7, $60080.l"), or when it is 0 the stage's from the
# table at 006B0C (006ACC "lea $6b0c.l, A6", 006ADE "move.b D7, $60080.l"), or sound 34 with 063488 (006AB2 "move.b #$34,
# D7"); in the skateboard ride with helicopters about, sound A as well (006AEA "cmpi.b #$6, $60121.l", 006AF6 "tst.b
# $6130a.l", 006B00 "move.w #$a, D7")
006A9C  func  start_area_music

# scene 5, the area's exit after its boss (area1 frames 27620-28100), by its step (006B16 "lea $6b42.l, A6"); unless the
# exit's pictures hold the players (006B32 "tst.b $60129.l") the players who join (006B3C "bra $434c")
006B16  func  scene_area_exit
# the music faded but in stage 0 (006B54 "cmpi.b #$0, $60121.l", 006B60 "move.w #$fe, D7"), the turtles start walking out
# (006B68 "jsr $2b25c.l"), 0600B8 set and 0x78 into 060081 (006B76 "move.b #$78, $60081.l")
006B4E  func  area_exit_begin
# the exit (006B80 "jsr $2b5f4.l") and the sprites; in stages 0 and 1 the fire's flicker (006B9E "bsr $69ce")
006B80  func  area_exit_play
# the sound stopped (006BA4 "move.w #$0, D7"); after stage 9 the ending (006BAE "cmpi.b #$9, $60121.l", 006BD6 "addq.b
# #1, $60005.l"), else the next area (006BBA "addq.b #1, $60120.l") and its set-up (006BC6 "move.b #$2, $60005.l")
006BA4  func  area_exit_next_area

comment scene_new_game a new game, by its steps
comment new_game_reset the players' records and scores, the scroll, the difficulty and the play time reset for a new game
comment new_game_first_area the game starts at the first area
comment scene_choose_turtles the turtle each player plays, by its steps: in this set each player his own
comment choose_turtles_clear every player on the first turtle
comment choose_turtles_fixed each player on his own turtle, Leonardo first
comment choose_turtles_done on to the area's set-up
comment scene_area_setup an area's set-up, by its steps
comment area_setup_variables the area's stage and variables set, the play's work and the layers cleared
comment area_setup_clear_objects the objects cleared once the layers are
comment area_setup_done on to the area's story and title
comment scene_area_title the area's story and title screens, by their steps
comment area_title_intro in a game's first area the intro, by its steps; else straight to its end
comment area_title_intro_start the intro started on a clean screen
comment area_title_intro_run the intro played until it ends or a button skips it
comment area_title_intro_end the screen cleared after the intro
comment area_title_screen the area's title screen, by its steps
comment area_title_clear the layers cleared and the area's palettes requested
comment area_title_reset the objects cleared and the scroll reset
comment area_title_start_text the area's SCENE text started and the boxes drawn, in a game and for the areas that have one
comment area_title_wait the text typed and the health bars filled until the time runs out or a button
comment refill_health_bars a bar more of health every 8 frames for the players in play, with a tick
comment area_title_done on to the play
comment scene_play the play, by its steps: the area's entry, then the play's frames
comment play_entry the area's entry, by its steps
comment play_entry_palettes the layers cleared, the area's palettes and palette effects requested
comment play_entry_layers the scroll, the objects, the boxes, and the stage's layer priority and tile banks
comment play_entry_show_game_over the GAME OVER box when a demo plays
comment play_entry_start the turtles, the spawns, the players' slots and the music started for the area
comment play_entry_run the turtles walk in until the entry is done
comment play_main the play's frame with the inputs and the players who join
comment play_frame the play's frame work, then the continue when no one plays or the exit when the area is cleared
comment flicker_fire_priority the fire flickering over the sprites in the first two stages
comment update_difficulty the enemies' level from the settings, the players in play and the play time
comment start_area_music the area's music or a boss's in a game
comment scene_area_exit the area's exit, by its steps
comment area_exit_begin the turtles start walking out of the cleared area
comment area_exit_play the exit's frame
comment area_exit_next_area on to the next area, or to the ending after the last one

# ======== the ending (006BE4-00781D) ========
# Scene 6, after the last area's exit (006BAE "cmpi.b #$9, $60121.l"). No scenario reaches it: it was seen with a scratch
# script (a one-player game, then 060005 poked to 6 and 060007, 060009 and 06000B to 0 at frame 1500): the Technodrome in
# a growing box (frames 1500-1530), reddening and exploding (1530-1840), its wreck (1840-2060), the epilogue typed
# (2060-3750) and darkened (3750-3930), the staff roll (3930-8120), GAME OVER (8120-8380), then the ranking.

# scene 6, the ending, by its step (006BE4 "lea $6bfa.l, A6")
006BE4  func  scene_ending
# step 0, by its substep (006C02 "lea $6c18.l, A6")
006C02  func  ending_setup
# the players taken out (006C2A "bsr $7174"), the layers cleared (006C34 "move.w #$7, D7"), the palettes 00A03E (006C3C
# "lea $a03e.l, A6", 006C46 "jsr $9242.l"), the palette effects, the objects and the sprites cleared
006C24  func  ending_clear
# when the jobs and the palettes are done: the box (006C74 "jsr $1864e.l") and the Technodrome's screen (006C7A "jsr
# $2ff44.l"), the sprites hidden, layer B's x 0x20 (006C8C "move.w #$20, $60060.l")
006C60  func  ending_show_technodrome
# the box grown (006C96 "jsr $18682.l") until it is open (006C9C "tst.b $63497.l"), then 0x28 frames and step 1 (006CA6
# "move.b #$28, $600c2.l", 006CAE "addq.b #1, $60007.l")
006C96  func  ending_open_box
# step 1, by its substep (006CBC "lea $6cde.l, A6"), the sprites drawn (006CD2 "jsr $46f08.l")
006CBC  func  ending_epilogue
# the 0x28 frames (006D06 "subq.b #1, $600c2.l"), then sound 22 (006D10 "move.w #$22, D7") and 0x78 frames
006D06  func  ending_pause
# the Technodrome reddened: the palette sets of the record at 0071DC copied over 0x78 frames (006D3A "lea $71dc.l, A6",
# 006D40 "jmp $71be.l"), then 0x96 frames (006D4C "move.b #$96, $600c2.l"): frames 1570-1690
006D30  func  ending_technodrome_glows
# the spent explosions removed (006D5C "bsr $7302"); every 8 frames a sound of the table at 006DFC (006D94 "lea $6dfc.l,
# A6") and an explosion (006DB2 "lea $623c0.l, A6", 006DCA "jsr $7286.l"), layer B shaken (006D82 "bsr $71fa"), the
# palette sets 0071E2 then 0071E8 (006DD0 "lea $71e2.l, A6", 006DE2 "lea $71e8.l, A6"); at 0x32 frames left sound 1A
# (006D7A "move.w #$1a, D7"), and below that the shaking and the explosions stop: frames 1690-1840, from red to white
006D5C  func  ending_technodrome_explodes
# the wreck: layer A's rows 4-11 blank (006E00 "bsr $7216") and the wreck's blocks of tiles (006E04 "bsr $722e"), 0xB4
# frames (006E0E "move.b #$b4, $600c2.l"): frame 1840
006E00  func  ending_show_wreck
# the spent explosions removed, the palette sets 0071EE over 0xB4 frames (006E2C "lea $71ee.l, A6"): from white to the
# wreck; then 0x1E frames and sound 6C (006E46 "move.w #$6c, D7"): frames 1850-2030
006E1E  func  ending_fade_to_wreck
# when the frames run out the epilogue typed in colours (006E62 "lea $199a4.l, A6", 006E6A "jsr $18588.l"): "EPILOGUE /
# FREAKED THE FOOTS, MANGLED THE MOUSERS AND TOTALLED THE TECHNODROME..." (frame 3700)
006E58  func  ending_start_epilogue
# typed on (006E78 "jsr $185b6.l") until it is done (006E7E "tst.b $6342f.l"), then 0xB4 frames: frames 2060-3750
006E78  func  ending_type_epilogue
# the palette sets 0071F4 over 0xB4 frames (006EA8 "lea $71f4.l, A6"): the picture darkened; then the staff roll
# (006EC8 "clr.b $6000b.l"): frames 3750-3930
006E9E  func  ending_dim_epilogue
# the staff roll, by 06000B (006ED0 "lea $6ee6.l, A6", 006ED6 "move.b $6000b.l, D7"): frames 3930-8120
006ED0  func  ending_staff_roll
# the layers cleared (006F08 "move.w #$7, D7") and the palettes 00A0DE (006F10 "lea $a0de.l, A6")
006F02  func  staff_roll_clear
# when they are done: the tile banks (006F3C "move.b #$f0, $106b00.l", 006F4C "move.b #$7, $106e00.l"), the city in
# layer B (006F64 "bsr $7404"), the four turtles' portraits (006F68 "bsr $732e"), the first credit (006F72 "clr.b
# $6342e.l"), the staff roll's music (006F80 "move.w #$70, D7"): frame 3950
006F28  func  staff_roll_start
# the portraits slid (006F8C "bsr $739c"); the credit 06342E's title, 16 characters of the table at 007612, into the
# fixed layer (006F9C "lea $7612.l, A6", 006FA2 "movea.l #$100324, A5") and its name started (006FC8 "bsr $7430"): after
# the 14 credits "PRODUCED BY" (006FDA "lea $2f26.l, A6") and the jobs at 007018 (the texts' colour, game text 0x10:
# 006FF4 "lea $7018.l, A5", 006FFA "bsr $4184"), 0xB4 frames, the music faded and the roll's end (007006 "move.b #$6,
# $6000b.l"): "DIRECTOR / H.OHYAMA" at frame 4300
006F8C  func  staff_roll_next_credit
# the portraits slid, a button may end the roll (007022 "bsr $73c8"), the name typed (007026 "bsr $74b8") until all its
# passes are done (00702A "tst.b $6342f.l"), then 0x14 frames (007034 "move.b #$14, $600c2.l")
00701E  func  staff_roll_type_name
# the 0x14 frames (00704C "subq.b #1, $600c2.l"), then the name's erasing started (00705C "bsr $745a")
007044  func  staff_roll_hold_name
# the name erased (00706A "bsr $74d4") until all its passes are done, then the next credit (007078 "addq.b #1,
# $6342e.l", 00707E "subq.b #3, $6000b.l")
007062  func  staff_roll_erase_name
# the last 0xB4 frames (00708E "subq.b #1, $600c2.l"), then GAME OVER (00709A "addq.b #1, $60009.l")
007086  func  staff_roll_end
# step 1's last substep, GAME OVER, by 06000B (0070A8 "lea $70be.l, A6"): frames 8120-8380
0070A8  func  ending_game_over
# the layers cleared, the palettes 00A01E (0070D8 "lea $a01e.l, A6"), the objects and the sprites cleared
0070CA  func  ending_game_over_clear
# when they are done the GAME OVER box (00710C "move.w #$1, D7", 007110 "jsr $22aa.l"), its palette effects (007116 "lea
# $d2c4.l, A6", 007122 "lea $d2e6.l, A6"), 0xFA frames, sound 6D (00713C "move.w #$6d, D7")
0070FC  func  ending_game_over_start
# a button may end it (007146 "jsr $77e2.l"); when the frames run out the ranking (007158 "move.b #$8, $60005.l")
007146  func  ending_game_over_wait
# after the first 10 frames (0077E2 "cmpi.b #-$10, $600c2.l") a player's attack or jump (007806 "andi.b #$30, D7"): the
# sound stopped (00780E "move.w #$0, D7") and the ranking (007818 "bra $7158")
0077E2  func  ending_game_over_skip
# the players in play leave the game (00717C "btst D7, $600a1.l", 007196 "bclr D7, $600a1.l"), but those who have just
# joined (007186 "btst D7, $600a6.l"): their lives, health and message 0 (00719C "clr.w ($0,A6)", 0071A0 "clr.b ($6,A6)",
# 0071A4 "clr.b ($7,A6)"); none knocked out or out of lives (0071B0 "clr.b $600a0.l", 0071B6 "clr.b $600b3.l"). Its last
# lines, 0071BE on, are the ending's fades the steps jump to (006D40 "jmp $71be.l"): the palette sets of the record in A6
# (0071C8 "move.w ($0,A6), D6", 0071CC "movea.l ($2,A6), A5") into copy_palette_sets (0071D6 "bsr $961c")
007174  func  drop_players_in_play
# layer B's y scroll (060063, which read_inputs writes: 003F54 "move.b $60063.l, $106019.l") from 063386 jolted by 4 every
# other two frames (007200 "andi.b #$2, D7", 007206 "add.b $63386.l, D7", 00720E "move.b D7, $60063.l"): the screen shakes
# while the Technodrome explodes
0071FA  func  shake_technodrome
# layer A's rows 4-11 blank (007216 "move.w #$1ff, D7", 00721A "lea $102200.l, A6", 007224 "move.b #$10, (A6)+"): the
# Technodrome's top gone
007216  func  clear_technodrome_top
# the wreck: two blocks of layer A's tiles by the records at 007276, their place, colour, width and height (007236
# "movea.l ($0,A6), A5", 00723A "move.b ($4,A6), D0", 00724A "move.b ($5,A6), D5", 007240 "move.b ($6,A6), D6"), the
# codes one after the other, 0x10 a row (00725E "addi.b #$10, D1")
00722E  func  draw_technodrome_wreck
# an explosion: the free object in A6 at one of 8 places of the table at 0072E2 (00728E "move.b $63480.l, D7", 007294
# "andi.b #$7, D7") plus 0x100 and 0x60 (0072A0 "addi.w #$100, ($c,A6)", 0072AC "addi.w #$60, ($e,A6)"), drawn (0072B2
# "move.w #$8100, ($0,A6)"), the animation 014C86 points at (0072CE "movea.l $14c86.l, A6", 0072D4 "jsr $47bf2.l")
007286  func  start_technodrome_explosion
# objects 12-23 in use whose animation has run out (00730C "tst.b ($0,A0)", 007314 "tst.b ($33,A0)") removed (00731C "jsr
# $1832a.l")
007302  func  remove_spent_explosions
# objects 12-15, the four turtles' portraits (007330 "lea $623c0.l, A6", 007336 "move.w #$8100, ($0,A6)"): their places
# from the table at 00738C (00735A "move.w (A5,D6.w), ($c,A6)"), their animations from 015764 (007368 "lea $15764.l, A6",
# 007378 "jsr $47bf2.l"): frame 3950
00732E  func  start_staff_roll_portraits
# the four portraits one to the left every other frame (0073A4 "move.w $600a4.l, D6", 0073AE "sub.w D6, ($c,A6)"), back
# to 0x300 past the left edge (0073B6 "move.w #$300, ($c,A6)"): frames 3950-4300
00739C  func  slide_staff_roll_portraits
# after the first credit (0073C8 "cmpi.b #$1, $6342e.l") a player's attack or jump (0073EC "andi.b #$30, D7") ends the
# roll: the music faded (0073F4 "move.w #$fe, D7") and GAME OVER (0073FE "bra $709a")
0073C8  func  staff_roll_skip
# layer B's 32 rows of 32 tiles, one after the other (007404 "lea $104018.l, A0", 00740A "moveq #$14, D0", 007416
# "move.b D0, (A0)+", 007418 "move.b D1, (A0)+", 007420 "addq.b #1, D0"): the city behind the staff roll
007404  func  draw_staff_roll_city
# the credit's name typed in 7 passes 8 frames apart (007438 "moveq #$6, D7", 007440 "lsl.b #3, D6", 007442 "move.b D6,
# ($8,A4)"), a record of 10 bytes each from 063476 down (007430 "lea $63476.l, A4", 007446 "suba.l #$a, A4"), 7 to do
# (007450 "move.b #$7, $6342f.l")
007430  func  start_credit_name
# 8 passes to erase it, the last one the blanks at 0077D2 (007462 "moveq #$7, D7", 00747E "move.b #$8, $6342f.l", 007486
# "move.l #$77d2, $63434.l")
00745A  func  start_credit_name_erase
# a pass's record: its place in the fixed layer (007492 "move.l #$10042a, ($0,A4)"), 4 frames a character (00749A
# "move.b #$4, ($9,A4)"), the credit's name, 16 characters of the table at 0076F2 (0074A0 "lea $76f2.l, A5", 0074B2
# "move.l A5, ($4,A4)")
007492  func  set_credit_name_pass
# the 7 passes (0074BE "moveq #$6, D7", 0074C2 "bsr $74f8"), each in its colour
0074B8  func  type_credit_name
# the 8 passes (0074DA "moveq #$7, D0", 0074E6 "bsr $74f8"), each in the colour of the pass before
0074D4  func  erase_credit_name
# a pass: when its frames run out (007500 "subq.b #1, ($8,A4)") its next character as four tiles of the big font at
# 007592 (007542 "lea $7592.l, A2", 00754E "move.b (A2,D6.w), ($1,A5)", 007560 "move.b ($3,A2,D6.w), ($83,A5)"), in
# text_colours by the pass (00751C "lea $1f1a.l, A2", 007522 "move.b ($1,A2,D7.w), D5"); '!' ends it (007514 "cmpi.b
# #$21, D6", 00758A "subq.b #1, $6342f.l")
0074F8  func  type_credit_name_pass

comment scene_ending the ending after the last boss, by its steps
comment ending_setup the ending's first step, by its steps
comment ending_clear the players taken out, the screen and the objects cleared, the ending's palettes requested
comment ending_show_technodrome the Technodrome's picture in a box that starts to open
comment ending_open_box the box opened, then a pause
comment ending_epilogue the explosion, the epilogue, the staff roll and GAME OVER, by their steps
comment ending_pause a pause, then a sound
comment ending_technodrome_glows the Technodrome turns red
comment ending_technodrome_explodes explosions over the Technodrome, the screen shaking, the colours going to white
comment ending_show_wreck the Technodrome's wreck drawn
comment ending_fade_to_wreck the colours back from white to the wreck, then the epilogue's music
comment ending_start_epilogue the epilogue's text started
comment ending_type_epilogue the epilogue typed until it is done
comment ending_dim_epilogue the picture darkened before the staff roll
comment ending_staff_roll the staff roll, by its steps
comment staff_roll_clear the screen cleared and the staff roll's palettes requested
comment staff_roll_start the city, the turtles' portraits and the music for the staff roll
comment staff_roll_next_credit the next credit's title and name, or PRODUCED BY and the Konami logo after the last
comment staff_roll_type_name the credit's name typed in colours
comment staff_roll_hold_name the name held a moment, then its erasing started
comment staff_roll_erase_name the name erased, then the next credit
comment staff_roll_end the last pause of the staff roll
comment ending_game_over the GAME OVER after the ending, by its steps
comment ending_game_over_clear the screen and the objects cleared for GAME OVER
comment ending_game_over_start the GAME OVER box with its colours and music
comment ending_game_over_wait GAME OVER held until the time runs out or a button, then the ranking
comment ending_game_over_skip a button ends GAME OVER early
comment drop_players_in_play the players in play leave the game when it ends
comment shake_technodrome the screen shaken while the Technodrome explodes
comment clear_technodrome_top the top of the Technodrome taken off the picture
comment draw_technodrome_wreck the Technodrome's wreck drawn in tiles
comment start_technodrome_explosion an explosion started at one of the Technodrome's places
comment remove_spent_explosions the explosions whose animation is over removed
comment start_staff_roll_portraits the four turtles' portraits put in for the staff roll
comment slide_staff_roll_portraits the portraits slide to the left round the screen
comment staff_roll_skip a button ends the staff roll after its first credit
comment draw_staff_roll_city the city drawn behind the staff roll
comment start_credit_name the credit's name started in seven colour passes
comment start_credit_name_erase the credit's name recoloured and then blanked in eight passes
comment set_credit_name_pass a pass of the credit's name set at its place, speed and text
comment type_credit_name the seven passes of the name typed on
comment erase_credit_name the eight passes that take the name off typed on
comment type_credit_name_pass the next big character of a pass in its colour

# ======== the continue (00781E-007B0B) ========
# scene 7, when no player is left (play_frame 006996 "move.b #$7, $60005.l"; one_player frames 3073-4760), by its step
# (00781E "lea $783a.l, A6")
00781E  func  scene_continue
# step 0, by its substep (007846 "lea $7860.l, A6"), then the players who join (00785C "bra $4206")
007846  func  continue_setup
# the fixed layer cleared (job 0 with bit 0: 007868 "move.b #$1, $60082.l", 007870 "move.w #$1, D7")
007868  func  continue_clear_text
# when it is done: the boxes (00788A "move.w #$b7f, D7"), "CONTINUE" in tall characters (007892 "move.w #$f02, D7"), the
# count 20 (00789A "move.b #$14, $60006.l"), the sound stopped and the continue's music (0078B4 "move.b #$77, D7"):
# one_player frame 3075
007880  func  continue_start
# step 1, by its substep (0078CE "lea $78f8.l, A6"), the messages under the boxes (0078E4 "bsr $445e") and the boxes of
# the players with lives (0078E8 "move.w #$b10, D7", 0078EC "or.b $600b7.l, D7"): one_player frames 3075-4520
0078CE  func  continue_run
# when the jobs are done (0078FC "tst.b $60082.l", 007902 "bne $799e") the countdown: every 0x48 frames one less
# (007906 "subq.b #1, $60008.l", 00791A "move.b #$48, $60008.l", 007922 "subq.b #1, $60006.l") drawn in big digits (00792E "bsr $27b2"; 19 at
# one_player frame 3080, 16 at 3300, 4 at 4200); a player who joins (00793E "move.b $600a6.l, D0", 007944 "or.b
# $600a1.l, D0") brings the play back with the area's music (0079DC "bsr $6a9c", 0079E0 "move.b #$4, $60005.l", 0079E8
# "move.b #$1, $60007.l"); from 16 down a player with no lives pressing attack or jump (00796C "andi.b #$30, D0", 007974
# "tst.w ($0,A5)", 007982 "andi.w #$7, D7") hurries it (00798A "move.b #$1, $60008.l"); at 0 GAME OVER (0079A2 "addq.b
# #1, $60007.l", 0079BA "move.w #$200, D7").
0078FC  func  continue_countdown
# step 2, GAME OVER, by its substep (0079F8 "lea $7a0e.l, A6"): one_player frames 4520-4760
0079F8  func  game_over
# the fixed layer cleared (007A20 "move.w #$1, D7")
007A1A  func  game_over_clear_text
# when it is done: 0xF0 frames (007A3A "move.b #$f0, $60006.l"), the GAME OVER box (007A42 "move.w #$1, D7", 007A46 "jsr
# $22aa.l"), its palette effects (007A52 "lea $d2c4.l, A6", 007A5E "lea $d2e6.l, A6"), sound 6D (007A76 "move.w #$6d,
# D7")
007A30  func  game_over_start
# a button may end it (007A8C "bsr $7ad2"), the play behind darkened (007A90 "bsr $7ab2"); when the frames run out the
# ranking (007A94 "subq.b #1, $60006.l", 007A9E "addq.b #1, $60005.l")
007A82  func  game_over_wait
# the palette sets at 00A08E copied (007ABC "lea $a08e.l, A5", 007AC2 "move.w #$1e02, D6", 007ACC "bsr $961c"): the play
# darkened behind the box (one_player frame 4600)
007AB2  func  game_over_dim
# after the first 0x40 frames (007AD2 "cmpi.b #-$50, $60006.l") a player's attack or jump (007AF6 "andi.b #$30, D7"): the
# sound stopped and the ranking (007AFE "move.w #$0, D7", 007B08 "bra $7a9e")
007AD2  func  game_over_skip

comment scene_continue the continue with its countdown, then GAME OVER, by its steps
comment continue_setup the continue's first step, by its steps
comment continue_clear_text the texts cleared for the continue
comment continue_start CONTINUE, the count from twenty and the continue's music
comment continue_run the countdown, the messages under the boxes and the boxes of the players with lives
comment continue_countdown the countdown: a count less every so often, the play back when a player joins, GAME OVER at zero
comment game_over the GAME OVER after the continue, by its steps
comment game_over_clear_text the texts cleared for GAME OVER
comment game_over_start the GAME OVER box with its colours and music
comment game_over_wait GAME OVER held over the darkened play until the time runs out or a button, then the ranking
comment game_over_dim the play darkened behind the GAME OVER box
comment game_over_skip a button ends GAME OVER early

# ======== the ranking (007B0C-0088BF) ========
# The ranking in work RAM: 99 scores and the new one (BCD words 063500-0635C7: reset_ranking copies 0x32 longs) and the
# top ten's initials (4 bytes each from 0635C8, the new one at 0635F0); the players' places 0635F4-0635F7 (BCD, 0 none),
# the initial each enters 0635FA-0635FD (3 done), the players entering 0635FE, their buttons held 0635FF, and 0634A0
# set when a name was entered. 0635F8 is a frame counter, and before that the turtles left to draw in black.

# scene 8, after the continue's GAME OVER or the ending (one_player frames 4760-5310), by its step (007B0C "lea
# $7b22.l, A6")
007B0C  func  scene_ranking
# step 0, by its substep (007B42 "lea $7b58.l, A6")
007B42  func  ranking_setup
# the layers cleared (007B6E "move.b #$1, $60082.l", 007B76 "move.w #$7, D7")
007B64  func  ranking_clear_layers
# when they are: the objects and the sprites cleared, the palettes 00A02E (007B9C "lea $a02e.l, A6"), the palette effects
007B86  func  ranking_clear
# when the palettes are in: the places cleared (007BD0 "move.l D0, $635f4.l"), the tile banks 0 (007BDE "move.b D0,
# $106b00.l"), layer B's scroll (007BF0 "move.w #$0, $60062.l", 007BF8 "move.w #$60, $60060.l"), no name entered (007C00
# "clr.b $634a0.l"), step 1
007BBA  func  ranking_reset
# each player's score (+4 of his record: 007C40 "move.w ($4,A3), ($2,A6,D6.w)") into the ranking from its end up:
# swapped with each score it reaches (007C4E "cmp.w D0, D1", 007C54 "move.w ($2,A6,D6.w), (A6,D6.w)"), its place one up in
# BCD from 99 (007C66 "sbcd D1, D0"), the initials "AAA" moved with it in the top ten (007C34 "move.l #$41414100,
# ($28,A5)", 007C6C "cmpi.b #$11, D0", 007C92 "move.l D3, (A5,D2.w)"); then each place one down for each player put in
# later at or above it (007CC0 "cmp.b (A4,D6.w), D0", 007CCC "abcd D1, D0")
007C16  func  rank_players_scores
# for each player with a place (007CF2 "tst.b (A0,D7.w)"): his column's frame (007CFA "bsr $8150"), label (007CFE "bsr
# $81cc"), score (007D08 "jsr $1fb8.l"), place (007D10 "bsr $8212") and turtle's picture (007D20 "bsr $8b58"); the
# others' pictures kept for later in black (007CEA "move.b #$4f, $635f8.l", 007D1A "bclr D0, $635f8.l"): one_player
# frame 4780, "99TH" and Leonardo
007CE2  func  show_ranked_players
# with no player at all back to the attract mode (007D58 "cmpi.b #$4, D6", 007D60 "bra $7fec"); sound 71 (007D64
# "move.b #$71, D7"), the background (007D6E "bsr $804a"), the other turtles in black (007D72 "move.b $635f8.l, D7",
# 007D78 "bsr $8b58"); with a player in the top ten (007D4A "cmpi.b #$11, (A6,D7.w)") the name entry for those (007DB8
# "clr.b (A5,D7.w)", 007DBC "bset D7, D6", 007DCC "move.b D6, $635fe.l") for 0x5DC frames (007DE6 "move.w #$5dc,
# $635f8.l", 007DEE "addq.b #2, $60007.l"), else 0x1E0 frames to wait (007D7C "move.w #$1e0, $635f8.l")
007D32  func  ranking_choose_entry
# 0x1E0 frames or a player's attack or jump (007DF6 "subq.w #1, $635f8.l", 007E18 "andi.b #$30, D7"): the music faded
# and 60 frames more (007FB6 "move.w #$3c, $635f8.l", 007FBE "move.b #$7, $60007.l"): one_player frames 4770-5250
007DF6  func  ranking_wait
# the name entry, every 8 frames (007E3A "move.w $600a4.l, D7", 007E40 "andi.w #$7, D7"): the initials of the players
# entering drawn (007E54 "bsr $809c"); with the inputs of the last four frames (007E74 "move.l ($0,A6), D7", 007E84
# "move.l D7, $60020.l") the joystick turns the letter being entered back or on among 32 (007F08 "btst #$0, D6", 007F32
# "btst #$1, D6", 007F12 "andi.b #$1f, D4") with sound 1, a new attack or jump (007EC4 "btst D7, $635ff.l") takes the
# next initial with sound 1D (007ECE "addq.b #1, (A3,D7.w)", 007ED6 "move.b #$1d, D0"); when all are done (007F66
# "cmpi.b #$4, D0") or the time runs out (007E30 "subq.w #1, $635f8.l") a name was entered (007F78 "move.b #$1,
# $634a0.l"); no scenario enters one
007E30  func  enter_initials
# the 0x78 frames after the entry (007FA6 "subq.w #1, $635f8.l"), then leave_ranking (007FB2 "bra $7fd4"); 007FB6 on is
# where the wait and the entry's time out end: 60 frames and step 7
007FA6  func  ranking_entry_done
# the last 60 frames (007FC8 "subq.w #1, $635f8.l"), then leave_ranking: one_player frames 5250-5310
007FC8  func  ranking_end_wait
# with a name entered and no player with lives left (007FD4 "tst.b $600b7.l", 007FDE "tst.b $634a0.l") the attract
# mode's BEST 10 PLAYERS (00801A on: 008022 "move.b #$6, $60003.l"), else back_to_attract
007FD4  func  leave_ranking
# the attract mode from its first step, no game on (007FEC "move.b #$1, $60001.l", 007FF4 "clr.b $60003.l", 008012 "clr.b
# $600a3.l"); 00801A on, the same at step 6, BEST 10 PLAYERS (008022 "move.b #$6, $60003.l"): one_player frame 5310
007FEC  func  back_to_attract
# layer B's 30 rows of 40 tiles, each row one tile of the table at 00807E (00804A "lea $104f18.l, A6", 008050 "lea
# $807e.l, A5", 00806C "move.b D5, ($1,A6,D4.w)"): the background of the ranking and of BEST 10 PLAYERS, blue to green
00804A  func  draw_ranking_background
# a player's three initials (00809C "lea $840a.l, A6", 0080B0 "lea $635c8.l, A4") under his column, the one he is
# entering in colour 0xA0 (0080DA "cmpi.b #$0, (A3,D7.w)", 0080E4 "move.b #$a0, D0")
00809C  func  draw_initials
# a letter in tall characters of the font at 002884 in the colour given (00812E "lea $2884.l, A2", 00813A "move.b D0,
# ($0,A6)", 008148 "move.b ($1,A2,D5.w), ($81,A6)")
00812E  func  draw_initial
# a player's column's frame in his colour (008160 "bsr $82a8"): its top two rows from the tiles at 00841A (008168 "lea
# $841a.l, A5"), 0x18 rows of edges (008192 "moveq #$17, D5", 008198 "move.b #$1a, ($1,A6)", 0081A2 "move.b #$1d,
# ($11,A6)"), its bottom from 00842C (0081B6 "lea $842c.l, A5"): one_player frame 4780
008150  func  draw_ranking_frame
# the player's label "1UP"-"4UP" from the boxes' labels at 00332A (0081DA "lea $332a.l, A5") at the column's top (0081CC
# "lea $83ea.l, A6")
0081CC  func  draw_ranking_label
# the player's place (008212 "lea $83fa.l, A6"): its units and tens in tall characters (008258 "lea $2884.l, A5", 008282
# "andi.w #$f0, D5": the tens left out when 0) and "ST", "ND", "RD" or "TH" from the tiles at 008436 (008220 "lea
# $8436.l, A5", 008236 "bcs $823e", 00823A "move.b #$3, D5")
008212  func  draw_ranking_place
# the player's colour: text_colours by the player, odd (0082A8 "lea $1f1a.l, A5", 0082B2 "ori.b #$1, D6"), as
# player_box_colour does
0082A8  func  ranking_frame_colour
# at the reset (00121E "jsr $82b8.l"): the ranking's defaults from 0082E6, 0x32 longs of scores and 0xB of initials
# (0082BE "lea $82e6.l, A5", 0082CC "move.l #$31, D7", 0082D8 "move.l #$a, D7") into 063500, the top score 0x1000 (0082C4
# "move.w #$1000, $60076.l")
0082B8  func  reset_ranking
# ---- an animation viewer no code runs (no call, jump or table names 00843E or 008480), which the data walk took for
# the end of ranking_place_tiles_2: its code, its entries and its counts, and an old table of the attract mode's steps ----
# the start: the object at 0623C0 (object 12) shown in the middle of the screen (00843E "lea $623c0.l, A6", 00845E "move.w
# #$100, ($c,A6)", 008464 "move.w #$60, ($e,A6)"), the first entry's first animation (00846A "clr.b $63498.l", 008470
# "clr.b $63499.l"), the sprites hidden (008476 "jsr $46eea.l"), then shown (00847C "bra $8580")
00843E  func  animation_viewer_start
# a frame: the presses of all four players (00848A "move.b $60050.l, D0" to 00849C): attack (bit 5) shows the animation
# again, jump (bit 4) the entry's next animation up to its count (0084C6 "lea $8850.l, A6", 0084D4 "cmp.b (A6,D6.w), D7"),
# bit 2 the next entry (back to the first at a negative count, 008510 "bpl $851a"), bit 3 the one before; the entry and
# the animation's numbers in hexadecimal (008548 "movea.l #$100354, A6", 008558 "jsr $1848c.l"), and the sprites drawn
# (008574 "jsr $46f08.l", 00857A "jmp $46f92.l")
008480  func  animation_viewer_frame
# 00848A "move.b $60050.l, D0" to 00849C "or.b $60053.l, D0" the four players' presses together
local animation_viewer_frame 00848A,008490,008496,00849C d0 presses
# the entry's animation started on the object (008580 "lea $85bc.l, A5", 00859E "movea.l (A5,D6.w), A6", 0085A4 "movea.l
# (A6,D7.w), A6", 0085A8 "jsr $47bf2.l") and its palette set requested for the sprites' bank (0085AE "movea.l
# ($4,A5,D6.w), A6", 0085B2 "move.w #$208, D7", 0085B6 "jmp $9242.l")
008580  func  animation_viewer_show
# 00858E "move.l D7, D6" 008590 "move.b $63498.l, D6" 00859C "lsl.w #3, D6" the entry times 8, its place in
# animation_viewer_animations and animation_viewer_palettes
local animation_viewer_show 00858E,008590,00859C d6 entry_offset
# the viewer's 82 entries, 8 bytes each (00859C "lsl.w #3, D6"): a table of animations (profile_animations, krang_animations,
# unused_animation_list...) and its palette set; then FFFFFFFF
0085BC  table  animation_viewer_animations  u32  animation_entry
0085C0  table  animation_viewer_palettes  u32  rom
# how many animations each entry's table has, 82, then FF: the end (0084D4 "cmp.b (A6,D6.w), D7", 00850C "move.b
# (A6,D6.w), D6", 008510 "bpl $851a")
008850  table  animation_viewer_counts  s8
# after the viewer's counts, no code reads (no lea or table names 0088A4): the attract mode's steps as attract_steps
# has them, without the last two (attract_spare_step, attract_end): attract_begin, attract_coin_screen, attract_opening,
# attract_title, attract_demo, attract_profile, attract_best_players
0088A4  data  unused_attract_steps

comment scene_ranking the ranking after a game, by its steps
comment ranking_setup the ranking's first step, by its steps
comment ranking_clear_layers the layers cleared for the ranking
comment ranking_clear the objects cleared and the ranking's palettes requested
comment ranking_reset the places, the tile banks and the scroll reset for the ranking
comment rank_players_scores each player's score put in the ranking, with his place
comment show_ranked_players each ranked player's column: frame, label, score, place and his turtle
comment ranking_choose_entry back to the attract mode with no players, else the name entry for the top ten or a wait
comment ranking_wait the ranking shown until the time runs out or a button
comment enter_initials the top ten players enter their initials with the joystick and a button
comment ranking_entry_done a pause after the name entry
comment ranking_end_wait the ranking's last pause
comment leave_ranking BEST 10 PLAYERS after a name entered with no one left to play, else the attract mode
comment back_to_attract the game over, back to the attract mode's first step
comment draw_ranking_background the ranking's background of coloured rows
comment draw_initials a player's three initials, the one being entered highlighted
comment draw_initial a tall letter in a colour
comment draw_ranking_frame the frame of a player's column in his colour
comment draw_ranking_label a player's label at the top of his column
comment draw_ranking_place a player's place, its digits and ending
comment ranking_frame_colour the colour of a player's column
comment reset_ranking the ranking's default scores and initials, and the top score
comment animation_viewer_start Unused: the animation viewer's start, its object in the middle of the screen with the first animation
comment animation_viewer_frame Unused: the viewer's frame, the players' buttons paging through the entries and their animations
comment animation_viewer_show Unused: the entry's animation on the viewer's object, with its palettes

# ======== the attract mode's steps (0088C0-0091A3) ========
# Game state 1 runs its step (060003) by the table at 004100 (0040BE "lea $4100.l, A0"): 0 its start, 1 the coin's
# screen, 2 the opening, 3 the title, 4 the demo, 5 a profile, 6 BEST 10 PLAYERS, 7 nothing, 8 the end; each step by
# its scene (060005) and scene step (060007). A coin (060327) sends the steps to the coin's screen (008B1E).

# step 0 (attract frame 9): straight on to step 1 (0088C0 "addq.b #1, $60003.l")
0088C0  func  attract_begin
# step 1, the coin's screen, by its scene (0088DA "lea $88f0.l, A6"): at the start a pass that goes on to the opening
# when no player has lives (attract frames 10-21); after a coin the boxes, PRESS START and the players' turtles
# (one_player frames 706-761)
0088DA  func  attract_coin_screen
# its scene 0, by its step (0088F8 "lea $890e.l, A6")
0088F8  func  coin_screen_setup
# 2 frames (00891E "move.b #$2, $60004.l")
00891E  func  coin_screen_pause
# when they are over (008938 "subq.b #1, $60004.l") the play's work cleared (008942 "jsr $44f8.l") and the layers
# (00894E "move.w #$7, D7")
00892E  func  coin_screen_clear
# the attract mode's palettes and palette effects (008968 "jsr $9a5c.l", 008974 "jsr $9aa8.l")
00895E  func  coin_screen_palettes
# when the palettes are in: the screen's flip (008996 "bsr $4072"), the layers' scroll reset (00899A "bsr $8c6a"); with
# a player's lives (00899E "move.w $60100.l, D0", 0089B0 "or.w $60118.l, D0"), free play (0089B6 "or.b $60091.l, D0") or
# 060320, sound 7E and scene 1 (0089C8 "move.w #$7e, D7", 0089D2 "addq.b #1, $60005.l"), else the opening (0089E0
# "addq.b #1, $60003.l")
008982  func  coin_screen_check_credits
# its scene 1, by its step (0089F4 "lea $8a0a.l, A6")
0089F4  func  coin_screen_show
# the four boxes with their frames, labels and lives (008A1E "move.w #$b5f, D7"): one_player frame 717
008A1E  func  coin_screen_boxes
# a frame (008A2E "addq.b #1, $60007.l")
008A2E  func  coin_screen_first_wait
# another (008A36 "addq.b #1, $60007.l")
008A36  func  coin_screen_second_wait
# the texts' colour, the Konami logo and "(C) KONAMI 1989" (008A3E "lea $8abe.l, A5", 008A44 "bsr $4184": game texts 7
# and 0xA); the slots' credits summed and the sum dropped (008A4A "add.b $60320.l, D0", 008A6A "or.b $60091.l, D0",
# 008A70 "nop"); the pictures of the players with lives (008A7C "tst.w ($0,A6)", 008A84 "bset D6, D7", 008A9A "bsr
# $8b58"), each his own turtle (008A90 "move.l #$10203, $600c4.l"); 10 into 060004 and sound 6F (008AB2 "move.w #$6f,
# D7"): one_player frame 720, Leonardo's picture
008A3E  func  coin_screen_draw
# the messages under the boxes (008AC6 "bsr $445e"); a new coin (008ACA "tst.b $60327.l") the boxes it changed (008B08
# "move.w #$b10, D7", 008B0C "or.b $600a2.l, D7") and the pictures again (008B16 "subq.b #1, $60007.l"); after a coin's
# sound sound 6F again (008AD8 "tst.b $60152.l"); 060004 counted down every 64 frames (008AFA "subq.b #1, $60004.l") to
# no effect (008B00 "bne $8b06", 008B04 "rts"): the screen stays until a player starts (one_player frames 721-761)
008AC6  func  coin_screen_wait
# where every attract step goes with a coin (attract_title 0049C0 "bra $8b1e"): the coin's screen from its start (008B36
# "move.b #$1, $60003.l", 008B1E "clr.b $60005.l"), a demo's players out (008B3E "clr.b $600a1.l", 008B44 "clr.b
# $600a6.l"): one_player frame 706
008B1E  func  go_to_coin_screen
# the four turtles' pictures (008B58 "moveq #$3, D6"), on into draw_turtle_pictures
008B58  func  draw_four_turtle_pictures
# the pictures D7's bits pick, from the last one D6 says (008B66 "btst D6, D7"), each two sprites into the K051960's
# sprite RAM (008B5A "lea $140400.l, A6"): their codes and colours from the turtle the player plays (008B60 "lea
# $600c4.l, A4", 008B6E "move.b (A4,D6.w), D5", 008B8C "move.b (A5,D5.w), (A6,D5.w)"), their places from the player's
# (008BBA "move.b ($4,A5,D5.w), ($4,A6,D5.w)"), from the table at 008BEA or with D7's bit 7 the one at 008C2A (008B82
# "lea $8c2a.l, A5"), and with bit 6 in colour 8, black (008BD2 "move.b #$8, ($3,A6)"): the ranking's other turtles
008B5A  func  draw_turtle_pictures
# the layers' scroll copies and their registers to 0 (008C72 "move.w D0, $6005c.l", 008C84 "move.w D3, $60062.l",
# 008CBA "move.b D0, $106400.l", 008CDC "move.b D3, $106019.l"), with 0600C8-0600CF and 060054-060057
008C6A  func  reset_layers_scroll
# step 2, the opening (attract frames 21-745): a coin plays 7E and goes to the coin's screen (008CE4 "tst.b $60327.l",
# 008CF8 "bra $8b1e"), else by its scene (008CFC "lea $8d12.l, A6")
008CE4  func  attract_opening
# its scene 0, by its step (008D1A "lea $8d30.l, A6")
008D1A  func  opening_setup
# the play's work cleared (008D4A "jsr $44f8.l") and the layers (008D56 "move.w #$7, D7")
008D40  func  opening_setup_clear
# the attract mode's palettes and palette effects (008D70 "jsr $9a5c.l", 008D7C "jsr $9aa8.l")
008D66  func  opening_setup_palettes
# when the palettes are in, the layers' priority 0 (008D9E "move.b #$0, $60059.l", 008DA6 "move.b $60059.l, $c0001.l")
008D8A  func  opening_setup_priority
# scene 1 with 0xB2 counts (008DC2 "addq.b #1, $60005.l", 008DCE "move.b #$b2, $600a8.l"), the sprites hidden,
# start_opening (008DDC "jsr $2f790.l"), the tile banks 0 (008DE2 "move.b #$0, $106b00.l"): attract frame 30
008DB8  func  opening_setup_start
# run_opening and the sprites (008E1E "jsr $2f8aa.l", 008E2A "jsr $46f92.l"); every 4 frames a count less (008E0A "andi.b
# #$3, D7", 008E12 "subi.b #$1, $600a8.l"), at 0 the title (008E32 "addq.b #1, $60003.l"): attract frames 30-745
008E04  func  opening_show
# step 6, BEST 10 PLAYERS (attract frames 2776-3040; after the ranking when a name was entered): a coin goes to the coin's
# screen (008E46 "tst.b $60327.l", 008E50 "bra $8b1e"), else by its scene (008E54 "lea $8e6a.l, A6")
008E46  func  attract_best_players
# its scene 0, by its step (008E72 "lea $8e88.l, A6")
008E72  func  best_players_setup
# the play's work cleared (008E9E "jsr $44f8.l") and the layers (008EAA "move.w #$7, D7")
008E94  func  best_players_clear
# the attract mode's palettes and palette effects (008EC4 "jsr $9a5c.l", 008ED0 "jsr $9aa8.l")
008EBA  func  best_players_palettes
# when they are in: the palettes at 008F58 (008EF2 "lea $8f58.l, A6", 008EFC "jsr $9242.l"), the tile banks 0, layer B's
# scroll (008F26 "move.w #$60, $60060.l"), the background (008F2E "bsr $804a"), the four turtles' pictures by the second
# table (008F34 "move.b #$8f, D7", 008F42 "bsr $8b5a"), the table (008F46 "bsr $902e"), scene 1 (008F4A "addq.b #1,
# $60005.l"): attract frame 2783
008EDE  func  best_players_draw
# when the jobs are done 0xFF frames (008FAC "move.b #$ff, $60002.l"): attract frame 2784
008F9C  func  best_players_pause
# the frames (008FB6 "subq.b #1, $60002.l"): the turtles' sprites in use 4 to the right each frame (008FC8 "btst #$7,
# ($0,A6)", 008FF0 "addi.w #$4, $635f8.l", 009000 "move.b $635f8.l, ($6,A6)"), then the next step (00901A "addq.b #1,
# $60003.l"): attract frames 2785-3040
008FB6  func  best_players_scroll
# the table: "BEST 10 PLAYERS" and the places in tall characters (00902E "lea $9190.l, A5", 009034 "bsr $4184": tall texts
# 0 and 4-7), the initials (009038 "bsr $9042") and the scores (00903C "bsr $90c4")
00902E  func  draw_best_players
# the ten initials (009048 "lea $635c8.l, A5") a row apart from the place at 00917E (009042 "movea.l $917e.l, A6"), the
# first three rows in the colours of the table at 009186 (00904E "lea $9186.l, A4", 00905C "move.b (A4,D7.w), D6")
009042  func  draw_best_players_initials
# a tall character's two tiles from the font at 002884 (0090B0 "subi.b #$30, D6", 0090B6 "move.b (A3,D6.w), ($1,A6)",
# 0090BC "move.b ($1,A3,D6.w), ($81,A6)"), its colour left as it is
0090B0  func  draw_best_players_character
# the ten scores (0090C4 "lea $63500.l, A5") right-aligned from the place at 009182 (0090D8 "movea.l $9182.l, A6"), their
# BCD digits from the units on until none is left (009102 "andi.b #$f, D5", 009114 "lsr.w #4, D0", 0090EC "tst.w D0"),
# and "PTS" (009138 "move.w #$20, D6", 00914A "move.w #$24, D6", 00915C "move.w #$23, D6")
0090C4  func  draw_best_players_scores
# step 7: nothing, straight on to step 8 (00919C "addq.b #1, $60003.l"): attract frame 3040
00919C  func  attract_spare_step
comment attract_begin the attract mode's start, straight on to the coin's screen
comment attract_coin_screen the coin's screen, by its steps: the boxes, the players' turtles, PRESS START
comment coin_screen_setup the coin's screen set up, by its steps
comment coin_screen_pause a two-frame pause
comment coin_screen_clear the play's work and the layers cleared
comment coin_screen_palettes the attract mode's palettes and palette effects requested
comment coin_screen_check_credits on to the coin's screen when a player has lives, else to the opening
comment coin_screen_show the coin's screen shown, by its steps
comment coin_screen_boxes the four players' boxes drawn
comment coin_screen_first_wait a frame's wait
comment coin_screen_second_wait another frame's wait
comment coin_screen_draw the Konami texts, the pictures of the players with lives and the coin screen's music
comment coin_screen_wait the coin's screen held until a player starts, redrawn when a coin comes in
comment go_to_coin_screen a coin in the attract mode: on to the coin's screen with no demo player left
comment draw_four_turtle_pictures the pictures of the turtles of the players chosen
comment draw_turtle_pictures the turtles' big pictures as sprites, at their players' places, in colour or in black
comment reset_layers_scroll the layers' scroll back to zero
comment attract_opening the opening, by its steps, until a coin
comment opening_setup the opening set up, by its steps
comment opening_setup_clear the play's work and the layers cleared
comment opening_setup_palettes the attract mode's palettes and palette effects requested
comment opening_setup_priority the layers' priority set
comment opening_setup_start the opening started
comment opening_show the opening played for its time, then the title
comment attract_best_players BEST 10 PLAYERS, by its steps, until a coin
comment best_players_setup BEST 10 PLAYERS set up, by its steps
comment best_players_clear the play's work and the layers cleared
comment best_players_palettes the attract mode's palettes and palette effects requested
comment best_players_draw the background, the turtles' pictures and the table of the best ten drawn
comment best_players_show BEST 10 PLAYERS shown, by its steps
comment best_players_pause a pause before the turtles move
comment best_players_scroll the turtles' pictures slide across behind the table, then the next attract step
comment draw_best_players the title, the places, the initials and the scores of the best ten
comment draw_best_players_initials the ten players' initials, the first three in their colours
comment draw_best_players_character a tall character's tiles
comment draw_best_players_scores the ten scores with PTS
comment attract_spare_step an empty attract step

# ======== the layers' maps, the code (01E050-01FDC9) ========
# The areas' two tile layers, the K052109's layer A (tile RAM 102000) and layer B (104000), keep 64 bytes each at 063340
# (A) and 063380 (B): x and y (24.8), the speeds (+0C, +0E), the map, its blocks and width (+12, +16, +10), and the row
# and the column the scroll has brought into view (+30 and +34 set by queue_scroll_row: 01B526 "subq.b #1, $63334.l";
# +2C and +35 by auto_scroll: 01AD46 "subq.b #1, $63335.l"). The code works on a copy at 063300: load, draw, save.
# The floor map (061800, 0x40 cells a row) gets walls (FF, and FE or FD where a wall blocks one side: turtle_wall_contacts
# 01D774 "cmpi.b #-$2, D1" right, 01D7A0 "cmpi.b #-$3, D1" left) and floor (01).

# ---- the whole layers and the working copy ----
# the whole layer at A0 (8 rows of 16 blocks: 01E082 "moveq #$8, D7", 01E084 "moveq #$10, D6") from the working layer's
# map and blocks (01E074 "movea.l $63312.l, A2", 01E08C "movea.l $63316.l, A4"), and each block's floor cells into the
# floor map (01E07C "lea $61800.l, A1", 01E0AA "move.b ($1,A4), ($0,A1)"; the tiles from +11: 01E0C2 "move.b ($11,A4),
# ($1,A0)"): the street's and the building site's starts (01E3EC "bsr $1e050", 01E550 "bsr $1e050")
01E050  func  draw_whole_layer_and_floor
# the same without the floor map: each block's colour byte to the even addresses, its tile codes to the odd ones
# (01E15E "move.b ($0,A4), D1", 01E172 "move.b ($1,A4), ($1,A0)"); the other starts and the exits' new screens
01E11E  func  draw_whole_layer
# the 64 bytes of layer A into the working layer (01E708 "lea $63340.l, A3", 01E718 "lea $63300.l, A4", 01E720 "move.l
# (A3)+, (A4)+")
01E708  func  load_layer_a
# the same for layer B (01E712 "lea $63380.l, A3")
01E712  func  load_layer_b
# the working layer back into layer A's (01E728 "lea $63340.l, A4", 01E738 "lea $63300.l, A3")
01E728  func  save_layer_a
# the same for layer B (01E732 "lea $63380.l, A4")
01E732  func  save_layer_b
# the working layer's new row (13 blocks across at 063330's place: 01E9C2 "tst.b $63334.l", 01EA4C "moveq #$d, D7") and
# its new column (four tiles down a block, eight blocks: 01EAAA "tst.b $63335.l", 01EAB6 "move.l $6332c.l, D0", 01EB36
# "move.b (A3,D4.w), ($80,A0)") into the tile RAM at 0633CC (01E9F8 "add.l $633cc.l, D0")
01E9C2  func  draw_new_row_and_column
# the same with the blocks' floor cells into the floor map (01E740 "tst.b $63334.l", 01E780 "addi.l #$61800, D1",
# 01E7FA "move.b ($1,A3,D5.w), (A1)"): the street and the building site
01E740  func  draw_new_row_and_column_and_floor
# layer A's and layer B's x (01ECB6 "move.w D0, $6005c.l", 01ECC8 "move.w D0, $60060.l") and y (01ECD6 "move.b D0,
# $6005f.l", 01ECE4 "move.b D0, $60063.l") into the copies the VBLANK writes to the K052109's scroll registers
# (003F32 "move.b $6005f.l, $106018.l", 003F46 "move.b D7, $106400.l")
01ECAA  func  set_layers_scroll

# ---- the area's start ----
# the first step of an area's entry (019FC2 "jmp $1e1ba.l", 019FE6 "jsr $1e1ba.l", 01A156 "jsr $1e1ba.l"): the layers'
# variables cleared, the stage's record of area_layers into layer A and layer B (01E26E "move.l (A6,D0.w), $63340.l",
# 01E27E "move.l ($8,A6,D0.w), $63380.l"), the stage's start (01E2C8 "lea $1e2da.l, A6") and the scroll (01E2D4 "jmp
# $1ecaa.l")
01E1BA  func  start_area_layers
# stage 0: the floor map's top rows walls and the rest floor (01E308 "moveq #-$1, D0", 01E310 "cmpa.l #$61c7f, A0",
# 01E318 "move.l #$1010101, D0"), the first scroll segment (01E326 "jsr $1a704.l"), layer B drawn (01E330 "lea
# $104000.l, A0", 01E336 "bsr $1e11e")
01E302  func  start_layers_building
# stage 1: the floor map (01E34E "cmpa.l #$61cbf, A0") with a slope of left walls (cells FD from 061804: 01E364 "lea
# $61804.l, A0", 01E36E "moveq #-$3, D3"), April at the window (object 47: 01E386 "lea $62eb0.l, A0", 01E3B6 "lea
# $2d8ae.l, A6"), layer B drawn
01E340  func  start_layers_apartment
# stage 2: the floor map from the map's own blocks (01E3EC "bsr $1e050")
01E3DC  func  start_layers_street
# stage 3: walls, floor, a band of cells FC and floor again (01E404 "cmpa.l #$61aff, A0", 01E41A "move.l #$fcfcfcfc,
# D0", 01E420 "cmpa.l #$61dbf, A0"), both layers drawn (01E440 "lea $102000.l, A0", 01E452 "lea $104000.l, A0")
01E3F6  func  start_layers_sewer
# stage 4: the floor map (01E470 "cmpa.l #$61c7f, A0"), layer B
01E462  func  start_layers_car_street
# stage 5: the floor map (01E4AE "cmpa.l #$619ff, A0"), layer B
01E4A0  func  start_layers_highway
# stage 6: the floor map (01E4EC "cmpa.l #$61bbf, A0"), both layers (01E51E "lea $102000.l, A0")
01E4DE  func  start_layers_skateboard
# stage 7: both layers, layer B with its floor map (01E538 "lea $102000.l, A0", 01E550 "bsr $1e050")
01E52E  func  start_layers_building_site
# stage 9: one enemy counted from the start (Krang: 01E55A "move.b #$1, $6120c.l"), then stage 8's
01E55A  func  start_layers_final
# stage 8: the floor map (01E570 "cmpa.l #$61bff, A0"), layer B
01E562  func  start_layers_technodrome

# ---- every frame of play ----
# 0068E2 (00692C "jsr $1ebce.l"): the area's frame counters (01EBCE "addq.w #1, $61104.l"), the stage's layers (01EBF6
# "lea $1ecec.l, A6"), then the hurry sign: a count of the frames the layers stand still before the area's end (01EC02
# "move.b $6335b.l, D0", 01EC08 "or.b $6339b.l, D0", 01EC0E "or.b $633ec.l, D0") with fewer than 3 enemies (01EC18
# "addq.w #1, $633f6.l", 01EC1E "cmpi.b #$3, $6120c.l"); from 0x100 object 49 at the top right (01EC2A "tst.b $633f6.l", 01EC34
# "lea $62f50.l, A0", 01EC4E "move.w #$158, ($c,A0)") with animation 02DB76, or 02DBAE in area 2's diagonal (01EC5A
# "lea $2db76.l, A6", 01EC6A "lea $2dbae.l, A6"; rendered: HURRY! with an arrow right, or up and right); with an enemy
# about the count waits at 0x100 (01EC80 "move.w #$100, $633f6.l"), with none for 0x600 frames the missiles fall on the
# turtles (01EC8A "cmpi.w #$600, $633f6.l", 01EC96 "jsr $13354.l")
01EBCE  func  update_area_layers
# stage 0 (01ECEC's first entry): 0x30 frames into the area, before any speech, the first turtle in play says
# "Attaaaack!" (01ED1E "cmpi.w #$30, $61104.l", 01ED5C "jsr $30034.l"); layer B's new tiles (01ED68 "jsr $1e712.l",
# 01ED78 "jsr $1e9c2.l"); past 0x3C000 across (01ED98 "cmpi.l #$3c000, D0") the floor map walled off on the right
# once (01EDAC "moveq #-$2, D3", 01EDC4 "subq.b #1, $633fd.l")
01ED14  func  update_layers_building
# stage 1: past 0x2000 the floor map walled off on the right once (01EDDC "cmpi.l #$2000, D0", 01EDF0 "moveq #-$2, D3"),
# layer B's new tiles, 0303CE (01EE34 "jsr $303ce.l"), then April
01EDCC  func  update_layers_apartment
# April at the apartment's window (object 47; 02D8AE rendered: April): "Help meeee...!" 0x30 frames in (01EE4A "cmpi.w
# #$30, $61104.l", 01EE60 "jsr $3002c.l"), a step of 4 to one side or the other whenever her frame is at 0x30 (01EE66
# "cmpi.b #$30, ($33,A0)", 01EE78 "addi.l #$400, ($12,A0)", 01EE84 "subi.l #$400, ($12,A0)"), and kept at her place as
# layer B scrolls (01EE92 "move.w $6338c.l, D0", 01EE9A "sub.l D0, ($12,A0)"); area 1's exit too (02B706 "jsr $1ee3a.l")
01EE3A  func  april_wait_for_rescue
# stage 2: layer A follows layer B (01EEB0 "move.l $63380.l, $63340.l"); between 0x12000 and 0x1E000 across, the TV in
# the shop window by a count of frames from there (01EFFC "addq.w #1, $61110.l"): April's picture (01EF02 "lea $1f0d8.l,
# A6", 01EF0A "bsr $1f080"), "Help meeee...!" at 0x10 (01EF96 "jsr $3002c.l"), her picture talking to 0xA0 (01EF5A "lea
# $1f158.l, A6", 01EF7A "bsr $1f0ae"), Shredder's at 0xA0 (01EFEE "lea $1f118.l, A6"), "Tonight I dine on turtle soup"
# at 0xB0 (01EFE4 "jsr $3000c.l"), the screen off at 0x170 (01EFA0 "lea $102478.l, A0", 01EFAE "moveq #$10, D1"); seen
# in area2, frames 4210-4600. 0xA0 frames after Bebop's first line (a count of the lines said), the first turtle in play answers
# "They ain't getting any prettier!" (01F00C "cmpi.b #$1, $61112.l", 01F05A "jsr $300da.l"); layer B's new tiles and
# floor (01F070 "jsr $1e740.l")
01EEAA  func  update_layers_street
# 8 rows of 8 tiles at the TV in layer A (the columns 60-63 and 0-3 from row 8: 01F080 "lea $102478.l, A0", 01F086 "lea
# $102400.l, A1"), the colour D0 and the codes of the picture in A6 (01F094 "move.b ($4,A6), (A1)+", 01F098 "move.b
# (A6)+, (A0)+")
01F080  func  draw_tv_picture
# 3 rows of 3 tile codes in the middle of the TV's picture (01F0AE "lea $1025fd.l, A0", 01F0B4 "lea $102581.l, A1",
# 01F0BC "move.b (A6), (A0)"), one of the frames of 01F158 every 8 frames while April talks
01F0AE  func  animate_tv_picture
# stage 3: past 0x30000 the floor map walled off on the right once, by the column heights of 01F242 (01F190 "cmpi.l
# #$30000, $63380.l", 01F1A4 "lea $1f242.l, A6"); layer B's new tiles, then layer A follows it (01F1E6 "move.l
# $63380.l, $63340.l") with its new tiles too (01F228 "move.l #$102000, $633cc.l")
01F186  func  update_layers_sewer
# stage 4: past 0x33000 (01F258 "cmpi.l #$33000, $63380.l") April tied up at the far end (object 44 at the bottom of
# the screen: 01F266 "lea $62dc0.l, A0", 01F280 "move.w #$f0, ($e,A0)", 01F286 "lea $2e11a.l, A6"; her palette: 01F292
# "lea $ca04.l, A6", 01F29C "jsr $9242.l"; seen in a longer area 4 game, frames 22500-30000, Bebop fighting before her),
# kept at her place (01F2A2 "move.l #$4d000, D0"); every 256 frames her frame's time set to 0x10 or to 0 (01F2B4 "tst.b
# $600a5.l", 01F2CA "move.b D0, ($33,A0)")
01F252  func  update_layers_car_street
# stage 9: layer B's new tiles (01F2F4 "jsr $1e712.l", 01F304 "jsr $1e9c2.l")
01F2EE  func  update_layers_final
# stage 7: layer B's new tiles and floor (01F324 "jsr $1e740.l"); while the scroll moves, layer A a quarter faster
# (01F346 "lsr.w #2, D1", 01F34C "add.l D0, $63340.l"); under 0x60000 0303CE (01F3BA "jmp $303ce.l"); past it four
# columns of layer A blanked once (01F370 "lea $102030.l, A0", 01F378 "moveq #$10, D1"); past 0x68800 (01F3AC "cmpi.l
# #$68800, $63380.l") Splinter hanging tied at the far end (object 44, high up: 01F3C0 "lea $62dc0.l, A0", 01F3EE "move.w
# #$3800, ($10,A0)", 01F3FC "lea $2dae6.l, A6"; rendered: a rat in ropes, his feet off the ground), kept at his place
# (01F3C6 "move.l #$84000, D0"), his animation changed every 256 frames (01F412 "lea $2db0a.l, A6")
01F314  func  update_layers_building_site
# stage 8: its steps by 0633D2 (01F42A "lea $1f43a.l, A6"): to the lift, the lift's ride, off the lift
01F420  func  update_layers_technodrome
# step 0: layer B's new tiles; from 0x42000 layer A, 0x40000 behind it, drawn too (01F476 "subi.l #$40000, D0", 01F4A4
# "move.l #$102000, $633cc.l"); from 0x58000 the scroll locked (01F4C8 "move.b #$ff, $633c3.l"), and once every turtle in
# play is on the lift (x past y + 0x7000: 01F4DE-01F4F2) the ride starts: the scroll by itself (01F502 "move.b #$ff,
# $633c9.l"), the lift's edge (object 44: 01F528 "lea $62dc0.l, A0", 01F538 "lea $2db6c.l, A6"; rendered: hazard
# stripes along a diagonal edge), sound 21 (01F544 "move.b #$21, D7"); area8, frame 10600
01F446  func  technodrome_reach_lift
# step 1, the ride: the scroll 4 faster a frame up to 0x400 (01F560 "addq.w #4, $6330c.l", 01F56C "cmpi.w #$400,
# $6330c.l"); at 0xA2800 across the map goes back 0x40000 across and on 0x40000 down (01F5FC "cmpi.l #$a2800, D0", 01F614
# "subi.l #$40000, $63300.l", 01F61E "addi.l #$40000, $63304.l") while 0633D0 counts; then from 0xA0000 0x10 slower a
# frame to 0x100 (01F5BC "subi.w #$10, $6330c.l"), with sound 29; the lift's edge placed (01F650 "jsr $1f7a4.l"); when
# the scroll is no longer on its own, sound 2B and the lift's left side walled off in the floor map (01F660 "move.b #$2b,
# D7", 01F674 "moveq #-$3, D3"); area8, frames 10600-11600
01F556  func  technodrome_ride_lift
# step 2: layer B's new tiles, layer A 0xA0000 behind it (01F6B2 "subi.l #$a0000, D0"), the lift's edge placed; at
# 0xC0000 the floor map's rows set again once (walls from 061830, floor from 061C30: 01F716 "lea $61830.l, A0", 01F72C
# "lea $61c30.l, A0"); past 0xC9000 the right end walled off once (01F74E "cmpi.l #$c9000, D0", 01F762 "moveq #-$2, D3")
01F690  func  technodrome_leave_lift
# D0 rows of the floor map given 16 bytes of D2 each (01F792 "moveq #$4, D1", 01F794 "move.l D2, (A0)+", 01F79A "adda.w
# #$30, A0")
01F792  func  fill_floor_map_rows
# object 44, the lift's edge, hidden (01F7AA "andi.b #$7f, (A0)") unless it is within 0x1A000 before 0xCE000 across;
# then placed by the scroll (01F7AE "move.l #$ce000, D0", 01F7D4 "move.l #$18000, D0") and drawn (01F7E6 "ori.b #$80,
# (A0)")
01F7A4  func  place_lift_edge
# stage 5: layer B's new tiles, layer A at layer B's height (01F808 "move.l $63384.l, $63344.l"), the cars' steps by
# 0633D2 (01F81C "lea $1f82c.l, A6")
01F7EC  func  update_layers_highway
# step 0: at 0x10000 across (01F848 "cmpi.l #$10000, $63380.l") the car full of Foot soldiers: its picture in layer A
# (01F856 "clr.b D5", 01F858 "jsr $1f93c.l") and its object (01F85E "jsr $4a90e.l"), the next step (01F864 "addq.b #1,
# $633d2.l"); area5, frames 1680-1790
01F848  func  highway_first_car
# step 1: the car drives across (01F86C "clr.b D5", 01F86E "bra $1f8b8")
01F86C  func  highway_first_car_drive
# step 2: at 0x30000 (01F872 "cmpi.l #$30000, $63380.l") the car again, its colour bytes 0x40 on (01F87E "moveq #$40,
# D5")
01F872  func  highway_second_car
# step 3: it drives across (01F88E "moveq #$40, D5")
01F88E  func  highway_second_car_drive
# step 4: at 0x50000 (01F894 "cmpi.l #$50000, $63380.l") the car again, 0x80 on (01F8A0 "moveq #-$80, D5")
01F894  func  highway_third_car
# step 5: it drives across (01F8B0 "moveq #-$80, D5")
01F8B0  func  highway_third_car_drive
# step 6: no more cars (01F8B6 "rts")
01F8B6  func  highway_cars_over
# every 4 frames (01F8BE "andi.b #$3, D0") the car's wheels, two patches of 4 by 4 tiles (01F8EE "lea $102a56.l, A0",
# 01F8F4 "lea $102a6c.l, A1"), from 01FBE0 and 01FBF0 or, every other time, 01FC00 and 01FC10 (01F8D4 "btst #$2,
# $600a5.l"); layer A moved by 0x480 less layer B's speed (01F918 "move.l #$480, D0", 01F924 "sub.l D0, $63340.l"):
# the car passes the turtles; when it is gone (01F92E "move.l #$1ffff, $63340.l") the next step
01F8B8  func  drive_foot_car
# stage 6: layer B, the far background, on by its own speed and round every 0x200 pixels (01FC28 "move.w $6330c.l, D0",
# 01FC2E "add.l D0, $63300.l", 01FC34 "andi.l #$1ff00, $63300.l"); the road (layer A) by 0633D2's steps (01FC54 "lea
# $1fc96.l, A6") and its new tiles (01FC60 "move.l #$102000, $633cc.l"); the turtles in the air, with their shadows,
# on their skateboards (01FC84 "or.b D0, ($1,A0)")
01FC20  func  update_layers_skateboard
# step 0: the road round the tiles already drawn, no new column (01FCAE "clr.w $63308.l": auto_scroll draws one when
# 063308 carries, 01AD36 "add.w D1, $63308.l", 01AD3C "bcc $1ad4c"), back 0x20000 each time it passes them (01FCC0
# "btst #$1, $63301.l", 01FCCC "andi.l #$1ff00, $63300.l"), 20 times (01FCB4 "cmpi.b #$14, $633d0.l", 01FCD6 "addq.b
# #1, $633d0.l"), then on from 0xA200 (01FCDE "cmpi.l #$a200, $63300.l")
01FCAE  func  skateboard_road_first_loop
# the column's phase from the road's place (01FCEA "move.l $63300.l, D0", 01FCF6 "move.w D0, $63308.l"), the rounds'
# count cleared, the next step
01FCEA  func  skateboard_road_go_on
# step 1: on to 0x3A200 (01FD06 "cmpi.l #$3a200, $63300.l")
01FD06  func  skateboard_road_to_second_loop
# step 2: round 0x30000-0x50000 (01FD28 "cmpi.l #$50000, $63300.l", 01FD34 "move.l #$30000, $63300.l") 20 times, then on
# from 0x3A200
01FD16  func  skateboard_road_second_loop
# step 3: on to 0x6A200 (01FD54 "cmpi.l #$6a200, $63300.l")
01FD54  func  skateboard_road_to_third_loop
# step 4: round 0x60000-0x80000 (01FD7C "cmpi.l #$80000, $63300.l", 01FD8A "move.l #$60000, $63300.l") 20 times, then on
# from 0x6A200
01FD6A  func  skateboard_road_third_loop
# step 5: round 0x80000-0xA0000 from then on (01FDB0 "cmpi.l #$a0000, $63300.l", 01FDBE "move.l #$80000, $63300.l")
01FDAA  func  skateboard_road_last_loop

# ---- April's own field ----
# which way her next step goes: 0 right, FF left (01EE70 "tst.b ($1a,A0)", 01EE8C "eori.b #$ff, ($1a,A0)"; cleared at
# her start: 01E3B2 "clr.b ($1a,A0)"); the C shows x_speed's high byte today
scoped object april 1A stepping_left u8
# April's object, loaded in these two (01E386 "lea $62eb0.l, A0", 01EE3A "lea $62eb0.l, A0")
local start_layers_apartment 01E386 a0 april object.april
local april_wait_for_rescue 01EE3A a0 april object.april

comment draw_whole_layer_and_floor a whole layer drawn from its map, and its floor cells into the floor map
comment draw_whole_layer a whole layer drawn from its map
comment load_layer_a layer A's variables into the working layer
comment load_layer_b layer B's variables into the working layer
comment save_layer_a the working layer back into layer A's variables
comment save_layer_b the working layer back into layer B's variables
comment draw_new_row_and_column the row and the column of a layer the scroll has brought into view
comment draw_new_row_and_column_and_floor the row and the column the scroll has brought into view, with their floor cells
comment set_layers_scroll the two layers' places into the scroll the frame shows
comment start_area_layers the area's layers from its record: the floor map, the first scroll segment and the layers drawn
comment start_layers_building the burning building's floor map and layer
comment start_layers_apartment April's apartment's floor map, its left wall, April at the window, and the layer
comment start_layers_street the street's layer and its floor map
comment start_layers_sewer the sewer's floor map and both layers
comment start_layers_car_street the street of the parked cars' floor map and layer
comment start_layers_highway the highway's floor map and layer
comment start_layers_skateboard the skateboard ride's floor map and both layers
comment start_layers_building_site the building site's layers and floor map
comment start_layers_final the last area starts with Krang counted as an enemy, then as the Technodrome
comment start_layers_technodrome the Technodrome's floor map and layer
comment update_area_layers every frame of play: the area's layers, and the HURRY! sign and the missiles when the players dawdle
comment update_layers_building the burning building's layer, the first cry of attack, and the wall at its end
comment update_layers_apartment the apartment's layer, the wall at its end, and April
comment april_wait_for_rescue April at the window cries for help and paces, kept at her place
comment update_layers_street the street's layers: the TV in the shop window shows April and Shredder, and a turtle's answer
comment draw_tv_picture a picture on the TV in the shop window
comment animate_tv_picture April talking on the TV
comment update_layers_sewer the sewer's two layers and the wall at its end
comment update_layers_car_street the street's layer, and April tied up at its end
comment update_layers_final the last area's layer
comment update_layers_building_site the building site's layers, and Splinter hanging tied at its end
comment update_layers_technodrome the Technodrome's layers by the step: to the lift, the ride, off the lift
comment technodrome_reach_lift the layers up to the lift, and the ride starts when every turtle is on it
comment technodrome_ride_lift the lift's ride: the scroll speeds up, loops the shaft, slows down and stops
comment technodrome_leave_lift the layers after the ride, the floor map set again and the wall at the end
comment fill_floor_map_rows rows of the floor map filled with one kind of cell
comment place_lift_edge the lift's striped edge kept at its place while it is near
comment update_layers_highway the highway's layer and the cars full of Foot soldiers
comment highway_first_car the first car full of Foot soldiers comes
comment highway_first_car_drive the first car drives past
comment highway_second_car the second car comes, in other colours
comment highway_second_car_drive the second car drives past
comment highway_third_car the third car comes, in other colours
comment highway_third_car_drive the third car drives past
comment highway_cars_over no more cars
comment drive_foot_car the car's wheels turn and it drives across the screen
comment update_layers_skateboard the skateboard ride: the far background and the road scroll by themselves
comment skateboard_road_first_loop the road goes round its first stretch twenty times, then on
comment skateboard_road_go_on the road goes on to new stretches
comment skateboard_road_to_second_loop the road on to its second stretch
comment skateboard_road_second_loop the road goes round its second stretch twenty times, then on
comment skateboard_road_to_third_loop the road on to its third stretch
comment skateboard_road_third_loop the road goes round its third stretch twenty times, then on
comment skateboard_road_last_loop the road goes round its last stretch from then on

# ======== the object engine (046EEA-047D97, src/engine/sprites.c) ========
# the 128 sprites of the K051960's sprite RAM off, each with its own priority (046EEA "lea $140400.l, A0", 046EF2 "moveq
# #$4f, D1", 046EF4 "move.b D1, ($0,A0)", 046EFA "andi.b #$7f, D1": bit 7, shown, clear); the scenes' and the areas'
# starts (006846 "jsr $46eea.l")
046EEA  func  hide_all_sprites
# every frame: each object drawn into the draw list at 061400 by screen_y + depth + 0x38 (046F30 "move.w ($34,A0), D0",
# 046F38 "addi.w #$38, D0"), the objects of a row linked by draw_next (046F66 "move.w A0, ($3e,A2)"), the first row and
# the count (046F72 "move.w D5, $61204.l", 046F78 "move.b D6, $61206.l"); one out of the list (0x180 or more) or not
# drawn has its animation stepped on all the same (046F8C "bsr $471ae")
046F08  func  build_draw_list
# the attack check, every frame (006938 "jsr $47204.l"): the turtles' attacks against half the objects 4-39, every other
# one by frame_count (04720A "btst #$0, $600a5.l", 047318 "adda.w #$a0, A1"), those objects' attacks against the turtles
# (047342 "lea $62000.l, A1"), and two of the objects 4-11 (attack_check_objects: 04742E "lea $471f4.l, A0") against the
# objects 12-23 (047450 "lea $623c0.l, A1"); a hit when the attack box (the frame's, attack_depth not negative: 047232
# "tst.w ($8,A2)") meets the body box: routine 4 (0472CE "move.w #$400, ($4,A1)"), the hit, the damage off the health,
# and an enemy defeated by a turtle credited to its player (0472FE "move.w #$400, D7", 04730C "jsr $4164.l")
047204  func  check_attacks
# turtle_collide (01AB7E "jsr $47534.l"): the turtle against the objects 4-11 by the body boxes (047534 "lea $62140.l,
# A3", 04753A "moveq #$7, D7"): a side blocked into its contacts (047632 "or.b D1, ($1,A0)"), on top of one (0475F2
# "ori.b #$10, ($0,A0)", 047600 "move.b D0, ($32,A0)"), carried by one whose kind has bit 7 (04760E "tst.b ($2,A3)",
# 04761C "add.l D2, ($12,A0)")
047534  func  turtle_collide_with_objects
# the same for an enemy (enemy_think 048B56 "jsr $47662.l", enemy_react 048EE6 "jsr $47662.l"), keeping its contacts'
# top 3 bits (04766A "andi.b #$e0, ($1,A0)") and never carried
047662  func  enemy_collide_with_objects
# the area's start (006840 "jsr $4776e.l"): the players' slots at 062FA0 given their turtles (04776E "move.l #$62000,
# $62fa0.l") and cleared (04779C "movem.l D0-D2, $62fa4.l"), the first slot and turtle the nearest (0477BC "move.l
# #$62fa0, $61226.l", 0477C6 "move.l #$62000, $6122e.l"), a byte by the area into 06124C (0477D0 "lea $48830.l, A6")
04776E  func  start_player_slots
# the object loop, every frame (006932 "jsr $477ea.l"): the enemies' spawns (0477EA "jsr $47a32.l"), the players' slots
# (0477F6 "bsr $4783c"), and every object in use of 4-39 (0477FA "lea $62140.l, A0", 047832 "cmpa.l #$62c80, A0") runs
# its kind's routine (047812 "lea $53896.l, A6", 04781E "move.b ($4,A0), D0", 047828 "jsr (A6)") and gets its screen
# place (04782A "bsr $4789c")
0477EA  func  run_objects
# each slot whose turtle is in use (04784A "tst.b (A5)"): enemy_behind cleared (047850 "clr.b ($44,A5)") and counted;
# the slot with the fewest enemies so far into 061208 (047862 "move.l A6, $61208.l"), its grab_time counted down
# (047870 "subq.b #1, ($8,A6)"); the turtles in play into 061207, and the enemies about (06120C) shared among them, at
# least 1, into 06120D (04788E "divu.w D1, D0", 047894 "move.b D0, $6120d.l")
04783C  func  update_player_slots
# its screen place from its place in the area and the spawn scroll (0478A8 "move.l $61218.l, D1", 0478B4 "addi.w #$1a0,
# D0", 0478C0 "move.l $6121c.l, D3", 0478CC "addi.w #$100, D2"), and flags bit 5 when it is off the screen by the
# margins spawn_offsets has for its kind (0478D4 "bclr #$5, ($0,A0)", 0478DA "lea $53a5e.l, A4", 0478EE "cmpi.w #$1c0,
# D0")
04789C  func  update_object_screen_place
# A6 = the first free object (flags 0) of the group D0 picks, from object_groups and object_group_counts (047C02 "lea
# $47bde.l, A6", 047C12 "lea $47be2.l, A6", 047C1E "tst.b ($0,A6)"); Z set when there is one
047C02  func  take_free_object_in_group
# an object from the record in A5 (x, y and height from the object in A0, then its group, kind and parameter): in use,
# routine 0, its own colours, nothing a turtle throws (047C30 "move.b ($5,A5), D0", 047C3A "move.w #$100, ($0,A6)",
# 047C40 "move.w ($6,A5), ($2,A6)", 047C50 "clr.b ($4b,A6)"), placed by the record; the soldiers out of doors,
# elevators, windows and manholes, the Mousers out of their holes, Shredder's clones, what the tire and manhole
# soldiers throw
047C30  func  start_object_from_record
# a shot from the record in A5, a free object of group 3 (047C5A "move.b #$3, D0") of the kind at +5 (047C6A "move.b
# ($5,A5), ($2,A6)"), which takes the shooter's +28 (047C82 "move.w ($28,A0), ($28,A6)"); the enemies' knives, shuriken,
# axes, boomerangs, spears, bullets, rockets and rays, and what the bomber throws
047C5A  func  start_shot
# the object in A6 at the record's offsets from the object in A0 (047C88 "move.w ($0,A5), D1", 047CA2 "add.l ($12,A0),
# D1", 047CB2 "add.l ($16,A0), D2", 047CBE "add.b ($10,A0), D3"), across mirrored and facing its way when A0 faces left
# (047C8C "btst #$6, ($0,A0)", 047C96 "bset #$6, ($0,A6)")
047C88  func  place_from_record
# the speeds across (D6) and up or down (D7) of the speed D1 the way the direction D0 points (0-255, 0x40 a quarter),
# from the quarter sine at 047D50 (047CCC "lea $47d50.l, A5", 047CEE "mulu.w D1, D6", 047D02 "mulu.w D1, D7")
047CCC  func  speeds_from_direction
# direction_to the object in A6's place on the screen (047D90 "move.w ($c,A6), D1", 047D94 "move.w ($e,A6), D2")
047D90  func  direction_to_object

# ---- the attack check's turtles, the shots ----
# the attack check's first loop runs on the turtles (04721C "lea $62000.l, A0", 047320 "adda.w #$50, A0"): the long it
# writes at +4A is the turtle's hit_target (0472C4 "move.l A1, ($4a,A0)"), which the C splits today into unk_4A, unk_4B
# and attacker; the second loop's victims are the turtles (047342 "lea $62000.l, A1", 047412 "adda.w #$50, A1"), whose
# hit_by it sets (0473DC "move.l A0, ($28,A1)": unk_28, unk_2A and unk_2B in the C today)
local check_attacks 04721C,047320 a0 turtle object.turtle
local check_attacks 047342,047412 a1 turtle object.turtle
# the shooter's +28, which the shot takes as its own (047C82 "move.w ($28,A0), ($28,A6)"): what a turtle the shot hits
# plays, read off the object that hit it (turtle_hit 01C2DE "move.w ($28,A6), D0", into the sounds at 01D556); the
# enemies keep their move there, the bomber its hit_sound
scoped object start_shot 28 hit_sound u16
# the shot start_shot fills (047C5E "bsr $47c02"), and the object start_object_from_record fills, mostly an enemy, whose
# throw it clears (047C34 "bsr $47c02", 047C50 "clr.b ($4b,A6)")
local start_shot 047C5E a6 shot object.start_shot
local start_object_from_record 047C34 a6 started object.enemy
# (the existing lines 471-481 name the three checks: func_047204 -> check_attacks, func_047534 ->
# turtle_collide_with_objects, func_047662 -> enemy_collide_with_objects; line 531's comment: func_047C02 ->
# take_free_object_in_group)

comment hide_all_sprites every sprite of the sprite RAM turned off
comment build_draw_list every frame: the objects drawn sorted by their depth on the screen into the draw list
comment check_attacks every frame: the turtles' and the enemies' attacks against each other, the hits and the damage
comment turtle_collide_with_objects the turtle against the solid objects: blocked, standing on one, or carried by a platform
comment enemy_collide_with_objects the enemy against the solid objects: blocked or standing on one
comment start_player_slots the players' slots the enemies go after, set up for the area
comment run_objects the object loop: the enemies' spawns, the players' slots, and every object's routine and screen place
comment update_player_slots every frame: the players' slots counted and the least crowded one found
comment update_object_screen_place the object's place on the screen from its place in the area, and whether it is off the screen
comment take_free_object_in_group the first free object of a group
comment start_object_from_record an object started from a record, placed by the object that starts it
comment start_shot a shot started from a record, placed by its shooter
comment place_from_record an object placed by a record's offsets from another, mirrored with it
comment speeds_from_direction the speeds across and up or down of a speed in a direction
comment direction_to_object the direction from the object to another one

# ======== the enemies' states (src/objects/states.c) ========
# the states of enemy_retreat (its table 0492F8), a move no table and no code picks (nothing refers to 0492EC; no
# scenario runs it): backs away from its turtle at 0x180, facing it (04930A "move.l #$1800000, ($1a,A0)", 049318 "cmpi.b
# #$40, D0", 049320 "neg.w ($1a,A0)", 049324 "bset #$6, ($0,A0)"), animation 054908, for 84 frames (049300 "move.b #$54,
# ($22,A0)")
049300  func  enemy_retreat_start
# move_time counted down (04933A "subq.b #1, ($22,A0)") and the move (04933E "jmp $4826a.l")
04933A  func  enemy_retreat_step
# reactions E4 and E8 (the last two of 053DEA, at 053ECE and 053ED2), which no code gives and no definition picks (the
# nine definitions' reaction bytes, +58 on, hold 00-22 and 80); no scenario runs them: an enemy crashing into the
# scenery: sound 40 and four tile blocks of layer B redrawn at fixed places (0494DA "move.b #$40, D7", 0494E4 "move.w
# #$14, D7", 0494E8 "lea $189d8.l, A6", 0494EE "jsr $183fa.l"; rendered with area 2's tile banks: broken glass), lying
# (049528 "lea $5c9c4.l, A6"), gone when the animation ends
0494C6  func  enemy_crash_into_scenery
0494DA  func  enemy_crash_into_scenery_start
# both reactions' end: sound 10, gone, one enemy less (049534 "tst.b ($33,A0)", 04953C "move.b #$10, D7", 049546 "clr.w
# ($0,A0)", 04954A "subq.b #1, $6120c.l")
049534  func  enemy_crash_into_scenery_end
# the same with the places 18-1B, lower in the layer (04957A "move.w #$18, D7", 04957E "lea $18a24.l, A6")
04955C  func  enemy_crash_into_scenery_low
049570  func  enemy_crash_into_scenery_low_start

comment enemy_retreat_start Unused: the enemy backs away from its turtle facing it
comment enemy_retreat_step Unused: the enemy backs away until its move is over
comment enemy_crash_into_scenery Unused: an enemy crashes into the scenery, which breaks, and dies
comment enemy_crash_into_scenery_start Unused: the scenery breaks where the enemy crashes, and it lies there
comment enemy_crash_into_scenery_end Unused: the crashed enemy is gone when its animation ends
comment enemy_crash_into_scenery_low Unused: the same crash lower in the scenery
comment enemy_crash_into_scenery_low_start Unused: the scenery breaks lower down where the enemy crashes

# ======== the tile blocks and the typed texts (src/video/tile_blocks.c) ========
# the scene's opening text (00655A "jsr $18334.l"; SCENE 1, FIRE! WE GOT... in area0, frames 1000-1020) started with
# start_typed_text, its first character on the next frame (018338 "clr.b $63428.l")
018334  func  start_typed_text_at_once
# every frame of the scene's opening (006590 "jsr $18340.l"): when the wait runs out (01834A "subq.b #1, $63428.l") the
# next character into the fixed layer, its colour then its tile (01837E "move.b $6342b.l, (A5)+", 018384 "subi.b #$30,
# D7"); '/' a new line (01836A "cmpi.b #$2f, D7"), '!' the end (018362 "cmpi.b #$21, D7")
018340  func  type_next_character
# D6 + 1 hexadecimal digits of D7 into the fixed layer, right to left from A6 (018492 "andi.w #$f, D0", 018498 "movea.l
# #$184c2, A2", 0184B2 "suba.l #$2, A6"); the test mode's sound test (005BEE "jsr $1848c.l"; read in test_mode and
# sound_test) and show_spawn_scroll_place (the spawn scroll)
01848C  func  draw_hex_digits
# one text typed 8 times over (the 8 records of 10 bytes from 063476 down: 018588 "lea $63476.l, A4", 018594 "bsr
# $1863a", 018598 "movea.l A5, A6": each pass from the same text), each starting later than the one before (01859C "lsl.b
# D5, D6") and in its own colour of text_colours (01860C "move.b (A2,D7.w), (A5)+"), so the characters change colour as
# the passes go over them; the character pages (004FA4 "lea $19272.l, A6", 004FBA "jsr $18588.l") and the epilogue
# (006E62 "lea $199a4.l, A6", 006E6A "jsr $18588.l")
018588  func  start_text_typed_in_colours
# every frame (005132 "jsr $185b6.l", 006E78 "jsr $185b6.l"): each of the 8 passes on (0185B6 "lea $63476.l, A4", 0185C0
# "bsr $185d2")
0185B6  func  type_text_in_colours
# a pass's next character when its wait runs out (0185DA "subq.b #1, ($8,A4)"): the pass's colour (018606 "lea $1f1a.l,
# A2", 01860C "move.b (A2,D7.w), (A5)+") and the tile (018610 "subi.b #$30, D6"); '/' its next line (0185F4 "cmpi.b
# #$2f, D6", 0185FC "bsr $1863a"), '!' the pass over, one pass fewer (018626 "clr.l ($0,A4)", 018632 "subq.b #1,
# $6342f.l")
0185D2  func  type_colour_pass
# the area's start (006C74 "jsr $1864e.l"): the screen covered (the fixed layer all tile 3A: 01875E "lea $100000.l, A6",
# 01876C "move.b #$3a, (A6)+"), and a box of blank tiles to open from its middle, 20 frames (01864E "move.b #$14,
# $63497.l", 018666 "move.b #$10, $63496.l", 01866E "movea.l $1867e.l, A6"); area0, frames 770-796
01864E  func  start_box_opening
# every frame while it counts (018682 "tst.b $63497.l"): the box's outline (0186AA "bsr $18776"), then 2 tiles wider one
# to the left (0186B4 "addq.b #2, $63494.l", 0186BA "subi.l #$2, $63490.l") and, up to 0x1D, 2 taller one row up
# (0186C4 "cmpi.b #$1d, $63495.l", 0186D6 "subi.l #$80, $63490.l")
018682  func  grow_tile_box
# code no path reaches (no call, jump or table names 018714), after start_wide_box_opening's place (018710), which the
# coverage took for data read on from that place: the wide box's step, grow_tile_box the other way round. Every frame
# while it counts (018714 "tst.b $63497.l"): the box's outline (01873C "bsr $18776"), then 2 tiles narrower and 2
# shorter (018746 "subq.b #2, $63494.l", 01874C "subq.b #2, $63495.l") and its corner one row down and one tile
# right (018752 "addi.l #$82, $63490.l"): from the screen's edges to its middle
018714  func  shrink_tile_box
# the outline of a box of tile D7 in the fixed layer at A6, D5 and D6 its size: its top (01877A "move.b #$0, (A5)+",
# 01877E "move.b D7, (A5)+"), its sides (018794 "move.b #$0, ($0,A6)", 01879E "move.b #$0, (A6,D4.w)") and its bottom
# (0187B0 "move.b #$0, (A6)+")
018776  func  draw_tile_box

comment start_typed_text_at_once a text to type, its first character at once
comment type_next_character the typed text's next character, a new line, or its end
comment draw_hex_digits a number drawn in hexadecimal digits
comment start_text_typed_in_colours a text typed eight times over, each pass in another colour and a little later
comment type_text_in_colours every pass of the coloured text typed on
comment type_colour_pass one pass's next character in its colour
comment start_box_opening the screen covered, and a box to open it from the middle
comment grow_tile_box the box drawn bigger every frame
comment shrink_tile_box Unused: the box drawn smaller every frame, from the screen's edges to its middle
comment draw_tile_box the outline of a box of tiles

# ======== the turtles' reactions and their unused routine (src/unsorted/code_01A876.c) ========
# reaction 24 (01C272's entry 0x18): Shredder's ray (attack 18, damage 0xA03: 04C204 "move.w #$a03, ($a,A0)", 04C210
# "move.b #$98, ($6,A0)"; rendered, states 2A and 2B: the turtle turned into an ordinary small turtle, which walks); on
# its floor (01C5BE "move.b ($32,A0), ($10,A0)"); when the animation ends, over while the player has lives (out of play
# then, its bars gone: 01C5D0 "lea $60100.l, A6", 01C5DE "tst.w (A6,D0.w)", 01C5E6 "move.b #$ff, ($24,A0)"); with none,
# "Shell Shock" above it at 0x30 (01C5EE "cmpi.b #$30, ($33,A0)", 01C61C "jmp
# $30076.l") and it walks off the screen (reaction 25: 01C622 "addq.b #1, ($23,A0)", 01C626 "move.w #$42b, D0"); no
# scenario runs it
01C5BE  func  turtle_hit_by_shredder_ray
# reaction 8: knocked flying from behind, as reaction 7 is from the front (a hit from behind adds 1 to it: 01C4B0 "tst.b
# ($22,A0)", 01C4B8 "addq.b #1, D1"; the knock of the last bar is reaction 7: 01C40A "moveq #$7, D1"); its steps by
# reaction_step (01CAB0 "move.b ($24,A0), D0", 01CAB6 "lea $1cac2.l, A6"); in every game scenario
01CAAE  func  turtle_knocked_flying_from_behind
# step 0: against a wall on the knock's side (01CADA "btst #$0, ($22,A0)", 01CAE6 "btst D0, ($1,A0)") the wall's
# variant, 4 with no bar left, else 1; else on the knock's arc (01CB0A "moveq #$50, D7", 01CB0C "bsr $1d43a") until it
# lands, variant 3 with no bar left, else 0 (01CB34 "move.b #$3, D0", 01CB38 "move.b D0, ($25,A0)")
01CAD2  func  turtle_knocked_flying_from_behind_fly
# step 1: the wall's variants drop to the floor 0x100 a frame (01CBBC "subi.w #$100, ($10,A0)"); the others slide 0x100
# a frame the knock's way within the screen (01CB60 "move.l #$100, D0", 01CB76 "cmpi.l #$16000, ($12,A0)", 01CB8E
# "cmpi.l #$9000, ($12,A0)") while wait_timer counts; the next step when the animation ends
01CB40  func  turtle_knocked_flying_from_behind_slide
# steps 2-3: on its floor (01CBEC "bsr $1c786"); state 0x11 waits wait_timer frames (01CBF0 "cmpi.b #$11, ($5,A0)",
# 01CC04 "subq.b #1, ($26,A0)"), the others their animation
01CBEC  func  turtle_knocked_flying_from_behind_lie
# wait_timer 0x60 (01CC0C "move.b #$60, ($26,A0)"), the next step
01CC0C  func  turtle_knocked_flying_from_behind_wait
# the next step's state from the variant's table (01CC1E "lea $1cc6e.l, A6", 01CC34 "addi.w #$400, D0"); a negative
# entry ends the steps (01CC3E "move.b D0, ($24,A0)"), and the variants not against a wall are pushed 0x1000 the knock's
# way (01CC56 "move.l #$1000, D0")
01CC12  func  turtle_knocked_flying_from_behind_next
# reaction 9: frozen by the freezing nozzle's gas (attack 09: 010B28 "lea $181ae.l, A6"; rendered, state 1C: the turtle
# in a block of ice, 1D the ice bursting): its steps (01CC9E "lea $1ccaa.l, A6"); area8
01CC96  func  turtle_frozen
# step 0: wait_timer 0x60 (01CCBE "move.b #$60, ($26,A0)"), the next step
01CCBA  func  turtle_frozen_start
# step 1: down to the ground 0x300 a frame (01CCD2 "subi.w #$300, ($10,A0)") while wait_timer counts; then the ice
# bursts (01CCEA "move.w #$41d, D0") with sound 2E (01CCF4 "move.b #$2e, D7")
01CCC6  func  turtle_frozen_in_ice
# step 2: when the animation ends (01CCFE "tst.b ($33,A0)"), over with bars left (01CD04 "tst.b ($8,A0)", 01CD0C
# "move.b #$ff, ($24,A0)"); with none it dies, 0x60 frames (01CD18 "move.b #$60, ($26,A0)", 01CD1E "move.w #$411, D0")
01CCFE  func  turtle_frozen_thaw
# step 3: over when wait_timer runs out (01CD28 "subq.b #1, ($26,A0)", 01CD2C "beq $1cd0c")
01CD28  func  turtle_frozen_countdown
# reactions 10 and 11: electrocuted (attack 0A: the electric beams and columns, the shock bars; rendered, state 1E: the
# turtle's skeleton flashing) or blasted (attack 0B, the rock soldier's gun blast; state 1F): its steps (01CD38 "lea
# $1cd44.l, A6"), the last turtle_hit_countdown; area7, area8
01CD30  func  turtle_shocked
# step 0: wait_timer 0x50 (01CD54 "move.b #$50, ($26,A0)"), the next step
01CD50  func  turtle_shocked_start
# step 1: down to the ground 0x200 a frame (01CD68 "subi.w #$200, ($10,A0)") while wait_timer counts; then over with bars
# left (01CD7C "tst.b ($8,A0)", 01CD84 "move.b #$ff, ($24,A0)"), else it dies (01CD96 "move.w #$411, D0")
01CD5C  func  turtle_shocked_drop
# reaction 12: fallen into an open manhole (kind 3F's attack 0C: 04A83C "move.b #$c, ($6,A0)"; rendered, state 20: only
# its shell and weapons out of the hole): its steps (01CDB0 "lea $1cdbc.l, A6"); area1, area2, attract, settings
01CDA8  func  turtle_fall_in_manhole
# step 0: a bar off unless it is the last (01CDC4 "cmpi.b #$1, ($8,A0)", 01CDCE "subq.b #1, ($8,A0)", 01CDD2 "jsr
# $1d416.l"), facing right (01CDDC "andi.b #$bf, (A0)"), put where the hole is (01CDE0 "movea.l ($28,A0), A6", 01CDF4
# "move.l D0, ($12,A0)"), move_timer 0x1A (01CDFC "move.b #$1a, ($1d,A0)")
01CDC4  func  turtle_fall_in_manhole_start
# step 1: after move_timer a speech (BC: 01CE22 "jmp $3009a.l") while the animation runs; when it ends, over, and 16 up
# out of the hole (01CE28 "move.b #$ff, ($24,A0)", 01CE32 "subi.l #$1000, D0")
01CE04  func  turtle_fall_in_manhole_climb_out
# routine 5 (01B714's last entry), which turtle_start_combo starts instead of a combo when has_gun is set (01B7EE "tst.b
# ($45,A0)", 01B802 "move.w #$500, D0"); nothing sets it for a turtle, so no scenario runs it: a single pose of 8 frames
# with the gun firing and no attack box (Leonardo's 021914), the turtle busy (01D512 "subq.b #1, $633ca.l"), only up and
# down of the stick kept (01D520 "andi.b #$c, (A1)"), the attack over when the animation ends (01D518 "tst.b ($33,A0)",
# 01D51C "beq $1bea4")
01D512  func  turtle_fire_gun

# ---- the turtle family's field ----
# set, an unused mode with a gun: standing in state 4 (01B732 "tst.b ($45,A0)", 01B73A "moveq #$4, D0"), walking in
# states 2 and 3 (01B752 "tst.b ($45,A0)", 01B75A "addq.w #2, D0"), landing in state 4 (01BCB6 "tst.b ($45,A0)"), and
# the attack button fires (routine 5) instead of a combo (01B7EE "tst.b ($45,A0)"); rendered, those states of all four
# turtles: the turtle without its weapon, its arm out, a gun by it (Leonardo's 020968, 020A30); nothing writes a
# turtle's +45 (only the enemies' code writes +45, and turtle_init clears the object: 019C9A "move.l D1, (A0)+")
scoped object turtle 45 has_gun u8

comment turtle_hit_by_shredder_ray Shredder's ray turns the turtle into an ordinary turtle; with no lives left it walks off the screen
comment turtle_knocked_flying_from_behind knocked flying from behind: flies, slides, lies, gets up
comment turtle_knocked_flying_from_behind_fly the knock from behind's flight until it lands or meets a wall
comment turtle_knocked_flying_from_behind_slide the turtle slides along the ground, or drops down a wall
comment turtle_knocked_flying_from_behind_lie the turtle lies on its floor
comment turtle_knocked_flying_from_behind_wait the turtle lies a while
comment turtle_knocked_flying_from_behind_next the knock's next step, or its end
comment turtle_frozen frozen in a block of ice until it bursts
comment turtle_frozen_start the turtle frozen for a while
comment turtle_frozen_in_ice the frozen turtle drops to the ground, then the ice bursts
comment turtle_frozen_thaw free of the ice, or dead with no health left
comment turtle_frozen_countdown the turtle dies after a while
comment turtle_shocked electrocuted or blasted until it drops, or dies with no health left
comment turtle_shocked_start the turtle shocked for a while
comment turtle_shocked_drop the shocked turtle drops to the ground, then is free or dies
comment turtle_fall_in_manhole the turtle falls into an open manhole and climbs out
comment turtle_fall_in_manhole_start the turtle loses a bar and drops into the hole
comment turtle_fall_in_manhole_climb_out a speech in the hole, then the turtle climbs out
comment turtle_fire_gun Unused: the turtle fires a gun

# ======== the area exits (02B25C-02D794) ========
# The steps of the cutscenes at the end of an area (run_area_exit by the stage, 0633EA the step, next_area_step on to
# the next one, 0633DE a wait); the turtle_exit_ ones are batch 1's.

# ---- area 1, April's apartment: Shredder takes April ----
# step 0 (02B6FA's table), after the wait the exit's start set (0633DE 0x20): the turtles turn to the door and stand
# (02B75C "cmpi.l #$12c00, ($12,A0)", 02B770 "jsr $1b8c2.l", 02B776 "clr.b ($33,A0)"), Shredder (object 48) at the door
# (02B786 "lea $62f00.l, A0", 02B796 "move.l #$12c00, ($12,A0)", 02B7BC "lea $2d842.l, A6"; rendered: Shredder standing),
# sound FE (02B7C8 "move.b #$fe, D7"), a wait of 0x20 (02B7D2 "move.b #$20, $633de.l"); area1 frames 27610-27650
02B740  func  exit_apartment_shredder_appears
comment exit_apartment_shredder_appears the turtles turn to the door and Shredder appears in it
# step 1: at the end of the wait his sword out (02B7FA "lea $2d84c.l, A6") with sound 72 (02B806 "move.b #$72, D7"); then
# he walks left 3 a frame (02B810 "subi.l #$300, ($12,A0)") until under 0xB0 across (02B822 "cmpi.w #$b0, D0"), where he
# grabs April (02B828 "lea $2d88e.l, A6"), a wait of 0x18; area1 frames 27680-27720
02B7E2  func  exit_apartment_shredder_takes_april
comment exit_apartment_shredder_takes_april Shredder draws his sword, walks to April and grabs her
# step 2: when the grab's animation ends (02B844 "tst.b ($33,A0)") his leap's speed (02B864 "move.w #$380, ($1a,A0)",
# 02B86A "clr.b ($1c,A0)"); until then, at the end of the wait April's object (47) is gone (02B85C "clr.b $62eb0.l"): she
# is in his arms; area1 frame 27740
02B83E  func  exit_apartment_shredder_leaps
comment exit_apartment_shredder_leaps April is in Shredder's arms and he leaps away
# step 3: Shredder bounds to the right with April (02B8F4 "move.w #$178, D1", 02B8FC "jsr $47d98.l", 02B906 "bsr $2c7e6"),
# bobbing up and down by +1A, +1C the bounces (02B90A "tst.b ($1c,A0)", 02B912 "move.w ($1a,A0), D0", 02B916 "add.w D0,
# ($18,A0)", 02B91A "subi.w #$10, ($1a,A0)", 02B928 "subq.b #1, ($1c,A0)"); the turtles go after him (02B962 "move.w #$150, D1", 02B96A "jsr $47d98.l"); past 0x178 he is gone, the
# turtles hidden (02B88A "bclr #$7, ($0,A0)"), the layers' places reset, the screen cleared (02B8DE "jsr $31230.l") and
# the next palettes (02B8E4 "lea $a13e.l, A6"); area1 frames 27760-27820
02B872  func  exit_apartment_shredder_escapes
comment exit_apartment_shredder_escapes Shredder bounds off with April, the turtles after him, and the screen is cleared
# step 4, once the palettes are in (02B986 "tst.b $60083.l"): the picture of the kidnapping: both layers' tiles in order
# (02B996 "lea $104008.l, A0", 02B99C "moveq #$34, D0"; 02B9CC "lea $102418.l, A0", 02B9D2 "moveq #$b, D0"), a small
# turtle for each player in play (02BA0C "lea $2ba9a.l, A5", 02BA18 "lea $62000.l, A1", 02BA1E "btst #$0, (A1)"),
# Shredder carrying April off (02BA78 "lea $2dc36.l, A6"), sound 40 (02BA84 "move.b #$40, D7"), 0x108 frames
# (02BA8E "move.w #$108, $633de.l"); area1 frames 27850-28080
02B986  func  exit_apartment_kidnap_picture
comment exit_apartment_kidnap_picture the picture of Shredder carrying April off with the turtles leaping after him
# step 5: the picture's wait (02BAAA "subq.w #1, $633de.l"), Shredder's speech A7 at 0xF0 (02BAB4 "cmpi.w #$f0,
# $633de.l", 02BAC0 "move.b #$a7, D7"; the speech enemy_shredder_appear plays), then the exit over (02BB02 "clr.b $633c8.l")
02BAAA  func  exit_apartment_picture_wait
comment exit_apartment_picture_wait the picture stays a while with Shredder's speech, then the exit is over

# ---- area 3, the sewer: the villains' picture ----
# step 1, once the palettes are in (02BDD4 "tst.b $60083.l"): layer B and layer A drawn whole from their maps (02BDEC
# "move.l #$314c4, $63312.l", 02BE0E "jsr $1e11e.l", 02BE14 "move.l #$3163c, $63312.l"): Shredder, Bebop and Rocksteady;
# April tied up in the middle (02BE34 "lea $62dc0.l, A0", 02BE50 "lea $2e162.l, A6"), 0x130 frames (02BE5C "move.w #$130,
# $633de.l"); area3 (cycles timing) frames 32660-32940
02BDD4  func  exit_sewer_villains_picture
comment exit_sewer_villains_picture the picture of Shredder, Bebop and Rocksteady with April tied up
# step 2: at 0x110 Rocksteady's mouth (02BEA8 "lea $62e10.l, A0", 02BEC4 "lea $2e192.l, A6") and his wide balloon
# "Come and get 'em, shell-brain" (02BED2 "move.w #$110, D1", 02BEDA "jmp $30112.l": 030114 "moveq #$78, D3", speech C2);
# at 0xA0 his mouth still (02BEA0 "clr.b $62e10.l"), Shredder's speech at 0x80 (02BE96 "move.b #$a7, D7"), then the exit
# over (02BEE0 "clr.b $633c8.l"); area3 frames 32680-32760
02BE68  func  exit_sewer_villains_taunt
comment exit_sewer_villains_taunt Rocksteady taunts the turtles, Shredder speaks, then the exit is over

# ---- area 4, the street of the parked cars: the Turtle Van and April's thanks ----
# step 1: the van's door (object 41) slides shut (02C30A "lea $62c80.l, A0", 02C314 "cmp.l ($12,A0), D0", 02C31C
# "addi.l #$300, ($62,A0)"); a turtle says "Let's move it" at 0x60 (02C2EE "cmpi.b #$60, $633df.l", 02C304 "jsr
# $2ffee.l"); the engine (02C33E "move.b #$2d, D7" every 32 frames) and the van rocking every other frame (02C35C "lea
# $2c3ba.l, A6", 02C382 "add.l D1, ($12,A0)"); at the end sounds 3A and 6E (02C2D0 "move.b #$3a, D7"); ex4b.txt frames
# 1845-1995
02C2C6  func  exit_car_street_van_start_up
comment exit_car_street_van_start_up the turtles are in the van: its door shuts, "Let's move it", the engine runs
# step 2: the van drives off to the right 6 a frame (02C3E4 "addi.l #$600, D0", 02C3EA "andi.l #$1ffff, D0") round to
# 0x59-0x5F across (02C402 "cmpi.w #$59, D0"), then the screen cleared (02C434 "jsr $31230.l") and the next palettes
# (02C43A "lea $a11e.l, A6"); ex4b.txt frames 2010-2030
02C3DA  func  exit_car_street_van_drives_off
comment exit_car_street_van_drives_off the van drives off and the screen is cleared
# step 3, once the palettes are in: the picture of April hugging a turtle: both layers from their maps (02C458 "move.l
# #$46c52, $63312.l", 02C490 "move.l #$46622, $63312.l"); the turtle hugged is the player in play with the highest score
# (02C538 "lea $60104.l, A4", 02C554 "move.w (A5), D0", 02C556 "cmp.w (A4), D0": the BCD number of the player's panel,
# 001FEA "lea $60104.l, A6"; the later one on a tie), in its colour (02C4EE "move.l #$8090a0b, (A1)", 02C5D8 "move.b D0,
# ($42,A0)") on objects 12-15 (02C58C "lea $2c640.l, A5"); the others in play behind her (02C5EC "lea $2c650.l, A2");
# ex4b.txt frames 2035-2075 (Raphael with four players at 0)
02C44E  func  exit_car_street_april_hug_start
comment exit_car_street_april_hug_start the picture of April hugging the turtle of the player with the best score
# step 4: her "I owe you one" at 0xD0 (02C780 "moveq #$7f, D0", 02C78A "jmp $3003c.l": record 0x37, speech C3), the
# picture changed at 0xB0 (02C790 "lea $102628.l, A0", 02C7DC "move.b #$21, $1027a9.l"), at 0x90 (02C74E "move.l #$46722,
# $63312.l", 02C776 "move.b #$81, $62410.l") and at 0x50 (02C6E6 "move.l #$46622, $63312.l"), the heart from 0x70 (02C742
# "lea $624b0.l, A0") floating (02C6DE "addq.w #1, $624be.l") and gone at 0x30 (02C6D6 "clr.b $624b0.l"), then the exit
# over (02C666 "clr.b $633c8.l"). It does nothing in stage 5 (02C67A "cmpi.b #$5, $60121.l"), which never runs it;
# ex4b.txt frames 2100-2285
02C65C  func  exit_car_street_april_hug
comment exit_car_street_april_hug April thanks the turtle and a heart floats up, then the exit is over

# ---- area 6, the skateboard ride: the van crashes ----
# stage 6's start of the exit (turtle_start_area_exit's table): two sprite palettes (02B4E2 "move.w #$43b, D7", 02B4E6
# "lea $c824.l, A6", 02B4F2 "move.w #$43c, D7": kind 4, bank 3, palettes 11 and 12), and the road kept round (02B502 "bra
# $2cda2"); area6 frame 8850
02B4E2  func  exit_skateboard_start
comment exit_skateboard_start the ride's exit starts: the van's colours and the road going round
# the road (layer A in the working copy) back 0x20000 or more when it passes 0xA0000 (02CDA8 "cmpi.l #$a0000,
# $63300.l", 02CDB4 "andi.l #$80fff, $63300.l"), and auto_scroll's column count restarted (02CDA2 "clr.w $63308.l":
# auto_scroll draws a new column when it carries, 01AD36 "add.w D1, $63308.l", 01AD3C "bcc $1ad4c")
02CDA2  func  exit_skateboard_road_round
comment exit_skateboard_road_round the road goes round instead of running out of tiles
# step 2: the van's door (object 41) slides shut (02CB84 "lea $62c80.l, A0", 02CB96 "addi.l #$300, ($62,A0)") with sound
# 6E (02CBC2 "move.b #$6e, D7"); with the road between 0x8A200 and 0x8A800 (02CBCC "cmpi.l #$8a200, $63300.l") its
# column phase (02CBF4 "move.w D0, $63308.l") and the next step; area6 frames 9150-9175
02CB80  func  exit_skateboard_van_door
comment exit_skateboard_van_door the turtles are in the van and its door shuts
# step 3: "Hang on, guys" when no balloon was said yet (02CC0C "tst.b $61106.l", 02CC20 "jmp $30044.l": record 0x3C,
# speech B5), sound 3C from 0xA4000 (02CC42 "move.b #$3c, D7"), past 0xA8000 the van gone (02CC5A "clr.b $62c80.l"), the
# screen cleared (02CC86 "jsr $31230.l") and the next palettes (02CC8C "lea $a14e.l, A6"); area6 frames 9180-9254
02CBFE  func  exit_skateboard_van_drives
comment exit_skateboard_van_drives the van speeds round the curve, "Hang on, guys", and the screen is cleared
# step 4, once the palettes are in: the picture of the van crashing through the road's wall: both layers' tiles in order
# (02CCAA "lea $104008.l, A0", 02CCE6 "lea $102220.l, A0"), a leaping turtle for each player in play (02CD0C "lea
# $2cd74.l, A5", 02CD1E "btst #$0, (A1)"), sound 1A (02CD5E "move.b #$1a, D7"), 0xA0 frames (02CD68 "move.b #$a0,
# $633de.l"); area6 frames 9262-9418
02CCA0  func  exit_skateboard_crash_picture
comment exit_skateboard_crash_picture the picture of the van crashing through the road's wall, the turtles leaping out

# ---- area 7, the building site: Splinter freed ----
# step 0: Splinter, tied up, let down (02CEB6 "lea $62dc0.l, A0", 02CEBC "subi.w #$100, ($10,A0)"; object 44 started
# with 02DB0A by turtle_exit_building_site_start; rendered: Splinter tied to a rope), another animation at 0x2000 (02CEEE
# "lea $2db1e.l, A6"), down (02CEDE "lea $2db28.l, A6"), a wait of 0x80 (02CED2 "move.b #$80, $633de.l")
02CEB6  func  exit_building_site_free_splinter
comment exit_building_site_free_splinter Splinter, tied up, is let down to the turtles
# step 3, once the palettes are in: layer B from its map (02D0C8 "move.l #$31280, $63312.l", 02D0EA "jsr $1e11e.l"):
# Splinter, and his balloon's 8 rows of 16 tiles (02D0F0 "lea $104208.l, A0", 02D0F6 "lea $2d164.l, A1"): "THANK YOU MY
# TURTLES!"; 0xB0 frames (02D158 "move.b #$b0, $633de.l"); ex7.txt frames 2025-2195
02D0AE  func  exit_building_site_splinter_picture
comment exit_building_site_splinter_picture the picture of Splinter thanking his turtles
# step 4: his speech B4 and his mouth moving from 0x80 (02D20E "move.b #$b4, D7", 02D238 "lea $2dee6.l, A6") to 0x30
# (02D206 "clr.b $62dc0.l"), then the screen cleared (02D244 "jsr $31230.l") and the next palettes (02D24A "lea $a15e.l,
# A6"); ex7.txt frames 2030-2200
02D1E4  func  exit_building_site_splinter_thanks
comment exit_building_site_splinter_thanks Splinter speaks his thanks, then the screen is cleared

# ---- area 9, the end ----
# step 1: the screen goes on shaking every other frame (02D75C "lea $30652.l, A6", 02D76C "add.w D1, $60060.l", 02D772
# "add.b D2, $60063.l"), then the exit over (02D778 "subq.b #1, $633de.l", 02D782 "clr.b $633c8.l"); the ending follows
# (ex9.txt frames 1680-1810)
02D73C  func  exit_final_shake
comment exit_final_shake the screen shakes on a while, then the exit is over and the ending follows

# ---- the Technodrome's screen ----
# layer B and layer A drawn whole from their maps (02FF54 "move.l #$458f8, $63312.l", 02FF8A "jsr $1e11e.l", 02FFA0
# "move.l #$45d4a, $63312.l", 02FFCE "jmp $1e11e.l") with their tile banks (02FF44 "move.b #$c0, $106b00.l", 02FF90
# "move.b #$2c, $106e00.l"): the Technodrome in its cave; area 7's exit drops the turtles in by it (ex7.txt frame 2215)
# and the ending blows it up (006C7A "jsr $2ff44.l"; ex9.txt frames 1900-2300)
02FF44  func  draw_technodrome_screen
comment draw_technodrome_screen the screen of the Technodrome in its cave

# ---- the layers cleared ----
# the fixed layer, layer A and layer B (0x1000 bytes each) all tile 10, the blank, colour 0 (031230 "lea $100000.l, A0",
# 031236 "lea $102000.l, A1", 03123C "lea $104000.l, A2", 031244 "moveq #$10, D1"): between the scenes' screens
031230  func  clear_layers
comment clear_layers the three tile layers cleared to blank between two screens

# ======== the scroll held while the screen is full (02F5F0-02F78F) ========
# every frame of play (006920 "jsr $2f5f0.l"): the time since the last knock-out (02F5F0 "addq.w #1, $60150.l"; a
# knock-out restarts it: 01C25E; batch 4 renamed it from update_play_time, which it is not) and every 0x2000 frames a
# level more of difficulty (02F5F6 "move.b $60150.l, D0", 02F5FC "lsr.b #5, D0", 02F5FE "move.b D0, $6111e.l", which
# 006A7A adds to 060130), the balloon erased when its time runs out (02F60E "subq.b #1, $633fc.l", 02F618 "jsr
# $3030c.l"), then hold_scroll_for_enemies
02F5F0  func  update_time_without_knockout
comment update_time_without_knockout every frame of play: the time without a knock-out, the difficulty it adds, the balloon's time
# the stage's limit of enemies by the difficulty (02F62A "lea $2f67c.l, A6", 02F632 "move.b $60130.l, D0": 8 a stage,
# 2 to 9) for the stage's own check (02F646 "lea $2f654.l, A6"); each holds the scroll to the right (02F6EC "move.b D0,
# $633c3.l": turtle_move's right side tests it, 01AFE0 "tst.b $633c3.l") while more enemies are on the screen (02F6CC
# "cmp.b $6120c.l, D1")
02F61E  func  hold_scroll_for_enemies
# stage 0: also while 0633F5 is set (02F6D6 "tst.b $633f5.l")
02F6CC  func  hold_scroll_building
# stage 1 (the second of 02F654's table): 02F6F4 "cmp.b $6120c.l, D1", 02F6FC "subq.b #1, D0"
02F6F4  func  hold_scroll_apartment
# stage 2: the scroll down held too (02F6E6 "move.b D0, $633c5.l": the stick-down side tests it, 01B3A4 "tst.b $633c5.l")
02F700  func  hold_scroll_street
# stage 3: 02F70C "cmp.b $6120c.l, D1", 02F714 "subq.b #1, D0"
02F70C  func  hold_scroll_sewer
# stage 4: 02F718 "cmp.b $6120c.l, D1", 02F720 "subq.b #1, D0"
02F718  func  hold_scroll_car_street
# stage 5: 02F724 "cmp.b $6120c.l, D1", 02F72C "subq.b #1, D0"
02F724  func  hold_scroll_highway
# stage 6: never held: the comparison's result is not stored (02F730 "cmp.b $6120c.l, D1", 02F736 "rts")
02F730  func  hold_scroll_skateboard
# stage 7: left alone while the drill's arrival holds it (02F738 "tst.b $633fe.l", 02F742 "bmi $2f748")
02F738  func  hold_scroll_building_site
# stage 8: always held while layer B is between 0x58000 and 0xB8000 (02F754 "cmpi.l #$b8000, $63380.l", 02F762 "cmpi.l
# #$58000, $63380.l")
02F754  func  hold_scroll_technodrome
# stage 9: 02F780 "cmp.b $6120c.l, D1", 02F78A "subq.b #1, D0"
02F780  func  hold_scroll_final

comment hold_scroll_for_enemies the scroll is held while more enemies are on the screen than the stage allows at this difficulty
comment hold_scroll_building the burning building's scroll held while the screen has too many enemies
comment hold_scroll_apartment the apartment's scroll held while the screen has too many enemies
comment hold_scroll_street the street's scroll held, right and down, while the screen has too many enemies
comment hold_scroll_sewer the sewer's scroll held while the screen has too many enemies
comment hold_scroll_car_street the parked cars' street's scroll held while the screen has too many enemies
comment hold_scroll_highway the highway's scroll held while the screen has too many enemies
comment hold_scroll_skateboard the skateboard ride is never held
comment hold_scroll_building_site the building site's scroll held while the screen has too many enemies, unless the drill is arriving
comment hold_scroll_technodrome the Technodrome's scroll held on its middle stretch, and while the screen has too many enemies
comment hold_scroll_final the last area's scroll held while the screen has too many enemies

# ======== the opening (02F790-02FE45: the attract mode's game step 2) ========
# The city at night: the view sweeps from the skyline down to a street, a manhole cover blows off, the four turtles leap
# out, and their four pictures slide in from the corners (attract frames 30-750)

# its first screen (008DDC "jsr $2f790.l"): the steps and the wait (02F796 "move.l #$e0000000, $633de.l", 02F7A0 "clr.b
# $633ea.l"), both layers' maps and places (02F7A6 "move.l #$3f196, $63352.l", 02F7E2 "move.l #$60000, $63344.l"), drawn
# whole (02F82C "jsr $1e11e.l", 02F844 "jsr $1e11e.l"), two clouds (02F88E "lea $2dadc.l, A6", 02F89E "lea $2dad2.l, A6";
# rendered: two long clouds) at the moon
02F790  func  start_opening
comment start_opening the opening's city at night and two clouds by the moon
# every frame (008E1E "jsr $2f8aa.l"): its step by 0633EA (02F8AC "move.b $633ea.l, D0", 02F8B4 "lea $2f8c6.l, A6"), then
# the layers' scroll (02F8C0 "jmp $1ecaa.l")
02F8AA  func  run_opening
comment run_opening every frame of the opening: its step, then the layers' scroll
# the next step (02F9EA "addq.b #1, $633ea.l")
02F9EA  func  next_opening_step
comment next_opening_step the opening's next step
# step 0: the city's palettes fade in (02F8F4 "lea $a0ae.l, A5", 02F8FA "move.w #$c02, D6", 02F904 "jsr $961c.l"), the
# clouds drift apart every 4 frames (02F91E "addq.w #1, ($c,A0)", 02F922 "subq.w #1, ($5c,A0)"), sound 7D 0x30 frames
# before the end of the wait (02F930 "cmpi.b #$30, $633de.l", 02F93C "move.b #$7d, D7"); frames 30-260
02F8EA  func  opening_city_fade_in
comment opening_city_fade_in the city fades in and the clouds drift apart across the moon
# step 1: the clouds go down off the screen (02F968 "addq.w #2, ($e,A0)", 02F97A "clr.b (A0)"), layer B sweeps on at 0x200
# (02F986 "move.w #$200, $6330e.l", 02F998 "jsr $2fe46.l") and layer A faster every frame (02F9AA "addi.w #$40,
# $6330e.l") until it is under 0x30000 (02F9DC "cmpi.l #$30000, $63344.l"); frames 260-340
02F946  func  opening_sweep
comment opening_sweep the clouds leave and the view starts sweeping down the city
# step 2: layer A faster still (02F9F8 "addi.w #$20, $6330e.l"), round three times (02FA2C "cmpi.l #$20000, $63304.l",
# 02FA52 "addq.b #1, $633df.l", 02FA5E "cmpi.b #$3, $633df.l"): the rush past the buildings; frames 340-390
02F9F2  func  opening_sweep_fast
comment opening_sweep_fast the view rushes down past the buildings
# step 3: layer A slows to 0x800 (02FA8E "subi.w #$60, $6330e.l"); under 0x14000 the manhole comes into view with it
# (02FAC0 "cmpi.l #$14000, $63304.l", 02FAF8 "lea $2da30.l, A6", 02FB2E "lea $2da26.l, A6"; rendered: the street round the
# hole, and the cover); at 0x10000 a wait of 0x30 (02FB48 "move.b #$30, $633de.l"); frames 390-420
02FA7A  func  opening_sweep_to_street
comment opening_sweep_to_street the view slows down onto the street with the manhole
# step 4: after the wait a glow (02FB68 "lea $621e0.l, A0", 02FB80 "lea $2dab8.l, A6"), the four turtles (objects 2-5,
# 02FB94 "move.b D0, ($2,A0)": kinds 0-3) at the manhole, each with its speed across (02FB9C "lea $2fbe0.l, A6", 02FBA2
# "move.w (A6,D1.w), ($1c,A0)": -4, 4, -12, 12), a wait of 0x40 (02FB60 "move.b #$40, $633de.l"); frames 420-470
02FB54  func  opening_turtles_ready
comment opening_turtles_ready the four turtles wait under the manhole
# step 5: at 0x20 a beam of light (02FC0E "lea $62230.l, A0", 02FC26 "lea $2da3a.l, A6") and the cover blows off (02FC32
# "move.w #$1000, $62060.l", 02FD14 "addi.w #$1000, ($10,A0)"), flashes of the fixed layer at 0x1C, 0x1A, 0x10, 0xE
# (02FCE8 "lea $100118.l, A0", 02FCB2 "moveq #$3c, D1"); at the end the turtles leap out (02FC4C "move.w #$204, D0", 02FC50
# "jsr $1b8c2.l") rising and flying apart (02FC68 "addi.w #$240, ($10,A0)", 02FC72 "add.w D0, ($1a,A0)"), until the first
# is under 0xE0 across (02FCA0 "cmpi.w #$e0, $620ac.l"); frames 470-600
02FBE8  func  opening_turtles_leap_out
comment opening_turtles_leap_out the manhole cover blows off in a flash of light and the turtles leap out
# step 6: both layers cleared (02FD40 "move.b D0, (A1)+", 02FD48 "cmpa.l #$105000, A1"), the objects off, the four
# turtles' pictures (objects 0-3) at the corners (02FD7C "lea $2fdc0.l, A5", 02FDA8 "movea.l (A5)+, A6"); frame 610
02FD30  func  opening_portraits_start
comment opening_portraits_start the screen cleared and the four turtles' pictures at its corners
# step 7: the pictures slide in diagonally 4 a frame (02FDFC "add.l D0, ($12,A0)", 02FE0C "sub.l D0, ($16,A0)") until in
# place (02FE3C "cmpi.w #$100, D0"); frames 610-630
02FDF0  func  opening_portraits_slide_in
comment opening_portraits_slide_in the four pictures slide in from the corners
# step 8: nothing (02FE44 "rts"): the pictures stay until the game step's time runs out (008E12 "subi.b #$1, $600a8.l");
# frames 630-750
02FE44  func  opening_hold
comment opening_hold the four pictures stay on the screen
# the working layer moved on by its speed (02FE46 "move.w $6330e.l, D0", 02FE56 "sub.l D0, $63304.l") down to 0x10000
# at most (02FE6A "move.l #$10000, $63304.l"), and each time it passes half a row of blocks (02FE76 "sub.w D1,
# $6330a.l") its two new rows of tiles drawn from the map, 12 blocks across (02FEB8 "add.l $63312.l, D3", 02FECC "moveq
# #$b, D7"), into the tile RAM at 0633CC (02FE9E "add.l $633cc.l, D0")
02FE46  func  opening_scroll_layer
comment opening_scroll_layer the opening's layer sweeps on by its speed and its new rows are drawn

# ======== the speech balloons (02FFDA-03034F, with 02FFFE-03015C of batch 2) ========
# the narrow balloon's pointer (03019A on: tiles EE EF FE FF into its bottom row, 0301BE "move.b #$ee, ($189,A6)") when
# it is on the left of the speaker (02FFDA "tst.b $61113.l", 02FFE0 "beq $3019a"); every say_ of 8 tiles ends here
02FFDA  func  draw_balloon_pointer
comment draw_balloon_pointer the pointer of a narrow balloon on the left of its speaker
# 02FFE6 "moveq #$5, D3": "We gotta save Splinter" (speech AA); a turtle's in area 7 as it lands, once (01A09C "cmpi.b
# #$7, $60121.l", 01A0A8 "tst.b $61106.l", 01A0BC "jsr $2ffe6.l"); area7 frame 1070
02FFE6  func  say_we_gotta_save_splinter
comment say_we_gotta_save_splinter the balloon and speech "We gotta save Splinter"
# 02FFEE "moveq #$a, D3": "Let's move it" (speech AB); in the van at the end of area 4 (02C304 "jsr $2ffee.l"); ex4b.txt
# frame 1920
02FFEE  func  say_lets_move_it
comment say_lets_move_it the balloon and speech "Let's move it"
# an 8-wide balloon 0x20 to the side of the speaker that D0 says (0301D8 "move.b D0, $61113.l", 0301E2 "subi.w #$20, D1",
# 0301EA "addi.w #$20, D1"), its text from tile bank 2 (0301EE "moveq #$20, D4")
0301D8  func  show_balloon_beside
comment show_balloon_beside a narrow balloon to one side of the speaker
# in a game only (0301F0 "tst.b $600a3.l"): the balloon on the screen first erased (0301FA "tst.b $633fc.l", 03021C "jsr
# $3030c.l"); the text's tile bank (03024C "move.b D5, $106e00.l"), one more balloon said and the frames since cleared
# (030252 "addq.b #1, $61106.l", 030258 "clr.w $61104.l"); the record D3 of 030350 (030260 "lea $30350.l, A6"): its
# speech played (03027E "jsr $91a4.l"), its time (030272 "move.b ($4,A6,D3.w), $633fc.l"), its place in the fixed layer by
# D1, D2 kept (0302EA "move.l D1, $633f8.l"), its four rows drawn
0301F0  func  show_balloon
comment show_balloon a speech balloon on the screen by the speaker, with its speech and the time it stays
# the balloon at 0633F8 erased: 16 columns of its four rows blank (03030C "movea.l $633f8.l, A6", 030312 "moveq #-$1, D0",
# 030318 "moveq #$10, D3")
03030C  func  erase_balloon
comment erase_balloon the speech balloon erased
# D7 + 1 columns of the four rows: the colour to the even bytes, a tile for each row to the odd ones (030320 "move.b D2,
# ($80,A6)", 03032E "move.b D4, ($80,A6)", 03033A "move.b D3, (A6)+"), each one on a column unless D0 is negative
# (03033C "tst.b D0", 030342 "addq.b #1, D3")
030320  func  draw_balloon_rows
comment draw_balloon_rows the four rows of a balloon's tiles drawn across

# ======== the drill's arrival (0303CE-0308D5) ========
# Areas 1 and 7: at a place of the scroll the screen shakes, a drill pod comes down through the ceiling and opens:
# Rocksteady comes out of it in area 1, the flying drones in area 7 (area1 frames 6640-7350: 2D7BA rendered the hole and
# its rubble, 2D796 the pod with its drill, 2D836 its door)

# by 0633FF's step (0303E0 "move.b $633ff.l, D0", 0303D8 "lea $303ee.l, A6"), until it is over (0303CE "tst.b $633fe.l",
# 0303D4 "bmi $30650"); from stage 1's and stage 7's layers (01EE34 "jsr $303ce.l", 01F3BA "jmp $303ce.l")
0303CE  func  run_drill_arrival
comment run_drill_arrival the drill pod's arrival in areas 1 and 7, a step a frame
# step 0: when layer B passes its place (03040E "cmpi.l #$a000, $63380.l", 03041E "cmpi.l #$4b000, $63380.l"): the scroll
# to the right held (030438 "move.b #$ff, $633c3.l"), the shake's 0xC0 frames (030440 "move.w #$c000, $6110e.l"), sounds
# FE and 34 (030448 "move.b #$fe, D7", 030452 "move.b #$34, D7"); area1 frame 6650
030402  func  drill_arrival_wait
comment drill_arrival_wait at its place in the area the scroll stops and the rumbling starts
# step 1: the screen shakes (03046E "subq.b #1, $6110e.l", 030474 "beq $30568", else on into 030478); at the end sound 0C
# (030568 "move.b #$c, D7"), the hole, the pod and its door (objects 44-46: 030572 "lea $62dc0.l, A0", 03057C "move.b D0,
# ($0,A0)") at their place by layer B (03059C "move.l #$1d6ff, D0", 0305BA "sub.l $63380.l, D0"); area1 frames 6650-6850
030468  func  drill_arrival_rumble
comment drill_arrival_rumble the screen shakes, then the hole, the drill pod and its door appear
# every other frame (030478 "move.b $600a5.l, D0", 03047E "andi.b #$1, D0") both layers moved by the next of 8 offsets
# (030498 "lea $30652.l, A6", 0304A8 "add.w D1, $6005c.l", 0304AE "add.w D1, $60060.l") and the turtles and the pod's
# three objects moved back the same (0304C0 "neg.w D1", 0304DC "add.l D1, ($12,A0)"), so they keep their place
030478  func  shake_layers_and_objects
comment shake_layers_and_objects the layers shake and the turtles and the drill pod stay where they are
# step 2: the shake; the pod and its door come down 0xC0 a frame (03066C "lea $62e10.l, A0", 030684 "addi.l #$c0,
# ($16,A0)"); in area 7 the first turtle in play says "Oh no, it's that overgrown cork-screw again" when it is down to 0x9E
# and only one balloon was said (030696 "cmpi.b #$7, $60121.l", 0306AC "cmpi.b #$1, $61106.l", 0306E4 "jsr $30106.l");
# past 0x124 (0x144 in area 7) its drill stops (0306EA "move.w #$124, D0", 030706 "clr.b ($33,A0)"); area1 frames 6850-7100
030662  func  drill_arrival_descend
comment drill_arrival_descend the drill pod drills down through the ceiling into the room
# step 3: the shake down to 0x30 (0307DA "bsr $30478"); at 0x30 sound 35, area 7's music 66 (030738 "move.b #$35, D7",
# 03074E "move.b #$66, D7", 030752 "move.b D7, $60080.l"), the pod's pieces placed again; at the end of the wait the flying
# drones wait in area 7 (0307F4 "jsr $133fe.l": start_flying_drones) and sound 36 (0307FA "move.b #$36, D7"); then the door
# slides up (030804 "lea $62e60.l, A0", 03080A "subi.l #$200, ($16,A0)"): Rocksteady comes out in area 1 (03081E "cmpi.l
# #$11300, ($16,A0)", 03082A "jsr $4f6e6.l": start_rocksteady), and when it is open the drones come out in area 7
# (030860 "jsr $1349e.l": release_flying_drones); area1 frames 7100-7300
030716  func  drill_arrival_open
comment drill_arrival_open the drill pod's door opens and Rocksteady or the flying drones come out
# step 4: the scroll free again (030870 "clr.b $633c3.l"), the arrival over (030876 "move.b #$ff, $633fe.l"), its three
# objects off (030886 "move.b D0, ($0,A0)"), the pod left in the layer as two tile blocks (030894 "lea $18aec.l, A6",
# 0308A8 "lea $18f16.l, A6", 0308AE "jsr $183fa.l"); area1 frame 7300
03086A  func  drill_arrival_end
comment drill_arrival_end the drill pod stays as part of the room and the scroll goes on

# ======== the story before area 0 (0308D6-03122F) ========
# Only in a game that starts in area 0 (0063AC "cmpi.b #$0, $60120.l", 0063B8 "tst.b $600a3.l"): on a rooftop Splinter
# and the turtles see the burning building, "Fire!!", the turtles leap off, "Hang on, April", they climb a building and
# drop onto the burning roof (story_b.txt frames 780-1460; one_player cuts it short with the jump button at 965)

# its start (00640A "jsr $308d6.l"): the time played and its level cleared (0308D8 "move.w D0, $60150.l", 0308DE "move.b
# D0, $6111e.l"), its steps, the balloons, the layers' places (030908 "move.l #$800, $63300.l"), the screen covered to open
# from its middle (03094A "jsr $1864e.l": start_box_opening), the palettes (030950 "lea $a0ee.l, A6")
0308D6  func  start_intro
comment start_intro the story before the first area starts
# every frame (006472 "jsr $30960.l"): the balloon's time (030960 "tst.b $633fc.l", 030974 "jsr $3030c.l"), the step by
# 0633EA (030984 "lea $30996.l, A6"), the layers' scroll (030990 "jmp $1ecaa.l"); 061108 says it is over (006416 "tst.b
# $61108.l")
030960  func  run_intro
comment run_intro every frame of the story: its balloon, its step, the layers' scroll
# step 0, once the palettes are in (0309AE "tst.b $60083.l"): the rooftop and the burning building: layer B's tiles in
# order (0309C0 "lea $104008.l, A0", 0309C6 "moveq #$24, D0") and their colours in squares (0309EE "bsr $30bc6", 030A12
# "bsr $30bd0", 030A2A "bsr $30bda"); Splinter (030A72 "lea $62dc0.l, A0", 030A92 "lea $2db4c.l, A6"; rendered: Splinter
# with his staff), the four turtles waiting (030A9E "lea $62e10.l, A0", 030AA4 "lea $30b16.l, A5"), each its delay
# (030AD0 "move.b D0, ($1d,A0)", 030ADC "addi.b #$14, D0") and its leap's speed (030AC6 "move.w #$500, ($1a,A0)"); 10 rows
# of 16 tiles of layer A from 030B26 (030AF0 "lea $102b28.l, A0", 030AF6 "lea $30b26.l, A6"); story_b.txt frame 800
0309AE  func  intro_rooftop_start
comment intro_rooftop_start the rooftop picture with Splinter and the four turtles by the burning building
# the colour D0 into 8 x 8 tiles from A0 (030BC6 "moveq #$70, D4", 030BC8 "moveq #$7, D7", 030BE2 "move.b D0, (A0)")
030BC6  func  colour_tiles_8x8
# the same into 4 x 4 tiles (030BD0 "moveq #$78, D4", 030BD2 "moveq #$3, D7")
030BD0  func  colour_tiles_4x4
# the same into 4 rows of 8 tiles (030BDA "moveq #$70, D4", 030BDC "moveq #$3, D7", 030BDE "moveq #$7, D5")
030BDA  func  colour_tiles_8x4
comment colour_tiles_8x8 a square of 8 by 8 tiles given one colour
comment colour_tiles_4x4 a square of 4 by 4 tiles given one colour
comment colour_tiles_8x4 four rows of eight tiles given one colour
# step 1: the box opens (030BF4 "jsr $18682.l"), the fire's smoke (030BFA "jsr $3101c.l"); each turtle after its delay
# (030C20 "subq.b #1, ($1d,A0)") leaps (030C28 "movea.l (A5), A6" from 030D7E) up and across in bounces (030C7A
# "addi.w #$100, ($10,A0)", 030C88 "addq.w #1, ($c,A0)", 030C90 "subi.w #$20, ($1a,A0)"), the last one behind the building
# (030C60 "cmpi.w #$360, ($1a,A0)", 030C6A "move.b #$4, $c0001.l"); "Fire!!" at 0xD0 (030D34 "move.w #$108, D1", 030D3C
# "jmp $3004c.l": record 0x41, speech B6), sound 7D at 0x90 (030D28 "move.b #$7d, D7"), "Hang on, April" at 0x70 (030D1A
# "move.w #$a8, D1", 030D22 "jmp $2ffd4.l": record 0, speech A9); when they are gone the next box and palettes (030D42
# "jsr $1864e.l", 030D66 "lea $a0fe.l, A6"); story_b.txt frames 800-1060
030BF4  func  intro_rooftop
comment intro_rooftop "Fire!!": the turtles leap off the rooftop one after another, "Hang on, April"
# step 2, once the palettes are in: a tall building seen from below: layer B's tiles in order (030D96 "lea $104008.l,
# A0", 030D9C "moveq #$14, D0"), the four turtles at its foot from intro_object_animations (030DC2 "lea $30dfc.l, A5",
# 030DDE "move.w #$b8, ($e,A0)"); story_b.txt frame 1065
030D8E  func  intro_climb_start
comment intro_climb_start the picture of a tall building seen from below with the turtles at its foot
# step 3: each turtle, when its animation holds (030E20 "tst.b ($33,A0)"), goes up 8 a frame and across by its step
# (030E30 "subi.w #$8, ($e,A0)", 030E36 "move.w ($1c,A0), D0", 030E3A "add.w D0, ($c,A0)"), gone under 0x80 (030E3E
# "cmpi.w #$80, ($e,A0)"); when the last is gone the next box and palettes (030E62 "jsr $1864e.l", 030E7A "lea $a10e.l,
# A6"); story_b.txt frames 1090-1260
030E14  func  intro_climb
comment intro_climb the turtles leap up the building out of sight
# step 4, once the palettes are in: the burning roof: layer B from its map (030EA8 "move.l #$4618c, $63312.l", 030ECA
# "jsr $1e11e.l"), the fire's palette effects (030ED0 "lea $9c08.l, A0", 030ED6 "jsr $9b12.l"), the four turtles high up
# (030EF2 "move.w #$b000, ($10,A0)") one behind the other (030F20 "subi.w #$c, D5", 030F24 "addi.b #$10, D6"), falling
# (030F14 "move.w #$203, D0"); story_b.txt frame 1275
030E8E  func  intro_roof_start
comment intro_roof_start the burning roof with the four turtles dropping onto it
# step 5: the box, the fire (030F38 "jsr $18682.l", 030F3E "jsr $3101c.l"); each turtle comes down 6 a frame moving on 3
# (030F90 "addq.w #3, ($c,A0)", 030FA4 "subi.w #$600, ($10,A0)") and lands crouching (030FC2 "move.w #$200, D0"), but
# Michelangelo (kind 1) falls over (030FB2 "cmpi.b #$1, ($2,A0)", 030FD6 "lea $2df32.l, A6"; rendered: a turtle falling
# on his shell); after their delay they walk (030F76 "move.w #$100, D0") off to the right (030FEA "addq.w #2, ($c,A0)",
# 030FEE "cmpi.w #$158, ($c,A0)"); when none is left the story is over (031014 "subq.b #1, $61108.l"); story_b.txt frames 1300-1460
030F38  func  intro_roof_land
comment intro_roof_land the turtles land on the roof, Michelangelo trips, and they walk off into the fire
# every 8 frames (03101C "move.b $600a5.l, D0", 031022 "andi.b #$7, D0") the next of three pictures (031028 "addq.b #4,
# $633e2.l"): in step 1 the burning building's smoke in layer B (031040 "cmpi.b #$1, $633ea.l", 03106C "lea $104038.l,
# A0"), else the fire's four pieces of the roof from the picture's record (031152's table: two 8 x 8 and two 4 x 4)
03101C  func  intro_animate_fire
comment intro_animate_fire the fire and its smoke in the story's pictures, a new picture every eight frames
# a square of 8 x 8 tiles from a record: its tile RAM address, its colour, the first code of each row (0310F8 "movea.l
# (A6)+, A0", 0310FA "move.b (A6)+, D2", 031100 "move.b (A6)+, D3", 031106 "addq.b #1, D3")
0310F8  func  draw_tile_square_8x8
# the same with 4 x 4 tiles (03111C "moveq #$3, D0", 03112C "adda.w #$78, A0")
031118  func  draw_tile_square_4x4
comment draw_tile_square_8x8 a square of 8 by 8 tiles drawn, each row on from its first tile
comment draw_tile_square_4x4 a square of 4 by 4 tiles drawn, each row on from its first tile

# ======== the palettes (src/video/palettes.c) ========
# The palette RAM's four banks (palette_bank_addresses; colour bases of runtime/src/video.c): 0 the fixed layer's, 1
# layer A's, 2 layer B's, 3 the sprites' (16 palettes: two halves of 8, 080400 and 080600)

# ---- the requests ----
# every frame (the VBLANK, 003DC4's calls): the next bank of a request under way (009272 "tst.b $60bf8.l", 00927C "tst.b
# $60bf9.l", 009286 "tst.b $60bfa.l"), or the sprites' second half (009290 "tst.b $60bfb.l", 0092A2 "lea $9334.l, A0"), or
# the next request of the queue by its kind (0092CC "andi.w #$3f00, D0", 0092EA "lea $9310.l, A0"); 060083 set while one
# is under way (009306 "move.b #$1, $60083.l"): the scenes wait for it
009272  func  run_palette_requests
comment run_palette_requests a bank of the palette requests a frame: the one under way, or the next one queued
# kinds 0 and 9, and the second halves of the kinds that have none (009310's and 009334's tables): nothing (009358 "rts")
009358  func  palette_request_none
# kinds 7 and 8 (00932C, 009330): nothing (0095D0 "rts")
0095D0  func  palette_request_spare
comment palette_request_none a palette request that does nothing
comment palette_request_spare a spare palette request kind that does nothing
# kind 1: the area's palette set (00935A "movea.l #$9f56, A6", 009390 "move.b $60121.l, D5": area_palettes by the
# stage), the next bank of the mask (009362 "btst D6, D7", 00937C "move.b D7, $60bf8.l"), the sprites' bank with its second
# half to come (0093CA "move.b #$1, $60bfb.l")
00935A  func  palette_request_area
# its sprites' second half (0093E2 "move.b #$3, D6", 0093E6 "move.b #$8, D7", 0093EA "bra $935a")
0093E2  func  palette_request_area_second_half
# kind 2: the palette set at A6 (a list a bank), kept for its banks to come (0093EE "move.l A6, $60bfc.l")
0093EE  func  palette_request_set
# the set's next bank (009412 "move.b D6, D4", 009416 "move.b D7, $60bf9.l", 00942A "movea.l (A6,D6.w), A6"; 009464
# "move.b $60bf9.l, D7" goes on with it)
0093F4  func  palette_request_set_next_bank
# its sprites' second half (009472 "movea.l $60bfc.l, A6", 00947C "move.b #$8, D7")
009472  func  palette_request_set_second_half
# kind 3: the palette list at A6 into the first bank of the mask only (009486 "btst D6, D7", 0094DC "bsr $95e6"), the
# sprites' second half to come (0094D4 "move.b #$3, $60bfb.l")
009484  func  palette_request_list
# its sprites' second half (0094E2 "movea.l $60bfc.l, A6", 0094F0 "bra $9484")
0094E2  func  palette_request_list_second_half
# kind 4: the 16 colours at A6 into one palette: the low nibble of the request's byte the palette, the high one the bank
# (0094F6 "andi.l #$f, D7", 0094FC "andi.b #$f0, D6", 00950C "lsl.w #6, D7", 009512 "move.b (A6)+, ($1,A5)")
0094F2  func  palette_request_palette
# kind 5: single colours (a palette, a colour, its two bytes) until a negative byte (009544 "move.b (A6)+, D6", 009546
# "bmi $9560", 009556 "move.b (A6)+, ($1,A4)")
009526  func  palette_request_colours
# kind 6: the banks of the mask black, a bank a frame (00957E "move.b D7, $60bfa.l", 0095BC "bsr $9602"), the sprites'
# second half to come (0095B4 "move.b #$6, $60bfb.l")
009562  func  palette_request_black
# its sprites' second half (0095CA "move.b #$8, D7", 0095CE "bra $9562")
0095CA  func  palette_request_black_second_half
# D7 + 1 palettes of 16 colours at A5 black (009602 "moveq #$f, D6", 009604 "clr.b ($1,A5)", 009608 "clr.b ($3,A5)")
009602  func  blacken_palettes
comment palette_request_area the area's palettes into the banks asked for, a bank a frame
comment palette_request_area_second_half the second half of the sprites' palettes of the area's set
comment palette_request_set a set of palettes into the banks asked for, a bank a frame
comment palette_request_set_next_bank the set's next bank
comment palette_request_set_second_half the second half of the sprites' palettes of the set
comment palette_request_list a list of palettes into one bank
comment palette_request_list_second_half the second half of the sprites' palettes of the list
comment palette_request_palette sixteen colours into one palette
comment palette_request_colours single colours into a bank's palettes
comment palette_request_black the banks asked for turned black, a bank a frame
comment palette_request_black_second_half the second half of the sprites' palettes turned black
comment blacken_palettes palettes turned black

# ---- the fade (copy_palette_sets' steps, by 063411) ----
# The palette RAM's parts in 063418's mask (5 of them: 00975C's table, 080000, 080800, 080A00, 080400, 080600) are read
# into a buffer at 063800, moved toward the target sets a step, and written back, a part a frame; a caller that goes on
# calling copy_palette_sets fades in (the opening: attract frames 40-250 go from dark to the city)
# step 0: the fade starts: its mask and step (00965C "move.w D6, $63418.l"), the target sets (009662 "move.l A5,
# $63414.l"), the buffer (009668 "lea $63800.l, A5")
009642  func  fade_palettes_start
# step 1: a part of the palette RAM into the buffer (0096A2 "move.b ($1,A6), (A5)+", 0096A6 "move.b ($3,A6), (A5)+"), the
# next step after the fifth (0096BE "cmpi.b #$5, $63412.l", 0096CA "addq.b #1, $63411.l")
009678  func  fade_palettes_read
# step 2: a part's colours in the buffer a step toward the target set's (009778 "move.b $63419.l, D0": the step, 009782
# "movea.l $63414.l, A5")
009770  func  fade_palettes_step
# a colour's red, green or blue (009872's masks: 1F, 3E0, 7C00) moved toward the target's by the step, no further
009838  func  fade_colour_part
# step 3: the buffer back into a part of the palette RAM (009714 "move.b (A5)+, ($1,A6)", 009718 "move.b (A5)+, ($3,A6)");
# after the fifth the fade's step is over (00973C "clr.l $63410.l")
0096EA  func  fade_palettes_write
# the part's palette RAM address (009744 "lea $975c.l, A6", 00974C "movea.l (A6,D7.w), A6"), 128 colours (009750 "move.w
# #$7f, D7"), the buffer's place (009754 "movea.l $6341a.l, A5")
009744  func  fade_palettes_part
comment fade_palettes_start a fade toward a set of palettes starts
comment fade_palettes_read a part of the palettes read into the fade's buffer
comment fade_palettes_step a part of the fade's colours a step toward the target palettes
comment fade_colour_part a colour's red, green or blue a step toward the target's
comment fade_palettes_write the fade's colours written back into a part of the palettes
comment fade_palettes_part where a part of the palettes is and how many colours it has

# ---- the palette effects (060480: 10-byte slots, the low 2 bits of the first byte the bank) ----
# an effect slot cleared (009A2C "clr.w ($0,A6)", 009A30 "clr.l ($2,A6)", 009A34 "clr.l ($6,A6)")
009A2C  func  clear_palette_effect
# every slot cleared (009A3E "lea $60480.l, A6", 009A46 "move.b #$40, D7": 65 of them, one more than step_palette_effects
# walks, so it also clears 060700-060709)
009A3A  func  clear_palette_effects
# stop_every_palette_effect's four by the effect's bank (0099D4 "andi.b #$3, D5", 0099C4 "lea $99f0.l, A5"): the effect stopped when
# D7 has its bank's bit (009A00 "btst #$0, D7" bank 0, the fixed layer's; 009A0E "btst #$1, D7" layer A's; 009A18 "btst
# #$2, D7" layer B's; 009A22 "btst #$3, D7" the sprites')
009A00  func  stop_fixed_layer_effect
009A0E  func  stop_layer_a_effect
009A18  func  stop_layer_b_effect
009A22  func  stop_sprite_effect
# the game step's palette set (009A5C "lea $9a7c.l, A6", 009A64 "move.b $60003.l, D7", 009A70 "move.w #$20f, D7": kind 2,
# all banks): the attract mode's screens
009A5C  func  request_game_step_palettes
# the game step's palette effects (009AA8 "lea $9ad2.l, A0", 009AB0 "move.b $60003.l, D7")
009AA8  func  start_game_step_palette_effects
# the area's palette effects by the stage (009AFE "lea $9b28.l, A0", 009B06 "move.b $60121.l, D7")
009AFE  func  start_area_palette_effects
# each list of effects of the list at A0 until a 0 (009B12 "movea.l (A0)+, A6", 009B14 "cmpa.l #$0, A6", 009B1E "jsr
# $987e.l")
009B12  func  start_palette_effect_lists
comment clear_palette_effect a palette effect stopped
comment clear_palette_effects every palette effect stopped
comment stop_fixed_layer_effect the effect stopped if the fixed layer's palettes are asked for
comment stop_layer_a_effect the effect stopped if layer A's palettes are asked for
comment stop_layer_b_effect the effect stopped if layer B's palettes are asked for
comment stop_sprite_effect the effect stopped if the sprites' palettes are asked for
comment request_game_step_palettes the palettes of the attract mode's screen asked for
comment start_game_step_palette_effects the palette effects of the attract mode's screen started
comment start_area_palette_effects the area's palette effects started
comment start_palette_effect_lists every effect of a list of effect lists started

# the area exits' loops over the four turtles (02B25C "lea $62000.l, A0", 02B28C "adda.w #$50, A0"): their exit_step,
# invulnerable_time and drift_speed by the turtle family's names
local turtle_start_area_exit 02B25C,02B28C a0 turtle object.turtle
local turtle_exit_building_start 02B2EE,02B320 a0 turtle object.turtle
local turtle_exit_street_start 02B36A,02B39A a0 turtle object.turtle
local turtle_exit_sewer_start 02B3B8,02B3EA a0 turtle object.turtle
local turtle_exit_car_street_start 02B414,02B46A a0 turtle object.turtle
local turtle_exit_street 02BACA,02BAEC a0 turtle object.turtle
local turtle_exit_sewer 02BCAA,02BCCC a0 turtle object.turtle
local turtle_exit_car_street 02BF38,02BF6C a0 turtle object.turtle
local turtle_exit_building_site_drop 02D266,02D2BC a0 turtle object.turtle
local turtle_exit_building_site_leave 02D50A,02D554 a0 turtle object.turtle

# the profile's picture (object 12): where it stops, from the record at 005078 (005060 "move.w (A6)+, ($20,A0)", 005064
# "move.w (A6)+, ($22,A0)"), against the place it moves to (0050FA "cmp.w ($20,A0), D7", 005112 "cmp.w ($22,A0), D7")
scoped object profile 20 end_x u16
scoped object profile 22 end_y u16
local profile_start_picture 00501A a0 picture object.profile
local profile_move_picture 0050EC a0 picture object.profile

# ======== the program's data by name: animations, records, tables (batch 5) ========
# every address the C reads data at, or holds as a value, by its name and type (the evidence above
# each: the instruction that names it and the function it is in)

# ---- the records the objects' helpers read through a pointer (batch 5) ----

# an arc an enemy jumps or falls on: its speed across (04863E "move.w (A6), ($1a,A0)"), what slows it each frame until
# it would turn (048696 "move.w ($2,A6), D0", 0486AE "bpl $486b6"), its speed in height (048646 "move.w ($4,A6), ($1e,A0)"),
# what pulls that down each frame (0486B6 "move.w ($6,A6), D0") as far as a limit (0486BE "cmp.w ($a,A6), D0"), and a
# step across it takes at once (04864C "move.w ($8,A6), D7", 048690 "add.l D7, ($12,A0)"), all mirrored when it faces left
struct arc 0C rom
field arc 00 x_speed s16
field arc 02 x_drag s16
field arc 04 height_speed s16
field arc 06 gravity s16
field arc 08 x_step s16
field arc 0A height_speed_limit s16
param enemy_start_arc a6 arc arc
param enemy_arc_step a6 arc arc

# where an object starts from another: across (047C88 "move.w ($0,A5), D1", mirrored with it), up or down
# (047CAA "move.w ($2,A5), D2"), both in pixels, and in height (047CBA "move.b ($4,A5), D3")
struct placement 05 rom
field placement 00 x s16
field placement 02 y s16
field placement 04 height u8
param place_from_record a5 placement placement
# (where a turtle holds the soldier it throws, from the turtle: 04A2EC "add.w ($0,A5), D1", 04A312 "add.w ($2,A5), D1",
# 04A322 "add.b ($4,A5), D1")
param enemy_place_by a5 placement placement

# a shot one object fires: where it starts from its shooter, and its kind (047C6A "move.b ($5,A5), ($2,A6)")
struct shot_record 06 rom
field shot_record 00 x s16
field shot_record 02 y s16
field shot_record 04 height u8
field shot_record 05 kind u8
param start_shot a5 record shot_record

# an object one object starts: where, the group of objects it takes a free one in (047C30 "move.b ($5,A5), D0",
# 047C34 "bsr $47c02"), and its kind and parameter (047C40 "move.w ($6,A5), ($2,A6)")
struct object_record 08 rom
field object_record 00 x s16
field object_record 02 y s16
field object_record 04 height u8
field object_record 05 group u8
field object_record 06 kind_and_parameter u16
param start_object_from_record a5 record object_record

# ---- the values a pointer walks one at a time (elements: read at their address, NAME(p), and one of another width
# there NAME_16(p) or NAME_32(p)) ----
# a text's bytes: where the line goes (a word into the fixed layer or a long, its address), its colour, then its
# characters up to '/' (the next line) or '?' (its end): 0022BE "movea.l (A6)+, A4", 0022C0 "move.b (A6)+, D6", 0022C2
# "move.b (A6)+, D7" (print_colour_text); 0018FA "adda.w (A5)+, A6", 0018FC "move.b (A5)+, D4" (print_boot_text)
elements text u8
# a tile picture's bytes: how many rows (00230C "move.w (A6)+, D3"), then each row's place, length and colour (00231A
# "movea.l (A6)+, A4", 00231E "move.b (A6)+, D4", 002322 "move.b (A6)+, D7"), then the tiles (002324 "move.b (A5)+, D6")
elements tile_picture u8
# a layer's blocks' bytes: a block is its colour, then 16 tile codes 4 by 4 (or 16 cells of the floor, then the tiles), at
# the offset the map gives (01E15A "adda.l D0, A4", 01E15E "move.b ($0,A4), D1", 01E172 "move.b ($1,A4), ($1,A0)")
elements block_byte u8
# a layer's map: a word a block, its offset into the blocks (01E152 "move.w (A3)+, D0")
elements map_entry u16

# ---- the pointers the objects' and the scenes' code walks through the program's data ----
# an entry of a table of animations a pointer walks or points into: the animation it holds
# (02BA40 "movea.l ($0,A5), A6", 02BA52 "adda.w #$4, A5": exit_apartment_kidnap_picture; 02C5B2 "movea.l (A5)+, A6")
elements animation_entry u32 animation_frame
# an entry of a table of tables of animations: the table it holds (01B938 "movea.l (A6,D3.w), A6", turtle_set_animation: by routine, then 01B942 by state)
elements animation_table_entry u32 animation_entry
# the animations of the pictures between the areas, an object each (02BA0C "lea $2ba9a.l, A5", 02CD0C "lea $2cd74.l,
# A5"), and of April's hug and its second part (02C58C "lea $2c640.l, A5", 02C5EC "lea $2c650.l, A2")
local exit_apartment_kidnap_picture 02BA0C a5 animations animation_entry
02BA9A  data  kidnap_picture_animations
local exit_skateboard_crash_picture 02CD0C a5 animations animation_entry
02CD74  data  skateboard_crash_picture_animations
local exit_car_street_april_hug_start 02C58C a5 animations animation_entry
local exit_car_street_april_hug_start 02C5EC a2 more_animations animation_entry
# 02C58C "lea $2c640.l, A5": the hug's animations, an object each
02C640  data  april_hug_animations
# 02C5EC "lea $2c650.l, A2", 02C628 "movea.l (A2)+, A6": the second part's
02C650  data  april_hug_animations_2
# the rooftop's objects before area 0 (030AA4 "lea $30b16.l, A5", 030AD4 "movea.l (A5), A6"), the turtles on it
# (030C0C "lea $30d7e.l, A5", 030C28 "movea.l (A5), A6")
local intro_rooftop_start 030AA4 a5 animations animation_entry
030B16  data  intro_rooftop_animations
local intro_rooftop 030C0C a5 animations animation_entry
030D7E  data  intro_rooftop_turtle_animations
# the climb's objects: an animation and a speed up or down each (030DC2 "lea $30dfc.l, A5", 030DE4 "movea.l (A5)+, A6",
# then the word: intro_object_animations, record=6)
struct intro_object 06 rom
field intro_object 00 animation u32 animation_frame
field intro_object 04 y_speed s16
local intro_climb_start 030DC2 a5 object intro_object
# the opening's portraits: where each stands, x and y, and its animation (02FD7C "lea $2fdc0.l, A5", 02FD90 "move.l
# (A5)+, D0", 02FD92 "move.l (A5)+, D1", 02FDA8 "movea.l (A5)+, A6")
struct portrait 0C rom
field portrait 00 x u32
field portrait 04 y u32
field portrait 08 animation u32 animation_frame
local opening_portraits_start 02FD7C a5 portrait portrait
02FDC0  data  opening_portraits
# the title's logo: its animation by the step the title is at and the logo's part (004AD8 "lea $151d8.l, A6", 004B0A
# "movea.l (A6,D6.w), A6")
local start_title_logo 004AD8,004AE8,004B06 a6 animations animation_entry
0151D8  data  title_logo_animations
# Rocksteady's shot: the animation and the address of the shot's record (shot_record, which enemy_rocksteady_shoot_fire
# hands start_shot: 04FDF8 "move.l (A5), ($24,A0)", 04FE14 "movea.l ($24,A0), A5", 04FE18 "jsr $47c5a.l"), by whether he aims low (04FDDC "lea $4fda8.l, A5", 04FDF2
# "adda.w #$8, A5", 04FDF6 "movea.l (A5)+, A6")
local enemy_rocksteady_shoot_start 04FDDC a5 animations animation_entry
04FDA8  data  rocksteady_shoot_animations
# its records' other fields: the level shot's record (04FDF8 "move.l (A5), ($24,A0)" after 04FDF6 "movea.l (A5)+,
# A6"), then the high shot's animation and record, 8 bytes on (04FDF2 "adda.w #$8, A5")
04FDAC  data  rocksteady_level_shot_record_address
04FDB0  data  rocksteady_high_shot_animation
04FDB4  data  rocksteady_high_shot_record_address
# the two shots' records rocksteady_shoot_animations holds, after enemy_rocksteady_shoot's table of routines
# (04FD94-04FD9B): from x -0x36 at height 0x23, level (04FDA8's), and from x -0x23 at height 0x54, up at a turtle
# 0x40 or more above the floor (04FDB0's: 04FDE2 "cmpi.b #$40, ($10,A1)", 04FDF2 "adda.w #$8, A5"); kind 5F, the bullet
04FD9C  data  rocksteady_level_shot
04FDA2  data  rocksteady_high_shot
# Rocksteady knocked down and defeated: the animation by how he falls (04FF62 "lea $4ff52.l, A6", 04FF6E "lea $4ff3a.l,
# A6", 04FF84 "movea.l (A6), A6"; 0500BA "lea $500a2.l, A6", 0500C6 "lea $50092.l, A6", 0500DC "movea.l (A6), A6")
local enemy_rocksteady_knocked_down_start 04FF62,04FF6E a6 animations animation_entry
04FF3A  data  rocksteady_knocked_down_animations
04FF52  data  rocksteady_knocked_down_animations_2
local enemy_rocksteady_defeated_start 0500BA,0500C6 a6 animations animation_entry
050092  data  rocksteady_defeated_animations
0500A2  data  rocksteady_defeated_animations_2
# the roadside signs' animations (00FE0E "lea $1452a.l, A6", 00FE1E "lea $1456a.l, A6", 00FE2E "lea $15af6.l, A6",
# 00FE34 "movea.l ($0,A6), A6")
local roadside_stand 00FE0E,00FE1E,00FE2E a6 animations animation_entry
01452A  data  parking_meter_animations
01456A  data  speed_sign_animations
015AF6  data  cone_animations
# the ONE WAY sign struck (010972 "lea $15b36.l, A6", 010998 "movea.l ($4,A6), A6")
local one_way_sign_struck 010972 a6 animations animation_entry
# the rock soldiers' animations struck (0118F8 "lea $14da0.l, A1", 011908 "lea $153d8.l, A1", 011950 "movea.l ($18,A1),
# A6", 01195A "movea.l ($1c,A1), A6")
local rock_soldier_struck 0118F8,011908 a1 animations animation_entry
# the whip arm: where it is drawn across from Rodney by its length, a word each (04B87A "lea $4b776.l, A6", 04B866 "lea
# $4b7c4.l, A6", then whip_arm_place: 04B984 "move.w (A6,D0.w), D1", 04B996 "add.l ($12,A1), D1"), and its animation by its
# length (04B884 "lea $4b742.l, A6", 04B870 "lea $4b790.l, A6", 04B9AC "movea.l (A6,D0.w), A6"), two sets by the way
# Rodney pulls it (04B850 "btst #$5, ($4a,A1)")
elements whip_offset s16
local whip_arm_follow 04B870,04B884 a6 animations animation_entry
local whip_arm_follow 04B866,04B87A a6 offsets whip_offset
param whip_arm_place a6 offsets whip_offset
04B776  data  whip_arm_x_offsets
04B790  data  whip_arm_animations_2
04B7C4  data  whip_arm_x_offsets_2
# the turtles' shadows on the skateboard: two a turtle, changing every 4 frames (01A2DC "lea $1a308.l, A6", 01A2F2
# "move.l (A6,D0.w), ($3a,A0)", 01A2F8 "addq.l #8, A6")
elements shadow_entry u32 sprite
local turtle_skateboard_shadow 01A2DC a6 shadows shadow_entry
01A308  data  skateboard_shadows
# a table of reaches a pointer reads by an index: the Technodrome rock soldier's, by his blows and the turtles in play
# (0122E0 "lea $12338.l, A6", 0122F0 "lea $1234c.l, A6", 012308 "move.b (A6,D1.w), D1")
elements reach u8
local rock_soldier_technodrome_think 0122E0,0122F0 a6 reaches reach
012338  data  rock_soldier_technodrome_reaches
01234C  data  rock_soldier_technodrome_reaches_2
# the helicopter's waits between shots, by its parameter's bit 0 (013126 "lea $13150.l, A6", 013136 "lea $13154.l, A6")
elements wait_time u8
local helicopter_random_wait 013126,013136 a6 waits wait_time
013150  data  helicopter_waits
013154  data  helicopter_waits_2
# the electric vents' waits (010D52 "move.b (A5,D7.w), ($30,A0)")
param electric_random_wait a5 waits wait_time
010D62  data  electric_waits
# Rocksteady's bullets' aims (04C002 "lea $4bfd4.l, A6", 04C018 "lea $4bfd2.l, A6", 04C022 "move.b (A6,D5.w), D0")
elements aim u8
local rocksteady_bullet_start 04C002,04C018 a6 aims aim
04BFD2  data  rocksteady_bullet_aims
04BFD4  data  rocksteady_bullet_aims_2
# where something moves, across and up or down, a pair of words a step: the turret's slide (0106FC "lea $10776.l, A6",
# 01071C "move.w (A6,D7.w), D6", 010720 "move.w ($2,A6,D7.w), D7"), the car's hit box (012BE4 "lea $12c10.l, A5", 012BF2
# "move.w ($0,A5), D7", 012BFC "move.w ($2,A5), D7"), the bosses' speeds toward their target, the rock soldier of the building site's (kind 1E) or the others' (011E70 "lea $11eb2.l, A6",
# 011E80 "lea $11ef2.l, A6", 011E88 "move.w (A6,D0.w), D7")
struct offset_pair 04 rom
field offset_pair 00 x s16
field offset_pair 02 y s16
local turret_slide 0106FC,01070E a6 slide offset_pair
010776  data  turret_slides
local parked_car_start_hit_box 012BE4,012BF0 a5 place offset_pair
012C10  data  car_hit_box_places
local boss_aim_at_target 011E70,011E80 a6 speeds offset_pair
011EB2  data  rock_soldier_site_speeds
011EF2  data  boss_speeds
# where each turtle starts an area, x and y by the turtle (019CE2 "lea $19e62.l, A6", 019CF4 "lea $19e72.l, A6", 019D00
# "move.w (A6,D1.w), D2", 019D04 "move.w ($2,A6,D1.w), D3"), and where it falls in, x, y and height (019D7C "lea $19e82.l,
# A6", 019D8E "lea $19e9a.l, A6" in stage 3, 019DA6 "move.w (A6,D1.w), D3")
local turtle_place_at_start 019CE2,019CF4 a6 places offset_pair
019E62  data  turtle_start_places
019E72  data  turtle_start_places_2
local turtle_start_fall_in 019D7C,019D8E a6 places fall_in_place
struct fall_in_place 06 rom
field fall_in_place 00 x s16
field fall_in_place 02 y s16
field fall_in_place 04 height u16
019E82  data  turtle_fall_in_places
019E9A  data  turtle_fall_in_places_stage_3

# Bebop's attacks by his target's distance: the most up or down (050566 "move.w (A6), D1") and across (050570 "move.w
# ($2,A6), D1") they reach, the move (+4), and the chance they need (05055E "cmp.w ($6,A6), D7"), by his approach
# (05054E "lea $505e2.l, A6", 050554 "adda.w D0, A6")
struct bebop_attack 08 rom
field bebop_attack 00 reach_y u16
field bebop_attack 02 reach_x u16
field bebop_attack 04 move u16
field bebop_attack 06 chance u16
local enemy_bebop_think 050554 a6 attack bebop_attack
0505E2  data  bebop_attacks
# a move picked at random: the chance it takes off (0505A8 "sub.w ($0,A6), D7", 0505B0 "adda.w #$4, A6") and the move
# (the word after it): Bebop's from far (050598 "lea $50602.l, A6", 0505BC "lea $50602.l, A6")
struct random_move 04 rom
field random_move 00 chance u16
field random_move 02 move u16
local enemy_bebop_think 050598,0505BC a6 move random_move
050602  data  bebop_far_moves
# Rodney's attacks: the reach across (051F30 "cmp.w ($0,A6), D1"), the chance (051F38 "cmp.b ($2,A6), D7") and the move
# (051F42 "move.b ($3,A6), D6"), four bytes each (051F26 "lea $51f94.l, A6", 051F5A "adda.w #$4, A6"); and his move by
# his approach (051F6A "lea $51f9c.l, A6", 051F76 "move.b (A6,D0.w), D0")
struct rodney_attack 04 rom
field rodney_attack 00 reach u16
field rodney_attack 02 chance u8
field rodney_attack 03 move u8
local enemy_rodney_think 051F26 a6 attack rodney_attack
051F94  data  rodney_attacks
051F9C  table  rodney_approach_moves  u8
# the distances Shredder compares, a word each, and the moves they give four words on (052A9C "lea $52ace.l, A6", 052AA8
# "cmp.w (A6), D1", 052AAE "adda.w #$2, A6"; 0530BC "lea $52ace.l, A6")
elements distance_move u16
local enemy_shredder_think 052A9C a6 distance distance_move
local enemy_shredder_guard_counter 0530BC a6 distance distance_move
052ACE  data  shredder_distance_moves
# the Mousers' floor heights as they come in, by their way in (051050 "lea $51036.l, A6")
051036  table  mouser_enter_heights  u8
# a combo's steps: each turtle's list of attacks (01B82E "lea $1d5f2.l, A6", 01B834 "movea.l (A6,D3.w), A6", 01B858
# "move.b (A6,D7.w), D0")
elements combo_step u8
# a knocked turtle's steps, a byte each up to FF (01C73E "lea $1c764.l, A6", then the list by the reaction)
elements knock_step u8
# the prompt over a held turtle, two frames of tiles (01D27A "lea $1d35c.l, A6", 01D288 "lea $1d3ac.l, A6", 01D2FE
# "move.b (A6)+, (A5)+")
elements prompt_byte u8
local turtle_show_prompt 01D27A,01D288 a6 tiles prompt_byte
01D35C  data  prompt_tiles
01D3AC  data  prompt_tiles_2
# a kind of object's routines: the handler of each (047812 "lea $53896.l, A6", then the routine's entry by +2 << 2)
elements routine_entry u32
# a row of freezing nozzles: how many, then where each is (010A2C "movea.l (A6,D7.w), A6", 010A32 "move.b (A6)+, D7",
# 010A36 "move.b (A6)+, D0")
elements nozzle_place u8

# ---- the scenes', the layers' and the texts' pointers through the program's data ----
# a picture's tiles drawn into a layer, a byte each: Splinter's picture after area 7, 16 a row (02D0F6 "lea $2d164.l, A1"),
# the burning roof before area 0 (030AF6 "lea $30b26.l, A6"), the Foot's car as it drives (01F8CE "lea $1fbf0.l, A3",
# 01F906 "move.b (A3)+, (A1)+"), the screens' pictures (01F942 "lea $1faa8.l, A1", 01F952 "move.b (A1)+, D0")
elements picture_tile u8
local exit_building_site_splinter_picture 02D0F6 a1 tiles picture_tile
# Splinter's picture: 16 columns of 8 rows, 128 bytes to 02D1E3, a column at a time (02D120 "move.b ($0,A1), ($1,A0)"
# to 02D14A "move.b ($70,A1), ($381,A0)", 02D150 "addq.l #1, A1"); its last 14 bytes (02D1D6) decode as instructions
# no code reaches, and were taken for a routine until area 7's exit was played (area7 scenario, frame 46165)
02D164  data  splinter_picture_tiles
local intro_rooftop_start 030AF6 a6 tiles picture_tile
030B26  data  rooftop_picture_tiles
# the Foot's car's tiles in the two layers, two frames (01F8C8 "lea $1fbe0.l, A2", 01F8CE "lea $1fbf0.l, A3", 01F8E2 "lea
# $1fc00.l, A2", 01F8E8 "lea $1fc10.l, A3")
local drive_foot_car 01F8C8,01F8E2 a2 tiles picture_tile
local drive_foot_car 01F8CE,01F8E8 a3 tiles_b picture_tile
01FBE0  data  foot_car_tiles
01FBF0  data  foot_car_tiles_b
01FC00  data  foot_car_tiles_2
01FC10  data  foot_car_tiles_2b
local draw_screen_picture 01F942 a1 colours picture_tile
local draw_screen_picture 01F948 a2 tiles picture_tile
# the profiles' pictures' moves, 16 bytes a character (005046 "lea $5078.l, A6", 005056 "adda.l D7, A6"): where the
# picture starts, where it stops, its speeds (005060 "move.w (A6)+, ($20,A0)", 005064 "move.w (A6)+, ($22,A0)")
struct profile_motion 10 rom
field profile_motion 00 x u16
field profile_motion 02 y u16
field profile_motion 04 end_x u16
field profile_motion 06 end_y u16
field profile_motion 08 x_speed s16
field profile_motion 0A y_speed s16
local profile_start_picture 005046,005056 a6 motion profile_motion
005078  data  profile_motions
# the staff roll's credits, a text each (006F9C "lea $7612.l, A6", 006FB2 "adda.l D7, A6", 006FBC "move.b (A6)+, D6"), and
# the line that blanks one (006FDA "lea $2f26.l, A6")
local staff_roll_next_credit 006F9C,006FB2,006FDA a6 text text
007612  data  staff_roll_credits
002F26  data  staff_roll_blank_text
# the wreck of the Technodrome, drawn a part at a time: the part's place in the fixed layer (007236 "movea.l ($0,A6),
# A5"), its first tile (00723A "move.b ($4,A6), D0"), its rows (00724A "move.b ($5,A6), D5") and colour (007240 "move.b
# ($6,A6), D6"), 8 bytes each (00726A "adda.l #$8, A6")
struct wreck_part 08 rom
field wreck_part 00 place u32 io
field wreck_part 04 tile u8
field wreck_part 05 rows u8
field wreck_part 06 colour u8
local draw_technodrome_wreck 007230 a6 part wreck_part
007276  data  technodrome_wreck_parts
# the ranking's frame's tiles (008168 "lea $841a.l, A5", 008184 "move.b (A5)+, ($1,A6,D4.w)", 0081B6 "lea $842c.l, A5")
local draw_ranking_frame 008168,0081B6 a5 tiles picture_tile
00841A  data  ranking_frame_tiles
00842C  data  ranking_frame_tiles_2
# the ranking's defaults, copied into 063500 (0082BE "lea $82e6.l, A5", 0082D2 "move.l (A5)+, (A6)+")
elements ranking_default u32
local reset_ranking 0082BE a5 defaults ranking_default
0082E6  data  ranking_defaults
# the layers' maps read from the place the scroll is at (01E142 "movea.l $63312.l, A2", 01E148 "adda.l D0, A2", 01E14E
# "movea.l A2, A3", 01E152 "move.w (A3)+, D0"; 01E07A "adda.l D0, A2", 01E086 "movea.l A2, A3")
local draw_whole_layer 01E148 a2 map map_entry
local draw_whole_layer 01E14E a3 entry map_entry
local draw_whole_layer_and_floor 01E07A a2 map map_entry
local draw_whole_layer_and_floor 01E086 a3 entry map_entry
# the sewer's water's tiles redrawn (01F1A4 "lea $1f242.l, A6", 01F1B4 "move.b (A6)+, D6")
local update_layers_sewer 01F1A4 a6 tiles picture_tile
01F242  data  sewer_water_tiles
# a palette effect's steps: how long each lasts (00992C "move.w ($0,A5), D6") and its colour (009954 "move.b ($2,A5),
# ($1,A4)", 00995A "move.b ($3,A5), ($3,A4)"), 4 bytes each (00996A "adda.l #$4, A5"), up to a step whose time is 0 and the
# long after it, where the effect goes on from (00999C "move.l ($2,A5), ($2,A6)")
struct palette_effect_step 04 rom
field palette_effect_step 00 time u16
field palette_effect_step 02 colour u16
local step_palette_effects 009928 a5 step palette_effect_step
# the digits of the score added in BCD (001F92 "lea $2032.l, A5", 001FA0 "abcd -(A5), -(A4)")
local add_point_to_score 001F92 a5 digit picture_tile
# the frames of the players' boxes: the tiles of a box's border (002546 "lea $3302.l, A4", 00254E "move.b (A4)+, D2";
# 0025C8 "lea $33de.l, A4" in the unreached one)
local draw_box_frame 002546 a4 tiles picture_tile
003302  data  box_frame_tiles
local draw_box_frame_by_rows 0025C8 a4 tiles picture_tile
0033DE  data  unreached_box_frame_tiles
# the health bars' tiles by the health (002478 "lea $334a.l, A4", 002486 "adda.l D4, A4", 002492 "move.b ($4,A4),
# ($81,A5)", 002498 "move.b (A4)+, ($1,A5)")
local draw_health_bar 002478,002486 a4 tiles picture_tile
00334A  data  health_bar_tiles
# the big characters: each a pattern of 4 x 4 bits (0027BE "lea $388c.l, A5", 0027CC "lea (A5,D7.w), A5", 0027DA
# "move.b (A5), D6") into the tiles of big_font_tiles (0027B8 "lea $2806.l, A6")
local draw_big_character 0027CC a5 pattern picture_tile
# the mask ROM check's sums, read back from where the check left them (0019FE "lea $63500.l, A6", 001A0E "cmp.w
# (A6)+, D7"): work RAM, no data of the program's
# ... and as a new row or column is drawn (01EA38 "movea.l D2, A2", 01EA56 "move.w (A2)+, D4", 01EB1C "movea.l D2, A2";
# 01E7C2 "movea.l D2, A2", 01E8D4 "movea.l D2, A2", 01E938 "suba.l D6, A2", 01E968 "move.w (A2), D4")
local draw_new_row_and_column 01EA38,01EB1C,01EB6A a2 map map_entry
local draw_new_row_and_column_and_floor 01E7C2,01E8D4,01E938 a2 map map_entry

# ---- the last pointers and records the C held as numbers ----
# a facing's animations: the one for facing the way it goes and the one for turning (0484BC "adda.w #$4, A5", 0484C0
# "movea.l (A5), A6"); Shredder's, walking to the side, by whether he is hurt (052E94 "lea $52e74.l, A5", 052EA2 "lea
# $52e7c.l, A5")
param enemy_set_facing_animation a5 animations animation_entry
052E74  data  shredder_walk_animations
052E7C  data  shredder_walk_hurt_animations
# a texts' typed pass: what it types (field typed_pass 04 text) is a text (0185E2 "movea.l ($4,A4), A6", 0185EA "move.b
# (A6)+, D6")
# the mask ROM check's sums of good chips, compared with what the check worked out (0019F8 "lea $1e34.l, A0")
elements mask_rom_sum u16
local show_mask_rom_check 0019F8 a0 sum mask_rom_sum
001E34  data  good_mask_rom_sums
# the score's point: the two BCD digits right before draw_score_digits' code, which add_point_to_score reads backwards
# from that function's address (001F92 "lea $2032.l, A5", 001FA0 "abcd -(A5), -(A4)"): 00 01
elements bcd_digits u8
local add_point_to_score 001F92 a5 digits bcd_digits
002030  data  one_point
# the lives' digits' tiles, top and bottom, by the digit, three rows of 20 bytes for the three places (0023D0 "lea
# $33a2.l, A4", 0023E8 "move.b (A4,D3.w), ($5,A5)", 0023F4 "adda.l #$14, A4")
local draw_lives 0023D0,0023F4,002434 a4 tiles picture_tile
# an unreached routine's 16 bytes into the sprite RAM (005266 "lea $5294.l, A6", 005274 "move.b (A6)+, (A5)+")
local copy_sprites_and_fill_layer_b 005266 a6 bytes picture_tile
005294  data  unreached_sprite_bytes
# the enemies the screen may hold before the scroll stops, 8 a stage by difficulty (02F62A "lea $2f67c.l, A6", 02F638
# "move.b (A6,D0.w), D1")
02F67C  table  enemy_limits  u8
# the TV in the street: its picture's tiles, a row of 4 and their colours 4 bytes on (01EFEE "lea $1f118.l, A6", then
# draw_tv_picture: 01F094 "move.b ($4,A6), (A1)+", 01F098 "move.b (A6)+, (A0)+")
param draw_tv_picture a6 tiles picture_tile
01F118  data  tv_picture_tiles
# the sine of the quarter turn's 64 directions, read up from 047D50 and down from its last value at 047D8F (047CCC "lea
# $47d50.l, A5", 047CD2 "lea $47d8f.l, A6", 047CEA "move.b (A5,D4.w), D6", 047CFE "move.b (A6,D4.w), D7")
elements sine u8
local speeds_from_direction 047CCC a5 sines sine
local speeds_from_direction 047CD2 a6 cosines sine
047D50  data  quarter_sine
047D8F  data  quarter_sine_last
# the elevator's stops, a word each: where it goes up to and down to, by its parameter (04C6EE "lea $4c6e0.l, A6",
# 04C6FC "lea $4c6e4.l, A6", into its +24)
04C6E0  data  elevator_stops
04C6E4  data  elevator_stops_2
# Rocksteady's attacks, close and far, a word each by whether he is armed (04F524 "move.w (A6,D0.w), ($28,A0)")
elements attack_move u16
param enemy_rocksteady_pick_attack a6 moves attack_move
04F5BC  data  rocksteady_close_attacks
04F5C0  data  rocksteady_far_attacks
# the shots all round's aims (04F9F6 "move.l #$4f9d4, ($1a,A0)"), read a byte at a time
04F9D4  data  rocksteady_shoot_around_aims
# a kind of enemy's health by difficulty: the bars in the high byte, the health in the low (0485BA "move.w (A6,D7.w),
# ($8,A0)", enemy_set_health); Bebop's, Rocksteady's, Shredder's, his clones'
elements health_setting u16
param enemy_set_health a6 settings health_setting
054756  data  bebop_health
054766  data  rocksteady_health
054776  data  bebop_health_2
054786  data  shredder_health
054796  data  shredder_bar_health
0547A6  data  shredder_clone_health
0547B6  data  shredder_clone_bar_health
# ---- the enemies' definitions (enemy_definitions, 053EFE: 9 records of 136 bytes) ----
# an enemy's definition: its moves by approach (8 bytes each: 048D46 "movea.l ($24,A0), A6", 048D4C "move.b ($2a,A0), D0",
# 048D50 "lsl.w #3, D0"), its attacks (4 of 12 bytes from +28: 048CEE "adda.w #$28, A6"), its reactions by the hit (from +58)
struct enemy_definition 88 rom
field enemy_definition 00 approach_moves u8
field enemy_definition 28 attacks u8
field enemy_definition 58 reactions u8
# an approach's four moves and their chances (048D5E "sub.b ($4,A6,D6.w), D7", 048D6C "move.b (A6,D6.w), D6")
struct approach_moves 08 rom
field approach_moves 00 move u8
field approach_moves 04 chance u8
local enemy_think 048D52 a6 approach approach_moves
# an attack: the reach up or down and across it needs (0482D0 "cmp.b ($0,A6), D2", 0482D8 "cmp.b ($1,A6), D1", 0482E0
# "cmp.b ($2,A6), D1"), its chance (0482F4 "move.b ($3,A6), D3"), its four moves and their chances (+4, +8), 12 bytes each
# (0482E8 "adda.w #$c, A6")
struct attack_record 0C rom
field attack_record 00 reach_y u8
field attack_record 01 reach_x_min u8
field attack_record 02 reach_x_max u8
field attack_record 03 chance u8
field attack_record 04 move u8
field attack_record 08 move_chance u8
local enemy_think 048CEE a6 attack attack_record
param enemy_attack_chance a6 attack attack_record
# each kind's record, by the start that puts it in +24 (04ACFA "move.l #$53f86, ($24,A0)" ...)
053F86  data  sword_soldier_definition
05400E  data  hammer_soldier_definition
054096  data  knife_soldier_definition
05411E  data  spear_soldier_definition
0541A6  data  axe_soldier_definition
05422E  data  gun_soldier_definition
0542B6  data  boomerang_soldier_definition
05433E  data  shuriken_soldier_definition
# ---- the palettes' lists ----
# an entry of a list of palettes: the palette it points at (0097C2 "movea.l (A5,D6.w), A4", 0097CE "movea.l (A4)+, A3":
# fade_palettes_step, from the fade's target 063414)
elements palette_pointer u32 colour_byte
# an entry of a list of palette effects, up to a 0 (009AA8 "lea $9ad2.l, A0", then the list's entries one by one)
elements palette_effect_pointer u32 rom
# ---- the burning roof's fire before area 0 ----
# a square of the fire's picture: where it goes in the tile RAM (0310F8 on: draw_tile_square_8x8 reads the long, the colour
# byte, then the first tile of each row, a byte each), by the frame (0310DA "lea $31152.l, A6")
param draw_tile_square_8x8 a6 square picture_tile
param draw_tile_square_4x4 a6 square picture_tile
# ---- a kind's margins off the screen ----
# a kind of object's margins: how far off the screen across and up it may be (0478DA "lea $53a5e.l, A4", 0478E8 "adda.w
# D4, A4", 0478EC "sub.w (A4), D0", 047908 "add.w ($2,A4), D2"), 4 bytes a kind by the kind sign-extended. The game's own
# doing: a kind with bit 7 reads before spawn_offsets; the platform of area 3, kind A4, reads 0x170 bytes before it, inside
# object_routine_tables (053896), and takes the halves of a routine table's address there for its margins
struct screen_margin 04 rom
field screen_margin 00 x u16
field screen_margin 02 y u16
local update_object_screen_place 0478E8 a4 margin screen_margin
# ---- the enemies' spawn records ----
# an enemy's spawn record, 8 bytes each up to an x of FFFF (047A66 "movea.l $61200.l, A0", 047A6C "cmpi.w #-$1, ($0,A0)",
# 047B10 "adda.w #$8, A0"): where it starts across on the spawn scroll (047A7E "cmp.w ($0,A0), D1") and up or down
# (047B06 "move.w ($2,A0), D3"), its height (047AD8 "move.b ($4,A0), ($10,A2)"), its flags: the difficulty it needs
# (047A9C "move.b ($5,A0), D0", 047AA0 "andi.b #$f, D0") and bit 6, from the right (047AE8 "btst #$6, ($5,A0)"), its kind
# and parameter (047AC0 "move.w ($6,A0), ($2,A2)")
struct spawn_record 08 rom
field spawn_record 00 x u16
field spawn_record 02 y u16
field spawn_record 04 height u8
field spawn_record 05 flags u8
field spawn_record 06 kind_and_parameter u16
# the spawn's place from the kind's offsets in spawn_offsets (047AAE "bsr $47b98", spawn_offset; 047AF2 "add.w (A1), D3")
local spawn_enemies 047AAE a1 offset screen_margin
# ---- the areas' scroll segments ----
# a segment of an area's scroll, by the segment's offset in the area's list (01A70E "lea $205f2.l, A6", 01A714 "movea.l
# (A6,D0.w), A6", 01A71E "movea.l (A6,D0.w), A6"): its mode (01A722 "move.b ($0,A6), $633c9.l": 0 the area's end, below 0 a
# scroll at speeds, else one up to limits); for the speeds, the layers' speeds across and up (01A732 "move.w ($6,A6),
# $6334c.l" ...) and the directions (01A752 "move.b ($e,A6), $6331a.l", 01A76A "move.b ($f,A6), $6331b.l"); for the
# limits, the held scroll and the layers' limits (01A7C4 on: longs from +6)
struct scroll_setting 2A rom
field scroll_setting 00 mode u8
# where the segment ends, for the turtles that run the area on (turtle_run_all): bit 7 of +1 says the end is the
# layer's y, else its x (01A6D8 "move.b ($1,A0), D1", 01A6DC "bpl $1a6e6"), its other bits that the scroll ends past
# it rather than before (01A6E6 "andi.b #$7f, D1"), and +2 the place (01A6EE "cmp.l ($2,A0), D0")
field scroll_setting 01 end_axis u8
field scroll_setting 02 end u32
field scroll_setting 06 held u32
field scroll_setting 06 a_x_speed u16
field scroll_setting 08 a_y_speed u16
field scroll_setting 0A a_x_max u32
field scroll_setting 0A b_x_speed u16
field scroll_setting 0C b_y_speed u16
field scroll_setting 0E a_y_max u32
field scroll_setting 0E y_direction u8
field scroll_setting 0F x_direction u8
field scroll_setting 12 b_x_max u32
field scroll_setting 16 b_y_max u32
field scroll_setting 1A a_x_min u32
field scroll_setting 1E a_y_min u32
field scroll_setting 22 b_x_min u32
field scroll_setting 26 b_y_min u32
local start_scroll_segment 01A71E a6 setting scroll_setting
# an area's list of its scroll segments, a pointer a segment (01A714 "movea.l (A6,D0.w), A6" by the area, then 01A71E
# "movea.l (A6,D0.w), A6" by the segment)
elements scroll_setting_list u32 scroll_setting
0205F2  table  area_scroll_segments  u32 scroll_setting_list

# ---- numbers the C held as addresses of the program (constant lines: by their name in the function) ----
# a hit turtle near the screen's edges reacts another way: x below 0xE000 or from 0x12000 on, positions in 1/256 pixel
# (01C4DE "move.l #$e000, D6", 01C4E4 "move.l #$12000, D7", 01C510 "cmp.l ($12,A0), D6", 01C520 "cmp.l ($12,A0), D7")
constant turtle_hit E000 HIT_NEAR_LEFT_EDGE_X
constant turtle_hit 12000 HIT_NEAR_RIGHT_EDGE_X
# the lift's edge is placed while the scroll is less than this before it (01F7B4 "sub.l $63380.l, D0", 01F7BE "cmpi.l
# #$1a000, D0")
constant place_lift_edge 1A000 LIFT_EDGE_RANGE
# where the drill pod comes down in the area, less the scroll: area 1's (03059C "move.l #$1d6ff, D0", 030764 "move.l
# #$1d6ff, D0"), area 7's as it rumbles (0305B4 "move.l #$5b7ff, D0") and as it opens (03077C "move.l #$5b6ff, D0")
constant drill_arrival_rumble 1D6FF DRILL_POD_X_AREA_1
constant drill_arrival_open 1D6FF DRILL_POD_X_AREA_1
constant drill_arrival_rumble 5B7FF DRILL_POD_X_AREA_7
constant drill_arrival_open 5B6FF DRILL_POD_OPEN_X_AREA_7

# ---- the arcs of the enemies' jumps and falls (struct arc: enemy_start_arc and enemy_arc_step read them) ----
# 049B5E "lea $49b22.l, A6" (enemy_jump_kick_leap); 049B8E "lea $49b22.l, A6" (enemy_jump_kick_fly): the jump kick's
049B22  data  enemy_jump_kick_arc
# 049C14 "lea $49bd8.l, A6" (enemy_long_jump_kick_leap); 049C44 "lea $49bd8.l, A6" (enemy_long_jump_kick_fly): the
# long jump kick's
049BD8  data  enemy_long_jump_kick_arc
# 049EAC "lea $49ea0.l, A6" (enemy_killed_back_start); 049F0A "lea $49ea0.l, A6" (enemy_killed_back_fly): a Foot
# soldier killed, flying backward
049EA0  data  enemy_killed_back_arc
# 049FE8 "lea $49fdc.l, A6" (enemy_killed_forward_start); 04A046 "lea $49fdc.l, A6" (enemy_killed_forward_fly): a Foot
# soldier killed, flying forward
049FDC  data  enemy_killed_forward_arc
# 04A082 "lea $4a114.l, A6" (enemy_killed_forward_lie); 04A120 "lea $4a114.l, A6" (enemy_knocked_forward_start): a
# Foot soldier knocked forward, as he flies (enemy_arc_step only)
04A114  data  enemy_knocked_forward_arc
# 049F46 "lea $4a5c2.l, A6" (enemy_killed_back_lie); 04A29C "lea $4a5c2.l, A6" (enemy_thrown_fly): a Foot soldier
# knocked back or thrown, as he flies (enemy_arc_step only)
04A5C2  data  enemy_knocked_back_arc
# 04B3AA "lea $4b36e.l, A6" (enemy_leaping_slash_sword_leap);
# 04B3FC "lea $4b36e.l, A6" (enemy_leaping_slash_sword_fly): the sword soldier's leaping slash
04B36E  data  enemy_leaping_slash_sword_arc
# 04B482 "lea $4b446.l, A6" (enemy_jump_slash_sword_leap); 04B4B2 "lea $4b446.l, A6" (enemy_jump_slash_sword_fly): the
# sword soldier's jumping slash
04B446  data  enemy_jump_slash_sword_arc
# 04B538 "lea $4b4fc.l, A6" (enemy_flying_slash_sword_leap); 04B5A8 "lea $4b4fc.l, A6" (enemy_flying_slash_sword_fly):
# the sword soldier's flying slash
04B4FC  data  enemy_flying_slash_sword_arc
# 04D942 "lea $4d8d4.l, A6" (enemy_kick_in_leap); 04D972 "lea $4d8d4.l, A6" (enemy_kick_in_fly): the kick a Foot
# soldier comes in with
04D8D4  data  enemy_kick_in_arc
# 04E494 "lea $4e458.l, A6" (enemy_jump_kick_knife_leap); 04E4C4 "lea $4e458.l, A6" (enemy_jump_kick_knife_fly): the
# knife soldier's jump kick
04E458  data  enemy_jump_kick_knife_arc
# 050DAA "lea $50d98.l, A6" (enemy_bebop_knocked_down_start);
# 050DD2 "lea $50d98.l, A6" (enemy_bebop_knocked_down_fall): Bebop knocked down
050D98  data  enemy_bebop_knocked_down_arc
# 050E9C "lea $50e82.l, A6" (enemy_bebop_defeated_start); 050EC6 "lea $50e82.l, A6" (enemy_bebop_defeated_fall): Bebop
# defeated
050E82  data  enemy_bebop_defeated_arc
# 051378 "lea $51350.l, A6" (enemy_mouser_bite_start); 0513AE "lea $51350.l, A6" (enemy_mouser_bite_fly): a Mouser's
# leap to bite
051350  data  enemy_mouser_bite_arc
# 0519E4 "lea $519d8.l, A6" (enemy_mouser_break_down_start): a Mouser breaking down
0519D8  data  enemy_mouser_break_down_arc
# 05199C "lea $51a20.l, A6" (enemy_mouser_thrown_off_start);
# 051A48 "lea $51a20.l, A6" (enemy_mouser_knocked_flying_start): a Mouser knocked flying or thrown off
051A20  data  enemy_mouser_knocked_flying_arc
# 052662 "lea $52618.l, A6" (enemy_rodney_knocked_back_fall): Rodney knocked back, as he falls (enemy_arc_step only)
052618  data  enemy_rodney_knocked_back_arc
# 05263A "lea $526c0.l, A6" (enemy_rodney_knocked_back_start);
# 0526E2 "lea $526c0.l, A6" (enemy_rodney_destroyed_start): Rodney knocked back or destroyed
0526C0  data  enemy_rodney_destroyed_arc
# 053374 "lea $5335c.l, A6" (enemy_shredder_defeated_start); 0533A4 "lea $5335c.l, A6" (enemy_shredder_defeated_fall):
# Shredder defeated
05335C  data  enemy_shredder_defeated_arc

# ---- where a turtle holds the soldier it throws (struct placement: enemy_place_by reads it) ----
# 04A23C "lea $4a1fc.l, A5" (enemy_thrown_by_donatello_swing): Donatello's
04A1FC  data  thrown_by_donatello_placement
# 04A3D0 "lea $4a390.l, A5" (enemy_thrown_by_michelangelo_swing): Michelangelo's
04A390  data  thrown_by_michelangelo_placement
# 04A48E "lea $4a44e.l, A5" (enemy_thrown_by_raphael_swing): Raphael's
04A44E  data  thrown_by_raphael_placement
# 04A54C "lea $4a50c.l, A5" (enemy_thrown_by_leonardo_swing): Leonardo's
04A50C  data  thrown_by_leonardo_placement

# ---- the shots the objects fire, where they start and their kind (struct shot_record: start_shot reads it) ----
# 04D606 "lea $4d558.l, A5" (enemy_rocket_soldier_fire): the rocket soldier's rocket (kind 6F)
04D558  data  rocket_shot_record
# 04D64C "lea $4d55e.l, A5" (enemy_rocket_soldier_struck): the rocket the rocket soldier drops when struck (kind 6F)
04D55E  data  dropped_rocket_shot_record
# 04E388 "lea $4e34e.l, A5" (enemy_spear_throw_release): the spear soldier's thrown spear (kind 06)
04E34E  data  spear_shot_record
# 04E548 "lea $4e50a.l, A5" (enemy_throw_knife_release): the knife soldier's thrown knife (kind 04)
04E50A  data  knife_shot_record
# 04EC32 "lea $4ebee.l, A5" (enemy_throw_axes_release): the axe soldier's thrown axe (kind 08)
04EBEE  data  axe_shot_record
# 04ED32 "lea $4ecee.l, A5" (enemy_shoot_gun_fire): the gun soldier's shot (kind 0A)
04ECEE  data  gun_shot_record
# 04F0D6 "lea $4f08e.l, A5" (enemy_throw_shuriken_release): the shuriken soldier's shuriken (kind 0E)
04F08E  data  shuriken_shot_record
# 04F162 "lea $4f104.l, A5" (enemy_boomerang_throw_release): the boomerang soldier's boomerang (kind 0C)
04F104  data  boomerang_shot_record
# 050CC0 "lea $50c7c.l, A5" (enemy_bebop_shoot_fire): Bebop's shot (kind 64)
050C7C  data  bebop_shot_record
# 0523D4 "lea $5232a.l, A5" (enemy_rodney_shoot_fire): Rodney's laser bolt (kind 58)
05232A  data  laser_bolt_shot_record
# 0524EA "lea $5244a.l, A5" (enemy_rodney_whip_throw_arm): Rodney's whip arm (kind 5D)
05244A  data  whip_arm_shot_record
# 05321E "lea $531c2.l, A5" (enemy_shredder_lose_bar_end): the piece Shredder loses with a bar (kind 6C)
0531C2  data  shredder_piece_shot_record
# 053708 "lea $53622.l, A5" (enemy_shredder_ray_fire): Shredder's ray (kind 6D)
053622  data  shredder_ray_shot_record

# ---- the objects one object starts by another (struct object_record: start_object_from_record reads it) ----
# 04AC32 "lea $4ab4e.l, A5" (motorbike_struck): the rider thrown off the motorbike
04AB4E  data  motorbike_rider_record
# 04AC46 "lea $4ab56.l, A5" (motorbike_struck): the rider thrown off the motorbike in a wheelie
04AB56  data  motorbike_wheelie_rider_record
# 04C76A "lea $4c6d0.l, A5" (elevator_open): the elevator's door
04C6D0  data  elevator_door_record
# 04C776 "lea $4c6d8.l, A5" (elevator_open): its other door
04C6D8  data  elevator_door_record_2
# 04C976 "lea $4c894.l, A5" (tire_soldier_throw): the tire soldier's tire
04C894  data  thrown_tire_record
# 04CAAA "lea $4c9b6.l, A5" (manhole_soldier_throw): the manhole soldier's manhole cover
04C9B6  data  thrown_manhole_cover_record
# 04CA5A "lea $4c9be.l, A5" (manhole_soldier_jump_out): what the manhole soldier leaves as he jumps out
04C9BE  data  manhole_soldier_hole_record
# 04D708 "lea $4d6b8.l, A5" (double_door_wait): a piece of the double door kicked in
04D6B8  data  double_door_piece_record
# 04D714 "lea $4d6c0.l, A5" (double_door_wait): the other piece
04D6C0  data  double_door_piece_record_2
# before them, after double_door's table of routines (04D6A4-04D6AF): a third piece's record, x 0 between the two
# (+0x10 and -0x10), the same y, height and kind 0003, which double_door_wait does not start (no lea names 04D6B0)
04D6B0  data  unused_double_door_piece_record
# 04D790 "lea $4d75c.l, A5" (technodrome_door_wait); 04D7F6 "lea $4d75c.l, A5" (technodrome_door_let_out): the soldier
# the Technodrome's door lets out
04D75C  data  technodrome_door_soldier_record
# 052D96 "lea $52d5a.l, A5" (enemy_shredder_split_start): the clone Shredder splits off
052D5A  data  shredder_clone_record

# ---- the shadows (sprite lists an object's +3A holds: draw_sprites draws them under it) ----
# 019CC4 "move.l #$2e928, ($3a,A0)" (turtle_init); 01F3F4 "move.l #$2e928, ($3a,A0)" (update_layers_building_site):
# the shadow the turtles, the Foot soldiers and most objects start with
02E928  data  common_shadow
# 00F9C0 "lea $16660.l, A6" (ball_drop); 00FB12 "lea $16660.l, A6" (technodrome_ball_drop): the small shadow of the
# bouncing balls and the turrets
016660  data  ball_shadow
# 010816 "lea $16668.l, A6" (turret_shot_start): a turret's shot's shadow
016668  data  turret_shot_shadow
# 010828 "lea $16670.l, A6" (turret_shot_start): a turret's shot's shadow in the Technodrome (stage 8)
016670  data  turret_shot_technodrome_shadow
# 011DAA "lea $16c50.l, A6" (rock_soldier_site_jump_start): the rock soldier's shadow as he jumps
016C50  data  rock_soldier_shadow
# 012772 "lea $16f20.l, A5" (rock_soldier_technodrome_start_missile): the shadow of the missiles the Technodrome's
# rock soldier fires
016F20  data  missile_shadow
# 012D90 "lea $171a0.l, A6" (helicopter_start): a helicopter's shadow, facing right
0171A0  data  helicopter_shadow
# 012DAA "lea $171a8.l, A6" (helicopter_start): a helicopter's shadow, facing left (a parameter with bit 7)
0171A8  data  helicopter_flipped_shadow
# 01353C "lea $17958.l, A6" (flying_drone_wait): a flying drone's shadow
017958  data  flying_drone_shadow
# 013C62 "lea $17c20.l, A6" (stockman_start): Baxter Stockman's shadow
017C20  data  stockman_shadow
# 014308 "lea $17c38.l, A5" (stockman_start_mouser): a Mouser's shadow as it falls from Stockman
017C38  data  mouser_shadow
# 04EFBC "move.l #$5ca54, ($3a,A0)" (enemy_skateboard_soldier_start);
# 04F06C "move.l #$5ca54, ($3a,A0)" (enemy_skateboard_think): the skateboard soldier's board under him, the first of
# the two it changes between every 4 frames
05CA54  data  skateboard_shadow
# 04F062 "move.l #$5ca5c, ($3a,A0)" (enemy_skateboard_think): the other one
05CA5C  data  skateboard_shadow_2

# ---- the tile blocks draw_tile_block draws into the layers (the slot it takes, in D7) ----
# 0102E0 "lea $18854.l, A6" (billboard_land): where the billboard stood, once it falls (slot 0)
018854  data  billboard_fallen_tile_block
# 0494E8 "lea $189d8.l, A6" (enemy_crash_into_scenery_start): the scenery a thrown soldier crashes into, broken: the
# first block (slot 0x14)
0189D8  data  scenery_crash_tile_block_1
# 0494F8 "lea $18a12.l, A6" (enemy_crash_into_scenery_start): the second (slot 0x15)
018A12  data  scenery_crash_tile_block_2
# 049508 "lea $18a70.l, A6" (enemy_crash_into_scenery_start);
# 04959E "lea $18a70.l, A6" (enemy_crash_into_scenery_low_start): the third (slot 0x16; 0x1A after a low crash)
018A70  data  scenery_crash_tile_block_3
# 049518 "lea $18a8a.l, A6" (enemy_crash_into_scenery_start);
# 0495AE "lea $18a8a.l, A6" (enemy_crash_into_scenery_low_start): the fourth (slot 0x17; 0x1B after a low crash)
018A8A  data  scenery_crash_tile_block_4
# 04957E "lea $18a24.l, A6" (enemy_crash_into_scenery_low_start): the scenery a soldier crashes into low, broken: the
# first block (slot 0x18)
018A24  data  scenery_crash_low_tile_block_1
# 04958E "lea $18a5e.l, A6" (enemy_crash_into_scenery_low_start): the second (slot 0x19)
018A5E  data  scenery_crash_low_tile_block_2
# 030894 "lea $18aec.l, A6" (drill_arrival_end): the hole the drill pod leaves in area 1's ceiling (slot 3)
018AEC  data  drill_hole_area_1_tile_block
# 0308B6 "lea $18bae.l, A6" (drill_arrival_end): the rest of it (slot 4)
018BAE  data  drill_hole_area_1_tile_block_2
# 0308A8 "lea $18f16.l, A6" (drill_arrival_end): the hole the drill pod leaves in area 7's ceiling (slot 0x1C)
018F16  data  drill_hole_tile_block
# 0308CA "lea $18fb8.l, A6" (drill_arrival_end): the rest of it (slot 0x1D)
018FB8  data  drill_hole_tile_block_2
# 012A72 "lea $18c28.l, A6" (parked_car_draw): the parked car of area 4, drawn into the layer (slot 5)
018C28  data  parked_car_tile_block
# 04D6F8 "lea $1904a.l, A6" (double_door_wait): the double door kicked in (slot 0x22)
01904A  data  double_door_kicked_tile_block
# 04D730 "lea $19100.l, A6" (double_door_open): the double door open (slot 0x23)
019100  data  double_door_open_tile_block
# 04D740 "lea $19152.l, A6" (double_door_open): the rest of it (slot 0x24)
019152  data  double_door_open_tile_block_2
# 0126DA "lea $191a4.l, A6" (wall_slab_start): the wall where the slab breaks out (slot 0x25)
0191A4  data  wall_slab_tile_block

# ---- the layers' blocks and maps the cutscenes put in a layer (+12 map, +16 blocks) ----
# 02D0D2 "move.l #$31380, $63316.l" (exit_building_site_splinter_picture): the blocks of Splinter's picture after area
# 7
031380  data  splinter_picture_blocks
# 02BDF6 "move.l #$315c4, $63316.l" (exit_sewer_villains_picture): the blocks of the villains' picture after the sewer
0315C4  data  villains_picture_blocks
# 02BE1E "move.l #$3173c, $63316.l" (exit_sewer_villains_picture): the second picture's blocks
03173C  data  villains_picture_blocks_2
# 02F7C4 "move.l #$3eb8a, $63396.l" (start_opening): layer B's blocks in the opening
03EB8A  data  opening_layer_b_blocks
# 02F7BA "move.l #$3f796, $63356.l" (start_opening): layer A's blocks in the opening
03F796  data  opening_layer_a_blocks
# 02FF5E "move.l #$459f8, $63316.l" (draw_technodrome_screen): the blocks of the Technodrome's screen
0459F8  data  technodrome_screen_blocks
# 02FFA0 "move.l #$45d4a, $63312.l" (draw_technodrome_screen): the map of its second picture
045D4A  data  technodrome_screen_map_2
# 02FFAA "move.l #$45e4a, $63316.l" (draw_technodrome_screen): the blocks of its second picture
045E4A  data  technodrome_screen_blocks_2
# 030EB2 "move.l #$4628c, $63316.l" (intro_roof_start): the blocks of the burning roof before area 0
04628C  data  intro_roof_blocks
# 02C490 "move.l #$46622, $63312.l" (exit_car_street_april_hug_start);
# 02C6E6 "move.l #$46622, $63312.l" (exit_car_street_april_hug): the map of April's hug after the car street
046622  data  april_hug_map
# 02C74E "move.l #$46722, $63312.l" (exit_car_street_april_hug): the map of its second picture
046722  data  april_hug_map_2
# 02C49A "move.l #$46822, $63316.l" (exit_car_street_april_hug_start);
# 02C6F0 "move.l #$46822, $63316.l" (exit_car_street_april_hug): the blocks of April's hug
046822  data  april_hug_blocks
# 02C462 "move.l #$46d52, $63316.l" (exit_car_street_april_hug_start): the blocks it starts with
046D52  data  april_hug_first_blocks

# ---- a text ----
# 006E62 "lea $199a4.l, A6" (ending_start_epilogue): the epilogue's text, typed in colours after the Technodrome falls
0199A4  data  epilogue_typed_text

# ---- scenes ----
# 030608 "lea $2d7ba.l, A6" (drill_arrival_rumble): the ceiling the drill pod breaks through in area 1 (stage 1)
02D7BA  data  drill_ceiling_area_1_animation
# 03061A "lea $2d7f8.l, A6" (drill_arrival_rumble): the ceiling the drill pod breaks through elsewhere (area 7)
02D7F8  data  drill_ceiling_animation
# 03063A "lea $2d836.l, A6" (drill_arrival_rumble): the drill pod itself
02D836  data  drill_pod_animation
# 02B7BC "lea $2d842.l, A6" (exit_apartment_shredder_appears): Shredder in the apartment's doorway
02D842  data  shredder_appears_animation
# 02B7FA "lea $2d84c.l, A6" (exit_apartment_shredder_takes_april): Shredder grabbing April
02D84C  data  shredder_grabs_april_animation
# 02B828 "lea $2d88e.l, A6" (exit_apartment_shredder_takes_april): Shredder carrying April off
02D88E  data  shredder_carries_april_animation
# 01E3B6 "lea $2d8ae.l, A6" (start_layers_apartment): April in her apartment, standing
02D8AE  data  april_standing_animation
# 02C030 "lea $2d8c8.l, A6" (turtle_exit_car_street); 02C9E2 "lea $2d8c8.l, A6" (turtle_exit_skateboard_gather): the
# turtles' van driving off
02D8C8  data  turtle_van_animation
# 02C040 "lea $2d8e2.l, A6" (turtle_exit_car_street); 02C9F2 "lea $2d8e2.l, A6" (turtle_exit_skateboard_gather): the
# back of the van, the second object it is drawn with
02D8E2  data  turtle_van_rear_animation
# 02FB2E "lea $2da26.l, A6" (opening_sweep_to_street): the manhole cover the turtles push up
02DA26  data  opening_manhole_cover_animation
# 02FAF8 "lea $2da30.l, A6" (opening_sweep_to_street): the post in the street the sweep stops at
02DA30  data  opening_street_post_animation
# 02FC26 "lea $2da3a.l, A6" (opening_turtles_leap_out): the light the turtles leap out in
02DA3A  data  opening_turtles_leap_out_animation
# 02FB80 "lea $2dab8.l, A6" (opening_turtles_ready): the manhole's rim as the turtles stand ready
02DAB8  data  opening_turtles_ready_animation
# 02F89E "lea $2dad2.l, A6" (start_opening): the smoke over the city
02DAD2  data  opening_smoke_animation
# 02F88E "lea $2dadc.l, A6" (start_opening): the smoke, then a turtle climbing
02DADC  data  opening_smoke_and_turtle_animation
# 01F3FC "lea $2dae6.l, A6" (update_layers_building_site): Splinter tied up, struggling
02DAE6  data  splinter_struggles_animation
# 01F412 "lea $2db0a.l, A6" (update_layers_building_site);
# 02B520 "lea $2db0a.l, A6" (turtle_exit_building_site_start): Splinter tied up, still
02DB0A  data  splinter_tied_up_animation
# 02CEEE "lea $2db1e.l, A6" (exit_building_site_free_splinter): Splinter freed, standing
02DB1E  data  splinter_freed_animation
# 02CEDE "lea $2db28.l, A6" (exit_building_site_free_splinter): Splinter freed, stretching
02DB28  data  splinter_stretches_animation
# 030A92 "lea $2db4c.l, A6" (intro_rooftop_start): April waving on the rooftop
02DB4C  data  april_on_rooftop_animation
# 01F538 "lea $2db6c.l, A6" (technodrome_reach_lift): the Technodrome's lift and the HURRY! sign
02DB6C  data  technodrome_lift_animation
# 01EC5A "lea $2db76.l, A6" (update_area_layers): the HURRY! sign, the arrow to the right
02DB76  data  hurry_arrow_animation
# 01EC6A "lea $2dbae.l, A6" (update_area_layers): the HURRY! sign, the arrow down and to the right
02DBAE  data  hurry_arrow_down_animation
# 02BA78 "lea $2dc36.l, A6" (exit_apartment_kidnap_picture): April carried off, the picture between the areas
02DC36  data  april_kidnapped_picture_animation
# 02D238 "lea $2dee6.l, A6" (exit_building_site_splinter_thanks): Splinter thanking the turtles
02DEE6  data  splinter_thanks_animation
# 030FD6 "lea $2df32.l, A6" (intro_roof_land): a turtle landing on the burning roof
02DF32  data  intro_turtle_lands_animation
# 01A018 "lea $2e0ec.l, A6" (start_fall_in_entry): the four turtles falling in
02E0EC  data  turtles_fall_in_animation
# 01F286 "lea $2e11a.l, A6" (update_layers_car_street): the two small figures update_layers_car_street places
02E11A  data  car_street_bystanders_animation
# 02B47C "lea $2e134.l, A6" (turtle_exit_car_street_start): a turtle cheering, arms up
02E134  data  turtle_cheer_animation
# 02BE50 "lea $2e162.l, A6" (exit_sewer_villains_picture): April tied up, the villains' picture
02E162  data  april_tied_up_picture_animation
# right after that still's end (02E16C, 00 00): three frames that loop (02E18C, 00 80 and a jump to 02E16E), the still's
# picture moving (its sprites 02F558, 02F578, then the still's own 02F530: rendered): an animation no code starts (no
# lea or table names 02E16E), walked from here (tools/data_walk.py, UNUSED_ANIMATIONS)
02E16E  data  unused_april_tied_up_animation
# 019E52 "lea $2e1c0.l, A6" (turtle_jump_in_start): the lines a turtle jumps in with
02E1C0  data  turtle_jump_in_animation

# ---- objects ----
# 04AB1C "lea $4aa16.l, A6" (falling_debris_fall): the animation falling_debris_fall sets
04AA16  data  falling_debris_animation
# 04C514 "lea $4c41a.l, A6" (kicked_door_wait): a door a Foot soldier kicks in
04C41A  data  kicked_door_animation
# 04C544 "lea $4c444.l, A6" (kicked_door_break); 04D082 "lea $4c444.l, A6" (enemy_step_down_start): a Foot soldier
# stepping down
04C444  data  enemy_step_down_animation
# 04C742 "lea $4c668.l, A6" (elevator_open): the elevator's doors
04C668  data  elevator_doors_animation
# 04914E "lea $4cb1e.l, A6" (enemy_hop_up_fall); 04CCDE "lea $4cb1e.l, A6" (window_soldier_drop_fall): a Foot soldier
# dropping, legs bent
04CB1E  data  enemy_drop_animation
# 04CE44 "lea $4cd26.l, A6" (window_soldier_dive_fall): the animation window_soldier_dive_fall sets
04CD26  data  window_soldier_dive_animation
# 04CEE4 "lea $4ce7a.l, A6" (glass_shards_start): the animation glass_shards_start sets
04CE7A  data  glass_shards_animation
# 04910E "lea $4cf5e.l, A6" (enemy_hop_up); 04CFF8 "lea $4cf5e.l, A6" (enemy_jump_down_leap): a Foot soldier hopping
# up
04CF5E  data  enemy_hop_up_animation
# 04D876 "lea $4cf68.l, A6" (enemy_hang_in_move): the animation enemy_hang_in_move sets
04CF68  data  enemy_hang_in_animation
# 04D23E "lea $4d0d6.l, A6" (sewer_ripple_swim): the animation sewer_ripple_swim sets
04D0D6  data  sewer_ripple_swim_animation
# 04D254 "lea $4d100.l, A6" (sewer_ripple_leap_out): the animation sewer_ripple_leap_out sets
04D100  data  sewer_ripple_leap_out_animation
# 04D4F0 "lea $4d3a8.l, A6" (bomber_throw): the animation bomber_throw sets
04D3A8  data  bomber_throw_animation

# ---- foot ----
# 04D51E "lea $547f8.l, A6" (bomber_step_out): the animation bomber_step_out sets
0547F8  data  bomber_step_out_animation
# 049CB4 "lea $54872.l, A6" (enemy_grab_start): the animation enemy_grab_start sets
054872  data  enemy_grab_animation
# 04932E "lea $54908.l, A6" (enemy_retreat_start); 04D9EC "lea $54908.l, A6" (enemy_run_in_start): a Foot soldier
# running, then turning over
054908  data  enemy_run_animation
# 04970C "lea $549e4.l, A6" (enemy_walk_to_side_crouch); 049912 "lea $549e4.l, A6" (enemy_back_off_walk): a Foot
# soldier walking crouched
0549E4  data  enemy_crouch_walk_animation
# 04926A "lea $54a18.l, A6" (enemy_shuffle_start): the animation enemy_shuffle_start sets
054A18  data  enemy_shuffle_start_animation
# 04929A "lea $54a38.l, A6" (enemy_shuffle_step); 0492CC "lea $54a38.l, A6" (enemy_shuffle_turn): a Foot soldier
# shuffling sideways
054A38  data  enemy_shuffle_step_animation
# 0492BC "lea $54a62.l, A6" (enemy_shuffle_turn): the animation enemy_shuffle_turn sets
054A62  data  enemy_shuffle_turn_animation
# 04945C "lea $54a78.l, A6" (enemy_charge_start); 04D910 "lea $54a78.l, A6" (enemy_kick_in_start): a Foot soldier
# dashing in
054A78  data  enemy_dash_animation
# 048F66 "lea $54ace.l, A6" (enemy_hop_crouch); 048FEC "lea $54ace.l, A6" (enemy_hop_fall): a Foot soldier crouched
# (one frame)
054ACE  data  enemy_crouch_animation
# 048FAC "lea $54ada.l, A6" (enemy_hop_down); 04905A "lea $54ada.l, A6" (enemy_hop_right): a Foot soldier leaping,
# stretched (one frame)
054ADA  data  enemy_leap_animation
# 04DB28 "lea $54ae4.l, A6" (enemy_dive_in_uncurl): the animation enemy_dive_in_uncurl sets
054AE4  data  enemy_dive_in_uncurl_animation
# 04DB0C "lea $54aee.l, A6" (enemy_dive_in_curl): the animation enemy_dive_in_curl sets
054AEE  data  enemy_dive_in_curl_animation
# 049B74 "lea $54b1c.l, A6" (enemy_jump_kick_leap); 049C2A "lea $54b1c.l, A6" (enemy_long_jump_kick_leap): a Foot
# soldier's flying kick
054B1C  data  enemy_jump_kick_animation
# 049DF4 "lea $54b4e.l, A6" (enemy_flinch_back_start): the animation enemy_flinch_back_start sets
054B4E  data  enemy_flinch_back_animation
# 049E28 "lea $54b82.l, A6" (enemy_flinch_bent_start): the animation enemy_flinch_bent_start sets
054B82  data  enemy_flinch_bent_animation
# 049E4C "lea $54bac.l, A6" (enemy_flinch_reel_start): the animation enemy_flinch_reel_start sets
054BAC  data  enemy_flinch_reel_animation
# 049E70 "lea $54bd6.l, A6" (enemy_flinch_hunched_start): the animation enemy_flinch_hunched_start sets
054BD6  data  enemy_flinch_hunched_animation
# 049FF4 "lea $54bec.l, A6" (enemy_killed_forward_start); 04A12C "lea $54bec.l, A6" (enemy_knocked_forward_start): a
# Foot soldier knocked forward
054BEC  data  enemy_knocked_forward_animation
# 04A066 "lea $54bf6.l, A6" (enemy_killed_forward_fly); 04A168 "lea $54bf6.l, A6" (enemy_knocked_forward_fly): a Foot
# soldier flying forward, flat
054BF6  data  enemy_knocked_forward_fly_animation
# 04A1C6 "lea $54c16.l, A6" (enemy_knocked_forward_wait): a Foot soldier lying face down
054C16  data  enemy_knocked_forward_lie_animation
# 049EB8 "lea $54c54.l, A6" (enemy_killed_back_start); 04A5DA "lea $54c54.l, A6" (enemy_knocked_back_start): a Foot
# soldier knocked back
054C54  data  enemy_knocked_back_animation
# 049F2A "lea $54c6a.l, A6" (enemy_killed_back_fly); 04A2BC "lea $54c6a.l, A6" (enemy_thrown_fly): a Foot soldier
# flying backward
054C6A  data  enemy_knocked_back_fly_animation
# 04A682 "lea $54c94.l, A6" (enemy_knocked_back_wait): a Foot soldier lying on his back
054C94  data  enemy_knocked_back_lie_animation
# 049A1A "lea $54cc8.l, A6" (enemy_jab_start): the animation enemy_jab_start sets
054CC8  data  enemy_jab_animation
# 049A66 "lea $54d02.l, A6" (enemy_chop_start): the animation enemy_chop_start sets
054D02  data  enemy_chop_animation
# 049AA2 "lea $54d3c.l, A6" (enemy_swing_start): the animation enemy_swing_start sets
054D3C  data  enemy_swing_animation
# 049ADE "lea $54d76.l, A6" (enemy_high_kick_start): the animation enemy_high_kick_start sets
054D76  data  enemy_high_kick_animation
# 04A6DA "lea $54dba.l, A6" (enemy_die_start): the animation enemy_die_start sets
054DBA  data  enemy_die_animation
# 04A72C "lea $54e16.l, A6" (enemy_die_on_back_start): the animation enemy_die_on_back_start sets
054E16  data  enemy_die_on_back_animation
# 04A02E "lea $54e62.l, A6" (enemy_killed_forward_fly): a Foot soldier killed, falling forward
054E62  data  enemy_killed_forward_animation
# 04A0CE "lea $54e82.l, A6" (enemy_killed_forward_slide_down): the animation enemy_killed_forward_slide_down sets
054E82  data  enemy_killed_forward_slide_down_animation
# 049EF2 "lea $54eac.l, A6" (enemy_killed_back_fly); 04A284 "lea $54eac.l, A6" (enemy_thrown_fly): a Foot soldier
# spinning head over heels
054EAC  data  enemy_spin_animation
# 049F92 "lea $54ecc.l, A6" (enemy_killed_back_slide_down): the animation enemy_killed_back_slide_down sets
054ECC  data  enemy_killed_back_slide_down_animation
# 04CA1E "lea $54eec.l, A6" (manhole_soldier_wait): the animation manhole_soldier_wait sets
054EEC  data  manhole_soldier_wait_animation
# 04CA8A "lea $54f20.l, A6" (manhole_soldier_fly): the animation manhole_soldier_fly sets
054F20  data  manhole_soldier_fly_animation
# 04C990 "lea $54f36.l, A6" (tire_soldier_throw); 04CAC4 "lea $54f36.l, A6" (manhole_soldier_throw): a soldier
# throwing from a crouch
054F36  data  enemy_throw_low_animation
# 04C9FA "lea $54f56.l, A6" (manhole_soldier_start): the animation manhole_soldier_start sets
054F56  data  manhole_soldier_start_animation
# 04BAA6 "lea $54f60.l, A6" (rolling_manhole_cover_start): the animation rolling_manhole_cover_start sets
054F60  data  rolling_manhole_cover_animation
# 04B452 "lea $55824.l, A6" (enemy_jump_slash_sword_start); 04B4D2 "lea $55824.l, A6" (enemy_jump_slash_sword_fly):
# the sword soldier holding his sword ready
055824  data  enemy_sword_ready_animation
# 04B57A "lea $55830.l, A6" (enemy_flying_slash_sword_leap): the animation enemy_flying_slash_sword_leap sets
055830  data  enemy_flying_slash_sword_leap_animation
# 04B590 "lea $55840.l, A6" (enemy_flying_slash_sword_fly): the animation enemy_flying_slash_sword_fly sets
055840  data  enemy_flying_slash_sword_fly_animation
# 04AE46 "lea $55852.l, A6" (enemy_walk_to_side_sword_crouch); 04AF9C "lea $55852.l, A6" (enemy_back_off_sword_walk):
# the sword soldier walking crouched
055852  data  enemy_sword_crouch_walk_animation
# 04B498 "lea $55878.l, A6" (enemy_jump_slash_sword_leap): the animation enemy_jump_slash_sword_leap sets
055878  data  enemy_jump_slash_sword_animation
# 04B64A "lea $558aa.l, A6" (enemy_flinch_back_sword_start): the animation enemy_flinch_back_sword_start sets
0558AA  data  enemy_flinch_back_sword_animation
# 04B66E "lea $558de.l, A6" (enemy_flinch_bent_sword_start): the animation enemy_flinch_bent_sword_start sets
0558DE  data  enemy_flinch_bent_sword_animation
# 04B692 "lea $55908.l, A6" (enemy_flinch_reel_sword_start): the animation enemy_flinch_reel_sword_start sets
055908  data  enemy_flinch_reel_sword_animation
# 04B6B6 "lea $55932.l, A6" (enemy_flinch_hunched_sword_start): the animation enemy_flinch_hunched_sword_start sets
055932  data  enemy_flinch_hunched_sword_animation
# 04B2EE "lea $55948.l, A6" (enemy_slash_sword_start): the animation enemy_slash_sword_start sets
055948  data  enemy_slash_sword_animation
# 04B32A "lea $5598c.l, A6" (enemy_low_slash_sword_start): the animation enemy_low_slash_sword_start sets
05598C  data  enemy_low_slash_sword_animation
# 04B37A "lea $559c8.l, A6" (enemy_leaping_slash_sword_start): the animation enemy_leaping_slash_sword_start sets
0559C8  data  enemy_leaping_slash_sword_start_animation
# 04B3E2 "lea $559de.l, A6" (enemy_leaping_slash_sword_leap): the animation enemy_leaping_slash_sword_leap sets
0559DE  data  enemy_leaping_slash_sword_leap_animation
# 04B41C "lea $55a18.l, A6" (enemy_leaping_slash_sword_fly): the animation enemy_leaping_slash_sword_fly sets
055A18  data  enemy_leaping_slash_sword_fly_animation
# 04F0B4 "lea $55a24.l, A6" (enemy_throw_shuriken_start): the animation enemy_throw_shuriken_start sets
055A24  data  enemy_throw_shuriken_animation
# 04BF40 "lea $55a62.l, A6" (shuriken_start): a shuriken spinning
055A62  data  shuriken_spin_animation
# 04BF64 "lea $55a9e.l, A6" (shuriken_struck_without_sound); 04BFB2 "lea $55a9e.l, A6" (shuriken_struck): a shuriken struck
055A9E  data  shuriken_struck_animation
# 04BF84 "lea $55aa8.l, A6" (shuriken_fly): a shuriken flying
055AA8  data  shuriken_fly_animation
# 04F10E "lea $55abe.l, A6" (enemy_boomerang_throw_wind_up): the animation enemy_boomerang_throw_wind_up sets
055ABE  data  enemy_boomerang_throw_wind_up_animation
# 04F142 "lea $55af2.l, A6" (enemy_boomerang_throw_aim): the animation enemy_boomerang_throw_aim sets
055AF2  data  enemy_boomerang_throw_aim_animation
# 04F1AC "lea $55b3a.l, A6" (enemy_boomerang_throw_wait): the animation enemy_boomerang_throw_wait sets
055B3A  data  enemy_boomerang_throw_wait_animation
# 04BE4E "lea $55b96.l, A6" (boomerang_start): the animation boomerang_start sets
055B96  data  boomerang_start_animation
# 04BEDC "lea $55c2c.l, A6" (boomerang_struck): the animation boomerang_struck sets
055C2C  data  boomerang_struck_animation
# 04DD20 "lea $55c60.l, A6" (enemy_spear_soldier_start): the spear soldier standing with his spear
055C60  data  enemy_spear_soldier_animation
# 04DED0 "lea $55d62.l, A6" (enemy_back_off_spear_walk): the animation enemy_back_off_spear_walk sets
055D62  data  enemy_back_off_spear_animation
# 04E2D8 "lea $55d6c.l, A6" (enemy_spear_thrust_start): the animation enemy_spear_thrust_start sets
055D6C  data  enemy_spear_thrust_animation
# 04E374 "lea $55db6.l, A6" (enemy_spear_throw_start): the spear soldier throwing his spear
055DB6  data  enemy_spear_throw_animation
# 04BC44 "lea $55df4.l, A6" (spear_start): the animation spear_start sets
055DF4  data  spear_start_animation
# 04BC84 "lea $55e06.l, A6" (spear_struck): the animation spear_struck sets
055E06  data  spear_struck_animation
# 04E57E "lea $55e30.l, A6" (enemy_flinch_back_spear_start): the animation enemy_flinch_back_spear_start sets
055E30  data  enemy_flinch_back_spear_animation
# 04E5A2 "lea $55e64.l, A6" (enemy_flinch_bent_spear_start): the animation enemy_flinch_bent_spear_start sets
055E64  data  enemy_flinch_bent_spear_animation
# 04E5C6 "lea $55e8e.l, A6" (enemy_flinch_reel_spear_start): the animation enemy_flinch_reel_spear_start sets
055E8E  data  enemy_flinch_reel_spear_animation
# 04E5EA "lea $55eb8.l, A6" (enemy_flinch_hunched_spear_start): the animation enemy_flinch_hunched_spear_start sets
055EB8  data  enemy_flinch_hunched_spear_animation
# 04E7A2 "lea $56a08.l, A6" (enemy_gun_soldier_start): the gun soldier standing
056A08  data  enemy_gun_soldier_animation
# 04ECAE "lea $56ab4.l, A6" (enemy_gun_swing_start): the gun soldier swinging his gun
056AB4  data  enemy_gun_swing_animation
# 04ED14 "lea $56af0.l, A6" (enemy_shoot_gun_start): the animation enemy_shoot_gun_start sets
056AF0  data  enemy_shoot_gun_animation
# 04E970 "lea $56b1e.l, A6" (enemy_back_off_gun_walk); 04ED50 "lea $56b1e.l, A6" (enemy_shoot_gun_fire): the gun
# soldier walking crouched
056B1E  data  enemy_gun_crouch_walk_animation
# 04BD68 "lea $56b2a.l, A6" (gun_shot_start): the animation gun_shot_start sets
056B2A  data  gun_shot_start_animation
# 04BDEE "lea $56b3c.l, A6" (gun_shot_fly): a gun shot struck
056B3C  data  gun_shot_struck_animation
# 04BDD6 "lea $56b5c.l, A6" (gun_shot_fly): a gun shot bursting
056B5C  data  gun_shot_burst_animation
# 04ED76 "lea $56b7c.l, A6" (enemy_flinch_back_gun_start): the animation enemy_flinch_back_gun_start sets
056B7C  data  enemy_flinch_back_gun_animation
# 04ED9A "lea $56bb0.l, A6" (enemy_flinch_bent_gun_start): the animation enemy_flinch_bent_gun_start sets
056BB0  data  enemy_flinch_bent_gun_animation
# 04E464 "lea $57088.l, A6" (enemy_jump_kick_knife_crouch); 04E4E4 "lea $57088.l, A6" (enemy_jump_kick_knife_fly): the
# knife soldier crouched
057088  data  enemy_knife_crouch_animation
# 04E3D8 "lea $570aa.l, A6" (enemy_knife_stab_start): the animation enemy_knife_stab_start sets
0570AA  data  enemy_knife_stab_animation
# 04E530 "lea $570dc.l, A6" (enemy_throw_knife_start): the animation enemy_throw_knife_start sets
0570DC  data  enemy_throw_knife_animation
# 04BB7C "lea $5711a.l, A6" (knife_start): the animation knife_start sets
05711A  data  knife_start_animation
# 04BBEE "lea $5712c.l, A6" (knife_fly): the animation knife_struck sets
05712C  data  knife_struck_animation
# 04E414 "lea $5714c.l, A6" (enemy_high_kick_knife_start): the animation enemy_high_kick_knife_start sets
05714C  data  enemy_high_kick_knife_animation
# 04E4AA "lea $57190.l, A6" (enemy_jump_kick_knife_leap): the animation enemy_jump_kick_knife_leap sets
057190  data  enemy_jump_kick_knife_animation
# 04E60E "lea $571c2.l, A6" (enemy_flinch_back_knife_start): the animation enemy_flinch_back_knife_start sets
0571C2  data  enemy_flinch_back_knife_animation
# 04E632 "lea $571f6.l, A6" (enemy_flinch_bent_knife_start): the animation enemy_flinch_bent_knife_start sets
0571F6  data  enemy_flinch_bent_knife_animation
# 04E656 "lea $57220.l, A6" (enemy_flinch_reel_knife_start): the animation enemy_flinch_reel_knife_start sets
057220  data  enemy_flinch_reel_knife_animation
# 04E67A "lea $5724a.l, A6" (enemy_flinch_hunched_knife_start): the animation enemy_flinch_hunched_knife_start sets
05724A  data  enemy_flinch_hunched_knife_animation
# 04E70E "lea $575aa.l, A6" (enemy_axe_soldier_start): the axe soldier standing
0575AA  data  enemy_axe_soldier_animation
# 04EC14 "lea $576ac.l, A6" (enemy_throw_axes_start): the animation enemy_throw_axes_start sets
0576AC  data  enemy_throw_axes_animation
# 04EB40 "lea $576e4.l, A6" (enemy_back_off_axe_walk); 04EC50 "lea $576e4.l, A6" (enemy_throw_axes_release): the axe
# soldier walking crouched
0576E4  data  enemy_axe_crouch_walk_animation
# 04BCE2 "lea $576f0.l, A6" (axe_start): the animation axe_start sets
0576F0  data  axe_start_animation
# 04EC72 "lea $5773a.l, A6" (enemy_high_kick_axe_start): the animation enemy_high_kick_axe_start sets
05773A  data  enemy_high_kick_axe_animation
# 04EDBE "lea $5777e.l, A6" (enemy_flinch_back_axe_start): the animation enemy_flinch_back_axe_start sets
05777E  data  enemy_flinch_back_axe_animation
# 04EDE2 "lea $577b2.l, A6" (enemy_flinch_bent_axe_start): the animation enemy_flinch_bent_axe_start sets
0577B2  data  enemy_flinch_bent_axe_animation
# 04EE06 "lea $577dc.l, A6" (enemy_flinch_reel_axe_start): the animation enemy_flinch_reel_axe_start sets
0577DC  data  enemy_flinch_reel_axe_animation
# 04B20A "lea $57bf2.l, A6" (enemy_stalk_hammer_step); 04B2AE "lea $57bf2.l, A6" (enemy_walk_away_hammer_walk): the
# hammer soldier walking
057BF2  data  enemy_hammer_walk_animation
# 04B5EA "lea $57bfe.l, A6" (enemy_smash_hammer_start): the animation enemy_smash_hammer_start sets
057BFE  data  enemy_smash_hammer_animation
# 04B6DA "lea $57c62.l, A6" (enemy_flinch_back_hammer_start): the animation enemy_flinch_back_hammer_start sets
057C62  data  enemy_flinch_back_hammer_animation
# 04B6FE "lea $57c96.l, A6" (enemy_flinch_bent_hammer_start); 04B722 "lea $57c96.l, A6" (enemy_flinch_hunched_hammer_start): the hammer
# soldier bent over by a hit
057C96  data  enemy_flinch_bent_hammer_animation

# ---- bosses ----
# 050FF6 "lea $5811a.l, A6" (enemy_mouser_start): the animation enemy_mouser_start sets
05811A  data  enemy_mouser_animation
# 05135C "lea $58134.l, A6" (enemy_mouser_bite_start); 051520 "lea $58134.l, A6" (enemy_mouser_hop_down): a Mouser
# hopping
058134  data  enemy_mouser_hop_animation
# 0519A8 "lea $58146.l, A6" (enemy_mouser_thrown_off_start);
# 0519F0 "lea $58146.l, A6" (enemy_mouser_break_down_start): a Mouser tumbling
058146  data  enemy_mouser_tumble_animation
# 0510A4 "lea $581ba.l, A6" (enemy_mouser_enter_hop); 051648 "lea $581ba.l, A6" (enemy_mouser_hop_up): a Mouser
# hopping up
0581BA  data  enemy_mouser_hop_up_animation
# 0510D6 "lea $581c4.l, A6" (enemy_mouser_enter_fall); 051686 "lea $581c4.l, A6" (enemy_mouser_hop_up_fall): a Mouser
# falling
0581C4  data  enemy_mouser_fall_animation
# 051AA2 "lea $581d0.l, A6" (enemy_mouser_fly_and_crash): the animation enemy_mouser_fly_and_crash sets
0581D0  data  enemy_mouser_fly_and_crash_animation
# 05227A "lea $585de.l, A6" (enemy_rodney_back_off_start); 05236C "lea $585de.l, A6" (enemy_rodney_shoot_start):
# Rodney backing off
0585DE  data  enemy_rodney_back_off_animation
# 0522BA "lea $5860c.l, A6" (enemy_rodney_slide_to_stop): the animation enemy_rodney_slide_to_stop sets
05860C  data  enemy_rodney_slide_to_stop_animation
# 0520F2 "lea $58636.l, A6" (enemy_rodney_rush_run); 052216 "lea $58636.l, A6" (enemy_rodney_rush_across_run): Rodney
# rushing
058636  data  enemy_rodney_rush_animation
# 052104 "lea $58660.l, A6" (enemy_rodney_rush_run); 052204 "lea $58660.l, A6" (enemy_rodney_rush_across_run): Rodney
# rushing with dust behind
058660  data  enemy_rodney_rush_dust_animation
# 052646 "lea $5877e.l, A6" (enemy_rodney_knocked_back_start): the animation enemy_rodney_knocked_back_start sets
05877E  data  enemy_rodney_knocked_back_start_animation
# 05267C "lea $58788.l, A6" (enemy_rodney_knocked_back_fall): the animation enemy_rodney_knocked_back_fall sets
058788  data  enemy_rodney_knocked_back_fall_animation
# 0526EE "lea $58794.l, A6" (enemy_rodney_destroyed_start): the animation enemy_rodney_destroyed_start sets
058794  data  enemy_rodney_destroyed_animation
# 05272E "lea $5879e.l, A6" (enemy_rodney_destroyed_fall); 052748 "lea $5879e.l, A6" (enemy_rodney_destroyed_land):
# Rodney falling apart
05879E  data  enemy_rodney_destroyed_fall_animation
# 05239A "lea $587fa.l, A6" (enemy_rodney_shoot_turn): the animation enemy_rodney_shoot_turn sets
0587FA  data  enemy_rodney_shoot_turn_animation
# 052400 "lea $58856.l, A6" (enemy_rodney_shoot_fire): the animation enemy_rodney_shoot_fire sets
058856  data  enemy_rodney_shoot_fire_animation
# 04B9F8 "lea $58880.l, A6" (laser_bolt_start): the animation laser_bolt_start sets
058880  data  laser_bolt_start_animation
# 04BA28 "lea $58892.l, A6" (laser_bolt_fly): the animation laser_bolt_fly sets
058892  data  laser_bolt_fly_animation
# 0524C4 "lea $588bc.l, A6" (enemy_rodney_whip_wind_up): the animation enemy_rodney_whip_wind_up sets
0588BC  data  enemy_rodney_whip_wind_up_animation
# 052502 "lea $58918.l, A6" (enemy_rodney_whip_throw_arm): the animation enemy_rodney_whip_throw_arm sets
058918  data  enemy_rodney_whip_throw_arm_animation
# 051CEE "lea $58960.l, A6" (enemy_rodney_enter_wait): the animation enemy_rodney_enter_wait sets
058960  data  enemy_rodney_enter_wait_animation
# 051D28 "lea $589a8.l, A6" (enemy_rodney_enter_burst_out): the animation enemy_rodney_enter_burst_out sets
0589A8  data  enemy_rodney_enter_burst_out_animation
# 051D66 "lea $589cc.l, A6" (enemy_rodney_enter_fall): the animation enemy_rodney_enter_fall sets
0589CC  data  enemy_rodney_enter_fall_animation
# 052582 "lea $59150.l, A6" (enemy_rodney_whip_reach): the animation enemy_rodney_whip_reach sets
059150  data  enemy_rodney_whip_animation
# 04F25A "lea $59cba.l, A6" (enemy_rocksteady_start): the animation enemy_rocksteady_start sets
059CBA  data  enemy_rocksteady_animation
# 04F7A0 "lea $59cc4.l, A6" (enemy_rocksteady_shake_fist_start): the animation enemy_rocksteady_shake_fist_start sets
059CC4  data  enemy_rocksteady_shake_fist_animation
# 04F27E "lea $59cfc.l, A6" (enemy_rocksteady_start); 04F744 "lea $59cfc.l, A6" (enemy_rocksteady_raise_fist_start):
# Rocksteady raising his fist
059CFC  data  enemy_rocksteady_raise_fist_animation
# 04F30C "lea $59d58.l, A6" (enemy_rocksteady_enter_taunt); 04F772 "lea $59d58.l, A6" (enemy_rocksteady_laugh_start):
# Rocksteady laughing
059D58  data  enemy_rocksteady_laugh_animation
# 04FD60 "lea $59fd2.l, A6" (enemy_rocksteady_gun_butt_start): the animation enemy_rocksteady_gun_butt_start sets
059FD2  data  enemy_rocksteady_gun_butt_animation
# 04F810 "lea $5a0d2.l, A6" (enemy_rocksteady_put_gun_away_start): Rocksteady putting his gun away
05A0D2  data  enemy_rocksteady_put_gun_away_animation
# 05026E "lea $5a5ae.l, A6" (enemy_bebop_start): Bebop standing
05A5AE  data  enemy_bebop_animation
# 05020C "lea $5a5e6.l, A6" (enemy_bebop_start): Bebop raising his gun
05A5E6  data  enemy_bebop_raise_gun_animation
# 050314 "lea $5a61e.l, A6" (enemy_bebop_enter_drop): the animation enemy_bebop_enter_drop sets
05A61E  data  enemy_bebop_enter_drop_animation
# 050362 "lea $5a648.l, A6" (enemy_bebop_enter_in_air): the animation enemy_bebop_enter_in_air sets
05A648  data  enemy_bebop_enter_in_air_animation
# 04C0E4 "lea $5a7ca.l, A6" (bebop_shot_start): the animation bebop_shot_start sets
05A7CA  data  bebop_shot_animation
# 050CFE "lea $5ab38.l, A6" (enemy_bebop_flinch_start): the animation enemy_bebop_flinch_start sets
05AB38  data  enemy_bebop_flinch_animation
# 050DC0 "lea $5ab58.l, A6" (enemy_bebop_knocked_down_start): the animation enemy_bebop_knocked_down_start sets
05AB58  data  enemy_bebop_knocked_down_start_animation
# 050DF2 "lea $5ab6e.l, A6" (enemy_bebop_knocked_down_fall): the animation enemy_bebop_knocked_down_fall sets
05AB6E  data  enemy_bebop_knocked_down_fall_animation
# 050E58 "lea $5ab7a.l, A6" (enemy_bebop_knocked_down_lie): the animation enemy_bebop_knocked_down_lie sets
05AB7A  data  enemy_bebop_knocked_down_lie_animation
# 050EA8 "lea $5ab9a.l, A6" (enemy_bebop_defeated_start): the animation enemy_bebop_defeated_start sets
05AB9A  data  enemy_bebop_defeated_start_animation
# 050F12 "lea $5abba.l, A6" (enemy_bebop_defeated_fall): the animation enemy_bebop_defeated_fall sets
05ABBA  data  enemy_bebop_defeated_fall_animation
# 050A86 "lea $5ad12.l, A6" (enemy_bebop_pincer_charge_run): the animation enemy_bebop_pincer_charge_run sets
05AD12  data  enemy_bebop_pincer_animation
# 052D76 "lea $5b03c.l, A6" (enemy_shredder_split_start);
# 052DF8 "lea $5b03c.l, A6" (enemy_shredder_clone_appear_start): Shredder standing
05B03C  data  enemy_shredder_animation
# 05329E "lea $5b512.l, A6" (enemy_shredder_flinch_start); 053476 "lea $5b512.l, A6" (enemy_shredder_vanish_start):
# Shredder flinching
05B512  data  enemy_shredder_flinch_animation
# 053322 "lea $5b532.l, A6" (enemy_shredder_flinch_from_behind_start): Shredder hit from behind
05B532  data  enemy_shredder_flinch_from_behind_animation
# 053330 "lea $5b552.l, A6" (enemy_shredder_flinch_from_behind_start): Shredder hit from behind, the other way
05B552  data  enemy_shredder_flinch_from_behind_2_animation
# 0531D8 "lea $5b572.l, A6" (enemy_shredder_lose_bar_start): the animation enemy_shredder_lose_bar_start sets
05B572  data  enemy_shredder_lose_bar_animation
# 053380 "lea $5b592.l, A6" (enemy_shredder_defeated_start): the animation enemy_shredder_defeated_start sets
05B592  data  enemy_shredder_defeated_start_animation
# 0533C4 "lea $5b5a8.l, A6" (enemy_shredder_defeated_fall): the animation enemy_shredder_defeated_fall sets
05B5A8  data  enemy_shredder_defeated_fall_animation
# 04C1AA "lea $5b5be.l, A6" (shredder_piece_start): the animation shredder_piece_start sets
05B5BE  data  shredder_piece_start_animation
# 04C1E0 "lea $5b5c8.l, A6" (shredder_piece_bounce): the animation shredder_piece_bounce sets
05B5C8  data  shredder_piece_bounce_animation
# 053092 "lea $5b6f8.l, A6" (enemy_shredder_guard_start): the animation enemy_shredder_guard_start sets
05B6F8  data  enemy_shredder_guard_animation
# 053590 "lea $5b784.l, A6" (enemy_shredder_slash_start): the animation enemy_shredder_slash_start sets
05B784  data  enemy_shredder_slash_animation
# 0534E6 "lea $5b968.l, A6" (enemy_shredder_kick_start): the animation enemy_shredder_kick_start sets
05B968  data  enemy_shredder_kick_animation
# 052F32 "lea $5b9b2.l, A6" (enemy_shredder_walk_to_side_crouch): Shredder crouching
05B9B2  data  enemy_shredder_crouch_animation
# 052F40 "lea $5b9be.l, A6" (enemy_shredder_walk_to_side_crouch): Shredder walking crouched
05B9BE  data  enemy_shredder_crouch_walk_animation
# 053546 "lea $5bb54.l, A6" (enemy_shredder_thrust_start): the animation enemy_shredder_thrust_start sets
05BB54  data  enemy_shredder_thrust_animation
# 0535DA "lea $5bd88.l, A6" (enemy_shredder_sweep_start): the animation enemy_shredder_sweep_start sets
05BD88  data  enemy_shredder_sweep_animation
# 0536BC "lea $5bf4c.l, A6" (enemy_shredder_ray_line_up): the animation enemy_shredder_ray_line_up sets
05BF4C  data  enemy_shredder_ray_line_up_animation
# 0536DC "lea $5bf8a.l, A6" (enemy_shredder_ray_charge): the animation enemy_shredder_ray_charge sets
05BF8A  data  enemy_shredder_ray_charge_animation
# 05372C "lea $5bfae.l, A6" (enemy_shredder_ray_fire): the animation enemy_shredder_ray_fire sets
05BFAE  data  enemy_shredder_ray_fire_animation
# 04AC2C "lea $5c65c.l, A6" (motorbike_struck): the motorbike struck, upright
05C65C  data  motorbike_struck_animation
# 04AC02 "lea $5c686.l, A6" (motorbike_ride): the animation motorbike_ride sets
05C686  data  motorbike_ride_animation
# 04AC40 "lea $5c6b0.l, A6" (motorbike_struck): the motorbike struck in a wheelie
05C6B0  data  motorbike_struck_wheelie_animation
# 04C956 "lea $5c87a.l, A6" (tire_soldier_fly): the animation tire_soldier_fly sets
05C87A  data  tire_soldier_animation
# 04C168 "lea $5c890.l, A6" (rolling_tire_start); 04C8D4 "lea $5c890.l, A6" (tire_soldier_start): a tire rolling
05C890  data  rolling_tire_animation
# 04D5E0 "lea $5c944.l, A6" (enemy_rocket_soldier_line_up): the animation enemy_rocket_soldier_line_up sets
05C944  data  enemy_rocket_soldier_line_up_animation
# 04C2C2 "lea $5c95a.l, A6" (rocket_start): a rocket
05C95A  data  rocket_animation
# 04C33C "lea $5cb10.l, A6" (dynamite_start): a stick of dynamite
05CB10  data  dynamite_animation
# 04A79C "lea $5ce10.l, A6" (boss_shutter_wait): the shutter a boss comes out of
05CE10  data  boss_shutter_animation
# 04D7C2 "lea $5cea8.l, A6" (technodrome_door_wait): the Technodrome's door
05CEA8  data  technodrome_door_animation

# ---- the boot (system/boot.c) ----
# the coinage by the DIP switches' coin settings: two bytes a setting, the coins (00126E "lea $1452.l, A0", 001274
# "move.b (A0,D1.w), $60303.l") and the credits they give (00127C "move.b ($1,A0,D1.w), $60304.l"); the test mode shows
# them (005C90 "lea $1452.l, A6")
001452  table  coinage_coins  u8
001453  table  coinage_credits  u8
# the second coin slot's, by the bank's high bits (00128A "lea $1472.l, A0", 001290 "move.b (A0,D2.w), $6030b.l",
# 001298 "move.b ($1,A0,D2.w), $6030c.l")
001472  table  coinage_2_coins  u8
001473  table  coinage_2_credits  u8
# the lives a credit gives by the DIP switches (0012AC "lea $1426.l, A0"; the test mode, 005D16 "lea $1426.l, A6"): 1,
# 2, 3 or 5
001426  table  lives_settings  u8
# the unused DIP settings: four records of 10 bytes by dip_switches_2's bits 3-4 (0012DC "andi.b #$18, D0", 0012E4
# "add.w D1, D0"), a flag and two longs the reset copies (0012EE "move.w (A0)+, D0", 0012FC "move.l (A0)+, (A1)+",
# 0012FE "move.l (A0), (A1)")
00142A  data  unused_dip_settings
struct dip_setting 0A rom
field dip_setting 00 flag u16
field dip_setting 02 value u32
field dip_setting 06 value_2 u32
local reset 0012EC a0 setting dip_setting
# the boot's texts by their number (0018E2 "lea $15ac.l, A6", then the text's address by D3): RAM CHECK, ROM CHECK...
0015AC  table  boot_texts  u32  text
# the program's chips the ROM test sums: where each starts and how many blocks of 4 KB it has (001856 "lea $16cc.l, A0",
# 00185C "move.l (A0)+, D6", 001864 "move.w (A0)+, D0"), up to a negative start (00185E "bmi $188e")
0016CC  data  program_chips
struct program_chip 06 rom
field program_chip 00 start u32
field program_chip 04 blocks u16
local sum_program_chips 001856 a0 chip program_chip
# the sums good chips give, which the reset compares (001524 "lea $16f8.l, A3", 001530 "cmp.w (A3)+, D6")
0016F8  data  good_chip_sums
struct chip_sum 02 rom
field chip_sum 00 sum u16
local reset 001524 a3 expected chip_sum
# where the reset prints a bad chip's sum (00155E "lea $16e8.l, A1", 001568 "movea.l (A1)+, A4", then print_boot_hex)
0016E8  data  chip_sum_places
struct text_place 04 rom
field text_place 00 place u32 io
local reset 00155E a1 place text_place
# the boot's colours: 16 colours of two bytes each (001712 "lea $191e.l, A1", 00171C "move.b (A1)+, ($1,A6)", 001720
# "move.b (A1)+, ($3,A6)"), into each of the 16 palettes
00191E  data  boot_colours
struct palette_colour 02 rom
field palette_colour 00 high u8
field palette_colour 01 low u8
local start_boot_screen 001712 a1 colour palette_colour

# ---- the objects' tables of animations (the walk's animation tables; the code reads an entry by its address or index) ----
# 00DFD0 "movea.l $ec9c.l, A6" (krang_appear_setup); 00E012 "movea.l $eca0.l, A6" (krang_appear_wait): Krang's:
# appearing, walking, kicking, the lasers, the punch, struck, exploding, escaping
00EC98  table  krang_animations[16]  u32 animation_frame
# 00EC3A "movea.l $f674.l, A6" (krang_fist_start); 00EC54 "movea.l $f678.l, A6" (krang_fist_launch): Krang's fist's
00F674  table  krang_fist_animations[2]  u32 animation_frame
# 00EB00 "lea $f760.l, A6" (krang_laser_start); 00EB64 "movea.l $f76c.l, A6" (krang_laser_fly): Krang's lasers', by
# their aim
00F760  table  krang_laser_animations[4]  u32 animation_frame
# 00502C "lea $143d4.l, A6" (profile_start_picture): the attract mode's profiles' pictures, by character
0143D4  table  profile_animations[6]  u32 animation_frame
# 00FBC6 "movea.l $1443e.l, A6" (hydrant_start); 00FC44 "movea.l $14442.l, A6" (hydrant_struck): the hydrant's
01443E  table  hydrant_animations[4]  u32 animation_frame
# 00FD78 "lea $144e8.l, A6" (hydrant_water_start): the hydrant's water's
0144E8  table  hydrant_water_animations[3]  u32 animation_frame
# 00FF42 "movea.l $14598.l, A6" (rat_start); 00FF82 "movea.l $1459c.l, A6" (rat_drop): the rat's
014598  table  rat_animations[3]  u32 animation_frame
# 010038 "movea.l $145fc.l, A6" (alligator_start); 010074 "movea.l $14600.l, A6" (alligator_swim): the alligator's
0145FC  table  alligator_animations[2]  u32 animation_frame
# 0100BE "movea.l $1461a.l, A6" (skateboarder_start); 0100F0 "movea.l $1461e.l, A6" (skateboarder_struck): the
# skateboarder's
01461A  table  skateboarder_animations[2]  u32 animation_frame
# 010126 "lea $14636.l, A6" (pizza_start); 0101AE "lea $14636.l, A6" (pizza_wait): the pizza's
014636  table  pizza_animations[8]  u32 animation_frame
# 01020A "movea.l $1480e.l, A6" (billboard_start); 0102AE "movea.l $14812.l, A6" (billboard_wait): the billboard's
01480E  table  billboard_animations[2]  u32 animation_frame
# 010386 "movea.l $14860.l, A6" (billboard_soldier_start); 0103A2 "movea.l $14864.l, A6" (billboard_soldier_wait): the
# soldier behind the billboard's
014860  table  billboard_soldier_animations[3]  u32 animation_frame
# 01043E "movea.l $1488a.l, A6" (oil_drum_start); 0104EA "movea.l $1488e.l, A6" (oil_drum_struck): the oil drum's
01488A  table  oil_drum_animations[5]  u32 animation_frame
# 010576 "movea.l $14a26.l, A6" (turret_start); 01069C "movea.l $14a2a.l, A6" (turret_struck): the turret's
014A26  table  turret_animations[5]  u32 animation_frame
# 010864 "movea.l $14aa2.l, A6" (turret_shot_start); 0108AA "movea.l $14aa6.l, A6" (turret_shot_fly): a turret's
# shot's; the second, its flight, the helicopters' and the drones' shots fly with too
014AA2  table  turret_shot_animations[2]  u32 animation_frame
# 010B32 "movea.l $14ad6.l, A6" (freeze_nozzle_start); 010BAA "movea.l $14ada.l, A6" (freeze_nozzle_spray_start): the
# freezing nozzle's
014AD2  table  freeze_nozzle_animations[5]  u32 animation_frame
# 010CA6 "movea.l $14ba0.l, A6" (electric_beam_wait): the electric beam's
014BA0  table  electric_beam_animations[1]  u32 animation_frame
# 0110A8 "movea.l $14c3a.l, A6" (explosion_small_start); 01151C "movea.l $14c3a.l, A6" (sewer_missile_struck): the
# small explosion's (the missiles' too)
014C3A  table  explosion_small_animations[1]  u32 animation_frame
# 0072CE "movea.l $14c86.l, A6" (start_technodrome_explosion); 0110B2 "movea.l $14c86.l, A6" (explosion_big_start):
# the big explosion's (the Technodrome's too)
014C86  table  explosion_big_animations[1]  u32 animation_frame
# 0110BC "movea.l $14d1c.l, A6" (explosion_drum_start): the oil drum's explosion's
014D1C  table  explosion_drum_animations[1]  u32 animation_frame
# 0115AC "movea.l $14da0.l, A6" (rock_soldier_site_start); 0118F8 "lea $14da0.l, A1" (rock_soldier_struck): the rock
# soldier of the building site's (area 7)
014DA0  table  rock_soldier_site_animations[11]  u32 animation_frame
# 01205A "movea.l $14fbe.l, A6" (gun_blast_start): the rock soldier's gun blast's
014FBE  table  gun_blast_animations[1]  u32 animation_frame
# 012A3E "movea.l $15042.l, A6" (parked_car_start); 012C3C "movea.l $15046.l, A6" (car_hit_box_start): the parked
# car's, its hit box's and its soldiers'
015042  table  parked_car_animations[4]  u32 animation_frame
# 010DB8 "movea.l $150e8.l, A6" (electric_column_start); 010DF4 "movea.l $150ec.l, A6" (electric_column_flicker): the
# electric column's
0150E8  table  electric_column_animations[2]  u32 animation_frame
# 010E6A "movea.l $1519c.l, A6" (grille_start): the grille's
01519C  table  grille_animations[1]  u32 animation_frame
# 012130 "lea $151aa.l, A6" (rubble_start): the rubble's
0151AA  table  rubble_animations[4]  u32 animation_frame
# 0110C6 "movea.l $15258.l, A6" (explosion_rocket_start); 012824 "movea.l $15258.l, A6" (missile_fly): the rockets'
# and missiles' flight (and the rocket explosion's)
015258  table  rocket_animations[1]  u32 animation_frame
# 012D5E "movea.l $152ee.l, A6" (helicopter_start); 012D6E "movea.l $152f2.l, A6" (helicopter_start): the
# helicopter's, facing either way
0152EE  table  helicopter_animations[2]  u32 animation_frame
# 0132EE "movea.l $1534a.l, A6" (falling_missile_start): the falling missile's
01534A  table  falling_missile_animations[1]  u32 animation_frame
# 0131F0 "movea.l $15360.l, A6" (copter_bullet_start); 013238 "movea.l $15368.l, A6" (copter_bullet_fly): the
# helicopters' bullets' (the falling missile's too)
015360  table  copter_bullet_animations[4]  u32 animation_frame
# 011908 "lea $153d8.l, A1" (rock_soldier_struck); 0121EA "movea.l $153d8.l, A6" (rock_soldier_technodrome_start): the
# Technodrome's rock soldier's (area 8)
0153D8  table  rock_soldier_technodrome_animations[12]  u32 animation_frame
# 0127BA "movea.l $15692.l, A6" (missile_start): the Technodrome rock soldier's missiles'
015692  table  missile_animations[2]  u32 animation_frame
# 0126C4 "movea.l $156da.l, A6" (wall_slab_start): the wall slab's
0156DA  table  wall_slab_animations[1]  u32 animation_frame
# 0109E2 "movea.l $156f0.l, A6" (nozzle_row_start): the row of nozzles'
0156F0  table  nozzle_row_animations[1]  u32 animation_frame
# 0108F0 "movea.l $156fe.l, A6" (waiting_soldier_start): the waiting soldier's
0156FE  table  waiting_soldier_animations[1]  u32 animation_frame
# 0128F2 "movea.l $1574e.l, A6" (shock_bars_start); 0129B4 "movea.l $1574e.l, A6" (shock_bars_hit_box_start): the
# shock bars'
01574E  table  shock_bars_animations[1]  u32 animation_frame
# 007368 "lea $15764.l, A6" (start_staff_roll_portraits): the staff roll's portraits'
015764  table  staff_roll_portrait_animations[4]  u32 animation_frame
# 0114B0 "movea.l $1579c.l, A6" (sewer_missile_start); 0112C4 "movea.l $157a0.l, A6" (sewer_launcher_start): the
# sewer's missile launcher's and its missiles'
01579C  table  sewer_launcher_animations[3]  u32 animation_frame
# 011148 "movea.l $15838.l, A6" (spiked_pole_start): the spiked pole's
015838  table  spiked_pole_animations[1]  u32 animation_frame
# 013982 "lea $1584e.l, A6" (flying_drone_animate); 013518 "movea.l $1587e.l, A6" (flying_drone_start): the flying
# drones', by their direction, and struck
01584E  table  flying_drone_animations[14]  u32 animation_frame
# 013B1C "lea $15938.l, A6" (drone_shot_start); 013B92 "lea $15938.l, A6" (drone_shot_flash): the drones' shots', by
# their aim
015938  table  drone_shot_animations[7]  u32 animation_frame
# 0110D0 "movea.l $15aa0.l, A6" (explosion_medium_start): the medium explosion's
015AA0  table  explosion_medium_animations[1]  u32 animation_frame
# 010940 "movea.l $15b36.l, A6" (one_way_sign_start); 010972 "lea $15b36.l, A6" (one_way_sign_struck): the ONE WAY
# sign's
015B36  table  one_way_sign_animations[3]  u32 animation_frame
# 013C7E "movea.l $15c70.l, A6" (stockman_start); 013E4E "movea.l $15c70.l, A6" (stockman_drop_mouser): Baxter
# Stockman's
015C70  table  stockman_animations[4]  u32 animation_frame
# 014354 "movea.l $15d4a.l, A6" (falling_mouser_start): the Mouser Stockman drops'
015D4A  table  falling_mouser_animations[1]  u32 animation_frame
# 00F97C "movea.l $15d68.l, A6" (ball_start); 00FACA "movea.l $15d68.l, A6" (technodrome_ball_start): the bouncing
# balls'
015D68  table  ball_animations[1]  u32 animation_frame
# 00E97A "movea.l $15e02.l, A6" (krang_curtain_start); 00E9A4 "movea.l $15e06.l, A6" (krang_curtain_open): the curtain
# Krang appears behind's
015E02  table  krang_curtain_animations[3]  u32 animation_frame
# 00FA48 "movea.l $15ebe.l, A6" (road_barrier_start); 00FA2E "movea.l $15ec2.l, A6" (road_barrier_start): the road
# barrier's
015EBE  table  road_barrier_animations[2]  u32 animation_frame
# 00FA7A "movea.l $15eea.l, A6" (tire_stack_start); 00FA88 "movea.l $15eee.l, A6" (tire_stack_start): the tire stack's
015EEA  table  tire_stack_animations[2]  u32 animation_frame
# 019F02 "lea $19f24.l, A6" (turtle_start_marker): the markers over the turtles when they start, by turtle
019F24  table  turtle_marker_animations[4]  u32 animation_frame
# 02BC42 "lea $2bc56.l, A6" (turtle_exit_street_jump): the turtles' jump out of the street, by turtle
02BC56  table  exit_street_jump_animations[4]  u32 animation_frame
# 02D4C4 "lea $2d4f4.l, A6" (turtle_exit_building_site_rise): the turtles rising at the building site's exit, by
# turtle
02D4F4  table  exit_building_site_rise_animations[4]  u32 animation_frame
# 04A8E6 "lea $4a8a4.l, A6" (scenery_fire_start): the scenery's fires'
04A8A4  table  scenery_fire_animations[3]  u32 animation_frame
# 04C03E "lea $4bfd6.l, A5" (rocksteady_bullet_start): Rocksteady's bullets', by their aim
04BFD6  table  rocksteady_bullet_animations[4]  u32 animation_frame
# 04C602 "lea $4c5d4.l, A6" (door_piece_start): the pieces of a door kicked in
04C5D4  table  door_piece_animations[4]  u32 animation_frame
# 04EFA6 "lea $4efd4.l, A6" (enemy_skateboard_soldier_start); 04F040 "lea $4efd4.l, A6" (enemy_skateboard_stand): the
# skateboard soldiers'
04EFD4  table  enemy_skateboard_animations[3]  u32 animation_frame
# 04FA5A "lea $4f9da.l, A6" (enemy_rocksteady_shoot_around_fire): Rocksteady shooting around
04F9DA  table  enemy_rocksteady_shoot_around_animations[1]  u32 animation_frame
# 04FE62 "lea $4fe56.l, A6" (enemy_rocksteady_flinch_start): Rocksteady flinching
04FE56  table  enemy_rocksteady_flinch_animations[2]  u32 animation_frame
# 04FECA "lea $4febe.l, A6" (enemy_rocksteady_reel_start): Rocksteady reeling
04FEBE  table  enemy_rocksteady_reel_animations[2]  u32 animation_frame
# 04FF02 "lea $4fef6.l, A6" (enemy_rocksteady_flinch_from_behind_start): Rocksteady hit from behind
04FEF6  table  enemy_rocksteady_flinch_from_behind_animations[2]  u32 animation_frame
# 0506C2 "lea $50692.l, A6" (enemy_bebop_stand_start): Bebop standing
050692  table  enemy_bebop_stand_animations[4]  u32 animation_frame
# 05105E "lea $5101e.l, A6" (enemy_mouser_enter_start): the Mousers coming in
05101E  table  enemy_mouser_enter_animations[3]  u32 animation_frame
# 05193C "lea $518cc.l, A6" (enemy_mouser_sit): a Mouser sitting
0518CC  table  enemy_mouser_sit_animations[2]  u32 animation_frame
# 0525B8 "lea $52450.l, A6" (enemy_rodney_whip_pull_in): Rodney's whip arm pulled in, a frame each
052450  table  whip_arm_animations[13]  u32 animation_frame

# ---- tables of animation tables ----
# 01C050 "lea $1c08a.l, A6" (turtle_attack_over): the turtles' animations of an enemy hit, by turtle, then by the
# enemy's throw
01C08A  table  turtle_hit_animation_tables[4]  u32 animation_entry
# 01B928 "lea $208c0.l, A6" (turtle_set_animation): the turtles' animations, by turtle, then routine, then state
0208C0  table  turtle_animation_sets[4]  u32 animation_table_entry
# its four entries, a turtle each by the players' slots: their sprites rendered with their colours (assets/sprites):
# a blue bandana and katanas, an orange one and nunchakus, a purple one and the bo, sais
0208D0  data  leonardo_animation_set
0231F8  data  michelangelo_animation_set
025CD4  data  donatello_animation_set
02883E  data  raphael_animation_set
# 051B80 "lea $51ae2.l, A6" (mouser_hole_start): the Mouser holes' animations
051AE2  table  mouser_hole_animation_tables[3]  u32 animation_entry
# after each hole's two animations, the object record of the Mouser it lets out (051BC2 "adda.w #$8, A4", 051BFC
# "movea.l ($24,A0), A5", 051C00 "jsr $47c30.l")
051B2E  data  mouser_hole_mouser_record_0
051B3E  data  mouser_hole_mouser_record_1
051B4E  data  mouser_hole_mouser_record_2

# ---- tables of records ----
# a palette fade the ending asks for: the banks it fades (006D3A "lea $71dc.l, A6", then copy_palette_sets with the
# word in D6) and the palette sets it fades to (the long after it, in A5)
struct palette_fade 06 rom
field palette_fade 00 banks u16
field palette_fade 02 palettes u32 rom

# ---- the objects' tables of numbers (src/objects, src/engine) ----
# 00E46A "lea $e48a.l, A6" (krang_hover): Krang's height as he hovers, by the frame count
00E48A  table  krang_hover_heights  u16
# 00E6F2 "lea $e700.l, A6" (krang_set_move_time): how long Krang keeps a move, picked at random
00E700  table  krang_move_times  u8
# 00EA3C "lea $ea9e.l, A5" (krang_start_laser): where Krang's lasers start across from him, by their aim (and
# mirrored)
00EA9E  table  krang_laser_place_x  s16
# 00EA3C "lea $ea9e.l, A5" (krang_start_laser); 00EA68 "move.w ($2,A5,D7.w), D6" (krang_start_laser): ... and in
# height
00EAA0  table  krang_laser_place_height  s16
# 00EACE "lea $eb1e.l, A6" (krang_laser_start): the lasers' speed across, by their aim
00EB1E  table  krang_laser_x_speeds  s16
# 00EACE "lea $eb1e.l, A6" (krang_laser_start); 00EAE2 "move.w ($2,A6,D7.w), ($1e,A0)" (krang_laser_start): ... and in
# height
00EB20  table  krang_laser_height_speeds  s16
# 00F8F2 "lea $f938.l, A6" (ball_dropper_wait): the frames between the balls the dropper lets go
00F938  table  ball_drop_waits  u16
# 00FF18 "lea $ff60.l, A6" (rat_start): how far back a rat starts from its spawn, by its parameter
00FF60  table  rat_start_offsets  u32
# 010004 "lea $10012.l, A6" (rat_random_run_time): how long a rat runs before it stops, picked at random
010012  table  rat_run_times  u8
# 01010E "lea $10148.l, A6" (pizza_start): the pizzas' stats by their parameter (a pizza that heals or a whole one)
010148  table  pizza_stats_by_kind  u32 object_stats
# 010220 "lea $10232.l, A6" (billboard_start): where the billboard falls, by its parameter
010232  table  billboard_trigger_x  u16
# 0107A0 "lea $107ae.l, A6" (turret_random_wait): the turret's waits between shots, picked at random
0107AE  table  turret_waits  u8
# 010A1E "lea $10ab2.l, A6" (nozzle_row_watch): the rows of freezing nozzles by the row's parameter: each one's
# nozzles' statuses
010AB2  table  nozzle_rows  u32 nozzle_place
# 010E90 "lea $10eaa.l, A6" (turret_wreck_explode): the sounds of the turret's wreck as it blows up, by its phase
010EAA  table  turret_wreck_sounds  u8
# 010E7A "lea $10eae.l, A5" (turret_wreck_explode): the frames between the wreck's blasts, by its phase
010EAE  table  turret_wreck_waits  u16
# 010EE8 "lea $10f1c.l, A5" (boss_start_explosion): where a boss's explosions go off across, one after another
010F1C  table  boss_explosion_x  s16
# 010EE8 "lea $10f1c.l, A5" (boss_start_explosion); 010EFA "move.w ($2,A5,D7.w), D7" (boss_start_explosion): ... and
# in height
010F1E  table  boss_explosion_height  s16
# 010F02 "lea $10f44.l, A5" (boss_start_explosion): the explosions' two sounds, every other one
010F44  table  explosion_sounds  u8
# 010F46 "lea $10f62.l, A5" (stockman_defeated_explode): where Stockman's explosions go off across
010F62  table  stockman_explosion_x  s16
# 010F46 "lea $10f62.l, A5" (stockman_defeated_explode); 010F58 "move.w ($2,A5,D7.w), D7" (stockman_defeated_explode):
# ... and in height
010F64  table  stockman_explosion_height  s16
# 011378 "lea $113be.l, A6" (sewer_launcher_drift): the sewer launcher's drift across, by its direction
0113BE  table  sewer_launcher_drift_x  s16
# 011378 "lea $113be.l, A6" (sewer_launcher_drift); 01138E "move.w ($2,A6,D7.w), D7" (sewer_launcher_drift): ... and
# up or down
0113C0  table  sewer_launcher_drift_y  s16
# 0116EE "lea $1175a.l, A6" (rock_soldier_site_think): the rock soldier's reaches, by the turtles in play (4 by count)
01175A  table  rock_soldier_site_attack_reaches  u8
# 011A86 "lea $11ad2.l, A6" (rock_soldier_defeated_crumble): when each piece of the rock soldier crumbles off
011AD2  table  rock_soldier_crumble_times  u8
# 011CE6 "lea $11d1a.l, A6" (rock_soldier_site_think): the rock soldier's moves, picked at random
011D1A  table  rock_soldier_site_moves  u8
# 011C86 "lea $11dee.l, A6" (rock_soldier_site_move_done): the waits after his moves
011DEE  table  rock_soldier_site_waits  u8
# 011DE0 "lea $11df2.l, A6" (rock_soldier_site_random_move_time): how long he keeps a move, picked at random
011DF2  table  rock_soldier_site_move_times  u8
# 0120D0 "lea $12108.l, A5" (rock_soldier_defeated_crumble): where the rock soldier's rubble starts across from him
012108  table  rubble_place_x  s8
# 0120D0 "lea $12108.l, A5" (rock_soldier_defeated_crumble);
# 0120EE "move.b ($1,A5,D7.w), D6" (rock_soldier_defeated_crumble): ... and up or down
012109  table  rubble_place_y  s8
# 01252A "lea $1255e.l, A6" (rock_soldier_technodrome_think): the Technodrome's rock soldier's moves, picked at random
01255E  table  rock_soldier_technodrome_moves  u8
# 012616 "lea $12628.l, A6" (rock_soldier_technodrome_random_move_time): how long he keeps a move
012628  table  rock_soldier_technodrome_move_times  u8
# between rock_soldier_technodrome_random_move_time's rts and that table, no code reads (no lea names 012624): the four
# waits of rock_soldier_site_waits (20 30 40 50), which the building site's soldier reads (011C86 "lea $11dee.l, A6"),
# copied with his code for the Technodrome's soldier, whose code reads no copy of them
012624  data  unused_rock_soldier_technodrome_waits
# 012CD2 "lea $12cfe.l, A6" (car_soldier_start): where the car's soldiers stop, by their parameter
012CFE  table  car_soldier_stop_y  u16
# 012F5C "lea $13092.l, A6" (helicopter_fly): the helicopter's drift up or down, by its direction
013092  table  helicopter_drift_y  s16
# 01309E "lea $130f4.l, A6" (helicopter_shake): the helicopter's height as it shakes
0130F4  table  helicopter_shake_heights  u16
# 0130BE "lea $130fc.l, A6" (helicopter_bob): the helicopter's height as it bobs
0130FC  table  helicopter_bob_heights  u16
# 013454 "lea $13486.l, A5" (start_flying_drone); 013464 "lea $1348e.l, A5" (start_flying_drone): the flying drones'
# first direction, their turning (+8) and turn speed (+16), by their number
013486  table  flying_drone_starts[24]  u8
# 013704 "lea $138ac.l, A6" (flying_drone_shake): a flying drone's height as it shakes
0138AC  table  flying_drone_shake_heights  u16
# 01385E "lea $138b4.l, A6" (flying_drone_bob_low); 013884 "lea $138b4.l, A6" (flying_drone_bob): a flying drone's
# height as it bobs
0138B4  table  flying_drone_bob_heights  u16
# 013940 "lea $139a2.l, A6" (flying_drone_animate); 013958 "lea $139a2.l, A6" (flying_drone_animate): a flying drone's
# picture by its direction (bit 7: mirrored)
0139A2  table  flying_drone_aims  u8
# 0139BC "lea $139d6.l, A6" (flying_drone_random_wait): the drones' waits between shots, picked at random
0139D6  table  flying_drone_waits  u8
# 0138F4 "lea $139da.l, A6" (flying_drone_move): the drones' speed across, by their direction
0139DA  table  flying_drone_x_speeds  s16
# 0138F4 "lea $139da.l, A6" (flying_drone_move); 01390C "move.w ($2,A6,D7.w), D6" (flying_drone_move): ... and up or
# down
0139DC  table  flying_drone_y_speeds  s16
# 013A4E "lea $13a74.l, A6" (sound_flying_drones): the waits between the drones' sound, picked at random
013A74  table  flying_drone_sound_waits  u8
# 013AA4 "lea $13ae4.l, A5" (flying_drone_start_shot): where a drone's shot starts across, by its aim (and mirrored)
013AE4  table  drone_shot_place_x  s16
# 013AA4 "lea $13ae4.l, A5" (flying_drone_start_shot); 013AD0 "move.w ($2,A5,D7.w), D6" (flying_drone_start_shot): ...
# and in height
013AE6  table  drone_shot_place_height  s16
# 013B34 "lea $13b72.l, A6" (drone_shot_start): a drone's shot's speed across, by its aim
013B72  table  drone_shot_x_speeds  s16
# 013B34 "lea $13b72.l, A6" (drone_shot_start); 013B56 "move.w ($2,A6,D7.w), ($1c,A0)" (drone_shot_start): ... and up
# or down
013B74  table  drone_shot_y_speeds  s16
# 013DEA "lea $13e30.l, A6" (stockman_fly): Stockman's moves as he flies
013E30  table  stockman_fly_moves  u8
# 013F82 "lea $1416e.l, A6" (stockman_shake): Stockman's height as he shakes
01416E  table  stockman_shake_heights  u16
# 013F98 "lea $14176.l, A6" (stockman_shake); 014134 "lea $14176.l, A6" (stockman_bob): the depths (his y, 24.8)
# that pick Stockman's height, 0x3000 to 0x6800, 4 pixels apart: 15 of them, of which the loop compares only the first
# (013FA4 "cmp.w ($0,A6), D6" with A6 never moved, 013FAC "addi.w #$2, D5", 013FB0 "cmpi.b #$1e, D5"): in front of
# 0x30 his entry in stockman_step_heights is the first, behind it the last
014176  table  stockman_height_steps[15]  u16
# 013FB6 "lea $14194.l, A6" (stockman_shake); 014152 "lea $14194.l, A6" (stockman_bob): the heights Stockman keeps
# over the floor by his depth, 16 of them (013FBC "move.w (A6,D5.w), D6", 014158 "move.w (A6,D5.w), D6")
014194  table  stockman_step_heights[16]  u16
# 014120 "lea $141b4.l, A6" (stockman_bob): Stockman's height as he bobs
0141B4  table  stockman_bob_heights  u16
# 014222 "lea $1424a.l, A6" (stockman_random_drop_time): the frames before Stockman drops a Mouser, picked at random
01424A  table  stockman_drop_times  u8
# 0141F4 "lea $1426a.l, A6" (stockman_move): Stockman's speed across, by his direction
01426A  table  stockman_x_speeds  s16
# 0141F4 "lea $1426a.l, A6" (stockman_move); 01420C "move.w ($2,A6,D7.w), D6" (stockman_move): ... and up or down
01426C  table  stockman_y_speeds  s16
# 0184DC "lea $18550.l, A6" (boss_direction_to_target): a boss's direction to its target when it is straight across or
# up or down (4 by the signs), then the slopes it compares (+6, words)
018550  table  boss_axis_directions[16]  u8
# 01852A "lea $18560.l, A6" (boss_direction_to_target): the direction by the target's signs (5 a row) and the slope it
# reaches
018560  table  boss_slope_directions  u8
# 019DDA "lea $19eb2.l, A6" (turtle_jump_in_start): where each turtle jumps in from (records of 6: x, y, speed)
019EB2  table  turtle_jump_in_x[12]  s16
# 019DDA "lea $19eb2.l, A6" (turtle_jump_in_start); 019DF0 "move.w ($2,A6,D1.w), D4" (turtle_jump_in_start): ... y
019EB4  table  turtle_jump_in_y  s16
# 019DDA "lea $19eb2.l, A6" (turtle_jump_in_start); 019DF4 "move.w ($4,A6,D1.w), ($1e,A0)" (turtle_jump_in_start): ...
# the speed
019EB6  table  turtle_jump_in_speeds  s16
# 01A23E "lea $1a2d2.l, A6" (turtle_jump_in_step): how high each turtle jumps in
01A2D2  table  turtle_jump_in_heights  u8
# 01BF98 "lea $1c072.l, A5" (turtle_attack_over): by turtle, 6 bytes each: the move a turtle's throw gives the enemy
# it holds (01BFAA "move.w (A5,D0.w), D1", into its +28)
01C072  table  turtle_throw_moves  u16
# 01BF98 "lea $1c072.l, A5" (turtle_attack_over); 01BFAE "movea.l ($2,A5,D0.w), A5" (turtle_attack_over): ... and the
# turtle's counter in work RAM the throw needs at 0x100 or more (01BFAE "movea.l ($2,A5,D0.w), A5", 01BFB2 "cmpi.w
# #$100, (A5)")
01C074  table  turtle_throw_counters  u32
# 01B86A "lea $1c20e.l, A6" (turtle_set_attack); 01C004 "lea $1c20e.l, A6" (turtle_attack_over): each turtle's first
# attack in turtle_attack_moves, by turtle
01C20E  table  turtle_attack_firsts  u8
# 01C4BA "lea $1c546.l, A6" (turtle_hit): the speeds a hit turtle drifts and jumps with, by the hit's reaction
01C546  table  turtle_hit_speeds  s16
# 01C370 "lea $1c596.l, A5" (turtle_hit): the frames the enemy that hit waits, by the reaction
01C596  table  turtle_hit_waits  u16
# 01C73E "lea $1c764.l, A6" (turtle_knocked_down_next): the steps of a knocked down turtle
01C764  table  turtle_knocked_down_steps  u32 knock_step
# 01C886 "lea $1c8ca.l, A6" (turtle_knocked_back_next): the steps of a turtle knocked back
01C8CA  table  turtle_knocked_back_steps  u32 knock_step
# 01CA62 "lea $1ca82.l, A6" (turtle_knocked_flying_next): the steps of a turtle knocked flying
01CA82  table  turtle_knocked_flying_steps  u32 knock_step
# 01CC1E "lea $1cc6e.l, A6" (turtle_knocked_flying_from_behind_next): the steps of a turtle knocked flying from behind
01CC6E  table  turtle_knocked_flying_from_behind_steps  u32 knock_step
# 01D190 "lea $1d200.l, A6" (turtle_held_throw_off_struggle): the buttons a held turtle struggles with
01D200  table  turtle_struggle_bits  u8
# 01C444 "lea $1d3fc.l, A6" (turtle_hit): the reaction to a hit, by its kind
01D3FC  table  turtle_hit_reactions  u8
# 01B8A0 "lea $1d526.l, A6" (turtle_set_attack); 01C02A "lea $1d526.l, A6" (turtle_attack_over): the sound of each
# attack move
01D526  table  turtle_attack_sounds_by_move  u8
# 01C2E4 "lea $1d556.l, A6" (turtle_hit): the sound of a hit, by the hitter's damage
01D556  table  turtle_hit_sounds  u8
# 01B8B0 "lea $1d592.l, A6" (turtle_set_attack); 01C03A "lea $1d592.l, A6" (turtle_attack_over): each attack's damage
01D592  table  turtle_attack_damages  u16
# 01B82E "lea $1d5f2.l, A6" (turtle_start_combo); 01BF64 "lea $1d5f2.l, A6" (turtle_attack_over): each turtle's combos
# (by turtle)
01D5F2  table  turtle_combos  u32 combo_step
# 048772 "bne $4880e" (enemy_floor_contacts): the contacts a floor cell clears (indexed from its value, which may be
# below 0)
048818  table  floor_contact_masks  s8
# 048F7A "lea $4881c.l, A6" (enemy_hop_down); 049022 "lea $4881c.l, A6" (enemy_hop_right): how high the enemies hop,
# by area
04881C  table  area_hop_heights  u16
# 048C3C "lea $48c5e.l, A6" (enemy_think); 048CDC "lea $48c5e.l, A6" (enemy_think): whether a turtle's hit reaction
# leaves it down
048C5E  table  hit_reaction_down  u8
# 048F22 "lea $48f36.l, A6" (enemy_step_over_edge): the steps over an edge, by the enemy's move
048F36  table  enemy_edge_steps  u32 rom
# 04B884 "lea $4b742.l, A6" (whip_arm_follow); 04B946 "lea $4b742.l, A6" (whip_arm_struck): the whip arm's animation
# by its length
04B742  table  whip_arm_follow_animations[13]  u32 animation_frame
# 04B8DC "lea $4b7de.l, A6" (whip_arm_drag): the whip arm's offset by its length
04B7DE  table  whip_arm_offsets  s16
# 04C386 "lea $4c3ee.l, A6" (dynamite_bounce): the dynamite's two flash colours, by the frame count's bit 2
04C3EE  table  dynamite_flash_colours  u8
# 04C612 "lea $4c5e4.l, A6" (door_piece_start): the pieces of a door: their speed in height and their animation (two
# words each)
04C5E4  table  door_piece_speeds  u16
# 04D7B6 "lea $4d764.l, A6" (technodrome_door_wait): how many soldiers the Technodrome's door lets out, by difficulty
04D764  table  technodrome_door_soldiers  u8
# 04DCE6 "lea $4dd2c.l, A6" (enemy_spear_soldier_start): the hits a spear soldier takes, by difficulty
04DD2C  table  spear_soldier_hits  u8
# 04EF8C "lea $4efd0.l, A6" (enemy_skateboard_soldier_start): the skateboard soldiers' colours, by their kind
04EFD0  table  skateboard_soldier_colours  u8
# 04EF98 "lea $4efe0.l, A6" (enemy_skateboard_soldier_start): the skateboard soldiers' definitions, by their kind
04EFE0  table  skateboard_soldier_definitions  u32 rom
# 04F442 "lea $4f58c.l, A6" (enemy_rocksteady_think): Rocksteady's moves
04F58C  table  rocksteady_moves  u16
# 04F442 "lea $4f58c.l, A6" (enemy_rocksteady_think); 04F458 "adda.w ($2,A6,D0.w), A5" (enemy_rocksteady_think): ...
# the offset of their times by difficulty
04F58E  table  rocksteady_mode_times  u16
# 04F20C "lea $4f5b4.l, A6" (enemy_rocksteady_start);
# 05003E "lea $4f5b4.l, A6" (enemy_rocksteady_knocked_down_get_up): the hits Rocksteady takes before he strikes back
04F5B4  table  rocksteady_hits_to_strike_back_by_difficulty  u8
# 04F46C "lea $4f5c4.l, A5" (enemy_rocksteady_think); 04F4C8 "lea $4f5c4.l, A5" (enemy_rocksteady_think): his wait
# before a close attack
04F5C4  table  rocksteady_close_attack_waits  u8
# 04F472 "lea $4f5cc.l, A6" (enemy_rocksteady_think); 04F4FE "lea $4f5cc.l, A5" (enemy_rocksteady_think): his wait
# before a far attack
04F5CC  table  rocksteady_far_attack_waits  u8
# 04F66C "lea $4f6b6.l, A6" (enemy_rocksteady_hit): his reaction to a hit
04F6B6  table  rocksteady_hit_reactions  u8
# 04FA5A "lea $4f9da.l, A6" (enemy_rocksteady_shoot_around_fire);
# 04FA60 "move.l ($4,A6,D7.w), ($24,A0)" (enemy_rocksteady_shoot_around_fire): his bullets' bursts, by the aim
04F9DE  table  rocksteady_bursts  u32 rom
# 051084 "lea $5102a.l, A6" (enemy_mouser_enter_hop): the Mousers' speed up or down as they come in
05102A  table  mouser_enter_y_speeds  s16
# 051084 "lea $5102a.l, A6" (enemy_mouser_enter_hop); 051090 "move.w ($2,A6,D0.w), ($1e,A0)" (enemy_mouser_enter_hop):
# ... and in height
05102C  table  mouser_enter_height_speeds  s16
# 0512BC "lea $512e4.l, A6" (enemy_mouser_think): the Mouser's moves
0512E4  table  mouser_moves  u16
# 0514B2 "lea $514c6.l, A6" (enemy_mouser_step_over_edge): the Mouser's steps over an edge, by its move
0514C6  table  mouser_edge_steps  u32 rom
# 051B60 "lea $51aee.l, A6" (mouser_hole_start): the Mousers a hole lets out, by its parameter (8 by difficulty)
051AEE  table  mouser_hole_counts  u8
# 0528F6 "lea $52918.l, A6" (enemy_shredder_think): the clones Shredder makes, by the enemies on screen
052918  table  shredder_clone_limits  u8
# 0527C0 "lea $52a60.l, A6" (enemy_shredder_start); 052A18 "lea $52a60.l, A6" (enemy_shredder_think): Shredder's wait
# before he guards, by difficulty
052A60  table  shredder_guard_waits  u8
# 0527CC "lea $52ade.l, A6" (enemy_shredder_start); 052A86 "lea $52ade.l, A6" (enemy_shredder_think): his wait before
# an attack, by difficulty
052ADE  table  shredder_attack_waits  u8
# 0527DA "lea $52b3a.l, A6" (enemy_shredder_start); 052B0C "lea $52b3a.l, A6" (enemy_shredder_think): his wait before
# the ray, by difficulty
052B3A  table  shredder_ray_waits  u16
# 052B5C "lea $52b7c.l, A6" (enemy_shredder_think): his move by his approach
052B7C  table  shredder_approach_moves  u16
# 047302 "lea $471f0.l, A6" (check_attacks): the job a hit queues, by the attacker's player
0471F0  table  attack_hit_jobs  u8
# 0477D0 "lea $48830.l, A6" (start_player_slots): the stairs' top height, by area
048830  table  area_stairs_top_heights  u8
# 047812 "lea $53896.l, A6" (run_objects); 0478DA "lea $53a5e.l, A4" (update_object_screen_place): each kind of
# object's table of routines (its handler by routine)
053896  table  object_routine_tables[128]  u32 routine_entry

# ---- the scenes', the stage's, the test mode's and the texts' tables (src/scenes, src/stage, src/system, src/video) ----
# 001F0A "lea $1f1a.l, A6" (set_text_colour); 001F2A "lea $1f1a.l, A6" (set_spare_text_colour): the texts' colours by
# their number (from 1 when the code adds 1, 001F1B on)
001F1A  table  text_colours[24]  u8
# 00281E "lea $2884.l, A5" (print_tall_text); 00812E "lea $2884.l, A2" (draw_initial): the tall font's tiles: the top
# and bottom tile of each character, two bytes a character
002884  table  big_font_tiles_table[128]  u8
# 002590 "lea $332a.l, A4" (draw_box_label); 0081DA "lea $332a.l, A5" (draw_ranking_label): the labels of the players'
# boxes and the ranking, by number
00332A  table  box_labels  u32 text
# 0023D0 "lea $33a2.l, A4" (draw_lives): the tiles of the lives' digits, top (two bytes a digit, the top's first)
0033A2  table  lives_digit_top  u8
# 0023D0 "lea $33a2.l, A4" (draw_lives); 0023EE "move.b ($1,A4,D3.w), ($85,A5)" (draw_lives): ... and bottom
0033A3  table  lives_digit_bottom  u8
# 0023D0 "lea $33a2.l, A4" (draw_lives): the tiles of the lives' icon and digits, top
0033B6  table  lives_icon_top  u8
# 0023D0 "lea $33a2.l, A4" (draw_lives): ... and bottom
0033B7  table  lives_icon_bottom  u8
# 002604 "movea.l #$3402, A6" (print_stage_title): the stages' titles ("SCENE n" and the name), by stage
003402  table  stage_titles  u32 text
# 0022AA "lea $2f36.l, A6" (print_colour_text); 0011A0 "move.w #$3000, D1" (reset): the texts print_colour_text
# prints, by number
002F36  table  colour_texts[128]  u32 text
# 002300 "lea $31f2.l, A6" (draw_tile_picture): the pictures draw_tile_picture draws, by number
0031F2  table  tile_pictures  u32 tile_picture
# 002368 "movea.l #$32c2, A6" (draw_player_box): where each player's box is drawn in the fixed layer, and its parts
# (+8, +12)
0032C2  table  player_box_places[12]  u32 io
# 002818 "lea $375c.l, A6" (print_tall_text): the texts print_tall_text prints, by number
00375C  table  tall_texts  u32 text
# 004D2E "lea $4e88.l, A0" (start_demo): the demos' settings, two bytes each: the players in play and the players
# joining
004E88  table  demo_settings_table[12]  u8
# 004D68 "lea $4e94.l, A0" (start_demo); 004ECA "beq $4ed2" (attract_profile): the demos' recorded inputs, four
# players' streams each
004E94  table  demo_input_streams[24]  u32 rom
# 0057C0 "movea.l $584c.l, A5" (draw_color_test); 0057EC "movea.l $5850.l, A5" (draw_color_test): where the colour
# test draws its two halves
00584C  table  color_test_places[2]  u32 io
# 0058B6 "lea $59a6.l, A6" (show_player_inputs): the inputs each player's row of the input test reads
0059A6  table  player_input_ports  u32 io
# 0058CA "lea $59b6.l, A6" (show_player_inputs): where the input test shows each player's inputs
0059B6  table  player_input_places  u32 io
# 005902 "movea.l $59c6.l, A6" (show_coin_inputs); 005926 "movea.l $59c6.l, A6" (show_coin_inputs): the coins' and
# services' input the input test reads
0059C6  table  coin_input_port  u32 io
# 00590E "lea $59ca.l, A6" (show_coin_inputs); 005934 "lea $59ca.l, A6" (show_coin_inputs): where the input test shows
# the coins and the services
0059CA  table  coin_input_places[2]  u32 io
# 005950 "lea $59d2.l, A6" (show_dip_switches): the DIP switches' banks the test reads
0059D2  table  dip_switch_ports  u32 io
# 005964 "lea $59de.l, A6" (show_dip_switches): where the test shows each bank
0059DE  table  dip_switch_places  u32 io
# 005AD2 "movea.l $5b40.l, A6" (pulse_coin_counters); 005AEA "movea.l $5b44.l, A6" (pulse_coin_counters): where the
# coin counter test shows its counters
005B40  table  coin_counter_places[2]  u32 io
# 005BC2 "lea $6146.l, A6" (sound_test_play): the sound test's codes by its line
006146  table  sound_test_codes  u8
# 0062EE "lea $634c.l, A0" (area_setup_variables): the scene an area continues to (two bytes an area: this and its
# stage)
00634C  table  area_continue_scenes  u8
# 0062EE "lea $634c.l, A0" (area_setup_variables); 006306 "move.b ($1,A0,D1.w), $60121.l" (area_setup_variables): ...
# the stage of each area
00634D  table  area_stages  u8
# 00673E "lea $676e.l, A6" (play_entry_layers): the areas' tile banks (two bytes an area: the second, 00676F, the
# banks 2 and 3)
00676E  table  area_tile_banks_table[20]  u8
# 0069F6 "lea $6a18.l, A6" (flicker_fire_priority): the layers' priority flickering with the fire, by the frame count
006A18  table  fire_priority_flicker  u8
# 006ACC "lea $6b0c.l, A6" (start_area_music): the music of each stage
006B0C  table  area_music  u8
# 006D94 "lea $6dfc.l, A6" (ending_technodrome_explodes): the sounds of the Technodrome's explosions
006DFC  table  technodrome_explosion_sounds  u8
# 006D3A "lea $71dc.l, A6" (ending_technodrome_glows): the ending's palette fades: the banks and the palettes (6 bytes
# each)
0071DC  table  ending_palette_fades[5]  palette_fade
# 007286 "lea $72e2.l, A5" (start_technodrome_explosion): where the Technodrome's explosions go off across
0072E2  table  technodrome_explosion_x  s16
# 007286 "lea $72e2.l, A5" (start_technodrome_explosion);
# 0072A6 "move.w ($2,A5,D7.w), ($e,A6)" (start_technodrome_explosion): ... and up or down
0072E4  table  technodrome_explosion_y  s16
# 007350 "lea $738c.l, A5" (start_staff_roll_portraits): where the staff roll's portraits stand: x and y, two words
# each
00738C  table  staff_roll_portrait_places  s16
# 007542 "lea $7592.l, A2" (type_credit_name_pass): the tiles of a credit's name typed in: the four tiles of each
# character, the first
007592  table  credit_name_tiles_1  u8
# 007542 "lea $7592.l, A2" (type_credit_name_pass); 007522 "move.b ($1,A2,D7.w), D5" (type_credit_name_pass): ... the
# second
007593  table  credit_name_tiles_2  u8
# 007542 "lea $7592.l, A2" (type_credit_name_pass); 00755A "move.b ($2,A2,D6.w), ($81,A5)" (type_credit_name_pass):
# ... the third
007594  table  credit_name_tiles_3  u8
# 007542 "lea $7592.l, A2" (type_credit_name_pass); 007560 "move.b ($3,A2,D6.w), ($83,A5)" (type_credit_name_pass):
# ... the fourth
007595  table  credit_name_tiles_4  u8
# 008050 "lea $807e.l, A5" (draw_ranking_background): the ranking's background tiles
00807E  table  ranking_background_tiles  u8
# 008220 "lea $8436.l, A5" (draw_ranking_place): the tiles of the ranking's places (1ST...), two bytes each: the first
008436  table  ranking_place_tiles_1  u8
# 008220 "lea $8436.l, A5" (draw_ranking_place); 008252 "move.b ($1,A5,D5.w), ($87,A6)" (draw_ranking_place): ... the
# second
008437  table  ranking_place_tiles_2  u8
# 009042 "movea.l $917e.l, A6" (draw_best_players_initials); 0090D8 "movea.l $9182.l, A6" (draw_best_players_scores):
# where BEST 10 PLAYERS shows the initials and the scores
00917E  table  best_players_places[2]  u32 io
# 00904E "lea $9186.l, A4" (draw_best_players_initials); 0090CA "lea $9186.l, A4" (draw_best_players_scores): their
# colours by line
009186  table  best_players_colours  u8
# 004FA4 "lea $19272.l, A6" (profile_start_text): the profiles' typed texts, by character
019272  table  profile_texts  u32 rom
# 006546 "lea $19866.l, A6" (area_title_start_text): the areas' titles typed in, by stage
019866  table  area_title_texts  u32 rom
# 02B42A "lea $2c0f0.l, A6" (turtle_exit_car_street_start); 02C05E "lea $2c0f0.l, A6" (turtle_exit_car_street_wait):
# where each turtle stands at the car street's exit: x and y (two words each)
02C0F0  table  car_street_exit_x  u16
# 02B42A "lea $2c0f0.l, A6" (turtle_exit_car_street_start): ... y
02C0F2  table  car_street_exit_y  u16
# 02C35C "lea $2c3ba.l, A6" (exit_car_street_van_start_up): the van's shake across as it starts up
02C3BA  table  van_start_x_shakes  s16
# 02C35C "lea $2c3ba.l, A6" (exit_car_street_van_start_up);
# 02C37A "move.w ($2,A6,D0.w), D2" (exit_car_street_van_start_up): ... up or down
02C3BC  table  van_start_y_shakes  s16
# 02CDC0 "lea $2ce62.l, A6" (turtle_exit_go_to_place); 02CE3A "lea $2ce62.l, A6" (turtle_exit_go_to_place): where each
# turtle goes at an exit: x and y
02CE62  table  exit_places_x  u16
# 02CDC0 "lea $2ce62.l, A6" (turtle_exit_go_to_place); 02CDD2 "move.w ($2,A6,D0.w), D2" (turtle_exit_go_to_place): ...
# y
02CE64  table  exit_places_y  u16
# 02D278 "lea $2d304.l, A6" (turtle_exit_building_site_drop): where the turtles drop at the building site's exit (4
# words each: x, y, height, drift)
02D304  table  building_site_exit_x  u16
# 02D278 "lea $2d304.l, A6" (turtle_exit_building_site_drop);
# 02D28E "move.w ($2,A6,D1.w), D4" (turtle_exit_building_site_drop): ... y
02D306  table  building_site_exit_y  u16
# 02D278 "lea $2d304.l, A6" (turtle_exit_building_site_drop);
# 02D292 "move.w ($4,A6,D1.w), ($10,A0)" (turtle_exit_building_site_drop): ... the height
02D308  table  building_site_exit_heights  u16
# 02D278 "lea $2d304.l, A6" (turtle_exit_building_site_drop);
# 02D298 "move.w ($6,A6,D1.w), ($20,A0)" (turtle_exit_building_site_drop): ... the drift speed
02D30A  table  building_site_exit_drifts  u16
# 02FB9C "lea $2fbe0.l, A6" (opening_turtles_ready): the opening's turtles' speeds up or down
02FBE0  table  opening_turtle_y_speeds  s16
# 02D692 "lea $30652.l, A6" (turtle_exit_final_walk); 02D75C "lea $30652.l, A6" (exit_final_shake): the shake of the
# layers and objects across (two bytes a step)
030652  table  shake_x  s8
# 02D692 "lea $30652.l, A6" (turtle_exit_final_walk); 02D69C "move.b ($1,A6,D0.w), D2" (turtle_exit_final_walk): ...
# and up or down
030653  table  shake_y  s8
# 0310DA "lea $31152.l, A6" (intro_animate_fire): the burning roof's frames of fire before area 0 (the fire's
# pictures)
031152  table  intro_fire_frames  u32 picture_tile
# 01A396 "lea $1a3c0.l, A6" (update_players); 01A78A "lea $1a3c0.l, A6" (start_scroll_segment): whether a stage's
# scroll keeps the turtles in
01A3C0  table  stage_scroll_locks  u8
# 01EF5A "lea $1f158.l, A6" (update_layers_street): the TV pictures of the street, by the TV's frame
01F158  table  street_tv_pictures  u32 rom
# 009CDA "lea $9d40.l, A6" (palette_editor_frame): the palette editor's limits by part
009D40  table  palette_editor_limits  u8
# 009ED2 "lea $9efa.l, A6" (palette_editor_entry): the palette RAM's banks the editor picks
009EFA  table  palette_editor_banks  u32 io
# 009D6E "lea $9f0a.l, A4" (palette_editor_frame): the colour component masks (two words: mask and step)
009F0A  table  palette_editor_masks  u16
# 009D6E "lea $9f0a.l, A4" (palette_editor_frame); 009D84 "add.w ($2,A4,D2.w), D3" (palette_editor_frame): ... step
009F0C  table  palette_editor_steps  u16
# 009D46 "lea $9f16.l, A6" (palette_editor_frame): the editor's parts by the joystick
009F16  table  palette_editor_parts  u8
# 009DD2 "movea.l $9f1a.l, A6" (palette_editor_draw): where the editor shows its title
009F1A  table  palette_editor_place  u32 io
# 009DD8 "movea.l #$9f1e, A5" (palette_editor_draw): its title's tiles
009F1E  table  palette_editor_title  u8
# 009DEE "movea.l $9f22.l, A6" (palette_editor_draw); 009E0A "movea.l $9f26.l, A6" (palette_editor_draw): where it
# shows the bank, the palette and the colour
009F22  table  palette_editor_number_places[3]  u32 io
# 009E6E "lea $9f2e.l, A6" (palette_editor_draw); 009E84 "lea $9f2e.l, A6" (palette_editor_draw): where it shows the
# colours
009F2E  table  palette_editor_colour_places  u32 io
# 009DFA "lea $9f46.l, A5" (palette_editor_draw); 009E16 "lea $9f46.l, A5" (palette_editor_draw): the tiles of the
# hexadecimal digits
009F46  table  hex_digit_tiles  u8
# 009744 "lea $975c.l, A6" (fade_palettes_part): the palette RAM's banks, by number
00975C  table  palette_banks  u32 io
# 0098AE "movea.l #$98f2, A3" (start_palette_effects): the palette RAM's banks the effects work on
0098F2  table  palette_effect_banks  u32 io
# 009A5C "lea $9a7c.l, A6" (request_game_step_palettes): the palettes of each game step
009A7C  table  game_step_palettes  u32 rom
# 009AA8 "lea $9ad2.l, A0" (start_game_step_palette_effects): the palette effects of each game step
009AD2  table  game_step_palette_effects  u32 palette_effect_pointer
# 009AFE "lea $9b28.l, A0" (start_area_palette_effects): the palette effects of each stage
009B28  table  area_palette_effects  u32 palette_effect_pointer
# 018498 "movea.l #$184c2, A2" (draw_hex_digits): the characters of the hexadecimal digits
0184C2  table  hex_digits  u8
# 01866E "movea.l $1867e.l, A6" (start_box_opening): where the box opens in the fixed layer
01867E  table  box_opening_place  u32 io
# 018702 "movea.l $18710.l, A6" (start_wide_box_opening): where the box the unreached routine shrinks starts
018710  table  unreached_box_opening_place  u32 io
# 030260 "lea $30350.l, A6" (show_balloon): the speech balloons: their tile, place and time, 5 bytes each
030350  table  balloon_records[96]  u8
# 01E268 "lea $1e5a0.l, A6" (start_area_layers): the areas' layers, 36 bytes an area by stage (area_layers): layer A's
# x (01E258-01E2B6 copy them into 063340 and 063380)
01E5A0  table  area_layer_a_x  u32
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E276 "move.l ($4,A6,D0.w), $63344.l" (start_area_layers): ... layer
# A's y
01E5A4  table  area_layer_a_y  u32
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E27E "move.l ($8,A6,D0.w), $63380.l" (start_area_layers): ... layer
# B's x
01E5A8  table  area_layer_b_x  u32
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E286 "move.l ($c,A6,D0.w), $63384.l" (start_area_layers): ... layer
# B's y
01E5AC  table  area_layer_b_y  u32
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E28E "move.l ($10,A6,D0.w), $63352.l" (start_area_layers): ...
# layer A's map
01E5B0  table  area_layer_a_maps  u32 map_entry
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E296 "move.l ($14,A6,D0.w), $63356.l" (start_area_layers): ...
# layer A's blocks
01E5B4  table  area_layer_a_blocks  u32 block_byte
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E29E "move.l ($18,A6,D0.w), $63392.l" (start_area_layers): ...
# layer B's map
01E5B8  table  area_layer_b_maps  u32 map_entry
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E2A6 "move.l ($1c,A6,D0.w), $63396.l" (start_area_layers): ...
# layer B's blocks
01E5BC  table  area_layer_b_blocks  u32 block_byte
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E2AE "move.w ($20,A6,D0.w), $63350.l" (start_area_layers): ...
# layer A's map's width in bytes
01E5C0  table  area_layer_a_map_widths  u16
# 01E268 "lea $1e5a0.l, A6" (start_area_layers); 01E2B6 "move.w ($22,A6,D0.w), $63390.l" (start_area_layers): ...
# layer B's
01E5C2  table  area_layer_b_map_widths  u16

# ======== batch 6: nothing in the 68000's C without a name ========
# ---- the five lone returns two tables point at ----
# The main loop's jobs 7, 8 and 0xA (the switch of the main loop on the job, 0013D6 "andi.w #$3f00, D1": cases 28, 32 and 40) are a lone return each:
# no code queues them (no immediate job word 07xx, 08xx or 0Axx goes into D7 before queue_job 004164, and no list of
# jobs queue_jobs walks holds one). Named for what they are and where they sit.
# 001E40 "rts", just before clear_layers_job (001E42 "bsr $1e7c")
001E40  func  job_none_before_clear_layers
# 0022FE "rts", where print_colour_text's loop ends (0022FC "bra $22e8")
0022FE  func  job_none_after_print_colour_text
# 002334 "rts", just after draw_tile_picture's own (002332 "rts")
002334  func  job_none_after_draw_tile_picture
# The enemies' attacks 6 and 7 (enemy_attack's table 053D2A, moves 0x18 and 0x1C) are a lone return each, between
# the long jump kick and the grab: an enemy given one of those moves does nothing for its attack
# 049C72 "rts", after enemy_long_jump_kick_fly's own (049C70 "rts")
049C72  func  enemy_attack_none_after_long_jump_kick
# 049C74 "rts", just before enemy_grab (049C76)
049C74  func  enemy_attack_none_before_grab
comment job_none_before_clear_layers the main loop's job 7, which no code queues: does nothing
comment job_none_after_print_colour_text the main loop's job 8, which no code queues: does nothing
comment job_none_after_draw_tile_picture the main loop's job 0xA, which no code queues: does nothing
comment enemy_attack_none_after_long_jump_kick an enemy's attack 6: does nothing
comment enemy_attack_none_before_grab an enemy's attack 7: does nothing
# ---- reached after all: the states of an enemy thrown by a turtle (batch 3 left them unreached_) ----
# The first state of each turtle's throw table (04A1E0, 04A374, 04A432, 04A4F0; the throws take them by
# enemy_thrown_by_donatello's 04A1D4 "lea $4a1e0.l, A6", michelangelo's 04A368 "lea $4a374.l, A6", raphael's 04A426
# "lea $4a432.l, A6", leonardo's 04A4E4 "lea $4a4f0.l, A6"): the enemy hidden in the turtle's hands (04A202 "bclr #$7,
# ($0,A0)") for the frames of the swing (04A208 "move.b #$c, ($22,A0)", 04A39C "move.b #$12, ($22,A0)", 04A45A
# "move.b #$10, ($22,A0)", 04A518 "move.b #$14, ($22,A0)")
04A202  func  enemy_thrown_by_donatello_start
04A396  func  enemy_thrown_by_michelangelo_start
04A454  func  enemy_thrown_by_raphael_start
04A512  func  enemy_thrown_by_leonardo_start
# The moves after each turtle's throw (0x84, 0x8C, 0xC0, 0xC8 next to 0x80, 0x88, 0xBC, 0xC4) in enemy_react's table
# (048EF6 "lea $53dea.l, A6"): the enemy let go, shown and hittable (04A338 "ori.b #$82, ($0,A0)"), placed by the
# turtle that holds it (04A34A "move.w ($4c,A0), D0", its attacker) and back to thinking
04A338  func  enemy_let_go_by_donatello
04A3F4  func  enemy_let_go_by_michelangelo
04A4B2  func  enemy_let_go_by_raphael
04A570  func  enemy_let_go_by_leonardo
# ---- the objects' fields still named after their offset ----
# the frames each of these moves of an enemy lasts, counted down at +46 (as enemy_grab's and enemy_back_off's time)
# 04DA40 "move.b #$20, ($46,A0)" (enemy_dive_in_start), 04DB00 "move.b #$14, ($46,A0)" (enemy_dive_in_curl),
# 04DACA "subq.b #1, ($46,A0)" (enemy_dive_in_dive), 04DB1A "subq.b #1, ($46,A0)" (enemy_dive_in_uncurl)
scoped object enemy_dive_in 46 time u8
# 04D82A "move.b #$60, ($46,A0)" (enemy_hang_in_start), 04D85C "subq.b #1, ($46,A0)" (enemy_hang_in_move)
scoped object enemy_hang_in 46 time u8
# 04D90A "move.b #$28, ($46,A0)" (enemy_kick_in_start), 04D91C "subq.b #1, ($46,A0)" (enemy_kick_in_run)
scoped object enemy_kick_in 46 time u8
# 04D9C2 "move.b #$7e, ($46,A0)" (enemy_run_in_start), 04D9F8 "subq.b #1, ($46,A0)" (enemy_run_in_run)
scoped object enemy_run_in 46 time u8
# 04D07C "move.b #$10, ($46,A0)" (enemy_step_down_start), 04D08E "subq.b #1, ($46,A0)" (enemy_step_down_wait)
scoped object enemy_step_down 46 time u8
# 04C82A "move.b #$18, ($46,A0)" (enemy_step_out_start), 04C860 "subq.b #1, ($46,A0)" (enemy_step_out_walk)
scoped object enemy_step_out 46 time u8
# 04B610 "move.b #$3a, ($46,A0)" (enemy_smash_hammer_start), 04B622 "subq.b #1, ($46,A0)" (enemy_smash_hammer_end)
scoped object enemy_smash_hammer 46 time u8
# the frames before the sword soldier's flying slash turns over: 04B570 "move.b #$48, ($46,A0)"
# (enemy_flying_slash_sword_leap), 04B588 "subq.b #1, ($46,A0)" (enemy_flying_slash_sword_fly)
scoped object enemy_flying_slash_sword 46 turn_time u8
# a random byte the charge rolls at its start (04942A "move.b D7, ($46,A0)", after random_below 0x100); when it
# brakes off its turtle's row, a roll with bit 7 set stops it longer (049484 "tst.b ($46,A0)")
scoped object enemy_charge 46 roll u8
# the whip arm's start clears a word nothing of its own reads (04B824 "clr.w ($46,A0)"; whip_arm_drag and
# whip_arm_place read Rodney's +46 through A1, 04B8D6 "move.b ($46,A1), D0")
scoped object whip_arm 46 unused_cleared u16
# Stockman clears a byte after he drops a Mouser that none of his routines reads (013E5E "clr.b ($31,A0)")
scoped object stockman 31 unused_cleared u8
# every object's start clears +2F for its kind (011076 "clr.b ($2f,A6)" in place_explosion, 0131AE in
# helicopter_start_bullet, 007348 in start_staff_roll_portraits, 57 in all), where each kind keeps a count of its own:
# the explosions a boss sets off (00E384 "addq.b #1, ($2f,A0)", 00E388 "cmpi.b #$a, ($2f,A0)"), the missiles left
# (00F8EA "move.b #$3, ($2f,A0)", 00F928 "subq.b #1, ($2f,A0)"), the stages of one (010658 "addq.b #1, ($2f,A0)",
# 01065C "cmpi.b #$7, ($2f,A0)")
field object 2F count u8
# the van of the car street's exit (object 40, 02C10E "lea $62c80.l, A6"): FF after the first frame it rolls or its
# other half slides back (02C11C "tst.b ($20,A6)", 02C124 "subq.b #1, ($20,A6)"; 02C1A0 "tst.b ($20,A6)", 02C1A6
# "subq.b #1, ($20,A6)")
scoped object car_street_van 20 once u8
local turtle_exit_car_street_board 02C10E,02C146,02C16A a6 van object.car_street_van
# the objects these functions start, by the record they start them from: the whip arm (0524F0 "jsr $47c5a.l",
# start_shot with whip_arm_shot_record; 0524FE "move.l A0, ($24,A6)": Rodney, its rodney), Shredder's ray (05370E
# "jsr $47c5a.l"; 053714 "move.l A0, ($24,A6)": its shredder), the boomerang (04F168 "jsr $47c5a.l"; 04F172 "move.l A0,
# ($20,A6)": its thrower)
local enemy_rodney_whip_throw_arm 0524F0 a6 arm object.whip_arm
local enemy_shredder_ray_fire 05370E a6 ray object.shredder_ray
local enemy_boomerang_throw_release 04F168 a6 boomerang object.boomerang
# the turtle that hit the enemy, by its attacker (049D8E "movea.l D0, A6", 048DF6, 05146C): its hit reaction
# (049DB0 "cmpi.b #$e, ($23,A6)"), its escape presses (048E16 "move.b #$10, ($27,A6)"), what holds it (049DCA "move.l
# A0, ($28,A6)")
local enemy_grab_hold 049D8E a6 turtle object.turtle
local enemy_hit 048DF6 a6 turtle object.turtle
local enemy_mouser_hit 05146C a6 turtle object.turtle
# a player's slot's turtle (047848 "movea.l (A6), A5"): its enemy_behind cleared every frame (047850 "clr.b ($44,A5)")
local update_player_slots 047848 a5 turtle object.turtle
# the four turtles (019B3A "lea $62000.l, A0", 019B82 "adda.l #$50, A0"): their invulnerability's bit 7 set when the
# entry blinks (019B74 "ori.b #$80, ($2d,A0)")
local turtle_join 019B3A,019B50,019B66,019B82 a0 turtle object.turtle
local turtle_respawn 019B92,019BA8,019BBE,019BDA a0 turtle object.turtle
local turtle_start_area 019BEA,019C0C,019C38,019C5C a0 turtle object.turtle
# ---- the work RAM's last unnamed variables: each written and never read ----
# four bytes reset_layers_scroll clears after the layers' scroll words (008CA2 "clr.b $60054.l", 008CA8 "clr.b
# $60055.l", 008CAE "clr.b $60056.l", 008CB4 "clr.b $60057.l"); nothing else touches them
060054  var  unused_scroll_reset_bytes[4]  u8
# 120 when an area's exit begins (006B76 "move.b #$78, $60081.l", area_exit_begin); nothing reads it
060081  var  unused_exit_wait  u8
# two bytes area_setup_variables clears after it sets the area's scene and stage (00630E "clr.b $60123.l", 006314
# "clr.b $60124.l"); nothing else touches them
060123  var  unused_area_setup_bytes[2]  u8
# the turtles' throw timers, Michelangelo's and Donatello's: frames since the turtle last threw an enemy.
# start_area_layers clears them (01E22E "move.w D0, $6110a.l", 01E234 "move.w D0, $6110c.l") and update_area_layers
# counts them up every frame (01EBDA "addq.w #1, $6110a.l", 01EBE0 "addq.w #1, $6110c.l"), as it does
# time_since_balloon (01EBCE "addq.w #1, $61104.l"); turtle_attack_over reaches them through turtle_throw_moves (01C072:
# 06110A for kind 1, 06110C for kind 2) and throws only at 0x100 or more, then clears it (01BFB2 "cmpi.w #$100, (A5)",
# 01BFBA "clr.w (A5)"). (Batch 8b-mem: they were unused_area_frames, "nothing reads them", before that read was seen)
06110A  var  throw_timers[2]  u16
# Leonardo's and Raphael's throw timers (turtle_throw_moves: 061114 for kind 0, 061116 for kind 3), cleared and
# counted with the others (01E228 "move.w D0, $61114.l", 01E23A "move.w D0, $61116.l"; 01EBD4 "addq.w #1, $61114.l",
# 01EBE6 "addq.w #1, $61116.l"). (They were unused_area_frames_copy)
061114  var  throw_timers_2[2]  u16
# a byte start_area_layers clears with the rest of the area's variables (01E240 "move.b D0, $633f0.l"); nothing reads it
0633F0  var  unused_area_start_byte  u8
# ---- the functions' comments (batch 6: every function of the 68000 with one) ----
comment direction_to the direction from the object to a place on the screen, from its quadrant and the angle table
comment draw_sprites every frame: the draw list's objects into the sprite chip with their shadows, their animations stepped on, the rest turned off
comment step_animation the object's animation stepped on to its next frame when the frame's time runs out, without drawing it
comment set_animation starts an animation on the object: its first frame, timed by the frame's count plus the object's animation delay
comment speeds_from_direction_unscaled Unused: speeds_from_direction's work without its last shift: the speeds across and up or down of a byte's speed in a direction, 256 times larger
comment lone_return_before_krang_explode_next Unused: an empty routine that returns at once
comment start_area_spawns the area's spawn list, the speeds and directions of its spawn scroll and where that scroll starts
comment spawn_enemies every frame: the spawn scroll moved on and, when it reaches the next record, its enemy put into a free object
comment spawn_enemy_level_with_scroll Unused: the next record's enemy put into a free object when the spawn scroll comes level with its y
comment spawn_offset the screen margin a spawn record's kind of enemy comes in from
comment take_free_object the first free object of the group a spawn record picks, and whether there is one
comment run_object_state the object's current state run from the table of state handlers it is given
comment move_object_with_height the object moved by its speeds, its height too
comment move_object the object moved by its speeds across and up or down
comment move_object_with_height_blocked the object moved by its speeds, its height too, but not into a side that is blocked
comment move_object_blocked the object moved by its speeds, but not into a side its contacts say is blocked
comment enemy_attack_chance the chance of the first of its definition's attacks whose reach holds its turtle; none out of reach
comment enemy_look_at_target where its turtle is from it and which way it faces; a turtle close by with its back turned hears it behind
comment enemy_nearest_turtles the two turtles nearest to the object, kept for later; with no turtle in play, the ones kept before
comment enemy_nearest_slots the two players' slots whose turtles are nearest to the object, kept; with no turtle in play, the ones kept before
comment random_below a random number below the one given, its seed stirred by the frame count and the object's place
comment enemy_target_distance_band Unused: which of three distances in a list the larger of its distances to its turtle is under, eight a step, 0x20 more when the larger is up or down
comment enemy_face_object the animation of the table toward the object, higher or lower on the screen, flipped to face it
comment enemy_set_facing_animation the animation of the table for the facing, one for each way up or down the screen, flipped to its side
comment enemy_turn_to_object the same toward the object, only when its facing changes
comment enemy_turn_animation a new animation only when the facing changes between up and down the screen; the flip follows a turn across
comment enemy_facing_bits which way to face the object: by how far it is up or down the screen, and on which side
comment enemy_face_direction the animation of the table for a direction, flipped to face it
comment enemy_turn_to_direction the same for a direction, only when its facing changes
comment direction_facing_bits which way to face for a direction: up or down the screen, left or right
comment enemy_keep_on_screen the screen's left and right edges taken as walls for the enemy
comment enemy_on_screen whether the enemy is on the screen across
comment enemy_set_health its health bars and health from its table, by the difficulty setting
comment enemy_refill_health its health filled again from its table by the difficulty setting, the bars left as they are
comment enemy_face_target turns to its turtle and gives its attack the side it faces
comment enemy_back_to_thinking back to thinking, no longer attacking
comment enemy_back_to_thinking_hittable back to thinking, and it can be hit again
comment enemy_landed whether it is down on its floor again, its height then set to the floor's
comment enemy_start_arc starts a leap or a fall along an arc record: its speeds and a first step across unless blocked
comment enemy_arc_step a frame of an arc: the speed across slowed by the record's drag, the fall sped up to its limit
comment enemy_leave_side gives up its place beside its turtle, if it has one
comment enemy_give_side_back its side of the players' slot given back, and back to its first approach
comment enemy_face_target_animation the animation of the table for the direction of its turtle, flipped to face it
comment enemy_flash_when_weak flashes in the colour given while it has 6 health bars or fewer
comment enemy_set_floor the floor height under it: raised in the far part of the sewers, else none
comment enemy_floor_contacts the floor map where it stands: its walls and edges into the contacts
comment enemy_floor_edges the floor map's walls around it into the contacts
comment enemy_check_floor_edge whether it steps over an edge: off an object it stands on, or up or down a ledge toward its turtle's floor
comment enemy_follow_stairs on stairs, its floor height up or down with them as it moves
comment enemy_follow_stairs_down on stairs, its floor height down with them
comment enemy_stairs_down its floor height down a step for every stairs row of the floor map below it
comment enemy_follow_stairs_up on stairs, its floor height up with them
comment enemy_stairs_up its floor height up a step for every stairs row above it, no higher than the stairs' top
comment enemy_foot_soldier_start kind 00, the bare-handed Foot soldier: its floor, one more enemy on the screen, then its setup
comment enemy_foot_soldier_setup the bare-handed soldier's turtle, health, definition and shadow; its way in by its parameter, or straight to thinking
comment enemy_enter the way in its move picks, keeping track of its turtle, the objects and the floor
comment enemy_think the thinking: a new turtle every 16 frames, a side by it or away, an attack by its definition's chances or its next move
comment enemy_attack the attack its move picks, keeping track of its turtle, the objects and the floor
comment enemy_hit hit: the sound, then its reaction by where the blow came from, its health and its definition
comment enemy_react the reaction to a hit its move picks, against the objects and the floor
comment enemy_step_over_edge the step over a floor edge its move picks, keeping track of its turtle and the floor
comment enemy_hop_crouch crouches before a hop over a floor edge
comment enemy_hop_down when the crouch ends, hops over an edge above or below it on the screen, as high as the area says
comment enemy_hop_fall a frame of the hop, its floor raised by stairs; on landing a crouch and 16 frames still
comment enemy_hop_land still for a moment after landing, then back to thinking
comment enemy_hop_right when the crouch ends, hops over an edge to the right, as high as the area says
comment enemy_hop_left when the crouch ends, hops over an edge to the left, as high as the area says
comment enemy_hop_up_crouch crouches as before jumping down off a ledge
comment enemy_hop_up when the crouch ends, jumps over an edge above or below it on the screen
comment enemy_hop_up_fall a frame of the jump, its floor lowered by stairs; on landing a drop pose and 16 frames still
comment enemy_hop_up_right when the crouch ends, jumps over an edge to the right
comment enemy_hop_up_fall_blocked a frame of the jump, not into walls, its floor lowered by stairs; on landing a crouch and 16 frames still
comment enemy_hop_up_left when the crouch ends, jumps over an edge to the left
comment enemy_shuffle sidesteps back and forth in its stance four times, then a new move
comment enemy_shuffle_start four sidesteps to go, from its stance
comment enemy_shuffle_step when the stance ends, sidesteps the way it faces
comment enemy_shuffle_turn a frame of the sidestep; at its end the other way, and after the fourth a last pose
comment enemy_shuffle_end when its last pose ends, its move and target timers cleared
comment enemy_retreat Unused: a move run from a table of states that no move picks
comment enemy_circle runs round its turtle for 180 frames, one way or the other at random, turning back when it bumps into something
comment enemy_circle_start 180 frames of running round its turtle, facing it, one way round or the other at random
comment enemy_circle_aim its speeds for running round its turtle the way it goes
comment enemy_circle_step a frame of the run round its turtle: the other way when it bumps into something, aiming again as its turtle moves
comment enemy_charge dashes across at its turtle and brakes past it
comment enemy_charge_start a dash across toward its turtle at full speed, for at most 180 frames
comment enemy_charge_run a frame of the dash until it is level with its turtle, then the braking time: longer, at random, when off its row
comment enemy_charge_brake runs on, then slows down in its last frames before the next move
comment enemy_walk_to_target walks to its turtle, aiming again every 8 frames
comment enemy_walk_to_target_start the walk's speed and animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_target_step a frame of the walk to its turtle, aiming again every 8 frames, standing when close
comment enemy_walk_to_side walks to its turtle's side, now and then crouching, and keeps level with it
comment enemy_walk_to_side_start 240 frames of walking to its turtle's side, facing it
comment enemy_walk_to_side_step a frame of the walk: across to its side or up or down to its turtle's row; level with it, the next state
comment enemy_walk_to_side_crouch one frame in 8 a crouch, else straight on to keeping level
comment enemy_walk_to_side_turn when the crouch ends, faces its turtle again
comment enemy_walk_to_side_hold level with its turtle: walks across until 0x10 away; off its row again, back to walking to its side
comment enemy_keep_distance keeps 0x50 to 0x70 away from its turtle, backing off when nearer and closing in when farther
comment enemy_keep_distance_start faces its turtle, for up to 255 frames of keeping its distance
comment enemy_keep_distance_watch stands facing its turtle; too near it backs off, too far it closes in
comment enemy_keep_distance_back_off walks away from its turtle until far enough, then watches again
comment enemy_keep_distance_close_in walks toward its turtle until near enough, then watches again
comment enemy_back_off walks away from its turtle for 40 frames, crouches, and waits while the turtle is down
comment enemy_back_off_start 40 frames of walking backwards away from its turtle, still facing it
comment enemy_back_off_walk a frame of walking away while its turtle is down; when the time runs out, a crouch
comment enemy_back_off_wait waits while its turtle is down; when it is up again, a new move
comment enemy_run_away runs away from its turtle for 8 frames
comment enemy_run_away_start 8 frames of running away from its turtle, still facing it
comment enemy_run_away_step a frame of running away; at its end, back to its first approach
comment enemy_walk_across walks across toward its turtle for 120 frames
comment enemy_walk_across_start 120 frames of walking across toward its turtle, facing it
comment enemy_walk_across_step a frame of walking across, turned to its turtle
comment enemy_jab a jab, back to thinking when it ends
comment enemy_jab_start the jab's animation and damage, facing its turtle
comment enemy_attack_end back to thinking when the attack's animation ends
comment enemy_chop a chop, back to thinking when it ends
comment enemy_chop_start the chop's animation and damage, facing its turtle
comment enemy_swing a swing, back to thinking when it ends
comment enemy_swing_start the swing's animation and damage, facing its turtle
comment enemy_high_kick a high kick, back to thinking when it ends
comment enemy_high_kick_start the high kick's animation and damage, facing its turtle
comment enemy_jump_kick a flying kick: a crouch, a leap along its arc and the landing
comment enemy_jump_kick_crouch crouches for the flying kick, its damage set, facing its turtle
comment enemy_jump_kick_leap when the crouch ends, leaps along the kick's arc
comment enemy_jump_kick_fly a frame of the flying kick along its arc, following stairs; on landing a crouch
comment enemy_long_jump_kick a flying kick along a longer arc
comment enemy_long_jump_kick_crouch crouches for the long flying kick, its damage set, facing its turtle
comment enemy_long_jump_kick_leap when the crouch ends, leaps along the long kick's arc
comment enemy_long_jump_kick_fly a frame of the long flying kick along its arc, following stairs; on landing a crouch
comment enemy_grab runs at its turtle with its arms out and holds it, one grab at a time per turtle
comment enemy_grab_start unless its turtle faces it, is down or is being grabbed: runs at it with its arms out for 60 frames
comment enemy_grab_run a frame of the run at its turtle; catching it, it hides in the hold; the turtle down or time up, it thinks again
comment enemy_grab_hold keeps its turtle held while the turtle struggles; the turtle loose, the next state; the turtle up again, the enemy is gone
comment enemy_grab_end lets go: shown again, hittable, and back to thinking
comment enemy_flinch_back hit: a flinch with its head thrown back, then back to thinking
comment enemy_flinch_back_start the flinch with its head thrown back
comment enemy_flinch_end when the flinch ends, back to thinking, and it can be hit again
comment enemy_flinch_bent hit: a flinch bent over, then back to thinking
comment enemy_flinch_bent_start the flinch bent over
comment enemy_flinch_reel hit: a flinch reeling, then back to thinking
comment enemy_flinch_reel_start the flinch reeling
comment enemy_flinch_hunched hit: a flinch hunched, then back to thinking
comment enemy_flinch_hunched_start the flinch hunched
comment enemy_killed_back killed: knocked flying on its back, splatting against a wall it meets, then its death
comment enemy_killed_back_start knocked flying on its back along its arc, its side by the turtle given up
comment enemy_killed_back_fly a frame of the flight: against a wall a splat with its sound, else on landing it lies down
comment enemy_killed_back_lie slides to a stop on its back, then its death, one enemy less after its turtle
comment enemy_killed_back_on_wall stuck on the wall while the splat lasts
comment enemy_killed_back_slide_down slides down the wall to the floor, then lies there
comment enemy_killed_back_down when it has lain long enough, its death, one enemy less after its turtle
comment enemy_killed_forward killed: falling on its face, splatting against a wall it meets, then its death
comment enemy_killed_forward_start knocked flying forward along its arc, its side by the turtle given up
comment enemy_killed_forward_fly a frame of the flight: against a wall a splat with its sound, else on landing it lies down
comment enemy_killed_forward_lie slides to a stop on its face, then its death, one enemy less after its turtle
comment enemy_killed_forward_on_wall stuck on the wall while the splat lasts
comment enemy_killed_forward_slide_down slides down the wall to the floor, then lies there
comment enemy_killed_forward_down when it has lain long enough, its death, one enemy less after its turtle
comment enemy_knocked_forward knocked down on its face: lies 30 frames and gets up, or dies with no bar left
comment enemy_knocked_forward_start knocked down forward along its arc, its side by the turtle given up
comment enemy_knocked_forward_fly a frame of the fall; on landing it lies down
comment enemy_knocked_forward_lie slides to a stop; 30 frames on the ground, or its death with no bar left
comment enemy_knocked_forward_wait lies on the ground for its time, then gets up
comment enemy_thrown_by_donatello thrown by Donatello: hidden while he swings it, then placed by him, hurt and knocked flying on its back
comment enemy_thrown_by_donatello_start hidden in Donatello's hands for the 12 frames of his swing
comment enemy_thrown_by_donatello_swing when the swing ends: placed by Donatello, hurt, shown again and knocked flying on its back
comment enemy_thrown_fly a frame of the flight after a throw: against a wall a splat with its sound, else on landing it lies down
comment enemy_take_damage the damage taken off its health, and off its bars when the health runs out, down to none
comment enemy_place_by placed at a record's offsets from another object, mirrored by its facing, at that object's height and floor
comment enemy_let_go_by_donatello let go by Donatello: placed by him, shown, hittable and back to thinking
comment enemy_thrown_by_michelangelo thrown by Michelangelo: hidden while he swings it, then placed by him, hurt and knocked flying on its back
comment enemy_thrown_by_michelangelo_start hidden in Michelangelo's hands for the 18 frames of his swing
comment enemy_thrown_by_michelangelo_swing when the swing ends: placed by Michelangelo, hurt, shown again and knocked flying on its back
comment enemy_let_go_by_michelangelo let go by Michelangelo: placed by him, shown, hittable and back to thinking
comment enemy_thrown_by_raphael thrown by Raphael: hidden while he swings it, then placed by him, hurt and knocked flying on its back
comment enemy_thrown_by_raphael_start hidden in Raphael's hands for the 16 frames of his swing
comment enemy_thrown_by_raphael_swing when the swing ends: placed by Raphael, hurt, shown again and knocked flying on its back
comment enemy_let_go_by_raphael let go by Raphael: placed by him, shown, hittable and back to thinking
comment enemy_thrown_by_leonardo thrown by Leonardo: hidden while he swings it, then placed by him, hurt and knocked flying on its back
comment enemy_thrown_by_leonardo_start hidden in Leonardo's hands for the 20 frames of his swing
comment enemy_thrown_by_leonardo_swing when the swing ends: placed by Leonardo, hurt, shown again and knocked flying on its back
comment enemy_let_go_by_leonardo let go by Leonardo: placed by him, shown, hittable and back to thinking
comment enemy_knocked_back knocked down on its back: lies 30 frames and gets up, or dies with no bar left
comment enemy_knocked_back_start knocked down backwards along its arc, its side by the turtle given up
comment enemy_knocked_back_fly a frame of the fall; on landing it lies down
comment enemy_knocked_back_lie slides to a stop; 30 frames on the ground, or its death with no bar left
comment enemy_knocked_back_wait lies on the ground for its time, then gets up
comment enemy_knocked_back_get_up when it is up, back to thinking, hittable, with its health back if it had run out
comment enemy_die dies: its sound, its death animation, and it is gone
comment enemy_die_start the death's sound and animation; it can no longer hit or be hit
comment enemy_die_vanish when the death animation ends, it is gone, one enemy less on the screen
comment enemy_die_on_back dies on its back: its sound, its death animation, and it is gone
comment enemy_die_on_back_start the death on its back: its sound and animation; it can no longer hit or be hit
comment enemy_sword_soldier_start kind 01, the sword soldier: its turtle, health, colour, definition and shadow, straight to thinking
comment enemy_hammer_soldier_start kind 02, the hammer soldier: its turtle, health, colour, definition and shadow, straight to thinking
comment enemy_walk_to_target_sword walks to its turtle with the sword
comment enemy_walk_to_target_sword_start the walk with the sword's animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_sword walks to its side of its turtle with the sword
comment enemy_walk_to_side_sword_start 240 frames of walking to its turtle's side with the sword, facing it
comment enemy_walk_to_side_sword_crouch now and then, by the frame count, a crouch with the sword, else straight on to keeping level
comment enemy_walk_to_side_sword_turn when the crouch ends, faces its turtle again
comment enemy_walk_past_sword walks across past its turtle while off its row, then up or down to it
comment enemy_walk_past_sword_start 180 frames of walking past its turtle with the sword, facing it
comment enemy_walk_past_sword_step a frame of the walk: across past its turtle while off its row, turning back beyond 0x40, else up or down to it
comment enemy_back_off_sword walks away with the sword, crouches and waits while its turtle is down
comment enemy_back_off_sword_start 40 frames of walking backwards away from its turtle with the sword, still facing it
comment enemy_back_off_sword_walk a frame of walking away while its turtle is down; when the time runs out, a crouch
comment enemy_back_off_sword_wait waits while its turtle is down; when it is up again, a new move
comment enemy_walk_to_line_sword walks up or down the screen toward its turtle's row for 16 frames
comment enemy_walk_to_line_sword_start 16 frames of walking up or down toward its turtle's row, facing it
comment enemy_walk_to_line_sword_step a frame of the walk toward its turtle's row; at its end, back to its first approach
comment enemy_walk_to_target_hammer walks to its turtle with the hammer
comment enemy_walk_to_target_hammer_start the walk with the hammer's animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_hammer walks to its side of its turtle with the hammer, stopping 0x40 across
comment enemy_walk_to_side_hammer_start 240 frames of walking to its turtle's side with the hammer, facing it
comment enemy_walk_to_side_far_step a frame of the walk: across to 0x40 by its turtle or up or down to its row; level with it, the next state
comment enemy_walk_to_side_far_hold level with its turtle: walks across toward it; off its row again, back to walking to its side
comment enemy_stalk_hammer the hammer soldier closes in across, then waits with the hammer up and steps to its turtle's row by turns
comment enemy_stalk_hammer_start up to 255 frames of stalking its turtle with the hammer, facing it
comment enemy_stalk_hammer_approach walks across toward its turtle until 0x40 away
comment enemy_stalk_hammer_step by turns of 48 frames, stands with the hammer up or steps toward its turtle's row; too far, it closes in again
comment enemy_walk_away_hammer walks away for 64 frames, then waits with the hammer up while its turtle is down
comment enemy_walk_away_hammer_start 64 frames of walking away from its turtle across, facing it
comment enemy_walk_away_hammer_walk a frame of the walk away; at its end, the hammer up
comment enemy_walk_away_hammer_wait with the hammer up while its turtle is down; when it is up again, a new move
comment enemy_slash_sword a slash with the sword
comment enemy_slash_sword_start the slash's animation and damage, facing its turtle
comment enemy_low_slash_sword a low slash with the sword
comment enemy_low_slash_sword_start the low slash's animation and damage, facing its turtle
comment enemy_leaping_slash_sword a leap at its turtle, as far as the turtle is, slashing
comment enemy_leaping_slash_sword_start readies the leaping slash: its animation and damage, facing its turtle
comment enemy_leaping_slash_sword_leap when the pose ends, leaps along its arc, faster across the farther its turtle is
comment enemy_leaping_slash_sword_fly a frame of the leap along its arc, following stairs; on landing its last pose
comment enemy_jump_slash_sword a jump slashing with the sword
comment enemy_jump_slash_sword_start readies the jumping slash: the sword up and its damage, facing its turtle
comment enemy_jump_slash_sword_leap when the pose ends, jumps along its arc slashing
comment enemy_jump_slash_sword_fly a frame of the jump along its arc, following stairs; on landing the sword up again
comment enemy_flying_slash_sword a long leap slashing, turning over in the air
comment enemy_flying_slash_sword_start readies the flying slash: the sword up and its damage, facing its turtle
comment enemy_flying_slash_sword_leap when the pose ends, leaps along its arc, faster across the farther its turtle is
comment enemy_flying_slash_sword_fly a frame of the leap, turning over after 72 frames, following stairs; on landing a crouch
comment enemy_smash_hammer a blow with the hammer, 58 frames
comment enemy_smash_hammer_start the blow's animation, damage and sound, facing its turtle
comment enemy_smash_hammer_end back to thinking when the blow's 58 frames are over
comment enemy_flinch_back_sword hit: the sword soldier flinches with its head thrown back
comment enemy_flinch_back_sword_start the sword soldier's flinch with its head thrown back
comment enemy_flinch_bent_sword hit: the sword soldier flinches bent over
comment enemy_flinch_bent_sword_start the sword soldier's flinch bent over
comment enemy_flinch_reel_sword hit: the sword soldier flinches reeling
comment enemy_flinch_reel_sword_start the sword soldier's flinch reeling
comment enemy_flinch_hunched_sword hit: the sword soldier flinches hunched
comment enemy_flinch_hunched_sword_start the sword soldier's flinch hunched
comment enemy_flinch_back_hammer hit: the hammer soldier flinches with its head thrown back
comment enemy_flinch_back_hammer_start the hammer soldier's flinch with its head thrown back
comment enemy_flinch_bent_hammer hit: the hammer soldier flinches bent over
comment enemy_flinch_bent_hammer_start the hammer soldier's flinch bent over
comment enemy_flinch_hunched_hammer hit hunched: the hammer soldier runs the same flinch as with its head thrown back
comment enemy_flinch_hunched_hammer_start Unused: the hammer soldier's flinch hunched over starts as the bent one does: the next state and the same animation
comment shuriken_struck_without_sound Unused: a shuriken struck: it no longer hits or can be hit, with its struck animation
comment rocksteady_bullet_burst Rocksteady's bullet struck: it bursts with a sound, no longer hitting or hittable; never in the game, as nothing can strike the bullet
comment enemy_step_out_start way in 2, out of a door or a lift: shown, hittable, its first pose for 24 frames
comment enemy_step_out_wait waits in the doorway, then walks out for 32 frames
comment enemy_step_out_walk a frame of walking out of the door; at its end, to thinking
comment enemy_walk_in_on_ledge_start way in 1: walks in from the right on the ledge
comment enemy_walk_in_on_ledge_walk walks along the ledge; on the screen it crouches to jump down, or thinks up there if the nearest turtle is too
comment enemy_jump_down_leap when the crouch ends, jumps down off the ledge
comment enemy_jump_down_fall_stairs a frame of the jump down, following stairs
comment enemy_jump_down_fall a frame of the fall off the ledge; on landing a drop pose
comment enemy_jump_down_land when the landing pose ends, to thinking
comment enemy_step_down_start way in 3: a step forward to the edge of its ledge for 16 frames
comment enemy_step_down_wait after the step, a crouch for the jump down
comment enemy_leap_out_start way in 4: leaps up out of the sewer's water
comment enemy_leap_out_fly a frame of the leap; on landing a crouch
comment enemy_leap_out_land when the crouch ends, to thinking
comment enemy_rocket_soldier_start kind 56, the Foot soldier with a rocket on its shoulder: comes in slowly from the right
comment enemy_rocket_soldier_line_up comes in, moving up or down to the nearest turtle's row; on the screen and level with it, aims
comment enemy_rocket_soldier_fire when the aim ends, fires the rocket with its sound; it can no longer be hit
comment enemy_rocket_soldier_unarmed when the throw pose ends, it starts again as a bare-handed soldier
comment enemy_rocket_soldier_struck hit with the rocket on: drops it and takes the hit as a bare-handed soldier
comment enemy_hang_in_start way in 5: hangs by its hands, moving across for 96 frames
comment enemy_hang_in_move moves across hanging by its hands; at its end it lets go, hittable
comment enemy_hang_in_drop a frame of the drop; on landing a drop pose
comment enemy_hang_in_land when the landing pose ends, to thinking
comment enemy_kick_in_start way in 6: runs in at full speed for 40 frames
comment enemy_kick_in_run runs in, then crouches for the kick
comment enemy_kick_in_leap when the crouch ends, flies in with a kick along its arc, attacking
comment enemy_kick_in_fly a frame of the flying kick; on landing a crouch, no longer attacking
comment enemy_kick_in_land when the crouch ends, to thinking
comment enemy_run_in_start way in 7: runs in across for 126 frames
comment enemy_run_in_run a frame of the run in; at its end, to thinking
comment enemy_dive_in_start way in 8: runs in on the ledge at full speed
comment enemy_dive_in_run runs along the ledge; on the screen it crouches to dive off, and thinks if the nearest turtle is up there
comment enemy_dive_in_leap when the crouch ends, leaps off the ledge
comment enemy_dive_in_dive a frame of the leap, following stairs; after 12 frames the dive
comment enemy_dive_in_curl a frame of the dive; when its pose ends, it curls up for 20 frames
comment enemy_dive_in_uncurl a frame of the fall curled up; at its end it uncurls
comment enemy_dive_in_land a frame of the fall, following stairs; on landing a crouch
comment enemy_walk_in_start way in 9: walks in across for 26 frames
comment enemy_walk_in_walk a frame of the walk in; at its end it stands ready for 48 frames
comment enemy_walk_in_ready stands ready, then to thinking
comment enemy_walk_to_target_spear_start the walk with the spear's animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_spear_start 240 frames of walking to its turtle's side with the spear, facing it
comment enemy_walk_off_line_spear_start 180 frames of walking off its turtle's row with the spear, facing it
comment enemy_walk_off_line_spear_step a frame of the walk: across past its turtle while off its row, turning back beyond 0x40, else up or down
comment enemy_back_off_spear_start 32 frames of walking away across with the spear, facing its turtle
comment enemy_back_off_spear_walk a frame of the walk away; at its end, a crouch
comment enemy_step_aside_spear_start 16 frames of stepping up or down and away out of its turtle's attack, facing it
comment enemy_step_aside_spear_step a frame of the step aside; at its end, back to its first approach
comment enemy_walk_to_target_knife_start the walk with the knife's animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_knife_start 240 frames of walking to its turtle's side with the knife, facing it
comment enemy_circle_knife_start 180 frames of running round its turtle with the knife, one way round or the other at random
comment enemy_circle_knife_aim its speeds for running round its turtle with the knife the way it goes
comment enemy_circle_knife_step a frame of the run round its turtle: the other way when it bumps into something, aiming again as its turtle moves
comment enemy_keep_distance_knife_start faces its turtle with the knife, for up to 255 frames of keeping its distance
comment enemy_keep_distance_knife_watch stands facing its turtle with the knife; too near it backs off, too far it closes in
comment enemy_keep_distance_knife_back_off walks away from its turtle with the knife until far enough, then watches again
comment enemy_keep_distance_knife_close_in walks toward its turtle with the knife until near enough, then watches again
comment enemy_back_off_knife_start 30 frames of walking backwards away from its turtle with the knife, still facing it
comment enemy_back_off_knife_walk a frame of walking away while its turtle is down; at its end it turns to the turtle
comment enemy_back_off_knife_wait waits while its turtle is down; when it is up again, a new move
comment enemy_step_aside_knife_start 8 frames of stepping up or down out of its turtle's attack, facing it
comment enemy_step_aside_knife_step a frame of the step aside; at its end, back to its first approach
comment enemy_spear_thrust_start the thrust's animation and damage, facing its turtle
comment enemy_spear_thrust_end when the thrust ends: after enough hits the spear throw, else back to thinking
comment enemy_spear_throw_start faces its turtle with the throw's animation; the spear goes in 20 frames
comment enemy_spear_throw_release after 20 frames the spear flies, and it cannot be hit
comment enemy_spear_throw_end when the throw ends, it starts again as a bare-handed soldier, thinking
comment enemy_knife_stab_start the stab's animation and damage, facing its turtle
comment enemy_high_kick_knife_start the high kick's animation and damage, facing its turtle
comment enemy_jump_kick_knife_crouch crouches for the flying kick, its damage set, facing its turtle
comment enemy_jump_kick_knife_leap when the crouch ends, leaps along the kick's arc
comment enemy_jump_kick_knife_fly a frame of the flying kick along its arc, following stairs; on landing a crouch
comment enemy_throw_knife_start faces its turtle with the throw's animation; the knife goes in 20 frames
comment enemy_throw_knife_release after 20 frames the knife flies
comment enemy_throw_knife_end back to thinking when the throw's animation ends
comment enemy_flinch_back_spear_start the spear soldier's flinch with its head thrown back
comment enemy_flinch_bent_spear_start the spear soldier's flinch bent over
comment enemy_flinch_reel_spear_start the spear soldier's flinch reeling
comment enemy_flinch_hunched_spear_start the spear soldier's flinch hunched
comment enemy_flinch_back_knife hit: the knife soldier flinches with its head thrown back
comment enemy_flinch_back_knife_start the knife soldier's flinch with its head thrown back
comment enemy_flinch_bent_knife hit: the knife soldier flinches bent over
comment enemy_flinch_bent_knife_start the knife soldier's flinch bent over
comment enemy_flinch_reel_knife hit: the knife soldier flinches reeling
comment enemy_flinch_reel_knife_start the knife soldier's flinch reeling
comment enemy_flinch_hunched_knife hit: the knife soldier flinches hunched
comment enemy_flinch_hunched_knife_start the knife soldier's flinch hunched
comment enemy_walk_to_target_gun_start the walk with the gun's animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_gun_start 240 frames of walking to its turtle's side with the gun, facing it
comment enemy_walk_to_range_gun_start 240 frames of walking to shooting distance from its turtle, facing it
comment enemy_back_off_gun_start 32 frames of walking backwards away from its turtle with the gun, still facing it
comment enemy_back_off_gun_walk a frame of walking away while its turtle is down; when the time runs out, a crouch
comment enemy_back_off_gun_wait waits while its turtle is down; when it is up again, a new move
comment enemy_run_away_gun_start 8 frames of running straight away from its turtle with the gun, still facing it
comment enemy_run_away_gun_step a frame of running away; at its end, back to its first approach and a new move
comment enemy_walk_to_target_axe_start the walk with the axes' animations, facing its turtle; it aims again in 8 frames
comment enemy_walk_to_side_axe_start 240 frames of walking to its turtle's side with the axes, facing it
comment enemy_walk_to_range_axe_start 240 frames of walking to throwing distance from its turtle, facing it
comment enemy_back_off_axe_start 40 frames of walking backwards away from its turtle with the axes, still facing it
comment enemy_back_off_axe_walk a frame of walking away while its turtle is down; when the time runs out, a crouch
comment enemy_back_off_axe_wait waits while its turtle is down; when it is up again, a new move
comment enemy_run_away_axe_start 8 frames of running straight away from its turtle with the axes, still facing it
comment enemy_run_away_axe_step a frame of running away; at its end, back to its first approach and a new move
comment enemy_throw_axes_start faces its turtle with the throw's animation: three axes to go, 16 frames apart
comment enemy_throw_axes_release every 16 frames an axe with its sound; after the third, a crouch
comment enemy_high_kick_axe_start the high kick's animation and damage, facing its turtle
comment enemy_gun_swing_start the swing's animation and damage, facing its turtle
comment enemy_shoot_gun_start faces its turtle with the gun up: four shots to go, 8 frames apart
comment enemy_shoot_gun_fire every 8 frames a shot with its sound; after the fourth, a crouch
comment enemy_flinch_back_gun hit: the gun soldier flinches with its head thrown back
comment enemy_flinch_back_gun_start the gun soldier's flinch with its head thrown back
comment enemy_flinch_bent_gun hit: the gun soldier flinches bent over
comment enemy_flinch_bent_gun_start the gun soldier's flinch bent over
comment enemy_flinch_back_axe hit: the axe soldier flinches with its head thrown back
comment enemy_flinch_back_axe_start the axe soldier's flinch with its head thrown back
comment enemy_flinch_bent_axe hit: the axe soldier flinches bent over
comment enemy_flinch_bent_axe_start the axe soldier's flinch bent over
comment enemy_flinch_reel_axe hit: the axe soldier flinches reeling
comment enemy_flinch_reel_axe_start the axe soldier's flinch reeling
comment enemy_throw_shuriken_start faces its turtle with the throw's animation; the shuriken goes in 20 frames
comment enemy_throw_shuriken_release after 20 frames the shuriken flies, with its sound
comment enemy_boomerang_throw_wind_up winds up for the boomerang throw
comment enemy_boomerang_throw_aim when the wind-up ends, faces its turtle; the boomerang goes in 16 frames
comment enemy_boomerang_throw_release after 16 frames the boomerang flies with its sound, knowing its thrower
comment enemy_boomerang_throw_wait waits for its boomerang: back to thinking if a turtle breaks it, a pose after 60 frames
comment enemy_rocksteady_enter_wait waits a moment, then his laugh
comment enemy_rocksteady_enter_taunt after the laugh, the boss music and his taunt in a balloon, on his row, laughing on
comment enemy_rocksteady_enter_ready after the taunt, his health by the difficulty and his walk
comment enemy_rocksteady_enter_walk_in walks in for 16 frames, then can be hit and thinks
comment enemy_rocksteady_enter_wait_for_signal beside Bebop: waits for the signal for the bosses to come out, then walks
comment enemy_rocksteady_enter_walk_in_with_bebop walks in for 32 frames, then his health and palette, hittable, and he thinks
comment start_rocksteady Rocksteady put into a free object for his fight, at his place
comment enemy_rocksteady_raise_fist_start raises his fist at his turtle
comment enemy_rocksteady_laugh_start laughs at his turtle for 136 frames
comment enemy_rocksteady_shake_fist_start shakes his fist at his turtle for 64 frames
comment enemy_rocksteady_draw_gun_start draws his gun, facing his turtle
comment enemy_rocksteady_put_gun_away_start puts his gun away, facing his turtle
comment enemy_rocksteady_circle_start 180 frames of walking round his turtle, one way or the other at random
comment enemy_rocksteady_circle_step a frame of the walk round his turtle, aiming again every 8 frames
comment enemy_rocksteady_line_up_start with the gun up, 240 frames of lining up with his turtle
comment enemy_rocksteady_line_up_step a frame of lining up: away across while nearer than 0x50, then up or down to his turtle's row
comment enemy_rocksteady_close_in_start with the gun level, 128 frames of closing in on his turtle
comment enemy_rocksteady_close_in_step a frame of closing in, aiming every 8 frames at a place just in front of his turtle
comment enemy_rocksteady_shoot_around_start six aims to go round, three shots each
comment enemy_rocksteady_shoot_around_fire every 8 frames a bullet with its sound; after three, the next aim with its pose
comment enemy_rocksteady_pincer_charge_start the pincer charge with Bebop: gun out or not, he runs to his edge of the screen
comment enemy_rocksteady_pincer_charge_run_to_edge runs to his edge; at the wall he turns round and marks his edge taken
comment enemy_rocksteady_pincer_charge_wait_for_bebop waits until Bebop holds the other edge, then readies the charge, no longer hittable
comment enemy_rocksteady_pincer_charge_get_ready 30 frames, then the charge across
comment enemy_rocksteady_pincer_charge_run a frame of the charge, following his turtle's row; at the wall it ends, crashing into Bebop a fall
comment enemy_rocksteady_pincer_charge_crash when the crash into Bebop ends, he is knocked down
comment enemy_rocksteady_charge_start the charge's animation and damage, facing his turtle, not hittable; 30 frames to get ready
comment enemy_rocksteady_charge_get_ready after 30 frames, charges across at full speed, attacking
comment enemy_rocksteady_charge_run a frame of the charge, following his turtle's row; at the wall, hittable again and back to thinking
comment enemy_rocksteady_punch_start the punch's animation and damage, facing his turtle; hittable, unless he was not and two or more turtles play
comment enemy_rocksteady_gun_butt_start a blow with the gun's butt: its animation and damage, facing his turtle
comment enemy_rocksteady_shoot_start four shots at his turtle, level, or up at one high in the air
comment enemy_rocksteady_shoot_fire every 8 frames a bullet with its sound; after the fourth, back to thinking
comment enemy_rocksteady_flinch_start his flinch, gun out or not
comment enemy_rocksteady_reel_start his reel, gun out or not
comment enemy_rocksteady_flinch_from_behind_start his flinch from a hit from behind, gun out or not
comment enemy_rocksteady_knocked_down_start knocked down along his arc, gun out or not, facing his turtle
comment enemy_rocksteady_knocked_down_fall a frame of the fall; on landing he slides
comment enemy_rocksteady_knocked_down_slide slides to a stop, then lies 30 frames
comment enemy_rocksteady_knocked_down_lie lies on the ground, then his health back by the difficulty and he gets up
comment enemy_rocksteady_knocked_down_get_up when he is up: the hits he takes before striking back, by the difficulty, hittable, thinking
comment enemy_rocksteady_defeated_start defeated: no more pincer charge, thrown along his arc, gun out or not
comment enemy_rocksteady_defeated_fall a frame of the fall; on landing a sound and one boss less, the last one ending the fight and the music
comment enemy_rocksteady_defeated_slide slides to a stop, then blinks 120 frames
comment enemy_rocksteady_defeated_blink blinks, then he is gone
comment enemy_bebop_enter_wait_for_scroll waits until the scroll reaches him, then the music fades out and his health is set
comment enemy_bebop_enter_wait waits 90 frames, then stands still
comment enemy_bebop_enter_drop drops onto his floor; on landing a sound and his landing pose
comment enemy_bebop_enter_jump when the pose ends, jumps forward off his floor
comment enemy_bebop_enter_in_air a frame of the jump; on landing a sound and a pose, then he gets ready
comment enemy_bebop_enter_ready when the pose ends, hittable and thinking, with the boss music
comment enemy_bebop_enter_wait_for_signal beside Rocksteady: waits for the signal for the bosses to come out, then walks
comment enemy_bebop_enter_walk_in walks in for 32 frames, then his health and palette, hittable, and he thinks
comment enemy_bebop_stand_start 120 frames standing facing his turtle, in one of four poses at random
comment enemy_bebop_stand_wait stands while the move's time runs out
comment enemy_bebop_walk_to_front_start 240 frames of walking to a place 0x50 in front of his turtle
comment enemy_bebop_walk_to_front_step a frame of the walk, aiming every 4 frames, slower when near or level with his turtle
comment enemy_bebop_walk_level_step a frame of the walk: up or down to his turtle's row, then across toward it, faster when far
comment enemy_bebop_close_in_step a frame of closing in on a place 0x30 in front of his turtle, aiming every 4 frames; level with it he stands
comment enemy_bebop_pincer_charge_start the pincer charge with Rocksteady: he runs to his edge of the screen
comment enemy_bebop_pincer_charge_run_to_edge runs to his edge; at the wall he turns round and marks his edge taken
comment enemy_bebop_pincer_charge_wait_for_rocksteady waits until Rocksteady holds the other edge, then readies the charge, no longer hittable
comment enemy_bebop_pincer_charge_get_ready 30 frames, then the charge across
comment enemy_bebop_pincer_charge_run a frame of the charge on his turtle's row; at a wall the next in 360 frames; meeting Rocksteady, they crash
comment enemy_bebop_pincer_charge_crash when the crash ends, the next pincer charge in 1800 frames, and he is knocked down
comment enemy_bebop_punch_start the punch, slowed by his punch delay, facing his turtle; hittable, unless he was not and two or more turtles play
comment enemy_bebop_punch_end a frame of the punch, lunging forward when he strikes back; at its end, back to thinking
comment enemy_bebop_charge_start the charge's animation and damage, facing his turtle, not hittable; 30 frames to get ready
comment enemy_bebop_charge_get_ready after 30 frames, charges across at full speed, attacking
comment enemy_bebop_charge_run a frame of the charge, following his turtle's row; at the wall, hittable again and a walk to his turtle's front
comment enemy_bebop_shoot_start three shots at his turtle: he faces it, the first in 20 frames
comment enemy_bebop_shoot_fire a shot with its sound, then every 12 frames; after the third, back to thinking
comment enemy_bebop_flinch_start his flinch, knocked back
comment enemy_bebop_flinch_from_behind_start hit from behind, he staggers forward for 48 frames
comment enemy_bebop_flinch_from_behind_end after the stagger he strikes back with a quick punch
comment enemy_bebop_knocked_down_start knocked down along his arc, facing his turtle
comment enemy_bebop_knocked_down_fall a frame of the fall; on landing he slides
comment enemy_bebop_knocked_down_slide slides to a stop, then lies 20 frames
comment enemy_bebop_knocked_down_lie lies on the ground, then his health back by the difficulty and he gets up
comment enemy_bebop_defeated_start defeated: no more pincer charge, thrown along his arc
comment enemy_bebop_defeated_fall a frame of the fall; on landing a sound and one boss less, the last one ending the fight and the music
comment enemy_bebop_defeated_slide slides to a stop, then blinks 120 frames
comment enemy_bebop_defeated_blink blinks, then he is gone
comment enemy_mouser_enter_start a Mouser's way in: its floor and first pose by its parameter
comment enemy_mouser_enter_hop when the pose ends, hops out by its parameter, hittable
comment enemy_mouser_enter_fall a frame of the hop; on landing a sound and its landing pose
comment enemy_mouser_enter_land when the pose ends, to thinking
comment enemy_mouser_bite_start the bite: leaps at its turtle along its arc, attacking
comment enemy_mouser_bite_fly a frame of the leap; biting, it hides and hangs on; missing, it lands and waits 16 frames
comment enemy_mouser_bite_land waits after the missed bite, then back to thinking
comment enemy_mouser_bite_hold hangs on its turtle; once the turtle is no longer held, the Mouser is gone
comment enemy_mouser_hop_down hops over an edge above or below it on the screen, as high as the area says
comment enemy_mouser_hop_fall a frame of the hop, its floor raised by stairs; on landing a pose and 16 frames still
comment enemy_mouser_hop_land still for a moment after landing, then back to thinking
comment enemy_mouser_hop_right hops over an edge to the right, as high as the area says
comment enemy_mouser_hop_left hops over an edge to the left, as high as the area says
comment enemy_mouser_hop_up jumps over an edge above or below it on the screen
comment enemy_mouser_hop_up_fall a frame of the jump, its floor lowered by stairs; on landing a pose and 16 frames still
comment enemy_mouser_hop_up_right jumps over an edge to the right
comment enemy_mouser_hop_up_fall_blocked a frame of the jump, not into walls, its floor lowered by stairs; on landing a pose and 16 frames still
comment enemy_mouser_hop_up_left jumps over an edge to the left
comment enemy_mouser_chase_start chases its turtle for a random time under 240 frames
comment enemy_mouser_chase_run a frame of the chase, aiming every 8 frames; close to its turtle or the time up, it sits
comment enemy_mouser_chase_pause sits for 120 frames
comment enemy_mouser_chase_wait sits, then chases again
comment enemy_mouser_creep_to_side_start creeps to its side of its turtle, aiming in 8 frames
comment enemy_mouser_creep_to_side_step a frame of creeping to 0x20 beside its turtle, aiming every 8 frames
comment enemy_mouser_back_off_start 32 frames of running away from its turtle
comment enemy_mouser_back_off_run a frame of running away; at its end it sits
comment enemy_mouser_back_off_wait sits while its turtle is down; when it is up again, back to thinking with a new move
comment enemy_mouser_thrown_off_start thrown off by the turtle it held: shown again, tumbling along its arc the way it faced
comment enemy_mouser_break_down_start its boss down, it hops off tumbling along its arc and breaks
comment enemy_mouser_knocked_flying_start knocked flying by a hit, tumbling along its arc, its side given up
comment enemy_rodney_enter_wait once on the screen, or when its wait runs out, a sound and the floor cracks
comment enemy_rodney_enter_burst_out when the cracks end, it bursts up out of the floor with a jump, hittable
comment enemy_rodney_enter_fall a frame of the jump; down on its floor, its landing pose
comment enemy_rodney_enter_land when the landing pose ends, to thinking
comment enemy_rodney_rush_start rushes at its turtle for 180 frames, aiming just off its row when it is close to it
comment enemy_rodney_rush_run a frame of the rush, sliding along walls; well past its turtle it brakes, or stops at a wall
comment enemy_rodney_rush_across_start rushes straight across at its turtle for 180 frames
comment enemy_rodney_rush_across_run a frame of the rush across, sliding along walls; well past its turtle it brakes toward its row
comment enemy_rodney_back_off_start slides back from its turtle with a sound
comment enemy_rodney_back_off_turn when the slide ends, turns to its turtle
comment enemy_rodney_back_off_wait waits while its turtle is down; when it is up again, a new move
comment enemy_rodney_shoot_start the laser: slides back from its turtle with a sound
comment enemy_rodney_shoot_turn when the slide ends, turns to its turtle
comment enemy_rodney_shoot_ready when the turn ends, a sound and three bolts to go
comment enemy_rodney_shoot_fire every 4 frames a laser bolt the way it faces; after the third, or with no free object, its last pose
comment enemy_rodney_shoot_end when the pose ends, back to thinking with a new move and target
comment enemy_rodney_whip_start the whip: following its turtle's row, it slides back
comment enemy_rodney_whip_slow_down slides to a stop, following its turtle's row
comment enemy_rodney_whip_wind_up when the slide ends, faces its turtle and winds up with a sound
comment enemy_rodney_whip_throw_arm when the wind-up ends, throws its arm out; with no free object, back to thinking
comment enemy_rodney_whip_reach the arm reaches on up to its full length and is drawn in; when it hits, the lash at the turtle's distance
comment enemy_rodney_whip_pull_in the arm drawn in, its pose by how far out it is
comment enemy_rodney_whip_lash the lash; when it is over, the arm drawn in
comment enemy_rodney_whip_retract the arm shortened every frame; drawn in, back to thinking with a new move and target
comment enemy_rodney_knocked_back_start knocked back along its arc, facing its turtle, its side given up
comment enemy_rodney_knocked_back_fall a frame of the fall; on landing its pose
comment enemy_rodney_knocked_back_end when the pose ends, back to thinking, hittable
comment enemy_rodney_destroyed_start destroyed: thrown along its arc, facing its turtle, its side given up
comment enemy_rodney_destroyed_fall a frame of the fall; on landing a sound and its wreck
comment enemy_rodney_destroyed_land when the pose ends, the wreck again
comment enemy_rodney_destroyed_end when the wreck's animation ends, it is gone, one enemy less after its turtle and on the screen
comment enemy_shredder_appear_wait when he is the only enemy left, he is shown with a sound in his first pose
comment enemy_shredder_appear_step_out when the pose ends, steps out with his music and his speech
comment enemy_shredder_appear_walk_in walks out for 32 frames, then hittable, his health, thinking
comment enemy_shredder_split_start splits: not hittable, a clone of him with his bars and a sound, and he moves aside blinking 32 frames
comment enemy_shredder_split_blink blinks moving aside; at its end, shown, hittable, and a new move
comment enemy_shredder_clone_appear_start a clone's way in: shown, moving back for 32 frames
comment enemy_shredder_clone_appear_blink the clone blinks moving back; at its end, shown, hittable, its health, thinking
comment enemy_shredder_walk_to_side_start 240 frames of walking to his turtle's side, facing it
comment enemy_shredder_walk_to_side_step a frame of the walk: across to 0x40 by his turtle or up or down to its row; level with it, the next state
comment enemy_shredder_walk_to_side_crouch now and then, by the frame count, a crouch, else straight on to keeping level
comment enemy_shredder_walk_to_side_turn when the crouch ends, faces his turtle again
comment enemy_shredder_walk_to_side_hold level with his turtle: walks across until 0x10 away; off its row again, back to walking to its side
comment enemy_shredder_walk_to_target_start the walk to his turtle, facing it, aiming at once
comment enemy_shredder_walk_to_target_step a frame of the walk to his turtle, aiming every 8 frames, standing when close
comment enemy_shredder_guard_start guards against his turtle's attack, not hittable, for 30 frames
comment enemy_shredder_guard_counter after the guard, a counter blow picked by how far his turtle is
comment enemy_shredder_back_off_start 40 frames of walking backwards away from his turtle, still facing it
comment enemy_shredder_back_off_walk a frame of walking away while his turtle is down; when the time runs out, his standing pose
comment enemy_shredder_back_off_wait waits while his turtle is down; when it is up again, a new move
comment enemy_shredder_lose_bar_start a health bar lost: he flashes in its pose
comment enemy_shredder_lose_bar_end flashing, a piece of him flies off after 12 frames; at its end his health again, thinking, hittable
comment enemy_shredder_flinch_start hit from the front: he flashes, and every third hit knocks him back for 16 frames
comment enemy_shredder_flinch_end flashes, pushed while the knock lasts; at its end, thinking, hittable
comment enemy_shredder_flinch_from_behind_start hit from behind: he flashes, and every third hit knocks him forward for 16 frames
comment enemy_shredder_defeated_start beaten: thrown along his arc, flashing, facing his turtle
comment enemy_shredder_defeated_fall a frame of the fall; on landing he slides
comment enemy_shredder_defeated_land slides to a stop, then the music stops, a sound, his clones told to vanish
comment enemy_shredder_defeated_wait lies 120 frames, then one enemy less, and he stays
comment enemy_shredder_defeated_stay stays where he lies, doing nothing more
comment enemy_shredder_vanish_start a clone beaten or told to vanish: gives up its side, in its flinch pose
comment enemy_shredder_vanish_wait when the pose ends, 120 frames of blinking
comment enemy_shredder_vanish_blink blinks, then the clone is gone, one enemy less on the screen
comment enemy_shredder_kick_start the kick's animation and damage, facing his turtle
comment enemy_shredder_thrust_start the thrust's animation and damage, facing his turtle
comment enemy_shredder_slash_start the slash that knocks down: its animation and damage, facing his turtle
comment enemy_shredder_sweep_start the low sweep's animation and damage, facing his turtle
comment enemy_shredder_ray_start the ray: up to 240 frames of lining up with his turtle, facing it
comment enemy_shredder_ray_line_up a frame of lining up: away across while nearer than 0x50, else to his turtle's row; level or out of time, he charges
comment enemy_shredder_ray_charge when the pose ends, charges the ray for 12 frames
comment enemy_shredder_ray_fire after 12 frames, faces his turtle and fires the ray with its sound, for 60 frames
comment enemy_shredder_ray_end after 60 frames the ray is over and he goes back to thinking
comment run_area_entry every frame of an area's start: the balloon timed out, the stage's entry, and the markers shown when it is over
comment area_entry_standing the areas the turtles start standing in: the layers drawn and the entry over at once
comment area_entry_fall_in areas 2, 3 and 7: the turtles fall in, by the entry's step
comment start_fall_in_entry the layers drawn and, in area 7, the picture of the turtles falling in; then the fall
comment area_entry_jump_in area 4: the turtles jump in, by the entry's step
comment start_jump_in_entry the layers drawn, then the jump in
comment update_players every frame of play: the markers kept on their turtles while they last, the bars kept, every turtle run
comment jump_to_read_floor_cells Unused: the floor map's cells around the object
comment push_scroll_diagonally on area 2's diagonal stretch, the scroll pushed right too, unless a turtle is at the left edge or it moves already
comment queue_scroll_row a new row of the layers to draw; on the diagonal stretch the scroll pushed right too
comment turtle_knocked_down_fly a frame of the knock down's flight, until it lands on a floor
comment turtle_knocked_down_slide slides along the ground within the walls and the screen, farther for the hard knocks, until the pose ends
comment turtle_knocked_down_lie lies on its floor until the pose ends
comment turtle_knocked_down_next the knock down's next step by its kind, or the end of the steps
comment turtle_knocked_back_start when the pose ends, pushed back for the hard knocks, then the next step
comment turtle_knocked_back_slide slides along the ground for the hard knocks, within the walls and the screen, until the pose ends
comment turtle_knocked_back_lie lies on its floor until the pose ends
comment turtle_knocked_back_next the knock back's next step by its kind; at the end the light knocks push it back a little
comment turtle_knocked_flying_fly a frame of the flight: against a wall a crash with its sound; landing, the rest by the bars it has left
comment turtle_knocked_flying_slide after hitting a wall it drops down to the floor, else it slides a little; then a wait
comment turtle_knocked_flying_lie lies on its floor: waits its time, or until the pose ends
comment turtle_knocked_flying_wait a wait of 96 frames, then the next step
comment turtle_knocked_flying_next the knock flying's next step by its kind, or the end of the steps
comment turtle_held_briefly_struggle held a moment: the prompt; six presses break free with an attack, else held fast when the pose ends; no bars, it dies
comment turtle_held_knock_off_struggle held: the prompt and a bar lost every 64 frames; eight presses break free and the holder lets go; no bars, it drops
comment turtle_held_throw_off_struggle held: the prompt, a bar lost every 64 frames, a struggle each press; eight throw the holder off, scored; no bars, it dies
comment turtle_walls_still no stick: the floor and walls around the turtle, or off its floor cell a step by the side it was knocked to
comment turtle_walls_up stick up: the floor and walls around the turtle; off its floor cell, its floor raised
comment turtle_walls_down stick down: the floor and walls around the turtle; off its floor cell, its floor lowered and the turtle moved down
comment turtle_walls_right stick right, or a missile's flight: the walls above and to the sides; off its floor cell, as leaving it to the right
comment turtle_leave_floor_right off its floor cell going right: a step up or down, or pushed back left against every wall
comment turtle_walls_left stick left: the walls above and to the sides; off its floor cell, as leaving it to the left
comment turtle_leave_floor_left off its floor cell going left: a step up or down, or pushed back right against every wall
comment turtle_walls_up_left stick up and left: the diagonal's walls, or off its floor cell as going left
comment turtle_walls_up_right stick up and right: the diagonal's walls, or off its floor cell as going right
comment turtle_walls_up_diagonal the walls going up on a diagonal: on its floor or in the air, the wall above, the sides and the corners
comment turtle_corner_contacts the walls at the upper corners, then all the walls into the turtle's contacts
comment turtle_walls_down_right stick down and right: the side walls; off its floor cell, a step up, or down a level moving down and right
comment turtle_side_contacts the walls to the right and left, and the corners
comment turtle_walls_down_left stick down and left: the side walls; off its floor cell, a step up, or down a level moving down and left
comment turtle_exit_building_start area 0's exit starts: each turtle walks, facing right
comment turtle_exit_apartment_start area 1's exit starts: each turtle stands, and the exit waits 32 frames
comment turtle_exit_street_start area 2's exit starts: each turtle walks, facing the spot where they jump, with a sound
comment turtle_exit_sewer_start area 3's exit starts: each turtle walks left, without its shadow, with a sound
comment turtle_exit_car_street_start area 4's exit starts: the area's objects gone, each turtle walks toward its place, a cheer, the layers' priority
comment turtle_exit_highway_start area 5's exit starts: each turtle crouches for a jump, and the music fades out
comment turtle_exit_building_site_start area 7's exit starts: the area's objects gone, Splinter shown tied up, each turtle in its walk held, a sound
comment turtle_exit_technodrome_start area 8's exit starts: each turtle walks, the layers' priority, a wait of 192 frames, a sound
comment turtle_exit_final_start area 9's exit starts: a long wait, each turtle's animation held
comment run_area_exit every frame of an area's exit: the balloon timed out, then the stage's exit
comment turtle_exit_building area 0's exit: the turtles walk to one spot and vanish there; 32 frames after the last, the exit is over
comment run_exit_apartment area 1's exit by its steps, April waiting to be rescued in the first ones
comment next_area_step the next step of an area's entry or exit
comment turtle_exit_street_walk the turtle walks to the spot where they jump; near it, it jumps
comment turtle_exit_street_jump a frame of the turtle's jump to the spot; landed on it, its own pose
comment turtle_exit_street_vanish the turtle hidden when its pose ends
comment run_exit_sewer area 3's exit by its steps
comment turtle_exit_sewer area 3's exit, first step: each turtle walks and jumps out; when all are gone, the next picture's layers and palette
comment turtle_exit_sewer_walk the turtle walks left to the edge, then crouches 32 frames
comment turtle_exit_sewer_jump after the crouch, the turtle jumps, going up fast until high above its floor
comment run_exit_car_street area 4's exit by its steps
comment turtle_exit_car_street area 4's exit, first step: the turtles walk to their places and board; when all are waiting, the van drives in
comment turtle_exit_car_street_wait the turtle walks to its place, then stands facing its side and waits
comment turtle_exit_car_street_board the van slows to a stop with its sounds; then the turtle walks to its door and crouches to jump in
comment turtle_exit_car_street_jump after a moment the turtle jumps into the van, hidden as it comes down
comment move_in_direction the object a step at a speed the way a direction points, and its screen place
comment update_screen_place the object's screen place from its place in the area
comment turtle_exit_highway area 5's exit: each turtle jumps and flies off to the right, hidden past the edge; then the exit is over
comment run_exit_skateboard area 6's exit: the shadows, the road scrolling on, and its steps
comment turtle_exit_skateboard_gather area 6's exit, first step: each turtle to its place; then the van comes in with a sound
comment turtle_exit_skateboard_board the van slows to a stop; each turtle walks to its door and jumps in, hidden as it comes down
comment finish_area_exit the exit over when its wait runs out
comment turtle_exit_go_to_place the turtle walks to its place for the van and stands there
comment run_exit_building_site area 7's exit by its steps
comment turtle_exit_building_site_walk after the wait, each turtle walks
comment turtle_exit_building_site_jump each turtle walks to one spot and jumps off, hidden as it comes down; then the next picture's layers and palette
comment turtle_exit_building_site_drop when the palettes are ready, each turtle placed high up to fall in, the Technodrome drawn, a sound
comment turtle_exit_building_site_land each turtle falls in across and lands, then walks; when all have landed, a wait of 160 frames
comment turtle_exit_building_site_wait the wait: a speech balloon by the first turtle, then crouching and jumping at its end
comment turtle_exit_building_site_rise each turtle goes up the screen, then its own pose
comment turtle_exit_building_site_leave each turtle drifts across and down while its pose lasts, hidden when it ends; then the exit is over
comment turtle_exit_technodrome area 8's exit: the turtles walk off to the right, hidden past the edge; over after the wait
comment run_exit_final area 9's exit by its steps
comment turtle_exit_final_walk area 9's exit: the turtles turn left and walk off with a sound while the screen shakes
comment copy_sprites_and_fill_layer_b Unused: eight sprites copied into the sprite chip, and layer B scrolled and filled
comment start_demo a demo starts: its area, its players and their recorded inputs by the demo's number, then the next scene
comment check_area_cleared the stage's check for the end of the area, from its last scroll segment on
comment check_cleared_building area 0: the scroll held; every player ready and no enemy left, 96 frames with sounds, then the area beaten
comment check_cleared_apartment area 1: the scroll held; beaten with every player ready, no enemy left and the drill's arrival over
comment check_cleared_street area 2: the scroll held; beaten with every player ready and no enemy left
comment check_cleared_sewer area 3: the scroll held one way; every 256 frames the enemies beyond row 0x88 taken off; beaten when all are gone
comment check_cleared_car_street area 4: the scroll held; beaten with every player ready and no enemy left
comment check_cleared_highway area 5: the scroll held one way; beaten with every player ready and no enemy left
comment check_cleared_skateboard area 6: the scroll goes on by itself; beaten with every player ready and no enemy left
comment check_cleared_building_site area 7: the scroll held; beaten with every player ready and no enemy left
comment check_cleared_technodrome area 8: the scroll held; beaten with every player ready and no enemy left
comment check_cleared_final area 9: beaten with every player ready and no enemy left
comment players_ready whether every player in play has a turtle that is not being hit
comment animate_fire_tiles areas 0 and 1, in play or the apartment's exit: the fire's tiles redrawn, a spot a frame, a new frame every four
comment read_floor_cells_on_screen the floor map's cells around the object, by its place on the screen
comment read_floor_cells the floor map's cells around the object, by its place in the area
comment read_floor_cells_at the floor map's cells at the object's feet and at its height, with the ones around them
comment draw_screen_picture the picture of the Foot's car drawn into layer A in the colours given, with a sound
comment start_scroll_segment the area's next scroll segment: the layers' limits, or their speeds when it scrolls by itself; at the end, the area's check
comment auto_scroll a segment that scrolls by itself: the layer moved by its speeds, a new column or row to draw past each tile
comment sum_program_chips the boot's ROM check: each program chip's bytes summed, read twice to be sure; the board gives the sums in its place
comment fill_tile_column Unused: a column of 28 tiles set to the one given
comment run_on_into_set_screen_flip Unused: bytes no code reads (02 00 01 0F 01 07 01 0A FF FF) that decode as three instructions running on into set_screen_flip
comment queue_player_boxes Unused: queues the drawing of the players' boxes the bits given pick
comment clear_players_and_ram Unused: the four players cleared and two stretches of work RAM zeroed
comment zero_ram_below_object_0 Unused: the 384 bytes of work RAM below the first object zeroed
comment zero_ram_below_object_12 Unused: the 1152 bytes of work RAM below object 12 zeroed
comment zero_ram_below_object_24 Unused: the 768 bytes of work RAM below object 24 zeroed
comment zero_ram_below_object_4 Unused: the 768 bytes of work RAM below object 4 zeroed, the turtles' objects among them
comment zero_ram_below_object_32 Unused: the 768 bytes of work RAM below object 32 zeroed
comment add_mask_rom_bits_to_sums Unused: the bits of four mask ROM reads put together and added to the parts' sums
comment lone_return_before_dip_switch_page Unused: an empty routine that returns at once
comment show_free_play_setting Unused: queues the test mode's text 0x13
comment post_palette_request a palette request, its kind, banks and data, queued to be done a frame later
comment post_palette_request_list Unused: every palette request of a list queued, up to its end mark
comment copy_palette_list 16 colours from each palette of a list into the palette RAM
comment start_palette_effects the palette effects of a list started in free slots
comment step_palette_effects every frame: each palette effect's next colour when its time runs out; it loops, turns back or ends
comment stop_every_palette_effect Unused: every running palette effect stopped, each by its layer's own stop
comment say_speedy Unused: the balloon and speech "Speedy" beside the place given, with its pointer
comment say_zappy Unused: the balloon and speech "Zappy" beside the place given, with its pointer
comment print_demo_text a job of the main loop: a text of the demo's table into the fixed layer
comment print_test_text a job of the main loop: a text of the test mode's table into the fixed layer
comment print_game_text a job of the main loop: a text of the game's table into the fixed layer
comment word_to_decimal_digits Unused: a 16-bit number into six decimal digits, the BCD powers of two of its set bits added up in a stack frame the C has not (lost_stack)
comment draw_box_frame_by_rows Unused: a box's frame drawn into the tile RAM from its tiles, a new row at each '/'
comment print_text_at a positioned text into the layer and place picked, in the text colour; '/' a new place, '?' the end
comment draw_big_character a big character of the continue's countdown drawn in tiles, nine rows of eight, in its colour
comment start_typed_text a text typed a character at a time: its place, the frames between characters and its colour
comment draw_tile_block a block of tiles into the tile RAM at the place picked, wrapping round the layer
comment show_spawn_scroll_place Unused: the spawn scroll's place shown on the screen in hex digits
comment start_typed_line one of several lines typed at once: its place, the frames between characters and its text
comment start_wide_box_opening Unused: a box set up the size of the screen: 16 frames, its size, its tile and its place
# ---- the parameters the hubs pass on ----
# the state handlers of an object's table run with the object in A0, the table in A6 (048236 "clr.w D0", 048238
# "move.b ($5,A0), D0", 04823E "movea.l (A6,D0.w), A6", 048242 "jmp (A6)"), and an enemy's with its turtle's slot in
# A1, which every enemy routine sets before it runs its table (048A6A "movea.l D0, A1" in enemy_enter, 048D94 in
# enemy_attack, the state handlers passing on what they get)
param run_object_state a1 slot player_slot
# type: a table of state handlers: 04823E "movea.l (A6,D0.w), A6"
param run_object_state a6 states routine_entry

# ---- the parameters and locals of the 68000's C, by what they hold (every file but objects/states.c and objects/turtles.c) ----
# objects/states.c, objects/turtles.c and src/sound/). Each line: the evidence (instruction of the

# ---- scenes/area_exits.c ----
# 02B268 "lea $61100.l, A6" 02B27E "move.b D0, (A6)" the turtle's entry in marker_times, cleared turtle by turtle with the walk to the next one
# type: a player's byte of marker_times: 02B268 "lea $61100.l, A6" 02B284 "adda.w #$1, A6"
local turtle_start_area_exit 02B268,02B284 a6 marker_time marker_timer
# 02B308 "move.w #$100, D0" 02B318 "addq.w #1, D0" the turtle's new routine (high byte) and state (low byte) for turtle_set_state: walking, one state up when it is high on the screen
local turtle_exit_building_start 02B308,02B318 d0 routine_state
# 02B352 "move.w #$0, D0" the turtle's new routine and state for turtle_set_state (standing)
local turtle_exit_apartment_start 02B352 d0 routine_state
# 02B390 "move.w #$100, D0" the turtle's new routine and state for turtle_set_state (walking)
local turtle_exit_street_start 02B390 d0 routine_state
# 02B3D4 "move.w #$100, D0" 02B3E2 "addq.w #1, D0" the turtle's new routine and state for turtle_set_state, one up when it is high on the screen
local turtle_exit_sewer_start 02B3D4,02B3E2 d0 routine_state
# 02B44E "move.w #$100, D0" 02B462 "addq.w #1, D0" the turtle's new routine and state for turtle_set_state, one up when it is high on the screen
local turtle_exit_car_street_start 02B44E,02B462 d0 routine_state
# 02B440 "lsr.l #8, D1" the turtle's x in pixels, against its place in car_street_exit_x to face it
local turtle_exit_car_street_start 02B440 d1 turtle_x
# 02B4C2 "move.w #$200, D0" the turtle's new routine and state for turtle_set_state (crouching for the jump)
local turtle_exit_highway_start 02B4C2 d0 routine_state
# 02B554 "move.w #$101, D0" the turtle's new routine and state for turtle_set_state
local turtle_exit_building_site_start 02B554 d0 routine_state
# 02B58E "move.w #$100, D0" 02B59E "addq.w #1, D0" the turtle's new routine and state for turtle_set_state, one up when it is high on the screen
local turtle_exit_technodrome_start 02B58E,02B59E d0 routine_state
# 02B6CA "jsr $47d98.l" 02B6D4 "jsr $2c7e6.l" the direction direction_to gives from the turtle to the door, for move_in_direction
local turtle_exit_building 02B6CA d0 direction
# 02B692 "move.w ($c,A0), D1" the turtle's screen x, against the door's
local turtle_exit_building 02B692 d1 screen_x
# 02B6D0 "move.w #$300, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_building 02B6D0 d1 speed
# 02B6C2 "move.w #$170, D1" the screen x the turtle walks to, for direction_to
local turtle_exit_building 02B6C2 d1 target_x
# 02B69E "move.w ($e,A0), D2" the turtle's screen y, against the door's
local turtle_exit_building 02B69E d2 screen_y
# 02B6C6 "move.w #$50, D2" the screen y the turtle walks to, for direction_to
local turtle_exit_building 02B6C6 d2 target_y
# 02B76C "move.w #$101, D0" the turtle's new routine and state for turtle_set_state, facing the door
local exit_apartment_shredder_appears 02B76C d0 routine_state
# 02B7C8 "move.b #$fe, D7" the sound for queue_sound as Shredder appears
local exit_apartment_shredder_appears 02B7C8 d7 sound
# 02B806 "move.b #$72, D7" the sound for queue_sound as Shredder grabs April
local exit_apartment_shredder_takes_april 02B806 d7 sound
# 02B8FC "jsr $47d98.l" 02B906 "bsr $2c7e6" the direction direction_to gives to the place Shredder (and then each turtle) goes to, for move_in_direction
local exit_apartment_shredder_escapes 02B8FC,02B96A d0 direction
# 02B8F4 "move.w #$178, D1" 02B962 "move.w #$150, D1" the screen x Shredder, then each turtle, heads for, for direction_to
local exit_apartment_shredder_escapes 02B8F4,02B962 d1 target_x
# 02B902 "move.w #$300, D1" 02B970 "move.w #$100, D1" the speed of the step for move_in_direction: Shredder's, then the turtles'
local exit_apartment_shredder_escapes 02B902,02B970 d1 speed
# 02B8F8 "move.w #$70, D2" 02B966 "move.w #$58, D2" the screen y Shredder, then each turtle, heads for, for direction_to
local exit_apartment_shredder_escapes 02B8F8,02B966 d2 target_y
# 02B996 "lea $104008.l, A0" 02B9A4 "move.b D0, (A0)+" the place in the tile RAM where the picture's next tile is written
local exit_apartment_kidnap_picture 02B996,02B9A4,02B9A6,02B9B4,02B9CC,02B9DA,02B9DC,02B9F4 a0 tile_place
# 02B99C "moveq #$34, D0" 02B9A4 "move.b D0, (A0)+" the tile's attribute byte (colour and the high bits of its code), stepped when the code wraps
local exit_apartment_kidnap_picture 02B99C,02B9AE,02B9D2,02B9E4,02B9EE d0 tile_attribute
# 02B99E "clr.b D1" 02B9A6 "move.b D1, (A0)+" the low byte of the tile's code, one more per tile
local exit_apartment_kidnap_picture 02B99E,02B9A8,02B9D4,02B9DE d1 tile_code
# 02BA84 "move.b #$40, D7" the sound for queue_sound with the picture
local exit_apartment_kidnap_picture 02BA84 d7 sound
# 02BAC0 "move.b #$a7, D7" the sound for queue_sound with Shredder's speech
local exit_apartment_picture_wait 02BAC0 d7 sound
# 02BB48 "jsr $47d98.l" 02BB52 "jmp $2c7e6.l" the direction direction_to gives to the spot where the turtles jump, for move_in_direction
local turtle_exit_street_walk 02BB48 d0 direction
# 02BB72 "move.w #$201, D0" the turtle's new routine and state for turtle_set_state: the jump
local turtle_exit_street_walk 02BB72 d0 routine_state
# 02BB28 "move.w ($c,A0), D1" the turtle's screen x, against the spot's
local turtle_exit_street_walk 02BB28 d1 screen_x
# 02BB40 "move.w #$13c, D1" the screen x of the spot, for direction_to
local turtle_exit_street_walk 02BB40 d1 target_x
# 02BB4E "move.w #$280, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_street_walk 02BB4E d1 speed
# 02BB34 "move.w ($e,A0), D2" the turtle's screen y, against the spot's
local turtle_exit_street_walk 02BB34 d2 screen_y
# 02BB44 "move.w #$34, D2" the screen y of the spot, for direction_to
local turtle_exit_street_walk 02BB44 d2 target_y
# 02BBAA "move.w #$203, D0" the turtle's new routine and state for turtle_set_state as the jump comes down
local turtle_exit_street_jump 02BBAA d0 routine_state
# 02BC02 "jsr $47d98.l" 02BC0C "jmp $2c7e6.l" the direction direction_to gives to the spot, for move_in_direction
local turtle_exit_street_jump 02BC02 d0 direction
# 02BBD2 "move.w ($c,A0), D1" the turtle's screen x
local turtle_exit_street_jump 02BBD2 d1 screen_x
# 02BBD6 "subi.w #$139, D1" how far right of the spot the turtle is, landed when under 7
local turtle_exit_street_jump 02BBD6 d1 x_from_spot
# 02BBFA "move.w #$13c, D1" the screen x of the spot, for direction_to
local turtle_exit_street_jump 02BBFA d1 target_x
# 02BC08 "move.w #$280, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_street_jump 02BC08 d1 speed
# 02BBEA "subi.w #$31, D2" how far below the spot the turtle is, landed when under 7
local turtle_exit_street_jump 02BBEA d2 y_from_spot
# 02BBFE "move.w #$34, D2" the screen y of the spot, for direction_to
local turtle_exit_street_jump 02BBFE d2 target_y
# 02BBE6 "move.w ($e,A0), D2" the turtle's screen y
local turtle_exit_street_jump 02BBE6 d2 screen_y
# 02BC84 "lsl.w #2, D0" the exit's step (cutscene_step) times 4, the case of the step that runs
local run_exit_sewer 02BC84 d0 step_offset
# 02BD78 "move.w #$200, D0" the turtle's new routine and state for turtle_set_state: crouching
local turtle_exit_sewer_walk 02BD78 d0 routine_state
# 02BD9A "move.w #$201, D0" 02BDCA "move.w #$202, D0" the turtle's new routine and state for turtle_set_state: the jump, then high in the air
local turtle_exit_sewer_jump 02BD9A,02BDCA d0 routine_state
# 02BE08 "lea $104000.l, A0" 02BE28 "lea $102000.l, A0" the place in the tile RAM where draw_whole_layer draws the picture (layer A, then B)
local exit_sewer_villains_picture 02BE08,02BE28 a0 tile_place
# 02BED0 "clr.b D0" 0 for show_balloon: the balloon on the left of the speaker
local exit_sewer_villains_taunt 02BED0 d0 on_right
# 02BED2 "move.w #$110, D1" the screen x of the speaker for show_balloon
local exit_sewer_villains_taunt 02BED2 d1 screen_x
# 02BED6 "move.w #$40, D2" the screen y of the speaker for show_balloon
local exit_sewer_villains_taunt 02BED6 d2 screen_y
# 030114 "moveq #$78, D3" the balloon's line in balloon_records for show_balloon
local exit_sewer_villains_taunt 030114 d3 line
# 030112 "moveq #-$30, D4" the tile bank bits show_balloon puts in tile_banks_2_3 for the balloon
local exit_sewer_villains_taunt 030112 d4 bank
# 02BE96 "move.b #$a7, D7" the sound for queue_sound with Shredder's speech
local exit_sewer_villains_taunt 02BE96 d7 sound
# 02BF02 "lsl.w #2, D0" the exit's step (cutscene_step) times 4, the case of the step that runs
local run_exit_car_street 02BF02 d0 step_offset
# 02C010 "subi.l #$400, D1" the y of the van's rear half (object 41), 4 pixels above the front's
local turtle_exit_car_street 02C010 d1 rear_y
# 02C020 "lsr.l #8, D1" the screen y of the van's rear half
local turtle_exit_car_street 02C020 d1 rear_screen_y
# 02C074 "subi.w #$3c, D0" how far below its waiting place the turtle is, there when under 8
local turtle_exit_car_street_wait 02C074 d0 y_from_place
# 02C088 "sub.w D1, D0" how far right of its waiting place the turtle is, there when under 8
local turtle_exit_car_street_wait 02C088 d0 x_from_place
# 02C0B2 "move.w #$101, D0" the turtle's new routine and state for turtle_set_state: standing
local turtle_exit_car_street_wait 02C0B2 d0 routine_state
# 02C0D6 "lsl.w #2, D0" 02C0D8 "move.w (A6,D0.w), D1" the turtle's kind times 4, its pair in car_street_exit_x and car_street_exit_y
local turtle_exit_car_street_wait 02C0D6 d0 kind_offset
# 02C0E0 "jsr $47d98.l" 02C0EA "jmp $2c7e6.l" the direction direction_to gives to the turtle's waiting place, for move_in_direction
local turtle_exit_car_street_wait 02C0E0 d0 direction
# 02C0D8 "move.w (A6,D0.w), D1" the screen x of the turtle's waiting place, for direction_to
local turtle_exit_car_street_wait 02C0D8 d1 target_x
# 02C0DC "move.w ($2,A6,D0.w), D2" the screen y of the turtle's waiting place, for direction_to
local turtle_exit_car_street_wait 02C0DC d2 target_y
# 02C17A "move.l ($12,A6), D0" the van's x, copied to its rear half
local turtle_exit_car_street_board 02C17A d0 van_x
# 02C182 "lsr.l #8, D0" the van's screen x, for both halves
local turtle_exit_car_street_board 02C182 d0 van_screen_x
# 02C228 "jsr $47d98.l" 02C232 "jmp $2c7e6.l" the direction direction_to gives to the van's door, for move_in_direction
local turtle_exit_car_street_board 02C228 d0 direction
# 02C200 "sub.w D2, D0" how far below the door's y the turtle is, there when under 7
local turtle_exit_car_street_board 02C200 d0 y_from_door
# 02C212 "subi.w #$cd, D0" how far right of the door the turtle is, there when under 7
local turtle_exit_car_street_board 02C212 d0 x_from_door
# 02C24C "move.w #$200, D0" the turtle's new routine and state for turtle_set_state: crouching to jump in
local turtle_exit_car_street_board 02C24C d0 routine_state
# 02C1EE "lsr.l #8, D1" 02C1F0 "andi.w #$ff, D1" layer B's y in pixels (its low byte), that the door's screen y is worked out from on the highway
local turtle_exit_car_street_board 02C1EE,02C1F0 d1 layer_y
# 02C22E "move.w #$200, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_car_street_board 02C22E d1 speed
# 02C13C "move.b #$3c, D7" 02C160 "move.b #$12, D7" the van's sounds for queue_sound as it slows down and stops
local turtle_exit_car_street_board 02C13C,02C160 d7 sound
# 02C27A "move.w #$201, D0" the turtle's new routine and state for turtle_set_state: the jump
local turtle_exit_car_street_jump 02C27A d0 routine_state
# 02C2FA "clr.b D0" 0 for say_lets_move_it: the balloon on the left of the speaker
local exit_car_street_van_start_up 02C2FA d0 on_right
# 02C2FC "move.w #$e0, D1" the screen x of the speaker for say_lets_move_it
local exit_car_street_van_start_up 02C2FC d1 screen_x
# 02C300 "move.w #$70, D2" the screen y of the speaker for say_lets_move_it
local exit_car_street_van_start_up 02C300 d2 speaker_y
# 02C364 "move.b $633de.l, D0" 02C374 "lsl.w #2, D0" the van's shake step (cutscene_wait), then times 4: its pair in van_start_x_shakes and van_start_y_shakes
local exit_car_street_van_start_up 02C364,02C374 d0 shake_offset
# 02C380 "ext.l D2" the step of the van's y shake, from van_start_y_shakes
local exit_car_street_van_start_up 02C380 d2 y_shake
# 02C38A "move.l ($12,A0), D0" the van's x, copied to its rear half
local exit_car_street_van_start_up 02C38A d0 van_x
# 02C3A2 "lsr.l #8, D0" the van's screen x, for both halves
local exit_car_street_van_start_up 02C3A2 d0 van_screen_x
# 02C2D0 "move.b #$3a, D7" 02C2DA "move.b #$6e, D7" 02C33E "move.b #$2d, D7" the van's sounds for queue_sound: the door, the engine
local exit_car_street_van_start_up 02C2D0,02C2DA,02C33E d7 sound
# 02C3EA "andi.l #$1ffff, D0" the van's x, a step further right, copied to its rear half
local exit_car_street_van_drives_off 02C3EA d0 van_x
# 02C3F8 "lsr.l #8, D0" the van's screen x, for both halves
local exit_car_street_van_drives_off 02C3F8 d0 van_screen_x
# 02C4B8 "lea $102628.l, A0" 02C4C2 "move.b D0, (A0)" the place in the tile RAM: where draw_whole_layer draws, then the column of attributes written
local exit_car_street_april_hug_start 02C474,02C4AC,02C4B8,02C4D0 a0 tile_place
# 02C4BE "move.b #$c4, D0" 02C4C2 "move.b D0, (A0)" the attribute byte written down four rows of the picture
local exit_car_street_april_hug_start 02C4BE d0 tile_attribute
# 02C4E8 "lea $633e6.l, A1" 02C61A "move.b (A1)+, D0" the turtle's entry in hug_turtle_colours: 0xFF for a turtle not playing, read back for the turtles that wave
# type: a byte of hug_turtle_colours: 02C4E8 "lea $633e6.l, A1"
local exit_car_street_april_hug_start 02C4E8,02C50E,02C5E6,02C61A a1 turtle_colour hug_colour
# 02C55E "movea.l A3, A2" the hug_turtle_colours entry of the turtle with the best score so far, the one April hugs
# type: a byte of hug_turtle_colours: 02C52C "lea $633e6.l, A2" 02C55E "movea.l A3, A2" (A3 02C532 "lea $633e7.l, A3")
local exit_car_street_april_hug_start 02C52C,02C55E,02C56A a2 best_colour hug_colour
# 02C532 "lea $633e7.l, A3" 02C55E "movea.l A3, A2" the hug_turtle_colours entry of the turtle compared with the best one
local exit_car_street_april_hug_start 02C532,02C576 a3 other_colour
# 02C70E "lea $102628.l, A0" 02C7AA "move.b D0, (A0)" the place in the tile RAM: where draw_whole_layer draws, then the column of the heart's tiles
local exit_car_street_april_hug 02C702,02C70E,02C726,02C76A,02C790,02C7D0 a0 tile_place
# 02C796 "move.b #$a5, D0" 02C7AA "move.b D0, (A0)" the attribute byte written down four rows of the picture
local exit_car_street_april_hug 02C714,02C796 d0 tile_attribute
# 02C780 "moveq #$7f, D0" non-zero for show_balloon_beside: the balloon on the right of April
local exit_car_street_april_hug 02C780 d0 on_right
# 02C782 "move.w #$110, D1" the screen x of April for show_balloon_beside
local exit_car_street_april_hug 02C782 d1 screen_x
# 02C79A "move.b #$dd, D1" 02C7C8 "addq.b #1, D1" the code of the tile in the column's first row, one more per column
local exit_car_street_april_hug 02C79A,02C7C8 d1 first_row_tile
# 02C786 "move.w #$70, D2" the screen y of April for show_balloon_beside
local exit_car_street_april_hug 02C786 d2 screen_y
# 02C79E "move.b #$e1, D2" 02C7CA "addq.b #1, D2" the code of the tile in the column's second row, one more per column
local exit_car_street_april_hug 02C79E,02C7CA d2 second_row_tile
# 02C7A2 "move.b #$e5, D3" 02C7CC "addq.b #1, D3" the code of the tile in the column's third row, one more per column
local exit_car_street_april_hug 02C7A2,02C7CC d3 third_row_tile
# 03003C "moveq #$37, D3" the balloon's line in balloon_records for show_balloon_beside
local exit_car_street_april_hug 03003C d3 line
# 02C7A6 "move.b #$e8, D4" 02C7CE "addq.b #1, D4" the code of the tile in the column's fourth row, one more per column
local exit_car_street_april_hug 02C7A6,02C7CE d4 fourth_row_tile
# 02C7E6 "jsr $47ccc.l" the direction the object steps in, for speeds_from_direction
param move_in_direction d0 direction
# 02C7E6 "jsr $47ccc.l" the speed of the step, for speeds_from_direction
param move_in_direction d1 speed
# 02C7EC "ext.l D6" 02C7F0 "add.l D6, ($12,A0)" the step across that speeds_from_direction gives, added to the object's x
local move_in_direction 02C7E6 d6 x_speed
# 02C7EE "ext.l D7" 02C7F4 "add.l D7, ($16,A0)" the step up or down that speeds_from_direction gives, added to the object's y
local move_in_direction 02C7E6 d7 y_speed
# 02C846 "move.w #$201, D0" the turtle's new routine and state for turtle_set_state: the jump
local turtle_exit_highway 02C846 d0 routine_state
# 02C8E4 "lsl.w #2, D0" the exit's step (cutscene_step) times 4, the case of the step that runs
local run_exit_skateboard 02C8E4 d0 step_offset
# 02C95C "lea $62000.l, A0" 02C962 "bsr $2cdc0" the turtle that turtle_exit_go_to_place walks to its place, one after another
local turtle_exit_skateboard_gather 02C95C,02C966 a0 turtle
# 02C9EE "adda.w #$50, A0" the van's rear half (object 41), for its animation
local turtle_exit_skateboard_gather 02C9EE a0 van_rear
# 02C9FE "move.b #$15, D7" the van's sound for queue_sound as it comes in
local turtle_exit_skateboard_gather 02C9FE d7 sound
# 02CA5C "subi.w #$4d, D0" how far below the door's y the turtle is, there when under 7
local turtle_exit_skateboard_board 02CA5C d0 y_from_door
# 02CA70 "subi.w #$9d, D0" how far right of the door the turtle is, there when under 7
local turtle_exit_skateboard_board 02CA70 d0 x_from_door
# 02CA9C "move.w #$200, D0" 02CAB6 "move.w #$201, D0" the turtle's new routine and state for turtle_set_state: crouching, then the jump
local turtle_exit_skateboard_board 02CA9C,02CAB6 d0 routine_state
# 02CB12 "jsr $47d98.l" 02CB1C "jsr $2c7e6.l" the direction direction_to gives to the van's door, for move_in_direction
local turtle_exit_skateboard_board 02CB12 d0 direction
# 02CB4C "move.l ($12,A0), D0" the van's x, copied to its rear half
local turtle_exit_skateboard_board 02CB4C d0 van_x
# 02CB54 "lsr.l #8, D0" the van's screen x, for both halves
local turtle_exit_skateboard_board 02CB54 d0 van_screen_x
# 02CB18 "move.w #$200, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_skateboard_board 02CB18 d1 speed
# 02CB0A "move.w #$a0, D1" the screen x of the van's door, for direction_to
local turtle_exit_skateboard_board 02CB0A d1 target_x
# 02CB0E "move.w #$50, D2" the screen y of the van's door, for direction_to
local turtle_exit_skateboard_board 02CB0E d2 target_y
# 02CBC2 "move.b #$6e, D7" the sound for queue_sound as the van's door shuts
local exit_skateboard_van_door 02CBC2 d7 sound
# 02CC16 "clr.b D0" 0 for show_balloon_beside: the balloon on the left of the speaker
local exit_skateboard_van_drives 02CC16 d0 on_right
# 02CC1C "move.w #$70, D2" the screen y of the speaker for show_balloon_beside
local exit_skateboard_van_drives 02CC1C d2 screen_y
# 030044 "moveq #$3c, D3" the balloon's line in balloon_records for show_balloon_beside
local exit_skateboard_van_drives 030044 d3 line
# 02CC42 "move.b #$3c, D7" the sound for queue_sound as the van speeds round the curve
local exit_skateboard_van_drives 02CC42 d7 sound
# 02CCAA "lea $104008.l, A0" 02CCB8 "move.b D0, (A0)" the place in the tile RAM where the picture's next tile is written
local exit_skateboard_crash_picture 02CCAA,02CCBE,02CCCE,02CCE6,02CCFA,02CD04 a0 tile_place
# 02CCB0 "moveq #$24, D0" 02CCB8 "move.b D0, (A0)" the tile's attribute byte (colour and the high bits of its code), stepped when the code wraps
local exit_skateboard_crash_picture 02CCB0,02CCC8,02CCEC d0 tile_attribute
# 02CCB2 "clr.b D1" 02CCC2 "addq.b #1, D1" the low byte of the tile's code, one more per tile
local exit_skateboard_crash_picture 02CCB2,02CCC2 d1 tile_code
# 02CCEE "clr.b D1" 02CCFE "addq.b #1, D1" the low byte of the tile's code in the second part of the picture, one more per tile
local exit_skateboard_crash_picture 02CCEE,02CCFE d1 tile_code
# 02CCB6 "moveq #$20, D6" 02CCCA "subq.b #1, D6" the tiles left to write in the row
local exit_skateboard_crash_picture 02CCB6,02CCCA,02CCF2,02CD00 d6 columns_left
# 02CCB4 "moveq #$20, D7" 02CCD2 "subq.b #1, D7" the rows left to write
local exit_skateboard_crash_picture 02CCB4,02CCD2,02CCF0,02CD08 d7 rows_left
# 02CD5E "move.b #$1a, D7" the sound for queue_sound with the picture
local exit_skateboard_crash_picture 02CD5E d7 sound
# 02CDCC "lsl.w #2, D0" 02CDD2 "move.w ($2,A6,D0.w), D2" the turtle's kind times 4, its pair in exit_places_x and exit_places_y
local turtle_exit_go_to_place 02CDCC,02CE46 d0 kind_offset
# 02CDDA "subi.w #$2d, D0" how far below its place the turtle is, there when under 7
local turtle_exit_go_to_place 02CDDA d0 y_from_place
# 02CDEE "sub.w D1, D0" how far right of its place the turtle is, there when under 7
local turtle_exit_go_to_place 02CDEE d0 x_from_place
# 02CE24 "move.w #$100, D0" the turtle's new routine and state for turtle_set_state: standing
local turtle_exit_go_to_place 02CE24 d0 routine_state
# 02CE52 "jsr $47d98.l" 02CE5C "jmp $2c7e6.l" the direction direction_to gives to the turtle's place, for move_in_direction
local turtle_exit_go_to_place 02CE52 d0 direction
# 02CE48 "move.w (A6,D0.w), D1" 02CE4C "addq.w #3, D1" the screen x of the turtle's place (3 more), for direction_to
local turtle_exit_go_to_place 02CE48,02CE4C d1 target_x
# 02CDD2 "move.w ($2,A6,D0.w), D2" 02CE4E "move.w ($2,A6,D0.w), D2" 02CDFE "addq.w #2, D2" the screen y of the turtle's place in exit_places_y (2 more when it is there)
local turtle_exit_go_to_place 02CDD2,02CE4E,02CDFE d2 place_y
# 02CE0E "lsl.l #8, D2" the turtle's y at its place, in 1/256 pixels
local turtle_exit_go_to_place 02CE0E d2 turtle_y
# 02CE7A "lsl.w #2, D0" the exit's step (cutscene_step) times 4, the case of the step that runs
local run_exit_building_site 02CE7A d0 step_offset
# 02CF10 "move.w #$101, D0" the turtle's new routine and state for turtle_set_state: walking
local turtle_exit_building_site_walk 02CF10 d0 routine_state
# 02CF74 "jsr $47d98.l" 02CF7E "jsr $2c7e6.l" the direction direction_to gives to the place the turtles jump from, for move_in_direction
local turtle_exit_building_site_jump 02CF74,02D024 d0 direction
# 02CF9E "move.w #$200, D0" 02CFB6 "move.w #$201, D0" 02CFE8 "move.w #$203, D0" the turtle's new routine and state for turtle_set_state: crouching, the jump, coming down
local turtle_exit_building_site_jump 02CF9E,02CFB6,02CFE8 d0 routine_state
# 02CF7A "move.w #$200, D1" 02D02A "move.w #$200, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_building_site_jump 02CF7A,02D02A d1 speed
# 02CF6C "move.w #$100, D1" 02D01C "move.w #$100, D1" the screen x of the place the turtles jump from, for direction_to
local turtle_exit_building_site_jump 02CF6C,02D01C d1 target_x
# 02CF70 "move.w #$90, D2" 02D020 "move.w #$90, D2" the screen y of the place the turtles jump from, for direction_to
local turtle_exit_building_site_jump 02CF70,02D020 d2 target_y
# 02D0F0 "lea $104208.l, A0" 02D152 "addq.l #2, A0" the place in the tile RAM: where draw_whole_layer draws, then the column of the picture written
local exit_building_site_splinter_picture 02D0E4,02D0F0,02D152 a0 tile_place
# 02D0FC "moveq #$10, D0" 02D154 "subq.b #1, D0" the columns of the picture left to write
local exit_building_site_splinter_picture 02D0FC,02D154 d0 columns_left
# 02D0FE "moveq #$37, D1" the attribute byte written down eight rows of each column
local exit_building_site_splinter_picture 02D0FE d1 tile_attribute
# 02D20E "move.b #$b4, D7" the sound for queue_sound with Splinter's thanks
local exit_building_site_splinter_thanks 02D20E d7 sound
# 02D2B2 "move.w #$203, D0" the turtle's new routine and state for turtle_set_state: falling in
local turtle_exit_building_site_drop 02D2B2 d0 routine_state
# 02D288 "lsl.w #3, D1" the turtle's kind times 8, its entry in building_site_exit_x, _y, _heights and _drifts
local turtle_exit_building_site_drop 02D288 d1 kind_offset
# 02D2F6 "move.b #$75, D7" the sound for queue_sound as the turtles fall in
local turtle_exit_building_site_drop 02D2F6 d7 sound
# 02D3A0 "move.w #$101, D0" the turtle's new routine and state for turtle_set_state: walking once landed
local turtle_exit_building_site_land 02D3A0 d0 routine_state
# 02D43E "clr.b D0" 02D44A "subq.b #1, D0" the side of the balloon for show_balloon_beside: 0 on the left, 0xFF on the right when the turtle is on the screen's right half
local turtle_exit_building_site_wait 02D43E,02D44A d0 on_right
# 02D3EA "move.w #$201, D0" 02D472 "move.w #$200, D0" the turtles' new routine and state for turtle_set_state: the jump, crouching
local turtle_exit_building_site_wait 02D3EA,02D472 d0 routine_state
# 02D44C "move.w ($c,A0), D1" the first turtle's screen x for show_balloon_beside
local turtle_exit_building_site_wait 02D44C d1 screen_x
# 02D450 "moveq #$8, D2" the screen y of the balloon's speaker for show_balloon_beside
local turtle_exit_building_site_wait 02D450 d2 screen_y
# 02FFF6 "moveq #$f, D3" the balloon's line in balloon_records for show_balloon_beside
local turtle_exit_building_site_wait 02FFF6 d3 line
# 02D5AC "jsr $47d98.l" 02D5B6 "jsr $2c7e6.l" the direction direction_to gives to the place off the right edge, for move_in_direction
local turtle_exit_technodrome 02D5AC d0 direction
# 02D5B2 "move.w #$200, D1" the speed of the turtle's step for move_in_direction
local turtle_exit_technodrome 02D5B2 d1 speed
# 02D5A4 "move.w #$198, D1" the screen x the turtles walk to, for direction_to
local turtle_exit_technodrome 02D5A4 d1 target_x
# 02D5A8 "move.w #$58, D2" the screen y the turtles walk to, for direction_to
local turtle_exit_technodrome 02D5A8 d2 target_y
# 02D652 "move.w #$100, D0" 02D6CC "move.w #$100, D0" the turtles' new routine and state for turtle_set_state: walking
local turtle_exit_final_walk 02D652,02D6CC d0 routine_state
# 02D680 "move.b $633df.l, D0" 02D690 "lsl.w #1, D0" the shake's step (cutscene_count), then times 2: its pair in shake_x and shake_y
local turtle_exit_final_walk 02D680,02D690 d0 shake_offset
# 02D698 "move.b (A6,D0.w), D1" 02D6A0 "ext.w D1" the step of the shake across, from shake_x, added to layer B's scroll
local turtle_exit_final_walk 02D698,02D6A0 d1 x_shake
# 02D69C "move.b ($1,A6,D0.w), D2" the step of the shake up or down, from shake_y, added to layer B's scroll
local turtle_exit_final_walk 02D69C d2 y_shake
# 02D668 "move.b #$34, D7" the sound for queue_sound as the turtles walk off
local turtle_exit_final_walk 02D668 d7 sound
# 02D74A "move.b $633df.l, D0" 02D75A "lsl.w #1, D0" the shake's step (cutscene_count), then times 2: its pair in shake_x and shake_y
local exit_final_shake 02D74A,02D75A d0 shake_offset
# 02D762 "move.b (A6,D0.w), D1" 02D76A "ext.w D1" the step of the shake across, from shake_x, added to layer B's scroll
local exit_final_shake 02D762,02D76A d1 x_shake
# 02D766 "move.b ($1,A6,D0.w), D2" the step of the shake up or down, from shake_y, added to layer B's scroll
local exit_final_shake 02D766 d2 y_shake
# 02FF84 "lea $104000.l, A0" 02FFC8 "lea $102000.l, A0" the place in the tile RAM where draw_whole_layer draws the screen (layer B, then A)
local draw_technodrome_screen 02FF84,02FFC8 a0 tile_place
# 031230 "lea $100000.l, A0" 03124A "move.b D0, (A0)+" the place in the fixed layer's tile RAM of the next tile cleared
local clear_layers 031230,03124A,031250,031256,03125C,031262,031268,03126E,031274 a0 fixed_place
# 031236 "lea $102000.l, A1" 03124C "move.b D0, (A1)+" the place in layer A's tile RAM of the next tile cleared
local clear_layers 031236,03124C,031252,031258,03125E,031264,03126A,031270,031276 a1 layer_a_place
# 03123C "lea $104000.l, A2" 03124E "move.b D0, (A2)+" the place in layer B's tile RAM of the next tile cleared
local clear_layers 03123C,03124E,031254,03125A,031260,031266,03126C,031272,031278 a2 layer_b_place
# 031242 "clr.b D0" 03124A "move.b D0, (A0)+" the attribute byte of a blank tile (0)
local clear_layers 031242 d0 blank_attribute
# 031244 "moveq #$10, D1" 031250 "move.b D1, (A0)+" the code of the blank tile (0x10, the space)
local clear_layers 031244 d1 space_tile
# 031246 "move.w #$200, D7" 03127A "subq.w #1, D7" the groups of four tiles left to clear in each layer
local clear_layers 031246,03127A d7 groups_left

# ---- objects/rock_soldiers.c ----
# 011556 "move.b ($5,A0), D7" 01155A "lsl.w #2, D7" the state of his way in times 4, the case of the state that runs
local rock_soldier_site_enter 011556,01155A d7 state_offset
# 0115FA "move.w #$fe, D7" 0115FE "move.b D7, $60080.l" the fade-out command, kept as the music and queued with queue_sound
local rock_soldier_site_enter_wait_for_scroll 0115FA d7 sound
# 011662 "move.b #$ff, D0" 0xFF for say_crash_the_turtles: the balloon on the right of him
local rock_soldier_site_enter_drop 011662 d0 on_right
# 01166E "subi.w #$20, D1" his screen x less 0x20, where say_crash_the_turtles puts the balloon
local rock_soldier_site_enter_drop 01166E d1 screen_x
# 011672 "addi.w #$20, D2" his screen y and 0x20 more, where say_crash_the_turtles puts the balloon
local rock_soldier_site_enter_drop 011672 d2 screen_y
# 01169C "moveq #$0, D0" 0 for rock_soldier_site_next_move: the move he did before is his way in
local rock_soldier_site_enter_land 01169C d0 last_move
# 0116A2 "clr.w ($30,A0)" 0116A6 "clr.b ($5,A0)" the rock soldier, whose fields it clears and whose routine it steps
param rock_soldier_site_enter_end a0 object object
# 0116B0 "move.b $600a5.l, D7" 0116BC "add.b $63386.l, D7" 0116C2 "neg.b D7" layer B's scroll y for the shake: frame_count's bit 1 doubled, with the layer's y, negated
local rock_soldier_site_shake_screen 0116B0,0116B6,0116BA,0116BC,0116C2 d7 scroll_y
# 0116FA "lsl.w #1, D1" 01170C "addq.b #1, D1" the blows he has struck times 2, one more on the side the turtle is on: his column in rock_soldier_site_attack_reaches
local rock_soldier_site_think 0116FA,01170C,01171C d1 reach_offset
# 01172A "move.b (A6,D1.w), D1" 011738 "cmp.b D1, D7" the chance out of 64 that he strikes the turtle, against random_below's roll
local rock_soldier_site_think 01172A d1 attack_chance
# 01172E "move.w #$40, D7" the range for random_below, 64
local rock_soldier_site_think 01172E d7 range
# 011732 "jsr $48448.l" 011738 "cmp.b D1, D7" what random_below gives, against the chance of a blow
local rock_soldier_site_think 011732 d7 roll
# 01174E "move.b ($5,A0), D7" 011752 "lsl.w #2, D7" his state times 4, the case of the state that runs
local rock_soldier_site_think 01174E,011752 d7 state_offset
# 011CDE "move.b $61207.l, D7" 011CEC "add.b ($26,A0), D7" the turtles in play times 4 and the blows he has struck: his entry in rock_soldier_site_moves
local rock_soldier_site_think 011CDE,011CE4,011CEC d7 move_offset
# 011CF0 "move.b (A6,D7.w), D7" the blow from rock_soldier_site_moves, his entry in rock_soldier_site_animations
local rock_soldier_site_think 011CF0 d7 move
# 011CD2 "move.b #$8, D7" the sound for queue_sound with his blow
local rock_soldier_site_think 011CD2 d7 sound
# 0117C4 "moveq #$1, D0" 1 for rock_soldier_site_move_done: the move he did is the walk
local rock_soldier_site_walk 0117C4 d0 last_move
# 0117F6 "moveq #$2, D0" 2 for rock_soldier_site_move_done: the move he did is the walk on
local rock_soldier_site_walk_on 0117F6 d0 last_move
# 011806 "moveq #$3, D0" 3 for rock_soldier_site_move_done: the move he did is standing
local rock_soldier_site_stand 011806 d0 last_move
# 01180E "move.w ($1e,A0), D7" 011812 "add.w D7, ($10,A0)" his height speed, added to his height
local rock_soldier_site_jump 01180E d7 height_speed
# 011856 "moveq #$4, D0" 4 for rock_soldier_site_move_done: the move he did is the jump
local rock_soldier_site_jump_land 011856 d0 last_move
# 011868 "bra $11c0e" the move he did before (0 his way in, 1 walk, 2 walk on, 3 stand, 4 jump), for rock_soldier_site_next_move
param rock_soldier_site_move_done d0 last_move
# 01185E "bsr $11b42" 011862 "tst.b D7" what rock_soldier_find_turtle_ahead gives: the turtle in front within reach, none when 0
local rock_soldier_site_move_done 01185E d7 turtle_ahead
# 011C7C "move.w #$4, D7" the range for random_below, 4
local rock_soldier_site_move_done 011C7C d7 range
# 011C80 "jsr $48448.l" 011C8C "move.b (A6,D7.w), ($30,A0)" what random_below gives: his entry in rock_soldier_site_waits
local rock_soldier_site_move_done 011C80 d7 roll
# 01188C "move.b ($30,A0), D7" 011890 "andi.b #$3, D7" his timer, every fourth frame of which fires a blast
local rock_soldier_site_fire 01188C d7 blast_time
# 011890 "andi.b #$3, D7" his timer's two low bits: a blast when 0
local rock_soldier_site_fire 011890 d7 blast_time
# 01189E "move.b #$8, D7" 0118A4 "jsr $1830c.l" 0118AA "tst.b D7" the objects find_free_object looks at for the blast, left over when it finds one
local rock_soldier_site_fire 01189E,0118A2,0118A4 d7 objects_left
# 011FE8 "move.w #$4800, D7" 011FF8 "ext.l D7" how far across from him the blast starts, the other way when he faces left
local rock_soldier_site_fire 011FE8,011FF8 d7 blast_offset
# 0118E6 "moveq #$5, D0" 5 for rock_soldier_site_next_move: the move he did is a blow
local rock_soldier_site_finish_attack 0118E6 d0 last_move
# 011946 "move.b #$82, D7" 011970 "move.b #$0, D7" 01197A "move.b #$88, D7" the sounds for queue_sound: his flinch, the music stopped and his defeat
local rock_soldier_struck 011946,011970,01197A d7 sound
# 0119CC "moveq #$6, D0" 6 for the next move: the move he did is getting over a hit
local rock_soldier_recover 0119CC d0 last_move
# 011A30 "lea $62780.l, A6" 011A3C "jsr $1830c.l" the object for the explosion, from object 24 on: the first free one find_free_object finds
local rock_soldier_defeated_explode 011A30,011A3C a6 explosion
# 011A36 "move.b #$8, D7" 011A3C "jsr $1830c.l" 011A42 "tst.b D7" the objects find_free_object looks at, left over when it finds one
local rock_soldier_defeated_explode 011A36,011A3A,011A3C d7 objects_left
# 011A80 "move.b ($30,A0), D7" 011A8C "cmp.b (A6,D0.w), D7" his timer, against rock_soldier_crumble_times for when rubble falls
local rock_soldier_defeated_crumble 011A80 d7 crumble_time
# 011AA0 "move.b #$8, D7" 011AA6 "jsr $1830c.l" 011AAC "tst.b D7" the objects find_free_object looks at for the rubble, left over when it finds one
local rock_soldier_defeated_crumble 011AA0,011AA4,011AA6 d7 objects_left
# 0120DA "move.b ($3,A6), D7" 0120DE "lsl.w #1, D7" the rubble's parameter times 2, its entry in rubble_place_x and rubble_place_y
local rock_soldier_defeated_crumble 0120DA,0120DE d7 rubble_offset
# 011B3E "bset D6, D0" the bit of the turtle close enough to strike, with bit 7 when it is on his left; 0 for none
param rock_soldier_find_close_turtle d0 close_turtle
# 011AE2 "moveq #$0, D0" 011B24 "ori.b #$80, D0" 011B3E "bset D6, D0" the bit of the turtle close enough to strike, bit 7 when it is on his left
local rock_soldier_find_close_turtle 011AE2,011B24,011B32,011B3E d0 close_turtle
# 011B06 "sub.w ($e,A0), D5" 011B0E "not.w D5" how far the turtle is from him up or down the screen
local rock_soldier_find_close_turtle 011B06,011B0E d5 y_distance
# 011B1C "sub.w ($c,A0), D5" 011B28 "not.w D5" how far the turtle is from him across the screen
local rock_soldier_find_close_turtle 011B1C,011B28 d5 x_distance
# 011C0A "bset D6, D7" the bit of the turtle in front of him at his weapon's range; 0 for none
param rock_soldier_find_turtle_ahead d7 turtle_ahead
# 011B4C "moveq #$0, D7" 011C0A "bset D6, D7" the bit of the turtle in front of him at his weapon's range
local rock_soldier_find_turtle_ahead 011B4C,011C0A d7 turtle_ahead
# 011B70 "sub.w ($e,A0), D5" 011B78 "not.w D5" how far the turtle is from him up or down the screen
local rock_soldier_find_turtle_ahead 011B70,011B78 d5 y_distance
# 011B9A "sub.w ($c,A0), D5" 011BA2 "not.w D5" 011BB4 "sub.w ($c,A0), D5" how far the turtle is from him across the screen
local rock_soldier_find_turtle_ahead 011B9A,011BA2,011BB4,011BD6,011BDE,011BF0 d5 x_distance
# 011C22 "lsl.w #2, D0" 011C24 "adda.l D0, A6" the move he did before, the row of rock_soldier_site_next_move's chances it picks by
param rock_soldier_site_next_move d0 last_move
# 011C24 "adda.l D0, A6" 011C26 "sub.b (A6,D6.w), D7" the four chances of the next moves after the one he did, taken from the roll in turn
local rock_soldier_site_next_move 011C24 a6 chances move_chance
# 011D2E "bsr $11dfa" 011D32 "tst.b D7" what boss_pick_target gives: a turtle picked as his target, none when 0
local rock_soldier_site_walk_start 011D2E d7 picked
# 011D38 "move.w #$8, D7" the range for rock_soldier_site_random_move_time, 8
local rock_soldier_site_walk_start 011D38 d7 range
# 011D56 "move.w #$8, D7" the range for rock_soldier_site_random_move_time, 8
local rock_soldier_site_walk_on_start 011D56 d7 range
# 011D6A "move.w #$4, D7" the range for rock_soldier_site_random_move_time, 4
local rock_soldier_site_stand_start 011D6A d7 range
# 011DB4 "move.w #$4, D7" the range for random_below, 4
local rock_soldier_site_jump_start 011DB4 d7 range
# 011DB8 "jsr $48448.l" 011DBE "tst.b D7" what random_below gives: his balloon when 0
local rock_soldier_site_jump_start 011DB8 d7 roll
# 011DC4 "move.w #$b1, D7" the speech for queue_sound, "Crash the turtles!"
local rock_soldier_site_jump_start 011DC4 d7 sound
# 011DDA "jsr $48448.l" the range for random_below, how many entries of rock_soldier_site_move_times to pick from
param rock_soldier_site_random_move_time d7 range
# 011DDA "jsr $48448.l" 011DE6 "move.b (A6,D7.w), ($31,A0)" what random_below gives: his entry in rock_soldier_site_move_times
local rock_soldier_site_random_move_time 011DDA d7 roll
# 011F66 "moveq #$1c, D7" 011F72 "moveq #$8, D7" 011F7E "moveq #$1, D7" the frames he flashes on, more often as he weakens: 0x1C, 8, then 1
local rock_soldier_weak_flash 011F66,011F72,011F7E d7 flash_mask
# 011F84 "and.b $600a5.l, D7" frame_count masked by how often he flashes: his own colour when 0
local rock_soldier_weak_flash 011F84 d7 flash_phase
# 012138 "move.b ($3,A0), D7" the rubble's parameter: which piece of him it is
local rubble_start 012138 d7 piece
# 01213C "lsl.w #2, D7" the piece times 4, its entry in rubble_animations
local rubble_start 01213C d7 piece_offset
# 01214E "bsr $182ee" 018302 "move.w ($1e,A0), D7" the height speed move_by_speeds hands back
local rubble_fall 01214E d7 height_speed
# 0121A0 "move.b ($5,A0), D7" 0121A4 "lsl.w #2, D7" the state of his way in times 4, the case of the state that runs
local rock_soldier_technodrome_enter 0121A0,0121A4 d7 state_offset
# 01223E "move.w #$fe, D7" 012242 "move.b D7, $60080.l" the fade-out command, kept as the music and queued with queue_sound
local rock_soldier_technodrome_enter_wait_for_scroll 01223E d7 sound
# 012262 "move.w #$64, D7" 012266 "move.b D7, $60080.l" the boss music, kept as the music and queued with queue_sound
local rock_soldier_technodrome_enter_wait 012262 d7 sound
# 012292 "lea $62780.l, A6" 01229E "jsr $1830c.l" the object for the wall slab, from object 24 on: the first free one find_free_object finds
local rock_soldier_technodrome_enter_appear 012292,01229E a6 wall_slab
# 01228C "moveq #$0, D0" 0 for rock_soldier_technodrome_next_move: the move he did before is his way in
local rock_soldier_technodrome_enter_appear 01228C d0 last_move
# 012298 "move.b #$8, D7" 01229E "jsr $1830c.l" 0122A4 "tst.b D7" the objects find_free_object looks at for the slab, the bars and their hit box, left over when it finds one
local rock_soldier_technodrome_enter_appear 012298,01229C,01229E,0122B4,0122B8,0122BA,0128C4,0128C8,0128CA d7 objects_left
# 012308 "move.b (A6,D1.w), D1" 012316 "cmp.b D1, D7" the chance out of 64 that he strikes the turtle, against random_below's roll
local rock_soldier_technodrome_think 012308 d1 attack_chance
# 01230C "move.w #$40, D7" the range for random_below, 64
local rock_soldier_technodrome_think 01230C d7 range
# 012310 "jsr $48448.l" 012316 "cmp.b D1, D7" what random_below gives, against the chance of a blow
local rock_soldier_technodrome_think 012310 d7 roll
# 01232C "move.b ($5,A0), D7" 012330 "lsl.w #2, D7" his state times 4, the case of the state that runs
local rock_soldier_technodrome_think 01232C,012330 d7 state_offset
# 012522 "move.b $61207.l, D7" 012530 "add.b ($26,A0), D7" the turtles in play times 4 and the blows he has struck: his entry in rock_soldier_technodrome_moves
local rock_soldier_technodrome_think 012522,012528,012530 d7 move_offset
# 012534 "move.b (A6,D7.w), D7" the blow from rock_soldier_technodrome_moves, his entry in rock_soldier_technodrome_animations
local rock_soldier_technodrome_think 012534 d7 move
# 012516 "move.b #$8, D7" the sound for queue_sound with his blow
local rock_soldier_technodrome_think 012516 d7 sound
# 01239E "moveq #$1, D0" 1 for rock_soldier_technodrome_move_done: the move he did is the walk
local rock_soldier_technodrome_walk 01239E d0 last_move
# 0123D0 "moveq #$2, D0" 2 for rock_soldier_technodrome_move_done: the move he did is the walk on
local rock_soldier_technodrome_walk_on 0123D0 d0 last_move
# 0123E0 "moveq #$3, D0" 3 for rock_soldier_technodrome_move_done: the move he did is standing
local rock_soldier_technodrome_stand 0123E0 d0 last_move
# 0123F0 "moveq #$4, D0" 4 for rock_soldier_technodrome_move_done: the move he did is the taunt
local rock_soldier_technodrome_taunt 0123F0 d0 last_move
# 01241E "bra $12452" the move he did before (0 his way in, 1 walk, 2 walk on, 3 stand, 4 taunt), for rock_soldier_technodrome_next_move
param rock_soldier_technodrome_move_done d0 last_move
# 0124C0 "lea $62780.l, A6" 0124CC "jsr $1830c.l" the object for the missile, from object 24 on: the first free one find_free_object finds
local rock_soldier_technodrome_move_done 0124C0,0124CC a6 missile
# 012402 "bsr $11b42" 012406 "tst.b D7" what rock_soldier_find_turtle_ahead gives: the turtle in front far enough, none when 0
local rock_soldier_technodrome_move_done 012402 d7 turtle_ahead
# 01240C "move.w #$10, D7" the range for random_below, 16
local rock_soldier_technodrome_move_done 01240C d7 range
# 012410 "jsr $48448.l" 012416 "cmpi.b #$4, D7" what random_below gives: a missile when under 4
local rock_soldier_technodrome_move_done 012410 d7 roll
# 0124C6 "move.b #$8, D7" 0124CC "jsr $1830c.l" the objects find_free_object looks at for the missile, left over when it finds one
local rock_soldier_technodrome_move_done 0124C6,0124CA,0124CC d7 objects_left
# 01244C "moveq #$5, D0" 5 for rock_soldier_technodrome_next_move: the move he did is firing
local rock_soldier_technodrome_fire 01244C d0 last_move
# 01244C "moveq #$5, D0" 5 for rock_soldier_technodrome_next_move: the move he did is a blow
local rock_soldier_technodrome_finish_blow 01244C d0 last_move
# 012466 "lsl.w #2, D0" 012468 "adda.l D0, A6" the move he did before, the row of the next moves' chances it picks by
param rock_soldier_technodrome_next_move d0 last_move
# 012468 "adda.l D0, A6" 01246A "sub.b (A6,D6.w), D7" the four chances of the next moves after the one he did, taken from the roll in turn
local rock_soldier_technodrome_next_move 012468 a6 chances move_chance
# 012572 "bsr $11dfa" 012576 "tst.b D7" what boss_pick_target gives: a turtle picked as his target, none when 0
local rock_soldier_technodrome_walk_start 012572 d7 picked
# 01257C "move.w #$8, D7" the range for rock_soldier_technodrome_random_move_time, 8
local rock_soldier_technodrome_walk_start 01257C d7 range
# 01259A "move.w #$8, D7" the range for rock_soldier_technodrome_random_move_time, 8
local rock_soldier_technodrome_walk_on_start 01259A d7 range
# 0125AE "move.w #$4, D7" the range for rock_soldier_technodrome_random_move_time, 4
local rock_soldier_technodrome_stand_start 0125AE d7 range
# 0125E4 "move.w #$4, D7" the range for random_below, 4
local rock_soldier_technodrome_taunt_start 0125E4 d7 range
# 0125E8 "jsr $48448.l" 0125EE "move.b D7, D6" what random_below gives: which of his two speeches
local rock_soldier_technodrome_taunt_start 0125E8 d7 roll
# 0125EE "move.b D7, D6" the roll kept while the sound is picked: "Crash the turtles!" when 0
local rock_soldier_technodrome_taunt_start 0125EE d6 kept_roll
# 0125F0 "move.w #$a6, D7" 0125FA "move.w #$b1, D7" his speech for queue_sound
local rock_soldier_technodrome_taunt_start 0125F0,0125FA d7 sound
# 012610 "jsr $48448.l" the range for random_below, how many entries of rock_soldier_technodrome_move_times to pick from
param rock_soldier_technodrome_random_move_time d7 range
# 012610 "jsr $48448.l" 01261C "move.b (A6,D7.w), ($31,A0)" what random_below gives: his entry in rock_soldier_technodrome_move_times
local rock_soldier_technodrome_random_move_time 012610 d7 roll
# 0126DA "lea $191a4.l, A6" the tile block of the hole the slab leaves, for draw_tile_block
local wall_slab_start 0126DA a6 block
# 0126E0 "move.w #$25, D7" the place in tile_block_places where draw_tile_block draws it
local wall_slab_start 0126E0 d7 place
# 012732 "move.w #$4000, D7" 012742 "ext.l D7" how far across from him the missile starts, the other way when he faces left
local rock_soldier_technodrome_start_missile 012732,012742 d7 missile_offset
# 01280A "move.w ($1a,A0), D7" 01280E "ext.l D7" the missile's speed across, added to its x
local missile_fly 01280E d7 x_speed
# 0129CE "subq.b #4, ($2e,A0)" 0129D2 "cmpi.b #$1, ($2e,A0)" the bars' hit box, whose blink period it counts down
param shock_bars_hit_box_blink_in a0 object object
# 0129E6 "move.b ($4,A6), D7" 0129EA "cmpi.b #$3, D7" the routine of the bars it goes with: it goes when 3, zaps when 2
local shock_bars_hit_box_zap 0129E6 d7 leader_routine

# ---- stage/layers.c ----
# 01E09A "move.b D1, ($0,A0)" 01E09E "move.b D1, ($2,A0)" the place in the tile RAM where the layer's next tile is drawn
param draw_whole_layer_and_floor a0 tile_place
# 01E0DA "adda.l #$80, A0" 01E0F0 "suba.l #$1f8, A0" 01E100 "adda.l #$180, A0" the place in the tile RAM of the next tile: down a row, back to the next block, down to the next row of blocks
local draw_whole_layer_and_floor 01E0DA,01E0F0,01E100 a0 tile_place
# 01E07C "lea $61800.l, A1" 01E0E0 "adda.l #$40, A1" the place in floor_map of the next floor cell, which follows the tiles
# type: a cell of floor_map: 01E07C "lea $61800.l, A1"
local draw_whole_layer_and_floor 01E07C,01E0E0,01E0F6,01E106 a1 floor_place floor_map_cell
# 01E092 "adda.l D0, A4" 01E0E6 "adda.l #$4, A4" the block of the map's entry in the layer's blocks, a row of four tiles at a time
local draw_whole_layer_and_floor 01E092,01E0E6 a4 block
# 01E054 "move.b $63301.l, D0" 01E05A "lsl.b #4, D0" the working layer's x page times 16, where the map is read from across
local draw_whole_layer_and_floor 01E054,01E05A d0 page_offset
# 01E094 "moveq #$4, D5" 01E0EC "subq.b #1, D5" the rows of four tiles of the block left to draw
local draw_whole_layer_and_floor 01E094,01E0EC d5 tile_rows_left
# 01E084 "moveq #$10, D6" 01E0FC "subq.b #1, D6" the blocks of the row left to draw
local draw_whole_layer_and_floor 01E084,01E0FC d6 blocks_left
# 01E082 "moveq #$8, D7" 01E116 "subq.b #1, D7" the rows of blocks left to draw
local draw_whole_layer_and_floor 01E082,01E116 d7 block_rows_left
# 01E162 "move.b D1, ($0,A0)" 01E166 "move.b D1, ($2,A0)" the place in the tile RAM where the layer's next tile is drawn
param draw_whole_layer a0 tile_place
# 01E18A "adda.l #$80, A0" 01E19A "suba.l #$1f8, A0" 01E1A4 "adda.l #$180, A0" the place in the tile RAM of the next tile: down a row, back to the next block, down to the next row of blocks
local draw_whole_layer 01E18A,01E19A,01E1A4 a0 tile_place
# 01E15A "adda.l D0, A4" 01E190 "adda.l #$4, A4" the block of the map's entry in the layer's blocks, a row of four tiles at a time
local draw_whole_layer 01E15A,01E190 a4 block
# 01E122 "move.b $63301.l, D0" 01E128 "lsl.b #4, D0" the working layer's x page times 16, where the map is read from across
local draw_whole_layer 01E122,01E128 d0 page_offset
# 01E138 "mulu.w D2, D1" 01E13A "sub.w $63310.l, D1" the working layer's y page times 8 rows of the map's width, less a row: where the map is read from down
local draw_whole_layer 01E138,01E13A d1 row_offset
# 01E15E "move.b ($0,A4), D1" 01E162 "move.b D1, ($0,A0)" the block's first byte, the attribute of its tiles, written to all four
local draw_whole_layer 01E15E d1 tile_attribute
# 01E15C "moveq #$4, D5" 01E196 "subq.b #1, D5" the rows of four tiles of the block left to draw
local draw_whole_layer 01E15C,01E196 d5 tile_rows_left
# 01E14C "moveq #$10, D6" 01E1A0 "subq.b #1, D6" the blocks of the row left to draw
local draw_whole_layer 01E14C,01E1A0 d6 blocks_left
# 01E14A "moveq #$8, D7" 01E1B4 "subq.b #1, D7" the rows of blocks left to draw
local draw_whole_layer 01E14A,01E1B4 d7 block_rows_left
# 01E260 "lsl.w #2, D0" 01E266 "add.w D1, D0" the area times 36, its entry in the tables of the area's layers
local start_area_layers 01E260,01E266 d0 area_offset
# 01E302 "lea $61800.l, A0" 01E30E "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E302 "lea $61800.l, A0"
local start_layers_building 01E302,01E30E a0 floor_place floor_map_cell
# 01E330 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B
local start_layers_building 01E330 a0 tile_place
# 01E308 "moveq #-$1, D0" 01E318 "move.l #$1010101, D0" 01E30E "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_building 01E308,01E318 d0 cells
# 01E340 "lea $61800.l, A0" 01E34C "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E340 "lea $61800.l, A0"
local start_layers_apartment 01E340,01E34C a0 floor_place floor_map_cell
# 01E364 "lea $61804.l, A0" 01E372 "addq.l #1, A0" the top of the floor map's column the wall is set in, one column right at a time
local start_layers_apartment 01E364,01E372 a0 wall_column
# 01E3CC "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B
local start_layers_apartment 01E3CC a0 tile_place
# 01E370 "movea.l A0, A1" 01E37A "adda.w #$40, A1" the wall's cell in the column, one row down at a time
# type: a cell of floor_map: 01E370 "movea.l A0, A1"
local start_layers_apartment 01E370,01E37A a1 wall_place floor_map_cell
# 01E346 "moveq #-$1, D0" 01E356 "move.l #$1010101, D0" 01E34C "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_apartment 01E346,01E356 d0 cells
# 01E36A "moveq #$6, D0" 01E382 "subq.b #1, D0" the columns of the wall left to set
local start_layers_apartment 01E36A,01E382 d0 columns_left
# 01E36C "moveq #$19, D1" 01E376 "subq.b #1, D1" the rows of wall in the column, one fewer each column
local start_layers_apartment 01E36C,01E376 d1 wall_height
# 01E374 "move.b D1, D2" 01E37E "subq.b #1, D2" the wall's cells left to set in the column
local start_layers_apartment 01E374,01E37E d2 rows_left
# 01E36E "moveq #-$3, D3" 01E378 "move.b D3, (A1)" the floor map's cell for the wall (0xFD)
local start_layers_apartment 01E36E d3 wall_cell
# 01E3E6 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer_and_floor draws layer B
local start_layers_street 01E3E6 a0 tile_place
# 01E3F6 "lea $61800.l, A0" 01E402 "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E3F6 "lea $61800.l, A0"
local start_layers_sewer 01E3F6,01E402 a0 floor_place floor_map_cell
# 01E440 "lea $102000.l, A0" 01E452 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer A, then B
local start_layers_sewer 01E440,01E452 a0 tile_place
# 01E3FC "moveq #-$1, D0" 01E40C "move.l #$1010101, D0" 01E41A "move.l #$fcfcfcfc, D0" 01E402 "move.l D0, (A0)+" the four floor cells written at once: 0xFF no floor, 1 floor, 0xFC the water, then floor again
local start_layers_sewer 01E3FC,01E40C,01E41A,01E428 d0 cells
# 01E462 "lea $61800.l, A0" 01E46E "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E462 "lea $61800.l, A0"
local start_layers_car_street 01E462,01E46E a0 floor_place floor_map_cell
# 01E490 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B
local start_layers_car_street 01E490 a0 tile_place
# 01E468 "moveq #-$1, D0" 01E478 "move.l #$1010101, D0" 01E46E "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_car_street 01E468,01E478 d0 cells
# 01E4A0 "lea $61800.l, A0" 01E4AC "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E4A0 "lea $61800.l, A0"
local start_layers_highway 01E4A0,01E4AC a0 floor_place floor_map_cell
# 01E4CE "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B
local start_layers_highway 01E4CE a0 tile_place
# 01E4A6 "moveq #-$1, D0" 01E4B6 "move.l #$1010101, D0" 01E4AC "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_highway 01E4A6,01E4B6 d0 cells
# 01E4DE "lea $61800.l, A0" 01E4EA "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E4DE "lea $61800.l, A0"
local start_layers_skateboard 01E4DE,01E4EA a0 floor_place floor_map_cell
# 01E50C "lea $104000.l, A0" 01E51E "lea $102000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B, then A
local start_layers_skateboard 01E50C,01E51E a0 tile_place
# 01E4E4 "moveq #-$1, D0" 01E4F4 "move.l #$1010101, D0" 01E4EA "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_skateboard 01E4E4,01E4F4 d0 cells
# 01E538 "lea $102000.l, A0" 01E54A "lea $104000.l, A0" the place in the tile RAM where layer A, then layer B with its floor, are drawn
local start_layers_building_site 01E538,01E54A a0 tile_place
# 01E562 "lea $61800.l, A0" 01E56E "move.l D0, (A0)+" the place in floor_map of the next four cells set
# type: four cells of floor_map at once: 01E562 "lea $61800.l, A0"
local start_layers_technodrome 01E562,01E56E a0 floor_place floor_map_cell
# 01E590 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B
local start_layers_technodrome 01E590 a0 tile_place
# 01E568 "moveq #-$1, D0" 01E578 "move.l #$1010101, D0" 01E56E "move.l D0, (A0)+" the four floor cells written at once: 0xFF (no floor) for the top rows, then 1 (floor)
local start_layers_technodrome 01E568,01E578 d0 cells
# 01E708 "lea $63340.l, A3" 01E720 "move.l (A3)+, (A4)+" the long of layer A's variables copied next
local load_layer_a 01E708,01E720 a3 source
# 01E718 "lea $63300.l, A4" 01E720 "move.l (A3)+, (A4)+" the long of the working layer's variables it is copied to
local load_layer_a 01E718,01E720 a4 destination
# 01E71E "moveq #$10, D0" 01E722 "subq.b #1, D0" the longs of the layer's variables left to copy
local load_layer_a 01E71E,01E722 d0 longs_left
# 01E712 "lea $63380.l, A3" 01E720 "move.l (A3)+, (A4)+" the long of layer B's variables copied next
local load_layer_b 01E712,01E720 a3 source
# 01E718 "lea $63300.l, A4" 01E720 "move.l (A3)+, (A4)+" the long of the working layer's variables it is copied to
local load_layer_b 01E718,01E720 a4 destination
# 01E71E "moveq #$10, D0" 01E722 "subq.b #1, D0" the longs of the layer's variables left to copy
local load_layer_b 01E71E,01E722 d0 longs_left
# 01E738 "lea $63300.l, A3" 01E720 "move.l (A3)+, (A4)+" the long of the working layer's variables copied next
local save_layer_a 01E738,01E720 a3 source
# 01E728 "lea $63340.l, A4" 01E720 "move.l (A3)+, (A4)+" the long of layer A's variables it is copied to
local save_layer_a 01E728,01E720 a4 destination
# 01E71E "moveq #$10, D0" 01E722 "subq.b #1, D0" the longs of the layer's variables left to copy
local save_layer_a 01E71E,01E722 d0 longs_left
# 01E738 "lea $63300.l, A3" 01E720 "move.l (A3)+, (A4)+" the long of the working layer's variables copied next
local save_layer_b 01E738,01E720 a3 source
# 01E732 "lea $63380.l, A4" 01E720 "move.l (A3)+, (A4)+" the long of layer B's variables it is copied to
local save_layer_b 01E732,01E720 a4 destination
# 01E71E "moveq #$10, D0" 01E722 "subq.b #1, D0" the longs of the layer's variables left to copy
local save_layer_b 01E71E,01E722 d0 longs_left
# 01E786 "movea.l D0, A0" 01E82E "adda.w #$8, A0" 01E84C "movea.l D6, A0" the place in the tile RAM of the next block's tiles, wrapped back to the start of its row
# type: the K052109's tile RAM (100000-107FFF): 01E77A "add.l $633cc.l, D0" (working_layer_tiles) 01E786 "movea.l D0, A0"
local draw_new_row_and_column_and_floor 01E786,01E82E,01E84C,01E89E,01E95A a0 tile_place io
# 01E788 "movea.l D1, A1" 01E832 "adda.w #$4, A1" 01E84E "movea.l D0, A1" the place in floor_map of the next block's floor cells, wrapped with the tiles
# type: a cell of floor_map: 01E780 "addi.l #$61800, D1" 01E788 "movea.l D1, A1"
local draw_new_row_and_column_and_floor 01E788,01E832,01E84E,01E8A0,01E94E a1 floor_place floor_map_cell
# 01E7D8 "movea.l $63316.l, A3" 01E8E0 "movea.l $63316.l, A3" the working layer's blocks
local draw_new_row_and_column_and_floor 01E7D8,01E8E0 a3 layer_blocks
# 01E7F8 "adda.l D4, A3" 01E900 "adda.l D4, A3" the block of the map's entry, whose tiles and floor cells are written
local draw_new_row_and_column_and_floor 01E7F8,01E900 a3 block
# 01E980 "adda.l D4, A4" the block of the map's entry below the column, part of whose tiles are written
local draw_new_row_and_column_and_floor 01E980 a4 last_block
# 01E74A "move.l $63330.l, D0" the y of the row the scroll brings into view
local draw_new_row_and_column_and_floor 01E74A d0 row_y
# 01E76A "andi.l #$f800, D0" 01E772 "lsr.w #4, D0" 01E774 "add.w D1, D0" the offset in the layer's tile RAM of the new row's first tile, from its y and the layer's x
local draw_new_row_and_column_and_floor 01E76A,01E770,01E772,01E774 d0 tile_offset
# 01E828 "move.l A1, D0" 01E842 "andi.w #$ffc0, D0" the start of the floor map's row, where the floor cells wrap to
local draw_new_row_and_column_and_floor 01E828,01E842 d0 floor_row_start
# 01E862 "move.l $6332c.l, D0" the x of the column the scroll brings into view
local draw_new_row_and_column_and_floor 01E862 d0 column_x
# 01E888 "lsl.l #6, D0" 01E88A "swap D0" 01E88C "add.w D1, D0" the offset in the layer's tile RAM of the new column's first tile, from its x and the layer's y
local draw_new_row_and_column_and_floor 01E888,01E88A,01E88C d0 tile_offset
# 01E766 "lsl.l #6, D1" the layer's x in tiles, the column part of the new row's offset
local draw_new_row_and_column_and_floor 01E766 d1 x_offset
# 01E878 "andi.l #$e000, D1" the layer's y, the row part of the new column's offset
local draw_new_row_and_column_and_floor 01E878 d1 y_offset
# 01E79C "lsl.l #4, D2" the layer's x in blocks, the column of the map the new row starts at
local draw_new_row_and_column_and_floor 01E79C d2 row_map_x
# 01E8B4 "lsl.l #3, D2" the layer's y in blocks, the row of the map the new column starts at
local draw_new_row_and_column_and_floor 01E8B4 d2 column_map_y
# 01E750 "move.l D0, D3" the y of the new row, kept for its row of the map
local draw_new_row_and_column_and_floor 01E750 d3 map_row_y
# 01E7AC "lsl.l #3, D3" the new row's y in blocks, its row of the map
local draw_new_row_and_column_and_floor 01E7AC d3 row_map_y
# 01E82A "move.l A0, D3" 01E836 "addi.w #$8, D3" the place of the block just drawn, to see whether the next one passes the row's end
local draw_new_row_and_column_and_floor 01E82A d3 last_tile_place
# 01E970 "andi.b #$18, D3" the layer's y within its block: how many of the last block's rows show
local draw_new_row_and_column_and_floor 01E970 d3 y_in_block
# 01E868 "move.l D0, D4" the x of the new column, kept for its column of the map
local draw_new_row_and_column_and_floor 01E868 d4 map_column_x
# 01E8C8 "lsl.l #4, D4" the new column's x in blocks, its column of the map
local draw_new_row_and_column_and_floor 01E8C8 d4 column_map_x
# 01E752 "move.l D0, D5" the y of the new row, kept for its row within the blocks
local draw_new_row_and_column_and_floor 01E752 d5 block_row_y
# 01E7CA "lsl.l #7, D5" 01E7CE "andi.w #$c, D5" 01E7D4 "eor.w D3, D5" the new row's row of tiles within the blocks, times 4: the offset of its cells in a block
local draw_new_row_and_column_and_floor 01E7CA,01E7CC,01E7CE,01E7D4 d5 block_row
# 01E86A "move.l D0, D5" the x of the new column, kept for its column within the blocks
local draw_new_row_and_column_and_floor 01E86A d5 block_column_x
# 01E8D6 "lsr.w #8, D5" 01E8D8 "andi.w #$18, D5" 01E8DC "lsr.w #3, D5" the new column's column of tiles within the blocks: the offset of its cells in a block
local draw_new_row_and_column_and_floor 01E8D6,01E8D8,01E8DC d5 block_column
# 01E83E "andi.w #$ff80, D6" 01E846 "cmp.w D6, D3" the start of the tile RAM's row, where the tiles wrap to
local draw_new_row_and_column_and_floor 01E83E d6 tile_row_start
# 01E952 "addi.w #$200, D6" the place of the next block down the column, wrapped in the layer
local draw_new_row_and_column_and_floor 01E952 d6 next_tile_place
# 01E990 "subq.b #1, D6" the rows of the last block left to draw
local draw_new_row_and_column_and_floor 01E990 d6 rows_left
# 01E7D6 "moveq #$d, D7" 01E850 "subi.b #$1, D7" 01E8DE "moveq #$8, D7" 01E95C "subq.b #1, D7" the blocks of the new row (13) or column (8) left to draw
local draw_new_row_and_column_and_floor 01E7D6,01E850,01E8DE,01E95C d7 blocks_left
# 01E9FE "movea.l D0, A0" 01EA8C "adda.w #$8, A0" 01EAA2 "movea.l D6, A0" the place in the tile RAM of the next block's tiles, wrapped back to the start of its row
# type: the K052109's tile RAM (100000-107FFF): 01E9F8 "add.l $633cc.l, D0" (working_layer_tiles) 01E9FE "movea.l D0, A0"
local draw_new_row_and_column 01E9FE,01EA8C,01EAA2,01EAE8,01EB76 a0 tile_place io
# 01EA4E "movea.l $63316.l, A3" 01EB28 "movea.l $63316.l, A3" the working layer's blocks
local draw_new_row_and_column 01EA4E,01EB28 a3 layer_blocks
# 01EA6E "adda.l D4, A3" 01EB48 "adda.l D4, A3" the block of the map's entry, whose tiles are written
local draw_new_row_and_column 01EA6E,01EB48 a3 block
# 01EB9C "adda.l D4, A4" the block of the map's entry below the column, part of whose tiles are written
local draw_new_row_and_column 01EB9C a4 last_block
# 01E9CC "move.l $63330.l, D0" the y of the row the scroll brings into view
local draw_new_row_and_column 01E9CC d0 row_y
# 01E9EC "andi.l #$f800, D0" 01E9F2 "neg.w D0" 01E9F4 "lsr.w #4, D0" the offset in the layer's tile RAM of the new row's first tile, from its y
local draw_new_row_and_column 01E9EC,01E9F2,01E9F4 d0 tile_offset
# 01EAB6 "move.l $6332c.l, D0" the x of the column the scroll brings into view
local draw_new_row_and_column 01EAB6 d0 column_x
# 01EADC "lsl.l #6, D0" 01EADE "swap D0" the offset in the layer's tile RAM of the new column's first tile, from its x
local draw_new_row_and_column 01EADC,01EADE d0 tile_offset
# 01E9E8 "lsl.l #6, D1" 01E9EA "swap D1" the layer's x in tiles, the column part of the new row's offset
local draw_new_row_and_column 01E9E8,01E9EA d1 x_offset
# 01EACC "andi.l #$e000, D1" 01EAD4 "lsr.l #4, D1" the layer's y, the row part of the new column's offset
local draw_new_row_and_column 01EACC,01EAD4 d1 y_offset
# 01EA12 "lsl.l #4, D2" the layer's x in blocks, the column of the map the new row starts at
local draw_new_row_and_column 01EA12 d2 row_map_x
# 01EAFC "lsl.l #3, D2" the layer's y in blocks, the row of the map the new column starts at
local draw_new_row_and_column 01EAFC d2 column_map_y
# 01E9D2 "move.l D0, D3" the y of the new row, kept for its row of the map
local draw_new_row_and_column 01E9D2 d3 map_row_y
# 01EA22 "lsl.l #3, D3" the new row's y in blocks, its row of the map
local draw_new_row_and_column 01EA22 d3 row_map_y
# 01EA88 "move.l A0, D3" the place of the block just drawn, to see whether the next one passes the row's end
local draw_new_row_and_column 01EA88 d3 last_tile_place
# 01EB8C "andi.b #$18, D3" the layer's y within its block: how many of the last block's rows show
local draw_new_row_and_column 01EB8C d3 y_in_block
# 01EABC "move.l D0, D4" the x of the new column, kept for its column of the map
local draw_new_row_and_column 01EABC d4 map_column_x
# 01EB10 "lsl.l #4, D4" the new column's x in blocks, its column of the map
local draw_new_row_and_column 01EB10 d4 column_map_x
# 01E9D4 "move.l D0, D5" the y of the new row, kept for its row within the blocks
local draw_new_row_and_column 01E9D4 d5 block_row_y
# 01EA40 "lsl.l #7, D5" 01EA44 "andi.w #$c, D5" 01EA4A "eor.w D3, D5" the new row's row of tiles within the blocks, times 4: the offset of its tiles in a block
local draw_new_row_and_column 01EA40,01EA42,01EA44,01EA4A d5 block_row
# 01EABE "move.l D0, D5" the x of the new column, kept for its column within the blocks
local draw_new_row_and_column 01EABE d5 block_column_x
# 01EB1E "lsr.w #8, D5" 01EB20 "andi.w #$18, D5" 01EB24 "lsr.w #3, D5" the new column's column of tiles within the blocks: the offset of its tiles in a block
local draw_new_row_and_column 01EB1E,01EB20,01EB24 d5 block_column
# 01EA98 "andi.w #$ff80, D6" the start of the tile RAM's row, where the tiles wrap to
local draw_new_row_and_column 01EA98 d6 tile_row_start
# 01EB6E "addi.w #$200, D6" the place of the next block down the column, wrapped in the layer
local draw_new_row_and_column 01EB6E d6 next_tile_place
# 01EBA8 "subq.b #1, D6" the rows of the last block left to draw
local draw_new_row_and_column 01EBA8 d6 rows_left
# 01EA4C "moveq #$d, D7" 01EAA4 "subi.b #$1, D7" 01EB26 "moveq #$8, D7" 01EB78 "subq.b #1, D7" the blocks of the new row (13) or column (8) left to draw
local draw_new_row_and_column 01EA4C,01EAA4,01EB26,01EB78 d7 blocks_left
# 01EBF4 "lsl.w #2, D0" the area times 4, the case of the area's layers that runs
local update_area_layers 01EBF4 d0 stage_offset
# 01ED48 "clr.b D0" 01ED52 "subq.b #1, D0" the side of the balloon for say_attack: 0 on the left, 0xFF on the right when the turtle faces right
local update_layers_building 01ED48,01ED52 d0 on_right
# 01EDA2 "lea $61824.l, A0" 01EDB4 "addq.w #1, A0" the top of the floor map's column the end wall is set in, one column right at a time
local update_layers_building 01EDA2,01EDB4 a0 wall_column
# 01EDB2 "movea.l A0, A1" 01EDB8 "adda.w #$40, A1" the wall's cell in the column, one row down at a time
# type: a cell of floor_map: 01EDB2 "movea.l A0, A1"
local update_layers_building 01EDB2,01EDB8 a1 wall_place floor_map_cell
# 01EDA8 "moveq #$c, D0" 01EDC0 "subq.b #1, D0" the columns of the wall left to set
local update_layers_building 01EDA8,01EDC0 d0 columns_left
# 01EDAA "moveq #$12, D1" 01EDB0 "addq.b #1, D1" the rows of wall in the column, one more each column
local update_layers_building 01EDAA,01EDB0 d1 wall_height
# 01EDAE "move.b D1, D2" 01EDBC "subq.b #1, D2" the wall's cells left to set in the column
local update_layers_building 01EDAE,01EDBC d2 rows_left
# 01EDAC "moveq #-$2, D3" 01EDB6 "move.b D3, (A1)" the floor map's cell for the wall (0xFE)
local update_layers_building 01EDAC d3 wall_cell
# 01EDE6 "lea $61834.l, A0" 01EDF8 "addq.w #1, A0" the top of the floor map's column the end wall is set in, one column right at a time
local update_layers_apartment 01EDE6,01EDF8 a0 wall_column
# 01EDF6 "movea.l A0, A1" 01EDFC "adda.w #$40, A1" the wall's cell in the column, one row down at a time
# type: a cell of floor_map: 01EDF6 "movea.l A0, A1"
local update_layers_apartment 01EDF6,01EDFC a1 wall_place floor_map_cell
# 01EDEC "moveq #$8, D0" 01EE04 "subq.b #1, D0" the columns of the wall left to set
local update_layers_apartment 01EDEC,01EE04 d0 columns_left
# 01EDEE "moveq #$13, D1" 01EDF4 "addq.b #1, D1" the rows of wall in the column, one more each column
local update_layers_apartment 01EDEE,01EDF4 d1 wall_height
# 01EDF2 "move.b D1, D2" 01EE00 "subq.b #1, D2" the wall's cells left to set in the column
local update_layers_apartment 01EDF2,01EE00 d2 rows_left
# 01EDF0 "moveq #-$2, D3" 01EDFA "move.b D3, (A1)" the floor map's cell for the wall (0xFE)
local update_layers_apartment 01EDF0 d3 wall_cell
# 01EE56 "moveq #$7f, D0" non-zero for say_help_me: the balloon on the right of April
local april_wait_for_rescue 01EE56 d0 on_right
# 01EE5C "move.w #$70, D2" the screen y of the balloon for say_help_me
local april_wait_for_rescue 01EE5C d2 screen_y
# 01EFA0 "lea $102478.l, A0" 01EFB6 "move.b D0, (A0)+" the place in layer A's tile RAM of the TV's left half (the last columns of the layer), cleared
local update_layers_street 01EFA0,01EFB6,01EFBA,01EFC0 a0 left_half_place
# 01EFA6 "lea $102400.l, A1" 01EFB4 "move.b D0, (A1)+" the place in layer A's tile RAM of the TV's right half (the first columns of the layer), cleared
local update_layers_street 01EFA6,01EFB4,01EFB8,01EFC4 a1 right_half_place
# 01EF76 "movea.l (A6,D0.w), A6" the frame of April talking on the TV, from street_tv_pictures, for animate_tv_picture
local update_layers_street 01EF76 a6 tv_frame
# 01EF08 "moveq #$28, D0" 01EFF4 "moveq #$8, D0" 01EFAC "clr.b D0" the attribute of the TV's tiles: for draw_tv_picture, then 0 when the TV is cleared
local update_layers_street 01EF08,01EFF4,01EFAC d0 tile_attribute
# 01EF60 "move.w $61110.l, D0" 01EF74 "lsr.w #1, D0" tv_time's bits 3-4, halved: April's frame in street_tv_pictures
local update_layers_street 01EF60,01EF74 d0 frame_offset
# 01EF82 "moveq #$7f, D0" 01EFD0 "moveq #$7f, D0" non-zero for the speech: the balloon on the right of the TV
local update_layers_street 01EF82,01EFD0 d0 on_right
# 01F058 "clr.b D0" 0 for say_they_aint_getting_prettier: the balloon on the left of the turtle
local update_layers_street 01F058 d0 on_right
# 01EF94 "lsr.l #8, D1" the TV's screen x for say_help_me, from layer B's x
local update_layers_street 01EF94 d1 screen_x
# 01EFAE "moveq #$10, D1" 01EFBA "move.b D1, (A0)+" the code of the blank tile (0x10, the space) the TV is cleared with
local update_layers_street 01EFAE d1 space_tile
# 01EFE2 "lsr.l #8, D1" the TV's screen x for say_turtle_soup, from layer B's x
local update_layers_street 01EFE2 d1 screen_x
# 01F042 "move.w ($c,A0), D1" 01F04E "subi.w #$18, D1" the first turtle's screen x (less 0x18 when it faces right) for its answer
local update_layers_street 01F042,01F04E d1 screen_x
# 01EF84 "move.w #$70, D2" 01EFD2 "move.w #$70, D2" 01F056 "addq.w #8, D2" the screen y of the balloon for the speech
local update_layers_street 01EF84,01EFD2,01F056 d2 screen_y
# 01F090 "move.b D0, (A1)+" 01F092 "move.b D0, (A0)+" the attribute byte of the picture's tiles
param draw_tv_picture d0 tile_attribute
# 01F080 "lea $102478.l, A0" 01F098 "move.b (A6)+, (A0)+" the place in layer A's tile RAM of the picture's left half (the last columns of the layer)
local draw_tv_picture 01F080,01F092,01F098,01F09E a0 left_half_place
# 01F086 "lea $102400.l, A1" 01F094 "move.b ($4,A6), (A1)+" the place in layer A's tile RAM of the picture's right half (the first columns of the layer)
local draw_tv_picture 01F086,01F090,01F094,01F0A2 a1 right_half_place
# 01F0BC "move.b (A6), (A0)" 01F0BE "move.b ($1,A6), ($2,A0)" the frame's tile codes, three a row: two in the left half, one in the right
param animate_tv_picture a6 tv_frame picture_tile
# 01F0D0 "addq.l #3, A6" the frame's tile codes of the next row
local animate_tv_picture 01F0D0 a6 tv_frame picture_tile
# 01F0AE "lea $1025fd.l, A0" 01F0C8 "adda.w #$80, A0" the place in layer A's tile RAM of the left half's tile codes, one row down at a time
local animate_tv_picture 01F0AE,01F0C8 a0 left_half_place
# 01F0B4 "lea $102581.l, A1" 01F0CC "adda.w #$80, A1" the place in layer A's tile RAM of the right half's tile code, one row down at a time
local animate_tv_picture 01F0B4,01F0CC a1 right_half_place
# 01F19E "lea $61810.l, A1" 01F1B0 "adda.w #$1, A1" the top of the floor map's column the water's edge is set in, one column right at a time
local update_layers_sewer 01F19E,01F1B0 a1 wall_column
# 01F1AE "movea.l A1, A0" 01F1B8 "adda.w #$40, A0" the cell in the column, one row down at a time
# type: a cell of floor_map: 01F1AE "movea.l A1, A0"
local update_layers_sewer 01F1AE,01F1B8 a0 wall_place floor_map_cell
# 01F1AA "moveq #-$2, D0" the floor map's cell set (0xFE)
local update_layers_sewer 01F1AA d0 wall_cell
# 01F1B4 "move.b (A6)+, D6" 01F1BC "subq.b #1, D6" the column's cells left to set, its height from sewer_water_tiles
local update_layers_sewer 01F1B4,01F1BC d6 rows_left
# 01F1AC "moveq #$10, D7" 01F1C0 "subq.b #1, D7" the columns left to set
local update_layers_sewer 01F1AC,01F1C0 d7 columns_left
# 01F370 "lea $102030.l, A0" 01F37C "move.b D0, (A0)+" the place in layer A's tile RAM of the next tile cleared where Splinter hangs
local update_layers_building_site 01F370,01F37C,01F37E,01F380,01F382,01F384,01F386,01F388,01F38C a0 tile_place
# 01F376 "clr.b D0" 01F37C "move.b D0, (A0)+" the attribute of a blank tile (0)
local update_layers_building_site 01F376 d0 blank_attribute
# 01F378 "moveq #$10, D1" 01F37E "move.b D1, (A0)+" the code of the blank tile (0x10, the space)
local update_layers_building_site 01F378 d1 space_tile
# 01F66A "lea $61830.l, A0" 01F678 "addq.w #1, A0" the top of the floor map's column the wall is set in, one column right at a time
local technodrome_ride_lift 01F66A,01F678 a0 wall_column
# 01F676 "movea.l A0, A1" 01F680 "adda.w #$40, A1" the wall's cell in the column, one row down at a time
# type: a cell of floor_map: 01F676 "movea.l A0, A1"
local technodrome_ride_lift 01F676,01F680 a1 wall_place floor_map_cell
# 01F670 "moveq #$10, D0" 01F688 "subq.b #1, D0" the columns of the wall left to set
local technodrome_ride_lift 01F670,01F688 d0 columns_left
# 01F672 "moveq #$20, D1" 01F67C "subq.b #1, D1" the rows of wall in the column, one fewer each column
local technodrome_ride_lift 01F672,01F67C d1 wall_height
# 01F67A "move.b D1, D2" 01F684 "subq.b #1, D2" the wall's cells left to set in the column
local technodrome_ride_lift 01F67A,01F684 d2 rows_left
# 01F674 "moveq #-$3, D3" 01F67E "move.b D3, (A1)" the floor map's cell for the wall (0xFD)
local technodrome_ride_lift 01F674 d3 wall_cell
# 01F716 "lea $61830.l, A0" 01F72C "lea $61c30.l, A0" the first row of the floor map that fill_floor_map_rows fills
local technodrome_leave_lift 01F716,01F72C a0 floor_row
# 01F758 "lea $61838.l, A0" 01F76A "addq.w #1, A0" 01F776 "lea $61800.l, A0" the top of the floor map's column the end wall is set in, wrapped to the map's first column
local technodrome_leave_lift 01F758,01F76A,01F776 a0 wall_column
# 01F726 "moveq #$10, D0" 01F738 "moveq #$10, D0" the rows fill_floor_map_rows fills, 16
local technodrome_leave_lift 01F726,01F738 d0 rows
# 01F75E "moveq #$10, D0" 01F786 "subq.b #1, D0" the columns of the wall left to set
local technodrome_leave_lift 01F75E,01F786 d0 columns_left
# 01F760 "moveq #$10, D1" 01F766 "addq.b #1, D1" the rows of wall in the column, one more each column
local technodrome_leave_lift 01F760,01F766 d1 wall_height
# 01F724 "moveq #-$1, D2" 01F732 "move.l #$1010101, D2" the four floor cells fill_floor_map_rows writes at once: 0xFF (no floor), then 1 (floor)
local technodrome_leave_lift 01F724,01F732 d2 cells
# 01F764 "move.b D1, D2" 01F782 "subq.b #1, D2" the wall's cells left to set in the column
local technodrome_leave_lift 01F764,01F782 d2 rows_left
# 01F762 "moveq #-$2, D3" 01F77C "move.b D3, (A1)" the floor map's cell for the wall (0xFE)
local technodrome_leave_lift 01F762 d3 wall_cell
# 01F79E "subq.b #1, D0" the rows of the floor map left to fill
param fill_floor_map_rows d0 rows
# 01F794 "move.l D2, (A0)+" the four floor cells written at once
param fill_floor_map_rows d2 cells
# 01F794 "move.l D2, (A0)+" 01F79A "adda.w #$30, A0" the place in floor_map of the next four cells
# type: four cells of floor_map at once: 01F716 "lea $61830.l, A0" (its caller's)
param fill_floor_map_rows a0 floor_place floor_map_cell
# 01F794 "move.l D2, (A0)+" 01F79A "adda.w #$30, A0" the place in floor_map of the next four cells, then the next row's start
# type: four cells of floor_map at once: 01F794 "move.l D2, (A0)+"
local fill_floor_map_rows 01F794,01F79A a0 floor_place floor_map_cell
# 01F79E "subq.b #1, D0" the rows of the floor map left to fill
local fill_floor_map_rows 01F79E d0 rows
# 01F792 "moveq #$4, D1" 01F796 "subq.b #1, D1" the longs of four cells left to write in the row
local fill_floor_map_rows 01F792,01F796 d1 longs_left
# 01F7B4 "sub.l $63380.l, D0" how far layer B's x is from the lift's edge, which shows while it is near
local place_lift_edge 01F7B4 d0 distance
# 01F856 "clr.b D5" 0 added to the colours of the car's picture: the first car in its own colours
local highway_first_car 01F856 d5 colour_offset
# 01F86C "clr.b D5" 0 added to the attribute of the first car's wheels
local highway_first_car_drive 01F86C d5 colour_offset
# 01F8FC "add.b D5, D0" what is added to the attribute of the car's wheels: the car's colours
param drive_foot_car d5 colour_offset
# 01F8EE "lea $102a56.l, A0" 01F904 "move.b (A2)+, (A0)+" the place in layer A's tile RAM of the car's left wheel
local drive_foot_car 01F8EE,01F900,01F904,01F90C a0 left_wheel_place
# 01F8F4 "lea $102a6c.l, A1" 01F906 "move.b (A3)+, (A1)+" the place in layer A's tile RAM of the car's right wheel
local drive_foot_car 01F8F4,01F902,01F906,01F910 a1 right_wheel_place
# 01F8C6 "moveq #$34, D0" 01F8E0 "addq.b #1, D0" 01F8FC "add.b D5, D0" the attribute of the wheels' tiles: the turn's frame and the car's colours
local drive_foot_car 01F8C6,01F8E0,01F8FC d0 tile_attribute
# 01F954 "add.b D5, D0" what is added to the picture's colours: the car's colours
param draw_screen_picture d5 colour_offset
# 01F93C "lea $1025d0.l, A0" 01F958 "move.b (A2)+, (A0)+" the place in layer A's tile RAM of the picture's next tile
local draw_screen_picture 01F93C,01F956,01F958,01F95E a0 tile_place

# ---- video/speech_balloons.c ----
# 0301A8 "movea.l $633f8.l, A6" the balloon's place in the tile RAM (balloon_place), where its pointer's tiles go
local draw_balloon_pointer 0301A8 a6 tile_place
# 02FFE8 "bsr $301d8" 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_we_gotta_save_splinter d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_we_gotta_save_splinter d1 screen_x
# 02FFE6 "moveq #$5, D3" the balloon's line in balloon_records for show_balloon_beside
local say_we_gotta_save_splinter 02FFE6 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_lets_move_it d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_lets_move_it d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_lets_move_it d2 screen_y
# 02FFEE "moveq #$a, D3" the balloon's line in balloon_records for show_balloon_beside
local say_lets_move_it 02FFEE d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_youre_dead_shell_brain d0 on_right
# 030004 "moveq #$14, D3" the balloon's line in balloon_records for show_balloon_beside
local say_youre_dead_shell_brain 030004 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_turtle_soup d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_turtle_soup d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_turtle_soup d2 screen_y
# 03000C "moveq #$19, D3" the balloon's line in balloon_records for show_balloon_beside
local say_turtle_soup 03000C d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_im_invincible d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_im_invincible d1 screen_x
# 030014 "moveq #$1e, D3" the balloon's line in balloon_records for show_balloon_beside
local say_im_invincible 030014 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_crash_the_turtles d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_crash_the_turtles d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_crash_the_turtles d2 screen_y
# 03001C "moveq #$23, D3" the balloon's line in balloon_records for show_balloon_beside
local say_crash_the_turtles 03001C d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_do_not_resist_us d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_do_not_resist_us d1 screen_x
# 030024 "moveq #$28, D3" the balloon's line in balloon_records for show_balloon_beside
local say_do_not_resist_us 030024 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_help_me d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_help_me d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_help_me d2 screen_y
# 03002C "moveq #$2d, D3" the balloon's line in balloon_records for show_balloon_beside
local say_help_me 03002C d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_attack d0 on_right
# 030034 "moveq #$32, D3" the balloon's line in balloon_records for show_balloon_beside
local say_attack 030034 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_pizza_time d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_pizza_time d1 screen_x
# 030054 "add.b ($10,A0), D2" the speaker's screen y, raised by its height for show_balloon_beside
param say_pizza_time d2 screen_y
# 030054 "add.b ($10,A0), D2" the speaker's screen y with its height added
local say_pizza_time 030054 d2 screen_y
# 030058 "moveq #$46, D3" the balloon's line in balloon_records for show_balloon_beside
local say_pizza_time 030058 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_speedy d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_speedy d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_speedy d2 screen_y
# 030062 "moveq #$4b, D3" the balloon's line in balloon_records for show_balloon_beside
local say_speedy 030062 d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_zappy d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_zappy d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_zappy d2 screen_y
# 03006C "moveq #$50, D3" the balloon's line in balloon_records for show_balloon_beside
local say_zappy 03006C d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_shell_shock d0 on_right
# 0301E2 "subi.w #$20, D1" the speaker's screen x for show_balloon_beside
param say_shell_shock d1 screen_x
# 030076 "add.b ($10,A0), D2" the speaker's screen y, raised by its height for show_balloon_beside
param say_shell_shock d2 screen_y
# 030076 "add.b ($10,A0), D2" the speaker's screen y with its height added
local say_shell_shock 030076 d2 screen_y
# 03007A "moveq #$55, D3" the balloon's line in balloon_records for show_balloon_beside
local say_shell_shock 03007A d3 line
# 0301D8 "move.b D0, $61113.l" the side of the balloon for show_balloon_beside: non-zero on the right of the speaker
param say_yippee_i_ay d0 on_right
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon_beside
param say_yippee_i_ay d2 screen_y
# 030084 "moveq #$5a, D3" the balloon's line in balloon_records for show_balloon_beside
local say_yippee_i_ay 030084 d3 line
# 030204 "move.w D0, $60066.l" the side of the wide balloon for show_balloon: non-zero on the right of the speaker
param say_your_prayers_toitles d0 on_right
# 03028A "cmpi.w #$130, D1" the speaker's screen x for show_balloon
param say_your_prayers_toitles d1 screen_x
# 03008E "moveq #$5f, D3" the balloon's line in balloon_records for show_balloon
local say_your_prayers_toitles 03008E d3 line
# 030090 "moveq #$20, D4" the tile bank bits show_balloon puts in tile_banks_2_3 for the balloon
local say_your_prayers_toitles 030090 d4 bank
# 030204 "move.w D0, $60066.l" the side of the wide balloon for show_balloon: non-zero on the right of the speaker
param say_they_aint_getting_prettier d0 on_right
# 0300E2 "subi.w #$30, D1" the speaker's screen x, 0x30 to the left for the wide balloon
param say_they_aint_getting_prettier d1 screen_x
# 0300E2 "subi.w #$30, D1" the speaker's screen x moved 0x30 left for the wide balloon
local say_they_aint_getting_prettier 0300E2 d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon
param say_they_aint_getting_prettier d2 screen_y
# 0300E6 "moveq #$69, D3" the balloon's line in balloon_records for show_balloon
local say_they_aint_getting_prettier 0300E6 d3 line
# 0300E0 "moveq #-$30, D4" the tile bank bits show_balloon puts in tile_banks_2_3 for the balloon
local say_they_aint_getting_prettier 0300E0 d4 bank
# 030204 "move.w D0, $60066.l" the side of the wide balloon for show_balloon: non-zero on the right of the speaker
param say_watch_your_mouth d0 on_right
# 0300FC "moveq #$6e, D3" the balloon's line in balloon_records for show_balloon
local say_watch_your_mouth 0300FC d3 line
# 0300F6 "moveq #-$30, D4" the tile bank bits show_balloon puts in tile_banks_2_3 for the balloon
local say_watch_your_mouth 0300F6 d4 bank
# 030204 "move.w D0, $60066.l" the side of the wide balloon for show_balloon: non-zero on the right of the speaker
param say_overgrown_cork_screw d0 on_right
# 03028A "cmpi.w #$130, D1" the speaker's screen x for show_balloon
param say_overgrown_cork_screw d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon
param say_overgrown_cork_screw d2 screen_y
# 03012C "movea.l $633f8.l, A6" the balloon's place in the tile RAM (balloon_place), where its pointer's tiles go
local say_overgrown_cork_screw 03012C a6 tile_place
# 030108 "moveq #$73, D3" the balloon's line in balloon_records for show_balloon
local say_overgrown_cork_screw 030108 d3 line
# 030106 "moveq #-$30, D4" the tile bank bits show_balloon puts in tile_banks_2_3 for the balloon
local say_overgrown_cork_screw 030106 d4 bank
# 03016A "movea.l $633f8.l, A6" the balloon's place in the tile RAM (balloon_place), where its pointer's tiles go
local draw_wide_balloon_pointer 03016A a6 tile_place
# 0301D8 "move.b D0, $61113.l" the side of the balloon, kept in balloon_on_right: non-zero on the right of the speaker
param show_balloon_beside d0 on_right
# 0301E2 "subi.w #$20, D1" 0301EA "addi.w #$20, D1" the speaker's screen x, 0x20 to the side of which the balloon goes
param show_balloon_beside d1 screen_x
# 0301E2 "subi.w #$20, D1" 0301EA "addi.w #$20, D1" the speaker's screen x moved 0x20 to the side the balloon is on
local show_balloon_beside 0301E2,0301EA d1 screen_x
# 03020A "move.w D2, $60068.l" the speaker's screen y for show_balloon
param show_balloon_beside d2 screen_y
# 030210 "move.w D3, $6006a.l" the balloon's line in balloon_records for show_balloon
param show_balloon_beside d3 line
# 0301EE "moveq #$20, D4" the tile bank bits for show_balloon, 0x20 for a narrow balloon
param show_balloon_beside d4 bank
# 030204 "move.w D0, $60066.l" 03027E "jsr $91a4.l" the side of the balloon: non-zero on the right of the speaker
param show_balloon d0 on_right
# 030222 "move.w $60066.l, D0" the side of the balloon, kept in scratch_word while the old balloon is erased
local show_balloon 030222 d0 on_right
# 03028A "cmpi.w #$130, D1" the speaker's screen x, the balloon's column worked out from it
param show_balloon d1 screen_x
# 030292 "moveq #$50, D1" 0302A0 "lsr.w #2, D1" 0302AE "moveq #$18, D1" 0302BC "lsr.w #2, D1" the balloon's column in the tile RAM's row: on the speaker's side, kept within the screen
local show_balloon 030292,0302A0,0302AE,0302BC d1 column_place
# 0302E2 "addi.l #$100000, D1" the balloon's place in the tile RAM, kept in balloon_place
local show_balloon 0302E2 d1 tile_place
# 03020A "move.w D2, $60068.l" the speaker's screen y, the balloon's row worked out from it
param show_balloon d2 screen_y
# 030228 "move.w $60068.l, D2" the speaker's screen y, kept in balloon_kept_y while the old balloon is erased
local show_balloon 030228 d2 screen_y
# 0302C6 "move.w #$400, D2" 0302D8 "lsl.w #4, D2" the balloon's row in the tile RAM, above the speaker
local show_balloon 0302C6,0302D8 d2 row_place
# 0302F4 "move.b D4, D2" the attribute of the balloon's tiles, for draw_balloon_rows
local show_balloon 0302F4 d2 tile_attribute
# 030210 "move.w D3, $6006a.l" 030266 "move.b (A6,D3.w), D7" the balloon's line: its record in balloon_records
param show_balloon d3 line
# 03022E "move.w $6006a.l, D3" the balloon's line, kept in balloon_kept_line while the old balloon is erased
local show_balloon 03022E d3 line
# 03027A "move.b ($1,A6,D3.w), D3" the code of the balloon's first row's first tile, from its record
local show_balloon 03027A d3 first_row_tile
# 030216 "move.w D4, $6006c.l" 030244 "or.b D4, D5" the tile bank bits put in tile_banks_2_3 for the balloon's tiles
param show_balloon d4 bank
# 030234 "move.w $6006c.l, D4" the tile bank bits, kept in balloon_kept_bank while the old balloon is erased
local show_balloon 030234 d4 bank
# 03026A "move.b ($2,A6,D3.w), D4" the attribute of the balloon's tiles, from its record
local show_balloon 03026A d4 record_attribute
# 0302F6 "move.b D3, D4" 0302FC "addi.b #$10, D4" the code of the second row's first tile, 0x10 after the first row's
local show_balloon 0302F6,0302FC d4 second_row_tile
# 030244 "or.b D4, D5" the new tile banks 2 and 3, with the balloon's bank
local show_balloon 030244 d5 tile_banks
# 030300 "addi.b #$20, D5" the code of the third row's first tile, 0x20 after the first row's
local show_balloon 030300 d5 third_row_tile
# 03026E "move.b ($3,A6,D3.w), D6" 0302F0 "move.w D6, D7" the balloon's width in tiles, from its record: the count for draw_balloon_rows
local show_balloon 03026E d6 width
# 0302FA "move.b D3, D6" 030304 "addi.b #$30, D6" the code of the fourth row's first tile, 0x30 after the first row's
local show_balloon 0302FA,030304 d6 fourth_row_tile
# 03030C "movea.l $633f8.l, A6" the balloon's place in the tile RAM (balloon_place), for draw_balloon_rows
local erase_balloon 03030C a6 tile_place
# 030312 "moveq #-$1, D0" 0xFF for draw_balloon_rows: the same tile in every column
local erase_balloon 030312 d0 erasing
# 030316 "clr.b D2" the attribute of the blank tiles (0)
local erase_balloon 030316 d2 tile_attribute
# 030318 "moveq #$10, D3" the code of the blank tile (0x10, the space) for the first row
local erase_balloon 030318 d3 first_row_tile
# 03031A "move.b D3, D4" the code of the blank tile for the second row
local erase_balloon 03031A d4 second_row_tile
# 03031C "move.b D3, D5" the code of the blank tile for the third row
local erase_balloon 03031C d5 third_row_tile
# 03031E "move.b D3, D6" the code of the blank tile for the fourth row
local erase_balloon 03031E d6 fourth_row_tile
# 03033C "tst.b D0" 0xFF when the balloon is erased (the same tile across), else the codes step one a column
param draw_balloon_rows d0 erasing
# 030320 "move.b D2, ($80,A6)" 030324 "move.b D2, ($100,A6)" the attribute byte written to the four rows
param draw_balloon_rows d2 tile_attribute
# 03033A "move.b D3, (A6)+" the code of the first row's tile, one more a column
param draw_balloon_rows d3 first_row_tile
# 030342 "addq.b #1, D3" the next column's code in the first row
local draw_balloon_rows 030342 d3 first_row_tile
# 03032E "move.b D4, ($80,A6)" the code of the second row's tile, one more a column
param draw_balloon_rows d4 second_row_tile
# 030344 "addq.b #1, D4" the next column's code in the second row
local draw_balloon_rows 030344 d4 second_row_tile
# 030332 "move.b D5, ($100,A6)" the code of the third row's tile, one more a column
param draw_balloon_rows d5 third_row_tile
# 030346 "addq.b #1, D5" the next column's code in the third row
local draw_balloon_rows 030346 d5 third_row_tile
# 030336 "move.b D6, ($180,A6)" the code of the fourth row's tile, one more a column
param draw_balloon_rows d6 fourth_row_tile
# 030348 "addq.b #1, D6" the next column's code in the fourth row
local draw_balloon_rows 030348 d6 fourth_row_tile
# 030320 "move.b D2, ($80,A6)" 03032C "move.b D2, (A6)+" the balloon's place in the tile RAM, one column on at a time
param draw_balloon_rows a6 tile_place
# 03032C "move.b D2, (A6)+" 03033A "move.b D3, (A6)+" the place of the next byte of the first row
local draw_balloon_rows 03032C,03033A a6 tile_place

# ---- video/texts.c ----
# 001EB2 "lsl.w #2, D7" the job's parameter: the text's number in demo_texts (with bit 7 to erase it)
param print_demo_text d7 text_number
# 001E98 "lea $30ae.l, A6" the table of the demo's texts, for print_table_text
local print_demo_text 001E98 a6 texts
# 001EB2 "lsl.w #2, D7" the job's parameter: the text's number in test_mode_texts (with bit 7 to erase it)
param print_test_text d7 text_number
# 001EA2 "lea $5e1e.l, A6" the table of the test mode's texts, for print_table_text
local print_test_text 001EA2 a6 texts
# 001EB2 "lsl.w #2, D7" the job's parameter: the text's number in game_texts (with bit 7 to erase it)
param print_game_text d7 text_number
# 001EAC "lea $292a.l, A6" the table of the game's texts, for print_table_text
local print_game_text 001EAC a6 texts
# 001EB2 "lsl.w #2, D7" 001EB4 "btst #$9, D7" the text's number in the table; with bit 7 (0x200 once times 4) the text is erased
param print_table_text d7 text_number
# 001EB2 "lsl.w #2, D7" 001EBC "movea.l (A6,D7.w), A6" the text's number times 4, its entry in the table
local print_table_text 001EB2 d7 text_offset
# 001EBC "movea.l (A6,D7.w), A6" the table of texts
param print_table_text a6 texts text_pointer
# 001EBC "movea.l (A6,D7.w), A6" 001EC6 "movea.l (A6)+, A4" 001EC8 "move.b (A6)+, D6" the text: a place in the fixed layer, then its characters to '/' or '?'
local print_table_text 001EBC,001EC6,001EC8,001EE8,001EF2,001EF4 a6 text text
# 001EC6 "movea.l (A6)+, A4" 001EDC "move.b D7, (A4)+" 001EDE "move.b D6, (A4)+" the place in the fixed layer of the next character
# type: the K052109's tile RAM (100000-107FFF), the text's place, the first long of its record: 001EC6 "movea.l (A6)+, A4"
local print_table_text 001EC6,001EDC,001EDE,001EF2,001F02,001F04 a4 tile_place io
# 001EC8 "move.b (A6)+, D6" 001EF4 "move.b (A6)+, D6" the text's next character: '/' a new place, '?' the end
local print_table_text 001EC8,001EF4 d6 character
# 001EC0 "move.b $6007a.l, D7" 001EDC "move.b D7, (A4)+" the attribute written with each character, text_colour
local print_table_text 001EC0,001EEC d7 colour
# 001F10 "move.b (A6,D7.w), $6007a.l" the colour's number in text_colours
param set_text_colour d7 colour_number
# 001F30 "move.b (A6,D7.w), $6007b.l" the colour's number in text_colours
param set_spare_text_colour d7 colour_number
# 001F44 "move.l D7, D4" 001F46 "btst #$0, D4" the players who get the point, a bit each
param add_point d7 players
# 001F44 "move.l D7, D4" 001F46 "btst #$0, D4" the players who get the point, a bit each, then whose scores are drawn
local add_point 001F44 d4 scored_players
# 001F4E "lea $60106.l, A4" 001F60 "lea $6010e.l, A4" the end of the player's score, which add_point_to_score adds to from its last byte
local add_point 001F4E,001F60,001F72,001F84 a4 score_end
# 001FA0 "abcd -(A5), -(A4)" the end of the player's score
# type: the byte past a player's score (add_point: 001F4E "lea $60106.l, A4"), whose two bytes it adds to (001FA0 "abcd -(A5), -(A4)")
param add_point_to_score a4 score_end bcd_pair
# 001FA0 "abcd -(A5), -(A4)" 001FA6 "move.w (A4), D7" the byte of the score the point is added to, then the score's start
# type: a byte of the player's score: 001FA0 "abcd -(A5), -(A4)"
local add_point_to_score 001FA0 a4 score_byte bcd_pair
# 001FA8 "lea $60076.l, A6" the top score, which the player's score is kept in when higher
local add_point_to_score 001FA8 a6 top_score_place
# 001FA6 "move.w (A4), D7" the player's score, against the top score
local add_point_to_score 001FA6 d7 score
# 001FB8 "btst #$0, D4" 001FC4 "btst #$1, D4" the players whose scores are drawn, a bit each
param draw_scores d4 players
# 001FF0 "lea $1001a4.l, A4" the place in the fixed layer of the first player's score
local draw_score_player_1 001FF0 a4 tile_place
# 001FEA "lea $60104.l, A6" the first player's score (BCD), for draw_score_digits
local draw_score_player_1 001FEA a6 score
# 001FFE "lea $1001b6.l, A4" the place in the fixed layer of the second player's score
local draw_score_player_2 001FFE a4 tile_place
# 001FF8 "lea $6010c.l, A6" the second player's score (BCD), for draw_score_digits
local draw_score_player_2 001FF8 a6 score
# 00200C "lea $1001c8.l, A4" the place in the fixed layer of the third player's score
local draw_score_player_3 00200C a4 tile_place
# 002006 "lea $60114.l, A6" the third player's score (BCD), for draw_score_digits
local draw_score_player_3 002006 a6 score
# 00201A "lea $1001da.l, A4" the place in the fixed layer of the fourth player's score
local draw_score_player_4 00201A a4 tile_place
# 002014 "lea $6011c.l, A6" the fourth player's score (BCD), for draw_score_digits
local draw_score_player_4 002014 a6 score
# 002028 "lea $1001c2.l, A4" the place in the fixed layer of the top score
local draw_top_score 002028 a4 tile_place
# 002022 "lea $60076.l, A6" the top score (BCD), for draw_score_digits
local draw_top_score 002022 a6 score
# 00203A "bsr $208c" the place in the fixed layer of the score's first digit
param draw_score_digits a4 tile_place
# 002032 "move.b (A6), D6" 00203E "move.b (A6), D6" the score, four BCD digits in two bytes
# type: a score's first byte, a player's or top_score (draw_score_player_1: 001FEA "lea $60104.l, A6"; draw_top_score: 002022 "lea $60076.l, A6"): 002032 "move.b (A6), D6" 00204C "move.b ($1,A6), D6"
param draw_score_digits a6 score bcd_pair
# 00203A "bsr $208c" 00206A "bsr $2090" the place of the next digit that draw_digit hands back
local draw_score_digits 00203A,002048,002056,00206A,002074,00207E,00208A a4 tile_place
# 002068 "lsr.b #4, D6" 002070 "andi.b #$f, D6" the score's next digit for draw_digit
local draw_score_digits 002068,002070,00207C,002086 d6 digit
# 00208C "move.b #$10, D6" the place in the fixed layer of the digit
param draw_blank_digit a4 tile_place
# 00208C "move.b #$10, D6" the blank tile (0x10) drawn as the digit
local draw_blank_digit 00208C d6 digit
# 002094 "move.b D6, (A4)+" the digit's tile code
param draw_digit d6 digit
# 002090 "move.b #$0, (A4)+" 002094 "move.b D6, (A4)+" the place in the fixed layer of the digit
param draw_digit a4 tile_place
# 002090 "move.b #$0, (A4)+" 002094 "move.b D6, (A4)+" the place of the digit's code, then of the next digit
local draw_digit 002090,002094 a4 tile_place
# 002098 "btst #$0, D7" 0020A4 "btst #$1, D7" the scores cleared, a bit each, with bit 4 for the top score
param clear_scores d7 players
# 0020E2 "move.b #$0, (A4)+" the place in the fixed layer of the text's first character
param print_plain_text a4 tile_place
# 0020E2 "move.b #$0, (A4)+" 0020E6 "move.b D6, (A4)+" the place in the fixed layer of the next character
local print_plain_text 0020E2,0020E6 a4 tile_place
# 0020D6 "move.b (A5)+, D6" the text's characters, to '?'
param print_plain_text a5 text text
# 0020D6 "move.b (A5)+, D6" the text's next character
local print_plain_text 0020D6 a5 text text
# 0020D6 "move.b (A5)+, D6" the text's next character
local print_plain_text 0020D6 d6 character
# 002102 "btst #$0, D7" 00210A "btst #$1, D7" the labels to draw: bit 0 clear for 1UP to 4UP, bit 1 for the top score's
param draw_score_labels d7 which_labels
# 002132 "lea $10011c.l, A4" 002140 "lea $10012e.l, A4" the place in the fixed layer of a label
local draw_score_labels 002118,002132,002140,00214E,00215C,00216E,00217E a4 tile_place
# 00212C "lea $20ec.l, A5" 00213A "lea $20f0.l, A5" the label's text, for print_plain_text
local draw_score_labels 002112,00212C,00213A,002148,002156,002168,002178 a5 text
# 0022B0 "lsl.w #2, D7" 0022B2 "btst #$9, D7" the text's number in colour_texts; with bit 7 (0x200 once times 4) the text is erased
param print_colour_text d7 text_number
# 0022B0 "lsl.w #2, D7" 0022BA "movea.l (A6,D7.w), A6" the text's number times 4, its entry in colour_texts
local print_colour_text 0022B0 d7 text_offset
# 0022BE "movea.l (A6)+, A4" 0022D4 "move.b D6, (A4)+" 0022D6 "move.b D7, (A4)+" the place in the fixed layer of the next character
# type: the K052109's tile RAM (100000-107FFF), the text's place, the first long of its record: 0022BE "movea.l (A6)+, A4"
local print_colour_text 0022BE,0022D4,0022D6,0022E4,0022F6,0022F8 a4 tile_place io
# 0022BA "movea.l (A6,D7.w), A6" 0022BE "movea.l (A6)+, A4" 0022C0 "move.b (A6)+, D6" the text: a place, its colour, then its characters to '/' or '?'
local print_colour_text 0022BA,0022BE,0022C0,0022C2,0022E0,0022E4,0022E6,0022E8 a6 text_record
# 002306 "lsl.w #2, D7" 002308 "movea.l (A6,D7.w), A6" the picture's number in tile_pictures
param draw_tile_picture d7 picture_number
# 00231A "movea.l (A6)+, A4" 002326 "move.b D7, (A4)+" 002328 "move.b D6, (A4)+" the place in the tile RAM of the row's next tile
# type: the K052109's tile RAM (100000-107FFF), the row's place, a long of the picture's record: 00231A "movea.l (A6)+, A4"
local draw_tile_picture 00231A,002326,002328 a4 tile_place io
# 002314 "lea (A6,D7.w), A5" 002324 "move.b (A5)+, D6" the picture's tile codes, after its rows' records
local draw_tile_picture 002314,002324 a5 codes
# 002308 "movea.l (A6,D7.w), A6" 00230C "move.w (A6)+, D3" 00231A "movea.l (A6)+, A4" the picture: its count of rows, then each row's place, width and attribute
local draw_tile_picture 002308,00230C,00231A,00231E,002322 a6 picture
# 002338 "btst D6, D7" 00234A "btst #$7, D7" the boxes to draw: the players in bits 0-3, the parts in bits 4-7 (lives, health, frame, scores off)
param draw_player_boxes d7 box_flags
# 002336 "moveq #$0, D6" 002342 "addq.b #1, D6" the player whose box is drawn, 0 to 3
local draw_player_boxes 002336,002342 d6 player
# 00235C "move.b D7, D4" 00235E "andi.b #$1f, D4" the players whose scores are drawn, for draw_scores
local draw_player_boxes 00235C,00235E d4 players
# 00236E "move.w D6, D5" the player, 0 to 3
param draw_player_box d6 player
# 002372 "btst #$6, D7" 002382 "btst #$4, D7" the parts of the box to draw (bits 4-7)
param draw_player_box d7 box_flags
# 00237A "movea.l (A6,D5.w), A5" 00238A "movea.l ($8,A6,D5.w), A5" 00239A "movea.l ($c,A6,D5.w), A5" the place in the fixed layer of the part drawn: the frame, the lives, the health bar
local draw_player_box 00237A,00238A,00239A a5 part_place
# 002368 "movea.l #$32c2, A6" player_box_places: the places of the boxes' parts, 16 bytes a player
local draw_player_box 002368 a6 box_places
# 002370 "lsl.w #4, D5" the player times 16, his entry in player_box_places
local draw_player_box 002370 d5 box_offset
# 0023A4 "bsr $24a6" 0023A8 "bsr $2546" the player's colour that player_box_colour gives, for the frame and the label
local draw_box_frame_and_label 0023A4 d0 colour
# 0023AC "bsr $2584" the player times 16, his entry in player_box_places
param draw_box_frame_and_label d5 box_offset
# 0023A4 "bsr $24a6" the player, 0 to 3
param draw_box_frame_and_label d6 player
# 0023A8 "bsr $2546" the parts of the box to draw (bits 4-7)
param draw_box_frame_and_label d7 box_flags
# 0023A8 "bsr $2546" the place in the fixed layer of the box's frame
param draw_box_frame_and_label a5 part_place
# 0023AC "bsr $2584" player_box_places, for the label's place
param draw_box_frame_and_label a6 box_places
# 0023C8 "move.w D6, D4" the player, 0 to 3
param draw_lives d6 player
# 0023BA "btst #$7, D7" the parts of the box (bit 7: the digits only cleared)
param draw_lives d7 box_flags
# 0023E0 "move.b D0, ($4,A5)" 0023E4 "move.b D0, ($84,A5)" the place in the fixed layer of the lives
# type: the K052109's tile RAM (100000-107FFF), a part of a player's box: 00237A "movea.l (A6,D5.w), A5" (player_box_places)
param draw_lives a5 part_place io
# 0023B2 "bsr $24a6" 0023E0 "move.b D0, ($4,A5)" the player's colour that player_box_colour gives
local draw_lives 0023B2 d0 colour
# 0023C8 "move.w D6, D4" 0023CA "lsl.w #3, D4" the player times 8, his record in players
local draw_lives 0023C8,0023CA d4 player_offset
# 0023CC "move.w (A4,D4.w), D4" the player's lives (BCD), from his record
local draw_lives 0023CC d4 lives
# 0023D8 "move.b D4, D3" 0023DE "lsl.w #1, D3" the units digit of the lives times 2, its entry in lives_digit_top and lives_digit_bottom
local draw_lives 0023D8,0023DE d3 units_offset
# 0023FC "move.b D4, D3" 002402 "lsr.w #3, D3" the tens digit of the lives times 2, its entry in lives_icon_top and lives_icon_bottom
local draw_lives 0023FC,002402 d3 tens_offset
# 002442 "lsr.w #7, D3" the hundreds digit of the lives times 2, its entry in the icon's tiles
local draw_lives 002442 d3 hundreds_offset
# 002470 "move.w D6, D4" the player, 0 to 3
param draw_health_bar d6 player
# 002462 "btst #$7, D7" the parts of the box (bit 7: the bar only cleared)
param draw_health_bar d7 box_flags
# 00248A "move.b D0, ($0,A5)" 00248E "move.b D0, ($80,A5)" the place in the fixed layer of the health bar
# type: the K052109's tile RAM (100000-107FFF), a part of a player's box: 00238A "movea.l ($8,A6,D5.w), A5" (player_box_places)
param draw_health_bar a5 part_place io
# 00249C "adda.w #$2, A5" the place of the bar's next column
# type: the K052109's tile RAM (100000-107FFF): 00249C "adda.w #$2, A5"
local draw_health_bar 00249C a5 part_place io
# 00245A "bsr $24a6" 00248A "move.b D0, ($0,A5)" the player's colour that player_box_colour gives
local draw_health_bar 00245A d0 colour
# 0024AC "move.b ($1,A4,D6.w), D0" the player, 0 to 3
param player_box_colour d6 player
# 0024AC "move.b ($1,A4,D6.w), D0" 0024B0 "ori.b #$1, D0" the player's colour from text_colours, with bit 0
local player_box_colour 0024AC,0024B0 d0 colour
# 0024B6 "move.b D0, (A5)" 0024B8 "move.b D0, ($2,A5)" the player's colour, the attribute of the blank tiles
param clear_lives_digits d0 colour
# 0024B6 "move.b D0, (A5)" 0024B8 "move.b D0, ($2,A5)" the place in the fixed layer of the lives
# type: the K052109's tile RAM (100000-107FFF), a part of a player's box (player_box_places): 00237A "movea.l (A6,D5.w), A5"
param clear_lives_digits a5 part_place io
# 002508 "move.b D0, (A5,D4.w)" 002516 "move.b D0, (A5,D4.w)" the player's colour, the attribute of the blank tiles
param clear_health_bar d0 colour
# 002508 "move.b D0, (A5,D4.w)" 00250C "move.b #$5e, ($1,A5,D4.w)" the place in the fixed layer of the health bar
# type: the K052109's tile RAM (100000-107FFF), a part of a player's box (player_box_places): 00238A "movea.l ($8,A6,D5.w), A5"
param clear_health_bar a5 part_place io
# 002506 "moveq #$0, D4" 002512 "addi.w #$80, D4" 002524 "addq.b #2, D4" the offset from the bar's place of the tile written: down a row and back, a column on
local clear_health_bar 002506,002512,002520,002524,002536 d4 tile_offset
# 002576 "move.b D0, (A5,D1.w)" the player's colour, the attribute of the frame's tiles
param draw_box_frame d0 colour
# 00256A "btst #$7, D7" the parts of the box (bit 7: the frame blank)
param draw_box_frame d7 box_flags
# 002576 "move.b D0, (A5,D1.w)" the place in the fixed layer of the frame
# type: the K052109's tile RAM (100000-107FFF), a player's box frame (player_box_places): 00239A "movea.l ($c,A6,D5.w), A5"
param draw_box_frame a5 part_place io
# 002560 "adda.l #$80, A5" the place of the frame's next row
# type: the K052109's tile RAM (100000-107FFF): 002560 "adda.l #$80, A5"
local draw_box_frame 002560 a5 part_place io
# 00254C "moveq #$0, D1" 002566 "moveq #$0, D1" 00257E "addq.w #2, D1" the offset in the row of the frame's next tile
local draw_box_frame 00254C,002566,00257E d1 tile_offset
# 00254E "move.b (A4)+, D2" 002572 "move.b #$5e, D2" the frame's next tile code from box_frame_tiles, or the blank 0x5E
local draw_box_frame 00254E,002572 d2 tile_code
# 00259E "move.b D0, ($0,A5)" 0025A2 "move.b D0, ($2,A5)" the player's colour, the attribute of the label's tiles
param draw_box_label d0 colour
# 00258C "movea.l ($4,A6,D5.w), A5" the player times 16, his entry in player_box_places
param draw_box_label d5 box_offset
# 002596 "move.w D6, D4" the player, 0 to 3
param draw_box_label d6 player
# 002584 "btst #$7, D7" the parts of the box (bit 7: no label)
param draw_box_label d7 box_flags
# 00258C "movea.l ($4,A6,D5.w), A5" player_box_places
# type: player_box_places, which its callers hand it (002368 "movea.l #$32c2, A6"), its places read through it (00258C "movea.l ($4,A6,D5.w), A5")
param draw_box_label a6 box_places box_part_place
# 002596 "move.w D6, D4" 002598 "lsl.w #2, D4" the player times 4, his entry in box_labels
local draw_box_label 002596,002598 d4 label_offset
# 00258C "movea.l ($4,A6,D5.w), A5" the place in the fixed layer of the label
# type: the K052109's tile RAM (100000-107FFF): 00258C "movea.l ($4,A6,D5.w), A5" (player_box_places)
local draw_box_label 00258C a5 label_place io
# 00259A "movea.l (A4,D4.w), A4" the label's four tile codes, 1UP to 4UP
local draw_box_label 00259A a4 label
# 0025CE "lea $100138.l, A5" 0025EC "adda.l #$80, A5" the place in the fixed layer of the frame's row
# type: the K052109's tile RAM (100000-107FFF): 0025CE "lea $100138.l, A5"
local draw_box_frame_by_rows 0025CE,0025EC a5 part_place io
# 0025D4 "move.b #$61, D0" the attribute of the frame's tiles
local draw_box_frame_by_rows 0025D4 d0 colour
# 0025D8 "moveq #$0, D1" 0025F2 "moveq #$0, D1" 0025FE "addq.w #2, D1" the offset in the row of the frame's next tile
local draw_box_frame_by_rows 0025D8,0025F2,0025FE d1 tile_offset
# 00261E "movea.l (A6)+, A4" 002634 "move.b D7, (A4)+" 002636 "move.b D6, (A4)+" the place in the fixed layer of the next character
# type: the K052109's tile RAM (100000-107FFF), the title's place, the first long of its record: 00261E "movea.l (A6)+, A4"
local print_stage_title 00261E,002634,002636 a4 tile_place io
# 002614 "movea.l (A6,D7.w), A6" 00261E "movea.l (A6)+, A4" 002620 "move.b (A6)+, D6" the stage's title: a place, then its characters to '/' or '?'
local print_stage_title 002614,00261E,002620 a6 text_record
# 002618 "move.b $6007a.l, D7" 002634 "move.b D7, (A4)+" the attribute written with each character, text_colour
local print_stage_title 002618 d7 colour
# 002642 "move.w D7, D6" 00266A "move.b D7, D6" the job's parameter: the player in bits 0-1, the message times 4 in bits 2-5
param draw_player_message d7 player_message
# 002644 "andi.w #$3, D6" the player whose message it is, 0 to 3
local draw_player_message 002644 d6 player_number
# 00266A "move.b D7, D6" 00266C "andi.b #$3c, D6" the message times 4, the case that runs
local draw_player_message 00266A,00266C d6 message_offset
# 00269A "bsr $275e" the job's parameter for print_text_at: the player in bits 0-1
param message_insert_coin d7 player_message
# 0026DE "bsr $275e" the job's parameter for print_text_at: the player in bits 0-1
param message_press_start d7 player_message
# 0026B4 "move.b $600a5.l, D6" 0026BA "andi.b #$f, D6" frame_count's low four bits: the text is redrawn when 0
local message_press_start 0026B4,0026BA d6 blink_phase
# 0026C2 "moveq #$2, D6" 0026CE "moveq #$8, D6" 0026DC "addq.b #1, D6" the text for print_text_at: PRESS START, or its blank when the game hides it, one more on alternate blinks
local message_press_start 0026C2,0026CE,0026DC d6 text_number
# 00273A "andi.b #$3, D7" the job's parameter: the player in bits 0-1
param message_out_of_lives d7 player_message
# 0026F8 "move.b $600a5.l, D6" 0026FE "andi.b #$7, D6" frame_count's low three bits: the head is redrawn when 0
local message_out_of_lives 0026F8,0026FE d6 blink_phase
# 002714 "add.b D5, D6" the head's frame for print_text_at, 4 to 7 by frame_count
local message_out_of_lives 002714 d6 text_number
# 002720 "andi.b #$18, D5" frame_count's bits 3-4: the message is counted on when 0
local message_out_of_lives 002720 d5 frame_phase
# 00273A "andi.b #$3, D7" 00273E "bclr D7, $600b3.l" the player, whose bit in players_out_of_lives is cleared
local message_out_of_lives 00273A d7 player_number
# 002758 "bsr $275e" the job's parameter for print_text_at: the player in bits 0-1
param message_clear d7 player_message
# 002770 "move.b D7, D4" the job's parameter: its bits 0-1 pick the layer's place in text_layer_places
param print_text_at d7 player_message
# 002764 "lsl.w #2, D6" 002766 "movea.l (A5,D6.w), A5" the text's number in positioned_texts
param print_text_at d6 text_number
# 002778 "movea.l (A4,D4.w), A4" the place in the tile RAM text_layer_places gives
# type: the K052109's tile RAM (100000-107FFF): 002778 "movea.l (A4,D4.w), A4" from text_layer_places (0x10021C...)
local print_text_at 002778 a4 layer_place io
# 002766 "movea.l (A5,D6.w), A5" 002782 "move.w (A5)+, D6" 002784 "move.b (A5)+, D5" the text: an offset, then its characters to '/' or '?'
local print_text_at 002766,002782,002784 a5 text text
# 002776 "lsl.w #2, D4" the player times 4, his entry in text_layer_places
local print_text_at 002776 d4 place_offset
# 00277C "move.b $6007a.l, D4" the attribute written with each character, text_colour
local print_text_at 00277C d4 colour
# 002784 "move.b (A5)+, D5" the text's next character: '/' a new offset, '?' the end
local print_text_at 002784 d5 character
# 002782 "move.w (A5)+, D6" 00279C "addq.w #2, D6" the offset from the layer's place of the next character
local print_text_at 002782,00279C d6 text_place
# 0027C4 "andi.w #$1f, D7" 0027C8 "mulu.w #$24, D7" the big character's number in big_font (low five bits)
param draw_big_character d7 character
# 0027B2 "movea.l $2802.l, A4" 0027E2 "move.b D7, (A4)+" 0027E4 "move.b (A6,D6.w), (A4)+" the place in the tile RAM of the next tile, from big_font_place
# type: the K052109's tile RAM (100000-107FFF): 0027B2 "movea.l $2802.l, A4" (big_font_place, 0x1006B8)
local draw_big_character 0027B2,0027E2,0027E4,0027EE,0027F0,0027F8 a4 tile_place io
# 0027DE "andi.w #$f, D6" 0027EA "andi.w #$f, D6" four bits of the character's pattern: which of big_font_tiles draws them
local draw_big_character 0027DE,0027EA d6 pattern_bits
# 0027D4 "moveq #$0, D7" 0 for big_character_colour
local draw_big_character 0027D4 d7 colour_number
# 0027D6 "bsr $280c" 0027E2 "move.b D7, (A4)+" the colour big_character_colour gives, the attribute of the tiles
local draw_big_character 0027D6 d7 colour
# 002812 "move.b (A3,D7.w), D7" the colour's number in text_colours
param big_character_colour d7 colour_number
# 002812 "move.b (A3,D7.w), D7" the colour from text_colours
local big_character_colour 002812 d7 colour
# 002824 "btst #$7, D7" 00282C "andi.w #$3f, D7" the text's number in tall_texts; with bit 7 the text is erased
param print_tall_text d7 text_number
# 002836 "movea.l (A6)+, A4" 0028EE "movea.l (A6)+, A4" the place in the tile RAM of the next character, as draw_tall_character hands it back
local print_tall_text 002836,00285A,0028EE,002902 a4 tile_place
# 00281E "lea $2884.l, A5" the big font's tiles, two per character, for draw_tall_character
local print_tall_text 00281E a5 font_tiles
# 002832 "movea.l (A6,D7.w), A6" 002836 "movea.l (A6)+, A4" 00283A "move.b (A6)+, D4" the text: a place, its colour, then its characters to '/' or '?'
local print_tall_text 002832,002836,00283A,002842,0028EA,0028F0,0028F2 a6 text
# 00283A "move.b (A6)+, D4" the text's colour number, for tall_text_colour
local print_tall_text 00283A d4 colour_number
# 00283C "bsr $291e" the colour tall_text_colour gives, for draw_tall_character
local print_tall_text 00283C d4 colour
# 0028F2 "move.b (A6)+, D6" the text's next character when it is erased
local print_tall_text 0028F2 d6 character
# 002842 "move.b (A6)+, D6" 002856 "andi.w #$ff, D6" the text's next character, less '0' for draw_tall_character
local print_tall_text 002842,002856 d6 character
# 00286C "move.b D4, ($80,A4)" 002876 "move.b D4, (A4)+" the text's colour, the attribute of the character's tiles
param draw_tall_character d4 colour
# 002862 "cmpi.b #-$2, D6" the character, 0xFE a space
param draw_tall_character d6 character
# 00286A "lsl.w #1, D6" the character times 2, its tiles in the big font's tiles
local draw_tall_character 00286A d6 character_offset
# 00286C "move.b D4, ($80,A4)" the place in the tile RAM of the character
# type: the K052109's tile RAM (100000-107FFF), where its callers draw: 002876 "move.b D4, (A4)+"
param draw_tall_character a4 tile_place io
# 002876 "move.b D4, (A4)+" 002878 "move.b (A5,D6.w), (A4)+" 00287E "lea ($2,A4), A4" the place of the next character
# type: the K052109's tile RAM (100000-107FFF): 002876 "move.b D4, (A4)+"
local draw_tall_character 002876,002878,00287E a4 tile_place io
# 002870 "move.b ($1,A5,D6.w), ($81,A4)" 002878 "move.b (A5,D6.w), (A4)+" the big font's tiles, two per character
# type: a font's tiles, two a character: 002870 "move.b ($1,A5,D6.w), ($81,A4)"
param draw_tall_character a5 font_tiles font_tile
# 002908 "move.b #$0, ($80,A4)" 00290E "move.b #$10, ($81,A4)" the place in the tile RAM of the character
# type: the K052109's tile RAM (100000-107FFF), where its callers erase: 002914 "move.b #$0, (A4)+"
param erase_tall_character a4 tile_place io
# 002914 "move.b #$0, (A4)+" 002918 "move.b #$10, (A4)+" the place of the next character
# type: the K052109's tile RAM (100000-107FFF): 002914 "move.b #$0, (A4)+"
local erase_tall_character 002914,002918 a4 tile_place io
# 002924 "move.b (A3,D4.w), D4" the colour's number in text_colours
param tall_text_colour d4 colour_number
# 002924 "move.b (A3,D4.w), D4" the colour from text_colours
local tall_text_colour 002924 d4 colour

# ---- system/frame.c ----
# 003C5A "lea $60300.l, A0" 003C6C "adda.l #$8, A0" the coin slot whose coin is counted, eight bytes a slot
local update_coins 003C5A,003C6C a0 counted_slot
# 003BF0 "bsr $3bfe" 003BF4 "move.b D0, $60325.l" the coin switches just pressed that new_coin_presses gives, kept in new_coin_switches
local update_coins 003BF0 d0 presses
# 003C54 "move.b $60325.l, D0" 003C62 "lsr.b #1, D0" the coin switches just pressed, one slot's bit after another
local update_coins 003C54,003C62 d0 coin_presses
# 003C7C "lsr.b #4, D0" 003C86 "lsr.b #1, D0" the service switches just pressed (bits 4-7), each a credit for its slot
local update_coins 003C7C,003C86 d0 service_presses
# 003B6E "ori.b #$1, D7" 003BE0 "andi.b #$fe, D7" board_control with the coin counter's bit, on while a pulse goes out
local update_coins 003B6E,003BE0 d7 control
# 003BFE "move.b $60044.l, D0" 003C0A "not.b D0" 003C0C "and.b $60046.l, D0" the coin switches down now or last frame but not two frames ago: just pressed
local new_coin_presses 003BFE,003C04,003C0A,003C0C d0 presses
# 003C2E "move.b #$ff, D7" 003C36 "move.b #$86, D7" 003C4A "move.b #$86, D7" the commands for queue_sound_command: the coin's sound, after stopping the sound outside a game
local new_coin_presses 003C2E,003C36,003C4A d7 command
# 003D2C "moveq #$0, D3" 003D70 "addq.b #1, D3" the coin slot (and player) whose credits are turned into lives, 0 to 3
local add_credit_lives 003D2C,003D70 d3 slot
# 003D40 "move.b $60090.l, D5" the lives a credit gives (lives_per_credit), added in BCD
local add_credit_lives 003D40 d5 credit_lives
# 003D8A "moveq #$0, D6" 003D94 "bset D7, D6" the players with lives, a bit each, kept in players_with_lives
local add_credit_lives 003D8A,003D94 d6 players
# 003D88 "moveq #$3, D7" 003D9E "dbra D7, $3d8c" the player whose lives are looked at, 3 down to 0
local add_credit_lives 003D88,003D9E d7 player_number
# 003DAA "lea $10011a.l, A0" 003DBA "lea ($80,A0), A0" the place in the fixed layer of the column's next tile
local fill_tile_column 003DAA,003DBA a0 tile_place
# 003DB6 "move.b D0, ($1,A0)" the tile code the column is set to
param fill_tile_column d0 tile_code
# 003EC0 "not.b D0" 003EDE "not.b D0" the player's inputs read, kept in player_inputs and against last frame's for the presses
local read_inputs 003EC0,003EDE,003EFC,003F1A d0 inputs
# 003F3C "move.w $6005c.l, D7" 003F42 "subi.w #$60, D7" 003F5E "move.w $60060.l, D7" a layer's scroll x (A, then B), less 0x60, for the tile chip's scroll registers
local read_inputs 003F3C,003F42,003F5E,003F64 d7 scroll_x
# 003F4C "lsr.w #8, D7" 003F6E "lsr.w #8, D7" the scroll x's high byte, for its other register
local read_inputs 003F4C,003F6E d7 scroll_x_high
# 003FE6 "move.w #$1, D7" the job for queue_job: job 0, parameter 1
local startup_begin 003FE6 d7 job
# 004082 "andi.b #$f7, D6" 004096 "eori.b #$8, D6" sprite_control, with its flip bit set by the DIP switch
local set_screen_flip 004082,004096 d6 control
# 00407E "andi.b #$fe, D7" 004092 "eori.b #$1, D7" tile_flip, with its flip bit set by the DIP switch
local set_screen_flip 00407E,004092 d7 flip
# 0040D8 "move.b #$0, D7" 0 for queue_sound as a game starts
local run_attract 0040D8 d7 sound
# 00416A "move.w D7, (A6)+" the job: its number in the high byte, its parameter in the low one
param queue_job d7 job
# 004164 "movea.l $60010.l, A6" 00416A "move.w D7, (A6)+" 004176 "movea.l #$60380, A6" the place in job_queue the job goes to, wrapped round
# type: a slot of job_queue: 004176 "movea.l #$60380, A6"
local queue_job 004164,00416A,004176 a6 queue_place queued_job
# 004184 "move.w (A5)+, D7" the list of jobs, to 0xFFFF
param queue_jobs a5 jobs job_word
# 004184 "move.w (A5)+, D7" the list's next job
local queue_jobs 004184 a5 jobs job_word
# 004184 "move.w (A5)+, D7" the list's next job, for queue_job
local queue_jobs 004184 d7 job
# 0041AA "lea $60034.l, A5" the players' inputs, player_inputs
local check_starts 0041AA a5 inputs
# 0041A2 "moveq #$0, D0" 0041DE "addq.b #1, D0" the player whose start is looked at, 0 to 3
local check_starts 0041A2,0041DE d0 player_number
# 0041E6 "move.b $60066.l, D1" the players who start, kept in players_in_play and players_joining
local check_starts 0041E6 d1 players
# 00421E "lea $60034.l, A5" the players' inputs, player_inputs
local check_joins 00421E a5 inputs
# 004216 "moveq #$0, D0" 00425C "addq.b #1, D0" the player whose join is looked at, 0 to 3
local check_joins 004216,00425C d0 player_number
# 004230 "move.w ($0,A6), D1" the player's lives
local check_joins 004230 d1 player_lives
# 004238 "move.b (A5,D0.w), D1" the player's inputs this frame
local check_joins 004238 d1 inputs_now
# 004244 "move.b ($4,A5,D0.w), D1" the player's inputs last frame
local check_joins 004244 d1 inputs_before
# 004264 "move.b $60066.l, D1" the players who join, added to players_in_play and players_joining
local check_joins 004264 d1 players
# 004284 "lea $60100.l, A6" the first player's record, for reset_score
local reset_player_1 004284 a6 player
# 004294 "lea $60108.l, A6" the second player's record, for reset_score
local reset_player_2 004294 a6 player
# 0042A4 "lea $60110.l, A6" the third player's record, for reset_score
local reset_player_3 0042A4 a6 player
# 0042B4 "lea $60118.l, A6" the fourth player's record, for reset_score
local reset_player_4 0042B4 a6 player
# 0042CA "move.b #$0, D7" the first player's number for use_life
local use_life_player_1 0042CA d7 player_number
# 0042DA "move.b #$1, D7" the second player's number for use_life
local use_life_player_2 0042DA d7 player_number
# 0042EA "move.b #$2, D7" the third player's number for use_life
local use_life_player_3 0042EA d7 player_number
# 0042FA "move.b #$3, D7" the fourth player's number for use_life
local use_life_player_4 0042FA d7 player_number
# 004330 "bclr D7, $600a1.l" 004336 "bset D7, $600b3.l" the player's number, his bit in players_in_play and players_out_of_lives
param use_life d7 player_number
# 00435E "move.w #$b00, D7" 004362 "add.b $600a2.l, D7" 004368 "ori.b #$30, D7" the job and boxes for draw_player_boxes: the players credited, with their lives and health
local redraw_new_lives 00435E,004362,004368 d7 box_flags
# 004382 "move.b $600a6.l, D7" the players joining, for turtle_join
local join_players 004382 d7 players
# 0043CE "move.w #$b00, D7" 0043D2 "add.b $600a6.l, D7" 0043D8 "ori.b #$30, D7" the job and boxes for draw_player_boxes: the players joining, with their lives and health
local join_players 0043CE,0043D2,0043D8 d7 box_flags
# 004432 "move.b $600a1.l, D7" 004438 "and.b $600a0.l, D7" the players in play whose turtle was knocked out, for turtle_respawn
local respawn_players 004432,004438 d7 players
# 004444 "move.w #$b00, D7" 004448 "add.b $600a0.l, D7" 00444E "ori.b #$30, D7" the job and boxes for draw_player_boxes: the players knocked out, with their lives and health
local respawn_players 004444,004448,00444E d7 box_flags
# 00446A "move.b $600b7.l, D1" 004470 "or.b $600a6.l, D1" 00447C "or.b $600a0.l, D1" the players with lives, joining, in play or knocked out, a bit each; then (004496 on) only the ones joining, in play or knocked out: one variable, since "btst D0, D1" reads the bits above the byte the "move.b" writes
local update_player_message 00446A,004470,004476,00447C d1 player_bits
# 004496 "move.b $600a6.l, D1" 00449C "or.b $600a1.l, D1" 0044A2 "or.b $600a0.l, D1" the players joining, in play or knocked out
local update_player_message 004496,00449C,0044A2 d1 player_bits
# 0044C0 "ori.b #$c, D7" 0044E2 "or.b D0, D7" 0044E4 "addi.w #$d00, D7" the job for draw_player_message: the message times 4 with the player, job 0xD
local update_player_message 0044C0,0044C8,0044D0,0044DA,0044E2,0044E4 d7 player_message
# 0044EE "ori.w #$b30, D7" the players whose boxes are drawn, made the job 0xB with the lives and health parts
param queue_player_boxes d7 box_flags
# 0044EE "ori.w #$b30, D7" the job and boxes for queue_job
local queue_player_boxes 0044EE d7 box_flags
# 004516 "movem.l D1-D7/A1, -(A0)" 00451A "movem.l D1-D7/A1, -(A0)" the end of the stretch of work RAM zeroed, 32 bytes down at a time
param zero_ram_below a0 ram_end
# 004532 "movem.l D1-D7/A1, -(A0)" the end of what is left to zero
local zero_ram_below 004532 a0 ram_end
# 00457A "lea $60200.l, A0" 004586 "lea $61100.l, A0" the end of the stretch zero_ram_below zeroes
local clear_players_and_ram 00457A,004586 a0 ram_end
# 0045BE "lea $61200.l, A0" the end of the stretch zero_ram_below zeroes
local clear_area_counters 0045BE a0 ram_end
# 0045CC "lea $61300.l, A0" the end of the stretch zero_ram_below zeroes
local clear_enemy_variables 0045CC a0 ram_end
# 0045DA "lea $61400.l, A0" the end of the stretch zero_ram_below zeroes
local clear_engine_variables 0045DA a0 ram_end
# 0045E8 "lea $61800.l, A0" the end of the stretch zero_ram_below zeroes
local clear_engine_ram 0045E8 a0 ram_end
# 0045F6 "lea $63200.l, A0" the end of the stretch zero_ram_below zeroes
local clear_spare_ram 0045F6 a0 ram_end
# 004612 "lea $140800.l, A0" the end of the sprite RAM zero_ram_below zeroes
local clear_sprite_ram 004612 a0 ram_end
# 004620 "lea $62000.l, A0" 004672 "movem.l D1-D7/A1, -(A0)" the end of the stretch zeroed, 32 bytes down at a time
local zero_ram_below_object_0 004620,004672 a0 ram_end
# 00462E "lea $623c0.l, A0" 004672 "movem.l D1-D7/A1, -(A0)" the end of the stretch zeroed, 32 bytes down at a time
local zero_ram_below_object_12 00462E,004672 a0 ram_end
# 00463C "lea $62780.l, A0" 004672 "movem.l D1-D7/A1, -(A0)" the end of the stretch zeroed, 32 bytes down at a time
local zero_ram_below_object_24 00463C,004672 a0 ram_end
# 00464A "lea $62140.l, A0" 004672 "movem.l D1-D7/A1, -(A0)" the end of the stretch zeroed, 32 bytes down at a time
local zero_ram_below_object_4 00464A,004672 a0 ram_end
# 004658 "lea $62a00.l, A0" 004672 "movem.l D1-D7/A1, -(A0)" the end of the stretch zeroed, 32 bytes down at a time
local zero_ram_below_object_32 004658,004672 a0 ram_end

# ---- objects/scenery.c ----
# 00F90C "lea $62140.l, A6" 00F918 "jsr $1830c.l" the object for the ball, from object 4 on: the first free one find_free_object finds
local ball_dropper_wait 00F90C,00F918 a6 ball
# 00F8FA "move.b ($2f,A0), D7" 00F8FE "lsl.w #1, D7" the balls left times 2, the dropper's entry in ball_drop_waits
local ball_dropper_wait 00F8FA,00F8FE d7 wait_offset
# 00FBEE "lea $62140.l, A6" 00FBFA "jsr $1830c.l" the object for the jet of water, from object 4 on: the first free one find_free_object finds
local hydrant_spray 00FBEE,00FBFA a6 water
# 00FBF4 "move.b #$8, D7" 00FBFA "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local hydrant_spray 00FBF4,00FBF8,00FBFA d7 objects_left
# 00FC00 "tst.b D7" what find_free_object left: no room for the jet when 0
param hydrant_spray_jet d7 objects_left
# 00FCE8 "move.w #$2000, D7" 00FCF8 "ext.l D7" how far across from the hydrant the jet starts, the other way for the second spray
local hydrant_start_water 00FCE8,00FCF8 d7 water_offset
# 00FD80 "move.b ($2f,A0), D7" 00FD84 "andi.b #$3, D7" which jet of the spray it is (low two bits)
local hydrant_water_start 00FD80,00FD84 d7 jet
# 00FD88 "lsl.w #2, D7" the jet times 4, its entry in hydrant_water_animations
local hydrant_water_start 00FD88 d7 jet_offset
# 00FD94 "move.b #$e, D7" the jet's sound for queue_sound
local hydrant_water_start 00FD94 d7 sound
# 00FE5E "lea $1456a.l, A6" the sign's animations, for roadside_knock_away
local roadside_speed_sign_struck 00FE5E a6 animations
# 00FE6E "lea $15af6.l, A6" the cone's animations, for roadside_knock_away
local roadside_cone_struck 00FE6E a6 animations
# 00FE7E "lea $1452a.l, A6" the meter's animations, for roadside_knock_away
local roadside_parking_meter_struck 00FE7E a6 animations
# 00FEAA "movea.l ($4,A6), A6" the thing's animations; the second is the one it flies in
param roadside_knock_away a6 animations animation_entry
# 00FF70 "move.w ($1e,A0), D7" 00FF74 "sub.w D7, ($10,A0)" the rat's height speed, taken off its height
local rat_drop 00FF70 d7 height_speed
# 00FFFA "move.w #$8, D7" the range for random_below, 8
local rat_random_run_time 00FFFA d7 range
# 00FFFE "jsr $48448.l" 01000A "move.b (A6,D7.w), ($30,A0)" what random_below gives: the rat's entry in rat_run_times
local rat_random_run_time 00FFFE d7 roll
# 01012E "move.b ($3,A0), D7" the pizza's parameter: which pizza it is
local pizza_start 01012E d7 pizza_kind
# 010132 "lsl.w #2, D7" the pizza's kind times 4, its entry in pizza_animations
local pizza_start 010132 d7 kind_offset
# 01017A "move.b #$ff, D0" 0xFF for say_pizza_time: the balloon on the right of the pizza
local pizza_wait 01017A d0 on_right
# 010186 "subi.w #$c, D1" the pizza's screen x less 12, for the balloon
local pizza_wait 010186 d1 screen_x
# 01018A "subi.w #$20, D2" 010196 "clr.w D2" the pizza's screen y less 0x20 (0 above the screen), for the balloon
local pizza_wait 01018A,010196 d2 screen_y
# 0101B6 "add.b ($3,A0), D7" 0101BA "lsl.w #2, D7" the taken pizza's animation (its kind and 4) times 4, its entry in pizza_animations
local pizza_wait 0101B6,0101BA d7 animation_offset
# 010216 "move.w $600a4.l, D7" 01021C "andi.w #$6, D7" frame_count's bits 1-2: the billboard's entry in billboard_trigger_x, picked by chance
local billboard_start 010216,01021C d7 trigger_offset
# 010248 "lea $623c0.l, A6" 010266 "lea $623c0.l, A6" the object for a Foot soldier, from object 12 on: the first free one find_free_object finds
local billboard_wait 010248,010254,010266,010272 a6 soldier
# 010246 "moveq #$0, D0" 010264 "moveq #$1, D0" which of the two soldiers it is: the second jumps the other way
local billboard_wait 010246,010264 d0 soldier_number
# 0102E0 "lea $18854.l, A6" the tile block of the fallen billboard, for draw_tile_block
local billboard_land 0102E0 a6 block
# 0102E6 "move.w #$0, D7" the place in tile_block_places where draw_tile_block draws it
local billboard_land 0102E6 d7 place
# 010322 "tst.b D0" 01033C "tst.b D0" which of the two soldiers it is: the second is placed the other side and flipped
param billboard_start_soldier d0 soldier_number
# 01047C "move.b #$8, D7" 010482 "jsr $1830c.l" 010488 "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local oil_drum_blow_up 01047C,010480,010482 d7 objects_left
# 0105D0 "lea $62a00.l, A6" 0105DC "jsr $1830c.l" the object for the shot, from object 32 on: the first free one find_free_object finds
local turret_fire 0105D0,0105DC a6 shot
# 0105D6 "move.b #$8, D7" 0105DC "jsr $1830c.l" 0105E2 "tst.b D7" the objects find_free_object looks at for the shot, left over when it finds one
local turret_fire 0105D6,0105DA,0105DC d7 objects_left
# 01062C "lea $62780.l, A6" 010638 "jsr $1830c.l" the object for the explosion, from object 24 on: the first free one find_free_object finds
local turret_wreck_explode 01062C,010638 a6 explosion
# 010632 "move.b #$8, D7" 010638 "jsr $1830c.l" 01063E "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local turret_wreck_explode 010632,010636,010638 d7 objects_left
# 010E78 "clr.w D6" 0 for start_small_explosion: the explosion across from the turret's place
local turret_wreck_explode 010E78 d6 x_offset
# 010E88 "move.w (A5,D7.w), D7" 010E8C "bsr $10ed0" the explosion's height on the column for start_small_explosion, from turret_wreck_waits by the turret's phase
local turret_wreck_explode 010E88 d7 height_offset
# 010E98 "move.b ($2f,A0), D7" 010E9C "andi.b #$3, D7" the turret's phase (low two bits), its entry in turret_wreck_sounds
local turret_wreck_explode 010E98,010E9C d7 sound_choice
# 010EA0 "move.b (A6,D7.w), D7" the explosion's sound from turret_wreck_sounds, for queue_sound
local turret_wreck_explode 010EA0 d7 sound
# 010706 "andi.l #$3, D7" the turret's parameter (low two bits): its slides in turret_slides
local turret_slide 010706 d7 slide_kind
# 010712 "move.b ($2f,A0), D7" 01071A "lsl.w #2, D7" the turret's phase (bit 0) times 4: the way it slides
local turret_slide 010712,01071A d7 phase_offset
# 010796 "move.w #$4, D7" the range for random_below, 4
local turret_random_wait 010796 d7 range
# 01079A "jsr $48448.l" 0107A6 "move.b (A6,D7.w), ($30,A0)" what random_below gives: the turret's entry in turret_waits
local turret_random_wait 01079A d7 roll
# 010A00 "move.b ($2f,A0), D7" 010A04 "lsl.w #2, D7" the row's nozzle status times 4, the case that runs
local nozzle_row_run 010A00,010A04 d7 status_offset
# 010A2C "movea.l (A6,D7.w), A6" 010A32 "move.b (A6)+, D7" 010A36 "move.b (A6)+, D0" the row's record in nozzle_rows: its count, then the places of its nozzles
local nozzle_row_watch 010A2C,010A32,010A36 a6 row
# 010A8E "lea $62140.l, A6" 010A9A "jsr $1830c.l" the object for the nozzle, from object 4 on: the first free one find_free_object finds
local nozzle_row_watch 010A8E,010A9A a6 nozzle
# 010A58 "sub.w ($c,A5), D5" how far left of the row the turtle is
local nozzle_row_watch 010A58 d5 x_distance
# 010A6E "sub.w ($e,A5), D5" 010A76 "not.w D5" how far the turtle is from the nozzle's place up or down the screen
local nozzle_row_watch 010A6E,010A76 d5 y_distance
# 010B72 "move.b ($5,A0), D7" 010B76 "lsl.w #2, D7" the nozzle's state times 4, the case that runs
local freeze_nozzle_spray 010B72,010B76 d7 state_offset
# 010C2C "lea $62780.l, A6" 010C38 "jsr $1830c.l" the object for the explosion, from object 24 on: the first free one find_free_object finds
local freeze_nozzle_struck 010C2C,010C38 a6 explosion
# 010EBC "clr.w D6" 0 for start_small_explosion: the explosion across from the nozzle's place
local freeze_nozzle_struck 010EBC d6 x_offset
# 010C32 "move.b #$8, D7" 010C38 "jsr $1830c.l" 010C3E "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local freeze_nozzle_struck 010C32,010C36,010C38 d7 objects_left
# 010EBE "move.w #$1000, D7" the explosion's height above the nozzle for start_small_explosion
local freeze_nozzle_struck 010EBE d7 height_offset
# 010D10 "lea $62a00.l, A6" 010D1C "jsr $1830c.l" the object for the electric column, from object 32 on: the first free one find_free_object finds
local electric_vent_wait 010D10,010D1C a6 column
# 010D16 "move.b #$8, D7" 010D1C "jsr $1830c.l" 010D22 "tst.b D7" the objects find_free_object looks at for the column, left over when it finds one
local electric_vent_wait 010D16,010D1A,010D1C d7 objects_left
# 010D48 "move.w #$8, D7" the range for random_below, 8
local electric_random_wait 010D48 d7 range
# 010D4C "jsr $48448.l" 010D52 "move.b (A5,D7.w), ($30,A0)" what random_below gives: the hazard's entry in its waits
local electric_random_wait 010D4C d7 roll
# 0111CA "move.w ($1e,A0), D7" 0111CE "sub.w D7, ($10,A0)" the pole's height speed, taken off its height
local spiked_pole_drop 0111CA d7 height_speed
# 011242 "move.w ($1e,A0), D7" 011246 "add.w D7, ($10,A0)" the pole's height speed, added to its height
local spiked_pole_rise 011242 d7 height_speed
# 0112FE "lea $62a00.l, A6" 01130A "jsr $1830c.l" the object for the missile, from object 32 on: the first free one find_free_object finds
local sewer_launcher_wait 0112FE,01130A a6 missile
# 0112FC "move.b D7, D0" the turtle in line that sewer_launcher_find_turtle found, kept for the missile's side
local sewer_launcher_wait 0112FC d0 kept_turtle
# 0112F2 "bsr $113c6" 0112F6 "tst.b D7" what sewer_launcher_find_turtle gives: the turtle in line with it, bit 7 when it is on the left
local sewer_launcher_wait 0112F2 d7 turtle_in_line
# 011304 "move.b #$8, D7" 01130A "jsr $1830c.l" 011310 "tst.b D7" the objects find_free_object looks at for the missile, left over when it finds one
local sewer_launcher_wait 011304,011308,01130A d7 objects_left
# 011380 "move.b ($2f,A0), D7" 011388 "lsl.w #2, D7" the launcher's drift (bit 0) times 4: its entry in sewer_launcher_drift_x and _y
local sewer_launcher_drift 011380,011388 d7 drift_offset
# 011392 "ext.l D6" the step across, added to its x
local sewer_launcher_drift 011392 d6 x_step
# 011394 "ext.l D7" the step up or down, added to its y
local sewer_launcher_drift 011394 d7 y_step
# 01142E "bset D6, D7" the turtle in line with it far enough, its bit, with bit 7 when it is on the left; 0 for none
param sewer_launcher_find_turtle d7 turtle_in_line
# 011406 "moveq #$0, D7" 011416 "move.b #$80, D7" 01142E "bset D6, D7" the turtle's bit, with bit 7 when it is on the left
local sewer_launcher_find_turtle 011406,011416,011422,01142E d7 turtle_in_line
# 0113F4 "sub.w ($e,A0), D5" 0113FC "not.w D5" how far the turtle is from it up or down the screen
local sewer_launcher_find_turtle 0113F4,0113FC d5 y_distance
# 01140C "sub.w ($c,A0), D5" 011414 "not.w D5" how far the turtle is from it across the screen
local sewer_launcher_find_turtle 01140C,011414 d5 x_distance
# 01146A "tst.b D0" the turtle the missile goes at: bit 7 when it is on the left
param sewer_launcher_start_missile d0 turtle_in_line
# 012A72 "lea $18c28.l, A6" the tile block of the parked car, for draw_tile_block
local parked_car_draw 012A72 a6 block
# 012A78 "move.w #$5, D7" the place in tile_block_places where draw_tile_block draws it
local parked_car_draw 012A78 d7 place
# 012AB4 "lea $62140.l, A6" 012AC0 "jsr $1830c.l" the object for a hit box, from object 4 on: the first free one find_free_object finds
local parked_car_start_drive 012AB4,012AC0 a6 hit_box
# 012ABA "move.b #$8, D7" 012AC0 "jsr $1830c.l" 012AC6 "tst.b D7" the objects find_free_object looks at for the hit box, left over when it finds one
local parked_car_start_drive 012ABA,012ABE,012AC0 d7 objects_left
# 012B4C "lea $623c0.l, A6" 012B58 "jsr $1830c.l" the object for a Foot soldier, from object 12 on: the first free one find_free_object finds
local parked_car_release_soldiers 012B4C,012B58 a6 soldier
# 012B52 "move.b #$c, D7" 012B58 "jsr $1830c.l" 012B5E "tst.b D7" the objects find_free_object looks at for the soldier, left over when it finds one
local parked_car_release_soldiers 012B52,012B56,012B58 d7 objects_left
# 012B74 "move.w ($2a,A0), D7" the car's screen x last frame
local parked_car_follow_object 012B74 d7 last_screen_x
# 012B78 "sub.w ($c,A0), D7" how far the car went across the screen since last frame, added to its picture's scroll
local parked_car_follow_object 012B78 d7 screen_step
# 012BA6 "clr.w D7" 012BB4 "addi.w #$2, D7" the offset in the row of the next tile blanked
local parked_car_blank_row 012BA6,012BB4 d7 tile_offset
# 012BEC "move.w D0, D7" the hit box's number, its entry in car_hit_box_places
local parked_car_start_hit_box 012BEC d7 box_number
# 012CDA "move.b ($2f,A0), D7" the soldier's number
local car_soldier_start 012CDA d7 soldier_number
# 012CDE "lsl.w #1, D7" the soldier's number times 2
local car_soldier_start 012CDE d7 number_offset

# ---- objects/krang.c ----
# 00DF86 "move.b ($5,A0), D7" 00DF8A "lsl.w #2, D7" the state of his appearance times 4, the case that runs
local krang_appear 00DF86,00DF8A d7 state_offset
# 00DFB6 "moveq #$0, D7" 00DFC4 "addq.b #1, D7" the players in play, counted
local krang_appear_setup 00DFB6,00DFC4 d7 player_count
# 00DFCA "lsl.w #1, D7" the players times 2, the hits added to Krang's
local krang_appear_setup 00DFCA d7 extra_hits
# 00E034 "moveq #$0, D0" 0 for krang_pick_move: the move he did before is his appearance
local krang_appear_end 00E034 d0 last_move
# 00E054 "move.w #$10, D7" the range for random_below, 16
local krang_walk 00E054 d7 range
# 00E058 "jsr $48448.l" 00E05E "cmpi.b #$7, D7" what random_below gives: a turtle close by is attacked when 7 or more
local krang_walk 00E058 d7 roll
# 00E076 "move.b ($5,A0), D7" 00E07A "lsl.w #2, D7" his state times 4, the case of the walk that runs
local krang_walk 00E076,00E07A d7 state_offset
# 00E56A "move.w #$2, D7" the range for random_below, 2
local krang_walk 00E56A d7 range
# 00E56E "jsr $48448.l" 00E57A "lsl.w #2, D7" what random_below gives: the kick or the steep lasers
local krang_walk 00E56E d7 roll
# 00E57A "lsl.w #2, D7" the roll times 4, the case of the move that starts
local krang_walk 00E57A d7 move_offset
# 00E092 "lea $e718.l, A6" the routine krang_walk_step aims him with: krang_aim_walk
local krang_walk_at_target 00E092 a6 aim_routine
# 00E0A4 "moveq #$1, D0" 1 for krang_next_move: the move he did is the walk at his target
local krang_walk_at_target 00E0A4 d0 last_move
# 00E0AC "lea $e718.l, A6" the routine krang_walk_step aims him with: krang_aim_walk
local krang_walk_on 00E0AC a6 aim_routine
# 00E0BE "moveq #$2, D0" 2 for krang_next_move: the move he did is the walk on
local krang_walk_on 00E0BE d0 last_move
# 00E0C6 "lea $e708.l, A6" the routine krang_walk_step aims him with: krang_aim_charge
local krang_charge 00E0C6 a6 aim_routine
# 00E0D8 "moveq #$3, D0" 3 for krang_next_move: the move he did is the charge
local krang_charge 00E0D8 d0 last_move
# 00E0E8 "moveq #$4, D0" 4 for krang_next_move: the move he did is the pose
local krang_pose_end 00E0E8 d0 last_move
# 00E0FE "jsr (A6)" the routine that aims him every 16 frames: krang_aim_walk or krang_aim_charge
param krang_walk_step a6 aim_routine
# 00E120 "bra $e4ca" the move he did before, for krang_pick_move
param krang_next_move d0 last_move
# 00E116 "bsr $e8d0" 00E11A "tst.b D7" what krang_find_turtle_in_front gives: the turtle in front far enough, none when 0
local krang_next_move 00E116 d7 turtle_in_front
# 00E52E "move.w #$8, D7" the range for random_below, 8
local krang_next_move 00E52E d7 range
# 00E532 "jsr $48448.l" 00E53E "lsl.w #2, D7" what random_below gives, which attack he makes
local krang_next_move 00E532 d7 roll
# 00E53E "lsl.w #2, D7" the roll times 4, the case of the attack that starts
local krang_next_move 00E53E d7 move_offset
# 00E130 "move.b ($5,A0), D7" 00E134 "lsl.w #2, D7" the state of his kick or punch times 4, the case that runs
local krang_melee 00E130,00E134 d7 state_offset
# 00E1A2 "moveq #$6, D0" 6 for krang_pick_move: the move he did is a blow
local krang_kick_end 00E1A2 d0 last_move
# 00E1A2 "moveq #$6, D0" 6 for krang_pick_move: the move he did is a blow
local krang_punch_wait 00E1A2 d0 last_move
# 00E1B4 "move.b ($5,A0), D7" 00E1B8 "lsl.w #2, D7" the state of his lasers times 4, the case that runs
local krang_fire_lasers 00E1B4,00E1B8 d7 state_offset
# 00E9DE "move.b #$8, D7" 00E9E4 "jsr $1830c.l" the objects find_free_object looks at for the laser, left over when it finds one
local krang_lasers_fire 00E9DE,00E9E2,00E9E4 d7 objects_left
# 00E214 "moveq #$7, D0" 7 for krang_pick_move: the move he did is the lasers
local krang_lasers_end 00E214 d0 last_move
# 00E2D4 "moveq #$6, D0" 6 for krang_pick_move: the move he did is getting over a hit
local krang_recoil 00E2D4 d0 last_move
# 00E348 "lea $62780.l, A6" 00E354 "jsr $1830c.l" the object for the explosion, from object 24 on: the first free one find_free_object finds
local krang_explode_burst 00E348,00E354 a6 explosion
# 00E34E "move.b #$8, D7" 00E354 "jsr $1830c.l" 00E35A "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local krang_explode_burst 00E34E,00E352,00E354 d7 objects_left
# 00E3A4 "move.b ($5,A0), D7" 00E3A8 "lsl.w #2, D7" the state of his escape times 4, the case that runs
local krang_escape 00E3A4,00E3A8 d7 state_offset
# 00E3DA "move.b #$ff, D0" 0xFF for say_im_invincible: the balloon on the right of him
local krang_escape_start 00E3DA d0 on_right
# 00E3E6 "addi.w #$10, D1" his screen x and 16 more, where say_im_invincible puts the balloon
local krang_escape_start 00E3E6 d1 screen_x
# 00E416 "move.w ($1e,A0), D7" 00E41A "sub.w D7, ($10,A0)" the pod's height speed, taken off its height
local krang_escape_dip 00E416 d7 height_step
# 00E44A "move.w ($1e,A0), D7" 00E44E "add.w D7, ($10,A0)" the pod's height speed, added to its height
local krang_escape_fly 00E44A d7 height_speed
# 00E472 "move.w $600a4.l, D7" 00E478 "andi.w #$3e, D7" frame_count's bits 1-5: his entry in krang_hover_heights
local krang_hover 00E472,00E478 d7 hover_offset
# 00E4DE "lsl.w #2, D0" 00E4E0 "adda.l D0, A6" the move he did before, the row of the next moves' chances it picks by
param krang_pick_move d0 last_move
# 00E4E0 "adda.l D0, A6" 00E4E2 "sub.b (A6,D6.w), D7" the four chances of the next moves after the one he did, taken from the roll in turn
local krang_pick_move 00E4E0 a6 chances move_chance
# 00E4CA "move.w #$10, D7" the range for random_below, 16
local krang_pick_move 00E4CA d7 range
# 00E4CE "jsr $48448.l" 00E4E2 "sub.b (A6,D6.w), D7" what random_below gives, less each move's chance in turn
local krang_pick_move 00E4CE,00E4E2 d7 roll
# 00E58E "jsr $11dfa.l" 00E594 "tst.b D7" what boss_pick_target gives: a turtle picked as his target, none when 0
local krang_start_walk 00E58E d7 picked
# 00E5A0 "move.w #$8, D7" the range for krang_set_move_time, 8
local krang_start_walk 00E5A0 d7 range
# 00E5BE "move.w #$8, D7" the range for krang_set_move_time, 8
local krang_start_walk_on 00E5BE d7 range
# 00E5D8 "move.w #$8, D7" the range for krang_set_move_time, 8
local krang_start_charge 00E5D8 d7 range
# 00E6EC "jsr $48448.l" the range for random_below
param krang_set_move_time d7 range
# 00E6EC "jsr $48448.l" 00E6F8 "move.b (A6,D7.w), ($31,A0)" what random_below gives: his entry in the walk's times
local krang_set_move_time 00E6EC d7 roll
# 00E70E "lea $e790.l, A6" the speeds of his charge by direction, for krang_set_speeds
local krang_aim_charge 00E70E a6 speeds
# 00E708 "jsr $184d2.l" 00E714 "bra $e724" the direction boss_direction_to_target gives, for krang_set_speeds
local krang_aim_charge 00E708 d0 direction
# 00E71E "lea $e750.l, A6" the speeds of his walk by direction, for krang_set_speeds
local krang_aim_walk 00E71E a6 speeds
# 00E718 "jsr $184d2.l" 00E71E "lea $e750.l, A6" the direction boss_direction_to_target gives, for krang_set_speeds
local krang_aim_walk 00E718 d0 direction
# 00E724 "lsl.w #2, D0" the direction, one of sixteen
param krang_set_speeds d0 direction
# 00E724 "lsl.w #2, D0" 00E726 "move.w (A6,D0.w), D7" the direction times 4, its pair in the speeds
local krang_set_speeds 00E724 d0 direction_offset
# 00E726 "move.w (A6,D0.w), D7" 00E72E "move.w ($2,A6,D0.w), D7" his speeds across and up or down, a pair by direction
param krang_set_speeds a6 speeds krang_speed
# 00E7F8 "moveq #$3c, D7" 00E804 "moveq #$8, D7" 00E810 "moveq #$1, D7" the frames he flashes on, more often as he weakens: 0x3C, 8, then 1
local krang_count_down 00E7F8,00E804,00E810 d7 flash_mask
# 00E8CC "bset D6, D0" the bit of the turtle close to him, with bit 7 when it is on his left; 0 for none
param krang_find_close_turtle d0 close_turtle
# 00E870 "moveq #$0, D0" 00E8B2 "ori.b #$80, D0" 00E8CC "bset D6, D0" the bit of the turtle close to him, bit 7 when it is on his left
local krang_find_close_turtle 00E870,00E8B2,00E8C0,00E8CC d0 close_turtle
# 00E894 "sub.w ($e,A0), D5" 00E89C "not.w D5" how far the turtle is from him up or down the screen
local krang_find_close_turtle 00E894,00E89C d5 y_distance
# 00E8AA "sub.w ($c,A0), D5" 00E8B6 "not.w D5" how far the turtle is from him across the screen
local krang_find_close_turtle 00E8AA,00E8B6 d5 x_distance
# 00E952 "bset D6, D7" the bit of the turtle level with him and in front far enough; 0 for none
param krang_find_turtle_in_front d7 turtle_in_front
# 00E8DA "moveq #$0, D7" 00E952 "bset D6, D7" the bit of the turtle level with him and in front far enough
local krang_find_turtle_in_front 00E8DA,00E952 d7 turtle_in_front
# 00E8FE "sub.w ($e,A0), D5" 00E906 "not.w D5" how far the turtle is from him up or down the screen
local krang_find_turtle_in_front 00E8FE,00E906 d5 y_distance
# 00E91E "sub.w ($c,A0), D5" 00E926 "not.w D5" 00E938 "sub.w ($c,A0), D5" how far the turtle is from him across the screen
local krang_find_turtle_in_front 00E91E,00E926,00E938 d5 x_distance
# 00EA44 "move.b ($2f,A0), D7" 00EA52 "addi.b #$3, D7" his laser angle, three more when he faces right
local krang_start_laser 00EA44,00EA52 d7 laser_angle
# 00EA5C "lsl.w #2, D7" the angle times 4, its entry in krang_laser_place_x and _height
local krang_start_laser 00EA5C d7 angle_offset
# 00EADA "lsl.w #2, D7" the laser's parameter (its angle) times 4
local krang_laser_start 00EADA d7 angle_offset
# 00EB08 "move.b ($3,A0), D7" the laser's parameter: its angle
local krang_laser_start 00EB08 d7 angle
# 00EB0C "lsl.w #2, D7" the angle times 4, its entry in krang_laser_animations
local krang_laser_start 00EB0C d7 angle_offset
# 00EB92 "move.b #$8, D7" 00EB98 "jsr $1830c.l" the objects find_free_object looks at for the fist, left over when it finds one
local krang_start_fist 00EB92,00EB96,00EB98 d7 objects_left
# 00EBBA "move.w #$4500, D7" 00EBCA "ext.l D7" how far across from him the fist starts, the other way when he faces left
local krang_start_fist 00EBBA,00EBCA d7 fist_offset

# ---- video/palettes.c ----
# 009264 "move.w (A4)+, D7" 00926C "movea.l (A4)+, A6" the list of palette requests: a kind and its data each, to 0xFFFF
param post_palette_request_list a4 requests
# 009264 "move.w (A4)+, D7" 00926C "movea.l (A4)+, A6" the list's next request
local post_palette_request_list 009264,00926C a4 requests
# 009264 "move.w (A4)+, D7" the request's kind, for post_palette_request
local post_palette_request_list 009264 d7 kind
# 00946A "movea.l $60bfc.l, A6" the palette set under way (palette_set), for its next bank
local run_palette_requests 00946A a6 palettes
# 0092BE "move.w (A0), D0" the queued request's kind: its type in bits 8-13, the banks in the low byte
local run_palette_requests 0092BE d0 request_kind
# 0092D0 "lsr.w #6, D0" the request's type times 4, the case that runs
local run_palette_requests 0092D0 d0 kind_offset
# 00929C "move.b $60bfb.l, D7" 0092A8 "lsl.w #2, D7" the request whose second half is still to do (palette_second_half), times 4: the case that runs
local run_palette_requests 00929C,0092A8 d7 second_half_offset
# 0092C6 "move.b D0, D7" 0093D8 "move.b $60bf8.l, D7" 009464 "move.b $60bf9.l, D7" 0095C2 "move.b $60bfa.l, D7" the banks the request is for, a bit each
local run_palette_requests 0092C6,0093D8,009464,0095C2 d7 banks
# 0092FC "move.l $60bf8.l, D7" the banks still to do of every kind: the palettes are busy while not 0
local run_palette_requests 0092FC d7 banks_pending
# 009362 "btst D6, D7" 00937A "bclr D6, D7" the banks asked for, a bit each; the first is done this frame
param palette_request_area d7 banks
# 00939E "movea.l (A6,D6.w), A6" 0093BC "adda.l #$20, A6" the area's palettes for the bank (the second half's 0x20 bytes on)
local palette_request_area 00939E,0093BC a6 palettes
# 009378 "move.b D6, D4" 0093C2 "cmpi.b #$3, D4" the bank done this frame: the last, the sprites', leaves a second half
local palette_request_area 009378 d4 done_bank
# 009396 "lsl.w #2, D5" the area times 4, its entry in area_palettes
local palette_request_area 009396 d5 area_offset
# 009360 "clr.l D6" 009368 "addq.b #1, D6" the bank looked at, the first asked for
local palette_request_area 009360,009368 d6 bank
# 00939C "lsl.w #2, D6" the bank times 4, its entry in the area's palettes and palette_bank_addresses
local palette_request_area 00939C d6 bank_offset
# 00938A "move.b (A5,D6.w), D7" the bank's palettes from palette_bank_counts, for copy_palette_list
local palette_request_area 00938A d7 palette_count
# 0093EE "move.l A6, $60bfc.l" the set of palettes: a list for each bank, kept in palette_set
param palette_request_set a6 bank_lists
# 00942A "movea.l (A6,D6.w), A6" the set of palettes: a list for each bank
param palette_request_set_next_bank a6 bank_lists palette_list_pointer
# 00942A "movea.l (A6,D6.w), A6" 009448 "adda.l #$20, A6" the set's palettes for the bank (the second half's 0x20 bytes on)
local palette_request_set_next_bank 00942A,009448 a6 palettes
# 0093F6 "btst D6, D7" 009414 "bclr D6, D7" the banks still to do, a bit each; the first is done this frame
param palette_request_set_next_bank d7 banks
# 009412 "move.b D6, D4" 00944E "cmpi.b #$3, D4" the bank done this frame: the last, the sprites', leaves a second half
local palette_request_set_next_bank 009412 d4 done_bank
# 0093F4 "clr.l D6" 0093FC "addq.b #1, D6" the bank looked at, the first asked for
local palette_request_set_next_bank 0093F4,0093FC d6 bank
# 009428 "lsl.w #2, D6" the bank times 4, its entry in the set and palette_bank_addresses
local palette_request_set_next_bank 009428 d6 bank_offset
# 009424 "move.b (A5,D6.w), D7" the bank's palettes from palette_bank_counts, for copy_palette_list
local palette_request_set_next_bank 009424 d7 palette_count
# 009472 "movea.l $60bfc.l, A6" the set under way (palette_set), for palette_request_set
local palette_request_set_second_half 009472 a6 bank_lists
# 0094CE "move.l A6, $60bfc.l" the list of palettes, kept for its second half
param palette_request_list a6 palettes
# 0094C0 "adda.l #$20, A6" the list's second half's palettes, 0x20 bytes on
local palette_request_list 0094C0 a6 palettes
# 009486 "btst D6, D7" the bank asked for, a bit
param palette_request_list d7 banks
# 009496 "move.b D6, D4" 0094C6 "cmpi.b #$3, D4" the bank: the last, the sprites', leaves a second half
local palette_request_list 009496 d4 done_bank
# 009484 "clr.l D6" 00948C "addq.b #1, D6" the bank looked at, the one asked for
local palette_request_list 009484,00948C d6 bank
# 0094A0 "move.b (A5,D6.w), D7" the bank's palettes from palette_bank_counts, for copy_palette_list
local palette_request_list 0094A0 d7 palette_count
# 0094E2 "movea.l $60bfc.l, A6" the list under way (palette_set), for palette_request_list
local palette_request_list_second_half 0094E2 a6 palettes
# 0094F4 "move.b D7, D6" 0094F6 "andi.l #$f, D7" the palette: its bank times 16 and its number in the bank
param palette_request_palette d7 palette
# 0094F4 "move.b D7, D6" 0094FC "andi.b #$f0, D6" the palette's bank times 16
local palette_request_palette 0094F4,0094FC d6 bank_offset
# 0094F6 "andi.l #$f, D7" the palette's number in its bank
local palette_request_palette 0094F6 d7 palette_in_bank
# 00950E "adda.l D7, A5" 00951A "adda.l #$4, A5" the place in the palette RAM of the next colour
# type: the palette RAM: 009508 "movea.l (A5,D6.w), A5" from palette_bank_addresses (0x080000...)
local palette_request_palette 00950E,00951A a5 colour_place io
# 009528 "move.b D7, D6" the bank of the colours, times 16
param palette_request_colours d7 bank
# 009528 "move.b D7, D6" 009530 "andi.b #$f0, D6" the bank times 16
local palette_request_colours 009528,009530 d6 bank_offset
# 00954A "move.b (A6)+, D7" the colour's number in its palette, from the data
local palette_request_colours 00954A d7 colour_number
# 009554 "adda.l D7, A4" the colour's place in the palette RAM
# type: the palette RAM, a bank of palette_bank_addresses (0x080000...) plus the colour: 009554 "adda.l D7, A4"
local palette_request_colours 009554 a4 colour_place io
# 009564 "btst D6, D7" 00957C "bclr D6, D7" the banks asked for, a bit each; the first is done this frame
param palette_request_black d7 banks
# 00957A "move.b D6, D4" 0095AC "cmpi.b #$3, D4" the bank done this frame: the last, the sprites', leaves a second half
local palette_request_black 00957A d4 done_bank
# 009562 "moveq #$0, D6" 00956A "addq.b #1, D6" the bank looked at, the first asked for
local palette_request_black 009562,00956A d6 bank
# 00958C "move.b (A5,D6.w), D7" the bank's palettes from palette_bank_counts, for blacken_palettes
local palette_request_black 00958C d7 palette_count
# 0095E8 "movea.l (A6)+, A4" the list of palettes, a pointer each
param copy_palette_list a6 palettes palette_pointer
# 0095E8 "movea.l (A6)+, A4" the list's next palette
local copy_palette_list 0095E8 a6 palettes palette_pointer
# 0095E8 "movea.l (A6)+, A4" 0095EA "move.b (A4)+, ($1,A5)" 0095EE "move.b (A4)+, ($3,A5)" the palette's sixteen colours
local copy_palette_list 0095E8,0095EA,0095EE a4 colours colour_byte
# 0095EA "move.b (A4)+, ($1,A5)" 0095EE "move.b (A4)+, ($3,A5)" the place in the palette RAM of the first colour
# type: the palette RAM, palette_bank_addresses' (0x080000...): 0095EA "move.b (A4)+, ($1,A5)"
param copy_palette_list a5 colour_place io
# 0095F2 "adda.l #$4, A5" the place of the next colour
# type: the palette RAM: 0095F2 "adda.l #$4, A5"
local copy_palette_list 0095F2 a5 colour_place io
# 009604 "clr.b ($1,A5)" 009608 "clr.b ($3,A5)" the place in the palette RAM of the first colour
# type: the palette RAM, palette_bank_addresses' (0x080000...): 009604 "clr.b ($1,A5)"
param blacken_palettes a5 colour_place io
# 00960C "adda.l #$4, A5" the place of the next colour
# type: the palette RAM: 00960C "adda.l #$4, A5"
local blacken_palettes 00960C a5 colour_place io
# 00965C "move.w D6, $63418.l" the fade: the parts it changes in the high byte, its rate in the low one
param fade_palettes_start d6 fade
# 009662 "move.l A5, $63414.l" the palettes the fade goes toward, kept in fade_target
param fade_palettes_start a5 target_palettes
# 00969E "bsr $9744" 0096A2 "move.b ($1,A6), (A5)+" 0096A6 "move.b ($3,A6), (A5)+" the place in the fade's buffer of the next colour
# type: a colour of the fade's buffer (063800...), as fade_palettes_part hands it: 0096A2
local fade_palettes_read 00969E,0096A2,0096A6 a5 buffer_place fade_colour
# 00969E "bsr $9744" 0096AA "adda.w #$4, A6" the place in the palette RAM of the next colour
local fade_palettes_read 00969E,0096AA a6 colour_place
# 009710 "bsr $9744" 009714 "move.b (A5)+, ($1,A6)" 009718 "move.b (A5)+, ($3,A6)" the place in the fade's buffer of the next colour
# type: a colour of the fade's buffer (063800...), as fade_palettes_part hands it: 009714
local fade_palettes_write 009710,009714,009718 a5 buffer_place fade_colour
# 009710 "bsr $9744" 00971C "adda.w #$4, A6" the place in the palette RAM of the next colour
local fade_palettes_write 009710,00971C a6 colour_place
# 00974A "lsl.w #2, D7" 00974C "movea.l (A6,D7.w), A6" the part of the palettes, its entry in palette_banks
param fade_palettes_part d7 part
# 009754 "movea.l $6341a.l, A5" the place in the fade's buffer of the part's colours
param fade_palettes_part a5 buffer_place
# 00974C "movea.l (A6,D7.w), A6" the place in the palette RAM of the part's colours
param fade_palettes_part a6 colour_place
# 009750 "move.w #$7f, D7" the part's colours less one (0x7F), a count
local fade_palettes_part 009750 d7 colour_count
# 0097D6 "lea $9872.l, A2" 0097DE "bsr $9838" the mask and step of each of the colour's red, green and blue, for fade_colour_part
local fade_palettes_step 0097D6,0097DE,0097E2,0097E6 a2 channels
# 0097CE "movea.l (A4)+, A3" 0097EC "adda.l #$2, A3" the target palette's colour the buffer's colour goes toward
local fade_palettes_step 0097CE,0097EC a3 target_colour
# 0097C2 "movea.l (A5,D6.w), A4" 0097CE "movea.l (A4)+, A3" the part's list of target palettes
local fade_palettes_step 0097C2,0097CE a4 target_lists
# 009782 "movea.l $63414.l, A5" the fade's target palettes (fade_target), a list for each part
local fade_palettes_step 009782 a5 target
# 009772 "movea.l $6341a.l, A6" 0097EA "move.w D5, (A6)+" the place in the fade's buffer of the next colour
# type: a colour of the fade's buffer: 009772 "movea.l $6341a.l, A6" (fade_buffer_place) 0097EA "move.w D5, (A6)+"
local fade_palettes_step 009772,0097EA a6 buffer_place fade_colour
# 00977E "andi.w #$f, D0" the fade's rate (low four bits)
local fade_palettes_step 00977E d0 rate
# 0097D4 "move.w (A6), D1" the buffer's colour stepped toward the target's
local fade_palettes_step 0097D4 d1 colour
# 0097DC "clr.w D5" 0097EA "move.w D5, (A6)+" the stepped colour, made a channel at a time by fade_colour_part
local fade_palettes_step 0097DC,0097DE,0097E2,0097E6 d5 new_colour
# 0097AE "move.b $63412.l, D6" 0097BC "move.b #$3, D6" the part of the palettes stepped, the fourth list for the fifth part
local fade_palettes_step 0097AE,0097BC d6 part
# 00983E "move.w D0, D4" the fade's rate
param fade_colour_part d0 rate
# 009838 "move.w D1, D2" the colour stepped
param fade_colour_part d1 colour
# 009842 "move.w (A3), D7" the target's colour
# type: a colour of the fade's target palette (fade_target's): 009842 "move.w (A3), D7"
param fade_colour_part a3 target_colour colour_byte
# 00983A "move.w (A2)+, D3" 009840 "mulu.w (A2)+, D4" the channel's mask and step, then the next channel's
# type: the colours' channels' masks and steps (009872, which fade_palettes_step hands it: 0097D6 "lea $9872.l, A2"): 00983A "move.w (A2)+, D3" 009840 "mulu.w (A2)+, D4"
param fade_colour_part a2 channels colour_channel
# 00983A "move.w (A2)+, D3" 009840 "mulu.w (A2)+, D4" the next channel's mask and step
local fade_colour_part 00983A,009840 a2 channels
# 00986E "or.w D2, D5" the stepped colour so far
param fade_colour_part d5 new_colour
# 00986E "or.w D2, D5" the stepped colour with this channel
local fade_colour_part 00986E d5 new_colour
# 00983C "and.w D3, D2" 009850 "add.w D4, D2" 00985E "sub.w D4, D2" the colour's channel, stepped toward the target's and kept from passing it
local fade_colour_part 00983C,009850,009858,00985E,009864,00986C d2 channel_value
# 00983A "move.w (A2)+, D3" 00983C "and.w D3, D2" the channel's bits in the colour
local fade_colour_part 00983A d3 channel_mask
# 009840 "mulu.w (A2)+, D4" the rate times the channel's step
local fade_colour_part 009840 d4 step
# 009844 "and.w D3, D7" the target colour's channel
local fade_colour_part 009844 d7 target_value
# 0098A8 "movea.l (A6)+, A4" 0098AA "move.w (A4)+, D6" the effect's record: the colour it changes, then its steps
# type: the effect's data, its colour code first: 0098A8 "movea.l (A6)+, A4" 0098AA "move.w (A4)+, D6"
local start_palette_effects 0098A8 a4 effect_steps palette_effect_code
# 0098B8 "lsr.w #6, D5" the colour's bank (bits 8-11) times 4, its entry in palette_effect_banks
local start_palette_effects 0098B8 d5 bank_offset
# 0098AA "move.w (A4)+, D6" the colour the effect changes: its bank, palette and number in three nibbles
local start_palette_effects 0098AA d6 colour_code
# 0099CC "move.b ($0,A6), D5" the effect's flags: running in bit 7, its layer in bits 0-1
local stop_every_palette_effect 0099CC d5 effect_flags
# 009A00 "btst #$0, D7" the layers whose effects stop, a bit each
param stop_every_palette_effect d7 layers
# 009A00 "btst #$0, D7" the layers whose effects stop, a bit each
param stop_fixed_layer_effect d7 layers
# 009A0E "btst #$1, D7" the layers whose effects stop, a bit each
param stop_layer_a_effect d7 layers
# 009A18 "btst #$2, D7" the layers whose effects stop, a bit each
param stop_layer_b_effect d7 layers
# 009A22 "btst #$3, D7" the layers whose effects stop, a bit each
param stop_sprite_effect d7 layers
# 009A3E "lea $60480.l, A6" 009A4C "adda.l #$a, A6" the palette effect cleared, ten bytes each
local clear_palette_effects 009A3E,009A4C a6 palette_effect
# 009AB8 "movea.l (A0,D7.w), A0" 009ABC "movea.l (A0)+, A6" the attract step's lists of palette effects, to a 0
local start_game_step_palette_effects 009AB8,009ABC a0 effect_lists
# 009B0E "movea.l (A0,D7.w), A0" the area's lists of palette effects, for start_palette_effect_lists
local start_area_palette_effects 009B0E a0 effect_lists
# 009B12 "movea.l (A0)+, A6" the lists of palette effects, to a 0
param start_palette_effect_lists a0 effect_lists
# 009B12 "movea.l (A0)+, A6" the next list
local start_palette_effect_lists 009B12 a0 effect_lists
# 00965C "move.w D6, $63418.l" the fade for fade_palettes_start: the parts it changes in the high byte, its rate in the low one
param copy_palette_sets d6 fade
# 009662 "move.l A5, $63414.l" the palettes the fade goes toward, for fade_palettes_start
param copy_palette_sets a5 target_palettes

# ---- system/test_mode.c ----
# 001972 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local mask_rom_check_clear 001972 d7 job
# 00198E "move.w #$8, D7" the heading's number in colour_texts, for print_colour_text
local draw_mask_rom_check 00198E d7 text_number
# 0019BC "lea $63500.l, A0" 0019C2 "move.l D0, (A0)+" the place of the mask ROMs' sums (where the rankings' scores go), cleared
# type: two of the sums the MASK ROM CHECK adds up at once: 0019BC "lea $63500.l, A0" 0019C2 "move.l D0, (A0)+"
local start_mask_rom_sums 0019BC,0019C2 a0 sums mask_rom_total
# 0019CE "move.w #$1100, D7" the job for queue_job: job 0x11, the mask ROMs summed
local start_mask_rom_sums 0019CE d7 job
# 0019FE "lea $63500.l, A6" 001A0E "cmp.w (A6)+, D7" the mask ROMs' sums, against good_mask_rom_sums
# type: a sum the MASK ROM CHECK added up: 0019FE "lea $63500.l, A6" 001A0E "cmp.w (A6)+, D7"
local show_mask_rom_check 0019FE,001A0E a6 sums mask_rom_total
# 001A04 "moveq #$0, D0" 001A0A "lsl.l #1, D0" 001A14 "bset #$0, D0" the ROMs whose sums are wrong, a bit each
local show_mask_rom_check 001A04,001A0A,001A14 d0 bad_roms
# 001A40 "move.w #$b, D1" 001A52 "addq.w #1, D1" the text of the next ROM's BAD, one a ROM
local show_mask_rom_check 001A40,001A52 d1 rom_text
# 001A22 "move.w #$9, D7" 001A32 "move.w #$a, D7" 001A4A "move.w D1, D7" the text for print_colour_text: OK, BAD, a bad ROM's name
local show_mask_rom_check 001A22,001A32,001A4A d7 text_number
# 001A7E "lea $63500.l, A0" the place the sums go
local sum_mask_roms 001A7E a0 sums
# 001AC0 "move.w ($0,A6), D7" 001AC4 "add.w ($2,A6), D7" 001ACC "move.w ($4,A6), D7" 001AD0 "add.w ($6,A6), D7" a ROM's sum: two of the parts' sums added
local sum_sprite_roms_low 001AC0,001AC4,001ACC,001AD0 d7 sum
# 001B02 "move.w ($0,A6), D7" 001B06 "add.w ($2,A6), D7" 001B0E "move.w ($4,A6), D7" 001B12 "add.w ($6,A6), D7" a ROM's sum: two of the parts' sums added
local sum_sprite_roms_high 001B02,001B06,001B0E,001B12 d7 sum
# 001B52 "lea $140400.l, A1" the sprite RAM, through which the ROM's bytes are read
local sum_sprite_rom_banks 001B52 a1 read_base
# 001B62 "adda.w D1, A2" the place in the sprite RAM read next
# type: the K051960's sprite RAM window, the sprite ROM's readback: 001B52 "lea $140400.l, A1" 001B62 "adda.w D1, A2"
local sum_sprite_rom_banks 001B62 a2 read_place io
# 001B44 "moveq #$0, D0" 001BA8 "addq.b #1, D0" the page of the bank written to the sprite chip, 256 of them
local sum_sprite_rom_banks 001B44,001BA8 d0 page
# 001B58 "moveq #$0, D1" 001BA0 "addq.w #4, D1" the offset in the sprite RAM read next, four bytes on each time
local sum_sprite_rom_banks 001B58,001BA0 d1 offset
# 001B72 "move.b $140004.l, D4" the byte of the first ROM, for add_to_rom_sums
local sum_sprite_rom_banks 001B72 d4 first_byte
# 001B7E "move.b $140005.l, D5" the byte of the second ROM, for add_to_rom_sums
local sum_sprite_rom_banks 001B7E d5 second_byte
# 001B8A "move.b $140006.l, D6" the byte of the third ROM, for add_to_rom_sums
local sum_sprite_rom_banks 001B8A d6 third_byte
# 001B96 "move.b $140007.l, D7" the byte of the fourth ROM, for add_to_rom_sums
local sum_sprite_rom_banks 001B96 d7 fourth_byte
# 001B46 "move.b $6350e.l, D7" 001B4C "move.b D7, $140003.l" the bank read (mask_rom_bank), written to the sprite chip
local sum_sprite_rom_banks 001B46 d7 bank
# 001BB4 "move.b $63519.l, D7" the last bank read (mask_rom_last_bank)
local sum_sprite_rom_banks 001BB4 d7 last_bank
# 001C10 "movea.l #$100000, A1" the tile RAM, through which the ROM's bytes are read
local sum_tile_roms 001C10 a1 read_base
# 001C3E "adda.w D1, A2" the place in the tile RAM read next
# type: the K052109's tile RAM (100000-107FFF) window, the tile ROM's readback: 001C10 "movea.l #$100000, A1" 001C3E "adda.w D1, A2"
local sum_tile_roms 001C3E a2 read_place io
# 001BE8 "moveq #$0, D0" 001CAE "addq.b #1, D0" the page of the bank written to the tile chip, 32 of them
local sum_tile_roms 001BE8,001CAE d0 page
# 001C16 "moveq #$0, D1" 001C84 "addq.w #8, D1" 001C96 "addi.w #$1000, D1" the offset in the tile RAM read next, past the gaps
local sum_tile_roms 001C16,001C84,001C96 d1 offset
# 001C48 "move.b ($0,A2), D4" the byte of the first ROM, read until it reads the same twice
local sum_tile_roms 001C48 d4 first_byte
# 001C58 "move.b ($2,A2), D5" the byte of the second ROM, read until it reads the same twice
local sum_tile_roms 001C58 d5 second_byte
# 001C68 "move.b ($4,A2), D6" the byte of the third ROM, read until it reads the same twice
local sum_tile_roms 001C68 d6 third_byte
# 001C78 "move.b ($6,A2), D7" the byte of the fourth ROM, read until it reads the same twice
local sum_tile_roms 001C78 d7 fourth_byte
# 001BEA "move.b $6350e.l, D7" 001BF0 "move.b D7, $60064.l" the bank read (mask_rom_bank), written to the tile banks
local sum_tile_roms 001BEA d7 bank
# 001C8E "move.w D1, D7" 001C90 "andi.w #$1000, D7" the offset's bit 12: past it the next 0x1000 bytes are skipped
local sum_tile_roms 001C8E,001C90 d7 gap_bit
# 001D18 "btst D2, D4" 001D50 "btst D3, D4" the byte of the first ROM
param add_to_rom_sums d4 first_byte
# 001D26 "btst D2, D5" 001D5E "btst D3, D5" the byte of the second ROM
param add_to_rom_sums d5 second_byte
# 001D34 "btst D2, D6" 001D6C "btst D3, D6" the byte of the third ROM
param add_to_rom_sums d6 third_byte
# 001D42 "btst D2, D7" 001D7A "btst D3, D7" the byte of the fourth ROM
param add_to_rom_sums d7 fourth_byte
# 001D08 "lea $63510.l, A6" 001D90 "add.w D3, (A6)+" the part's sum in mask_rom_part_sums the bits are added to
# type: a sum the MASK ROM CHECK adds up: 001D08 "lea $63510.l, A6" 001D90 "add.w D3, (A6)+"
local add_to_rom_sums 001D08,001D90 a6 part_sum mask_rom_total
# 001D06 "moveq #$0, D2" 001D92 "addq.w #2, D2" the first of the two bits of each byte put together, 0 to 6
local add_to_rom_sums 001D06,001D92 d2 bit
# 001D16 "addq.w #1, D3" the second of the two bits
local add_to_rom_sums 001D16 d3 next_bit
# 001DDC "btst D2, D4" 001E14 "btst D3, D4" the byte of the first ROM
param add_mask_rom_bits_to_sums d4 first_byte
# 001DCE "btst D2, D5" 001E06 "btst D3, D5" the byte of the second ROM
param add_mask_rom_bits_to_sums d5 second_byte
# 001DC0 "btst D2, D6" 001DF8 "btst D3, D6" the byte of the third ROM
param add_mask_rom_bits_to_sums d6 third_byte
# 001DB2 "btst D2, D7" 001DEA "btst D3, D7" the byte of the fourth ROM
param add_mask_rom_bits_to_sums d7 fourth_byte
# 001DA0 "lea $63510.l, A6" 001E2A "add.w D3, (A6)+" the part's sum in mask_rom_part_sums the bits are added to
# type: a sum the MASK ROM CHECK adds up: 001DA0 "lea $63510.l, A6"
local add_mask_rom_bits_to_sums 001DA0,001E2A a6 part_sum mask_rom_total
# 001DB0 "addq.w #1, D3" the second of the two bits
local add_mask_rom_bits_to_sums 001DB0 d3 next_bit
# 001E44 "btst #$0, D7" 001E54 "btst #$1, D7" the job's parameter: the layers cleared, a bit each
param clear_layers_job d7 layers
# 001E4A "lea $100000.l, A6" 001E5A "lea $102000.l, A6" 001E6A "lea $104000.l, A6" the layer's tile RAM, cleared
local clear_layers_job 001E4A,001E5A,001E6A a6 tile_place
# 001E42 "bsr $1e7c" 001E8E "move.b D1, (A6)+" the attribute of the blank tile blank_tile gives
local clear_layers_job 001E42 d1 blank_attribute
# 001E42 "bsr $1e7c" 001E90 "move.b D2, (A6)+" the code of the blank tile blank_tile gives
local clear_layers_job 001E42 d2 space_tile
# 001E7C "moveq #$0, D1" the attribute of the blank tile, 0
param blank_tile d1 blank_attribute
# 001E7E "moveq #$10, D2" the code of the blank tile, 0x10 (the space)
param blank_tile d2 space_tile
# 001E8E "move.b D1, (A6)+" the attribute of the blank tile
param clear_fixed_layer d1 blank_attribute
# 001E90 "move.b D2, (A6)+" the code of the blank tile
param clear_fixed_layer d2 space_tile
# 001E8E "move.b D1, (A6)+" the fixed layer's tile RAM
param clear_fixed_layer a6 tile_place
# 001E8E "move.b D1, (A6)+" 001E90 "move.b D2, (A6)+" the place of the next byte cleared
local clear_fixed_layer 001E8E,001E90 a6 tile_place
# 001E8E "move.b D1, (A6)+" the attribute of the blank tile
param clear_scroll_layer d1 blank_attribute
# 001E90 "move.b D2, (A6)+" the code of the blank tile
param clear_scroll_layer d2 space_tile
# 001E8E "move.b D1, (A6)+" the layer's tile RAM
param clear_scroll_layer a6 tile_place
# 001E8E "move.b D1, (A6)+" 001E90 "move.b D2, (A6)+" the place of the next byte cleared
local clear_scroll_layer 001E8E,001E90 a6 tile_place
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local test_start_clear 005D94 d7 job
# 00573E "lea $100000.l, A6" 005764 "move.b D3, (A6)+" the place in the fixed layer of the hatch's next tiles
local draw_cross_hatch 00573E,005762,005764,005766,005768,00576E a6 tile_place
# 005744 "moveq #$0, D0" the attribute of the hatch's tiles, 0
local draw_cross_hatch 005744 d0 tile_attribute
# 005746 "moveq #$2c, D1" the code of the square's bottom left tile
local draw_cross_hatch 005746 d1 bottom_left_tile
# 005748 "moveq #$2d, D2" the code of the square's bottom right tile
local draw_cross_hatch 005748 d2 bottom_right_tile
# 00574A "moveq #$2e, D3" 005764 "move.b D3, (A6)+" the code of the square's top left tile
local draw_cross_hatch 00574A d3 top_left_tile
# 00574C "moveq #$2f, D4" 005768 "move.b D4, (A6)+" the code of the square's top right tile
local draw_cross_hatch 00574C d4 top_right_tile
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local color_test_clear 005D94 d7 job
# 0057AE "lea $5846.l, A5" the list of jobs that print the page's texts, for queue_jobs
local draw_color_test 0057AE a5 jobs
# 0057C0 "movea.l $584c.l, A5" 0057DC "adda.w #$80, A5" 0057EC "movea.l $5850.l, A5" 005828 "adda.w #$180, A5" the place in the fixed layer of the bars' row
local draw_color_test 0057C0,0057DC,0057EC,005828 a5 row_place
# 0057C6 "movea.l A5, A6" 0057CE "move.b D7, (A6)+" 0057D0 "move.b D6, (A6)+" the place of the next tile
# type: the K052109's tile RAM (100000-107FFF): 0057C0 "movea.l $584c.l, A5" (color_test_places) 0057C6 "movea.l A5, A6"
local draw_color_test 0057C6,0057CE,0057D0,0057E0,0057F2,005820,00582C a6 tile_place io
# 0057FA "move.b (A4,D5.w), D3" the colour of the bar, from text_colours
local draw_color_test 0057FA d3 bar_colour
# 0057CA "moveq #$31, D6" 0057D6 "addq.b #1, D6" 0057F8 "moveq #$30, D6" the code of the next tile of the bars, one more each time
local draw_color_test 0057CA,0057D6,0057F8,00581E d6 tile_code
# 0057B8 "moveq #$1, D7" the colour's number for color_test_colour
local draw_color_test 0057B8 d7 colour_number
# 0057BA "bsr $583a" 0057CE "move.b D7, (A6)+" the colour color_test_colour gives
local draw_color_test 0057BA d7 colour
# 005840 "move.b (A0,D7.w), D7" the colour's number in text_colours
param color_test_colour d7 colour_number
# 005840 "move.b (A0,D7.w), D7" the colour from text_colours
local color_test_colour 005840 d7 colour
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local io_test_clear 005D94 d7 job
# 005884 "lea $5896.l, A5" the list of jobs that print the page's texts, for queue_jobs
local draw_io_test 005884 a5 jobs
# 0058D0 "movea.l (A6,D6.w), A6" 0058F0 "adda.w #$100, A6" the place in the fixed layer of the input's 0 or 1
local show_player_inputs 0058D0,0058F0 a6 bit_place
# 0058C8 "not.b D5" 0058DE "lsr.b #1, D5" 0058EC "bsr $5990" the player's inputs, a bit at a time
local show_player_inputs 0058C8,0058DE,0058EC d5 inputs
# 0058BE "lsl.w #2, D6" the player times 4, his entry in player_input_ports and player_input_places
local show_player_inputs 0058BE d6 player_offset
# 0058B4 "moveq #$0, D7" 0058F8 "addq.b #1, D7" the player whose inputs are shown, 0 to 3
local show_player_inputs 0058B4,0058F8 d7 player_number
# 005914 "movea.l ($0,A6), A6" 00591E "adda.w #$100, A6" 00593A "movea.l ($4,A6), A6" the place in the fixed layer of the switch's 0 or 1
local show_coin_inputs 005914,00591E,00593A,005944 a6 bit_place
# 00590C "not.b D5" 005932 "lsr.b #4, D5" the coin switches, then the service switches, a bit at a time
local show_coin_inputs 00590C,00591A,005932,005940 d5 inputs
# 00596A "movea.l (A6,D6.w), A6" 00597E "adda.w #$4, A6" the place in the fixed layer of the switch's 0 or 1
local show_dip_switches 00596A,00597E a6 bit_place
# 005962 "not.b D5" 00597A "bsr $5990" the bank's DIP switches, a bit at a time
local show_dip_switches 005962,00597A d5 switches
# 005958 "lsl.w #2, D6" the bank times 4, its entry in dip_switch_ports and dip_switch_places
local show_dip_switches 005958 d6 bank_offset
# 00594E "moveq #$0, D7" 005986 "addq.b #1, D7" the bank of DIP switches shown, 0 to 2
local show_dip_switches 00594E,005986 d7 bank
# 005992 "lsr.b #1, D5" the inputs, whose low bit is shown
param show_input_bit d5 inputs
# 005992 "lsr.b #1, D5" the inputs moved down to the next bit
local show_input_bit 005992 d5 inputs
# 00599A "move.b #$0, ($0,A6)" 0059A0 "move.b D4, ($1,A6)" the place in the fixed layer of the 0 or 1
param show_input_bit a6 bit_place
# 005990 "moveq #$0, D4" 005998 "moveq #$1, D4" the tile shown, 0 or 1
local show_input_bit 005990,005998 d4 bit_tile
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local coin_counter_test_clear 005D94 d7 job
# 005A2C "lea $5a58.l, A5" the list of jobs that print the page's texts, for queue_jobs
local draw_coin_counter_test 005A2C a5 jobs
# 005AD2 "movea.l $5b40.l, A6" 005AEA "movea.l $5b44.l, A6" the place in the fixed layer of the counter's number, then of its pulses
# type: the K052109's tile RAM (100000-107FFF): 005AD2 "movea.l $5b40.l, A6" (coin_counter_places)
local pulse_coin_counters 005AD2,005AEA a6 tile_place io
# 005ADE "addq.b #1, D7" 005AF6 "addq.b #1, D7" the digit shown: the counter, then its pulse
local pulse_coin_counters 005ADE,005AF6 d7 digit
# 005B14 "bset D6, D7" board_control with the counter's bit, pulsing it
local pulse_coin_counters 005B14 d7 control
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local sound_test_clear 005D94 d7 job
# 005B78 "lea $5b9c.l, A5" the list of jobs that print the page's texts, for queue_jobs
local draw_sound_test 005B78 a5 jobs
# 005BDE "movea.l #$1008ca, A6" the place in the fixed layer of the code shown, for draw_hex_digits
local sound_test_play 005BDE a6 tile_place
# 005BB8 "move.b #$0, D7" 0 for queue_test_sound: the sound stopped
local sound_test_play 005BB8 d7 sound
# 005BCA "move.b $635fa.l, D7" the sound test's place in sound_test_codes
local sound_test_play 005BCA d7 position
# 005BD0 "move.b (A6,D7.w), D7" the code played, from sound_test_codes; the page is over at 0
local sound_test_play 005BD0 d7 sound
# 005BE8 "move.b $635fb.l, D7" the number shown with it, for draw_hex_digits
local sound_test_play 005BE8 d7 number_shown
# 005D94 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local dip_switch_clear 005D94 d7 job
# 005C4C "lea $5c5e.l, A5" the list of jobs that print the page's texts, for queue_jobs
local draw_dip_switch_page 005C4C a5 jobs
# 005CA0 "movea.l #$10032e, A6" the place in the fixed layer of the coins and credits
local show_coinage 005CA0 a6 tile_place
# 005C98 "move.b (A6,D6.w), D0" the coins of the setting, from coinage_coins
local show_coinage 005C98 d0 coins
# 005C9C "move.b ($1,A6,D6.w), D1" the credits they give, from coinage_credits
local show_coinage 005C9C d1 credits
# 005CBA "move.b #$10, D4" 005CC8 "move.b #$23, D4" the tile after COIN: a blank, or S for more than one
local show_coinage 005CBA,005CC8 d4 coins_plural
# 005CBE "move.b D4, D5" 005CD4 "move.b #$23, D5" the tile after CREDIT: a blank, or S for more than one
local show_coinage 005CBE,005CD4 d5 credits_plural
# 005C84 "move.b $a0011.l, D6" 005C8C "andi.b #$f, D6" 005C96 "lsl.b #1, D6" the coinage DIP switches times 2, their entry in coinage_coins and coinage_credits
local show_coinage 005C84,005C8A,005C8C,005C96 d6 coinage_offset
# 005CEC "move.w #$1007, D7" the job for queue_job: the test mode's text 7
local show_coinage 005CEC d7 job
# 005CF6 "move.w #$1013, D7" the job for queue_job: the test mode's text 0x13
local show_free_play_setting 005CF6 d7 job
# 005D00 "move.b $a0013.l, D7" 005D08 "andi.b #$60, D7" 005D0C "lsr.b #5, D7" the difficulty DIP switches (bits 5-6)
local show_difficulty 005D00,005D06,005D08,005D0C d7 difficulty_switches
# 005D0E "addi.b #$9, D7" the difficulty's text, 9 on
local show_difficulty 005D0E d7 text_number
# 005D78 "addi.w #$1000, D7" the job for queue_job: job 0x10, the test mode's text
local show_difficulty 005D78 d7 job
# 005D1E "move.b $a0013.l, D7" 005D24 "not.b D7" the DIP switches of the lives (low two bits)
local show_lives_setting 005D1E,005D24 d7 switches
# 005D2A "move.b (A6,D7.w), D7" the tile of the lives a credit gives, from lives_settings
local show_lives_setting 005D2A d7 lives_tile
# 005D40 "moveq #$d, D7" 005D4E "addq.b #1, D7" the text: demo sound on, or one more for off
local show_demo_sound 005D40,005D4E d7 text_number
# 005D78 "addi.w #$1000, D7" the job for queue_job: job 0x10, the test mode's text
local show_demo_sound 005D78 d7 job
# 005D54 "moveq #$f, D7" 005D62 "addq.b #1, D7" the text: the screen normal, or one more for upside down
local show_screen_setting 005D54,005D62 d7 text_number
# 005D78 "addi.w #$1000, D7" the job for queue_job: job 0x10, the test mode's text
local show_screen_setting 005D78 d7 job
# 005D68 "moveq #$11, D7" 005D76 "addq.b #1, D7" the text: the test switch, or one more for its other side
local show_test_switch 005D68,005D76 d7 text_number
# 005D78 "addi.w #$1000, D7" the job for queue_job: job 0x10, the test mode's text
local show_test_switch 005D78 d7 job
# 005DC0 "move.b $6005b.l, D7" 005DD2 "andi.b #$2, D7" 005DE2 "eori.b #$7, D7" tile_flip, flipped by the screen's DIP switch outside the colour test
local test_page_controls 005DC0,005DD2,005DE2 d7 flip
# 005DF4 "move.b #$0, D7" 0 for queue_test_sound: the sound stopped
local stop_test_sound 005DF4 d7 sound
# 005E04 "move.b D7, (A6)+" the sound command queued
param queue_test_sound d7 sound
# 005DFE "movea.l $60018.l, A6" 005E04 "move.b D7, (A6)+" 005E10 "movea.l #$60400, A6" the place in sound_queue the command goes to, wrapped round
# type: a slot of sound_queue: 005E10 "movea.l #$60400, A6"
local queue_test_sound 005DFE,005E04,005E10 a6 queue_place queued_sound

# ---- objects/explosions.c ----
# 010EE2 "bsr $1104a" how far across from the object the explosion goes, for place_explosion
param start_small_explosion d6 x_offset
# 010EE2 "bsr $1104a" how far above the object's height the explosion goes, for place_explosion
param start_small_explosion d7 height_offset
# 010EFE "bsr $10f80" the object for the explosion, handed to start_big_explosion
param boss_start_explosion a6 explosion
# 010EF4 "lsl.w #2, D7" the boss's explosions so far times 4, the pair in boss_explosion_x and boss_explosion_height
local boss_start_explosion 010EF4 d7 explosion_offset
# 010EFA "move.w ($2,A5,D7.w), D7" how far above the boss the explosion goes, from boss_explosion_height
local boss_start_explosion 010EFA d7 height_offset
# 010EF6 "move.w (A5,D7.w), D6" how far across from the boss the explosion goes, from boss_explosion_x
local boss_start_explosion 010EF6 d6 x_offset
# 010F0A "move.b ($2f,A0), D7" 010F0E "andi.b #$1, D7" the explosions so far (bit 0), the entry in explosion_sounds
local boss_start_explosion 010F0A,010F0E d7 sound_choice
# 010F12 "move.b (A5,D7.w), D7" the explosion's sound for queue_sound
local boss_start_explosion 010F12 d7 sound
# 010F92 "bra $1104a" how far across from the object the explosion goes, for place_explosion
param start_big_explosion d6 x_offset
# 010F92 "bra $1104a" how far above the object's height the explosion goes, for place_explosion
param start_big_explosion d7 height_offset
# 010FF2 "bsr $11000" the object for the explosion
param explode_small a6 explosion
# 010FEE "clr.w D6" 0 for start_small_blast: the explosion where the object is
local explode_small 010FEE d6 x_offset
# 010FF0 "clr.w D7" 0 for start_small_blast: the explosion at the object's height
local explode_small 010FF0 d7 height_offset
# 010FF6 "move.b #$11, D7" the explosion's sound for queue_sound
local explode_small 010FF6 d7 sound
# 011012 "bra $1104a" how far across from the object the explosion goes, for place_explosion
param start_small_blast d6 x_offset
# 011012 "bra $1104a" how far above the object's height the explosion goes, for place_explosion
param start_small_blast d7 height_offset
# 011000 "move.w #$500, ($0,A6)" 011006 "move.w #$3100, ($2,A6)" the object for the explosion, whose flags, kind and colour it sets
param start_small_blast a6 blast object
# 01105A "ext.l D6" 01105C "add.l D6, ($12,A6)" how far across from the object the explosion goes
param place_explosion d6 x_offset
# 011050 "add.w D7, ($10,A6)" how far above the object's height the explosion goes
param place_explosion d7 height_offset
# 011068 "move.w ($34,A0), D7" 01106C "lsl.w #8, D7" 01106E "addi.w #$200, D7" the object's depth times 256 and 0x200, taken off the explosion's y to put it in front
local place_explosion 011068,01106C,01106E d7 depth_offset

# ---- objects/helpers.c ----
# 011E10 "moveq #$0, D7" 011E34 "addq.b #1, D7" the turtles that can be picked, counted into boss_target_choices
local boss_pick_target 011E10,011E34 d7 choice_count
# 011E46 "jsr $48448.l" 011E4C "move.b (A5,D7.w), D7" what random_below gives: the entry of boss_target_choices picked
local boss_pick_target 011E46 d7 roll
# 011E50 "mulu.w #$50, D7" the turtle picked times 0x50, its object from the first
local boss_pick_target 011E50 d7 target_offset
# 011E64 "move.b #$1, D7" 1: a target was picked
local boss_pick_target 011E64 d7 picked
# 011E64 "move.b #$1, D7" whether a target was picked: 1, or 0 for none
param boss_pick_target d7 picked
# 011E6A "jsr $184d2.l" 011E86 "lsl.w #2, D0" the direction boss_direction_to_target gives
local boss_aim_at_target 011E6A d0 direction
# 011E86 "lsl.w #2, D0" 011E88 "move.w (A6,D0.w), D7" the direction times 4, its pair in the speeds
local boss_aim_at_target 011E86 d0 direction_offset
# 018302 "move.w ($1e,A0), D7" the object's height speed, added to its height and handed back
local move_by_speeds 018302 d7 height_speed
# 018318 "subq.b #1, D7" the objects left to look at; left over, not 0, when a free one is found
param find_free_object d7 objects_left
# 018318 "subq.b #1, D7" the objects left to look at
local find_free_object 018318 d7 objects_left
# 01853A "move.b (A6,D3.w), D0" 018542 "move.b (A6,D2.w), D0" 01854A "move.b ($3,A6,D2.w), D0" the direction from the boss to its target, one of sixteen
param boss_direction_to_target d0 direction
# 0184E6 "sub.w ($c,A0), D0" 0184F0 "not.w D0" 0184F2 "addq.b #1, D0" how far the target is from the boss across the screen
local boss_direction_to_target 0184E6,0184F0,0184F2 d0 x_distance
# 018514 "mulu.w #$3e8, D0" 018518 "divu.w D1, D0" the distance down over the distance across, times 1000
local boss_direction_to_target 018514,018518 d0 slope
# 01853A "move.b (A6,D3.w), D0" 018542 "move.b (A6,D2.w), D0" 01854A "move.b ($3,A6,D2.w), D0" the direction from boss_slope_directions or boss_axis_directions
local boss_direction_to_target 01853A,018542,01854A d0 direction
# 0184F8 "sub.w ($e,A0), D1" 018502 "not.w D1" 018504 "addq.b #1, D1" how far the target is from the boss up or down the screen
local boss_direction_to_target 0184F8,018502,018504 d1 y_distance
# 0184DA "move.l D0, D2" 0184EE "addq.b #1, D2" 018500 "addq.b #2, D2" the quadrant: one for the target on the left, two for above
local boss_direction_to_target 0184DA,0184EE,018500 d2 quadrant
# 018512 "clr.l D3" 018526 "addq.w #2, D3" the place in boss_axis_directions' slopes the slope is under, two bytes each
local boss_direction_to_target 018512,018526 d3 slope_offset

# ---- objects/spawns.c ----
# 04793E "movea.l (A6,D0.w), A5" the speeds of the area's spawn scroll, cleared and kept in spawn_speeds
# type: layer B's x_speed (area_spawn_scrolls: 0x06338C): 04793E "movea.l (A6,D0.w), A5" 047942 "clr.l (A5)"
local start_area_spawns 04793E a5 speeds layer+C
# 04792C "lsl.w #2, D0" the area times 4, its entry in area_spawn_lists
local start_area_spawns 04792C d0 area_offset
# 04793C "lsl.w #1, D0" the area times 8, its pair in area_spawn_scrolls and area_spawn_starts
local start_area_spawns 04793C d0 scroll_offset
# 047A32 "movea.l $61210.l, A5" the spawn scroll's speeds (spawn_speeds)
local spawn_enemies 047A32 a5 speeds
# 047A38 "movea.l $61214.l, A6" the spawn scroll's directions (spawn_directions)
local spawn_enemies 047A38 a6 directions
# 047A3E "move.w (A5), D0" 047A48 "neg.w D0" the spawn scroll's step across, added to spawn_x
local spawn_enemies 047A3E,047A48 d0 x_step
# 047A52 "move.w ($2,A5), D1" 047A5C "neg.w D1" the spawn scroll's step up or down, added to spawn_y
local spawn_enemies 047A52,047A5C d1 y_step
# 047AE4 "move.w ($0,A0), D3" 047AF2 "add.w (A1), D3" 047AFC "sub.w (A1), D3" the enemy's x in pixels: the record's, moved in by the screen margin
local spawn_enemies 047AE4,047AF2,047AF8,047AFC d3 enemy_x
# 047B28 "cmp.w ($2,A0), D1" 047B32 "cmp.w ($2,A0), D1" the spawn record of the next enemy
param spawn_enemy_level_with_scroll a0 spawn spawn_record
# 047B38 "bsr $47b98" 047B8A "sub.w ($2,A1), D3" the screen margin spawn_offset gives for the enemy's kind
local spawn_enemy_level_with_scroll 047B38 a1 margin screen_margin
# 047B24 "addi.w #$8, D1" the spawn scroll's y in pixels, 8 down
local spawn_enemy_level_with_scroll 047B24 d1 scroll_y
# 047B78 "move.w ($2,A0), D3" 047B86 "subi.w #$100, D3" 047B8A "sub.w ($2,A1), D3" the enemy's y in pixels: the record's, moved in by the screen margin
local spawn_enemy_level_with_scroll 047B78,047B86,047B8A d3 enemy_y
# 047BA8 "adda.w D1, A1" the screen margin of the enemy's kind in spawn_offsets
local spawn_offset 047BA8 a1 margin
# 047BC0 "lsr.w #2, D0" the record's group of objects times 4, its entry in object_groups
local take_free_object 047BC0 d0 group_offset
# 047BC6 "lsr.w #2, D0" the group, its entry in object_group_counts
local take_free_object 047BC6 d0 group

# ---- stage/area_clear.c ----
# 01A996 "move.b #$88, D0" the y in pixels below which the thrown enemies are taken away
local check_cleared_sewer 01A996 d0 limit_y
# 01AAFC "move.b $600a1.l, D0" 01AB02 "lsr.b #1, D0" the players in play, a bit each, looked at one after another
local players_ready 01AAFC,01AB02 d0 players

# ---- stage/fire.c ----
# 01FEC0 "movea.l (A0,D0.w), A0" 01FF22 "movea.l (A0,D0.w), A0" the fire's record of the spot: its place, then its frames' blocks
local animate_fire_tiles 01FEC0,01FF22 a0 spot_record fire_spot_long
# 01FECE "movea.l (A0,D0.w), A0" 01FF30 "movea.l (A0,D0.w), A0" 0200EA "addq.l #2, A0" the frame's blocks of the spot, a column at a time
local animate_fire_tiles 01FECE,01FF30,0200EA a0 frame_blocks fire_block_offset
# 01FEC4 "movea.l (A0)+, A2" 01FF26 "movea.l (A0)+, A2" 0200E8 "addq.l #8, A2" the place in the tile RAM of the spot's next column
# type: the K052109's tile RAM (100000-107FFF), the spot's place from its fire_tiles record (0x102A00 for the first spot): 01FF48 "move.b D1, ($0,A2)"
local animate_fire_tiles 01FEC4,01FF26,0200E8 a2 tile_place io
# 01FE62 "move.b $600a5.l, D0" frame_count's low byte, against fire_last_frame
local animate_fire_tiles 01FE62 d0 frame
# 01FEB8 "lsl.w #2, D0" 01FF1A "lsl.w #2, D0" the fire's spot times 4, its entry in the fire's tiles
local animate_fire_tiles 01FEB8,01FF1A d0 spot_offset
# 01FF40 "move.w ($0,A0), D0" 01FFE8 "move.w (A0,D6.w), D0" 020090 "move.w (A0,D5.w), D0" the block's offset in fire_blocks, from the frame's blocks
local animate_fire_tiles 01FF40,01FFE8,020090 d0 block_offset
# 01FF44 "move.b (A1,D0.w), D1" 01FFEC "move.b (A1,D0.w), D1" 020094 "move.b (A1,D0.w), D1" the block's first byte, the attribute of its tiles
local animate_fire_tiles 01FF44,01FFEC,020094 d1 tile_attribute
# 01FEDC "moveq #$10, D5" 01FF3E "moveq #$20, D5" the offset in the frame's blocks of the third row of blocks
local animate_fire_tiles 01FEDC,01FF3E d5 third_row_offset
# 01FEDA "moveq #$8, D6" 01FF3C "moveq #$10, D6" the offset in the frame's blocks of the second row of blocks
local animate_fire_tiles 01FEDA,01FF3C d6 second_row_offset

# ---- system/sound_commands.c ----
# 0091BA "cmpi.b #$60, D7" 0091C2 "cmpi.b #$6b, D7" the sound or voice queued; 0x60-0x6B are the musics, kept out of the demo
param queue_sound d7 sound
# 0091DA "move.b D7, (A6)+" the command for the sound board
param queue_sound_command d7 command
# 0091D4 "movea.l $60018.l, A6" 0091DA "move.b D7, (A6)+" 0091E6 "lea $60400.l, A6" the place in sound_queue the command goes to, wrapped round
# type: a slot of sound_queue: 0091E6 "lea $60400.l, A6"
local queue_sound_command 0091D4,0091DA,0091E6 a6 queue_place queued_sound
# 0091F8 "move.b D0, D7" the sound, for queue_sound
param queue_sound_d0 d0 sound
# 0091F8 "move.b D0, D7" the sound, for queue_sound
local queue_sound_d0 0091F8 d7 sound_to_queue
# 009202 "movea.l $6001c.l, A6" 009212 "move.b (A6)+, D7" 00921E "lea $60400.l, A6" the place in sound_queue of the next command, wrapped round
# type: a slot of sound_queue: 00921E "lea $60400.l, A6"
local send_sound_command 009202,009212,00921E a6 queue_place queued_sound
# 009212 "move.b (A6)+, D7" 00922A "move.b D7, $a0009.l" the command sent to the sound board's latch
local send_sound_command 009212 d7 command
# 009230 "move.b $60058.l, D6" 009236 "ori.b #$8, D6" board_control with bit 3, the sound board's interrupt
local send_sound_command 009230,009236 d6 control

# ---- engine/directions.c ----
# 047DE4 "or.b (A5,D1.w), D0" the direction from the object to the place
param direction_to d0 direction
# 047D98 "clr.w D0" 047DA0 "moveq #$40, D0" 047DAE "eori.b #$c0, D0" 047DE4 "or.b (A5,D1.w), D0" the direction: its quadrant's bits, then the angle from direction_table
local direction_to 047D98,047DA0,047DAE,047DE4 d0 direction
# 047D9A "sub.w ($c,A0), D1" the screen x of the place
param direction_to d1 screen_x
# 047D9A "sub.w ($c,A0), D1" 047DA2 "neg.w D1" 047DBE "lsr.w D3, D1" how far the place is from the object across, halved until it fits the table
local direction_to 047D9A,047DA2,047DBE,047DEA d1 x_distance
# 047DD0 "exg D1, D2" the distance across, or the one up or down when they are swapped for the table
local direction_to 047DD0 d1 distance
# 047DB2 "moveq #$0, D3" 047DEC "addq.b #1, D3" 047DF2 "addq.b #1, D3" how many times the larger distance was halved, the smaller one shifted as many
local direction_to 047DB2,047DEC,047DF2 d3 shift

# ---- scenes/attract.c ----
# 004986 "addi.b #$30, D6" the tile layer B is filled with, less 0x30
param fill_layer_b d6 tile_number
# 004986 "addi.b #$30, D6" 004996 "move.b D6, (A6)+" the code of the tile
local fill_layer_b 004986 d6 tile_code
# 004982 "bsr $499e" the colour's number for fill_colour
param fill_layer_b d7 colour_number
# 004982 "bsr $499e" 004994 "move.b D7, (A6)+" the colour fill_colour gives, the tiles' attribute
local fill_layer_b 004982 d7 colour
# 00498E "lea $104000.l, A6" 004994 "move.b D7, (A6)+" 004996 "move.b D6, (A6)+" the place in layer B's tile RAM of the next tile
local fill_layer_b 00498E,004994,004996 a6 tile_place
# 0049A4 "move.b (A6,D7.w), D7" the colour's number in text_colours
param fill_colour d7 colour_number
# 0049A4 "move.b (A6,D7.w), D7" the colour from text_colours
local fill_colour 0049A4 d7 colour
# 0049B6 "move.w #$7e, D7" the sound for queue_sound as a coin comes in
local attract_title 0049B6 d7 sound
# 004A1A "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local title_clear 004A1A d7 job
# 004A78 "moveq #$3, D6" the tile layer B is filled with, for fill_layer_b
local title_background 004A78 d6 tile_number
# 004A76 "moveq #$1, D7" the colour's number for fill_layer_b
local title_background 004A76 d7 colour_number
# 004B14 "lea $4b58.l, A6" 004B26 "lea $4b64.l, A6" the places of the logo's pieces, by the version's title
# type: the logo's pieces' places on the screen (004B58, 004B64): 004B30 "move.w (A6,D7.w), ($c,A0)"
local start_title_logo 004B14,004B26 a6 piece_places logo_place
# 004AEA "move.w #$0, D6" 004AF6 "move.w #$1, D6" 004B02 "move.w #$8, D6" the piece's entry in the logo's animations: 0, 1 or 8
local start_title_logo 004AEA,004AF6,004B02 d6 animation_number
# 004AE0 "move.b $6009f.l, D7" the game's version, which title it shows
local start_title_logo 004AE0 d7 title_version
# 004AE6 "lsl.w #3, D7" the version times 8, its animations in title_logo_animations
local start_title_logo 004AE6 d7 version_offset
# 004B2E "lsl.w #2, D7" the piece times 4, its place in the places
local start_title_logo 004B2E d7 piece_offset
# 004C58 "lea $4c76.l, A5" 004C6A "lea $4c7c.l, A5" the list of jobs that print the copyright, for queue_jobs
local title_turtles_slide_in 004C58,004C6A a5 jobs
# 004F5C "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local profile_clear_layers 004F5C d7 job
# 004FB4 "movea.l (A6,D7.w), A6" the character's profile text, from profile_texts
local profile_start_text 004FB4 a6 text
# 004FAC "move.b $60128.l, D7" the character whose profile shows (profile_character)
local profile_start_text 004FAC d7 profile_number
# 004FB8 "moveq #$1, D7" 1 for start_text_typed_in_colours: each pass two frames after the last
local profile_start_text 004FB8 d7 delay_shift
# 004FC6 "move.w #$78, D7" the profile's music for queue_sound
local profile_start_text 004FC6 d7 sound
# 00504E "move.b $60128.l, D7" the character whose profile shows, his entry in profile_motions
local profile_start_picture 00504E d7 profile_number
# 0050E2 "move.w #$78, D7" the profile's music again after a coin stopped it
local profile_move_picture 0050E2 d7 sound
# 005150 "move.w #$fe, D7" 005164 "move.w #$78, D7" the sounds for queue_sound: the fade at the end, or the music again
local profile_type_text 005150,005164 d7 sound
# 0051EC "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local attract_end_clear 0051EC d7 job
# 00526C "lea $140400.l, A5" 005274 "move.b (A6)+, (A5)+" the place in the sprite RAM of the next byte copied
local copy_sprites_and_fill_layer_b 00526C,005274 a5 sprite_place
# 00528C "moveq #$1, D6" the tile layer B is filled with, for fill_layer_b
local copy_sprites_and_fill_layer_b 00528C d6 tile_number
# 00528A "moveq #$1, D7" the colour's number for fill_layer_b
local copy_sprites_and_fill_layer_b 00528A d7 colour_number
# 00894E "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local coin_screen_clear 00894E d7 job
# 0089B0 "or.w $60118.l, D0" 0089B6 "or.b $60091.l, D0" the players' lives together, with free_play: none means the opening
local coin_screen_check_credits 0089B0,0089B6 d0 any_lives
# 0089C8 "move.w #$7e, D7" the coin screen's music for queue_sound
local coin_screen_check_credits 0089C8 d7 sound
# 008A1E "move.w #$b5f, D7" the job for queue_job: job 0xB, the four boxes with their lives and health
local coin_screen_boxes 008A1E d7 job
# 008A3E "lea $8abe.l, A5" the list of jobs that print the Konami texts, for queue_jobs
local coin_screen_draw 008A3E a5 jobs
# 008A72 "moveq #$0, D7" 008A84 "bset D6, D7" the players with lives, a bit each: their turtles' pictures shown
local coin_screen_draw 008A72,008A84 d7 players
# 008AB2 "move.w #$6f, D7" the coin screen's music for queue_sound
local coin_screen_draw 008AB2 d7 sound
# 008AE2 "move.w #$6f, D7" the coin screen's music again after a coin stopped it
local coin_screen_wait 008AE2 d7 sound
# 008B0C "or.b $600a2.l, D7" the job for queue_job: job 0xB, the boxes of the players credited with their lives
local coin_screen_wait 008B0C d7 job
# 008B66 "btst D6, D7" 008B7A "btst #$7, D7" the players whose pictures are drawn, a bit each; bit 7 for the black ones, bit 6 to blink
param draw_turtle_pictures d7 players
# 008B60 "lea $600c4.l, A4" player_turtles, each player's turtle
local draw_turtle_pictures 008B60 a4 player_turtles_place
# 008B74 "lea $8bea.l, A5" 008B82 "lea $8c2a.l, A5" 008B88 "adda.w D5, A5" the picture's sprites (in colour, or the black ones), the turtle's or the player's
local draw_turtle_pictures 008B74,008B82,008B88,008BA2,008BB0,008BB6 a5 sprites picture_sprite_byte
# 008B5A "lea $140400.l, A6" 008BDE "adda.l #$10, A6" the place in the sprite RAM of the player's picture
# type: the K051960's sprite RAM: 008B5A "lea $140400.l, A6"
local draw_turtle_pictures 008B5A,008BDE a6 sprite_place io
# 008B72 "lsl.w #4, D5" 008BA0 "lsl.w #4, D5" the turtle (then the player) times 16, its sprites in the table
local draw_turtle_pictures 008B72,008BA0 d5 picture_offset
# 008CEE "move.w #$7e, D7" the sound for queue_sound as a coin comes in
local attract_opening 008CEE d7 sound
# 008D56 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local opening_setup_clear 008D56 d7 job
# 008EAA "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local best_players_clear 008EAA d7 job
# 008F34 "move.b #$8f, D7" 0x8F for draw_turtle_pictures: the four turtles, in black
local best_players_draw 008F34 d7 players
# 008FC0 "lea $140400.l, A6" 008FD2 "adda.w #$8, A6" 009010 "adda.w #$8, A6" the place in the sprite RAM of the next sprite, moved across
local best_players_scroll 008FC0,008FD2,009010 a6 sprite_place
# 00902E "lea $9190.l, A5" the list of jobs that print the title and the places, for queue_jobs
local draw_best_players 00902E a5 jobs
# 009054 "lea $2884.l, A3" the big font's tiles, two per character
local draw_best_players_initials 009054 a3 font_tiles
# 009048 "lea $635c8.l, A5" 0090A2 "adda.w #$4, A5" the player's three initials in ranking_initials
# type: a record of ranking_initials: 009048 "lea $635c8.l, A5" 0090A2 "adda.w #$4, A5"
local draw_best_players_initials 009048,0090A2 a5 initials ranking_name
# 009042 "movea.l $917e.l, A6" 009082 "adda.w #$4, A6" 00909E "adda.w #$f8, A6" the place in the tile RAM of the next initial
local draw_best_players_initials 009042,009082,009090,00909E a6 tile_place
# 00905C "move.b (A4,D7.w), D6" the place's colour, from best_players_colours
local draw_best_players_initials 00905C d6 colour
# 00907A "move.b ($0,A5), D6" 009088 "move.b ($1,A5), D6" 009096 "move.b ($2,A5), D6" the initial drawn
local draw_best_players_initials 00907A,009088,009096 d6 character
# 00905A "moveq #$0, D7" 0090A6 "addq.b #1, D7" the player's place in the table, 0 to 9
local draw_best_players_initials 00905A,0090A6 d7 place
# 0090B0 "subi.b #$30, D6" the character drawn
param draw_best_players_character d6 character
# 0090B4 "lsl.w #1, D6" the character less '0' times 2, its tiles in the big font's
local draw_best_players_character 0090B4 d6 character_offset
# 0090B6 "move.b (A3,D6.w), ($1,A6)" 0090BC "move.b ($1,A3,D6.w), ($81,A6)" the big font's tiles, two per character
# type: big_font_tiles_table, which its callers hand it (009054 "lea $2884.l, A3"): 0090B6 "move.b (A3,D6.w), ($1,A6)"
param draw_best_players_character a3 font_tiles font_tile
# 0090B6 "move.b (A3,D6.w), ($1,A6)" 0090BC "move.b ($1,A3,D6.w), ($81,A6)" the place in the tile RAM of the character
param draw_best_players_character a6 tile_place
# 0090E6 "movea.l A6, A2" the place in the tile RAM of the score's last digit, PTS after it
# type: the K052109's tile RAM (100000-107FFF): 0090E6 "movea.l A6, A2"
local draw_best_players_scores 0090E6 a2 score_place io
# 0090C4 "lea $63500.l, A5" 00916E "adda.w #$2, A5" the player's score in ranking_scores
# type: a score of ranking_scores: 0090C4 "lea $63500.l, A5" 00916E "adda.w #$2, A5"
local draw_best_players_scores 0090C4,00916E a5 score ranking_score
# 0090E4 "adda.l D6, A6" 009116 "suba.w #$4, A6" the place in the tile RAM of the next digit, one left at a time
# type: the K052109's tile RAM (100000-107FFF): 0090D8 "movea.l $9182.l, A6" (best_players_places) 0090E4 "adda.l D6, A6"
local draw_best_players_scores 0090E4,009116 a6 tile_place io
# 0090E8 "move.w ($0,A5), D0" 009114 "lsr.w #4, D0" the score's digits left, the last in the low four bits
local draw_best_players_scores 0090E8,009114 d0 score_digits
# 009100 "move.b D0, D5" 009106 "lsl.w #1, D5" the score's last digit times 2, its tiles in big_font_tiles_table
local draw_best_players_scores 009100,009106 d5 digit_offset
# 0090F2 "move.b (A4,D7.w), D6" 00911C "move.b (A4,D7.w), D6" the place's colour, from best_players_colours
local draw_best_players_scores 0090F2,00911C d6 colour
# 0090D6 "moveq #$0, D7" 009172 "addq.b #1, D7" the player's place in the table, 0 to 9
local draw_best_players_scores 0090D6,009172 d7 place

# ---- video/tile_blocks.c ----
# 018334 "bsr $183b6" the text's colour number that start_typed_text hands back
local start_typed_text_at_once 018334 d7 colour_number
# 018334 "bsr $183b6" the text to type: its place, delay, colour and characters
param start_typed_text_at_once a6 text
# 01835A "movea.l $63420.l, A5" 018378 "movea.l $63420.l, A5" 01837E "move.b $6342b.l, (A5)+" the place in the tile RAM of the next character
local type_next_character 01835A,018378,01837E a5 tile_place
# 018354 "movea.l $63424.l, A6" 018360 "move.b (A6)+, D7" 018376 "move.b (A6)+, D7" the text's next character
local type_next_character 018354,018360,018372,018376 a6 text_record
# 0183B6 "move.l (A6)+, $63420.l" 0183BC "move.b (A6)+, $63429.l" the text: its place, the frames between characters, its colour, then its characters
param start_typed_text a6 text
# 0183B6 "move.l (A6)+, $63420.l" 0183BC "move.b (A6)+, $63429.l" the text's next byte
local start_typed_text 0183B6,0183BC a6 text
# 0183F2 "movea.l $63424.l, A6" the text's characters (typed_text)
local start_typed_text 0183F2 a6 text
# 0183C4 "move.b (A6)+, D7" 0183D8 "bclr #$7, D7" the text's colour number (bit 7 off)
param start_typed_text d7 colour_number
# 0183C4 "move.b (A6)+, D7" 0183D8 "bclr #$7, D7" the text's colour number, its entry in text_colours
local start_typed_text 0183C4,0183D8 d7 colour_number
# 018404 "lsl.w #2, D7" the block's place: its entry in tile_block_places
param draw_tile_block d7 place
# 01841C "move.b (A6)+, D7" 01841E "move.b (A6)+, D6" the block: its width and height, then its tiles
param draw_tile_block a6 block tile_block_byte
# 01841C "move.b (A6)+, D7" 018426 "move.b (A6)+, (A4,D3.w)" 01842A "move.b (A6)+, ($1,A4,D3.w)" the block's next byte
local draw_tile_block 01841C,01841E,018426,01842A a6 block tile_block_byte
# 01840A "move.l A5, D7" 01840E "andi.l #$ffffff80, D7" the start of the tile RAM's row the place is in
local draw_tile_block 01840A,01840E d7 first_row_place
# 018416 "movea.l D7, A5" 018452 "movea.l D2, A5" the start of the row the block's next row goes in, wrapped in the layer
local draw_tile_block 018416,018452 a5 row_place
# 01840C "move.l D7, D4" 018414 "sub.l D7, D4" the place's offset from its row's start
local draw_tile_block 01840C,018414 d4 column_offset
# 018420 "movea.l A5, A4" the row the tiles go in
# type: the K052109's tile RAM (100000-107FFF): 018406 "movea.l (A5,D7.w), A5" from tile_block_places (0x1042EC...) 018420 "movea.l A5, A4"
local draw_tile_block 018420 a4 tile_row io
# 018424 "move.w D4, D3" 018432 "andi.w #$7f, D3" the offset in the row of the next tile, wrapped round
local draw_tile_block 018424,018432 d3 column
# 01841C "move.b (A6)+, D7" the block's width less one, its tiles in a row
local draw_tile_block 01841C d7 width
# 01846A "movea.l #$100e24, A6" 018480 "movea.l #$100e30, A6" the place in the tile RAM of the number's last digit
local show_spawn_scroll_place 01846A,018480 a6 tile_place
# 018468 "lsr.l #8, D7" 01847E "lsr.l #8, D7" the spawn scroll's x, then y, in pixels, for draw_hex_digits
local show_spawn_scroll_place 018468,01847E d7 number
# 018490 "move.w D7, D0" 018496 "lsr.l #4, D7" the number drawn, its last digit first
param draw_hex_digits d7 number
# 018496 "lsr.l #4, D7" the number's digits left
local draw_hex_digits 018496 d7 number
# 0184A8 "move.b #$0, ($0,A6)" 0184AE "move.b D1, ($1,A6)" the place in the tile RAM of the number's last digit
param draw_hex_digits a6 tile_place
# 0184B2 "suba.l #$2, A6" the place of the next digit, one left
local draw_hex_digits 0184B2 a6 tile_place
# 018492 "andi.w #$f, D0" the number's last digit, its entry in hex_digits
local draw_hex_digits 018492 d0 digit
# 0184A4 "subi.w #$30, D1" 0184AE "move.b D1, ($1,A6)" the digit's tile
local draw_hex_digits 0184A4 d1 tile_code
# 01858E "move.w D7, D5" how far each pass is put off after the one before, as a shift of its number
param start_text_typed_in_colours d7 delay_shift
# 018592 "movea.l A6, A5" the text typed, for start_typed_line
param start_text_typed_in_colours a6 text
# 018598 "movea.l A5, A6" the text again for the next pass
local start_text_typed_in_colours 018598 a6 text
# 018592 "movea.l A6, A5" the text, kept while start_typed_line reads it
local start_text_typed_in_colours 018592 a5 kept_text
# 01858E "move.w D7, D5" the shift, kept
local start_text_typed_in_colours 01858E d5 kept_shift
# 01859A "move.b D7, D6" the pass, shifted into its wait
local start_text_typed_in_colours 01859A d6 pass_number
# 0185B6 "lea $63476.l, A4" 0185C6 "suba.l #$a, A4" the pass typed on, ten bytes each
local type_text_in_colours 0185B6,0185C6 a4 typed_pass
# 0185E6 "movea.l ($0,A4), A5" 018602 "movea.l ($0,A4), A5" 01860C "move.b (A2,D7.w), (A5)+" the place in the tile RAM of the pass's next character
local type_colour_pass 0185E6,018602,01860C a5 tile_place
# 01875E "lea $100000.l, A6" 018768 "move.b #$0, (A6)+" 01876C "move.b #$3a, (A6)+" the place in the fixed layer of the next tile covered
local start_box_opening 01875E,018768,01876C a6 tile_place
# 01868C "movea.l $63490.l, A6" the place of the box's top left corner (box_place)
local grow_tile_box 01868C a6 corner_place
# 018698 "move.b $63496.l, D7" the tile of the box's outline (box_tile)
local grow_tile_box 018698 d7 tile_code
# 01877E "move.b D7, (A5)+" 01879A "move.b D7, ($1,A6)" the tile of the outline
param draw_tile_box d7 tile_code
# 018778 "movea.l A6, A5" the place in the tile RAM of the box's top left corner
param draw_tile_box a6 corner_place
# 018784 "adda.w #$80, A6" 0187A8 "adda.w #$80, A6" 0187B4 "move.b D7, (A6)+" the place of the sides' next row, then of the bottom row's next tile
local draw_tile_box 018784,0187A8,0187B0,0187B4 a6 tile_place
# 018778 "movea.l A6, A5" 01877A "move.b #$0, (A5)+" 01877E "move.b D7, (A5)+" the place of the top row's next tile
local draw_tile_box 018778,01877A,01877E a5 top_place
# 01878C "lsl.w #1, D4" the box's width times 2: the right side's offset from the left
local draw_tile_box 01878C d4 right_offset
# 008B66 "btst D6, D7" the players whose pictures are drawn, for draw_turtle_pictures
param draw_four_turtle_pictures d7 players

# ---- objects/air_attacks.c ----
# 012D7A "move.b #$a, D7" the helicopter's sound for queue_sound
local helicopter_start 012D7A d7 sound
# 012E1E "lea $62a00.l, A6" 012E2A "jsr $1830c.l" the object for the bullet, from object 32 on: the first free one find_free_object finds
local helicopter_fire_bullets 012E1E,012E2A a6 bullet
# 012E68 "lea $62780.l, A6" 012E74 "jsr $1830c.l" the object for the missile, from object 24 on: the first free one find_free_object finds
local helicopter_drop_missiles 012E68,012E74 a6 missile
# 010FCA "clr.w D6" 0 for place_explosion: the explosion where the helicopter is
local helicopter_struck 010FCA d6 x_offset
# 010FCC "clr.w D7" 0 for place_explosion: the explosion at its height
local helicopter_struck 010FCC d7 height_offset
# 012EEC "move.w #$9, D7" the sound for queue_sound with the last helicopter down
local helicopter_struck 012EEC d7 sound
# 012EFC "move.b #$8, D7" 012F02 "jsr $1830c.l" 012F08 "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local helicopter_struck 012EFC,012F00,012F02 d7 objects_left
# 012FF4 "sub.w ($e,A6), D4" 012FFC "not.w D4" how far the turtle is from it up or down the screen
local helicopter_fly 012FF4,012FFC d4 y_distance
# 012FEE "moveq #$0, D5" 013006 "moveq #$1, D5" 1 when the nearest turtle is level with it: it closes in faster
local helicopter_fly 012FEE,013006 d5 in_line
# 013062 "addi.w #$10, D7" 013070 "not.w D7" how far from the turtle it hovers across, by frame_count, the other way when it faces right
local helicopter_fly 013062,013070 d7 hover_offset
# 0130A6 "move.b $600a5.l, D7" 0130AC "andi.b #$6, D7" frame_count's bits 1-2: the helicopter's entry in helicopter_shake_heights
local helicopter_shake 0130A6,0130AC d7 shake_offset
# 0130C6 "move.b $600a5.l, D7" 0130CC "andi.b #$3c, D7" 0130D0 "lsr.w #1, D7" frame_count's bits 2-5, halved: the helicopter's entry in helicopter_bob_heights
local helicopter_bob 0130C6,0130CC,0130D0 d7 bob_offset
# 01311C "move.w #$4, D7" the range for random_below, 4
local helicopter_random_wait 01311C d7 range
# 013120 "jsr $48448.l" 01313C "move.b (A6,D7.w), ($30,A0)" what random_below gives: its entry in the waits
local helicopter_random_wait 013120 d7 roll
# 013142 "move.b $60094.l, D7" the difficulty setting
local helicopter_random_wait 013142 d7 difficulty_level
# 013148 "lsl.b #3, D7" the difficulty times 8, taken off the wait
local helicopter_random_wait 013148 d7 wait_cut
# 01318E "move.l #$3800, D7" 0131A4 "move.l #$ffffd500, D7" how far across from the helicopter the bullet starts, the other way when it faces right
local helicopter_start_bullet 01318E,0131A4 d7 bullet_offset
# 013354 "lea $620f0.l, A5" 013382 "suba.w #$50, A5" the turtle a missile drops on, from the fourth down
local rain_missiles_on_turtles 013354,013382 a5 turtle
# 013366 "lea $623c0.l, A6" 013372 "jsr $1830c.l" the object for the missile, from object 12 on: the first free one find_free_object finds
local rain_missiles_on_turtles 013366,013372 a6 missile
# 01336C "move.b #$c, D7" 013372 "jsr $1830c.l" 013378 "tst.b D7" the objects find_free_object looks at for the missile, left over when it finds one
local rain_missiles_on_turtles 01336C,013370,013372 d7 objects_left
# 013400 "lea $623c0.l, A6" 01340C "jsr $1830c.l" the object for the drone, from object 12 on: the first free one find_free_object finds
local start_flying_drones 013400,01340C a6 drone
# 01340A "ext.w D7" 01340C "jsr $1830c.l" 013412 "tst.b D7" the objects find_free_object looks at for the drone, left over when it finds one
local start_flying_drones 01340A,01340C d7 objects_left
# 013624 "lea $62a00.l, A6" 013630 "jsr $1830c.l" the object for the shot, from object 32 on: the first free one find_free_object finds
local flying_drone_fire 013624,013630 a6 shot
# 0136A6 "move.b #$8, D7" 0136AC "jsr $1830c.l" 0136B2 "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local flying_drone_struck 0136A6,0136AA,0136AC d7 objects_left
# 01370C "move.b $600a5.l, D7" 013712 "andi.b #$6, D7" frame_count's bits 1-2: the drone's entry in flying_drone_shake_heights
local flying_drone_shake 01370C,013712 d7 shake_offset
# 0137FC "move.l #$100, D6" 01380E "not.l D6" the step up or down toward the turtle, added to its y
local flying_drone_steer 0137FC,01380E d6 y_step
# 013732 "jsr $11dfa.l" 013738 "tst.b D7" what boss_pick_target gives: a turtle picked as its target, none when 0
local flying_drone_steer 013732 d7 picked
# 013866 "move.b ($2a,A0), D7" 01386A "lsl.w #1, D7" the drone's bob step times 2, its entry in flying_drone_bob_heights
local flying_drone_bob_low 013866,01386A d7 bob_offset
# 01388C "move.b ($2a,A0), D7" 013890 "andi.w #$3e, D7" the drone's bob step (even), its entry in flying_drone_bob_heights
local flying_drone_bob 01388C,013890 d7 bob_offset
# 0138FC "move.b ($2c,A0), D7" the way the drone flies
local flying_drone_move 0138FC d7 direction
# 013900 "lsl.w #2, D7" the direction times 4, its entry in flying_drone_x_speeds and _y_speeds
local flying_drone_move 013900 d7 direction_offset
# 0139B2 "move.w #$4, D7" the range for random_below, 4
local flying_drone_random_wait 0139B2 d7 range
# 0139B6 "jsr $48448.l" 0139C2 "move.b (A6,D7.w), ($30,A0)" what random_below gives: its entry in the waits
local flying_drone_random_wait 0139B6 d7 roll
# 0139C8 "move.b $60094.l, D7" the difficulty setting
local flying_drone_random_wait 0139C8 d7 difficulty_level
# 0139CE "lsl.b #3, D7" the difficulty times 8, taken off the wait
local flying_drone_random_wait 0139CE d7 wait_cut
# 013A44 "move.w #$4, D7" the range for random_below, 4
local sound_flying_drones 013A44 d7 range
# 013A48 "jsr $48448.l" 013A54 "move.b (A6,D7.w), $61319.l" what random_below gives: the entry in flying_drone_sound_waits
local sound_flying_drones 013A48 d7 roll
# 013A5C "move.w #$38, D7" the drones' sound for queue_sound
local sound_flying_drones 013A5C d7 sound
# 013AAA "moveq #$0, D7" 013ABC "move.b #$3, D7" 0, or 3 when the drone faces right: the right half of the aims
local flying_drone_start_shot 013AAA,013ABC d7 aim_side
# 013AC0 "add.b ($2f,A0), D7" the drone's aim on its side
local flying_drone_start_shot 013AC0 d7 aim
# 013AC4 "lsl.w #2, D7" the aim times 4, its entry in drone_shot_place_x and _height
local flying_drone_start_shot 013AC4 d7 aim_offset
# 013B3A "moveq #$0, D7" 013B46 "move.b #$3, D7" 0, or 3 when the shot faces right: the right half of the aims
local drone_shot_start 013B3A,013B46 d7 aim_side
# 013B4A "add.b ($2f,A0), D7" the shot's aim on its side
local drone_shot_start 013B4A d7 aim
# 013B4E "lsl.w #2, D7" the aim times 4
local drone_shot_start 013B4E d7 aim_offset
# 013B9A "move.b ($2f,A0), D7" the shot's aim
local drone_shot_flash 013B9A d7 aim
# 013B9E "lsl.w #3, D7" the aim times 8, its streak in drone_shot_animations
local drone_shot_flash 013B9E d7 aim_offset

# ---- objects/stockman.c ----
# 013C3A "move.b ($5,A0), D7" 013C3E "lsl.w #2, D7" the state of his way in times 4, the case that runs
local stockman_enter 013C3A,013C3E d7 state_offset
# 013CB8 "move.w #$fe, D7" the fade-out command for queue_sound
local stockman_wait_for_last_enemy 013CB8 d7 sound
# 013CCE "move.w #$43c, D7" the palette request's kind for post_palette_request
local stockman_wait_for_last_enemy 013CCE d7 kind
# 013CF6 "move.w #$33, D7" 013D00 "move.w #$64, D7" the sounds for queue_sound: his machine, then the boss music
local stockman_wait 013CF6,013D00 d7 sound
# 013D10 "move.w #$bf, D7" his speech for queue_sound
local stockman_wait 013D10 d7 sound
# 013D82 "move.b #$ff, D0" 0xFF for say_yippee_i_ay: the balloon on the right of him
local stockman_fly_in 013D82 d0 on_right
# 013D8E "addi.w #$20, D2" his screen y and 0x20 more, where say_yippee_i_ay puts the balloon
local stockman_fly_in 013D8E d2 screen_y
# 013DFE "lea $623c0.l, A6" 013E0A "jsr $1830c.l" the object for the Mouser, from object 12 on: the first free one find_free_object finds
local stockman_fly 013DFE,013E0A a6 mouser
# 013E04 "move.b #$c, D7" 013E0A "jsr $1830c.l" 013E10 "tst.b D7" the objects find_free_object looks at for the Mouser, left over when it finds one
local stockman_fly 013E04,013E08,013E0A d7 objects_left
# 013F24 "lea $62780.l, A6" 013F30 "jsr $1830c.l" the object for the explosion, from object 24 on: the first free one find_free_object finds
local stockman_defeated_explode 013F24,013F30 a6 explosion
# 010F54 "move.w (A5,D7.w), D6" how far across from him the explosion goes, from stockman_explosion_x
local stockman_defeated_explode 010F54 d6 x_offset
# 010F52 "lsl.w #2, D7" his explosions so far times 4, the pair in stockman_explosion_x and _height
local stockman_defeated_explode 010F52 d7 explosion_offset
# 010F58 "move.w ($2,A5,D7.w), D7" how far above him the explosion goes, from stockman_explosion_height
local stockman_defeated_explode 010F58 d7 height_offset
# 010F0A "move.b ($2f,A0), D7" 010F0E "andi.b #$1, D7" the explosions so far (bit 0), the entry in explosion_sounds
local stockman_defeated_explode 010F0A,010F0E d7 sound_choice
# 010F12 "move.b (A5,D7.w), D7" the explosion's sound for queue_sound
local stockman_defeated_explode 010F12 d7 sound
# 013F2A "move.b #$8, D7" 013F30 "jsr $1830c.l" 013F36 "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local stockman_defeated_explode 013F2A,013F2E,013F30 d7 objects_left
# 013F9E "moveq #$0, D5" 013FAC "addi.w #$2, D5" his entry in stockman_step_heights, by how far back he is
local stockman_shake 013F9E,013FAC d5 step_offset
# 013F8A "move.b $600a5.l, D7" 013F90 "andi.b #$6, D7" frame_count's bits 1-2: his entry in stockman_shake_heights
local stockman_shake 013F8A,013F90 d7 shake_offset
# 0140A0 "move.l #$100, D6" 0140B2 "not.l D6" the step up or down toward the turtle, added to his y
local stockman_steer 0140A0,0140B2 d6 y_step
# 013FD6 "jsr $11dfa.l" 013FDC "tst.b D7" what boss_pick_target gives: a turtle picked as his target, none when 0
local stockman_steer 013FD6 d7 picked
# 01413A "moveq #$0, D5" 014148 "addi.w #$2, D5" his entry in stockman_step_heights, by how far back he is
local stockman_bob 01413A,014148 d5 step_offset
# 014128 "move.b ($2a,A0), D7" 01412C "andi.w #$3e, D7" his bob step (even), his entry in stockman_bob_heights
local stockman_bob 014128,01412C d7 bob_offset
# 0141FC "move.b ($2c,A0), D7" the way he flies
local stockman_move 0141FC d7 direction
# 014200 "lsl.w #2, D7" the direction times 4, its entry in stockman_x_speeds and _y_speeds
local stockman_move 014200 d7 direction_offset
# 014218 "move.w #$8, D7" the range for random_below, 8
local stockman_random_drop_time 014218 d7 range
# 01421C "jsr $48448.l" 014228 "move.b (A6,D7.w), ($30,A0)" what random_below gives: his entry in the drop times
local stockman_random_drop_time 01421C d7 roll
# 0142AE "move.b $600a1.l, D5" 0142B4 "lsr.b #1, D5" the players in play, shifted down a player at a time
local highest_player_in_play 0142AE,0142B4 d5 players
# 0142AA "moveq #$0, D7" 0142BA "addq.b #1, D7" the number of the highest player in play
local highest_player_in_play 0142AA,0142BA d7 highest_player
# 0142BA "addq.b #1, D7" the number of the highest player in play
param highest_player_in_play d7 highest_player
# 014308 "lea $17c38.l, A5" 01430E "move.l A5, ($3a,A6)" the Mouser's shadow, set in its object
local stockman_start_mouser 014308 a5 shadow

# ---- system/boot.c ----
# 0011B2 "lea $64000.l, A0" 0011BE "movem.l D1-D6/A1-A2, -(A0)" the end of the work RAM zeroed, 32 bytes down at a time
local reset 0011B2,0011BE a0 ram_end
# 0011FC "lea $60380.l, A0" 001218 "move.l D0, (A0)+" the place in job_queue of the next two slots set empty
# type: a slot of job_queue: 0011FC "lea $60380.l, A0"
local reset 0011FC,001218 a0 job_slot queued_job
# 0013C8 "movea.l $60014.l, A0" 00139E "move.w #$ffff, (A0)+" 0013AA "lea $60380.l, A0" the slot of the next job in job_queue, emptied once read, wrapped round
# type: a slot of job_queue: 0013AA "lea $60380.l, A0"
local reset 00139E,0013AA,0013C8 a0 job_slot queued_job
# 00149A "lea $80000.l, A0" 0014B4 "lea $100000.l, A0" 0014DA "lea $60000.l, A0" 0014FE "lea $140400.l, A0" the RAM tested: the palette, tile, work and sprite RAM
local reset 00149A,0014B4,0014DA,0014FE a0 ram_start
# 001558 "lea $60018.l, A0" 00156A "move.w (A0)+, D4" the program chips' sums, printed when one is bad
local reset 001558,00156A a0 sum_place
# 001494 "lea $16c4.l, A2" 0014AE "lea $16c6.l, A2" 0014D4 "lea $16c8.l, A2" 0014F8 "lea $16ca.l, A2" the RAM's two bytes of bits that mark its even and odd chips bad
local reset 001494,0014AE,0014D4,0014F8 a2 chip_bits
# 00151E "lea $60018.l, A2" 00152E "move.w (A2)+, D6" the program chips' sums, against good_chip_sums
local reset 00151E,00152E a2 sums
# 0010A2 "lea $a01e.l, A6" the palette set for palette_request_set
local reset 0010A2 a6 palettes
# 00115E "lea $100000.l, A6" 001184 "move.b D3, (A6)+" 00118E "adda.w #$80, A6" the place in the fixed layer of the cross hatch's next tiles
local reset 00115E,001182,001184,001186,001188,00118E a6 tile_place
# 001164 "moveq #$0, D0" 001182 "move.b D0, (A6)+" the attribute of the cross hatch's tiles, 0
local reset 001164 d0 tile_attribute
# 001322 "moveq #$4, D0" 00132E "moveq #$6, D0" 4, or 6 with DIP switch 3-4: kept in unused_dip_number
local reset 001322,00132E d0 dip_number
# 00120E "move.l #$ffffffff, D0" 001218 "move.l D0, (A0)+" two empty job slots (0xFFFF each), written at once
local reset 00120E d0 empty_jobs
# 0012A2 "move.b $60031.l, D0" the second bank of DIP switches, the lives setting in its low bits
local reset 0012A2 d0 switches
# 0012BA "moveq #$0, D0" 0012C6 "addq.b #1, D0" 1 when DIP switch 2-3 is off, kept in unused_dip_flag
local reset 0012BA,0012C6 d0 unused_flag
# 0012D6 "move.b $60031.l, D0" 0012DC "andi.b #$18, D0" DIP switches 2-4 and 2-5, the entry in unused_dip_settings
local reset 0012D6,0012DC d0 setting_offset
# 0014A0 "move.w #$0, D0" 0014BA "move.w #$17, D0" 0014E0 "move.w #$f, D0" 001504 "move.w #$0, D0" the RAM's size less one, in blocks of 1K, for the test
local reset 0014A0,0014BA,0014E0,001504 d0 blocks
# 00104C "move.b D0, D1" 001058 "ori.b #$1, D1" the tile chip's flip, set by the screen's DIP switch
local reset 00104C,001058 d1 flip
# 001166 "moveq #$2c, D1" the code of the cross hatch's bottom left tile
local reset 001166 d1 bottom_left_tile
# 001352 "move.b D0, D1" 001360 "ori.b #$7, D1" the layers' priority, flipped by the screen's DIP switch
local reset 001352,001360 d1 priority
# 0011A0 "move.w #$3000, D1" 0011A4 "subq.w #1, D1" the wait's count down
local reset 0011A0,0011A4 d1 delay
# 001252 "move.b $60030.l, D1" 00125A "andi.b #$f, D1" 00126C "lsl.w #1, D1" the first slot's coinage DIP switches times 2, its entry in coinage_coins and coinage_credits
local reset 001252,00125A,00126C d1 coinage_offset
# 0013CE "move.w (A0), D1" the next job in the queue: its number in the high byte, its parameter in the low one
local reset 0013CE d1 job
# 0013DA "lsr.w #6, D1" the job's number times 4, the case that runs
local reset 0013DA d1 job_offset
# 001168 "moveq #$2d, D2" the code of the cross hatch's bottom right tile
local reset 001168 d2 bottom_right_tile
# 001354 "move.b D1, D2" 001364 "ori.b #$8, D2" sprite_control, flipped by the screen's DIP switch
local reset 001354,001364 d2 control
# 001258 "move.l D1, D2" 001288 "lsr.w #3, D2" the second slot's coinage DIP switches times 2, its entry in coinage_2_coins and coinage_2_credits
local reset 001258,001288 d2 coinage_2_offset
# 00116A "moveq #$2e, D3" the code of the cross hatch's top left tile
local reset 00116A d3 top_left_tile
# 00116C "moveq #$2f, D4" the code of the cross hatch's top right tile
local reset 00116C d4 top_right_tile
# 00156A "move.w (A0)+, D4" the program chip's sum, for print_boot_hex
local reset 00156A d4 printed_sum
# 0010A8 "move.w #$1, D7" bank 0 for palette_request_set
local reset 0010A8 d7 banks
# 0013D4 "move.b D1, D7" the job's parameter, for the job's routine
local reset 0013D4 d7 job_parameter
# 001492 "moveq #$0, D7" 001536 "addi.w #$1, D7" 00153A "lsl.w #1, D7" the chips found bad, a bit each, two more per test
local reset 001492,0014AA,0014C4,0014EA,00150E,001536,00153A,00154C d7 bad_chips
# 0010F4 "lea $100000.l, A0" 0010FE "move.b D0, (A0)+" 00110C "lea $102000.l, A0" the place in the tile RAM of the next tile cleared
local clear_tile_ram 0010F4,0010FE,001100,00110C,001116,001118 a0 tile_place
# 0010EE "moveq #$0, D0" 0010FE "move.b D0, (A0)+" the attribute of a blank tile (0)
local clear_tile_ram 0010EE d0 blank_attribute
# 0010F0 "move.b #$10, D1" 001100 "move.b D1, (A0)+" the code of the blank tile (0x10, the space)
local clear_tile_ram 0010F0 d1 space_tile
# 001708 "lea $80000.l, A6" 001724 "lea ($4,A6), A6" 001730 "lea $80400.l, A6" 001744 "lea ($4,A6), A6" the place in the palette RAM of the next colour
local start_boot_screen 001708,001724,001730,001744 a6 colour_place
# 001752 "lea $100000.l, A6" 00175C "move.b #$0, (A6)+" 001760 "move.b #$10, (A6)+" the place in the fixed layer of the next tile cleared
local start_boot_screen 001752,00175C,001760,001764,001768 a6 tile_place
# 001776 "move.w #$0, D3" the boot text for print_boot_text, RAM ROM CHECK
local start_boot_screen 001776 d3 text_number
# 001786 "move.w D4, D6" 00179E "lsr.w #4, D4" the number printed, its last digit first
param print_boot_hex d4 number
# 00179E "lsr.w #4, D4" the number's digits left
local print_boot_hex 00179E d4 number
# 001788 "andi.w #$f, D6" 001794 "addi.w #$7, D6" the digit's tile, 7 more for A to F
local print_boot_hex 001788,001794 d6 digit_tile
# 0017AC "move.w D0, D2" 0017DC "move.b D0, $a0011.l" the RAM's size less one, in blocks of 1K
param test_ram d0 blocks
# 0017A6 "lsl.l #2, D7" the chips found bad so far, a bit each
param test_ram d7 bad_chips
# 0017A6 "lsl.l #2, D7" 0017BC "or.b ($0,A2), D7" 0017CE "or.b ($1,A2), D7" the chips found bad, two more bits for this RAM
local test_ram 0017A6,0017BC,0017CE d7 bad_chips
# 0017AA "movea.l A0, A1" the RAM tested
param test_ram a0 ram_start
# 0017BC "or.b ($0,A2), D7" 0017CE "or.b ($1,A2), D7" the RAM's two bytes of bits that mark its even and odd chips bad
param test_ram a2 chip_bits
# 0017AA "movea.l A0, A1" 0017D2 "adda.l #$2, A1" the place in the RAM written and read back
local test_ram 0017AA,0017D2 a1 test_place
# 0017A8 "moveq #$0, D1" 0017EE "addi.b #$55, D1" the pattern written: 0, 0x55, 0xAA, then 0xFF
local test_ram 0017A8,0017EE d1 pattern
# 0017FC "move.w D0, D2" 001832 "move.b D0, $a0011.l" the RAM's size less one, in blocks
param test_palette_ram d0 blocks
# 0017F6 "lsl.l #2, D7" the chips found bad so far, a bit each
param test_palette_ram d7 bad_chips
# 0017F6 "lsl.l #2, D7" 001814 "or.b ($0,A2), D7" 001826 "or.b ($1,A2), D7" the chips found bad, two more bits for the palette RAM
local test_palette_ram 0017F6,001814,001826 d7 bad_chips
# 0017FA "movea.l A0, A1" the palette RAM tested
param test_palette_ram a0 ram_start
# 001814 "or.b ($0,A2), D7" 001826 "or.b ($1,A2), D7" the RAM's two bytes of bits that mark its chips bad
param test_palette_ram a2 chip_bits
# 0017FA "movea.l A0, A1" 00182A "lea ($4,A1), A1" the place in the RAM written and read back
local test_palette_ram 0017FA,00182A a1 test_place
# 0017F8 "moveq #$0, D1" 001846 "addi.l #$55, D1" the pattern written: 0, 0x55, 0xAA, then 0xFF
local test_palette_ram 0017F8,001846 d1 pattern
# 001890 "lea $100000.l, A6" 00189A "move.b #$0, (A6)+" the place in the fixed layer of the next tile cleared
local show_boot_check 001890,00189A,00189E,0018A2,0018A6 a6 tile_place
# 0018AE "move.w #$1, D3" 0018C0 "move.w #$2, D3" 0018D8 "addq.w #1, D3" the boot text for print_boot_text: the heading, then each chip's BAD
local show_boot_check 0018AE,0018C0,0018D8 d3 text_number
# 0018C6 "move.l D7, D6" 0018C8 "lsr.l #1, D6" the bad chips' bits, looked at one after another
local show_boot_check 0018C6,0018C8 d6 bad_bits
# 0018C4 "lsr.l #1, D7" the chips found bad, a bit each, with one bit too many
param show_boot_check d7 bad_chips
# 0018C4 "lsr.l #1, D7" the chips found bad, a bit each
local show_boot_check 0018C4 d7 bad_chips
# 0018E8 "move.w D3, D4" the text's number in boot_texts
param print_boot_text d3 text_number
# 0018F0 "movea.l (A6,D4.w), A5" 0018FA "adda.w (A5)+, A6" 0018FC "move.b (A5)+, D4" the text: an offset, then its characters to '/' or '?'
local print_boot_text 0018F0,0018FA,0018FC a5 text_record
# 0018FA "adda.w (A5)+, A6" 001914 "move.b #$0, (A6)+" 001918 "move.b D4, (A6)+" the place in the fixed layer of the next character
# type: the K052109's tile RAM (100000-107FFF): 0018F4 "lea $100018.l, A6" 0018FA "adda.w (A5)+, A6"
local print_boot_text 0018FA,001914,001918 a6 tile_place io

# ---- scenes/ranking.c ----
# 007B76 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local ranking_clear_layers 007B76 d7 job
# 007C22 "lea $635f4.l, A4" the players' places in the ranking (ranking_places)
local rank_players_scores 007C22 a4 places
# 007C1C "lea $635c8.l, A5" the ranking's initials (ranking_initials)
local rank_players_scores 007C1C a5 initials
# 007C16 "lea $63500.l, A6" the ranking's scores (ranking_scores)
local rank_players_scores 007C16 a6 scores
# 007C46 "move.w (A6,D6.w), D0" the ranking's score moved one place down past the player's
local rank_players_scores 007C46 d0 score
# 007C66 "sbcd D1, D0" 007CA6 "move.b (A4,D7.w), D0" 007CCC "abcd D1, D0" the player's place in BCD: one up for each score he passes, one down for each player ahead of him
local rank_players_scores 007C66,007CA6,007CCC d0 place
# 007C76 "move.b D0, D2" 007C80 "move.b #$a, D2" 007C86 "lsl.w #2, D2" the place less one times 4 (the tenth for 0x10), its initials in ranking_initials
local rank_players_scores 007C76,007C80,007C86 d2 initials_offset
# 007C88 "move.l ($4,A5,D2.w), D3" the initials moved one place down
local rank_players_scores 007C88 d3 moved_initials
# 007C3C "move.w #$c4, D6" 007C96 "subq.w #2, D6" the place in the ranking's scores compared, two bytes each, from the end up
local rank_players_scores 007C3C,007C96 d6 score_offset
# 007CE4 "lea $635f4.l, A0" the players' places in the ranking, for draw_ranking_place
local show_ranked_players 007CE4 a0 places
# 007D14 "move.l D7, D0" the player, kept while his picture is drawn
local show_ranked_players 007D14 d0 player_number
# 007D06 "bset D7, D4" the player's bit, for draw_scores
local show_ranked_players 007D06 d4 score_players
# 007D18 "bset D0, D7" the player's bit, for draw_four_turtle_pictures
local show_ranked_players 007D18 d7 picture_players
# 007D9C "lea $635fa.l, A5" the initials each player has entered (initials_entered)
local ranking_choose_entry 007D9C a5 entered
# 007D32 "lea $635f4.l, A6" 007D96 "lea $635f4.l, A6" the players' places in the ranking
local ranking_choose_entry 007D32,007D96 a6 places
# 007D38 "moveq #$0, D6" 007D44 "addq.b #1, D6" the players not in the ranking, counted
local ranking_choose_entry 007D38,007D44 d6 unranked
# 007DA2 "moveq #$0, D6" 007DBC "bset D7, D6" the players in the top ten who enter their initials, a bit each
local ranking_choose_entry 007DA2,007DBC d6 entering
# 007D64 "move.b #$71, D7" 007D8C "move.b #$71, D7" the ranking's music for queue_sound
local ranking_choose_entry 007D64,007D8C d7 sound
# 007D72 "move.b $635f8.l, D7" 007DDC "move.b $635f8.l, D7" the players drawn in black (turtles_in_black), for draw_four_turtle_pictures
local ranking_choose_entry 007D72,007DDC d7 players
# 007E22 "move.b #$fe, D7" the fade-out command for queue_sound
local ranking_wait 007E22 d7 sound
# 007E5C "lea $635fa.l, A3" the initials each player has entered (initials_entered)
local enter_initials 007E5C a3 entered
# 007E62 "lea $635c8.l, A4" the ranking's initials (ranking_initials)
local enter_initials 007E62 a4 initials
# 007E68 "lea $635f4.l, A5" the players' places in the ranking
local enter_initials 007E68 a5 places
# 007E8A "lea $60020.l, A6" the players' inputs over four frames (turtle_inputs)
local enter_initials 007E8A a6 inputs
# 007E90 "moveq #$0, D0" 007EA0 "addq.b #1, D0" 007EDE "movem.l (A7)+, D0" the players done with their initials, counted (kept on the stack over the sounds)
local enter_initials 007E90,007EA0,007EDE,007F2A,007F54 d0 players_done
# 007ED6 "move.b #$1d, D0" 007F22 "move.b #$1, D0" 007F4C "move.b #$1, D0" the sound for queue_sound_d0: a letter changed or entered
local enter_initials 007ED6,007F22,007F4C d0 letter_sound
# 007E92 "moveq #$0, D1" 007EC2 "bset D7, D1" the players holding a button, a bit each, kept in initials_buttons_held
local enter_initials 007E92,007EC2 d1 buttons_held
# 007F04 "subi.b #$40, D4" the initial being entered, as a letter from 0
local enter_initials 007F04 d4 letter
# 007EE8 "move.b (A5,D7.w), D5" 007EFA "lsl.w #2, D5" 007EFC "add.b (A3,D7.w), D5" the place in ranking_initials of the initial being entered
local enter_initials 007EE8,007EF4,007EFA,007EFC d5 initial_offset
# 007EB0 "move.b (A6,D7.w), D6" the player's inputs over four frames: up and down change the letter, a button enters it
local enter_initials 007EB0 d6 joystick
# 007F6E "move.b #$fe, D7" 007F90 "move.b #$fe, D7" the fade-out command for queue_sound
local enter_initials 007F6E,007F90 d7 sound
# 00804A "lea $104f18.l, A6" 008074 "suba.w #$80, A6" the place in layer B's tile RAM of the row, one up at a time
local draw_ranking_background 00804A,008074 a6 tile_place
# 008064 "lsl.w #1, D4" the column times 2, the offset in the row
local draw_ranking_background 008064 d4 column_offset
# 00805C "move.b (A5,D7.w), D5" the row's tile, from ranking_background_tiles
local draw_ranking_background 00805C d5 tile_code
# 0080AA "lea $635fa.l, A3" the initials each player has entered (initials_entered)
local draw_initials 0080AA a3 entered
# 0080B0 "lea $635c8.l, A4" the ranking's initials (ranking_initials)
local draw_initials 0080B0 a4 initials
# 0080A6 "movea.l (A6,D6.w), A6" 0080EC "adda.l #$4, A6" 00810C "adda.l #$4, A6" the place in the tile RAM of the next initial
local draw_initials 0080A6,0080EC,00810C a6 tile_place
# 0080D8 "moveq #$0, D0" 0080E4 "move.b #$a0, D0" the initial's attribute: 0xA0 for the one being entered
local draw_initials 0080D8,0080E4,0080F8,008104,008118,008124 d0 attribute
# 0080D4 "move.b (A4,D6.w), D5" 0080F4 "move.b ($1,A4,D6.w), D5" 008114 "move.b ($2,A4,D6.w), D5" the initial drawn
local draw_initials 0080D4,0080F4,008114 d5 initial
# 0080BE "move.b (A5,D7.w), D6" 0080CA "move.b #$a, D6" 0080D0 "lsl.w #2, D6" the place less one times 4, the player's initials in ranking_initials
local draw_initials 0080BE,0080CA,0080D0 d6 initials_offset
# 00813A "move.b D0, ($0,A6)" 008144 "move.b D0, ($80,A6)" the letter's attribute
param draw_initial d0 attribute
# 008134 "subi.b #$30, D5" the letter
param draw_initial d5 initial
# 008138 "lsl.w #1, D5" the letter less '0' times 2, its tiles in big_font_tiles_table
local draw_initial 008138 d5 initial_offset
# 00813A "move.b D0, ($0,A6)" 00813E "move.b (A2,D5.w), ($1,A6)" the place in the tile RAM of the letter
param draw_initial a6 tile_place
# 00815A "movea.l (A6,D6.w), A6" 00818E "adda.w #$100, A6" 0081A8 "adda.l #$80, A6" the place in the tile RAM of the frame's next part
# type: the K052109's tile RAM (100000-107FFF): 00815A "movea.l (A6,D6.w), A6" from ranking_frame_places (0x10011C...)
local draw_ranking_frame 00815A,00818E,0081A8 a6 tile_place io
# 008166 "moveq #$0, D4" 00816E "addi.w #$80, D4" 008188 "addq.b #2, D4" the offset from the place of the frame's next tile
local draw_ranking_frame 008166,00816E,00817C,008188,0081B4,0081C4 d4 tile_offset
# 008156 "move.w D7, D6" 008158 "lsl.w #2, D6" the player times 4, his frame's place
local draw_ranking_frame 008156,008158 d6 player_offset
# 00815E "move.w D7, D6" the player, for ranking_frame_colour
local draw_ranking_frame 00815E d6 player_number
# 008160 "bsr $82a8" 008172 "move.b D6, (A6,D4.w)" the colour ranking_frame_colour gives, the frame's attribute
local draw_ranking_frame 008160 d6 colour
# 0081E8 "move.b D6, ($0,A6)" 0081EC "move.b D6, ($2,A6)" the player's colour, the label's attribute
param draw_ranking_label d6 colour
# 0081E4 "movea.l (A5,D5.w), A5" the label's four tile codes, 1UP to 4UP
local draw_ranking_label 0081E4 a5 label
# 0081D6 "movea.l (A6,D5.w), A6" the place in the tile RAM of the label
local draw_ranking_label 0081D6 a6 tile_place
# 00821C "movea.l (A6,D6.w), A6" the place in the tile RAM of the player's place
local draw_ranking_place 00821C a6 tile_place
# 00822E "move.b D6, D5" 00823A "move.b #$3, D5" 00823E "lsl.w #1, D5" the place less one, at most 3, times 2: its ending's tiles
local draw_ranking_place 00822E,008230,00823A,00823E d5 ending_offset
# 008264 "lsl.w #1, D5" the place's units digit times 2, its tiles in big_font_tiles_table
local draw_ranking_place 008264 d5 units_offset
# 008282 "andi.w #$f0, D5" 00828A "lsr.w #3, D5" the place's tens digit times 2, its tiles in big_font_tiles_table
local draw_ranking_place 008282,00828A d5 tens_offset
# 00822A "move.b (A0,D7.w), D6" the player's place in BCD
local draw_ranking_place 00822A d6 place
# 0082AE "move.b ($1,A5,D6.w), D6" the player, his colour in text_colours
param ranking_frame_colour d6 player_number
# 0082AE "move.b ($1,A5,D6.w), D6" 0082B2 "ori.b #$1, D6" the player's colour, with bit 0
local ranking_frame_colour 0082AE,0082B2 d6 colour
# 0082B8 "lea $63500.l, A6" 0082D2 "move.l (A5)+, (A6)+" 0082DE "move.l (A5)+, (A6)+" the ranking's next long set from ranking_defaults
local reset_ranking 0082B8,0082D2,0082DE a6 ranking_entry

# ---- scenes/game.c ----
# 00620E "move.w #$50f, D7" the scores cleared, a bit each: the four players' (0xF)
local new_game_reset 00620E d7 players
# 0062FC "lsl.w #1, D1" the area times 2, its entry in area_continue_scenes and area_stages
local area_setup_variables 0062FC d1 area_offset
# 006342 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local area_setup_variables 006342 d7 job
# 006464 "move.w #$7e, D7" the sound for queue_sound as a button skips the intro
local area_title_intro_run 006464 d7 sound
# 0064E2 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local area_title_clear 0064E2 d7 job
# 006556 "movea.l (A6,D7.w), A6" the area's SCENE text, from area_title_texts
local area_title_start_text 006556 a6 text
# 00652A "move.w #$200, D7" the job for queue_job: job 2, a text of the game's
local area_title_start_text 00652A d7 job
# 006568 "move.w #$b7f, D7" the job and boxes for draw_player_boxes: the four boxes with their lives and health
local area_title_start_text 006568 d7 box_flags
# 00657A "move.b $600a1.l, D7" 006580 "addi.w #$b20, D7" the job and boxes for draw_player_boxes: the players in play, with their health
local area_title_wait 00657A,006580 d7 box_flags
# 006616 "moveq #$0, D6" 006638 "move.b #$1, D6" 1 when a player got a bar back this time: the tick sounds
local refill_health_bars 006616,006638 d6 refilled
# 00664C "move.w #$1, D7" the tick for queue_sound
local refill_health_bars 00664C d7 sound
# 006678 "move.b $60007.l, D7" 00667E "ext.w D7" 006680 "lsl.w #2, D7" the scene's step times 4, the case that runs
local scene_play 006678,00667E,006680 d7 step_offset
# 006696 "move.b $60009.l, D7" 00669C "ext.w D7" 00669E "lsl.w #2, D7" the step's substep times 4, the case that runs
local play_entry 006696,00669C,00669E d7 substep_offset
# 0066C0 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local play_entry_palettes 0066C0 d7 job
# 006706 "move.w #$b7f, D7" the job for queue_job: job 0xB, the four boxes with their lives and health
local play_entry_layers 006706 d7 job
# 006718 "move.b $60121.l, D7" the stage, its entry in area_layer_priorities and area_entry_without_blink
local play_entry_layers 006718 d7 stage_number
# 006744 "lsl.w #1, D7" the stage times 2, its pair in area_tile_banks_table
local play_entry_layers 006744 d7 stage_offset
# 0067AA "move.w #$1, D7" the text for print_colour_text: GAME OVER in a demo
local play_entry_show_game_over 0067AA d7 text_number
# 006832 "move.w #$f, D4" the four players (0xF), whose scores draw_scores draws
local play_entry_start 006832 d4 score_players
# 006810 "move.b $600a1.l, D7" 00681E "and.b D6, D7" the players in play who are not joining, whose turtles turtle_start_area starts
local play_entry_start 006810,00681E d7 starting_players
# 0068A2 "move.w #$b7f, D7" the job for queue_job: job 0xB, the four boxes with their lives and health
local play_entry_run 0068A2 d7 job
# 0068F2 "move.b D7, D6" 006900 "andi.b #$30, D6" frame_count's low byte: GAME OVER blinks by its bits 4-5
local play_frame 0068F2 d6 frame_phase
# 0068EC "move.b $600a5.l, D7" frame_count's low byte, every 16 frames GAME OVER is redrawn
local play_frame 0068EC d7 frame
# 0068FC "move.w #$1, D7" 006908 "ori.b #$80, D7" the text for print_colour_text: GAME OVER, with bit 7 to erase it
local play_frame 0068FC,006908 d7 text_number
# 006A06 "move.b (A6,D7.w), D7" the layers' priority for this frame, from fire_priority_flicker
local flicker_fire_priority 006A06 d7 priority
# 006A7A "move.b $6111e.l, D7" the difficulty the play time adds (difficulty_from_time)
local update_difficulty 006A7A d7 time_difficulty
# 006AB2 "move.b #$34, D7" 006AC2 "move.b $60080.l, D7" 006ADA "move.b (A6,D7.w), D7" 006B00 "move.w #$a, D7" the music for queue_sound: the drill's rumble, the music kept or the area's, the helicopters' sound
local start_area_music 006AB2,006AC2,006ADA,006B00 d7 sound
# 006B1C "move.b $60007.l, D7" 006B22 "ext.w D7" 006B24 "lsl.w #2, D7" the scene's step times 4, the case that runs
local scene_area_exit 006B1C,006B22,006B24 d7 step_offset
# 006BA4 "move.w #$0, D7" 0 for queue_sound: the sound stopped
local area_exit_next_area 006BA4 d7 sound

# ---- engine/sprites.c ----
# 046EEA "lea $140400.l, A0" 046EFE "adda.w #$8, A0" the place in the sprite RAM of the next sprite
local hide_all_sprites 046EEA,046EFE a0 sprite_place
# 046EF2 "moveq #$4f, D1" 046EFA "andi.b #$7f, D1" the sprite's first byte, its priority: 0x4F down, without the shown bit
local hide_all_sprites 046EF2,046EFA d1 priority
# 046F16 "lea $61400.l, A1" the draw list (draw_list)
local build_draw_list 046F16 a1 draw_list_place
# 046F38 "addi.w #$38, D0" 046F46 "andi.w #$fffe, D0" the object's depth on the screen (its depth and screen y, 0x38 on), even: its slot in the draw list
local build_draw_list 046F38,046F46 d0 draw_depth
# 046F1C "move.l #$62000, D4" 046F5A "move.w (A1,D0.w), D4" 046F60 "move.w ($3e,A2), D4" the next object of the slot's chain, its low word over the objects' high one
local build_draw_list 046F1C,046F5A,046F60 d4 next_object
# 046F0C "move.w #$300, D5" 046F50 "move.w D0, D5" the lowest slot used, kept in draw_first
local build_draw_list 046F0C,046F50 d5 first_slot
# 046F0A "moveq #$0, D6" 046F44 "addq.b #1, D6" the objects in the draw list, kept in draw_count
local build_draw_list 046F0A,046F44 d6 drawn_count
# 046F98 "adda.w $61204.l, A1" 046FBC "move.w (A1)+, D6" the slot of the draw list read next, from draw_first
# type: an entry of draw_list: 046F92 "lea $61400.l, A1" 046FBC "move.w (A1)+, D6"
local draw_sprites 046F98,046FBC a1 draw_list_place draw_entry
# 046F9E "lea $140400.l, A2" 047092 "adda.w #$8, A2" 04710A "adda.w #$8, A2" the place in the sprite RAM of the next sprite
local draw_sprites 046F9E,047092,04710A,047160 a2 sprite_place
# 047058 "move.b ($42,A0), D0" the object's colour, over the sprite's own
local draw_sprites 047058 d0 object_colour
# 0470BC "add.w ($e,A0), D2" 0470D0 "andi.w #$1ff, D2" 0470DE "ori.w #$200, D2" the shadow sprite's y on the screen, with its flip bit
local draw_sprites 0470BC,0470D0,0470DE d2 shadow_y
# 046FEC "lsl.b #1, D3" the object's flags times 2: its flip in bit 7
local draw_sprites 046FEC d3 flip
# 046FA4 "move.l #$62000, D6" 046FBC "move.w (A1)+, D6" 047154 "move.w ($3e,A0), D6" the next object drawn, its low word over the objects' high one
local draw_sprites 046FA4,046FBC,047154 d6 next_object
# 046FAC "move.b $61206.l, D7" 04714E "subq.b #1, D7" the objects left to draw (draw_count)
local draw_sprites 046FAC,04714E d7 objects_left
# 047204 "lea $62140.l, A5" 047216 "lea $62190.l, A5" the first object the turtles' attacks are checked against: every other one each frame
local check_attacks 047204,047216 a5 first_enemy
# 04724C "sub.w ($e,A1), D2" 047252 "neg.w D2" 047358 "sub.w ($e,A1), D2" how far the two are apart up or down the screen, less than 0
local check_attacks 04724C,047252,047358,04735E,047466,04746C d2 y_distance
# 047270 "move.w ($a,A2), D2" 04727E "neg.w D2" 04737C "move.w ($a,A2), D2" the attack box's x, mirrored when the attacker faces right
local check_attacks 047270,04727E,04737C,04738A,04748A,047498 d2 attack_x
# 047284 "sub.w ($c,A1), D2" 04728A "neg.w D2" 047390 "sub.w ($c,A1), D2" how far the attack is from the other across the screen, less than 0
local check_attacks 047284,04728A,047390,047396,04749E,0474A4 d2 x_distance
# 0472A6 "sub.w D3, D2" 0473B0 "sub.w D3, D2" 0474BE "sub.w D3, D2" how far the attack is above the other's height
local check_attacks 0472A6,0473B0,0474BE d2 height_distance
# 047308 "move.b (A6,D0.w), D7" the job for queue_job: job 4, a point to the turtle's player (attack_hit_jobs)
local check_attacks 047308 d7 job
# 047566 "moveq #$a, D1" 047574 "addq.b #2, D1" 04759E "addq.b #8, D1" 04760C "moveq #$1, D1" the sides the turtle meets the object on, for its contacts; 1 standing on it
local turtle_collide_with_objects 047566,047574,04759E,0475AC,0475B2,04760C d1 contact_bits
# 04756C "sub.w ($e,A3), D4" 047572 "neg.w D4" how far the two are apart up or down the screen, less than 0
local turtle_collide_with_objects 04756C,047572 d4 y_distance
# 04757A "add.w ($34,A3), D4" how far their depths overlap
local turtle_collide_with_objects 04757A d4 depth_overlap
# 047596 "sub.w ($c,A3), D5" 04759C "neg.w D5" how far the two are apart across the screen, less than 0
local turtle_collide_with_objects 047596,04759C d5 x_distance
# 0475A2 "add.w (A5), D5" how far their boxes overlap across
local turtle_collide_with_objects 0475A2 d5 width_overlap
# 0475BE "move.b ($10,A3), D0" the object's height in pixels
local turtle_collide_with_objects 0475BE d0 other_height
# 0475D4 "add.w ($2,A5), D0" the height of the object's top, where the turtle stands
local turtle_collide_with_objects 0475D4 d0 top_height
# 0475C2 "sub.w D0, D6" how far the turtle is above the object
local turtle_collide_with_objects 0475C2 d6 height_difference
# 0475DA "add.w ($2,A5), D6" how far the turtle is below the object's top
local turtle_collide_with_objects 0475DA d6 height_overlap
# 047696 "moveq #$a, D1" 0476A4 "addq.b #2, D1" 0476CE "addq.b #8, D1" 04773C "moveq #$1, D1" the sides the enemy meets the object on, for its contacts; 1 standing on it
local enemy_collide_with_objects 047696,0476A4,0476CE,0476DC,0476E2,04773C d1 contact_bits
# 04769C "sub.w ($e,A3), D4" 0476A2 "neg.w D4" how far the two are apart up or down the screen, less than 0
local enemy_collide_with_objects 04769C,0476A2 d4 y_distance
# 0476AA "add.w ($34,A3), D4" how far their depths overlap
local enemy_collide_with_objects 0476AA d4 depth_overlap
# 0476C6 "sub.w ($c,A3), D5" 0476CC "neg.w D5" how far the two are apart across the screen, less than 0
local enemy_collide_with_objects 0476C6,0476CC d5 x_distance
# 0476D2 "add.w (A5), D5" how far their boxes overlap across
local enemy_collide_with_objects 0476D2 d5 width_overlap
# 0476EE "move.b ($10,A3), D0" the object's height in pixels
local enemy_collide_with_objects 0476EE d0 other_height
# 047704 "add.w ($2,A5), D0" the height of the object's top, where the enemy stands
local enemy_collide_with_objects 047704 d0 top_height
# 0476F2 "sub.w D0, D6" how far the enemy is above the object
local enemy_collide_with_objects 0476F2 d6 height_difference
# 04770A "add.w ($2,A5), D6" how far the enemy is below the object's top
local enemy_collide_with_objects 04770A d6 height_overlap
# 047822 "lsl.w #2, D0" the object's routine times 4, its entry in its kind's routine table
local run_objects 047822 d0 routine_offset
# 04787C "moveq #$0, D0" 04788E "divu.w D1, D0" 047892 "addq.w #1, D0" the enemies on the screen over the turtles, rounded up: kept in enemies_per_turtle
local update_player_slots 04787C,047888,04788E,047892 d0 per_turtle
# 047844 "clr.w D1" 047854 "addq.w #1, D1" the turtles in play, counted
local update_player_slots 047844,047854 d1 turtle_count
# 0478EA "move.w D0, D1" the object's screen x, against its kind's margin
local update_object_screen_place 0478EA d1 edge_x
# 047C88 "move.w ($0,A5), D1" 047C9C "neg.w D1" the record's offset across, mirrored when the object faces right
local place_from_record 047C88,047C9C d1 x_offset
# 047CD8 "move.b D0, D4" 047CDE "btst #$6, D0" the direction, one of 256
param speeds_from_direction d0 direction
# 047CEE "mulu.w D1, D6" 047D02 "mulu.w D1, D7" the speed in that direction
param speeds_from_direction d1 speed
# 047CDA "andi.w #$3f, D4" 047CE6 "neg.w D4" the direction's angle within its quarter, its entry in the sines (negated for the other half)
local speeds_from_direction 047CDA,047CE6 d4 angle
# 047CEE "mulu.w D1, D6" the speed across
param speeds_from_direction d6 x_speed
# 047D02 "mulu.w D1, D7" the speed up or down
param speeds_from_direction d7 y_speed
# 047D94 "move.w ($e,A6), D2" 047D98 "clr.w D0" the direction direction_to gives to the other object
local direction_to_object 047D94 d0 direction
# 047D90 "move.w ($c,A6), D1" the other object's screen x, for direction_to
local direction_to_object 047D90 d1 target_x
# 047D1A "move.b D0, D4" 047D24 "btst #$6, D0" the direction, one of 256, as for speeds_from_direction
param speeds_from_direction_unscaled d0 direction

# ---- scenes/ending.c ----
# 006C34 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local ending_clear 006C34 d7 job
# 006D10 "move.w #$22, D7" the sound for queue_sound after the pause
local ending_pause 006D10 d7 sound
# 0071C8 "move.w ($0,A6), D6" the fade for copy_palette_sets: the parts it changes and its rate
param ending_technodrome_glows d6 fade
# 0071C8 "move.w ($0,A6), D6" the fade from ending_palette_fades
local ending_technodrome_glows 0071C8 d6 fade
# 0071CC "movea.l ($2,A6), A5" the palettes the fade goes toward
param ending_technodrome_glows a5 target_palettes
# 0071CC "movea.l ($2,A6), A5" the target palettes from ending_palette_fades
local ending_technodrome_glows 0071CC a5 target_palettes
# 0071C8 "move.w ($0,A6), D6" the fade for copy_palette_sets: the parts it changes and its rate
param ending_technodrome_explodes d6 fade
# 0071C8 "move.w ($0,A6), D6" the fade from ending_palette_fades
local ending_technodrome_explodes 0071C8 d6 fade
# 0071CC "movea.l ($2,A6), A5" the palettes the fade goes toward
param ending_technodrome_explodes a5 target_palettes
# 0071CC "movea.l ($2,A6), A5" the target palettes from ending_palette_fades
local ending_technodrome_explodes 0071CC a5 target_palettes
# 006D7A "move.w #$1a, D7" 006DA8 "move.b (A6,D7.w), D7" the explosion's sound for queue_sound, the second from technodrome_explosion_sounds
local ending_technodrome_explodes 006D7A,006DA8 d7 sound
# 006D9C "move.b $600a5.l, D7" 006DA2 "andi.b #$18, D7" frame_count's bits 3-4: the entry in technodrome_explosion_sounds
local ending_technodrome_explodes 006D9C,006DA2 d7 sound_choice
# 006DBC "ext.w D7" 006DBE "jsr $1830c.l" 006DC4 "tst.b D7" the objects find_free_object looks at for the explosion, left over when it finds one
local ending_technodrome_explodes 006DBC,006DBE d7 objects_left
# 0071C8 "move.w ($0,A6), D6" the fade for copy_palette_sets: the parts it changes and its rate
param ending_fade_to_wreck d6 fade
# 0071C8 "move.w ($0,A6), D6" the fade from ending_palette_fades
local ending_fade_to_wreck 0071C8 d6 fade
# 0071CC "movea.l ($2,A6), A5" the palettes the fade goes toward
param ending_fade_to_wreck a5 target_palettes
# 0071CC "movea.l ($2,A6), A5" the target palettes from ending_palette_fades
local ending_fade_to_wreck 0071CC a5 target_palettes
# 006E46 "move.w #$6c, D7" the epilogue's music for queue_sound
local ending_fade_to_wreck 006E46 d7 sound
# 006E62 "lea $199a4.l, A6" the epilogue's text, for start_text_typed_in_colours
local ending_start_epilogue 006E62 a6 text
# 006E68 "moveq #$2, D7" 2 for start_text_typed_in_colours: each pass four frames after the last
local ending_start_epilogue 006E68 d7 delay_shift
# 0071C8 "move.w ($0,A6), D6" the fade for copy_palette_sets: the parts it changes and its rate
param ending_dim_epilogue d6 fade
# 0071C8 "move.w ($0,A6), D6" the fade from ending_palette_fades
local ending_dim_epilogue 0071C8 d6 fade
# 0071CC "movea.l ($2,A6), A5" the palettes the fade goes toward
param ending_dim_epilogue a5 target_palettes
# 0071CC "movea.l ($2,A6), A5" the target palettes from ending_palette_fades
local ending_dim_epilogue 0071CC a5 target_palettes
# 006F08 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local staff_roll_clear 006F08 d7 job
# 006F80 "move.w #$70, D7" the staff roll's music for queue_sound
local staff_roll_start 006F80 d7 sound
# 006FA2 "movea.l #$100324, A5" 006FB8 "move.b #$0, (A5)+" 006FC2 "move.b D6, (A5)+" the place in the fixed layer of the title's next character
local staff_roll_next_credit 006FA2,006FB8,006FC2,006FD4,006FE4,006FEE a5 tile_place
# 006FF4 "lea $7018.l, A5" the list of jobs that print PRODUCED BY, for queue_jobs
local staff_roll_next_credit 006FF4 a5 jobs
# 006FAA "move.b $6342e.l, D7" the credit shown (staff_roll_credit), its title in staff_roll_credits
local staff_roll_next_credit 006FAA d7 credit_number
# 00700E "move.w #$fe, D7" the fade-out command for queue_sound
local staff_roll_next_credit 00700E d7 sound
# 0070D0 "move.w #$7, D7" the job for queue_job: job 0, the layers cleared (parameter 7)
local ending_game_over_clear 0070D0 d7 job
# 00710C "move.w #$1, D7" the text for print_colour_text: GAME OVER
local ending_game_over_start 00710C d7 text_number
# 00713C "move.w #$6d, D7" the GAME OVER music for queue_sound
local ending_game_over_start 00713C d7 sound
# 00721A "lea $102200.l, A6" 007220 "move.b #$0, (A6)+" 007224 "move.b #$10, (A6)+" the place in layer A's tile RAM of the next tile cleared
local clear_technodrome_top 00721A,007220,007224 a6 tile_place
# 007246 "movea.l A5, A4" 007252 "move.b D0, (A4)+" 007254 "move.b D1, (A4)+" the place in the tile RAM of the part's next tile
local draw_technodrome_wreck 007246,007252,007254 a4 tile_place
# 007236 "movea.l ($0,A6), A5" 007262 "adda.w #$80, A5" the place of the part's row, one down at a time
local draw_technodrome_wreck 007236,007262 a5 row_place
# 007244 "moveq #$0, D1" 007256 "addq.b #1, D1" 00725E "addi.b #$10, D1" the low byte of the tile's code, one more a tile, 0x10 more a row
local draw_technodrome_wreck 007244,00724E,007256,00725E d1 tile_code
# 00728E "move.b $63480.l, D7" the Technodrome's explosions so far
local start_technodrome_explosion 00728E d7 explosion_count
# 007298 "lsl.w #2, D7" the explosions (low three bits) times 4, the place's entry
local start_technodrome_explosion 007298 d7 explosion_offset
# 007366 "movea.l A6, A0" the turtle's portrait object
local start_staff_roll_portraits 007366 a0 portrait
# 007358 "lsl.w #2, D6" the turtle times 4, its portrait's entry
local start_staff_roll_portraits 007358 d6 portrait_offset
# 0073F4 "move.w #$fe, D7" the fade-out command for queue_sound
local staff_roll_skip 0073F4 d7 sound
# 007404 "lea $104018.l, A0" 007416 "move.b D0, (A0)+" 007418 "move.b D1, (A0)+" the place in layer B's tile RAM of the city's next tile
local draw_staff_roll_city 007404,007416,007418,007426 a0 tile_place
# 00740A "moveq #$14, D0" 007420 "addq.b #1, D0" the tile's attribute byte (colour and the high bits of its code), stepped when the code wraps
local draw_staff_roll_city 00740A,007420 d0 tile_attribute
# 00740C "clr.b D1" 00741A "addq.b #1, D1" the low byte of the tile's code, one more per tile
local draw_staff_roll_city 00740C,00741A d1 tile_code
# 0074A8 "move.b $6342e.l, D6" the credit shown (staff_roll_credit), its name's text
local set_credit_name_pass 0074A8 d6 credit_number
# 0074B8 "lea $63476.l, A4" 0074C8 "suba.l #$a, A4" the pass typed on, ten bytes each
local type_credit_name 0074B8,0074C8 a4 typed_pass
# 0074DC "movea.l A4, A3" the pass, kept while it is typed on
local erase_credit_name 0074DC a3 kept_pass
# 0074D4 "lea $63476.l, A4" 0074EC "suba.l #$a, A4" the pass typed on, ten bytes each
local erase_credit_name 0074D4,0074EC a4 typed_pass
# 0074DE "move.w D0, D7" 0074E4 "subq.b #1, D7" the pass's colour: its number, one less but for the first
local erase_credit_name 0074DE,0074E4 d7 colour_number
# 007522 "move.b ($1,A2,D7.w), D5" the pass's colour, its entry in text_colours
param type_credit_name_pass d7 colour_number
# 007522 "move.b ($1,A2,D7.w), D5" 00752E "addi.b #$18, D5" the pass's colour, 0x18 more for a letter
local type_credit_name_pass 007522,00752E d5 colour
# 007512 "move.b (A6)+, D6" the name's next character, '!' its end
local type_credit_name_pass 007512 d6 character
# 00754C "lsl.w #2, D6" the character less 0x40 times 4, its four tiles in credit_name_tiles
local type_credit_name_pass 00754C d6 character_offset
# 00780E "move.w #$0, D7" 0 for queue_sound: the sound stopped
local ending_game_over_skip 00780E d7 sound

# ---- scenes/intro.c ----
# 030982 "lsl.w #2, D0" the story's step (cutscene_step) times 4, the case that runs
local run_intro 030982 d0 step_offset
# 0309C0 "lea $104008.l, A0" 0309CE "move.b D0, (A0)+" 0309E6 "lea $104038.l, A0" 030AF0 "lea $102b28.l, A0" the place in the tile RAM: the picture's next tile, a square given a colour, the rooftop's tiles
local intro_rooftop_start 0309C0,0309CE,0309D0,0309DE,0309E6,0309F2,0309FE,030A0A,030A16,030A22,030A2E,030A3A,030A46,030AF0,030B02,030B04,030B0A a0 tile_place
# 0309C6 "moveq #$24, D0" 0309D8 "addq.b #1, D0" 030AFC "moveq #$3b, D0" the tiles' attribute byte, stepped when the code wraps
local intro_rooftop_start 0309C6,0309D8,030AFC d0 tile_attribute
# 0309EC "moveq #$4, D0" 0309F8 "moveq #$5, D0" 030A34 "moveq #$46, D0" the colour a square of the picture is given, for colour_tiles_8x8 and the others
local intro_rooftop_start 0309EC,0309F8,030A04,030A10,030A1C,030A28,030A34,030A40,030A4C d0 colour
# 030AAA "moveq #$70, D0" 030AD0 "move.b D0, ($1d,A0)" 030ADC "addi.b #$14, D0" the frames before the turtle leaps, 0x14 more for each, kept in its y speed's low byte
local intro_rooftop_start 030AAA,030ADC d0 leap_wait
# 0309C8 "clr.b D1" 0309D2 "addq.b #1, D1" the low byte of the tile's code, one more per tile
local intro_rooftop_start 0309C8,0309D2 d1 tile_code
# 030BE2 "move.b D0, (A0)" the colour, the attribute written
param colour_tiles_8x8 d0 colour
# 030BE2 "move.b D0, (A0)" the place in the tile RAM of the square's top left tile
param colour_tiles_8x8 a0 tile_place
# 030BE4 "adda.w #$2, A0" 030BEC "adda.w D4, A0" the place of the next tile, then of the next row
local colour_tiles_8x8 030BE4,030BEC a0 tile_place
# 030BC6 "moveq #$70, D4" 030BEC "adda.w D4, A0" the bytes from the row's end to the next row's start
local colour_tiles_8x8 030BC6 d4 row_skip
# 030BCA "moveq #$7, D5" the square's width less one
local colour_tiles_8x8 030BCA d5 width
# 030BE2 "move.b D0, (A0)" the colour, the attribute written
param colour_tiles_4x4 d0 colour
# 030BE2 "move.b D0, (A0)" the place in the tile RAM of the square's top left tile
param colour_tiles_4x4 a0 tile_place
# 030BE4 "adda.w #$2, A0" 030BEC "adda.w D4, A0" the place of the next tile, then of the next row
local colour_tiles_4x4 030BE4,030BEC a0 tile_place
# 030BD0 "moveq #$78, D4" 030BEC "adda.w D4, A0" the bytes from the row's end to the next row's start
local colour_tiles_4x4 030BD0 d4 row_skip
# 030BD4 "moveq #$3, D5" the square's width less one
local colour_tiles_4x4 030BD4 d5 width
# 030BE2 "move.b D0, (A0)" the colour, the attribute written
param colour_tiles_8x4 d0 colour
# 030BE2 "move.b D0, (A0)" the place in the tile RAM of the rows' first tile
param colour_tiles_8x4 a0 tile_place
# 030BE4 "adda.w #$2, A0" 030BEC "adda.w D4, A0" the place of the next tile, then of the next row
local colour_tiles_8x4 030BE4,030BEC a0 tile_place
# 030BDA "moveq #$70, D4" 030BEC "adda.w D4, A0" the bytes from the row's end to the next row's start
local colour_tiles_8x4 030BDA d4 row_skip
# 030BDE "moveq #$7, D5" the rows' width less one
local colour_tiles_8x4 030BDE d5 width
# 030D48 "lea $102b28.l, A0" 030D56 "move.b D0, (A0)+" 030D58 "move.b D1, (A0)+" the place in the tile RAM of the rooftop's next tile, blanked
local intro_rooftop 030D48,030D56,030D58,030D5E a0 tile_place
# 030D4E "moveq #$3b, D0" 030D56 "move.b D0, (A0)+" the attribute of the tiles
local intro_rooftop 030D4E d0 tile_attribute
# 030D1A "move.w #$a8, D1" 030D34 "move.w #$108, D1" the screen x of the speaker for show_balloon_beside
local intro_rooftop 030D1A,030D34 d1 screen_x
# 030D50 "moveq #$41, D1" 030D58 "move.b D1, (A0)+" the tile the rooftop is blanked with
local intro_rooftop 030D50 d1 tile_code
# 030D1E "move.w #$28, D2" 030D38 "move.w #$28, D2" the screen y of the speaker for show_balloon_beside
local intro_rooftop 030D1E,030D38 d2 screen_y
# 02FFD4 "moveq #$0, D3" 03004C "moveq #$41, D3" the balloon's line in balloon_records for show_balloon_beside
local intro_rooftop 02FFD4,03004C d3 line
# 030D28 "move.b #$7d, D7" the cry for queue_sound
local intro_rooftop 030D28 d7 sound
# 030D96 "lea $104008.l, A0" 030DA4 "move.b D0, (A0)+" 030DA6 "move.b D1, (A0)+" the place in layer B's tile RAM of the picture's next tile
local intro_climb_start 030D96,030DA4,030DA6,030DB4 a0 tile_place
# 030D9C "moveq #$14, D0" 030DAE "addq.b #1, D0" the tile's attribute byte, stepped when the code wraps
local intro_climb_start 030D9C,030DAE d0 tile_attribute
# 030D9E "clr.b D1" 030DA8 "addq.b #1, D1" the low byte of the tile's code, one more per tile
local intro_climb_start 030D9E,030DA8 d1 tile_code
# 030EC4 "lea $104000.l, A0" the place in the tile RAM where draw_whole_layer draws the roof
local intro_roof_start 030EC4 a0 tile_place
# 030ED0 "lea $9c08.l, A0" the roof's lists of palette effects, for start_palette_effect_lists
local intro_roof_start 030ED0 a0 effect_lists
# 030F14 "move.w #$203, D0" the turtle's new routine and state for turtle_set_state: dropping in
local intro_roof_start 030F14 d0 routine_state
# 030EE8 "moveq #$20, D6" 030F24 "addi.b #$10, D6" the frames before the turtle drops, 0x10 more for each
local intro_roof_start 030EE8,030F24 d6 drop_wait
# 030F76 "move.w #$100, D0" 030FC2 "move.w #$200, D0" the turtle's new routine and state for turtle_set_state: walking, crouching
local intro_roof_land 030F76,030FC2 d0 routine_state
# 03106C "lea $104038.l, A0" 031078 "move.b D0, (A0)+" 031138 "movea.l (A6)+, A0" the place in the tile RAM of the fire's next tile
# type: the K052109's tile RAM (100000-107FFF): 03106C "lea $104038.l, A0" 031096 "lea $104038.l, A0" 031138 "movea.l (A6)+, A0" (a square's first long, 0x104000)
local intro_animate_fire 03106C,031078,03107A,031082,031096,0310A6,0310A8,0310B4,031138,031140,031142,031148 a0 tile_place io
# 0310E0 "movea.l (A6,D0.w), A6" 031138 "movea.l (A6)+, A0" 03113A "move.b (A6)+, D2" the fire's frame: its squares of tiles, one after another
local intro_animate_fire 0310E0,0310E4,0310E8,0310EC,0310F0,031138,03113A,031142 a6 fire_frame
# 03106A "moveq #$1a, D0" 03108C "moveq #$1b, D0" 03109C "moveq #$4, D0" 0310BC "addq.b #1, D0" the attribute of the fire's tiles
local intro_animate_fire 03106A,03108C,03109C,0310BC d0 tile_attribute
# 031056 "clr.b D1" 03107C "addq.b #1, D1" 03109E "moveq #$18, D1" the low byte of the tile's code, one more per tile
local intro_animate_fire 031056,031066,03107C,03108E,03109E,0310AA,0310B0 d1 tile_code
# 031058 "move.b D1, D2" 031068 "moveq #$20, D2" the code the second part of the picture starts at
local intro_animate_fire 031058,031068 d2 next_part_code
# 0310F8 "movea.l (A6)+, A0" 031102 "move.b D2, (A0)+" 031104 "move.b D3, (A0)+" the place in the tile RAM of the square's next tile
# type: the K052109's tile RAM (100000-107FFF): 0310F8 "movea.l (A6)+, A0", the first long of the square's record (0x104000 in 03115E)
local draw_tile_square_8x8 0310F8,031102,031104,03110C a0 tile_place io
# 031100 "move.b (A6)+, D3" 031106 "addq.b #1, D3" the low byte of the tile's code: each row's first, one more a tile
local draw_tile_square_8x8 031100,031106 d3 tile_code
# 031118 "movea.l (A6)+, A0" 031122 "move.b D2, (A0)+" 031124 "move.b D3, (A0)+" the place in the tile RAM of the square's next tile
# type: the K052109's tile RAM (100000-107FFF): 031118 "movea.l (A6)+, A0", the first long of the square's record
local draw_tile_square_4x4 031118,031122,031124,03112C a0 tile_place io
# 031120 "move.b (A6)+, D3" 031126 "addq.b #1, D3" the low byte of the tile's code: each row's first, one more a tile
local draw_tile_square_4x4 031120,031126 d3 tile_code

# ---- stage/scroll.c ----
# 01A706 "move.b $60121.l, D0" the stage, its entry in area_scroll_segments
local start_scroll_segment 01A706 d0 stage_number
# 01ACE6 "move.w $6330c.l, D0" 01ACF0 "andi.l #$ffff, D0" the working layer's speed across, added to its x
local auto_scroll 01ACE6,01ACF0 d0 x_step
# 01AD4C "move.w $6330e.l, D0" 01AD56 "andi.l #$ffff, D0" the working layer's speed up or down, added to its y
local auto_scroll 01AD4C,01AD56 d0 y_step
# 02F650 "clr.b D0" 0 for the stage's hold: 0xFF once it holds the scroll
local hold_scroll_for_enemies 02F650 d0 held
# 02F622 "move.b $60121.l, D1" the stage
local hold_scroll_for_enemies 02F622 d1 stage_number
# 02F628 "lsl.w #3, D1" the stage times 8, its row in enemy_limits
local hold_scroll_for_enemies 02F628 d1 stage_offset
# 02F638 "move.b (A6,D0.w), D1" the enemies the stage allows on the screen at this difficulty
local hold_scroll_for_enemies 02F638 d1 enemy_limit
# 02F6E0 "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_building d0 held
# 02F6E0 "subq.b #1, D0" 02F6E6 "move.b D0, $633c5.l" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_building 02F6E0 d0 held
# 02F6CC "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_building d1 enemy_limit
# 02F6FC "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_apartment d0 held
# 02F6FC "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_apartment 02F6FC d0 held
# 02F6F4 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_apartment d1 enemy_limit
# 02F708 "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_street d0 held
# 02F708 "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right and scroll_held_down
local hold_scroll_street 02F708 d0 held
# 02F700 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_street d1 enemy_limit
# 02F714 "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_sewer d0 held
# 02F714 "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_sewer 02F714 d0 held
# 02F70C "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_sewer d1 enemy_limit
# 02F720 "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_car_street d0 held
# 02F720 "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_car_street 02F720 d0 held
# 02F718 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_car_street d1 enemy_limit
# 02F72C "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_highway d0 held
# 02F72C "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_highway 02F72C d0 held
# 02F724 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_highway d1 enemy_limit
# 02F730 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_skateboard d1 enemy_limit
# 02F750 "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_building_site d0 held
# 02F750 "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_building_site 02F750 d0 held
# 02F748 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_building_site d1 enemy_limit
# 02F77A "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_technodrome d0 held
# 02F77A "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_technodrome 02F77A d0 held
# 02F770 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_technodrome d1 enemy_limit
# 02F78A "subq.b #1, D0" 0, and 0xFF when the scroll is held
param hold_scroll_final d0 held
# 02F78A "subq.b #1, D0" 0xFF: the scroll held, kept in scroll_held_right
local hold_scroll_final 02F78A d0 held
# 02F780 "cmp.b $6120c.l, D1" the enemies the stage allows on the screen
param hold_scroll_final d1 enemy_limit

# ---- stage/drill_arrival.c ----
# 03059C "move.l #$1d6ff, D0" 0305B4 "move.l #$5b7ff, D0" the drill pod's x in the area (area 1's or 7's)
local drill_arrival_rumble 03059C,0305B4 d0 pod_x
# 0305BA "sub.l $63380.l, D0" 0305CC "lsr.l #8, D0" the drill pod's screen x, from layer B's x
local drill_arrival_rumble 0305BA,0305CC d0 pod_screen_x
# 030596 "move.l #$6500, D1" 0305AE "move.l #$8500, D1" 0305DE "addi.l #$e00, D1" the drill pod's y in the area, moved to where it shows
local drill_arrival_rumble 030596,0305AE,0305DE,0305E8 d1 pod_y
# 0305F2 "lsr.l #8, D1" 0305F8 "addi.w #$c, D1" the drill pod's screen y
local drill_arrival_rumble 0305F2,0305F8 d1 pod_screen_y
# 030486 "move.b $6110f.l, D0" 030496 "lsl.w #1, D0" the shake's step (shake_step), then times 2: its pair in shake_x and shake_y
local shake_layers_and_objects 030486,030496 d0 shake_offset
# 0304A6 "ext.w D1" the step of the shake across, added to the layers' scroll
local shake_layers_and_objects 0304A6 d1 x_shake
# 0304C8 "lsl.l #8, D1" the shake across the other way, in 1/256 pixels: added to the objects so they stay put
local shake_layers_and_objects 0304C8 d1 x_shift
# 0304A2 "move.b ($1,A6,D0.w), D2" the step of the shake up or down, added to the layers' scroll
local shake_layers_and_objects 0304A2 d2 y_shake
# 0304CA "lsl.l #8, D2" the shake up or down in 1/256 pixels, added to the objects
local shake_layers_and_objects 0304CA d2 y_shift
# 0306DC "subi.w #$40, D1" the first turtle's screen x less 0x40, for say_overgrown_cork_screw
local drill_arrival_descend 0306DC d1 screen_x
# 03071C "move.b $6110e.l, D0" the arrival's time left (drill_arrival_time)
local drill_arrival_open 03071C d0 time_left
# 030764 "move.l #$1d6ff, D0" 03077C "move.l #$5b6ff, D0" the drill pod's x in the area (area 1's or 7's)
local drill_arrival_open 030764,03077C d0 pod_x
# 030788 "sub.l $63380.l, D0" 03079A "lsr.l #8, D0" the drill pod's screen x, from layer B's x
local drill_arrival_open 030788,03079A d0 pod_screen_x
# 03075E "move.l #$6500, D1" 030776 "move.l #$8500, D1" 0307AC "addi.l #$c000, D1" the drill pod's y in the area, moved to its door
local drill_arrival_open 03075E,030776,0307AC,0307B6 d1 pod_y
# 0307C0 "lsr.l #8, D1" 0307C6 "addi.w #$c, D1" the drill pod's screen y
local drill_arrival_open 0307C0,0307C6 d1 pod_screen_y
# 03083A "move.w #$a0, D1" 03084A "move.w #$c0, D1" the screen y the door rises to, open
local drill_arrival_open 03083A,03084A d1 open_y
# 030894 "lea $18aec.l, A6" 0308A8 "lea $18f16.l, A6" 0308B6 "lea $18bae.l, A6" the tile blocks of the drill's hole, for draw_tile_block
local drill_arrival_end 030894,0308A8,0308B6,0308CA a6 block
# 030892 "moveq #$3, D7" 0308A6 "moveq #$1c, D7" the place in tile_block_places of the hole's first block
local drill_arrival_end 030892,0308A6 d7 place
# 0308B4 "moveq #$4, D7" 0308C8 "moveq #$1d, D7" the place in tile_block_places of the hole's second block
local drill_arrival_end 0308B4,0308C8 d7 place

# ---- scenes/demo.c ----
# 00471C "lea $60048.l, A0" the demo's held inputs (demo_held_inputs)
local update_game_inputs 00471C a0 held_inputs
# 004726 "movea.l (A6,D6.w), A1" 004736 "movea.l ($0,A1), A5" the channel's place of its recorded inputs
local update_game_inputs 004726 a1 record_place
# 004732 "movea.l ($c,A6,D6.w), A2" 00475E "jsr (A2)" the channel's routine that has its player join
local update_game_inputs 004732 a2 join_routine
# 00472E "movea.l ($8,A6,D6.w), A3" the channel's turtle inputs, written
local update_game_inputs 00472E a3 inputs_place
# 00472A "movea.l ($4,A6,D6.w), A4" the channel's frames left on the held inputs
local update_game_inputs 00472A a4 hold_time
# 004736 "movea.l ($0,A1), A5" 004742 "move.b (A5)+, D0" the demo's recorded inputs: inputs and how long they are held
local update_game_inputs 004736,004742 a5 record demo_input
# 004716 "lea $47c8.l, A6" the four channels' records (channel_records)
# 004716 "lea $47c8.l, A6" channel_records, read a record a channel (004726 "movea.l (A6,D6.w), A1"); but a
# channel's join routine leaves A6 at the joining player's record (00475E "jsr (A2)": demo_join_player_2's
# reset_player_2, 004294 "lea $60108.l, A6"), and the channels after it read their records from the work
# RAM past it (A6 plus the channel's offset): A6, and what is read through it, are not always channel_records'
# (batch 8b-mem: left untyped, so the C reads them through the bus, as the original)
local update_game_inputs 004716 a6 channels
# 004742 "move.b (A5)+, D0" the next recorded inputs, with bit 7 to join the player
local update_game_inputs 004742 d0 record_byte
# 00474E "andi.b #$7f, D0" the recorded inputs held, kept in demo_held_inputs
local update_game_inputs 00474E d0 inputs
# 004724 "lsl.w #4, D6" the channel times 16, its record in channel_records
local update_game_inputs 004724 d6 channel_offset
# 004CC2 "move.b $60005.l, D7" 004CC8 "ext.w D7" 004CCA "lsl.w #2, D7" the demo's scene times 4, the case that runs
local attract_demo 004CC2,004CC8,004CCA d7 scene_offset
# 004D3C "lsl.w #2, D0" the demo times 4, its entry in demo_settings_table
local start_demo 004D3C d0 demo_offset
# 004D6E "lsl.w #2, D0" the demo times 16, its four streams in demo_input_streams
local start_demo 004D6E d0 stream_offset
# 004DF6 "move.b #$0, D7" 0 for queue_sound: the sound stopped
local end_demo 004DF6 d7 sound

# ---- scenes/continue.c ----
# 007870 "move.w #$1, D7" the job for queue_job: job 0, the fixed layer cleared (parameter 1)
local continue_clear_text 007870 d7 job
# 00788A "move.w #$b7f, D7" the job for queue_job: job 0xB, the four boxes with their lives and health
local continue_start 00788A d7 job
# 007892 "move.w #$f02, D7" the job for queue_job: job 0xF, the tall text CONTINUE
local continue_start 007892 d7 job
# 0078AA "move.b #$0, D7" 0078B4 "move.b #$77, D7" the sounds for queue_sound: stopped, then the continue's music
local continue_start 0078AA,0078B4 d7 sound
# 0078DC "lsl.w #2, D7" the substep times 4, the case that runs
local continue_run 0078DC d7 substep_offset
# 0078EC "or.b $600b7.l, D7" the job for queue_job: job 0xB, the boxes of the players with lives
local continue_run 0078EC d7 job
# 00795E "lea $60034.l, A6" 00796A "move.b (A6)+, D0" the players' inputs (player_inputs), one after another
# type: a player's byte of player_inputs: 00795E "lea $60034.l, A6" 00796A "move.b (A6)+, D0"
local continue_countdown 00795E,00796A a6 inputs player_input
# 00796A "move.b (A6)+, D0" the player's inputs: a button speeds up the count
local continue_countdown 00796A d0 player_inputs_now
# 007928 "move.b $60006.l, D7" the continue's count (continue_count), drawn as a big character
local continue_countdown 007928 d7 count_left
# 0079BA "move.w #$200, D7" 0079CC "move.w #$1, D7" 0079D4 "move.w #$b7f, D7" the jobs for queue_job: the game's text 0, the fixed layer cleared, the four boxes
local continue_countdown 0079BA,0079CC,0079D4 d7 job
# 007A20 "move.w #$1, D7" the job for queue_job: job 0, the fixed layer cleared (parameter 1)
local game_over_clear_text 007A20 d7 job
# 007A42 "move.w #$1, D7" the text for print_colour_text: GAME OVER
local game_over_start 007A42 d7 text_number
# 007A76 "move.w #$6d, D7" the GAME OVER music for queue_sound
local game_over_start 007A76 d7 sound
# 007AC2 "move.w #$1e02, D6" the fade for copy_palette_sets: the parts it changes and its rate
param game_over_dim d6 fade
# 007AC2 "move.w #$1e02, D6" the fade toward darkened palettes
local game_over_dim 007AC2 d6 fade
# 007ABC "lea $a08e.l, A5" the palettes the fade goes toward
param game_over_dim a5 target_palettes
# 007ABC "lea $a08e.l, A5" the darkened palettes
local game_over_dim 007ABC a5 target_palettes
# 007AFE "move.w #$0, D7" 0 for queue_sound: the sound stopped
local game_over_skip 007AFE d7 sound

# ---- system/palette_editor.c ----
# 009C38 "lea $9c5c.l, A5" the list of jobs that print the editor's page, for queue_jobs
local palette_editor_start 009C38 a5 jobs
# 009C72 "lea $63400.l, A0" the editor's numbers (palette_editor_numbers): bank, palette, colour, pick
local palette_editor_frame 009C72 a0 numbers
# 009D5A "jsr $9ed2.l" 009D62 "move.b ($1,A6), D1" the colour's place in the palette RAM that palette_editor_entry gives
local palette_editor_frame 009D5A a6 colour_place
# 009C96 "andi.b #$f, D0" the first player's joystick: left and right pick a number, up and down change it
local palette_editor_frame 009C96 d0 joystick
# 009D66 "lsl.w #8, D1" 009D68 "add.b ($3,A6), D1" 009DA0 "add.w D3, D1" the colour picked, its two bytes as one word, then changed
local palette_editor_frame 009D66,009D68,009DA0 d1 colour
# 009DB0 "lsr.w #8, D1" the colour's high byte
local palette_editor_frame 009DB0 d1 colour_high
# 009D74 "move.b ($7,A0), D2" 009D78 "lsl.b #2, D2" the part of the colour picked (palette_editor_part) times 4, its step and mask
local palette_editor_frame 009D74,009D78 d2 part_offset
# 009D7A "move.w D1, D3" 009D84 "add.w ($2,A4,D2.w), D3" 009D90 "sub.w ($2,A4,D2.w), D3" the colour a step up or down in the part picked
local palette_editor_frame 009D7A,009D84,009D90 d3 stepped_colour
# 009D02 "move.b (A6,D7.w), D6" the highest the number picked can go, from palette_editor_limits
local palette_editor_frame 009D02 d6 limit
# 009CE2 "move.b ($4,A0), D7" 009CF0 "addq.b #3, D7" the number picked, three more outside bank 3: its entry in palette_editor_limits
local palette_editor_frame 009CE2,009CF0 d7 limit_choice
# 009D06 "move.b ($4,A0), D7" 009D0A "addi.b #$1, D7" the number picked, one more: its place in the editor's numbers
local palette_editor_frame 009D06,009D0A d7 number_offset
# 009D4E "move.b ($4,A0), D7" the number picked (palette_editor_pick)
local palette_editor_frame 009D4E d7 pick
# 009DBC "bsr $9ed2" the editor's numbers, for palette_editor_entry
param palette_editor_show_colour a0 numbers
# 009DBC "bsr $9ed2" 009DC0 "move.b ($1,A6), $8000d.l" the colour's place in the palette RAM that palette_editor_entry gives
local palette_editor_show_colour 009DBC a6 colour_place
# 009DE0 "move.b ($1,A0), D7" 009DF6 "move.b ($2,A0), D7" the editor's numbers: bank, palette, colour, pick
param palette_editor_draw a0 numbers
# 009DD2 "movea.l $9f1a.l, A6" 009DEE "movea.l $9f22.l, A6" 009E44 "adda.l #$6, A6" 009E76 "movea.l (A6,D7.w), A6" the place in the fixed layer of the number, the colour's parts, the mark
# type: the K052109's tile RAM (100000-107FFF): 009DD2 "movea.l $9f1a.l, A6" (palette_editor_place) 009E76 "movea.l (A6,D7.w), A6" (palette_editor_colour_places)
local palette_editor_draw 009DD2,009DEE,009E0A,009E26,009E44,009E52,009E76,009E92 a6 tile_place io
# 009E38 "lsl.w #8, D1" 009E3A "add.b ($3,A5), D1" 009E4A "lsr.w #5, D1" the colour shown, its two bytes as one word, a part at a time
local palette_editor_draw 009E38,009E3A,009E4A d1 colour
# 009E3E "move.w D1, D3" 009E4C "move.w D1, D3" 009E5A "move.w D1, D3" the colour's next part, for palette_editor_draw_part
local palette_editor_draw 009E3E,009E4C,009E5A d3 part
# 009DE0 "move.b ($1,A0), D7" the bank's number, its title in palette_editor_title
local palette_editor_draw 009DE0 d7 bank_number
# 009DF6 "move.b ($2,A0), D7" the palette's number, a hex digit
local palette_editor_draw 009DF6 d7 palette_number
# 009E12 "move.b ($3,A0), D7" the colour's number in the palette, a hex digit
local palette_editor_draw 009E12 d7 colour_number
# 009E62 "move.b ($4,A0), D7" the number picked, whose mark is drawn
local palette_editor_draw 009E62 d7 pick
# 009EA4 "andi.w #$1f, D3" 009EA8 "btst #$4, D3" a part of the colour, five bits
param palette_editor_draw_part d3 part
# 009EA4 "andi.w #$1f, D3" the part's five bits
local palette_editor_draw_part 009EA4 d3 part
# 009EA2 "clr.w D2" 009EB0 "addq.b #1, D2" the part's first digit, 0 or 1
local palette_editor_draw_part 009EA2,009EB0 d2 high_digit
# 009EC4 "move.b (A5,D3.w), D3" the tile of the part's second digit, from hex_digit_tiles
local palette_editor_draw_part 009EC4 d3 low_digit_tile
# 009EB2 "clr.b ($0,A6)" 009EB6 "move.b D2, ($1,A6)" the place in the fixed layer of the part's two digits
# type: the K052109's tile RAM (100000-107FFF), palette_editor_draw's place: 009E40 "bsr $9ea2"
param palette_editor_draw_part a6 tile_place io
# 009EF6 "adda.w D7, A6" the editor's numbers: bank, palette, colour
param palette_editor_entry a0 numbers
# 009EF6 "adda.w D7, A6" the place in the palette RAM of the colour the numbers pick
local palette_editor_entry 009EF6 a6 colour_place

# ---- scenes/opening.c ----
# 02F826 "lea $104000.l, A0" 02F83E "lea $102000.l, A0" the place in the tile RAM where draw_whole_layer draws layer B, then A
local start_opening 02F826,02F83E a0 tile_place
# 02F8AC "move.b $633ea.l, D0" the opening's step (cutscene_step), times 4 the case that runs
local run_opening 02F8AC d0 step_number
# 02F8FA "move.w #$c02, D6" the fade for copy_palette_sets: the parts it changes and its rate
param opening_city_fade_in d6 fade
# 02F8FA "move.w #$c02, D6" the fade toward the city's palettes
local opening_city_fade_in 02F8FA d6 fade
# 02F8F4 "lea $a0ae.l, A5" the palettes the fade goes toward
param opening_city_fade_in a5 target_palettes
# 02F8F4 "lea $a0ae.l, A5" the city's palettes
local opening_city_fade_in 02F8F4 a5 target_palettes
# 02F93C "move.b #$7d, D7" the sound for queue_sound as the clouds part
local opening_city_fade_in 02F93C d7 sound
# 02FCE8 "lea $100118.l, A0" 02FCF4 "move.b D0, (A0)+" 02FCF6 "move.b D1, (A0)+" the place in the fixed layer of the flash's next tile
local opening_turtles_leap_out 02FCE8,02FCF4,02FCF6,02FCF8,02FCFA,02FD00 a0 tile_place
# 02FC4C "move.w #$204, D0" the turtle's new routine and state for turtle_set_state: the leap
local opening_turtles_leap_out 02FC4C d0 routine_state
# 02FCEE "clr.b D0" 02FCF4 "move.b D0, (A0)+" the attribute of the flash's tiles, 0
local opening_turtles_leap_out 02FCEE d0 tile_attribute
# 02FCB2 "moveq #$3c, D1" 02FCCC "moveq #$3c, D1" 02FCE6 "moveq #$10, D1" the flash's tile: lit (0x3C), or blank (0x10)
local opening_turtles_leap_out 02FCB2,02FCCC,02FCE6 d1 tile_code
# 02FD30 "lea $102000.l, A0" 02FD50 "move.b D0, (A0)+" the place in layer A's tile RAM of the next tile cleared
local opening_portraits_start 02FD30,02FD50,02FD52,02FD54,02FD56 a0 layer_a_place
# 02FD36 "lea $104000.l, A1" 02FD40 "move.b D0, (A1)+" the place in layer B's tile RAM of the next tile cleared
local opening_portraits_start 02FD36,02FD40,02FD42,02FD44,02FD46 a1 layer_b_place
# 02FD3C "moveq #$0, D0" 02FD40 "move.b D0, (A1)+" the attribute of a blank tile (0)
local opening_portraits_start 02FD3C d0 blank_attribute
# 02FD3E "moveq #$10, D1" 02FD42 "move.b D1, (A1)+" the code of the blank tile (0x10, the space)
local opening_portraits_start 02FD3E d1 space_tile
# 02FEA4 "movea.l D0, A0" 02FF38 "adda.w #$8, A0" the place in the tile RAM of the new row's next block
local opening_scroll_layer 02FEA4,02FF38 a0 tile_place
# 02FEBE "movea.l D3, A2" 02FED6 "move.w (A2)+, D4" the place in the layer's map of the new row's next block
local opening_scroll_layer 02FEBE,02FED6 a2 map_place
# 02FECE "movea.l $63316.l, A3" the working layer's blocks
local opening_scroll_layer 02FECE a3 blocks
# 02FF06 "adda.l D4, A3" the block of the map's entry, whose tiles are written
local opening_scroll_layer 02FF06 a3 block
# 02FE86 "subi.l #$f000, D0" the y of the row the scroll brings into view
local opening_scroll_layer 02FE86 d0 row_y
# 02FE90 "andi.l #$f000, D0" 02FE96 "addi.w #$1000, D0" 02FE9A "neg.w D0" the offset in the layer's tile RAM of the new row, from its y
local opening_scroll_layer 02FE90,02FE96,02FE9A d0 tile_offset
# 02FE8C "move.l D0, D3" the y of the new row, kept for its row of the map
local opening_scroll_layer 02FE8C d3 map_row_y
# 02FEAC "lsl.l #3, D3" the new row's y in blocks, its row of the map
local opening_scroll_layer 02FEAC d3 row_map_y
# 02FE8E "move.l D0, D5" the y of the new row, kept for its rows within the blocks
local opening_scroll_layer 02FE8E d5 block_row_y
# 02FEC0 "lsl.l #7, D5" 02FECA "eor.w D3, D5" the new row's rows of tiles within the blocks: the offset of its tiles in a block
local opening_scroll_layer 02FEC0,02FECA d5 block_row
# 02FECC "moveq #$b, D7" 02FF3C "subi.b #$1, D7" the blocks of the new row left to draw
local opening_scroll_layer 02FECC,02FF3C d7 blocks_left

# ---- stage/floor_map.c ----
# 01DE5A "move.b ($f,A0), D6" the object's screen y, where its feet are, for read_floor_cells_at
local read_floor_cells_on_screen 01DE5A d6 feet_y
# 01DE58 "lsr.w #3, D7" the object's column in the floor map, from its screen x and the layer's x
local read_floor_cells_on_screen 01DE58 d7 floor_column
# 01DE80 "move.b ($18,A0), D6" the object's y in pixels, where its feet are, for read_floor_cells_at
local read_floor_cells 01DE80 d6 feet_y
# 01DE66 "lsr.l #8, D7" 01DE78 "add.w D0, D7" 01DE7E "lsr.w #3, D7" the object's column in the floor map, from its x and the layer's x
local read_floor_cells 01DE66,01DE68,01DE78,01DE7A,01DE7E d7 floor_column
# 01DE8C "add.b ($32,A0), D6" the object's y where its feet are
param read_floor_cells_at d6 feet_y
# 01DE8C "add.b ($32,A0), D6" 01DE90 "move.b D6, D5" the y of the floor under the object, its floor height added
local read_floor_cells_at 01DE8C d6 floor_y
# 01DEB0 "add.w D7, D6" 01DEB2 "add.w D7, D5" the object's column in the floor map
param read_floor_cells_at d7 floor_column
# 01DEB2 "add.w D7, D5" the offset in floor_map of the cell at the object's height
local read_floor_cells_at 01DEB2 d5 height_cell_offset
# 01DEBE "adda.w D5, A5" the place in floor_map of the cell at the object's height
# type: a cell of floor_map: 01DEBA "movea.l A6, A5" 01DEBE "adda.w D5, A5"
local read_floor_cells_at 01DEBE a5 height_cell_place floor_map_cell
# 01DEBC "adda.w D6, A6" the place in floor_map of the cell under the object
# type: a cell of floor_map: 01DEB4 "lea $61800.l, A6" 01DEBC "adda.w D6, A6"
local read_floor_cells_at 01DEBC a6 floor_cell_place floor_map_cell
# 01DF2A "movea.l A6, A4" 01DF36 "adda.w #$800, A4" 01DF48 "suba.w #$40, A4" 01DFF0 "movea.l A5, A4" the cell's neighbour's row, wrapped round the floor map
# type: a cell of floor_map, next to the one at floor_cell_place or height_cell_place: 01DF2A, 01DFF0
local read_floor_cells_at 01DF2A,01DF36,01DF48,01DF54,01DF60,01DF6E,01DF7A,01DF86,01DFF0,01DFFC,01E00E,01E01A,01E026,01E034 a4 neighbour_place floor_map_cell
# ---- the pointers into the program's data, typed; the tables the C still read by their address ----
# a list of texts: each entry points at a text (001EBC "movea.l (A6,D7.w), A6" in print_table_text, then its place,
# 001EC6 "movea.l (A6)+, A4", and its characters, 001EC8 "move.b (A6)+, D6")
elements text_pointer u32 text
# a block of tiles drawn by draw_tile_block: its width and rows, then a colour and a tile for each place (01841C
# "move.b (A6)+, D7", 01841E "move.b (A6)+, D6", 018426 "move.b (A6)+, (A4,D3.w)", 01842A "move.b (A6)+, ($1,A4,D3.w)")
elements tile_block_byte u8
# a palette's colours, a byte at a time into the palette RAM's two bytes of each colour (0095EA "move.b (A4)+, ($1,A5)",
# 0095EE "move.b (A4)+, ($3,A5)" in copy_palette_list; 009512 "move.b (A6)+, ($1,A5)" in palette_request_palette;
# 009544 "move.b (A6)+, D6" in palette_request_colours, the colour's number before its two bytes)
elements colour_byte u8
param palette_request_palette a6 data colour_byte
param palette_request_colours a6 data colour_byte
# Krang's chances of each next move, a row by the last one (00E4D8 "lea $e4fe.l, A6", 00E4E2 "sub.b (A6,D6.w), D7")
elements move_chance u8
00E4FE  table  krang_move_chances  u8
# the turtles' pictures' two sprites, as the sprite RAM takes them: code, colour, place (008B74 "lea $8bea.l, A5",
# 008B8C "move.b (A5,D5.w), (A6,D5.w)", 008BBA "move.b ($4,A5,D5.w), ($4,A6,D5.w)"), the ranking's other turtles' with
# D7's bit 7 (008B82 "lea $8c2a.l, A5")
elements picture_sprite_byte u8
008BEA  table  turtle_picture_sprites  u8
008C2A  table  ranking_turtle_picture_sprites  u8
# the turtles' walking speeds by kind, straight or on a diagonal (01B59E "lea $1b5b2.l, A6", 01B5AC "lsl.w #3, D0",
# 01B5AE "add.w D2, D0"; turtle_move reads one through the pointer turtle_walk_speed hands back)
01B5B2  table  turtle_walk_speeds  u16
# the four players' columns of the ranking, a long a player: where in the tile RAM their parts go, the frame (008150
# "lea $83da.l, A6", 00815A "movea.l (A6,D6.w), A6"), the label (0081CC "lea $83ea.l, A6", 0081D6 "movea.l (A6,D5.w),
# A6"), the place (008212 "lea $83fa.l, A6", 00821C "movea.l (A6,D6.w), A6"), the initials (00809C "lea $840a.l, A6",
# 0080A6 "movea.l (A6,D6.w), A6")
0083DA  table  ranking_frame_places[4]  u32 io
0083EA  table  ranking_label_places[4]  u32 io
0083FA  table  ranking_place_places[4]  u32 io
00840A  table  ranking_initials_places[4]  u32 io
# the frames until Rocksteady draws or puts away his gun, by difficulty, a run of words for each of his modes, which
# rocksteady_mode_times gives the offset of (04F452 "lea $4f594.l, A5", 04F458 "adda.w ($2,A6,D0.w), A5", 04F466
# "move.w (A5,D1.w), ($46,A0)")
04F594  table  rocksteady_mode_frames  u16
# the state tables of the ways in, by the enemy's move (048A80 "lea $53ed6.l, A6", 048A8A "movea.l (A6,D6.w), A6")
053ED6  table  enemy_ways_in  u32

# ---- the parameters and locals of the 68000's C, by what they hold: the turtles and the enemies ----
# ---- objects/turtles.c ----
# 019B46 "moveq #$0, D0" 019B7A "addq.b #1, D0" the player (0-3) whose turtle comes in: its turtle's kind for turtle_init and its entry in marker_times
local turtle_join 019B46,019B7A d0 player
# 019B4E "moveq #-$1, D6" 0xFF for turtle_init: the turtle is placed by the area's entry when the area is starting
local turtle_join 019B4E d6 by_entry
# 019B40 "lea $62c80.l, A1" 019B7C "adda.l #$50, A1" the player's marker object (objects 40-43), one per player, handed back past the last
param turtle_join a1 marker
# 019B9E "moveq #$0, D0" 019BD2 "addq.b #1, D0" the player (0-3) whose turtle comes back: its turtle's kind for turtle_init and its entry in marker_times
local turtle_respawn 019B9E,019BD2 d0 player
# 019BA6 "clr.b D6" 0 for turtle_init: the turtle comes back at its start point, not by the area's entry
local turtle_respawn 019BA6 d6 by_entry
# 019B98 "lea $62c80.l, A1" 019BD4 "adda.l #$50, A1" the player's marker object (objects 40-43), one per player, handed back past the last
param turtle_respawn a1 marker
# 019BFC "moveq #$0, D0" 019C54 "addq.b #1, D0" the player (0-3) whose turtle starts the area: its turtle's kind for turtle_init and its entry in marker_times
local turtle_start_area 019BFC,019C54 d0 player
# 019C0A "moveq #-$1, D6" 0xFF for turtle_init: the turtle is placed by the area's entry
local turtle_start_area 019C0A d6 by_entry
# 019BF6 "lea $60106.l, A2" 019C10 "movea.l $60066.l, A2" the player's health bars and health in players (+6), kept across turtle_init and written with the full health, eight bytes a player
# type: a player's record, at its health_bars (0x060106): 019BF6 "lea $60106.l, A2" 019C52 "addq.l #8, A2"
local turtle_start_area 019BF6,019C10,019C52 a2 player_health player+6
# 019BF0 "lea $62c80.l, A1" 019C56 "adda.l #$50, A1" the player's marker object (objects 40-43), one per player, handed back past the last
param turtle_start_area a1 marker
# 019CD8 "tst.b D6" 019CDA "bne $19d22" not 0: the turtle is placed by the area's entry (falling or jumping in) when the area is starting (scene 4, step 0, substep 3)
param turtle_init d6 by_entry
# 019C94 "movea.l A0, A6" the turtle's object, kept while A0 runs over it to clear it
local turtle_init 019C94 a6 turtle
# 019D4C "lsl.w #2, D1" the area (stage) times 4, the case of the area's entry
local turtle_init 019D4C d1 stage_offset
# 019CFE "lsl.w #2, D1" the turtle's kind times 4, its pair (x, y) in the start places
local turtle_place_at_start 019CFE d1 kind_offset
# 019D9E "lsl.w #1, D1" 019DA4 "add.w D2, D1" the turtle's kind times 6, its record (x, y, height) in the fall-in places
local turtle_start_fall_in 019D9E,019DA4 d1 kind_offset
# 019DAA "move.w ($2,A6,D1.w), D4" 019DBE "lsl.l #8, D4" the turtle's screen y from its fall-in place, then its y in the area (fixed point), handed back
local turtle_start_fall_in 019DAA,019DBE d4 y
# 019DE4 "lsl.w #1, D1" 019DEA "add.w D2, D1" the turtle's kind times 6, its entry in turtle_jump_in_x, turtle_jump_in_y and turtle_jump_in_speeds
local turtle_jump_in_start 019DE4,019DEA d1 kind_offset
# 019DF0 "move.w ($2,A6,D1.w), D4" 019E06 "lsl.l #8, D4" the turtle's screen y from turtle_jump_in_y, then its y in the area (fixed point), handed back
local turtle_jump_in_start 019DF0,019E06 d4 y
# 019E22 "movea.l A0, A5" the turtle's object, kept while A0 sets up the object that comes in with them (44)
local turtle_jump_in_start 019E22 a5 turtle
# 019E0C "move.l D4, ($16,A0)" the turtle's y in the area (fixed point), handed back
param turtle_jump_in_start d4 y
# 019EFE "move.w D0, D1" 019F00 "lsl.w #2, D1" the player (0-3), whose marker animation it picks from turtle_marker_animations
param turtle_start_marker d0 player
# 019ECA "movea.l A1, A6" 019F1A "movea.l A0, A1" the player's marker object, cleared, placed at the turtle and animated, handed back
param turtle_start_marker a1 marker
# 019ED2 "addq.w #4, A1" the place in the marker object where the next long of zeros is written
local turtle_start_marker 019ED2 a1 clear_place
# 019ECE "moveq #$14, D2" 019ED4 "subq.b #1, D2" the longs of the marker object left to clear (0x14)
local turtle_start_marker 019ECE,019ED4 d2 longs_left
# 019EFE "move.w D0, D1" 019F00 "lsl.w #2, D1" the player times 4, its entry in turtle_marker_animations
local turtle_start_marker 019EFE,019F00 d1 player_offset
# 019F1A "movea.l A0, A1" the marker object after set_animation, handed back
local turtle_start_marker 019F1A a1 marker
# 019FD0 "lsl.w #2, D0" the entry's step (cutscene_step) times 4, the case of the step that runs
local area_entry_fall_in 019FD0 d0 step_offset
# 01A0B2 "clr.b D0" 0 for say_we_gotta_save_splinter: the balloon on the left of the speaker
local turtle_fall_in 01A0B2 d0 on_right
# 01A0B4 "move.w ($c,A0), D1" the turtle's screen x, where the balloon is shown
local turtle_fall_in 01A0B4 d1 screen_x
# 01A2E2 "moveq #$0, D0" 01A2F0 "moveq #$4, D0" the offset of the turtle's shadow in the skateboard shadows (0 or 4)
local turtle_skateboard_shadow 01A2E2,01A2F0 d0 shadow_offset
# 01A334 "lea $61100.l, A6" 01A35C "addq.l #1, A6" the player's entry in marker_times, counted down player by player
# type: a player's byte of marker_times: 01A334 "lea $61100.l, A6" 01A35C "addq.l #1, A6"
local update_players 01A334,01A35C a6 marker_time marker_timer
# 01A43A "lea $60020.l, A1" 01A554 "addq.l #1, A1" the turtle's entry in turtle_inputs (what its player holds), one byte a turtle
# type: a player's byte of turtle_inputs: 01A43A "lea $60020.l, A1" 01A554 "addq.l #1, A1"
local turtle_run_all 01A43A,01A554,01A57C,01A672 a1 inputs player_input
# 01A440 "lea $6004c.l, A2" 01A556 "addq.l #1, A2" the turtle's entry in turtle_presses (what its player has just pressed), one byte a turtle
# type: a player's byte of turtle_presses: 01A440 "lea $6004c.l, A2" 01A556 "addq.l #1, A2"
local turtle_run_all 01A440,01A556 a2 presses player_input
# 01AB5E "moveq #$2, D0" 01AB68 "moveq #$1, D0" the direction written over the turtle's inputs while it is hit or throws (1 or 2, by its knockback or its flip)
local turtle_collide 01AB5E,01AB68,01AB6E,01AB7A d0 forced_input
# 01AB8A "move.b ($18,A0), D0" 01AB8E "add.b ($10,A0), D0" the turtle's y (whole) plus its height, off the area at 0xF8 or more
local turtle_collide 01AB8A,01AB8E d0 raised_y
# 01AB84 "jsr $1de62.l" where read_floor_cells found the turtle's floor cell in floor_map, for turtle_check_walls
local turtle_collide 01AB84 a6 floor_cell_place
# 01AB7C "move.b D0, (A1)" the turtle's entry in turtle_inputs
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_collide a1 inputs player_input
# 01AC84 "move.b ($0,A1), D0" 01AC88 "andi.w #$f, D0" the turtle's entry in turtle_inputs: its direction picks the walls it checks
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_check_walls a1 inputs player_input
# 01ADA6 "move.b (A1), D0" 01AE04 "move.b (A1), D0" the turtle's entry in turtle_inputs
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_move a1 inputs player_input
# 01ADA8 "andi.b #$3, D0" 01B16A "andi.b #$c, D0" the direction bits of the turtle's inputs (1, 2 across; 4, 8 up and down), masked for the axis it moves on
local turtle_move 01ADA8,01B16A,01B1C2,01B244,01B2D0 d0 direction_inputs
# 01AE2C "moveq #$0, D0" 01AEB2 "moveq #$0, D0" the edge turtle_other_at_edge looks at the other turtles by (0 right, 0x7F left, 0x80 bottom, 0xFF top)
local turtle_move 01AE2C,01AEB2,01B012,01B090,01B1FE,01B28A,01B3BA,01B3CE,01B440,01B456 d0 edge
# 01AEF4 "bsr $1b584" 01B0CE "bsr $1b584" turtle_walk_speeds, as turtle_walk_speed hands it back, read at the turtle's offset
local turtle_move 01AEF4,01B0CE,01B2C6,01B49C a6 walk_speeds walk_speed
# 01AEF4 "bsr $1b584" 01B0CE "bsr $1b584" the offset of the turtle's walking speeds in turtle_walk_speeds, by its kind and whether it walks on a diagonal
local turtle_move 01AEF4,01B0CE,01B2C6,01B49C d0 speed_offset
# 01AF3A "bsr $1b584" turtle_walk_speeds, as turtle_walk_speed hands it back
local turtle_push_scroll_left 01AF3A a6 walk_speeds walk_speed
# 01AF3E "move.w (A6,D0.w), $6330c.l" the offset of the turtle's walking speeds in turtle_walk_speeds
local turtle_push_scroll_left 01AF3A d0 speed_offset
# 01AF54 "lsl.w #5, D1" the scroll's speed times 32, what the layer's column phase moves by
local turtle_push_scroll_left 01AF54 d1 phase_step
# 01AF54 "lsl.w #5, D1" the scroll's speed times 32, handed back
param turtle_push_scroll_left d1 phase_step
# 01B124 "bsr $1b584" turtle_walk_speeds, as turtle_walk_speed hands it back
local turtle_push_scroll_right 01B124 a6 walk_speeds walk_speed
# 01B13E "lsl.w #5, D1" the scroll's speed times 32, what the layer's column phase moves by
local turtle_push_scroll_right 01B13E d1 phase_step
# 01B13E "lsl.w #5, D1" the scroll's speed times 32, handed back
param turtle_push_scroll_right d1 phase_step
# 01B330 "bsr $1b584" turtle_walk_speeds, as turtle_walk_speed hands it back
local turtle_push_scroll_up 01B330 a6 walk_speeds walk_speed
# 01B334 "move.w ($4,A6,D0.w), D0" the offset of the turtle's walking speeds in turtle_walk_speeds
local turtle_push_scroll_up 01B330 d0 speed_offset
# 01B34C "lsl.w #5, D1" the scroll's speed times 32, what the layer's row phase moves by
local turtle_push_scroll_up 01B34C d1 phase_step
# 01B34C "lsl.w #5, D1" the scroll's speed times 32, handed back
param turtle_push_scroll_up d1 phase_step
# 01B360 "move.l $63320.l, D2" the layer's y_max, handed back with the carry of its comparison
param turtle_push_scroll_up d2 y_max
# 01B544 "bsr $1b584" turtle_walk_speeds, as turtle_walk_speed hands it back
local turtle_push_scroll_down 01B544 a6 walk_speeds walk_speed
# 01B544 "bsr $1b584" the offset of the turtle's walking speeds in turtle_walk_speeds
local turtle_push_scroll_down 01B544 d0 speed_offset
# 01B560 "lsl.w #5, D1" the scroll's speed times 32, what the layer's row phase moves by
local turtle_push_scroll_down 01B560 d1 phase_step
# 01B560 "lsl.w #5, D1" the scroll's speed times 32, handed back
param turtle_push_scroll_down d1 phase_step
# 01B4C6 "moveq #$7f, D0" 0x7F for turtle_other_at_edge: the left edge
local push_scroll_diagonally 01B4C6 d0 edge
# 01B4EC "move.w D0, D1" 01B4EE "lsl.w #5, D1" the scroll's speed times 32, what the layer's column phase moves by
local push_scroll_diagonally 01B4EC,01B4EE d1 phase_step
# 01B4C8 "bsr $1b5d2" the turtle that pushes the scroll, left out of turtle_other_at_edge's look at the others
param push_scroll_diagonally a0 turtle
# 01B586 "move.b ($0,A1), D0" the turtle's entry in turtle_inputs
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_walk_speed a1 inputs player_input
# 01B586 "move.b ($0,A1), D0" the turtle's inputs, whose bits across (1, 2) and up and down (4, 8) say whether it walks on a diagonal
local turtle_walk_speed 01B586 d0 direction_inputs
# 01B584 "moveq #$0, D2" 01B59C "moveq #$2, D2" 2 when the turtle walks on a diagonal, 0 when not: the column of its speeds in turtle_walk_speeds
local turtle_walk_speed 01B584,01B59C d2 diagonal_offset
# 01B5AE "add.w D2, D0" the offset of the turtle's walking speeds in turtle_walk_speeds: its kind times 8 plus the diagonal's
local turtle_walk_speed 01B5AE d0 speed_offset
# 01B5AC "lsl.w #3, D0" 01B5AE "add.w D2, D0" the offset of the turtle's walking speeds in turtle_walk_speeds, handed back
param turtle_walk_speed d0 speed_offset
# 01B59E "lea $1b5b2.l, A6" turtle_walk_speeds, handed back
param turtle_walk_speed a6 walk_speeds
# 01B5DA "tst.b D0" 01B638 "andi.b #$7f, D0" the edge it looks at: 0 right (x 0x16000 or more), 1-0x7F left (under 0x9100), 0x80 bottom, 0x81-0xFF top
param turtle_other_at_edge d0 edge
# 01B5E0 "cmpa.l A0, A6" the turtle that pushes the scroll, left out of the look at the others
param turtle_other_at_edge a0 turtle
# 01B5D8 "moveq #$4, D1" 01B602 "subq.b #1, D1" the turtles left to look at (4 to 0), handed back
local turtle_other_at_edge 01B5D8,01B602,01B632,01B668,01B698 d1 turtles_left
# 01B5D8 "moveq #$4, D1" 01B602 "subq.b #1, D1" the turtles that were left to look at when one was at the edge
param turtle_other_at_edge d1 turtles_left
# 01B6E0 "move.b ($0,A1), D1" the turtle's entry in turtle_inputs (what its player holds)
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_control a1 inputs player_input
# 01B6E4 "move.b ($0,A2), D2" the turtle's entry in turtle_presses (what its player has just pressed)
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_control a2 presses player_input
# 01B6E4 "move.b ($0,A2), D2" what the turtle's player has just pressed (0x10 jump, 0x20 attack), for the routine that runs
local turtle_control 01B6E4 d2 pressed
# 01B730 "moveq #$0, D0" 01B73A "moveq #$4, D0" the turtle's new routine (high byte) and state (low byte) for turtle_set_state: standing, or walking (one state up going up, two more on the skateboard)
local turtle_start_walk 01B730,01B73A,01B74E,01B75A,01B764 d0 routine_state
# 01B76A "btst #$5, (A2)" the turtle's entry in turtle_presses: the attack button makes it a jump attack
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_start_jump a2 presses player_input
# 01B784 "moveq #$7, D0" 01B790 "moveq #$8, D0" the turtle's move for turtle_start_attack: 7 (Raphael) or 8, the attack straight from a jump
local turtle_start_jump 01B784,01B790 d0 move
# 01B7C4 "move.w #$201, D0" the turtle's new routine and state for turtle_set_state: the jump
local turtle_start_jump 01B7C4 d0 routine_state
# 01B7D0 "andi.b #$3, (A1)" 01B7EC "clr.b (A1)" the turtle's entry in turtle_inputs: its direction turns it, then it is cleared
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_start_combo a1 inputs player_input
# 01B80C "move.w #$4, D7" 4 for random_below: one of the turtle's four combos
local turtle_start_combo 01B80C d7 range
# 01B810 "jsr $48448.l" 01B816 "andi.w #$3, D7" the turtle's combo: random_below's pick times 3 (12 more for the strong one), its offset in the turtle's combo table
local turtle_start_combo 01B810,01B816,01B81E,01B846 d7 combo
# 01B802 "move.w #$500, D0" the turtle's new routine and state for turtle_set_state: the attack that goes on
local turtle_start_combo 01B802 d0 routine_state
# 01B850 "moveq #$3, D0" 3 for turtle_set_attack: the strong attack
local turtle_start_combo 01B850 d0 move
# 01B834 "movea.l (A6,D3.w), A6" the turtle's combo table from turtle_combos (by its kind), read at the combo's offset
local turtle_start_combo 01B834 a6 combo_table
# 01B85C "move.b D0, D1" the turtle's move, its attack's number before turtle_attack_firsts
param turtle_start_attack d0 move
# 01B888 "cmpi.b #$3, D0" 01B898 "andi.w #$7f, D0" the turtle's move (3 the strong attack), its state in routine 3
param turtle_set_attack d0 move
# 01B8BE "addi.w #$300, D0" the turtle's new routine (3, attacking) and state (the move) for turtle_set_state
local turtle_set_attack 01B8BE d0 routine_state
# 01B8C2 "cmpi.w #$411, D0" 01B91C "move.w D0, ($4,A0)" the turtle's new routine (high byte) and state (low byte); 0x411 knocked out
param turtle_set_state d0 routine_state
# 01B8EC "clr.b D0" 01B900 "subq.b #1, D0" 0 or 0xFF (the turtle's flip) for say_shell_shock: the side of its balloon
local turtle_set_state 01B8EC,01B900 d0 on_right
# 01B8D6 "move.b ($2,A0), D1" 01B8DC "lsl.w #3, D1" the turtle's kind (its player) times 8, its record in players
local turtle_set_state 01B8D6,01B8DC d1 player_offset
# 01B902 "move.w ($c,A0), D1" the turtle's screen x, where the balloon is shown
local turtle_set_state 01B902 d1 screen_x
# 01B8DA "move.w D1, D2" the turtle's kind (its player), its entry in prompt_shown
local turtle_set_state 01B8DA d2 player
# 01B926 "lsl.w #2, D3" 01B936 "lsl.w #2, D3" the turtle's kind times 4, then its routine times 4: the entries of the tables of animations it goes down
local turtle_set_animation 01B926,01B936 d3 table_offset
# 01B92E "movea.l (A6,D3.w), A6" the turtle's animations by routine, from turtle_animation_sets by its kind
local turtle_set_animation 01B92E a6 animation_set
# 01B950 "move.b D2, D3" what the turtle's player has just pressed (0x10 jump, 0x20 attack)
param turtle_stand d2 pressed
# 01B9BE "move.b D2, D3" what the turtle's player has just pressed (0x10 jump, 0x20 attack)
param turtle_walk d2 pressed
# 01B730 "moveq #$0, D0" 01B73A "moveq #$4, D0" the turtle's new routine and state for turtle_set_state: standing, or walking (one state up going up, two more on the skateboard)
local turtle_walk 01B730,01B73A,01B9E4,01B9F0,01BA0E d0 routine_state
# 01BA26 "btst #$5, (A2)" the turtle's entry in turtle_presses: the attack button makes a jump attack
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_jump a2 presses player_input
# 01BA40 "move.b ($10,A0), D1" 01BA44 "sub.b ($32,A0), D1" the turtle's height above its floor, which picks the jump attack
local turtle_jump 01BA40,01BA44 d1 height_above_floor
# 01BA52 "moveq #$a, D0" 01BA5C "subq.b #1, D0" the turtle's move for turtle_start_attack: 0xA high, 9, or 0xB low in the jump
local turtle_jump 01BA52,01BA5C,01BA6A d0 move
# 01BA2E "moveq #$38, D2" 01BA3A "moveq #$20, D2" the height above the floor from which the jump attack is the middle one (0x38, 0x20 for Raphael)
local turtle_jump 01BA2E,01BA3A d2 attack_height
# 01BAB0 "btst #$4, (A1)" the turtle's entry in turtle_inputs: the jump held makes it go on rising
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_jump_rise a1 inputs player_input
# 01BAD8 "move.w #$202, D0" the turtle's new routine and state for turtle_set_state: the top of the jump
local turtle_jump_rise 01BAD8 d0 routine_state
# 01BB28 "btst #$0, (A1)" the turtle's entry in turtle_inputs: its direction against a wall makes a wall jump
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_jump_top a1 inputs player_input
# 01BAF2 "move.w #$203, D0" 01BB62 "move.w #$205, D0" the turtle's new routine and state for turtle_set_state: falling, or the wall jump (0x204, 0x205)
local turtle_jump_top 01BAF2,01BB62,01BBC8 d0 routine_state
# 01BCB4 "moveq #$0, D0" 01BCBE "moveq #$4, D0" the turtle's new routine and state for turtle_set_state: standing, or walking when its direction is held
local turtle_land 01BCB4,01BCBE d0 routine_state
# 01BCE6 "clr.b (A1)" the turtle's entry in turtle_inputs, cleared
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_wall_jump a1 inputs player_input
# 01BD86 "clr.b (A1)" 01BDC6 "btst D1, (A1)" the turtle's entry in turtle_inputs: its direction moves the turtle during some attacks
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_attack a1 inputs player_input
# 01BD88 "move.l #$300, D0" 01BD98 "neg.l D0" how far the attack moves the turtle across (fixed point), negated when it faces left
local turtle_attack 01BD88,01BD98,01BDA6,01BDB8,01BDDA,01BDEA,01BDF8,01BE06,01BE14 d0 x_step
# 01BD8E "moveq #$3, D1" 01BD9A "addq.b #1, D1" the bit of the wall in front of the turtle in its contacts (3 right, 4 left)
local turtle_attack 01BD8E,01BD9A,01BE08,01BE12 d1 wall_bit
# 01BDAC "moveq #$1, D1" 01BDBA "clr.b D1" the bit of the direction it faces in the turtle's inputs (1 right, 0 left)
local turtle_attack 01BDAC,01BDBA d1 input_bit
# 01BDAE "moveq #$3, D2" 01BDBC "addq.b #1, D2" the bit of the wall in front of the turtle in its contacts (3 right, 4 left)
local turtle_attack 01BDAE,01BDBC d2 side_wall_bit
# 01BF04 "btst #$4, D2" 01BF0C "btst #$5, D2" what the turtle's player has just pressed (0x10 jump, 0x20 attack): the next attack or a jump
param turtle_attack_over d2 pressed
# 01BFC0 "clr.b (A1)" 01C17A "btst #$0, (A1)" the turtle's entry in turtle_inputs
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_attack_over a1 inputs player_input
# 01B730 "moveq #$0, D0" 01B73A "moveq #$4, D0" the turtle's new routine and state for turtle_set_state
local turtle_attack_over 01B730,01B73A,01C160,01C206 d0 routine_state
# 01C106 "move.b ($1,A4,D7.w), D0" 01C1AC "move.b ($2,A6,D7.w), D0" the combo's next move, read from the turtle's combo table
local turtle_attack_over 01C106,01C1AC d0 move
# 01BFA2 "lsl.w #1, D0" 01BFA8 "add.w D1, D0" the turtle's kind times 6, its entry in turtle_throw_moves and turtle_throw_counters
local turtle_attack_over 01BFA2,01BFA8 d0 kind_offset
# 01BFAA "move.w (A5,D0.w), D1" the enemy's move when the turtle throws it, from turtle_throw_moves
local turtle_attack_over 01BFAA d1 throw_move
# 01BF6A "movea.l (A6,D3.w), A4" the turtle's combo table from turtle_combos (by its kind)
local turtle_attack_over 01BF6A a4 combo_table
# 01BFAE "movea.l ($2,A5,D0.w), A5" the turtle's counter in turtle_throw_counters: a throw when it is 0x100 or more
# type: the turtle's throw timer, from its turtle_throw_moves record (0x061114 Leonardo's): 01BFB2 "cmpi.w #$100, (A5)"
local turtle_attack_over 01BFAE a5 throw_counter throw_timer
# 01BF76 "movea.l ($4a,A0), A6" the enemy the turtle hit, thrown when it can be (its throw, health, height)
local turtle_attack_over 01BF76 a6 target object.enemy
# 01BFCC "clr.b D0" 01BFD6 "moveq #-$80, D0" the thrown enemy's facing (0x80 when the turtle does not face left)
local turtle_attack_over 01BFCC,01BFD6 d0 facing
# 01C212 "clr.b (A1)" the turtle's entry in turtle_inputs, cleared
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_hit a1 inputs player_input
# 01C254 "moveq #$0, D0" 01C452 "addi.w #$400, D0" the turtle's new routine (4, hit) and state, from turtle_hit_reactions
local turtle_hit 01C254,01C452 d0 routine_state
# 01C4C2 "lsl.w #2, D2" the hit reaction times 4, its entry in turtle_hit_speeds
local turtle_hit 01C4C2 d2 reaction_offset
# 01C35E "movea.l ($4a,A0), A6" the enemy the turtle was throwing or holding, let go
local turtle_hit 01C35E a6 target object.enemy
# 01C378 "move.b ($2,A0), D1" 01C37C "lsl.w #1, D1" the turtle's kind times 2, its entry in turtle_hit_waits
local turtle_hit 01C378,01C37C d1 kind_offset
# 01C602 "lsl.w #3, D0" the turtle's kind (its player) times 8, its record in players: no balloon when it has no lives
local turtle_hit_by_shredder_ray 01C602 d0 player_offset
# 01C626 "move.w #$42b, D0" the turtle's new routine and state: knocked down by the ray
local turtle_hit_by_shredder_ray 01C626 d0 routine_state
# 01C630 "move.l #$200, D0" 01C63E "neg.l D0" how far the turtle walks across each frame (fixed point), negated when it faces left
local turtle_walk_off_screen 01C630,01C63E d0 x_step
# 01C6BC "moveq #$0, D0" 01C6CA "move.w #$100, D0" how far the turtle slides across each frame, negated when it faces left
local turtle_knocked_down_slide 01C6BC,01C6CA,01C6D8,01C6E8 d0 x_step
# 01C6DC "moveq #$3, D1" 01C6EA "addq.w #1, D1" the bit of the wall behind the turtle in its contacts (3 or 4)
local turtle_knocked_down_slide 01C6DC,01C6EA d1 wall_bit
# 01C73C "lsl.w #2, D0" 01C748 "move.b ($24,A0), D0" the reaction's variant times 4, then its step: the entries of turtle_knocked_down_steps it reads
local turtle_knocked_down_next 01C73C,01C748 d0 knock_offset
# 01C744 "movea.l (A6,D0.w), A6" the variant's steps, from turtle_knocked_down_steps
local turtle_knocked_down_next 01C744 a6 knock_steps
# 01C864 "move.l #$1800, D0" 01C874 "neg.l D0" how far the turtle is pushed across (fixed point), negated when it faces left
local turtle_knocked_back_start 01C864,01C874 d0 x_step
# 01C7F4 "moveq #$0, D0" 01C800 "move.w #$280, D0" how far the turtle slides across each frame, negated when it faces left
local turtle_knocked_back_slide 01C7F4,01C800,01C810 d0 x_step
# 01C804 "moveq #$3, D1" 01C812 "addq.w #1, D1" the bit of the wall behind the turtle in its contacts (3 or 4)
local turtle_knocked_back_slide 01C804,01C812 d1 wall_bit
# 01C884 "lsl.w #2, D0" 01C890 "move.b ($24,A0), D0" the reaction's variant times 4, then its step: the entries of turtle_knocked_back_steps it reads
local turtle_knocked_back_next 01C884,01C890 d0 knock_offset
# 01C88C "movea.l (A6,D0.w), A6" the variant's steps, from turtle_knocked_back_steps
local turtle_knocked_back_next 01C88C a6 knock_steps
# 01C8B2 "move.l #$1000, D0" 01C8C2 "neg.l D0" how far the turtle is pushed across (0x1000, fixed point), negated when it faces left
local turtle_knocked_back_next 01C8B2,01C8C2 d0 x_step
# 01C90E "moveq #$3, D0" 01C91A "addq.b #1, D0" the bit of the wall behind the turtle in its contacts (3 or 4)
local turtle_knocked_flying_fly 01C90E,01C91A d0 wall_bit
# 01C9A6 "move.l #$100, D0" 01C9B6 "neg.l D0" how far the turtle slides across each frame, negated when it faces left
local turtle_knocked_flying_slide 01C9A6,01C9B6 d0 x_step
# 01CA60 "lsl.w #2, D0" 01CA6C "move.b ($24,A0), D0" the reaction's variant times 4, then its step: the entries of turtle_knocked_flying_steps it reads
local turtle_knocked_flying_next 01CA60,01CA6C d0 knock_offset
# 01CA68 "movea.l (A6,D0.w), A6" the variant's steps, from turtle_knocked_flying_steps
local turtle_knocked_flying_next 01CA68 a6 knock_steps
# 01CAD8 "moveq #$3, D0" 01CAE4 "addq.b #1, D0" the bit of the wall in front of the turtle in its contacts (3 or 4)
local turtle_knocked_flying_from_behind_fly 01CAD8,01CAE4 d0 wall_bit
# 01CB60 "move.l #$100, D0" 01CB70 "neg.l D0" how far the turtle slides across each frame, negated when it faces left
local turtle_knocked_flying_from_behind_slide 01CB60,01CB70 d0 x_step
# 01CC1C "lsl.w #2, D0" 01CC28 "move.b ($24,A0), D0" the reaction's variant times 4, then its step: the entries of turtle_knocked_flying_from_behind_steps it reads
local turtle_knocked_flying_from_behind_next 01CC1C,01CC28 d0 knock_offset
# 01CC24 "movea.l (A6,D0.w), A6" the variant's steps, from turtle_knocked_flying_from_behind_steps
local turtle_knocked_flying_from_behind_next 01CC24 a6 knock_steps
# 01CC56 "move.l #$1000, D0" 01CC66 "neg.l D0" how far the turtle is pushed across (0x1000, fixed point), negated when it faces left
local turtle_knocked_flying_from_behind_next 01CC56,01CC66 d0 x_step
# 01CCEA "move.w #$41d, D0" the turtle's new routine and state for turtle_set_state: in the ice
local turtle_frozen_in_ice 01CCEA d0 routine_state
# 01CD1E "move.w #$411, D0" the turtle's new routine and state for turtle_set_state: knocked out (0x411)
local turtle_frozen_thaw 01CD1E d0 routine_state
# 01CD96 "move.w #$411, D0" the turtle's new routine and state for turtle_set_state: knocked out (0x411)
local turtle_shocked_drop 01CD96 d0 routine_state
# 01CDAE "lsl.w #2, D0" the reaction's step times 4, the case of the step that runs
local turtle_fall_in_manhole 01CDAE d0 step_offset
# 01CE18 "clr.b D0" 0 for show_balloon: the balloon on the left of the speaker
local turtle_fall_in_manhole_climb_out 01CE18 d0 on_right
# 01CE1A "move.w ($c,A0), D1" 0300C0 "subi.w #$30, D1" the turtle's screen x less 0x30, where the balloon is shown
local turtle_fall_in_manhole_climb_out 01CE1A,0300C0 d1 screen_x
# 01CDEC "move.w ($e,A6), D1" 01CDF2 "lsl.l #8, D1" the screen y of the manhole that caught the turtle, as a y in the area (fixed point), the turtle's new y, handed back
param turtle_fall_in_manhole_start d1 y
# 01CECA "tst.b (A2)" the turtle's entry in turtle_presses: each press counts in the struggle
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_held_struggle a2 presses player_input
# 01CE96 "clr.w D0" the turtle's new routine and state for turtle_set_state: standing
local turtle_held_struggle 01CE96 d0 routine_state
# 01CF08 "moveq #$6, D0" 6 for turtle_start_attack: the attack that frees the turtle
local turtle_held_struggle 01CF08 d0 move
# 01CE68 "add.w D0, D2" the turtle's screen y plus its height, where turtle_show_prompt shows the prompt
local turtle_held_struggle 01CE68 d2 prompt_y
# 01CF30 "move.w #$411, D0" the turtle's new routine and state for turtle_set_state: knocked out (0x411)
local turtle_held_dies 01CF30 d0 routine_state
# 01CFD0 "tst.b (A2)" the turtle's entry in turtle_presses: each press counts in the struggle
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_held_briefly_struggle a2 presses player_input
# 01CF30 "move.w #$411, D0" 01CFA6 "move.w #$422, D0" the turtle's new routine and state for turtle_set_state
local turtle_held_briefly_struggle 01CF30,01CFA6,01CFCA d0 routine_state
# 01D00E "moveq #$6, D0" 6 for turtle_start_attack: the attack that frees the turtle
local turtle_held_briefly_struggle 01D00E d0 move
# 01CF64 "add.w D0, D2" the turtle's screen y plus its height, where turtle_show_prompt shows the prompt
local turtle_held_briefly_struggle 01CF64 d2 prompt_y
# 01D096 "tst.b (A2)" the turtle's entry in turtle_presses: each press counts in the struggle
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_held_knock_off_struggle a2 presses player_input
# 01D0C0 "moveq #$0, D0" 01D0E2 "move.w #$411, D0" the turtle's new routine and state for turtle_set_state
local turtle_held_knock_off_struggle 01D0C0,01D0E2 d0 routine_state
# 01D03E "add.w D0, D2" the turtle's screen y plus its height, where turtle_show_prompt shows the prompt
local turtle_held_knock_off_struggle 01D03E d2 prompt_y
# 01D158 "tst.b (A2)" the turtle's entry in turtle_presses: each press counts in the struggle
# type: its player's byte of turtle_presses (turtle_run_all: 01A440 "lea $6004c.l, A2")
param turtle_held_throw_off_struggle a2 presses player_input
# 01D17C "move.w #$427, D0" 01D1DA "moveq #$0, D0" the turtle's new routine and state for turtle_set_state
local turtle_held_throw_off_struggle 01D17C,01D1DA,01D1F6,01D232 d0 routine_state
# 01D1CA "clr.b D0" 01D1D4 "moveq #-$80, D0" the thrown enemy's facing (0x80 when the turtle does not face left)
local turtle_held_throw_off_struggle 01D1CA,01D1D4 d0 facing
# 01D116 "add.w D0, D2" the turtle's screen y plus its height, where turtle_show_prompt shows the prompt
local turtle_held_throw_off_struggle 01D116 d2 prompt_y
# 01D23C "moveq #$50, D7" 0x50 for turtle_knockback_arc: what its drift and jump speeds lose each frame
local turtle_hit_fly 01D23C d7 slowdown
# 01D2CA "cmpi.w #$70, D2" the screen y where the prompt is shown (the held turtle's y plus its height)
param turtle_show_prompt d2 prompt_y
# 01D2D2 "move.w #$400, D2" 01D2E4 "lsl.w #4, D2" the offset of the prompt's row in the tile RAM, by its screen y (0x400 near the top)
local turtle_show_prompt 01D2D2,01D2E4 d2 row_offset
# 01D2B8 "adda.w ($4e,A0), A5" 01D2F8 "movea.l D1, A5" the place in the tile RAM where the prompt's next tile is written, two a row
# type: the K052109's tile RAM (100000-107FFF): 01D2B2 "lea $100000.l, A5" 01D2B8 "adda.w ($4e,A0), A5"
local turtle_show_prompt 01D2B8,01D2F8,01D2FE,01D300,01D306 a5 tile_place io
# 01D32C "adda.w ($4e,A0), A6" 01D338 "move.b D0, (A6)+" the place in the tile RAM where the prompt's next tile is cleared, two a row
# type: the K052109's tile RAM (100000-107FFF): 01D326 "lea $100000.l, A6" 01D32C "adda.w ($4e,A0), A6"
local turtle_erase_prompt 01D32C,01D338,01D33A,01D340 a6 tile_place io
# 01D432 "bset D0, D7" the job for queue_job: 0xB20 with the player's bit, show its health bars again
local turtle_save_health 01D432 d7 job
# 01D520 "andi.b #$c, (A1)" the turtle's entry in turtle_inputs
# type: its player's byte of turtle_inputs (turtle_run_all: 01A43A "lea $60020.l, A1")
param turtle_fire_gun a1 inputs player_input
# 01D6AA "ori.b #$1, D0" 01D6B2 "ori.b #$80, D0" the turtle's contact bits being built (0x80 the floor, 1 on the ground), or'ed into its contacts
param turtle_floor_contact d0 new_contacts
# 01D6BC "moveq #$0, D0" 01D6F8 "ori.b #$1, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_still 01D6BC,01D6F8,01D700 d0 new_contacts
# 01D708 "moveq #$0, D0" 01D736 "ori.b #$1, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_up 01D708,01D736,01D73E d0 new_contacts
# 01D760 "ori.b #$2, D0" 01D78C "ori.b #$8, D0" the turtle's contact bits being built (2 above, 8 right, 0x10 left)
param turtle_wall_contacts d0 new_contacts
# 01D748 "move.b $633d4.l, D1" 01D76A "move.b $633d5.l, D1" the floor cell above, then right, then left of the turtle (floor_cell_up...)
local turtle_wall_contacts 01D748,01D76A,01D796 d1 floor_beside
# 01D742 "move.b $633d9.l, D2" 01D790 "move.b $633db.l, D2" the cell at the turtle's height above, then left (height_cell_up...), against the floor cell
local turtle_wall_contacts 01D742,01D790 d2 height_beside
# 01D810 "ori.b #$82, D0" 01D82A "ori.b #$1, D0" the turtle's contact bits being built
param turtle_raise_floor d0 new_contacts
# 01D7EA "suba.w #$40, A6" 01D7F8 "adda.w #$800, A6" where the turtle's floor cell is in floor_map, walked up row by row (wrapping) while the cells are walls
# type: a cell of floor_map, where read_floor_cells_at found it: 01D7EA "suba.w #$40, A6"
param turtle_raise_floor a6 floor_cell_place floor_map_cell
# 01D7DE "clr.b D2" 01D7FC "addq.b #1, D2" the rows of wall above the turtle's floor cell counted so far
local turtle_raise_floor 01D7DE,01D7FC d2 rows
# 01D7E0 "move.b #$14, D3" 0x14, the most rows it counts
local turtle_raise_floor 01D7E0 d3 max_rows
# 01D84C "moveq #$0, D0" 01D860 "ori.b #$2, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_down 01D84C,01D860,01D88A,01D892 d0 new_contacts
# 01D8DE "ori.b #$82, D0" the turtle's contact bits being built
param turtle_lower_floor d0 new_contacts
# 01D8BA "adda.w #$40, A6" 01D8C8 "suba.w #$800, A6" where the turtle's floor cell is in floor_map, walked down row by row (wrapping)
# type: a cell of floor_map, where read_floor_cells_at found it
param turtle_lower_floor a6 floor_cell_place floor_map_cell
# 01D8A8 "clr.b D2" 01D8CC "addq.b #1, D2" the rows below the turtle's floor cell counted so far
local turtle_lower_floor 01D8A8,01D8CC d2 rows
# 01D8AA "moveq #$14, D3" 0x14, the most rows it counts
local turtle_lower_floor 01D8AA d3 max_rows
# 01D8E6 "moveq #$0, D0" 01D90E "ori.b #$2, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_right 01D8E6,01D90E,01D938,01D940,01D970,01D99A d0 new_contacts
# 01D8F6 "move.b $633d4.l, D1" 01D944 "move.b $633d5.l, D1" a floor cell beside the turtle (floor_cell_up, right, left...), against the walls
local turtle_walls_right 01D8F6,01D944,01D95E,01D974 d1 floor_beside
# 01D8F0 "move.b $633d9.l, D2" the cell at the turtle's height above it (height_cell_up)
local turtle_walls_right 01D8F0 d2 height_beside
# 01D9F4 "ori.b #$7b, D0" the turtle's contact bits being built
param turtle_leave_floor_right d0 new_contacts
# 01D9D2 "move.l #$1000, D1" 01D9EC "move.w #$1800, D1" how far the turtle is put back across off the step (0x1000 or 0x1800, fixed point)
local turtle_leave_floor_right 01D9D2,01D9EC d1 x_step
# 01D9FC "move.b $633d3.l, D1" the turtle's floor cell (floor_cell): a step down to the right is 0xFB or 0xFC
local turtle_leave_floor_right 01D9FC d1 floor_cell_here
# 01DA20 "moveq #$0, D0" 01DA48 "ori.b #$2, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_left 01DA20,01DA48,01DA72,01DA7A,01DAA4,01DACE d0 new_contacts
# 01DA30 "move.b $633d4.l, D1" 01DA7E "move.b $633d6.l, D1" a floor cell beside the turtle (floor_cell_up, right, left), against the walls
local turtle_walls_left 01DA30,01DA7E,01DAA8 d1 floor_beside
# 01DA2A "move.b $633d9.l, D2" the cell at the turtle's height above it (height_cell_up)
local turtle_walls_left 01DA2A d2 height_beside
# 01DB28 "ori.b #$7b, D0" the turtle's contact bits being built
param turtle_leave_floor_left d0 new_contacts
# 01DB06 "move.l #$1000, D1" 01DB20 "move.w #$1800, D1" how far the turtle is put back across off the step (0x1000 or 0x1800, fixed point)
local turtle_leave_floor_left 01DB06,01DB20 d1 x_step
# 01DB30 "move.b $633d3.l, D1" the turtle's floor cell (floor_cell): a step down to the left is 0xFA or 0xFC
local turtle_leave_floor_left 01DB30 d1 floor_cell_here
# 01DB54 "moveq #$0, D0" the turtle's contact bits being built, for turtle_walls_up_diagonal
local turtle_walls_up_left 01DB54 d0 new_contacts
# 01DB6E "moveq #$0, D0" the turtle's contact bits being built, for turtle_walls_up_diagonal
local turtle_walls_up_right 01DB6E d0 new_contacts
# 01DB9E "ori.b #$1, D0" 01DBA6 "ori.b #$80, D0" the turtle's contact bits being built
param turtle_walls_up_diagonal d0 new_contacts
# 01DBAA "move.b $633d4.l, D1" 01DC0A "move.b $633d5.l, D1" a floor cell beside the turtle (floor_cell_up, right, left), against the walls
local turtle_walls_up_diagonal 01DBAA,01DC0A,01DC34 d1 floor_beside
# 01DBBC "move.b $633d9.l, D2" the cell at the turtle's height above it (height_cell_up)
local turtle_walls_up_diagonal 01DBBC d2 height_beside
# 01DC7C "ori.b #$20, D0" 01DC9E "ori.b #$40, D0" the turtle's contact bits being built (the corners)
param turtle_corner_contacts d0 new_contacts
# 01DC64 "move.b $633d7.l, D1" 01DC86 "move.b $633d8.l, D1" the floor cell above right, then above left of the turtle
local turtle_corner_contacts 01DC64,01DC86 d1 floor_beside
# 01DC5E "move.b $633dc.l, D2" 01DC80 "move.b $633dd.l, D2" the cell at the turtle's height above right, then above left
local turtle_corner_contacts 01DC5E,01DC80 d2 height_beside
# 01DCA6 "moveq #$0, D0" 01DCD8 "ori.b #$2, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_down_right 01DCA6,01DCD8,01DD02,01DD0A d0 new_contacts
# 01DCC0 "move.b $633d4.l, D1" the floor cell above the turtle (floor_cell_up)
local turtle_walls_down_right 01DCC0 d1 floor_beside
# 01DCBA "move.b $633d9.l, D2" the cell at the turtle's height above it (height_cell_up)
local turtle_walls_down_right 01DCBA d2 height_beside
# 01DD34 "ori.b #$8, D0" 01DD5E "ori.b #$10, D0" the turtle's contact bits being built (the walls right and left)
param turtle_side_contacts d0 new_contacts
# 01DD0E "move.b $633d5.l, D1" 01DD38 "move.b $633d6.l, D1" the floor cell right, then left of the turtle
local turtle_side_contacts 01DD0E,01DD38 d1 floor_beside
# 01DD9C "moveq #$0, D0" 01DDCE "ori.b #$2, D0" the turtle's contact bits being built from the floor cells around it
local turtle_walls_down_left 01DD9C,01DDCE,01DDF8,01DE00 d0 new_contacts
# 01DDB6 "move.b $633d4.l, D1" the floor cell above the turtle (floor_cell_up)
local turtle_walls_down_left 01DDB6 d1 floor_beside
# 01DDB0 "move.b $633d9.l, D2" the cell at the turtle's height above it (height_cell_up)
local turtle_walls_down_left 01DDB0 d2 height_beside
# ---- objects/states.c ----
# 04823C "lsl.w #2, D0" the object's state times 4, its entry in the table of state routines
local run_object_state 04823C d0 state_offset
# 04823E "movea.l (A6,D0.w), A6" the routine of the object's state, read from its table and jumped to
local run_object_state 04823E a6 handler
# 04826E "ext.l D0" 048294 "ext.l D0" the object's x speed, then its y speed, added to its place
local move_object_blocked 04826E,048294 d0 speed
# 0482F0 "moveq #-$1, D3" 0482F4 "move.b ($3,A6), D3" the chance of the enemy's attack from its attack record (0xFF..., none, when it cannot attack), handed back
local enemy_attack_chance 0482F0,0482F4 d3 chance
# 048312 "eor.b D0, D3" the target's flags against the side the enemy is on: bit 6 set when the target faces it, kept in target_faces
local enemy_look_at_target 048312 d3 faces
# 0482FA "move.w ($c,A6), D1" 04830A "neg.w D1" the distance across from the enemy to its target, handed back (and kept in target_dx)
param enemy_look_at_target d1 dx
# 0482FE "move.w ($e,A6), D2" 04831A "neg.w D2" the distance up or down from the enemy to its target, handed back (and kept in target_dy)
param enemy_look_at_target d2 dy
# 048372 "moveq #-$1, D6" 04839A "exg D6, D5" the distance (across plus up and down) to the nearest turtle found so far
local enemy_nearest_turtles 048372,04839A,04839E d6 closest_distance
# 048370 "moveq #-$1, D5" 04839A "exg D6, D5" the distance to the second nearest turtle found so far, handed back
local enemy_nearest_turtles 048370,04839A,0483AA d5 next_distance
# 0483A0 "movea.l A4, A6" 0483C4 "movea.l $6122e.l, A6" the nearest turtle found so far, kept in nearest_turtle and handed back
local enemy_nearest_turtles 0483A0,0483C4 a6 closest
# 04839C "exg A6, A5" 0483AC "movea.l A4, A5" the second nearest turtle found so far, kept in second_nearest_turtle and handed back
local enemy_nearest_turtles 04839C,0483AC,0483CA a5 next_closest
# 048380 "sub.w ($c,A4), D0" 048386 "neg.w D0" the distance across from the enemy to the turtle, then plus the one up or down
local enemy_nearest_turtles 048380,048386,048394 d0 distance
# 04838C "sub.w ($e,A4), D1" 048392 "neg.w D1" the distance up or down from the enemy to the turtle
local enemy_nearest_turtles 04838C,048392 d1 y_distance
# 0483E6 "moveq #-$1, D6" 048410 "exg D6, D5" the distance (across plus up and down) to the nearest slot's turtle found so far
local enemy_nearest_slots 0483E6,048410,048414 d6 closest_distance
# 0483E4 "moveq #-$1, D5" 048410 "exg D6, D5" the distance to the second nearest slot's turtle found so far, handed back
local enemy_nearest_slots 0483E4,048410,048420 d5 next_distance
# 048416 "movea.l A3, A6" 04843A "movea.l $61226.l, A6" the slot whose turtle is the nearest found so far, kept in nearest_slot and handed back
local enemy_nearest_slots 048416,04843A a6 closest
# 048412 "exg A6, A5" 048422 "movea.l A3, A5" the slot whose turtle is the second nearest found so far, kept in second_nearest_slot and handed back
local enemy_nearest_slots 048412,048422,048440 a5 next_closest
# 0483F6 "sub.w ($c,A4), D0" 0483FC "neg.w D0" the distance across from the enemy to the slot's turtle, then plus the one up or down
local enemy_nearest_slots 0483F6,0483FC,04840A d0 distance
# 048402 "sub.w ($e,A4), D1" 048408 "neg.w D1" the distance up or down from the enemy to the slot's turtle
local enemy_nearest_slots 048402,048408 d1 y_distance
# 048448 "move.w D7, D6" 048474 "mulu.w D6, D7" how many values to pick from: the result is under it
param random_below d7 range
# 04846A "mulu.w #$17, D7" 048476 "andi.l #$ffff0000, D7" the random number: the seed mixed with the frame count and the object's place, kept in random_seed, then scaled below the range
local random_below 04846A,048476,04847C d7 random
# 048480 "move.w ($2c,A0), D1" 048484 "move.w ($2e,A0), D2" the enemy whose distances to its target (target_dx, target_dy) it compares
param enemy_target_distance_band a0 enemy object.enemy
# 048480 "move.w ($2c,A0), D1" 048490 "exg D1, D2" the larger of the enemy's distances to its target, across or up and down
local enemy_target_distance_band 048480,048490 d1 distance
# 0484F4 "adda.w #$4, A5" 0484F8 "movea.l (A5), A6" the enemy's two turning animations (the second when it turns the other way), the one it picks handed back
param enemy_turn_animation a5 animations animation_entry
# 0484E2 "bsr $48516" the enemy's turning animations, which it goes on to pick from (enemy_turn_animation follows)
param enemy_turn_to_object a5 animations
# 0484E2 "bsr $48516" for enemy_facing_bits: the direction to the object, which side the enemy turns to
param enemy_turn_to_object d0 direction
# 048546 "bsr $4854c" 04854A "bra $484e6" the enemy's turning animations, for enemy_turn_animation
param enemy_turn_to_direction a5 animations
# 048546 "bsr $4854c" for direction_facing_bits: the direction the enemy moves in, which side it turns to
param enemy_turn_to_direction d0 direction
# 0484B2 "bsr $48516" for enemy_facing_bits: the direction to the object, which side the enemy faces
param enemy_face_object d0 direction
# 04853E "bsr $4854c" for direction_facing_bits: the direction the enemy moves in, which side it faces
param enemy_face_direction d0 direction
# 048530 "cmpi.b #$40, D0" the direction to the target: 0x40 or more, the target is on the left
param enemy_facing_bits d0 direction
# 048516 "clr.w D7" 04852C "bset #$7, D7" the side bits handed back: 0x80 when the target is below (4 lines or more), 0x40 when it is on the left
local enemy_facing_bits 048516,04852C,048538 d7 facing_bits
# 04851C "sub.w ($e,A0), D6" how far below the enemy its target is
local enemy_facing_bits 04851C d6 y_distance
# 04854E "cmpi.b #-$7c, D0" 048562 "cmpi.b #$40, D0" the direction: 0x84-0xFC down, under 0x40 right
param direction_facing_bits d0 direction
# 04854C "clr.b D7" 04855E "move.b #$80, D7" the side bits handed back: 0x80 going down, 0x40 going left
local direction_facing_bits 04854C,04855E,04856A d7 facing_bits
# 0485A6 "clr.b D7" 0485AA "moveq #-$1, D7" 0 when the enemy is on the screen (x 0x70-0x18F), all ones when it is off
param enemy_on_screen d7 on_screen
# 0485AE "move.b $60130.l, D7" 0485B4 "andi.w #$7, D7" the difficulty (0-7) times 2, the enemy's entry in its health settings
local enemy_set_health 0485AE,0485B4,0485B8 d7 difficulty_offset
# 0485C2 "move.b $60130.l, D7" 0485C8 "andi.w #$7, D7" the difficulty (0-7) times 2, the enemy's entry in its health settings
local enemy_refill_health 0485C2,0485C8,0485CC d7 difficulty_offset
# 0485CE "move.b ($1,A6,D7.w), ($9,A0)" the enemy's health settings by difficulty (bars, health), the health refilled from them
param enemy_refill_health a6 settings health_setting
# 04864C "move.w ($8,A6), D7" 04865E "neg.w D7" the arc's step across (negated when the enemy faces left), added to the enemy's x when no wall is in the way
local enemy_start_arc 04864C,04865E,048674 d7 x_step
# 0486D6 "move.b #$7f, D0" 0486E4 "move.b #$bf, D0" the mask that clears the enemy's side in the slot's sides (0x7F right, 0xBF left)
local enemy_give_side_back 0486D6,0486E4 d0 side_mask
# 048702 "lsr.w #3, D7" the direction to the target over 8, its turning animation's entry in the table
local enemy_face_target_animation 048702 d7 direction_offset
# 048704 "movea.l (A6,D7.w), A6" the enemy's animations by the direction to the target, one every 8 steps of the direction
param enemy_face_target_animation a6 animations animation_entry
# 0486F8 "move.b ($2b,A0), D0" 0486FC "move.b D0, ($30,A0)" the direction to the target (target_direction), handed back
param enemy_face_target_animation d0 direction
# 048780 "jsr $1de3e.l" where read_floor_cells_on_screen found the enemy's floor cell in floor_map, kept in enemy_floor_cell_place
local enemy_floor_contacts 048780 a6 floor_cell_place
# 048798 "clr.b D7" 0487AE "moveq #$8, D7" the enemy's contact bits with the walls around it (8 right, 0x10 left, 2 above, 4 below), or'ed into its contacts
local enemy_floor_edges 048798,0487AE,0487C4,0487DC,0487EA d7 new_contacts
# 04879A "move.b $633d5.l, D0" the floor cell right of the enemy, handed back
local enemy_floor_edges 04879A d0 floor_right
# 0487B0 "move.b $633d6.l, D1" the floor cell left of the enemy, handed back
local enemy_floor_edges 0487B0 d1 floor_left
# 0487C8 "move.b $633d4.l, D2" the floor cell above the enemy, handed back
local enemy_floor_edges 0487C8 d2 floor_up
# 0487E0 "move.b $61118.l, D3" the floor cell below the enemy, handed back
local enemy_floor_edges 0487E0 d3 floor_down
# 04879A "move.b $633d5.l, D0" the floor cell right of the enemy, handed back
param enemy_floor_edges d0 floor_right
# 0487B0 "move.b $633d6.l, D1" the floor cell left of the enemy, handed back
param enemy_floor_edges d1 floor_left
# 0487C8 "move.b $633d4.l, D2" the floor cell above the enemy, handed back
param enemy_floor_edges d2 floor_up
# 0487E0 "move.b $61118.l, D3" the floor cell below the enemy, handed back
param enemy_floor_edges d3 floor_down
# 04885A "movea.l (A1), A6" the enemy's target slot, whose turtle's floor height it compares with its own
param enemy_check_floor_edge a1 slot player_slot
# 04885A "movea.l (A1), A6" the turtle of the enemy's target slot, whose floor height it compares with its own
local enemy_check_floor_edge 04885A a6 turtle object.turtle
# 04890E "movea.l $61248.l, A6" where the enemy's floor cell is in floor_map (enemy_floor_cell_place), for the stairs
local enemy_follow_stairs 04890E a6 floor_cell_place
# 048914 "move.b $633d3.l, D0" the enemy's floor cell (floor_cell): stairs are 0xFA and 0xFB
local enemy_follow_stairs 048914 d0 floor_cell_here
# 048938 "movea.l $61248.l, A6" where the enemy's floor cell is in floor_map (enemy_floor_cell_place), for the stairs
local enemy_follow_stairs_down 048938 a6 floor_cell_place
# 04893E "move.b $633d3.l, D0" the enemy's floor cell (floor_cell): stairs are 0xFA-0xFC
local enemy_follow_stairs_down 04893E d0 floor_cell_here
# 048962 "adda.w #$40, A6" 048970 "suba.w #$800, A6" where the enemy's floor cell is in floor_map, walked down row by row (wrapping) while the cells are walls
# type: a cell of floor_map, where read_floor_cells_at found it: 048962 "adda.w #$40, A6" 048970 "suba.w #$800, A6"
param enemy_stairs_down a6 floor_cell_place floor_map_cell
# 04897C "movea.l $61248.l, A6" where the enemy's floor cell is in floor_map (enemy_floor_cell_place), for the stairs
local enemy_follow_stairs_up 04897C a6 floor_cell_place
# 048982 "move.b $633d3.l, D0" the enemy's floor cell (floor_cell): stairs are 0xFA-0xFC
local enemy_follow_stairs_up 048982 d0 floor_cell_here
# 0489AC "suba.w #$40, A6" 0489BA "adda.w #$800, A6" where the enemy's floor cell is in floor_map, walked up row by row (wrapping) while the cells are walls
# type: a cell of floor_map, where read_floor_cells_at found it
param enemy_stairs_up a6 floor_cell_place floor_map_cell
# 048A32 "move.b ($3,A0), D0" the soldier's parameter, its first move (times 4 in move)
local enemy_foot_soldier_setup 048A32 d0 first_move
# 048C2A "movea.l (A1), A6" 048CCA "movea.l (A1), A6" the turtle of the enemy's target slot: is it down (routine 4 and a reaction that knocks it down)
local enemy_think 048C2A,048CCA a6 turtle object.turtle
# 048CF2 "jsr $482b6.l" the chance of the enemy's attack that enemy_attack_chance hands back (negative: none)
local enemy_think 048CF2 d3 chance
# 048E20 "move.b ($7,A0), D1" 048EC0 "andi.w #$7f, D1" the hit's side bits (bit 7 from behind) and reaction, its entry in the definition's reactions
local enemy_hit 048E20,048EC0 d1 hit_side
# 049382 "lea $49358.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_circle_start 049382 a6 animations
# 0493AA "subi.b #$30, D0" 0493B2 "addi.b #$50, D0" the direction to the target, turned 0x50 one way or 0x30 the other, the direction the enemy circles in
param enemy_circle_aim d0 direction
# 0493F0 "lea $49358.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_circle_step 0493F0 a6 animations
# 0497B0 "lea $49358.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_keep_distance_start 0497B0 a6 animations
# 0497D4 "lea $49358.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_keep_distance_watch 0497D4 a6 animations
# 049802 "addi.b #-$80, D0" 049826 "move.b ($2b,A0), D0" the direction away from the target, or to it: where the enemy steps
local enemy_keep_distance_watch 049802,049826 d0 direction
# 0498C0 "move.b ($2b,A0), D0" 0498D2 "addi.b #-$80, D0" the direction to the target, which the enemy faces, then the one away from it, which it walks in
local enemy_back_off_start 0498C0,0498D2 d0 direction
# 049622 "jsr $47ccc.l" the enemy's walking animations (enemy_walk.animations), for enemy_turn_to_object
local enemy_walk_to_target_step 049622 a5 animations
# 04960E "jsr $47d90.l" the direction to the target that direction_to_object gives, which the enemy turns and walks to
local enemy_walk_to_target_step 04960E d0 direction
# 049EC8 "move.b #$8, D0" 049ED6 "move.b #$10, D0" the contact bit of the wall behind the enemy (8 right, 0x10 left)
local enemy_killed_back_fly 049EC8,049ED6 d0 wall_mask
# 04A004 "move.b #$8, D0" 04A012 "move.b #$10, D0" the contact bit of the wall in front of the enemy (8 right, 0x10 left)
local enemy_killed_forward_fly 04A004,04A012 d0 wall_mask
# 04A25A "move.b #$8, D0" 04A268 "move.b #$10, D0" the contact bit of the wall the thrown enemy flies to (8 right, 0x10 left)
local enemy_thrown_fly 04A25A,04A268 d0 wall_mask
# 04A2EC "add.w ($0,A5), D1" 04A2FE "sub.w ($0,A5), D1" how far across the enemy is moved to its place by the other object (the placement's x, by its facing)
local enemy_place_by 04A2EC,04A2FE d1 dx
# 04A350 "lea $4a332.l, A5" the placement of the enemy by Donatello when he lets go, for enemy_place_by
local enemy_let_go_by_donatello 04A350 a5 placement
# 04A40C "lea $4a3ee.l, A5" the placement of the enemy by Michelangelo when he lets go, for enemy_place_by
local enemy_let_go_by_michelangelo 04A40C a5 placement
# 04A4CA "lea $4a4ac.l, A5" the placement of the enemy by Raphael when he lets go, for enemy_place_by
local enemy_let_go_by_raphael 04A4CA a5 placement
# 04A588 "lea $4a56a.l, A5" the placement of the enemy by Leonardo when he lets go, for enemy_place_by
local enemy_let_go_by_leonardo 04A588 a5 placement
# 04A23C "lea $4a1fc.l, A5" the placement of the enemy by Donatello as he swings it, for enemy_place_by
param enemy_thrown_by_donatello_swing a5 placement
# 04A3D0 "lea $4a390.l, A5" the placement of the enemy by Michelangelo as he swings it, for enemy_place_by
param enemy_thrown_by_michelangelo_swing a5 placement
# 04A48E "lea $4a44e.l, A5" the placement of the enemy by Raphael as he swings it, for enemy_place_by
param enemy_thrown_by_raphael_swing a5 placement
# 04A54C "lea $4a50c.l, A5" the placement of the enemy by Leonardo as he swings it, for enemy_place_by
param enemy_thrown_by_leonardo_swing a5 placement
# 04A74E "move.w #$43a, D7" the palette request for post_palette_request: the shutter's colours
local boss_shutter_start 04A74E d7 request
# 04AABA "jsr $482fa.l" how far across the target is, from enemy_look_at_target
local falling_debris_wait 04AABA d1 dx
# 04AABA "jsr $482fa.l" how far up or down the target is, from enemy_look_at_target
local falling_debris_wait 04AABA d2 dy
# 04ABE6 "jsr $482fa.l" how far across the target turtle is, from enemy_look_at_target
local motorbike_ride 04ABE6 d1 dx
# 04ABE6 "jsr $482fa.l" how far up or down the target turtle is, from enemy_look_at_target
local motorbike_ride 04ABE6 d2 dy
# 04AC32 "lea $4ab4e.l, A5" 04AC46 "lea $4ab56.l, A5" the record of the object it leaves (the rider, or the rider of the wheelie), for start_object_from_record
local motorbike_struck 04AC32,04AC46 a5 record
# 04AF4A "move.b ($2b,A0), D0" 04AF5C "addi.b #-$80, D0" the direction to the target, which the enemy faces, then the one away from it, which it walks in
local enemy_back_off_sword_start 04AF4A,04AF5C d0 direction
# 04B3BA "subi.w #$10, D0" 04B3C2 "clr.w D0" how far across the leap goes: the distance to the target less 0x10, 0 when closer
local enemy_leaping_slash_sword_leap 04B3BA,04B3C2 d0 distance
# 04B548 "subi.w #$10, D0" 04B550 "clr.w D0" how far across the leap goes: the distance to the target less 0x10, 0 when closer
local enemy_flying_slash_sword_leap 04B548,04B550 d0 distance
# 04B8E4 "move.w (A6,D0.w), D1" 04B8F2 "neg.w D1" how far across from the arm the caught turtle is held, from whip_arm_offsets by Rodney's step (negated when the arm faces left)
local whip_arm_drag 04B8E4,04B8F2 d1 x_offset
# 04B8A2 "move.l #$62000, D7" the turtle the arm caught (its hit object), handed back
param whip_arm_drag d7 turtle
# 04B89E "movea.l ($24,A0), A1" Rodney, the arm's owner, handed back
param whip_arm_drag a1 rodney
# 04B90A "move.l #$62000, D7" the turtle the arm caught (its hit object), handed back
param whip_arm_struck d7 turtle
# 04B91C "movea.l ($24,A0), A1" Rodney, the arm's owner, handed back
param whip_arm_struck a1 rodney
# 04B828 "movea.l ($24,A0), A1" Rodney, the arm's owner, handed back
param whip_arm_follow a1 rodney
# 04B982 "lsl.w #1, D0" Rodney's step of the whip times 2, its entry in the arm's offsets
local whip_arm_place 04B982 d0 step_offset
# 04B984 "move.w (A6,D0.w), D1" 04B992 "neg.w D1" how far across from Rodney the arm is placed, from the offsets (negated when it faces left)
local whip_arm_place 04B984,04B992 d1 x_offset
# 04B964 "move.l #$62000, D7" the turtle the arm caught (its hit object), handed back
param whip_arm_place d7 turtle
# 04BFFE "move.b ($3,A0), D5" 04C03C "lsl.w #3, D5" the bullet's parameter, its aim (in aims), then times 8
local rocksteady_bullet_start 04BFFE,04C03C d5 aim_number
# 04C026 "move.w #$600, D1" the bullet's speed for speeds_from_direction
local rocksteady_bullet_start 04C026 d1 speed
# 04C03E "lea $4bfd6.l, A5" the bullet's animations, handed back
param rocksteady_bullet_start a5 animations
# 04C52C "lea $4c4c6.l, A5" 04C538 "adda.w #$8, A5" the record of the door's next piece, for start_object_from_record, eight bytes a piece
local kicked_door_break 04C52C,04C538 a5 record
# 04C600 "lsl.w #2, D0" the piece's parameter times 4, its entry in door_piece_animations and door_piece_speeds
local door_piece_start 04C600 d0 piece_offset
# 04C76A "lea $4c6d0.l, A5" 04C776 "lea $4c6d8.l, A5" the record of the object the elevator lets out (its doors), for start_object_from_record
local elevator_open 04C76A,04C776 a5 record
# 04C976 "lea $4c894.l, A5" the record of the tire he throws, for start_object_from_record
param tire_soldier_throw a5 record
# 04CA5A "lea $4c9be.l, A5" the record of the hole he leaves, for start_object_from_record
param manhole_soldier_jump_out a5 record
# 04CAAA "lea $4c9b6.l, A5" the record of the manhole cover he throws, for start_object_from_record
param manhole_soldier_throw a5 record
# 04CC58 "lea $4cbac.l, A5" the record of the soldier who drops from the window, for start_object_from_record
param window_soldier_drop_jump_out a5 record
# 04CC7E "movea.l ($24,A0), A5" 04CC82 "movea.l (A5)+, A6" the window's next tile block in its list (window_soldier_drop.blocks), stepped as they are drawn
local window_soldier_drop_break_window 04CC7E,04CC82,04CC84,04CC88 a5 blocks window_break_step
# 04CC86 "ext.w D7" the tile block from the window's list, for draw_tile_block
local window_soldier_drop_break_window 04CC86 d7 block_number
# 04CD92 "adda.w D0, A6" the window's entry in object_tile_block_pairs (by the parameter): its trigger y, then its tile blocks
# type: its record of object_tile_block_pairs: 04CD94 "move.w (A6)+, ($20,A0)"
local window_soldier_dive_start 04CD92 a6 pair window_dive
# 04CDB6 "movea.l ($24,A0), A5" the record of the soldier who dives out, for start_object_from_record
param window_soldier_dive_wait a5 record
# 04D260 "lea $4d1a6.l, A5" the record of the object that leaps out, for start_object_from_record
param sewer_ripple_leap_out a5 record
# 04D4D8 "lea $4d466.l, A5" the record of the bomb, for start_shot
param bomber_throw a5 record
# 04D606 "lea $4d558.l, A5" the record of the rocket, for start_shot
param enemy_rocket_soldier_fire a5 record
# 04D64C "lea $4d55e.l, A5" the record of the rocket he drops, for start_shot
param enemy_rocket_soldier_struck a5 record
# 04D708 "lea $4d6b8.l, A5" the record of the door's piece, for start_object_from_record
param double_door_wait a5 record
# 04D790 "lea $4d75c.l, A5" the record of the soldier who comes out, for start_object_from_record
param technodrome_door_wait a5 record
# 04D7F6 "lea $4d75c.l, A5" the record of the soldier who comes out, for start_object_from_record
param technodrome_door_let_out a5 record
# 04DF00 "move.b #$60, D0" 04DF0C "neg.b D0" the direction of the step aside (0x60, turned by the target's side)
local enemy_step_aside_spear_start 04DF00,04DF0C,04DF18 d0 direction
# 04E022 "lea $4dff8.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_circle_knife_start 04E022 a6 animations
# 04E04A "subi.b #$30, D0" the direction to the target, turned 0x50 one way or 0x30 the other, the direction the enemy circles in
param enemy_circle_knife_aim d0 direction
# 04E090 "lea $4dff8.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_circle_knife_step 04E090 a6 animations
# 04E0CE "lea $4dff8.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_keep_distance_knife_start 04E0CE a6 animations
# 04E0F2 "lea $4dff8.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_keep_distance_knife_watch 04E0F2 a6 animations
# 04E120 "addi.b #-$80, D0" 04E144 "move.b ($2b,A0), D0" the direction away from the target, or to it: where the enemy steps
local enemy_keep_distance_knife_watch 04E120,04E144 d0 direction
# 04E1DC "move.b ($2b,A0), D0" 04E1EE "addi.b #-$80, D0" the direction to the target, which the enemy faces, then the one away from it, which it walks in
local enemy_back_off_knife_start 04E1DC,04E1EE d0 direction
# 04E22A "lea $4dff8.l, A6" the enemy's animations by direction, for enemy_face_target_animation
local enemy_back_off_knife_walk 04E22A a6 animations
# 04E388 "lea $4e34e.l, A5" the record of the spear, for start_shot
param enemy_spear_throw_release a5 record
# 04E548 "lea $4e50a.l, A5" the record of the knife, for start_shot
param enemy_throw_knife_release a5 record
# 04E91E "move.b ($2b,A0), D0" 04E930 "addi.b #-$80, D0" the direction to the target, which the enemy faces, then the one away from it, which it walks in
local enemy_back_off_gun_start 04E91E,04E930 d0 direction
# 04EAEE "move.b ($2b,A0), D0" 04EB00 "addi.b #-$80, D0" the direction to the target, which the enemy faces, then the one away from it, which it walks in
local enemy_back_off_axe_start 04EAEE,04EB00 d0 direction
# 04EC32 "lea $4ebee.l, A5" the record of the axe, for start_shot
param enemy_throw_axes_release a5 record
# 04ED32 "lea $4ecee.l, A5" the record of the shot, for start_shot
param enemy_shoot_gun_fire a5 record
# 04EF88 "move.b ($3,A0), D0" 04EF9E "lsl.w #2, D0" the soldier's parameter (his colours in skateboard_soldier_colours), then times 4
local enemy_skateboard_soldier_start 04EF88,04EF9E d0 variant_offset
# 04F0D6 "lea $4f08e.l, A5" the record of the shuriken, for start_shot
param enemy_throw_shuriken_release a5 record
# 04F162 "lea $4f104.l, A5" the record of the boomerang, for start_shot
param enemy_boomerang_throw_release a5 record
# 04F2EC "addi.w #-$10, D1" Rocksteady's screen x less 0x10, where the balloon is shown
local enemy_rocksteady_enter_taunt 04F2EC d1 screen_x
# 04F3A0 "move.w #$43a, D7" the palette request for post_palette_request: Rocksteady's colours
local enemy_rocksteady_enter_walk_in_with_bebop 04F3A0 d7 request
# 04F440 "lsl.w #2, D0" whether Rocksteady holds his gun, times 4: his entry in rocksteady_moves and rocksteady_mode_frames
local enemy_rocksteady_think 04F440 d0 armed_offset
# 04F554 "adda.w D0, A6" Rocksteady's moves and their chances (4 and 4 bytes) after rocksteady_far_attack_waits, by whether he holds his gun
local enemy_rocksteady_think 04F554 a6 move_table move_choice
# 04F522 "lsl.w #1, D0" whether Rocksteady holds his gun, times 2: his entry in the attack moves and their waits
local enemy_rocksteady_pick_attack 04F522 d0 armed_offset
# 04F536 "moveq #$4, D7" 4 for random_below: one of four attacks
local enemy_rocksteady_pick_attack 04F536 d7 range
# 04F538 "jmp $48448.l" the attack random_below picks, handed back
local enemy_rocksteady_pick_attack 04F538 d7 choice
# 04F650 "move.b ($0,A0), D0" 04F658 "lsl.b #1, D0" Rocksteady's flags shifted up: bit 7 his facing, against the hit's side
local enemy_rocksteady_hit 04F650,04F658 d0 facing_bit
# 04F962 "move.w #$20, D1" 04F970 "neg.w D1" the screen x Rocksteady walks to: 0x20 off the turtle on his side, for direction_to
local enemy_rocksteady_close_in_step 04F962,04F970,04F972 d1 target_x
# 04F976 "move.w ($e,A1), D2" the screen y Rocksteady walks to: the turtle's, for direction_to
local enemy_rocksteady_close_in_step 04F976 d2 target_y
# 04FA80 "movea.l ($24,A0), A5" the record of the bullet (enemy_rocksteady_shoot_around.bullet), for start_shot
local enemy_rocksteady_shoot_around_fire 04FA80 a5 record
# 04FE14 "movea.l ($24,A0), A5" the record of the bullet (enemy_rocksteady_shoot.bullet), for start_shot
param enemy_rocksteady_shoot_fire a5 record
# 04FB0C "move.b #$8, D0" 04FB1A "move.b #$10, D0" the contact bit of the wall Rocksteady runs to (8 right, 0x10 left)
local enemy_rocksteady_pincer_charge_run_to_edge 04FB0C,04FB1A d0 wall_mask
# 04FB86 "move.b #$8, D0" 04FB94 "move.b #$10, D0" the contact bit of the wall Rocksteady charges to (8 right, 0x10 left)
local enemy_rocksteady_pincer_charge_run 04FB86,04FB94 d0 wall_mask
# 050008 "lea $54746.l, A6" 05001A "lea $54766.l, A6" Rocksteady's health settings by difficulty, for enemy_refill_health
local enemy_rocksteady_knocked_down_lie 050008,05001A a6 settings health_setting
# 05044E "move.b #$ff, D0" 05045C "clr.b D0" 0 for the balloon: on the left of the speaker
local enemy_bebop_think 05044E,05045C d0 on_right
# 0506B2 "move.w #$4, D7" 4 for random_below: one of four stands
local enemy_bebop_stand_start 0506B2 d7 range
# 0506B6 "jsr $48448.l" 0506BC "andi.w #$3, D7" the stand random_below picks, times 4: its entry in enemy_bebop_stand_animations
local enemy_bebop_stand_start 0506B6,0506BC,0506C0 d7 choice
# 05071A "move.w #$50, D1" 050728 "neg.w D1" the screen x Bebop walks to: 0x50 off the turtle on his side, for direction_to
local enemy_bebop_walk_to_front_step 05071A,050728,05072A d1 target_x
# 05072E "move.w ($e,A1), D2" the screen y Bebop walks to: the turtle's, for direction_to
local enemy_bebop_walk_to_front_step 05072E d2 target_y
# 050864 "move.w #$30, D1" 050872 "neg.w D1" the screen x Bebop walks to: 0x30 off the turtle on his side, for direction_to
local enemy_bebop_close_in_step 050864,050872,050874 d1 target_x
# 050878 "move.w ($e,A1), D2" the screen y Bebop walks to: the turtle's, for direction_to
local enemy_bebop_close_in_step 050878 d2 target_y
# 050958 "move.b #$8, D0" 050966 "move.b #$10, D0" the contact bit of the wall Bebop runs to (8 right, 0x10 left)
local enemy_bebop_pincer_charge_run_to_edge 050958,050966 d0 wall_mask
# 0509D2 "move.b #$8, D0" 0509E0 "move.b #$10, D0" the contact bit of the wall Bebop charges to (8 right, 0x10 left)
local enemy_bebop_pincer_charge_run 0509D2,0509E0 d0 wall_mask
# 050A64 "move.w #$4000, D1" 050A72 "neg.w D1" how far across from Bebop the caught turtle is held (0x4000, fixed point; negated when he faces left)
local enemy_bebop_pincer_charge_run 050A64,050A72 d1 x_offset
# 050B4C "move.w #$80, D0" 050B5A "neg.w D0" how far across Bebop steps back after the punch (fixed point; negated when he faces left)
local enemy_bebop_punch_end 050B4C,050B5A d0 x_step
# 050CC0 "lea $50c7c.l, A5" the record of Bebop's shot, for start_shot
param enemy_bebop_shoot_fire a5 record
# 050E3A "lea $54756.l, A6" 050E4C "lea $54776.l, A6" Bebop's health settings by difficulty, for enemy_refill_health
local enemy_bebop_knocked_down_lie 050E3A,050E4C a6 settings health_setting
# 051082 "lsl.w #2, D0" the Mouser's parameter times 4, its entry in mouser_enter_y_speeds and mouser_enter_height_speeds
local enemy_mouser_enter_hop 051082 d0 hop_offset
# 05124E "movea.l (A1), A6" the turtle of the Mouser's target slot: is it down (routine 4 and a reaction that knocks it down)
local enemy_mouser_think 05124E a6 turtle object.turtle
# 0510FE "movea.l D0, A1" the Mouser's target slot, handed back
param enemy_mouser_think a1 slot
# 0512F4 "move.b #$7f, D0" 051302 "move.b #$b7, D0" the mask that clears the Mouser's side in the slot's mouser_sides
local enemy_mouser_give_side_back 0512F4,051302 d0 side_mask
# 05131E "movea.l D0, A1" the Mouser's target slot, whose turtle it bites
local enemy_mouser_bite 05131E a1 slot player_slot
# 05149C "movea.l D0, A1" the Mouser's target slot
local enemy_mouser_step_over_edge 05149C a1 slot player_slot
# 051794 "lea $5176c.l, A5" the Mouser's animations by direction, for enemy_face_direction
param enemy_mouser_chase_start a5 animations
# 0517F6 "jsr $47ccc.l" the Mouser's animations by direction, for enemy_turn_to_direction
local enemy_mouser_chase_run 0517F6 a5 animations
# 0517E0 "jsr $47d90.l" the direction to the target that direction_to_object gives, which the Mouser turns and runs to
local enemy_mouser_chase_run 0517E0 d0 direction
# 051850 "lea $5176c.l, A5" the Mouser's animations by direction, for enemy_face_direction
param enemy_mouser_creep_to_side_start a5 animations
# 051894 "jsr $47ccc.l" the Mouser's animations by direction, for enemy_turn_to_direction
local enemy_mouser_creep_to_side_step 051894 a5 animations
# 051866 "move.w #$20, D1" 051874 "neg.w D1" the screen x the Mouser creeps to: 0x20 off the turtle on its side, for direction_to
local enemy_mouser_creep_to_side_step 051866,051874,051876 d1 target_x
# 05187A "move.w ($e,A6), D2" the screen y the Mouser creeps to: the turtle's, for direction_to
local enemy_mouser_creep_to_side_step 05187A d2 target_y
# 051902 "lea $5176c.l, A5" the Mouser's animations by direction, for enemy_face_direction
param enemy_mouser_back_off_start a5 animations
# 0518E6 "jsr $47d90.l" 0518EC "addi.b #-$80, D0" the direction to the target, then the one away from it, which the Mouser runs in
local enemy_mouser_back_off_start 0518E6,0518EC d0 direction
# 05191A "lea $5176c.l, A5" the Mouser's animations by direction, for enemy_turn_to_direction
param enemy_mouser_back_off_run a5 animations
# 051930 "move.w #$2, D7" 2 for random_below: one of two sitting animations
local enemy_mouser_sit 051930 d7 range
# 051934 "jsr $48448.l" 05193A "lsl.w #2, D7" the sitting animation random_below picks, times 4: its entry in enemy_mouser_sit_animations
local enemy_mouser_sit 051934,05193A d7 choice
# 051BFC "movea.l ($24,A0), A5" the record of the Mouser the hole lets out (mouser_hole.hole), for start_object_from_record
param mouser_hole_let_out a5 record
# 051EBE "movea.l (A1), A6" the turtle of Rodney's target slot: is it down (routine 4 and a reaction that knocks it down)
local enemy_rodney_think 051EBE a6 turtle object.turtle
# 051D8A "movea.l D0, A1" Rodney's target slot, handed back
param enemy_rodney_think a1 slot
# 051FD6 "move.b #$7f, D0" 051FE4 "move.b #$b7, D0" the mask that clears Rodney's side in the slot's rodney_sides
local enemy_rodney_give_side_back 051FD6,051FE4 d0 side_mask
# 052052 "move.w #$300, D1" Rodney's speed for speeds_from_direction (0x300)
local enemy_rodney_rush_start 052052 d1 speed
# 052034 "move.w #$20, D2" 052040 "neg.w D2" the screen y Rodney rushes to: 0x20 off the turtle's, for direction_to
local enemy_rodney_rush_start 052034,052040,052048 d2 target_y
# 0522A4 "move.w ($c,A0), D1" Rodney's screen x, where the balloon is shown
local enemy_rodney_slide_to_stop 0522A4 d1 screen_x
# 0523D4 "lea $5232a.l, A5" the record of the laser bolt, for start_shot
param enemy_rodney_shoot_fire a5 record
# 0524EA "lea $5244a.l, A5" the record of the whip's arm, for start_shot
param enemy_rodney_whip_throw_arm a5 record
# 052510 "move.w #$200, D1" 052526 "neg.w D1" how far up or down Rodney moves to the turtle's row each frame (fixed point; negated going up)
local enemy_rodney_follow_row 052510,052526 d1 y_step
# 052550 "sub.w ($c,A0), D0" 052558 "neg.w D0" how far across from Rodney the arm's catch is, made positive
local enemy_rodney_whip_reach 052550,052558 d0 x_distance
# 052546 "move.w ($4e,A2), D7" the object the whip's arm holds (its +4E), whose screen x is compared with Rodney's, handed back
local enemy_rodney_whip_reach 052546 d7 caught object
# 0525D6 "move.w ($4e,A0), D7" the object the whip struck (Rodney's hit object), handed back
local enemy_rodney_whip_lash 0525D6 d7 struck
# 0527BC "andi.w #$7, D0" the difficulty (0-7), Shredder's entry in shredder_guard_waits and shredder_attack_waits
local enemy_shredder_start 0527BC d0 difficulty_level
# 0529D2 "movea.l (A1), A6" the turtle of Shredder's target slot: is it down (routine 4 and a reaction that knocks it down)
local enemy_shredder_think 0529D2 a6 turtle object.turtle
# 05284A "movea.l D0, A1" Shredder's target slot, handed back
param enemy_shredder_think a1 slot
# 052B9C "movea.l D0, A1" Shredder's target slot, handed back
param enemy_shredder_attack a1 slot
# 052C72 "movea.l D0, A1" Shredder's target slot, for the reactions
param enemy_shredder_react a1 slot
# 052D96 "lea $52d5a.l, A5" the record of Shredder's clone, for start_object_from_record
param enemy_shredder_split_start a5 record
# 053044 "jsr $47ccc.l" Shredder's walking animations (hurt when weak), for enemy_turn_to_object
local enemy_shredder_walk_to_target_step 053044 a5 animations
# 053020 "jsr $47d90.l" the direction to the target that direction_to_object gives, which Shredder turns and walks to
local enemy_shredder_walk_to_target_step 053020 d0 direction
# 053110 "move.b ($2b,A0), D0" 053130 "addi.b #-$80, D0" the direction to the target, which Shredder faces, then the one away from it, which he walks in
local enemy_shredder_back_off_start 053110,053130 d0 direction
# 05321E "lea $531c2.l, A5" the record of the piece Shredder loses, for start_shot
param enemy_shredder_lose_bar_end a5 record
# 05367E "move.b #$8, D0" 053692 "move.b #$10, D0" the contact bit of the wall in Shredder's way (8 right, 0x10 left)
local enemy_shredder_ray_line_up 05367E,053692 d0 wall_mask
# 053708 "lea $53622.l, A5" the record of the ray, for start_shot
param enemy_shredder_ray_fire a5 record
# 04F694 "movea.l D0, A1" the object that hit the boss (its attacker field), for the reactions
param enemy_boss_react_move a1 attacker
# 04EB20 "lea $4ea1a.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_axe_walk a5 animations
# 04E950 "lea $4e7c2.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_gun_walk a5 animations
# 04E20E "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_knife_walk a5 animations
# 04DEA6 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_spear_start a5 animations
# 04DEB8 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_spear_walk a5 animations
# 04AF7C "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_sword_walk a5 animations
# 0498F2 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_back_off_walk a5 animations
# 049886 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_keep_distance_close_in a5 animations
# 04E1A4 "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_keep_distance_knife_close_in a5 animations
# 04EBC2 "lea $4ea1a.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_run_away_axe_step a5 animations
# 04E9F2 "lea $4e7c2.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_run_away_gun_step a5 animations
# 049990 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_run_away_step a5 animations
# 05314C "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_back_off_walk a5 animations
# 05364A "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_ray_line_up a5 animations
# 053638 "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_ray_start a5 animations
# 052F86 "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_walk_to_side_hold a5 animations
# 052E94 "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_walk_to_side_start a5 animations
# 052EB4 "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_walk_to_side_step a5 animations
# 052F64 "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_walk_to_side_turn a5 animations
# 052FFC "lea $52e74.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_shredder_walk_to_target_start a5 animations
# 04B16C "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_stalk_hammer_approach a5 animations
# 04B15A "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_stalk_hammer_start a5 animations
# 04B1FC "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_stalk_hammer_step a5 animations
# 04E28C "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_step_aside_knife_start a5 animations
# 04E2B0 "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_step_aside_knife_step a5 animations
# 04DF34 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_step_aside_spear_start a5 animations
# 04DF52 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_step_aside_spear_step a5 animations
# 0499DC "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_across_start a5 animations
# 0499F2 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_across_step a5 animations
# 04B276 "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_away_hammer_start a5 animations
# 04B288 "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_away_hammer_walk a5 animations
# 04DDEC "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_off_line_spear_start a5 animations
# 04DE00 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_off_line_spear_step a5 animations
# 04AEB0 "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_past_sword_start a5 animations
# 04AEC4 "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_past_sword_step a5 animations
# 04AFDE "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_line_sword_start a5 animations
# 04B010 "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_line_sword_step a5 animations
# 04EAB6 "lea $4ea1a.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_range_axe_start a5 animations
# 04E85E "lea $4e7c2.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_range_gun_start a5 animations
# 04E8EC "movea.l ($46,A0), A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_range_hold a5 animations
# 04E878 "movea.l ($46,A0), A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_range_step a5 animations animation_entry
# 04EA78 "lea $4ea1a.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_axe_start a5 animations
# 04B0BA "movea.l ($46,A0), A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_far_step a5 animations
# 04E820 "lea $4e7c2.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_gun_start a5 animations
# 04B0A0 "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_hammer_start a5 animations
# 049746 "movea.l ($46,A0), A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_hold a5 animations
# 04DFD2 "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_knife_start a5 animations
# 04DDA2 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_spear_start a5 animations
# 049682 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_start a5 animations
# 04969C "movea.l ($46,A0), A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_step a5 animations
# 04AE22 "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_sword_start a5 animations
# 04AE68 "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_sword_turn a5 animations
# 04972E "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_side_turn a5 animations
# 04EA3C "lea $4ea1a.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_axe_start a5 animations
# 04E7E4 "lea $4e7c2.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_gun_start a5 animations
# 04B064 "lea $4b046.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_hammer_start a5 animations
# 04DF96 "lea $4df78.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_knife_start a5 animations
# 04DD66 "lea $4dd48.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_spear_start a5 animations
# 0495F4 "lea $49258.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_start a5 animations
# 04ADDE "lea $4adc0.l, A5" the enemy's walking animations by direction, for enemy_face_object and enemy_turn_to_object
param enemy_walk_to_target_sword_start a5 animations
# ---- the last ones of the turtles and the enemies ----
# ---- objects/states.c and objects/turtles.c, the last ones ----
# 04880E "moveq #$1, D0" the floor map's cell right of the enemy (enemy_floor_edges reads 0633D5), 1 when it is off the map
param enemy_floor_contacts d0 floor_right
# 048810 "moveq #$1, D1" the floor map's cell left of the enemy (enemy_floor_edges reads 0633D6), 1 when it is off the map
param enemy_floor_contacts d1 floor_left
# 048812 "moveq #$1, D2" the floor map's cell above the enemy (enemy_floor_edges reads 0633D4), 1 when it is off the map
param enemy_floor_contacts d2 floor_up
# 048814 "moveq #$1, D3" the floor map's cell below the enemy (enemy_floor_edges reads 061118), 1 when it is off the map
param enemy_floor_contacts d3 floor_down
# 04879A "move.b $633d5.l, D0" the floor map's cell right of the enemy, as enemy_floor_contacts hands it back (0xFA, 0xFB: an edge)
param enemy_check_floor_edge d0 floor_right
# 0487B0 "move.b $633d6.l, D1" the floor map's cell left of the enemy, as enemy_floor_contacts hands it back
param enemy_check_floor_edge d1 floor_left
# 0487C8 "move.b $633d4.l, D2" the floor map's cell above the enemy, as enemy_floor_contacts hands it back (0xFC: an edge)
param enemy_check_floor_edge d2 floor_up
# 0487E0 "move.b $61118.l, D3" the floor map's cell below the enemy, as enemy_floor_contacts hands it back
param enemy_check_floor_edge d3 floor_down
# 048448 "move.w D7, D6" the range, kept while the seed is worked out, to scale the random number with
local random_below 048448 d6 range_copy
# 0486A6 "move.w D0, D1" the x speed before the arc's step, to see whether the step turned it round
local enemy_arc_step 0486A6 d1 old_x_speed
# 0528DC "move.b $61207.l, D0" the turtles in play, which picks the most clones Shredder may make
local enemy_shredder_think 0528DC d0 turtles
# 019ECA "movea.l A1, A6" the player's marker object, cleared a long at a time
local turtle_start_marker 019ECA a6 marker
# 019ECC "clr.l D1" the zeros the marker's longs are cleared with
local turtle_start_marker 019ECC d1 zero_long
# 019F12 "movea.l A1, A0" the marker object, given to set_animation as the object it animates
local turtle_start_marker 019F12 a0 marker_object
# 01A404 "moveq #$0, D0" 0, for the working layer's directions and speeds: no scroll this frame until a turtle pushes it
local turtle_run_all 01A404 d0 no_scroll
# 01A538 "subq.b #2, D0" the turtle's routine less 2: the routines (2-4) whose turtles push the scroll
local turtle_run_all 01A538 d0 routine_past_walk
# 01A6AE "move.b $60121.l, D0" the stage, whose scroll segments the scroll goes on by
local turtle_run_all 01A6AE d0 scroll_stage
# 01A6D8 "move.b ($1,A0), D1" the scroll segment's end axis (its +1), whose low bits say along which axis the segment ends
local turtle_run_all 01A6D8 d1 segment_end_axis
# 01B038 "sub.l D2, D0" 01B03C "swap D0" how far the working layer's x moved, its halves swapped for the layer's direction and column phase
local turtle_move 01B038,01B03C,01B21C,01B220 d0 scroll_x_moved
# 01AF62 "move.l $63300.l, D0" 01AF6A "subi.l #$1800, D0" the working layer's x less 0x1800: where the new column of tiles comes in, handed back
param turtle_push_scroll_left d0 new_column_x
# 01B56E "move.l $63304.l, D0" the working layer's y less 0xF800: where the new row of tiles comes in, handed back
param turtle_push_scroll_down d0 new_row_y
# 01B58A "move.b D0, D1" the stick's bits again, for its up and down
local turtle_walk_speed 01B58A d1 direction_copy
# 01B14C "move.l $63300.l, D0" 01B152 "addi.l #$15800, D0" the working layer's x plus 0x15800: where the new column of tiles comes in, handed back
param turtle_push_scroll_right d0 new_column_x
# 01B158 "move.l $6331c.l, D2" the working layer's right limit, handed back
param turtle_push_scroll_right d2 x_max
# 01B35A "move.l $63304.l, D0" the working layer's y after the push, handed back
param turtle_push_scroll_up d0 scroll_y
# a step of a window soldier's broken window: the tile block drawn, its place, the frames to the next (04CC82
# "movea.l (A5)+, A6", 04CC84 "move.b (A5)+, D7", 04CC88 "move.b (A5)+, ($46,A0)"), 0 frames on the last
struct window_break_step 06 rom
field window_break_step 00 block u32 tile_block_byte
field window_break_step 04 place u8
field window_break_step 05 time u8
# the window a diving soldier breaks: its two places and their tile blocks (04CDBA "move.b (A5), D7", 04CDBE "movea.l
# ($2,A5), A6", 04CDC8 "move.b ($1,A5), D7", 04CDCE "movea.l ($6,A5), A6")
struct dive_window 0A rom
field dive_window 00 place u8
field dive_window 01 other_place u8
field dive_window 02 block u32 tile_block_byte
field dive_window 06 other_block u32 tile_block_byte
# the spawn scroll's two speeds, across and up or down (047A3E "move.w (A5), D0", 047A52 "move.w ($2,A5), D1")
struct spawn_speed 04 rom
field spawn_speed 00 x u16
field spawn_speed 02 y u16
# the two bytes whose bit 7 turns the spawn scroll's speeds round, up or down and across (047A56 "tst.b (A6)", 047A40
# "tst.b ($1,A6)")
struct spawn_direction 02 rom
field spawn_direction 00 y u8
field spawn_direction 01 x u8
# a fire spot's record: where in the tile RAM it is drawn (01FEC4 "movea.l (A0)+, A2"), then for each of the fire's
# frames the list of its blocks (01FEC0 "movea.l (A0,D0.w), A0" by the spot, 01FECE "movea.l (A0,D0.w), A0" by the frame)
elements fire_spot_long u32
# the offsets into fire_blocks of a fire frame's blocks, a word for each row's (01FF40 "move.w ($0,A0), D0", 01FFE8
# "move.w (A0,D6.w), D0", 0200EA "addq.l #2, A0")
elements fire_block_offset u16
# a demo's recorded inputs: the inputs, then the frames they are held (004742 "move.b (A5)+, D0", 004744 "move.b (A5)+,
# ($0,A4)"), from the record a channel's pointer is at (004736 "movea.l ($0,A1), A5")
elements demo_input u8
# a turtle's walking speed, a word of turtle_walk_speeds (01B59E "lea $1b5b2.l, A6"; 01AF3E "move.w (A6,D0.w), $6330c.l"
# in turtle_push_scroll_left)
elements walk_speed u16
# the diving soldier's window, from its record (04CDB6 "movea.l ($24,A0), A5")
local window_soldier_dive_wait 04CDB6 a5 blocks dive_window
# a list of jobs for the main loop's queue, a word each up to FFFF (004184 "move.w (A5)+, D7", 004186 "cmpi.w #-$1, D7")
elements job_word u16
# a palette bank's list of palettes, by the bank (00942A "movea.l (A6,D6.w), A6" in palette_request_set_next_bank, then
# 009434 "movea.l (A5,D6.w), A5"): a palette list's entry
elements palette_list_pointer u32 palette_pointer
# Krang's speeds across and up or down for a direction, a word each (00E726 "move.w (A6,D0.w), D7", 00E72A "move.w D7,
# ($1a,A0)")
elements krang_speed u16
# Rocksteady's aims, a byte at a time, from where his record keeps them (04FA28 "movea.l ($1a,A0), A4", 04FA2E "move.b (A4)+, D7")
local enemy_rocksteady_shoot_around_fire 04FA28 a4 aims aim
# the attacks' routines by the enemy's move (048DAA "lea $53d2a.l, A6", 048DB0 "move.w ($28,A0), D6", 048DB4 "movea.l
# (A6,D6.w), A6", 048DB8 "jmp (A6)")
053D2A  table  enemy_attacks  u32
# Rocksteady's next move by whether he holds his gun (+2A), 8 bytes each: four moves, then their chances out of 100
# (04F546 "lea $4f5d4.l, A6", 04F552 "lsl.w #3, D0", 04F560 "sub.b ($4,A6,D6.w), D7", 04F56E "move.b (A6,D6.w), D6")
elements move_choice u8
04F5D4  table  rocksteady_move_choices  u8
# the staff roll's names, 16 characters each, typed on by the credit's number (0074A0 "lea $76f2.l, A5", 0074AE "lsl.w
# #4, D6", 0074B2 "move.l A5, ($4,A4)")
0076F2  data  staff_roll_names

# ---- batch 8a: what the 68000's routines leave in registers for the next, by what it holds ----
# the zeroes a movem clears 32 bytes of work RAM with (00454A "moveq #$0, D1", 00454C "move.l D1, D2", 004556 "move.l
# D1, D7", 004558 "movea.l D1, A1"); zero_ram_below and clear_objects store them (zero_fill_registers)
param zero_fill_registers d1 fill
param zero_fill_registers d2 fill_2
param zero_fill_registers d3 fill_3
param zero_fill_registers d4 fill_4
param zero_fill_registers d5 fill_5
param zero_fill_registers d6 fill_6
param zero_fill_registers d7 fill_7
param zero_fill_registers a1 fill_8
# the same for the boot (00114C "moveq #$0, D1", 001156 "move.l D1, D6", 00115A "movea.l D1, A2", 0011BE "movem.l
# D1-D6/A1-A2, -(A0)")
param zero_boot_fill_registers d1 fill
param zero_boot_fill_registers d2 fill_2
param zero_boot_fill_registers d3 fill_3
param zero_boot_fill_registers d4 fill_4
param zero_boot_fill_registers d5 fill_5
param zero_boot_fill_registers d6 fill_6
param zero_boot_fill_registers a1 fill_7
param zero_boot_fill_registers a2 fill_8
# ---- batch 8a: the parameters and locals of the 68000's C still named after a register that hold one thing in the game (proposals) ----
# ---- objects/states.c ----
# 0484B2 "bsr $48516" 0484DC "move.b D7, ($30,A0)" the facing enemy_facing_bits works out toward the object (bit 7 lower on the screen: the table's second animation; bit 6 the flip), set with its animation by enemy_set_facing_animation
local enemy_face_object 0484B2 d7 facing
# 0484E2 "bsr $48516" 048510 "move.b D7, ($30,A0)" the facing enemy_facing_bits works out toward the object, for enemy_turn_animation
local enemy_turn_to_object 0484E2 d7 facing
# 04853E "bsr $4854c" 0484DC "move.b D7, ($30,A0)" the facing direction_facing_bits works out for the direction (bit 7 down the screen, bit 6 the flip), set with its animation by enemy_set_facing_animation
local enemy_face_direction 04853E d7 facing
# 048546 "bsr $4854c" 048510 "move.b D7, ($30,A0)" the facing direction_facing_bits works out for the direction, for enemy_turn_animation
local enemy_turn_to_direction 048546 d7 facing
# 0493BA "jsr $47ccc.l" 0493C4 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running round the turtle, stored in its y_speed and handed back
param enemy_circle_aim d7 y_speed
# 0494AC "move.w #$80, D7" 0494BA "neg.w D7" 0494BC "add.w D7, ($1a,A0)" what the last frames of the charge take off its speed across each frame (0x80, against the way it faces)
local enemy_charge_brake 0494AC,0494BA d7 brake_step
# 04969C "movea.l ($46,A0), A5" 0496A2 "jsr $484e2.l" the walk's animations (+46), turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_to_side_step 04969C,0496A2 a5 animations
# 049746 "movea.l ($46,A0), A5" 04974C "jsr $484e2.l" the walk's animations (+46), turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_to_side_hold 049746,04974C a5 animations
# 049886 "lea $49258.l, A5" 04988E "jsr $484e2.l" the walking animations, turned to the turtle by enemy_turn_to_object and handed back (code shared with enemy_keep_distance_close_in)
local enemy_keep_distance_back_off 049886,04988E a5 animations
# 049886 "lea $49258.l, A5" 04988E "jsr $484e2.l" the walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_keep_distance_close_in 049886,04988E a5 animations
# 0498E4 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_back_off_start d7 y_speed
# 0498F2 "lea $49258.l, A5" 0498FA "jsr $484e2.l" the walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_back_off_walk 0498F2,0498FA a5 animations
# 049966 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running away, stored in its y_speed and handed back
param enemy_run_away_start d7 y_speed
# 049990 "lea $49258.l, A5" 049998 "jsr $484e2.l" the walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_run_away_step 049990,049998 a5 animations
# 0499F2 "lea $49258.l, A5" 0499FA "jsr $484e2.l" the walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_across_step 0499F2,0499FA a5 animations
# 049EE8 "move.b #$89, D7" 049EEC "jsr $91a4.l" the sound of the splat against a wall, for queue_sound
local enemy_killed_back_fly 049EE8 d7 sound
# 04A024 "move.b #$89, D7" the sound of the splat against a wall, for queue_sound
local enemy_killed_forward_fly 04A024 d7 sound
# 04A246 "move.w #$306, D7" 04A24A "bsr $4a2ca" the damage of the throw (3 bars and 6 health), for enemy_take_damage
local enemy_thrown_by_donatello_swing 04A246 d7 damage
# 04A27A "move.b #$89, D7" the sound of the splat against a wall, for queue_sound
local enemy_thrown_fly 04A27A d7 sound
# 04A2CE "sub.b D7, D2" 04A2D6 "sub.w D7, D2" the damage, its low byte off the health and the whole word off bars and health when the health runs out (callers: 0x306 from the throws)
param enemy_take_damage d7 damage
# 04A3DA "move.w #$306, D7" the damage of the throw (3 bars and 6 health), for enemy_take_damage
local enemy_thrown_by_michelangelo_swing 04A3DA d7 damage
# 04A498 "move.w #$306, D7" the damage of the throw (3 bars and 6 health), for enemy_take_damage
local enemy_thrown_by_raphael_swing 04A498 d7 damage
# 04A556 "move.w #$306, D7" the damage of the throw (3 bars and 6 health), for enemy_take_damage
local enemy_thrown_by_leonardo_swing 04A556 d7 damage
# 04AEC4 "lea $4adc0.l, A5" 04AECC "jsr $484e2.l" the sword soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_past_sword_step 04AEC4,04AECC a5 animations
# 04AF6E "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_back_off_sword_start d7 y_speed
# 04AF7C "lea $4adc0.l, A5" 04AF84 "jsr $484e2.l" the sword soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_back_off_sword_walk 04AF7C,04AF84 a5 animations
# 04AFDE "lea $4adc0.l, A5" 04AFE6 "jsr $484b2.l" the sword soldier's walking animations, faced to the turtle by enemy_face_object and handed back
local enemy_walk_to_line_sword_start 04AFDE,04AFE6 a5 animations
# 04B0BA "movea.l ($46,A0), A5" 04B0C0 "jsr $484e2.l" the walk's animations (+46), turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_to_side_far_step 04B0BA,04B0C0 a5 animations
# 04B16C "lea $4b046.l, A5" 04B174 "jsr $484e2.l" the hammer soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_stalk_hammer_approach 04B16C,04B174 a5 animations
# 04B288 "lea $4b046.l, A5" 04B290 "jsr $484e2.l" the hammer soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_away_hammer_walk 04B288,04B290 a5 animations
# 04B71E "addq.b #1, ($5,A0)" the hammer soldier's object (its state, +5, moved on), as in the other handlers (OBJECT_REGISTER)
param enemy_flinch_hunched_hammer_start a0 object object
# 04BF5A "andi.b #$f1, ($0,A0)" 04BF60 "addq.b #1, ($4,A0)" the shuriken's object (its flags, +0, and routine, +4), as in the other handlers (OBJECT_REGISTER)
param shuriken_struck_without_sound a0 object object
# 04C034 "move.w D7, ($1e,A0)" the speed up or down that speeds_from_direction gives for the bullet's aim, stored in its height_speed (+1E) and handed back
param rocksteady_bullet_start d7 height_speed
# 04C090 "andi.b #$f1, ($0,A0)" 04C096 "move.b #$2, ($4,A0)" 04C09C "movea.l ($24,A0), A6" the bullet's object (its flags, routine and animations), as in the other handlers (OBJECT_REGISTER)
param rocksteady_bullet_burst a0 object object.rocksteady_bullet
# 04C630 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for the flying piece, stored in its y_speed and handed back
param door_piece_start d7 y_speed
# 04C976 "lea $4c894.l, A5" 04C97C "jsr $47c30.l" the record of the tire the soldier throws (thrown_tire_record), for start_object_from_record, handed back
local tire_soldier_throw 04C976 a5 tire_record object_record
# 04CAAA "lea $4c9b6.l, A5" 04CAB0 "jsr $47c30.l" the record of the manhole cover the soldier throws (thrown_manhole_cover_record), for start_object_from_record, handed back
local manhole_soldier_throw 04CAAA a5 cover_record object_record
# 04CC58 "lea $4cbac.l, A5" 04CC5E "jsr $47c30.l" the record of the window's glass shards (kind 1F), for start_object_from_record, handed back
local window_soldier_drop_jump_out 04CC58 a5 shards_record object_record
# 04CDEC "lea $4cd3c.l, A5" 04CDF2 "jsr $47c30.l" the record of the window's glass shards (kind 1F), for start_object_from_record, handed back
local window_soldier_dive_wait 04CDEC a5 shards_record object_record
# 04D47E "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for leaning out of cover, stored in its y_speed and handed back
param bomber_start d7 y_speed
# 04D606 "lea $4d558.l, A5" 04D60C "jsr $47c5a.l" the record of the rocket (rocket_shot_record), for start_shot, handed back
local enemy_rocket_soldier_fire 04D606 a5 rocket_record shot_record
# 04D790 "lea $4d75c.l, A5" 04D796 "jsr $47c30.l" the record of the Foot soldier the door lets out (technodrome_door_soldier_record), for start_object_from_record, handed back
local technodrome_door_wait 04D790 a5 soldier_record object_record
# 04DE00 "lea $4dd48.l, A5" 04DE08 "jsr $484e2.l" the spear soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_off_line_spear_step 04DE00,04DE08 a5 animations
# 04DEB8 "lea $4dd48.l, A5" 04DEBE "jsr $484e2.l" the spear soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_back_off_spear_walk 04DEB8,04DEBE a5 animations
# 04DF2A "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for the step aside, stored in its y_speed and handed back
param enemy_step_aside_spear_start d7 y_speed
# 04DF52 "lea $4dd48.l, A5" 04DF58 "jsr $484e2.l" the spear soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_step_aside_spear_step 04DF52,04DF58 a5 animations
# 04E064 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running round the turtle, stored in its y_speed and handed back
param enemy_circle_knife_aim d7 y_speed
# 04E1A4 "lea $4df78.l, A5" 04E1AC "jsr $484e2.l" the knife soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back (code shared with enemy_keep_distance_knife_close_in)
local enemy_keep_distance_knife_back_off 04E1A4,04E1AC a5 animations
# 04E1A4 "lea $4df78.l, A5" 04E1AC "jsr $484e2.l" the knife soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_keep_distance_knife_close_in 04E1A4,04E1AC a5 animations
# 04E200 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_back_off_knife_start d7 y_speed
# 04E20E "lea $4df78.l, A5" 04E216 "jsr $484e2.l" the knife soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back (its other animations, the facing ones of 04DFF8, are animations)
local enemy_back_off_knife_walk 04E20E,04E216 a5 walk_animations
# 04E28C "lea $4df78.l, A5" 04E294 "jsr $484b2.l" the knife soldier's walking animations, faced to the turtle by enemy_face_object and handed back
local enemy_step_aside_knife_start 04E28C,04E294 a5 animations
# 04E2B0 "lea $4df78.l, A5" 04E2B8 "jsr $484e2.l" the knife soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_step_aside_knife_step 04E2B0,04E2B8 a5 animations
# 04E878 "movea.l ($46,A0), A5" 04E87E "jsr $484e2.l" the walk's animations (+46), turned to the turtle by enemy_turn_to_object and handed back
local enemy_walk_to_range_step 04E878,04E87E a5 animations
# 04E942 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_back_off_gun_start d7 y_speed
# 04E950 "lea $4e7c2.l, A5" 04E958 "jsr $484e2.l" the gun soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_back_off_gun_walk 04E950,04E958 a5 animations
# 04E9C4 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running away, stored in its y_speed and handed back
param enemy_run_away_gun_start d7 y_speed
# 04E9F2 "lea $4e7c2.l, A5" 04E9FA "jsr $484e2.l" the gun soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_run_away_gun_step 04E9F2,04E9FA a5 animations
# 04EB12 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_back_off_axe_start d7 y_speed
# 04EB20 "lea $4ea1a.l, A5" 04EB28 "jsr $484e2.l" the axe soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_back_off_axe_walk 04EB20,04EB28 a5 animations
# 04EB94 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running away, stored in its y_speed and handed back
param enemy_run_away_axe_start d7 y_speed
# 04EBC2 "lea $4ea1a.l, A5" 04EBCA "jsr $484e2.l" the axe soldier's walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_run_away_axe_step 04EBC2,04EBCA a5 animations
# 04F2D4 "move.w #$64, D7" 04F2D8 "move.b D7, $60080.l" the boss music, kept in music and queued with queue_sound
local enemy_rocksteady_enter_taunt 04F2D4 d7 sound
# 04F4C8 "lea $4f5c4.l, A5" (enemy_rocksteady_think) 04F534 "adda.w D0, A5" 04F4D2 "move.b (A5,D7.w), ($48,A0)" the table of waits before his next close or far attack the caller loads, moved to the half for the gun out or not; the caller reads the wait by the random number handed back
param enemy_rocksteady_pick_attack a5 attack_waits
# 04F5E4 "move.b ($3,A0), D7" 04F5E8 "jsr $48724.l" his colour (+3) for enemy_flash_when_weak, handed back
local enemy_rocksteady_attack 04F5E4 d7 colour
# 04F628 "move.b #$82, D7" 04F62C "jsr $91a4.l" the sound of the hit, for queue_sound
local enemy_rocksteady_hit 04F628 d7 sound
# 04F680 "move.b ($3,A0), D7" 04F684 "jsr $48724.l" his colour (+3) for enemy_flash_when_weak, handed back
local enemy_rocksteady_react 04F680 d7 colour
# 04F9A0 "movea.l A1, A6" the boss's turtle, the one the boss states keep in A1 (0x60000 + its target), looked at with enemy_look_at_target
param enemy_boss_face_target a1 target
# 04FA2E "move.b (A4)+, D7" 04FA3A "bclr #$7, D7" the next aim of the round of shots without its facing bit: 0 level, else up, kept as the aim (+48)
local enemy_rocksteady_shoot_around_fire 04FA3A d7 aim_number
# 04FA58 "lsl.w #3, D7" 04FA60 "move.l ($4,A6,D7.w), ($24,A0)" the aim times 8, its entry in rocksteady_bursts and in his shooting animations
local enemy_rocksteady_shoot_around_fire 04FA58 d7 aim_offset
# 05012E "move.b #$8b, D7" 050132 "jsr $91a4.l" the sound of his landing, for queue_sound
local enemy_rocksteady_defeated_fall 05012E d7 sound
# 050306 "move.b #$3e, D7" 05030A "jsr $91a4.l" the sound of his landing, for queue_sound
local enemy_bebop_enter_drop 050306 d7 sound
# 050354 "move.b #$3f, D7" 050358 "jsr $91a4.l" the sound of his landing, for queue_sound
local enemy_bebop_enter_in_air 050354 d7 sound
# 050612 "move.b ($3,A0), D7" 050616 "jsr $48724.l" his colour (+3) for enemy_flash_when_weak, handed back
local enemy_bebop_attack 050612 d7 colour
# 050622 "move.b #$82, D7" 050626 "jsr $91a4.l" the sound of the hit, for queue_sound
local enemy_bebop_hit 050622 d7 sound
# 05066E "move.b ($3,A0), D7" his colour (+3) for enemy_flash_when_weak, handed back
local enemy_bebop_react 05066E d7 colour
# 050EFE "move.b #$8b, D7" 050F02 "jsr $91a4.l" the sound of his landing, for queue_sound
local enemy_bebop_defeated_fall 050EFE d7 sound
# 0510CC "move.b #$39, D7" 0510D0 "jsr $91a4.l" the sound of its landing, for queue_sound
local enemy_mouser_enter_fall 0510CC d7 sound
# 05136E "move.b #$10, D7" 051372 "jsr $485d6.l" the attack (0x10, the bite) enemy_face_target turns it with
local enemy_mouser_bite_start 05136E d7 attack
# 051780 "move.w #$f0, D7" 05178A "move.b D7, ($47,A0)" the random time of the chase (under 240 frames), kept in chase_time (+47) and handed back
param enemy_mouser_chase_start d7 chase_time
# 0518FE "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for running away, stored in its y_speed and handed back
param enemy_mouser_back_off_start d7 y_speed
# 05191A "lea $5176c.l, A5" 051920 "jsr $48546.l" the Mouser's running animations, turned to the direction by enemy_turn_to_direction and handed back
local enemy_mouser_back_off_run 05191A,051920 a5 animations
# 051A94 "move.b #$f, D7" 051A98 "jsr $91a4.l" the sound of the crash, for queue_sound
local enemy_mouser_fly_and_crash 051A94 d7 sound
# 052060 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for the rush, stored in its y_speed and handed back
param enemy_rodney_rush_start d7 y_speed
# 05207E "moveq #-$1, D7" 0520AA "clr.b D7" 0520C0 "tst.b D7" 0xFF while nothing is in its way, 0 when it slides along a wall ahead (and then the rush stops), handed back
local enemy_rodney_rush_run 05207E,0520AA d7 clear_ahead
# 05218C "moveq #-$1, D7" 0521B8 "clr.b D7" 0521CE "tst.b D7" 0xFF while nothing is in its way, 0 when it slides along a wall ahead (and then the rush stops), handed back
local enemy_rodney_rush_across_run 05218C,0521B8 d7 clear_ahead
# 0524EA "lea $5244a.l, A5" 0524F0 "jsr $47c5a.l" the record of the whip's arm (whip_arm_shot_record), for start_shot, handed back
local enemy_rodney_whip_throw_arm 0524EA a5 arm_record shot_record
# 052720 "move.b #$f, D7" 052724 "jsr $91a4.l" the sound of the crash, for queue_sound
local enemy_rodney_destroyed_fall 052720 d7 sound
# 052D96 "lea $52d5a.l, A5" 052D9C "jsr $47c30.l" the record of the clone he splits off (shredder_clone_record), for start_object_from_record, handed back
local enemy_shredder_split_start 052D96 a5 clone_record object_record
# 052EB4 "lea $52e74.l, A5" 052EC2 "lea $52e7c.l, A5" 052EC8 "jsr $484e2.l" his walking animations (the hurt ones while his bars are low), turned to the turtle by enemy_turn_to_object and handed back
local enemy_shredder_walk_to_side_step 052EB4,052EC2,052EC8 a5 animations
# 052F86 "lea $52e74.l, A5" 052F94 "lea $52e7c.l, A5" 052F9A "jsr $484e2.l" his walking animations (the hurt ones while his bars are low), turned to the turtle by enemy_turn_to_object and handed back
local enemy_shredder_walk_to_side_hold 052F86,052F94,052F9A a5 animations
# 053142 "move.w D7, ($1c,A0)" the speed up or down that speeds_from_direction gives for walking backwards, stored in its y_speed and handed back
param enemy_shredder_back_off_start d7 y_speed
# 05314C "lea $52e74.l, A5" 05315A "lea $52e7c.l, A5" 053166 "jsr $484e2.l" his walking animations (the hurt ones while his bars are low), turned to the turtle by enemy_turn_to_object and handed back
local enemy_shredder_back_off_walk 05314C,05315A,053166 a5 animations
# 05364A "lea $52e74.l, A5" 053650 "jsr $484e2.l" his walking animations, turned to the turtle by enemy_turn_to_object and handed back
local enemy_shredder_ray_line_up 05364A,053650 a5 animations
# 053708 "lea $53622.l, A5" 05370E "jsr $47c5a.l" the record of his ray (shredder_ray_shot_record), for start_shot, handed back
local enemy_shredder_ray_fire 053708 a5 ray_record shot_record
# ---- objects/turtles.c ----
# 01B6E0 "move.b ($0,A1), D1" the turtle's entry in turtle_inputs: what its player holds (the stick's bits 0-3 and the buttons), for the routine that runs
local turtle_control 01B6E0 d1 held
# 01B75C "andi.b #$4, D1" the stick's direction bits (the inputs held, masked with 0xF by every caller): 4 up or down starts the walk up
param turtle_start_walk d1 stick
# 01B8A6 "move.b (A6,D1.w), D7" 01B8AA "jsr $91a4.l" the attack's sound from turtle_attack_sounds_by_move, for queue_sound
local turtle_set_attack 01B8A6 d7 sound
# 01B976 "move.b D1, D0" 01B978 "andi.b #$f, D1" what the player holds (turtle_control's entry in turtle_inputs)
param turtle_stand d1 held
# 01B978 "andi.b #$f, D1" 01B97C "bne $1b740" the stick's direction bits; any of them starts the walk
local turtle_stand 01B978 d1 stick
# 01B950 "move.b D2, D3" 01B96E "andi.b #$20, D3" the buttons the player has just pressed, kept for the attack button (0x20) while the jump's test masks D2
local turtle_stand 01B950 d3 buttons_pressed
# 01B9F2 "andi.b #$f, D1" what the player holds (turtle_control's entry in turtle_inputs)
param turtle_walk d1 held
# 01B9F2 "andi.b #$f, D1" 01B9FA "andi.b #$4, D1" the stick's direction bits: none stops the walk, 4 walks up or down
local turtle_walk 01B9F2 d1 stick
# 01B9BE "move.b D2, D3" 01B9DC "andi.b #$20, D3" the buttons the player has just pressed, kept for the attack button (0x20) while the jump's test masks D2
local turtle_walk 01B9BE d3 buttons_pressed
# 01BCC4 "move.b #$12, D7" 01BCDC "move.b #$30, D7" 01BCE0 "jmp $91a4.l" the sound of the landing (0x30 in area 3 at height 0, the sewer's water), for queue_sound
local turtle_land 01BCC4,01BCDC d7 sound
# 01BF14 "andi.b #$f, D1" what the player holds (turtle_attack's and turtle_fire_gun's, from turtle_control)
param turtle_attack_over d1 held
# 01BF14 "andi.b #$f, D1" the stick's direction bits; any of them starts the walk
local turtle_attack_over 01BF14 d1 stick
# 01D330 "clr.b D0" 01D338 "move.b D0, (A6)+" the attribute of a blank tile (0), written over the prompt
local turtle_erase_prompt 01D330 d0 blank_attribute
# 01D332 "moveq #$10, D1" 01D33A "move.b D1, (A6)+" the code of the blank tile (0x10, the space), written over the prompt
local turtle_erase_prompt 01D332 d1 space_tile
# 01D832 "move.l #$c000, ($12,A0)" 01D842 "moveq #$7b, D0" the contact bits the turtle gets when no floor turns up in 20 rows and it is put back at x 0xC000, y 0x2000 (code shared with turtle_lower_floor)
local turtle_raise_floor 01D842 d0 reset_contacts
# 01D832 "move.l #$c000, ($12,A0)" 01D842 "moveq #$7b, D0" the contact bits the turtle gets when no floor turns up in 20 rows and it is put back at x 0xC000, y 0x2000
local turtle_lower_floor 01D842 d0 reset_contacts
# ---- scenes/area_exits.c ----
# 02B26E "moveq #$0, D0" 02B27C "move.b D0, (A1)" 02B280 "move.b D0, ($2d,A0)" 02B298 "move.w D0, $61104.l" the 0 the exit clears the markers' flags, the marker times, the turtles' invulnerable time and the balloon times with
local turtle_start_area_exit 02B26E d0 cleared
# ---- objects/rock_soldiers.c ----
# 012772 "lea $16f20.l, A5" 012778 "move.l A5, ($3a,A6)" the missile's shadow (missile_shadow), put in its shadow (+3A) and handed back
param rock_soldier_technodrome_start_missile a5 shadow
# ---- objects/scenery.c ----
# 00FFE4 "move.b #$32, D7" 00FFE8 "jsr $91a4.l" the rat's squeak as it stops, for queue_sound
local rat_run_step 00FFE4 d7 sound
# 01006A "move.b #$12, D7" 01006E "jsr $91a4.l" the sound of the jaws as the alligator comes near, for queue_sound
local alligator_swim 01006A d7 sound
# 010C16 "move.b #$5, D7" 010C1A "jsr $91a4.l" the sound of the nozzle struck, for queue_sound
local freeze_nozzle_struck 010C16 d7 struck_sound
# 010C66 "lea $10d5a.l, A5" 010C6C "bsr $10d48" the beam's table of waits, for electric_random_wait, handed back
param electric_beam_start a5 waits wait_time
# 010CEA "lea $10d62.l, A5" 010CF0 "bsr $10d48" the vent's table of waits (electric_waits), for electric_random_wait, handed back
param electric_vent_start a5 waits wait_time
# 012BFC "move.w ($2,A5), D7" 012C00 "ext.l D7" 012C02 "add.l D7, ($16,A6)" the hit box's offset up or down from the car (its place's y), added to its y and handed back
param parked_car_start_hit_box d7 y_offset
# ---- objects/krang.c ----
# 00EA3C "lea $ea9e.l, A5" 00EA5E "move.w (A5,D7.w), D6" 00EA68 "move.w ($2,A5,D7.w), D6" the table of the laser's places by angle (krang_laser_place_x, its height in the second word), handed back
local krang_start_laser 00EA3C a5 laser_places
# ---- objects/air_attacks.c ----
# 013724 "move.w $600a4.l, D7" 01372A "andi.w #$7f, D7" the frame count; every 128 frames the drone picks a turtle again
local flying_drone_steer 013724 d7 frame
# 013AA4 "lea $13ae4.l, A5" 013AC6 "move.w (A5,D7.w), D6" 013AD0 "move.w ($2,A5,D7.w), D6" the table of the shot's places by aim and side (drone_shot_place_x, its height in the second word), handed back
param flying_drone_start_shot a5 shot_places
# 013B62 "move.b #$14, D7" 013B66 "jsr $91a4.l" the sound of the shot, for queue_sound
local drone_shot_start 013B62 d7 sound
# ---- stage/layers.c ----
# 01F88E "moveq #$40, D5" 01F890 "bra $1f8b8" the colour offset of the second car (0x40) for drive_foot_car, handed back
param highway_second_car_drive d5 colour_offset
# 01F8B0 "moveq #-$80, D5" 01F8B2 "bra $1f8b8" the colour offset of the third car (0x80) for drive_foot_car, handed back
param highway_third_car_drive d5 colour_offset
# 01F966 "move.b #$15, D7" 01F96A "jmp $91a4.l" the car's sound for queue_sound (the rest is the row count's end), handed back
param draw_screen_picture d7 sound
# ---- objects/stockman.c ----
# 013DF0 "move.b (A6,D7.w), D7" 013DF4 "cmp.b $6120c.l, D7" the most enemies on the screen at which he still drops a Mouser, from stockman_fly_moves by the highest player in play
local stockman_fly 013DF0 d7 max_enemies
# 013F94 "move.w (A6,D7.w), D7" 013FC0 "add.w D6, D7" 013FC2 "move.w D7, ($10,A0)" the height the hit machine shakes at (its shake step plus the height for how far back it is), stored in its height and handed back
param stockman_shake d7 height
# 013FC8 "move.w $600a4.l, D7" 013FCE "andi.w #$3f, D7" the frame count; every 64 frames he picks a turtle again
local stockman_steer 013FC8 d7 frame
# 014130 "move.w (A6,D7.w), D7" 01415C "add.w D6, D7" 01415E "move.w D7, ($10,A0)" the height he bobs at (his bob step plus the height for how far back he is), stored in his height and handed back
param stockman_bob d7 height
# ---- video/palettes.c ----
# 009536 "movea.l #$95d6, A5" 00953C "movea.l (A5,D6.w), A5" 00954C "movea.l A5, A4" the bank's place in the palette RAM (from palette_bank_addresses), the base of each colour's place, handed back
param palette_request_colours a5 bank_place
# ---- system/boot.c ----
# 0010D2 "moveq #$0, D7" 0010D4 "move.b D7, $106900.l" the 0 the tile chip's registers are cleared with, handed back
local clear_tile_chip_registers 0010D2 d7 cleared
# 00173A "moveq #$0, D6" 00173C "move.b D6, ($1,A6)" 001740 "move.b D6, ($3,A6)" black (0), written into both bytes of every colour of the palette's upper half
local start_boot_screen 00173A d6 black
# ---- engine/directions.c ----
# 047DA4 "sub.w ($e,A0), D2" the screen y of the place the direction is to (every caller passes the place's y), handed back as the scaled distance of the table's row
param direction_to d2 target_y
# 047DA4 "sub.w ($e,A0), D2" 047DAA "neg.w D2" 047DF0 "lsr.w #1, D2" 047DC8 "lsr.w D3, D2" 047DD0 "exg D1, D2" the distance up or down to the place, scaled down with the distance across until both fit the angle table (swapped with it when the place is to the left, as x_distance is)
local direction_to 047DA4,047DAA,047DC8,047DD0,047DF0 d2 y_distance
# 047DDE "lsl.w #1, D2" 047DE0 "adda.w (A4,D2.w), A5" the row's distance times 2, its entry in direction_rows
local direction_to 047DDE d2 row_offset
# ---- scenes/ending.c ----
# 007286 "lea $72e2.l, A5" 00729A "move.w (A5,D7.w), ($c,A6)" 0072A6 "move.w ($2,A5,D7.w), ($e,A6)" the table of the Technodrome's explosion places (technodrome_explosion_x, the y in the second word), handed back
local start_technodrome_explosion 007286 a5 explosion_places
# ---- objects/explosions.c ----
# 010F02 "lea $10f44.l, A5" 010F12 "move.b (A5,D7.w), D7" the explosions' sounds (explosion_sounds), the one for this explosion picked by its count, handed back
param boss_start_explosion a5 sounds
# ---- objects/helpers.c ----
# 011E00 "lea $61306.l, A5" 011E30 "move.b D6, (A5,D7.w)" 011E4C "move.b (A5,D7.w), D7" the list of the turtles in play the boss picks its target from (boss_target_choices), handed back
param boss_pick_target a5 choices
# 011E90 "move.w ($2,A6,D0.w), D7" 011E94 "move.w D7, ($1c,A0)" the speed up or down toward the target from the boss's speeds, stored in its y_speed and handed back in the low word
param boss_aim_at_target d7 y_speed
# 0184D2 "movea.l ($20,A0), A5" 0184E2 "move.w ($c,A5), D0" the boss's target turtle (+20), handed back (its screen x and y read through it)
param boss_direction_to_target a5 target object
# ---- scenes/intro.c ----
# 03101C "move.b $600a5.l, D0" 031022 "andi.b #$7, D0" the frame count; the fire changes every eight frames
local intro_animate_fire 03101C,031022 d0 frame
# ---- video/speech_balloons.c ----
# 030266 "move.b (A6,D3.w), D7" the balloon's sound from its record in balloon_records, for queue_sound
local show_balloon 030266 d7 sound
# 030314 "moveq #$f, D7" the width the balloon is erased over (0xF, the widest), for draw_balloon_rows
param erase_balloon d7 width
# ---- engine/sprites.c ----
# 047D94 "move.w ($e,A6), D2" the other object's screen y, the place direction_to aims at
local direction_to_object 047D94 d2 target_y
# ---- system/test_mode.c ----
# 0019B8 "moveq #$0, D0" 0019C2 "move.l D0, (A0)+" the 0 the six sums of the mask ROMs start from
local start_mask_rom_sums 0019B8 d0 cleared
# ---- batch 8a2: what the routines leave in registers for later ones to read, kept as the game's state ----
# A part of a register a routine reads before anything sets it is what the code before left there: all through the
# frame from the VBLANK handler down, which finds the registers of the code it interrupted (003DC4 "movem.l
# D0-D7/A0-A6, $60440.l", put back at 003E44 "movem.l $60440.l, D0-D7/A0-A6"). Those parts, and every value that
# reaches them, are global variables of the C (core/decompiler/carried.py; the runtime puts them back when an
# interrupt's handler returns); the rest of each register stays in the functions' locals and parameters.
# 00FCE8 "move.w #$2000, D7" 00FCFA "add.l D7, ($12,A6)" hydrant_start_water adds all of D7 to the water's x having set
# only its low word: the high word is what the routines before left (00EBD2 krang_start_fist, 048690 enemy_start_arc,
# the billboard's soldier, the rock soldier's blast, the Technodrome's missile do the same); 002338 "btst D6, D7"
# 009362 "btst D6, D7" the boxes and the palette requests test bits of D7 as a long
register d7 offset_high_word
comment offset_high_word the high word of what the code adds as an offset or tests as a long of flags in D7, whose low word only it sets: 0 after a count, a sound or a mask of its own (a moveq), FFFF where an enemy has not landed (enemy_landed 04863A "moveq #-$1, D7"), the sign of a step across (enemy_start_arc 048674 "ext.l D7"), what is left of a product (random_below 04847C "swap D7")
# 03028A "cmpi.w #$130, D1" show_balloon takes D1's word for the speaker's x on the screen, 046FFC "cmpi.w #$1a0, D1"
# draw_sprites for a sprite's x, and the area exits for a turtle's (02CE00 "move.w D1, ($c,A0)"): its high byte, and
# the high word over it, are what the routines before left where they set only its low byte
register d1 screen_x_high
comment screen_x_high the high byte of the word the code takes for an x on the screen in D1, and the high word above it: what the area exits' routines put there for a speed or a place (turtle_exit_go_to_place 02CE0C "lsl.l #8, D1"), the high byte of a tile offset (draw_box_frame), of a job's word (the main loop), of a scroll step (auto_scroll 01ACEE "lsl.w #5, D1")
# 047DD0 "exg D1, D2" direction_to swaps the distances across and up and down, and reads D2's high word with the one
# across (the area exits' turtle_exit_go_to_place 02CE0E "lsl.l #8, D2" left a place in it)
register d2 distance_high_word
comment distance_high_word the high word of D2, which direction_to reads with a distance across after swapping it with D1: what the area exits leave there (a turtle's place times 256, turtle_exit_go_to_place 02CE0E "lsl.l #8, D2")
# 013078 "tst.b D5" helicopter_fly takes D5's low byte for whether the turtle it aims at is in line, set only where it
# finds one (013006 "moveq #$1, D5"); 00E890 "move.w ($e,A6), D5" 00E89E "cmpi.w #$b, D5" the routines that look for a
# turtle close by work out a distance in D5's word and leave its low byte; 003D4E "abcd D5, D4" add_credit_lives adds
# it to the lives
register d5 distance_low_byte
comment distance_low_byte the low byte of the distance up and down or across that the routines that look for a turtle close by work out in D5 (krang_find_close_turtle 00E89E "cmpi.w #$b, D5") and leave there; helicopter_fly takes it for whether a turtle is in line, the tile drawers for a tile's colour, add_credit_lives for the lives a credit adds
# 00965C "move.w D6, $63418.l" fade_palettes_start keeps D6 for the fade's banks and rate; 0024AC "move.b ($1,A4,D6.w),
# D0" player_box_colour reads D6's word for the player's number, whose high byte the routines before left
register d6 fade_banks
comment fade_banks D6's low word: the banks and the rate of a fade (fade_palettes_start 00965C "move.w D6, $63418.l": the ending's and the opening's fades put them there), the bank a palette request reached (palette_request_area), the board's control byte send_sound_command writes (00923A "move.b D6, $a0001.l"); the players' boxes read its high byte as the high byte of the player's number
# 0095EA "move.b (A4)+, ($1,A5)" copy_palette_list writes colours where A5 points, 009662 "move.l A5, $63414.l"
# fade_palettes_start keeps it for the palettes to fade to; 0094AC "movea.l (A5,D6.w), A5" the palette requests set it
# to a bank's place in the palette RAM and leave it for the next request
register a5 palette_place
comment palette_place where A5 points in the palettes: the place in the palette RAM a palette request copies colours to (palette_request_list 0094AC "movea.l (A5,D6.w), A5", copy_palette_list moves it on), the palettes a fade goes to (fade_palettes_start 009662 "move.l A5, $63414.l": the ending's and the opening's fades put them there)

# ---- batch 8b: what the object loop hands each object's routine in a register, kept as the game's state ----
# 0477F6 "bsr $4783c" run_objects starts with A5 where update_player_slots leaves it (047848 "movea.l (A6), A5": the
# last slot's turtle) and runs each object's routine with it, 047828 "jsr (A6)"; a routine that leaves A5 elsewhere
# hands that to the next object's (the bosses' aims leave their target, boss_direction_to_target 0184D2 "movea.l
# ($20,A0), A5"; the enemies that look for a slot leave the second nearest, enemy_think)
register a5 object_loop_leftover run_objects
comment object_loop_leftover what the object loop's routines leave in A5 for the next one: the last slot's turtle where the loop starts (update_player_slots), a boss's target (boss_direction_to_target), the second nearest slot an enemy found (enemy_think)


# ======== batch 8b-mem: the pointers the C reached memory through by address, with their types ========
# What the code walks or reads through a pointer, typed: the board's memories (u32 io: the bus, as the original), the
# work RAM's records and arrays (a structure; an array a pointer walks is a record of one field, which the C reads and
# writes: ELEMENT macros are const), the program's records (rom). The types of the lines above that were already
# there are marked "type:" in the comment over each.

# ---- the work RAM's arrays a pointer walks, one record an element ----
# a player's input byte: turtle_inputs (060020: what it holds, the stick's bits 0-3, jump 0x10, attack 0x20),
# turtle_presses (06004C: what it has just pressed), player_inputs (060034: the inputs read this frame); the turtles'
# routines take theirs in A1 and A2 from turtle_run_all (01A43A "lea $60020.l, A1", 01A440 "lea $6004c.l, A2",
# 01A554 "addq.l #1, A1")
struct player_input 01
field player_input 00 bits u8
# a player's marker timer, a byte of marker_times (061100): counted down every frame (01A34C "subq.b #1, (A6)")
struct marker_timer 01
field marker_timer 00 frames u8
# a cell of floor_map (061800, 0x40 cells a row): what is at a place of the area (01DEB4 "lea $61800.l, A6", 01DEC0
# "move.b (A6), $633d3.l"); the layers' setups write four at a time (01E30E "move.l D0, (A0)+")
struct floor_map_cell 01
field floor_map_cell 00 cell u8
# a slot of job_queue (060380): a job and its parameter, 0xFFFF when empty (004164 "movea.l $60010.l, A6", 00416A
# "move.w D7, (A6)+"; 00139E "move.w #$ffff, (A0)+")
struct queued_job 02
field queued_job 00 job u16
# a slot of sound_queue (060400): a command for the sound board (0091DA "move.b D7, (A6)+", 009212 "move.b (A6)+, D7")
struct queued_sound 01
field queued_sound 00 command u8
# a byte of hug_turtle_colours (0633E6): a turtle's colour in the April hug, FF once it is out (02C4EE "move.l
# #$8090a0b, (A1)", 02C506 "move.b #$ff, (A1)", 02C61A "move.b (A1)+, D0")
struct hug_colour 01
field hug_colour 00 colour u8
# a colour of the fade's buffer (063800): the palette's colours read (0096A2, a byte at a time), faded a step a frame
# (0097D4 "move.w (A6), D1", 0097EA "move.w D5, (A6)+") and written back
struct fade_colour 02
field fade_colour 00 colour u16
# a byte of it, as fade_palettes_read and fade_palettes_write copy the palette RAM's colours a byte at a time
# (0096A2 "move.b ($1,A6), (A5)+", 009714 "move.b (A5)+, ($1,A6)")
field fade_colour 00 part u8
# a sum the MASK ROM CHECK adds up in the work RAM, over the ranking's scores (0019BC "lea $63500.l, A0", 001D90
# "add.w D3, (A6)+"), compared with good_mask_rom_sums (001A0C "move.w (A0)+, D7", 001A0E "cmp.w (A6)+, D7")
struct mask_rom_total 02
field mask_rom_total 00 sum u16
# an entry of draw_list (061400): the object to draw, the low half of its address (046FBC "move.w (A1)+, D6",
# 046FC4 "movea.l D6, A0"), cleared once drawn (046FC0 "clr.w (-$2,A1)")
struct draw_entry 02
field draw_entry 00 object u16 object
# a turtle's throw timer: frames since its last throw, which turtle_attack_over reaches through turtle_throw_moves'
# records (01BFAE "movea.l ($2,A5,D0.w), A5"): the throw only at 0x100 or more, then cleared (01BFB2 "cmpi.w #$100,
# (A5)", 01BFBA "clr.w (A5)")
struct throw_timer 02
field throw_timer 00 frames u16
# ---- the program's records ----
# an elevator's stop (elevator_stops, elevator_stops_2): the screen x it stops at and its wait there (04C716
# "movea.l ($24,A0), A1", 04C71A "move.w (A1), D0", 04C724 "move.b ($2,A1), ($46,A0)")
struct elevator_stop 04 rom
field elevator_stop 00 x u16
field elevator_stop 02 wait u8
# a window soldier's record in object_tile_blocks: the screen x it jumps out at, then the frames the window takes to
# break (high byte) and the delay between its steps (low byte), read as one word (04CC14 "move.w (A5)+, ($20,A0)",
# 04CC18 "move.w (A5)+, ($46,A0)"); its window_break_steps follow
struct window_drop 04 rom
field window_drop 00 trigger_x u16
field window_drop 02 times u16
# a diving window soldier's record in object_tile_block_pairs: the screen y it dives out at (04CD94 "move.w (A6)+,
# ($20,A0)"); its dive_window follows
struct window_dive 02 rom
field window_dive 00 trigger_y u16
# a colour channel's mask and the step a fade moves it by (009872: 001F/0001, 03E0/0020, 7C00/0400): 00983A "move.w
# (A2)+, D3" 009840 "mulu.w (A2)+, D4"
struct colour_channel 04 rom
field colour_channel 00 mask u16
field colour_channel 02 step u16
# a list of palette effects starts with how many (009884 "move.w (A6)+, D7", 009886 "subq.w #1, D7"), the pointers
# to them follow (0098A8 "movea.l (A6)+, A4")
elements palette_effect_count u16
# a palette effect's data starts with its colour code: bank, palette and colour (0098AA "move.w (A4)+, D6", 0098B4
# "andi.w #$f00, D5", 0098C4 "andi.w #$f0, D5", 0098CC "andi.w #$f, D6"), its steps follow
elements palette_effect_code u16
# the title logo's pieces' places on the screen, x and y (004B30 "move.w (A6,D7.w), ($c,A0)", 004B36 "move.w
# ($2,A6,D7.w), ($e,A0)")
elements logo_place u16
# a font's tile codes, two a character, top and bottom (0090B6 "move.b (A3,D6.w), ($1,A6)", 0090BC "move.b
# ($1,A3,D6.w), ($81,A6)")
elements font_tile u8
# where a player's box's parts are drawn in the fixed layer (player_box_places: the frame, the label, the lives, the
# health bar): 00258C "movea.l ($4,A6,D5.w), A5"
elements box_part_place u32 io

# ---- the turtles' and the enemies' objects reached through a field ----
# 01CEEA "movea.l ($28,A0), A6" the enemy that holds it (turtle.hit_by), let go: 01CEEE "move.b #$3, ($5,A6)"
local turtle_held_struggle 01CEEA a6 holder object.enemy
# 01CFF0 "movea.l ($28,A0), A6" the enemy that holds it (turtle.hit_by), let go
local turtle_held_briefly_struggle 01CFF0 a6 holder object.enemy
# 01D0B2 "movea.l ($28,A0), A6" 01D0CA "movea.l ($28,A0), A6" the enemy that holds it (turtle.hit_by), knocked off
local turtle_held_knock_off_struggle 01D0B2,01D0CA a6 holder object.enemy
# 01CF12 "movea.l ($28,A0), A6" the enemy that held it (turtle.hit_by), let go unless it is hit
local turtle_held_dies 01CF12 a6 holder object.enemy
# 01D1AC "movea.l ($28,A0), A6" 01D208 "movea.l ($28,A0), A6" the enemy that holds it (turtle.hit_by), thrown off:
# its move, facing and move_time (+28, +30, +22)
local turtle_held_throw_off_struggle 01D1AC,01D208 a6 holder object.enemy
# 01CDE0 "movea.l ($28,A0), A6" the open manhole it falls in (turtle.hit_by), its place on the screen (+C, +E)
local turtle_fall_in_manhole_start 01CDE0 a6 manhole object
# 01C05A "movea.l ($4a,A0), A5" the enemy its combo throws (turtle.hit_target), its throw (01C05E "move.b ($4b,A5), D3")
local turtle_attack_over 01C05A a5 thrown_enemy object.enemy
# 013742 "movea.l ($20,A0), A6" the turtle it goes after (flying_drone.target), its place on the screen
local flying_drone_steer 013742 a6 target object
# 013920 "movea.l ($20,A0), A6" 01392A "movea.l ($20,A0), A6" the turtle it goes after (flying_drone.target)
local flying_drone_animate 013920,01392A a6 target object
# 013FE6 "movea.l ($20,A0), A6" the turtle Stockman goes after (stockman.target), its place on the screen
local stockman_steer 013FE6 a6 target object
# 0184D2 "movea.l ($20,A0), A5" the turtle the boss goes after (boss.target), its place on the screen
local boss_direction_to_target 0184D2 a5 target object
# 012928 "movea.l ($20,A0), A6" the rock soldier the bars come with (shock_bars.leader), its routine
local shock_bars_on 012928 a6 leader object
# 0129E2 "movea.l ($20,A0), A6" the rock soldier the bars come with (shock_bars.leader), its routine
local shock_bars_hit_box_zap 0129E2 a6 leader object
# 04BE7C "movea.l ($20,A0), A6" the enemy that threw the boomerang (boomerang.thrower), its routine
local boomerang_fly_out 04BE7C a6 thrower object
# 04BE92 "movea.l ($20,A0), A6" the enemy that threw the boomerang (boomerang.thrower), its routine
local boomerang_fly_back 04BE92 a6 thrower object
# 04C23C "movea.l ($24,A0), A6" Shredder, who shoots the ray (shredder_ray.shredder), his routine
local shredder_ray_shine 04C23C a6 shredder object
# 04F186 "movea.l ($46,A0), A6" the boomerang it threw (enemy_boomerang.boomerang), its routine
local enemy_boomerang_throw_wait 04F186 a6 boomerang object
# 010BEE "movea.l ($20,A0), A6" 010C0C "movea.l ($20,A0), A6" its row's nozzle_status (freeze_nozzle.row_status)
local freeze_nozzle_sink 010BEE a6 row_status object.nozzle_row+2F
local freeze_nozzle_struck 010C0C a6 row_status object.nozzle_row+2F
# 04B828 "movea.l ($24,A0), A1" Rodney, whose whip the arm is (whip_arm.rodney): his arm_flags and arm_length
local whip_arm_follow 04B828 a1 rodney object.enemy_rodney_whip
# 04B88E "movea.l ($24,A0), A1" Rodney (whip_arm.rodney): 04B892 "bset #$2, ($4a,A1)"
local whip_arm_let_go 04B88E a1 rodney object.enemy_rodney_whip
# 04B89E "movea.l ($24,A0), A1" Rodney (whip_arm.rodney), his routine and arm_length
local whip_arm_drag 04B89E a1 rodney object.enemy_rodney_whip
# 04B91C "movea.l ($24,A0), A1" 04B92C "movea.l ($24,A0), A1" Rodney (whip_arm.rodney): 04B920 "bset #$2, ($4a,A1)"
local whip_arm_struck 04B91C,04B92C a1 rodney object.enemy_rodney_whip
# 04B950 "cmpi.b #$5, ($4,A1)" Rodney, as whip_arm_follow and whip_arm_struck hand him (whip_arm.rodney)
param whip_arm_place a1 rodney object.enemy_rodney_whip
# 052532 "movea.l ($24,A0), A2" Rodney's whip arm (enemy_rodney_whip.arm): 052536 "btst #$3, ($0,A2)", 052546 "move.w
# ($4e,A2), D7"
local enemy_rodney_whip_reach 052532 a2 arm object.whip_arm
# 04E8C4 "movea.l ($46,A0), A5" the walk's animations (enemy_walk.animations): 04E8C8 "movea.l ($8,A5), A6"
local enemy_walk_to_range_step 04E8C4 a5 animations animation_entry
# 04FFBE "movea.l ($24,A0), A6" Rocksteady's animations as he is knocked down (enemy_rocksteady_knocked_down.animations)
local enemy_rocksteady_knocked_down_fall 04FFBE a6 animations animation_entry
# 050026 "movea.l ($24,A0), A6" Rocksteady's animations as he is knocked down (enemy_rocksteady_knocked_down.animations)
local enemy_rocksteady_knocked_down_lie 050026 a6 animations animation_entry
# 050142 "movea.l ($24,A0), A6" Rocksteady's animations as he is defeated (enemy_rocksteady_defeated.animations)
local enemy_rocksteady_defeated_fall 050142 a6 animations animation_entry
# 051BB4 "movea.l ($24,A0), A4" the hole's record (mouser_hole.hole): its two animations, closed and broken (051BB8
# "movea.l ($4,A4), A6"), then the Mouser's record (051BC2 "adda.w #$8, A4")
local mouser_hole_wait 051BB4 a4 hole animation_entry
# 012B9E "movea.l ($20,A0), A6" the row of the K052109's tile RAM it blanks (parked_car.blank_row, 012A52 "move.l
# #$102f80, ($20,A0)")
local parked_car_blank_row 012B9E a6 blank_row io

# ---- the players' slots: the enemy's target, a link in the work RAM's page (0x60000 | target) ----
# 0510FE "movea.l D0, A1" the Mouser's target's slot; 05115C "movea.l A6, A1" the one the retargeting picked, which it
# keeps as its target (051158 "move.w A6, ($20,A0)")
local enemy_mouser_think 0510FE,05115C a1 slot player_slot
# 051D8A "movea.l D0, A1" Rodney's target's slot; 051DE8 "movea.l A6, A1" the one the retargeting picked (051DE4
# "move.w A6, ($20,A0)")
local enemy_rodney_think 051D8A,051DE8 a1 slot player_slot
# 05284A "movea.l D0, A1" Shredder's target's slot; 0528AA "movea.l A6, A1" the one the retargeting picked (0528A6
# "move.w A6, ($20,A0)")
local enemy_shredder_think 05284A,0528AA a1 slot player_slot
# 052B9C "movea.l D0, A1" Shredder's target's slot (052B98 "move.w ($20,A0), D0"), its turtle (052B9E "movea.l (A1),
# A6")
local enemy_shredder_attack 052B9C a1 slot player_slot

# ---- the players' records ----
# 0023C2 "lea $60100.l, A4" the players' records, read at the player's (0023CC "move.w (A4,D4.w), D4": his lives)
local draw_lives 0023C2 a4 players player
# 00246A "lea $60100.l, A4" the players' records, read at the player's (002474 "move.b ($6,A4,D4.w), D4": his
# health_bars)
local draw_health_bar 00246A a4 players player

# ---- the program's data read through a pointer ----
# 04F4CE "bsr $4f51c" 04F504 "bsr $4f51c" the waits' table (rocksteady_far_attack_waits or close: 04F4C8 "lea
# $4f5c4.l, A5") moved to Rocksteady's mode (04F534 "adda.w D0, A5"), read at the range it picked (04F4D2 "move.b
# (A5,D7.w), ($48,A0)")
local enemy_rocksteady_think 04F4CE,04F504 a5 waits wait_time
# 04C716 "movea.l ($24,A0), A1" the elevator's stop (elevator.stop): 04C71A "move.w (A1), D0"
local elevator_wait_on_screen 04C716 a1 stop elevator_stop
# 04CC10 "adda.w (A6,D0.w), A5" the window soldier's record of object_tile_blocks (04CC02 "lea $4cbc0.l, A5"); then
# past its trigger and its times (04CC14 "move.w (A5)+, ($20,A0)", 04CC18 "move.w (A5)+, ($46,A0)"), its blocks
local window_soldier_drop_start 04CC10 a5 record window_drop
local window_soldier_drop_start 04CC14,04CC18 a5 record
# 009398 "movea.l (A6,D5.w), A6" the area's palettes, a list a bank (area_palettes' entry): 00939E "movea.l (A6,D6.w),
# A6"
local palette_request_area 009398 a6 bank_lists palette_list_pointer
# 009884 "move.w (A6)+, D7" the list of palette effects, its count first: then its pointers (0098A8 "movea.l (A6)+, A4")
param start_palette_effects a6 effect_list palette_effect_count
local start_palette_effects 009884,0098A8 a6 effect_list palette_effect_pointer
# 01F768 "movea.l A0, A1" 01F77E "adda.w #$40, A1" a cell of floor_map, a column of cells walled down from the lift
local technodrome_leave_lift 01F768,01F77E a1 wall_place floor_map_cell

# a byte of a score in BCD, two digits (the players' scores at 060104 + 8 a player, top_score): add_point_to_score adds
# to them backwards (001FA0 "abcd -(A5), -(A4)"), draw_score_digits draws them (002032 "move.b (A6), D6", 002034
# "lsr.b #4, D6")
struct bcd_pair 01
field bcd_pair 00 digits u8
# a score of the ranking (ranking_scores, 063500): BCD, drawn by BEST 10 PLAYERS (0090E8 "move.w ($0,A5), D0")
struct ranking_score 02
field ranking_score 00 score u16
# a player's initials in the ranking (ranking_initials, 0635C8): three characters, 4 bytes a record (009048 "lea
# $635c8.l, A5", 00907A "move.b ($0,A5), D6", 009088 "move.b ($1,A5), D6", 009096 "move.b ($2,A5), D6", 0090A2 "adda.w
# #$4, A5")
struct ranking_name 04
field ranking_name 00 first u8
field ranking_name 01 second u8
field ranking_name 02 third u8
# 0477EA "jsr $47a32.l" run_objects hands A1 to spawn_enemies, which leaves it at a spawn's screen margins where it
# places one (047B98 "lea $53a5e.l, A1"), and to each object's routine as it is; the bosses' ways in pass it on as the
# slot their state's routine takes (04F28A "lea $4f296.l, A6" 04F290 "jmp $48236.l": run_object_state keeps A1), and
# the frame hands it in from the turtles' and the layers' routines (update_players, update_area_layers)
register a1 object_loop_slot run_objects
comment object_loop_slot what A1 holds through the object loop: what the turtles' and the layers' routines leave there, a spawn's screen margins (spawn_enemies), the slot an object's routine left; the bosses' first states take it for the player slot they go after

# ======== batch 8c: nothing in the 68000's C named after an address ========

# ---- the objects' tables of states: the routine that runs a move hands run_object_state its table (its
# handler by the state +5), named for the move whose states it holds (batch 8c) ----
# 049234 "lea $49240.l, A6" (enemy_shuffle): its states, enemy_walk_to_side_start, enemy_walk_to_side_step,
# enemy_shuffle_start, enemy_shuffle_step, enemy_shuffle_turn, enemy_shuffle_end
049240  data  enemy_shuffle_states
# 0492EC "lea $492f8.l, A6" (enemy_retreat): its states, enemy_retreat_start, enemy_retreat_step
0492F8  data  enemy_retreat_states
# 049344 "lea $49350.l, A6" (enemy_circle): its states, enemy_circle_start, enemy_circle_step
049350  data  enemy_circle_states
# 049408 "lea $49414.l, A6" (enemy_charge): its states, enemy_charge_start, enemy_charge_run, enemy_charge_brake
049414  data  enemy_charge_states
# 0494C6 "lea $494d2.l, A6" (enemy_crash_into_scenery): its states, enemy_crash_into_scenery_start,
# enemy_crash_into_scenery_end
0494D2  data  enemy_crash_into_scenery_states
# 04955C "lea $49568.l, A6" (enemy_crash_into_scenery_low): its states, enemy_crash_into_scenery_low_start,
# enemy_crash_into_scenery_end
049568  data  enemy_crash_into_scenery_low_states
# 0495CA "lea $495d6.l, A6" (enemy_walk_to_target): its states, enemy_walk_to_target_start, enemy_walk_to_target_step
0495D6  data  enemy_walk_to_target_states
# 04964E "lea $4965a.l, A6" (enemy_walk_to_side): its states, enemy_walk_to_side_start, enemy_walk_to_side_step,
# enemy_walk_to_side_crouch, enemy_walk_to_side_turn, enemy_walk_to_side_hold
04965A  data  enemy_walk_to_side_states
# 04978A "lea $49796.l, A6" (enemy_keep_distance): its states, enemy_keep_distance_start, enemy_keep_distance_watch,
# enemy_keep_distance_back_off, enemy_keep_distance_close_in
049796  data  enemy_keep_distance_states
# 04989A "lea $498a6.l, A6" (enemy_back_off): its states, enemy_back_off_start, enemy_back_off_walk,
# enemy_back_off_wait
0498A6  data  enemy_back_off_states
# 049934 "lea $49940.l, A6" (enemy_run_away): its states, enemy_run_away_start, enemy_run_away_step
049940  data  enemy_run_away_states
# 0499A4 "lea $499b0.l, A6" (enemy_walk_across): its states, enemy_walk_across_start, enemy_walk_across_step
0499B0  data  enemy_walk_across_states
# 049A06 "lea $49a12.l, A6" (enemy_jab): its states, enemy_jab_start, enemy_attack_end
049A12  data  enemy_jab_states
# 049A52 "lea $49a5e.l, A6" (enemy_chop): its states, enemy_chop_start, enemy_attack_end
049A5E  data  enemy_chop_states
# 049A8E "lea $49a9a.l, A6" (enemy_swing): its states, enemy_swing_start, enemy_attack_end
049A9A  data  enemy_swing_states
# 049ACA "lea $49ad6.l, A6" (enemy_high_kick): its states, enemy_high_kick_start, enemy_attack_end
049AD6  data  enemy_high_kick_states
# 049B06 "lea $49b12.l, A6" (enemy_jump_kick): its states, enemy_jump_kick_crouch, enemy_jump_kick_leap,
# enemy_jump_kick_fly, enemy_attack_end
049B12  data  enemy_jump_kick_states
# 049BBC "lea $49bc8.l, A6" (enemy_long_jump_kick): its states, enemy_long_jump_kick_crouch,
# enemy_long_jump_kick_leap, enemy_long_jump_kick_fly, enemy_attack_end
049BC8  data  enemy_long_jump_kick_states
# 049C76 "lea $49c82.l, A6" (enemy_grab): its states, enemy_grab_start, enemy_grab_run, enemy_grab_hold,
# enemy_grab_end
049C82  data  enemy_grab_states
# 049DDC "lea $49de8.l, A6" (enemy_flinch_back): its states, enemy_flinch_back_start, enemy_flinch_end
049DE8  data  enemy_flinch_back_states
# 049E10 "lea $49e1c.l, A6" (enemy_flinch_bent): its states, enemy_flinch_bent_start, enemy_flinch_end
049E1C  data  enemy_flinch_bent_states
# 049E34 "lea $49e40.l, A6" (enemy_flinch_reel): its states, enemy_flinch_reel_start, enemy_flinch_end
049E40  data  enemy_flinch_reel_states
# 049E58 "lea $49e64.l, A6" (enemy_flinch_hunched): its states, enemy_flinch_hunched_start, enemy_flinch_end
049E64  data  enemy_flinch_hunched_states
# 049E7C "lea $49e88.l, A6" (enemy_killed_back): its states, enemy_killed_back_start, enemy_killed_back_fly,
# enemy_killed_back_lie, enemy_killed_back_on_wall, enemy_killed_back_slide_down, enemy_killed_back_down
049E88  data  enemy_killed_back_states
# 049FB8 "lea $49fc4.l, A6" (enemy_killed_forward): its states, enemy_killed_forward_start, enemy_killed_forward_fly,
# enemy_killed_forward_lie, enemy_killed_forward_on_wall, enemy_killed_forward_slide_down, enemy_killed_forward_down
049FC4  data  enemy_killed_forward_states
# 04A0F4 "lea $4a100.l, A6" (enemy_knocked_forward): its states, enemy_knocked_forward_start,
# enemy_knocked_forward_fly, enemy_knocked_forward_lie, enemy_knocked_forward_wait, enemy_knocked_back_get_up
04A100  data  enemy_knocked_forward_states
# 04A1D4 "lea $4a1e0.l, A6" (enemy_thrown_by_donatello): its states, enemy_thrown_by_donatello_start,
# enemy_thrown_by_donatello_swing, enemy_thrown_fly, enemy_killed_back_lie, enemy_killed_back_on_wall,
# enemy_killed_back_slide_down, enemy_killed_back_down
04A1E0  data  enemy_thrown_by_donatello_states
# 04A368 "lea $4a374.l, A6" (enemy_thrown_by_michelangelo): its states, enemy_thrown_by_michelangelo_start,
# enemy_thrown_by_michelangelo_swing, enemy_thrown_fly, enemy_killed_back_lie, enemy_killed_back_on_wall,
# enemy_killed_back_slide_down, enemy_killed_back_down
04A374  data  enemy_thrown_by_michelangelo_states
# 04A426 "lea $4a432.l, A6" (enemy_thrown_by_raphael): its states, enemy_thrown_by_raphael_start,
# enemy_thrown_by_raphael_swing, enemy_thrown_fly, enemy_killed_back_lie, enemy_killed_back_on_wall,
# enemy_killed_back_slide_down, enemy_killed_back_down
04A432  data  enemy_thrown_by_raphael_states
# 04A4E4 "lea $4a4f0.l, A6" (enemy_thrown_by_leonardo): its states, enemy_thrown_by_leonardo_start,
# enemy_thrown_by_leonardo_swing, enemy_thrown_fly, enemy_killed_back_lie, enemy_killed_back_on_wall,
# enemy_killed_back_slide_down, enemy_killed_back_down
04A4F0  data  enemy_thrown_by_leonardo_states
# 04A5A2 "lea $4a5ae.l, A6" (enemy_knocked_back): its states, enemy_knocked_back_start, enemy_knocked_back_fly,
# enemy_knocked_back_lie, enemy_knocked_back_wait, enemy_knocked_back_get_up
04A5AE  data  enemy_knocked_back_states
# 04A6B2 "lea $4a6be.l, A6" (enemy_die): its states, enemy_die_start, enemy_die_vanish
04A6BE  data  enemy_die_states
# 04A704 "lea $4a710.l, A6" (enemy_die_on_back): its states, enemy_die_on_back_start, enemy_die_vanish
04A710  data  enemy_die_on_back_states
# 04ADAC "lea $4adb8.l, A6" (enemy_walk_to_target_sword): its states, enemy_walk_to_target_sword_start,
# enemy_walk_to_target_step
04ADB8  data  enemy_walk_to_target_sword_states
# 04ADEE "lea $4adfa.l, A6" (enemy_walk_to_side_sword): its states, enemy_walk_to_side_sword_start,
# enemy_walk_to_side_step, enemy_walk_to_side_sword_crouch, enemy_walk_to_side_sword_turn, enemy_walk_to_side_hold
04ADFA  data  enemy_walk_to_side_sword_states
# 04AE78 "lea $4ae84.l, A6" (enemy_walk_past_sword): its states, enemy_walk_past_sword_start,
# enemy_walk_past_sword_step
04AE84  data  enemy_walk_past_sword_states
# 04AF24 "lea $4af30.l, A6" (enemy_back_off_sword): its states, enemy_back_off_sword_start, enemy_back_off_sword_walk,
# enemy_back_off_sword_wait
04AF30  data  enemy_back_off_sword_states
# 04AFBE "lea $4afca.l, A6" (enemy_walk_to_line_sword): its states, enemy_walk_to_line_sword_start,
# enemy_walk_to_line_sword_step
04AFCA  data  enemy_walk_to_line_sword_states
# 04B032 "lea $4b03e.l, A6" (enemy_walk_to_target_hammer): its states, enemy_walk_to_target_hammer_start,
# enemy_walk_to_target_step
04B03E  data  enemy_walk_to_target_hammer_states
# 04B074 "lea $4b080.l, A6" (enemy_walk_to_side_hammer): its states, enemy_walk_to_side_hammer_start,
# enemy_walk_to_side_far_step, enemy_walk_to_side_far_hold
04B080  data  enemy_walk_to_side_hammer_states
# 04B12E "lea $4b13a.l, A6" (enemy_stalk_hammer): its states, enemy_stalk_hammer_start, enemy_stalk_hammer_approach,
# enemy_stalk_hammer_step
04B13A  data  enemy_stalk_hammer_states
# 04B238 "lea $4b244.l, A6" (enemy_walk_away_hammer): its states, enemy_walk_away_hammer_start,
# enemy_walk_away_hammer_walk, enemy_walk_away_hammer_wait
04B244  data  enemy_walk_away_hammer_states
# 04B2DA "lea $4b2e6.l, A6" (enemy_slash_sword): its states, enemy_slash_sword_start, enemy_attack_end
04B2E6  data  enemy_slash_sword_states
# 04B316 "lea $4b322.l, A6" (enemy_low_slash_sword): its states, enemy_low_slash_sword_start, enemy_attack_end
04B322  data  enemy_low_slash_sword_states
# 04B352 "lea $4b35e.l, A6" (enemy_leaping_slash_sword): its states, enemy_leaping_slash_sword_start,
# enemy_leaping_slash_sword_leap, enemy_leaping_slash_sword_fly, enemy_attack_end
04B35E  data  enemy_leaping_slash_sword_states
# 04B42A "lea $4b436.l, A6" (enemy_jump_slash_sword): its states, enemy_jump_slash_sword_start,
# enemy_jump_slash_sword_leap, enemy_jump_slash_sword_fly, enemy_attack_end
04B436  data  enemy_jump_slash_sword_states
# 04B4E0 "lea $4b4ec.l, A6" (enemy_flying_slash_sword): its states, enemy_flying_slash_sword_start,
# enemy_flying_slash_sword_leap, enemy_flying_slash_sword_fly, enemy_attack_end
04B4EC  data  enemy_flying_slash_sword_states
# 04B5D6 "lea $4b5e2.l, A6" (enemy_smash_hammer): its states, enemy_smash_hammer_start, enemy_smash_hammer_end
04B5E2  data  enemy_smash_hammer_states
# 04B632 "lea $4b63e.l, A6" (enemy_flinch_back_sword): its states, enemy_flinch_back_sword_start, enemy_flinch_end
04B63E  data  enemy_flinch_back_sword_states
# 04B656 "lea $4b662.l, A6" (enemy_flinch_bent_sword): its states, enemy_flinch_bent_sword_start, enemy_flinch_end
04B662  data  enemy_flinch_bent_sword_states
# 04B67A "lea $4b686.l, A6" (enemy_flinch_reel_sword): its states, enemy_flinch_reel_sword_start, enemy_flinch_end
04B686  data  enemy_flinch_reel_sword_states
# 04B69E "lea $4b6aa.l, A6" (enemy_flinch_hunched_sword): its states, enemy_flinch_hunched_sword_start,
# enemy_flinch_end
04B6AA  data  enemy_flinch_hunched_sword_states
# 04B6C2 "lea $4b6ce.l, A6" (enemy_flinch_back_hammer): its states, enemy_flinch_back_hammer_start, enemy_flinch_end;
# enemy_flinch_hunched_hammer hands it the same table (04B70A "lea $4b6ce.l, A6")
04B6CE  data  enemy_flinch_back_hammer_states
# 04B6E6 "lea $4b6f2.l, A6" (enemy_flinch_bent_hammer): its states, enemy_flinch_bent_hammer_start, enemy_flinch_end
04B6F2  data  enemy_flinch_bent_hammer_states
# 04DD34 "lea $4dd40.l, A6" (enemy_walk_to_target_spear): its states, enemy_walk_to_target_spear_start,
# enemy_walk_to_target_step
04DD40  data  enemy_walk_to_target_spear_states
# 04DD76 "lea $4dd82.l, A6" (enemy_walk_to_side_spear): its states, enemy_walk_to_side_spear_start,
# enemy_walk_to_side_far_step, enemy_walk_to_side_far_hold
04DD82  data  enemy_walk_to_side_spear_states
# 04DDB4 "lea $4ddc0.l, A6" (enemy_walk_off_line_spear): its states, enemy_walk_off_line_spear_start,
# enemy_walk_off_line_spear_step
04DDC0  data  enemy_walk_off_line_spear_states
# 04DE60 "lea $4de6c.l, A6" (enemy_back_off_spear): its states, enemy_back_off_spear_start, enemy_back_off_spear_walk,
# enemy_back_off_wait
04DE6C  data  enemy_back_off_spear_states
# 04DEE2 "lea $4deee.l, A6" (enemy_step_aside_spear): its states, enemy_step_aside_spear_start,
# enemy_step_aside_spear_step
04DEEE  data  enemy_step_aside_spear_states
# 04DF64 "lea $4df70.l, A6" (enemy_walk_to_target_knife): its states, enemy_walk_to_target_knife_start,
# enemy_walk_to_target_step
04DF70  data  enemy_walk_to_target_knife_states
# 04DFA6 "lea $4dfb2.l, A6" (enemy_walk_to_side_knife): its states, enemy_walk_to_side_knife_start,
# enemy_walk_to_side_far_step, enemy_walk_to_side_far_hold
04DFB2  data  enemy_walk_to_side_knife_states
# 04DFE4 "lea $4dff0.l, A6" (enemy_circle_knife): its states, enemy_circle_knife_start, enemy_circle_knife_step
04DFF0  data  enemy_circle_knife_states
# 04E0A8 "lea $4e0b4.l, A6" (enemy_keep_distance_knife): its states, enemy_keep_distance_knife_start,
# enemy_keep_distance_knife_watch, enemy_keep_distance_knife_back_off, enemy_keep_distance_knife_close_in
04E0B4  data  enemy_keep_distance_knife_states
# 04E1B8 "lea $4e1c4.l, A6" (enemy_back_off_knife): its states, enemy_back_off_knife_start, enemy_back_off_knife_walk,
# enemy_back_off_knife_wait
04E1C4  data  enemy_back_off_knife_states
# 04E254 "lea $4e260.l, A6" (enemy_step_aside_knife): its states, enemy_step_aside_knife_start,
# enemy_step_aside_knife_step
04E260  data  enemy_step_aside_knife_states
# 04E2C4 "lea $4e2d0.l, A6" (enemy_spear_thrust): its states, enemy_spear_thrust_start, enemy_spear_thrust_end
04E2D0  data  enemy_spear_thrust_states
# 04E336 "lea $4e342.l, A6" (enemy_spear_throw): its states, enemy_spear_throw_start, enemy_spear_throw_release,
# enemy_spear_throw_end
04E342  data  enemy_spear_throw_states
# 04E3C4 "lea $4e3d0.l, A6" (enemy_knife_stab): its states, enemy_knife_stab_start, enemy_attack_end
04E3D0  data  enemy_knife_stab_states
# 04E400 "lea $4e40c.l, A6" (enemy_high_kick_knife): its states, enemy_high_kick_knife_start, enemy_attack_end
04E40C  data  enemy_high_kick_knife_states
# 04E43C "lea $4e448.l, A6" (enemy_jump_kick_knife): its states, enemy_jump_kick_knife_crouch,
# enemy_jump_kick_knife_leap, enemy_jump_kick_knife_fly, enemy_attack_end
04E448  data  enemy_jump_kick_knife_states
# 04E4F2 "lea $4e4fe.l, A6" (enemy_throw_knife): its states, enemy_throw_knife_start, enemy_throw_knife_release,
# enemy_throw_knife_end
04E4FE  data  enemy_throw_knife_states
# 04E566 "lea $4e572.l, A6" (enemy_flinch_back_spear): its states, enemy_flinch_back_spear_start, enemy_flinch_end
04E572  data  enemy_flinch_back_spear_states
# 04E58A "lea $4e596.l, A6" (enemy_flinch_bent_spear): its states, enemy_flinch_bent_spear_start, enemy_flinch_end
04E596  data  enemy_flinch_bent_spear_states
# 04E5AE "lea $4e5ba.l, A6" (enemy_flinch_reel_spear): its states, enemy_flinch_reel_spear_start, enemy_flinch_end
04E5BA  data  enemy_flinch_reel_spear_states
# 04E5D2 "lea $4e5de.l, A6" (enemy_flinch_hunched_spear): its states, enemy_flinch_hunched_spear_start,
# enemy_flinch_end
04E5DE  data  enemy_flinch_hunched_spear_states
# 04E5F6 "lea $4e602.l, A6" (enemy_flinch_back_knife): its states, enemy_flinch_back_knife_start, enemy_flinch_end
04E602  data  enemy_flinch_back_knife_states
# 04E61A "lea $4e626.l, A6" (enemy_flinch_bent_knife): its states, enemy_flinch_bent_knife_start, enemy_flinch_end
04E626  data  enemy_flinch_bent_knife_states
# 04E63E "lea $4e64a.l, A6" (enemy_flinch_reel_knife): its states, enemy_flinch_reel_knife_start, enemy_flinch_end
04E64A  data  enemy_flinch_reel_knife_states
# 04E662 "lea $4e66e.l, A6" (enemy_flinch_hunched_knife): its states, enemy_flinch_hunched_knife_start,
# enemy_flinch_end
04E66E  data  enemy_flinch_hunched_knife_states
# 04E7AE "lea $4e7ba.l, A6" (enemy_walk_to_target_gun): its states, enemy_walk_to_target_gun_start,
# enemy_walk_to_target_step
04E7BA  data  enemy_walk_to_target_gun_states
# 04E7F4 "lea $4e800.l, A6" (enemy_walk_to_side_gun): its states, enemy_walk_to_side_gun_start,
# enemy_walk_to_side_far_step, enemy_walk_to_side_far_hold
04E800  data  enemy_walk_to_side_gun_states
# 04E832 "lea $4e83e.l, A6" (enemy_walk_to_range_gun): its states, enemy_walk_to_range_gun_start,
# enemy_walk_to_range_step, enemy_walk_to_range_hold
04E83E  data  enemy_walk_to_range_gun_states
# 04E8FA "lea $4e906.l, A6" (enemy_back_off_gun): its states, enemy_back_off_gun_start, enemy_back_off_gun_walk,
# enemy_back_off_gun_wait
04E906  data  enemy_back_off_gun_states
# 04E992 "lea $4e99e.l, A6" (enemy_run_away_gun): its states, enemy_run_away_gun_start, enemy_run_away_gun_step
04E99E  data  enemy_run_away_gun_states
# 04EA06 "lea $4ea12.l, A6" (enemy_walk_to_target_axe): its states, enemy_walk_to_target_axe_start,
# enemy_walk_to_target_step
04EA12  data  enemy_walk_to_target_axe_states
# 04EA4C "lea $4ea58.l, A6" (enemy_walk_to_side_axe): its states, enemy_walk_to_side_axe_start,
# enemy_walk_to_side_far_step, enemy_walk_to_side_far_hold
04EA58  data  enemy_walk_to_side_axe_states
# 04EA8A "lea $4ea96.l, A6" (enemy_walk_to_range_axe): its states, enemy_walk_to_range_axe_start,
# enemy_walk_to_range_step, enemy_walk_to_range_hold
04EA96  data  enemy_walk_to_range_axe_states
# 04EAC8 "lea $4ead4.l, A6" (enemy_back_off_axe): its states, enemy_back_off_axe_start, enemy_back_off_axe_walk,
# enemy_back_off_axe_wait
04EAD4  data  enemy_back_off_axe_states
# 04EB62 "lea $4eb6e.l, A6" (enemy_run_away_axe): its states, enemy_run_away_axe_start, enemy_run_away_axe_step
04EB6E  data  enemy_run_away_axe_states
# 04EBD6 "lea $4ebe2.l, A6" (enemy_throw_axes): its states, enemy_throw_axes_start, enemy_throw_axes_release,
# enemy_attack_end
04EBE2  data  enemy_throw_axes_states
# 04EC5E "lea $4ec6a.l, A6" (enemy_high_kick_axe): its states, enemy_high_kick_axe_start, enemy_attack_end
04EC6A  data  enemy_high_kick_axe_states
# 04EC9A "lea $4eca6.l, A6" (enemy_gun_swing): its states, enemy_gun_swing_start, enemy_attack_end
04ECA6  data  enemy_gun_swing_states
# 04ECD6 "lea $4ece2.l, A6" (enemy_shoot_gun): its states, enemy_shoot_gun_start, enemy_shoot_gun_fire,
# enemy_attack_end
04ECE2  data  enemy_shoot_gun_states
# 04ED5E "lea $4ed6a.l, A6" (enemy_flinch_back_gun): its states, enemy_flinch_back_gun_start, enemy_flinch_end
04ED6A  data  enemy_flinch_back_gun_states
# 04ED82 "lea $4ed8e.l, A6" (enemy_flinch_bent_gun): its states, enemy_flinch_bent_gun_start, enemy_flinch_end
04ED8E  data  enemy_flinch_bent_gun_states
# 04EDA6 "lea $4edb2.l, A6" (enemy_flinch_back_axe): its states, enemy_flinch_back_axe_start, enemy_flinch_end
04EDB2  data  enemy_flinch_back_axe_states
# 04EDCA "lea $4edd6.l, A6" (enemy_flinch_bent_axe): its states, enemy_flinch_bent_axe_start, enemy_flinch_end
04EDD6  data  enemy_flinch_bent_axe_states
# 04EDEE "lea $4edfa.l, A6" (enemy_flinch_reel_axe): its states, enemy_flinch_reel_axe_start, enemy_flinch_end
04EDFA  data  enemy_flinch_reel_axe_states
# 04F076 "lea $4f082.l, A6" (enemy_throw_shuriken): its states, enemy_throw_shuriken_start,
# enemy_throw_shuriken_release, enemy_attack_end
04F082  data  enemy_throw_shuriken_states
# 04F0E4 "lea $4f0f0.l, A6" (enemy_boomerang_throw): its states, enemy_boomerang_throw_wind_up,
# enemy_boomerang_throw_aim, enemy_boomerang_throw_release, enemy_boomerang_throw_wait, enemy_attack_end
04F0F0  data  enemy_boomerang_throw_states
# 04F28A "lea $4f296.l, A6" (enemy_rocksteady_enter): its states, enemy_rocksteady_enter_wait,
# enemy_rocksteady_enter_taunt, enemy_rocksteady_enter_ready, enemy_rocksteady_enter_walk_in,
# enemy_rocksteady_enter_wait_for_signal, enemy_rocksteady_enter_walk_in_with_bebop
04F296  data  enemy_rocksteady_enter_states
# 04F722 "lea $4f72e.l, A6" (enemy_rocksteady_raise_fist): its states, enemy_rocksteady_raise_fist_start,
# enemy_rocksteady_pose_end
04F72E  data  enemy_rocksteady_raise_fist_states
# 04F750 "lea $4f75c.l, A6" (enemy_rocksteady_laugh): its states, enemy_rocksteady_laugh_start,
# enemy_rocksteady_hold_pose
04F75C  data  enemy_rocksteady_laugh_states
# 04F77E "lea $4f78a.l, A6" (enemy_rocksteady_shake_fist): its states, enemy_rocksteady_shake_fist_start,
# enemy_rocksteady_hold_pose
04F78A  data  enemy_rocksteady_shake_fist_states
# 04F7B2 "lea $4f7be.l, A6" (enemy_rocksteady_draw_gun): its states, enemy_rocksteady_draw_gun_start,
# enemy_rocksteady_pose_end
04F7BE  data  enemy_rocksteady_draw_gun_states
# 04F7EE "lea $4f7fa.l, A6" (enemy_rocksteady_put_gun_away): its states, enemy_rocksteady_put_gun_away_start,
# enemy_rocksteady_pose_end
04F7FA  data  enemy_rocksteady_put_gun_away_states
# 04F81C "lea $4f828.l, A6" (enemy_rocksteady_circle): its states, enemy_rocksteady_circle_start,
# enemy_rocksteady_circle_step
04F828  data  enemy_rocksteady_circle_states
# 04F89C "lea $4f8a8.l, A6" (enemy_rocksteady_line_up): its states, enemy_rocksteady_line_up_start,
# enemy_rocksteady_line_up_step
04F8A8  data  enemy_rocksteady_line_up_states
# 04F922 "lea $4f92e.l, A6" (enemy_rocksteady_close_in): its states, enemy_rocksteady_close_in_start,
# enemy_rocksteady_close_in_step
04F92E  data  enemy_rocksteady_close_in_states
# 04F9C0 "lea $4f9cc.l, A6" (enemy_rocksteady_shoot_around): its states, enemy_rocksteady_shoot_around_start,
# enemy_rocksteady_shoot_around_fire
04F9CC  data  enemy_rocksteady_shoot_around_states
# 04FA96 "lea $4face.l, A6" (enemy_rocksteady_pincer_charge): its states, enemy_rocksteady_pincer_charge_start,
# enemy_rocksteady_pincer_charge_run_to_edge, enemy_rocksteady_pincer_charge_wait_for_bebop,
# enemy_rocksteady_pincer_charge_get_ready, enemy_rocksteady_pincer_charge_run, enemy_rocksteady_pincer_charge_crash
04FACE  data  enemy_rocksteady_pincer_charge_states
# 04FC04 "lea $4fc10.l, A6" (enemy_rocksteady_charge): its states, enemy_rocksteady_charge_start,
# enemy_rocksteady_charge_get_ready, enemy_rocksteady_charge_run
04FC10  data  enemy_rocksteady_charge_states
# 04FCD4 "lea $4fce0.l, A6" (enemy_rocksteady_punch): its states, enemy_rocksteady_punch_start,
# enemy_rocksteady_blow_end
04FCE0  data  enemy_rocksteady_punch_states
# 04FD4C "lea $4fd58.l, A6" (enemy_rocksteady_gun_butt): its states, enemy_rocksteady_gun_butt_start,
# enemy_rocksteady_blow_end
04FD58  data  enemy_rocksteady_gun_butt_states
# 04FD88 "lea $4fd94.l, A6" (enemy_rocksteady_shoot): its states, enemy_rocksteady_shoot_start,
# enemy_rocksteady_shoot_fire (then a long that is no handler's: the table has two states)
04FD94  data  enemy_rocksteady_shoot_states
# 04FE42 "lea $4fe4e.l, A6" (enemy_rocksteady_flinch): its states, enemy_rocksteady_flinch_start,
# enemy_rocksteady_flinch_end
04FE4E  data  enemy_rocksteady_flinch_states
# 04FEAA "lea $4feb6.l, A6" (enemy_rocksteady_reel): its states, enemy_rocksteady_reel_start,
# enemy_rocksteady_flinch_end
04FEB6  data  enemy_rocksteady_reel_states
# 04FEE2 "lea $4feee.l, A6" (enemy_rocksteady_flinch_from_behind): its states,
# enemy_rocksteady_flinch_from_behind_start, enemy_rocksteady_flinch_end
04FEEE  data  enemy_rocksteady_flinch_from_behind_states
# 04FF1A "lea $4ff26.l, A6" (enemy_rocksteady_knocked_down): its states, enemy_rocksteady_knocked_down_start,
# enemy_rocksteady_knocked_down_fall, enemy_rocksteady_knocked_down_slide, enemy_rocksteady_knocked_down_lie,
# enemy_rocksteady_knocked_down_get_up
04FF26  data  enemy_rocksteady_knocked_down_states
# 050076 "lea $50082.l, A6" (enemy_rocksteady_defeated): its states, enemy_rocksteady_defeated_start,
# enemy_rocksteady_defeated_fall, enemy_rocksteady_defeated_slide, enemy_rocksteady_defeated_blink
050082  data  enemy_rocksteady_defeated_states
# 05027A "lea $50286.l, A6" (enemy_bebop_enter): its states, enemy_bebop_enter_wait_for_scroll,
# enemy_bebop_enter_wait, enemy_bebop_enter_drop, enemy_bebop_enter_jump, enemy_bebop_enter_in_air,
# enemy_bebop_enter_ready, enemy_bebop_enter_wait_for_signal, enemy_bebop_enter_walk_in
050286  data  enemy_bebop_enter_states
# 05067E "lea $5068a.l, A6" (enemy_bebop_stand): its states, enemy_bebop_stand_start, enemy_bebop_stand_wait
05068A  data  enemy_bebop_stand_states
# 0506D8 "lea $506e4.l, A6" (enemy_bebop_walk_to_front): its states, enemy_bebop_walk_to_front_start,
# enemy_bebop_walk_to_front_step
0506E4  data  enemy_bebop_walk_to_front_states
# 050770 "lea $5077c.l, A6" (enemy_bebop_walk_level): its states, enemy_bebop_walk_start, enemy_bebop_walk_level_step
05077C  data  enemy_bebop_walk_level_states
# 0507EE "lea $507fa.l, A6" (enemy_bebop_close_in): its states, enemy_bebop_walk_start, enemy_bebop_close_in_step
0507FA  data  enemy_bebop_close_in_states
# 0508A0 "lea $508d8.l, A6" (enemy_bebop_pincer_charge): its states, enemy_bebop_pincer_charge_start,
# enemy_bebop_pincer_charge_run_to_edge, enemy_bebop_pincer_charge_wait_for_rocksteady,
# enemy_bebop_pincer_charge_get_ready, enemy_bebop_pincer_charge_run, enemy_bebop_pincer_charge_crash
0508D8  data  enemy_bebop_pincer_charge_states
# 050ADC "lea $50ae8.l, A6" (enemy_bebop_punch): its states, enemy_bebop_punch_start, enemy_bebop_punch_end
050AE8  data  enemy_bebop_punch_states
# 050B8C "lea $50b98.l, A6" (enemy_bebop_charge): its states, enemy_bebop_charge_start, enemy_bebop_charge_get_ready,
# enemy_bebop_charge_run
050B98  data  enemy_bebop_charge_states
# 050C68 "lea $50c74.l, A6" (enemy_bebop_shoot): its states, enemy_bebop_shoot_start, enemy_bebop_shoot_fire
050C74  data  enemy_bebop_shoot_states
# 050CE6 "lea $50cf2.l, A6" (enemy_bebop_flinch): its states, enemy_bebop_flinch_start, enemy_bebop_strike_back
050CF2  data  enemy_bebop_flinch_states
# 050D2C "lea $50d38.l, A6" (enemy_bebop_flinch_from_behind): its states, enemy_bebop_flinch_from_behind_start,
# enemy_bebop_flinch_from_behind_end
050D38  data  enemy_bebop_flinch_from_behind_states
# 050D78 "lea $50d84.l, A6" (enemy_bebop_knocked_down): its states, enemy_bebop_knocked_down_start,
# enemy_bebop_knocked_down_fall, enemy_bebop_knocked_down_slide, enemy_bebop_knocked_down_lie, enemy_bebop_strike_back
050D84  data  enemy_bebop_knocked_down_states
# 050E66 "lea $50e72.l, A6" (enemy_bebop_defeated): its states, enemy_bebop_defeated_start, enemy_bebop_defeated_fall,
# enemy_bebop_defeated_slide, enemy_bebop_defeated_blink
050E72  data  enemy_bebop_defeated_states
# 051002 "lea $5100e.l, A6" (enemy_mouser_enter): its states, enemy_mouser_enter_start, enemy_mouser_enter_hop,
# enemy_mouser_enter_fall, enemy_mouser_enter_land
05100E  data  enemy_mouser_enter_states
# 051334 "lea $51340.l, A6" (enemy_mouser_bite): its states, enemy_mouser_bite_start, enemy_mouser_bite_fly,
# enemy_mouser_bite_land, enemy_mouser_bite_hold
051340  data  enemy_mouser_bite_states
# 051750 "lea $5175c.l, A6" (enemy_mouser_chase): its states, enemy_mouser_chase_start, enemy_mouser_chase_run,
# enemy_mouser_chase_pause, enemy_mouser_chase_wait
05175C  data  enemy_mouser_chase_states
# 05182A "lea $51836.l, A6" (enemy_mouser_creep_to_side): its states, enemy_mouser_creep_to_side_start,
# enemy_mouser_creep_to_side_step
051836  data  enemy_mouser_creep_to_side_states
# 0518B0 "lea $518bc.l, A6" (enemy_mouser_back_off): its states, enemy_mouser_back_off_start,
# enemy_mouser_back_off_run, enemy_mouser_sit, enemy_mouser_back_off_wait
0518BC  data  enemy_mouser_back_off_states
# 051968 "lea $51974.l, A6" (enemy_mouser_thrown_off): its states, enemy_mouser_thrown_off_start,
# enemy_mouser_fly_and_crash, enemy_mouser_remove
051974  data  enemy_mouser_thrown_off_states
# 0519C0 "lea $519cc.l, A6" (enemy_mouser_break_down): its states, enemy_mouser_break_down_start,
# enemy_mouser_fly_and_crash, enemy_mouser_remove
0519CC  data  enemy_mouser_break_down_states
# 051A08 "lea $51a14.l, A6" (enemy_mouser_knocked_flying): its states, enemy_mouser_knocked_flying_start,
# enemy_mouser_fly_and_crash, enemy_mouser_remove
051A14  data  enemy_mouser_knocked_flying_states
# 051CAC "lea $51cb8.l, A6" (enemy_rodney_enter): its states, enemy_rodney_enter_wait, enemy_rodney_enter_burst_out,
# enemy_rodney_enter_fall, enemy_rodney_enter_land
051CB8  data  enemy_rodney_enter_states
# 051FF6 "lea $52002.l, A6" (enemy_rodney_rush): its states, enemy_rodney_rush_start, enemy_rodney_rush_run,
# enemy_rodney_brake
052002  data  enemy_rodney_rush_states
# 052136 "lea $52142.l, A6" (enemy_rodney_rush_across): its states, enemy_rodney_rush_across_start,
# enemy_rodney_rush_across_run, enemy_rodney_brake
052142  data  enemy_rodney_rush_across_states
# 052228 "lea $52234.l, A6" (enemy_rodney_back_off): its states, enemy_rodney_back_off_start,
# enemy_rodney_slide_to_stop, enemy_rodney_back_off_turn, enemy_rodney_back_off_wait
052234  data  enemy_rodney_back_off_states
# 052306 "lea $52312.l, A6" (enemy_rodney_shoot): its states, enemy_rodney_shoot_start, enemy_rodney_slide_to_stop,
# enemy_rodney_shoot_turn, enemy_rodney_shoot_ready, enemy_rodney_shoot_fire, enemy_rodney_shoot_end
052312  data  enemy_rodney_shoot_states
# 052422 "lea $5242e.l, A6" (enemy_rodney_whip): its states, enemy_rodney_whip_start, enemy_rodney_whip_slow_down,
# enemy_rodney_whip_wind_up, enemy_rodney_whip_throw_arm, enemy_rodney_whip_reach, enemy_rodney_whip_lash,
# enemy_rodney_whip_retract
05242E  data  enemy_rodney_whip_states
# 052600 "lea $5260c.l, A6" (enemy_rodney_knocked_back): its states, enemy_rodney_knocked_back_start,
# enemy_rodney_knocked_back_fall, enemy_rodney_knocked_back_end
05260C  data  enemy_rodney_knocked_back_states
# 0526A4 "lea $526b0.l, A6" (enemy_rodney_destroyed): its states, enemy_rodney_destroyed_start,
# enemy_rodney_destroyed_fall, enemy_rodney_destroyed_land, enemy_rodney_destroyed_end
0526B0  data  enemy_rodney_destroyed_states
# 052C96 "lea $52ca2.l, A6" (enemy_shredder_appear): its states, enemy_shredder_appear_wait,
# enemy_shredder_appear_step_out, enemy_shredder_appear_walk_in
052CA2  data  enemy_shredder_appear_states
# 052D46 "lea $52d52.l, A6" (enemy_shredder_split): its states, enemy_shredder_split_start, enemy_shredder_split_blink
052D52  data  enemy_shredder_split_states
# 052DD0 "lea $52ddc.l, A6" (enemy_shredder_clone_appear): its states, enemy_shredder_clone_appear_start,
# enemy_shredder_clone_appear_blink
052DDC  data  enemy_shredder_clone_appear_states
# 052E54 "lea $52e60.l, A6" (enemy_shredder_walk_to_side): its states, enemy_shredder_walk_to_side_start,
# enemy_shredder_walk_to_side_step, enemy_shredder_walk_to_side_crouch, enemy_shredder_walk_to_side_turn,
# enemy_shredder_walk_to_side_hold
052E60  data  enemy_shredder_walk_to_side_states
# 052FD8 "lea $52fe4.l, A6" (enemy_shredder_walk_to_target): its states, enemy_shredder_walk_to_target_start,
# enemy_shredder_walk_to_target_step
052FE4  data  enemy_shredder_walk_to_target_states
# 053070 "lea $5307c.l, A6" (enemy_shredder_guard): its states, enemy_shredder_guard_start,
# enemy_shredder_guard_counter
05307C  data  enemy_shredder_guard_states
# 0530EA "lea $530f6.l, A6" (enemy_shredder_back_off): its states, enemy_shredder_back_off_start,
# enemy_shredder_back_off_walk, enemy_shredder_back_off_wait
0530F6  data  enemy_shredder_back_off_states
# 0531AE "lea $531ba.l, A6" (enemy_shredder_lose_bar): its states, enemy_shredder_lose_bar_start,
# enemy_shredder_lose_bar_end
0531BA  data  enemy_shredder_lose_bar_states
# 053242 "lea $5324e.l, A6" (enemy_shredder_flinch): its states, enemy_shredder_flinch_start,
# enemy_shredder_flinch_end
05324E  data  enemy_shredder_flinch_states
# 0532D4 "lea $532e0.l, A6" (enemy_shredder_flinch_from_behind): its states, enemy_shredder_flinch_from_behind_start,
# enemy_shredder_flinch_end
0532E0  data  enemy_shredder_flinch_from_behind_states
# 05333C "lea $53348.l, A6" (enemy_shredder_defeated): its states, enemy_shredder_defeated_start,
# enemy_shredder_defeated_fall, enemy_shredder_defeated_land, enemy_shredder_defeated_wait,
# enemy_shredder_defeated_stay
053348  data  enemy_shredder_defeated_states
# 053440 "lea $5344c.l, A6" (enemy_shredder_vanish): its states, enemy_shredder_vanish_start,
# enemy_shredder_vanish_wait, enemy_shredder_vanish_blink
05344C  data  enemy_shredder_vanish_states
# 0534C4 "lea $534d0.l, A6" (enemy_shredder_kick): its states, enemy_shredder_kick_start, enemy_shredder_blow_end
0534D0  data  enemy_shredder_kick_states
# 053524 "lea $53530.l, A6" (enemy_shredder_thrust): its states, enemy_shredder_thrust_start, enemy_shredder_blow_end
053530  data  enemy_shredder_thrust_states
# 05356E "lea $5357a.l, A6" (enemy_shredder_slash): its states, enemy_shredder_slash_start, enemy_shredder_blow_end
05357A  data  enemy_shredder_slash_states
# 0535B8 "lea $535c4.l, A6" (enemy_shredder_sweep): its states, enemy_shredder_sweep_start, enemy_shredder_blow_end
0535C4  data  enemy_shredder_sweep_states
# 053602 "lea $5360e.l, A6" (enemy_shredder_ray): its states, enemy_shredder_ray_start, enemy_shredder_ray_line_up,
# enemy_shredder_ray_charge, enemy_shredder_ray_fire, enemy_shredder_ray_end
05360E  data  enemy_shredder_ray_states

# ---- the tables of handlers the C switches on, by their index (src/table.c's registry; batch 8c) ----
# 0013B6 "lea $13de.l, A0" (reset): the main loop's jobs, by the job of the queue's slot: clear_layers_job,
# print_game_text, set_text_colour, set_spare_text_colour, add_point, clear_scores, draw_score_labels,
# job_none_before_clear_layers, job_none_after_print_colour_text, draw_tile_picture, job_none_after_draw_tile_picture,
# draw_player_boxes, print_stage_title, draw_player_message, print_demo_text, print_tall_text, print_test_text,
# sum_mask_roms
0013DE  data  job_handlers
# 002662 "lea $2678.l, A5" (draw_player_message): a player's message in the HUD, by the message: message_insert_coin,
# message_press_start, message_out_of_lives, message_clear
002678  data  player_message_handlers
# 003E38 "lea $3e60.l, A0" (vblank_interrupt): the game's state: the start, the attract mode, the game, the test mode:
# run_startup, run_attract, run_game, run_test_mode
003E60  data  game_state_handlers
# 003F82 "lea $3f8e.l, A0" (run_startup): the start's steps: startup_begin, startup_wait, startup_end
003F8E  data  startup_steps
# 0040BE "lea $4100.l, A0" (run_attract): the attract mode's steps: attract_begin, attract_coin_screen,
# attract_opening, attract_title, attract_demo, attract_profile, attract_best_players, attract_spare_step, attract_end
004100  data  attract_steps
# 00412E "lea $413a.l, A0" (run_game): the game's scenes: scene_new_game, scene_choose_turtles, scene_area_setup,
# scene_area_title, scene_play, scene_area_exit, scene_ending, scene_continue, scene_ranking
00413A  data  game_scene_handlers
# 0092EA "lea $9310.l, A0" (run_palette_requests): a request's kind (then, from 009334, the kinds' second halves):
# palette_request_none, palette_request_area, palette_request_set, palette_request_list, palette_request_palette,
# palette_request_colours, palette_request_black, palette_request_spare, palette_request_area_second_half,
# palette_request_set_second_half, palette_request_list_second_half, palette_request_black_second_half
009310  data  palette_request_handlers
# 0092A2 "lea $9334.l, A0" (run_palette_requests): the sprites' second half of a request, by its kind: the second half
# of 009310's table, which the code loads on its own
009334  data  palette_request_second_halves
# 0099C4 "lea $99f0.l, A5" (stop_palette_effects): the layer of a running palette effect: its stop:
# stop_fixed_layer_effect, stop_layer_a_effect, stop_layer_b_effect, stop_sprite_effect
0099F0  data  palette_effect_stops
# 009C18 "lea $9c30.l, A2" (palette_editor): the editor's state: its start, then every frame: palette_editor_start,
# palette_editor_frame
009C30  data  palette_editor_states
# 00DF7E "lea $df92.l, A6" (krang_appear): Krang's appearance, by the state: krang_appear_setup, krang_appear_wait,
# krang_appear_end
00DF92  data  krang_appear_states
# 00E06E "lea $e082.l, A6" (krang_walk): Krang's walk, by the state: krang_walk_at_target, krang_walk_on,
# krang_charge, krang_pose_end
00E082  data  krang_walk_states
# 00E128 "lea $e13c.l, A6" (krang_melee): Krang's kick and punch, by the state: krang_kick_end, krang_punch_throw,
# krang_punch_wait
00E13C  data  krang_melee_states
# 00E1AC "lea $e1c0.l, A6" (krang_fire_lasers): Krang's lasers, by the state: krang_lasers_fire, krang_lasers_wait,
# krang_lasers_end
00E1C0  data  krang_lasers_states
# 00E2DC "lea $e2f0.l, A6" (krang_explode): Krang's explosion, by the state: krang_explode_start, krang_explode_wait,
# krang_explode_burst, krang_explode_next
00E2F0  data  krang_explode_states
# 00E39C "lea $e3b0.l, A6" (krang_escape): Krang's escape, by the state: krang_escape_start, krang_escape_wait,
# krang_escape_dip, krang_escape_fly, krang_gone
00E3B0  data  krang_escape_states
# 00E538 "lea $e546.l, A6" (krang_next_move): Krang's attack with a turtle in front of him, picked at random of 8:
# krang_start_lasers, krang_start_lasers_far, krang_start_punch, krang_start_pose
00E546  data  krang_attacks_in_front
# 00E574 "lea $e582.l, A6" (krang_walk): Krang's attack with a turtle close by, picked at random of 2 (the pose after
# them no roll gives): krang_start_kick, krang_start_lasers_steep, krang_start_pose
00E582  data  krang_attacks_close_by
# 010602 "lea $10616.l, A6" (turret_wreck): a wrecked turret, by the state: turret_wreck_explode, turret_wreck_next,
# turret_wreck_stay
010616  data  turret_wreck_states
# 010B6A "lea $10b7e.l, A6" (freeze_nozzle_spray): a freezing nozzle's spray, by the state: freeze_nozzle_spray_start,
# freeze_nozzle_spray_stop
010B7E  data  freeze_nozzle_spray_states
# 01154E "lea $11562.l, A6" (rock_soldier_site_enter): the building site's rock soldier coming in, by the state:
# rock_soldier_site_start, rock_soldier_site_enter_wait_for_scroll, rock_soldier_site_enter_wait,
# rock_soldier_site_enter_drop, rock_soldier_site_enter_land
011562  data  rock_soldier_site_enter_states
# 011746 "lea $11782.l, A6" (rock_soldier_site_think): the building site's rock soldier's moves, by the state
011782  data  rock_soldier_site_states
# 0119DE "lea $119f2.l, A6" (rock_soldier_defeated): a rock soldier beaten, by the state: rock_soldier_defeated_start,
# rock_soldier_defeated_wait, rock_soldier_defeated_explode, rock_soldier_defeated_next_explosion,
# rock_soldier_defeated_crumble, rock_soldier_defeated_stay
0119F2  data  rock_soldier_defeated_states
# 012198 "lea $121ac.l, A6" (rock_soldier_technodrome_enter): the Technodrome's rock soldier coming in, by the state:
# rock_soldier_technodrome_start, rock_soldier_technodrome_enter_wait_for_scroll, rock_soldier_technodrome_enter_wait,
# rock_soldier_technodrome_enter_appear
0121AC  data  rock_soldier_technodrome_enter_states
# 012324 "lea $12360.l, A6" (rock_soldier_technodrome_think): the Technodrome's rock soldier's moves, by the state
012360  data  rock_soldier_technodrome_states
# 0134B6 "lea $134ca.l, A6" (flying_drone_enter): a flying drone coming in, by the state: flying_drone_start,
# flying_drone_wait, flying_drone_take_off, flying_drone_ready
0134CA  data  flying_drone_enter_states
# 013C32 "lea $13c46.l, A6" (stockman_enter): Baxter Stockman coming in, by the state: stockman_start,
# stockman_wait_for_last_enemy, stockman_wait, stockman_fly_in
013C46  data  stockman_enter_states
# 013EF4 "lea $13f08.l, A6" (stockman_defeated): Baxter Stockman beaten, by the state: stockman_defeated_explode,
# stockman_defeated_next_explosion, stockman_defeated_vanish
013F08  data  stockman_defeated_states
# 019D3E "lea $19d54.l, A6" (turtle_place_at_start): how a turtle starts an area, by the area: placed, falling in,
# jumping in: turtle_place_at_start, turtle_start_fall_in, turtle_jump_in_start
019D54  data  area_turtle_starts
# 019F54 "lea $19f92.l, A6" (run_area_entry): the area's entry, by the area: area_entry_standing, area_entry_fall_in,
# area_entry_jump_in
019F92  data  area_entry_handlers
# 019FD2 "lea $19fde.l, A6" (area_entry_fall_in): the entry falling in, by the step: start_fall_in_entry,
# turtle_fall_in
019FDE  data  fall_in_entry_states
# 01A142 "lea $1a14e.l, A6" (area_entry_jump_in): the entry jumping in, by the step: start_jump_in_entry,
# turtle_jump_in_step
01A14E  data  jump_in_entry_states
# 01A880 "lea $1a88c.l, A6" (check_area_cleared): the check for the end of the area, by the area:
# check_cleared_building, check_cleared_apartment, check_cleared_street, check_cleared_sewer,
# check_cleared_car_street, check_cleared_highway, check_cleared_skateboard, check_cleared_building_site,
# check_cleared_technodrome, check_cleared_final
01A88C  data  area_cleared_checks
# 01AC8E "lea $1ac9a.l, A5" (turtle_check_walls): the walls a turtle runs into, by the direction it moves:
# turtle_walls_still, turtle_walls_left, turtle_walls_right, turtle_walls_down, turtle_walls_up, turtle_walls_up_left,
# turtle_walls_up_right, turtle_walls_down_left, turtle_walls_down_right
01AC9A  data  turtle_wall_checks
# 01B708 "lea $1b714.l, A6" (turtle_control): a turtle's routine: standing, walking, jumping, attacking, hit, the gun:
# turtle_stand, turtle_walk, turtle_jump, turtle_attack, turtle_hit, turtle_fire_gun
01B714  data  turtle_actions
# 01BA7C "lea $1ba88.l, A6" (turtle_jump): a turtle's jump, by the state: turtle_jump_rise, turtle_jump_top,
# turtle_jump_fall, turtle_wall_jump
01BA88  data  turtle_jump_states
# 01C228 "lea $1c272.l, A6" (turtle_hit): a hit turtle's reaction, by the hit's kind: turtle_hit_wait,
# turtle_knocked_down, turtle_knocked_back, turtle_knocked_flying, turtle_knocked_flying_from_behind, turtle_frozen,
# turtle_shocked, turtle_fall_in_manhole, turtle_held, turtle_held_knock_off, turtle_held_throw_off,
# turtle_refill_health, turtle_held_briefly, turtle_hit_fly, turtle_hit_by_shredder_ray, turtle_walk_off_screen
01C272  data  turtle_hit_handlers
# 01C66C "lea $1c678.l, A6" (turtle_knocked_down): a turtle knocked down, by the state: turtle_knocked_down_fly,
# turtle_knocked_down_slide, turtle_knocked_down_lie
01C678  data  turtle_knocked_down_states
# 01C7C4 "lea $1c7d0.l, A6" (turtle_knocked_back): a turtle knocked back, by the state: turtle_knocked_back_start,
# turtle_knocked_back_slide, turtle_knocked_back_lie
01C7D0  data  turtle_knocked_back_states
# 01C8EC "lea $1c8f8.l, A6" (turtle_knocked_flying): a turtle knocked flying, by the state: turtle_knocked_flying_fly,
# turtle_knocked_flying_slide, turtle_knocked_flying_lie
01C8F8  data  turtle_knocked_flying_states
# 01CAB6 "lea $1cac2.l, A6" (turtle_knocked_flying_from_behind): a turtle knocked flying from behind, by the state:
# turtle_knocked_flying_from_behind_fly, turtle_knocked_flying_from_behind_slide,
# turtle_knocked_flying_from_behind_lie
01CAC2  data  turtle_knocked_flying_from_behind_states
# 01CC9E "lea $1ccaa.l, A6" (turtle_frozen): a frozen turtle, by the state: turtle_frozen_start, turtle_frozen_in_ice,
# turtle_frozen_thaw, turtle_frozen_countdown
01CCAA  data  turtle_frozen_states
# 01CD38 "lea $1cd44.l, A6" (turtle_shocked): a shocked turtle, by the state: turtle_shocked_start,
# turtle_shocked_drop, turtle_hit_countdown
01CD44  data  turtle_shocked_states
# 01CDB0 "lea $1cdbc.l, A6" (turtle_fall_in_manhole): a turtle in a manhole, by the state:
# turtle_fall_in_manhole_start, turtle_fall_in_manhole_climb_out
01CDBC  data  turtle_fall_in_manhole_states
# 01CE46 "lea $1ce52.l, A6" (turtle_held): a held turtle, by the state: turtle_held_struggle, turtle_hit_countdown
01CE52  data  turtle_held_states
# 01CF42 "lea $1cf4e.l, A6" (turtle_held_briefly): a turtle held briefly, by the state: turtle_held_briefly_struggle,
# turtle_hit_countdown
01CF4E  data  turtle_held_briefly_states
# 01D01C "lea $1d028.l, A6" (turtle_held_knock_off): a held turtle that knocks its holder off, by the state:
# turtle_held_knock_off_struggle, turtle_hit_countdown
01D028  data  turtle_held_knock_off_states
# 01D0F4 "lea $1d100.l, A6" (turtle_held_throw_off): a held turtle that throws its holder off, by the state:
# turtle_held_throw_off_struggle, turtle_hit_countdown
01D100  data  turtle_held_throw_off_states
# 01E2C8 "lea $1e2da.l, A6" (start_area_layers): the layers' start, by the area: start_layers_building,
# start_layers_apartment, start_layers_street, start_layers_sewer, start_layers_car_street, start_layers_highway,
# start_layers_skateboard, start_layers_building_site, start_layers_technodrome, start_layers_final
01E2DA  data  area_layer_starts
# 01EBF6 "lea $1ecec.l, A6" (update_area_layers): the layers' frame, by the area: update_layers_building,
# update_layers_apartment, update_layers_street, update_layers_sewer, update_layers_car_street, update_layers_highway,
# update_layers_skateboard, update_layers_building_site, update_layers_technodrome, update_layers_final
01ECEC  data  area_layer_updates
# 01F42A "lea $1f43a.l, A6" (update_layers_technodrome): the Technodrome's lift, by the step: technodrome_reach_lift,
# technodrome_ride_lift, technodrome_leave_lift
01F43A  data  technodrome_lift_steps
# 01F81C "lea $1f82c.l, A6" (update_layers_highway): the highway's cars, by the step: highway_first_car,
# highway_first_car_drive, highway_second_car, highway_second_car_drive, highway_third_car, highway_third_car_drive,
# highway_cars_over
01F82C  data  highway_car_steps
# 01FC54 "lea $1fc96.l, A6" (update_layers_skateboard): the skateboard ride's road, by the step:
# skateboard_road_first_loop, skateboard_road_to_second_loop, skateboard_road_second_loop,
# skateboard_road_to_third_loop, skateboard_road_third_loop, skateboard_road_last_loop
01FC96  data  skateboard_road_steps
# 02B2BA "lea $2b2c6.l, A6" (turtle_start_area_exit): a turtle's exit's start, by the area:
# turtle_exit_building_start, turtle_exit_apartment_start, turtle_exit_street_start, turtle_exit_sewer_start,
# turtle_exit_car_street_start, turtle_exit_highway_start, exit_skateboard_start, turtle_exit_building_site_start,
# turtle_exit_technodrome_start, turtle_exit_final_start
02B2C6  data  area_exit_starts
# 02B61E "lea $2b62a.l, A6" (run_area_exit): the area's exit, by the area: turtle_exit_building, run_exit_apartment,
# turtle_exit_street, run_exit_sewer, run_exit_car_street, turtle_exit_highway, run_exit_skateboard,
# run_exit_building_site, turtle_exit_technodrome, run_exit_final
02B62A  data  area_exit_handlers
# 02B70C "lea $2b728.l, A6" (run_exit_apartment): the apartment's exit, by the step: exit_apartment_shredder_appears,
# exit_apartment_shredder_takes_april, exit_apartment_shredder_leaps, exit_apartment_shredder_escapes,
# exit_apartment_kidnap_picture, exit_apartment_picture_wait
02B728  data  exit_apartment_steps
# 02BAE0 "lea $2bb16.l, A6" (turtle_exit_street): a turtle's exit from the street, by the step:
# turtle_exit_street_walk, turtle_exit_street_jump, turtle_exit_street_vanish
02BB16  data  turtle_exit_street_steps
# 02BC86 "lea $2bc98.l, A6" (run_exit_sewer): the sewer's exit, by the step: turtle_exit_sewer,
# exit_sewer_villains_picture, exit_sewer_villains_taunt
02BC98  data  exit_sewer_steps
# 02BCC0 "lea $2bd44.l, A6" (turtle_exit_sewer): a turtle's exit from the sewer, by the step: turtle_exit_sewer_walk,
# turtle_exit_sewer_jump
02BD44  data  turtle_exit_sewer_steps
# 02BEF4 "lea $2bf10.l, A6" (run_exit_car_street): the car street's exit, by the step: turtle_exit_car_street,
# exit_car_street_van_start_up, exit_car_street_van_drives_off, exit_car_street_april_hug_start,
# exit_car_street_april_hug
02BF10  data  exit_car_street_steps
# 02BF5A "lea $2c04c.l, A6" (turtle_exit_car_street): a turtle's exit from the car street, by the step:
# turtle_exit_car_street_wait, turtle_exit_car_street_board, turtle_exit_car_street_jump
02C04C  data  turtle_exit_car_street_steps
# 02C8E6 "lea $2c93a.l, A6" (run_exit_skateboard): the skateboard ride's exit, by the step:
# turtle_exit_skateboard_gather, turtle_exit_skateboard_board, exit_skateboard_van_door, exit_skateboard_van_drives,
# exit_skateboard_crash_picture, finish_area_exit
02C93A  data  exit_skateboard_steps
# 02CE7C "lea $2ce8e.l, A6" (run_exit_building_site): the building site's exit, by the step:
# exit_building_site_free_splinter, turtle_exit_building_site_walk, turtle_exit_building_site_jump,
# exit_building_site_splinter_picture, exit_building_site_splinter_thanks, turtle_exit_building_site_drop,
# turtle_exit_building_site_land, turtle_exit_building_site_wait, turtle_exit_building_site_rise,
# turtle_exit_building_site_leave
02CE8E  data  exit_building_site_steps
# 02D60A "lea $2d616.l, A6" (run_exit_final): the last area's exit, by the step: turtle_exit_final_walk,
# exit_final_shake
02D616  data  exit_final_steps
# 02F646 "lea $2f654.l, A6" (hold_scroll_for_enemies): the scroll held for the enemies, by the area:
# hold_scroll_building, hold_scroll_apartment, hold_scroll_street, hold_scroll_sewer, hold_scroll_car_street,
# hold_scroll_highway, hold_scroll_skateboard, hold_scroll_building_site, hold_scroll_technodrome, hold_scroll_final
02F654  data  area_scroll_holds
# 02F8B4 "lea $2f8c6.l, A6" (run_opening): the opening's steps: opening_city_fade_in, opening_sweep,
# opening_sweep_fast, opening_sweep_to_street, opening_turtles_ready, opening_turtles_leap_out,
# opening_portraits_start, opening_portraits_slide_in, opening_hold
02F8C6  data  opening_steps
# 0303D8 "lea $303ee.l, A6" (run_drill_arrival): the drill pod's arrival, by the step: drill_arrival_wait,
# drill_arrival_rumble, drill_arrival_descend, drill_arrival_open, drill_arrival_end
0303EE  data  drill_arrival_steps
# 030984 "lea $30996.l, A6" (run_intro): the story before area 0, by the step: intro_rooftop_start, intro_rooftop,
# intro_climb_start, intro_climb, intro_roof_start, intro_roof_land
030996  data  intro_steps

# ---- the animations and tables of animations the C named after their address (batch 8c) ----
# 03062A "lea $2d796.l, A6" (shake_layers_and_objects): the animation drill_arrival_rumble sets: the ceiling shaking
# as the drill comes
02D796  data  drill_arrival_rumble_animation
# 02BEC4 "lea $2e192.l, A6" (exit_sewer_villains_taunt): the animation exit_sewer_villains_taunt sets
02E192  data  exit_sewer_villains_taunt_animation
# 0495F4 "lea $49258.l, A5" (enemy_walk_to_target_start); 049682 "lea $49258.l, A5" (enemy_walk_to_side_start); 04972E
# "lea $49258.l, A5" (enemy_walk_to_side_turn) and 8 more: the plain Foot soldier's walk: the animation facing the way
# he goes and the one for turning (enemy_walk.animations)
049258  data  enemy_walk_animations
# 049382 "lea $49358.l, A6" (enemy_circle_start); 0493F0 "lea $49358.l, A6" (enemy_circle_step); 0497B0
# "lea $49358.l, A6" (enemy_keep_distance_start) and 1 more: the plain Foot soldier's run by direction, eight of them:
# frames of enemy_run_animation (circling and keeping his distance)
049358  data  enemy_run_animations
# 04A808 "lea $4a7e6.l, A6" (scenery_lamp_start): the animation scenery_lamp_start sets: the lamp
04A7E6  data  scenery_lamp_start_animation
# 04A84A "lea $4a81e.l, A6" (scenery_open_manhole_start): the animation scenery_open_manhole_start sets: the open
# manhole
04A81E  data  scenery_open_manhole_start_animation
# 04A890 "lea $4a86e.l, A6" (scenery_chair_start): the animation scenery_chair_start sets: the chair
04A86E  data  scenery_chair_start_animation
# 04A990 "lea $4a95c.l, A6" (foot_car_start): the animation foot_car_start sets: the Foot's car
04A95C  data  foot_car_start_animation
# 04AA9E "lea $4a9da.l, A6" (falling_debris_start): the animation falling_debris_start sets: the debris falling
04A9DA  data  falling_debris_start_animation
# 04ADDE "lea $4adc0.l, A5" (enemy_walk_to_target_sword_start); 04AE22 "lea $4adc0.l, A5"
# (enemy_walk_to_side_sword_start); 04AE68 "lea $4adc0.l, A5" (enemy_walk_to_side_sword_turn) and 6 more: the sword
# soldier's walk: the animation facing the way he goes and the one for turning (enemy_walk.animations)
04ADC0  data  sword_soldier_walk_animations
# 04B064 "lea $4b046.l, A5" (enemy_walk_to_target_hammer_start); 04B0A0 "lea $4b046.l, A5"
# (enemy_walk_to_side_hammer_start); 04B15A "lea $4b046.l, A5" (enemy_stalk_hammer_start) and 5 more: the hammer
# soldier's walk: the animation facing the way he goes and the one for turning (enemy_walk.animations)
04B046  data  hammer_soldier_walk_animations
# 04C4F0 "lea $4c410.l, A6" (kicked_door_start): the animation kicked_door_start sets: the closed door
04C410  data  kicked_door_start_animation
# 04C70A "lea $4c65e.l, A6" (elevator_start): the animation elevator_start sets: the closed elevator
04C65E  data  elevator_start_animation
# 04C834 "lea $4c7b2.l, A6" (enemy_step_out_start); 04C852 "lea $4c7b2.l, A6" (enemy_step_out_wait): the animation
# enemy_step_out_start and enemy_step_out_wait set
04C7B2  data  enemy_step_out_animation
# right before it, after enemy_step_out's table of routines (04C79C-04C7A7): a still (its first byte 0) of the same
# picture as that animation's first frame (sprites 04C7F4), which no code starts (no lea names 04C7A8)
04C7A8  data  unused_enemy_step_out_still
# 04CC68 "lea $4cafe.l, A6" (window_soldier_drop_jump_out): the animation window_soldier_drop_jump_out sets
04CAFE  data  window_soldier_drop_jump_out_animation
# 04CDF8 "lea $4cd10.l, A6" (window_soldier_dive_wait): the animation window_soldier_dive_wait sets
04CD10  data  window_soldier_dive_wait_animation
# 04CED0 "lea $4ce5a.l, A6" (glass_shards_start): the animation glass_shards_start sets: the window's glass flying
04CE5A  data  glass_shards_start_animation
# 0490DA "lea $4cf3e.l, A6" (enemy_hop_up_crouch); 04CFCA "lea $4cf3e.l, A6" (enemy_walk_in_on_ledge_walk); 04D09A
# "lea $4cf3e.l, A6" (enemy_step_down_wait): a Foot soldier standing, then crouching: what enemy_hop_up_crouch,
# enemy_step_down_wait and enemy_walk_in_on_ledge_walk set before he hops up or down
04CF3E  data  enemy_crouch_to_hop_animation
# 04D1D2 "lea $4d0bc.l, A6" (sewer_ripple_start); 04D2BA "lea $4d0bc.l, A6" (sewer_ripple_swim_again): the animation
# sewer_ripple_start and sewer_ripple_swim_again set: the ripple on the water
04D0BC  data  sewer_ripple_animation
# 04D4A2 "lea $4d35c.l, A6" (bomber_wait): the animation bomber_wait sets
04D35C  data  bomber_wait_animation
# 04DD66 "lea $4dd48.l, A5" (enemy_walk_to_target_spear_start); 04DDA2 "lea $4dd48.l, A5"
# (enemy_walk_to_side_spear_start); 04DDEC "lea $4dd48.l, A5" (enemy_walk_off_line_spear_start) and 5 more: the spear
# soldier's walk: the animation facing the way he goes and the one for turning (enemy_walk.animations)
04DD48  data  spear_soldier_walk_animations
# 04DF96 "lea $4df78.l, A5" (enemy_walk_to_target_knife_start); 04DFD2 "lea $4df78.l, A5"
# (enemy_walk_to_side_knife_start); 04E148 "lea $4df78.l, A5" (enemy_keep_distance_knife_watch) and 5 more: the knife
# soldier's walk: the animation facing the way he goes and the one for turning (enemy_walk.animations)
04DF78  data  knife_soldier_walk_animations
# 04E022 "lea $4dff8.l, A6" (enemy_circle_knife_start); 04E090 "lea $4dff8.l, A6" (enemy_circle_knife_step); 04E0CE
# "lea $4dff8.l, A6" (enemy_keep_distance_knife_start) and 2 more: the knife soldier's run by direction, eight of them
# (circling and keeping his distance)
04DFF8  data  knife_soldier_run_animations
# 04E7E4 "lea $4e7c2.l, A5" (enemy_walk_to_target_gun_start); 04E820 "lea $4e7c2.l, A5"
# (enemy_walk_to_side_gun_start); 04E85E "lea $4e7c2.l, A5" (enemy_walk_to_range_gun_start) and 4 more: the gun
# soldier's walk: the animation facing the way he goes, the one for turning, and the crouching walk
# (enemy_walk.animations)
04E7C2  data  gun_soldier_walk_animations
# 04EA3C "lea $4ea1a.l, A5" (enemy_walk_to_target_axe_start); 04EA78 "lea $4ea1a.l, A5"
# (enemy_walk_to_side_axe_start); 04EAB6 "lea $4ea1a.l, A5" (enemy_walk_to_range_axe_start) and 4 more: the axe
# soldier's walk: the animation facing the way he goes, the one for turning, and the crouching walk
# (enemy_walk.animations)
04EA1A  data  axe_soldier_walk_animations
# 051794 "lea $5176c.l, A5" (enemy_mouser_chase_start); 0517E6 "lea $5176c.l, A5" (enemy_mouser_chase_run); 051850
# "lea $5176c.l, A5" (enemy_mouser_creep_to_side_start) and 3 more: the Mouser's walk: the animation facing the way it
# goes and the one for turning
05176C  data  mouser_walk_animations
# 048A44 "lea $547c6.l, A6" (enemy_foot_soldier_setup); 04CF8E "lea $547c6.l, A6" (enemy_walk_in_on_ledge_start);
# 04DBA2 "lea $547c6.l, A6" (enemy_walk_in_start) and 2 more: the first of the plain Foot soldier's animations: the
# one his kinds' starts and the ways in set
0547C6  data  enemy_foot_soldier_animation
# 04AD14 "lea $55722.l, A6" (enemy_sword_soldier_start): the first of the sword soldier's animations, the one
# enemy_sword_soldier_start sets
055722  data  enemy_sword_soldier_animation
# 04DC76 "lea $56f42.l, A6" (enemy_knife_soldier_start): the first of the knife soldier's animations, the one
# enemy_knife_soldier_start sets
056F42  data  enemy_knife_soldier_animation
# 04ADA0 "lea $57b46.l, A6" (enemy_hammer_soldier_start): the first of the hammer soldier's animations, the one
# enemy_hammer_soldier_start sets
057B46  data  enemy_hammer_soldier_animation
# 0513F6 "lea $58076.l, A6" (enemy_mouser_bite_fly); 05155E "lea $58076.l, A6" (enemy_mouser_hop_fall); 051704
# "lea $58076.l, A6" (enemy_mouser_hop_up_fall_blocked): the Mouser in the air: what its bite's flight and its hops'
# falls set
058076  data  enemy_mouser_in_air_animation
# 051CA0 "lea $585c4.l, A6" (enemy_rodney_start); 05206E "lea $585c4.l, A6" (enemy_rodney_rush_start); 05217C
# "lea $585c4.l, A6" (enemy_rodney_rush_across_start): the first of the Roadkill Rodney's animations: the one
# enemy_rodney_start and his rushes set
0585C4  data  enemy_rodney_animation
# 04F946 "lea $59618.l, A6" (enemy_rocksteady_close_in_start); 04FAF4 "lea $59618.l, A6"
# (enemy_rocksteady_pincer_charge_start): Rocksteady walking with his gun held out: his closing in and the pincer
# charge's start
059618  data  enemy_rocksteady_gun_walk_animation
# 04F334 "lea $596ba.l, A6" (enemy_rocksteady_enter_ready); 04F372 "lea $596ba.l, A6"
# (enemy_rocksteady_enter_wait_for_signal); 04F856 "lea $596ba.l, A6" (enemy_rocksteady_circle_start) and 1 more:
# Rocksteady walking: his way in, his circling and the pincer charge's start
0596BA  data  enemy_rocksteady_walk_animation
# 04F8C0 "lea $5979c.l, A6" (enemy_rocksteady_line_up_start): the animation enemy_rocksteady_line_up_start sets
05979C  data  enemy_rocksteady_line_up_start_animation
# 04FB48 "lea $5983e.l, A6" (enemy_rocksteady_pincer_charge_wait_for_bebop); 04FC1C "lea $5983e.l, A6"
# (enemy_rocksteady_charge_start): the animation enemy_rocksteady_charge_start and the pincer charge's wait set: his
# charge, with an attack box
05983E  data  enemy_rocksteady_charge_animation
# 04F2C0 "lea $59cb0.l, A6" (enemy_rocksteady_enter_wait): the animation enemy_rocksteady_enter_wait sets
059CB0  data  enemy_rocksteady_enter_wait_animation
# 04FCE8 "lea $59faa.l, A6" (enemy_rocksteady_punch_start): the animation enemy_rocksteady_punch_start sets
059FAA  data  enemy_rocksteady_punch_start_animation
# 04F7D4 "lea $5a08a.l, A6" (enemy_rocksteady_draw_gun_start): the animation enemy_rocksteady_draw_gun_start sets
05A08A  data  enemy_rocksteady_draw_gun_start_animation
# 0503A6 "lea $5a430.l, A6" (enemy_bebop_enter_wait_for_signal); 0506FC "lea $5a430.l, A6"
# (enemy_bebop_walk_to_front_start); 050812 "lea $5a430.l, A6" (enemy_bebop_walk_start) and 1 more: Bebop walking: his
# walks, his way in and the pincer charge's start
05A430  data  enemy_bebop_walk_animation
# 050CA2 "lea $5a77e.l, A6" (enemy_bebop_shoot_start): the animation enemy_bebop_shoot_start sets
05A77E  data  enemy_bebop_shoot_start_animation
# 050994 "lea $5a930.l, A6" (enemy_bebop_pincer_charge_wait_for_rocksteady); 050BA4 "lea $5a930.l, A6"
# (enemy_bebop_charge_start): the animation enemy_bebop_charge_start and the pincer charge's wait set: his charge,
# with an attack box
05A930  data  enemy_bebop_charge_animation
# 050B2C "lea $5a9be.l, A6" (enemy_bebop_punch_start): the animation enemy_bebop_punch_start sets
05A9BE  data  enemy_bebop_punch_start_animation
# 050D4A "lea $5aaf6.l, A6" (enemy_bebop_flinch_from_behind_start): the animation enemy_bebop_flinch_from_behind_start
# sets
05AAF6  data  enemy_bebop_flinch_from_behind_start_animation
# 04FBCE "lea $5ad06.l, A6" (enemy_rocksteady_pincer_charge_run): the animation enemy_rocksteady_pincer_charge_run
# sets
05AD06  data  enemy_rocksteady_pincer_charge_run_animation
# 052CCE "lea $5ad40.l, A6" (enemy_shredder_appear_wait): the animation enemy_shredder_appear_wait sets
05AD40  data  enemy_shredder_appear_wait_animation
# 052D68 "lea $5b032.l, A6" (enemy_shredder_split_start); 052DEA "lea $5b032.l, A6"
# (enemy_shredder_clone_appear_start); 05317E "lea $5b032.l, A6" (enemy_shredder_back_off_walk): Shredder standing
# with his sword: his back-off walk, his split and his clones' appearance
05B032  data  enemy_shredder_stand_animation
# 052D12 "lea $5b07e.l, A6" (enemy_shredder_appear_step_out): the animation enemy_shredder_appear_step_out sets
05B07E  data  enemy_shredder_appear_step_out_animation
# 053290 "lea $5b4f2.l, A6" (enemy_shredder_flinch_start); 053468 "lea $5b4f2.l, A6" (enemy_shredder_vanish_start):
# Shredder recoiling and crouching: his flinch's start and his vanishing's
05B4F2  data  enemy_shredder_recoil_animation
# 053084 "lea $5b6ee.l, A6" (enemy_shredder_guard_start): the animation enemy_shredder_guard_start sets
05B6EE  data  enemy_shredder_guard_start_animation
# 053582 "lea $5b73a.l, A6" (enemy_shredder_slash_start): the animation enemy_shredder_slash_start sets
05B73A  data  enemy_shredder_slash_start_animation
# 0534D8 "lea $5b91e.l, A6" (enemy_shredder_kick_start): the animation enemy_shredder_kick_start sets
05B91E  data  enemy_shredder_kick_start_animation
# 053538 "lea $5bb0a.l, A6" (enemy_shredder_thrust_start): the animation enemy_shredder_thrust_start sets
05BB0A  data  enemy_shredder_thrust_start_animation
# 0535CC "lea $5bd3e.l, A6" (enemy_shredder_sweep_start): the animation enemy_shredder_sweep_start sets
05BD3E  data  enemy_shredder_sweep_start_animation
# 04C230 "lea $5c220.l, A6" (shredder_ray_start): the animation shredder_ray_start sets: Shredder's ray
05C220  data  shredder_ray_start_animation
# 04D84A "lea $5c52c.l, A6" (enemy_hang_in_start): the animation enemy_hang_in_start sets
05C52C  data  enemy_hang_in_start_animation
# 04DAD6 "lea $5c566.l, A6" (enemy_dive_in_dive): the animation enemy_dive_in_dive sets
05C566  data  enemy_dive_in_dive_animation
# 04DBC6 "lea $5c5a4.l, A6" (enemy_walk_in_walk): the animation enemy_walk_in_walk sets
05C5A4  data  enemy_walk_in_walk_animation
# 04ABAE "lea $5c632.l, A6" (motorbike_start): the animation motorbike_start sets: the motorbike, with an attack box
05C632  data  motorbike_start_animation
# 04C8F8 "lea $5c846.l, A6" (tire_soldier_wait): the animation tire_soldier_wait sets
05C846  data  tire_soldier_wait_animation
# 04D570 "lea $5c92a.l, A6" (enemy_rocket_soldier_start): the animation enemy_rocket_soldier_start sets
05C92A  data  enemy_rocket_soldier_start_animation
# 049528 "lea $5c9c4.l, A6" (enemy_crash_into_scenery_start); 0495BE "lea $5c9c4.l, A6"
# (enemy_crash_into_scenery_low_start): the animation enemy_crash_into_scenery_start and
# enemy_crash_into_scenery_low_start set
05C9C4  data  enemy_crash_into_scenery_animation
# 04D4C2 "lea $5ca64.l, A6" (bomber_lean_out): the animation bomber_lean_out sets
05CA64  data  bomber_lean_out_animation
# 04D6DE "lea $5cda0.l, A6" (double_door_wait): the animation double_door_wait sets
05CDA0  data  double_door_wait_animation
# 04A75E "lea $5ce06.l, A6" (boss_shutter_start): the animation boss_shutter_start sets: the closed shutter
05CE06  data  boss_shutter_start_animation
# 04D776 "lea $5ce9e.l, A6" (technodrome_door_start): the animation technodrome_door_start sets: the closed door
05CE9E  data  technodrome_door_start_animation
# 04C3D0 "lea $5ceee.l, A6" (dynamite_bounce): the animation dynamite_bounce sets: the stick of dynamite, with an
# attack box
05CEEE  data  dynamite_bounce_animation

# ---- the records, maps, job lists and tables the C named after their address (batch 8c) ----
# 004B14 "lea $4b58.l, A6" (start_title_logo): where each piece of the title's logo goes on the screen, x and y a word
# each (LOGO_PLACE)
004B58  data  title_logo_places
# 004B26 "lea $4b64.l, A6" (start_title_logo): the same for the version with TEENAGE MUTANT HERO TURTLES (06009F bit
# 1: 004B1A "btst #$1, $6009f.l")
004B64  data  hero_title_logo_places
# 004C58 "lea $4c76.l, A5" (title_turtles_slide_in): the title's jobs: the text colour, then game text 0x12, TEENAGE
# MUTANT NINJA TURTLES with its marks
004C76  data  ninja_title_jobs
# 004C6A "lea $4c7c.l, A5" (title_turtles_slide_in): the same with game text 0x13, TEENAGE MUTANT HERO TURTLES, for
# the version that has it
004C7C  data  hero_title_jobs
# two lists of jobs no code queues (no lea names 00525A or 005260), between attract_end_restart's rts and
# copy_sprites_and_fill_layer_b, in queue_jobs' format (a word a job, its number and parameter, to FFFF: 004184
# "move.w (A5)+, D7", 004186 "cmpi.w #-$1, D7"): the text colour and game text 0x0F, the WARNING that the game is for
# use only in Asia; and game texts 07 and 0x0A, the Konami logo and KONAMI 1989 (coin_screen_jobs' two texts)
00525A  data  unused_asia_warning_jobs
005260  data  unused_konami_logo_jobs
# 0057AE "lea $5846.l, A5" (draw_color_test): the COLOR TEST page's jobs: the text colour, then test text 05
005846  data  color_test_jobs
# 005884 "lea $5896.l, A5" (draw_io_test): the IO READ TEST page's jobs: the text colour, then test texts 00-04
005896  data  io_test_jobs
# 005A2C "lea $5a58.l, A5" (draw_coin_counter_test): the COIN COUNTER TEST page's jobs: the text colour, then test
# text 0x16
005A58  data  coin_counter_test_jobs
# 005B78 "lea $5b9c.l, A5" (draw_sound_test): the SOUND TEST page's jobs: the text colour, then test text 0x15
005B9C  data  sound_test_jobs
# 005C4C "lea $5c5e.l, A5" (draw_dip_switch_page): the DIP SW SELECT page's jobs: the text colour, then test text 06
005C5E  data  dip_switch_page_jobs
# 006FF4 "lea $7018.l, A5" (staff_roll_next_credit): the staff roll's jobs: the text colour, then game text 0x10
007018  data  staff_roll_jobs
# 008A3E "lea $8abe.l, A5" (coin_screen_draw): the coin screen's jobs: the text colour, then game texts 07 and 0x0A
# (KONAMI 1989)
008ABE  data  coin_screen_jobs
# 008EF2 "lea $8f58.l, A6" (best_players_draw): BEST 10 PLAYERS' colours, palette request kind 5: a palette, a colour
# and its two bytes each, to FF
008F58  data  best_players_palette
# 00902E "lea $9190.l, A5" (draw_best_players): BEST 10 PLAYERS' jobs: tall texts 00 and 04-07
009190  data  best_players_jobs
# 0097D6 "lea $9872.l, A2" (fade_palettes_step): the fade's three colour channels: each one's mask in a colour and a
# step of it, red, green and blue
009872  data  fade_colour_channels
# 009C38 "lea $9c5c.l, A5" (palette_editor_start): the palette editor's jobs: both text colours, then job 0xE with 07
009C5C  data  palette_editor_jobs
# 00E71E "lea $e750.l, A6" (krang_aim_walk): Krang's speeds across and up or down by his direction, a word each
00E750  data  krang_walk_speeds
# 00E70E "lea $e790.l, A6" (krang_aim_charge): the same, faster: Krang's charge (the table's second half, which
# krang_aim_charge reads from)
00E790  data  krang_charge_speeds
# 010C66 "lea $10d5a.l, A5" (electric_beam_start): the frames an electric beam waits between its bursts, picked at
# random (electric_random_wait)
010D5A  data  electric_beam_waits
# 011C1C "lea $11c42.l, A6" (rock_soldier_site_next_move): the building site's rock soldier's chances of each next
# move by the move before, four bytes a move
011C42  data  rock_soldier_site_move_chances
# 012460 "lea $12486.l, A6" (rock_soldier_technodrome_next_move): the Technodrome's rock soldier's chances of each
# next move by the move before, four bytes a move
012486  data  rock_soldier_technodrome_move_chances
# 01EF02 "lea $1f0d8.l, A6" (update_layers_street): April's picture on the shop window's TV in the street (area 2),
# for draw_tv_picture: its tile codes, then their colours
01F0D8  data  april_tv_picture
# 02D0C8 "move.l #$31280, $63312.l" (exit_building_site_splinter_picture): the map of Splinter's picture after area 7
# (layer B; its blocks are splinter_picture_blocks)
031280  data  splinter_picture_map
# 02BDEC "move.l #$314c4, $63312.l" (exit_sewer_villains_picture): the map of the villains' picture after the sewer
# (its blocks are villains_picture_blocks)
0314C4  data  villains_picture_map
# 02BE14 "move.l #$3163c, $63312.l" (exit_sewer_villains_picture): the map of the second picture (its blocks are
# villains_picture_blocks_2)
03163C  data  villains_picture_map_2
# 02F7B0 "move.l #$3e98a, $63392.l" (start_opening): layer B's map in the opening (its blocks are
# opening_layer_b_blocks)
03E98A  data  opening_layer_b_map
# 02F7A6 "move.l #$3f196, $63352.l" (start_opening): layer A's map in the opening (its blocks are
# opening_layer_a_blocks)
03F196  data  opening_layer_a_map
# 02FF54 "move.l #$458f8, $63312.l" (draw_technodrome_screen): the map of the Technodrome's screen (its blocks are
# technodrome_screen_blocks)
0458F8  data  technodrome_screen_map
# 030EA8 "move.l #$4618c, $63312.l" (intro_roof_start): the map of the burning roof before area 0 (its blocks are
# intro_roof_blocks)
04618C  data  intro_roof_map
# 02C458 "move.l #$46c52, $63312.l" (exit_car_street_april_hug_start): the map April's hug starts with (its blocks are
# april_hug_first_blocks)
046C52  data  april_hug_first_map
# 04A350 "lea $4a332.l, A5" (enemy_let_go_by_donatello): where a soldier Donatello lets go of lands, from the turtle
# (struct placement, for enemy_place_by)
04A332  data  let_go_by_donatello_placement
# 04A40C "lea $4a3ee.l, A5" (enemy_let_go_by_michelangelo): where a soldier Michelangelo lets go of lands, from the
# turtle (struct placement, for enemy_place_by)
04A3EE  data  let_go_by_michelangelo_placement
# 04A4CA "lea $4a4ac.l, A5" (enemy_let_go_by_raphael): where a soldier Raphael lets go of lands, from the turtle
# (struct placement, for enemy_place_by)
04A4AC  data  let_go_by_raphael_placement
# 04A588 "lea $4a56a.l, A5" (enemy_let_go_by_leonardo): where a soldier Leonardo lets go of lands, from the turtle
# (struct placement, for enemy_place_by)
04A56A  data  let_go_by_leonardo_placement
# 04C52C "lea $4c4c6.l, A5" (kicked_door_break): the pieces of the door a Foot soldier kicks down, four objects from
# it (struct object_record, for start_object_from_record)
04C4C6  data  kicked_door_pieces
# 04C75E "lea $4c6c8.l, A5" (elevator_open): the Foot soldier who comes out of the open elevator (struct
# object_record, for start_object_from_record)
04C6C8  data  elevator_soldier_record
# 04CC58 "lea $4cbac.l, A5" (window_soldier_drop_jump_out): the glass of the window a soldier jumps out of (struct
# object_record, for start_object_from_record)
04CBAC  data  window_drop_shards_record
# 04CDEC "lea $4cd3c.l, A5" (window_soldier_dive_wait): the glass of the window a soldier dives out of (struct
# object_record, for start_object_from_record)
04CD3C  data  window_dive_shards_record
# 04D260 "lea $4d1a6.l, A5" (sewer_ripple_leap_out): the soldier who leaps out of the sewer's water (struct
# object_record, for start_object_from_record)
04D1A6  data  sewer_ripple_soldier_record
# 04D4D8 "lea $4d466.l, A5" (bomber_throw): the bomb a bomber throws: where it starts from him and its kind (struct
# shot_record, for start_shot)
04D466  data  bomber_bomb_shot
# 04F322 "lea $54746.l, A6" (enemy_rocksteady_enter_ready); 050008 "lea $54746.l, A6"
# (enemy_rocksteady_knocked_down_lie): Rocksteady's health by difficulty in area 2 (rocksteady_health in the others)
054746  data  rocksteady_health_area_2
# 050FC6 "move.l #$582b4, ($3a,A0)" (enemy_mouser_start): the Mouser's shadow (kind 4E; mouser_shadow is the one
# Stockman drops): the sprite list drawn under it (+3A)
0582B4  data  enemy_mouser_shadow
# 04F224 "move.l #$59a18, ($3a,A0)" (enemy_rocksteady_start); 0501EA "move.l #$59a18, ($3a,A0)" (enemy_bebop_start):
# Rocksteady's and Bebop's shadow: the sprite list drawn under them (+3A)
059A18  data  big_boss_shadow

# ---- the data at the addresses the C wrote as numbers (batch 8c) ----
# 001494 "lea $16c4.l, A2" (zero_boot_fill_registers): the bits of the palette RAM's two chips in the boot's mask of
# bad chips, for test_palette_ram
0016C4  data  palette_ram_chip_bits
# 0014AE "lea $16c6.l, A2" (zero_boot_fill_registers): the bits of the tile RAM's two chips (100000), for test_ram
0016C6  data  tile_ram_chip_bits
# 0014D4 "lea $16c8.l, A2" (zero_boot_fill_registers): the bits of the work RAM's two chips (060000), for test_ram
0016C8  data  work_ram_chip_bits
# 0014F8 "lea $16ca.l, A2" (zero_boot_fill_registers): the bits of the sprite RAM's two chips, for test_ram
0016CA  data  sprite_ram_chip_bits
# 00212C "lea $20ec.l, A5" (draw_score_labels); 002168 "lea $20ec.l, A5" (draw_score_labels): the text 1UP
# (print_plain_text); 2UP, 3UP and 4UP follow it, four bytes apart
0020EC  data  text_1up
# 00213A "lea $20f0.l, A5" (draw_score_labels); 002178 "lea $20f0.l, A5" (draw_score_labels): the text 2UP
0020F0  data  text_2up
# 002148 "lea $20f4.l, A5" (draw_score_labels): the text 3UP
0020F4  data  text_3up
# 002156 "lea $20f8.l, A5" (draw_score_labels): the text 4UP
0020F8  data  text_4up
# 002112 "lea $20fc.l, A5" (draw_score_labels): the text HIGH, over the top score
0020FC  data  text_high
# 007486 "move.l #$77d2, $63434.l" (start_credit_name_erase): the 15th of staff_roll_names, all blanks: what
# start_credit_name_erase types over a credit's name last
0077D2  data  blank_credit_name
# 030ED0 "lea $9c08.l, A0" (intro_roof_start): the burning roof's palette effects before area 0, for
# start_palette_effect_lists
009C08  data  intro_roof_palette_effects
# 0010A2 "lea $a01e.l, A6" (reset); 0070D8 "lea $a01e.l, A6" (ending_game_over_clear): a palette set (a list a bank):
# the boot screen's, which ending_game_over_clear requests too
00A01E  data  boot_palettes
# 007B9C "lea $a02e.l, A6" (ranking_clear): the ranking's palette set
00A02E  data  ranking_palettes
# 006C3C "lea $a03e.l, A6" (ending_clear): the ending's palette set
00A03E  data  ending_palettes
# 003FF2 "lea $a05e.l, A6" (startup_begin): the palette set the start requests (the same lists as boot_palettes)
00A05E  data  startup_palettes
# 001998 "lea $a07e.l, A6" (draw_mask_rom_check); 0056F2 "lea $a07e.l, A6" (test_start_palette): the test mode's
# palette set
00A07E  data  test_mode_palettes
# 007ABC "lea $a08e.l, A5" (game_over_dim): the palette set GAME OVER fades the play toward: every bank the same dark
# list
00A08E  data  game_over_dim_palettes
# 02F8F4 "lea $a0ae.l, A5" (opening_city_fade_in): the palette set the opening's city fades in to
00A0AE  data  opening_city_palettes
# 006F10 "lea $a0de.l, A6" (staff_roll_clear): the staff roll's palette set
00A0DE  data  staff_roll_palettes
# 030950 "lea $a0ee.l, A6" (start_intro): the palette set of the story before area 0
00A0EE  data  intro_palettes
# 030D66 "lea $a0fe.l, A6" (intro_rooftop): the palette set of the rooftop, "Fire!!"
00A0FE  data  intro_rooftop_palettes
# 030E7A "lea $a10e.l, A6" (intro_climb): the palette set of the climb up the building
00A10E  data  intro_climb_palettes
# 02C43A "lea $a11e.l, A6" (exit_car_street_van_drives_off): the palette set requested once the van drives off after
# the car street: April's hug picture's
00A11E  data  april_hug_palettes
# 02D09A "lea $a12e.l, A6" (turtle_exit_building_site_jump): the palette set requested once the turtles jump off the
# building site: Splinter's picture's
00A12E  data  splinter_picture_palettes
# 02B8E4 "lea $a13e.l, A6" (exit_apartment_shredder_escapes): the palette set requested once Shredder escapes with
# April: the picture's after it
00A13E  data  kidnap_picture_palettes
# 02CC8C "lea $a14e.l, A6" (exit_skateboard_van_drives): the palette set requested once the van speeds round the
# curve: the crash picture's
00A14E  data  skateboard_crash_picture_palettes
# 02D24A "lea $a15e.l, A6" (exit_building_site_splinter_thanks): the palette set requested after Splinter's thanks:
# the Technodrome the turtles drop in at
00A15E  data  technodrome_drop_palettes
# 02BD30 "lea $a16e.l, A6" (turtle_exit_sewer): the palette set requested once the turtles are out of the sewer: the
# villains' picture's
00A16E  data  villains_picture_palettes
# among the palette sets' bank lists (00A17E-00A23D, 8 palettes each), one no palette set names (no set or lea holds
# 00A1DE): 8 times the palette at 00A39E, which no other list holds either
00A1DE  data  unused_palette_list
# 013CC8 "lea $c6c4.l, A6" (stockman_wait_for_last_enemy): a palette (request kind 4, sprites' palette 0x0C) once
# Baxter Stockman is the last enemy
00C6C4  data  stockman_palette
# 04A752 "lea $c704.l, A6" (boss_shutter_start): the roll-up door's palette (request kind 4, sprites' palette 0x0A)
00C704  data  boss_shutter_palette
# 02B4E6 "lea $c824.l, A6" (exit_skateboard_start): the van's palette at the skateboard ride's exit (request kind 4,
# sprites' palette 0x0B)
00C824  data  skateboard_exit_van_palette
# 02B4F6 "lea $c844.l, A6" (exit_skateboard_start): its second palette (request kind 4, sprites' palette 0x0C)
00C844  data  skateboard_exit_van_palette_2
# 01F292 "lea $ca04.l, A6" (update_layers_car_street): April's palette, tied up at the car street's end (request kind
# 4, sprites' palette 0x0D)
00CA04  data  tied_april_palette
# 050234 "lea $d094.l, A6" (enemy_bebop_start); 0503D2 "lea $d094.l, A6" (enemy_bebop_enter_walk_in): Bebop's palette
# (request kind 4, sprites' palette 0x0C)
00D094  data  bebop_palette
# 04F39A "lea $d0b4.l, A6" (enemy_rocksteady_enter_walk_in_with_bebop): Rocksteady's palette when he comes in with
# Bebop (request kind 4, sprites' palette 0x0A)
00D0B4  data  rocksteady_palette
# 007116 "lea $d2c4.l, A6" (ending_game_over_start); 007A52 "lea $d2c4.l, A6" (game_over_start): GAME OVER's palette
# effects, its box's colours (start_palette_effects)
00D2C4  data  game_over_palette_effects
# 007122 "lea $d2e6.l, A6" (ending_game_over_start); 007A5E "lea $d2e6.l, A6" (game_over_start): GAME OVER's second
# list of palette effects
00D2E6  data  game_over_palette_effects_2
# 00E306 "lea $f66c.l, A6" (krang_explode_start): the shadow Krang takes as he stops before he bursts (+3A)
00F66C  data  krang_explode_shadow

# ---- the places in the players' records the code takes the address of (struct player, 060100: batch 8c) ----
# The C names a place inside a record of STRUCT_ARRAYS only by a var over it (an address that starts a record is
# PLAYER_ADDRESS(n)); these are the ones the code loads as an address
# 01B8DE "lea $60100.l, A6" (turtle_set_state): the first player's lives, read by the turtle's player times 8 (01B8E4
# "tst.w (A6,D1.w)")
060100  var  player_1_lives  u16
# 001FEA "lea $60104.l, A6" (draw_score_player_1), 02C538 "lea $60104.l, A4" (exit_car_street_april_hug_start): the first
# player's score, BCD
060104  var  player_1_score  u16
# 001F4E "lea $60106.l, A4" (add_point): the byte past the first player's score, which add_point_to_score adds back from
# (001FA0 "abcd -(A5), -(A4)"); 019BF6 "lea $60106.l, A2" (turtle_start_area), 01D416 "lea $60106.l, A6"
# (draw_health_bar): his health bars, read by the player times 8
060106  var  player_1_health_bars  u8
# 001FF8 "lea $6010c.l, A6" (draw_score_player_2): the second player's score
06010C  var  player_2_score  u16
# 001F60 "lea $6010e.l, A4" (add_point): the byte past the second player's score: his health bars
06010E  var  player_2_health_bars  u8
# 002006 "lea $60114.l, A6" (draw_score_player_3): the third player's score
060114  var  player_3_score  u16
# 001F72 "lea $60116.l, A4" (add_point): the byte past the third player's score: his health bars
060116  var  player_3_health_bars  u8
# 002014 "lea $6011c.l, A6" (draw_score_player_4): the fourth player's score
06011C  var  player_4_score  u16
# 001F84 "lea $6011e.l, A4" (add_point): the byte past the fourth player's score: his health bars
06011E  var  player_4_health_bars  u8

# ---- a number the C held as an address of the program (batch 8c) ----
# 02BFD8 "move.l #$5000, ($12,A0)" 02BFE0 "move.l #$5000, ($62,A0)": where the van comes in at the skateboard
# ride's exit, x 0x50 in 1/256 of a pixel (the program has a table of states at 005000)
constant turtle_exit_skateboard_gather 5000 VAN_START_X

# ---- the parameters, results and locals the C named after a register (batch 8c) ----
# 0470C0 "andi.w #$1ff, D1" 0470CC "ori.w #$200, D1" the sprite's x on the screen, with 0x200 set before it goes to
# the sprite chip
local draw_sprites 0470C0,0470CC d1 sprite_x
# 047BF2 "move.b (A6), D1" what the caller left in D1: set_animation puts the frame's time in its low byte and keeps
# the rest
param set_animation d1 kept_bits
# 012E28 "ext.w D7" 012E2A "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local helicopter_fire_bullets 012E28,012E2A d7 objects_left
# 012E72 "ext.w D7" 012E74 "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local helicopter_drop_missiles 012E72,012E74 d7 objects_left
# 01362E "ext.w D7" 013630 "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local flying_drone_fire 01362E,013630 d7 objects_left
# 013AA4 "lea $13ae4.l, A5" the table of the shot's places from the drone, left in A5 for the object loop
local flying_drone_start_shot 013AA4 a5 shot_places
# 011E00 "lea $61306.l, A5" the table of the targets the boss picks from
local boss_pick_target 011E00 a5 choices
# 00E0F6 "andi.b #$f, D7" 00E0FE "jsr (A6)" the frame count's low four bits, the phase of the walk: when 0 the aim at
# the target runs, and what it leaves (the speeds' low byte) is what the test for every other frame reads after it
local krang_walk_step 00E0F6,00E0FE d7 phase
# 00E0FE "jsr (A6)" the walk step's phase (krang_walk_step calls it: 00E0FE "jsr (A6)"), whose high word
# krang_set_speeds keeps
param krang_aim_charge d7 phase
# 00E0FE "jsr (A6)" the walk step's phase (krang_walk_step calls it: 00E0FE "jsr (A6)"), whose high word
# krang_set_speeds keeps
param krang_aim_walk d7 phase
# 00E726 "move.w (A6,D0.w), D7" 00E72E "move.w ($2,A6,D0.w), D7" the walk step's phase: its high word stays, the low
# word takes the speeds
param krang_set_speeds d7 phase
# 01179C "andi.b #$f, D7" 0117A4 "bsr $11e6a" the frame count's low four bits, the phase of the walk: when 0 the aim
# at the target runs, and what it leaves (the speeds' low byte) is what the test for every other frame reads after it
local rock_soldier_site_walk 01179C,0117A4 d7 phase
# 011C0E "move.w #$10, D7" 011C12 "jsr $48448.l" 011C26 "sub.b (A6,D6.w), D7" what random_below gives, then less each
# chance in turn
local rock_soldier_site_next_move 011C0E,011C12,011C26 d7 roll
# 012376 "andi.b #$f, D7" 01237E "bsr $11e6a" the frame count's low four bits, the phase of the walk: when 0 the aim
# at the target runs, and what it leaves (the speeds' low byte) is what the test for every other frame reads after it
local rock_soldier_technodrome_walk 012376,01237E d7 phase
# 012452 "move.w #$10, D7" 012456 "jsr $48448.l" 01246A "sub.b (A6,D6.w), D7" what random_below gives, then less each
# chance in turn
local rock_soldier_technodrome_next_move 012452,012456,01246A d7 roll
# 0127F4 "jsr $1de3e.l" the floor map's cells around the missile on the screen, for turtle_walls_right
local missile_fly 0127F4 a6 floor_cell_place
# 00F916 "ext.w D7" 00F918 "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local ball_dropper_wait 00F916,00F918 d7 objects_left
# 010252 "ext.w D7" 010254 "jsr $1830c.l" 010270 "ext.w D7" the objects find_free_object looks at, left over when it
# finds one
local billboard_wait 010252,010254,010270,010272 d7 objects_left
# 01031E "move.w #$2000, D7" 01032A "ext.l D7" how far left of the billboard the soldier starts, a long
local billboard_start_soldier 01031E,01032A d7 x_offset
# 010A98 "ext.w D7" 010A9A "jsr $1830c.l" the objects find_free_object looks at, left over when it finds one
local nozzle_row_watch 010A98,010A9A d7 objects_left
# 048492 "cmp.w ($0,A5), D1" 04849C "cmp.w ($2,A5), D1" 0484A6 "cmp.w ($4,A5), D1" the three distances the larger one
# is measured against
param enemy_target_distance_band a5 distances
# the slot the enemy leaves, which the caller hands it and gets back as it is
param enemy_leave_side a1 left_slot
# 048AD0 "exg A5, A6" the nearest player slot enemy_nearest_slots gives, kept while the second one is looked at, and
# handed back when the second is no less crowded
local enemy_think 048AD0 a5 closest_slot
# 048B1A "move.b ($32,A0), D7" its floor's height, up from its place on the screen
local enemy_think 048B1A d7 floor_offset
# 048CFE "moveq #$64, D7" 048D00 "jsr $48448.l" 048D0C "moveq #$64, D7" what random_below gives out of 100, then less
# each chance in turn
local enemy_think 048CFE,048D00,048D0C,048D0E,048D16,048D54,048D56,048D5E d7 roll
# 04B8A8 "move.w ($4e,A0), D7" the turtle the arm caught, its address
local whip_arm_drag 04B8A8 d7 hit_turtle
# 04F556 "moveq #$64, D7" 04F558 "jsr $48448.l" 04F560 "sub.b ($4,A6,D6.w), D7" what random_below gives, then less
# each chance in turn
local enemy_rocksteady_think 04F556,04F558,04F560 d7 roll
# 05059E "moveq #$64, D7" 0505A0 "jsr $48448.l" 0505A8 "sub.w ($0,A6), D7" what random_below gives, then less each
# chance in turn
local enemy_bebop_think 05059E,0505A0,0505A8 d7 roll
# 051130 "exg A5, A6" the nearest player slot enemy_nearest_slots gives, kept while the second one is looked at, and
# handed back when the second is no less crowded
local enemy_mouser_think 051130 a5 closest_slot
# the slot the enemy leaves, which the caller hands it and gets back as it is
param enemy_mouser_leave_side a1 left_slot
# 051DBC "exg A5, A6" the nearest player slot enemy_nearest_slots gives, kept while the second one is looked at, and
# handed back when the second is no less crowded
local enemy_rodney_think 051DBC a5 closest_slot
# the slot the enemy leaves, which the caller hands it and gets back as it is
param enemy_rodney_leave_side a1 left_slot
# 05287C "exg A5, A6" the nearest player slot enemy_nearest_slots gives, kept while the second one is looked at, and
# handed back when the second is no less crowded
local enemy_shredder_think 05287C a5 closest_slot
# 013F94 "move.w (A6,D7.w), D7" his height from the table of the shake, before the step's
local stockman_shake 013F94 d7 shake_height
# 014130 "move.w (A6,D7.w), D7" his height from the table of the bob, before the step's
local stockman_bob 014130 d7 bob_height
# 019B66 "bsr $19eca" the player's marker object, which turtle_start_marker starts
local turtle_join 019B66 a1 marker
# 019BBE "bsr $19eca" the player's marker object, which turtle_start_marker starts
local turtle_respawn 019BBE a1 marker
# 019C38 "bsr $19eca" the player's marker object, which turtle_start_marker starts
local turtle_start_area 019C38 a1 marker
# 01B7C8 "bsr $1b8c2" what turtle_set_state leaves in D1, which turtle_jump reads as the held buttons (the frame's
# time in the low byte: set_animation)
local turtle_start_jump 01B7C8 d1 held
# 01B8D6 "move.b ($2,A0), D1" 01B902 "move.w ($c,A0), D1" the turtle's player times 8 when it runs out of lives, then
# the screen x for the balloon; the caller's D1 comes in (the held buttons turtle_control read) and goes back with the
# frame's time set_animation leaves in its low byte
param turtle_set_state d1 player_offset
# 01B90E "jsr $30076.l" what say_shell_shock leaves in D4: the balloon's tile bank
param turtle_set_state d4 bank
# 01B90E "jsr $30076.l" what say_shell_shock leaves in D6: the balloon's fourth row's tile
param turtle_set_state d6 fourth_row_tile
# the held buttons, whose low byte set_animation replaces with the frame's time
param turtle_set_animation d1 held
# 01BA40 "move.b ($10,A0), D1" the held buttons turtle_control read, for turtle_jump_top
param turtle_jump d1 held
# 01BB8A "andi.b #$10, D1" the held buttons: the jump keeps rising while the jump button is held (01BB8A
# "andi.b #$10, D1"), the frame's time after turtle_set_state
local turtle_jump_top 01BAF6 d1 held
# 01BEC2 "move.w #$401, D7" 01BECE "move.w #$408, D7" 01BEE0 "move.w #$402, D7" the job queued: a point and the
# turtle's player (0x401, 0x402, 0x408, by the turtle)
local turtle_attack_over 01BEC2,01BECE,01BEE0,01BEEE d7 job
# 02BC30 "lsr.l #8, D1" 02BC4C "jsr $47bf2.l" the spot's y on the screen (0x34), whose high bits set_animation keeps
# and screen_x_high takes
local turtle_exit_street_jump 02BC30,02BC4C d1 spot_y
# 02C7E6 "jsr $47ccc.l" the step's speed, its high byte from screen_x_high, for speeds_from_direction
local move_in_direction 02C7E6 d1 step_speed
# 02C8A0 "jsr $1a2d6.l" 02C8F0 "jsr (A6)" the object the exit's step leaves in A0, for auto_scroll
local run_exit_skateboard 02C8A0,02C8F0 a0 step_object
# the object run_exit_skateboard hands it, given back as it is
param exit_skateboard_van_drives a0 step_object
# 02CC86 "jsr $31230.l" what clear_layers leaves in A0, given back
local exit_skateboard_van_drives 02CC86 a0 cleared_end
# 02CCAA "lea $104008.l, A0" the object run_exit_skateboard hands it, given back as it is
param exit_skateboard_crash_picture a0 step_object
# 008F2E "bsr $804a" what draw_ranking_background leaves in D7, its count run out: the high bits the players' byte
# goes into
local best_players_draw 008F2E d7 loop_end
# 007D6E "bsr $804a" 007DD8 "bsr $804a" what draw_ranking_background leaves in D7, its count run out: the high bits
# the players' byte goes into
local ranking_choose_entry 007D6E,007DD8 d7 loop_end
# 03101C "move.b $600a5.l, D0" what the caller left in D0: the frame count goes in its low byte
param intro_animate_fire d0 kept_bits
# 007CFA "bsr $8150" the colour draw_ranking_frame leaves, for draw_ranking_label
local show_ranked_players 007CFA d6 colour
# 008156 "move.w D7, D6" the colour, whose high word the player's offset keeps
param draw_ranking_frame d6 colour
# 00822A "move.b (A0,D7.w), D6" the ranking's places, which the caller leaves in A0
param draw_ranking_place a0 places
# 00124E "moveq #$0, D0" 0, then 1 when the coinage is set to free play
local reset 00124E d0 free_play_setting
# 0012E0 "move.l D0, D1" 0012E2 "lsr.w #2, D1" the setting's offset a quarter of it: with the offset, 10 bytes a
# setting
local reset 0012E0,0012E2 d1 quarter_offset
# 0011BC "bsr $114c" 0013C0 "jsr (A0)" 0 from zero_boot_fill_registers for the work RAM's fill; then, in the main
# loop, what each job leaves in D4 for the next
local reset 0011BC,0013C0 d4 fill_4
# 0011BC "bsr $114c" 0013C0 "jsr (A0)" 0013C2 "jsr $1fdca.l" 0 from zero_boot_fill_registers for the work RAM's fill;
# then what each job leaves in D5 for the next
local reset 0011BC,0013C0,0013C2 d5 fill_5
# 0011BC "bsr $114c" 0013C0 "jsr (A0)" 0013C2 "jsr $1fdca.l" 0 from zero_boot_fill_registers for the work RAM's fill;
# then what each job leaves in D6 for the next
local reset 0011BC,0013C0,0013C2 d6 fill_6
# 001862 "movea.l D6, A1" 001878 "lea ($2,A1), A1" the chip's next byte
local sum_program_chips 001862,001878 a1 byte_place
# 001850 "lea $60018.l, A2" 00188A "move.w D6, (A2)+" where the chip's sum goes
local sum_program_chips 001850,00188A a2 sum_place
# 00186A "moveq #$0, D5" 001870 "move.b (A1), D5" the chip's byte, read twice to be sure
local sum_program_chips 00186A,001870 d5 chip_byte
# 00185C "move.l (A0)+, D6" where the chip's bytes start
local sum_program_chips 00185C d6 chip_start
# 001868 "moveq #$0, D6" 001876 "add.w D5, D6" the chip's sum
local sum_program_chips 001868,001876 d6 sum
# 003E0A "bsr $3e70" 003E1E "bsr $3d1e" what read_inputs or add_credit_lives leave in D7, whose bits above the low
# byte run_palette_requests keeps
local vblank_interrupt 003E0A,003E1E d7 bank_bits
# 003F3C "move.w $6005c.l, D7" what the caller left in D7: the scroll's word goes in its low word
param read_inputs d7 kept_bits
# 004626 "move.b #$3, D0" what the caller left in D0: the count goes in its low byte
param zero_ram_below_object_0 d0 kept_bits
# 004634 "move.b #$b, D0" what the caller left in D0: the count goes in its low byte
param zero_ram_below_object_12 d0 kept_bits
# 004642 "move.b #$7, D0" what the caller left in D0: the count goes in its low byte
param zero_ram_below_object_24 d0 kept_bits
# 004650 "move.b #$7, D0" what the caller left in D0: the count goes in its low byte
param zero_ram_below_object_4 d0 kept_bits
# 00465E "move.b #$7, D0" what the caller left in D0: the count goes in its low byte
param zero_ram_below_object_32 d0 kept_bits
# the third byte of a mask ROM read, for add_to_rom_sums
param sum_mask_roms d6 third_byte
# the third byte of a mask ROM read, for add_to_rom_sums
param sum_sprite_roms_low d6 third_byte
# 001AC8 "move.w D7, ($0,A0)" where the sums go, the ranking's scores
param sum_sprite_roms_low a0 sums
# the third byte of a mask ROM read, for add_to_rom_sums
param sum_sprite_roms_high d6 third_byte
# 001B0A "move.w D7, ($4,A0)" where the sums go, the ranking's scores
param sum_sprite_roms_high a0 sums
# 001B9C "bsr $1d06" the third byte of a mask ROM read, for add_to_rom_sums
local sum_sprite_rom_banks 001B9C d6 third_byte
# 001CDA "move.w D7, ($8,A0)" where the sums go, the ranking's scores
param sum_tile_roms a0 sums
# 00929A "moveq #$0, D7" what the frame left in D7: the bits above the banks' byte
param run_palette_requests d7 bank_bits
# 0093A8 "movea.l (A5,D6.w), A5" 0093B6 "adda.l #$200, A5" the bank's place in the palette RAM, the second half 0x200
# on
local palette_request_area 0093A8,0093B6 a5 bank_place
# 009434 "movea.l (A5,D6.w), A5" 009442 "adda.l #$200, A5" the bank's place in the palette RAM, the second half 0x200
# on
local palette_request_set_next_bank 009434,009442 a5 bank_place
# 0094AC "movea.l (A5,D6.w), A5" 0094BA "adda.l #$200, A5" the bank's place in the palette RAM, the second half 0x200
# on
local palette_request_list 0094AC,0094BA a5 bank_place
# 00953C "movea.l (A5,D6.w), A5" the bank's place in the palette RAM
local palette_request_colours 00953C a5 bank_place
# 009544 "move.b (A6)+, D6" the palette of the colour, a byte of the list
local palette_request_colours 009544 d6 palette_number
# 009598 "movea.l (A5,D6.w), A5" 0095A6 "adda.l #$200, A5" the bank's place in the palette RAM, the second half 0x200
# on
local palette_request_black 009598,0095A6 a5 bank_place
# where the balloon is in the fixed layer (its tile RAM place, kept in balloon_place too), what show_balloon works out
# from the place given
param draw_balloon_pointer a6 balloon_tile_place
# where the balloon is in the fixed layer (its tile RAM place, kept in balloon_place too), what show_balloon works out
# from the place given
param say_youre_dead_shell_brain a6 balloon_tile_place
# the balloon's tile bank, as show_balloon leaves it
param say_shell_shock d4 bank
# the balloon's fourth row's tile, as show_balloon leaves it
param say_shell_shock d6 fourth_row_tile
# 03016A "movea.l $633f8.l, A6" where the balloon is in the fixed layer (its tile RAM place, kept in balloon_place
# too), what show_balloon works out from the place given
param draw_wide_balloon_pointer a6 balloon_tile_place
# where the balloon is in the fixed layer (its tile RAM place, kept in balloon_place too), what show_balloon works out
# from the place given
param show_balloon_beside a6 balloon_tile_place
# 030260 "lea $30350.l, A6" where the balloon is in the fixed layer (its tile RAM place, kept in balloon_place too),
# what show_balloon works out from the place given
param show_balloon a6 balloon_tile_place
# 0302FA "move.b D3, D6" 030304 "addi.b #$30, D6" 030308 "bra $30320" the fourth row's first tile, 0x30 past the first
# row's
local show_balloon 0302FA,030304,030308 d6 last_row_tile
# 030308 "bra $30320" the fourth row's tile draw_balloon_rows leaves, handed back to the caller
param show_balloon d6 fourth_row_tile
# 001F44 "move.l D7, D4" what the caller left in D4, given back when no game is on
param add_point d4 kept_bits
# what the drawing leaves in D4: the lives (draw_lives), the health bar's offset (draw_health_bar)
param draw_player_box d4 drawn
# the text's colour print_text_at leaves
param draw_player_message d4 colour
# the text's colour print_text_at leaves
param message_insert_coin d4 colour
# the text's colour print_text_at leaves
param message_press_start d4 colour
# the text's colour print_text_at leaves
param message_out_of_lives d4 colour
# the text's colour print_text_at leaves
param message_clear d4 colour
# 002770 "move.b D7, D4" what the caller left in D4: the place's offset goes in its low byte, the colour on it
param print_text_at d4 colour_bits
# 002698 "moveq #$0, D6" the positioned text printed, 0 here, for print_text_at
param message_insert_coin d6 text_number
# 0026B4 "move.b $600a5.l, D6" the positioned text printed by the blink's phase, for print_text_at
param message_press_start d6 text_number
# 0026F8 "move.b $600a5.l, D6" the positioned text printed by the blink's phase, for print_text_at
param message_out_of_lives d6 text_number
# 002756 "moveq #$1, D6" the positioned text printed, 1 here, for print_text_at
param message_clear d6 text_number

# ======== batch 8d: the last pointers read through the bus, typed where they are loaded ========
# an enemy's reactions, a byte for each side it can be hit on (its definition's 48 bytes from +58: field enemy_definition
# 58 reactions): negative, it is knocked down; else the move it reacts with, times 4 (048E60 "tst.b (A6,D1.w)", 048ECC
# "move.b (A6,D1.w), D1", 048ED0 "lsl.w #2, D1")
elements reaction u8
# 048E58 "movea.l ($24,A0), A6" 048E5C "adda.w #$58, A6" 048E60 "tst.b (A6,D1.w)" (and 048E96, 048EC8 after 048E92 and
# 048EC4): the enemy's definition's reactions, read by the side it was hit on
local enemy_hit 048E5C,048E96,048EC8 a6 reactions reaction
# 04D68A "movea.l ($24,A0), A6" 04D68E "adda.w #$58, A6" 04D692 "tst.b (A6,D1.w)": the rocket soldier's reactions, the
# same
local enemy_rocket_soldier_struck 04D68E a6 reactions reaction
# 01C2DA "movea.l ($28,A0), A6" 01C2DE "move.w ($28,A6), D0": the object that hit the turtle (turtle hit_by), whose
# hit_sound picks the sound of the reaction
local turtle_hit 01C2DA a6 hit_by object
# 052286 "move.w ($48,A0), D0" the brake added to the speed, then 0522A0 "move.b #$ff, D0" the balloon's side for
# say_do_not_resist_us (its on_right, FF: on the right) in the low byte, over the brake's high byte: one variable,
# since the call reads the whole of D0
local enemy_rodney_slide_to_stop 052286,0522A0 d0 on_right
