Spiro's home on the web

VERSION 0.4.99.94 (ALPHA STAGE!) (January 27th, 2012)

Many, many fixes and installation is easier now.

VERSION 0.4.99.89 (ALPHA STAGE!) (September 17th, 2010)

Installation of all plugins on Windows and Linux should work.

VERSION 0.4.0.80 (ALPHA STAGE!) (March 8th, 2009)

NOTE: This software is in a early state, although its main parts are working. However, not all parts are working as they should.

This version has been given out to some people who want to test it. Unfortunately, I did not have the time to update this page yet.

You should not edit the opencbm.conf file anymore, neither on Windows, nor on Linux. If you want to use this version, please write me a mail, and I will explain it to you. This text would be a good basis for an update of this page. ;)

VERSION 0.4.0.62 (ALPHA STAGE!) (May 6th, 2007)

NOTE: This software is in a VERY early state. Parts are not yet working as they should. Do not use this version unless you really, really want to test the software.

This version fixes a nasty bug which prevented tools using the old APIs to work. (for example, flash, morse, but also mnib/nibtools did not work.)

VERSION 0.4.0.60 (ALPHA STAGE!) (May 1st, 2007)

Additionally to the 0.4.0.51 version, this version added --adapter/-@ command-line options to cbmctrl, cbmcopy, d64copy, cbmformat, cbmforng, and cbmrpm41. This options is not yet shown in the help, but it is there.
You can use it this option to select the plugin. That is, "-@ xu1541" selects the xu1541, "-@ xa1541" selects the xa1541 plugin, respecively. Of course, for this to take effect, they have to be available in the /etc/opencbm.conf file. The name is the one that is specified between in the [...] lines.
There is also the possibility to specify a port number. Take, for example, you have two parallel ports. Then you can specify -@ xa1541:1 for LPT1, and -@ xa1541:2 for LPT2.
If this parameter is ommitted, the default value of the opencbm.conf file will be used.

The API functions cbm_open_driver() and cbm_get_driver_name() are obsolete now. use the newer cbm_open_driver_ex() and cbm_ger_driver_name_ex() functions instead. They let you specify the adapter in the same format as --adapter/-@. You can give a NULL pointer, in which case the default adapter will be used.
Note: These new APIs are not yet available in the VDD. This is still to be done.

The 0.4.0.51 version added support for the XU1541 cable, which was invented and implemented by Till Harbaum.

Note: I did not take much time to update this site, this, some information may be outdated!

Installation

First of all, you must download the latest version of OpenCBM to use v0.4.99.94.

In order to install OpenCBM, you should first decide which "plugins" you need. The plugins decide which cables are supported. Refer to the following table:

OpenCBM cables and the corresponding plugin names
CableName of the needed PluginComment
XU1541xu1541
XUM1541xum1541
ZoomFloppyxum1541
XA1541xa1541
XM1541xa1541Yes, really xa1541!
XAP1541xa1541
XMP1541xa1541Yes, really xa1541!
XA1541 + XP1541xa1541
XM1541 + XP1541xa1541Yes, really xa1541!

Most users will need only one plugin. Remember its name and use that. However, it is also possible to use more than one plugin at the same time for installation. Just remember all the names of the plugins you need. You should also decide which plugin should become your default one, that is, the one that is used if you do not specific a speicifc one with the OpenCBM commands.

Windows

To install OpenCBM on Windows, you need to call the instcbm tool. First of all, make sure you uninstall any previous version of OpenCBM you might have on your computer. To do so, go to the directory of your previous installation (!) (with cd /d <DIRECTORY_PATH>) and issue the command:

instcbm --remove

You should know if you have a 32 bit Windows version: Comment: Windows XP versions are almost always 32 bit, but with Vista and Windows 7, you might have a 32 bit or a 64 bit version of Windows. Windows 2000 and NT 4 are always 32 bit.

If you have a 32 bit version of Windows, download the package opencbm-0.4.99.94-386.zip. If you have a 64 bit version of Windows, download the package opencbm-0.4.99.94-amd64.zip.

