Prev: 81F2 Up: Map Next: 8250
8209: LOAD
Loads a saved game from tape using the ROM routine LD-BYTES ($0556), in four headerless blocks: the 28 game variables (B5CB, from B5DC), the object table (C00B), the timers and characters (C973) and the room table (B97A). These are exactly the areas that the game backs up at start-up (6C00), and together they are the entire state of the game. Afterwards three bytes are copied from B5DC back to C8D1 (see 8284). If a block fails to load, 8250 reports a tape error and restarts the game.
Two things live outside the four blocks. The three bytes of Bard's current order are handled specially (see 8284). But the address of the hidden route chosen at the start of the game is not saved at all: 970B writes it into the code of Elrond's map routine (the operand at $A6C5), not into the saved data.
8209 PUSH IX Save IX and DE
820B PUSH DE
820C LD A,$FF A headerless block is expected...
820E SCF ...and it should be loaded, not verified
820F LD IX,$B5DC Load the 28 bytes of game variables...
8213 LD DE,$001C
8216 CALL $8250 ...restarting the game if the tape fails
8219 LD A,$FF Then the object table...
821B SCF
821C LD IX,$C00B
8220 LD DE,$0614
8223 CALL $8250
8226 LD A,$FF Then the timers and character table...
8228 SCF
8229 LD IX,$C973
822D LD DE,$00BF
8230 CALL $8250
8233 LD A,$FF Then the room table...
8235 SCF
8236 LD IX,$B97A
823A LD DE,$05D9
823D CALL $8250
8240 DI Interrupts off while poking at memory directly
8241 LD HL,$B5DC Restore the three bytes of Bard's own remembered order...
8244 LD DE,$C8D1
8247 CALL $826B ...which were tucked in among the saved variables
824A POP DE Restore DE and IX
824B POP IX
824D JP $806B Carry on parsing
Prev: 81F2 Up: Map Next: 8250