Advertisement
Guest User

Raphael No Movement Explained

a guest
May 28th, 2014
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. 7E105F: Raphael's AI state. Governs his behavior.
  2. 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.
  3. 701970: RNG address used by Raphael
  4.  
  5. At the beginning, his states will follow this sequence:
  6. beginning cutscene:
  7. 00, 01, 02, 03, 04
  8. about to gain control of yoshi, he does a few more things:
  9. 06 - stomping down on moon
  10. 07 - turning around a few times to choose a direction
  11. 08 - preparing to move
  12. 05 - moving
  13.  
  14. You need to pinpoint the VERY LAST frame of state 08, just BEFORE he goes into 05. You can gauge this by looking at the addresses provided above, namely when the state is 08 and the timer becomes 00, that will be the frame you need.
  15.  
  16. On this frame, you need the RNG value (address provided above) to be either 7F or FF. In either case, what happens is the following:
  17.  
  18. ; $0F/B5BA A5 10 LDA $10 [$00:0010] ; \
  19. ; $0F/B5BC 29 7F AND #$7F ; | rng timer value for
  20. ; $0F/B5BE 69 80 ADC #$80 ; | how long to move
  21. ; $0F/B5C0 8D 60 10 STA $1060 [$00:1060] ; /
  22.  
  23. Since they didn't clear the carry bit here (it's always set at this point in my testing), you effectively will get $7F + $80 + 1, which is $00.
  24.  
  25. With a movement time of $00, guess what happens? He doesn't move. Hit away.
  26.  
  27. 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).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement