Fast loader

From Wikipedia, the free encyclopedia

A fast loader is a software program for a home computer - most commonly, the Commodore 64 - that accelerates the speed of file loading from the floppy disk drive.

Contents

[edit] Background

Fast loaders came about because of a discrepancy between the actual speed at which floppy drives could transfer data and the speed that was provided by the operating system's default routines. This discrepancy was most pronounced on the Commodore VIC-20 and 64. While the earlier Commodore PET series had used an industry-standard IEEE-488 parallel bus, this was replaced with a custom serial bus on the VIC-20. The serial bus was intended to be nearly as fast as its predecessor, due to the use of the 6522 VIA as a hardware shift register on both the drive and computer. However, hardware bugs were discovered in the 6522 that prevented this function from working consistently. As a result, the KERNAL ROM routines were hastily rewritten to transfer a single bit at a time, using a slow software handshaking protocol. [1] Although the C64 replaced the 6522 VIA with two 6526 CIA chips, which did not suffer from this bug, Commodore chose to retain backward compatibility with VIC-20 peripherals at the expense of speed. Because of the transfer protocol, the Commodore 1540 and 1541 disk drives soon gained a reputation for extreme slowness.

[edit] Development

Soon after the C64's release, some astute programmers realized that Commodore's bit-banging serial KERNAL routines were unnecessarily sluggish. Since the CPU in the C64 ran at approximately the same speed as that in the 1541 disk drive, it was sufficient to synchronize only at the beginning of each byte, rather than at each individual bit. Moreover, this transfer method allowed two bits to be sent simultaneously, one over the standard DATA line and one over the CLK line (which was normally used to perform the handshaking). On the C64, this required very careful timing to avoid interference from interrupts and from the VIC-II graphics chip, which could "steal" CPU cycles. Some fast loaders disabled interrupts and blanked the screen for this reason. A fast loader would generally "wedge" itself into the LOAD vector at $0330, thus intercepting any calls to the KERNAL LOAD routine. Next, the fast loader would transfer the necessary code into the drive RAM and order its execution, then receive the file sent by the altered transfer code. Depending on the exact nature of the routines used, the loading speed could be improved by as much as a factor of five.

[edit] Commercial fast loaders

Various software companies released fast loaders for the C64, usually in cartridge form. Probably the most popular such cartridge was the Epyx FastLoad. Most fast loader cartridges also incorporated other features to increase ease of use. An on-board implementation of Commodore's DOS Wedge was included in most fast loader cartridges. Machine language monitors, disk editors, and various convenience commands for Commodore BASIC were also common additions. Some fast loader cartridges were very sophisticated, incorporating a reset button, "freeze" capabilities, and a simple onboard GUI. The Final Cartridge III was perhaps the most successful of this genre. A few commercial fast loaders, most notably CMD's JiffyDOS, were not cartridge-driven but instead replaced the KERNAL ROM in the C64 and the DOS ROM in the 1541. While these were more difficult to install, they offered greatly increased compatibility, being almost invisible to software running on the machine.

[edit] Type-in fast loaders

Several of the popular Commodore magazines published type-in fast loading software. In April 1985, COMPUTE! published TurboDisk, a fast loader that included C64 and VIC-20 versions. This program proved popular and was republished in the July 1985 issue of COMPUTE!'s Gazette. [2] [3] [4] It was printed yet again in August 1986, without the VIC-20 version, but with several accompanying utilities to relocate the program in memory and to create auto-booting software that took advantage of TurboDisk's speed. A Commodore 128 version was also included for those C128 users who still had 1541 disk drives. [5] [6] [7] [8] [9] [10] COMPUTE!'s Gazette also published several other utilities that speeded up C64-to-1541 communications, including Turbo Copy (a 4-minute full-disk copier) [11] [12], TurboSave (a utility that accelerated the speed of disk saves) [13], and Quick! (another fast loader) [14] [15]. RUN Magazine published Sizzle! in December 1987, an integrated package that included a relocatable fast loader with autoboot generation capability.