I have a solution, although it relies on a a sprite insertion method rather than a UberASM patch. Since it's code that has to be run every frame, I'm sure you can insert it somehow with UberASM (I don't use the tool myself, so am too unfamiliar with it to know how to use it), but don't forget to remove the three sprite Print lines specified before inserting.
Code;VARIABLES
!SpeedModifier = $02; The acceleration of the player whilst on the consuming Yoshi. If higher, he accelerates faster.
!MaxSpeedRight = $50 ; Maximum speed right.
!MaxSpeedLeft = $A0 ; Maximum speed left.
;______________________
print "INIT ",pc;;WARNING: Remove if not a sprite
RTL;;WARNING: Remove if not a sprite
print "MAIN ",pc;;WARNING: Remove if not a sprite
;______________________
LDA $187A;On yoshi?
BEQ Return1
LDA $18AC;Sprite inside mouth;NOTE: This is inclusive of all sprites and not just shells
BEQ Return1
;So if both the variables of a player riding Yoshi and something inside Yoshi's mouth equal Zero, we do not run the code.
LDA $15
AND #$03;Check for Left and Right button input
BEQ Return1; Do not run if not pressing left or right. This is important!
LDA $7B
PHA;original speed
LDY $76; This is the direction of the player. We could load this into one of the indexing registers and use indexing to get our max speeds for later, but let's keep it simple for now. We're using it to compare, so it's not completely unnecessary.
BEQ Left ; Check if Facing Left. 0 = Left, 1+ = Right
;Right
CLC
ADC #!SpeedModifier
STA $7B
CMP #!MaxSpeedRight
BCC Return2
StoreSpeedFromLeft:
PLA
STA $7B;store original speed if max has been reached.
Return1:
RTL
Left:
SEC
SBC #!SpeedModifier
STA $7B
CMP #!MaxSpeedLeft
BCS Return2
BRA StoreSpeedFromLeft
Return2:
PLA
RTL
;SpeedTable:
; db $A0,$50
;|Left|Right|; unused for now
There's also a patch that you need to apply that fixes a bug that prevents the player from jumping if he has an unusually high speed. Patch this with asar.
Codeorg $00D663
autoclean JSL FixXSpeedJump
NOP
freecode
FixXSpeedJump:
PHB
PHK
PLB
LDA JumpSpeedTable,x
STA $7D
PLB
RTL
JumpSpeedTable:
db $B0,$B6,$AE,$B4,$AB,$B2,$A9,$B0
db $A6,$AE,$A4,$AB,$A1,$A9,$9F,$A6
;Modify the following if you think Yoshi jumps too high. For instance: try replacing each $9F,$A6 with $A1,$A9 or higher
db $9F,$A6,$9F,$A6,$9F,$A6,$9F,$A6
db $9F,$A6,$9F,$A6,$9F,$A6,$9F,$A6
Now, this code still runs with anything inside of Yoshi's mouth, and not just shells. I can find a way to make it exclusively shells, but I'm running out of time today to figure it out right now. Hope this code helps anyway.