This has been half solved in PM. In the interest of public knowledge:
Code:
0C550 lda $07f9;This checks if wind is active.
0C553 F0 33 beq $c588;If it's zero, wind is not active. And it branches to an RTS.
0C555 A9 04 lda #$04;Otherwise, it loads the wind sound effect ID
0C557 85 FD sta $fd;and stores it here, so it knows what to play.
0C559 20 A1 C5 jsr $c5a1;I have zero idea what this or any of the following does.
;So it's removed for brevity
0C588 60 rts
My idea for the fix was to just check $FD for the sound skid sound effect which was #%10000000 after the program so...
Code:
lda $07f9;This checks if wind is active.
beq $c588;If it's zero, wind is not active. And it branches to an RTS.
lda $FD
bmi c588;If skid, skip wind
Except I can't insert bytes at that location, since it's not fully labeled. Everything after the change would be blown up.
So, I copy pasted the entire routine to the end of that segment of ROM under a label called "windcode:" (updating the branches to actual labels in the process), and changed
Code:
0C550 lda $07f9;This checks if wind is active.
to
Code:
0C550 jmp windcode
I removed everything after jmp windcode, and padded it. I hoped there was enough space for the doubled up routine. There wasn't.
So I checked how much space I actually did have, and there was enough for a tiny routine at the end of that segment of ROM. Just not for all of it.
So I removed the padding and put the routine back where it was, except for jmp windcode in place of lda $07f9.
Then I tried this:
Code:
windcode:
lda $07f9
beq skipwind
lda $FD
bmi skipwind
jmp $c555
skipwind:
rts
That worked, except that when you skidded that actual wind leaves disappeared. I had no idea what made the leaves blow, and didn't want to look too hard into it, so I honestly just made a guess.
Code:
windcode:
lda $07f9
beq skipwind
lda $FD
bmi windnosound
jmp $c555
windnosound:
jmp $c559
skipwind:
rts
I figured when a skid was playing, I would just jmp past the code I thought was sound related. So, when wind was blowing and the skid sound was playing, it would hopefully do the stuff that makes those leaves. That seemed to work. But only for some levels apparently. I guess I have to find similar code in another location, and hope there's enough room in those sections for rom for my sloppy windcode label.