Prev: 41394 Up: Map Next: 41420
41409: Play Music
Used by the routines at LeaveTitleMenu, PlayFanfare and ShowPlayerNumber.
Plays a piece of music. Each byte of the music is a note, or 255 at the end. Bits 0-5 of a note are its number in the table at NoteTable (0 for a rest). Bits 6-7 are not used.
The tunes played by this routine are:
Tune Sound
Title Tune
Start Tune
Fanfare
Game Over Tune
Input
DE The address of the music
PlayMusic 41409 LD A,(DE) Fetch the next byte of the music.
41410 CP 255 Jump to PlayMusic_Return if the music has ended.
41412 JR Z,PlayMusic_Return
41414 CALL PlayNote Play the note.
41417 JR PlayMusic Jump back for the next note.
This entry point is used by the routine at PlayMusic_WaitKey.
PlayMusic_Return 41419 RET Return.
View the equivalent code in;
Prev: 41394 Up: Map Next: 41420