Submission Text Full Submission Page
Resetting the game while saving is bad, but in a TASers point of view it can be very useful. This TAS uses this to corrupt save data and complete the game.

Game objectives

  • Emulator used: lsnes rr1-Δ17ε3
  • Heavy glitch abuse
  • Corrupts save data
  • Manipulates luck

Comments

This run uses the same strategy as the currently published run. It uses a more accurate emulator, which is the reason this run looks slower. However, if you take away the frames that are lost due to emulator differences, you can see that this run basically saves 2 frames from better luck manipulation (which also depends on the core used).

What is happening?

Resetting while saving

If you reset the game while saving it normally either doesn't let you CONTINUE at all, or it shows that The file data is destroyed, but if you reset just at the correct frame you can continue a save where every address starting from $D162 to $D2F5 is filled with 0xFF (dec 255) which will make the game think you have 255 Pokemon. Since the game normally thinks of you having only 6 Pokemon, it will overwrite other addresses when you switch Pokemon.

Important addresses

Trainer ID (2 bytes): $D358 Current map: $D35D Map function (2 bytes): $D36D
In the game code the current map will load a bank and then it will jump to the address that is stored in the map function address. If you overwrite the map address with a value that loads bank 0x16 (which are 0x11, 0x13, 0x15, 0x16, 0x17, 0x1A, 0x1B, 0x1D, 0x5A, 0x71, 0x76, 0xCF, 0xD0 and 0xEA) and then you overwrite the map function address with a value that eventually reaches the rating routine, you can finish the game. These addresses can be manipulated by switching Pokemon and Items.
To make this faster, it is possible to manipulate the Trainer ID (TID) to get the values faster. The rating routine is at 16:6439 (bank 0x16, address $6439) but the TID can only manipulate 2 bytes, the bank (in this case 0xD0) and the higher byte of the address that will be jumped to (in this case 0x64). So we currently will jump to 16:64xx. The xx will be the byte before the TID which is 0x01. Jumping to 16:6401 executes some instructions and then happens to come across 16:6439, the rating routine! Now we need to place these values, we have to move the values from:
  • $D357 to $D36D
  • $D358 to $D36E
  • $D359 to $D35D

The process

  • Swap one of the first few Pokemon, in this case the 7th, with the 10th Pokemon. This will overwrite addresses like the item count with 0xFF. Now the game thinks that you have 255 items (there is also a side effect that the Pokedex data is filled with 0xFF, so we have seen and caught 152 Pokemon).
  • Swap the 12th Pokemon with the 13th so that the 0x64 goes to $D384 and 0xD0 goes to $D385.
  • Swap the 13th Pokemon with the 11th so that the 0x64 goes to $D32C and 0xD0 goes to $D32D. Here a 11 byte data overlaps and causes 0x64 to go to $D342.
  • Swapping Pokemon always moves big chunks of bytes, swapping items makes finer steps. So move the 0xD0 from $D32D to $D331.
  • Swap the 11th Pokemon with the 12th. This causes 0xD0 to go to $D35D (current map) and the 0x64 goes to $D36E, since there is a 0x01 before the TID it is now at $D36D.
Closing the menu will make the game see the 0xD0, load bank 0x16 and thus jumps to 16:6401 which executes some instructions until it executes the rating and the credits routine starting at 16:6439.

Manipulating the TID

The TID is changed by the internal gameboy timer which only allows waiting a frame to change it. It also isn't possible to predict that value so you can only brute force the best output. The TID is determined after you chose NEW GAME so you have to wait frames before that. There are 4 different places where you can wait:
  • at the GAME FREAK scene
  • at the little running Pikachu scene
  • at the title screen
  • at the "New Game" menu.
Since I already had a version where I waited 9 frames in total I just had to test every possible way where I waited 0, 1, 2... 7 or 8 frames. The formula for a given number n of total frames I have to wait is 1/6*(n+1)(n+2)(n+3) so I just had to test 495 inputs and I didn't find any better solution. The brute force lua script for this (for Bizhawk) can be found here.
The previous run waited a total of 11 frames where this run waits only 9 frames

Other comments

Screenshots

[dead links removed]

Thanks to

p4wn3r and gia which did a great job exploring the game, optimizing the runs and finding new strategies to completely skip the game.

