![]() |
Routines |
| Prev: 6000 | Up: Map | Next: 6800 |
|
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 (8800 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 76 (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 | 67F2 | DI | Disable interrupts. | |
| 67F3 | LD HL,$6801 | Set HL to 6801 (the source address). | ||
| 67F6 | LD DE,$6800 | Set DE to 6800 (the destination address). | ||
| 67F9 | LD BC,$8800 | Set BC to 8800 (the number of bytes to move). | ||
| 67FC | LDIR | Move the game down by one byte. | ||
| 67FE | DEFB $C3,$80 | The opcode (C3) and the low operand byte (80) of the final instruction, JP 7680. The high operand byte is at Room_Decoration_Table. | ||
|
View the equivalent code in;
|
||||
| Prev: 6000 | Up: Map | Next: 6800 |