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.


Noxxa
They/Them
Moderator, Expert player (4124)
Joined: 8/14/2009
Posts: 4089
Location: The Netherlands
feos wrote:
Good thing I didn't pick it for judging. I agree with BOTH sides!
Good thing for you indeed. It's going to be a tough call, and I know people will get unhappy regardless of what the verdict shall be. That said, I'll leave the current discussion running for a while before I form a definitive call. It's a very debatable case.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
p4wn3r, are you a VBA coder? you sound slightly biased about the submission, I’m all for having runs resynched on better emulators, but after having read the post of that one guy that claimed it should be an automated process and it’ll be possible in future with BizHawk, I agree with him and think we shouldn’t have a new submission every time a better emulator is made, but rather something automatic to fix the current submission to work with the latest emulator
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
To me, this is some weird meta stuff. Here we are emulating an SNES that is running a Game Boy that is also being emulated. Wikipedia says:
The original Super Game Boy is known to play the game program and its audio 2.4% faster than other Game Boy hardware. This is due to the use of the Super NES's clock speed divided by 5 (which ends up being 4.295 MHz), instead of 4.194 MHz.[2] The timing issue can be rectified by adding an appropriate crystal to the Super Game Boy and disconnecting the Super NES's clock source.
http://en.wikipedia.org/wiki/Super_Game_Boy Information quoted at time of post and assumed to be accurate. Also, SDA also has more on the speed difference. https://kb.speeddemosarchive.com/Super_Game_Boy_timing
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
ALAKTORN wrote:
p4wn3r, are you a VBA coder? you sound slightly biased
Was, some time ago. In the rerecording branch, however, I just made some commits trying to port it to Linux, but eventually gave up because there was little interest. VBA has its flaws on some obscure games (every emulator has), I just think that it should simply keep being updated, not deprecated. And hegyak, the runs in question are not using SGB. VBA has some ugly hacks to emulate SGB, but they have no effect if you're playing GBC.
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
I don't just dislike the idea with the automated TAS converting thing, I absolutely hate it! Seriously guys, creating a TAS is effort, doing thousands of rerecords to be sure that this is the best way one can do. And then just creating a bot where you can't be sure that this TAS is perfect? I think it's not nice to see a TAS you created to be converted to a better emulator and then be given credit for a possibly suboptimal run. Converting movies by hand gives the opportunity to find optimizations or even new strategies to beat the game. Are you really thinking that a bot can be created that is so reasonable that it can convert the slightest RNG manipulation and lag reduction strategies without writing a bot for each game in its own?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Joined: 3/9/2009
Posts: 530
Masterjun wrote:
Converting movies by hand gives the opportunity to find optimizations or even new strategies to beat the game.
But you haven't done either of those here, so how is that relevant?
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
ok edit: also, why should it be relevant in this particular case? I was talking about the automatic TAS creation thing
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
ALAKTORN wrote:
about the submission, I’m all for having runs resynched on better emulators, but after having read the post of that one guy that claimed it should be an automated process and it’ll be possible in future with BizHawk, I agree with him and think we shouldn’t have a new submission every time a better emulator is made, but rather something automatic to fix the current submission to work with the latest emulator
I didn't claim that input resyncing can be fully automatic, just that it could be done with much less effort. Some human involvement will always be necessary, unless it's a bruteforce bot (and even then someone has to setup the bot and verify the end result). But I want to clearly distinguish between these two types of activities, which are so mixed only because of ancient tools we use (namely the linear recording method):
    1. When you resync input, you are working within the frame of a single strategy. The process stops right after the strategy successfully shows the expected results. With right tools and a right state of mind it can be done mindlessly. 1002. When you TAS, you are testing different strategies and comparing them to each other in order to find new factors and define the best strategy. The process can go for years (it's only limited by your own patience and the game complexity. Usually the patience runs out much earlier). And the process, of course, includes occasional resyncing of input, but is much more than that.
Masterjun wrote:
I don't just dislike the idea with the automated TAS converting thing, I absolutely hate it! Seriously guys, creating a TAS is effort, doing thousands of rerecords to be sure that this is the best way one can do. And then just creating a bot where you can't be sure that this TAS is perfect? I think it's not nice to see a TAS you created to be converted to a better emulator and then be given credit for a possibly suboptimal run.
I don't see what is to hate here. You first resync the movie, then you start improving it. Two different things. Yes, in order to ensure the perfectness, you may want to do both things before submitting the new run to the workbench, but it's not required. If you submit a suboptimal run, someone will beat it later. Example: Phil&Genisto's NES Goonies - the old movie was padded (by Bisqwit I presume) with 3 frames in order to sync with FCEU. Authorship wasn't changed. Then it was improved and obsoleted by other people. Of course, it's very natural to search for improvements in the middle of resyncing (especially when you use tools that require you to repeat the old input by hand), but then the only thing that matters is the outcome - whether you've actually found those improvements or not. If you didn't find any improvements then your thousands of rerecords are wasted (which is normal even for usual TASing - you may spend many days testing an alternative strategy only to throw it away after finding another one). And it doesn't really matter if you've wasted thousands of rerecords and many months, or you've wasted hundreds of rerecords and a few hours - the result is the same: no improvement.
Masterjun wrote:
Converting movies by hand gives the opportunity to find optimizations or even new strategies to beat the game.
No one takes away those opportunities from you. Once the movie is converted (or e.g. once the first half, which you consider frame-perfect, is converted), you can use it for comparison while making an improved version. Also, even if you convert the movie by hand, after that you still have to search it for optimizations and test new strategies. You can't claim that you've already tested all possible approaches while resyncing, because resyncing ends right after getting the same result as in the previous run.
Masterjun wrote:
Are you really thinking that a bot can be created that is so reasonable that it can convert the slightest RNG manipulation and lag reduction strategies without writing a bot for each game in its own?
I guess I was misunderstood. I was not talking about bots doing all the work. I was talking about the resync workflow (the one described in that thread is outdated though) which shortens the feedback loop so tight that you can do it using only spinal cord (figuratively speaking). In a way, you become bot yourself. RNG manipulations and lag management don't require changing the original strategy (if they do then it's a huge problem which entirely invalidates the old run and then yes, you have to TAS from scratch). So you leave the old input and make small adjustments only to the vital parts that desynced (inserting/deleting frames and buttonpresses, and seeing the final result immediately). I know it's kinda hard to get from the traditional TASing viewpoint, so I'm not saying this movie should be rejected. I think it should be published after adding the previous movie authors (like in recent Kirby framewar).
Joined: 11/9/2012
Posts: 23
If the file is just the same but on a more accurate emulator, even if work is done, I feel like it is needed busy work. I forgot who said it exactly, but I remember the statement in general. "TAS'es should be ported to a more accurate emulater when it can be done, but the person should only be a footnote, not considered an author himself." Hell, I could port these TAS'es given a week and no way in hell I should be considered an author. I think Masterjun should be thanked for porting p4wn3r's work onto a more accurate emulator and be listed in the Authors Comment for the work done, but no more than that.
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
Publishing as input resynching looks like a good third alternative, but that would be something so simple that's probably better to just update the publication text saying that "Author X redid this movie in emulator Y, getting a time of a:b:c, posterior attempts to obsolete it could use this time as reference". And to be clear, although I'm critical of the way that Masterjun exposes his Yellow submissions, I'm certain that he knows everything that's going on extremely well and that he managed to optimize it as best as I would have. But, seriously, this run is one minute of menu clicking and has only one non-trivial part that can be optimized using 40 lines of code. It's very simple to resync it. Further, imagine the publication text: "This run uses the same strategy as the previous run, but it uses a different emulator so luck manipulation is a bit different. But at least with the new emulator, Pikachu cries louder!". All this when Nach told me on IRC that VBA runs are still accepted if the games emulated don't have severe emulation flaws.
Joined: 1/17/2008
Posts: 133
Masterjun wrote:
DRybes wrote:
My vote is no, because a more accurate emulator is not used, so the slower time is not justified.
cool when did the vote question change to Do you want this movie accepted? ?
Sorry, allow me to clarify. I was not entertained by you doing the exact same thing as another run, only slower. I am not inclined to change that opinion after the fact upon learning that neither the previous run nor yours will ever sync or play back on a console. I appreciate that there is no faster way to complete this specific game on the specific core you used. Is that better? It's nothing personal against you and I would say the same had anyone submitted this run.
Player (146)
Joined: 7/16/2009
Posts: 686
p4wn3r wrote:
It was "Do you think this movie should be published?" before. The question as it currently stands is a joke. I'd find a video from a good stand-up comedian entertaining, not sure how that would help a judge determine if he should publish such video if it was submitted.
Deciding whether to publish is done based on the discussion in the thread, as the arguments made are crucial to that decision. Deciding where to publish (vault, moon or star) is done based on the poll. If you want to voice your opinion on whether or not to publish at all, the poll is simply not for you.
mklip2001
He/Him
Editor
Joined: 6/23/2009
Posts: 2227
Location: Georgia, USA
If this doesn't get published, then I like p4wn3r's idea of having a link provided in the current publication's text that points to this submission. I mean, no matter which way this decision is judged, I think we all acknowledge that (a) there are no new strategies here, and (b) Masterjun did put in the proper work for this movie, rather than just copy-pasting. It really just comes down to establishing careful precedent of how to treat more accurate emulators. The discussion of whether resyncing can be done automatically is just largely academic at this point. Sorry... I just figured a little summary post was appropriate given the long posts put in this thread recently.
Used to be a frequent submissions commenter. My new computer has had some issues running emulators, so I've been here more sporadically. Still haven't gotten around to actually TASing yet... I was going to improve Kid Dracula for GB. It seems I was beaten to it, though, with a recent awesome run by Hetfield90 and StarvinStruthers. (http://tasvideos.org/2928M.html.) Thanks to goofydylan8 for running Gargoyle's Quest 2 because I mentioned the game! (http://tasvideos.org/2001M.html) Thanks to feos and MESHUGGAH for taking up runs of Duck Tales 2 because of my old signature! Thanks also to Samsara for finishing a Treasure Master run. From the submission comments:
Shoutouts and thanks to mklip2001 for arguably being the nicest and most supportive person on the forums.
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
Scepheo wrote:
If you want to voice your opinion on whether or not to publish at all, the poll is simply not for you.
Exactly. That's why the poll is a joke.
Experienced player (764)
Joined: 6/17/2008
Posts: 146
p4wn3r wrote:
Scepheo wrote:
If you want to voice your opinion on whether or not to publish at all, the poll is simply not for you.
Exactly. That's why the poll is a joke.
With the neo-TASVideos publication system, the poll works a bit differently. For submission that are eligible for Vault, audience feedback (represented by posts and votes) is the main factor deciding if it's going to Moons or the Vault. For runs that aren't Vault-eligible, the viewer response largely decides if the run goes to Moons or is outright rejected. In the specific case of this submission where Vault vs Moons and entertainment value aren't relevant to the verdict, the poll indeed serves little use. Howewer, for the vast majority of submissions that aren't controversial special cases, it is a very useful way for users to provide simple feedback on whether or not they liked the run. That's not to say you cannot voice your opinion of whether or not a submission should be published - you are welcome and encouraged to post your arguments on the matter.
AnS
Emulator Coder, Experienced player (728)
Joined: 2/23/2006
Posts: 682
mklip2001 wrote:
The discussion of whether resyncing can be done automatically is just largely academic at this point.
It's not purely academic if we stop relying on absolute statements like "it has to be either full automation or hard manual labour". Some very efficient semi-automatic approach already exists for NES.
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
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
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Active player (309)
Joined: 8/21/2012
Posts: 429
Location: France
Looks like this submission raises interesting questions... First, apparently it is quite impossible (right now) to know which emulator is the more accurate one for GB games. Then, with that in mind, we end up with two movie files that do the same thing, but have very small differences because of the emulators. Maybe something can be done on the site to take care of those cases, in the movie database. At least listing the two movie files, and maybe choosing which encode to keep (for example, the best looking and/or sounding one), or just having both like the movie files. And then comes the author(s). Here I'd personally and obviously keep p4wn3r as the original author, then mention somewhere that Masterjun did the "porting" work for lsnes. But if someone later comes with an improved run for any of the two movie files, that's another story...
Joined: 3/9/2009
Posts: 530
As was said, I think accepting this without any actual improvements would set a very poor precendent and you could see half the Gameboy runs immediately wiped out for resyncs. But that also assumes that THIS emulator is more accurate in a meaningful way, which doesn't seem to be the case, nor did it seem to be the case for the Bizhawk run he submitted either. Why was that canceled then if the goal was "more accurate emulator?" I just don't really understand how "I tried to improve this run, but couldn't" could possibly merit supplanting the original work, or even adding their name to it after the fact. Let alone just because it's on a different, also inaccurate emulator. I'm sure he probably did make a good faith effort to beat it, but dupicating someone else's work is also a lot easier than doing new or original. The current Super Mario World run is done on a deprecated emulator, would you think it acceptable if someone resynced it on Bizhawk or even Snes9X 1.51 and erased their names with his?
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
turska wrote:
In the specific case of this submission where Vault vs Moons and entertainment value aren't relevant to the verdict, the poll indeed serves little use. Howewer, for the vast majority of submissions that aren't controversial special cases, it is a very useful way for users to provide simple feedback on whether or not they liked the run. That's not to say you cannot voice your opinion of whether or not a submission should be published - you are welcome and encouraged to post your arguments on the matter.
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. Anyway, if it somehow becomes popular to publish TAS movies that are resyncs of previous movies, I have taken the liberty to make an algorithm showing how to net publications in tasvideos. It's largely based on MESHUGGAH's great four step tutorial. Some may consider it a dark art, but well, so is TASing!
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Tangent wrote:
but dupicating someone else's work is also a lot easier than doing new or original
If you mean by "duplicating" that they are doing the same RNG and lag reduction strategies and such, then I have to disagree. I agree that it is harder to do a new TAS, but it is not harder than finding optimizations and then applying them.
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: 𝔐𝔞𝔤𝑦𝔞𝔯
I love the diagram p4wn3r, and I'm glad that actually someone understanded my point and didn't forgot. I don't think I need to say anything besides that on the case.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
I don't agree with this being published/accepted. Let's keep games on the system that it was primarily designed for.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Player (80)
Joined: 8/5/2007
Posts: 865
I'll keep it brief: I'm voting No. It's for the same reasons I voted No last time and the same reasons that are being discussed at length above. I just want my vote to be known by name, not given anonymously.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Has anyone tried to sync this run on Bizhawk? Just curious.