Prev: 50749 Up: Map Next: 50785
50774: Play Music
Used by the routines at StartGame, GameMenu, CheckPlayerDead, GameOver and UpdateLogoPiece.
Plays a tune. Each note is a byte, with the note in bits 0 to 5 (0 is a rest) and the length of the note minus one in bits 6 and 7. The tune ends with 255.
The tunes played by this routine are:
Tune Sound
Main Tune
Menu Selection Tune
Start-up Tune
Life Lost Tune
Game Over Tune
Game Complete Tune
Input
DE Address of the tune
Play each note until 255.
PlayMusic 50774 LD A,(DE) Fetch the next note.
50775 CP 255 Jump to PlayMusic_Return if it is 255.
50777 JR Z,PlayMusic_Return
50779 CALL PlayNote Call PlayNote.
50782 JR PlayMusic Jump to PlayMusic.
This entry point is used by the routine at PlayMusicOnce.
PlayMusic_Return 50784 RET Return.
Prev: 50749 Up: Map Next: 50785