Advertisement
Decon082

Pokemon Red/Blue Text Speed Override

Nov 2nd, 2015
1,972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. With the newly discovered instant text method using the bike shop script, I did some research into all of the game's scripts to find out which events cause an instant text effect.
  2.  
  3. Here is the important byte in the game's code, specifically bit 6. This gets overwritten during certain scripts to override the default text delay which is set in options:
  4.  
  5. wd730:: ; d730
  6. ; bit 0: NPC sprite being moved by script
  7. ; bit 5: ignore joypad input
  8. ; bit 6: print text with no delay between each letter ***
  9. ; bit 7: set if joypad states are being simulated in the overworld or an NPC's movement is being scripted
  10.  
  11.  
  12. Here is a "full" list of events in Pokemon Red/Blue that set this bit to 1, causing text to be printed with no delay:
  13. - viewing diploma
  14. - vending machines
  15. - reviving fossils
  16. - "link help" screen (where is this?)
  17. - using town map
  18. ***bike shop (the only one that doesn't reset the text delay bit)
  19. ***PC hall of fame (need to investigate, this seemed weird)
  20. - using cut
  21. - giving drinks to the girl for TMs
  22. - PC item storage
  23. - game corner prizes
  24. - buying coins from game corner
  25. - viewing PC in bill's house (eevee pokedex entries)
  26. - name entry screen
  27. - PC pokemon storage
  28. - new game/continue/options menu
  29. - new pokedex entry
  30. - any text box with a cursor (start menu, yes/no, buy/sell/cancel, etc)
  31. - pokemon menu
  32. - items menu (similar to swapping items code)
  33. - slot machines
  34. - the entire trade sequence
  35.  
  36.  
  37. And a few other things that have instant text that I could not find in the assembly:
  38. - using a rare candy
  39. - fight menu during battle
  40. - seeing stats upon levelup
  41. - viewing status screen for a pokemon
  42.  
  43.  
  44. All of the above events have a call to reset bit 6 of wd730 to 0, which defaults back to using bits 0-3 of wd355 (text speed in options, wait 0-15 frames between printing each character). The exception is the bike shop script, which as we know has a jump over the reset call if exiting the script using the B button:
  45.  
  46. call PrintText
  47. call HandleMenuInput
  48. bit 1, a
  49. *** jr nz, .cancel
  50. *** ld hl, wd730
  51. *** res 6, [hl]
  52. ld a, [wCurrentMenuItem]
  53. and a
  54. jr nz, .cancel
  55. ld hl, BikeShopCantAffordText
  56. call PrintText
  57. .cancel
  58. ld hl, BikeShopComeAgainText
  59. call PrintText
  60.  
  61.  
  62. With regards to viewing the Hall of Fame data, the code is a bit confusing here since there is a loop of uncertain length depending on the number of Hall of Fame entries the player has. It does seem like the text delay will always be correctly reset at the end here since you cannot exit this without reaching the end of the Hall of Fame data. This could not be exploited in a speedrun anyway for obvious reasons.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement