Prev: B2B6 Up: Map Next: B2CF
B2BE: Play Music Until Key Pressed
Used by the routine at GameOver.
Plays a tune, which stops when a key is pressed. A tune is a list of notes (see PlayNote) which ends with FF.
Input
DE Address of the tune
Stop if a key is pressed.
PlayMusic_WaitKey B2BE XOR A Select all of the keyboard rows.
B2BF CALL ReadKeyboardPort Call ReadKeyboardPort.
B2C2 JR Z,PlayMusic_WaitKey_Process Jump to PlayMusic_WaitKey_Process if no key is pressed.
B2C4 RET Return.
Play the next note.
PlayMusic_WaitKey_Process B2C5 LD A,(DE) Fetch the next note.
B2C6 CP $FF Jump to PlayMusic_Return if it is FF.
B2C8 JR Z,PlayMusic_Return
B2CA CALL PlayNote Call PlayNote.
B2CD JR PlayMusic_WaitKey Jump to PlayMusic_WaitKey.
View the equivalent code in;
Prev: B2B6 Up: Map Next: B2CF