Prev: 6524 Up: Map Next: 65E8
6568: Play Music
Used by the routines at StartGame, 64E8 and 68C4.
Input
DE Music Data
PlayMusic 6568 LD A,(DE) Fetch the music data byte.
6569 CP $FF Return if the terminator character has been reached.
656B RET Z
656C AND %00011111 Keep only bits 0-3.
656E DEC A Decrease A by one.
656F SLA A A=A * 2.
6571 LD C,A Create an offset in BC.
6572 LD B,$00
6574 LD HL,$6594 HL=6594 + offset.
6577 ADD HL,BC
6578 PUSH DE Stash DE on the stack.
6579 LD A,(HL)
657A INC HL
657B LD E,(HL)
657C LD D,$00
657E LD L,A
657F LD H,$00
6581 SLA L
6583 RL H
6585 SLA L
6587 RL H
6589 PUSH IX Stash IX on the stack.
658B CALL $03B5 Call BEEPER
658E POP IX Restore IX and DE from the stack.
6590 POP DE
6591 INC DE Increment DE by one.
6592 JR PlayMusic Loop back round to the beginning (we only end when the terminator is reached).
6594 DEFW $82A7
6596 DEFW $8A9E
6598 DEFW $9295
659A DEFW $9A8D
659C DEFW $A485
659E DEFW $AE7D
65A0 DEFW $B876
65A2 DEFW $C470
65A4 DEFW $D069
65A6 DEFW $DC64
65A8 DEFW $EA5E
65AA DEFW $F659
65AC DEFW $FF54
65AE DEFW $41A7
65B0 DEFW $459E
65B2 DEFW $4995
65B4 DEFW $4D8D
65B6 DEFW $5285
65B8 DEFW $577D
65BA DEFW $5C76
65BC DEFW $6270
65BE DEFW $6869
65C0 DEFW $6E64
65C2 DEFW $755E
65C4 DEFW $7B59
65C6 DEFW $8354
MusicData 65C8 DEFB $0E,$01,$0E,$03,$04,$05,$05,$01 Music Data
65D0 DEFB $FF,$0E,$01,$0E,$03,$05,$06,$01
65D8 DEFB $06,$FF,$0D,$05,$06,$07,$08,$06
65E0 DEFB $05,$03,$01,$05,$08,$05,$01,$FF
Prev: 6524 Up: Map Next: 65E8