VIC-1541 on my PC workstationWith it freezing and snowing today, I decided to make use of the idle time by hooking up my pristine VIC-1541 floppy disk drive to my workstation and do some file archiving to real 5-1/4″ media using OpenCBM under Linux.

OpenCBM provides an API library and some useful command-line tools.  The following is an example of how to format and copy Commodore files to the floppy drive:

$ sudo modprobe cbm

$ dmesg | tail
cbm_init: using passive (XM1541) cable (auto), irq 7
cbm: resetting devices
cbm: waiting for free bus...

$ cbmctrl detect
 8: 1540 or 1541 

$ cbmctrl command 8 "N0:VIC20 3-JAN-2010,10"
$ cbmctrl status 8
00, ok,00,00
$ cbmctrl dir 8
0 ."vic20 3-jan-2010" 10 2a
664 blocks free.
00, ok,00,00

$ cbmwrite 8 quikman+8k.prg
[Info] writing quikman+8k.prg -> QUIKMAN+8K.PRG,P,W
[Info] identified a 1540 or 1541 drive
............-
[Info] 00, OK,00,00
$ cbmwrite 8 omega-fury.prg 
[Info] writing omega-fury.prg -> OMEGA-FURY.PRG,P,W
[Info] identified a 1540 or 1541 drive
....................\
[Info] 00, OK,00,00

$ cbmctrl dir 8
0 ."vic20 3-jan-2010" i1 2a
47   "quikman+8k.prg"   prg
76   "omega-fury.prg"   prg
541 blocks free.
00, ok,00,00

Of course, I can now hook-up this drive to a real VIC 20 computer and play what’s on the diskette(s).  But for giggles, I can even use the Commodore 8-bit emulator, VICE, to test drive my floppies, for example:

$ xvic -memory 8k -device8 2 +truedrive \
-keybuf 'LOAD "QUIKMAN+8K.PRG",8\0D'
...
sucessfully loaded libopencbm.so
/dev/cbm opened.
...
VICE

VICE 2.2 on a 24" HP display

Nice!