Prev: 64832 Up: Map Next: 64921
64886: Continue Menu Music Tick
Used by the routine at Play_MenuMusicTick.
Continue a music tick when Play_MenuMusicTick takes the carry path: build a delay via Build_MusicDelayCount, then either pulse the speaker, play the table-driven coda, or return.
Continue_MenuMusicTick 64886 PUSH AF Stash AF, load stream-two's byte from 64645 into D, then restore AF.
64887 LD A,(64645)
64890 LD D,A
64891 POP AF
64892 CALL Build_MusicDelayCount Call Build_MusicDelayCount to build the delay count.
64895 CP 255 Jump to Pulse_MenuMusicSpeaker if A is 255 (pulse the speaker).
64897 JR Z,Pulse_MenuMusicSpeaker
64899 CP 192 Jump to Play_MenuMusicCoda if A is 192 (play the coda).
64901 JP Z,Play_MenuMusicCoda
64904 LD B,4 Load B with 4 step bits.
64906 LD C,E Copy the delay into C.
64907 RLA Rotate A left through carry four times to walk the step mask.
64908 RLA
64909 RLA
64910 RLA
Apply the current step bit: pulse, hold, then loop.
Continue_MenuMusicTick_StepBit 64911 RLA Rotate A left through carry once more for this step.
64912 CALL C,Pulse_MenuMusicSpeaker If carry is set, call Pulse_MenuMusicSpeaker to pulse the speaker.
64915 CALL NC,Hold_MenuMusicSilence_Loop If carry is clear, call Hold_MenuMusicSilence_Loop for a silent hold.
64918 DJNZ Continue_MenuMusicTick_StepBit Decrease B and loop to Continue_MenuMusicTick_StepBit while steps remain.
64920 RET Return.
Prev: 64832 Up: Map Next: 64921