• Please review our updated Terms and Rules here

RetroChallenge: Writing a driver- Panasonic CD- Part I


Veteran Member
Dec 28, 2011
I've decided to take part in the Retrochallenge, which is a loose competition of people working on old hardware projects: http://retrochallenge.org

I run NetBSD on a 486 to give it new life, and am active on the NetBSD mailing lists to ensure that the kernel and userland still run on genuine 486's (the "i386" port requires a 486 or above). I chose NetBSD because I like the notion of portability/the same source running on different systems, and for various reasons would prefer to contribute to one of BSDs now instead of Linux. Additionally, one of my bucket list things is to write a working driver for a non-DOS system (and perhaps get it committed).

The ISA bus is an easy-to-understand bus with often fairly simple pieces of hardware, so it makes sense for me to start writing a driver there and perhaps work my way up to more useful drivers on the PCIe bus. I would say PCIe isn't that much more difficult to understand compared to ISA, but since it's packet/command based, takes a bit of work to get up to speed. One driver that my 486 is missing is a CD driver for the proprietary Matsushita/Panasonic interface. While I don't personally need to use CDs typically, this setup does give me an opportunity to get more acquainted with how CD drives read and return data, as well as get more familiar with NetBSD's ioctl and autoconfig internals.

In due time, I shall explain the process of porting the driver. For now however, my goal is to use this month to get the driver into a more working state than currently. So far, the drive can be detected by the kernel, print out the relevant information about I/O ports, and... that's about it!

A secondary goal will be to use this as a porting guide of sorts. Again, I don't expect this driver to be of utility to most people, but at the very least, it should serve as a basis to start getting acquainted with NetBSD's autoconfig framework (admittedly, I don't fully understand how autoconfig works at this point).

Development will take place at: https://github.com/cr1901/pcd-netbsd. I will include shell scripts to apply my changes directly to a freshly-checked out CVS tree of NetBSD.