![]() |
Routines |
| Prev: 16384 | Up: Map | Next: 18593 |
|
After the tape load, the game is still encoded. This stub sits in the loading-screen bitmap, restores the 32660 bytes below 65534 then starts the title/menu at Initialise_Game.
|
||||
| Decrypt_Game | 18565 | XOR A | Use the whole screen; no rows are reserved for BASIC. | |
| 18566 | LD (23659),A | |||
| 18569 | LD DE,65534 | Point at the last encoded byte and set the length to 32660. | ||
| 18572 | LD HL,65533 | |||
| 18575 | LD BC,32660 | |||
|
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 | 18578 | LD A,(HL) | Decode one byte and step both pointers down. | |
| 18579 | CPL | |||
| 18580 | DEC A | |||
| 18581 | LD (DE),A | |||
| 18582 | DEC DE | |||
| 18583 | DEC HL | |||
| 18584 | DEC BC | |||
| 18585 | LD A,B | Jump to Decrypt_Game_Loop until the whole image is restored. | ||
| 18586 | OR C | |||
| 18587 | JP NZ,Decrypt_Game_Loop | |||
| 18590 | JP Initialise_Game | Jump to Initialise_Game. | ||
| Prev: 16384 | Up: Map | Next: 18593 |