btw, I just retried my old actlabs gun system with the new lightgun settings in mame. Still sucks ass

But as the drivers go. Writing a serial port driver, there will be many examples, and its pretty damn easy. I've done it for many devices for work.
But to write a USB driver, I believe it's a proprietary interface and you need special apis don't you? I'm not even sure if they are free.
the person to ask is Andy since he has a USB interface for the ipacs. I don't know if it uses standard USB keyboard drivers or his own.