Prev: 63AA Up: Map Next: 644D
63E1: Play Music
Used by the routine at 66D7.
Input
DE Music Data
PlayMusic 63E1 LD A,(DE) Fetch the music data byte.
63E2 CP $FF Return if the terminator character has been reached.
63E4 RET Z
63E5 AND %00011111 Keep only bits 0-3.
63E7 DEC A Decrease A by one.
63E8 SLA A A=A * 2.
63EA LD C,A Create an offset in BC.
63EB LD B,$00
63ED LD HL,$640D HL=640D + offset.
63F0 ADD HL,BC
63F1 PUSH DE Stash DE on the stack.
63F2 LD A,(HL)
63F3 INC HL
63F4 LD E,(HL)
63F5 LD D,$00
63F7 LD L,A
63F8 LD H,$00
63FA SLA L
63FC RL H
63FE SLA L
6400 RL H
6402 PUSH IX Stash IX on the stack.
6404 CALL $03B5 Call BEEPER
6407 POP IX Restore IX and DE from the stack.
6409 POP DE
640A INC DE Increment DE by one.
640B JR PlayMusic Loop back round to the beginning (we only end when the terminator is reached).
MusicData 640D DEFW $62E0 Music Data
640F DEFW $6EC7
6411 DEFW $7BB1
6413 DEFW $83A7
6415 DEFW $9395
6417 DEFW $A485
6419 DEFW $AF7D
641B DEFW $C36E
641D DEFB $01,$01,$02,$02,$03,$03,$04,$04
6425 DEFB $05,$05,$06,$06,$07,$07,$08,$08
642D DEFB $04,$06,$08,$06,$07,$05,$03,$01
6435 DEFB $04,$06,$08,$06,$07,$05,$03,$03
643D DEFB $04,$06,$08,$06,$07,$05,$03,$01
6445 DEFB $04,$06,$02,$03,$04,$04,$04,$FF
Prev: 63AA Up: Map Next: 644D