Prev: 27041 Up: Map Next: 27164
27100: Load From Tape
Used by the routine at Action_Load.
Load a game position from tape and redraw the room.
LoadFromTape 27100 LD HL,25522 Print LOADING. Start tape..
27103 CALL PrintStringAndANewline
27106 LD IX,25003 The loaded game is written over the object locations.
27110 LD DE,180 Load a data block of 180 bytes over the object locations.
27113 LD A,255
27115 SCF Ask the ROM to load the block rather than verify it.
27116 CALL 1366 Call LD_BYTES.
27119 JR C,LoadFromTape_Step1 Restore the saved bytes when the tape block has loaded.
27121 LD HL,25543 Print Tape error..
27124 CALL PrintStringAndANewline
27127 RET Return.
LoadFromTape_Step1 27128 LD A,(25308) Fetch how many locations the save file stores.
27131 OR A Return if the save file stores no locations.
27132 RET Z
27133 LD B,A Prepare to copy each saved location back into the game.
27134 LD IX,(25310)
27138 LD DE,25133
27141 JR LoadFromTape_Step2
LoadFromTape_Loop1 27143 INC IX Step to the next saved-location pointer.
27145 INC IX
27147 INC DE
LoadFromTape_Step2 27148 LD L,(IX+0) Read the address of this saved location.
27151 LD H,(IX+1)
27154 LD A,(DE) Read the byte saved for that location.
27155 LD (HL),A Write it back into the game.
27156 DJNZ LoadFromTape_Loop1 Repeat for the remaining saved locations.
27158 LD E,0 Show the room picture even if it has been seen before.
27160 CALL Handler_DisplayRoom Call Handler_DisplayRoom to display the room.
27163 RET Return.
Prev: 27041 Up: Map Next: 27164