Prev: 5E4E Up: Map Next: 5FE6
5E66: Data buffer for the state of every enemy on screen
Bytes Meaning
0x00 X position
0x01 Y position
0x02 Bit 0: reverse sprite if set - Enemy direction $00 left $01 right
0x03 $00 FOOT MAN not jumping - $01 FOOT MAN jumping ; For Enemy type $FF (EXPLOSION) debris expansion counter
0x04 - 0x05 Address pointer to graphic data for static (non-animated) sprites - y-offset address pointer for FOOT MAN jumping - x-delta and y-delta for MINE and BLOB} { 0x06 FOOT MAN Falling speed? $00 Not falling - $02 - $04
0x07 $00 Not used
0x08 $00 Not used
0x09 Bit 7: 1 - graphic data for fixed (non animated) sprite. Computed by: address at 0x04-0x05
0 - graphic data from animated sprite. Computed by: base graphic data address at 0x0A-0x0B + offset of animation from base address at 0x16-0x17
Bit 6-0: enemy type -> $00 FOOT MAN , $FF Explosion, $FE Bubble, $FD Smartbomb, $FC Question
0x0A - 0x0B Address pointer to animation offset table
0x0C Enemy status $00 dead / $01 alive
0x0D Explosion counter (decrement))
0x0E Width of the sprite (in bytes)
0x0F Height of the sprite (in pixels)
0x10 Enemy speed velocity ($00 stopped). For Bubble: bubble y-position counter offset
0x11 Enemy type:
0x00 (FOOTMAN) - Counter for state change duration: $C8 fixed crouched
0x08 (SCANNER) - SCANNER movement direction - $00 horizontal (direction based on byte 0x02) - $01 moving down - $02 moving up - $03 bump/fire
0x10 (BOSS) - Boos direction $00 Up - $01 Down
0x0B - 0x0A (LAUNCHER/SHOOTER) - Counter desc . From shot frequency to 0. Shots when counter equals zero
0x0C - 0x0D (POD/MINE LAYER) - Move direction ($00 up )
0x09 (SWING GUN) - Gun orientation if fixed (0 - left, 1 - left bottom, 2 - bottom, 3 - right bottom, 4 - right)
0x0E-0x0F (BLOB/MINE) State change counter
0xFE (BUBBLE) Bubble duration counter
0x12 Enemy type:
0x00 (FOOTMAN): $00 walking - $01 crouched - $02 stand-by
0x08 (SCANNER): state change counter
0x10 (BOOS): Boss speed $02 healed $01 wounded
0x0B - 0x0A (LAUNCHER/SHOTTER) - Shot frequency
0x0C - 0x0D (POD/MINE LAYER) - speed
0x09 (SWING GUN) - $00 mobile - $01 fixed
0x0E (MINE) - Mine state $00 Continue with same x/y-delta $01 Change x/y-delta to chase Rex
0xFE (BUBBLE) - MSB of address graphic data
0x13 0xFE (BUBBLE) LSB of address graphic data
0x10 (BOSS) Boss status $00 Good health $01 Wounded $02 Escape pod
0x14 Enemy health
0x15 Energy bubble $01 big / $00 small / $FF no bubble
0x16 - 0x17 Address pointer to graphic data for animated sprites
5E66 DEFS $0180
Prev: 5E4E Up: Map Next: 5FE6