Submission Text Full Submission Page
the game should reach a stage where it complete itself, no matter how long it takes.
...
no matter how long it takes

The Game Objectives

  • Emulator used: lsnes rr2-ß23 or BizHawk 1.11.6
  • ends input early
  • compared to the whole length, it ends very early
  • I mean dude, check out the chart at the bottom
  • finally a TAS that uses the cloud in a bowser fight

The Comments

This is probably the most amount of effort I've ever put into an April Fools submission.
Masterjun: As you've probably guessed by now, this run gains total control of SMW. While this is theoretically nothing new-
Viewerxyz: so its just another one of those boring ace tases?
Masterjun: I've actually accomplished something this time by using a different setup!
Viewerxyz: but it still results in the same total control as always right?
Masterjun: Well... yeah, but, I mean look, it even works in Biz-
Viewerxyz: i dont care what happened before the glitch just tell me what code you wrote and what it does
Masterjun: ...alright.

The Code

I wrote flutter A.I a program that procedurally generates every single input accepted by SMW and keeps resetting the Bowser fight until the end is reached. I left out the Start, L and R (shoulder) buttons (and of course the 4 extra buttons, but they aren't being parsed by SMW anyways) because they would just delay getting to the end... (Not that it won't take a long time anymore). The code accounts for deaths and will continue the procedure anyways, and it also checks for completion, where it will then start rolling the credits and end the game in the usual manner.

The Setup

If you're Viewerxyz just skip ahead to The Length.
What I wanted to show with that dialogue was the fact that, yes, I could have just used on of my other multitap 4 controller 16 button exploits to write the code. This is what I call the lazy method of reaching ACE. In this run however I limited myself to using only a single controller, and it turned out I was able to leave out the 4 extra buttons, too. This meant that this run could be replicated in BizHawk which doesn't support neither multitap nor the 4 extra buttons.
You might've noticed that I have included a lot of information into the encode. Basically the first thing I do is set up the x and y positions of 5 specific shells (the low bytes, to be more precise). In fact, I actually need to set up an additional shell, but setting it up now would only result in it being replaced later on. Then I spawned two Yoshi's and did the invisible tongue glitch to set up the chuck eating glitch. After that I set up one byte of the extended sprites (coin sparkles), the position of the additional shell and then the second byte of the extended sprites (coin sparkles again). I continued with spawning the green shell in the lowest slot and setting up its x position. Doing all this while also delaying one gametimer and finally pausing the game to offset the second gametimer from the first. Finally I spawned the chuck and killed the visible Yoshi so that the chuck is on the tongue of the now visible Yoshi (which is back at the Yoshi block).
This triggers a jump to open bus which executes an opcode based on the green shell position. That opcode is a jump which jumps to an offset based on the coin sparkles which happens to be controller registers where I conveniently put a jump to the shell sprite positions. The code there loads a value at the address in the gametimer bytes, which happens to be one controller register and stores it to the stack. This is how total control is gained.

The Setup Planning

