![]() |
Routines |
| Prev: B4A1 | Up: Map | Next: B4BA |
|
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 FF.
|
||||||||
|
Stop if a key is pressed.
|
||||||||
| PlayMusic_WaitKey | B4A9 | XOR A | Select all of the keyboard rows. | |||||
| B4AA | CALL ReadKeyboardPort | Call ReadKeyboardPort. | ||||||
| B4AD | JR Z,PlayMusic_WaitKey_TestEnd | Jump to PlayMusic_WaitKey_TestEnd if no key is pressed. | ||||||
| B4AF | RET | Return. | ||||||
|
Play the next note.
|
||||||||
| PlayMusic_WaitKey_TestEnd | B4B0 | LD A,(DE) | Fetch the next note. | |||||
| B4B1 | CP $FF | Jump to PlayMusic_End if it is FF. | ||||||
| B4B3 | JR Z,PlayMusic_End | |||||||
| B4B5 | CALL PlayNote | Call PlayNote. | ||||||
| B4B8 | JR PlayMusic_WaitKey | Jump to PlayMusic_WaitKey. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: B4A1 | Up: Map | Next: B4BA |