Prev: BF1A Up: Map Next: BF60
BF33: Load saved game
Sets IX (start of block to load) and DE (block length) for ROM LOAD routine.
First data block - all game data between EAA1 and ECA1
BF33 LD IX,$EAA0 Start of data block
BF37 LD HL,$ECA1 Address for end of block
BF3A LD DE,$EAA0 Start of block, game data at EAA1
BF3D SCF Set carry flag...
BF3E CCF ...and then toggle so it's cleared
BF3F SBC HL,DE Calculate the number of bytes in the data block and put result in DE register pair
BF41 INC HL Need to add 1 to include the last byte
BF42 EX DE,HL
BF43 LD A,$FF Indicates a data block to load (rather than header)
BF45 SCF Sets the carry flag, which tells the ROM routine to perform a LOAD
BF46 CALL $0556 Call the LD-BYTES ROM subroutine to load saved game data
Second data block - all game data between 6790 and 8033
BF49 LD IX,($DAF5) Start of data block
BF4D LD HL,($EB61) Address for end of block
BF50 LD DE,($DAF5) Start of block, game data at 6790
BF54 SCF Set carry flag
BF55 CCF ...and then toggle it so it's cleared
BF56 SBC HL,DE Calculate the number of bytes in the data block and put result in DE register pair
BF58 INC HL Need to add 1 to include the last byte
BF59 EX DE,HL
BF5A LD A,$FF Indicates a data block to load (rather than header)
BF5C SCF Sets the carry flag, which tells the ROM routine to perform a LOAD
BF5D CALL $0556 Call the LD-BYTES ROM subroutine to load saved game data
Prev: BF1A Up: Map Next: BF60