Spiro's home on the web

VERSION 0.4.2 (November 18th, 2007) / Source: VERSION 0.4.2a (December 22nd, 2007)

This release mainly adds some bug fixes to OpenCBM. Have a look at the changes.

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

Contents

Introduction to OpenCBM

What is OpenCBM?

OpenCBM allows for access to a VIC 1540, 1541, 1570, 1571, or even 1581 floppy drive from the PC on Windows NT, 2000 and XP. It started out as cbm4linux as a Linux-only solution, written by Michael Klein. Spiro Trikaliotis (me) ported it over to the Windows platform under the name cbm4win. With version 0.4.0, both versions were joined back into one source. Thus, it was decided to use a platform-independant name, which is now "OpenCBM".

What can I do with OpenCBM?

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 OpenCBM?

VICE has support for OpenCBM. There is an internal version of YAPE which supports OpenCBM on windows, too. Other people have already showed interest in supporting OpenCBM in their products, too.

What hardware is needed in order to use OpenCBM?

Of course, you need a PC running either Windows NT, 2000, XP, 2003, Vista or 2008 (for the Windows version of OpenCBM), Linux (for the Linux version), or Mac OS X (for the Mac version). Currently, the PC (Windows/Linux) needs a parallel port (note: PCI or CardBus cards most likely will not work with Windows, but with Linux, chances are much higher.

There is also a USB version in the works which will be released as v0.5.0 shortly. Have a look at the XU1541 page for details on it.

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 OpenCBM

v0.4.2a (December 22nd, 2007)

This release is only a fixed source release. The source data for Version 0.4.2 missed some important files which can only be built if you have the CC65 C compiler for the 6502 installed. The version 0.4.2a adds these missing files. Thus, no additional binary files are available with this release.

v0.4.2 (November 18th, 2007)

This is mainly a bugfix release. The binary distribution of version 0.4.1 on Windows was not correctly build and included (unnecessary) debug information. Additionally, the documentation was missing. This has been fixed now. For Linux, v0.4.1 and v0.4.2 are identical, only the version number and date have changed. If you do not have any problems with 0.4.1, you do not need to change to this version.

v0.4.1 (November 11th, 2007)

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

v0.4.0 (April 28th, 2006)

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

cbm4win 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.

cbm4win 0.1.0 (November 28th, 2004)

The following changes have been applied from 0.0.12:

Download

Windows

You can download OpenCBM 0.4.2 as executables for Windows from
http://prdownloads.sf.net/opencbm/opencbm-0.4.2-i386.zip?download (i386, iA32),
http://prdownloads.sf.net/opencbm/opencbm-0.4.2-amd64.zip?download (AMD64, EM64T),
http://prdownloads.sf.net/opencbm/opencbm-0.4.2-ia64.zip?download (iA64).

Most people will need the i386 version (aka iA32), which runs on 32 bit processors. This version is also needed if you have a 64 bit processor, but your Windows version is 32 bit only.
If you have a 64 bit processor from AMD, or a processor from Intel with so-called "EM64T" extension, you need the AMD64 version of OpenCBM.
If you own a computer with iA processor from Intel from Intel, you will need the iA64 version. You will know if you have an iA64 processor!

Note: If you are unsure wheather you have an iA64 or an AMD64, it is most likely you own an AMD64 (or EM64T) processor. If you are unsure whether you own a 32 bit or a 64 bit Windows, it is most likely you own a 32 bit one, that is, an i386 one.

Linux and Sources

For Linux, no precompiled version of OpenCBM is available. You must compile it yourself out of the sources. They are available at
http://prdownloads.sf.net/opencbm/opencbm-0.4.2-src.zip?download (Sources).

Developer information (generated with Doxygen) can also be found: Doxygen of OpenCBM

Acknowledgements, thanks and links

OpenCBM 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.

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 OpenCBM 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 opencbm-200712@spiro.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.

Q: I do not have a parallel port on my PC. Will a external card (ISA, PCI, CardBus) work?

A: It depends. For Linux, chances are high that all cards will work. For Windows, due to limitations of the drivers of the cards, it is unlikely that PCI or CardBus cards will work. However, ISA cards will work.

You should try to build an xu1541 cable instead.

Software problems

Installation issues

Q: OpenCBM refuses to work on my Windows 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, OpenCBM 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 OpenCBM 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 OpenCBM?

A: Please have a look at the OpenCBM User's Guide.

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". More detailed help is available at the OpenCBM User's Guide.

Q: But if I enter the command "cbmctrl --help" (or any other) on Windows, 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 OpenCBM 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 OpenCBM:

Where to buy ready cables?

If you want to use OpenCBM, 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!