![]() |
Routines |
| Prev: 46201 | Up: Map | Next: 46355 |
|
Used by the routine at RunGame.
Pauses the game while CAPS SHIFT or SPACE is held down on its own. A click is made to say that the game has been paused, and the game then waits for the key to be released, pressed and released again before another click and returning.
Interrupts are enabled while the game is paused, and the system variable pointer in IY is set up to what the ROM interrupt routine expects.
|
||||||||||||||||||||
|
Return unless CAPS SHIFT or SPACE is the only key being pressed.
|
||||||||||||||||||||
| PauseGame | 46304 | LD A,126 | Read from the keyboard, with a call to ReadKeyboardPort that returns the pressed keys as set bits;
|
|||||||||||||||||
| 46306 | CALL ReadKeyboardPort | |||||||||||||||||||
| 46309 | BIT 0,A | Return if neither CAPS SHIFT nor SPACE is pressed. | ||||||||||||||||||
| 46311 | RET Z | |||||||||||||||||||
| 46312 | AND %00011110 | Keep only the keys other than CAPS SHIFT and SPACE. | ||||||||||||||||||
| 46314 | RET NZ | Return if another key is pressed. | ||||||||||||||||||
| 46315 | CALL PlayClick | Call PlayClick to make a click. | ||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_WaitRelease | 46318 | LD A,126 | Read the keyboard rows that hold CAPS SHIFT and SPACE. | |||||||||||||||||
| 46320 | CALL ReadKeyboardPort | |||||||||||||||||||
| 46323 | BIT 0,A | Jump to PauseGame_WaitRelease if CAPS SHIFT or SPACE is still pressed. | ||||||||||||||||||
| 46325 | JR NZ,PauseGame_WaitRelease | |||||||||||||||||||
| 46327 | LD IY,23610 | Set up the system variables for the ROM interrupt routine. | ||||||||||||||||||
| 46331 | EI | Enable interrupts. | ||||||||||||||||||
|
The game is paused: wait for the key to be pressed.
|
||||||||||||||||||||
| PauseGame_WaitPress | 46332 | LD A,126 | Read the keyboard rows that hold CAPS SHIFT and SPACE. | |||||||||||||||||
| 46334 | CALL ReadKeyboardPort | |||||||||||||||||||
| 46337 | BIT 0,A | Jump to PauseGame_WaitPress if neither is pressed. | ||||||||||||||||||
| 46339 | JR Z,PauseGame_WaitPress | |||||||||||||||||||
|
Wait for the key to be released again.
|
||||||||||||||||||||
| PauseGame_WaitResume | 46341 | LD A,126 | Read the keyboard rows that hold CAPS SHIFT and SPACE. | |||||||||||||||||
| 46343 | CALL ReadKeyboardPort | |||||||||||||||||||
| 46346 | BIT 0,A | Jump to PauseGame_WaitResume if CAPS SHIFT or SPACE is still pressed. | ||||||||||||||||||
| 46348 | JR NZ,PauseGame_WaitResume | |||||||||||||||||||
| 46350 | DI | Disable interrupts. | ||||||||||||||||||
| 46351 | CALL PlayClick | Call PlayClick to make a click. | ||||||||||||||||||
| 46354 | RET | Return. | ||||||||||||||||||
| Prev: 46201 | Up: Map | Next: 46355 |