PINHEAD ------- Version 2.1 Shareware by Charles F. Johnson Copyright ½ 1989,90,92 Little Green Footballs Software All Rights Reserved. Release Date: Sunday, January 26, 1992 Introduction ------------ PinHead is a *very* tiny program (it uses less than 1K when installed!) that should be run from your AUTO folder. PinHead will drastically reduce the amount of time it takes to boot your computer, especially if you have several AUTO programs and desk accessories installed. Every program that runs after PinHead will load into the computer faster than you ever thought possible! And this speedup is not only evident at bootup time; programs will load much faster even when they are run from the GEM desktop or a shell such as CodeHead Software's HotWire. PinHead gives you a lot of bang for your memory buck! PinHead 2.1 works with all ROM versions of TOS. There is no speed improvement in version 2.1 over earlier versions; the only new feature is compatibility with all versions of TOS. Even though versions of TOS equal to or later than 1.4 contain a built-in "fastload" feature, I decided to make PinHead support these TOS versions as well, because in some cases PinHead's fastload is more compatible with improperly written ST applications. (Two very popular programs that don't work correctly with the TOS fastload, but do work with PinHead, are ARC.TTP [the original version] and the GFA Basic 2.x Interpreter. Desk accessories may also work better with PinHead, because of its default memory clear feature.) If You've Already Read This Document ------------------------------------ ...then skip ahead to the section at the end titled "New Stuff." Here you will find the revision history of PinHead, with any new features (hopefully) clearly described. If you haven't read this document before, please take a few minutes to read it through. Your enjoyment of PinHead will be much increased if you do; there's information here that will help you through the most common trouble spots, to the fastest ST bootup you've ever seen. Yow! Yet Another Shareware Plea -------------------------- The first three versions of PinHead (1.0, 1.1/1.1a, and 1.2) were released as freeware. However the response to PinHead on the major networks has been so enormous that I've found myself spending more and more time answering questions, looking for solutions, working on the code and the documentation, etc. Therefore, starting with PinHead 1.3, PinHead and the accompanying documentation are now being distributed as shareware...which means that if you use and enjoy the program, you're expected to pay a small registration fee. (After you've used it a few times I suspect you may find it difficult to do without!) I'm asking only $15 for PinHead. Please pay the registration fee if you end up using PinHead regularly; if there's no shareware response to PinHead, I'll be unable to keep enhancing and supporting the program. If you decide to continue using PinHead, please send a check or money order for $15.00 to: Charles F. Johnson P.O. Box 1250 Pacific Palisades, CA 90272 and indicate on your check that this is a registration payment for PinHead. This will enable me to enter your name properly in my shareware data base. If you have a specific question to ask about PinHead, the best way is to contact me through one of the following online services: GEnie: C.F.JOHNSON CIS: 76004,2232 Delphi: CFJ Installation ------------ For best results, PinHead should be as close to the beginning of your AUTO folder programs as possible. If you already have an AUTO folder with several programs in it, you can use CodeHead Software's "AUTO Organizer" (one of the programs on our 'CodeHead Utilities' disk) to make sure PinHead runs before most of the other AUTO programs. If you don't yet own a copy of CodeHead Utilities, you should make a backup copy of your AUTO folder, delete the original folder on your bootup disk, create a new folder named AUTO, and copy all the programs back, in the order in which you want them to run. If you have a hard disk driver in your AUTO folder, it should run before PinHead. If you use the public domain program FATSPEED (which speeds up the directory search routines in GEMDOS, and is not needed in TOS versions after 1.0), this too should run before PinHead in the AUTO folder. Why? Well, FATSPEED insists on being the very first thing in the trap #1 vector; and PinHead also needs to intercept this vector. But every other program designed for AUTO folder usage can run after PinHead...which is just the way you want it. When you boot up with PinHead active, your AUTO folder programs and accessories will just FLY across the screen, especially if you have a hard disk. When PinHead first runs, it tries to read a file called PINHEAD.DAT in the root directory of the boot drive. See below in the section titled "Configuring PinHead" for details on how to "custom tailor" PinHead for each program you run, to get the most compatible system possible. Disabling PinHead for One Program --------------------------------- It should be a very rare occurrence to find a program that needs to have PinHead disabled in order to run. However, if a certain program does act strangely or crashes with PinHead active, you can turn off the "fastload" feature before running that program, with a special "hot key" sequence. To disable PinHead, hold down the Alternate, Left Shift, and Control keys while you type '0' (zero) on the numeric keypad, before running the program. This will disable PinHead, but only for the very next program you run. After quitting that program, PinHead will be active again. Turning PinHead On and Off -------------------------- PinHead also lets you turn it "on" and "off." This is different from the disabling method explained above; when you turn PinHead off, it will be disabled until you turn it back on, not just for the very next program that runs. To turn PinHead off, hold down the Alternate, Left Shift, and Control keys and type '-' (minus) on the numeric keypad. To turn PinHead on, hold Alternate, SHift, and Control, and type '+' (plus) on the keypad. This feature is in PinHead in case you find yourself running several programs in a row that don't work properly when PinHead is active. In that case, it will be easier to just turn PinHead off for the duration, and re-enable it when you're through with the "problem" programs. See "Configuring PinHead" below for a way to automatically tell PinHead when to disable itself. Configuring PinHead (the PINHEAD.DAT file) ------------------------------------------ Since it's hard sometimes to remember when you're supposed to disable PinHead to run a certain program, and a system crash seems like a rather harsh penalty to pay for a moment of forgetfulness, PinHead has a configuration option which lets you tell it to automatically disable itself when certain programs are run. You can also tell PinHead to clear a little bit of extra memory for certain programs; this enables "problem" programs to be fastloaded. As mentioned above, you can create a special "configuration file" which will be read when PinHead is first run. This file should be called PINHEAD.DAT, and kept in the root directory of your boot disk. PINHEAD.DAT is a standard ASCII text file which can be created and edited with just about any ST word processor or text editor (as long as your editor has an option to 'Save as ASCII'). This file contains information about programs that need "special treatment" in order to live harmoniously in the same system with PinHead. The PINHEAD.DAT file must follow some simple rules of organization to be properly used by PinHead. All lines should be flush with the left screen margin...do not insert spaces from the left. The first line of the file should contain the letters 'PH13', followed by Return. This is the special identifier that tells PinHead this is a valid PINHEAD.DAT file. PLEASE NOTE: The 'PH13' identifier should be used even though you may not be running PinHead 1.3. It has nothing to do with the current version number of PinHead itself; it simply signifies that this feature was added in version 1.3. On the lines following the identifier, you can list each program or desk accessory that needs to be specially treated. All filenames should be in upper case, with no path information -- only the name of the file itself. PinHead allows you to list up to 32 programs in the PINHEAD.DAT file. If a line contains only a program filename, followed by a Return, PinHead assumes this to mean that it should deactivate itself during the loading of that program. This frees you from having to remember to disable PinHead manually. If a line contains a program filename followed by one or more spaces, followed by a number, PinHead assumes this number to be the number of kilobytes of "extra" memory it should clear when that program runs. (One "K" or kilobyte is 1024 bytes.) By experimenting with different sizes of "extra" memory, you should be able to "fastload" many programs that would otherwise be incompatible with PinHead. (The same programs that are incompatible with TOS 1.4's fastload feature.) For example, the GFA Basic Interpreter apparently needs only 8K of "extra" memory cleared when it runs in order to be fastloaded like any other program. (See "How PinHead Works" for more details about clearing this extra memory.) Here's a sample PINHEAD.DAT file: PH13 <---------------\ GFABASIC.PRG 8 <------\ \ USCRIPT.PRG <---\ \ \ ARC.TTP 16 <-- \ \ \ TURBOST.ACC | \ \ Mandatory "identifier" (must be 1st line). | \ \ ^ | \ Clear 8K of extra memory when GFABASIC.PRG runs. | \ \ | \ Disable PinHead when USCRIPT.PRG runs. \ \ \ Clear 16K of extra memory when ARC.TTP runs. \ Disable PinHead when the Turbo ST desk accessory loads. Please note that unless a program's name is listed in the PINHEAD.DAT file with a number after it, versions 1.4 and higher of PinHead will not clear any "extra" memory at all when the program runs. This differs from PinHead 1.2 -- version 1.2 would always clear an arbitrary 16K of extra memory for all programs. How PinHead Works ----------------- PinHead is based on a public domain program called NULLFILL, originally written by Leo de Wit, and circulated on the Bitnet system. When it appeared on GEnie, I got curious about it and took a look. The original program worked only with TOS 1.0, which didn't do me much good since I have a Mega ST4 with TOS 1.2. I added compatibility with TOS 1.2 and 1.4 (which turned out to involve a bit more than just changing a few addresses!), and had it check to see which version of the ROMs it was running under. I also added a "hot key disable" feature, optimized the code to work almost twice as fast, reduced its memory usage by quite a bit, and made it compatible with the popular FATSPEED program (the original stopped working if FATSPEED was installed). Then I found a way to make it even more compatible with certain programs (programs like Microsoft Write, the GFA Basic Interpreter, and ARC.TTP) than the new "fastload" feature in TOS 1.4. Leo, if you see this, I hope you don't mind what I've done with your idea! So how does it work? Ordinarily, when TOS runs a program all free memory (from the beginning of the program to the end of the TPA, or Transient Program Area) is cleared. PinHead sits and watches for that memory clearing routine to occur, and when it does, substitutes a much faster clearing routine. In addition to being faster, the PinHead routine only clears one (usually small) part of the program's memory area (