The Star Commander, Version 0.83

This is still not the final release of The Star Commander. Look out for further releases. Please, report bugs and ideas to the author because Version 1.0 is supposed be the final release.

Because it took a significant amount of time to create this documentation, you are also expected to take the time to read it thoroughly. For a list of important URL's, where you can find more information about the Commander and the cables it uses, see the "Related Net resources" section.

If you're using the Commander for the first time then read the "Usage" section. When having problems, read the "Troubleshooting" and "Known problems and limitations" sections, as well. If your problem is not covered there then read the "Reporting problems" section on how a proper report should look like. Unfortunately, the author doesn't have much time for this project anymore, and especially few time to answer questions. Therefore, reports about any release other than the latest public or beta release, reports covered by the documentation and improper reports may be deleted without any reply! YOU HAVE BEEN WARNED!

Note: This documentation is meant to be viewed with a monospace font, in IBM code page 437 (US default for DOS). With a proportional font, tables and ASCII art drawings will fall apart; with other code pages, including but not limited to DOS 85x, Windows 125x and ISO 8859-x, national characters will look strange. You may want to view this file from the Commander itself. Obviously, this paragraph does not apply to the HTML version of this document.

0. Table of contents

  1. Introduction

  2. Copyright and license

  3. System requirements

  4. Installation

  5. Usage

  6. Batch processing

  7. Advantages

  8. Connecting a Commodore drive to your PC

  9. The X1541-series interfaces

  10. Technical background information

  11. Troubleshooting

  12. Known problems and limitations

  13. Reporting problems

  14. Bugs fixed since the previous release

  15. Other changes since the previous release

  16. Coming soon

  17. Related Net resources

  18. Thanks to

  19. The author

1. Introduction

This software handles the image files of the C64 Software Emulator (C64S, © by Miha Peternel and Seattle Lab, 1994-1997), the CCS64 emulator (© by Per Håkan Sundell, 1996-2009), Personal C64 (PC64, © by Wolfgang Lorenz, 1994-1997) and VICE (© by the VICE Team, 1993-2009). It copies files and disks between the PC and external Commodore 1541, 1570, 1571 and 1581 drives and converts several Commodore archive formats.

It is similar to The Norton Commander (NC, © by Symantec Inc., 1986-1995) and The Volkov Commander (VC, © by Vsevolod V. Volkov, 1991-2000) so it will surely be easy to use. However, before you start using it, please, read this documentation and the online help carefully, for the differences from the other Commanders, the description of the X1541-series interfaces and other details.

2. Copyright and license

The Star Commander is copyright © by Joe Forster/STA, 1994-2010.

The Commander is giftware. You may use the unregistered version as long as you wish and you may give it to any individual, provided that it's in the original, unmodified archive. It is highly recommended that you download distribution packages from the homepage or other distribution sites listed later in this documentation. If you get a package from somewhere else then make sure that the package has the author's authentic verification stamped on it.

The unregistered version is in no way crippled, there are no nag screens or delays in it and – except for alpha and beta releases – it never expires. However, if you are frequently using the Commander and you are satisfied with it then you are encouraged to register it. Please, read the file REGISTER.TXT for more details. You must not distribute the personal keyfile you receive when you register.

The source of the Commander is distributed under a license that is similar to the GNU Public License but is more restrictive, for the protection of Commander users and the author. You may distribute only those modified versions or derived softwares that satisfy all restrictions in the license. When you distribute the Commander, modified versions of it or softwares derived from it, you may not ask for money above the normal fee of the distribution media itself. Furthermore, you may not publish the Commander or its source on floppy disks, CD/DVD-ROM's, FTP sites, WWW pages or any other distribution media, include it in a software compilation or bundle it with other software or hardware without prior permission of the author.

Note that public distribution of the beta releases of the Commander is prohibited. The only place where you can and should be able to find them is the homepage.

The Commander is provided "as is", without a warranty of any kind. You are using it at your own risk. The author is not liable for any damage or data loss caused by the software.

The Commander supports the following X1541-series cables:

If you produce and sell cables or adaptors that are compatible with these cables – except for the original X1541 cable –, you must give credits to the respective copyright owner or copyright owners. If your adaptors are built onto printed circuit boards then you must also make the complete layout available in a format and resolution that is suitable for high quality reproduction so that people may build the adaptors themselves, if they want.

This common license for the cables is an agreement among the cable authors. However, because the author of the original X1541 cable couldn't be contacted for an inquiry, this license does not apply to the original X1541 cable.

3. System requirements

You must have an IBM-compatible PC with the following hardware and software to run the Commander:

Instead of MS-DOS, DOS clones such as DR-DOS, FreeDOS or Caldera OpenDOS should also work fine, although compatibility with these operating systems hasn't been thoroughly tested. If you have access to any of these, information would be welcome!

You may try using the Commander under GNU/Linux dosemu or in the DOS shell of OS/2 or Windows 3.x/95/98/ME/NT4/2000/XP/2003. It has also been reported that the Commander runs, under VirtualPC, on a Macintosh, as well. For more information on using the Commander under an operating system other than DOS, see the "Usage" section. However, remember that, even if some extra functionality was implemented to make the Commander run better under multi-tasking systems, you are expected to run it under real DOS, to get the best results.

4. Installation

You can install the Commander by simply decompressing the distribution package using PKZIP 2.xx, Info-ZIP's unzip 5.xx or any other ZIP-compatible software. You don't need all the files to run the Commander, most of them are only for your comfort.

Required:

Recommended:

Optional:

In the distribution package of a beta release of the Commander, some files may be missing. Get those files from the distribution package of the previous public release, which is available at the homepage.

5. Usage

If you already registered the Commander and your personal keyfile is called "sc.reg" then, please, rename it to "sc.key" so that it is again recognized!

Please, note that there's no documentation on how to use the Commander. However, the context-sensitive online help contains the information on how to use each function; press F1 to pop it up. If you're using the Commander for the first time then read the online help carefully, to find out what the Commander is capable of. You may want to use the included help printer software to save the online help into a plain text file or send to your printer, to read it later. Run the help printer software without parameters to see its command line syntax.

If you would like to access Commodore drives then always switch off your Commodore drive and your PC before plugging or unplugging the cables that connect them. When using an optional parallel cable, make sure that the parallel cable is never connected to both machines alone, only along with the serial cable. If you don't follow these guidelines, you may severely damage your equipment!

If you did a minimum installation then start the software with SCMAIN.EXE. If you also have the loader then start the software with SC.EXE. They accept the following optional command line parameters:

SC [-|/<options...>] [<startup command>]

or

SCMAIN [-|/<options...>]

Options are case-insensitive and have to start with either a hyphen or a slash; in the list below, slashes are used. Valid options are the following:

With the exception of "/cmd", these options are available for the external setup program, SCSETUP.EXE, as well.

The startup command is a DOS command that is executed before the Commander starts up. Note that the main executable, SCMAIN.EXE, itself is unable to execute startup commands; only the loader, SC.EXE, is.

Operating system-specific extra requirements for running the Commander and accessing Commodore drives are the following:

General guidelines on accessing Commodore drives under a multi-tasking operating system with the Commander are the following:

  1. First, make sure that the same setup works properly under real DOS. If you don't have DOS, get a copy of FreeDOS from http://www.freedos.org. If you have no FAT partition, to install DOS onto, on your hard disk, use a boot floppy disk instead.

  2. In the "Transfer options" menu, set "Transfer mode" to "Warp".

  3. Disable "Manual timeouts".

  4. Set "Async transfer" to "Auto" or "Always", otherwise you will get nothing else than timeouts or lockups.

  5. Check if "Serial interface" and – if using a parallel cable, as well – "Parallel interface" show the correct parallel port.

    Under GNU/Linux dosemu, the standard "LPTx" ports are not available. Enter the address(es) of your parallel port(s) into the custom parallel port slot(s).

    Under Windows NT4/2000/XP/2003, even if you have only one parallel port, it is not necessarily called "LPT1" in the DOS shell. To make sure that the Commander tries to access the appropriate parallel port(s), you might be better off with throwing away the three standard parallel port slots and entering the address(es) of your parallel port(s) into the custom parallel port slot(s).

  6. Press the "Recalibrate" button, to have the "Delay value" recalculated for operation under the new environment. Or, even better, set "Delay value" to 0, to always use an autodetected delay value.

  7. Under Windows NT4/2000/XP/2003, your best choice is using the OpenCBM driver. First, make sure that cbm4win 0.4.0 or above is installed and is working properly. Then set "Serial cable" to "OpenCBM".

  8. Don't expect miracles! Some of the communication between the PC and the Commodore drive is done with the standard IEC protocol which is not designed for multi-tasking systems. You shouldn't be surprised at occasional timeouts or lockups at the beginning or the end of disk operations, especially if your system is heavily loaded.

    For this reason, it is recommended that you copy disks only and avoid copying files.

To configure the Commander for your needs, enter the "Configuration..." item of the "Options" menu and go through all options in all configuration screens, reading the corresponding paragraph of the online help on your way. Proper configuration is especially important if you want to access a Commodore drive. Go to the main configuration screen, enter the "Transfer options" menu and set, at least, the following options:

Under certain circumstances, the usage of the parallel ports may cause strange behavior:

