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.


Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
it doesn't
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Masterjun wrote:
it doesn't
Right, I wouldn't expect it to sync without changes... so I guess I misspoke. Has anyone tried to resync this run on Bizhawk?
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
yes
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
riking
They/Them
Joined: 2/27/2013
Posts: 23
Location: United States
I know that other movies have had multiple YouTube and/or archive.org links when there's a slightly different encode that some people might like better (e.g no cutscenes). Why not edit the current movie with this file? Here's a 'mockup' I made. alternate link here (Large image warning.. I have a nice monitor :P )
Joined: 11/9/2012
Posts: 23
Masterjun wrote:
Cyber_Kun wrote:
Hell, I could port these TAS'es given a week
Apparently I didn't know how easy it is to create very optimized TASes
In no way am I saying you are bad at this. I've seen your work and I've been awe'ed. My point being here is that if all the port is some bot work that some idiot at TAS'es like myself could do with the bare minimum knowledge, I don't feel like that is improving the run to the point that I should be considered an author.
AnS
Emulator Coder, Experienced player (728)
Joined: 2/23/2006
Posts: 682
riking wrote:
I know that other movies have had multiple YouTube and/or archive.org links when there's a slightly different encode that some people might like better (e.g no cutscenes). Why not edit the current movie with this file? Here's a 'mockup' I made. alternate link here
That's exactly what was done with Goonies movie made in Famtasia but later resynced to FCEU by the site admin. Unfortunately, in current case the author of resync spent so much time on it that he wants some recognition/credits, I can understand it, but I wouldn't want other people to do the same (it's just a waste of time, especially when done using an ineffective method).
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Cyber_Kun wrote:
My point being here is that if all the port is some bot work that some idiot at TAS'es like myself could do with the bare minimum knowledge
And my point wasn't that I'm bad at this, my point was that it is indeed not easy to recreate these TASes to be optimized. That's also why I think that if someone managed to recreate the current any% run on SMW on an accurate emulator with every single optimization the current run does too, the credit to him is justified. Except when a single flaw in the run is discovered, then it has no right to obsolete the previous run.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Joined: 3/9/2009
Posts: 530
p4wn3r wrote:
The poll asks an irrelevant question when complicated decisions that would benefit most from seeing votes need to be taken. It may be sufficient if in the vast majority of runs you don't feel the need to ask people boring stuff like "is the run optimized well?", "do the goals make sense?", etc. However, I prefer to use it in the old and less dysfunctional way.
I've been a proponent of changing it to "Which tier should it be published into? (Moons/Vault/Reject)." Especially for things like frame wars of excrutiatingly boring games (Atari Spiderman comes to mind), people automatically vote Yes on if there's any improvement whatsoever (or claimed improvement), even if it's just a few frames, and even if the previous submission was massively weighted toward "no" in the entertainment. The question's been ignored in the other direction too, accepting at least one run for Moons that had predominantly negative feedback (why yes, I carry a grudge), so I'm not sure what purpose it really serves. And here we have people who explicitly stated they were voting yes based on the assumptions of an improvement in strategy, so...
Joined: 11/9/2012
Posts: 23
Masterjun wrote:
That's also why I think that if someone managed to recreate the current any% run on SMW on an accurate emulator with every single optimization the current run does too, the credit to him is justified. Except when a single flaw in the run is discovered, then it has no right to obsolete the previous run.
It is needed busy work, but it does not mean the person improved the TAS. Credit should be given as a footnote/authors submission, but the idea of anyone becoming listed as an author is silly in my view. I could be an author on a TAS such as this given a week if this passes.
Joined: 12/22/2009
Posts: 291
Location: Michigan
Holy fuck, can Masterjun just create a TAS without everyone getting a giant dick stuck up their ass? This is like the fifth time in a row.
Current projects: Yoshi's Island Disassembly Yoshi's Island any% TAS with Carl Sagan
Player (13)
Joined: 6/17/2006
Posts: 510
The situation as I understand it: - p4wn3r's run is faster - p4wn3r's run is on a deprecated emulator - Masterjun used the exact same strategy as p4wn3r - Masterjun saved 2 frames because of extra lag So, what to make of this? Let's forget who to give credit to and just look at the raw data. If the preferred emulator is indeed more accurate than the deprecated one, then the answer's obvious: Masterjun's movie should replace p4wn3r's. In fact, I'd even go as far as saying that even without any improvements whatsoever, it should replace the old movie. Now, the question then becomes if the 2 frames saved by Masterjun really is an improvement or just a result of resyncing to the new emulator. Well, since the exact same strategy was used (bruteforcing RNG), then it really is just resyncing and nothing else, so p4wn3r should still be credited as the author. I think the best way around this problem is to reject this submission, and then add to the current publication this updated version. This way, both p4wn3r (the author) and Masterjun (the resyncer) can be credited appropriately for their respective work.
Joined: 3/9/2009
Posts: 530
SmashManiac wrote:
- p4wn3r's run is on a deprecated emulator
This part's incorrect, or at least not fully accurate. VBA's deprecated, but it's still accepted, similar to Snes9x 1.51. The primary ways that VBA 'fails' to be accurate are in sound emulation though, which has little to do with this. Neither (as I understand it) are believed to be particularly accurate to the console due to difficulty emulating hardware limitations. Heck, there's been almost 10 more GB/GBC runs on VBA accepted this year than Bizhawk or LSNES ones. TL;DR. pw4n3r's run would still be accepted under the current emulator standards.
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Tangent wrote:
SmashManiac wrote:
- p4wn3r's run is on a deprecated emulator
This part's incorrect, or at least not fully accurate. VBA's deprecated, but it's still accepted
And where is that part now not fully accurate? I mean of course it can still be accepted, else it would be listed as Not accepted at all. However, deprecation can still be a reason for rejection.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Experienced player (764)
Joined: 6/17/2008
Posts: 146
Masterjun wrote:
Tangent wrote:
SmashManiac wrote:
- p4wn3r's run is on a deprecated emulator
This part's incorrect, or at least not fully accurate. VBA's deprecated, but it's still accepted
And where is that part now not fully accurate? I mean of course it can still be accepted, else it would be listed as Not accepted at all. However, deprecation can still be a reason for rejection.
That's not the case. VBA movies are currently accepted, and there are no plans for rejecting VBA submissions; if there were, you'd see news about it on the front page like with the Snes9x 1.43 deprecation. If VBA has major issues emulating a game, then emulator choice could be a reason for rejecting movies of that particular game, but outside that there will be no VBA rejections for the foreseeable future.
Spikestuff
They/Them
Editor, Publisher, Expert player (2656)
Joined: 10/12/2011
Posts: 6449
Location: The land down under.
p4wn3r and turska's points made me vote no. Sorry Masterjun.
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
I think the Bizhawk run should be accepted and replace all others. It takes more frames to complete, which clearly shows greater effort from the author, as more frames means more time needs to be spent optimizing each one. Alternatively, additional versions should be prepared for other emulators (bsnes-SGB, vba v23, vba v24), as it's possible that one of them is longer than the Bizhawk version.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Okay, my opinion for now. This movie must replace the very file in the current publication. Masterjun must be added as a co-author. This submission must be canceled afterwards. Or set to published and lead to the current movie in all links. Tasvideos yet has no setup for such things. EDIT: All I say implies lsnes has really BETTER emulation of this game than vba. If they are equal, or the domination is unknown, I see no point in replacing the existing movie. EDIT: Also, after reading this post I tweaked my mind and now I support just ADDING another movie file to the publication (still crediting both co-authors), and commenting in the description which one stands for what. EDIT: Now about the question. As a judge, I find the current question and the poll results 100% relevant to the future decision and sane internally. Here I described how to use them right.
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.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Resyncing movies officially http://tasvideos.org/forum/viewtopic.php?t=14178 Let's move the constructive discussion there.
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.
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
turska wrote:
Masterjun wrote:
Tangent wrote:
SmashManiac wrote:
- p4wn3r's run is on a deprecated emulator
This part's incorrect, or at least not fully accurate. VBA's deprecated, but it's still accepted
And where is that part now not fully accurate? I mean of course it can still be accepted, else it would be listed as Not accepted at all. However, deprecation can still be a reason for rejection.
That's not the case. VBA movies are currently accepted, and there are no plans for rejecting VBA submissions; if there were, you'd see news about it on the front page like with the Snes9x 1.43 deprecation. If VBA has major issues emulating a game, then emulator choice could be a reason for rejecting movies of that particular game, but outside that there will be no VBA rejections for the foreseeable future.
How the hell was that relevant to anything I said?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Player (146)
Joined: 7/16/2009
Posts: 686
Masterjun wrote:
How the hell was that relevant to anything I said?
Really?
Masterjun wrote:
However, deprecation can still be a reason for rejection.
turska wrote:
That's not the case.
How is this not clear?
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Scepheo wrote:
Masterjun wrote:
However, deprecation can still be a reason for rejection.
turska wrote:
That's not the case.
How is this not clear?
And then where is the explanation to that?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
AnS
Emulator Coder, Experienced player (728)
Joined: 2/23/2006
Posts: 682
Masterjun wrote:
Scepheo wrote:
Masterjun wrote:
However, deprecation can still be a reason for rejection.
turska wrote:
That's not the case.
How is this not clear?
And then where is the explanation to that?
I think it's pretty clear. Deprecation is not a goal in itself. The goal is to make movies more likely to sync with real hardware, and here it's not the case.
NitroGenesis
He/Him
Editor, Experienced player (556)
Joined: 12/24/2009
Posts: 1873
I voted no. There's no real improvement here outside of "I used lsnes over an older emulator." If a run can't truly be improved it should just be left alone.
feos wrote:
Okay, my opinion for now. This movie must replace the very file in the current publication. Masterjun must be added as a co-author. This submission must be canceled afterwards. Or set to published and lead to the current movie in all links. Tasvideos yet has no setup for such things.
Shit idea imo. Why should we replace an already published movie with a different one? If the consensus is that this run should be on the site, it should just be published and that's that. No reason to replace a perfectly legitimate publication.
YoungJ1997lol wrote:
Normally i would say Yes, but thennI thought "its not the same hack" so ill stick with meh.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Try reading the edits.
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
I did. Nothing there rebuffs my points, as you never retracted your question. Adding another file to the publication? Just frigging publish this one if that's the consensus. That's all that you have to do.
YoungJ1997lol wrote:
Normally i would say Yes, but thennI thought "its not the same hack" so ill stick with meh.