Code posted on port-sparc by `der Mouse'; it was slightly re-arranged to fit the layout of this driver.