If you specify the "/nolpt" option upon startup, all these problems should be gone (although you won't be able to use Commodore drives either). Then you can enter the configuration menus and change the settings as recommended above. If the "/nolpt" option doesn't solve your problems then their reason is obviously not the way the Commander accesses the parallel ports.

To use the built-in drive of a C128D or an SX64 or to use the same Commodore drive from a Commodore machine and a PC, you must execute a POKE command on the Commodore machine:

This decouples the Commodore machine from the common serial bus, by switching the CLK line to high. Every time you access the drive from the Commodore machine, you'll have to issue this command again afterwards. Note that the Commander decouples the PC automatically from the serial bus one second after having completed a disk operation.

If you have problems with accessing Commodore drives from your PC, you can find more solutions in the "Troubleshooting" section of this documentation.

If you are experiencing screen-related problems or lockups upon startup, even under real DOS with the "/nolpt" option specified, try one or more of the following:

If you would like to use long file names with the Commander then be advised that they are not available under all operating systems:

You can download such softwares from the LFN emulators page. If you can't make the Commander access real long file names under your operating system then store your files in containers that do support long file names: TAR and ZIP archives are widely used, their archiver softwares are available for many platforms and the Commander supports them, too. Thus, you can exchange long file names between the Commander and other platforms and/or applications.

To be able to handle LHA and ZIP archives, the Commander needs the following external archiver softwares that are available free of charge:

You can download these from the useful external softwares page. Do not use:

Apart from these, the Commander relies on no external software: all other file formats and conversions are handled internally. Also, you shouldn't worry about long file names copied into or extracted from archives: the Commander will take care of them, even if the external archiver software doesn't.

6. Batch processing

Normally, the Commander is used in interactive mode. However, if you'd like to automatically copy, convert or archive files or disks, you can build scripts that the Commander executes with as few user interaction as possible. Please, note that the concept of the Commander has not been designed for non-interactive use, therefore, in many cases, user input will be necessary to continue the current operation. If you are annoyed about certain error messages, confirmation prompts or input dialogs, contact the author with your suggestions on how to get rid of them.

This section assumes that you already know how the Commander works. If you don't, spend more time in the interactive environment and read the online help, to get familiar with the Commander's features.

Important notes about the current status of the batch processing capability:

Below, batch commands are enclosed into quotation marks. Parameters are enclosed into <...> angle brackets, optional parameters are enclosed into [...] square brackets. Omit the quotation marks and the brackets when specifying actual commands. Separate parameters from the command and each other with any number of spaces.

There are two ways of executing commands:

You can execute commands via both SC.EXE, the loader, and SCMAIN.EXE, the main executable.

In both modes, you can use environment variables with the syntax of "%%<environment variable name>%". This block is replaced with the exact value of the environment variable specified, before processing the command. The replacement takes place only once, it can't be used recursively.

Below is the list of valid script commands and their syntax. Commands are case insensitive.

To learn what exactly Commander functions do, read the corresponding page of the online help. For notes on non-trivial behavior and tricks, see the examples below.

The first group of batch commands contains the main Commander functions that you can access with the function keys or from the pull-down menu:

The second group of batch commands contains the functions found in the user menu:

The third group consists of special commands:

Parameters are case sensitive unless otherwise noted. DOS path and file names are always ASCII; Commodore path and file names are either ASCII or PETSCII, whichever the format of the image or archive, that contains the file, is based on. PETSCII file names are converted from ASCII, as specified on the command line, to PETSCII.

Parameter syntax is the following:

To specify file names or other strings that contain spaces or other invalid characters, enclose them into quotation marks. Also, to specify empty strings, use two quotation marks without anything between them. All quotation marks are removed from batch commands and their parameters before processing them.

To specify special PETSCII characters in Commodore file and path names, use "%xy" symbols where "xy" is the hexadecimal PETSCII code of the character. This means that the "%" (percent) character must always be written as "%25" in Commodore file names. Also, as all literal quotation marks are removed from strings, you have to specify them with "%22".

Variables are, actually, configuration settings. You cannot define your own variables. Variable names, variable values and index names are all case insensitive and are similar to those displayed in the interactive environment.

Variables can be of type boolean, integer, enumeration, string or integer array. The syntax for boolean, integer and string values is described above. For enumeration variables, the value assigned to them must be chosen from the list of valid values. For integer arrays, the syntax for an array element is "<array>[<index>]" (here the [...] square brackets are part of the syntax!), where <index> is of type enumeration.

In the alphabetical list of valid variables, the first part is the variable name. It is followed by the name of the corresponding configuration setting in the interactive environment or, if there is none, a short description of the variable. Then comes the variable type and the range of valid variable and index values. At the end, you will find comments, if any.

The first group of variables reflects the global configuration options:

The second group of variables consists of automatic replies for confirmation messages:

The format specification file of the "list" command, similarly to the format parameter of the "printf" instruction in the C language, may contain normal characters, special characters and field specifiers. Additionally, you may use conditional blocks. Carriage returns and line feeds are completely ignored throughout the file so you may wrap your lines anywhere.

Special characters stand for and are replaced by a normal character. They have the following syntax:

\<specchar>

Note that you have to specify "\\" or "\$5C" to display the "\" character.

<specchar>:

Field specifiers are replaced by a string taken from the data related to the current container file – image or archive file – or the current Commodore file file inside it. When scanning field specifiers, invalid characters – ones not listed below – are ignored silently. Field specifiers have the following syntax:

%[<width>][<flags>]<type>

Note that you have to specify "%%" or "\$25" to display the "%" character.

<width>:

With these, you can first cut the strings into the width needed and then pad them with spaces. Don't use numbers, indicated by N, higher than 255. Use width specifiers in the order they're grouped below – which is not the same as the order they're applied – and don't use any from the same group twice, otherwise the result is undefined. The first group of width specifiers is the following:

The second group of width specifiers is the following:

<flags>:

<type>:

Unlike other parts of the format specifier, most types are case-sensitive. The lowercase version usually stands for the default or short form; the uppercase version for the long form. Types related to containers are the following:

Types related to Commodore files inside the containers are the following:

Data inside conditional blocks is used for formatting and the resulting text is output only if a condition is met. You may nest conditional blocks into each other, thus creating an "and" relation. For an "or" relation, you have to create two blocks, with different conditions but the same contents. The syntax of conditional blocks is the following:

%?<condition>...%?!

Note that the symbol "%?!" ends the innermost conditional block.

<condition>:

The following examples assume that you are using single command mode, launching SC.EXE, the loader. If you want to use these commands in script mode then remove the "sc /cmd" prefix and put them into a script file.

Examples for copying, moving, renaming and converting files and directories:

  1. Extract all files, whose name contains "hiscore", from a disk image onto a Commodore disk in drive #8:

    sc /cmd copy disk:C:\DISKS\diskname.d64\*hiscore* 8:

    Note that the leading asterisk wildcard is used like under Unix; unlike on real Commodore equipment, this will not select all the files.

  2. Extract all files, whose name contains the pi character, from a disk image into DOS files in the current directory:

    sc /cmd copy disk:C:\DISKS\diskname.d64\*%FF* .\

    Note that the special PETSCII character is specified with its hexadecimal code.

    Also, you must append the backslash to the destination, otherwise all the source files will be copied to a file named "." in the source disk image.

  3. Compress all the files in a disk image into an LHA archive:

    sc /cmd copy disk:C:\DISKS\diskname.d64\* lha:C:\LHAS\lhaname.lzh

  4. Convert all the files in a disk image into PC64 file images:

    sc /cmd copy disk:C:\DISKS\diskname.d64\* file:C:\PC64\

  5. Rename all the files in a tape image, changing the first character of the file name from "a" to "b":

    sc /cmd move tape:C:\TAPES\tapename.t64\a* b*

  6. Move all files, whose name starts with "a", from a tape image into DOS files in the current directory, changing the first character of their names to "b" on the way:

    sc /cmd move tape:C:\TAPES\tapename.t64\a* .\b*

    Again, the destination contains a backslash but there is no image type prefix. This tells the Commander that the destination is a DOS directory.

  7. Move a complete DOS directory structure, recursively, onto another drive:

    sc /cmd move C:\GAMES D:\

Examples for deleting files and directories:

  1. Delete all sequential files from a Lynx archive:

    sc /cmd delete lynx:C:\LYNXES\lynxname.lnx\*=s

  2. Delete a complete DOS directory structure recursively:

    sc /cmd delete C:\TEMP

Examples for copying and converting disks:

  1. Copy a double-sided 1571 disk image onto a Commodore disk in drive #10:

    sc /cmd diskcopy disk:C:\DISKS\twosides.d71 0:

  2. Convert a few 1541 disk images into diskpacked ZipCode archives, keeping the names of the source disks:

    sc /cmd diskcopy disk:C:\DISKS\*.d64 diskzip:C:\ZIPDISKS\

    Note that you have to append a backslash to the destination, otherwise the source disks will all be copied into a diskpacked ZipCode archive named "1!zipdisks" in the root directory of drive C:.

Examples for creating directories:

  1. Create a DOS directory:

    sc /cmd makedir C:\GAMES\NEWGAMES\TEMP

    This will not only create the "TEMP" directory but, also, its parent directories if they don't exist yet.

  2. Create a directory inside a 1581 disk image:

    sc /cmd makedir Disk:subdirs.d81\games\newgames

    Note that if the "games" directory doesn't exist, it will not be created. Instead, "newgames" will be created in the root directory of the disk image, without any warning.

Examples for creating disk and tape images:

  1. Create a GEOS-compatible 1581 disk image, without an error info block:

    sc /cmd makedisk newdisk "New GEOS disk,xx" 1581 No Yes

    Note that the label is enclosed into quotation marks because it contains spaces.

  2. Create a tape image with lots of entries:

    sc /cmd maketape newtape New%20tape 500

    Note that the label does not have to be enclosed into quotation marks because it contains no literal spaces.

Example for editing disks:

  1. View a diskpacked ZipCode archive, at sector level, in the disk editor:

    sc /cmd diskedit C:\ZIPDISKS\!1disk

Examples for changing file attributes:

  1. Clear the read-only, hidden and system attributes and set the archive attribute of all files in a directory structure:

    sc /cmd attrib C:\COPYOFCD r- h- s- a+

    Note that if the specified file name designates a directory then it is traversed recursively and all files inside it and its subdirectories are processed.

  2. Correct the date stamp of an MS-DOS 5.00 system file to 9th April 1991, 5:00:00 AM:

    sc /cmd attrib C:\IO.SYS d1991-4-9 t5

    Note that the value 1991 is neither a valid month nor a valid day so this date stamp is, obviously, in the ISO format. You should keep the century in the year part of ISO formatted dates so that they can be discriminated from dates adhering to the regional settings of the operating system.

  3. Make all files in a disk image invisible by changing their attributes to "completely deleted" (not write-protected, splat files of DEL type):

    sc /cmd disk:C:\DISKS\hide_all.d64\* c- w- x

Examples for viewing and editing files:

  1. View a Commodore file called "my file" in the subdirectory of a non-GEOS 1581 disk image:

    sc /cmd view disk:subdirs.d81\subdir1\subdir2\my%20file

    or

    sc /cmd view disk:subdirs.d81\subdir1\subdir2\my$20file

    or

    scview disk:subdirs.d81\subdir1\subdir2\my$20file

    Note that, if there are several Commodore files with the same name in an image or archive file, you will only be able to view or edit the first one with that particular name. Only the interactive environment allows you to view or edit any of those files.

    Also, when specifying special PETSCII characters on the command line, you have to use the "$" (dollar) sign as a prefix for hexadecimal codes when executing the viewer or the editor directly but you may use either that or the "%" (percent) sign for viewing or editing files via the Commander.

  2. View a Commodore file called "my file" in the subdirectory of a GEOS-compatible 1581 disk image:

    sc /cmd view disk:subdirs.d81\subdir1\subdir2\my%20file

    or

    scview disk:subdirs.d81\subdir1\subdir2\my$20file

    Note that the command line remains the same as in the previous example, although, while Commodore file names are PETSCII-based, GEOS file names are ASCII-based.

  3. Edit the AUTOEXEC.BAT file:

    sc /cmd edit c:\autoexec.bat

    or

    scedit c:\autoexec.bat

Examples for formatting, validating, cleaning, protecting, minimizing images and sending user commands:

  1. Format a Commodore disk with the default label:

    sc /cmd format 8: ""

    Note that the two quotation marks specify an empty string. Without this, you would get an error message about a missing parameter.

  2. Reformat a tape image:

    sc /cmd format tape:C:\TAPES\tapename.t64 Reformatted

  3. Reformat a subdirectory of a 1581 disk image:

    sc /cmd format disk:C:\DISKS\diskname.d81\subdir newdirectory,nd

    Beware, if the subdirectory does not exist, you get no warning message and the complete disk image is reformatted!

    3. Validate a Commodore disk:

    sc /cmd validate 8:

  4. Clean or safe clean a disk image:

    sc /cmd clean disk:C:\DISKS\garbage.d64

    or

    sc /cmd safeclean disk:C:\DISKS\garbage.d64

  5. Protect or unprotect a disk image:

    sc /cmd protect disk:C:\DISKS\useful.d64

    or

    sc /cmd unprotect disk:C:\DISKS\useless.d64

  6. Minimize a tape image:

    sc /cmd minimize tape:C:\TAPES\fulltape.t64

  7. Switch to the flip head on a Commodore 1571 drive:

    sc /cmd usercmd 8: "u0>h1"

    Note that the actual command has to be enclosed into quotation marks because it contains the invalid ">" character.

The following examples are short scripts. They won't work in single command mode.

Examples for setting variables:

  1. Use your neighbor's 1571 drive which has already been configured in the "Drive setup" menu. However, this time, the drive is connected via an XEP1541 adaptor on an unusual parallel port card, it is forced into 1541 emulation mode and the async warp write interleave is relaxed by one, before copying a disk image, with a long file name, to a disk in the drive under Windows:

    # Disable port/cable/drive autoinit; must be the first command!
    noinit
    # Load drive settings
    setdrive "Neighbor's 1571 drive"
    # Fill in address of first custom parallel port
    set LPT4 $0260
    # Select first custom parallel port for the serial and parallel cables
    set SerialInterface 4
    set ParallelInterface 4
    # Set the cable types for an XEP1541 adaptor
    set SerialCable XE1541
    set ParallelCable XP15x1
    # Force the drive into 1541 emulation mode
    set DriveType 157x-1541
    # Set transfer mode to warp
    set TransferMode Warp
    # Enable async transfer mode for multi-tasking operating systems
    set AsyncTransfer Auto
    # Relax the async warp write hard interleave by one (default is 11)
    set DriveInterleave[AsyncWarpW] 12
    # Enable long file names
    set LongFileNames Yes
    # Confirm changes of settings, initialize ports/cables/drives
    init
    # Do the actual disk operation
    diskcopy disk:C:\DiskImages\for_the_neighbor.d64 9:

    Note the use of the "noinit" and "init" commands, which is necessary as new values are assigned to some transfer-related configuration settings.

  2. Move a DOS directory structure from one drive to another, automatically overwriting all existing files, even read-only ones, and automatically deleting all source files, even read-only ones:

    # Automatically overwrite all destination files
    set AutoOver All
    # Automatically overwrite all read-only destination files
    set AutoOverReadonly All
    # Automatically delete all source files
    set AutoDelete All
    # Automatically delete all read-only source files
    set AutoDeleteReadonly All
    # Do the actual file operation
    move C:\GAMES D:\

    Note that the "noinit" and "init" commands are not needed here because no transfer-related configuration setting is changed.

Examples for using environment variables:

  1. Grab all command components from environment variables:

    %%CMD% %%SRC% %%DEST%

    The environment variable called "CMD" specifies the file operation: "copy" or "move". The files, specified by "SRC", are copied or moved to the files specified by "DEST".

Examples for listing directory contents:

  1. Display all the files, in a disk image, whose name starts with "a":

    sc /cmd list disk:C:\DISKS\diskname.d64\a* dirlist.txt format.txt

    Note that, unlike in Star List, the image name is not enough; you have to also specify the image type and a name pattern for the files inside the image.

    The output is written into or, if already exists, appended to the file "dirlist.txt". The format specification is in the file "format.txt".

  2. Display the directory of a Commodore disk:

    sc /cmd list 8:\* dirlist.txt format.txt

Format specification examples for the "list" command:

  1. Display an output identical to the Commodore disk directory list, using the lowercase/uppercase character set:

    %?^\r\nListing %D%P%F%E\r\n
    \r\n
    0 "%-16gl" %gI\r\n%?!
    %-5s%-18gqn%1c%gt%w\r\n
    %?$%b blocks free.\r\n%?!

  2. Display an output almost identical to Star List's unformatted output, as if no format specification file were given on its command line:

    %?^\r\nListing: %D%P%F%E ("%gL")\r\n
    Blocks Name Type\r\n
    ------ ------------------ -----\r\n%?!
    %6s %-18gqn %1c%gt%w\r\n
    %?$------ ------------------ -----\r\n
    %6*s %4*n files\r\n%?!

  3. A simple way of including directory lists in HTML, using Netscape-style hexadecimal codes for invalid characters and appending the number of files having been listed:

    %?h<HTML>\r\n
    <TITLE>Directory list</TITLE>\r\n
    <BODY>\r\n%?!
    %?^Directory list of %D%P%F%E<P>\r\n%?!
    <A HREF="file:%D%P%F%E">%ghn</A><BR>\r\n
    %?$<P>\r\n%?!
    %?fListed %*f files.\r\n
    </BODY>\r\n
    </HTML>\r\n%?!

  4. A simple way of creating a CSV file with a header that you can easily import into a database:

    %?hidrive,ipath,iname,iext,fname,fblk,ftype,fsplat,fprot\r\n%?!
    %/1D,"%/R","%F","%/+2E","%gn",%s,%/1ut,%C,%W\r\n

  5. Another format that can be imported into a database of the same structure as the previous example, but there's no header and the fields are separated by Tabs instead of commas:

    %/1D\t%/R\t%F\t%/+2E\t%gn\t%s\t%/1ut\t%C\t%W\r\n

7. Advantages

The following features make the Commander the best of its kind:

8. Connecting a Commodore drive to your PC

The serial connection is done using the X1541 interface or its substitutes. If you only have an EPP or ECP port then you have to substitute the X1541 interface with the XE1541, XM1541 or XA1541 interface.

If you already have one of the serial cables mentioned above and want to achieve a much higher transfer speed and you're willing to modify your 1541, 1570 or 1571 drive and you have a bidirectional parallel port then you can make use of the XP1541 or XP1571 parallel interface. If you only have a unidirectional parallel port then the XH1541 or XH1571 hybrid interface gives you the best performance. You can find the description of all interfaces in the following section.

The Commander was designed to access Commodore drives under real DOS only. If you wish to do that under a multi-tasking system then you should either use the XH1541 or XH1571 hybrid cable or the XP1541 or XP1571 parallel cable or, if having a serial cable only, set the "Async transfer" option to "Auto". Still, it's not guaranteed to work absolutely error free. Boot real DOS, remove memory managers, device drivers and other resident softwares, if having problems.

The Commander has a machine independent synchronization method that uses the hardware system timers. The automatic calibrator inside the Commander tries to find a delay value that makes your PC communicate with the Commodore drive at the exact speed of the drive. However, if you encounter transfer problems or you want to fine tune the transfer speed then you may want to raise or lower the delay value in the "Transfer options" menu manually.

The Commander is equipped with optional fast transfer modes. In turbo mode, it transfers data from and to the external Commodore drive about 2-3 times faster and, in warp mode, 5-6 times faster. If you also connect your Commodore drive with the XH1541 or XH1571 hybrid cable to the PC, using turbo mode, the data transfer will be 6-12, with warp mode, 6-20 times faster. The XP1541 or XP1571 parallel cable gives you 6-12 times the original speed in turbo mode and is 10-20 times faster in warp mode. The Commander has turbo and warp command routines, as well. These speed up deleting files and validating disks to 2-10 times the original speed (depending on the number and length of the files on the disk) and formatting a disk takes only about 12 seconds.

The Commander supports the following Commodore drives, including all models and compatible clones:

Other Commodore drives and CMD drives are not and, most probably, will never be supported as the author doesn't have any of them.

9. The X1541-series interfaces

Below are the descriptions of the X1541-series interfaces, with which you can connect a Commodore drive to your PC to use with the Commander.

If you don't want to read through this complete chapter then you should, at least, read the most important facts about the cables and their compatibility with parallel ports of different modes.

If you'd like to build cables and compatible adaptors yourself then you can find a more detailed description of them at the cables and adaptors pages. If you're not good at at soldering then visit The X1541 Shop and buy cheap but good quality cables and adaptors there.

If you're having problems with your cable, you should download XCTest from the useful external softwares page and test your cable with it.

Serial cables are the following:

Optional parallel cables are the following:

If you only have one parallel port but want to use the XH1541 or XH1571 hybrid cable or the XP1541 or XP1571 parallel cable then you can create a Y-shaped cable. One end plugs into the PC parallel port and the two other ends plug into the serial and parallel ports on the drive. You can use the X1541 cable together with the XH1541 or XH1571 hybrid cable on an SPP parallel port; the X1541 cable together with the XP1541 or XP1571 parallel cable on a PS/2 parallel port; and the XE1541 extended, XM1541 multitask or XA1541 active cable together with the XP1541 or XP1571 parallel cable on a PS/2, EPP or ECP port. You can't use serial cables other than the X1541 together with the XH1541 or XH1571 hybrid cable on the same port, because of the conflict between the pins used by the serial and the hybrid cables on the PC parallel port.

The mode of your parallel port is a vital feature that determines which cables you can use with your machine so try to find out all the modes of your parallel port. Older I/O and parallel port cards only have the unidirectional SPP mode, most Pentium and newer 486 motherboards have integrated parallel ports and allow you to set the port mode in the BIOS setup, with the usual choices of SPP, EPP and ECP.

It's possible that, when changing the mode of the integrated parallel port in your BIOS setup, you won't find the necessary modes as they are called in this documentation. Some BIOS setups have different names for the port modes. "Compatible", "Normal" and "Standard" usually refer to SPP, "Extended" possibly means PS/2 or EPP and "Enhanced" stands for EPP or ECP. See what the Commander tells you about the port mode in the "Transfer options" menu.

Below you find some advices about which cables to use with a given parallel port mode and vice versa. They are based on the assumption that most SPP and PS/2 parallel ports support the X1541 cable and most EPP and ECP parallel ports don't. However, because of the lack of strict standards, there are exceptions to these rules: there exist SPP and PS/2 parallel ports that don't support the X1541 cable and it's not entirely impossible that certain EPP and ECP parallel ports do support it. You have to determine the true capabilities of your parallel port yourself before choosing the cables to use.

If you have a unidirectional SPP parallel port then you can use the X1541 cable and, optionally, the XH1541 or XH1571 hybrid cable, for the highest speed possible on SPP ports. If you have a bidirectional PS/2 parallel port then you can use any of the cables. For maximum speed, you're advised to use the X1541 cable and the XP1541 or XP1571 parallel cable together. The X1541 cable doesn't work with most parallel ports in EPP and ECP mode. You will have to configure them to SPP mode with the BIOS setup software or with jumpers. If the Commander still doesn't work then you have to use one of the other three serial cables that substitute the X1541 cable.

The X1541 interface is the easiest of all. You only have to connect certain pins of the serial port of the Commodore drive and pins of the parallel port of the PC. You need some plugs, some wires and some soldering skills. The XE1541 and XM1541 interfaces are not much harder, they only needs some diodes. However, the XA1541 interface needs a couple of resistors and SMD transistors which are quite hard to solder. Also, the XH1541, XH1571, XP1541 and XP1571 interfaces are relatively hard to build as you need to do some modifications inside your Commodore drive. If you're not experienced at soldering then don't even think about doing them yourself. In addition, the XH1541 and XH1571 interfaces also need some diodes.

The following tables may help you to decide which cables suit your needs best. Depending on your parallel port hardware, your soldering skills and your patience, you may choose the cables that will work best for you.

This table is a compatibility chart between different parallel port modes and different interfaces.

         +-------------------------------+---------+---------+---------+ 
         |         Compatibility         |   SPP   |  PS/2   | EPP/ECP | 
         +-------------------------------+---------+---------+---------+ 
         |         Normal (X1541)        |   yes   |   yes   |   no    | 
         +-------------------------------+---------+---------+---------+ 
         |       Extended (XE1541)       |   yes   |   yes   |   yes   | 
         +-------------------------------+---------+---------+---------+ 
         |      Multitask (XM1541)       |   yes   |   yes   |   yes   | 
         +-------------------------------+---------+---------+---------+ 
         |        Active (XA1541)        |   yes   |   yes   |   yes   | 
         +-------------------------------+---------+---------+---------+ 
         |   Hybrid (XH1541 or XH1571)   |   yes   |   yes   |   yes   | 
         +-------------------------------+---------+---------+---------+ 
         |  Parallel (XP1541 or XP1571)  |   no    |   yes   |   yes   | 
         +-------------------------------+---------+---------+---------+ 

Again, the standard X1541 cable doesn't work on most Pentium-class machines. You can test the compatibility of your parallel port with X1541Test. Also, the XE1541 extended cable and the XM1541 multitask cable don't work on motherboards with the ALI 5 chipset and certain laptops. Unfortunately, there is no way of testing this compatibility with purely software.

This table shows the ways to achieve different speeds on a single parallel port in different modes.

             +-----------------+-----------+-----------+-----------+ 
             |   Single port   |    SPP    |   PS/2    |  EPP/ECP  | 
             +-----------------+-----------+-----------+-----------+ 
             |  Minimum speed  |  Normal   |  Normal   | Extended/ | 
             |                 |    [1]    |    [1]    |Multitask/ | 
             |                 |           |           |  Active   | 
             +-----------------+-----------+-----------+-----------+ 
             |  Medium speed   |  Normal+  |  Normal+  |           | 
             |                 |  Hybrid   |  Hybrid   |           | 
             |                 |           |    [1]    |           | 
             +-----------------+-----------+-----------+-----------+ 
             |  Maximum speed  |           |  Normal+  | Extended/ | 
             |                 |           | Parallel  |Multitask/ | 
             |                 |           |           |  Active+  | 
             |                 |           |           | Parallel  | 
             +-----------------+-----------+-----------+-----------+ 

[1] This is not the maximum performance for your parallel port, you may want to use another cable configuration.

These tables show the ways to achieve different speeds on two parallel ports of different modes. The first cable refers to the primary parallel port, whose mode is indicated by the table title. The second refers to the secondary parallel port, whose mode is indicated by the column title. Note that when you're advised to swap your parallel ports then it's meant to be a logical swap, not a physical one.

           +---------------------+-----------+-----------+-----------+ 
           |     Two ports,      |    SPP    |   PS/2    |  EPP/ECP  | 
           |   primary is SPP    |           |           |           | 
           +---------------------+-----------+-----------+-----------+ 
           |    Minimum speed    |  Normal   |  Normal   |  Normal   | 
           |                     |   [1,2]   |  [1,2,3]  |   [1,2]   | 
           +---------------------+-----------+-----------+-----------+ 
           |    Medium speed     |  Normal+  |  Normal+  |  Normal+  | 
           |                     |  Hybrid   |  Hybrid   |  Hybrid   | 
           |                     |    [2]    |  [1,2,3]  |   [1,2]   | 
           +---------------------+-----------+-----------+-----------+ 
           |    Maximum speed    |           |  Normal+  |  Normal+  | 
           |                     |           | Parallel  | Parallel  | 
           +---------------------+-----------+-----------+-----------+ 

[1] This is not the maximum performance for your parallel ports, you may want to use another cable configuration.

[2] You don't need two parallel ports for this cable configuration, you may hook the indicated cables up to the primary parallel port.

[3] This is not the maximum performance for your parallel ports. Swap your parallel ports and try again.

           +---------------------+-----------+-----------+-----------+ 
           |     Two ports,      |    SPP    |   PS/2    |  EPP/ECP  | 
           |   primary is PS/2   |           |           |           | 
           +---------------------+-----------+-----------+-----------+ 
           |    Minimum speed    |  Normal   |  Normal   |  Normal   | 
           |                     |   [1,2]   |   [1,2]   |   [1,2]   | 
           +---------------------+-----------+-----------+-----------+ 
           |    Medium speed     |  Normal+  |  Normal+  |  Normal+  | 
           |                     |  Hybrid   |  Hybrid   |  Hybrid   | 
           |                     |   [1,2]   |   [1,2]   |   [1,2]   | 
           +---------------------+-----------+-----------+-----------+ 
           |    Maximum speed    |  Normal+  |  Normal+  |  Normal+  | 
           |                     | Parallel  | Parallel  | Parallel  | 
           |                     |    [2]    |    [2]    |    [2]    | 
           +---------------------+-----------+-----------+-----------+ 

[1] This is not the maximum performance for your parallel ports, you may want to use another cable configuration.

[2] You don't need two parallel ports for this cable configuration, you may hook the indicated cables up to the primary parallel port.

           +---------------------+-----------+-----------+-----------+ 
           |     Two ports,      |    SPP    |   PS/2    |  EPP/ECP  | 
           | primary is EPP/ECP  |           |           |           | 
           +---------------------+-----------+-----------+-----------+ 
           |    Minimum speed    |    [1]    |    [1]    | Extended/ | 
           |                     |           |           |Multitask/ | 
           |                     |           |           |  Active   | 
           |                     |           |           |    [2]    | 
           +---------------------+-----------+-----------+-----------+ 
           |    Medium speed     |    [1]    |    [1]    | Extended/ | 
           |                     |           |           |Multitask/ | 
           |                     |           |           |  Active+  | 
           |                     |           |           |  Hybrid   | 
           +---------------------+-----------+-----------+-----------+ 
           |    Maximum speed    |    [1]    |    [1]    | Extended/ | 
           |                     |           |           |Multitask/ | 
           |                     |           |           |  Active+  | 
           |                     |           |           | Parallel  | 
           |                     |           |           |    [2]    | 
           +---------------------+-----------+-----------+-----------+ 

[1] You shouldn't have an EPP/ECP parallel port as your primary port. Swap parallel ports and try again.

[2] You don't need two parallel ports for this cable configuration, you may hook the indicated cables up to the primary parallel port.

The following diagrams are pictured as viewed from the solder end (back side) of the plug. It may be of help to you that the numbers are often printed in small letters onto the plug itself. When wiring the interface cables, make sure that they are not too long. A cable longer than about two meters (seven feet) will possibly not work, especially if it isn't shielded at all.

The PC parallel plug (male DB-25 connector):

              PaperEnd Busy            Data 7 – Data 0 
            Select  |   |  Ack  /---------------------------\ Strobe 
                |   |   |   |   |                           |   | 
                V   V   V   V   V                           V   V 
            +-------------------------------------------------------+ 
            |  13  12  11  10   9   8   7   6   5   4   3   2   1   | 
            |   o   o   o   o   o   o   o   o   o   o   o   o   o   | 
             \                                                     / 
              \   o   o   o   o   o   o   o   o   o   o   o   o   / 
               \ 25  24  23  22  21  20  19  18  17  16  15  14  / 
                ------------------------------------------------- 
                  ^                           ^   ^   ^   ^   ^ 
                  |                           |   |   |   |   | 
                  \---------------------------/   | Init  |  AutoFeed 
                             Ground         SelectIn     Error 

The Commodore drive serial bus plug (male 6-pin DIN connector):

                                      Reset 
                                        | 
                                        V 
                                  -----   ----- 
                                 /     \_/     \ 
                                /  5         1  \  
                      Data --> |   o    6    o   | <-- SrqIn 
                               |        o        | 
                               |   4         2   | 
                       Clk --> |   o    3    o   | <-- GND 
                                \       o       / 
                                 \             / 
                                  ------------- 
                                        ^ 
                                        | 
                                       Atn 

Commodore drive periphery chips are displayed as viewed from above. The small semicircular cut may help you with finding the correct orientation.

The Commodore 1541 drive VIA#1 periphery chip:

                      | | | | | | | | | | | | | | | | | | | | 
                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                    | 40                                   21 | 
                    |)                                        | 
                    | 1 2             9                    20 | 
                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                      | | | | | | | | | | | | | | | | | | | | 

                        ^             ^ 
                        |             | 
                        \-------------/ 
                           PA0 – PA7 

