-
Notifications
You must be signed in to change notification settings - Fork 1
Boot
The Boot section of the loader is loaded by the standard BASIC load command, and gets the computer into a state ready to accept payload blocks.
The boot section has to load by the standard load mechanism, which is universally slow. So every effort is made to speed up every aspect of loading the boot code, both by timing tweaks and by minimising the amount of data the boot section requires.
On the ZX Spectrum, tapes are loaded by either LOAD ""
or the Tape Loader menu option. The computer then expects a BASIC program to be loaded by the built in ROM loading system.
- The loader is executed as BASIC. This executes the command OVER USR 23755, which starts executing code at that address.
- The loader is executed again, as machine code. The main load routine can not run at its current location, as the memory chip is subject to unpredictable access delays ('contended memory'). So the next step is to move the code to a new location in uncontended memory.
- The main loop is run, looking synchronisation, calibration and payload blocks.
Several tricks are used to speed up the boot loading.
- Header, '0' and '1' pulses are timed to be as quick as the ROM loader can handle, accounting for tape speed tolerances.
- There is no silence in the tape loading. This keeps the tape signal output level constant throughout the loading process, so no delays are required to wait for automatic gain controls within the tape audio system.
- The boot program is designed to be as compact as possible, to the byte, to minimise the amount of code loaded at the slow speed. The payload routine can load extra code (eg. decompression routines) later at the much faster bit rate.
On the Commodore 64, tapes are loaded by Shift-RUN/STOP or LOAD ""
. The computer then expects a BASIC program to be loaded by the built in ROM loading system.
- The loader is loaded at address 0x801. It is then executed as BASIC. This executes the command CALL XXX, which starts executing code at that address.
- The loader is executed as machine code. This relocates the loader and executes it at the new location.
- The main loop is run, looking synchronisation, calibration and payload blocks. Other Commodore 8 bit machines work in a similar way, although the load address changes between platforms.
To be defined.