Prev: 6416 Up: Map Next: 6457
6428: Start Game
Used by the routine at GameInitialisation.
Starts a new game when "0" is pressed on the game selection menu. The screen is blanked, the opening tune is played (unless the sound is muted) and the data for the game is reset. Then the first level is set up, and the game carries on in the main loop.
StartGame 6428 CALL ResetAttributes Blank the attribute buffer using ResetAttributes.
642B CALL ResetScreen Blank the screen buffer using ResetScreen.
Play the opening tune, unless the sound is muted.
642E LD A,($5F0D) Jump to SkipMusic if Sound_Enable is not zero.
6431 AND A
6432 JR NZ,SkipMusic
6434 LD DE,$65C8 Point DE at MusicData.
6437 CALL PlayMusic Play the tune using PlayMusic.
Reset both of the level numbers which are shown on the screen.
SkipMusic 643A XOR A Write 00 to;
643B LD ($5F30),A
643E LD ($5F34),A
Blank everything from the 1UP score to the end of the last actor slot, which resets the scores, the sprite data and all of the actors.
6441 LD HL,$5F0E Write 00 to every byte from 1UP_Score_1 to 5F84 (77 bytes).
6444 LD (HL),$00
6446 LD D,H
6447 LD E,L
6448 INC DE
6449 LD BC,$0076
644C LDIR
644E CALL NewGame Set up the data for both players using NewGame.
6451 CALL ResetModifiedCode Reset the self modifying code using ResetModifiedCode.
6454 CALL SetUpLevel Set up the first level using SetUpLevel.
Continue on to MainLoop_NewPass.
View the equivalent code in;
Prev: 6416 Up: Map Next: 6457