You can find the VIA#1 by searching for a chip on the motherboard that has the type number 6522 on it and none of its pins 3-9 are connected to any other chip.

The Commodore 1570/1571 drive CIA periphery chip:

                      | | | | | | | | | | | | | | | | | | | | 
                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                    | 40                                   21 | 
                    |)                                        | 
                    | 1                 10           17    20 | 
                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                      | | | | | | | | | | | | | | | | | | | | 

                                        ^             ^ 
                                        |             | 
                                        \-------------/ 
                                           PB0 – PB7 

The CIA chip has the type number 6526, 8520 or 8521 on it.

The X1541 interface connects the following pins:

                   CBM drive serial port   PC parallel port 

                          2  GND ---------- 18-25  Ground 

                          3  Atn -------------- 1  Strobe 

                          4  Clk ------------- 14  AutoFeed 

                          5  Data ------------ 17  SelectIn 

                          6  Reset ----------- 16  Init 

The original specification of the X1541 interface requires the short connection of pins 2 and 15 on the parallel port plug. The X1541 software uses it for autodetection, the Commander doesn't make use of it. If you intend to use other transfer softwares with your interface then you might want to do this alteration, as well.

You have to connect the X1541 interface to an SPP or PS/2 parallel port as the lines used by this cable are not necessarily bidirectional on EPP and ECP parallel ports.

