This is a thorough explanation of the strategy behind a Pokemon Blue Any% Glitchless TAS in 1:29:53 which you can watch at the following link.

Important Credits

Stringflow and Sudotrainer need a big thanks for assisting with getting me set up to bot my own encounter RNG manips for this TAS. Until that setup this TAS would not have been possible. Gifvex needs a big thanks as always for getting the emulator set up in BizHawk to be accurate enough for these TASes to sync on console. Extrems's work on Game Boy Interface also enabled the console playback of this TAS through his Game Boy Interface software.

Setup:

The TAS was created using BizHawk 2.3.1. As in the Yellow Glitchless and NSC TASes, the use of GBC mode, a gbc_bios.bin firmware, and CGB in GBA "true" mode allows the TAS to sync on the Game Boy Player console which can be seen in my initial video. This pastebin explains the pipeline we use for verifying the TASes.
An important update to the capture quality of the console feed was obtained with this TAS. Andersama with OBS-Studio development helped me learn HLSL shader language to write a video filter which corrects an error in the GameCube's video output and enables pixel-exact captures of GB, GBC, and GBA games over GBI-HF. This results in image fidelity equal to emulator. The filter was recently featured on RetroRGB: https://www.retrorgb.com/obtaining-pixel-exact-gbi-hf-output.html

Legend:

Frame = The smallest unit of time that can be observed realistically in emulation. The game accepts some inputs on every frame (for example in nickname menus), some (in the overworld) every other frame, and some (primarily in textboxes) every 3 frames. GB/GBC games play back at approximately 59.7275 Frames Per Second.
PrintLetterDelay = The use of mashing during textboxes to cause differences in frame and CPU cycle counts and in turn advance the RNG or manipulate the timing of an input window.
Red Bar = The sound effect and HP bar color change caused if ((Current HP * 48 / Max HP) < 10). Being in red bar cancels level up jingles when in trainer battles (worth 2.5 seconds per level up) cancels death cries (40 frames per death) and cancels text box clear jingles (timesave unknown, around a frame per clear). In Pokemon Blue it has the additional benefit of canceling pokemon cries when sent into battle, which changes many routing decisions including the Gastly fight after the heal pad.
Gen 1 Miss = An oversight in the code for the accuracy check causes moves with 100% accuracy to still have a 1 in 256 chance to miss/fail. This means that we can cause an enemy to miss even if they're locked into using a theoretically deadly move, or miss our own moves if we need to.
DSUM = A label for the predictable outcomes caused by deterministic behavior of the random number generator. This behavior leads to an encounter cycle which constantly loops through the ten encounter slots in order.
Consecutive Input Delay = In Gen 1 Pokemon, if you press a button it needs to be released for a frame in order for it to be pressed again, otherwise the game will just see the button as being held the whole time. This can be counteracted via a trick to reapply the relevant button press. The key is to press a different button (typically a directional button) on the same frame that you want to press the initial button again, it will register a 2nd press of the initial button and not a hold of the initial button. This is done when a directional input is used to reapply B while exiting shops (which can be done in RTA) and to reapply up/down in the item bag. The Fly menu does not have this trick available as it does in Yellow. The trick is also useful when B reapplies A to get on the Bike (also used in RTA), to deposit pokemon (not useful in RTA), and to throw a poke ball from slot 1 (used in RTA). In general it could be used to select any slot 1 bag item in the overworld or in battle, but the relevant ones are the poke ball throws and the bike. In Blue unlike in Yellow, some A presses to use items can be applied the same frame as an up or down press.
Ranges = The damage formula in Pokemon Gen 1 is modified by a random number, rerolled until it lands between 217 and 255 inclusive. The move is multiplied by this number and divided by 255 to obtain a range of possible damage between ~85% and 100%. Because we manipulate random number generation, we can manipulate these damage ranges to our liking. Also, because of the way much of the 8 bit math rounds down calculations, the full calculated damage is only a 1/39 chance (217 to 255 inclusive is 39 possible rolls).
Glitchless = the category this TAS was written for. I followed the RTA Pokemon Speedrunning community's ruleset for Glitchless, so while arbitrary code execution glitches like Brock Through Walls and Trainer Fly are disallowed, certain glitches that are not avoidable in RTA such as Gen 1 Misses are allowed, as well as oversights such as using Poke Doll on the Marowak ghost in Lavender Tower. The Instant Text obtained from talking to the Bike Shop owner without a Bike Voucher falls under the allowed oversight category. This ruleset is uncontroversial in the RTA community at this point.
Note: There are no known previous TASes of Blue ENG Glitchless in any ruleset. There is a somewhat improvable TAS of the JPN release, whose times are not easily comparable due to the text differences and the major route changes from not using instant text or the poke doll on Marowak. As there were no TASes of the ENG game prior to this, the main goal was to establish a very competitive baseline for TASes of this game and category, so there are some known optimizations possible in the early game.
Here's a link to the old JPN cart TAS in 4 parts: https://youtu.be/_flV070jIEY

