![]() |
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 *66F1. | ||
7DE9 | LD ($66F1),A | |||
Set the players starting life count.
|
||||
7DEC | INC A | Write 05 to *Player_Lives. | ||
7DED | LD ($66F0),A | |||
7DF0 | CALL $740C | Call 740C. | ||
StartGame_0 | 7DF3 | CALL $6CEE | Call 6CEE. | |
7DF6 | CALL $7616 | Call 7616. | ||
7DF9 | CALL Handler_Aliens | Call Handler_Aliens. | ||
7DFC | CALL $79B2 | Call 79B2. | ||
7DFF | CALL $7254 | Call 7254. | ||
7E02 | CALL $6890 | Call 6890. | ||
7E05 | LD A,($66F5) | Jump to StartGame_0 if *Flag_GameOver is zero. | ||
7E08 | OR A | |||
7E09 | JR Z,StartGame_0 | |||
7E0B | LD D,$08 | D=08. | ||
StartGame_1 | 7E0D | LD BC,$0000 | BC=0000. | |
StartGame_2 | 7E10 | DJNZ StartGame_2 | Decrease counter by one and loop back to StartGame_2 until counter is zero. | |
7E12 | DEC C | Decrease C by one. | ||
7E13 | JR NZ,StartGame_2 | Jump to StartGame_2 until C is zero. | ||
7E15 | DEC D | Decrease D by one. | ||
7E16 | JR NZ,StartGame_1 | Jump to StartGame_1 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_3 | 7E22 | LD A,(DE) | Jump to StartGame_4 if *DE is equal to *HL. | |
7E23 | CP (HL) | |||
7E24 | JR Z,StartGame_4 | |||
7E26 | JR C,StartGame_6 | Jump to StartGame_6 if *DE is less than *HL. | ||
7E28 | JR StartGame_5 | Jump to StartGame_5. | ||
StartGame_4 | 7E2A | INC DE | Increment DE by one. | |
7E2B | INC HL | Increment HL by one. | ||
7E2C | DJNZ StartGame_3 | Decrease counter by one and loop back to StartGame_3 until counter is zero. | ||
StartGame_5 | 7E2E | POP DE | Restore DE from the stack. | |
7E2F | JR StartGame_7 | Jump to StartGame_7. | ||
StartGame_6 | 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_7 | 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 |