As it will happen eventually, destroying all my previous work for this game, have fun watching even less of this game.

Game objectives

  • Emulator used: lsnes rr2-β21
  • Aims for fastest time
  • Uses game-breaking glitches
  • Achieves credits early

Comments

Go ahead and watch the TAS first, it doesn't really take that long.
This is basically the reason why I cancelled the Kirby Super Star submission. You can maybe see why I prefer the previous movie over this one. But first...

What happens this time?

Let's start at the basics. In SMW there are sprites which can change the status of Mario called powerups (such as mushrooms, flowers, stars and so on). It's easy enough for the game to just run a routine to change it as soon as Mario touches a sprite which is listed as a powerup. Now the problem comes when Yoshi eats a sprite, because if it is a powerup, it should be applied to Mario. The game checks if the sprite has a specific property that says the game if it should give Mario a powerup when it is being eaten. Interestingly enough, chucks have this property! Normally, this isn't a problem because you can't actually eat chucks because they have another property which ensures that the sprite won't be caught by Yoshi's tongue (it goes right through), making it impossible to get it on Yoshi's tongue and eat it... or is it?

Item Swap

This glitch is also used in the warps run in YI2 to get the goal tape to replace the shell on Yoshi's tongue, getting the level end earlier or in YI1 to replace a sprite on Yoshi's tongue with a chuck so that Yoshi can... eat it!
This is what I'm doing, too. I replace a sprite on Yoshi's tongue with a chuck. How do I do that? Well, it is possible to get a coin by touching it, but it is also possible to get a coin on Yoshi's tongue. Now just do both things at the same time (see pictures on the right) and Yoshi's tongue will hold a nonexistent sprite or simply nothing. All the game now knows is that Yoshi's tongue holds a sprite in a specific slot and if in that moment a sprite such as a chuck wants to spawn in that slot, its position will be overwritten since it's now on Yoshi's tongue. Yoshi is now able to eat the chuck which is apparently a powerup to the game.

Eating a chuck

Since the chuck powerup isn't intended by the developers and accidentally in the game, the code doesn't account for it and incorrectly indexes the sprite to put in the item box (which is a lakitu cloud) and also gets the subroutine location wrong to jump afterwards. Instead of jumping to a routine to change Mario's status, it jumps to $014A13... which is Open Bus.

Open Bus

Open Bus is an area in the SNES which isn't mapped to a location like WRAM or ROM, which means no such device answers the request from the console to get the next instruction to execute. This means that the console will just execute whatever value was the last one on data bus.
The code just jumped to $014A13 so the last value on data bus is 0x01.
data businstructioninformation
0x01ORA ($01,x)X is 0x09, $0A holds 0x0107, $0107 holds 0x17, A turns to 0x17 and data bus is 0x17
0x17ORA ($17),Y$17 is interesting because $17 and $18 are SMW's controller data, so this is where I can kinda manipulate the outcome
This is the reason why I pressed X and the next frame AXL just before the glitch started so that $17 is 0xE0 and $18 is 0xA0. The code manages to change the SNES to emulation mode so now it can survive BRKs easily, as the vector changed. Then it managed to reach $4219 which are controller registers.

Controller Registers

These are the last 5 frames of input:
             1-1              1-2              2-1              2-2
