Prev: 9EC6 Up: Map Next: 9F4D
9F09: Check Pause
Used by the routine at MainLoop.
Called every frame. Pressing SPACE on its own pauses the game, while the lights run round the border. Pressing it again resumes the game.
CheckPause 9F09 LD A,$7E Read the half-row of the keyboard that contains SPACE...
9F0B CALL ReadKeys ...using ReadKeys.
9F0E BIT 0,A Return if SPACE is not being pressed.
9F10 RET Z
9F11 AND $1E Return if any of the other keys in the row are pressed.
9F13 RET NZ
9F14 CALL MakeBumpSound Make a beep using MakeBumpSound.
CheckPause_Release 9F17 LD A,$7E Read the half-row of the keyboard that contains SPACE...
9F19 CALL ReadKeys ...using ReadKeys.
9F1C BIT 0,A Loop back until SPACE has been released.
9F1E JR NZ,CheckPause_Release
9F20 LD HL,$0001 Set up a delay...
CheckPause_Wait 9F23 LD C,$01 Tell WaitForFrame to start another light running round the border...
9F25 CALL WaitForFrame ...and wait for the next frame.
9F28 LD A,$7E Read the half-row of the keyboard that contains SPACE...
9F2A CALL ReadKeys ...using ReadKeys.
9F2D BIT 0,A Loop back until SPACE is pressed again.
9F2F JR Z,CheckPause_Wait
CheckPause_Resume 9F31 LD C,$01 Tell WaitForFrame to start another light running round the border...
9F33 CALL WaitForFrame ...and wait for the next frame.
9F36 LD A,$7E Read the half-row of the keyboard that contains SPACE...
9F38 CALL ReadKeys ...using ReadKeys.
9F3B BIT 0,A Loop back until SPACE has been released.
9F3D JR NZ,CheckPause_Resume
9F3F LD HL,$0001 Set up a delay...
9F42 CALL MakeBeep ...and make a click using MakeBeep.
CheckPause_Finish 9F45 LD C,$00 Tell WaitForFrame not to start any more lights...
9F47 CALL WaitForFrame ...and wait for the next frame.
9F4A JR NZ,CheckPause_Finish Loop back until the lights have all finished.
9F4C RET Return.
Prev: 9EC6 Up: Map Next: 9F4D