GBC Pokémon Yellow in 1:27.23

Hell yeah! Frame war with myself!
One day, I was browsing some videos at Youtube and gia said the published movie could be improved by almost 6 seconds and asked if I could find the improvement. This submission aims to prove that the published run is actually improvable by almost TEN seconds. On a more serious note, I'd like to apologize to this site for submitting a run every time I found an improvement for this movie. I'm well aware that there are rules prohibiting this, but this TAS is counter-intuitive by nature and remains complex even at its broken state. I have learned the lesson now and took some weeks testing everything I could think of. Having said that, this submission is 9.72 seconds faster than my previous attempt, this time there isn't only one improvement, but three. I dearly hope that this is the final revision of this movie.

Attributes

  • Aims for fastest completion of the game
  • Manipulates luck
  • Corrupts save data
  • Heavy glitch abuse
  • Emulator used: VBA-rr v22

Comments

The glitch used to complete the game is the "Inventory glitch", caused by the items counter being overwritten with an arbitrarily large value, this expands the inventory to farther regions of memory and forces the game to convert this data into items, which can be manipulated by the player by means of item switching/tossing. This bug is very powerful, by abusing it, I can speed up the text and overwrite a warp's destination to the Hall of Fame, a map that, once entered, starts the end game sequence.
To overwrite the items counter this early, it's necessary to hard reset the game at the earliest frame that doesn't give a "save file destroyed" message. This corrupts the save and overwrites the party counter. Swapping the 2nd pokemon with the 10th overwrites the items counter and activates the inventory glitch.
The improvements come from faster scrolling, faster text speed and better overwriting of the warp address.

Fast item scrolling trick

When I had the idea for this, I began to wonder why I hadn't thought of it before...
The first items on the inventory have ID# 0, these items are very slow to scroll through, roughly at 30 frames per item. By swapping the 9th pokemon with the 11th, I turn many of these items into ID# 255, the CANCEL button, these items are scrolled at 7 frames per item. The faster scrolling was the biggest improvement in the movie.

Text acceleration glitch

If anyone thought Oak's talking at the Hall of Fame was too long, your problems are over.
The last four bits of memory address 0xD354 control the text speed. The game offers three "text speeds" for the player choice: FAST, MID and SLOW. Because there's no need to turn off animations or change the battle style and it's possible to keep the text at FAST speed by holding the B button, this TAS can safely ignore the options menu and thus, starts the game with the text set at MID speed.
However, it's possible to change text speed to "FASTEST" by putting a number that's multiple of 16 at 0xD354 by means of the inventory glitch. After doing this, all text will be output at once, instead of one character per frame as in fast speed. The funny thing about this discovery is that I declared the function of this address to be unknown for a long time, because I always held down the B button while I was experimenting with it, and this hid its effects.

Item switch + toss trick

The most perceptive viewers will see that I use a new strategy to overwrite 0xD362. In my previous submission, I said switching an item with a quantity above 99 did no good because the game would always set it back to 99. I was wrong, this is only true for normal items.
Glitched items that don't crash the game when you click them will maintain their abnormal quantity after switched. The previous run wasted many frames to toss the necessary amount to warp to the Hall of Fame. This new discovery allowed more improvements. My initial idea was to manipulate the higher byte of the Trainer ID to be 0x76. That doesn't work, because its address would always be attached to a Master Ball, a normal item which, as said before can't be switched.
Fortunately, there's the lower Trainer ID byte, it can be manipulated to be a useful glitch item (in this case, 6F) without any loss of frames at the title screen. The quantity attached to this item is always 0xBA = 186. Switching this item to the appropriate slot allows me to toss only 68 items to warp to the hall of fame, instead of the 138 that the published run throws away. In total, this trick saved 29 frames.

Other things I tried that didn't work

Overwriting address 0xD35D

Try entering the gameshark code 01765DD3 before starting Yellow. You'll spawn at the Hall of Fame and complete the game. This address can be reached faster than the one used here, but overwriting it to the Hall of Fame's map ID without a gameshark makes the game crash. I tried using it to warp to Gary's room, but this always made the game keep flashing weirdly and turned all nearby tiles into unwalkable blocks. That practically eliminated the use of this address.

Changing NPC dialogs to trigger the credits

That would be very cool. My idea was to change the dialogs that some NPCs have using the inventory glitch in a way that the credits are rolled immediately. It'd be an enormous improvement since the Hall of Fame wouldn't have to be visited. However, after some research, I figured this data is not stored in an obvious way and would need a lot of memory manipulation to pull off. Aside from this, all addresses I found that control this are around 0xD4XX, this is way too far to scroll. So, probably, even if this was possible, it'd still end up slower.

Coordinate manipulation

This one was very tricky because coordinates are a little complicated in this game. I wanted to do this to see if I could exit the house without the need of walking so many steps. It turned out that to overwrite coordinates, other "sensitive" addresses needed to be changed too and that always made the game crash. With a lot of item switching, I could only save two steps so this trick was useless.

Special thanks

  • gia, hanzou, Chamale and primorial#soup, the amazing RBY glitch finders.
  • Torchickens/ChickasaurusGL for his AreaDex project and GCL in general for info in Pokémon glitching.
  • Thomaz, Mukki, FractalFusion, Tilus, Mr. Pwnage, cstrakm, was0x, gocha and pretty much everybody else whose contributions made RBY TASing awesome.

