Prev: DB0B Up: Map Next: DB38
DB17: Play a note of a tune
Used by the routine at DA8D.
DB17 LD HL,($DA88) Get the address of the current note in HL.
DB1A LD A,(HL) Put the value in A.
DB1B INC HL Move to the next note.
DB1C LD ($DA88),HL
Now play the relevant note.
DB1F CP $FF Is this the end of the tune?
DB21 JR Z,$DB29 Jump forward if so.
DB23 AND A Is this a rest?
DB24 JR Z,$DAFA Jump forward if so.
DB26 JP $DAA7 Otherwise play the note.
The tune is now finished.
DB29 LD HL,$DAFA Set the current sound type (DA8B) to pause (DAFA).
DB2C LD ($DA8B),HL
DB2F LD A,($DA8A) Reset bit 0 on the current playing state.
DB32 RES 0,A
DB34 LD ($DA8A),A
DB37 RET Return.
Prev: DB0B Up: Map Next: DB38