![]() |
Routines |
| Prev: D508 | Up: Map | Next: D53A |
|
Used by the routine at RunGame.
Pauses the game if CAPS SHIFT or SPACE is pressed on its own. The game waits for the key to be let go of, then for it to be pressed again and let go of again. There is a beep for the start and for the end of the pause.
|
||||||||||||||||||||
|
Return unless CAPS SHIFT or SPACE is pressed on its own.
|
||||||||||||||||||||
| PauseGame | D50E | LD A,$7E | Read from the keyboard;
|
|||||||||||||||||
| D510 | CALL ReadKeyboardPort | |||||||||||||||||||
| D513 | BIT 0,A | Return if neither CAPS SHIFT nor SPACE is pressed. | ||||||||||||||||||
| D515 | RET Z | |||||||||||||||||||
| D516 | AND %00011110 | Keep bits 1 to 4. | ||||||||||||||||||
| D518 | RET NZ | Return if any of them is pressed. | ||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_Release | D519 | LD A,$7E | Read from the keyboard;
|
|||||||||||||||||
| D51B | CALL ReadKeyboardPort | |||||||||||||||||||
| D51E | BIT 0,A | Jump to PauseGame_Release while CAPS SHIFT or SPACE is pressed. | ||||||||||||||||||
| D520 | JR NZ,PauseGame_Release | |||||||||||||||||||
| D522 | CALL PlayMiddleBeep | Play the sound of the pause. | ||||||||||||||||||
|
Wait for the key to be pressed.
|
||||||||||||||||||||
| PauseGame_Wait | D525 | LD A,$7E | Read from the keyboard;
|
|||||||||||||||||
| D527 | CALL ReadKeyboardPort | |||||||||||||||||||
| D52A | BIT 0,A | Jump to PauseGame_Wait until CAPS SHIFT or SPACE is pressed. | ||||||||||||||||||
| D52C | JR Z,PauseGame_Wait | |||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_Finish | D52E | LD A,$7E | Read from the keyboard;
|
|||||||||||||||||
| D530 | CALL ReadKeyboardPort | |||||||||||||||||||
| D533 | BIT 0,A | Jump to PauseGame_Finish while CAPS SHIFT or SPACE is pressed. | ||||||||||||||||||
| D535 | JR NZ,PauseGame_Finish | |||||||||||||||||||
| D537 | JP PlayMiddleBeep | Jump to PlayMiddleBeep. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: D508 | Up: Map | Next: D53A |