![]() |
Routines |
| Prev: 842E | Up: Map | Next: 8498 |
|
Loads a saved game back into the live state. Reached through the special-key table at 8271, dispatched from Command_MatchASpecialKey.
|
||||
| LoadGame | 8451 | PUSH IX | Set the load as a "data block". | |
| 8453 | PUSH DE | |||
|
Load "flags".
|
||||
| 8454 | LD A,$FF | |||
| 8456 | SCF | Set carry so the ROM loads the saved-game header. | ||
| 8457 | LD IX,$B6EB | Set the start address to B6EB. | ||
| 845B | LD DE,$001D | Set the block length to 1D bytes. | ||
| 845E | CALL LoadBlock | Call LoadBlock to read the save block. | ||
|
Load "objects".
|
||||
| 8461 | LD A,$FF | Set the load as a "data block". | ||
| 8463 | SCF | Set carry so the ROM loads the object table. | ||
| 8464 | LD IX,$C11B | Set the start address to Objects. | ||
| 8468 | LD DE,$0615 | Set the block length to 0615 bytes. | ||
| 846B | CALL LoadBlock | Call LoadBlock to read the save block. | ||
|
Load...
|
||||
| 846E | LD A,$FF | Set the load as a "data block". | ||
| 8470 | SCF | Set carry so the ROM loads the object handlers. | ||
| 8471 | LD IX,$CA84 | Set the start address to CA84. | ||
| 8475 | LD DE,$00BF | Set the block length to BF bytes. | ||
| 8478 | CALL LoadBlock | Call LoadBlock to read the save block. | ||
|
Load "locations".
|
||||
| 847B | LD A,$FF | Set the load as a "data block". | ||
| 847D | SCF | Set carry so the ROM loads the location table. | ||
| 847E | LD IX,$BA8A | Set the start address to Locations. | ||
| 8482 | LD DE,$05D9 | Set the block length to 05D9 bytes. | ||
| 8485 | CALL LoadBlock | Call LoadBlock to read the save block. | ||
|
Success!
|
||||
| 8488 | DI | Disable interrupts. | ||
| 8489 | LD HL,$B6EB | Call ThreeByteCopy with HL pointing at B6EB and DE pointing at C9E2. | ||
| 848C | LD DE,$C9E2 | |||
| 848F | CALL ThreeByteCopy | |||
| 8492 | POP DE | Jump back to CommandDispatchAControl to dispatch a control. | ||
| 8493 | POP IX | |||
| 8495 | JP CommandDispatchAControl | |||
| Prev: 842E | Up: Map | Next: 8498 |