![]() |
Routines |
| Prev: E241 | Up: Map | Next: E353 |
|
Used by the routine at NEW_GAME.
Called once a turn by the main loop, at the end of the turn (NEW_GAME). Half-rows $7F and $FE are read together, so bit 0 is SPACE or CAPS SHIFT and bits 1-4 are the other eight keys of the two rows; the pause needs bit 0 and none of the others, so no key that plays the game starts one. It waits for the key to be let go, then for a press and a release, and the game goes on.
Pentagram's pause (and Alien 8's) is the same test and the same waits, but beeps as it pauses and as it goes on, and turns interrupts on while it waits; Nightshade's is silent and leaves them off.
|
||||
| PAUSE | E32C | LD A,$7E | Not SPACE or CAPS SHIFT, or another key of those two rows with it: no pause | |
| E32E | CALL READ_KEYS | |||
| E331 | BIT 0,A | |||
| E333 | RET Z | |||
| E334 | AND $1E | |||
| E336 | RET NZ | |||
| PAUSE_0 | E337 | LD A,$7E | Wait for the key to be let go... | |
| E339 | CALL READ_KEYS | |||
| E33C | BIT 0,A | |||
| E33E | JR NZ,PAUSE_0 | |||
| PAUSE_1 | E340 | LD A,$7E | ...pressed again... | |
| E342 | CALL READ_KEYS | |||
| E345 | BIT 0,A | |||
| E347 | JR Z,PAUSE_1 | |||
| PAUSE_2 | E349 | LD A,$7E | ...and let go | |
| E34B | CALL READ_KEYS | |||
| E34E | BIT 0,A | |||
| E350 | JR NZ,PAUSE_2 | |||
| E352 | RET | |||
| Prev: E241 | Up: Map | Next: E353 |