Prev: FD40 Up: Map Next: FD99
FD76: 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 FD76 PUSH AF Stash AF, load stream-two's byte from FC85 into D, then restore AF.
FD77 LD A,($FC85)
FD7A LD D,A
FD7B POP AF
FD7C CALL Build_MusicDelayCount Call Build_MusicDelayCount to build the delay count.
FD7F CP $FF Jump to Pulse_MenuMusicSpeaker if A is FF (pulse the speaker).
FD81 JR Z,Pulse_MenuMusicSpeaker
FD83 CP $C0 Jump to Play_MenuMusicCoda if A is C0 (play the coda).
FD85 JP Z,Play_MenuMusicCoda
FD88 LD B,$04 Load B with 04 step bits.
FD8A LD C,E Copy the delay into C.
FD8B RLA Rotate A left through carry four times to walk the step mask.
FD8C RLA
FD8D RLA
FD8E RLA
Apply the current step bit: pulse, hold, then loop.
Continue_MenuMusicTick_StepBit FD8F RLA Rotate A left through carry once more for this step.
FD90 CALL C,Pulse_MenuMusicSpeaker If carry is set, call Pulse_MenuMusicSpeaker to pulse the speaker.
FD93 CALL NC,Hold_MenuMusicSilence_Loop If carry is clear, call Hold_MenuMusicSilence_Loop for a silent hold.
FD96 DJNZ Continue_MenuMusicTick_StepBit Decrease B and loop to Continue_MenuMusicTick_StepBit while steps remain.
FD98 RET Return.
Prev: FD40 Up: Map Next: FD99