NOTE:
On 64 bit versions of Windows, the xa1541 plugin will not work out of the box, as the needed driver is not signed.

If you plan to use the xu1541 or the xum1541 plugin, you have to install the USB drivers for these devices first. Download the driver ZIP file, unpack it, plug in your USB device and tell Windows the location of where you unpacked the ZIP file when it prompts for the driver files.

Now, go to the directory where you unpacked the new OpenCBM distribution (with cd).

If you want to install one plugin only, enter: instcbm <PLUGINNAME>

If you want to install more than one plugin, enter: instcbm <DEFAULTPLUGINNAME> <OTHERPLUGINS>, adding all the names of the plugins you want to add. Note that the first plugin you specify on the command line will become the default one.

Examples

instcbm xum1541 to install only the xum1541 plugin

instcbm xum1541 xa1541 to install the xum1541 plugin and the xa1541 plugin, making the xum1541 the default one.

instcbm xa1541 xu1541 xum1541 to install all three plugins, making the xa1541 the default one.

Linux and Mac OS X

At first, make sure you uninstall any previous version of OpenCBM. If you have used another alpha version of OpenCBM, do not forget to remove the /etc/opencbm.conf file and the /etc/opencbm.conf.d/ directory, if either of them exists!

Now, download the source tarball (.tar.bz2), unpack it and change into the opencbm/ directory. There, issue the command:

make -f LINUX/Makefile opencbm opencbm-PLUGINNAME, replacing PLUGINNAME with the name of the plugin you want to compile. If you want to build more than one pluginname, add the other pluginnames in the same manner.

Example: make -f LINUX/Makefile opencbm opencbm-xa1541 opencbm-xum1541 to build the xum1541 and the xa1541 plugins.

Now, you need to get root privileges (via su), or you must prepend sudo in front of the following commands:

make -f LINUX/Makefile install install-PLUGINNAME, replacing the PLUGINNAME by the name of the plugin you want to install. Like before, you can add additional plugins at the end of the command. Note, however, that order matters here. The first plugin you specify will become the default one.

Example: make -f LINUX/Makefile install install-xa1541 install-xum1541 to install the xum1541 and the xa1541 plugins.

UDEV-Rules (for xu1541 and xum1541 plugins on Linux)

On newer Linux kernels, the permissions of the USB devices depend upon some udev rules. There are files in the source package (xu1541/udev/45-opencbm.rules for the xu1541, and xum1541/udev/45-opencbm-usb.rules for the xum1541 device) that will allow to set the rules. Thus, copy the needed one file or both of these files if both are needed into /etc/udev/rules.d/. If you do not copy them, only root will be able to access the xu1541 and xum1541 devices.

You might need to modify them, though. Change the value in between the quotation marks of GROUP="..." to the group you want to give access to the devices.

Windows/Linux/Mac OS X: Specifying an alternative plugin

All OpenCBM commands (i.e. cbmctrl, cbmcopy, d64copy, etc.) allow to specify the plugin to use. You must use the -@ command line optoin (i.e., -@xu1541) to specify the plugin.

VERSION 0.4.0 (Apr 28th, 2006)

This release adds some functions, as well as bug fixes to cbm4win. Additionally, it is a release for cbm4linux. Have a look at the changes.

This project is hosted on SourceForge.net. Thanks for the service.

Contents

Introduction to cbm4win

What is cbm4win?

cbm4win is a port of cbm4linux to Windows. It allows for access to a VIC 1540, 1541, 1570, 1571, or even 1581 floppy drive from the PC on Windows NT, 2000 and XP.

What can I do with cbm4win?

The most important things you can do is to copy D64 or D71 images from a real drive to the PC, or from the PC to a real drive with the help of d64copy. Furthermore, you can copy single files in both directions, too. Some more tools (for example, cbmctrl) are given, too.

Is there 3rd party support for cbm4win?

VICE will have support for cbm4win in the next version. There is an internal version of YAPE which supports cbm4win, too. Other people have already showed interest in supporting cbm4win in their products, too.

What hardware is needed in order to use cbm4win?

