Prev: 42015 Up: Map Next: 42567
42545: 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 42545 LD HL,23296 Point HL at RandomSeed1.
42548 LD BC,1928 Set the number of bytes to 1928.
42551 LD A,(23672) Fetch the low byte of FRAMES.
42554 PUSH AF Stash the seed on the stack.
42555 CALL FillMemory Call FillMemory.
42558 POP AF Restore the seed from the stack.
42559 LD (23296),A Set RandomSeed1.
42562 CALL CheckProtection Call CheckProtection.
42565 JR InitialiseGame Jump to InitialiseGame.
View the equivalent code in;
Prev: 42015 Up: Map Next: 42567