Prev: A41F Up: Map Next: A647
A631: Start Game
Used by the routine at GameEntry.
Clears every game variable from RandomSeed1 up to UnusedAfterObjects, keeps the low byte of FRAMES as RandomSeed1, checks that the loader started the game, and then carries on into InitialiseGame.
Clear the variables and keep the seed.
StartGame A631 LD HL,$5B00 Point HL at RandomSeed1.
A634 LD BC,$0788 Set the number of bytes to 0788.
A637 LD A,($5C78) Fetch the low byte of FRAMES.
A63A PUSH AF Stash the seed on the stack.
A63B CALL FillMemory Call FillMemory.
A63E POP AF Restore the seed from the stack.
A63F LD ($5B00),A Set RandomSeed1.
A642 CALL CheckProtection Call CheckProtection.
A645 JR InitialiseGame Jump to InitialiseGame.
View the equivalent code in;
Prev: A41F Up: Map Next: A647