;;; $8000..8686: Common to all enemy banks ;;;
    ;;; $8000..45: Common enemy AI ;;;
        ;;; $8000: Grapple AI - no interaction. Also unfreezes enemies(!) ;;;
        ;;; $8005: Grapple AI - Samus latches on ;;;
        ;;; $800A: Grapple AI - kill enemy ;;;
        ;;; $800F: Grapple AI - cancel grapple beam ;;;
        ;;; $8014: Grapple AI - Samus latches on - no invincibility ;;;
        ;;; $8019: Unused. Grapple AI - Samus latches on - paralyse enemy ;;;
        ;;; $801E: Grapple AI - hurt Samus ;;;
        ;;; $8023: Normal enemy touch AI ;;;
        ;;; $8028: Normal touch AI - no death check ;;;
        ;;; $802D: Normal enemy shot AI ;;;
        ;;; $8032: Normal enemy shot AI - no death check, no enemy shot graphic ;;;
        ;;; $8037: Normal enemy power bomb AI ;;;
        ;;; $803C: Normal enemy power bomb AI - no death check ;;;
        ;;; $8041: Normal enemy frozen AI ;;;
    ;;; $8046: Creates a dud shot ;;;
    ;;; $804B: RTS ;;;
    ;;; $804C: RTL ;;;
    ;;; $804D: Spritemap - nothing ;;;
    ;;; $804F: Extended spritemap - nothing ;;;
    ;;; $8059: Hitbox - nothing ;;;
    ;;; $8067: Instruction list - delete enemy ;;;
    ;;; $8069: Two NOPs ;;;
    ;;; $806B..8186: Instructions ;;;
        ;;; $806B: Instruction - enemy $0FB2 = [[Y]] ;;;
        ;;; $8074: Instruction - enemy $0FB2 = RTS ;;;
        ;;; $807C: Instruction - delete enemy ;;;
        ;;; $808A: Instruction - call function [[Y]] ;;;
        ;;; $809C: Instruction - call function [[Y]] with A = [[Y] + 2] ;;;
        ;;; $80B5: Unused. Instruction - call external function [[Y]] ;;;
        ;;; $80CE: Unused. Instruction - call external function [[Y]] with A = [[Y] + 3] ;;;
        ;;; $80ED: Instruction - go to [[Y]] ;;;
        ;;; $80F2: Instruction - go to [[Y]] + ±[[Y]] ;;;
        ;;; $8108: Instruction - decrement timer and go to [[Y]] if non-zero ;;;
        ;;; $8110: Instruction - decrement timer and go to [[Y]] if non-zero ;;;
        ;;; $8118: Instruction - decrement timer and go to [Y] + ±[[Y]] if non-zero ;;;
        ;;; $8123: Instruction - timer = [[Y]] ;;;
        ;;; $812C: Instruction - skip next instruction ;;;
        ;;; $812F: Instruction - sleep ;;;
        ;;; $813A: Instruction - wait [[Y]] frames ;;;
        ;;; $814B: Instruction - transfer [[Y]] bytes from [[Y] + 2] to VRAM [[Y] + 5] ;;;
        ;;; $8173: Instruction - enable off-screen processing ;;;
        ;;; $817D: Instruction - disable off-screen processing ;;;
    ;;; $8187: Common enemy speeds - linearly increasing ;;;
    ;;; $838F: Common enemy speeds - quadratically increasing ;;;
;;; $8687..884C: Room shaking ;;;
    ;;; $8687: Handle room shaking ;;;
    ;;; $8712: Set all active enemies to shake horizontally for two frames ;;;
    ;;; $872D: BG shake displacements ;;;
;;; $884D: Draw Samus, projectiles, enemies and enemy projectiles ;;;
;;; $88D0..8EB5: Enemy loading ;;;
    ;;; $88D0: Record enemy spawn data ;;;
    ;;; $896F: Debug. Load enemy set data ;;;
    ;;; $8A1E: Load enemies (load and process enemy set, clear enemy data, load enemy tile data) ;;;
    ;;; $8A6D: Clear enemy data and process enemy set ;;;
    ;;; $8A9E: Initialise enemies ;;;
    ;;; $8BF3: Load enemy GFX indices ;;;
    ;;; $8C6C: Load enemy tile data ;;;
    ;;; $8CD7: Transfer enemy tiles to VRAM and initialise enemies ;;;
    ;;; $8D3A: Unused. Load enemy width, height, health, layer and bank ;;;
    ;;; $8D64: Process enemy set (load palettes and enemy loading data) ;;;
