Skip to content

Raphael the Raven

BrunoValads edited this page Feb 8, 2018 · 2 revisions

Raphael

Memory Addresses

  • $7E105C: Y coordinate (relative to moon surface)
  • $7E105D: X coordinate (relative to wrapping around moon)
  • $7E105E: How far Yoshi is from Raphael (X coordinate around moon)
  • $7E1062: Facing - $00 for counterclockwise, $02 for clockwise
  • $7E106C: Y velocity
  • $7E105F: Raphael's AI state. Governs his behavior.
  • $7E1060: Raphael's personal "timer". Each state of his AI initializes this timer with a value, and it will count down to 0; once 0 is reached, he switches to a new state.
  • $701970: RNG address used by Raphael

(See SRAM and WRAM maps)

AI States

  beginning sequence:
  00: yoshi flying up to moon
  01: yoshi falling on initial platform
  02: camera panning down, raphael moving in bg
  03: flying up to moon
  04: turning around

  main sequence:
  05: moving forward in a circle
  06: stomping down on moon
  07: turning around a few times to choose a direction
  08: preparing to move

  attack sequence:
  09: hopping up to initiate attack
  0A: pounding down and shooting flames

  damaged:
  0B: damaged from yoshi ground pounding stake
  0C: stunned because yoshi bopped head

  death sequence:
  0D: final stake pound, dying
  0E: turning slightly from death spot
  0F: rotating / scaling down all the way back to the sky
  10: rotating slightly and fading out into a twinkle
  11: twinkle fades out
  12: star forms
  13: fade in raphael constellation
  14: done with fight, final state

No Movement Bug

At the beginning of the fight, before Yoshi gains control, his AI follows a sequence of states, namely:

  00
  01
  02
  03
  04
  06
  07
  08 - preparing to move
  05 - moving

If on the very last frame of state 08, just before he goes into 05 (the timer will be 00) - if on this frame the RNG value (address provided above) is either $7F or $FF, what happens is the following:

  $0F/B5BA A5 10       LDA $10    [$00:0010]   ; \
  $0F/B5BC 29 7F       AND #$7F                ;  | rng timer value for
  $0F/B5BE 69 80       ADC #$80                ;  | how long to move
  $0F/B5C0 8D 60 10    STA $1060  [$00:1060]   ; /

Since they didn't clear the carry bit here (it's always set at this point), you effectively will get $7F + $80 + 1, which is $00.

With a movement time of $00, guess what happens? He doesn't move, and can instantly be hit.

Because the value needs to be either $7F or $FF, the chances of this occurring are 1/128, or 0.78125% (perhaps more or less depending on how "good" the RNG is in the game).

Clone this wiki locally