Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Universal Console Connector Project  (Read 17760 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Universal Console Connector Project
« on: December 15, 2007, 02:38:36 am »
Ok, here's the deal.  I'm completely bored with my current projects and I've prtty much stopped working on them.  My new obsession with the wii has gotten me back in the console mindset.  I'm also interested in learning simple pic programming.  I'm also experimenting with other coding languages and I need to do some apps that are light on the api and heavy on actual code, so I can get my feet wet.  So what I came up with is this... I intend to extend the functionality of parallel port drivers like ppjoy to include every documented console controllers up until last gen.  (I stop at last gen, because at this point all console controllers are glorified usb and/or bluetooth devices and thus can be used on a pc quite easily).  I also intend to add non-standard controller support (zapper, guncon, arkanoid controller, ect).  Of course, support for lightguns would be limited to the games and your hardware, but it is still possible to do.  The idea is to be able to use a single parallel port to wire up all the devices at once and be able to switch modes via hotkey.  In other words you can put 2600, nes/snes and playstation ports on your pc/mamecab using a single parallel port interface and use all of the controllers (one type at a time of course) without changing the drivers around. 

Assuiming of course I can get that far, I next want to start making pic adaptors to adapt all of this out to the two main emulation consoles, mainly the xbox and wii.  The idea is you'd plug this adaptor into the parallel port connector of your pc adaptor and be able to use the same rig on your various systems.  I chose these two systems because the wii's VC is currently the only legal way you can buy roms and the oiginal xbox can run nearly every console emulator imaginable. 

Now keep in mind I might lose interest eventually, but if I get help and encouragment I won't.  I want this to be a community project, so all of my notes and ramblings will be posted here.  Comments and suggestions of course are welcomed.  The following posts will include details of each system and the proposed method of inteface.  If you have any data to add, please do so as some of this stuff is a little hard to find. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #1 on: December 15, 2007, 02:40:48 am »
General:  (This post is just a cumulative count of the stuff I'll need to do em all.)

Required Digital Inputs:  6
Required Analog Inputs: 2
Required Outputs: 3
Required Grounds: 1

Power Requirements:

3.3v
5v
7.5v

Proposed Driver functions:

The intention is to be able to plug-and un-plug controllers on the fly and have the driver automatically detect which controller is inserted via holding down a hot-key on the controller.  This would require a pretty tricky wiring protocol, but I think its is possible, the trick is to use the inputs in such a way that the hotkey for each controller can only be pressed on that controller, thus the driver knows it has to be said controller and switches modes. 

Rough Wiring:

Parallel Port Input#:          Function (2600, genesis/sms, nes/snes)

1                                        UP/UP/DATA 1
2                                        DOWN/DOWN/DATA2
3                                        LEFT/LEFT/DATA3
4                                        RIGHT/RIGHT/NA
5                                        BUTTON1/NA/NA
6                                        BUTTON2/NA/NA

Parallel Port Output#:        Function (2600, genesis, nes/snes)

1                                         NA/NA/LATCH
2                                         NA/NA/CLOCK
3                                         NA/SHIFT/NA

(The following tables are for the 2-player 2600 and Neogeo Interfaces, which assume we've hacked up a snes pad and are wiring it to it's buttons.  This hacked pad would be wired in parallel with the snes ports on the interface, as if a snes controller was plugged in.)

Snes Button:          function:(2600 2p, Neogeo)

UP                          UP/A
DOWN                    DOWN/B
LEFT                       LEFT/C
RIGHT                     BUTTON1/D
A                             RIGHT/UP
B                             BUTTON2/DOWN
X                             NA/LEFT
Y                             NA/RIGHT


Hotkeys:

The wiring above (sorry the genesis part is incomplete atm) is done in such a way that there is a combination of buttons that can only be pressed in each individual controller.  When you plug in a controller you hold down this combo until you hear a wav file played (unique for each controller type) letting you know the controller was detected.  Because it'll be used the most, the snes protocol will be used by default if no buttons are pressed.  No matter what protocol mode the dirver is currently in, it goes ahead and reads all of the parallel ports input and output pins.  This way it can detect hotkeys even if it isn't reading the joystick the right way. 

2600(1p direct interface)=UP+Button 1  (Only parallel port inputs 1-3 are used for the snes, so we know it's not a real snes, nor is it a neogeo hooked to a hack.  The "up" part really isn't necessary, but this way it conforms to the 2p hack's hotkey.)

2600(2p snes hacked interface)=UP+Button 1  (Unlike the neogeo hack, the 2600 hack uses the right arrow for button 1, since the neogeo contorl stick can't press up and down at the same time, this must be a 2600 2p hack)

NEOGEO=A+B+C+D (These inputs are mapped to u/d/l/r on our snes hack and since we know that it's impossible to press all directions at once, only a neogeo controller could do this combo) 

SNES=A+B+X+Y (The 2p 2600 and neogeo hacks have their directional arrows wired to the snes buttons, making it impossible to hit all 4 at once, so we know that this must be a snes pad)

NES=A+B(This would be up and down on the neogeo hacks, so again, this can only be a nes or snes, but both use the same protocol). 

IMPORTANT NOTE:  Hotkeys to switch from one mode to another are fairly universal and should work regardless of the last mode you were in.  I'm rather stumped at how to go from 2600(1p) to snes though as the serial protocol wouldn't be activated normally and thus you can't read the snes button states passively.  A solution might be to put the snes data line on an unused parallel port input and read the pad all the time, even when in 2600 mode.  This would really slow down the 2600 mode though, which is raw, so perhaps a keyboard hotkey as well?
« Last Edit: December 15, 2007, 06:03:42 am by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #2 on: December 15, 2007, 02:59:25 am »
Atari 2600, Sega Master System and ALL Consoles Prior to the NES

Yes they all use essentially the same interface, although some don't use all the pins.

Joysticks prior to the nes used straight, dedicated, switch connections, just like our arcade panels.  In general, the controllers were passive as well, meaning you don't need a voltage line for them.  Yes, this means you can add a 2600 port directly to your control panel!

(The 2600 and sms along with most of the consoles of this era use a standard db9 serial connector as a port)

Pin#:          Function:
1                 UP
2                 DOWN
3                 LEFT
4                 RIGHT
5                 Analog Y
6                 Button 1 or ?LightPen?
7                 +5v (Used for analog controllers only)
8                 Ground
9                 Analog X or Button 2 (SMS and atari joysticks beyond the 2600)

Of course the raw analog ports complicate things a bit.  The only port on the pc that supports raw analog that I know of is the gameport, which is quickly becoming a thing of the past.  WICO trackballs for the 2600 used the regular digital inputs, so they would work, as did the driving controllers.  Only the paddle controllers would be effected by omitting this portion.  I also don't have a clue how the atari lightpen works, only that it's documented that it utilizes button 6 somehow. 

The goal of the project is to add support for at least two controllers per system, but this might not be possible on these earlier controllers due to the limits of the parallel port. (far too many pins are needed)  Of course it could be done with a very minor pic chip, the easiest way would be using the nes parallel to serial converter chips. 
« Last Edit: December 15, 2007, 03:06:09 am by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #3 on: December 15, 2007, 03:47:46 am »
Sega Genesis and Saturn:

The genesis is *almost* a pure digital controller.  It still uses the same pinouts as the 2600 only with shifted functions used on controllers with more than two buttons.  This means, in theory, we can use the same db9 for the genesis as the 2600 (Yay!).  Of course the saturn connector is totally different, but seeing as nobody likes that system anyway, who cares.  ;)  Depending upon the number of buttons on the controller, the protocol uses up to two shift pulses to read the data in parallel.  In other words, the up/down/left/right and fire pins are the only pins used to get data, and the data is passive and dedicated, just like the 2600.  However, depending upon which shifters are turned on, the data on these pins can represent other buttons' states as well.  Think of the shift/shazaam function on your keyboard encoder. 

Pin#:          Function: (shift 0, 1 and 2)
-------          ---------------------------------
1                 UP/UP/Z
2                 DOWN/DOWN/Y
3                 NA/LEFT/X
4                 NA/RIGHT/NA
5                 +5v
6                 A/B/NA
7                 Shift (+5v)
8                 Ground
9                 START/Z/NA


To get all the states, you simply have to pulse the shift state to the ground at the driver end of things and read the switch status at each pulse, combining them all to get the current status of all the buttons.  You keep the shift switched off for 13 millseconds, read for shift 0, turn it on, read for shift 1, turn it off again, turn it on and then magically you get shift 2 and finally pulse it once more to reset the controller's chip or else kittens will cry.  The pulse pattern is stupid and doesn't make any sense due to sega using a crappy standard.  It is quite easy to read though.  The saturn controller works the same way, only some of those "NA" spaces are used for the select, l and r buttons.  Again, the saturn contoller isn't very popular and getting ahold of a saturn controller port to use would be next to impossible, so I'm not going into that one in any detail.  Assuming you wire up the pins right it'll work though.

Further details:

http://www.cs.cmu.edu/~chuck/infopg/segasix.txt
http://www.gamesx.com/controldata/saturn.htm
« Last Edit: December 15, 2007, 03:50:30 am by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #4 on: December 15, 2007, 04:35:41 am »
Nes/Snes

Thankfully, nintendo had the common sense to use a serial protocol for their controllers, which makes things a ton easier wiring-wise.  The nes and snes protocol is identical, only, obviously the snes controller has more inputs. 


The pinouts are as follows:

Nes:

Pin#:          Function:
1                 +3.3V (Some sites say 5, but the nes/snes only outputted 3.3 to the pin)
2                 DATA 2 (Special Controllers Only)/Zapper Light Sensor
3                 DATA 3 (Special Controllers Only)/Zapper Trigger
4                 GROUND
5                 CLOCK
6                 P/S
7                 DATA 1

SNES:

Pin#:          Function:
1                 +3.3V (Some sites say 5, but the nes/snes only outputted 3.3 to the pin)
2                 CLOCK
3                 P/S
4                 DATA 3 (Special Controllers Only)
5                 DATA 1
6                 DATA 2 (Special Controllers Only)
7                 Ground

How you get data is suprisingly simple.  The p/s or "latch" pin is used to trigger a poll.  We ground this pin and then the states of all the buttons are stored on a chip in the controller.  Now everytime we ground the clock pin, one of the button states is sent, in order for a total of 8 pulses for the nes, and 16 for the snes.  We buffer all of these states to get the status of the entire controller.  Something that's useful to us is that the nes pad will continue to output 1's if you try to read past 8 bits (we'll get to that later).  The two extra data pins are used for stuff like the zapper/super scope and the arkanoid controller.  Little is known about them but it should be possible to add support if we can find some specs.   

Anyway.... each button's status is sent in order... here is the order:

BIT#:          FUNCTION:
-------          --------------
1                 B (A on the nes)
2                 Y (B on the nes)
3                 Select
4                 Start
5                 UP
6                 Down
7                 Left
8                 Right (Last button polled by NES)
9                 A
10               X
11               L
12               R
(The remaining pins are rarely used)


The snes mouse uses an additional 16 bit buffer, activated if the un-used bit 16 is turned on, but it's too complex to post here.  Just rest-assured it could be easily supported.  Then again, why you'd need support for the snes mouse on a pc is beyond me.

As mentioned in the atari section, the chip in a snes controller could be used to lengthen the number of inputs we have to 16 or more, making it possible to hookup two 2600 pads via the parallel port.  From what I understand, this chip is quite cheap and if nothing else a snes controller could be canibalized, simply taking each pin on the atari controller and soldering it to a button contact on the controller. 



Zapper:

I finally found the zapper schematics.  Basically pins 2 and 3 are used as raw switches, one for the trigger in the gun, and another for the photosensor.  As you all know the zapper is NOT a real lightgun, rather simply a light sensor and a switch.  Basically what goes on is when the zapper's trigger is pulled every target on the screen is covered with a white box.  If the gun is aimed at a white box, it trips the sensor inside the gun and that signal is sent back to the nes letting it know that the target is hit.  Since many games use multiple targets (like duckhunt, with 2 ducks on the screen at any given time) what the nes actually did was rotate potential targets in a loop, only putting the white square on one at a time.  When/if the light sensor is tripped, the nes made note of which target was currntly highlighted and used that to determine which one was hit.  I've discovered, unfortuantely that the photsensor is some sort of funky ir-sensor (meaning lcd displays are probably out as they don't emitt ir) and some rudimentary timing IS involved.  Basically the gun runs at 15khz and your standard crt monitor will run at around 31khz.  Tv-out should work great though.   Also, apparently, by adding an inline resistor to the works you can get it working reasonably well on a computer monitor.  The zapper ONLY works on port 2 on the nes, so we only have to worry about reading the two pins on that port.

Supporting the zapper on a hid interface would be quite simple.... we simply wire these extra two pins to some spare raw inputs on the hid chip (probably buttons 9 and 10 as the nes pad only has 8 inputs).  Then we'd get a button pressed when the trigger is pulled and another if the gun is pointed at light.  It'd be up to nes emu programmers to add support.  Quite frankly though, I don't see why they wouldn't.  Assuming the timing is good on the emulator it'd take about 10 minutes to add the code and seeing as how this is how the nes carts originally worked, if anything there's a major hack somewhere in their code, probably using getpixel to check for white at the current position of the mouse cursor. 

Arkanoid Vaus Controller:

I thought this one would be hard to implement, but actually it won't be.  The controller uses the 8 bit buffer normally used for the buttons to send the hex value of the pot.  The pin for the zapper button is used to detect the button press.  (Which is raw btw.)  Now of course there isn't any way of detecting if the arkanoid controller is connected.  Arkanoid got around this problem by making the game one player  and always assuming that the nes gamepad was in port one (which could optionally be used to control the game) and the vaus controller was in port 2.  We can essentially do the same in our hid chip by mapping a spare analog axis to the hex value of controller 2 at all times.  Since neither the nes or snes have any analog axis to worry about (unless we decide to map the dpad to one, in which case we'd still only need 4 out of the available 8 for two controllers) this should work fine. 

Satellite and Four Score (4 player adaptors):

Still farily easy but more data on the physical hardware is still needed.  (Anybody wanna send me one to take apart and ruin?  ;) )  The adaptors made use of both ports, with both ports simply sending along 16 bits (two controllers each) and an 8 bit id string telling which, if any controllers are connected.  The p/s switch is sent to port 1 only though and you mgacially start getting data from BOTH ports, which makes me wonder how it knew to do that.  My guess is if we took apart a 4score, we'd find it makes use of those elusive two extra pins to detect a connection.  This is the only part that needs looking into.

So hid implementation is fairly simple, just read the data for all 4 controllers and map them to buttons....oh wait....  we only have 32 digital inputs!  Well that's ok, while the typical chip reaches it's physical limits at around 32 buttons (unless you want a controller with the responsiveness of a slug.) I'm pretty sure that the virtual limit is around 64, so we are still good.  If not then we just map our dpads to our 8 available axis, remembering to turn off the arkanoid axis off in this very special situation. 

PowerPad:
I'm a bit confused on this one. The specs I found say it's read like a normal pad essentially with an 8 bit buffer as normal, but the powerpad had 8 inputs!  The specs go on to say that in the 3rd and 4th bit the status of two buttons are given.  How exactly is that possible?  My guess is plugging in one of these bad boys to a completed adaptor would clear things up.  My guess is some buttons share the same input and the games are coded in a way that you won't notice.  Regardless, hid interface would be easy.

Microphone:

The famicom (NOT the nes) had a microphone on the second controller (which did NOT have start and select buttons).  the microphone was 1 bit (probably sounded horrible) and added nothing to gameplay other than hearing your own voice over the tv.  Since the famicom controllers were premenantly attached to the console, and we already have a better way of doing this on the pc (a microphone, duh!) this won't be implemented.

PowerGlove:
????????
My guess is the pg had some sort of processor that translated all of the finger motions and positional data into button presses, because the nes simply isn't designed to handle the load translating all that crap would be.  The exception might be the positional data, as I've heard on some other adaptors that the pg buttons work, but not the motion sensing.  Supporting this rather useless controller would be a low priority anyway.

Super Scope:
???????????

Super Multi-Tap:
???????????
It is also of note that there are several versions of this device on the snes and the protocol may or may not be different.  My guess would be it works exactly like the 4-score except obviously with more bits to handle the extra buttons on a snes pad.

Mouse:
(see notes on snes above)
It'd surely be possible to add support, but unless we are at the console adaptor stage (as in all these controllers to the xbox or wii) is there really any point?  I mean it'd really complicate the code and what emulator is going to bother adding support when every pc on the planet has a mouse.

Proposed Hookup:

Data 1 1p= hid chip switch 31
Data 1 2p=hid chip switch 32
5v=hid power supply
Ground=hid ground
Data 2 1p=Not Connected
Data 3 1p= Not Connected
Data 2 2p= hid chip switch 9
Data 3 2p=hid chip switch 10
clock 1p+clock 2p = hid clock output?  (physical switch undetermiend atm)
p/s 1p + p/s 2p=hid output 1 (physical switch undetermined atm)

Proposed function:
(Note that since the powerpad, powerglove, mouse and super scope are undocumented atm, these controllers aren't taken into account yet.)

we would need two, 32 bit buffers and an integer variable called "padtype"

padtype 0 = nes
padtype 1 = 4score
padtype 2 = snes
padtype 3 = multitap
 

trip p/s switch to reset buffers in both ports

Read bits 1-8 of BOTH ports by reading the bits, storing them in a buffer, triggering the clock latch and repating 8 times

Read the next 8 bits the same way..... If bits 13, 14 or 15 are turned on then the pads are either single nes pads or a nes 4 score as
those bits are NEVER used on a snes pad.

If we've determined it's a nes protocol (13, 14 or 15  are on) then we check to see if bits 13 and 14 are on (up and down).  Since these can't be pressed at the same time, we've determined that they are regular pads if they are both on and we dump the buffer for this second set of bits and set the padtype to 0.  If not then we keep it for pads 3 and 4 and set the padtype to 1.

If we determined it was a snes protocol (13, 14 and 15 are off) then the two buffers are merged to make the two pads.  We go ahead and read another 8 bits.  If 13, 14 and 15 are off then we can assume that it's a multitap and we go ahead and read the other 8 bits to finish up our buffer for pads 3 and 4 and set the padtype to 3.  If they are on then it was a normal set of snes pads, we dump that 8 bits and set the padtype to 2.

Now that we've figured all of that out, we handle our special controllers. 

If padtype doesn't equal 0 (nes) then we do nothing if it is then we set the value of analog axis 5 to the de-hexified value of pad 2's buffer (for arkanoid controller).  We also replace hid buttons  9 and 10 with the raw values of those inputs (for arkanoid's button and the zapper signals). 

Finally done with all the polling, we take the contents of both buffers and dump them out on the hid's output lines, changing the status of all those controls.  There's really no need to reset the chips on the controllers, as that'll be done first thing next loop.

references:

http://pinouts.ru/Game/snescontroller_pinout.shtml (I'm using the pin numbering of this site)
http://www.gamesx.com/controldata/nessnes.htm
http://nocash.emubase.de/everynes.htm#controllers
« Last Edit: December 20, 2007, 06:53:04 am by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #5 on: December 15, 2007, 04:57:33 am »
Neo Geo/ TurboGraphix 16

Probably because these conosles are based on arcade hardware, all of the logic for the controller is in the console and, like the 2600 controllers, each pin represents a single button.  So yes, like the 2600 controllers you can add a neogeo/tg 16 port to your arcade panel directly!  Unfortunately, these controllers have more buttons than the parallel port can handle, so while the use of a snes chip on the 2600 style controllers is optional (assuming you want to only use one controller) it would pretty much be a requirement on these controllers.  More annyoing still is the fact that the neogeo controller has 2 inputs, meaning the standard 16 bit buffer isn't big enough if interfacing two controllers.  This can be worked around by activating the dormant 16th bit, giving use access to another 16 bit buffer normally used for the mouse.  I'm unsure exactly how that'd work wiring-wise though.

I won't post anymore data here as it's pretty standard stuff.

references:

http://www.epanorama.net/documents/joystick/tvgames.html

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: Universal Console Connector Project
« Reply #6 on: December 15, 2007, 06:23:45 am »
Hi Howard,

That's a very interresting project. But i think you should wire to USB not parallal port.
Most of new PC don't have parallal port.

then your device will be recognized  automatically (if designed for of course) as a standard USB joystick by the PC and will be automatically supported by most of emulator.

Some project already exists, for instance to connect a 2600 Type joystick to USB port.  (i think you can found it on AtariAge)

I'm not a USB expert, but i just bought a book about USB Device, and it "seems" quiet simple.


headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Universal Console Connector Project
« Reply #7 on: December 15, 2007, 11:33:17 am »
I agree with youki on going USB port. You know this would be a great project for Ultimarc or GGG to take on. Using an EEPROM that you can program like the IPAC for different controllers. Howard how about contacting Andy and asking him about making the hardware? Then we could concentrate on the software to configure it. If there was a simple unit you could program for any console controller I know I would buy one.

northerngames

  • Trade Count: (+18)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2927
  • Last login:April 09, 2016, 04:18:51 pm
Re: Universal Console Connector Project
« Reply #8 on: December 15, 2007, 11:53:16 am »
theres also the old xbox controller mod where it plugs in usb to the pc and any of the other console controllers plug into the xbox controller by vga cord.

http://forums.xbox-scene.com/lofiversion/index.php/t510168.html



or the link can be used for pictures and pinouts of what is what on the pcb's. 

gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: Universal Console Connector Project
« Reply #9 on: December 15, 2007, 12:56:06 pm »
Looks like a great project. I personally like the parallel port interface since I tend to use older pc's. But anyways you can buy pci parallel port cards.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #10 on: December 15, 2007, 04:50:42 pm »
I agree with youki on going USB port. You know this would be a great project for Ultimarc or GGG to take on. Using an EEPROM that you can program like the IPAC for different controllers. Howard how about contacting Andy and asking him about making the hardware? Then we could concentrate on the software to configure it. If there was a simple unit you could program for any console controller I know I would buy one.

Well that's the plan actually..... not necessarily ultimarc (that's a great idea though) but the idea was to use the parallel port as a starting point as working on the pp is virtually free, then we can make pp to whatever adaptors.  Also then cheap people (read me) can skimp on some of their rigs and just use the parallel port.  See the idea is to get all the different protcols setup so that they'll play nice, then output them to parallel port connector.  After that it should be rather trivial to convert parallel to whatever.  I mean so far I've found we need around 5 inputs, 3 outputs and a few voltages, all of which can be gotten from the pc.  A standard HID chip should be able to do it and would even eliminate the analog problem.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #11 on: December 16, 2007, 05:06:42 am »
Playstation

Ok I'm not even going to pretend I completely understand this one.  Quite frankly it's pretty complicated and might be a bit over my head.  It uses a data in line, a data out line, an akk line and a clock.  Data is sent in 8 bit bursts apparently and the clock is used to know when to actually read the data line.  That part, beleive it or not, is the easy to understand bit.  The problem is there is so much data, and so many if/then deals going on because of the 6 or 7 different types of psx controllers that it'd take an insane amount of code to fully support all psx devices.  I'm just putting the references on this one, hopefully somebody else can figure it out. 

Oh... also of note is that this controller needs 7.5-9 volts, something that isn't easy to get from a pc.   


references:
http://www.epanorama.net/documents/joystick/tvgames.html

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #12 on: December 16, 2007, 05:57:30 am »
N64/Gamecube

I know I said there wasn't any point in supporting anything past last-gen, but the gc controller is extremely close to the n64's protocols and it's the last of the non-usb controllers, so we might as well throw in support for it. 

N64
Pin#:          Function:

1                 +3.3v
2                  Data
3                  Ground

GameCube
Pin#:          Function:
1                 +5v(for rumble only)
2                 Data
3                 Ground
4                 Ground
5                 ?
6                 +3.3v


Ok the first thing you might notice is there's only a single data pin.  The pin apparently is bi-directional, which will prove to be a pain in the butt.  It works on the same principal as the snes protocol, only a tad more advanced.  Basically you optionally send a signal down the data line to identify the controller, and it sends back the type or in the n64's case, what is plugged into the memory card port (nothing, a card, or a rumble pack).  To get the status of the buttons, you simply send a different data string and it IMMEDIATELY (I'm talking 2us) shoots a 32 bit string down the data line (In the case of the gamecube, I think it's 64 bits actually).  Each bit is a 4us burst.  If a button is off, then the burst is 3us low, with a 1us divider.  If the button is depressed then only 1us is low and 3us are high.  Gives us like 1us leeway for speed, bt that is still pretty fast to be handled by the parallel port directly.  A chip would almsot have to be used. 

Anyway, the data sent is two 16 bit banks (4 for the gamecube):

N64
Bit#:          Function:
1                A
2                B
3                Z
4                Start
5                Up
6                Down
7                Left
8                Right
9                NA
10              NA
11              L
12              R
13              C UP
14              C Down
15              C Left
16              C Right
-------------------------
17-24         X axis
25-32         Y axis

Gamecube
Bit#:          Function:
1                NA
2                NA
3                NA
4                Start
5                Y
6                X
7                B
8                A
9                NA
10              L (clicked)
11              R (clicked)
12              Z
13              UP
14              Down
15              Left
16              Right
-------------------------
17-24         X axis
25-32         Y axis
-------------------------
33-40          X axis (c stick)
41-48          Y axis (c stick)
-------------------------
49-56          L (Analog)
57-64          R (Analog)


As you can see, there is a lot of data to read, but like the snes protocol it's neatly divided and easy to parse once you get it.  Using rumble has been well documented for both controllers and is farily stright-forward to use.  Obstacles that aren't as well-documented are the memory pack (n64 only) and the gamecube's elusive microphone option, which is important to support because I believe that the dk bongos show up as a gc controller with a mic attached. 

The speed is the main factor that makes this one fairly impossible as a direct interface.  On top of that, as fast as this one is, the third-party controllers are even faster. 

references:

http://www.raphnet.net/electronique/gc_n64_usb/gc_n64_connectors.png
http://www.mixdown.ca/n64dev/
http://www.int03.co.uk/crema/hardware/gamecube/gc-control.htm

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #13 on: December 17, 2007, 05:42:56 pm »
Update!

I was looking into the ppjoy docs and I came across a theoetical wiring diagram for the turbographix that devised a rather clever way to support multiple joysticks.  Basically you wire all the switches of the various controllers together using the normal inputs lines, but you wire the ground to each joystick seperately, grounding it to a output line (we often use these to light leds) instead of a normal ground line.  Then to read two (or more) joysticks, you simply "turn on" ground 1, read the joystick, then turn it off and turn on ground 2 to read the second stick.  Pretty brilliant actually.  I'm not going to update the descriptions above (yet) but that would take care of the neogeo/tg16/2p 2600 problem quite nicely. 

Since you all requested it, I also looked into a usb hid solution.  It is quite possible, but we have various obstacles to overcome.  The first being cost.... A true usb chipset is quite expensive and the programmer even more expensive (Think $500-1000 investment to have something to test the code on.) Luckily there are atmel processors, normally used for serial devices, that are capable of hid output.  One chip (the atmel 16 I believe?) Costs around 6 bucks retail, cheaper if you buy on ebay or in bulk.  The circuit (and I use that term loosely) required to run the chip consists of a couple of resistors and a usb connector.  The chip can be programmed, on-the-fly via a direct parallel port and/or serial connection, with optional (and of course more expensive) usb programming solutions.  With the proper firmware (and luckily somebody has already coded some) the atmel 16 is capable of 8 analog axis and 32 buttons.  That should more than cover the goal of at least 2 joystick ports per system, with all 2600 and neogeo style connections supported right out of the box. 

This started me thinking.....  The idea of making one chip that supports all the connectors isn't new but due to size restrictions on the chip, custom drivers have been the only solution as these tiny processors simply can't handle all the code.  Since it'd be nice if we didn't have to have any special drivers (because if we did a set would have to be mode for each os) it might make sense to do the opposite of what everyone else is trying to do, namely we could have a sepearate chip that de-serializes the snes/nes/psx/n64/gc into raw inputs and then feed them to the hid chip.  A driver interpreter program could fill in the very minor gaps (zappers, light pens ect) by analyzing the joystick data and using it to control mice and such.  Since most people would never use such extended features, it wouldn't be so important that a driver is made for every os.

Ideas?  Comments?

« Last Edit: December 17, 2007, 06:56:43 pm by Howard_Casto »

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: Universal Console Connector Project
« Reply #14 on: December 17, 2007, 06:02:27 pm »
Quote
it might make sense to do the opposite of what everyone else is trying to do, namely we could have a sepearate chip that de-serializes the snes/nes/psx/n64/gc into raw inputs and then feed them to the hid chip.

It is what i would do, i think.
But does snes/nes/n64/gc and psx use the same serial protocol? If not, it could be tricky to manage all with one chip.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #15 on: December 17, 2007, 06:50:16 pm »
snes and nes use the same protocol, the n64 and gc use (virtually) the same protocol and the psx uses a totally different one.  The timings of the devices as well as the required inputs/outputs are all similar though.  Also something that could be useful is that the psx and gc ports both have an extra ground built into the controller port that is tripped when the controller is plugged in.  Assuming we could devise a similar trip for the n64 controller one could use these grounds to determine which type of controller is plugged in and switch the internal code acordingly.  I think we could barely squeeze in enough code to do all 4. 

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Universal Console Connector Project
« Reply #16 on: December 19, 2007, 03:36:20 am »
That's a very interresting project. But i think you should wire to USB not parallal port.
Most of new PC don't have parallal port.

Very True.  You want to give your project a chance at life.

None of the MB I buy for work use have Parallel anymore.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #17 on: December 19, 2007, 04:00:05 pm »
I'm gonna play with some atmel chips after the holidays and see how far i can get.  I've already found source to get nes, snes, atari, master system and n64/gamecube working in hid mode on this chip.  Hopefully I can find a way to squeeze it all in the code for a single chip and find a more elegant way of switching than just setting jumpers.  I don't get what all the parallel port hate is about though.  I fully intended to make a usb version as well.  The thing is the parallel port is just some i/o pins and a few pins for voltage, so once the parallel version was done it'd be pretty simple to convert it without any modifications to use the i/o pins on a generic hid chip.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #18 on: December 20, 2007, 06:54:32 am »
Just a bump... I found a new nes hardware website this morning and it really cleared things up regarding the special controllers.  I've updated the nes section accordingly.  Note that I think it's quite possible to support most (if not all) nes/snes accessories now!

Note that in the nes section I've also started referring to the hid and not the parallel port.  I will eventually update the other sections this way as well.  While I still think it's perfectly possible to do the parallel port route, lack of analog inputs on the port make it difficult to use as a universal example.  I'm going to start with the hid on the hardware end of things, and if there is interest I'll work on a parallel solution as well later on.
« Last Edit: December 20, 2007, 06:57:45 am by Howard_Casto »

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #19 on: December 20, 2007, 07:41:21 am »
Hi all and I think I speak for everyone when I say this is an excellent idea. If you can get this project 'boxed up as a resale unit for the masses, I think you'd be on to a winner.

On this same line of thinking, I'd be interested to see an adapter that allows connection of an ipac to each different genuine console in a reverse way to this. So whereas you want to make a multi-input, single-pc connection, I'm suggesting a USB or PS/2 input, multi-joypad connector output, so your arcade controls can just be plugged into any genuine console. I'm thinking this would be good for newer, non-emulated consoles. I know you can get a connection kit like this for linking to your playstation, but it involves too many individual connections of wires, so even more spaghetti under your panel.

It would be something like this:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #20 on: December 20, 2007, 06:26:36 pm »
I get what you are saying, but it doesn't exactly make any sense cost wise or complexity wise.  A usb hid interface (including the one i'll be building) includes 8 analog axis and 34 inputs, that's enough for a 2 player panel and then some.  Also the ipac doesn't have analog inputs, so half of those joysticks wouldn't work properly.  So why use the ipac at all?  There is the random game that doesn't support the joystick, but ahk and or a program like joy2key can handle it.  I prefer keyboard encoders myself as I can skip this step, but if you are going to put both on a cab it'd just make more sense to ditch the ipac.

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #21 on: December 21, 2007, 07:54:24 pm »
the reason is that I build arcade cabinets, and many people ask 'Can I add genuine consoles to it?'.

I would like it to still interface well into a pc without ghosting etc., and be constantly plugged in, but add the addition of the majority of digital controls found on a lot of joypads.

I hard-wired my controls into hacked PS1 joypads, and the digital controls are enough for fighting games like tekken and soul edge etc. I'd like to be able to add the option of including connection of  most of the major consoles with digital inputs at least. So forgetting analog controls, I would like to see a unit that allows connection of digital X-Box, PS1+2 and perhaps N64 and Gamecube controls. At least thenn great titles like Soul Calibur and a lot of modern platformers from these consoles could be played. I could then make control panels with 8 buttons to allow for all the buttons of PSX, and also the d-pad of each of these consoles. Add a VGA Box and voila - console in a mame cab.

Would you be interested or give me an idea of if this could be done?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #22 on: December 22, 2007, 07:40:01 am »
It can't, at least not easily.  Keep in mind I am very much a beginner with pic programming, but:


A device such as an ipac uses a different type of matrix (not to mention hid) from a console style interface because a keybaord encoder is just that, a keyboard, while all the devices we are talking about are gamepads, which work differently.  The problem is two-fold....  the size of a keyboard matrix is too large for most chips to handle, meaning there are hardware incompatabilities and there are too many physical inputs on a standard layout for a single gamepad to use, meaning depdning upon the layout, certain buttons wouldn't register. 

What would have to be built is a chip that plugs into the usb connector, emulates a pc, deserializes the ipac data, interprets it, configures the data for the pads in question and sends it out to the console via serial pins.  The ipac would then be essentially dis-connected from the pc because of this.  Now I suppose it'd be possible to write a "pass-through code" to make it still show up as a usb keyboard in windows, but all you are doing is making things complex.  The pc emulation would take up a lot of the chip's space, meaning that you'd probably need a different adaptor for each console, which is the exact reason I'm doing this (nobody wants to pay 20-50 bucks per console).  See in essence, the only way to do what you are saying efficiently, while still using an ipac, is to get andy to re-write the code to the ipac.  Even this probably wouldn't work due to the pcb design (ipac only has two output lines, we often need more than that to communicate with a console)


Where as the proposed hid chip takes away all of these problems.  Wire up your arcade controls to the "raw" pins on the interface.  In windows it'll show up as a big-old joystick, no ghosting problems or any of the things you mentioned.  Have an emulator that doesn't like joysticks?  No problem, load up joy2key or something similar.  You can still use the same chip for all of your console ports, to plug in regular controllers.  Inside the chip, it'll be coded to show up as a hid joystick, meaning there's actually code inside the chip doing all the conversions (no drivers!).  Because of this, the hid implemenation code inside the chip can (and eventually will) be replaced with anything, including replacing the usb out with outputs required by any of the modern consoles (must be a "smart" console that asks for a joystick id, such as xbox, gc/wii ps2, ect).  So in essence, because we have control over the code, this method makes far more sense.  I will eventually write "startup" code for the device when it recieves power, which could potentially allow one to insert gc or xbox code long with the hid implementation and have it send out console data instead of usb data.

So yeah, it can be done, but at least while using the ipac, it isn't worth it.  The x-arcade panels, I believe use different adaptors, but you'll soon see why I don't like that method when you look at the price.  :)  Hooking up a console AND a pc doesn't make a lot of sense to me either... there aren't many arcade-style games left on modern consoles, much less ones that don't use analog inputs and/or specialty controls, much less ones you can't find a pc port of or can run on the pc via emulation.

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #23 on: December 22, 2007, 02:43:16 pm »
So ok, forget the ipac connection.

In theory then it would be possible to build a unit (in effect a housing with the equivalent of a few hacked joypads inside, or a collection of smaller circuit boards that replicate the joypad digital outputs) with the console joypad outputs one side, and a collection of wires with spade connectors the other side (a la mini-pac) to connect straight to the control panel microswitches.

It wouldn't need to be a programmable unit, just in a set layout as if you had hacked several joypads as I did on my machine....

Yes titles are limited, bt the requests I've had are huge!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #24 on: December 22, 2007, 04:15:55 pm »
nope... shouldn't need any of that.  The singular atmel chip pcb would do it all.... no hacking required.  See I'm supporting neogeo controllers, which are essentially jamma.  As in they are just switches and a ground.  There will be enough leftover inputs to do a full panel.  Or at least a full 2-player panel.  Of course you've gotta build the darn thing (unless we get someone to mass produce them) but there's really nothing to it other than soldering 4 legs to a usb connector and the rest to a break-out box so you have access to all the pins.

Obviously since I'm gonna support psx/gc pads I've gotta know the protocol anyway, so it should be fairly simple, once I'm done at least, to modify the firmware to use those protocols as outputs.  Xbox is easy to as it's usb with a custom header.  These chips are programmable as well, so if someone originally made one for the playstation and later want to put it on the pc, all they'd have to do is change the firmware.

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #25 on: December 22, 2007, 05:30:45 pm »
Well good luck with this project, hopefully it will work out well. I would certainly consider a purchase if you could get it done en masse, and if you could get one done in reverse as I have descibed, give me a shout as I think it would be quite popular amongst my UK customers!

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Universal Console Connector Project
« Reply #26 on: December 22, 2007, 06:40:03 pm »
Howard: Maybe if you can get a basic program working with the protocol we could have a go at writing a proper driver for it or is that even necessary? Will windows see the device as a standard analog joystick. And when the hardware is switched to another input device will it simply switch the physical inputs to match the device while Windows still see's the device as a standard analog joystick.

..Or will it require drivers for each input device? So when you switch the hardware over Windows will think you unplugged the device then detect the new joystick and use a different driver as appropriate.

The problem I see with the second way would be that the order of devices would get muddled up when you switch them. Then you would need to reconfigure Mame all the time. The former way would be the better way of course and I suspect that is how you intend on designing this?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #27 on: December 23, 2007, 03:47:58 am »
Except for lightguns, a driver shouldn't be necessarry (but we are far far away from lightguns at this point).  There are people that have made homebrew hid adaptors before and I've been going over their code just to get a feel of what I can do.  This guy, in particular has some very helpful code:

http://www.raphnet.net/electronique/snes_nes_usb/index_en.php

His auto-detection code is rather crappy (it guesses most of the time, I've figure out some ways that'll be more accurate) but the structure is quite good for learning what we need to do.  I was going to just make it show up as a full-on 8-axis 34 button joystick.  Once I get all the code working, we'll have to set down and do some sort of standardization for the button order, so that regardless of the joystick used, "A" is always the same button number and what have you.  It is possible to change various hid properties on the fly though (such as swapping out the driver all-together) but I think that when you do that, it's like unplugging and re-plugging the joystick.  That might not be the best way to go, especially considering atari joysticks will require a bit of guesswork and they could fluctuate modes a lot. 

So either way we've got a problem, with the first method only one joystick shows up no matter what.  Some emulators aren't very friendly about how you map the x and y axis, not to mention actually supporting 8.  With the second, that problem is solved, but there's a slight risk that while using atari or genesis controllers in particular, the controller could change modes in game, and thus it'd be like unplugging the controller. 

I still think the first way is the way to go though.  If nothing else we can write a hook or I can implement hid interfaces so we can tack them on to virtual drivers and on most emulators at least, it's not going to be a problem. I have to code in some sort of communication eventually anway, so that we can use the rumble packs. 


I don't think we are going to be able to do much until I can cobble a pcb together.  Afterall, writing code for a device you don't have yet is pretty tough. ;)

Denverlatino

  • ---Buyer Beware - transactions with this user are in dispute--- ... Banned ...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:May 13, 2009, 02:55:24 pm
Re: Universal Console Connector Project
« Reply #28 on: December 23, 2007, 12:26:53 pm »
Except for lightguns, a driver shouldn't be necessarry (but we are far far away from lightguns at this point).  There are people that have made homebrew hid adaptors before and I've been going over their code just to get a feel of what I can do.  This guy, in particular has some very helpful code:

http://www.raphnet.net/electronique/snes_nes_usb/index_en.php

His auto-detection code is rather crappy (it guesses most of the time, I've figure out some ways that'll be more accurate) but the structure is quite good for learning what we need to do.  I was going to just make it show up as a full-on 8-axis 34 button joystick.  Once I get all the code working, we'll have to set down and do some sort of standardization for the button order, so that regardless of the joystick used, "A" is always the same button number and what have you.  It is possible to change various hid properties on the fly though (such as swapping out the driver all-together) but I think that when you do that, it's like unplugging and re-plugging the joystick.  That might not be the best way to go, especially considering atari joysticks will require a bit of guesswork and they could fluctuate modes a lot. 

So either way we've got a problem, with the first method only one joystick shows up no matter what.  Some emulators aren't very friendly about how you map the x and y axis, not to mention actually supporting 8.  With the second, that problem is solved, but there's a slight risk that while using atari or genesis controllers in particular, the controller could change modes in game, and thus it'd be like unplugging the controller. 

I still think the first way is the way to go though.  If nothing else we can write a hook or I can implement hid interfaces so we can tack them on to virtual drivers and on most emulators at least, it's not going to be a problem. I have to code in some sort of communication eventually anway, so that we can use the rumble packs. 


I don't think we are going to be able to do much until I can cobble a pcb together.  Afterall, writing code for a device you don't have yet is pretty tough. ;)

dude, you scare me  :o , you know too much and your avatar looks scary, but you are a good guy, you have helped me a few times, keep the good work  :cheers:
[transactions in dispute -- see http://forum.arcadecontrols.com/index.php?topic=77030.0]
... Banned ...

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Universal Console Connector Project
« Reply #29 on: December 23, 2007, 06:16:15 pm »
dude, you scare me  :o , you know too much and your avatar looks scary

He's like the wizard of Oz.   ;D

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #30 on: December 24, 2007, 10:29:48 am »
dude, you scare me  :o , you know too much and your avatar looks scary

He's like the wizard of Oz.   ;D

Creepy old dude that dresses like a leprechaun, hands out random novelty goods passing them off as treasures and travels around on a balloon of hot air?  Yeah, that's pretty much me.   ;D

Merry Christmas guys!

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Universal Console Connector Project
« Reply #31 on: December 24, 2007, 09:40:33 pm »
dude, you scare me  :o , you know too much and your avatar looks scary

He's like the wizard of Oz.   ;D

Creepy old dude that dresses like a leprechaun, hands out random novelty goods passing them off as treasures and travels around on a balloon of hot air?  Yeah, that's pretty much me.   ;D

Merry Christmas guys!

 :laugh2:

LingPanda.

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:February 17, 2008, 03:44:54 pm
Re: Universal Console Connector Project
« Reply #32 on: December 24, 2007, 10:23:23 pm »
I'm not sure exactly what you are trying to accomplish.  Here is a link to usb to Nintendo pads.  Could using these help in your project? Maybe figure out how these work. My cab has PlayStation controller adapters just like on the Tekken 5 arcade machine.  I can use any PS2 pad or the controls on the panel for any emu.

http://www.retrousb.com/
« Last Edit: December 24, 2007, 10:25:36 pm by LingPanda. »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #33 on: December 24, 2007, 11:28:30 pm »
I'm not sure exactly what you are trying to accomplish.  Here is a link to usb to Nintendo pads.  Could using these help in your project? Maybe figure out how these work. My cab has PlayStation controller adapters just like on the Tekken 5 arcade machine.  I can use any PS2 pad or the controls on the panel for any emu.

http://www.retrousb.com/

Not having to buy the expensive retro usb adaptors is what we are trying to accomplish.  ;)  That's 30 bucks per controller, per system.  Our adaptor would be a one adaptor to rule them all sort of thing, and would be the price of a single retrozone one. 

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Universal Console Connector Project
« Reply #34 on: December 25, 2007, 12:12:16 am »
If you use AVR (Atmel 8-bit), I have code for playstation controlers in digital mode as well as some stuff that's mostly untested for analog mode.  It uses the SPI controller.

For the gamecube stuff, you can actually configure the USART in async mode to handle things.  Each "bit" ends up being multiple bits, which you can then match for correctness (discarding messages with bad bits).  I don't have any code, but I've been meaning to write some.

Atmel's USB software that they distribute for the AT90USB series frankly sucks.  I'm in the process of growing my own USB stack.  I'm not sure about the USB platform for the AT91 ARM series as I've never used it.

The nice thing about Atmel's stuff is that all the dev tools are free (open source, in fact, for the backend stuff) and cross platform (since it's all GNU to begin with), which lets me develop on Linux.  You can also program the parts using a variety of interfaces, including USB for parts so enabled, though if you want them to run at the full 8MHz, you have to set the fuse bits using the ISP interface first, but that can be done with your parallel port and some wires using the avrdude software.  AVR is also a wondefully easy platform to program, much less of a hassle than PIC or even the Cypress 8051 parts in my experience (and yes, I've done SEVERAL projects using a variety of micros).

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Universal Console Connector Project
« Reply #35 on: December 25, 2007, 03:40:42 am »
Well, that's a relief on the gamecube stuff.  I was looking at the protocol and thinking "there's no way you could accurately gather that at that speed" but assumed I missed something. 

Please pm me when you have time.  I'm just starting so I have questions.  :)


Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #36 on: December 27, 2007, 01:54:35 pm »
This sounds good as far as my 'reversed 6th generation pad connectivity' idea goes!

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 825
  • Last login:April 09, 2025, 10:13:43 pm
  • On and off hobbyist
Re: Universal Console Connector Project
« Reply #37 on: January 03, 2008, 12:36:51 pm »
I'd hate to see the trail grow cold on this one.

While on this subject, does anyone know of a good writeup on how to physically connect a Gamecube controller to a PC and any existing drivers that enable its use in Windows?

The driver part would be covered by the proposed in this thread but I would like to use something provisionally.

Thanks.
"The Manuel"

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Universal Console Connector Project
« Reply #38 on: January 03, 2008, 05:03:45 pm »

TheManuel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 825
  • Last login:April 09, 2025, 10:13:43 pm
  • On and off hobbyist
Re: Universal Console Connector Project
« Reply #39 on: January 03, 2008, 07:27:03 pm »
Well, I was thinking of something down the "do-it-yourself" path.
However, something tells me that connecting this to the parallel port would not be as simple a task as it is with NES and SNES controllers that only requiere a few diodes.
"The Manuel"