Prev: 58806 Up: Map Next: 58896
58878: Generate sound effect when Maroc picks up a scroll/spell/item
Used by the routine at 52338.
Sound effect routine called when Maroc collects a spell or object. Just a 'blip' for an object. The sound effect continues for longer if it's a spell.
The continuing sound loop for spells is played at 54106, but this routine is CALLed for both objects and spells.
58878 LD A,16 Bit 4 - speaker bit
58880 LD C,48 Outer loop counter
58882 LD B,C Set inner loop counter to same
58883 OUT (254),A Output sound
58885 XOR 16 Toggle speaker bit
58887 NOP Inner loop pause
58888 NOP
58889 NOP
58890 DJNZ 58887 Inner loop repeat (x48 initially, decreasing)
58892 DEC C Decrement outer loop counter
58893 JR NZ,58882 Repeat x48
58895 RET
Prev: 58806 Up: Map Next: 58896