Route:

Set options in game (Fast Off Set) using A and B holds to have text roll at the fastest speed while text speed is still on medium in the intro.
Squirtle DVs: 12/14 attack, 8+Special, 7+ speed, not both speed+special odd for specific HP requirements

Rival 1

Tail Whip->1/39 non-crit Tackle, 1/39 non-crit Tackle, any normal Tackle roll (growl fails from Bulba)
Buy 4 Poke Balls (Nido, Cut slave, Flyer, bag slot)
Catch L3 Nido on Route 22 - DVS 15 Attack, 0-8 Defense (must be even), 14 Speed, 15 Special
Kill L5 pika while using it to get hit to 1 HP (Pika needs to be 0-4 HP 0-9 Defense for 3x 1/39 normal tackle hits)
The previous 2 encounter manips were found using the RNG manip bot developed by Stringflow and amended for this TAS by Sudotrainer and me. The Nido takes a little less than 2 seconds of delay for a near perfect F6EF stat line, and the Pika takes only 8 frames of delay mainly because there are so many encounter tiles available to sync up the DSUM without losing time.
Weedle can spam string shot miss, hit 3 1/39 crits and one normal crit (alternate strat used here, Tail whip and 4 tackles. Avoids delays necessary for 3 1/39 crits and the 4 crit text boxes in exchange for the tail whip turn)

Brock

