SMW has a lot of bugs regarding how collision is handled while riding Yoshi. This can be from simply weird hitboxes to dying or losing your powerup when losing Yoshi is the actual intended punishment. Notable examples of this is:
-- Throw Blocks, when kicked by a Blue Beach Koopa, will cause Mario to lose Yoshi. -- Wooden Castle Spikes cause Mario to lose Yoshi from all sides except the top, where Mario will take damage (and can die). -- Boo Blocks will cause Mario to lose Yoshi when touched form the sides. -- Reflecting Boo Buddy's cluster sprite Boos will cause Mario to take damage regardless of whether or not he's on Yoshi. -- The Ball and Chain causes Mario to lose Yoshi when you jump at the block it's connected to, and will not lose Yoshi when the ball itself directly hits Mario.
This is because the routine that hurts Mario is bypassed in the default Mario/sprite collision routine when riding Yoshi. Yoshi himself has a long routine that is meant to handle various exceptions for things like Monty Moles that are hidden in the ground.
This patch aims to correct these problems by stripping this unnecessary code out, and then baking the "Lose Yoshi" routine into $00F5B7 -- which is Mario's "hurt" JSL. It also fixes a couple minor issues presented by this, such as Yoshi eating the "Yoshi Wings" sprite. Normally, if Yoshi attempts to eat the sprite, he touches it before it actually gets eaten, causing it to be deleted; a fix here makes it so Yoshi can actually eat it, but it overall acts the same as normal.
A side-effect to this patch is that Mario will not take damage/die when touching a Muncher from the bottom and sides while riding Yoshi anymore. This also applies to custom blocks that might hurt Mario, though these scenarios can technically be worked around. An option to hurt Mario regardless of Yoshi status for these blocks is available within the patch.
For developers using this patch:
JSL location for 'Give Yoshi Wings': $01F6D0
JSL location for 'Lose Yoshi': $01F6FB
JSL location to hurt Mario regardless of Yoshi: $01F73F
No free-space necessary, as it uses space created when stripping the game of the default Yoshi collision code.
Tested with: Lunar Magic 3.11, asar 1.71, SA-1 1.32, Snes9x 1.60, bsnes v115.
I'm rejecting this because the game crashes when hitting a block with a Yoshi inside, once the egg starts hatching (both on lorom and SA-1, and it doesn't matter if it'd be a Yoshi or a 1-UP to spawn).