![]()  | 
Routines | 
| Prev: 49211 | Up: Map | Next: 49317 | 
| 
 
Used by the routine at 45284.
 
 | 
||||
| 
 
Prints "Start tape, then press any key.".
 
 | 
||||
| SaveGame | 49216 | LD HL,2466 | HL=2466. | |
| 49219 | CALL PrintStringAndWaitForKeypress | Call PrintStringAndWaitForKeypress. | ||
| 49222 | LD (49417),DE | Write DE to *49417. | ||
| 49226 | LD (49419),IX | Write IX to *49419. | ||
| 49230 | LD IX,49406 | IX=49406. | ||
| 49234 | LD DE,17 | DE=0017. | ||
| 49237 | XOR A | Set A to 0 to indicate this is a header block. | ||
| 49238 | CALL 1218 | Call SA_BYTES. | ||
| 49241 | LD B,50 | B=50. | ||
| SaveGame_PauseLoop | 49243 | HALT | Halt operation (suspend CPU until the next interrupt). | |
| 49244 | DJNZ SaveGame_PauseLoop | Decrease counter by one and loop back to SaveGame_PauseLoop until counter is zero. | ||
| 49246 | DI | Disable interrupts. | ||
| 49247 | LD DE,(49417) | DE=*49417. | ||
| 49251 | LD IX,(49419) | IX=*49419. | ||
| 49255 | LD A,255 | Set A to 255 to indicate this is a data block. | ||
| 49257 | CALL 1218 | Call SA_BYTES. | ||
| 49260 | DI | Disable interrupts. | ||
| 
 
Prints "REWIND TAPE.".
 
 | 
||||
| 49261 | LD HL,49317 | HL=Messaging_RewindTape. | ||
| 49264 | CALL PrintString | Call PrintString. | ||
| 
 
Prints ", then press any key.".
 
 | 
||||
| 49267 | LD HL,2476 | HL=2476. | ||
| 49270 | CALL PrintStringAndWaitForKeypress | Call PrintStringAndWaitForKeypress. | ||
| 49273 | LD IX,49406 | IX=49406. | ||
| 49277 | LD DE,17 | DE=0017. | ||
| 49280 | LD A,0 | Set A to 0 to indicate this is a header block. | ||
| 49282 | AND A | Set flags. | ||
| 49283 | CALL 1366 | Call LD_BYTES. | ||
| 49286 | JR NC,SaveGame_Error | Jump to SaveGame_Error if there was any error returned. | ||
| 49288 | AND A | Set flags. | ||
| 
 
This entry point is used by the routine at LoadGame.
 
 | 
||||
| LoadGameData | 49289 | LD DE,(49417) | DE=*49417. | |
| 49293 | LD IX,(49419) | IX=*49419. | ||
| 49297 | LD A,255 | Set A to 255 to indicate this is a data block. | ||
| 49299 | CALL 1366 | Call LD_BYTES. | ||
| 49302 | DI | Disable interrupts. | ||
| 49303 | RET C | Return if there were no tape loading errors. | ||
| 
 
There were errors ... so alert the player.
 
 | 
||||
| SaveGame_Error | 49304 | DI | Disable interrupts. | |
| 
 
Prints "TAPE ERROR.".
 
 | 
||||
| 49305 | LD HL,49329 | HL=Messaging_TapeError. | ||
| 49308 | CALL PrintString | Call PrintString. | ||
| 
 
Prints " press any key.".
 
 | 
||||
| 49311 | LD HL,2482 | HL=2482. | ||
| 49314 | JP PrintStringAndWaitForKeypress | Jump to PrintStringAndWaitForKeypress. | ||
| Prev: 49211 | Up: Map | Next: 49317 |