WHDLoad
Encyclopedia
WHDLoad is a program for Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

 which has been created to easily install programs to a hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 (such as demos or games), allowing for better compatibility of Amiga programs, which can sometimes be difficult to run or emulate otherwise due to the widely varying hardware setups of Amigas across its history. Its use basically circumvents the Operating System of the Amiga for greater compatibility and preserves the original program as a non-degradable archive (unlike magnetic media).

WHDLoad allows the installed floppy disk
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...

 image to autostart simply clicking on an icon related to it.

Two special parts are required, each one especially written for the client program: To install media, it must be read from the original disk and written to an image file on the hard drive by the "Imager". Then the installed program can be run from a virtual disk drive with the "Slave" interface.

Slave interface

The "Slave" interface allows interaction between the program and WHDLoad, and co-ordinates the reading and writing of files. In this manner you may be able to run or emulate programs that traditionally incompatible with common emulators such as WinFellow, or WinUAE. Some may find the use of WHDLoad to be easier than trying to figure out the exact configuration for the aforementioned emulators as well.

For more detailed information (FAQs and manuals), as well as examples of source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

, visit WHDLoad's official website.

History

The reason for this loader is the large number of computer games for the Amiga that don't properly interact with the AmigaOS
AmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

 operating system, but instead run directly on the Amiga hardware, making assumptions about specific control registers, memory locations, etc, and the avoidance of loading times and disk swaps. The hardware of newer Amiga models had been greatly revised, causing these assumptions to break when trying to run the same games on newer hardware, and vice versa with newer games on older hardware.

The first public release of WHDLoad was on September 5, 1996.

Features

WHDLoad takes over the entire operating system, but quitting the game restores the system back into its normal working state.

WHDLoad games are stored on the AmigaOS file system as disk image
Disk image
A disk image is a single file or storage device containing the complete contents and structure representing a data storage medium or device, such as a hard drive, tape drive, floppy disk, CD/DVD/BD, or USB flash drive, although an image of an optical disc may be referred to as an optical disc image...

s, relying on driver files known as "WHDLoad slaves" to work. These slave files are freely available from the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

 (as Freeware
Freeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...

), but the games themselves have to be acquired separately, to prevent software piracy. Additionally, many fans have made their own freeware games, which are also freely, and legally, available.

How WHDLoad works

The WHDLoad "Slave" interface is integrated into the OS in that you can double click a program icon to run the program at any time. When the user executes the program, by clicking a stored image icon, the AmigaOS operating system loads the WHDLoad executable and starts it. Then the loader checks the software and hardware environment, loads and checks the Slave interface required for that chosen demo or game and allocates required memory for the installed program. If the Preload feature is enabled into the requester page of WHDLoad, then the program attempts to load disk images and files into RAM (insofar as free memory is available).

At this point WHDLoad performs its main task of switching off the AmigaOS operating system, disables multitasking
Computer multitasking
In computing, multitasking is a method where multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for...

and interrupts, and copies memory regions which are used by AmigaOS and required by the installed program to an unused place until the AmigaOS is needed again.

WHDLoad also degrades the graphics hardware to OCS on original Amiga machines (this function actually can work also on emulated Amigas, but only on newer versions of WinUAE which recognizes WHDLoad and preserves its interrupts), then WHDLoad initializes all hardware with defined values and jumps into the Slave interface required for the program in question.

The Slave interface loads the main executable of the installed program by calling a WHDLoad function (resload_DiskLoad or resload_LoadFile), then patches the main executable (so that the loaded program will be capable of loading its data stored into the hard disk via the Slave, in order to fix compatibility problems, and to enable an exit from the program) and calls the main executable.

At this point the program that has been installed can perform the task for which it has been written, loading its data as it would from a real floppy disk.

Users can break the execution of the loaded program by way of a "Quit" key (usually F10). When this action is performed, then the Slave interface returns to WHDLoad by calling a resload_Abort internal function.

The OS will be restored with all hardware registers and original display. The memory and all allocated resources are left free for any further usage.

Requirements

A standard Amiga 1200 without any extra memory, will only work with a very limited amount of games. You will get far with e.g. a Blizzard 1220, which has 4 MB RAM. Installation of such card is inserted in the trapdoor under the Amiga 1200. Memory expansion cards can be bought cheap from e.g. Ebay. 16 MB RAM allow to run nearly all client programs with very few exceptions. Newer memory expansion cards are also made, with room for much more memory for a cheap price.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK