Options and global configuration

There are local and global options. Local options are specified as arguments via the command line or as ToolTypes when started from the Workbench.
The global configuration file is "S:WHDLoad.prefs". It is a usual ASCII file and contains one option per line. Empty lines and comments are ignored. A comment is line based, starts with the character ";" and goes up to the end of line.
An example configuration file is contained in the developer package ("S/WHDLoad.prefs").

Overview

List of available options

Name of optionTypeLocalGlobalDefault value
ButtonWaitswitcherxx
Cacheswitcherx-
CoreDumpswitcherx-
CoreDumpPathstring-xPROGDIR:
Custom1switcherx-
Custom2switcherx-
Custom3switcherx-
Custom4switcherx-
Custom5switcherx-
Dswitcherx-
DebugKeynumericalxx-
DCacheswitcherx-
ExecuteCleanupstring-x-
ExecuteStartupstring-x-
Expertswitcher-x
FileLogswitcherx-
FreezeKeynumericalxx$5d
MMUswitcherxx
NoAutoVecswitcherxx
NoCacheswitcherx-
NoFilterswitcherxx
NoMMUswitcherxx
NoTrapHandlerswitcherx-
NoVBRMoveswitcherx-
NTSCswitcherx-
PALswitcherx-
Preloadswitcherx-
QuitKeynumericalxx-
ReadDelaynumerical-x0
SplashDelaynumerical-x200
Slavestringx-WHDLoad.Slave
SnoopAGAswitcherx-
SnoopECSswitcherx-
SnoopOCSswitcherx-
WriteDelaynumericalxx150

Types of options

numerical: the value of the option is an integer,
on the command line you must use decimal notation, as ToolType you can also use hexadecimal notation indicated by a leading "$"
string: the value of the option is a string
switcher: option will be enabled if specified (boolean)

Example

Workbench:
CLI or Shell: 1> WHDLoad SuperGame.Slave PreLoad NTSC QuitKey=69 Custom1=1

Description of each Option

ButtonWait/S

This option does not affect WHDLoad itself, but can be tested by the Slave.
The meaning of this option is that if set, the users wants the installed program to wait for pressing a button when it shows pictures and/or plays music and normally it does this only for a very limited time (due to HD/RAM loading compared to slow disk loading).

Cache/S

This option enables the instruction cache for the installed program.
The option has no effect if NoCache/S is also set.

CoreDump/S

If selected, on every exit from an installed program, WHDLoad creates a memory and register dump. This may be useful to rip a music-module from the memory dump or for debugging.

CoreDumpPath

The destination directory for all dump files created by WHDLoad.

Custom1/K/N, Custom2/K/N, Custom3/K/N, Custom4/K/N, Custom5/K/N

These options are not used by WHDLoad itself, but can be tested by the Slave to control various Slave specific things.

DCache/S

This option enables the instruction and the data cache for the installed program (it implies Cache/S), the data cache will not be enabled if the option NoDCache/S is also active, the instruction cache will not be enabled if NoCache/S is set.

D/S

This option helps to debug. If the option is enabled and a supported software freezer (Hrt/TK) is found in memory, WHDLoad simulates an NMI at execution of the first instruction contained in the Slave.

DebugKey/K/N

Sets the rawkey code to quit the program with debug (write coredump files and quit), this works only if the expert mode is active, if the VBR is moved by WHDLoad (NoVBRMove/S is not set and the cpu is at least a 68010) or the Slave itself supports it.

Expert/S

This option enables the expert mode of WHDLoad. Currently it affects only the DebugKey/S feature. If expert mode is not active DebugKey/S is not available.

ExecuteCleanup

With this option a command can be specified which will executed by WHDLoad on exit.

ExecuteStartup

With this option a command can be specified which will executed by WHDLoad on startup. Can be used to disable hardware which makes problems in conjunction with WHDLoad, or to stop the TCP/IP stack or similar stuff.

FileLog/S

This option is only for debugging purposes. See chapter Dumps and Logfiles for more info.
This option disables the option PreLoad/S.

FreezeKey/K/N

If you are using one of the supported software freezers (HrtMon or Thrillkill) you can use this option to setup a rawkey code on which pressed WHDLoad will enter the freezer. For this to work, the VBR must be moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) and the freezer must be active, the default key is $5d (grey '*' on the numerical keyblock).

MMU/S

