| Routines

FCE4: Make a sound effect

Used by the routines at 7565 (to make the cash bonus/key sound effect) and FC6A (to make the sound effect for when Sam hits the ground after being dropped by a gangster).
Input
A | Border colour
C | Pitch
DE | Duration
FCE4 | XOR $10 | Flip bit 4 of A (the speaker bit)
FCE6 | OUT ($FE),A | Set the border colour and change the speaker state
FCE8 | LD B,C | Perform the pitch delay
FCE9 | DJNZ $FCE9
FCEB | DEC E | Jump back until the sound effect is finished
FCEC | JR NZ,$FCE4
FCEE | DEC D
FCEF | JR NZ,$FCE4
FCF1 | RET |