![]() |
Routines |
| Prev: 7C82 | Up: Map | Next: 7E47 |
|
Used by the routine at TitleScreen.
|
||||
|
First collect the control method.
|
||||
| StartGame | 7DD9 | CALL Print_ControlMenu | Call Print_ControlMenu. | |
|
This is a game the player started, so disable the demo mode and unset the game-over flag.
|
||||
| 7DDC | XOR A | Write 00 to; | ||
| 7DDD | LD ($66F5),A | |||
| 7DE0 | LD ($66F3),A | |||
| 7DE3 | INC A | Write 01 to *Flag_ExtraLife. | ||
| 7DE4 | LD ($66EF),A | |||
| 7DE7 | LD A,$04 | Write 04 to *Phase. | ||
| 7DE9 | LD ($66F1),A | |||
|
Set the players starting life count.
|
||||
| 7DEC | INC A | Write 05 to *Player_Lives. | ||
| 7DED | LD ($66F0),A | |||
| 7DF0 | CALL InitialiseLevel | Call InitialiseLevel. | ||
| Game_Loop | 7DF3 | CALL Handler_PlayerDeathGameOver | Call Handler_PlayerDeathGameOver. | |
| 7DF6 | CALL Handler_AliensMovement_Spawning | Call Handler_AliensMovement_Spawning. | ||
| 7DF9 | CALL Handler_Aliens | Call Handler_Aliens. | ||
| 7DFC | CALL Handler_AlienExplosions | Call Handler_AlienExplosions. | ||
| 7DFF | CALL Handler_LevelReset | Call Handler_LevelReset. | ||
| 7E02 | CALL DifficultyDelay | Call DifficultyDelay. | ||
| 7E05 | LD A,($66F5) | Jump back to Game_Loop unless *Flag_GameOver is active. | ||
| 7E08 | OR A | |||
| 7E09 | JR Z,Game_Loop | |||
|
*Flag_GameOver is active, start the "Game Over" process.
|
||||
| 7E0B | LD D,$08 | D=08. | ||
| StartGame_0 | 7E0D | LD BC,$0000 | BC=0000. | |
| StartGame_1 | 7E10 | DJNZ StartGame_1 | Decrease counter by one and loop back to StartGame_1 until counter is zero. | |
| 7E12 | DEC C | Decrease C by one. | ||
| 7E13 | JR NZ,StartGame_1 | Jump to StartGame_1 until C is zero. | ||
| 7E15 | DEC D | Decrease D by one. | ||
| 7E16 | JR NZ,StartGame_0 | Jump to StartGame_0 if D is not equal to A. | ||
| 7E18 | LD HL,$6514 | HL=Messaging_Score. | ||
| 7E1B | LD DE,$651F | DE=Messaging_HighScore. | ||
| 7E1E | LD B,$06 | B=06. | ||
| 7E20 | PUSH HL | Stash HL and DE on the stack. | ||
| 7E21 | PUSH DE | |||
| StartGame_2 | 7E22 | LD A,(DE) | Jump to StartGame_3 if *DE is equal to *HL. | |
| 7E23 | CP (HL) | |||
| 7E24 | JR Z,StartGame_3 | |||
| 7E26 | JR C,StartGame_5 | Jump to StartGame_5 if *DE is less than *HL. | ||
| 7E28 | JR StartGame_4 | Jump to StartGame_4. | ||
| StartGame_3 | 7E2A | INC DE | Increment DE by one. | |
| 7E2B | INC HL | Increment HL by one. | ||
| 7E2C | DJNZ StartGame_2 | Decrease counter by one and loop back to StartGame_2 until counter is zero. | ||
| StartGame_4 | 7E2E | POP DE | Restore DE from the stack. | |
| 7E2F | JR StartGame_6 | Jump to StartGame_6. | ||
| StartGame_5 | 7E31 | POP DE | Restore DE and HL from the stack. | |
| 7E32 | POP HL | |||
| 7E33 | PUSH HL | Stash HL on the stack. | ||
| 7E34 | LD BC,$0006 | BC=0006. | ||
| 7E37 | LDIR | LDIR. | ||
| StartGame_6 | 7E39 | POP HL | Restore HL from the stack. | |
| 7E3A | LD DE,$6515 | DE=6515. | ||
| 7E3D | LD (HL),$30 | Write ASCII 30 ("0") to *HL. | ||
| 7E3F | LD BC,$0005 | BC=0005. | ||
| 7E42 | LDIR | LDIR. | ||
| 7E44 | JP TitleScreen | Jump to TitleScreen. | ||
| Prev: 7C82 | Up: Map | Next: 7E47 |