Of course, you need a PC running Windows NT, 2000, XP, or 2003. Furthermore, you need a real drive, like the VIC 1540, 1541, 1570, 1571, or 1581 (1581 not fully supported). Then, you need an XA1541, XM1541, XAP1541 or XMP1541 cable in order to connect the driver with the PC.

Where can I find a list of frequently asked questions (FAQ)?

Simply go to the end of this web page, or use the link.

History

The following history applies to the various versions of CBM4WIN

v0.4.0 (April 28th, 2006)

The changelog is no longer maintained here. It can be found at changes

v0.1.0a (May 29th, 2005)

This version fixes some errors. Some of them are SECURITY ISSUES, thus, I highly recommend upgrading to that version.
Furthermore, d64copy wrote d64 files which were "wrong" if there were errors on the disk.
Another issue is a fixed performance problems, which occurred especially with multiprocessor machines (SMP) or Hyperthreading machines (HT), but also with NT4.

In more detail, the following changes have been applied from 0.1.0:

December 6th, 2004

Added a section for Frequently asked questions (FAQ) on this web site.

v0.1.0 (November 28th, 2004)

The following changes have been applied from 0.0.12:

Download

You can download cbm4win 0.4.99.94 (ALPHA!) from http://www.trikaliotis.net/Download/opencbm-0.4.99.94/opencbm-0.4.99.94-i386.zip (i386, iA32) or http://www.trikaliotis.net/Download/opencbm-0.4.99.94/opencbm-0.4.99.94-amd64.zip (AMD64).

The sources are available at http://www.trikaliotis.net/Download/opencbm-0.4.99.94/opencbm-0.4.99.94.tar.bz2 (Sources).

The driver for the XU1541, the XUM1541 and/or the ZoomFloppy can be found at http://www.trikaliotis.net/Download/opencbm-0.4.99.94/xu1541-xum1541-windriver.zip.

Acknowledgements, thanks and links

Cbm4win is heavily based on cbm4linux, written by Michael Klein. Cbm4linux itself uses work from Star Commander, written by KOVÁCS Balázs a.k.a. "Joe Forster". I like to thank both for their steady help and their patience.

The xu1541 work as done by Till Harbaum.

Furthermore, I want to thank the following people:

Contact, bug tracking, mailing lists

Feel free to contact me if you have questions, suggestions, or you just want to confirm that something does work or does not. Specifically, if you are using cables not specified above, or drives not specified above, I would like to hear if CBM4WIN works with this combo.

More specifically, I have setup a project page on sourceforge. If you want to submit bug reports, I would be thank you for submitting to the bug tracking system over there. There are even two mailing lists available for announcements and for user discussions.

If you want to contact me directly, just contact me at cbm4win@trikaliotis.net, or go to my homepage at http://www.trikaliotis.net/.

Frequently asked questions (FAQ)

Many thanks to Wolfgang Moser for maintaining the FAQ!

Hardware related

Cable related

Q: Is there any reason why you're not supporting the quasi standard XE1541 cable?

A: See answer to the next questions

Q: Why are the X1541 or XE1541 cables not supported?

A: Technical implications prevent reliable use of these cable types.

