![]() |
Routines |
| Prev: 4000 | Up: Map | Next: 48A1 |
|
After the tape load, the game is still encoded. This stub sits in the loading-screen bitmap, restores the 7F94 bytes below FFFE then starts the title/menu at Initialise_Game.
|
||||
| Decrypt_Game | 4885 | XOR A | Use the whole screen; no rows are reserved for BASIC. | |
| 4886 | LD ($5C6B),A | |||
| 4889 | LD DE,$FFFE | Point at the last encoded byte and set the length to 7F94. | ||
| 488C | LD HL,$FFFD | |||
| 488F | LD BC,$7F94 | |||
|
Undo the tape encoding: complement, subtract one, and store the byte one address higher. Walks backwards through the loaded game until every encoded byte is restored.
|
||||
| Decrypt_Game_Loop | 4892 | LD A,(HL) | Decode one byte and step both pointers down. | |
| 4893 | CPL | |||
| 4894 | DEC A | |||
| 4895 | LD (DE),A | |||
| 4896 | DEC DE | |||
| 4897 | DEC HL | |||
| 4898 | DEC BC | |||
| 4899 | LD A,B | Jump to Decrypt_Game_Loop until the whole image is restored. | ||
| 489A | OR C | |||
| 489B | JP NZ,Decrypt_Game_Loop | |||
| 489E | JP Initialise_Game | Jump to Initialise_Game. | ||
| Prev: 4000 | Up: Map | Next: 48A1 |