OK at this point even you should probably skip to The Length, as this is getting real technical.
First I tested the mole glitch (stunning a mole to spawn an invalid sprite to make the game crash (execute opcode 00 (BRK))) that I used in the AGDQ run of SMAS+SMW (you might remember that Super Mario Maker on SNES), but it turned out that it doesn't work because of one ROM vector which is different for the SMAS+SMW cartridge. So I was back to the chuck eating glitch which requires a more difficult setup.
Eating a chuck with Yoshi can be done in different ways. The game end glitch run uses a coin which is collected while simultaneously licked by Yoshi creating a replacable sprite on Yoshi's tongue which results in the chuck spawning on said tongue. However, this creates coin sparkles which overwrite important data to manipulate where the glitch is going. Another way of eating a chuck is by using a mushroom instead of a coin, but that takes too long to set up (eating a bunch of berries and collecting the midway point). I decided on using two Yoshi's to perform the glitch. This works because when you lick a sprite with Yoshi and then overwrite that Yoshi with another Yoshi, the fact that the now invisible Yoshi has a specific sprite slot on his tongue remains. This means despawning the visible Yoshi (for example by killing) reactivates the old Yoshi and the tongue.
The code jump to open bus when you eat a chuck and it will execute shenanigans, but most importantly it needs to execute the opcode 0xFC (JSR). Executing 0xFC requires the value at the address at address $01+chuckslot to be 0xFC. I found out that if the chuck is in slot #8, I need the sprite with the lowest slot to have the xposition low byte to be 0x81, which will turn into 0x8F (because it adds an offset of 14 apparently) which then turns into $8F01 (0x01 because of $09) and that turns into $018F01 (because DB is 0x01) and luckily that holds 0xFC.
So far so good, the code now jumps to whatever address $1804 points to. $1804 are the ypositions of minor extended sprites which are being used for coin sparkles for example. The only problem with coin sparkles is the fact that they spawn in bundles of 4, the 3rd takes up $1805 and the fourth uses $1804. You can avoid spawning the fourth by collecting the coin close to the edge of the screen, meaning you can manipulate the low and the high byte seperately. Now where do we jump to? Of course we simply jump to the start of yposition data of normal sprites which is followed by xposition data meaning we have a bunch of values we can manipulate right!? No, we have two problems here. The first problem is the fact that it would be address $00D8 which is impossible to get with coin sparkles at the start of the level. So we instead jump to some other location that can be manipulated more easily to jump to $00D8. Which location you ask? Controller registers of course. By holding B, Y, select, down and L the values at $4218 read 20 E4 00 (the 00 because we don't have a second controller... or at least it isn't pressing anything) which translates to JSR $00E4... but wait a minute, that isn't $00D8 at all! Well yeah, you can also change it to $00D8 if you want but we still have problem number 2 to discuss.
The second problem is the fact that the most important part of the whole glitch, the part that starts even before the TAS, the payload itself, is pretty limited in size and shape. SMW uses 12 sprites slots (#0 to #B) but in YI2 the slots #A and #B are reserved for special sprites. We also need the chuck in slot #8, two Yoshi's (preferably in slots #9 and #7 then) and the lowest slot xposition sprite (in slot #6 then). So we only have 6 ypositions and 6 xpositions to work with. The important part is that the two blocks are not back to back so each block has to jump to the other (this is also why I could simply jump to $00E4, the xpositions, instead of $00D8, the ypositions, and it turned out that switching the blocks made it faster to manipulate the values) and one of the blocks also needs to jump out.
So the full code I wrote was:
$00D8: B2 13 D0 09 F0 60
$00E4: CB 48 CB CB D0 EE
or simply:
$00D8: LDA ($13) : BNE $00E5 : BEQ $013E
$00E4: WAI : PHA : WAI : WAI : BNE $00D8
LDA ($13): Let's explain from the start. $13 is the framecounter of SMW and $14 is the game-framecounter. You can offset them from each other by pausing the game because $14 also stops when pausing whereas $13 continues (they are the reasons why I jumped around strangely after placing the green shell and also why I pause the game just before the glitch). The timers also stop when this glitch happens. I made them read $4219 so I could use B, Y, select, Start, up, down, left and right to manipulate what's loaded into the accumulator there.
BNE $00E5: Hold on a second that doesn't even line up with the second block, are you stupid? No, the reason I did that is because I need two WAI's to advance one frame, but unfortunately I start at the wrong offset meaning that I have to advance a single WAI before starting the loop. But I only have to execute it once so I jump to $00E4 to start off the code and to $00E5 when in the loop. Also you might notice the BNE opcode (branch if not equal to zero), which only branches if the previous result wasn't 0, meaning I can stop the loop if I just input 00 for one frame (this also means my written code can't include a single 00).
BEQ $013E: Since this is the exact opposite of BNE this will always jump. $013E lies within the stack. (Why the stack? Continue reading.)
WAI: This instructions waits for an interrupt (like NMI or IRQ). This first WAI was for the offset so I don't read the controller registers while they're being updated (because it puts me after IRQ instead of after NMI).
PHA: Remember that the accumulator still holds controller data, meaning that byte is pushed into the stack with this instruction. This is the reason why I can simply jump into the stack once I'm done writing code (because it's exactly where I write my code in the first place).
WAI : WAI: This effectively waits a frame.
BNE $00D8: Complete the loop. (Oh, and yes, this always jumps even if it is a BNE.)
Since the amount of bytes I can write is pretty limited and I'm not able to write 00's, I simply wrote code to write code somewhere else. That somewhere else is where I put my code which simulates the main game loop with some additional hooks like overwriting parsed input or resetting the bowser fight when the end of the current input is reached or simply when you die.

The Length

