For the Commodore 64 & 128 Computers

Written by eBay's 94Bravo




Hard Drives




Editing SYSGEN



SCSI Adapter

Multiplexer Unit


Drive Case & Cables

The Wall

DOS Commands

Editing SYSGEN Disk

Editing the SYSGEN Disk:

To install a different drive into the Lt. Kernal system, you'll first need to select a SCSI embedded-controller drive and determine the drives':

  • Sectors/Track
  • Number of Heads
  • HIBYTE number of Cylinders
  • LOBYTE number of Cylinders

In order for the Lt. Kernal to understand what drive it is connected to, you may need to edit the SYSGEN floppy Disk and add hard drive parameter data (Don't be an idiot, make a working-copy of the SYSGEN disk and edit the Copy :). After the SYSGEN Disk has been modified, you'll need to install (or reinstall) this modified SYSGEN disk onto your new hard drive.  Once you've reinstalled SYSGEN, click Here to learn how to Configure the drive.

Think about This: In the section that described how the Host Adapter works, we learned that when power is first applied to the system, the Host Adapter uses its BOOT EPROM routines for Startup. One of the very first things that happens during startup is that some Data is fetched from the Hard Drive. Besides the serial number check, the system needs the drive parameters so it'll know where to read and write data! Didn't we forget something? If we have Edited the SYSGEN disk, the New parameters will still be on the floppy disk and Not on the Hard Drive (yet)? If you caught this, you win a prize! Yes, we are going to do this in a couple of steps. The First of these steps is that we need to EDIT the SYSGEN disk with the New drive parameters.

There are two ways to edit the SYSGEN disk:

  • Manually edit the floppy with a Sector editor program (Di-Sector, Phlash, etc.)
    • Use a C64 and 1541 drive
    • Manually edit and re-save to disk
      • (See below to learn What to edit)
  • Use a Custom editing program (EDITLTK2.SDA written by Pete Bergeron)
    • Allows you to easily edit both Serial Number and drive parameters
    • Uses default settings or predefined list of Seagate or Quantum drives
      • If your drive is not on predefined list, you can edit the list first, or (preferably) write your own new list containing all the drives you may want to use.
      • Pete's program also allows for manual entry of parameters (that's what I use)

Using the Custom program: If you're new to sector editing, lazy (me) or just rusty, Pete's program is Great! It's a menu-driven Basic program that will Read your SYSGEN Disk, tell you what's currently on it and allow you to make changes. Pete also created two SEQ files that contain a predefine list of drive specifications. If your drive is on that list, continue with editing. If not, you could simply edit his SEQ file and add your drive parameters. The program will then load that SEQ file and make your new parameters available for automatic insertion onto the disk. You also have the option of directly entering the parameters. I know that Pete was somewhat surprised to hear that his program is still being used, but if you have any questions, you can email him at info@freeducky.org. Pete's 'ltkedit2.sda' file contains all programs, instructions and complete Help files (see FILES page).

Manual Editing: If you use Pete's program or manually edit the SYSGEN disk, you'll be editing TRACK 18, SECTOR 18 of Version 7.1 or v7.2 SYSGEN floppy disk. Earlier versions of SYSGEN (e.g., v6.xx) are not discussed here, as nobody seems to have that early version and Pete's program is not compatible with DOS versions other than v7.1 and v7.2 (these are the newest software versions). The following procedure assumes you already know how to use a Sector editing program, so we will only discuss which Bytes are edited and why. HOW to edit is up to you.