;;; $8EB6: Determine which enemies to process ;;;
;;; $8FD4: Main enemy routine ;;;
;;; $9169: Decrement Samus hurt timers and clear active enemy indices lists ;;;
;;; $918B: Unused. Logging routine for a specific vertical enemy reaction ;;;
;;; $920E: Spawn enemy drops ;;;
;;; $922B: Delete enemy and any connected enemies ;;;
;;; $924B: Debug. Spawn enemy to enemy index [Y] ;;;
;;; $9275: Spawn enemy ;;;
;;; $92DB: Spawn enemy ;;;
;;; $9423: Add enemy to drawing queue ;;;
;;; $944A: Write enemy OAM (if not on frozen or invincible frame) ;;;
;;; $957E: Normal enemy frozen AI ;;;
;;; $95AD: Unused. Execute enemy AI ;;;
;;; $95F1: Unused. Respawn enemy ;;;
;;; $96CA: Process extended tilemap ;;;
;;; $9726: Handle queuing enemy BG2 tilemap VRAM transfer ;;;
;;; $9758..A3AE: Enemy collision handling ;;;
    ;;; $9758: Enemy collision handling ;;;
    ;;; $9784: RTL ;;;
    ;;; $9785: Samus / projectile interaction handling ;;;
    ;;; $9894: Enemy projectile / Samus collision handling ;;;
    ;;; $9923: Handle enemy projectile collision with Samus ;;;
    ;;; $996C: Enemy projectile / projectile collision handling ;;;
    ;;; $99F9: Handle enemy projectile collision with projectile ;;;
    ;;; $9A5A: Enemy / Samus collision handling - extended spritemap ;;;
    ;;; $9B7F: Enemy / projectile collision handling - extended spritemap ;;;
    ;;; $9D23: Enemy / bomb collision handling - extended spritemap ;;;
    ;;; $9E9A: Enemy / grapple beam collision detection ;;;
    ;;; $9F6D..A079: Enemy grapple AIs ;;;
        ;;; $9F6D: Switch enemy AI to main AI ;;;
        ;;; $9F7D: Samus latches on with grapple ;;;
        ;;; $9FC4: Enemy grapple death ;;;
        ;;; $9FDF: Switch to frozen AI ;;;
        ;;; $9FE9: Samus latches on with grapple - no invincibility ;;;
        ;;; $A03E: Samus latches on with grapple - paralyse enemy ;;;
        ;;; $A070: Switch to frozen AI ;;;
    ;;; $A07A: Enemy / Samus collision handling ;;;
    ;;; $A143: Enemy / projectile collision handling ;;;
    ;;; $A236: Enemy / bomb collision handling ;;;
    ;;; $A306: Process enemy power bomb interaction ;;;
;;; $A3AF: Enemy death ;;;
;;; $A410: Rinka death ;;;
;;; $A45E: Suit damage division ;;;
;;; $A477..A596: Normal enemy touch AI ;;;
    ;;; $A477: Normal enemy touch AI ;;;
    ;;; $A497: Normal enemy touch AI - no death check (external) ;;;
    ;;; $A4A1: Normal enemy touch AI - no death check ;;;
;;; $A597..A63C: Normal enemy power bomb AI ;;;
    ;;; $A597: Normal enemy power bomb AI ;;;
    ;;; $A5B7: Normal enemy power bomb AI - no death check (external) ;;;
    ;;; $A5C1: Normal enemy power bomb AI - no death check ;;;
;;; $A63D..A8BB: Normal enemy shot AI ;;;
    ;;; $A63D: Normal enemy shot AI ;;;
    ;;; $A6A7: Normal enemy shot AI - no death check, no enemy shot graphic (external) ;;;
    ;;; $A6B4: Normal enemy shot AI - no death check ;;;
    ;;; $A6DE: Normal enemy shot AI - no death check, no enemy shot graphic ;;;
