Prev: 8903 Up: Map Next: 89D9
8960: Sound effect - crash
Input
D Inner loop count
sfx_crash 8960 LD HL,$897C HL -> Effect data table
8963 LD C,$5D Length of table is 93
sfx_crash_loop_outer 8965 LD B,D Set inner loop counter
sfx_crash_loop_inner 8966 LD A,$10 A = 16
8968 BIT 7,(HL) Top bit set of this byte?
896A JR NZ,sfx_crash_0 Don't clear the EAR bit
896C RES 4,A Otherwise clear the EAR bit
sfx_crash_0 896E OUT ($FE),A Output
8970 RLC (HL) Rotate the effect data
8972 NOP Delay
8973 NOP
8974 DJNZ sfx_crash_loop_inner Loop while B > 0
8976 INC HL Move to the next byte of effect data
8977 DEC C Loop while C > 0
8978 JP NZ,sfx_crash_loop_outer
897B RET Return
sfx_crash_table 897C DEFB $FF,$00,$00,$00,$0F,$FF,$FF,$FF Effect data table
8984 DEFB $EF,$FF,$FF,$FF,$BE,$36,$10,$00
898C DEFB $00,$00,$00,$00,$00,$00,$00,$00
8994 DEFB $00,$FF,$FF,$FF,$FF,$FF,$FF,$FF
899C DEFB $FF,$FF,$FF,$FF,$FF,$F8,$78,$80
89A4 DEFB $00,$00,$00,$00,$00,$00,$00,$00
89AC DEFB $00,$C0,$E1,$FF,$FF,$FF,$FF,$FF
89B4 DEFB $FF,$FF,$FF,$FF,$FF,$BE,$F3,$9E
89BC DEFB $70,$C0,$00,$00,$00,$00,$00,$00
89C4 DEFB $01,$9E,$FF,$3F,$FF,$FF,$FF,$FF
89CC DEFB $FF,$FF,$FF,$FF,$FF,$FB,$FF,$3F
89D4 DEFB $38,$F0,$03,$80,$00
Prev: 8903 Up: Map Next: 89D9