Prev: FD10 Up: Map Next: FD40
FD22: Hold Menu Music Silence
Used by the routine at Play_MenuMusicTick.
Hold silence while both channel durations are zero, or when Continue_MenuMusicTick takes the clear-carry path into Hold_MenuMusicSilence_Loop. Burns a delay derived from FC8F, then returns.
Hold_MenuMusicSilence FD22 LD A,($FC8F) Load the delay phase from FC8F.
FD25 CPL Complement it into C as a hold count.
FD26 LD C,A
This entry point is used by the routine at Continue_MenuMusicTick.
Timed silent hold used by Continue_MenuMusicTick and the expired-duration path.
Hold_MenuMusicSilence_Loop FD27 PUSH BC Stash BC and AF on the stack.
FD28 PUSH AF
FD29 LD B,$00 Clear B for the inner burn count.
Burn cycles for one silent-hold iteration.
Hold_MenuMusicSilence_Burn FD2B PUSH HL Stash HL on the stack.
FD2C LD HL,$0000 Point HL at 0000.
FD2F SRA (HL) Burn cycles with three SRA (HL) pads.
FD31 SRA (HL)
FD33 SRA (HL)
FD35 NOP Timing pad.
FD36 POP HL Restore HL from the stack.
FD37 DJNZ Hold_MenuMusicSilence_Burn Decrease B and loop to Hold_MenuMusicSilence_Burn while the burn count remains.
FD39 DEC C Decrease the hold count in C.
FD3A JP NZ,Hold_MenuMusicSilence_Burn If the hold count remains, jump to Hold_MenuMusicSilence_Burn.
FD3D POP AF Restore AF and BC from the stack.
FD3E POP BC
FD3F RET Return.
Prev: FD10 Up: Map Next: FD40