Code
INC !1570,x ; increase $1570 (for frame count)..
to
Code
LDA $71 CMP #$09 BEQ + INC !1570,x ; increase $1570 (for frame count).. +
This'll have it so that it skips over increasing its animation frames if Mario is dying.