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.
Copyright and license
Connecting a Commodore drive to your PC
The X1541-series interfaces
Technical background information
Known problems and limitations
Bugs fixed since the previous release
Other changes since the previous release
Related Net resources
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.
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 software that satisfy all restrictions in the license. When you distribute the Commander, modified versions of it or software 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:
X1541 cable (© by Leopoldo Ghielmetti, 1992)
XE1541 extended cable (© by Nicolas Welte and Wolfgang Moser, 1997)
XM1541 multitask cable (© by Michael Klein and Nicolas Welte, 2000)
XA1541 active cable (© by Michael Klein and Nicolas Welte, 2000)
XH1541/XH1571 hybrid cables (© by Bigfoot, 1997)
XP1541/XP1571 parallel cables (© by Joe Forster/STA, 1997)
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.
You must have an IBM-compatible PC with the following hardware and software to run the Commander:
an 80286 processor or higher,
an MDA/Hercules/CGA/EGA/VGA/SVGA video card and monitor,
about 500 kilobytes of free conventional memory or more,
MS-DOS 3.20 or higher installed.
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.
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.
SCMAIN.EXE: For a minimum installation, you need the main executable.
SC.EXE: If you want to have much more memory in the DOS shell, keep this loader and launch it instead of the main executable.
SC.HLP: Keep this to enable the online help.
SCVIEW.EXE, SCEDIT.EXE: With their help, you can view and edit DOS files and Commodore files inside image files and uncompressed archive files.
SCSETUP.EXE: Allows you to change the settings of the Commander outside the software.
*.MNU, *.EXT: Some sample menu and extension files to help you with handling PC and Commodore archives and formatting PC disks.
PALETTES.ZIP: Some predefined color palettes that resemble those of other Commanders and Commander clones.
PRINTHLP.EXE: Run this to extract the online help into a text file or to send it to a printer.
SC.ICO, SC.PIF, ICONS.ZIP: If you want to use the Commander under OS/2 or Windows 3.x/95/98/ME/NT4/2000/XP then these are just for you.
SC_WINNT.ZIP: Tweak package that allows the Commander to access Commodore drives under Windows NT4/2000/XP/2003. For more details, see the documentation inside the package.
SUxyy.ZIP: Contains the Star Utilities (version x.yy), the external utilities that help you with mass-converting Commodore archive formats. For more details, see the documentation inside the package. This package is also available separately, on its own homepage.
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.
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>]
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:
/?: Displays the help screen of command line parameters.
/nolpt: Disables access of parallel ports completely. You will not be able to use Commodore drives from your PC but, in change, no strange behavior will occur either because the Commander will not touch the parallel ports at all. See below for a list of such strange behaviors.
/novesa: Disables support for VESA BIOS extensions, in case it causes strange behavior on incompatible hardware. Note that this command line option overrides the "VESA support" option in the configuration menus but also affects startup. Therefore, you should use it if the Commander can't even start up properly.
/noxms: Disables XMS usage. Currently, XMS is used for swapping overlay data only. Use this option if you're experiencing lockups or crashes already when the Commander starts up.
/noems: Disables EMS usage. Currently, EMS is used for swapping overlay data only. Use this option if you're experiencing lockups or crashes already when the Commander starts up.
/color, /bw and /laptop: Forces the color, black & white and laptop palette. Note that this command line option overrides the "Screen color" option in the configuration menus. Also, it has no effect on monochrome displays.
/cmd: Executes a single batch command or a script consisting of several batch commands. See the next section on batch processing. The complete command line after this option is considered to be a batch command. Therefore, if you want to specify other options, as well, put them before this one.
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:
GNU/Linux dosemu: If the Commander crashes dosemu, specify the "/noxms" option for the Commander or disable the XMS support of dosemu, by setting "$_xms" to "(0)" in dosemu.conf. Even if there are no crashes, XMS may not be used. This is the consequence of an implementation problem in the XMS support of dosemu.
To be able to access Commodore drives, enable access to the necessary hardware ports, by adding them to "$_ports" in dosemu.conf. These ports are "range 0x40,0x43", "0x61" and one or more of the parallel ports. The standard parallel ports are "range 0x0278,0x027B range 0x0678,0x067B" (the second range is necessary for ECP ports only), "range 0x0378,0x037B range 0x0778,0x077B" and "range 0x03BC,0x03BF range 0x07BC,0x07BF". If you have a custom parallel port then add an address range of between (base address) and (base address + 3) and, for ECP ports, another range of between (base address + 0x0400) and (base address + 0x0403).
This has been successfully tested with FreeDOS Beta 8 (2002-12-20) and MS-DOS 5.00, running in dosemu 18.104.22.168 (2001-10-13) and Red Hat Linux 8.0. See http://www.dosemu.org for the latest version of dosemu and a copy of FreeDOS, configured to be run under dosemu.
Beware, the Commander uses a great percentage of CPU time during access to Commodore drives, thus degrading system performance significantly!
Macintosh VirtualPC: Visit http://www.welovemacs.com/idock.html for the iDock. After having installed the hardware and the software bundled with it, VirtualPC will recognize the parallel port built into the iDock and allow the Commander to use the port for communication with the Commodore drive.
If you have successfully done this, a detailed step-by-step guide would be welcome!
OS/2: To be able to access Commodore drives, enable the HW_TIMER option in the DOS settings.
If you have successfully done this, more information would be welcome!
Windows 3.x: No extra requirements.
Windows 95/98/ME: No extra requirements.
Windows NT4/2000/XP/2003: Try accessing the Commodore drive via the OpenCBM driver or see the separate tweak package for more information.
General guidelines on accessing Commodore drives under a multi-tasking operating system with the Commander are the following:
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.
In the "Transfer options" menu, set "Transfer mode" to "Warp".
Disable "Manual timeouts".
Set "Async transfer" to "Auto" or "Always", otherwise you will get nothing else than timeouts or lockups.
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).
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.
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".
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:
"Transfer mode": For 1541, 1570 and 1571 drives, you should set it to "Warp" because this is not only the fastest but also the most reliable of all.
For 1581 drives, you may set it to "Turbo". Note that, at this moment, not all disk turbos are finished for 1581 drives so, if experiencing lockups, you will have to temporarily switch back to "Normal" transfer mode.
"Serial cable": Set the type of your serial cable (X1541, XE1541, XM1541 or XA1541) here. Note that these cables are serial, even if you connect them to the parallel port of the PC. Under Windows NT4/2000/XP/2003, set "OpenCBM" to make the Commander access the Commodore drive via the OpenCBM driver. Use "None" if you connected a real PC printer that would get confused when the Commander initializes the parallel port.
"Parallel cable": Set the type of your parallel cable (XH1541/XH1571 or XP1541/XP1571) here. Use "None" if you have no parallel cable or you don't want the Commander to touch the corresponding parallel port.
"Async transfer": You should set it to "Auto".
"Manual timeouts": You should have it disabled all the time.
"Delay value": Press the "Recalibrate" button, to have a (nearly) optimal value computed for your machine. Or, even better, set to 0, to always use an automatically calibrated value. Note that this value depends on the effective CPU speed which is affected by the raw CPU speed, the operating system and the CPU load.
Make sure to either always use a value of 0 or recalibrate whenever using a preconfigured copy of the Commander in a different environment: on another PC and/or under another operating system.
"Serial interface": Set the parallel port that your X1541-series serial cable is connected to. If your parallel port has a non-standard address, select one of the custom slots and enter the port address in hexadecimal notation.
"Parallel interface": Set the parallel port your X1541-series parallel cable is connected to. If your parallel port has a non-standard address, select one of the custom slots and enter the port address in hexadecimal notation.
"Detect port modes": Set it to "All" to have warnings displayed about possible transfer problems. However, this may cause strange behavior on certain hardware, including lockups. In such cases, set this option to "None" and hard reboot your PC or restart the DOS shell. For debug purposes, you may set it to "Used" so that the mode of only those parallel ports is detected that are configured in the "Serial interface" and/or "Parallel interface" options. If you experience long delays or crashes under Windows NT4/2000/XP/2003, use "SafeAll" or "SafeUsed" to skip port mode detection under these operating systems but behave similarly to "All" and "Used" under others.
"Drive type": Set the type of your Commodore drive here. For more details, see the "Commodore drives" section in the online help.
Under certain circumstances, the usage of the parallel ports may cause strange behavior:
Symptom: After having started the Commander, not even a printer can be accessed anymore, until the PC is rebooted.
Reason: Possibly, your parallel port falls into an unusable state when the Commander tries to detect its mode.
Solution: Set "Detect port modes" to "None" and hard reboot your machine.
Symptom: There is a complete system lockup whenever the Commander is started.
Reason: Certain integrated parallel ports lock up the chipset when their mode is probed. Note that this is definitely a hardware bug as the same occurs when GNU/Linux checks the parallel ports while booting up.
Solution: Set your parallel port to another mode in the BIOS setup and try again. If none of the modes work without a lockup, set "Detect port modes" to "None".
Symptom: Under Windows NT4/2000/XP/2003, there are long delays upon startup or a few seconds/minutes after the Commander has started.
Reason: When the Commander tries to detect the mode of the parallel port, Windows gets confused.
Solution: Set "Detect port modes" to "None", "SafeAll" or "SafeUsed" and restart the DOS shell.
Symptom: Under Windows NT4/2000/XP/2003, when a real PC printer is attached, a page with garbage characters is printed upon every startup of the Commander.
Reason: When the Commander initializes the parallel ports, Windows may think it wants to print something and forwards weird data to the printer.
Solution: Set "Serial cable" to "None" to have the parallel port initialization skipped.
Symptom: Under Windows NT4/2000/XP/2003, with cbm4win/OpenCBM installed, the drive keeps resetting itself indefinitely.
Reason: The drive has been connected (or switched on) when Windows already booted up and the OpenCBM driver couldn't find out the type of the cable correctly.
Solution: Stop and restart the OpenCBM driver, with the "net stop opencbm" and "net start opencbm" commands or other methods.
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:
Commodore 64/128: "POKE 56576, PEEK(56576) AND 239" or simply "POKE 56576, 199".
Commodore Plus4: "POKE 1, PEEK(1) OR 1".
Commodore VIC20: "POKE 37137, PEEK(37137) OR 3".
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:
Specify the "/novesa" option so that no VESA functions are used. This should solve problems with video cards that either have no VESA-compatible BIOS or the VESA support in their BIOS is buggy.
Install ANSI.SYS from CONFIG.SYS. If you're using Windows NT4/2000/XP/2003, use CONFIG.NT in the SYSTEM32 directory instead of CONFIG.SYS.
Install a VESA BIOS extension driver for your video card. If there is no driver written specifically for your video card, you might want to try UniVBE alias SciTech Display Doctor, available at http://www.scitech.com.
If you would like to use long file names with the Commander then be advised that they are not available under all operating systems:
DOS: Long file names are not available. Install a LFN emulator for DOS.
GNU/Linux dosemu: Long file names are not available.
If you know a solution for this, information would be welcome!
Macintosh VirtualPC: Unknown.
If you have access to this, information would be welcome!
If you have access to this, information would be welcome!
Windows 3.x: Long file names are not available. Install a LFN emulator for DOS before launching Windows.
Windows 95/98/ME: The operating system supports long file names in its DOS shells.
Windows NT4: Long file names are not available. Install a LFN emulator for Windows NT.
Windows 2000/XP/2003: The operating system supports long file names in its DOS shells.
You can download such programs 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 programs 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 programs that are available free of charge:
LHA for DOS; version 2.14 or above (lha.exe).
Info-ZIP for DOS, 16-bit version; zip 2.20 or above (zip16.exe, renamed to zip.exe) and unzip 5.40 or above (unzip.exe).
You can download these from the useful external programs page. Do not use:
LHA for DOS, older versions (below 2.14). These corrupt data when extracting it from archives the way preferred by the Commander.
LHA for Windows. Obviously, it doesn't work under DOS.
Info-ZIP for DOS, older versions (zip below 2.20 or unzip below 5.40). The Commander hasn't been tested with those.
Info-ZIP for DOS, 32-bit version. It has severe problems with certain memory managers and DPMI servers.
Info-ZIP for Windows. Obviously, it doesn't work under DOS.
PKZIP. It is not available free of charge and it doesn't support the extraction method used by the Commander anyway.
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.
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:
If you leave the default "Ask" value for automatic replies (see below), some confirmation messages may be displayed. Also, there are confirmation and error messages as well as dialog boxes, waiting for the user to input some necessary data, that cannot be suppressed. These are displayed in the same manner as in the interactive environment but on top of the underlying DOS screen.
Currently, there are no plans to change this because converting these dialog boxes into a few lines of text, printed onto the DOS screen, would be too much work. And it wouldn't be of much use either because the standard input and output cannot be easily redirected from/to a file anyway. If you have suggestions, contact the author.
There are batch variables that are related to the interactive environment only, therefore, there's no sense using them in scripts: e.g. displaying the sizes of DOS files in blocks rather than bytes; whether files, already processed during a file operation, should be unselected at once or only after having processed all the files etc.
In a later release, it will be possible to save the complete setup into and load it from a script file as well, not only the binary setup file like now. This helps with importing the settings of older releases into newer ones.
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:
Single command mode: Execute the Commander one or more times, passing a single command each time. Specify "/cmd <command> <parameters...>" as a command line parameter.
Script mode: Execute the Commander once, passing the name of the script file. Specify "/cmd @<script name>" on the command line, prepending the name of the script file with the "@" (at) character.
In scripts, you may use one command per line. The maximum length of lines in script files is 254 characters, all kinds of end-of-line marks (CR, LF, CR+LF) are permitted. A comment line must start with the "#" (hash mark) character; these are ignored as well as empty lines.
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:
"copy <source name> <destination name>": Copy files.
You can also use it to put files into or extract files from image files and archives. It also works for DOS directories, in which case the directory and all files and subdirectories in it are copied recursively.
"move <source name> <destination name>": Move or rename files.
When the source and the destination are the same image or archive file or DOS drive then the source files are simply renamed (or moved into another directory on the same DOS drive). Otherwise, the source files are copied and then deleted, one by one.
"delete <source name>": Delete files.
It can also delete DOS directories, recursively.
"diskcopy <source name> <destination name>": Copy or convert disks.
Note that you have to specify the image type for both the source and the destination, a simple file name is not enough.
"makedir <source name> [<label> <integer>]": Make directory.
For directories in 1581 disk images, you have to specify the directory label and the number of tracks to allocate for the directory.
"makedisk <source name> <label> <disk type> [<boolean> <boolean>]". Make disk image.
The two optional booleans specify whether an error info block should be attached and whether the disk should be formatted for GEOS compatibility.
"maketape <source name> <label> <integer>". Make tape image.
The last parameter specifies the number of entries to allocate in the tape image directory.
"diskedit <source name>". Edit disk.
An interactive function.
"attrib <source name> <attributes>". Change file attributes.
"view <source name>". View file.
An interactive function.
The viewer itself also accepts file names with the common syntax.
"edit <source name>". Edit file.
An interactive function.
The editor itself also accepts file names with the common syntax.
The second group of batch commands contains the functions found in the user menu:
"format <source name> <label>". Format disk or tape.
"validate <source name>". Validate disk or tape.
Don't use it on GEOS disks in Commodore drives!
"clean <source name>". Clean disk.
Don't use it on disks that contain data in free sectors!
"safeclean <source name>". Safe clean disk.
Don't use it on disks that contain data in free sectors!
"protect <source name>". Protect disk.
"unprotect <source name>". Unprotect disk.
"minimize <source name>". Minimize tape.
"usercmd <CBM drive> <string>". User command.
The third group consists of special commands:
"list <source name> <list name> <format name>". List the directories of Commodore disks, image and archive files. "<list name>" is the file used for the output and "<format name>" is the format specifiation file.
Note that none of the parameters are optional: you can't list onto the screen and you must always provide a format specification.
For more details on the format specification, see below. If you know Star List well then you may skip those paragraphs as the Commander uses exactly the same syntax.
"set <variable> <value>". Assign a value to a variable.
"noinit". Disable automatic initialization of parallel ports, X1541-series cables and Commodore drives upon startup. If you change transfer-related configuration settings in a script then start your script with this command, then assign values to the necessary variables and, finally, tell the Commander to initialize the ports, cables and drives with the "init" command.
If you leave out "noinit", the ports, cables and drives are initialized upon startup, according to the settings initially loaded from the setup file, not those specified in the script, which is processed later.
This command has an effect only as the first command of a script.
"init". Initialize parallel ports, X1541-series cables and Commodore drives, according to the current values of the configuration settings.
"setdrive <string>". Load the local settings of the specified drive into the global settings, as in the "Drive setup" function of the interactive environment.
"exit". Finish batch processing and exit the Commander. The same occurs when the script file ends.
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:
<source name>: For DOS files, "<file name>" with the DOS syntax. For files on Commodore disks, "<CBM drive><file name>". For files inside image or archive files, "<image type>:<image name>\[<image path>\]<file name>".
<destination name>: See the syntax for source files. If you specify a file name only then all other destination information (image type, image name and image path) will be inherited from the source.
<image type>: "Disk", "Tape" or "File" for disk, tape or PC64 file images; "Lynx", "FileZip", "LHA", "Arkive", "TAR" or "ZIP" for Lynx, filepacked ZipCode, LHA, Arkive, TAR or ZIP archives; "GCRDisk", "DiskZip" or "SixZip" for GCR-coded disk images, diskpacked or sixpacked ZipCode archives, respectively.
Case insensitive, ASCII string.
<image name>: File name of image or archive file. A DOS file name, may or may not include a path.
<image path>: Path inside image or archive file. If it consists of multiple components, use backslashes to separate them. When missing, files are accessed in the root directory of the image. Obviously, this parameter makes no sense for images that don't support directories; in this case, the complete image path is silently discarded.
For GEOS-compatible disk images, LHA, TAR and ZIP archives, ASCII string; for other image and archive formats, PETSCII string.
<file name>: Name of a DOS or Commodore file. When omitted, destination files inherit the names of their respective source files. You may use wildcard characters ("?", "*") in both source and destination file names; for source file names, you may also use the "=" character to specify the file type.
The "?" and "*" wildcards have the usual DOS behavior under real DOS or under Windows when long file names are disabled; they behave the Windows way when long file names are available and enabled; for Commodore files, their behavior is identical to the Unix standard.
DOS file names may or may not include a path.
For DOS files, Commodore files inside GEOS-compatible disk images, and files inside LHA, TAR and ZIP archives, ASCII string; for all other files, PETSCII string.
<CBM drive>: Commodore drive. "8:", "9:", "0:" and "1:" stand for drives with the device number 8, 9, 10 and 11, respectively.
<label>: Label for a disk or tape. For a Commodore disk or a disk image, 16 characters of name, a comma, and 5 characters of ID; for a tape image, 24 characters.
<disk type>: Type of the disk image. The values "1541", "1541Ext", "1571" and "1581" stand for 35-track standard 1541, 40-track extended 1541, (double-sided) 1571 and 1581 disk images, respectively.
Case insensitive, ASCII string.
<attributes>: File attributes of a DOS or Commodore file.
For DOS files, the following attributes exist: "R" for read-only, "A" for archive, "H" for hidden and "S" for system. Enable an attribute with the "+" suffix, disable it with the "-" suffix; omitting the suffix will leave the attribute as it is.
For Commodore files, the attributes are "W" for write-protected and "C" for closed. Change the file type with "X" for deleted, "S" for sequential, "P" for program, "U" for user or "R" for relative.
For DOS files, change the date with "D<date stamp>" and the time with "T<time stamp>".
You may stack multiple attributes into a single batch command. If you change the same attribute to different values in the same command, the last value will be taken into account.
Case insensitive, ASCII string.
<date stamp>: Date stamp. In either the format specified by the regional settings of the operating system or the ISO "<year>-<month>-<day>" format. If the century is omitted from the year, values between 0 and 79 are assumed to mean years between 2000 and 2079 and 80 to 99 are taken for 1980 to 1999. However, it is highly recommended that you use the century, too. Also, to make your scripts independent from regional settings, you might want to use the ISO format.
Case insensitive, ASCII string.
<time stamp>: Time stamp. In either the format specified by the regional settings of the operating system or the ISO "<hour>[:<minute>:[<second>]]" format. The hour may either be in 12-hour format, with "a" or "p" appended to the time stamp, or in 24-hour format. To make your scripts independent from regional settings, you might want to use the ISO format.
If you omit the second, it will be set to zero. If you omit both the minute and the second, both will be set to zero.
Case insensitive, ASCII string.
<string>: Text string.
<integer>: Non-negative integer number. The "$" (dollar) prefix must be added to hexadecimal values.
Case insensitive, ASCII string.
<boolean>: Boolean value. "1", "Yes" and "True" mean true; "0", "No", "False" and an empty/missing string mean false.
Case insensitive, ASCII string.
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:
"AltHotKeys". "Alternative hotkeys". Boolean.
"AltSelectsMenu". "Alt tap selects menu". Boolean.
"AsyncTransfer". "Async transfer". Enumeration; values: "Never", "Always" and "Auto".
"AutoMenus". "Auto menus". Boolean.
"AutoSaveSetup". "Auto save setup". Boolean.
"AutoUnselect". "Auto unselect files". Boolean.
"BackupImages". "Backup image files". Boolean.
"CheckCGASnow". "Check CGA snow". Boolean.
"Clock". "Clock". Boolean.
"CommandExecMode". "Command exec mode". Enumeration; values: "Normal", "Turbo" and "Warp".
"ConfAbortTransfer". "Abort data transfer" (confirmation). Boolean.
"ConfConvFileName". "Convert file name" (confirmation). Boolean.
"ConfDeleteFile". "Delete file" (confirmation). Boolean.
"ConfDiskEditor". "Disk editor" (confirmation). Boolean.
"ConfQuitProgram". "Quit program" (confirmation). Boolean.
"ConvertChars". "Convert chars". Enumeration; values: "None", "Invalid" and "Inv+Spc".
"CopyOntoDirTrack". "Copy onto dir track". Boolean.
"CursorFollowsName". "Cursor follows file name". Boolean.
"DelayValue". "Delay value". Integer; minimum value: 0; maximum value: 255.
"DetectDiskChanges". "Detect disk changes". Boolean.
"DetectPortModes". "Detect port modes". Boolean.
"DiskCopyMode". "Disk copy mode". Enumeration; values: "Full", "BAM", "SafeBAM" and "Manual".
"DisplayStartInfo". "Display start info". Boolean.
"DOSSizesInBlocks". "DOS sizes in blocks". Boolean.
"DriveDOSType". "DOS type" for Commodore drives ("Transfer options" menu). Enumeration; values: "Speed", "Dolphin" and "Prologic".
"DriveInterleave". "Drive interleaves". Integer array; element minimum value: 1; element maximum value: 20; index values: "Files", "GEOSFiles", "NormalR", "NormalW", "TurboR", "TurboW", "AsyncTurboR", "AsyncTurboW", "HybridTurboR", "HybridTurboW", "ParallelTurboR", "ParallelTurboW", "WarpR", "WarpW", "AsyncWarpR", "AsyncWarpW", "HybridWarpR", "HybridWarpW", "ParallelWarpR" and "ParallelWarpW".
"DriveType". "Drive type". Enumeration; values: "1541", "1571", "1581", "1570" and "157x-1541".
"EndlessRetry". "Endless retry". Boolean.
"ErrorSound". "Error sound". Boolean.
"EscTogglesPanels". "Escape toggles panels". Boolean.
"Ext1541Disks". "Extended 1541 disks". Enumeration; values: "Never", "Always", "Detect".
"ExtractFileImages". "Extract file images". Enumeration; values: "Never", "Always" and "CBMDest".
"FastMouseReset". "Fast mouse reset". Boolean.
"FormatBumpsHead". "Format bumps head". Boolean.
"FullScreen". "Full screen". Boolean.
"GEOSSupport". "GEOS support". Boolean.
"HeadMovementSpeed". "Head movement speed". Integer; minimum value: 0; maximum value: 255.
"ImageInterleave". "Disk image soft interleaves". Integer array; element minimum value: 1; element maximum value: 20; index values: "1541", "1541GEOS", "1571", "1571GEOS", "1581" and "1581GEOS".
"ImageDOSType". "DOS type" for disk images ("Image options" menu). Enumeration; values: "Speed", "Dolphin" and "Prologic".
"InsMovesDown". "Ins moves down". Boolean.
"IntoFileImages". "Into file images". Enumeration; values: "Never", "Always" and "CBMSrc".
"InvalidGCRError". "Invalid GCR Error". Enumeration; values: "None", "23" and "24".
"KeepDateStamps". "Keep date stamps". Boolean.
"KeepLocaseChars". "Keep lowercase chars". Boolean.
"KeepNonStandardExt". "Keep non-standard ext". Boolean.
"KeepUpcaseChars". "Keep uppercase chars". Boolean.
"KeyBar". "Key bar". Boolean.
"LeftHandedMouse". "Left-handed mouse". Boolean.
"LongFileNames". "Long file names". Boolean.
"LPT4". Address of first custom parallel port. Integer; minimum value: $0200; maximum value: $F800. Set the variable "SerialInterface" or "ParallelInterface" to 4 to use this port.
"LPT5". Address of second custom parallel port. Integer; minimum value: $0200; maximum value: $F800. Set the variable "SerialInterface" or "ParallelInterface" to 5 to use this port.
"ManualTimeouts". "Manual timeouts". Boolean.
"MenuBarVisible". "Menu bar visible". Boolean.
"OrigFormatPattern". "Orig format pattern". Boolean.
"ParallelCable". "Parallel cable". Enumeration; values: "None", "XH15x1" and "XP15x1".
"ParallelInterface". "Parallel interface". Integer; minimum value: 1; maximum value: 5. Also see the variables "LPT4" and "LPT5".
"PathPrompt". "Path prompt". Boolean.
"PreferLongNames". "Prefer long names". Boolean.
"ProgramExt". "Program extension". String; maximum length: 16 characters.
"QualityC64Charset". "Quality C64 charset". Boolean.
"RetryBumpsHead". "Retry bumps head". Boolean.
"RetryNum". "Number of retries". Integer; minimum value: 0; maximum value: 63.
"RetryOnHalftracks". "Retry on halftracks". Boolean.
"ScreenBlank". "Screen blank". Integer; minimum value: 0; maximum value: 60.
"ScreenColor". "Screen colors". Enumeration; values: "B&W", "Color" and "Laptop".
"SerialCable". "Serial cable". Enumeration; values: "None", "X1541", "XE1541", "XH1541" and "XA1541".
"SerialInterface". "Serial interface". Integer; minimum value: 1; maximum value: 5. Also see the variables "LPT4" and "LPT5".
"ShowReadErrors". "Show read errors". Boolean.
"SmartRetryNum". "Num of smart retries". Integer; minimum value: 0;
maximum value: 255.
"TransferMode". "Transfer mode". Enumeration; values: "Normal", "Turbo" and "Warp".
"VerifyWrite". "Verify write". Boolean.
"VESASupport". "VESA Support". Boolean.
"WarnFileSizes". "File sizes" (warning). Boolean.
"WarnTransfer". "Data transfer" (warning). Boolean.
"WipeDeletedFiles". "Wipe deleted files". Boolean.
The second group of variables consists of automatic replies for confirmation messages:
"AutoDelete". Delete files. Enumeration; values: "Ask" (default), "All" and "SkipAll".
"AutoDeleteDir". Delete not empty DOS directories. Enumeration; values: "Ask" (default), "All" and "SkipAll".
"AutoDeleteReadonly". Delete read-only DOS and write-protected Commodore files. Enumeration; values: "Ask" (default), "All" and "SkipAll".
"AutoOver". Overwrite already existing files. Enumeration; values: "Ask" (default), "All" and "SkipAll".
"AutoOverReadonly". Overwrite already existing read-only DOS and write-protected Commodore files. Enumeration; values: "Ask" (default), "All" and "SkipAll".
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:
Note that you have to specify "\\" or "\$5C" to display the "\" character.
$xx: The character having the hexadecimal ASCII code "xx".
N: Line feed.
R: Carriage return.
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:
Note that you have to specify "%%" or "\$25" to display the "%" character.
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:
N, +N: Pad the string with spaces from the left to N characters if it's shorter than that.
-N: Pad the string with spaces from the right to N characters if it's it's shorter than that.
The second group of width specifiers is the following:
/N: Cut the string to its first N characters if it's longer than that.
/-N: Cut the string to its last N characters if it's longer than that.
/+N: Cut the first N-1 characters off the string, only keep the part starting with the Nth character.
*: Display the "sum" of the specified type: for "f"/"F", the number of containers; for "n"/"N", the number of files in the current container; for "s", the total size of files in blocks in the current container; for "S", the total size of file in bytes in the current container. Has no effect on other types.
G: Use the GEOS form of types "i", "I", "l", "L", "n"/"N" and "t"/"T", if the container is a GEOS-formatted disk image. Has no effect on other types.
H: Convert "invalid" PETSCII characters ones that have no exact ASCII equivalent or are usually not allowed in file names to hexadecimal codes in the form of "%xy". Makes sense for types "i", "I", "l", "L" and "n"/"N" and has no effect on other types.
Q: Enclose the string into quotation marks, before padding it and cutting it to maximum width.
U: Use the uppercase/graphics character set, instead of the default lowercase/uppercase character set for types "i", "I", "l", "L", "n"/"N" and "t"/"T". Has no effect on other types.
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:
b: Number of free blocks in disk images. 0 for other container formats.
B: Number of free blocks in disk images, including those on the directory track(s). 0 for other container formats.
d, D: Drive letter, including the trailing colon.
e: Short file extension, including leading dot.
E: Long file extension, including leading dot.
f: Short file name, excluding extension.
F: Long file name, excluding extension.
i: Short, two-character ID code of disk images. Empty for other container formats.
I: Long, five-character ID code of disk images. Empty for other container formats.
l: Container label. For disk images, the ID code is excluded and all trailing Shift-spaces removed.
L: Container label. For disk images, the five-character ID code is included, separated with a comma.
p: Short absolute path, excluding driver letter but including leading and trailing backslash.
P: Long absolute path, excluding driver letter but including leading and trailing backslash.
r: Short absolute path, excluding driver letter, leading and trailing backslash.
R: Long absolute path, excluding driver letter, leading and trailing backslash.
Types related to Commodore files inside the containers are the following:
a: Load address of file, in hexadecimal, with a leading "$" sign. Empty for phantom files and files inside compressed LHA, LHA SFX, ARC, ARC SDA and ZipCode archives.
A: First track and sector of file, in the form "tt;ss", in disk images. Empty for other container formats.
c: Closed/splat flag. Empty for closed, "*" for splat.
C: Closed/splat flag. 0 for closed, 1 for splat.
n, N: File name.
s: File size, in blocks.
S: File size, in bytes. Displays the maximum possible value for container formats that store file sizes in blocks.
t, T: File type.
w: Write-protection flag. Empty for unprotected, "<" for protected.
W: Write-protection flag. 0 for unprotected, 1 for protected.
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:
Note that the symbol "%?!" ends the innermost conditional block.
^: Outputs block only when processing the first file of the current container.
$: Outputs block only when processing the last file of the current container.
H: Outputs block and only that block, no data outside it before processing the first container, for a header. You shouldn't use any field specifier in this block because no data has been read yet.
F: Outputs block and only that block, no data outside it after having processed the last container, for a footer. You shouldn't use any field specifier, except for "%*f", in this block because all data has already been discarded.
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:
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.
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.
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
Convert all the files in a disk image into PC64 file images:
sc /cmd copy disk:C:\DISKS\diskname.d64\* file:C:\PC64\
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*
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.
Move a complete DOS directory structure, recursively, onto another drive:
sc /cmd move C:\GAMES D:\
Examples for deleting files and directories:
Delete all sequential files from a Lynx archive:
sc /cmd delete lynx:C:\LYNXES\lynxname.lnx\*=s
Delete a complete DOS directory structure recursively:
sc /cmd delete C:\TEMP
Examples for copying and converting disks:
Copy a double-sided 1571 disk image onto a Commodore disk in drive #10:
sc /cmd diskcopy disk:C:\DISKS\twosides.d71 0:
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:
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.
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:
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.
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:
View a diskpacked ZipCode archive, at sector level, in the disk editor:
sc /cmd diskedit C:\ZIPDISKS\!1disk
Examples for changing file attributes:
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.
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.
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:
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
sc /cmd view 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.
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
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.
Edit the AUTOEXEC.BAT file:
sc /cmd edit c:\autoexec.bat
Examples for formatting, validating, cleaning, protecting, minimizing images and sending user commands:
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.
Reformat a tape image:
sc /cmd format tape:C:\TAPES\tapename.t64 Reformatted
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:
Clean or safe clean a disk image:
sc /cmd clean disk:C:\DISKS\garbage.d64
sc /cmd safeclean disk:C:\DISKS\garbage.d64
Protect or unprotect a disk image:
sc /cmd protect disk:C:\DISKS\useful.d64
sc /cmd unprotect disk:C:\DISKS\useless.d64
Minimize a tape image:
sc /cmd minimize tape:C:\TAPES\fulltape.t64
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:
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!
# 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
# 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.
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:
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:
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".
Display the directory of a Commodore disk:
sc /cmd list 8:\* dirlist.txt format.txt
Format specification examples for the "list" command:
Display an output identical to the Commodore disk directory list, using the lowercase/uppercase character set:
0 "%-16gl" %gI\r\n%?!
%?$%b blocks free.\r\n%?!
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%?!
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:
%?^Directory list of %D%P%F%E<P>\r\n%?!
%?fListed %*f files.\r\n
A simple way of creating a CSV file with a header that you can easily import into a database:
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:
The following features make the Commander the best of its kind:
It is very comfortable to use the well-known Commander-style environment. There is no need to learn sequences of weird key combinations, only press some familiar ones. You can always clearly see what's happening on the screen.
Several configuration options allow power users to tune the Commander to maximum performance.
The Commander has built-in support for several archive formats (Arkive, Lynx, LHA, TAR, ZIP, filepacked ZipCode, diskpacked ZipCode and sixpacked ZipCode). The external Star Utilities also help you with mass conversion.
The batch processing capability is more powerful than that of any similar software. For common tasks, you can create scripts and execute those any time, with as few user interaction as possible.
The disk turbos, for Commodore 1541, 1570, 1571 and 1581 disk drives, provide an excellent compromise between transfer speed and reliability. Below are benchmarks of the Commander under real DOS, with default settings. Serial normal transfer mode is missing from these tables: as the transfer time is around 8-20 minutes for a full disk, you should avoid it at all costs!
Commodore 1541-II drive, 35-track disk. The disk contains a 210-block file, stored below track #18.
+--------------------+-------------------+------------------+ | Full disk copy | Read from drive | Write to drive | +--------------------+-------------------+------------------+ | Serial turbo | 1:31  | 1:22  | +--------------------+-------------------+------------------+ | Serial warp | 1:16  | 1:19 [1,2] | +--------------------+-------------------+------------------+ | Async turbo | 1:43  | 1:31  | +--------------------+-------------------+------------------+ | Async warp | 1:29  | 1:31 [1,2] | +--------------------+-------------------+------------------+ | Hybrid turbo | 1:09  | 0:48  | +--------------------+-------------------+------------------+ | Hybrid warp | 0:50  | 0:29 [1,2] | +--------------------+-------------------+------------------+ | Parallel turbo | 0:48  | 0:48  | +--------------------+-------------------+------------------+ | Parallel warp | 0:23  | 0:29 [1,2] | +--------------------+-------------------+------------------+
 This transfer mode is capable of retrying bad sectors.
 This transfer mode is capable of verifying data written onto the disk.
