I'll write down what we have gotten in our research on the "yoshi eats nothing" glitch, most of which are due to ISM and 33953YoShI. You may skip the technical parts of the following if you need. I would appreciate it if someone summarize my post in order to handle the glitch easier. It's too long. :(
1. Why and how does yoshi eat a null object?
Yoshi uses one common address 0x7E18AC to indicate whether he has an item in his mouth and when he swallows it. It starts at 255 and decrements every four frames, and he swallows the item when it reaches 0. The timer will be reset to 0 if he spits out or swallows the item. So if we could ignore an item in his mouth, yoshi would eat "nothing". It's indeed possible in two different ways:
I)
Use two yoshis: By killing a visible yoshi who has an item in his mouth, the other yoshi will be visualized without the swallow timer getting reset, so he'll be eating "something" we'll never know.
II)
Use powerup/down, room transition, respawning an egg: When yoshi puts out his tongue at the same time mario takes a damage or gets a powerup etc., yoshi will puts his tongue out twice. If he eats an item (which can stay in his mouth) at the first time, it will vanish at the second time without the swallow timer getting reset, so he'll be eating "nothing".
2. What will happen when yoshi spits out a null object?
From now on, I assume you using
the lua script. First of all, make the situation clearer:
a) Yoshi can spit out "something" because the swallow timer is non-zero.
b) Because the sprite info of the item in yoshi's mouth got reset after yoshi eats a null object, the game regards the id number of the sprite yoshi is eating as #255, which is indicated by the address 0x7E160E + (yoshi's id number). This address is originally set to 255 if yoshi eats nothing in a usual sense.
As a result, yoshi can spit out an "item" of id nubmer #255. On the other hand, when yoshi spits out a normal item, some of its info get overwritten by certain values: its position is overwritten by yoshi's position plus a little somthing extra, its y speed by 0, and so on. This also happens with a null object of id number #255. The following list shows which addresses will change by yoshi's spitting out a null object:
address role role regarded as ID#255 sprite's possible values
0x7E01A9 stack y speed 0x00
0x7E01B5 stack x speed 0x10 or 0x30
0x7E01C1 stack general-purpose table 0x00
0x7E01D7 stack ypos low byte near Yoshi Ypos Low byte
0x7E01E3 stack xpos low byte near Yoshi Xpos Low byte
0x7E15C7 off-screen flag (ID#3) sprite status 0x09 or 0x0C
0x7E15D3 being eaten flag (ID#3) ypos high byte near Yoshi Ypos High byte
0x7E15DF interaction with objects (ID#3) xpos high byte near Yoshi Xpos high byte
0x7E167B sprite properties (ID#1) horizontal direction 0x00 or 0x01
0x7E16CF block bounce sprite exists flag being eaten flag 0x00
0x7E1725 extended sprite xpos low byte consecutive enemies it killed 0x00
I shall pick up some of them, which I think are important.
i) When the address 0x7E15D3 is a non-zero value, the ID#3 sprite can't touch the other sprites of smaller id numbers, and it behaves somewhat strangely. We can pull off this stuff by cancelling to eat a sprite which the tongue catches by taking damage.
ii) When the address 0x7E15DF takes a non-zero value, the ID#3 sprite loses its interaction with objects so falls through objects.
iii) The address 0x7E167B indicates the
ID#3ID#1 sprite's property (taken from SMWC's RAM map):
bit 0: Don't disable clipping when killed with star
bit 1: Invincible to star/cape/fire/boucing blocks
bit 2: Process while off screen
bit 3: Don't change into a shell when stunned
bit 4: Can't be kicked like a shell
bit 5: Process interaction with mario every frame
bit 6: Gives power-up when eaten by yoshi
bit 7: Don't use default interaction with mario
Because the moving direction takes 0 or 1 as its value, bit 0 is set to 0 or 1 depending on the direction yoshi faces, and all the other bits are set to 0. The infinitely usable p-switch has something to do with bit 3.
iv) Stacks are used while mario is standing on a brown platform. If spitting out a null object on it, an unexpected program would run, which causes a freeze, or change of mario's powerup status, or nothing (these are all what we can see). The status change happens when yoshi's id number is #4 and when (yoshi's x position) + Z mod 256 = 214, where Z is 16 if yoshi is facing right, and -16 if facing left. (More precisely, when (yoshi's x position) + Z mod 256 = 214, the address 0x7E0015 + (yoshi's id number) will be added by 1. So yoshi's id number should be #4 if we want to glitch the powerup status 0x7E0019.)
3. Possible applications.
1)
Use directly the results of i), ii) and iii):
i) To let yoshi take no damage when touching enemies, or to prevent an enemy from turning or getting killed by touching another enemy or a shell or something when we are guiding the enemy.
ii) To get a key or a shell etc equipped over a ceiling, or to kill an enemy by kicking a shell across a wall.
iii) To use a p-switch infinitely, to carry a p-switch or a key by kicking it like a shell, or to kill an obstacle lift by a fireball.
2)
Pass through the ground: the effect of ii) will make yoshi fall through the ground, so by riding yoshi after yoshi falls a little through the ground, we can pass through the ground. The same is possible with a springboard.
3)
Mario's powerup status change: mario's powerup status changes as small → big → cape → fire → red (glitched), etc., so we can get caped by any chance in a level where mario can't be caped for some reason. The powerup status of red mario (status 4) behaves strangely when he gets a powerup:
mushroom → fire
fireflower → fire
feather → cape
star → cape
1-up → freeze?
and when cutting a goal tape with having an item, it turns into a star. Another powerup status would bring another result. We've not known details yet.
4)
Delayed star: When an item turns into a star at the goal, the address 0x7E13CB (whose value is usually 0) is added by 1 per star. This value is doubled each time we switch a room in a level, and when it reaches 0x80 (=128) or greater, mario will start the room with the star power.
Edit: fixed ID#1 in iii).