The XE1541 extended interface connects the following pins:

                   CBM drive serial port   PC parallel port 

                          2  GND ---------- 18-25  Ground 

                          3  Atn -------+----- 13  Select 
                                        +-|>|-- 1  Strobe 

                          4  Clk -------+----- 12  PaperEnd 
                                        +-|>|- 14  AutoFeed 

                          5  Data ------+----- 11  Busy 
                                        +-|>|- 17  SelectIn 

                          6  Reset -----+----- 10  Ack 
                                        +-|>|- 16  Init 

This interface, unlike the X1541 interface, needs electronical components, namely diodes. These decouple the control lines of the PC parallel port while data is coming from the Commodore drive. You have to solder them right before each of pins 1, 14, 16 and 17, their cathodes – the end marked with a small band – pointing towards the pins. It is highly recommended to use 1N5819 or BAT85 diodes only, other diodes may make the cable inoperable on some hardware configurations.

The XM1541 multitask interface connects the following pins:

                   CBM drive serial port   PC parallel port 

                          2  GND ---------- 18-25  Ground 

                          3  Atn -------+----- 13  Select 
                                        +-|>|-- 1  Strobe 

                          4  Clk -------+----- 12  PaperEnd 
                                        +-|>|- 14  AutoFeed 

                          5  Data ------+----- 10  Ack 
                                        +-|>|- 16  Init 

                          6  Reset -----+----- 11  Busy 
                                        +-|>|- 17  SelectIn 