Geodude can't die to Bubble crit, instead 2x Bubble with a Tackle miss from Geodude
Cause Onix to miss turn 1, crit him to 1, die, get Nido hit to 1 (Nido needs 0-8 defense DV), finish Onix and level to 8. This fight is why the Nido on Route 22 needs to be level 3, otherwise L4 Nido jumps past L8 to L9 and can't learn Horn Attack.
Crits with specific damage range needs are hard to manipulate with Squirtle and Nidoran as they have low base speed. I spent 6000 rerecords each alone just to find a way through the Brock Onix fight and the Route 3 3rd trainer caterpie. A revised TAS would spend even more time searching for battle RNG, hopefully with a botting setup to find the minimal delay necessary.
Sell Bide, Buy 7 Escape Ropes (needed for Bill's house without walking to the moon escape rope, also faster than teaching Dig)

Route 3

Caterpie: Leer+2x HA (take 2 non-crit 5 damage tackles to 1 HP)
Weedle: HA crit+HA
Caterpie: HA+HA crit (take a 1/39 5 damage Tackle to 1 HP out of 31)
Rattata: HA+HA crit
Ekans: HA+HA crit
Weedle: HA Crit
Kakuna: Tackle+HA crit
Caterpie: 1/39 HA crit
Metapod: HA Crit+Tackle non-crit
Caterpie: 2x HA (take 4 damage)
Metapod: HA+HA crit

Mt Moon

Grab Moon Stone
Rattata: PS+HA Crit
Zubat: HA Crit+Supersonic Fail+Tackle
Grimer: HA+HA crit
Voltorb: HA crit+PS
Koffing: HA 1/39+HA 1/39 crit (optimal strat, this TAS crits both turns)
Catch Sandshrew after Mt Moon

Cerulean

Center to set the escape rope waypoint
IT is slightly faster for Misty's gym but makes the zany RNG manip too difficult because PrintLetterDelay cannot be used while IT is on
Inside Misty Gym, swap Nidoking with Squirtle, evolve to Nidoking
Misty's Trainer: HA crit x2

Misty

Staryu: HA crit+PS (1/39 both) (This TAS did not find the optimal fight here, uses 2 HAs)
Starmie: BB non crit, HA Crit high roll, Gen 1 Miss into HA 1/39 crit x2
Teach Bubblebeam
Get IT
Pidgeotto: Swap up and use BB, get hit to 1, BB crit
Abra: PS crit (Not found due to IT lack of PrintLetterDelay, used HA instead)
Rattata: BB crit
Bulbasaur: HA crit
Caterpie: PS crit
Weedle: BB
Pidgey: BB crit
NidoF: BB crit
Rattata: BB
Ekans: BB crit
Zubat: BB crit
Pidgey: BB crit
NidoF: BB crit
Mankey: BB crit
Ekans: BB crit
Zubat: BB crit
Onix: BB
NidoM: BB crit
NidoF: BB crit
Rattata: BB, teach Thrash over Poison Sting
Ekans: BB
Oddish: Swap up Thrash, Thrash non-crit x3
Escape Rope back to Cerulean in Bill's house after getting the SS Ticket
Dig Rocket: Thrash non-crit x2
Pidgeys: Thrash non-crit x3
Spearow+Raticate: Thrash
Boat Rival
Pidgetto: Get hit back to 1 from QA crit, Thrash crit
Raticate: Thrash
Kadabra: Thrash
Ivysaur: Thrash crit
Manip the 1st can on exiting the boat as the cans are selected when you enter Vermillion.
Teach Cut, use Cut, Manip can 2 after choosing the 1st can

Surge

Voltorb: Thrash
Pikachu: Thrash
Raichu: Thrash crit
4 Turn Thrash: Thrash
Venonat Trainer: Thrash
Cubone: BB
Slowpoke: TB
Slowpoke: TB
Oddish+Bulbasaur: Thrash
Geodude+Geodude+Graveler: TB->Selfdestruct Gen 1 Miss
Meowth+Oddish+Pidgey: Thrash (used Pidgey for red bar maintenance)
Growlithe: Swap TB and Thrash, TB crit
Vulpix: TB crit
Get Underground Elixer

Celadon Mart

Shop: 2 TM07, 2 Poke Doll, Fresh Water, 3 X Speed
Grab Doduo while heading to Fly House
Fly Menu: Swap up Poke Doll, teach TM07 HD in 3, teach Fly

Tower Rival

Pidgeotto: TB
Gyarados: TB (may be able to Thrash Crit in a revised TAS, needs more investigation)
Growlithe: Thrash
Kadabra: Thrash
Ivysaur: Thrash crit
Gastly: TB crit
Gastly: TB crit
Gastly: Thrash->Night Shade x4, TB crit
Gastly: TB crit
Zubat: Thrash
Zubat: Thrash
Golbat: Thrash crit
Koffing+Drowzee: Thrash crits
Zubat: Thrash
Rattata: Thrash
Raticate: Thrash
Zubat: Thrash
Snorlax Menu: Swap up Elixer
Get Max Elixer on cycling road after biking down the left side
Drowzee: Thrash crit
Drowzee: Thrash crit
Kadabra: Thrash
Drowzee: Thrash crit
Drowzee: HD
Hypno: HD

Koga

Koffing: TB x2 (a revised TAS would probably want to HD here and a find a gen 1 miss selfdestruct from Weezing, his experience is needed to hit L36 for candying to 37, hitting a speed mark for Silph Rival's Alakazam in combo with Koga's speed badge boost)
Muk: HD
Koffing: HD
Weezing: HD
Pallet menu: Elixer, Swap up X Speed, HM03, Rare Candy to get back to the top of the menu for escape rope in Mansion.
Get Silph Elixer
Arbok: HD

Silph Rival

Pidgeot: TB crit
Gyarados: TB
Growlithe: TB crit
Alakazam: HD
Venusaur: HD
Cubone: BB
Drowzee: HD
Marowak: BB
Silph Gio
Nidorino: TB crit
Kangaskhan: TB crit
Rhyhorn: BB
Nidoqueen: HD
Use an Elixer

Blaine

Growlithe: BB crit
Ponyta: BB crit
Rapidash: HD
Arcanine: HD
Exeggcute: HD

Erika

Victreebel: Thrash crit
Tangela: Thrash crit
Vileplume: Thrash crit

Sabrina

Kadabra: Thrash
Mr. Mime: Thrash crit
Venomoth: Thrash crit
Alakazam: Maintain red bar with Psywave, Thrash crit
I'm very proud of the Alakazam fight here. The fight requires manipulating a 4 turn thrash on Kadabra (1 in 2), 2 crits on Mr Mime and Venemoth (1 in 6 each), Psywave use from Alakazam (1 in 4), Psywave exact damage (1 in 64 because damage is from 0 to 1.5x level), and then another thrash crit (1 in 6). Getting all this means you never need to take damage again for red bar through the rest of the run.
Rhyhorn: BB
Machoke: TB crit
Machop: TB crit
Machoke: TB crit

Gio Gym

Rhyhorn: BB
Dugtrio: BB
Nidoqueen: HD
Nidoking: HD
Rhydon: BB
Swap up Max Elixer, Teach HM04, Teach Fissure in 2

Viridian Rival

Pidgeot: X Speed, TB crit
Rhyhorn: BB
Gyarados: TB
Growlithe: TB crit
Alakazam: Fissure
Venusaur: Fissure
Use an Elixer

Lorelei

Dewgong: Fissure
Cloyster: Fissure
Slowbro: HD
Jynx: HD
Lapras: HD

Bruno

Onix: BB
Hitmonchan: TB crit
Hitmonlee: TB crit
Onix: BB
Machamp: HD

Agatha

Gengar: X Speed, Fissure
Golbat: TB crit
Haunter: Fissure
Arbok: HD
Gengar: Fissure
Use Max Elixer

Lance

Gyarados: TB crit
Dragonair: Fissure
Dragonair: Fissure
Aerodactyl: TB crit
Dragonite: HD

Champion

Pidgeot: X Speed, HD
Alakazam: Fissure
Rhydon: BB
Gyarados: HD
Arcanine: HD
Venusaur: HD
Bag Slot notes to manip a full bag of 20 items for Gyms 4-7:
Poke Ball
TM34->Escape Rope->TM27
Helix Fossil
Nugget
SS Ticket
TM28
Full Restore
HM01
Bicycle
Elixer
TM07
Poke Doll
Fresh Water->Card Key
X Speed
HM02
Rare Candy->Secret Key
Poke Flute
Max Elixer
HM03
Gold Teeth->HM04

Notes:

The frame count of this TAS will make it appear to be a 1:30:03. When played back on console you can see in the commentary video that this is not quite accurate, the TAS actually runs at 1:29:53 from bootup to last input. How is this possible without the TAS desyncing? It turns out that frames do not actually exist on the game boy while the LCD is disabled, and the emulator's counted frames during this time can last a shorter than usual number of CPU cycles. For console playback we sync the inputs by CPU cycle count, and using the total executed cycle count obtained from the emulator instead of frame count we get the same time as the console playback at 1:29:53.
I'll also make a quick note due to inevitable comparison to the similar Yellow Glitchless TAS. The difference in the nature of red bar and the lack of instant text in yellow make for some route differences that to me are uniquely interesting, including the trips to the bike shop and the Gastly Thrash strategy. Instant Text requires delaying flyer from Pidgey on the way to Vermillion (the optimal Yellow strategy and the strat used in Blue JPN Glitchless) to Doduo on the way to the Fly house. The different starters between Pikachu and Squirtle and different Brock opponent levels lead to unique strategies for getting exp before Brock. The different location of Male Nidoran and different starting levels also lead to different strategies to get to Misty with Nidoking. Blue also does not have color lag, so move use order and critical hit timing have differences. The mid to late game ends up looking quite different as a lot of the gym leaders have different AI and different Pokemon, usually at lower levels than in Yellow. The lower levels enable a lot of strategies with using Bubblebeam and Thrash in the lategame where Yellow needs to refill PP more often and use Horn Drill.
Thanks for watching and reading the explanation!

ThunderAxe31: Judging.
ThunderAxe31: Regarding the technical quality of this TAS, I found no issues. The run itself is very optimized and well-crafted overall, and the goal chosen is clear and sensible. Usage of Instant Text and Poké Doll on Marowak's ghost can't be objectively considered as glitch exploits, as it's simply how the game works, regardless of which was the developers' original intent.
Regarding the entertaining part, I found no issues either, as I consider this movie more or less as much entertaining as the Pokémon Yellow movie that was published last year. It's undoubtedly within our Moons tier entertaining requirements.
The major problem I've encountered was about branching, as it's preferred to avoid the introduction of additional branches if there is already a similar published movie, or if the entertaining is not considered particularly high (more details in this post). For a long time, Pokémon Gen I glitchless TASes have not been considered much entertaining, and it was initially requested to the authors to avoid exploiting Red Bar, as some users found its continuous sound to be annoying. However, last year we've seen a sudden change of trend, when the first Pokémon Yellow glitchless movie was submitted. I consider it perfectly understandable that the opinions of a mass may change over time, especially if it's after a whopping 10 years timespan. I personally also consider the unprecedented optimization to be a factor, as the care for details and showcasing of technical quality can affect the interest of people.
While I don't consider Pokémon Blue/Red to be much different from Pokémon Yellow as games in themselves, I have to acknowledge that their differences are intrinsic, and it results much evident when comparing glitchless movies made with the respective games. So I've come to the conclusion that it's worth to have separate branches for this goal. Still, it's necessary to have a solid approval from the community, as we want to create additional branches only when the community does appreciate them enough, especially if we already have something similar. While the audience reception for this submission wasn't particularly vast or diversified, I have to note that on the other hand there was literally no one objecting against the idea of having a new branch. I was also unable to find any reason that could make me think that the community in general could be against it. It's true that in the past it could have been different, yet I found nothing suggesting that these conditions present 10 years ago could still be relevant today, while I also believe that a judgment shouldn't base on hypothesis.
With all that said, accepting this movie as a new Moons branch.
Note for the admins/seniors (as they are the only ones with privilege to edit obsoletion chains): as we already have some old obsoleted Blue/Red glitchless movies in an existing branch, these should be moved under the obsoletion chain of this submitted movie, after that it's published, since their movie goal matches. This includes movies 548, 504, 428. (edit: see my note below)
Spikestuff: Publishing.
Noxxa: Updated movie time per request to correctly correspond to cycle count (previously listed time was 1:30:03.69).
ThunderAxe31: Thanks to a report from a forum user, I've noticed a mistake I've made about my judgment note: the submitted movie should obsolete movie 428, while movies 548 and 504 should be put in the obsoletion chain under 950. I apologize for the inconvenience.


Alyosha
He/Him
Editor, Emulator Coder, Expert player (3826)
Joined: 11/30/2014
Posts: 2834
Location: US
Yellow is basically a different game then red /blue. Just look at the visuals, yellow is made to take advantage of GBC capabilities. It's like how we have TASes for donkey kong country on different platforms. In this case it's less apparent since red / blue is allowed to be played on GBC hardware for console verification.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
I will note also, treating R/B and Y as fundamentally different games helps explain the admittedly high branch count. The basic save corruption (SC)/memory corruption (NSC) /branchless (Glitchless) split makes for three logical categories in each game along the recommended count, with Red/Blue additionally having some Catch'em all movies for full completion and skipping SC/NSC due to the much heavier redundancy with Yellow. I would still argue that the memory corruption (NSC) movies should be treated as different branches, but it's much more complicated than the Glitchless situation.
Active player (261)
Joined: 12/13/2016
Posts: 352
Agree here, yellow is definitely quite distinctive from red/blue and warrants its own category
Memory
She/Her
Site Admin, Skilled player (1558)
Joined: 3/20/2014
Posts: 1767
Location: Dumpster
When I did my judgment of the game end glitch run of Yellow, there were two things I kept in mind. First was the rules regarding versions. Secondly was the precedent that versions of the same generation of Pokemon could obsolete each other in the save glitch branch. I had to essentially determine at what point would the differences between versions be considered significant enough to warrant separate branches. I felt that in the short game end glitch branch, the differences between versions were minor. Now while I have yet to watch this run, from my understanding of Gen 1 Pokemon, the differences between versions in a full game run such as this would be much more pronounced. There are a number of different fights etc. Given that different bosses and levels are mentioned in the rules as an example of when they should be separate branches, I believe this would be the point at which they should be considered separate games.
[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
Editor, Reviewer, Skilled player (1360)
Joined: 9/12/2016
Posts: 1646
Location: Italy
feos wrote:
ThunderAxe31, when judging this movie, please verify the cyclecount and suggested movie time that originates from it. Also there's another movie that needs to be verified on the same subject, I think it'd be handy to do check both at once.
All right, I did check myself and I confirm that the cycle-based timing brought by TiKevin83 is accurate: 1:29:53.187. I'll confirm the other movie you mentioned soon. Edit: confirmed the Yellow movie timing as well: 9:47.009. By the way, there is no need to use a Lua script. In BizHawk, go to File > Movie > On Movie End > Pause. Then, after that the movie playback has reached its finishing point and emulation is still paused, open the Lua window and type emu.totalexecutedcycles() in the Lua console, then hit enter and the cycle amount will be outputted. I got the very same results as the ones from TiKevin83, so it seems to be applicable.
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"
Noxxa
They/Them
Moderator, Expert player (4128)
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
Submission time has been updated as was requested.
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.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15619
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [4013] GB Pokémon: Blue Version by TiKevin83 in 1:29:53.19
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
The movie publication happened with the incorrect time of 1:30:03 and not the correct 1:29:53 somehow... this is very disappointing
Joined: 12/29/2007
Posts: 489
Regarding the changed obsoletion chain, shouldn't 504M and 548M belong to the glitched chain instead of the glitchless chain? Those two movies use the Mew glitch which involves memory corruption. That would leave the glitchless chain with only two movies (this one and the very earliest R/B one), the only ones to obey the glitchless rules.
Editor, Reviewer, Skilled player (1360)
Joined: 9/12/2016
Posts: 1646
Location: Italy
TiKevin83 wrote:
The movie publication happened with the incorrect time of 1:30:03 and not the correct 1:29:53 somehow... this is very disappointing
Please don't be concerned for something like that. The time was promptly corrected and any future mistake will as well. Also, please understand that the site code is old and some functionalities aren't automated.
Zowayix wrote:
Regarding the changed obsoletion chain, shouldn't 504M and 548M belong to the glitched chain instead of the glitchless chain? Those two movies use the Mew glitch which involves memory corruption. That would leave the glitchless chain with only two movies (this one and the very earliest R/B one), the only ones to obey the glitchless rules.
My mistake, I apologize. I've now proceeded to add the lacking "corrupts memory" category and the "trainer escape glitch" label to the two movies you mentioned. I also added a correction note at the bottom of the submission text, and contacted a higher staff member for fixing the obsoletion chain. Thank you for the report.
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"
Joined: 12/29/2007
Posts: 489
Thanks!
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
TiKevin83 wrote:
I can provide my lua script if needed for independent verification - it outputs emu.totalexecutedcycles() for each movie.getinput(), we usually use this to transform GBI timestamps for console verification but I stripped out the GBI transform to get the raw cycle count at last input: 2A225FA40 (11,310,332,480 GBC m-cycles in decimal) Now this number needs some elaboration. The game boy has roughly 4mhz T-cycles, but is effectively memory bound to operate every 4 cycles (1 M-cycle, roughly 1mhz). The GBC has a double speed mode, so to capture every possible GBC m-cycle Gambatte operates at 2mhz internally. We'll want to compare instead using the canonical ~4mhz GB T-cycle count, so we double to 22,620,664,960 GB t-cycles. Divided by the GB t-cycle clock rate of the Game Boy observed by Gekkio of 4.194304Mhz (t-cycles/second) http://gbdev.gg8.se/wiki/articles/Game_Boy_Technical_Data We get a final time of 5,393.187 seconds (1:29:53.187), which corresponds quite nicely to the time observed during console verification.
What internal counter needs to be put into movies so that the site could use 4194304 cycles/sec to know exactly the real movie length? The cyclecount I added to movies recently doesn't seem to correspond to the correct rate.
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.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
Is it off by a similar factor to before or is it off by a factor of 2/4? Can you link me to the commit where it was implemented?
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3826)
Joined: 11/30/2014
Posts: 2834
Location: US
gambatte only reports cycles in 32 bit unsigned format, so anything longer then about 4 billion cycles will roll over.
Former player
Joined: 3/13/2017
Posts: 15
feos wrote:
What internal counter needs to be put into movies so that the site could use 4194304 cycles/sec to know exactly the real movie length? The cyclecount I added to movies recently doesn't seem to correspond to the correct rate.
I don't know if you had a certain example, but I recently submitted a gambatte movie and noted the cycle count in the header is accurate at 2097152 samples/sec. The counter accumulates the number of audio samples which has the same frequency as the higher clock speed the GBC can be set to.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
If I export this submission after having replayed it to the end, the cycle count is 11310332480, which doesn't correspond to 4194304 cycles/sec. This GB movie http://tasvideos.org/userfiles/info/60760907460145790 gets recognized as 00:44.9 if we use 4194304 cycles/sec. So looks like we should just use half the rate for the site parser?
Alyosha wrote:
gambatte only reports cycles in 32 bit unsigned format, so anything longer then about 4 billion cycles will roll over.
Then we need to make it 64bit.
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.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
If you read back that quote it explains why Gambatte opetates at half the 4194304. The GB is memory bound so Gambatte is only counting memory-bound cycles, which is 1/4 the rate, but the GBC rate is twice the GB rate, so it has to count at half the rate overall.