Noxxa: Judging.
Noxxa: This submission has led to a lot of heated discussion and debate as to what should happen if a run is "resynced" on another, superior emulator, even though it does not actually improve upon the previous run by p4wn3r. I do not consider this run a real improvement upon the previous run, because the two-frame improvement only exists because of the change in emulator core. It cannot be replicated on the same emulator as that of the previous run.
So, what to do with resyncs? I do not believe in obsoleting runs with new runs that do not contain an actual improvement - it is not fair to the original author to do so. So, I think the previous publication should remain, and thus this submission shall be rejected. There can be discussed about adding credit to Masterjun for his resync efforts in the current publication - it seems the majority of people wish for something like that to be done - but there is another topic for this discussion. I agree in giving Masterjun credit for his work in resyncing this run to the Gambatte core, and putting a note in the current publication, but it does not warrant a new publication. Rejecting this submission.


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
Publishing not an improvement is silly.
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.
NitroGenesis
He/Him
Editor, Experienced player (556)
Joined: 12/24/2009
Posts: 1873
So then we don't publish.
YoungJ1997lol wrote:
Normally i would say Yes, but thennI thought "its not the same hack" so ill stick with meh.
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
Man, just visit this topic and read the questions resyncing raises. It already exists, it would help TASers that used to do serious projects on snes9x 1.43. We need to know what to do with it on a site level, not on a level of occasional submissions.
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.
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
I believe that anything that encourages others even to think about resyncing movies (especially those that are not theirs) is a bad idea, because it compromises standards of quality and causes distrust among the community, at a time when TASVideos should be about making new and entertaining movies. An "official resync policy" of any kind does not belong on this site. Cases like this submission can be handled on a per-submission basis. As for this submission, I think it is enough to credit Masterjun in the publication text and link to the BizHawk and lsnes versions. However, this submission (along with the BizHawk one) is exceptional in that work was clearly done in an attempt to improve it (at least according to site rules; this submission tried to and was judged to fail the rules), and the end result is pretty much the same. This isn't a submission where someone simply ran the FCM-to-FM2-to-BKM converter and threw it into a submission in 5 minutes, an action which probably doesn't even merit any mention whatsoever.
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
FractalFusion wrote:
This isn't a submission where someone simply ran the FCM-to-FM2-to-BKM converter and threw it into a submission in 5 minutes, an action which probably doesn't even merit any mention whatsoever.
Let me explain you how converting movies are done with the example of [1945] SNES Super Mario World "game end glitch" by Masterjun in 02:36.40 (the obsoloted one). 1. As far as I saw, FCEUX and snes9x has "bigger" loading times compared to BizHawk (nes and snes (two different) core), so just add enough empty frames to easily use the previous input (to start the level at 1st frame, move in the level at first frame, so you will need to use this everytime the game loads something) 2. Because the emulation is different, the RNG cycle is also different so all you need to do is to read and reimplement the strategy (rolling the RNG until a specific value got by fishes bouncing). 3. When you are done, i think there's another tricky place that depends on very specific subposition which only should be a problem if you get a random lag-frame or it's misplaced, this time you need to reoptimize your sub pos. If someone would do this and submit this movie and say "I made enough attempts but it's can't be improved" and of course will yield in a slower time because of the longer loading times, should this movie would be accepted if there wouldn't be the new published TAS ([2380] SNES Super Mario World "game end glitch" by Masterjun in 01:39.74)? I would really like to get an answer and not be avoided. Thank you.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
MESHUGGAH wrote:
Let me explain you how converting movies are done with the example of [1945] SNES Super Mario World "game end glitch" by Masterjun in 02:36.40 (the obsoloted one). 1. As far as I saw, FCEUX and snes9x has "bigger" loading times compared to BizHawk (nes and snes (two different) core), so just add enough empty frames to easily use the previous input (to start the level at 1st frame, move in the level at first frame, so you will need to use this everytime the game loads something)
If we don't look at the frame rules and assume that this would sync, the it would be copied input and so:
Movie Rules wrote:
it's generally accepted that if you simply copy large chunks of gameplay from an earlier movie as they are, that effectively makes a new submission coauthored.
In case he redid the level it would be fine.
MESHUGGAH wrote:
2. Because the emulation is different, the RNG cycle is also different so all you need to do is to read and reimplement the strategy (rolling the RNG until a specific value got by fishes bouncing).
In this case the RNG cycle wouldn't even change, but copying input will have the same result as above. If the RNG cycle would change, then it wouldn't be as easy to just "reimplement the strategy".
MESHUGGAH wrote:
3. When you are done, i think there's another tricky place that depends on very specific subposition which only should be a problem if you get a random lag-frame or it's misplaced, this time you need to reoptimize your sub pos.
Well it depends on 3 values which are only correct on a single frame so that is probably the hardest part of the run.
MESHUGGAH wrote:
If someone would do this and submit this movie and say "I made enough attempts but it's can't be improved" and of course will yield in a slower time because of the longer loading times, should this movie would be accepted if there wouldn't be the new published TAS ([2380] SNES Super Mario World "game end glitch" by Masterjun in 01:39.74)?
If the person really did all the hard stuff by himself, I would have no problem with seeing my run obsoleted. I would contact him and ask if he would be ready to try out a few changes to this run to make it even more optimized. I see that in this run the problem is that optimizing is an easy thing. You just have to press a button the first frame it does something. The thing is, that in many other games, doing things on the first frame possible is not always the best solution.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Masterjun wrote:
If the person really did all the hard stuff by himself, I would have no problem with seeing my run obsoleted.
This is my problem edit: "the hard stuff". I can't argue much with this example (since all I did what I wrote in the example but had no idea which positions I need to change in the end), but could you tell me which part of this run was hard? If you say the last trick, then I'm apologize in advance, since I really didn't wasted any time to understand why would it be really hard to make that positioning trick. Now please tell me what do you think it was hard to do within this submission compared to the previous submission that made an improvement. Yes, I've read that you made many efforts and couldn't make an improvement (and I can understand and believe if there wouldn't be any possible way to improve it), however I would like to know the difficulty in implementing the same strategy (maybe there are too many factors to easily change various parts or you need to do indirect manipulations?) I have to repeat myself, that I'm still not defending p4wn3r's or Masterjun's side or even part of any secret staff of TASVideos, and still appreciate that Masterjun still didn't forgive up after these posts.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
MESHUGGAH wrote:
but could you tell me which part of this run was hard? If you say the last trick, then I'm apologize in advance, since I really didn't wasted any time to understand why would it be really hard to make that positioning trick.
Well since the last "positioning trick" is not only positioning yourself, it is positioning the camera too (X and Y position), which is quite a hard thing to do. (And trust me, that was really a hard thing to do, since I did that run myself)
MESHUGGAH wrote:
Yes, I've read that you made many efforts and couldn't make an improvement
Well there was one idea that unfortunately didn't make it.
MESHUGGAH wrote:
I would like to know the difficulty in implementing the same strategy
Doing a run with only the goal of doing the same stuff as the previous movie in mind is not as hard.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Masterjun wrote:
Well since the last "positioning trick" is not only positioning yourself, it is positioning the camera too (X and Y position), which is quite a hard thing to do. (And trust me, that was really a hard thing to do, since I did that run myself)
Thank you for detailing, so it is a complex/hard thing to do indeed. Sorry.
Masterjun wrote:
Doing a run with only the goal of doing the same stuff as the previous movie in mind is not as hard.
Hmm... let me rephrase myself: What was the hardest thing you had to do (or very time consuming because of the complexity) that you think you should redeem co-authorship for this movie? Maybe Im wrong, but I think that the original creator even gia could do this if they would tried to TAS it on the same emulators you did.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
MESHUGGAH wrote:
I think that the original creator even gia could do this if they would tried to TAS it on the same emulators you did.
Why wouldn't they? The fact is, they didn't. I don't think rejecting a run by saying other people could have done the same is a good idea.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Joined: 12/2/2005
Posts: 139
Location: New York, United States
Am I understanding this correctly? This run took the input of the previous run and translated it to another emulator and it was accidentally 2 frames faster? The run is slower but somehow subtracting the lag difference between emulators makes this "faster"? But doing the same thing in the previous emulator wouldn't be faster? And neither run would work exactly on a real system?
What's a man like me supposed to do with all this extra savoir-faire?
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
notBowen wrote:
Am I understanding this correctly? This run took the input of the previous run
Nope, you are already wrong there. I never even looked at the input.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
So... Masterjun learned the game, made researches/debugs and used/created his own tools to find improvements what he did because this emulator had the possibility to use this RNG while the earlier one that p4wn3r used can't recreate the very same game state at that given time. He TASed the game's every parts but couldn't find anything else that could be improved, probably because it's already a highly optimized route to finsh the game so fast. Now look at the rules. According to Wiki: MovieRules, p4wn3r's movie is acceptable. But Wiki: EmulatorResources prefers BizHawk/lsnes (this movie) and also accepts p4wn3r's movie. So the difference in the two movie is that one of them could be made faster because the emulator was different. The way I see is now that someone made the previous movie with the fastest possible route (as far as we know it and the author made many researches) that possible on that emulator which still accepted, later someone improved it but that was only possible because the newer, preferred emulator's timing difference (and the author made many researches). If there will be no core changes done in the near future, I would say (and I'm not a judge) : accept this movie and add p4wn3r as author and Masterjun as co-author. Why? Everybody's dream is console verificating everything and sometime we will need to leave VBA and use a probably better emulation. However Masterjun tried to come up with new things but couldn't improve it, just had 2 frame advantage cause of different timing. It's basically doesn't improves the earlier movie. This judgement should respect p4wn3r's efforts he made on the game (the fastest possible run on the still accepted emulator) and proves people that it's likely to be possible on a real console since Masterjun made enough efforts to make it as fast as possible on the newer emulator without losing/gaining time. I also think that just adding only p4wn3r as coauthor to this movie is a good idea, since we are making speed run records too, so if someone faster (in real time, days months etc), he wins and Masterjun did it. Of course, if this movie would be faster than anything else besides emulator timing, p4wn3r (edit:)wouldn't be added as co-author (or author for my opinion).
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Player (118)
Joined: 5/13/2009
Posts: 700
Location: suffern, ny
WHat did I just see? Something that gets a yes vote! loved the run, speed is where it is at
[19:16] <scrimpy> silly portuguese [19:16] <scrimpy> it's like spanish, only less cool
Joined: 12/2/2005
Posts: 139
Location: New York, United States
Masterjun wrote:
notBowen wrote:
Am I understanding this correctly? This run took the input of the previous run
Nope, you are already wrong there. I never even looked at the input.
Is it different?
What's a man like me supposed to do with all this extra savoir-faire?
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
notBowen wrote:
Masterjun wrote:
notBowen wrote:
Am I understanding this correctly? This run took the input of the previous run
Nope, you are already wrong there. I never even looked at the input.
Is it different?
Well, I would say that copying input is different from not copying input...
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
BigBoct
He/Him
Editor, Former player
Joined: 8/9/2007
Posts: 1692
Location: Tiffin/Republic, OH
This comes back to when gia got all pissy about p4wn3r's re-creation of his run. The result may be the same, but the method to get there may have been different/not used the previous effort as a base.
Previous Name: boct1584
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
boct1584 wrote:
This comes back to when gia got all pissy about p4wn3r's re-creation of his run. The result may be the same, but the method to get there may have been different/not used the previous effort as a base.
that was different, the problem there was gia not wanting to submit his run here, so p4wn3r recreated it for TASV to have
Joined: 3/9/2009
Posts: 530
ALAKTORN wrote:
boct1584 wrote:
This comes back to when gia got all pissy about p4wn3r's re-creation of his run. The result may be the same, but the method to get there may have been different/not used the previous effort as a base.
that was different, the problem there was gia not wanting to submit his run here, so p4wn3r recreated it for TASV to have
And not providing anything but a Youtube video as 'verification,' not against a run already on the site.
BigBoct
He/Him
Editor, Former player
Joined: 8/9/2007
Posts: 1692
Location: Tiffin/Republic, OH
Misspoke there a bit. I think it's a bit like what one of the judges said in that thread: the end result may be the same, but a different/adapted route was taken to get there.
Previous Name: boct1584
TASVideosGrue
They/Them
Joined: 10/1/2008
Posts: 2785
Location: The dark corners of the TASVideos server
om, nom, nom... juicy!
Joined: 11/9/2012
Posts: 23
I am very happy with Mothrayas decision.
Joined: 2/14/2012
Posts: 73
What are the technical limitations preventing a run that syncs on hardware?
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Prion wrote:
What are the technical limitations preventing a run that syncs on hardware?
Patashu wrote:
There will never be a console accurate emulator (and thus never a console-verified TAS) for pokemon rby/gsc due to how insanely hardware-implementation-defined the RNG in those games is.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Experienced player (520)
Joined: 11/2/2010
Posts: 359
hegyak wrote:
Prion wrote:
What are the technical limitations preventing a run that syncs on hardware?
Patashu wrote:
There will never be a console accurate emulator (and thus never a console-verified TAS) for pokemon rby/gsc due to how insanely hardware-implementation-defined the RNG in those games is.
Could there eventually be a console-verified TAS for the Pokémon RBY games if you instead synced the run in GB Tower of Pokémon Stadium? I know for the Super Game Boy for the the SNES and for the Game Boy Player for the NGC the actual hardware of a Game Boy is contained so it would encounter the same issues as trying to sync on a real Game Boy. But, as far as I could find, the GB Tower in Pokémon Stadium is actually just an emulator that is contained on official hardware. So, while I don't recommend making the run on an N64 emulator to play a GB emulator, could the run be re-synced on those emulators to allow for a console verified run on official Nintendo Hardware?