Prev: 6416 Up: Map Next: 6486
6428: Start Game
Used by the routine at GameInitialisation.
StartGame 6428 CALL ResetAttributes Call ResetAttributes.
642B CALL ResetScreen Call ResetScreen.
642E LD A,($5F0D) If Sound_Enable is not zero then jump to SkipMusic.
6431 AND A
6432 JR NZ,SkipMusic
6434 LD DE,$65C8 DE=MusicData.
6437 CALL PlayMusic Call PlayMusic.
SkipMusic 643A XOR A Write 00 to;
643B LD ($5F30),A
643E LD ($5F34),A
6441 LD HL,$5F0E Write 00 to 76 bytes, from 5F0E to 5F84.
6444 LD (HL),$00
6446 LD D,H
6447 LD E,L
6448 INC DE
6449 LD BC,$0076
644C LDIR
644E CALL PlayersInit Call PlayersInit.
6451 CALL $7186 Call 7186.
6454 CALL GameInit Call GameInit.
This entry point is used by the routine at 7198.
MainLoopResetStack 6457 LD SP,$5F00 Set the stack pointer to SecurityCheck.
645A EI Enable interrupts.
645B LD IX,$5F55 IX=BufferIngredients.
645F XOR A Write 00 to 5F1B to reset the current nasties.
6460 LD ($5F1B),A
This entry point is used by the routines at FrameUpdate and 7198.
MainLoop 6463 LD A,($5C78) Compare FRAMES and LastFrame.
6466 LD C,A
6467 LD A,($5F22)
If interrupts are enabled, then FrameUpdate will be called and DI executed.
646A CP C If they are not equal call FrameUpdate.
646B CALL NZ,FrameUpdate
646E LD HL,$71A3 HL=71A3.
6471 PUSH HL Stash HL on the stack.
6472 LD HL,$6486 HL=6486.
6475 LD A,(IX+$00) A=IX+00.
This entry point is used by the routine at 65E8.
StartGame_0 6478 RLCA A=A * 2.
6479 AND %01111110 Keep only bits 1-6.
647B LD C,A Create an offset in BC.
647C LD B,$00
647E ADD HL,BC HL=HL + offset.
647F LD A,(HL)
6480 INC HL Increment HL by one.
6481 LD H,(HL)
6482 LD L,A
6483 JP $5CB0 Jump to NMIADD which should just jump to the address in HL.
View the equivalent code in;
Prev: 6416 Up: Map Next: 6486