Please, read the chapter of the XE1541 extended cable for more details. As you can see, the only difference is that the multitask cable has pins 5 (Data) and 6 (Reset) swapped in the Commodore plug.

The XA1541 active interface connects the following pins:

                   CBM drive serial port   PC parallel port 

                          2  GND ---------- 18-25  Ground 

                          3  Atn -------+----- 13  Select 
                                        +--()-- 1  Strobe 

                          4  Clk -------+----- 12  PaperEnd 
                                        +--()- 14  AutoFeed 

                          5  Data ------+----- 10  Ack 
                                        +--()- 16  Init 

                          6  Reset -----+----- 11  Busy 
                                        +--()- 17  SelectIn 

This interface needs electronical components: transistors and resistors. These amplify signals while data is going to the Commodore drive and decouple the control lines of the PC parallel port while data is coming from the Commodore drive. You have to solder amplifiers right before each of pins 1, 14, 16 and 17; see the circuit diagram zoomed below. It is highly recommended to use BSV52 transistors and (SMD 1206-style) 4.7 kOhm resistors only, other transistors or resistors may make the cable inoperable on some hardware configurations.

The amplifiers are constructed the following way:

         Commodore pin -----------+---------------------- PC input pin 
                                  | 
                               ---|--- 
                             /   C \   \ 
                            /       \|B \ 
                transistor |         +--------[////]----- PC output pin 
                            \       /|  /    resistor 
                             \   E /   / 
                               ---|--- 
                                  | 
                                  + GND 

In the amplifier, the collector is connected to the Commodore pin; the base is connected to the PC output pin, via a resistor; the emitter pin has to be grounded, that is, connected to any or, preferably, all of pins 18-25 on the parallel port.

The BSV52 transistor has its pins laid out the following way:

                                        C 
                                      +--+ 
                                   +--+--+--+ 
                                   |        | 
                                   +--+--+--+ 
                                   +--+  +--+ 
                                    B      E 

This picture displays the transistor as viewed from above. Note that this pin layout belongs to the BSV52 transistor only, others may have their pins laid out differently. Also, the BSV52 transistor is a very small SMD component which makes its manual soldering quite difficult.

If you don't wish to solder SMD components or you can't obtain BSV52 transistors, a possible substitute for them is the 2N3904 transistor. Please, note that using 2N3904 transistors is not recommended at all as it may make the cable inoperable on some hardware configurations!

The 2N3904 transistor has its pins laid out the following way:

                                   +----- 
                                   | o C \ 
                                   |      \ 
                                   | o B   | 
                                   |      / 
                                   | o E / 
                                   +----- 

This picture displays the transistor as viewed from below, where its pins are. Note that this pin layout belongs to the 2N3904 transistor only, others may have their pins laid out differently.

The XH1541 hybrid interface connects the following pins:

                     CBM 1541 VIA#1        PC parallel port 

                          2  PA0 -------+----- 13  Select 
                                        +-|>|-- 2  Data 0 

                          3  PA1 -------+----- 12  PaperEnd 
                                        +-|>|-- 3  Data 1 

                          4  PA2 -------+----- 10  Ack 
                                        +-|>|-- 4  Data 2 

                          5  PA3 -------+----- 11  Busy 
                                        +-|>|-- 5  Data 3 

                          6  PA4 ---------|>|-- 6  Data 4 

                          7  PA5 ---------|>|-- 7  Data 5 

                          8  PA6 ---------|>|-- 8  Data 6 

                          9  PA7 ---------|>|-- 9  Data 7 

The XH1571 hybrid interface connects the following pins:

                    CBM 1570/1571 CIA      PC parallel port 

                         10  PB0 -------+----- 13  Select 
                                        +-|>|-- 2  Data 0 

                         11  PB1 -------+----- 12  PaperEnd 
                                        +-|>|-- 3  Data 1 

                         12  PB2 -------+----- 10  Ack 
                                        +-|>|-- 4  Data 2 

                         13  PB3 -------+----- 11  Busy 
                                        +-|>|-- 5  Data 3 

                         14  PB4 ---------|>|-- 6  Data 4 

                         15  PB5 ---------|>|-- 7  Data 5 

                         16  PB6 ---------|>|-- 8  Data 6 

                         17  PB7 ---------|>|-- 9  Data 7 

These interfaces need diodes. You have to solder them right before each of pins 2-9 of the PC parallel port, their cathodes – the end marked with a small band – pointing towards the parallel port pins. A suggested diode for this interface is the standard 1N4148 or equivalent.

You can connect the XH1541 and XH1571 interfaces to any type of parallel port. They have no common lines with the X1541 interface therefore you can connect them, along with the X1541 interface, to the same SPP or PS/2 parallel port, using a Y-shaped cable. The XH1541 interface only works with Commodore 1541 drives and compatible clones. The XH1571 interface only works with Commodore 1570 and 1571 drives and compatible clones.

The XP1541 parallel interface connects the following pins:

                     CBM 1541 VIA#1        PC parallel port 

                          2  PA0 ------------ 2  Data 0 

                          3  PA1 ------------ 3  Data 1 

                          4  PA2 ------------ 4  Data 2 

                          5  PA3 ------------ 5  Data 3 

                          6  PA4 ------------ 6  Data 4 

                          7  PA5 ------------ 7  Data 5 

                          8  PA6 ------------ 8  Data 6 

                          9  PA7 ------------ 9  Data 7 

The XP1571 parallel interface connects the following pins:

                    CBM 1570/1571 CIA     PC parallel port 

                         10  PB0 ------------ 2  Data 0 

                         11  PB1 ------------ 3  Data 1 

                         12  PB2 ------------ 4  Data 2 

                         13  PB3 ------------ 5  Data 3 

                         14  PB4 ------------ 6  Data 4 

                         15  PB5 ------------ 7  Data 5 

                         16  PB6 ------------ 8  Data 6 

                         17  PB7 ------------ 9  Data 7 

You have to connect the XP1541 and XP1571 interfaces to a PS/2, EPP or ECP parallel port as on SPP parallel ports the data lines are unidirectional. If you have a PS/2 parallel port then you can connect the X1541 and XP1541 or the X1541 and XP1571 interfaces to the same parallel port, using a Y-shaped cable. If you have an EPP or ECP parallel port then you should use the XE1541, XM1541 or XA1541 interface rather than the X1541 interface. Alternatively, you may build two separate cables and buy a secondary old SPP parallel port card for the X1541 interface. The XP1541 interface only works with Commodore 1541 drives and compatible clones. The XP1571 interface only works with Commodore 1570 and 1571 drives and compatible clones.

Please, note that none of the XH1541, XP1541, XH1571, or XP1571 interfaces is a substitute for the serial cables. You have to connect two cables to the Commodore drive and the PC at the same time to acquire the enhanced transfer capabilities. Don't connect the XH1541, XP1541, XH1571 or XP1571 cable alone to the Commodore drive: none of them contain a GND line so plugging them without a serial cable may short circuit your machines and, possibly, damage the periphery chips. Always connect the XH1541, XP1541, XH1571 or XP1571 interface to your Commodore drive and your PC before switching either of them on and switch both machines off before pulling the cables out.

When soldering the hybrid or parallel cable into your Commodore drive, make sure that no hardware or software is using the needed periphery chip pins:

If you already have a floppy speeder like Speed DOS or Dolphin DOS in your 1541, 1570 or 1571 drive then you probably have a parallel plug at its rear. In this case, you have many options of implementing the XH1541, XP1541, XH1571 and XP1571 interface. You may create another cable to connect the drive to the PC with. You may also split the cable between the drive and the C64 into a Y-shaped cable, one end plugging into the drive, another into the C64 and the third one into the PC. In this case, remember not to plug the cable into the C64 and the PC at the same time. However, your best choice is creating a small adaptor that imitates the C64 user port on one side and plugs into the PC parallel port on the other side.

If your 1541 or 1571 drive has no parallel capabilities then you might still want to create a plug at its rear. This way there will be no cable always hanging out of the drive. With another cable, you'll be able to use parallel transfer with the C64, too. Please, note that parallel copy softwares for the C64 may require some additional connections on the VIA or CIA chip of the drive. Read their documentation before soldering so that you can connect the additional pins to the parallel plug, if needed.

10. Technical background information

There are three types of lines on PC parallel ports: data lines are used to transfer data bytes between the PC and the external device; control lines are used by the PC to send control signals to the external device; status lines are used by the external device to send status signals to the PC.

From the PC side, logically, data lines should be used for both input and output, control lines for output only, and status lines for input only. But this is not exactly the case. On the early SPP parallel ports (Standard Parallel Port), data lines can only be used for output; this is called a unidirectional parallel port. Note that this expression is mainly used for the usage of the data lines. Furthermore, with a little trick, the control lines can be used not only for output but for input, as well.

On these early SPP parallel ports, the port pins are connected via open collectors to the chipset on the I/O controller card: there is a resistor between 5.0 V and the pin, and a transistor between GND and the pin. The transistor is controlled by the chipset which, on the other hand, is controlled by the software. When the corresponding port bit is set to one, the transistor opens and the resistor pulls the signal level on the pin to high, a voltage level of between 3.5 V and 4.5 V. When the port bit is cleared to zero, the transistor closes and pulls the signal level to low, between 0.0 V and 0.4 V. The reason for the differences of the voltage intervals is that the transistor can pull stronger than the resistor.

On Commodore drives, the pins of the serial port are also connected via open collectors to the periphery chip. When there are open collectors on the two ends of the same wire then three possibilities exist. If both ends pull the line low then the actual signal level, that can be read by both parties, will be low. If both ends pull the line high then the result will be a high signal. However, if one end pulls the line high and the other one pulls it low then, again, because of the strength of the transistor, the signal level will become low. The PC or the Commodore machine can pull the line high and low and the drive will be able to read this signal. However, if the machine pulled the line high then the drive will also be able to signal back, by pulling the line low. This is the only way to input data from the drive and this is exactly how Commodores, with a Commodore serial cable, and PC's, with an X1541-series cable, work.

It is still a mystery why the original parallel port, designed by IBM, is a unidirectional parallel port. The port wouldn't have been more expensive if it allowed the software to switch the data lines into input mode. Actually, many parallel port cards are designed to be bidirectional but are crippled down to unidirectional mode. The method to enable bidirectional mode on these cards is described at the end of this section. Such bidirectional SPP ports are often called BPP (Bidirectional Parallel Port) or PS/2 parallel ports, because they were first introduced in the IBM PS/2 machine.

However, with the introduction of high-speed peripherals, open collectors started to be replaced by totem poles: there are two transistors, one between 5.0 V and the pin, the other between GND and the pin. The two transistors are controlled in an inverted way: at a time, exactly one of them is open and the other is closed. When the port bit is cleared to zero then, as before, the transistor on the GND side closes and pulls the line low. However, when the port bit is set to one then it is also a transistor that pulls the line high. This way, the high signal level is a voltage of very close to 5.0 V, as opposed to between 2.8 V and 5.0 V in the open collector, and the speed of switching between signal levels is also significantly higher, allowing more data to be transferred within a given interval of time.

On most Pentium and newer 486 motherboards, the pins of the integrated parallel port are connected via totem poles to the chipset. When a totem pole in the PC pulls the line high then it does that with a transistor. If the drive tries to pull the line low, to send a signal, then it also does that with a transistor. The two transistors will be fighting against each other and the outcome is unknown: the signal level may remain at high, if the transistor on the PC side is stronger; or become low, if the transistor in the drive is the stronger one. Most of the time, the transistors in the PC seem to be stronger and, therefore, no data can be input from the Commodore drive. And it is not only totem poles that may render transfer softwares unable to work: the chipset on some motherboards doesn't even contain the circuitry needed to read the signal level of lines other than the status lines.

The new enhanced parallel ports, EPP (Extended Parallel Port) and ECP (Enhanced Capability Port) ports, have bidirectional data lines so that data may be read from a hard disk, CD-ROM drive, scanner etc. connected to the PC. However, as described above, their control lines are not bidirectional anymore. Additionally, on some motherboards, control lines are unidirectional even when the port is switched to SPP mode via the BIOS setup. The X1541 cable won't work on these parallel ports. If you can't make transfer softwares work with your motherboard then you should stop testing immediately, because the fights between transistors put stress on the chips on both sides. You should rather build one of the other serial cables which are slightly different from the X1541 cable and work on more parallel ports.

The X1541 cable is of the simplest design. It connects pins of the Commodore serial port and the PC parallel port without any conversion or wire split. So that the PC is able to also input data from the Commodore, not only output to it, it definitely needs the control lines, that it uses, to be bidirectional. If they are not then the cable doesn't work at all, no matter what software you're using with it.

The XE1541 cable connects wires, coming from the Commodore end, to two pins on the parallel port. One of these pins belongs to a control line and there is a Schottky-diode in front of it. This is the line via which data is sent to the Commodore. The other pin belongs to a status line which is used to receive data. Because control lines may be used for output and status lines for input on any parallel port, this solves the problem with the X1541 cable. When the PC expects the Commodore to send to data, it sets the control line to a high level and listens to the signal level on the status line. The diode prevents current from flowing from the PC end, therefore, the Commodore is free to set the line to whatever level it wants to. Without the diode, the output lines of the PC and the Commodore would be fighting with each other, as described above.

The XM1541 cable has only two wires swapped at the Commodore end. This results in the DATA line of the Commodore being connected to the ACK line of the PC parallel port. The ACK line is the only one that is capable of generating interrupts on the PC. This way, when the PC is waiting for the next handshake arriving from the Commodore, it can do that by enabling the "ACK generates interrupt" feature and halting its execution. When the interrupt occurs, the PC can also continue with the next handshake. Until this happens, the software uses no CPU time because it's not running at all. Interrupts use significantly less CPU time than "polling": running in an endless loop that checks the signal level again and again. Low CPU usage is important for true multi-tasking systems such as GNU/Linux and Windows NT4/2000/XP/2003.

The XA1541 cable is derived from the XM1541 cable. It also has the two wires swapped at the Commodore end, therefore, it also improves overall performance under a multi-tasking system. However, it corrects a problem with the XE1541 and XM1541 cables that occurs with certain parallel ports that are on the edge of the original IBM specification. According to the specification, the low level of a line means that the voltage is between 0.0 V and 0.4 V. When a Schottky-diode is applied onto this line then the voltage may go up to even 0.8 V because the typical voltage rise of such diodes is about 0.4 V. Unfortunately, this 0.8 V is also just the edge of the low level recognized by a Commodore. For a Commodore, voltages between 0.0 V and 0.8 V are low; 2.8 V to 5.0 V are high; 0.8 V to 2.8 V are unknown. In the latter case, it is also unknown what the software running in the Commodore will see: sometimes a high, sometimes a low level. It is worth mentioning that exactly this is why Schottky-diodes were chosen for the XE1541 and XM1541 cables: other diodes raise the voltage even more.

Instead of diodes, the XA1541 cable uses transistors and resistors. If the PC needs to pull the signal level to low on the wire then it sends out a high level on the parallel port. This closes the transistor between the wire and the ground. Because the transistor is strong, it can pull the signal level to typically at most 0.2 V which is accepted as a low level by the Commodore, as well. This voltage depends on the transistor but not on the voltage coming from the parallel port. Therefore, whatever parallel port you have – including the ones that are not compatible with the XE1541 and XM1541 cables –, the resulting voltage will be amplified to an acceptable level by the transistor. The resistor is used to adjust the working point of the transistor for optimum performance. Because a transistor will amplify currents, the base current has to be adjusted to a value that results in the needed output current. If the input current is too high, the transistor will work slower than it should be able to; if the input current is too low, the transistor will not switch reliably.

You may convert a unidirectional SPP parallel port card into a bidirectional PS/2 port by disconnecting pin 1 of the data latch 74LS374 from ground and connecting it to one of the output pins on the control latch 74LS174. This pin may be any of pins 2, 5, 7, 10, 12 or 15 and must not be connected to any other chip on the board. The corresponding input pin (3, 4, 6, 11, 13 or 14) must be connected to bit 5 of the data bus. If this is not the case on your card then you may access this bit from the data latch. Find out which one of its output pins (2, 5, 6, 9, 12, 15, 16 or 19) is connected to pin 7 of the parallel port connector and get bit 5 from the corresponding input pin (3, 4, 7, 8, 13, 14, 17 or 18).

11. Troubleshooting

If you encounter problems in this software, first of all, visit the homepage and download the very latest beta release as it may have the bug, which you have run into, already fixed. Also, its documentation may have more ideas on what to try when that particular problem occurs.

Before reading this section, see the "Usage" section, as well. For the exact URL's of pages, mentioned here, see the "Related Net resources" section.

If you find a problem that is not related to accessing an external Commodore drive, you should contact the author with a detailed description of the bug, including a guide on how to reproduce it. See section "Reporting problems" on how a proper bug report should look like. However, if you can't access the external Commodore drive properly, here are some ideas for you.

Bare boot your computer, disable all resident softwares, memory managers and device drivers. Exit multi-tasking systems such as GNU/Linux, OS/2 or Windows 3.x/95/98/ME/NT4/2000/XP/2003. These circumstances may affect the data transfer. Boot real DOS on your machine or boot your Windows operating system in DOS mode. Strip everything, you don' t need, off your AUTOEXEC.BAT and CONFIG.SYS files. You may want to create a boot menu or a boot disk. Note that you definitely need either the OpenCBM driver or the tweaking package to access Commodore drives under Windows NT4/2000/XP/2003.

During your test, don't plug anything other than the serial interface into your PC parallel port and your Commodore drive. From your PC, remove dongles, parallel port switches and other devices that may filter data transfer via the parallel port. From your Commodore drive, remove daisy chained other drives, peripherals and Commodore machines.

If the connection with the Commodore drive locks up then switch the drive off and pull the serial interface out of it. Wait for the error message "Drive not present", plug the interface back and turn the drive back on. Optionally, you may reset the drive, e.g. with Control-Alt-Backspace. Then try the following.

If you get completely confused, you may want to simply delete the SC.INI file and start configuring the Commander again from scratch.

Switch "Transfer mode" to "Warp" in the "Transfer options" menu. This is not only the fastest transfer mode but the most reliable, as well. If you're experiencing problems during disk commands then switch "Command exec mode" to "Warp" in the "Drive options" menu. This will make the Commander use its own, more stable, software for disk commands.

Raise or lower the delay value in the "Transfer options" menu. It is very sensitive so change it at steps of one, with a butterfly method: add one to the original value; subtract one from the original value; add two; subtract two etc. The highest delay value you can use without transmission problems is the optimum. You may use the "Recalibrate" button to have the – hopefully best – delay value calculated for you. If this value works fine for you then set a value of 0 to always use the automatic calibration rather than using a fixed value. Note that, if you set a fixed value, you will definitely have to change it if you started using the Commander under another operating system, e.g. switched from DOS to Windows or vice versa. The optimal delay value depends on the effective CPU speed of your PC which, in turn, is affected by the raw CPU speed, the operating system you use and the current CPU load.

Check, in the "Transfer options" menu, if you have correctly set the type of the serial cable and the parallel port it is connected to. Do the same with the parallel cable, in case you have one. If you have no additional cable, besides the serial cable, then set the parallel cable to "None".

If you really want to access the Commodore drive via a serial cable under a multi-tasking system then set the "Async transfer" option to "Auto" in the "Transfer options" menu. Without that, you would most probably experience frequent lockups or timeouts. For Windows NT4/2000/XP/2003, see the OpenCBM driver or the tweak package. First, you should test the connection under real DOS though. You might want to try the async transfer feature under plain DOS, as well, if you experience transmission problems.

Under Windows, open the "Properties" windows of the DOS shell, that the Commander is running in, go to the "Misc" tab and set "Idle sensitivity" to "Low", the left end of the slider. This gives more CPU time to the Commander.

Turn "Manual timeouts" on or off. While enabling it usually helps under real DOS, it may turn things even worse under a multi-tasking system. Also, when it is enabled, the Commander doesn't really like it if you touch the keyboard or the mouse during access of the Commodore drive as then the communication will fall apart.

Check whether the address and mode of your parallel port is detected and displayed correctly in the "Transfer options" menu. If it is not detected at all then, in the case of an integrated parallel port, enter the BIOS setup and check your parallel port settings. On some motherboards, it is possible to set the parallel port into Auto mode. In this case, a plug-and-play compatible operating system has the chance to set the parallel port to the address and mode it likes. However, DOS is not one of these operating systems so set the address and the mode manually. See the next paragraph for the proper mode.

If you have a Pentium or newer 486 motherboard, with an integrated parallel port and you're using the X1541 interface then change the mode of the parallel port to SPP or PS/2 (usual aliases are Normal, Standard, Compatible and Extended). In case you also use the XP1541 or XP1571 parallel cable, you must set its parallel port to PS/2, EPP or ECP (usual aliases are Extended and Enhanced) mode. To test your PC against compatibility with the X1541 cable, download X1541Test from the useful external softwares page. For the other cables, the parallel port mode usually doesn't matter although there are some exceptions. You can read more about the compatibility of the cables at the separate cable info pages, below the cables and adaptors page.

If you are still unable to access the Commodore drive then disable the "Detect port modes" option in the Commander, save the setup and do a hard reboot with the RESET button of your PC. A very few parallel ports fall into an unusable state when the Commander attempts to detect their mode.

If a given mode of your parallel port completely fails all trials, you may try switching it into another mode in the BIOS setup. It is worth mentioning that, on some motherboards, the Commander locks up the machine completely when it is trying to detect a parallel port that is in EPP 1.7 mode. This seems to be some kind of a hardware problem as it also makes GNU/Linux crash completely upon startup. In this case, you rather have to switch the parallel port into EPP 1.9 or ECP mode in the BIOS setup.

If you have a motherboard for a Pentium-class CPU then you're, most probably, the owner of an integrated parallel port that is incompatible with the X1541 cable. To test your PC against compatibility with the X1541 cable, use X1541Test. Try using an older I/O controller card, a parallel port card or a Hercules video card with a built-in parallel port. Alternatively, you may use the XE1541, XM1541 or XA1541 cable instead.

If your motherboard allows overclocking the FSB (Front Side Bus) frequency then set it back to the default value in your BIOS setup. For the default value, refer to the motherboard manual. The Commander relies upon the hardware timers having the same speed on all PC's but changing the FSB frequency may affect the hardware timer frequency, as well, on some motherboards.

If you use the built-in drive of a C128D or an SX64 or you want to use the same Commodore drive from a Commodore machine and a PC then you must execute a POKE command on the Commodore machine, every time before accessing the drive. See the "Connecting a Commodore drive to your PC" section for more details.

Make sure that the serial interface is assembled well, it is shielded correctly and it is not too long. Check it against the diagrams above or at the cables and adaptors pages: it may be a mirrored cable or the electronical parts used in it may be off the specification. If you bought the cable from someone, you may want to contact the seller with a problem report. You may also try your cable with other PC's and/or other transfer softwares. If you want to test your cable, download XCTest from the useful external softwares page.

Plug your Commodore drive to a Commodore machine to see if it works at all after all those years. You may want to borrow a tested drive from someone.

If you have an integrated parallel port whose connector is not soldered onto the motherboard but rather has a cable that is plugged onto the motherboard then check this cable connection. It's possible that the cable of the parallel port is plugged onto the motherboard in a mirrored way. You may also check its functionality with a PC printer.

If your network uses parallel port redirection then logout.

If you've tried everything and you still can't find out which component is is not working properly, download XCDetect from the useful external softwares page. Connect your Commodore drive via the cable to the PC, switch the drive on and run XCDetect in debug mode, by specifying the "-d" option on the command line. If the software manages to detect both your cable and your drive then there's either a Commander configuration problem or you have found a bug in the Commander. Please, note that if XCDetect displays "(NC:0x83)" or a similar hexadecimal error code after the device number then it did not detect a device with that particular device number.

Also, there's a tester software for X1541-series cables called XCTest on the same page. It allows you to test the cable at a lower level, by letting you send outgoing signals to the drive via the cable and showing the incoming reply signals. See its own documentation for more details.

If you're done with all these checks and still no luck, contact the author. See below for more information on how a proper report should look like. Improper reports will not be replied to!

12. Known problems and limitations

The following problems and limitations are documented below so, please, don't bother reporting them:

Some of these problems may later be solved and some will not.

13. Reporting problems

Before reporting a problem, make sure that it is not listed in either the "Troubleshooting" section or the "Known problems and limitations" section.

The author does not have the possibility to test the software on many kinds of PC's. Please, contact the author if you found bugs in the software (you will probably find some as it is still under development) or you have an idea on what improvements should be done in the future. Please, send a note if you saw a grammatical error, misspelling, typo or something misunderstandable in the online help or this documentation.

If you're having some problems with accessing your Commodore drive with the Commander, please, read the "Troubleshooting" section in this documentation as it covers most usual mistakes and problems and, also, possible solutions. If that guide doesn't help you then download both the latest public release and the latest beta release from the homepage and try those instead. If still no luck, send the author an E-mail with your detailed report.

A proper report should have the following information:

If you're having problems with accessing a Commodore drive then add the following information, as well:

To send files, compress them with ZIP, preferably, into a single archive and uuencode or attach the ZIP archive(s) to your E-mail. For ZIP archives larger than a few hundred kilobytes, ask first.

Additionally, confirm that you have downloaded the latest public release as well as the latest beta release, read the "Troubleshooting" section of their documentation and tried everything described there!

Reports that miss any of this information will be ignored! Please, understand that the author doesn't have time to find out what you mean in your report or make experiments on how to reproduce the reported problem on his own system. Also, many problems are already fixed in recent beta releases.

14. Bugs fixed since the previous release

The following bugs have been fixed since Version 0.82. For a complete list of bug fixes since older releases, see HISTORY.TXT.

15. Other changes since the previous release

Since Version 0.81, the name of the personal keyfile has been changed from "sc.reg" to "sc.key" so that its extension doesn't conflict with that of Windows registry files. Please, rename your personal keyfile, to make it work again.

The following features have been implemented since Version 0.82. For a complete list of changes since older releases, see HISTORY.TXT.

16. Coming soon

The following changes are planned for the next version. If you're interested in trying these new functions – and some more – as they are being implemented, visit the homepage and download beta versions.

High priority changes:

Medium priority changes:

Low priority changes that may not be implemented at all:

There are many ideas that will not be put inside the Commander. They are related to a multi-purpose utility, not a DOS shell and transfer software like the Commander.

17. Related Net resources

The following Web pages iv you useful information related to the Commander:

If you would like to subscribe to The Star Commander mailing list, to be notified about new (beta) releases, to ask questions or to just chat around, then send an E-mail to sclist-subscribe.ANTI@SPAM.yahoogroups.com. To post articles, send an E-mail to sclist.ANTI@SPAM.yahoogroups.com. Please, note that only members are allowed to post to the mailing list, using the address they subscribed from. To unsubscribe, send an E-mail to sclist-unsubscribe.ANTI@SPAM.yahoogroups.com. When viewing the HTML version of this document, make sure to remove the words "ANTI" and "SPAM", along with the dots around them, from the E-mail addresses.

The newest releases are also uploaded to the following WWW sites:

... and the following FTP sites:

If you know other good and stable WWW or FTP sites with C64 areas, to which the Commander should be uploaded, then an E-mail would be appreciated.

18. Thanks to

Without the following two persons, this software, this documentation and even the interface cables wouldn't be as good as they are:

The author would like to thank the development team for their invaluable help:

The following people have contributed code fragments or concepts, ideas or algorithms were taken from their softwares:

The following people have given miscellaneous help with the development:

Special thanks go to:

And thanks to you, too, for using the Commander. Especially, if you took the time to register it.

19. The author

Please, send an E-mail to the address sta.ANTI@SPAM.c64.org if you have questions, problems, ideas or wishes concerning the Commander. When viewing the HTML version of this document, make sure to remove the words "ANTI" and "SPAM", along with the dots around them, from the E-mail address.

This E-mail address is protected by SpamAssassin and custom filters. Spams and E-mails that may contain viruses, worms or otherwise potentially malicious material will not be delivered. Also, E-mails with uncompressed attachments will be rejected automatically.

In your E-mail, wrap your lines at 70-75 characters. Send plain text only, no rich text in HTML format or the message body in an attachment!

You may send snail-mails to me at this address:

Kovács Balázs
Orsolya u. 5. IV/12.
1204 Budapest
Hungary

You may also call the phone number (+36-)1-285-3881 to contact me (8PM-10PM GMT+1 on weekdays, 10AM-10PM GMT+1 on weekends). Please, call me only if extremely urgent.

You may find other ways to contact me on the contact page of my homepage.

Please, use English or Hungarian. If you really have to, you may write in German, as well, but beware, I only understand it, I don't speak it.

If you wish to send some files to me, either by E-mail or snail mail, then ask me before you do it. I don't like being flooded with large E-mails or lots of disks without having been warned. Make sure to compress files with ZIP or any other popular archiver, otherwise your E-mail will bounce back to you automatically.

Note that Hungarians, similarly to Chinese, Japanese, Korean, Vietnamese and, probably, some other Eastern Asian people, have their names in a "reverse" order. If you really don't want to call me Joe then, please, use Balázs or Mr. Kovács in your greeting rather than the opposite.

Joe Forster/STA
11th January, 2010

(This page best viewed with any browser)