Prev: BC67 Up: Map Next: BD6E
BD51: Play Music (break on keypress)
Used by the routine at HandlerGameMenu.
PlayAudio_WaitKey BD51 DI Disable interrupts.
PlayAudio_WaitKey_Loop BD52 XOR A
BD53 OUT ($FD),A
BD55 IN A,($FE)
BD57 CPL Flip the bits.
BD58 AND %00011111 Keep only bits 0-4.
BD5A JR Z,PlayAudio_WaitKey_Process If no keys were pressed, jump to PlayAudio_WaitKey_Process.
BD5C LD A,($9692) A=GameOptions.
BD5F INC SP Increments the stack pointer by two.
BD60 INC SP
BD61 JP HandlerGameMenu_1 Jump to HandlerGameMenu_1.
This is identical to PlayAudio except it also handles exiting on a keypress.
PlayAudio_WaitKey_Process BD64 LD A,(DE) Fetch the next byte of music data.
BD65 CP $FF If this is FF (the terminator) then jump to PlayAudio_Return.
BD67 JR Z,PlayAudio_Return
BD69 CALL PlayAudio_Process Call PlayAudio_Process.
BD6C JR PlayAudio_WaitKey_Loop Jump to PlayAudio_WaitKey_Loop.
Prev: BC67 Up: Map Next: BD6E