Some years ago, I purchased a ‘Unitiblue’ NES Controller->USB adapter from for use under Linux. I don’t recall the exactly when I made the purchase, I think it was 2005 or so.

The device worked as advertised under kernel 2.4, and for a time I enjoyed playing emulated versions of Ninja Gaiden and the like under Linux.

Then, I moved apartments, upgraded my computer several times, and the company at ceased to exist.

Recently, I wanted to use the device again, but without kernel 2.6 support and without a company to email for details, I would have to sort out myself how to get the thing working under kernel 2.6. Reading for a bit on-line, I discovered ‘fxload’ was the tool that should be able to load the firmware onto the device, and through trial and error found this set of options to work :

fxload -t an21 -D /dev/__device_name__ -I /home/user/unitiblue/cca-4-11-04.hex

Getting the device firmware to load automatically when the device was plugged in would be a whole other challenge. Udev rules might be clearly explained somewhere on the Internet, but I can’t find where. After much arguing and man-page reading, I found a similar set of rules in an existing udev rules file, and modified it to match the Unitiblue device :

> cat /etc/udev/rules.d/49-unitiblue.rules

BUS==”usb”, ACTION==”add”, SYSFS{idVendor}==”f666″, SYSFS{idProduct}==”aa01″, \
PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'” \
RUN+=”/bin/sh -c ‘/sbin/fxload -t an21 -D /dev/%c -I /home/mythuser/unitiblue/cca-4-11-04.hex'”

I’m still not sure just what the rule means, but it works and I like all the %’s and brackets and such.

After getting the device to load automatically when plugged in, I noticed it still behaved sort of flaky. I took it apart to discover several of the wires were bare for long enough to short out each other. Some electrical tape later and I’m back now, in emulator joy.