Prev: 24576 Up: Map Next: 26624
26610: Game Entry Point
The stub that the tape loader runs after loading the game. The loader leaves the game one byte higher than it is meant to be, so the stub moves the whole image (34816 bytes) down by one byte and then jumps to Start_Game_Selection to start the game.
The last operand byte of the final JP instruction lies at Room_Decoration_Table, which is the first byte of the moved image. That byte is 118 (the sprite id of the first decoration in Room_Decoration_Table), so after the move the JP still lands on Start_Game_Selection. Only the first two bytes of the JP are kept in this routine so that it does not overlap the Room_Decoration_Table table. The stub is wiped when Reset_Room_Table clears the Room_Visit_Table table.
GameEntry 26610 DI Disable interrupts.
26611 LD HL,26625 Set HL to 26625 (the source address).
26614 LD DE,26624 Set DE to 26624 (the destination address).
26617 LD BC,34816 Set BC to 34816 (the number of bytes to move).
26620 LDIR Move the game down by one byte.
26622 DEFB 195,128 The opcode (195) and the low operand byte (128) of the final instruction, JP 30336. The high operand byte is at Room_Decoration_Table.
View the equivalent code in;
Prev: 24576 Up: Map Next: 26624