Page 1 of 1

USB-Gameport dongle

Posted: 17 Jun 2018, 14:38
by Marko
Afternoon all,

I'll grant it's a little over-engineered, but I've built a USB-Gameport dongle for programming the G.

https://www.thingiverse.com/thing:2965288/files



Marko

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 16:51
by at67
Looks great!

The only thing missing is a pass-through DB9 connector for the controller, (I got sick of continuously unplugging the Arduino and plugging in the controller). So I added a male DB9 connector to my Arduino Nano and a slight mod to BabelFish.ino and now no more stress.

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 17:22
by xbx
I've just soldered my wires to the pcb and left the gameport open for the gamepad...

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 17:42
by at67
xbx wrote: 17 Jun 2018, 17:22 I've just soldered my wires to the pcb and left the gameport open for the gamepad...
I assume the Famicon controller's serial data output is open collector? But what about the Arduino, I don't think BabelFish.ino does anything tricky to simulate open collector outputs for SER_DATA?

You might be causing intermittent shorts between the controller and the Arduino, depending on their state; this may eventually cause some unhappiness.

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 18:51
by Marko
Yup, did consider adding another DB9 and may still do. Been wrangling with my printer, as usual :)

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 19:27
by Marko
at67 wrote: 17 Jun 2018, 16:51 Looks great!

The only thing missing is a pass-through DB9 connector for the controller, (I got sick of continuously unplugging the Arduino and plugging in the controller). So I added a male DB9 connector to my Arduino Nano and a slight mod to BabelFish.ino and now no more stress.
Did you wire the controller DB9 straight through to the output? If you hacked BabelFish I guess you're switching it in software somehow?

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 19:43
by at67
Marko wrote: 17 Jun 2018, 19:27 Did you wire the controller DB9 straight through to the output? If you hacked BabelFish I guess you're switching it in software somehow?
Switched in software on the Arduino whenever it's not using the serial port for commands/downloads etc: here's the circuit diagram, (pretty simple) and here's the link to the new BabelFish.ino, (it's only been tested with the Arduino Nano, you need to add a few constants for the other modules and wire pin2 of the new male DB9 to whatever port you choose), in the circuit below I chose (J1-13, D10), which is PORTB2 on the Nano.

If you search for 'hasController' in 'BabelFish.ino', it will be become quickly apparent what I did.

P.S. If you wire it straight through, without open collector outputs for the Famicon Controller and the Arduino, I fail to see how contention and a possible short won't be an issue.

https://github.com/at67/gigatron-rom/bl ... elFish.ino

Arduino_Nano.png
Arduino_Nano.png (34.21 KiB) Viewed 6026 times

Re: USB-Gameport dongle

Posted: 17 Jun 2018, 19:55
by Marko
at67 wrote: 17 Jun 2018, 19:43
Marko wrote: 17 Jun 2018, 19:27 Did you wire the controller DB9 straight through to the output? If you hacked BabelFish I guess you're switching it in software somehow?
Switched in software on the Arduino whenever it's not using the serial port for commands/downloads etc: here's the circuit diagram, (pretty simple) and here's the link to the new BabelFish.ino, (it's only been tested with the Arduino Nano, you need to add a few constants for the other modules and wire pin2 of the new male DB9 to whatever port you choose), in the below circuit I chose J1-13, D10, which is PORTB2 on the Nano.

If you search for 'hasController' in 'BabelFish.ino', it will be become quickly apparent what I did.

P.S. If you wire it straight through, without open collector outputs for the Famicon Controller and the Arduino, I fail to see how contention and a possible short won't be an issue.

https://github.com/at67/gigatron-rom/bl ... elFish.ino


Arduino_Nano.png
Yup, I got ya. 2 DB9s and a USB port starts to get unwieldy for a "dongle", I may need to break out the gameport cable... *ponder*

Re: USB-Gameport dongle

Posted: 18 Jun 2018, 08:47
by marcelk
This looks neat!

I also don't believe the game controller data line is open collector. From all we see it is behaving as if there is a CD4021 inside. Granted, we've put a pull-up resistor R19 on the board, but its intended function is to provide a defined input voltage to the 74HC595 when nothing is connected.