Welcome to the cbm4linux homepage
latest version: 0.4.0 (OpenCBM)/0.3.2 (cbm4linux)
What is it?
cbm4linux is a Linux kernel driver and API which gives you
access to any serial CBM devices like disk drives and printers at TALK/LISTEN
level. It also includes d64copy and cbmcopy for fast disk
image and file transfer.
CBM peripherals are connected to the PC's parallel port via a special cable,
the XM1541 or XA1541. The well-known X1541 and
XE1541 cables can't be used with this driver.
However, the latter one can easily be turned into a XM1541
by swapping two lines.
The XM1541 and XA1541is also supported by recent versions of Joe
StarCommander. More information about the different cables and how to build
or order them can be found on Joe Forster's
And here is my (humble) private cable zoo.
Wolfgang Moser has a bigger one.
Important note: The cable layout has changed with cbm4linux
0.2.1. Earlier versions need a XE1541 with two lines on the
PC side exchanged, whereas the XM1541 has two lines on the
CBM side exchanged.
The driver should work with any Linux 2.x kernel (x86). I'm using 2.2.x and
2.4.x on all my machines at the moment, so it may not compile with other
versions, if so, it should be easy to fix, though.
Version 0.3.0 make use of the generic parport subsystem which is part of
the Linux kernel since 2.2.x. There is a compile-time option to use direct
port I/O for those who intend to use the driver with kernel 2.0.x or don't
want to use the parport subsystem for some other reason.
To compile d64copy, cbmcopy and some example programs it is
recommended to get André Fachat's 6502 crossassembler xa. You
can get it from
or in the download section of this page.
Another crossassembler that is known to work is cl65 which comes
as part of Ullrich von Bassewitz's crosscompiler package
Using it with VICE
If you're daring, you can even use your trusty 1541 and
MPS-801 from within VICE. If you already have VICE 1.11 or higher it
should be just a matter of recompilation after installing cbm4linux.
Unofficial patches for earlier versions are here.
However, this will not increase emulation quality (to use copy protected
originals, for example). No custom loaders at all, but
Drive Composer works (hey, that should be
reason enough ;-))
Starting with version 0.2.0, the driver supports custom transfer routines
in user space as well as the XP1541 cable.
Version 0.2.4 adds support for the XP1571 as well.
d64copy now contains the StarCommander turbo and warp routines which
means a huge speedup. These are the current benchmarks on my
Duron-700, Linux 2.4.0/glibc2 system with a stock 1541 connected
via a XA1541 and XP1541 cable:
I guess that's not too bad - especially compared to the first version ;-)
|Mode||Write (sec.)||Read (sec.)|
With version 0.2.4, the 1571/2MHz mode is fully supported in Turbo
mode and partially supported in Warp mode, so a 1571 should be about
35% faster. Official benchmarks will be published as soon as I get the new
mechanics into my 1571 (big thanks to Nicolas
Welte and Wolfgang Moser for
cbm4linux is rather dead for quite some time now, but thanks to Spiro
Trikaliotis, Wolfgang Moser and others it lives on in the much better OpenCBM
project. More information on OpenCBM can be found on the
CBM4WIN homepage and on the
OpenCBM pages at SourceForge.net.
I hope I'll find the time and motivation to participate more actively again
in the OpenCBM project some day. Thanks for using cbm4linux
opencbm-0.4.0.tar.gz (734KB), 2006-04-28
Note for SuSE 10.1:
If you get the following errors:
cbm_module.c:111: error: expected ')' before string constant
This patch should help.
(156KB), 2003-11-30 Online manual
- We have Debian packages now (might be broken, though)
- Reset line can now be controlled separately
- gcc 3.3 fixes
- Prepared for the 2.6 kernel series
- A few minor bugs squashed
Note for 2.6.4 kernels:
Kernels >=2.6.4 don't seem to have parport_enumerate() any more. This patch should help.
2004-04-24: new version of patch available
Note for 2.4.23 kernels:
If you get the following error:
cbm_module.c:165: redefinition of `irqreturn_t'
simply delete (or comment out) the offending line.
Agemixer/Skalaria has made a nice howto for getting cbm4linux compiled and
running on FC3: cbm4linux-for-FC3.txt,
The howto also works for FC4 with the following changes (also provided by
This time we need the kernel source
# uname -r
# yum install kernel-devel.i686
Installed: kernel-devel.i686 0:2.6.12-1.1387_FC4
The udev configuration has changed in FC4, so we add this:
# joe /etc/udev/rules.d/50-udev.rules
| # cbm module
| KERNEL=="cbm", MODE="0666"
Debian users who want do use apt-get or their favourite
apt-frontend can add this to /etc/apt/sources.list:
deb http://www.lb.shuttle.de/puffin/cbm4linux woody main
deb-src http://www.lb.shuttle.de/puffin/cbm4linux woody main
- Just a few compile-time fixes for various Linux distros.
No functionality changes. Delta from 0.3.0.
Debian users might need to apply
to make it work with the parport subsystem.
- The kernel module uses the parport subsystem now. This causes a few
configuration changes, skim over the README if you're upgrading from an earlier
- Fast file transfer for 1541/1570/1571/1581 added (cbmcopy)
- Better d64copy error handling, 1571 improvements.
- Support for odd-sized disk images, along with error map support.
- libcbm4linux.a has been replaced by libopencbm.so.
Most of the d64copy/cbmcopy code sits in this library,
using it from your favourite file manager should be almost trivial.
- Small compilation fix, required for kernel 2.4.10
- Comes with a couple of user-contributed scripts now (see contrib/ directory)
NOTE: If you cannot compile the kernel module under RedHat-7.1 or
Mandrake-8.0, try this patch.
I cannot see anything wrong here, so I suspect a broken source tree. If someone
can confirm this or knows a better fix, drop me a line.
Update: most probably fixed by cbm4linux-0.2.5a
- .d71 support in d64copy, all modes except warp
- cbmformat comes with a ugly progress indicator (-p option)
- minor Makefile fixes
- More documentation (HTML, Texinfo, DVI)
- 1571/2MHz support in d64copy, Turbo and (partially) Warp mode
- XP1571 support in d64copy
- kernel module fixed to compile for Linux 2.4.0 kernel
- cbm4linux.spec file included to build binary RPMs
- A new ioctl (CBMCTRL_GET_EOI) has been added. This was necessary
to get real drives and printers accessible with VICE.
More info on this.
- xa is not mandatory any more as the drive routines are included
as 6502 binaries
- The kernel module should compile properly now, independent from
- cbmctrl dir command fixed for devices other than 8
- System-wide installation for cbm4linux.h (formerly cbm.h)
and libcbm4linux.a (formerly libcbm.a)
- Simple device locking implemented
- Documentation bug fixed (CABLE).
- d64copy is now able to do BAM-only copy (-b and -B
- cbmctrl can now display disk directories (dir
NOTE: The XM1541 description (CABLE) contains a
quite obvious error, Pin 5 and 6 must be exchanged on the DIN plug of course,
not on the parallel port plug. Anyway, this is the correct
- This version adds support for the XM1541 cable.
Support for the old cable can still be added by hacking the Makefile.
- d64copy handles 40-track images now.
(56 KB), 1999-11-21
- This version fixes a bug when writing to an external 1541
with serial2 and turbo. You can download the whole package or
this patch. For the latter one,
enter the d64copy source directory and apply the patch with
patch -p0 < cbm4linux-0.2.0a.patch.
(56 KB), 1999-11-19
(29 KB), 1999-10-19
Other useful stuff/Contributed files
- André Fachat's 6502 crossassembler
xa-2.1.4h.tar.gz (90KB), needed for
cbm4linux >= 0.2.0
if you want to re-compile the drive
cbm4linux_utils.tar.gz (14KB), 2001/11/05, contributed by Hugo Cornelis:
Updated version, Fixes some bugs, includes an XSL stylesheet
to convert the index files to html with xalan and includes a small README
cbm4linux_utils-20010816.tar.gz (7KB), 2001/08/16:
A couple of Perl scripts for bulk copying and indexing.
There is a mailing list for any cbm4linux related discussion. To subscribe, send a mail
firstname.lastname@example.org with the subject line
Alternatively, you can also use the
mailing list interface at sourceforge or
browse the archive.
Feedback is of course always welcome, so feel free to
drop me a line or two
if you have any problems, suggestions, patches or chocolate bars
concerning this package. C64 PLAs are very welcome, too.
top of page
Page maintained by
Mon Jul 03 10:55:38 CEST 2006