$90BE00 ; Csed by fighter pirates, reflec, and bang to delete samus projectile and produce a new one (used in shot reaction AI and special hitbox coding) $A08687 ; Handle room shaking. 183E contains shake type, looks up displacement in table at $A0872D (2 byte values in pixels: BG1 X, BG1 Y, BG2 X, BG2 Y) $A0884D ; Something for sprites and sounds $A08EB6 ; Determine which enemies to process $A08FD4 ; Main routine. See MainEnemyRoutine.txt $A09169 ; Handles Samus getting hurt? $A09423 ; Draws enemies, 1 at a time $A0957E ; Decrements frozen timer, checks if ice beam is equipped $A09726 ; Something for the graphic update table. Unknown $A09758 ; Interaction with Samus, depends on $0F88,X's 2 bit. If set:(projectiles: JSR $9B7F, bombs: JSR $9D23, Samus: JSR $9A5A) Not set:(projectiles: JSR $A143, bombs: JSR $A236, Samus: JSR $A07A) $A09785 ; Bomb Jump routine $A09894 ; Enemy/Room projectiles/objects collisions with Samus. Only does default routine, no customizable options. $A0996C ; Enemy/Room projectiles/objects collisions with Samus's projectiles. $A09A5A ; Check for collision with Samus. If they collide, JSL to that hitbox's 0Ath byte (Samus collision code). This routine disables Samus's invincibility if she is using blue suit or screw attack; if there are no enemies she'll get invincibility time with them. $A09B7F ; Check for collisions of all of the enemy's sprites/hitboxes in $0F8E with all projectiles. If there's a collision, JSL $A09D17 then RTS. $A09D17 ; Small routine, just JML to code for enemy/projectile detection. Address used is at (($0F8E,X),(8*n1)),(C*n2). n1 = sprite number, n2 = hitbox number $A09F6D ; Clears some enemy RAM $0F8A, $0FA0, $0F9E, $0FA2 $A09F7D ; Grapple reaction (enemy freeze) $A09FC4 ; Grapple reaction (enemy die) $A09FDF ; Makes enemy run frozen AI pointer $A09FE9 ; Grapple reaction (enemy freeze + other stuffs) $A0A03E ; Grapple reaction (enemy unresponsive?) $A0A070 ; Makes enemy run frozen AI pointer $A0A143 ; Check for collisions of main hitbox with all projectiles. If there's a collision, JSL $A0A226 then RTS. $A0A226 ; Small routine, just JML to code for enemy/projectile detection. Address used is projectile pointer in enemy rom ($0F78 + 32) $A0A3AF ; Death animation $A0A45E ; Divide damage (A) by 4 for Gravity, or 2 for Varia. Nothing if neither suit. Result in A and $12 $A0A477 ; Enemy touch AI (enemy die on contact) $A0A497 ; General enemy touch AI (contact damage to samus) $A0A597 ; Alternate touch AI (enemy die on contact) $A0A5B7 ; General enemy touch AI (contact damage to enemy) $A0A63D ; A common hit routine, I think. JSR $A6DE, display the 'hit' graphic if applicable. If enemy is at 0 health, set 7E:7002,X to the projectile type ($0C18,Y, AND #$0F00), and play the death animation (JSL $A0A3AF) $A0A6A7 ; Clear enemy hit flag, runs A6DE (beam damage etc.) $A0A6DE ; Handles beam damage, freezing, and sound. $A0A8BC ; Creates a dud shot (graphic and kills projectile) $A0A8F0 ; Checks for collisions with (active) enemies, and puts something in A depending on the collisions. 0000 means no collisions, FFFF means yes collision(s). Sets 7E:182C,X and 7E:1834,X, 7E:184A - 7E:185B (see RAMMap.txt) $A0AD70 ; Determines if enemy is on screen or not, LDA 0000 or 0001 dependent $A0ADE7 ; Determines if enemies with normal sprites are off screen. I guess. 1 at a time $A0AEDD ; Subtract Samus Y position from enemy Y position and end $A0AEE5 ; Subtract Samus X position from enemy X position and end $A0AEED ; Samus/enemy colission detection (boundary calculations) LDA 0 or 1 dependant $A0AF0B ; Checks if enemy is in proximity to Samus (A= 0000 or 0001 depending) $A0B067 ; Get the absolute value of A (also into $0E32) $A0B07D ; X distance from samus to enemy (values inverted depending on direction) $A0B0B2 ; Cosine multiplication. (cos (A * 128/pi) * 0E32) --> 0E36.0E39 $A0B0C6 ; Sine multiplication, (-sin (A * 128/pi) * 0E32) --> 0E36.0E39 $A0B3C3 ; Table of -cos values (2 bytes each, values from FF00 to 0100. Angle (index/2) from 0 to 13F) $A0B443 ; Table of sin values (2 bytes each, values from FF00 to 0100. Angle (index/2) from 0 to FF) $A0B6FF ; 16bit ($26) * 16bit ($28) = 32bit ($2A) $A0B92B ; Calculates X/Y position then spawns enemy specific projectiles (probably spawns fighter pirate energy/ammo drops after dying) $A0BB70 ; Call after pushing a X then Y pixel position onto the stack (2 bytes each). 0DC4 is set with block #, and stack is also cleaned up (do not try to pull Y and X position from stack) $A0BBBF ; Lots of enemy boundary calculations (seems to be trying to find it's location in room, possibly calculating x distance movement). Used by walking pirates, looks like it's vertical collision routine to stop it from falling? NOP'd with no observable effects... (only runs when walking left) $A0C0AE ; Rough angle calculation given X (in $12) and Y (in $14). Angle 0 = up (-Y), 40 = right (X), 80 = down (Y), C0 = left (-X) $A0C18E ; Determines if enemy is leaving screen SEC (A=0001 and enemy leaving screen) or CLC (A=0000 enemy still on screen) dependent $A0C26A ; Enemy instruction AI loop (uses $0F92) $A0C6AB ; Common horizontal movement routine, moves by $14.$12. TODO $A0C786 ; Common vertical movement routine, moves by $14.$12. TODO $A0C8AD ; X must hold enemy pointer. Align enemy vertically to slopes if currently in contact with slopes. $B4BC26 ; Creates enemy-related sprites like dud shots and hits (no sound). $12/$14 is X/Y, $16 is type. $18 is probably pallete or something... Used by Draygon for Evirs 0000 = Charge beam shine 0001 = 3 charge beam spots 0002 = 3 different charge beam spots, plus yellow shine (?) 0003 = Normal explosion 0004 = Bomb explosion 0005 = crumbling lights? Don't recognize it at all 0006 = Dud enemy explosion 0007 = Power bomb (lol) 0008 = Elevator light (larger than elevator) 0009 = Smoke (might be the stuff during exploding Ceres/Zebes) 000A = Small smoke (no idea where it's used) 000B = Water splash (footsteps in certain areas) 000C = Yellow smoke (I recognize it, but I don't remember where it's from) 000D = Small energy 000E = Large energy 000F = Bomb 0010 = Small energy (?), slow animation 0011 = Very similar to screw attack/speed run debris 0012 = Large smoke, fast animation (no idea where it's used) 0013 = Large smoke, fast animation + something in the center at the end of the animation 0014 = Large smoke, fast animation + something larger in the center 0015 = Large smoke, normal animation (used by Draygon at least) 0016 = Looks like miscolored plasma beam... 0017 = Fast miscolored plasma beam 0018 = Air bubbles, used by Samus and Draygon 0019 = Save station lights 001A = Slow closing gate 001B = Fast opening gate 001C = Elevator (doesn't go away) 001D = Large explosion 001E+ = Glitchy stuff (tested 1E, 1F, 20, 24, 31, 35, 36, 38, 40) 0032 = Looks like crackling electricity, doesn't go away. Supposedly used by something.. metroids? 0033 = More crackling electricity (might not be used) 0034 = Glitchy. Rapidly flashing stuff, shape suggests it's supposed to be a Metroid shell. Supposedly used, probably by Metroids 0037 = Freeze hit (used) 003B = Evirs that assist Draygon (facing left) 003C = Evirs that assist Draygon (facing right) 003D = Big air bubbles, used by Draygon