Prev: 89D9 Up: Map Next: 8A36
8A0F: Sound effect - cornering
D Affects delay loops
E Inner loop count
sfx_cornering 8A0F LD A,$00 Half duty cycle
8A11 XOR $01 Return if 1
8A13 LD ($8A10),A
sfx_cornering_loop_outer 8A17 LD C,E Set inner loop counter
sfx_cornering_loop_inner 8A18 CALL rng Call rng
8A1B AND $10 A &= 16
8A1D JR Z,sfx_cornering_continue If zero goto sfx_cornering_continue
8A1F LD A,$18 Delay loop of (24 - D) iterations
8A21 SUB D
8A22 LD B,A
sfx_cornering_0 8A23 DJNZ sfx_cornering_0
8A25 LD A,$18 A = 24 set EAR and MIC bits <not sure of the effect>
8A27 OUT ($FE),A Output
8A29 LD B,D Delay loop of D iterations
sfx_cornering_1 8A2A DJNZ sfx_cornering_1
8A2C XOR A Output
8A2D OUT ($FE),A
sfx_cornering_continue 8A2F DEC C Loop while C > 0
8A30 JR NZ,sfx_cornering_loop_inner
8A32 DEC D Loop while D > 0
8A33 JR NZ,sfx_cornering_loop_outer
8A35 RET Return
Prev: 89D9 Up: Map Next: 8A36