Prev: 48003 Up: Map Next: 48042
48006: Start Game Sequence
Used by the routine at GameMenu.
Runs when the key to start the game is pressed. Lights are started around the frame of the screen, and when they have all finished the tune that starts the game is played and the game screen is drawn.
StartGameSequence 48006 LD B,8 There are eight lights to start.
StartGameSequence_Light 48008 PUSH BC Save the counter.
48009 CALL DisplayMenu Draw the menu using DisplayMenu.
48012 LD A,1 Start a new light using MoveLights.
48014 CALL MoveLights
48017 POP BC Restore the counter.
48018 DJNZ StartGameSequence_Light Loop back until all eight lights have been started.
48020 CALL DisplayMenu Draw the menu using DisplayMenu.
StartGameSequence_Wait 48023 LD IY,(38419) Restore IY, which the ROM interrupt routine needs.
48027 EI Enable interrupts...
48028 HALT ...and wait for the next one.
48029 DI Disable interrupts again.
48030 XOR A Move the lights without starting a new one, using MoveLights.
48031 CALL MoveLights
48034 JR NZ,StartGameSequence_Wait Loop back until all of the lights have finished.
48036 LD DE,49801 Point DE at StartGameTune.
48039 CALL PlayMusic Play it using PlayMusic.
Prev: 48003 Up: Map Next: 48042