Prev: E5B6 Up: Map Next: E610
E5FE: Generate sound effect when Maroc picks up a scroll/spell/item
Used by the routine at CC72.
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 D35A, but this routine is CALLed for both objects and spells.
E5FE LD A,$10 Bit 4 - speaker bit
E600 LD C,$30 Outer loop counter
E602 LD B,C Set inner loop counter to same
E603 OUT ($FE),A Output sound
E605 XOR $10 Toggle speaker bit
E607 NOP Inner loop pause
E608 NOP
E609 NOP
E60A DJNZ $E607 Inner loop repeat (x48 initially, decreasing)
E60C DEC C Decrement outer loop counter
E60D JR NZ,$E602 Repeat x48
E60F RET
Prev: E5B6 Up: Map Next: E610