![]() |
Routines |
| Prev: 45750 | Up: Map | Next: 45775 |
|
Used by the routine at GameOver.
Plays a tune, which stops when a key is pressed. A tune is a list of notes (see PlayNote) which ends with 255.
|
||||||||
|
Stop if a key is pressed.
|
||||||||
| PlayMusic_WaitKey | 45758 | XOR A | Select all of the keyboard rows. | |||||
| 45759 | CALL ReadKeyboardPort | Call ReadKeyboardPort. | ||||||
| 45762 | JR Z,PlayMusic_WaitKey_Process | Jump to PlayMusic_WaitKey_Process if no key is pressed. | ||||||
| 45764 | RET | Return. | ||||||
|
Play the next note.
|
||||||||
| PlayMusic_WaitKey_Process | 45765 | LD A,(DE) | Fetch the next note. | |||||
| 45766 | CP 255 | Jump to PlayMusic_Return if it is 255. | ||||||
| 45768 | JR Z,PlayMusic_Return | |||||||
| 45770 | CALL PlayNote | Call PlayNote. | ||||||
| 45773 | JR PlayMusic_WaitKey | Jump to PlayMusic_WaitKey. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 45750 | Up: Map | Next: 45775 |