Recently I had some time to play with Lego Mindstorms again. First thing I did was trying to port NBC to OpenBSD, a C-like compiler for Mindstorms NXT. Due to fpc being available in ports now, that worked suprisingly well. Only the upload did not work due to some problem in the Pascal part of the libusb, which my Pascal is not good enough anymore to fix.
Fortunately I found some C-code that I wrote couple of years ago and got it working again. It does the code upload via USB just fine, but not much more. So here it is.