Reading a GAL20V8 output.

protek

"Takai desu ne." -"Jinsei da."
Joined
Feb 17, 2008
Posts
3,999
Country
Finland
Region
Oulu, Pohjois-Pohjanmaa
I’m in the process of converting a CH Combat Stick and Pro Throttle gameport version to USB.

Now, the traditional way is to gut the joystick, build a button matrix with diodes and connect it to a Bodnar board or similar. I would like to try another approach, though.

Originally, CH interpreted the incoming gameport signals in their own driver software and I was wondering, if the same could be achieved using an Arduino or similar. I opened the Combat Stick and found a GAL20V8 inside. I did some research about the GAL and how it works.

I suppose the real question is what do I need to read whatever data the GAL is pushing into the joystick port pins? Also, is an Arduino able to read that data directly through its data pins?
 
It's likely that the GAL will have it's protection bit set so you probably won' be able to read it :)
 
You mean the GAL contents? I mean the output pins should be outputting something even with the protection pin on, right? How can the CH driver software interpret the data from the gameport?
 
if the gal is registred you cannot read. If it's not registred you can read, even if it's protected you need to pullup 1 pin, don't remember wich one. You need a gal programmer.
 
Last edited:
But a programmer reads the code that’s been programmed into it, not what it’s outputting, right?
 
Last edited:
You can use the Arduino to capture the output from the GAL chip, yes (unless it's ridiculously fast or something and the MCU can't keep up, I'm not familiar with the old joystick protocol but I don't imagine it's particularly high-speed).

If you have access to a logic analyzer that would make it easy to have a peek at the output and reverse engineer the protocol. Although it might already be documented online somewhere, most things are :)
 
there is absolutely no problems reading even protected GALs (16v8 20v8):
Copy-Paste:
Initialize

Set all pins (except GND, VCC, EDIT and SDOUT of course) of the GAL to L, except STB- which should stay H.

Read (16V8/20V8) at 12 volt on EDIT:

Set P/V- to L, set up the desired pattern on RA0..RA5, bring STB- for a short time (1-10us) to L and again up to H, read bit from SDOUT, bring SCLK to H for a short time (1-10us) and back to L and read the next bit until all bits of this line are read.

Original thread:
http://www.a1k.org/forum/showthread.php?p=757282#post757282
 
Back
Top Bottom