;;; $A8BC: Creates a dud shot ;;;
;;; $A8F0: Samus / solid enemy collision detection ;;;
;;; $ABE7..C269: Utility functions ;;;
    ;;; $ABE7: Check if enemy is touching Samus from below ;;;
    ;;; $AC29: Unused. Check if Samus is touching enemy from above ;;;
    ;;; $AC67: Check if enemy is touching Samus ;;;
    ;;; $ACA8: Calculate distance and angle of Samus from enemy ;;;
    ;;; $AD33: Unused. Enemy $0FB0 = max(0, [enemy $0FB0] - 1). If [enemy $0FB0] = 0, A = 1, else A = 0 ;;;
    ;;; $AD4F: Unused. A = sgn([A]) (zero is special case) ;;;
    ;;; $AD62: Unused. A = |[A]| ;;;
    ;;; $AD70: Check if enemy centre is on screen or not ;;;
    ;;; $ADA3: Check if enemy centre is over [A] pixels off-screen ;;;
    ;;; $ADE7: Check if enemy is on screen or not off screen ;;;
    ;;; $AE29: Determine direction of Samus from enemy ;;;
    ;;; $AE7C: Unused. Proto instruction list handler ;;;
    ;;; $AEDD: A = [Samus Y position] - [enemy Y position] ;;;
    ;;; $AEE5: A = [Samus X position] - [enemy X position] ;;;
    ;;; $AEED: Is Samus within [A] pixel rows of enemy ;;;
    ;;; $AF0B: Is Samus within [A] pixel columns of enemy ;;;
    ;;; $AF29..A1: Move enemy (no collision) ;;;
        ;;; $AF29: Unused. Enemy X += [$14].[$12] ;;;
        ;;; $AF3B: Unused. Enemy Y += [$14].[$12] ;;;
        ;;; $AF4D: Unused. Move enemy left/right/up/down by [$14].[$12] ;;;
        ;;; $AF5A: Enemy X -= [$14].[$12] ;;;
        ;;; $AF6C: Enemy X += [$14].[$12] ;;;
        ;;; $AF7E: Enemy Y -= [$14].[$12] ;;;
        ;;; $AF90: Enemy Y += [$14].[$12] ;;;
    ;;; $AFA2..E9: Unused. Move Samus ;;;
        ;;; $AFA2: Unused. Extra Samus X displacement = [Samus X position] - [$14].[$12] ;;;
        ;;; $AFB4: Unused. Extra Samus X displacement = [Samus X position] + [$14].[$12] ;;;
        ;;; $AFC6: Unused. Extra Samus Y displacement = [Samus X position] - [$14].[$12] ;;;
        ;;; $AFD8: Unused. Extra Samus Y displacement = [Samus X position] + [$14].[$12] ;;;
    ;;; $AFEA..B0B1: Trivial maths ;;;
        ;;; $AFEA: Sign extend A ;;;
        ;;; $AFFD: Unused. A *= 10h ;;;
        ;;; $B002: A *= 20h ;;;
        ;;; $B008: Unused. A *= 30h ;;;
        ;;; $B018: Unused. A *= 40h ;;;
        ;;; $B01F: Unused. A = xxyz -> A = xxzy ;;;
        ;;; $B040: Unused. A = xyzz -> A = yxzz ;;;
        ;;; $B061: Unused. A = xxyy -> A = yyxx ;;;
        ;;; $B067: A = |[A]| ;;;
        ;;; $B07D: A = |[Y] - [X]| ;;;
        ;;; $B0A0: Unused. A = -[A] ;;;
        ;;; $B0A5: Unused. A = sgn([A]) (zero counts as positive) ;;;
    ;;; $B0B2: 8-bit cosine multiplication ;;;
    ;;; $B0C6: 8-bit negative sine multiplication ;;;
    ;;; $B0DA: 8-bit sine multiplication ;;;
    ;;; $B133: Addresses for enemy drawing queues ;;;
    ;;; $B143: Sine/cosine tables ;;;
    ;;; $B643: ($16.$18, $1A.$1C) = ([$14] * |cos([$12] * pi / 80h)|, [$14] * |sin([$12] * pi / 80h)|) ;;;
    ;;; $B691: Move enemy according to angle and X/Y speeds ;;;
    ;;; $B6FF: 16bit ($26) * 16bit ($28) = 32bit ($2A) ;;;
    ;;; $B761: 32-bit unsigned division ;;;
    ;;; $B7A1: Cap scrolling speed ;;;
    ;;; $B7EE: Unsigned sine table ;;;
    ;;; $B8EE..BB6F: Enemy death item drop routines ;;;
        ;;; $B8EE: Fake Kraid death item drop routine ;;;
        ;;; $B92B: Gold ninja space pirate death item drop routine ;;;
        ;;; $B968: Metroid death item drop routine ;;;
        ;;; $B9A5: Ridley death item drop routine ;;;
        ;;; $B9D8: Crocomire death item drop routine ;;;
        ;;; $BA0B: Phantoon death item drop routine ;;;
        ;;; $BA3E: Botwoon death item drop routine ;;;
        ;;; $BA71: Kraid death item drop routine ;;;
        ;;; $BAA4: Bomb Torizo death item drop routine ;;;
        ;;; $BAD7: Golden Torizo death item drop routine ;;;
        ;;; $BB0A: Spore Spawn death item drop routine ;;;
        ;;; $BB3D: Draygon death item drop routine ;;;
    ;;; $BB70: Calculate the block containing a pixel position ;;;
    ;;; $BB9B: Check if X distance between enemy and Samus is at least [A] ;;;
    ;;; $BBAD: Unused. Check if Y distance between enemy and Samus is at least [A] ;;;
    ;;; $BBBF..C04D: Enemy "solid" block collision detection ;;;
        ;;; $BBBF: Check for horizontal "solid" block collision ;;;
        ;;; $BC76: Check for vertical "solid" block collision ;;;
        ;;; $BD26: Unused. Move enemy right by [$14].[$12], no block collision reactions ;;;
        ;;; $BDF6: Unused. Move enemy down by [$14].[$12], no block collision reactions ;;;
        ;;; $BEBF: Unused. Check for horizontal "solid" block collision ;;;
        ;;; $BF8A: Check for vertical "solid" block collision ;;;
    ;;; $C04E..C18D: Calculate angle ;;;
        ;;; $C04E: Calculate angle of Samus from enemy projectile ;;;
        ;;; $C066: Calculate angle of Samus from enemy ;;;
        ;;; $C07E: Unused. Calculate angle of enemy [Y] from enemy [X] ;;;
        ;;; $C096: Calculate angle of enemy [X] from enemy [Y] ;;;
        ;;; $C0AE: Calculate angle of ([$12], [$14]) offset ;;;
        ;;; $C0B1: Calculate angle of (x, y) offset ;;;
        ;;; $C112: Calculate angle of (x, y) offset - bottom right upper octant ;;;
        ;;; $C120: Calculate angle of (x, y) offset - bottom right lower octant ;;;
        ;;; $C132: Calculate angle of (x, y) offset - top right upper octant ;;;
        ;;; $C13C: Calculate angle of (x, y) offset - top right lower octant ;;;
        ;;; $C14E: Calculate angle of (x, y) offset - bottom left lower octant ;;;
        ;;; $C15C: Calculate angle of (x, y) offset - bottom left upper octant ;;;
        ;;; $C16E: Calculate angle of (x, y) offset - top left lower octant ;;;
        ;;; $C17C: Calculate angle of (x, y) offset - top left upper octant ;;;
    ;;; $C18E: Check if enemy is horizontally off-screen ;;;
    ;;; $C1B1: Unused. Check if enemy is vertically off-screen ;;;
    ;;; $C1D4: Unused. Assess Samus threat level ;;;
