The USER
|
- starts the demo or game by clicking a Icon or by starting WHDLoad via the command line
|
The Operating System
|
- loads the WHDLoad executable and starts it
|
WHDLoad
|
- checks the Software and Hardware environment
- loads and checks the Slave
- allocates required memory for the installed program
- if PreLoad/S is enabled it loads disk images
and files into the RAM (as far as free memory is available)
- switches OS off (disables mutitasking and interrupts, degrades graphics
hardware to OCS, inits all hardware with defined values)
- jumps into Slave
|
Slave
|
- loads the main executable of the installed program by calling a WHDLoad
function (e.g. resload_DiskLoad or resload_LoadFile)
- patches the main executable (that the program will load his data via the
Slave, to fix compatibility problems, to enable an exit from the program)
- calls the main executable
|
Installed program
|
- will do his stuff
- on loading data from disk it will call the Slave (because the Slave has
patched it in this way previously), and the Slave will call WHDLoad, and WHDLoad
will partial enable the OS to load the data (only if the datas are not PreLoad'ed), then return, return and the installed
program continues
|
The USER
|
- exits the program by pressing the QuitKey
|
Slave
|
|
WHDLoad
|
- reenables the OS (restores hardware registers, display and memory)
- frees all allocated resources
- returns to the OS
|