Prev: 8960 Up: Map Next: 8A0F
89D9: Sound effect - thud
Input
D Delay value
sfx_thud 89D9 LD C,$20 Length of table is 32
89DB LD HL,$89EF HL -> Effect data table
89DE XOR A Zero output byte
sfx_thud_loop 89DF LD B,(HL) B = *HL
sfx_thud_0 89E0 OUT ($FE),A Output to
89E2 LD E,D Delay for 'D' iterations
sfx_thud_1 89E3 DEC E
89E4 JR NZ,sfx_thud_1
89E6 DJNZ sfx_thud_0 Loop for 'B' iterations
89E8 XOR $10 Wiggle the EAR bit
89EA INC HL Move to the next byte of effect data
89EB DEC C Loop while C > 0
89EC JR NZ,sfx_thud_loop
89EE RET Return
sfx_thud_table 89EF DEFB $02,$07,$05,$02,$04,$0A,$01,$04 Effect data table
89F7 DEFB $09,$09,$06,$45,$01,$01,$04,$03
89FF DEFB $01,$03,$31,$04,$25,$02,$01,$BD
8A07 DEFB $8E,$ED,$01,$01,$01,$06,$07,$01
Prev: 8960 Up: Map Next: 8A0F