;;; WRAM ;;; { Slot ID Enemy Enemy RAM 0 $E4BF Phantoon body $0F78..0FB7 1 $E4FF Phantoon eye $0FB8..0FF7 2 $E53F Phantoon tentacles $0FF8..1037 3 $E57F Phantoon mouth $1038..1077 ; Phantoon body $0FA8: Flame counter during fight intro. Movement index during figure-8 movement. Explosion loop counter during death sequence $0FAA: Starting flames activation flag. Subspeed during figure-8 movement $0FAC: Speed (number of movement data pairs to add) during figure-8 movement. Negative = reversed movement $0FAE: Movement stage. 0 = slowly accelerating, 1 = quickly accelerating, 2 = decelerating $0FB0: Function timer $0FB2: Function $0FB4: Parameter 1. Unused $0FB6: Parameter 2, Phantoon part index in initialisation, 0 = body. Then flame rain triggered flag ; Phantoon eye $0FE8: Eye timer. Time until eye opens and Phantoon chooses to be vulnerable $0FEA: Set to 6 or 8 according to $1076 in enemy shot if damaged and not enraged. Never read $0FEC: Reversed movement flag. Fade counter during death sequence explosions. Mosaic options during death sequence mosaic (see $57) $0FEE: Palette change denominator $0FF0: Palette change numerator $0FF2: Fade complete flag. Rage round counter when enraged $0FF4: Wavy Phantoon mode { 0: Disabled 1: Doubled wavelength (death sequence wavy Phantoon) 2: Normal (intro wavy Phantoon) } $0FF6: Parameter 2, Phantoon part index in initialisation, 1 = eye ; Phantoon tentacles $1028: Swooping triggered flag. Set if hit during the small pause when Phantoon materialises $102A: Phantoon round damage $102C: X velocity during swooping. Unit 1/100h px/frame. Range -1C0h..1C0h $102E: Y velocity during swooping. Unit 1/100h px/frame. Range 40h..D8h $1030: Target X position whilst swooping. Sign bit acts as increasing/decreasing flag. Set to 0 when swooping begins $1032: Explosion index $1034: Next wavy Phantoon mode $1036: Parameter 2, Phantoon part index in initialisation, 2 = tentacles. Sometimes set to 1 or 2 by enemy shot, but never read $1037: Hurt flash palette loaded flag ; Phantoon mouth $1068: Casual flame pattern. Range 0..3. Indexes $A7:CCFD, a table of pointers to casual flame timer lists $106A: Casual flame timer $106C: Casual flame pattern index. Indexes list of casual flame timers for current pattern $106E: Wavy Phantoon amplitude. Unit 1/100px $1070: Wavy Phantoon phase delta direction. 0 = growing, 1 = shrinking $1072: Wavy Phantoon phase delta. Always 8 $1074: Semi-transparency HDMA object control. Initialised to 0, set to 8001h when fade-in starts, 1 when fade-in ends, FFFFh when dead { xx00h: Layer blending configuration is set to 4 (BG2 disabled) xxFFh: Delete Phantoon semi-transparency HDMA object Otherwise: Layer blending configuration is unchanged (either default or 1Ah if semi-transparency is enabled via $198B) } $1076: Parameter 2, Phantoon part index in initialisation, 3 = mouth. Sometimes set to [random number] % 8 in enemy shot, set to 1 by death sequence, never read $7E:2000..2FFF: BG2 tilemap (initialised to 0338h). Size = 360h bytes. Modified by instruction lists via extended tilemap entries { $21C6..0D: Eye - row 0 $2206..0D: Eye - row 1 { $2208..0B: Eyeball - row 0 } $2246..0D: Eye - row 2 { $2248..4B: Eyeball - row 1 } $2286..0D: Eye - row 3 $2304..05: Left tentacle - row 0 $2306..0D: Mouth - row 0 $230E..0F: Right tentacle - row 0 $2344..45: Left tentacle - row 1 $2346..4D: Mouth - row 1 $234E..4F: Right tentacle - row 1 } $7E:9000..97FF: Initialised to 0 { $7E:9000..19: Wavy Phantoon indirect HDMA table { If Phantoon wavelength doubled: C0h,$9100, C0h,$9180, C0h,$9100, C0h,$9180, 00,00 Else: A0h,$9100, A0h,$9140, A0h,$9100, A0h,$9140, A0h,$9100, A0h,$9140, A0h,$9100, A0h,$9140, 00,00 } $7E:9032: Materialisation sound effect index $7E:9100..FF: Wavy Phantoon HDMA data table } } ;;; Execution flow ;;; { $CDF3: Phantoon body initialisation { Function timer = 78h Spawn HDMA object with instruction list $CE96. Used only for the pre-instruction $88:E449, which may set layer blending configuration to 4 or 1Ah } $CE55: Phantoon common initialisation { Enemy function = $D4A9 Enemy instruction timer = 1 Phantoon body instruction list pointer = $CC41 (body - invulnerable) Phantoon eye instruction list pointer = $CC7B (eye - closed) Phantoon tentacles instruction list pointer = $CCD7 (tentacles) Phantoon mouth instruction list pointer = $CCF7 (mouth - initial) } $CEA6: Phantoon main AI (Phantoon body only) { Execute Phantoon function } Phantoon functions: { $D4A9: Fight intro { $D4A9: Spawn circle of flames $D4EE: Spin circle of flames $D508: Start wavy fade in $D54A: Wavy fade in $D596: Pick first pattern { Phantoon function = $D5E7 (figure-8) } } $D5E7: Figure-8 { ; Set by Phantoon eye instruction list $CC81 (close and pick new pattern) $D5E7: Moving { Set Phantoon mouth instruction list to $CCEB (spawn flame) Phantoon function = RTS Set Phantoon eye instruction list to $CC53 (open) } $D60D: Vulnerable window { ; Set by Phantoon eye instruction list $CC53 (open) If swooping not triggered: Set Phantoon body instruction list to $CC41 (invulnerable) Set Phantoon eye instruction list to $CC81 (close and pick new pattern) Phantoon function = RTS } $D65C: Swooping triggered { Phantoon function = $D678 (swooping) } } $D678: Swooping { $D678: Opaque { Set Phantoon body instruction list to $CC41 (invulnerable) Set Phantoon eye instruction list to $CC91 (close) } $D6B9: Fading out { ; Set by enemy touch Phantoon function = $D6D4 (hiding before figure-8) } $D92E: Fatal damage { ; Set by enemy touch Phantoon function = $D948 (death sequence) } } $D6D4: Hiding before figure-8 { $D6D4: Hiding $D6E2: Place Phantoon $D72D: Fading in { Phantoon function = $D5E7 (figure-8) } } $D82A: Flame rain { ; Set by Phantoon eye instruction list $CC81 (close and pick new pattern) $D82A: Initial flame rain { Set Phantoon mouth instruction list to $CCEB (spawn flame) } $D73F: Show Phantoon { Set Phantoon body instruction list to $CC47 (full hitbox) Set Phantoon eye instruction list to $CC9D (eyeball - centred) } $D767: Make Phantoon vulnerable $D788: Vulnerable window { If swooping triggered: Phantoon function = $D678 (swooping) Else: Phantoon body instruction list pointer = $CC41 (invulnerable) Phantoon eye instruction list pointer = $CC91 (close) } $D7D5: Fading out $D7F7: Subsequent flame rain { Phantoon function = $D73F } } $D85C: Enraged { ; Set by enemy touch $D85C: Fading out before rage $D874: Hiding $D891: Fading in $D8AC: Rage { Set Phantoon eye instruction list to $CC91 (close) } $D916: Fading out after rage { Phantoon function = $D6D4 (hiding before figure-8) } } $D948: Death sequence { ; Set by enemy touch $D948: Fading in and out $D98B: Exploding $DA51: Set up wavy mosaic Phantoon $DA86: Wavy mosaic Phantoon $DAD7: Clear graphics $DB3D: Activate Wrecked Ship } } } ;;; Enemy headers ;;; { __________________________________ $E4BF: Phantoon body | _________________________ $E4FF: Phantoon eye | | ________________ $E53F: Phantoon tentacles | | | _______ $E57F: Phantoon mouth | | | | 0C00 0400 0400 0400 ; 0: Tile data size CA01 CA01 CA01 CA01 ; 2: Palette 09C4 09C4 09C4 09C4 ; 4: Health 0028 0028 0028 0028 ; 6: Damage 0008 0008 0008 0008 ; 8: Width 0008 0008 0008 0008 ; Ah: Height A7 A7 A7 A7 ; Ch: Bank 08 00 00 00 ; Dh: Hurt AI time 0000 0000 0000 0000 ; Eh: Cry 0007 0000 0000 0000 ; 10h: Boss value CDF3 CE55 CE55 CE55 ; 12h: Initialisation AI 0001 0001 0001 0001 ; 14h: Number of parts CEA6 804C E011 E011 ; 18h: Main AI 8000 8000 8000 8000 ; 1Ah: Grapple AI DD3F 804C 804C 804C ; 1Ch: Hurt AI 804C 804C 804C 804C ; 1Eh: Frozen AI 0000 0000 0000 0000 ; 20h: X-ray AI 0000 0000 0000 0000 ; 22h: Death animation DD9A 804C 804C 804C ; 28h: Power bomb reaction DD95 804C 804C 804C ; 30h: Enemy touch DD9B 804C 804C 804C ; 32h: Enemy shot ACAA00 ACAA00 ACAA00 ACAA00 ; 36h: Tile data 05 05 05 05 ; 39h: Layer F434 F43A F434 F434 ; 3Ah: Drop chances ($B4) F0EC F0EC F0EC F0EC ; 3Ch: Vulnerabilities ($B4) 0000 0000 0000 0000 ; 3Eh: Enemy name ($B4) } ;;; Enemy vulnerabilities ;;; { ; Vulnerability format: ; v = fddddddd ; If v = FFh: ; Freeze, no damage ; Else: ; d: Damage multiplier * 2 ; f: Does not freeze ; _________________________________________________________________ 0: Power ; | ______________________________________________________________ 1: Wave ; | | ___________________________________________________________ 2: Ice ; | | | ________________________________________________________ 3: Ice + wave ; | | | | _____________________________________________________ 4: Spazer ; | | | | | __________________________________________________ 5: Spazer + wave ; | | | | | | _______________________________________________ 6: Spazer + ice ; | | | | | | | ____________________________________________ 7: Spazer + ice + wave ; | | | | | | | | _________________________________________ 8: Plasma ; | | | | | | | | | ______________________________________ 9: Plasma + wave ; | | | | | | | | | | ___________________________________ Ah: Plasma + ice ; | | | | | | | | | | | ________________________________ Bh: Plasma + ice + wave ; | | | | | | | | | | | | ; | | | | | | | | | | | | ____________________________ Ch: Missile ; | | | | | | | | | | | | | _________________________ Dh: Super missile ; | | | | | | | | | | | | | | ______________________ Eh: Bomb ; | | | | | | | | | | | | | | | ___________________ Fh: Power bomb ; | | | | | | | | | | | | | | | | ________________ 10h: Speed booster ; | | | | | | | | | | | | | | | | | _____________ 11h: Shinespark ; | | | | | | | | | | | | | | | | | | __________ 12h: Screw attack ; | | | | | | | | | | | | | | | | | | | _______ 13h: Charged beam ; | | | | | | | | | | | | | | | | | | | | ____ 14h: Pseudo screw attack ; | | | | | | | | | | | | | | | | | | | | | _ 15h: Unused ; | | | | | | | | | | | | | | | | | | | | | | $B4:F0EC db 80,80,80,80,80,80,80,80,80,80,80,80, 82,84,00,00,00,00,00,02,80,80 } ;;; Enemy drop chances ;;; { ; ________________ ; 0: Small health ; | _____________ ; 1: Big health ; | | __________ ; 2: Missiles ; | | | _______ ; 3: Nothing ; | | | | ____ ; 4: Super missiles ; | | | | | _ ; 5: Power bombs ; | | | | | | $B4:F434 db 32,32,32,00,32,37 ; 19.6% 19.6% 19.6% 19.6% 21.6% - Phantoon body/tentacles/mouth $B4:F43A db 14,14,64,69,0A,00 ; 7.8% 7.8% 39.2% 41.2% 3.9% - Phantoon eye <-- used for flame projectile drops } ;;; Enemy population ;;; { ; ____________________________________ Enemy ID ; | _______________________________ X position ; | | __________________________ Y position ; | | | _____________________ Initialisation parameter ; | | | | ________________ Properties (2000h: process instructions, 800h: process off-screen, 400h: intangible) ; | | | | | ___________ Extra properties (4: extended spritemap format) ; | | | | | | ______ Parameter 1 ; | | | | | | | _ Parameter 2 ; | | | | | | | | $A1:CCD4 dx E4BF,0080,0060,0000,2800,0004,0000,0000, ; Phantoon body E4FF,0080,0060,0000,2C00,0004,0000,0001, ; Phantoon eye E53F,0080,0060,0000,2C00,0004,0000,0002, ; Phantoon tentacles E57F,0080,0060,0000,2C00,0004,0000,0003, ; Phantoon mouth FFFF, 00 } ;;; Library background commands ;;; { ; Phantoon alive $8F:E0FD dx 0002,7E2000,4800,1000, ; Copies the blank tilemap initialised by Phantoon's init AI to VRAM BG2 0000 ; Phantoon dead $8F:E113 dx 000A, 0000 }