Let's see here. We start counting the time after the arbitrary code execution is reached. This means that reaching 1-frame-inputs takes 0 seconds. We have 9 buttons to check and resetting takes about 37 frames + 1 frame execution = 38 frames each time. Thus, reaching 2-frame-inputs takes 512*38 frames or about 5:24 minutes. Reaching 3-frame-inputs takes the amount of time to reach 2 frames plus testing all the 2-frame-inputs meaning 512*38 + (512^2)*39. You can see a pattern here and the general formula for the amount of seconds it takes to reach n-frame-inputs is
1/60 * sum (i=1 to n-1) of ( (512^i) * (37+i) )
I've told you all this, but you will notice that you can eventually approximate it with just 512^n because exponentials. But let's be accurate for the first few frames.
Input lengthTime to reach
1 frame0 secondsIf you want you can add the 94 seconds of the setup to each of those time spans but it might get insignificant really fast.
2 frames5:24 minutesThis is twice in the encode to show that it really works the way it works.
3 frames2 daysLooking at the next time span, it looks like 3 frames is all you can get to when starting to judge this.
4 frames3 yearsIt's actually 2 months short of 3 years but do you really care when you've waited that long? Another two April Fools Days will have passed when this is reached. BizHawk's framecount will have wrapped around to negative numbers and went back to positive numbers.
At this point you might want to switch to console playback, because should you accidentally activate read+write mode and try to save your movie, your emulator will start consuming TBs of memory. So go grab your nearby console playback device and start anew, because looking at the next time span, 3 years is like nothing.
5 frames1491 yearsAccording to Wolfram Alpha, 53 generations will have passed and I'm sure someone will celebrate the day Mario can finally reach the speed of half a pixel per frame.
6 frames782955 yearsIf you'd buy one lottery ticket for each month that passes, you'd almost be expected to win once.
7 frames10^8 yearsThis is actually very simple to reach! Just let every single person on earth watch 3 weeks of the movie one after another!
8 frames10^11 yearsThis is the first time lsnes' framecount has wrapped around... and also the second time... in fact it has wrapped around 22 times, but compare it to BizHawk which has wrapped around over 90000000000 times by now. Oh and the sun will have run out of fuel, became a red giant, and swallowed the earth.
2.283 seconds10^361 yearsAfter 137 frames you can finally start seeing the first few pixels of Bowser. Also, the ultimate fate, the heat death of our universe, might have occured by now.
1 minute10^9744 yearsThe glitchfest almost started.

The Suggested Screenshot


It's right about when the earth dies.

The Judge

The Judge's Comment

Also ends earl

The Judge's Verdict

