This movie is slight improvement over MrWint's save glitch TAS, manipulating the TID with only 10 frames of delay, instead of 17, using GBA RNG and using BIOS palettes. Run time appears slower though just because of the BIOS.
Alyosha made the initial discoveries for the GBA RNG, but canned his submission after the judge found a TID manip that took slightly less CPU cycles. I went ahead and botted the TIDs on my own, and these were the two that ended up tieing for first:
red_pal1_gfskip0_hop5_title3_newgame0: TID = 0x64C1 (25793), Cost: 350760 Cycles
red_pal1_gfskip0_hop5_title0_newgame3: TID = 0x64C2 (25794), Cost: 350760 Cycles
The judge mentioned earlier found the 0x64C2 TID, this movie uses 0x64C1 if not just to be different. There is also another tiny "improvement," the BIOS exits 4 cycles sooner with pal instead of nopal, so a palette is set after the reset. The only other possible improvement would be to use SubGBHawk to make a sub-frame reset for save corruption, but even then SubGBHawk has a lot of issues and I couldn't get it to work correctly. (EDIT: alyosha was able to get it work, ignore what I said, this is the most optimized the movie can possibly be without a new strat.) Why couldn't we just have the 10 frame improvement and not go into a cycle war :(

ThunderAxe31: File replaced with a 35813 CPU cycles improvement (about 0.0085 seconds).
ThunderAxe31: File replaced with a 12 CPU cycles improvement... and judging.
ThunderAxe31: There are multiple aspects that should be addressed. First of all, this submission appears longer than the movie that it's attempting to improve, due to the introduction of the BIOS. This is an emulation improvement, and thus it isn't considered as a time loss. If we disregard the duration of the BIOS sequence, the overall time of this submission end being actually shorter than the current record.
Another aspect about the BIOS that must be mentioned, is that this movie runs the game in GBC mode, as opposed of the previous movie which used the GB mode. The GBC BIOS sequence is much shorter than the GB one, however we don't count difference of loading times when comparing movies, if these are just the result of different console settings. On the other hand, if a different setting allows for the execution of new strategies that can save more time, these specific time saves will be counted. In fact, this movie exploits an intended GBC BIOS feature, the palette swap, in order to manipulate RNG better than the previous record, which allowed to save 7 frames. This is the main improvement introduced by this submission.
Now, let's move on to the nuances regarding the glitch performed for beating the game. It must be noted that a faster setup exists for the Japanese 1.0 version of the game, however I don't consider that valid as it freezes the credits sequence right at the end. In order to be considered valid, a glitched ending must include the entirety of the credits routine, including the ability to get back to the title screen or to the save file, depending on which is the intended behavior. After that, it doesn't matter how much corrupted the save file is, or if the game is still playable at all. I also want to note that it's allowed for the video and the audio to feature corruption, though it's not the case for this submission.
Lastly, another important remark is about the validity of glitch itself. It was argued in an old forum post that this glitch would be invalid, due to the fact that it relies on reading uninitialized SRAM data. The issue with that reasoning is that it doesn't take in account that this game features a built-in feature for wiping out the save data, which effectively turns all SRAM bytes to 0xFF, which is the exactly how the emulator used initializes it. Additionally, there are many other games which are known to give unpredictable desyncs when attempting to play back a movie on real hardware, unless the cartridge's SRAM is formatted to 0xFF bytes by using an appropriate device. There are even some games that rely on reading uninitialized bytes produced by hardware components of the Game Boy console itself, which makes it impossible to confirm a movie on real console at all, but this doesn't mean that movies made with those games should be considered invalid by default, or anything like that. So in the end, a glitch relying on how the emulator initializes SRAM data is not considered as an emulation exploit, as these bytes are intentionally initialized with an agreed standard that allows movies to be deterministically played back. A glitch is considered invalid only if it relies on an unintended emulator behavior, in other words an emulation bug, which is not the case for this submission.
With all that said, accepting this submission for obsoleting the current Pokémon Red "save glitch" publication.
Note for the publisher: the movie length displayed in the submission is incorrect, as the site's movie parser still needs to be updated for reading the CycleCount value of SubGBHawk movies. The correct timing for this submission should be 1:15.69. Also note that BizHawk 2.4.2 doesn't correctly count the cycles for SubGBHawk movies that feature hard resets, so the latest dev build should be used for that instead. I already corrected the CycleCount value for this movie, though. It should be 317452036.
Spikestuff: Publishing. Time got fixed.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
Banned User
Joined: 4/1/2016
Posts: 295
Location: Cornelia Castle
I have a question about the text- what does red_pal1_gfskip0_hop5_title3_newgame0: TID = 0x64C1 (25793), Cost: 29780804 Cycles red_pal1_gfskip0_hop5_title0_newgame3
DJ Incendration Believe in Michael Girard and every speedrunner and TASer!
Banned User
Joined: 4/1/2016
Posts: 295
Location: Cornelia Castle
Also, shouldn't this be GBC?
DJ Incendration Believe in Michael Girard and every speedrunner and TASer!
Banned User
Joined: 4/1/2016
Posts: 295
Location: Cornelia Castle
Yes vote from me, nice improvement!
DJ Incendration Believe in Michael Girard and every speedrunner and TASer!
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
What problems are you having with SubGBHawk? It doesn't make sense to optimize for cycles without optimizing the reset, that's where most of the savings are. For example here is a movie that hits reset at cycle 191340171 as opposed to this submission that hits at 191349960. http://tasvideos.org/userfiles/info/64408496504648552 Basically just keep reducing the number on the cycle input on the frame before power is pressed until you get the 'save destroyed' message.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
Alyosha wrote:
What problems are you having with SubGBHawk? It doesn't make sense to optimize for cycles without optimizing the reset, that's where most of the savings are. For example here is a movie that hits reset at cycle 191340171 as opposed to this submission that hits at 191349960. http://tasvideos.org/userfiles/info/64408496504648552 Basically just keep reducing the number on the cycle input on the frame before power is pressed until you get the 'save destroyed' message.
I did that, but every time the resulting movie reported some cycle count larger than the original movie (yes, even after taking into account cycle counts are twice as large in GBHawk, it was larger than the original). Looking at the cycle count of that movie, it has 317773377 cycles, dividing that by 2 (to match Gambatte's cycles) you get 158886688.5 cycles, which is more than this movie.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
In SubGBHawk you have to account for mis-alignments caused by turning the screen off. Try this one: http://tasvideos.org/userfiles/info/64410159364464147
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
Alyosha wrote:
In SubGBHawk you have to account for mis-alignments caused by turning the screen off. Try this one: http://tasvideos.org/userfiles/info/64410159364464147
Oh yep, that's an improvement all right. Which I've just found another "improvement." Simply, using pal on the GBC is a few cycles faster than the GBA. So for the second bootup, just use GBC pal. And for the RNG I can just use GBC's pal(rel), since that's identical to GBA's pal. EDIT: Oh I also reduced the cycle counts on some inputs, all this put together ends up with 1:15.6950047016 http://tasvideos.org/userfiles/info/64414945217780527 Can someone add this movie file to the submission, I've added aloysha as a co-author.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
So putting this here just as a little note. I found newer BIOS strats and they increased the search range a bit, but they didn't actually find a better TID manip. A shame, but perhaps these new BIOS strats can be put to use in some other TAS. I have them up on my repo if anyone is curious about them.
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
CasualPokePlayer wrote:
http://tasvideos.org/userfiles/info/64414945217780527 Can someone add this movie file to the submission, I've added aloysha as a co-author.
I'm sorry, what? The Header.txt reports a CycleCount value of 317487861, while emu.totalexecutedcycles() gives me 126147684. Something's wrong there. Edit: Oh, and on a recent devbuild (#498ba66) emu.totalexecutedcycles() also gives me 126147684.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
Total execute cycles returns the number of cpu cycles since power on. The TAS contains a power cycle so it starts over from there. The cycle count in the bk2 is correct. I could make the lua function return this as well I suppose, but then it wouldn't match trace logger.
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
ThunderAxe31 wrote:
CasualPokePlayer wrote:
http://tasvideos.org/userfiles/info/64414945217780527 Can someone add this movie file to the submission, I've added aloysha as a co-author.
I'm sorry, what? The Header.txt reports a CycleCount value of 317487861, while emu.totalexecutedcycles() gives me 126147684. Something's wrong there. Edit: Oh, and on a recent devbuild (#498ba66) emu.totalexecutedcycles() also gives me 126147684.
317487861 is correct, and gives a time of 1:15.6950047016 (317487861/4194304=75.6950047016). Also note that GBHawk internally counts single speed cycles, while Gambatte internally counts double speed cycles, so GBHawk will have double the cycles Gambatte would have.
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Alyosha wrote:
Total execute cycles returns the number of cpu cycles since power on. The TAS contains a power cycle so it starts over from there. The cycle count in the bk2 is correct.
That's no good. The CycleCount value reported in the Header.txt should represent the whole movie, not just play from the last power-on. It's necessary for the site parser to display the accurate movie length of the movie. Please, update SubGBHawk in order to refle this. Right now the site doesn't still read the CycleCount for SubGBHawk movies, that's why it didn't display a completely off movie length, but used framecount instead. I'll get adelikat to implement it soon for SubGBHawk too.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
I may be wrong but it sounds like the Header cycle count does represent the whole movie. emu.totalexecutedcycles() is what doesn't.
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Yes Blaze, you're right, I got them swapped, my bad. Still, I need emu.totalexecutedcycles() to display the whole cycle count, otherwise I don't know how to confirm the validity of the CycleCount value reported in the Header.txt. And in any case, emu.totalexecutedcycles() includes the word "total", so it could at the very least be misleading. Maybe it should be introduced a new function for that, something like a "emu.frompoweronexecutedcycles()".
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Banned User
Joined: 4/1/2016
Posts: 295
Location: Cornelia Castle
What does pal_1 mean? I know what pal and nopal are, but pal1?
DJ Incendration Believe in Michael Girard and every speedrunner and TASer!
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
Alright TotalexecutedCycles now represents run time. I'm not the biggest fan of this since it's supposed to show CPU cycles (which can change with doublespeed mode), but it's only for SubGBHawk so I guess this will have to do.
Post subject: 20 cycles to go!
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Thank you, Alyosha. Edit: so, the current movie length is 1:15.695004, which rounded is 1:15.70. Now we just need to save 20 cycles to bring it down to 1:15.69!
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
ThunderAxe31 wrote:
Thank you, Alyosha. Edit: so, the current movie length is 1:15.695004, which rounded is 1:15.70. Now we just need to save 20 cycles to bring it down to 1:15.69!
There's pretty much no other way to save cycles at this point, not unless there is some new strat or new menu tech found out (the former being an entire re-work of the TAS and the latter is probably not possible by this point). Oh well EDIT: Also, the movie file hasn't been updated, someone please update it. For reference it is this movie file: http://tasvideos.org/userfiles/info/64414945217780527 EDIT2: Nvm, ↓
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
I just checked the movie file and the frame before the power button is hit is still at 50000. The correct value seems to be 14199. here is an updated movie file: http://tasvideos.org/userfiles/info/64459518673915123 New cycle count: 317452060
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
Found a 12 cycle improvement, updated movie file: http://tasvideos.org/userfiles/info/64550539469939623
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 790
Location: California
Oops, seems like the 12 cycle improvement was actually a 24 cycle improvement. I forgot to account that Gambatte's cycles are in double speed mode while GBHawk uses single speed mode cycles. Updated movie file: http://tasvideos.org/userfiles/info/64667814141526578
Editor, Reviewer, Skilled player (1361)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Well, I've reported it as a 12 cycles improvement because that's how the SubGBHawk core counts them.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3828)
Joined: 11/30/2014
Posts: 2834
Location: US
CasualPokePlayer wrote:
Oops, seems like the 12 cycle improvement was actually a 24 cycle improvement. I forgot to account that Gambatte's cycles are in double speed mode while GBHawk uses single speed mode cycles. Updated movie file: http://tasvideos.org/userfiles/info/64667814141526578
GBHawk counts single speed cycles, gambatte counts half speed cycles.
Memory
She/Her
Site Admin, Skilled player (1558)
Joined: 3/20/2014
Posts: 1767
Location: Dumpster
Does this rely on uninitialized RAM similar to previous publications? I remember hearing that this branch actually relies on uninitialized RAM that might not be possible on a factory condition cartridge and that the only way to achieve this RAM normally would be to set the values using glitches in a separate playthrough.
[16:36:31] <Mothrayas> I have to say this argument about robot drug usage is a lot more fun than whatever else we have been doing in the past two+ hours
[16:08:10] <BenLubar> a TAS is just the limit of a segmented speedrun as the segment length approaches zero