This must be used on 68030 machines to get the MMU related features working (memory protection, improved cache managment, Snooping, resload_Protect#? functions). On 68040/060 this option has no effect because the MMU will be used by default. It is recommended to set this option in the global configuration file on all systems containing a 68030 with working MMU (i.e. not a 68ec030) because it increases stability and security a lot. If the option NoMMU/S is also set this option has no effect.

NoAutoVec/S

If selected WHDLoad will not quit if an unexpected autovector or NMI occurs (vectors #25-31 / $64-$7c). This should be used on systems/hardware which will create at random such interrupts to prevent WHDLoad from exiting.

NoCache/S

If selected the caches for the installed program are disabled, and the Slave cannot enable them (via resload_SetCACR). This option overrides Cache/S and DCache/S.

NoFilter/S

Disables the audio filter. Note that this option only affects the initialisation at startup, if the installed program itself changes the state of the audio filter this option will be without effect.

NoMMU/S

If this option is set WHDLoad will not use the MMU. This is a critical and dangerous option recommended only for testing or debugging and not for normal use. See chapter MMU for more info. The option overides MMU/S.

NoTrapHandler/S

If this option is enabled WHDLoad will use the original vector table from the OS which is active on starting WHDLoad, for the installed program, instead of creating its own vector table with which WHDLoad will catch all exceptions itself. This will only be useful for debugging purposes and should not be used for normal operation. Warning: if an exception handler called through the original vector table tries to call any OS function or tries to use OS data structures the machine will crash (e.g. exec.Alert).

NoVBRMove/S

By default WHDLoad moves the VBR to a different memory location from $0. This has the advantage that the installed program cannot change the vector table, which increases security and stability of WHDLoad greatly. Some installed programs/slaves will not correctly work with a moved VBR. The reason for this is that the installed program may do some strange stuff which is not supported by a moved VBR or the author of the install was too lame to support a moved VBR. In such a case, this option must be set to prevent WHDLoad from moving the VBR.
Another feature of the moved VBR is that WHDLoad can check the keyboard each time an Autovector interrupt occurs. With this check WHDLoad is able to terminate the installed program independently from the work of installed program/slave if QuitKey/S or DebugKey/S is pressed (similarly the installed program can be interrupted when FreezeKey/S is pressed). The VBR moving feature requires at least a 68010 to work. On a 68000 this option has no effect, because the VBR is always at $0 and cannot be moved.

NTSC/S

If selected, WHDLoad will use an NTSC display (60Hz) for the installed program. On a PAL Amiga, the NTSC monitor driver must be installed in DEVS:Monitors/.

PAL/S

If selected, WHDLoad will use a PAL display (50Hz) for the installed program. On an NTSC Amiga, the PAL monitor driver must be installed in DEVS:Monitors/.

Preload/S

If this option is enabled, WHDLoad will load as many files and disk images as possible into memory (depending on how much memory is free) at startup. This increases performance when the installed program is running, because it avoids switching to the OS to load data directly from the harddisk. This option should always be enabled.

QuitKey/K/N

Sets the rawkey code to quit the program, this works only if the VBR is moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) or the slave itself does support it.

Slave

Name of the slave which should be used by WHDLoad. The slave contains the interface code which is required for communication between the installed program and WHDLoad.

SnoopAGA/S, SnoopECS/S, SnoopOCS/S

These options enables the Custom register Snoop feature of WHDLoad.

ReadDelay/K/N

This option specifies the time in 1/50ths of a second that WHDLoad will wait after it has loaded data from disks, and will also wait this time after PreLoad has finished. This solves problems with drives (e.g. CD drives) which want do something after reading (e.g. switching the motor off).

SplashDelay/K/N

This option specifies the time in 1/50 seconds that WHDLoad shows the information window at startup. If SplashDelay is smaller than ReadDelay/K/N it is ignored and the window is displayed using the time from ReadDelay/K/N. The window is displayed at least as long as Preload/S is working. If the option is set to 0 no window will be displayed.

WriteDelay/K/N

This option specifies the time in 1/50 seconds that WHDLoad will wait after writing anything physically to disk. It affects all resload_Save#? functions and the FileLog/S feature. This makes sense because filesystems will not usually write data immedately to disk. It takes some time (1..3 sec) until all structures of the filesystem have been successfully updated. The default value for WriteDelay is 150 which lets WHDLoad wait 3 seconds after each write to the harddisk. You can set this value to 0, but then you should never exit by a reset from the installed program because saved data may not be written correctly to disk.