![]() |
Routines |
| Prev: FDAE | Up: Map | Next: FE0A |
|
Used by the routine at Continue_MenuMusicTick.
Play coda notes from the table at MenuMusic_CodaNoteTable via the ROM beeper.
|
||||
| Play_MenuMusicCoda | FDEB | LD E,B | Point DE at offset B and HL at MenuMusic_CodaNoteTable. | |
| FDEC | LD D,$00 | |||
| FDEE | LD HL,$FE23 | |||
| FDF1 | ADC HL,DE | Add the offset into HL. | ||
| FDF3 | LD A,(HL) | Fetch the note length into B. | ||
| FDF4 | LD B,A | |||
| FDF5 | LD HL,$0003 | Point HL at the starting pitch (0003). | ||
|
Sound each coda step through Sound_CodaBeep.
|
||||
| Play_MenuMusicCoda_Loop | FDF8 | PUSH BC | Stash the remaining note count on the stack. | |
| FDF9 | LD DE,$0001 | Load DE with pitch step 0001. | ||
| FDFC | PUSH HL | Stash the current pitch on the stack. | ||
| FDFD | CALL Sound_CodaBeep | Call Sound_CodaBeep to beep at this pitch. | ||
| FE00 | POP HL | Restore the pitch into HL. | ||
| FE01 | LD DE,$00FF | Raise the pitch by 00FF. | ||
| FE04 | ADC HL,DE | |||
| FE06 | POP BC | Restore the remaining note count. | ||
| FE07 | DJNZ Play_MenuMusicCoda_Loop | Decrease B and loop to Play_MenuMusicCoda_Loop while notes remain. | ||
| FE09 | RET | Return. | ||
| Prev: FDAE | Up: Map | Next: FE0A |