The Judge (hereafter referred to as Sexy Queen Samsara (hereafter referred to as Samsara)) has verified that this run does achieve its goal of ending input early. Samsara (hereafter referred to as The Judge (hereafter referred to as Pablo (hereafter referred to as Samsara))) is still in the process of verifying that the run does in fact complete. Once Samsara (hereafter referred to as Samsara) verifies that the run does indeed come to a state of completion, the run (hereafter referred to as Samsara) will be rightfully placed in the "decision: accepted" (hereafter referred to as "samsara: samsara" category of the site. Until then, Samsara cannot place Samsara within the "samsara:samsara" catesara, sosara Samsara shallsara rejectsara thisara Samsarasara.

The Judge's Obligatory Joke Comment

ill end ur moms input early

The Judge's Retraction

nvm that sounds weird lmao

The Judge's Progress

FRAME 4 WAS MINDBLOWING!!! CAN'T WAIT FOR FRAME 5!!!!!!


Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
I'm kind of... sad that the judge's comment is what it is. Of course there is no way that this could be accepted, I know that, and this is obviously a joke submission. But seeing how I put a lot of effort into this and then it just being judged as a joke with silly jokes from the judge is kind of unsatisfying. But maybe I'm just too used to having a real reason for rejection at the end of a submission text.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Samsara
She/They
Senior Judge, Site Admin, Expert player (2239)
Joined: 11/13/2006
Posts: 2822
Location: Northern California
I'm assuming that's a joke as well, but as for my actual reasoning: I, nor anyone else, can conceivably prove that this run does reach the ending within the entire lifetime of humanity, the Earth, and potentially the universe itself. We can't accept it without verification that it is a complete movie, and since it's impossible to verify... Yeah, it can't be accepted. GEG ends input 40 seconds earlier too if you wanna go into pedantic semantics
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family. Now infrequently posting on Bluesky
warmCabin wrote:
You shouldn't need a degree in computer science to get into this hobby.
Joined: 12/29/2011
Posts: 13
Samsara wrote:
I'm assuming that's a joke as well, but as for my actual reasoning: I, nor anyone else, can conceivably prove that this run does reach the ending within the entire lifetime of humanity, the Earth, and potentially the universe itself. We can't accept it without verification that it is a complete movie, and since it's impossible to verify... Yeah, it can't be accepted. GEG ends input 40 seconds earlier too if you wanna go into pedantic semantics
Is this a challenge :P? Because I think very well could prove this TAS eventually completes.
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
My point being, this rejection reason tells me that I should try submitting a movie that doesn't take as long to finish. (Say, having a mechakoopa spawn on top of Bowser who is reduced to have only 1 hit left)
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Masterjun wrote:
My point being, this rejection reason tells me that I should try submitting a movie that doesn't take as long to finish. (Say, having a mechakoopa spawn on top of Bowser who is reduced to have only 1 hit left)
But the TAS won't meaningfully TAS itself to the end time then.
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Nevermind what I said. I'm sorry Samsara.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Editor, Player (123)
Joined: 8/3/2014
Posts: 204
Location: USA
So when does the game ACTUALLY complete itself? 10 to the what power? You mentioned "the glitchfest almost began", but what about the completion? When is that? Do you know? And how do you know?
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
It will complete because it brute forces the input. Although now that you mentioned this again, I'm curious what happens in the general case for the code. Is the code able to go on seemingly forever? The encode makes it look like it records the amount of frames tried, so could that overflow (no matter how long it takes to finally try 2^32 frames)?
Player (36)
Joined: 9/11/2004
Posts: 2630
Ready Steady Yeti wrote:
So when does the game ACTUALLY complete itself? 10 to the what power? You mentioned "the glitchfest almost began", but what about the completion? When is that? Do you know? And how do you know?
jlun2 wrote:
It will complete because it brute forces the input. Although now that you mentioned this again, I'm curious what happens in the general case for the code. Is the code able to go on seemingly forever? The encode makes it look like it records the amount of frames tried, so could that overflow (no matter how long it takes to finally try 2^32 frames)?
It will brute force until it completes. And because it tries all combinations of buttons in order, then it can only take as long as the shortest known completion.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
YaLTeR
He/Him
Joined: 12/2/2011
Posts: 129
Location: Moscow, Russia
What if before it completes the game it finds an ACE and gets stuck in an infinite loop?
Player (36)
Joined: 9/11/2004
Posts: 2630
YaLTeR wrote:
What if before it completes the game it finds an ACE and gets stuck in an infinite loop?
While possible, and I'll be the first to admit that I'm not 100% on the ACE vectors in SMW, I don't see any way to trigger ACE from that room given only a cape and cloud.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Amaraticando
It/Its
Editor, Player (159)
Joined: 1/10/2012
Posts: 673
Location: Brazil
OmnipotentEntity wrote:
YaLTeR wrote:
What if before it completes the game it finds an ACE and gets stuck in an infinite loop?
While possible, and I'll be the first to admit that I'm not 100% on the ACE vectors in SMW, I don't see any way to trigger ACE from that room given only a cape and cloud.
Neither do I. In SMW, the only known ways to get ACE is with Yoshi. This post has a list of things that crash/softlock/hardlock the game: http://www.smwcentral.net/?p=viewthread&t=72499 (ctrl + F 'Locks and Crashes') But as the situation is a bit different from the normal Bowser fight (with external emulator savestates, not an in-game implementation), maybe something can ruin the loop, I don't know.
Samsara
She/They
Senior Judge, Site Admin, Expert player (2239)
Joined: 11/13/2006
Posts: 2822
Location: Northern California
Masterjun did you ACE this conversation to last forever too?
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family. Now infrequently posting on Bluesky
warmCabin wrote:
You shouldn't need a degree in computer science to get into this hobby.
Noxxa
They/Them
Moderator, Expert player (4125)
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
Samsara wrote:
Masterjun did you ACE this conversation to last forever too?
Nah, the conversation will end eventually. Of course, Masterjun isn't going to respond himself, as after all, he ended input early.
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.
Editor, Player (175)
Joined: 4/7/2015
Posts: 331
Location: Porto Alegre, RS, Brazil
Ready Steady Yeti wrote:
So when does the game ACTUALLY complete itself? 10 to the what power? You mentioned "the glitchfest almost began", but what about the completion? When is that? Do you know? And how do you know?
Assuming end is the first frame when Peach appears (the RTA ending time), then we would need to actualy TAS this fight to see how many frames it takes, because none of the 11-Exits/warps TASes use cloud.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math. My things: YouTube, GitHub, Pastebin, Twitter