Created attachment 214923 [details] add comms/opencbm, comms/opencbm-kmod and comms/opencbm-plugin-xa1541 "The OpenCBM package contains user space support programs and development libraries to control and use CBM serial IEC/IEEE-488 bus devices as used by most Commodore (CBM) 8-bit machines." With these ports, you can use an old 8-bit Commodore floppy drive on the PC, connected either to the parallel port or to USB (several cable types are supported). Main category is "comms", because the main feature is implementing the old bus protocols for talking to the drives. Also added category "archivers" because older upstream versions included a FreeBSD port in with this category and as the tools can be used to archive old floppy disks, and the image formats are a sort of archive, this IMHO matches as well. There are two slave ports because for parallel-port cables, a kernel module is needed, and the plugin for using these cables depends on the kmod port. This avoids the binary package of opencbm itself to pull in a kernel module that users of USB cables won't need. I added a FreeBSD manpage for the kernel module to the kmod port. Tests passed: - poudriere testport with default options on {11.3,12.1,13}/{i386,amd64} - poudriere testport with all options combinations on 12.1/amd64 - correct operation using an XMP-1541 parallel-port cable and a C-1541 floppy drive verified on 12.1/amd64. I can't test functionality of USB cables as I don't own one. Disclaimer: porting the kernel driver from Linux to FreeBSD was done by me around 1.5 years ago, upstream merged my code.
Tested with a ZoomFloppy and a 1571 drive (unfortunately, I don't have any CBM-formatted floppies for the drive yet) on a FreeBSD 11.3-stable machine: root@kg-core1# uname -a FreeBSD kg-core1.kg4.no 11.3-STABLE FreeBSD 11.3-STABLE #2 r352605: Sun Sep 22 22:53:27 CEST 2019 root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 root@kg-core1# cbmctrl detect 8: 1571 root@kg-core1# root@kg-core1# cbmctrl status 8 00, ok,00,00 appears to work.
Well, model-detection and reading the status channel sure is enough to prove communication with the drive works! So the only thing not tested is correct operation of the "xu1541" plugin (also included in the master port) for "home-brew" USB cables. It's unlikely to find someone for testing these, as they are probably very rare, people using USB will most likely have a "ZoomFloppy", "XoomFloppy" or similar, which require the "xum1541" plugin. But as both plugins work on top of libusb, I think having one of them tested is enough to be very confident that both work as intended :) Thanks Torfinn for testing!
Can you put that on phabricator please?
(In reply to Mikael Urankar from comment #3) I don't have an account there (yet?) -- and I'd probably need a primer on the usage as well.
(In reply to Felix Palmen from comment #4) or github/gitlab? It's easier to review / comment with phab/gh/gl
(In reply to Mikael Urankar from comment #5) Sure, here's a pull-request containing the changes: https://github.com/Zirias/freebsd-ports/pull/1
Created attachment 215290 [details] add comms/opencbm, comms/opencbm-kmod and comms/opencbm-plugin-xa1541 Reworked the whole structure now, abandoning master/slave scheme. Instead have a Makefile.inc in comms/opencbm and use this and the distinfo file from the other ports. This simplifies the ports a lot. Resolved accidentally hardcoded /usr/local by patching the file with REINPLACE_CMD from the Makefile. Repeated all previous build tests, still fine. Updated the pull-request on github for easy review: https://github.com/Zirias/freebsd-ports/pull/1
A commit references this bug: Author: dinoex Date: Sat Jun 6 14:21:39 UTC 2020 New revision: 538094 URL: https://svnweb.freebsd.org/changeset/ports/538094 Log: OpenCBM driver module for parallel-port X[MA]-1541 cables The OpenCBM package contains user space support programs and development libraries to control and use CBM serial IEC/IEEE-488 bus devices as used by most Commodore (CBM) 8-bit machines. This port contains the FreeBSD driver for parallel-port cables for OpenCBM. WWW: http://opencbm.sourceforge.net/ PR: 246784 Submitted by: Felix Palmen Changes: head/comms/Makefile head/comms/opencbm-kmod/ head/comms/opencbm-kmod/Makefile head/comms/opencbm-kmod/files/ head/comms/opencbm-kmod/files/opencbm.4 head/comms/opencbm-kmod/pkg-descr head/comms/opencbm-kmod/pkg-plist
A commit references this bug: Author: dinoex Date: Sat Jun 6 14:24:23 UTC 2020 New revision: 538095 URL: https://svnweb.freebsd.org/changeset/ports/538095 Log: OpenCBM plugin for parallel-port cables The OpenCBM package contains user space support programs and development libraries to control and use CBM serial IEC/IEEE-488 bus devices as used by most Commodore (CBM) 8-bit machines. This port contains the xa1541 plugin for parallel-port cables. WWW: http://opencbm.sourceforge.net/ PR: 246784 Submitted by: Felix Palmen Changes: head/comms/Makefile head/comms/opencbm-plugin-xa1541/ head/comms/opencbm-plugin-xa1541/Makefile head/comms/opencbm-plugin-xa1541/pkg-descr head/comms/opencbm-plugin-xa1541/pkg-plist
Thanks, Committed with small changes.