NEW CREDITS WARP WITHOUT ACE FOUND BY AMARATICANDO
No ACE used! Yes, it is as simple as it looks. For once there's not a lot of technical behind-the-scenes code-writing here; just writing directly to the gamemode!
In fact, this glitch is an extension of what we used to call the Null Sprite glitch, so if you're familiar with that, it's the same thing except we can now get more slot numbers than just 0xFF in Yoshi's mouth. Specifically the one used to get to the gamemode is slot 0x1C.
This glitch is just one step away from the normal Suicide Swap (where you drop a Yoshi in a pit as a new sprite spawns, and it teleports to Mario). bahamete found this glitch ages ago, and it's actually used in
the current 96 exit TAS. Now what's new is, if Yoshi's mouth is full when you drop him in the pit, there is actually one frame where you can spit it out as the platform spawns, effectively making you
spit out the item from the platform's mouth instead.
There is a miscellaneous sprite table at $160E (different sprites use it for different things), which Yoshi uses to determine the
slot number of the item in his mouth. When his mouth is empty, it's set to 0xFF, but there are various ways to get this value while his mouth is still full (Null Sprite glitch). Now we can get more values than just 0xFF, based on what the
platform uses $160E for. According to
this chart, the platform uses $160E for "Tile number of the rope the sprite is currently touching, minus #$76." So this gives us a range of values that the game will interpret as the slot number in Yoshi's mouth.
If you spit something out on this magic frame, the game will try to update 11 different addresses at 11 different property tables for the thing coming out of his mouth. It uses the slot number to index these tables, but the tables are only 12 bytes long, so if our slot number is higher than that, it will start writing to other memory. Specifically in the gif, the value at $160E (and thus the slot number), is 0x1C so it uses that value to index the 11 tables.
One of these tables is $E4, which is supposed to be the X position (low byte) of the item coming from Yoshi's mouth. But it writes this value to 0xE4 + 0x1C which is $100, which is the gamemode! It normally writes the value based on Yoshi's position, but since in this case
Yoshi is the platform, it writes based on the platform's new position after teleporting. In the gif, this position is 0x20 so the gamemode is set to 0x20, which is the "Fade to enemies" gamemode. (Full list of gamemode values can be found
here). By altering the position, we can get more values for the gamemode as well, but this is just an example.
Is this useful?
Well, it's rather slow (compared to ACE), since you have to go to Cheese Bridge Area to get line-guided sprites to swap with. You also need to bring something into the level to make Yoshi's mouth full, which requires either PI, or eat-chuck. If nothing else, this is a new way to do stun glitch, if you swap with a sprite who sets $160E to a value between 0-11. You can even make "Yoshi" spit out a Yoshi, which was previously only possible with PI to get a reserve Yoshi. You can also possibly get more values than just 0x1C when swapping with the platform, to get some new possibilities for addresses to write to. These have not been exhaustively looked into or tested, but it looks like vanilla SMW will be pretty limiting in this regard.
The bytes that get written with slot 0x1C are:
Address----Purpose-----------------------------What's supposed to update--------Possible values
0x00C6-----misc table $C2 for slot 4-----------sprite Y speed-------------------0x00
0x00D2-----player Xpos high byte---------------sprite X speed-------------------0x10 or 0x30
0x00DE-----sprite Ypos for slot 5--------------misc sprite table----------------0x00
0x00F4-----empty-------------------------------Ypos low byte--------------------near platform's Ypos low byte
0x0100-----gamemode----------------------------Xpos low byte--------------------near platform's Xpos low byte
0x14E4-----sprite Xpos high byte for slot 4----sprite state---------------------0x00 or 0x09 or 0x0A
0x14F0-----sprite Y subspeed for slot 4--------Ypos high byte-------------------near platform's Ypos high byte
0x14FC-----sprite X subspeed for slot 4--------Xpos high byte-------------------near platform's Xpos high byte
0x1598-----misc table $1594 for slot 4---------horizontal direction-------------0x00 or 0x01
0x15EC-----sprite OAM index for slot 2---------licked flag----------------------0x00
0x1642-----misc table $163E for slot 4---------kill counter---------------------0x00