+--------------------+-------------------+------------------+ | 210-block file copy| Read from drive | Write to drive | +--------------------+-------------------+------------------+ | Serial turbo | 1:00 | 1:01 | +--------------------+-------------------+------------------+ | Serial warp | 0:26  | 0:26  | +--------------------+-------------------+------------------+ | Async turbo | 1:00 | 1:01 | +--------------------+-------------------+------------------+ | Async warp | 0:30  | 0:28  | +--------------------+-------------------+------------------+ | Hybrid turbo | 0:22 | 0:24 | +--------------------+-------------------+------------------+ | Hybrid warp | 0:18  | 0:10  | +--------------------+-------------------+------------------+ | Parallel turbo | 0:22 | 0:24 | +--------------------+-------------------+------------------+ | Parallel warp | 0:10  | 0:10  | +--------------------+-------------------+------------------+
 This transfer mode is capable of retrying bad sectors.
 This transfer mode is capable of verifying data written onto the disk.
Commodore 1571 drive, 70-track disk.
+--------------------+-------------------+------------------+ | Full disk copy | Read from drive | Write to drive | +--------------------+-------------------+------------------+ | Serial turbo | 1:35  | 1:48  | +--------------------+-------------------+------------------+ | Serial warp | 1:41  | 1:48 [1,2] | +--------------------+-------------------+------------------+ | Async turbo | 1:54  | 1:58  | +--------------------+-------------------+------------------+ | Async warp | ?:??  | 2:02 [1,2] | +--------------------+-------------------+------------------+ | Hybrid turbo | 1:06  | 1:06  | +--------------------+-------------------+------------------+ | Hybrid warp | 1:01  | 1:06 [1,2] | +--------------------+-------------------+------------------+ | Parallel turbo | 0:39  | 1:06  | +--------------------+-------------------+------------------+ | Parallel warp | 0:43  | 0:52 [1,2] | +--------------------+-------------------+------------------+
 This transfer mode is capable of retrying bad sectors.
 This transfer mode is capable of verifying data written onto the disk.