Flygon: YouTube module added.
FractalFusion: Judging.
p4wn3r: Since no one else has done it, I replaced the YouTube encode with one that spells the author's nickname correctly.
FractalFusion: Accepting as an improvement to the published run.
GabCM: Using p4wn3r's and mmarks' encodes for publication.


Joined: 4/3/2005
Posts: 575
Location: Spain
This improvement was pretty clever, YES vote!
No.
Joined: 12/29/2007
Posts: 489
Remind me again how the Pokedex counter gets overwritten with 152?
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
Zowayix wrote:
Remind me again how the Pokedex counter gets overwritten with 152?
There's no pokedex counter. The Seen pokedex and the Own pokedex (they are separated) are stored in binary flags. (0 - wasn't seen/caught, 1 - was seen/caught). Corrupting the save overwrites the entire pokedex region to 0xFF. Since the game works mostly with bytes, in order to store 151 bits, it needs 19 bytes. That gives 19 x 8 = 152 bits. To evaluate the total amount, it basically counts all 1's in that region. Therefore, it believes you have 152 pokemon because the entire portion was overwritten with 0xFF.
Joined: 12/29/2007
Posts: 489
Oh, thanks.
Joined: 5/13/2009
Posts: 141
My favourite run gets utterly stomped. I have nothing but yes for you.
Personman
Other
Joined: 4/20/2008
Posts: 465
The text speed thing is great. Everything about this is great, as usual.
A warb degombs the brangy. Your gitch zanks and leils the warb.
Glitcher
He/Him
Joined: 3/24/2007
Posts: 216
Location: London, U.K.
Lovely-jubbly! I'm definitely interested to see if the spawn-in-the-Hall-of-Fame trick is possible.
TRT
Former player
Joined: 5/13/2009
Posts: 132
So...Ash transformed into Godzilla and tossed 408 floors, leaving only debris and ash (hehe) behind. Excellent job.
N._Harmonik
She/Her
Joined: 8/27/2006
Posts: 502
Location: Canada
Heheh. Are you ever going to do a glitchless run of Yellow?
Why, oh, why do I even <i>try</i> to understand my own species?
gia
Player (109)
Joined: 5/3/2006
Posts: 223
I kindly asked for a frame count before submitting. Question, when you reach the hall of fame then after talking to oak and the screen changing you are given oak's final rating on a special sequence, after this rating the credits start. If you dont reach the hall of fame with "152" pokemon then the rating will most likely have two bodies of text, which means you have to press a button once to continue. Am I correct thinking this button press would be part of the tas (and count toward frame count) or has the ending started before this part? Are there other movies where the viewer has to press a button to complete the ending sequence?
Player (146)
Joined: 7/16/2009
Posts: 686
Guys, the encode subs say "p3wn3r" instead of "p4wn3r". Just sayin'.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
gia wrote:
I kindly asked for a frame count before submitting. Question, when you reach the hall of fame then after talking to oak and the screen changing you are given oak's final rating on a special sequence, after this rating the credits start. If you dont reach the hall of fame with "152" pokemon then the rating will most likely have two bodies of text, which means you have to press a button once to continue. Am I correct thinking this button press would be part of the tas (and count toward frame count) or has the ending started before this part? Are there other movies where the viewer has to press a button to complete the ending sequence?
Most definitely, yes, it would count - especially in this case, where a glitch surpasses that need.
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Joined: 8/3/2008
Posts: 157
Location: The Land Down Under
I think the 6F was a hexadecimal number, not 6 floors. Easy yes vote. I wonder whether further improvements to this will ever be found now?
Experienced player (702)
Joined: 2/19/2006
Posts: 742
Location: Quincy, MA
Who knew that Ash's house was connected to the pokemon hall of fame?
Super Mario Bros. console speedrunner - Andrew Gardikis
Joined: 2/20/2010
Posts: 209
Location: I'm in space
Totally awesome, of course my vote is TM8 TM8 nROCKET8 8 V 8 i z t 1 d 1 error.
Oh, play it cool. Play it cool. Here come the space cops.
Former player
Joined: 2/19/2007
Posts: 424
Location: UK
Thanks for the great run, p4wn3r! And there is no reason to apologize for improving a run - we want the TASes here to be as good as possible, after all. Besides, seeing a run gradually improve is entertaining in itself. Finally, a whopping 10% improvment is far from frame-warring, and even if it were, I'm still all in favor of seeing a frame war squeeze the TAS even closer to perfection!
Active player (428)
Joined: 9/7/2007
Posts: 329
6F in hexadecimal is 111 in decimal, which is really cool! So throwing away 68 of those totals 7548, which means that TM8 TM8 nROCKET8 8 V 8 i z t 1 d 1 error. Yes vote from me. (who voted no)
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
How did I miss this submission earlier? Anyway, I really enjoyed the improvements to the published run which was not thought improvable. Great job, p4wn3r! (Yes vote!)
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [1702] GBC Pokémon: Yellow Version "save glitch" by p4wn3r in 01:27.23