F. 0 0|....u.l.AXL.....|BY..u.lr...R....|.Ys..d..AXLR0.23|................
F. 0 0|...Su...A.L.0..3|BY..u.lr...R....|.Ys..d..AX.R0...|BYsSu...A.......
F. 0 0|..sSud.rA....123|BY..u.lr...R....|.Ys..d......0.23|BYsSu...A.......
F. 0 0|....u...A.L.0..3|BY..u.lr...R....|.Ys..d..A.L.0.23|BYsSu...A.......
F. 0 0|BY...dl.A...01.3|B........XLR..2.|..s........R..23|BYsSu...A.......
or in bytes ($4218 - $421F):
E0 0A FB 64 10 CB 00 00
A9 18 D8 64 10 CB 80 F8
87 3D 0B 64 10 CB 80 F8
A9 08 AB 64 10 CB 80 F8
8D C6 13 20 72 80 80 F8
One thing to notice is that "64 10 CB" and "80 F8" occur often. "64 10 CB" is executed as STZ $10 : WAI which STores Zero to $10 and then WAits for an Interrupt. That effectively advances one frame and lets Auto-Joypad Read finish so that we have new input. Then it executes "80 F8" of the next frame (which is why there isn't one in the first frame). "80 F8" means BRA $F8 or BRAnch -8 bytes (or simply 8 bytes back), so we reach $4218 once again and can execute more code.
(The 0xE0 in the first frame isn't actually executed since we start at $4219, which is good because we needed that for the Open Bus part)
byteinstructioninformation
0AASL Aused for clearing carry
FBXCEto recover to native mode after emulation mode to safely let NMI execute
A9 18LDA #$18load 0x18 into A for the game mode later
D8CLDclear decimal mode flag to avoid the game getting confused with calculations
87 3DSTA ($3D)store A to whatever long address is in $3D, which happens to be $000100 which is the game mode
0BPHDpush direct page register so that I have 00's on the stack for later
A9 08LDA #$08load 0x08 into A for $13C6 later
ABPLBpull data bank which is now 00 thanks to the PHD before
8D C6 13STA $13C6store A to $13C6 to complete all necessary steps
20 72 80JSR $8072jump to the main game routine and free the game from any further gameplay

Suggested Screenshot

Special Thanks to:

  • Ilari for explaining Open Bus to me
  • Pat for not being able to chuck-glitch

Nach: Accepting as improvement to existing run.
Ilari: processing


Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
Zowayix wrote:
Does jumping into Open Bus depend specifically on a running chuck? I.e. I'm guessing a jumping chuck gets a goal orb while a running chuck gets a Lakitu Cloud; is that right?
Eating a running chuck is unavoidable jump into open bus (it gives you lakitu cloud, and routine triggered by collecting that points to open bus). Eating a jumping chuck gets you goal orb. I have no idea where that one jumps to (I presume it jumps somewhere).
Zowayix wrote:
Dwedit wrote:
If this is relying on Open Bus, I'd really need to see this get console verified before I make any votes on this run.
What exactly is Open Bus? I still don't get what's happening here.
Open bus is range of address space where no device (Work RAM, Cartridge ROM, CPU registers, PPU, Sound processor, etc...) responds. As consequence, if CPU tries to read from that address, no device will place anything on data bus (causing the read to give what happened to be on data bus before). What is on the the data bus changes in response to reads from non-open bus (since responding device will write to data bus) and writes to any address (even if open bus, since CPU will write to data bus). There is possiblity that if data bus is not used for anything for a while, various parasitic conductances will drain the parasitic capacitances, causing the value that CPU would read to change.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I just noticed something:
This is basically the reason why I cancelled the Kirby Super Star submission.
Does that mean he's going to cancel this as well, thus making it near impossible for anyone to submit a new TAS for this game as well? :/
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
jlun2 wrote:
Does that mean he's going to cancel this as well, thus making it near impossible for anyone to submit a new TAS for this game as well? :/
Yeah of course I will, that's exactly the reason why I uncancelled the Kirby Super Star submission already! It was my plan all along to cancel this one too and give Kirby Super Star all the attention!
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Eszik
He/Him
Joined: 2/9/2014
Posts: 163
Masterjun wrote:
inb4 credits glitch EDIT: noo, it's called game end glitch now :( EDIT2: or what
Actually it's low% now
I problably made mistakes, sorry for my bad English, I'm French :v
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Ilari wrote:
Zowayix wrote:
Dwedit wrote:
If this is relying on Open Bus, I'd really need to see this get console verified before I make any votes on this run.
What exactly is Open Bus? I still don't get what's happening here.
Open bus is range of address space where no device (Work RAM, Cartridge ROM, CPU registers, PPU, Sound processor, etc...) responds. As consequence, if CPU tries to read from that address, no device will place anything on data bus (causing the read to give what happened to be on data bus before). What is on the the data bus changes in response to reads from non-open bus (since responding device will write to data bus) and writes to any address (even if open bus, since CPU will write to data bus). There is possiblity that if data bus is not used for anything for a while, various parasitic conductances will drain the parasitic capacitances, causing the value that CPU would read to change.
Right. Or in other words... The SNES CPU has this pinout assignment. There are 24 address lines (CA0-CA23), 8 data lines (CD0-CD7) and several other lines (clock, CPURD, CPUWR etc). So the system has a 24-bit address bus (the address space is 2^24 = 16777216) and an 8-bit data bus (it can read/write one byte at a time). As far as the CPU is concerned, all these addresses are mapped to ROM or RAM chip(s), but the SNES has additional logic that maps other devices into the address space - for example 0x??4016 and 0x??4017 (the upper 8 bits don't matter) are connected to the SNES joypad ports. AFAIK the state of the address and data pins is backed transparently by a simple flip-flop per pin. The group of bits for the address bus is called the memory address register (MAR), and for the data bus it's called the memory data register (MDR). Reading a value from "memory" goes like this: the CPU sets the MAR to the address it wants to read from, and activates the CPURD line. In the next system clock cycle, the device connected to that address changes the state of the data bus lines which changes the MDR value. The CPU can then access the returned data at any time. Since the program code is also stored in the address space, when a read instruction is executed the MDR may contain the last byte of the instruction (e.g. part of the opcode arguments such as an indirect base address). When the device doesn't change a data bus line then that bit will be basically undefined (its value depends on how that address was read).
Joined: 12/29/2007
Posts: 489
^So it's like a hardware glitch based on undefined behavior? If so, I'm echoing an earlier sentiment in that I'll wait for console verification to vote.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
It's just a bug in the game. The values read from Open Bus would appear to be semi-random to a programmer who doesn't know how the CPU works internally, but we do know that and the results are always the same (which is why games like Speedy Gonzales are still working on the bsnes core and on real hardware). It's like deleting a file and immediately accessing that part of the hard drive again, without the system doing anything else inbetween. Technically it's undefined (you're not supposed to read "free" space), but it'll always work in practice.
Joined: 10/1/2013
Posts: 98
Location: My Basement
Quit being so legendary already. Wait, I take that back.
kazblox
He/Him
Joined: 5/4/2014
Posts: 29
RIP The age of fast play with classic glitches such as Walk Through Walls and flying with koopa shells or keys... that thing. LOW% new president 10/10, voted yes
Editor, Expert player (2099)
Joined: 8/25/2013
Posts: 1200
Voting yes, but if I find the movie itself boring. It's too broken.
effort on the first draft means less effort on any draft thereafter - some loser
Former player
Joined: 8/1/2004
Posts: 2687
Location: Seattle, WA
Yes vote, but these glitched ending type of runs are getting a little tiresome.
hi nitrodon streamline: cyn-chine
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
I'd like to say that I improved the submission text to really include all the information about this run.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Experienced player (589)
Joined: 2/5/2011
Posts: 1417
Location: France
Master is the king of breaking games. YES.
Current: Rayman 3 maybe? idk xD Paused: N64 Rayman 2 (with Funnyhair) GBA SMA 4 : E Reader (With TehSeven) TASVideos is like a quicksand, you get in, but you cannot quit the sand
Demon_Lord
He/Him
Joined: 2/20/2011
Posts: 80
Location: Chicoutimi, Qc, Canada
Masterjun wrote:
I'd like to say that I improved the submission text to really include all the information about this run.
Thanks for the detailed explanations!
Post subject: All I do is glitch glitch glitch no matter what
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
Another thanks for your submission text. I have a question. When inputing the controller data to write code, you use the 0, 1, 2, and 3 "buttons", of which I remember seeing 0, 1, 2 in SNES9X's input display, but not 3. Anyway, what do these values represent on an actual SNES controller? I don't know if the other SMW ACE runs used this, but they were console verified.. how does that work? If it turns out 0, 1, 2, 3 are "invalid", would it be possible to use twice as many controllers, and just use 8 "valid" button bits from each to achieve the same result?
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Post subject: Re: All I do is glitch glitch glitch no matter what
Masterjun
He/Him
Site Developer, Skilled player (1988)
Joined: 10/12/2010
Posts: 1185
Location: Germany
The previous run indeed used those buttons (Snes9x just doesn't show the "3" for some reason). That run was console verified so I don't know how far you can go to call it "invalid". On that matter, read the posts after that previous run was published.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15594
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. ---- [2604] SNES Super Mario World "game end glitch" by Masterjun in 00:41.98
Post subject: Re: All I do is glitch glitch glitch no matter what
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
Masterjun wrote:
On that matter, read the posts after that previous run was published.
Thanks for the link. I wasn't saying for sure they are invalid, just posing the question and wondering what ways could be done to get around them. IMO they are not valid input, but I don't see it as a big deal overall, since you could theoretically set up a different way of writing the needed SNES assembly without relying on those inputs, even if it increases the time needed to do so, and achieve the same result.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11479
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
It is only as valid as left+right and pressing a button at 30 fps is.
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.
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
feos wrote:
It is only as valid as left+right and pressing a button at 30 fps is.
I disagree, but I'll post my reasoning in this thread to avoid derailing this one.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Joined: 9/15/2013
Posts: 154
Didn't someone try some of the Dragon Warrior/Quest and Final Fantasy runs here and they don't sync on real hardware?
Joined: 2/21/2008
Posts: 255
This run is way too long. It needs to be shorter. Can we have categories for "Uses Multi-Tap" or "Uses Buttons Not "Pushable" On Stock Unmodified Hardware"?
"The guy was fatally injured and wants to be covered by God's tears (rain) before he dies. God is too busy to bother because it wastes frames." Frames 16:26
Joined: 1/13/2007
Posts: 343
seems this will probably verify since a commercial game apparently uses open bus predictably, or am i misunderstanding?
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
zaphod77 wrote:
seems this will probably verify since a commercial game apparently uses open bus predictably, or am i misunderstanding?
It definitely should not use open bus at all. Being able to send execution to open bus at all is pretty serious glitch.
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Still been too busy to verify. I did confirm that the run 1) is different in some way and my dumpscript doesn't work with it and 2) my new replay platform doesn't play back anything correctly so I still need to debug this code. Hope for verification video / confirmation in ~2 weeks. Maybe someone can beat me to it. Or not and I can be the first to confirm =) (I don't see a reason this wouldn't work with my old replay device, but I converted my controllers to the new input connectors and haven't made conversion boards yet. maybe someone else with the old replay device could verify, but it would require fixing the dumpscript too...)
true on twitch - lsnes windows builds 20230425 - the date this site is buried