Controller port to serial cable

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

maaaan... I was going to breadboard one of the serial adapters tonight, but the Arduino folks decided that the USART clock pin would be the perfect choice for the Tx LED, meaning both my Leonardo and my SparkFun Pro Micro are useless here :(
HJRodrigo
Posts: 71
Joined: Tue Sep 15, 2009 5:01 pm

Re: Controller port to serial cable

Post by HJRodrigo »

Looks like you guys are not alone in the quest to make expansion port adapters. Here is this guys attempt with the NES expansion port.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

Ok, so I really don't know why I didn't think of this before, but why are we still using USART for the expansion port design? From what I understand you originally settled on USART because it was more stable at higher speeds than UART, and because a USB<->USART conversion allowed you to communicate via a virtual COM port, using standard serial communication. This made sense for the 1-bit serial interface in the original controller port design. However, the expansion port is a parallel interface, so you're unnecessarily converting USB<->Serial<->Parallel. So why not just go straight USB<->Parallel? I'm not fully familiar with the specifics, but isn't there a standard parallel equivalent of a serial COM port? I mean, obviously I know about parallel ports, but what is the standard software interface over a parallel port? In particular, going back to the FTDI chip idea, the FT232H supports a synchronous parallel mode that they call synchronous FIFO, which apparently supports up to 40MByte/s over USB2.0. I don't know how that appears to the PC, or what would be involved in communicating with a synchronous FIFO device, but it might be worth looking into in order to get the full 8-bit parallel interface and high-speed USB2.0 speeds.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: Controller port to serial cable

Post by blargg »

Serial simplified interfacing, as myself and byuu aren't EE experts. I started out with just a level shifter to RS-232 over controller port, and we added the Teensy to upgrade it. That FT232H looks promising, with its 8-bit synchronous interface. Please someone look at that and determine whether it could be hooked to the SNES expansion port!
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

Yes, it could be hooked up to the expansion port. I understand your use of serial to simplify the computer interface. My question was whether or not there was a similar, standard, simple interface on the PC side for parallel communication analagous to a "parallel COM port". I'm not sure what the synchronous parallel FIFO looks like on the PC side or how you would go about talking to it. I know byuu didn't like the idea of having to compile against the FTDI D2XX drivers, but it really does look like a nice chip. Reading through the datasheet, I've already confirmed that the I/O's are 5v tolerant, so that's always nice. In addition to the FT245 parallel FIFO interface, there's also the FT1248 interface, so I'm not sure which is preferable...
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Controller port to serial cable

Post by lidnariq »

Things in the USB communications device class still present a connection that is conceptually bitwise serial, even if it never exists as encapsulated RS232 on the wire. And, I believe, these USB CDC devices can exist in a variant that needs no drivers written for windows (or less surprisingly linux)

I suppose there's something to be said for being able to act like a mass storage class like a Retrode, but that's awfully wish-list-y.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

Mass storage wouldn't be able to support real-time data streaming, like for debugging, or for emulating an expansion device on the PC and interfacing it with the console.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: Controller port to serial cable

Post by Near »

Indeed, it has to be a bidirectional protocol.

I don't like the idea of requiring extra drivers on Linux and Windows, but if it's the difference between having a 2.68MB/s expansion port interface, and a 30KB/s controller port interface, I'll live =)

By the way, did the fabbed PCBs arrive? Ready to place my order for a batch of them :D
Presuming of course the -1 and -2 are the same spacing for the surface mount portion.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

The PCB's were supposed to get here yesterday, but it seems there was a mix-up in the shipping, and they got send somewhere in California instead >.< Yes, the footprints should be the same for both. The -2 has the rows spaced a bit farther apart, but I made the footprints longer than they needed to be, so the same footprint should work for both.

Update: Yeah, I just confirmed they got sent to the wrong address. Since there's no way of knowing when (if ever) they'll find their way to me, Laen just added a new order to this Friday's panel. Judging from the turnaround time on the last order, I expect them to get here around December 3rd. Unless I can get USPS to deliver the original package to me, I suppose we'll just have to wait. :(
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: Controller port to serial cable

Post by Near »

Hmm, well honestly, it's not that big of a risk/cost. Just two connector points, and if it doesn't work out, it doesn't work out. Worst case, it's surface-mount soldering practice.

I'm willing to go ahead and order 50 production boards. What's the best way to do that? Color's not too important. Red would be cool, but green is also fine.

Also, I've never really used a dremel. What's the best bit for filing down the Samtec, and how did you rebuild the side?
I've got six of them sitting here, so it'd be fun to see if I can replicate your card edge connector.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

If you buy a Dremel tool, it should come with an assortment of tips. Here are the 3 that I use (note that there are a lot of similar tips, you don't need *exactly* these, just use the same *kind* of tip, since these are what I've found to work best):

Cutting head (for the initial cut): http://www.dremel.com/en-us/Accessories ... px?pid=426
Sanding drum (for initial, course sanding when you're taking off a lot of material): http://www.dremel.com/en-us/Accessories ... px?pid=407
Grinding stone (works well for the final smooth sanding): http://www.dremel.com/en-us/Accessories ... px?pid=932

First of all, start from one end of the socket and count 14 rows. Looking at the bottom of the socket, take a pair of needle-nosed pliers and carefully pull the pins out of rows 15 and 16 (it's easy to break the pins and make them unable to be pulled out if you're not careful). Then, take the cutting head and cut right down the middle of row 16, being careful to leave row 15 fully intact. Use the sanding drum to sand the edge down, still leaving row 15 intact, including the divider between rows 15 and 16. That divider will become the outer edge of the final socket. Use the grinding stone to get a nice, smooth, flat surface.

If you want to rebuild the cart edge, get something the same thickness as the card edge and cut it to be just slightly wider than the expansion port's card edge. Something non-stick is good. I used an old PCB that failed to etch properly. You want to be able to insert it into the socket and have it fit snugly, and it should be wide enough that the edge is about right in the middle of row 15. This will ensure that the newly filled endcap won't flow into the rest of the socket as you make it. Now, to fill in the gap, the secret ingredient is...

...hot glue! I find high temp works better than low or "all-temp" glue. Press the glue gun solidly against the side of the socket and use pressure to fill the socket. Don't try to fill it from the top. Keep adding glue until it overflows out the top of the socket (make sure that the overflow completely fills the socket), then pull the glue gun away and add a bit of glue to the side of the socket. Allow the glue to cool before removing the card (or whatever you placed in the socket). I find that about 20 seconds in the freezer is usually sufficient. You can also try coating the edge of the card with a non-stick coating like silicone (or butter :P). Then, just Dremel the glue down flush with the connector. The glue tends to gum up the Dremel tips, so try to keep the glue as cold as possible (throw it back in the freezer for a bit, and take breaks, the friction of the Dremel heats it back up). Also, you'll probably have to scrape off the Dremel tips after a bit if they get too bad (the plastic from the sockets will do it too). Also, the Dremel tool should come with a rectangular gray stone, which is meant for cleaning and shaping the grinding stone, so you can use that (I wouldn't suggest using it on the sanding drum though...)

The -01 connectors are black, so I'm working on getting black hot glue. I know you can buy it online, but for now, I'm playing around with dyeing my own.


I'd really like to get the PCB's in before we place a large order, but if you're anxious to get your hands on one, I could send you my hand-etched one. I'm not using it right now, and once I get these PCB's in, I'll just be able to build another one, so it's no big loss to me.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

So, the PCB's finally got delivered... to Lake Oswego >.< However, I just so happen to have a friend that lives 5 minutes away and is awesome enough to agree to go knock on a stranger's door and ask if they have my package. It's crazy, but it just might work...
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: Controller port to serial cable

Post by Near »

> if you're anxious to get your hands on one, I could send you my hand-etched one. I'm not using it right now, and once I get these PCB's in, I'll just be able to build another one, so it's no big loss to me.

Hmm, actually ... if you're up for it and don't mind, I think that could work, yes. I really appreciate the offer.

Having one to use for now would allow me to start on the breadboarding work. I can pick up the 28-pin board headers, ribbon cable, etc and try and get something simple up and going with the Teensy.

Obviously, the Teensy won't be capable of handling the full bandwidth. But it'll be interesting to see how far beyond 40KB/s we can push it. My guess is anything we can possibly do without using DMA will be fast enough. Even a block move will knock things way below the Teensy's limit.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

PM your shipping address and I'll send it on Monday. Also, looks like the Lake Oswego delivery may have been a return to sender, so I may be able to get my hands on the original order after all. I shot an email off to the guy to see if he got them back and to see about getting them shipped to me again.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: Controller port to serial cable

Post by qwertymodo »

byuu, I replied to your PM, but I'm not sure if it sent or not. If you didn't get it, do me a favor and chime in over at this thread viewtopic.php?f=13&t=9498
Post Reply