CBM globe Welcome to the cbm4linux homepage CBM globe


latest version: 0.4.0 (OpenCBM)/0.3.2 (cbm4linux)   feedback   mailing list   main index

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.

Hardware requirements

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 Forster/STA's StarCommander. More information about the different cables and how to build or order them can be found on Joe Forster's XM1541 and XA1541 pages. 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.

Software requirements

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 Cameron Kaiser's Retrotech pages 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 cc65.

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 ;-))

Current status

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:
ModeWrite (sec.)Read (sec.)
Parallel turbo61.9361.22
Parallel warp40.1630.46
Serial1 turbo176.77176.83
Serial1 warp191.03159.56
Serial2 turbo103.19103.09
Serial2 warp96.0983.33
I guess that's not too bad - especially compared to the first version ;-)
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 donations/offerings).

cbm4linux is dead -- long live OpenCBM!

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 and/or OpenCBM!

Download OpenCBM

Latest version

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.

Download cbm4linux

Latest version

cbm4linux-0.3.2.tar.gz (156KB), 2003-11-30    Online manual
cbm4linux-0.3.2-1.src.rpm
Debian files

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.

Fedora Core 3 Users:

Agemixer/Skalaria has made a nice howto for getting cbm4linux compiled and running on FC3: cbm4linux-for-FC3.txt, patch-FC3-kernel2.6.diff.

The howto also works for FC4 with the following changes (also provided by Agemixer/Skalaria):

  This time we need the kernel source
  
  # uname -r
  2.6.12-1.1387_FC4
  # 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"
  | 
  '-------

Thanks!

apt-gettable version

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

Version archive

cbm4linux-0.3.1.tar.gz (142KB), 2002-05-14
cbm4linux-0.3.1-1.src.rpm
cbm4linux-0.3.0.tar.gz (144KB), 2002-04-13
cbm4linux-0.3.0-1.src.rpm
Debian users might need to apply this patch to make it work with the parport subsystem. cbm4linux-0.2.5a.tar.gz (95KB), 2001-10-07 cbm4linux-0.2.5.tar.gz (88KB), 2001-04-22
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 cbm4linux-0.2.4.tar.gz (87KB), 2001-01-28 cbm4linux-0.2.3.tar.gz (63KB) 2000-10-16 cbm4linux-0.2.2.tar.gz (59KB), 2000-09-01 cbm4linux-0.2.1.tar.gz (58KB), 2000-06-19
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 description.

cbm4linux-0.2.0a.tar.gz (56 KB), 1999-11-21

cbm4linux-0.2.0.tar.gz (56 KB), 1999-11-19

cbm4linux-0.1.0.tar.gz (29 KB), 1999-10-19

Other useful stuff/Contributed files

Related links

Mailing list

There is a mailing list for any cbm4linux related discussion. To subscribe, send a mail to cbm4linux-users-request@lists.sourceforge.net with the subject line subscribe.

Alternatively, you can also use the mailing list interface at sourceforge or browse the archive.

Feedback

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 Michael Klein, last updated Mon Jul 03 10:55:38 CEST 2006

Valid HTML 3.2! VI Improved SourceForge.net Logo