Commodore 1581 drive, 80-track disk.
+--------------------+-------------------+------------------+ | Full disk copy | Read from drive | Write to drive | +--------------------+-------------------+------------------+ | Async turbo | 3:51 | N/A  | +--------------------+-------------------+------------------+
 The disk turbo for writing disks in 1581 drives is not available yet.
Most of the image file handling routines are faster than those of the other similar programs.
Hopefully, you remember Disk-Demon, the great C64 disk editor, written by Georg Brandt and Andreas Wellié in 1986/87. A similar disk editor is built into the Commander so that you can modify data in disk images and on disks in Commodore drives directly.
The Commander can optionally display everything with the C64 character set (only on EGA/VGA video cards).
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 programs, 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:
1541 drives. 1 MHz; single-sided disks.
1570 drives, in native 1570 mode. 2 MHz; single-sided disks.
1571 drives, in native 1571 mode. 2 MHz; double-sided disks are supported as well single-sided ones: the Commander autodetects the number of sides on the disk.
1570/1571 drives, forced into 1541 emulation mode: 1 MHz; single-sided disks.
1581 drives. Disk turbos are continuously being implemented for them. Read the online history at the SC beta page for more details.
Other Commodore drives and CMD drives are not and, most probably, will never be supported as the author doesn't have any of them.
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 programs page and test your cable with it.
Serial cables are the following:
The X1541 cable works on older type SPP and PS/2 parallel ports, ones that have bidirectional control lines. The parallel port on I/O controller cards for 286, 386 and 486 machines and on Hercules video cards and the integrated parallel port of most newer 486 motherboards support the X1541 cable but only certain Pentium motherboards have compatible parallel ports. On motherboards with an integrated parallel port, you have to set the mode of the parallel port to SPP because the X1541 cable won't work with EPP and ECP parallel ports. However, on many newer motherboards, there's absolutely no way to make the X1541 cable work because the control lines are not bidirectional in any mode of the parallel port. You can test your parallel port's compatibility with the X1541 cable using X1541Test. If it proves to be incompatible then you need one of the other serial cables.
The XE1541 extended cable is a substitution for the X1541 cable. Its advantage is that works in all modes of all parallel ports. Its drawbacks are that you need special diodes to build it and that only a few programs support it. Please, note that this cable has problems with motherboards that use the ALI 5 chipset and certain laptops. On these machines, use the XA1541 active cable instead.
The XM1541 multitask cable differs from the XE1541 extended cable in two wires swapped at the Commodore end. This enables other transfer programs to use interrupts rather than polling for handshake with the external Commodore drive. Its drawbacks are similar to the XE1541 extended cable. It's supported by less programs than the XE1541 extended cable, however, it works under GNU/Linux, as well.
The XA1541 active cable is similar to the XM1541 multitask cable but it uses transistors and resistors instead of diodes. This makes it the ultimate transfer cable because it works with all kinds of parallel ports, including the ones the XE1541 extended cable and the XM1541 multitask cable have problems with. Again, it is supported by only a few programs and the transistors needed are quite hard to find. This cable also works under GNU/Linux.
Optional parallel cables are the following:
The XH1541 hybrid cable speeds up communication with a Commodore 1541 drive drive in all modes of all parallel ports. Its advantage is that sending data to the drive becomes 3 times, receiving data becomes 1.5 times faster. Its disadvantage is that you have to modify your drive internally so that you can connect this cable to a parallel plug on the drive. You can't use this cable alone, only together with the X1541 cable. You can't use this cable together with the other serial cables on the same port, because of the conflict between the pins used by the two cables on the PC parallel port.
The XH1571 hybrid cable is a modified version of the XH1541 hybrid cable, designed for 1570 and 1571 drives. Apart from the periphery chip used in the Commodore drive, it is the same concept as the XH1541.
The XP1541 parallel cable speeds up communication with a Commodore 1541 drive via a PS/2, EPP or ECP parallel port where the data lines are bidirectional. Its advantage is that both sending data to and receiving data from the drive becomes 3 times faster. Its disadvantages are that you have to modify your drive internally so that you can connect this cable to a parallel plug on the drive. Also, its need for a bidirectional port excludes the possibility to use it along with the X1541 cable, except on PS/2 ports. You can't use this cable alone, only together with one of the serial cables above.
The XP1571 parallel cable is a modified version of the XP1541 parallel cable, designed for 1570 and 1571 drives. Apart from the periphery chip used in the Commodore drive, it is the same concept as the XP1541.
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/ | | |  |  |Multitask/ | | | | | Active | +-----------------+-----------+-----------+-----------+ | Medium speed | Normal+ | Normal+ | | | | Hybrid | Hybrid | | | | |  | | +-----------------+-----------+-----------+-----------+ | Maximum speed | | Normal+ | Extended/ | | | | Parallel |Multitask/ | | | | | Active+ | | | | | Parallel | +-----------------+-----------+-----------+-----------+
 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 | | |  | [1,2,3] | [1,2] | +---------------------+-----------+-----------+-----------+ | Maximum speed | | Normal+ | Normal+ | | | | Parallel | Parallel | +---------------------+-----------+-----------+-----------+
 This is not the maximum performance for your parallel ports, you may want to use another cable configuration.
 You don't need two parallel ports for this cable configuration, you may hook the indicated cables up to the primary parallel port.
 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 | | |  |  |  | +---------------------+-----------+-----------+-----------+
 This is not the maximum performance for your parallel ports, you may want to use another cable configuration.
 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 |  |  | Extended/ | | | | |Multitask/ | | | | | Active | | | | |  | +---------------------+-----------+-----------+-----------+ | Medium speed |  |  | Extended/ | | | | |Multitask/ | | | | | Active+ | | | | | Hybrid | +---------------------+-----------+-----------+-----------+ | Maximum speed |  |  | Extended/ | | | | |Multitask/ | | | | | Active+ | | | | | Parallel | | | | |  | +---------------------+-----------+-----------+-----------+
 You shouldn't have an EPP/ECP parallel port as your primary port. Swap parallel ports and try again.
 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 programs 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:
In 1541 drives, nothing is defined to any of the bits of Port A. You may solder the XH1541 interface and the XP1541 interface without any problem.
In 1541C drives, bit 0 of Port A is used for the detection of the head being over track 1. After stripping this connection off of the chip, you will have to replace the DOS ROM with that of the 1541 or the 1541-II. Otherwise you'll get strange results when the drive is seeking: the DOS tries to rely on the detector line which doesn't exist anymore.
In 1541-II drives, bit 0 of Port A is grounded. Strip this connection off of the chip.
In 1570 and 1571 drives, there are several lines connected to the bits of Port A of VIA#1. You can't use the 1541 version of the XH1541 interface and the XP1541 interface with them. However, you may use the XH1571 or XP1571 interfaces, cables of the same design as the XH1541 and the XP1541 interfaces, with a different chip, namely the CIA, most of whose pins are unused in these drives.
1581 drives are completely different from the aforementioned members of the Commodore drive family. You can't use the XH1541, XP1541, XH1571 or XP1571 interfaces with them. Although there exists a parallel cable for 1581 drives, it is relatively complicated as it needs an additional chip soldered into the drive and, therefore, its usefulness is questionable.
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 programs 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.
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 programs 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 programs 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).
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 programs, 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 programs 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 programs. If you want to test your cable, download XCTest from the useful external programs 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 programs 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!
The following problems and limitations are documented below so, please, don't bother reporting them:
Symptom: Errors during data transfer sometimes lock up your PC.
Reason: Timeouts are not handled and all PC interrupts are disabled while accessing the Commodore drive.
Solution: Generate a timeout manually by pressing Escape or F10 if "Manual timeouts" is enabled or by unplugging the serial cable from either the PC or the Commodore drive.
Symptom: Various transfer problems occur under multi-tasking systems.
Reason: Accessing Commodore drives under multi-tasking systems is not supported very well.
Solution: For GNU/Linux, you should be using a native application instead. For Windows NT4/2000/XP/2003, use the OpenCBM driver or see the tweak package to make the Commander work under these operating systems. Though, for best results, you should use real DOS anyway. Please, read the "Usage" section for more details.
Symptom: Only one of the panels may show a Commodore drive and the disk turbos don't work if there are more drives connected and switched on.
Reason: You can't use more than one Commodore drive at a time. For maximum speed, the disk turbos also use the ATN line for handshake. If there are several peripherals on the same serial bus, the other peripherals will also answer the ATN call, messing the data transfer of the disk turbo.
Solution: Have all needed drives connected but only one of them switched on. The "Drive setup" function helps you with configuring and switching among your drives easily.
Symptom: When trying to access certain disks in a 1541 drive or in a 1570 or 1571 drive that is switched into 1541 emulation mode by setting the drive type to "157x->1541" , the Commander keeps reading the disk until you take the disk out of the drive.
Reason: Because "Extended 1541 disks" is set to "Detect", the Commander tries to find out whether the disk has 35 or 40 tracks, by reading sector 36;00. However, track 36 of the disk is completely empty and the Commander falls into an endless loop.
Solution: Set "Extended 1541 disks" to "Never" (35 tracks) or "Always" (40 tracks), depending on the number of tracks on the disk. Alternatively, you may reformat the disk to 40 tracks (then the Commander will recognize the disk immediately as having 40 tracks) or "vacuum" track 36 with Disk Demon on a Commodore machine (then the detection will fail at an instant and the disk will be recognized as having 35 tracks).
Symptom: For certain 1571 drives, it may take as long as a full minute to accept single-sided floppy disks, when the drive type is set to "1571" or "1570".
Reason: The other side of the floppy disk is completely empty and the 1571 drive can't easily find out whether the disk is single- or double-sided. This is a bug in older 1571 DOS revisions and has nothing to do with the Commander, as it also occurs when the drive is connected to a Commodore machine.
Solution: Format the other side of the floppy disk. After that, the 1571 drive will be able to recognize soon that it's single-sided.
Symptom: After having copied certain disks either from a disk image to a Commodore disk or vice versa , the copy does not work because the Commodore software does not recognize its own disk.
Reason: The software uses sector header ID's to recognize its own disks but disk images do not contain this information. When building the image of a virtual Commodore disk internally, emulators such as CCS64 and VICE copy the "cosmetical" BAM ID the two bytes at offsets $A2 and $A3 of the BAM sector, sector 18;00 into sector header ID's. However, if the BAM ID is different from the real sector header ID then the software will become confused. The same occurs if you copy the disk image onto a Commodore disk and the destination disk contains different sector header ID's than the software expects.
Solution: When copying a Commodore disk to a disk image, change the BAM ID to the expected sector header ID afterwards; the "Check BAM ID against header ID" option in the "Copy disk" dialog box helps you with this. When copying a disk image to a Commodore disk, check "Format destination disk" to have the destination Commodore disk preformatted with the BAM ID of the source disk image.
Note: Other disk-based file formats GCR-coded disk images, diskpacked ZipCode archives and sixpacked ZipCode archives all have separate sector header ID's so this problem does not arise with them. That is, unless they were automatically converted from disk images that lack sector header ID's.
Symptom: GCR-coded disk images, diskpacked ZipCode archives and sixpacked ZipCode archives can't be written to, apart from creating them by conversion from another disk-based format.
Reason: The structure of these file formats is too complicated for easy write support.
Solution: You should load such files into an emulator instead and do the necessary changes there, with native Commodore software. If the emulator doesn't support a particular disk-based format directly, convert it to a format that the emulator does support, load that into the emulator, do the changes and convert the changed files back to the original format. Make sure that no information, that was present in the original files, is lost during the conversions, though.
Symptom: You can't copy GEOS files from and to and relative files to Commodore disks. Also, it is not possible to delete GEOS files on Commodore disks or to validate GEOS disks.
Reason: These features have not been implemented.
Solution: Use the disk copier to copy such files, as part of a disk or disk image, instead.
Symptom: When copying a GEOS file from a DOS file (in Convert format) into an image or archive file, the manual file name conversion box offers the DOS file name, rather than the original Commodore file name inside the Convert archive.
Reason: The dialog box is displayed before the Commander would read any data from the source file and recognize that it's in Convert format.
Note: The source and destination files are opened at the very beginning of the file copy. At this point, no data has been read from the source file yet so its internal structure is unknown. A possible solution would be to preread some data from the source file, before opening the destination file. However, as this also has its own disadvantages, it is currently under evaluation.
Symptom: In 1581 disk images, it is impossible to enter subdirectories whose names contain the "/" (slash) character.
Reason: Similarly to Unix, the Commander uses the slash character to separate path components. Therefore, this character is not allowed as part of file or directory names.
Solution: Rename the directory. If having problems, you may want to use the disk editor to change the directory name directly on the disk.
Symptom: In LHA archives, files, whose names contain the "/" (slash) character, are displayed as if they were inside a subdirectory and only the rightmost end of their name is kept.
Reason: Similarly to Unix, the Commander uses the slash character to separate path components. Therefore, this character is not allowed as part of file or directory names.
Solution: Extract the files, rename them to a more appropriate name and then rearchive them into another LHA archive.
Note: Actually, because the original LHA archiver was written for DOS, the internal path separator of LHA archives is the "\" (backslash) character. Commodore-based LHA archivers as well as the Commander convert forward slashes to backslashes, when archiving files, and backslashes to forward slashes, when extracting files.
Symptom: When reading large directories, you get an error message about having run out of memory and files are missing from the panel display.
Reason: The Commander doesn't show more than 512 directory entries per panel and there's also a limit on the total length of file names. This is because of constraints on conventional memory usage.
Solution: Split such DOS directories and image and archive files into multiple parts.
Symptom: Some very long directories in disk images are not read in completely.
Reason: On 1541 and 1571 disks, the maximum number of directory entries is 144; on 1581 disks, 296. If there are more files on a disk then part of the directory is outside the directory track, which may only be the result of manually editing the disk. Although real Commodore drives don't complain about this, it is non-standard and the Commander doesn't support it.
Solution: Don't store too many files on Commodore disks.
Symptom: Very long file and path names, those over 254 characters, are truncated.
Reason: An inherent limitation of the Pascal language, in which strings may not be longer than 255 characters.
Solution: Use shorter file and directory names and not so deep directory structures.
Symptom: Files, extracted by the Commander or Star LHA from LHA archives, contain incorrect data.
Reason: Instead of the usual "extract" command of LHA, both the Commander and Star LHA use the "print" command, which only works correctly with LHA 2.14 and newer versions. With older versions of LHA, you will find garbage in the extracted files.
Solution: Upgrade your copy of LHA for DOS. You can find it at the useful programs page. Please, read the "Usage" section for more details.
Note: Actually, there's nothing wrong with older LHA releases. The only problem is that their "print" command prepends the name of the file to the uncompressed file data, for each file printed.
Symptom: The Commander complains about the archive being corrupted and starts printing something, when extracting files from ZIP archives.
Reason: Instead of the usual "extract" command of ZIP, the Commander uses the "console print" command. As PKZIP 2.xx puts garbage into the output and, actually, sends it to the printer, the Commander supports Info-ZIP instead.
Solution: Use Info-ZIP instead. You can find it at the useful programs page. Please, read the "Usage" section for more details.
Note: As PKZIP is not available free of charge, you shouldn't use it anyway.
Symptom: The Commander complains about the archive being corrupted, when extracting files from ZIP archives.
Reason: The DPMI server CWSDPMI , integrated into the 32-bit DOS version of Info-ZIP, doesn't like some memory managers and DPMI servers. The 32-bit Windows version, obviously, runs under 32-bit Windowses only. It's also possible that there's not enough memory for Info-ZIP.
Solution: Use the 16-bit DOS version of Info-ZIP instead; you can find it at the useful programs page. Also, make sure there's enough memory left for it. Please, read the "Usage" section for more details.
Symptom: Extraction of files, even small ones, from large LHA or ZIP archives takes a long time and creates a large temporary file, as well.
Reason: Because the Commander does not expect the DOS-based external archivers to be able to handle long file names or file names with spaces or invalid characters, file names are never passed to archiver programs. Upon copying one or more files out of an LHA or ZIP archive, the contents of the complete archive are extracted, as a single stream, into a temporary file and then the necessary fragments picked out of it.
Solution: Use relatively small LHA and ZIP archives only.
Symptom: Under Windows, some bytes are lost from the end of blocks, that contain zero bytes, when pasting them into input lines or into the editor main window.
Reason: The common clipboard of Windows pads text data with zero bytes to a multiple of 32 bytes.
Note: Fortunately, this doesn't occur with normal text, only binary data.
Some of these problems may later be solved and some will not.
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:
The description of the important components of your PC: motherboard brand and type, CPU type and speed, integrated chipset brand and type. Refer to your motherboard manual for this information.
The name and version of the operating system used.
The exact version number of your Commander copy. Note that beta releases have a third version number, too, e.g. "0.12.34 beta".
What error you get and when you get it. Make sure to quote the exact error message!
The SC.INI file you used when the problem occurred.
A step-by-step guide on how to reproduce the error. Even if it occurs for you all the time, it might not be trivial to make the Commander do it again on another setup. For this reason, make sure that you have tried your own guide on a different PC and you managed to reproduce the error there, too!
If you were using a batch command then quote it. If you were running a script then attach the script file.
If the problem occurs only with a certain file or set of files then attach it/them, as well.
If you're having problems with accessing a Commodore drive then add the following information, as well:
The type of the serial and, optionally, the parallel cable that you used between the Commodore drive and the PC. Also, where you got the cable from: self-made; bought it in The X1541 Shop (see URL below); bought it somewhere else (URL and/or E-mail address of seller, please).
The type of your Commodore drive.
XCDetect's output in debug mode, by typing "xcdetect -d > output.txt" into the DOS command line, and attaching the resulting "output.txt" file. You may also want to run XCTest and include its output, too.
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.
The following bugs have been fixed since Version 0.83. For a complete list of bug fixes since older releases, see HISTORY.TXT.
No more lockups upon changing the drive on notebooks with a weird BIOS
and no floppy drive.
Problems accessing the Windows clipboard have been fixed.
The viewer now correctly shows search results in files with extremely
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.83. For a complete list of changes since older releases, see HISTORY.TXT.
Introducing DOS 32-bit DPMI version.
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:
Bug fixes, of course...
Support for the XUM1541 interface via the OpenCBM driver.
Finish support for 1581 drives: more disk turbos for copying files and disks.
Support for GCR-coded disk images.
A "Find file" function, with the ability to search for textual and binary contents and search inside image files and uncompressed archive files.
Medium priority changes:
Display files in the border sector of GEOS disk images.
Allow associating menu files to different file name patterns in extension files.
XMS and EMS usage for storing temporary data in DOS shells, to give more memory to programs and, also, for storing the clipboard.
Show the header ID of the current sector in the disk editor.
"!?<title>?<init>!" symbol in menu and extension files for asking the user to specify the value to be inserted into the command.
Circumvent the single-sided disk recognition delay bug in older 1571 DOS revisions.
Speed up the editor with a line buffer, for slow PC's.
Make the editor allocate new sectors in the disk image if the file being edited grows beyond its original size and, similarly, free unneeded sectors if the file shrinks.
The Star Utilities should be able to traverse directory structures.
Low priority changes that may not be implemented at all:
Support for reading, writing and formatting 1581 disks in the PC floppy disk drive that is, integrating Wolfgang Moser's 1581COPY into the Commander.
An alternative timing system that uses the Pentium time stamp counter.
Support for copying GEOS files from and to external Commodore drives, deleting them and validating and formatting GEOS disks.
Support for copying relative files to external Commodore drives.
Comparing files or complete directory structures of files (recursively), no matter what format they are in.
Allow to insert separator lines into the directory of disks and disk images; perhaps, some time a full-blown directory editor.
Ability to create custom C128-style boot sectors, either with precompiled code or with the standard boot sector command to load a program off the disk.
Interactive file copier that allows you to exactly tell onto which sectors to put the destination file data, when copying into disk images.
Allow copying directory structures from and into 1581 disk images and LHA and TAR archives.
Smart disk and disk image filling algorithm that copies the source files in groups that fill in the destination disk or disk image as much as possible.
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.
The following Web pages iv you useful information related to the Commander:
The Star Commander homepage
Here you may always find the latest public release, along with its full source.
The Star Utilities homepage
The Star Utilities are external programs, for mass conversion between Commodore-related file formats. At their homepage, you may always find the latest public releases, along with their full source.
The Star Commander beta page
Here you may see information (bug fixes, modifications, new features) about the beta versions of the Commander and the utilities being developed and tested and download these betas, along with their source. This is the only place on the Net where you may find beta releases of these programs; do not republish them!
Useful external programs for the Commander
Here you may find some additional programs that help you with handling compressed archives and with debugging Commander- and cable-related problems.
LFN emulators page
Here you may find emulators, for both DOS and Windows NT, that allow DOS programs to access long file names.
X1541-series cables and adaptors page
Here you may browse the description of the X1541-series interfaces, those supported by the Commander and other transfer and server programs. Also, there are construction pages that show you how to build the cables and adaptors yourself.
The X1541 Shop
Here you may buy X1541-series and other cables and adaptors for low prices.
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:
The C64 tools list, MS-DOS section (Sweden)
... and the following FTP sites:
Arnold, home of the Commodore games (USA)
The Badlands (Austria)
Computer Workshops FTP site (USA)
The Digital Dungeon (The Netherlands)
Gangsta's Paradise (Hungary)
Kiarchive FTP server (Russia)
Padua FTP site (Germany)
Zimmers.net Funet archive (Finland)
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.
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:
Todd A. Aiken
Michael J. Darschewski
Olav Morkrid/Panoramic Designs
The following people have contributed code fragments or concepts, ideas or algorithms were taken from their programs:
Will Corley: BASIC program prepended to Lynx archives
DarkStar: directory lister in filepacked ZipCode archives
Marko Mäkelä: original ZipCode and UnLynx programs for DOS
Chris Smeets: Commodore ARC and LHA extractors
Turóczi Ferenc: original warp validate software for the C64
The following people have given miscellaneous help with the development:
Andreas Boose: discussion about the 1581 track cache
Markus Gebhard: several sample 1571 disk images
Hársfalvi Levente: the idea of TAR support for long file names
Frank Kontros: help with parallel cables and disk verification
Chris Link: many good ideas concerning the development
Pasi Ojala: help with the layout of 1581 disks
Ettore Perazzoli: discussion about the GNU Public License
Noam Ravid: report on behavior under dosemu
Carl Reilly: initial report of the iDock + VirtualPC solution
Slaygon/Censor: permanent WWW and E-mail address
SVS/[FIRE]: additional, 256-color icons
Andres Valloud: general Pascal code optimization ideas
Joe Votour: help with the way GEOS saves files
Special thanks go to:
Mr. Axel for manufacturing cables and adaptors for The X1541 Shop
BBT/Breeze for his 1571 drive
Berkeley Softworks for GEOS
Bigfoot/Breeze for the XH1541 hybrid cable and other ideas
Borland International for Borland Pascal and Turbo Assembler
Ralf Brown for the x86/MSDOS Interrupt List
Commodore Business Machines for the Commodore computers
The Free Pascal Team for Free Pascal and the Free Vision library
Leopoldo Ghielmetti for X1541 and the X1541 cable
Michael Klein for the XA1541 active cable
Wilbert van Leijen for the OverXMS unit
Wolfgang Lorenz for Personal C64
Miha Peternel for the C64 Software Emulator
Hans Pieters for his 1581 drive and other Commodore equipment
Eugene Roshal and the FAR Group for FAR Manager
Peter Schepers for 64COPY
Bernhard Schwall for Trans64
John Socha for The Norton Commander
Per Håkan Sundell for the CCS64 emulator
Spiro Trikaliotis for the cbm4win/OpenCBM software package
The VICE Team for the VICE emulator package
Vsevolod V. Volkov for The Volkov Commander
And thanks to you, too, for using the Commander. Especially, if you took the time to register it.
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:
Orsolya u. 5. IV/12.
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.
6th February, 2011
(This page best viewed with any browser)