If I want to transfer to a VIC drive, the drive is allowed to block the transfer for as long as it needs (the so-called "listener hold off", T_H in the C64 Programmer's Reference Guide). If the drive is ready, it signals this with the DATA line. The controller - in this case the PC - has to react to this in not more than T_NE, "non-eoi response", with setting CLK active. T_NE is rather short, it must not exceed 200 us. Typically, it should be something around 40 us. If the controller exceeds this 200 us bound, the listener - the drive - thinks that we wanted to signal an End-Of-Information, thus, there is no more data. For the PC to be able to cope with that very low time bound, there are two options:

  1. busy waiting
  2. use interrupt

No. 1, busy waiting, is not really an option. If we would do this, then we would have to monopolize the whole machine for the whole time. That is, you would not be able to hear music, work with MS Word, or even abort the transfer! Now, what would happen if the drive does not answer at all, for example, because it crashed? Well, yes, your PC would not be usable at all, thus, you would have to reboot that one, too. (This is not entirely true: Switching the drive off and on would help, too).

OTOH, if we use the interrupt, this is not a problem anymore. When the driver signals DATA, the parallel port generates an interrupt. In the interrupt routine, we react to this by setting CLK, and then, we wake up the (sleeping) main routine, which does the rest of the work. This way, we do not monopolize the whole CPU of the PC, which is very good in terms of overall stability of the system.

Now, the PC's parallel port cannot generate an interrupt on every line. With an XE cable, it can generate an interrupt on a RESET - this does not make much sense, does it? Because of this, the XM cable exchanges RESET and DATA w.r.t. the XE cable. This way, using an XM cable, the DATA line can generate interrupts, as needed.

Thus, to sum it up: It is very unlikely that an XE cable will ever be supported.

Q: Can a XE1541 cable be converted into a XM1541 cable and how is this done?

A: Yes, a XE1541 can easily be converted into a XM1541 cable

By the way, as easy as converting a XE1541 cable into a XM1541 is converting a XM1541 into a XE1541 with the very same methods described above.

Software problems

Installation issues

Q: cbm4win refuses to work on my machine, what can I do?

A: Try enabling the "Legacy Plug+Play Detection" for the parallel port. It was reported that on a Sony Vaio laptop with Windows 2000 installed, cbm4win could be installed without a problem, but none of the commands affected the connected 1541 disk drive in any way. Different parallel port settings in the BIOS were double checked without any help. The reporting user found that enabling the "Legacy Plug+Play Detection" for the LPT port helped to establish the communication with cbm4win and the connected disk drive.

To enable "Legacy Plug+Play detection" for your LPT port, where the 1541 disk drive is connected to (with a XM1541 or XA1541 cable), follow these steps:

This may not help in any circumstances. From the user's report it is known that this was only needed for his Sony Vaio laptop. Other machines which also run Windows 2000 do not need this.

Using the tools

Q: Where are all the commands listed that can be used with cbm4win?

A: Please refer to the cbm4linux.txt manual in the "doc" directory. Alternatively you may visit the cbm4linux 0.3.2 Users Guide, since proper user documentation for cbm4win is not available yet.

Q: Where can I find a description for all the subcommands and options of the different tools (cbmctrl, d64copy, cbmcopy, cbmformat, instcbm)?

A: Each of the user commands above knows the option "--help", which explains parameters and subcommands in short, e.g.: "cbmctrl --help"

Q: But if I enter the command "cbmctrl --help", then a black window opens for a second or so and disappears immediately. I can't read any of the informations, what is going wrong here?

A: You need to open a dedicated command line console (a.k.a. "DOS-console").

What did you do? Entering the command "cbmctrl --help" via the Start->Execute dialog? Please enter the command "cmd" within this dialog box. This opens a dedicated command window. Change into the directory, where you extracted the cbm4win tools (if you didn't place them into Windows' search path) and enter e.g. the command "cbmctrl --help" within the console window.

(NEW: July 4, 2005) Q: cbmctrl and other commands work fine. Anyway, whenever I use d64copy or cbmcopy with --transfer=parallel, the transfer hangs.

A: For using the parallel transfer options, you need to own an XP1541 companion cable additionally to your XA1541 or XM1541 cable. The parallel transfer will not work without that cable. Thus, to be able to transfer data, use serial2 (if you have only one attached drive simultaneously) or serial1 (in any other case).

External links

Here, I will start adding additional links to useful software which is related to cbm4win. For a start, there is just one:

Where to buy ready cables?

If you want to use cbm4win, you need an XA1541 active cable or an XM1541 multitasking cable, as mentioned above. I do not manufacture them or sell them. Anyway, as a service, I list shops where these cables can be bought. Please, do NOT understand this as a suggestion from me to buy them there. These are just starting points. I am not aligned to anyone there, nor do I have any profit if you buy any cable there. I do not know most shops myself, thus, I cannot tell you about the quality of the cables or delivery times. If you need to buy a cable, please pick a shop which you think you can trust. Think yourself!