Hacker News new | ask | show | jobs
by foohbarbaz 4437 days ago
From a developer standpoint. I could get a minimal output via a serial port with a few lines of assembly on a bare hardware.

USB requires a lot more work and on Windows the API is atrocious. On Linux the API (libusb) quite a bit nicer, but still a bit of work.

The plug and play part, device naming and unique identifiers are a special "joy" of USB.

If serial port is sufficiently fast I'll take it any day over USB.

1 comments

I was able to build a serial bridge between an SNES and a PC on a simple breadboard with stock parts: http://i.imgur.com/sPKGvl.jpg (the output is from a Teensy that is running as a USB<>serial device, so the PC sees it as /dev/ttyUSB0 ... the input and passthru connect DB9 to the controller port on the console, and the switch allows the original controller to work in place of the comm board.)

The Teensy driver code was around 10KB, and the PC code that opens /dev/ttyUSB0 was around 15KB.

Have been trying for over a year to implement a true USB version so that we can take advantage of the full bandwidth capability of the system, which is 2.68MB/s, which only USB high speed can do, and it's been nothing but a nightmare.

I will be really sad in the future when little toy projects like this are out of the hands of hobbyists due to costs and complexity. We've already lost that in the desktop operating system field, where video cards alone are more complex and undocumented than entire OS kernels these days.

You mean connecting to the EXT port at the bottom of SNES? I didn't even know that it had such thing. Sounds interesting, what are you trying to do?
Well, we are currently connecting to the controller port because it's really easy to connect to those. But of course you can only hammer at those registers at around 40KB/s.

So yeah, a friend made a PCB and found some female edge connectors we can cut to size to connect to the EXT port, where we can DMA at 2.68MB/s through using eight data lines. On the other side of the PCB, we just stuck a custom sized 28-pin IDE header. Easy to do whatever with that: wire to breadboard one-at-a-time or with an IDE cable.

The hope would be to then have some device that monitors each clock rise, grab the eight bits on the data bus, and send it to the PC. It can buffer a bit and have some latency, that's not a big deal.

But even with ICs that can latch the data quickly enough, we don't have enough bandwidth over serial nor USB1 to send 2.68MB/s of data. It'll have to be high-speed USB2, and will almost certainly need to be some kind of custom driver, as I doubt you can do some kind of super baud-rate of 16,000,000+bps.

> It'll have to be high-speed USB2, and will almost certainly need to be some kind of custom driver, as I doubt you can do some kind of super baud-rate of 16,000,000+bps

The venerable FT232H claims "data transfer speeds up to 40Mbytes/s":

http://www.ftdichip.com/Products/ICs/FT232H.htm

I'm not sure what is needed to actually accomplish such rates. Might be easier to do it with USB-enabled MCU. Either way, I wouldn't discount the standard USB classes too early. I'm "pretty sure" that you should be able to push some tens of Mbps through USB-CDC class.