Submission Text Full Submission Page
This TAS of Pokémon Yellow resets while saving to screw up some memory so that it can complete the game as fast as possible. Now faster than the previous submission by 35 frames (about ~0.5 second).

Game objectives

  • Emulator used: BizHawk v1.4.1
  • Heavy glitch abuse
  • Corrupts save data

How we beat the game

Normally, when resetting the game while saving it will say that the save file is corrupted. If you reset at the perfect time it will let you load the game which has corrupted RAM. The game fills every address starting from $D162 to $D2F5 with 0xFF which will make the game think you have 255 Pokemon. Since the game only has place for 6 Pokemon, it will overwrite other addresses when you switch Pokemon beyond the 6th spot.
Previously, TASes would overwrite $D35D with a value (usually 0x76 or 0xD0) that loads bank 0x16, and puts 0x6401 (01 64) at $D36D to load the code for the Hall of Fame.
This TAS overwrites $D35D with 0xF8, loading bank 0x3C where some Hall of Fame data is, and puts 0x50F1 (F1 50) at $D36D to enter the credits routine at address 0x50F1.
The choice of 0x50F1 is motivated by the fact that both bytes occur as character values in name strings. Thus, by naming Rival as AJS× (that's a times symbol there), we get the string 80 89 92 F1 50 at $D349, and we can easily switch F1 50 over to $D36D with some Pokemon switches.
To get 0xF8 to $D35D, we enable the item menu by switching memory so that the item quantity is 255, and then throw away 8 of the 5th item so $D326 becomes 0xF8. We can then switch it over to $D35D.
(Since we used the values from the rival name and creating fitting values by tossing items, we no longer have to luck manipulate the Trainer ID which saves frames)
The resulting jump into the credits routine results in a glitched mess of the credits screen, mostly with "THE END" in it. So, enjoy.
  • Names the rival AJS× (that's a times symbol there). Memory at $D34C-D is F1 50.
  • Resets while saving at the right time to corrupt memory.
  • Loads corrupted save file. Number of Pokemon is now 255.
  • Switches 7th Pokemon with 10th. Number of items is now 255.
  • Goes to items and dumps 8 of the 5th item. $D326 is now 0xF8.
  • Switches 14th Pokemon with 22nd. $D34C-D is switched to $D3A4-5 so now $D3A4-5 is F1 50.
  • Switches 22nd Pokemon with 17th. $D3A4-5 is switched to $D36D-E so now $D36D-E is F1 50. In addition, $D326 is switched to $D35D so now $D35D is 0xF8.
  • Leave the Pokemon menu. Since the map is F8, the game loads ROM bank 3C. It reads 0x50F1 from the map pointer and thinks that it is a valid address and so executes the address, which is in the middle of the credits routine.

Other strategies we tested

  • We tried to manipulate the 0xF8 (which we created here by tossing items) with the Trainer ID, because switching items is faster than tossing them. Unfortunately that takes one pokemon switch more and the glitched items take long to load. So assuming the luck manipulation would take +0 frames it is 93 frames slower than this run.
  • Jumping to bank 0x18 and to address $4F55 executes the HoF routine as soon as you close the menu. That is because it calls address $3EB4, which is a function pointer so it depends on A which function it will execute. To execute the HoF routine A has to be 0x55. A will be the low byte of the address it jumped to (in this case we jumped to $4F55 so low byte is 0x55). At every $3EB4 call there is a LD A,#?? right before it, which means he loads the value 0x?? into A. So we have to find a $3EB4 call that is at address $xx55, but there is no. The good thing however is that in bank 0x18 starting from address $4F54 it is: 3E 15 CD B4 3E which means LD A,#15 : CALL $3EB4. We jump to $4F55 and the game thinks the 0x15 is an instruction, so it executes DEC D : CALL $3EB4 which doesn't change A so the HoF is executed. Unfortunately we can't manipulate the jump to $4F55 with the name of the rival and other ways of manipulating turn out to be slower.

Thanks

Thanks to p4wn3r and gia, for their previous runs as well as all the research they did to dissect the game.

Screenshots


feos: This was a great try. I'm proud of the effort put into disassembling this game. Unfortunately, this run does not complete/beat the game. It leaves it in an infinite loop somewhere during the THE END drawing event. The game then does not react on the B button that normally resets it after the ending, and the save that is normally created after you beat the game is not being made here. The game does not come into the finished state and does not proceed as it was finished. See these posts for more information. Rejecting.


Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
ALAKTORN wrote:
I’ll refrain from voting before this is ascertained
You're only voting on whether or not you found it entertaining. Whether it's really an "ending" or not shouldn't influence your vote. I thought it was entertaining! So I voted Yes! And it was a great improvement too. Nice work, Masterjun and FractalFusion.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
CoolKirby wrote:
You're only voting on whether or not you found it entertaining. Whether it's really an "ending" or not shouldn't influence your vote.
I have to disagree with that sentiment. I think it should be possible to express with one's vote whether one considers the submission valid for publication or not. (For example, if a run obviously and blatantly broke one of the most basic rules, making it completely ineligible for publication, voting "yes" would feel rather contradictory.)
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
I just want to point out something which is written in the submission text.
It reads 0x50F1 from the map pointer and thinks that it is a valid address and so executes the address, which is in the middle of the credits routine.
I'm going to take a look at the routine and then say which exact parts we are skipping here.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Experienced player (588)
Joined: 2/5/2011
Posts: 1417
Location: France
Nice run, Fractal and Masterjun for the win. YES vote.
Current: Rayman 3 maybe? idk xD Paused: N64 Rayman 2 (with Funnyhair) GBA SMA 4 : E Reader (With TehSeven) TASVideos is like a quicksand, you get in, but you cannot quit the sand
Player (80)
Joined: 8/5/2007
Posts: 865
I'd like to weigh in, supporting Warp's sentiment. We should carefully make a distinction between runs that show elements of the end screen without "convincing" the game that the end has been reached. Warp was spot on with his "executes arbitrary code" example. There are probably over a dozen different plausible ways the game could end that have at least an illusion of completion. The end screen could be displayed while the game soft crashes. The words "The End" could appear on screen, but not centered and with the player retaining control. The ending music could play over glitched graphics. A save file that shows 100% completion could be created without ever demonstrating the ending. The game's entire ending could be reprogrammed from scratch and executed with an "executes arbitrary code" run. Each of these scenarios might plausibly be called completion, but they all have faults. Unfortunately, this is just something the judges will have to decide on a case by case basis; I see no way to draw the line unambiguously for all games. With all that said, however, I would be inclined to give this movie a Yes vote. Even if it's not exactly an ending, it sure looks like one.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Btw, I find it quite interesting from a technical and also kind of philosophical point of view, what exactly should constitute game completion. With the vast majority of games there's nothing to discuss because you just play the game through (even if it's done with superhuman reflexes) and that's it. However, with games like this one, where there's basically no limit to how much you can glitch it (all the way up to being able to freely run any arbitrary code that the CPU supports) it becomes a much more complicated question. I think that most people would agree that, if the game has some kind of end screen picture, simply showing that is not enough to constitute a game completion. So what exactly does? It's an interesting question. If, like here, we can basically jump to any part of the original game's code, which part is enough to constitute the "ending" of the game? Maybe, and I'm just throwing the idea for consideration, we could actually remove the controversy and not consider any form of glitching directly to some arbitrary "end" routine in the game a valid completion, in this particular case. The rationale for this is that since you can basically jump anywhere, it becomes impossible to accurately define where the game's "end" actually is, because it's heavily a question of opinion and there is no correct answer. Thus, perhaps, it would be better if we don't accept a glitched run as being a valid game completion (for this particular game) at all... Just thinking out loud.
Editor, Player (44)
Joined: 7/11/2010
Posts: 1029
The problem is, how do you separate such a run from a run that gains arbitrary control over the game's memory and uses it to, instead of running arbitrary code, rewire the map so that it's possible to walk directly from the start to the end of the game? That would seem to be the "next best" completion, and in fact has happened in the past. I guess it's qualitatively different in that you're only altering the game's data, not its code. (But you could use data manipulation to create a 100% complete save file, for instance, without ever doing anything that counts as normal completion of the endgame.) If you want a really extreme definition, you could define game completion as getting the game's memory into any state that could be reached via completing the game without memory corruption or running arbitrary code. As in, you have to exactly reproduce something that would be possible without glitches, by using your glitches, and supply a verification movie to match. (This is partly a serious suggestion, partly a thought experiment, and partly just because I want to see a TAS defeat the Elite 4 with an untrained starter. If that's possible.)
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
If I understand correctly, the only way to glitch this game is to corrupt the save game data. Thus assuming that we wanted to rule out glitching to an arbitrary routine in the game as a valid game completion, it would probably be enough to simply rule that, with this particular game, corrupting save data cannot be used to complete the game. (I assume that this idea will never fly, but I'm presenting it nevertheless, just as food for thought.)
Editor, Player (44)
Joined: 7/11/2010
Posts: 1029
Warp wrote:
If I understand correctly, the only way to glitch this game is to corrupt the save game data. Thus assuming that we wanted to rule out glitching to an arbitrary routine in the game as a valid game completion, it would probably be enough to simply rule that, with this particular game, corrupting save data cannot be used to complete the game. (I assume that this idea will never fly, but I'm presenting it nevertheless, just as food for thought.)
This isn't the only way, it's just the fastest way. You can get a similarly corrupted state by encountering a particular glitched enemy, but you can't do that until over halfway through the game. We even have a video of this, [1700] SGB Pokémon: Red Version "warp glitch" by p4wn3r in 41:02.38; the corruption in memory is produced via the ZZAZZ glitch, rather than save file corruption.
Joined: 2/3/2013
Posts: 320
Location: Germany
What I find interesting about this discussion is that seemingly everybody accepts (and accepted) the ending of p4wner's run as if it is valid, because it jumped to the summary screen that introduces the player to the credits. If I understand the submission details correctly the authors jump to another point in the credits skipping said screen. To me p4wner's ending is the "more true" one, because it is what happens if one finishes the game regularly (I'm aware we are talking about the "glitched" branch). But still: Reaching the normal ending screen/routine by shortening regular gameplay through exploitation of a game-breaking glitch does not constitute a rule saying "A run finishes the game if an arbitrary sequence of the game's credits is being played back." Therefore I reject the idea of publishing this run as well as it obsoleting the existing one. Edit: Yes, it was entertaining nonetheless; voting "Yes"
All syllogisms have three parts, therefore this is not a syllogism.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
RGamma wrote:
What I find interesting about this discussion is that seemingly everybody accepts (and accepted) the ending of p4wner's run as if it is valid
I think that it's more a case of the question not having been raised then (because it wasn't so obvious, and it didn't seem so relevant either, as much more of the game was being actually played.) When a game has such a glitch that you can only "jump forward" in the game to very few and specific places, it feels more like a game completion (which simply skips parts of it), while in this particular case where we can basically jump anywhere in the code we want, it becomes a question of definition and opinion (of which part, exactly, is the "true ending" of the game), which is inevitably arbitrary.
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Phew, the credits routine is longer than I expected. Well actually the part that prepares for the routine is long. My full notes can be seen here. Some important things we skipped:
4F26 -> rating (of course)
4F4A -> upload text graphics (doesn't matter because we don't display normal text :P)
4F63 -> sound stuff (which probably everyone has noticed)
50B6 -> set DE to 0x5171 (which I explain later)
So what is the credits routine? The game has a place ($5171) where pointers for the text in the credits are stored (eg. 0x1C for POKéMON; 0x00 for YELLOW VERSION<linebreak>STAFF). So 0x5171 is normally stored into registers DE so that it can be accessed quickly. After the game reads one value from that place it checks if it is a "special case". If it isn't it will get the lines from that pointer value. If that value is 0xFA or higher it is considered a "special case". The screen will only display loaded lines when there is a special case. The different values for the special case are the different ways of showing the lines (eg. scrolling, text without scrolling, text without scrolling with palette change, copyright, THE END). At the end it increases DE and goes back to get the next value. Our code directly jumps into special case 0xFF which is "display, then scrolling" (that explains that garbage screen after leaving the menu). Then it reads the next value from DE... wait, DE? We skipped setting it to the right value. The last time it was set was just before the jump into case 0xFF. It was set to 0x0D5D, so the game reads values from there. Of course it waits for a special case to be read, and what is the first value that is a special case starting from $0D5D? It is 0xFA, the THE END case! After that case is executed it will return, but the code eventually reaches $0D4C, which sets DE to 0x0D5D again and since the values we manipulated are still there, the code jumps to $50F1 again! An infinite loop was created. tl;dr: I can't say whether this counts as the correct ending. However, what I can say is that the game executes a code specifically made for THE END. And to clarify it to everyone, it does that infinite times.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Masterjun wrote:
tl;dr: I can't say whether this counts as the correct ending. However, what I can say is that the game executes a code specifically made for THE END. And to clarify it to everyone, it does that infinite times.
That's good enough for me. Thanks!
Player (13)
Joined: 6/17/2006
Posts: 507
Are we having that debate again about whether or not RAM corruption to trigger mid-credits is valid? There's a reason why Super Mario World got a glitched category separate from the normal any%. Check out the discussion and decision on [1945] SNES Super Mario World "game end glitch" by Masterjun in 02:36.40 before commenting. Now, I'm a bit concerned with the fact that the cutscene loops indefinitely. In the past I've seen corrupted ending sequences with glitched graphics, wrong music and missing the beginning of the ending sequence and I never had any problem with those. However, that's the first time I see one missing the end of the ending sequence. I'm not sure how I feel about that since it contradicts my personal definition of what "beating the game" is. Subjectively however, I guess this could be considered an alternate ending, since it clearly shows "THE END" and input is disabled. Hmm... I'll have to ponder on this.
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6437
Location: The land down under.
SmashManiac wrote:
Are we having that debate again about whether or not RAM corruption to trigger mid-credits is valid? There's a reason why Super Mario World got a glitched category separate from the normal any%. Check out the discussion and decision on [1945] SNES Super Mario World "game end glitch" by Masterjun in 02:36.40 before commenting.
*back one page*
Spikestuff wrote:
Warp wrote:
Does showing the "The End" picture on screen constitute completing the game?
Have we all forgotten about a different game and how it finished?
Like we haven't mentioned it already >.>
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
jlun2 wrote:
Masterjun wrote:
tl;dr: I can't say whether this counts as the correct ending. However, what I can say is that the game executes a code specifically made for THE END. And to clarify it to everyone, it does that infinite times.
That's good enough for me. Thanks!
You mean that you consider it an acceptable game completion? Curious, because to me it looks like the exact opposite. To me it looks like it does what I was suspecting, ie. simply jump to the routine that displays the "The End" picture on screen. What's worse, it causes said code to enter an infinite loop which, I assume, is not the original intent of the game code. Therefore it doesn't even proceed as it normally would if the game where played to the end in the regular way.
Sanqui
Any
Player (26)
Joined: 4/25/2011
Posts: 33
While this run is impressive, personally, I think that if the game isn't left in a regular post-credits state after the movie, it doesn't count as beating the game. In Pokémon specifically, I would expect the game to create a 'game finished' save, and restart after the credits.
ovo
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Sanky wrote:
While this run is impressive, personally, I think that if the game isn't left in a regular post-credits state after the movie, it doesn't count as beating the game. In Pokémon specifically, I would expect the game to create a 'game finished' save, and restart after the credits.
What about runs of games that never end? Or those that use a password system to resume prgress? Does that mean we should unpublish all of those kind of runs? Edit: I don't mean runs that uses passwords. I mean runs of games that uses a password system to resume where you left off.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
jlun2 wrote:
What about runs of games that never end? Or those that use a password system to resume prgress? Does that mean we should unpublish all of those kind of runs?
Different category of games have their own separate rules. This is most certainly not a game that never ends, therefore it's inconsequential. A speedrun (tool-assisted or not) is by definition a completion of the game done as fast as possible (sometimes with additional alternative goals). If the game is not completed, it cannot really be considered a full speedrun. If completing the game is removed as a requirement, then a speedrun of half of the first level of a game could be just as acceptable as a full playthrough. Which would make the whole concept of speedrunning pretty much meaningless.
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Warp wrote:
If completing the game is removed as a requirement, then a speedrun of half of the first level of a game could be just as acceptable as a full playthrough. Which would make the whole concept of speedrunning pretty much meaningless.
However, what I can say is that the game executes a code specifically made for THE END.
Sanqui
Any
Player (26)
Joined: 4/25/2011
Posts: 33
jlun2 wrote:
What about runs of games that never end? Or those that use a password system to resume prgress? Does that mean we should unpublish all of those kind of runs? Edit: I don't mean runs that uses passwords. I mean runs of games that uses a password system to resume where you left off.
If the game ends (i.e., stays stuck) on the endgame screen, then that's the expected behavior. However, it's not the expected behavior for Pokémon Red. I don't care in particular if the run gets published or not or any precedents, I'm just stating what's on my mind.
However, what I can say is that the game executes a code specifically made for THE END.
Code specifically made for displaying that message on the screen, yes. However, that's only a part of the credits. The game doesn't execute other assorted code, such as the one to save the game and the one to restart it following the credits. The game is left in a broken state of an infinite loop. In my opinion, those contribute way more to "completion" than the THE END image does. I do realize the line is very blurry, though.
ovo
Personman
Other
Joined: 4/20/2008
Posts: 465
ONE BRANCH PER SHA256 OF RAM STATE
A warb degombs the brangy. Your gitch zanks and leils the warb.
Player (13)
Joined: 6/17/2006
Posts: 507
Some people have mentioned that the game saves when beating the game. At which point does this happen exactly? If this is after talking to Oak in the hall of fame, I would consider it a requirement, and I believe it is not met. Also, after pondering, I got to the conclusion that reaching the final state of the game should definitively be a requirement for beating it, and this doesn't occur.
Spikestuff wrote:
SmashManiac wrote:
Are we having that debate again about whether or not RAM corruption to trigger mid-credits is valid? There's a reason why Super Mario World got a glitched category separate from the normal any%. Check out the discussion and decision on [1945] SNES Super Mario World "game end glitch" by Masterjun in 02:36.40 before commenting.
*back one page*
Spikestuff wrote:
Warp wrote:
Does showing the "The End" picture on screen constitute completing the game?
Have we all forgotten about a different game and how it finished?
Like we haven't mentioned it already >.>
Well people didn't get the message since the debate was still going on after your post, so I made it more explicit.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
SmashManiac wrote:
Some people have mentioned that the game saves when beating the game. At which point does this happen exactly? If this is after talking to Oak in the hall of fame, I would consider it a requirement, and I believe it is not met.
I fear that if we keep piling up requirement after requirement of what exactly constitutes a valid completion of this game, it will become really complicated, and people are probably still going to find ways around them. For example, if the requirement is "the game must make a valid 'end game' save", then what stops the TAS from simply hacking the game into doing that, and only that? And so on, and so forth. Maybe it would be just easier to ban this form of glitching completely, in this particular case.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
If the game saves itself BEFORE the ending screen, and it is skipped in the run, it is a pretty valid ending. If it saves itself AFTER the ending screen, and this save doesn't occur in the run, the ending isn't that valid.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.