The following list describes Track 18, Sector 18, starting at position ZERO (of the 256 byte string). The only bytes listed are those related to your Serial Number and drive parameters. Changing any other byte values can render your SYSGEN Disk inoperable, so it is strongly suggested that no other position values be changed. And, to keep things consistent with a sector editor, all Track and Sector position numbers are in HEX($). So, load T18, S18 with your favorite editor and look at the first $4D positions. You'll see that the first 8 Bytes are your Serial Number followed by Eight (8) groups of 8-Byte drive table cells:

  • $00 - $07 is your Serial Number
    • MUST Match Serial Number contained in Host Adapter EPROM!
    • Remember your Serial Number is in EPROM at $A-$13 AND $100A-$1013
    • ALL below are Drive parameters Only
    • (note the gap from $07 to $0E - Don't edit)
  • $0E - $15 SCSI Drive Zero parameters (1st drive)
    • If you only install ONE drive, this is the only area that needs editing
    • All other cells should be: 128,0,0,0,0,0,0,0
    • Manually set the Drive to SCSI address Zero
  • $16 - $1D Drive One parameters (2nd drive)
    • If you add a second drive here, set drive to SCSI address One
  • $1E - $25 Drive Two parameters (3rd drive)
    • If you add a third drive here, set drive to SCSI address Two, etc.
  • $26 - $2D Drive three parameters (4th drive), etc.
  • $2E - $35 Drive four parameters (5th drive), etc.
  • $36 - $3D Drive five parameters (6th drive), etc.
  • $3E - $45 Drive six parameters (7th drive), etc.
  • $46 - $4D Drive seven parameters (8th drive), etc.
  • (as above, ALL unedited cells Must be "128,0,0,0,0,0,0,0". During startup, this 'string' is how LK DOS knows there are No other drives attached)

If, for some reason, you want to use the Serial Number on your current SYSGEN Disk, you may need to change the Serial Number stored in the EPROM. The S/N is stored in Two locations on the EPROM; Addresses $A to $13 and $100A to $1013 (for C64 and C128 modes). So, don't forget the make all three S/Ns the same! (NOTE: Locations $12,$13 and $1012,$1013 of the EPROM are usually "00" and your S/N ends at $11 and $1011).

Now that we know Where to edit, let's look at what data goes in these 8-byte drive table cells. The following CELL chart shows each position, its purpose and the values of our ST1201N example (note the number of Heads, Sectors/Track and HiByte/LoByte Cylinders) If you wanted to add an additional ST1201N drive, you would use the same values at T18/S18, position $16 - $1D:


Byte Function


BIT 7="N" embedded controller, BIT 0-6= Pulse Width for 3100


Step Period




Number of Heads


Number of Cylinders - High Byte


Number of Cylinders - Low Byte


Write precomp Cylinders


unknown, but is ZERO on all (spare?)

8-Byte Drive Table Cell

Looking at the above chart, there are a couple of areas of special interest. First, I haven't found a drive where a Step Value other than Zero is required. Secondly, the 'Write Precomp Cylinders' is only a factor if you're trying to use an old non-embedded drive like a PCST225 where this number would be 128. Finally, position '0' will always be '128' with the odd exception of original Xetec 20MB drive, my favorite, the Miniscribe 8425S where this number would be 192 (slow).

Remember that if you edit the SYSGEN Disk to use one or more hard drives, you also need to physically set each hard drive to the proper SCSI address (via jumpers).

Once you have edited the correct drive-table cell(s), save your changes to the disk. This completes the SYSGEN Disk editing requirements. And, if you used Pete's program, you actually made the same changes to the same locations on Track 18, Sector 18. So, by either editing method, you have made a New Master SYSGEN disk, so making a copy of This disk would be wise.

NOTE: When making copies of the SYSGEN Disk, I suggest you use a whole-disk copy program and Not a 'file copier' program. The reason is that a whole-disk copier will copy the Disk Name, ID and all the files in the same order as the original SYSGEN, which will make is easier to compare the two disks.

Let's assume that you have added a new drive as the Only Hard Drive on your system. Before you perform a new SYSGEN, which is the next step, you may need or want to Format this drive. IF you already formatted the drive on your PC or Mac to better verify the drives' condition, that's fine and you can disregard the 'formatting' section below and go straight to the SYSGEN - Install page.

Technically, there is no reason to format a working drive! When you install LK DOS software onto the drive, the process will first erase the portion of the drive where LtK DOS will be written. Also, the area of the drive where your files will be stored has its own file-directory written during drive Configuration and Activation. The real purpose of formatting the drive is to remap any bad media.

I prefer to format LTK drives on a PC or Mac because I can better determine the condition of the drive as well as verify mapping out of bad media. Once you have performed a Low Level format with verification, it doesn't matter if you then partition the drive as a scratch disk or install other drivers (bootable, mountable, etc.). Just set the drive to a single partition (one logical drive), set the desired SCSI ID# (usually Jumpers on the Drive) and leave it at that. (No, you can't 'password' the drive!).  However, ... there is one reason I use the 'frm-clr.prg' program...

Formatting your New Drive:

Formatting a drive on the Lt. Kernal is done differently from the way it's done on a PC or Mac. If you are using a 20 Meg Miniscribe (the drive which was originally supplied by Xetec), you can use the included LTK-format program (frm-clr.prg).

Note: There is one reason to use the 'frm-clr.prg' program on Drives other than on the MiniScribe 8425S 20MB!  First, this Format & Clear program works on many other drives.  In fact, if you use this program on a drive you have never tried before, and it works, it means you will Not have any problems using this drive with the Lt. Kernal!  The reason is that the first part of the program sends a regular SCSI FORMAT Command to the drive, which works on most drives.  However, the second part of the program 'Clears' the area on the drives that will later store LtK DOS.  It is in this second part that fewer drives will properly respond, indicating that you won't get past the very first part of a SYSGEN!  So, you might think of running this program as a diagnostic on un-tried drives.

If you use this program, you'll need to use the following procedure:

  • Ensure that the Commodore and external drive enclosure are turned off
  • Connect the Host Adapter to the Commodore and make sure
    • HIRAM & CAEC are properly connected if using a C64, or
    • Daughterboard is installed properly and HIRAM is connected if using a C128
    • (see Host Adapter installation article)
  • Disconnect the SCSI Data cable between the Host Adapter and External Drive enclosure
  • Power up the Commodore. Wait for time-out
    • With a Host Adapter attached to the Commodore and no hard drive connected, the system will look for the drive. After about 60 seconds, the system times-out and the Commodore will bootup to its normal startup screen.
  • Once the Commodore is at the startup screen, re-connect the SCSI Data cable between the Host Adapter and the hard drive and apply power to the drive enclosure.
  • NOW, load and run the LTK Format program ("frm-clr.prg")
    • Run the program by entering SYS 8192
      • Gee, I wonder what this program could do if it were modified? Hmm? :)
  • When formatting is completed, the Drive is ready for SYSGEN installation.
  • If you are wondering, yes, the above procedure is the same for doing a SYSGEN but without running 'frm-clr.prg'.

Remember that doing a low-level format on ANY drive is easier to perform on your PC or Mac even if you use a Miniscribe. When the format operation is complete, refer to the SYSGEN sections for DOS installation and information about the DOS commands.

Home | Host Adapter | Sysgen | Drives | Files

Lt. Kernal Data Archive 2003-2008 / Contact Author for Inquires