Advertisement
Dotsarecool

Weird Yoshis Explained

Dec 10th, 2015
1,158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. Yoshi animation ($1602) goes like this table at ($01EBC2):
  2.  
  3. 0C 0B 0C 0B 0A 0B 0A 0B
  4.  
  5. Each graphic is displayed for 8 frames.
  6. One per Yoshi per frame (which is why Yoshi animation normally takes about a second, it's 64 frames long)
  7. For multiple Yoshi's on the screen, this animation gets spread out between them, which is why the animation is quicker.
  8. There is a timer at $18E8 that controls which graphic is displayed. It starts at #$3F and counts down.
  9.  
  10. In the loop, this happens:
  11.  
  12. >Decrement the timer.
  13. >Divide the value of the timer by 8 to get the index into the above table.
  14. >Store that value to $1602,X where X is Yoshi's slot number.
  15.  
  16. This occurs for each Yoshi per frame. So the timer is decremented twice per frame if two Yoshi's exist, etc. The loop stops when the timer hits 00.
  17.  
  18. Now when the timer is 01, the game does a check to see whether it should display the message that comes up when you first save Yoshi. It load's Mario's current submap (00 = main map, 01 = Yoshi's island) - 1, or's that with $0EF8 (Yoshi has already been saved flag), or's that with $0109 (level override), and checks if it is zero. If it's zero it displays the message. If it's not zero, it returns to the loop I outlined above _without loading the timer again_. So if we are on the main map, we ended up with #$FF, decremented is #$FE, divide by 8 is #$1F. The table is indexed out of bounds and we get #$F0 instead of a meaningful value.
  19.  
  20. So when the growing animation is done, we have the following:
  21.  
  22. Let N = the number of Yoshis that exist.
  23. The Yoshi in the (40 % N)th highest slot gets animation #$F0.
  24. The 7 Yoshis in the next 7 highest slots get animation #$0C. If you hit slot 9, wrap around to slot 0.
  25. All remaining Yoshis get animation #$0B.
  26.  
  27. Animation #$F0 is a glitchy square graphic. It also results in Mario being way below Yoshi when his is riding Yoshi. [Square Yoshi]
  28. Animation #$0C corresponds to Yoshi with no neck (used in growing animation). [Low Rider Yoshi]
  29. Animation #$0B corresponds to baby Yoshi with very large neck (used in growing animation). [Chubby Yoshi]
  30.  
  31. Here are some examples if that was confusing:
  32.  
  33. 5 Yoshis exist:
  34.  
  35. Yoshi Animation Time in frames -> Result
  36. 0 0B 0A 0A 0B 0A 0A 0B 0B 0C 0B 0B 0C 0C - Low Rider Yoshi
  37. 1 0B 0A 0A 0B 0B 0A 0B 0B 0C 0B 0B 0C F0 F0 - Square Yoshi
  38. 2 0B 0B 0A 0B 0B 0A 0B 0B 0C 0C 0B 0C 0C 0C - Low Rider Yoshi
  39. 3 0B 0B 0A 0B 0B 0A 0A 0B 0C 0C 0B 0C 0C 0C - Low Rider Yoshi
  40. 4 0B 0B 0A 0A 0B 0A 0A 0B 0C 0C 0B 0B 0C 0C - Low Rider Yoshi
  41.  
  42. 10 Yoshis exist:
  43.  
  44. Yoshi Animation Time in frames -> Result
  45. 0 0A 0B 0A 0B 0B 0C 0C - Low Rider Yoshi
  46. 1 0A 0B 0A 0B 0B 0C 0C - Low Rider Yoshi
  47. 2 0B 0B 0A 0B 0C 0C 0C - Low Rider Yoshi
  48. 3 0B 0B 0A 0B 0C 0C 0C - Low Rider Yoshi
  49. 4 0B 0A 0A 0B 0C 0B 0B - Chubby Yoshi
  50. 5 0B 0A 0A 0B 0C 0B 0B - Chubby Yoshi
  51. 6 0B 0A 0B 0B 0C 0B F0 F0 - Square Yoshi
  52. 7 0B 0A 0B 0B 0C 0B 0C 0C - Low Rider Yoshi
  53. 8 0B 0A 0B 0A 0C 0B 0C 0C - Low Rider Yoshi
  54. 9 0B 0A 0B 0A 0C 0B 0C 0C - Low Rider Yoshi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement