![]() |
Routines |
| Prev: 33977 | Up: Map | Next: 34138 |
|
Saves the live game to tape. Reached through the special-key table at 33393, dispatched from Command_MatchASpecialKey.
|
||||
| SaveGame | 33996 | PUSH IX | Save IX and DE, then call ThreeByteCopy with DE at 46827 and HL at 51682. | |
| 33998 | PUSH DE | |||
| 33999 | LD DE,46827 | |||
| 34002 | LD HL,51682 | |||
| 34005 | CALL ThreeByteCopy | |||
| 34008 | LD A,1 | Write 1 to WaitCountdown. | ||
| 34010 | LD (46849),A | |||
| 34013 | LD HL,45890 | Point at the message "start tape then press any key" (45890). | ||
| 34016 | CALL PrintMessage | Call PrintMessage to print message. | ||
| 34019 | CALL DebounceAnyKey | Call DebounceAnyKey to debounce keyboard. | ||
|
Save "flags".
|
||||
| 34022 | LD A,255 | Set the save as a "data block". | ||
| 34024 | LD IX,46827 | Set the start address to 46827. | ||
| 34028 | LD DE,29 | Set the block length to 29 bytes. | ||
| 34031 | CALL 1218 | Call SA_BYTES. | ||
|
Save "objects".
|
||||
| 34034 | LD A,255 | Set the save as a "data block". | ||
| 34036 | LD IX,49435 | Set the start address to Objects. | ||
| 34040 | LD DE,1557 | Set the block length to 1557 bytes. | ||
| 34043 | CALL 1218 | Call SA_BYTES. | ||
|
Save...
|
||||
| 34046 | LD A,255 | Set the save as a "data block". | ||
| 34048 | LD IX,51844 | Set the start address to 51844. | ||
| 34052 | LD DE,191 | Set the block length to 191 bytes. | ||
| 34055 | CALL 1218 | Call SA_BYTES. | ||
|
Save "locations".
|
||||
| 34058 | LD A,255 | Set the save as a "data block". | ||
| 34060 | LD IX,47754 | Set the start address to Locations. | ||
| 34064 | LD DE,1497 | Set the block length to 1497 bytes. | ||
| 34067 | CALL 1218 | Call SA_BYTES. | ||
|
Begin verification.
|
||||
| 34070 | LD HL,45988 | Point HL at 45988. | ||
| 34073 | CALL PrintMessage | Call PrintMessage to print message. | ||
| 34076 | CALL DebounceAnyKey | Call DebounceAnyKey to debounce keyboard. | ||
|
Verify "flags".
|
||||
| 34079 | LD A,255 | Set the load as a "data block". | ||
| 34081 | AND A | Clear carry so the ROM verifies the flags. | ||
| 34082 | LD IX,46827 | Set the start address to 46827. | ||
| 34086 | LD DE,29 | Set the block length to 29 bytes. | ||
| 34089 | CALL VerifyBlock | Call VerifyBlock to verify the block. | ||
|
Verify "objects".
|
||||
| 34092 | LD A,255 | Set the load as a "data block". | ||
| 34094 | AND A | Clear carry so the ROM verifies the object table. | ||
| 34095 | LD IX,49435 | Set the start address to Objects. | ||
| 34099 | LD DE,1557 | Set the block length to 1557 bytes. | ||
| 34102 | CALL VerifyBlock | Call VerifyBlock to verify the block. | ||
|
Verify the object handlers.
|
||||
| 34105 | LD A,255 | Set the load as a "data block". | ||
| 34107 | AND A | Clear carry so the ROM verifies the object handlers. | ||
| 34108 | LD IX,51844 | Set the start address to 51844. | ||
| 34112 | LD DE,191 | Set the block length to 191 bytes. | ||
| 34115 | CALL VerifyBlock | Call VerifyBlock to verify the block. | ||
|
Verify "locations".
|
||||
| 34118 | LD A,255 | Set the load as a "data block". | ||
| 34120 | AND A | Clear carry so the ROM verifies the location table. | ||
| 34121 | LD IX,47754 | Set the start address to Locations. | ||
| 34125 | LD DE,1497 | Set the block length to 1497 bytes. | ||
| 34128 | CALL VerifyBlock | Call VerifyBlock to verify the block. | ||
|
This entry point is used by the routine at VerifyBlock.
Success!
|
||||
| SaveGame_Done | 34131 | DI | Disable interrupts. | |
| 34132 | POP DE | Jump back to CommandDispatchAControl to dispatch a control. | ||
| 34133 | POP IX | |||
| 34135 | JP CommandDispatchAControl | |||
| Prev: 33977 | Up: Map | Next: 34138 |