Communication and/or networking between PC and Genesis?

For hardware talk only (please avoid ROM dumper stuff)
HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Tue Jan 01, 2013 3:24 pm

FTDI is much better than Prolific (PL-2303), I guarantee you. Prolific get unexpected hangs every time. BitBang mode is one more argument to FTDI. You can connect FT245 direct to IO pins and made 4bit transfer protocol, such Zero Tolerance does. And I think there are no problem with drivers.
http://www.ftdichip.com/FTDrivers.htm
Windows Server 2008 R2
Windows 7
Windows 7 x64
Windows Server 2008
Windows Server 2008 x64
Windows Vista
Windows Vista x64
Windows Server 2003
Windows Server 2003 x64
Windows XP
Windows XP x64
Windows ME
Windows 98

Linux

Mac OS X
Mac OS 9
Mac OS 8

Windows CE.NET (Version 4.2 and greater)

Android
As for:
Chilly Willy wrote:He took down the old page on it. You can find it on wayback here:
http://web.archive.org/web/201105210536 ... -unit.html
He's still got the software for the link unit on his support page. You'd have to ask him directly if he has any more of these.
Using 2 chips is too expensive (maybe it's just more familiar to him). I suggest to use one FTDI in BitBang mode or one Atmel AT90USB162. FTDI don't require to write drivers, but Atmel can implement custom transfer protocol.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue Jan 01, 2013 4:40 pm

KanedaFr wrote: Don't remember the name (Cxxx and Pxxx ?)
Maybe it has both a C and a P
http://www.silabs.com/products/interfac ... ridge.aspx
Were you thinking of the CP2103 it has 4 gpio.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Jan 01, 2013 6:28 pm

HardWareMan wrote:I suggest to use one FTDI in BitBang mode or one Atmel AT90USB162. FTDI don't require to write drivers, but Atmel can implement custom transfer protocol.
Okay, that bitbang mode for the FTDI looks pretty nifty. In linux, the drivers are in the repo for Ubuntu/Debian, so I don't see any problem on that front. They have both proprietary and open source drivers - I just installed the open source ones. There's plenty of info and examples on using bitbang. So I change my mind - the FTDI232R looks like a good choice to try using for a comm cable.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Jan 01, 2013 7:33 pm

sega16 wrote:
KanedaFr wrote: Don't remember the name (Cxxx and Pxxx ?)
Maybe it has both a C and a P
http://www.silabs.com/products/interfac ... ridge.aspx
Were you thinking of the CP2103 it has 4 gpio.
It should be this one (CP2103) and Profilic Chilly Willy's talked about

My problem is the need for drivers not the fact they didn't exist ;)

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue Jan 01, 2013 7:36 pm

KanedaFr wrote: It should be this one (CP2103) and Profilic Chilly Willy's talked about

My problem is the need for drivers not the fact they didn't exist ;)
What is so bad about drivers? The only time I had an issue with drivers is when windows update insisted on a different wrong driver. I got it to work just fine after installing the driver on the cd. On linux I have no issues with drivers ever.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Tue Jan 01, 2013 10:12 pm

Speaking of the USB link cable made my Krikzz, has anyone actually got them to work? I bought what I think was his last one when he still had them available. I don't know if mine was DOA or not, but I could never get my computer to recognize I even had it connected.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Jan 01, 2013 11:12 pm

Nemesis wrote:Speaking of the USB link cable made my Krikzz, has anyone actually got them to work? I bought what I think was his last one when he still had them available. I don't know if mine was DOA or not, but I could never get my computer to recognize I even had it connected.
What OS? I can see mine in linux with lsusb, but I haven't done anything more with mine yet. In Windows, I don't think you ever "see" anything until there's a driver that matches the man/dev IDs loaded.

EDIT: Here's what I get from lsusb:
Bus 001 Device 027: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Make sure the board is plugged into a running MD, then connect the USB cable. I still get something with just the USB plugged in, but you never know...

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Wed Jan 02, 2013 9:42 pm

Chilly Willy wrote:Okay, that bitbang mode for the FTDI looks pretty nifty. In linux, the drivers are in the repo for Ubuntu/Debian, so I don't see any problem on that front. They have both proprietary and open source drivers - I just installed the open source ones. There's plenty of info and examples on using bitbang. So I change my mind - the FTDI232R looks like a good choice to try using for a comm cable.
libftdi is a pretty good interface for them if you're familiar with C: http://www.intra2net.com/en/developer/libftdi/

You can get a couple extra IO pins to bitbang by using the Data Terminal Ready and Request to Send flow control pins from the serial port. That plus the CBUS pins gives you 6-bit bidirectional data flow, limited more by how fast you can send USB frames than the chip itself. With Data Carrier Detect and Ring Indicator (read-only pins) you can get 8 bit parallel read.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Jan 02, 2013 10:50 pm

foobat wrote:
Chilly Willy wrote:Okay, that bitbang mode for the FTDI looks pretty nifty. In linux, the drivers are in the repo for Ubuntu/Debian, so I don't see any problem on that front. They have both proprietary and open source drivers - I just installed the open source ones. There's plenty of info and examples on using bitbang. So I change my mind - the FTDI232R looks like a good choice to try using for a comm cable.
libftdi is a pretty good interface for them if you're familiar with C: http://www.intra2net.com/en/developer/libftdi/

You can get a couple extra IO pins to bitbang by using the Data Terminal Ready and Request to Send flow control pins from the serial port. That plus the CBUS pins gives you 6-bit bidirectional data flow, limited more by how fast you can send USB frames than the chip itself. With Data Carrier Detect and Ring Indicator (read-only pins) you can get 8 bit parallel read.
Yep! Like it says on the page about the chip, it's really meant as a replacement for all those devices that used to use the parallel port on the PC. We don't have that many lines on the Genesis controller port, but if you were using a custom card that fit in the expansion slot, you could go with the full width.

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Thu Jan 03, 2013 5:08 am

if you only use tx and rx from the controller port, you could actually make an expansion device that connects to both and control both of them from one ft232

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Thu Jan 03, 2013 7:09 pm

sega16 wrote: What is so bad about drivers?
I don't see the need for drivers for something as basic as usb / serial
And I want to be able to use it anywhere and when (even in the future on Win10 if I want) without to deal with drivers not available

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Wed Jan 09, 2013 3:39 pm

I have to admit I'm having trouble keeping up with the suggestion solutions! :) </not a hardware guy>

But it seems to me the suggested solution is using a Serial-to-USB UART plugged into the joystick port?

Would the whole chain of the solution look something like:

1. genesis software sends data to the joystick port
2. serial-to-usb uart sends it to the PC's USB port
3. some software (a terminal program?) is used to read and show the data

Is 1 possible? I wasn't aware you could send data to the joystick port instead of just reading it.

As for 2, the hardware suggestions seem to have some assembly required. Are there any solutions that would already have everything assembled?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Jan 09, 2013 4:21 pm

Controller ports are all 7 bit bidirectional general purpose parallel ports, you can do a lot of things with them.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed Jan 09, 2013 11:25 pm

djcouchycouch wrote:But it seems to me the suggested solution is using a Serial-to-USB UART plugged into the joystick port?
I personally think using a micro-controller with native USB device support like the Teensy or an appropriate PIC makes more sense. You can do a lot more with it and it will probably be faster than using the FTDI bit-bang mode (you can run the handshake logic on the micro-controller so you don't need to round-trip over USB, just send a packet with a reasonably sized chunk of data). That said, using the FTDI is a little simpler as you don't need to write a program to run on the micro-controller.
djcouchycouh wrote:Would the whole chain of the solution look something like:

1. genesis software sends data to the joystick port
2. serial-to-usb uart sends it to the PC's USB port
3. some software (a terminal program?) is used to read and show the data
As has already been mentioned, the serial on the joystick ports is painfully slow, but otherwise that's the basic gist. If you're using a 4-bit parallel + 2-bit handshake, it might look something like this:

1. 68K program writes nibble + toggled handshake bit to joystick port
2. Micro-controller (or pc using FTDI+bitbang mode) notices the handhsake bit has changed and reads a nibble. It toggles its handshake bit to acknowledge receipt of the nibble.
2a. If using a micro-controller and we've accumulated enough data, send a packet to PC.
3. 68K program reads joystick port to wait for handshake bit from micro-controller/PC
4. Repeat
djcouchycouch wrote: Is 1 possible? I wasn't aware you could send data to the joystick port instead of just reading it.
As TmEE.co says, the ports are bi-directional. This feature is actually used by all games to multi-plex the input pins. One pin is set as an output and is toggled to switch between two sets of inputs (that's for 3-button controllers, it's a little more complicated for other controller types).
djcouchycouch wrote:As for 2, the hardware suggestions seem to have some assembly required. Are there any solutions that would already have everything assembled?
There are no zero-assembly options currently available, but using an FTDI breakout board or Teensy is just a matter of soldering 6-wires from a breakout board to a DB-9 connector. If you get one with headers, you can even hook it up without soldering.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Wed Jan 16, 2013 7:28 pm

Forgive me for my ignorance, but I kept wondering: why wouldn't a serial-to-usb adapter cable work? What would be missing?

Post Reply