;;; $C26A: Process enemy instructions ;;;
;;; $C2BC..C9BE: Enemy block collision handling ;;;
    ;;; $C2BC: Clear carry ;;;
    ;;; $C2BE: Set carry ;;;
    ;;; $C2C0: Enemy block collision reaction - spike ;;;
    ;;; $C2FA: Enemy block collision reaction - horizontal - slope ;;;
    ;;; $C319: Enemy block collision reaction - vertical - slope ;;;
    ;;; $C32E: Enemy block collision reaction - horizontal - slope - square ;;;
    ;;; $C3B2: Enemy block collision reaction - vertical - slope - square ;;;
    ;;; $C435: Square slope definitions ;;;
    ;;; $C449: Enemy block collision reaction - horizontal - slope - non-square ;;;
    ;;; $C51F: Enemy block collision reaction - vertical - slope - non-square ;;;
    ;;; $C619: Enemy block collision reaction - horizontal extension ;;;
    ;;; $C64F: Enemy block collision reaction - vertical extension ;;;
    ;;; $C69D: Move enemy right by [$14].[$12], treat slopes as walls ;;;
    ;;; $C6A4: Move enemy right by [$14].[$12], process slopes ;;;
    ;;; $C6AB: Move enemy right by [$14].[$12], ignore slopes ;;;
    ;;; $C6AD: Move enemy right by [$14].[$12] ;;;
    ;;; $C778: Unused. Move enemy down by [$14].[$12] ;;;
    ;;; $C77F: Unused. Move enemy down by [$14].[$12] ;;;
    ;;; $C786: Move enemy down by [$14].[$12] ;;;
    ;;; $C788: Move enemy down by [$14].[$12] ;;;
    ;;; $C845: Enemy horizontal block reaction ;;;
    ;;; $C879: Enemy vertical block reaction ;;;
    ;;; $C8AD: Align enemy Y position with non-square slope ;;;
;;; $C9BF: Unused. Common enemy projectile speeds - linearly increasing ;;;
;;; $CBC7: Common enemy projectile speeds - quadratically increasing ;;;
;;; $CEBF: Enemy headers ;;;
;;; $F7D3: Free space ;;;