More Detailed Schematic for PSX Controller Emulation w/ 74XX?

Started by T_O, June 17, 2019, 11:33:08 AM

Previous topic - Next topic

T_O

While looking into PSX controller emulation (NON-DualShock), I saw that NFG already covered the topic (https://gamesx.com/controldata/psxcont/psxcont.htm#CIRCUIT).

However, the section on building the circuit using "74xx" ICs gives limited info, and tech talk admittedly goes a ways beyond my knowledge. What I'm looking for is the full schematic.

Thanks in advance!

T_O

Update:

I think I figured it out...mostly. I'm drawing up a schematic in KiCAD right now, and I only have a few questions:

1. The DATA pin of the controller plug connects to SER OUT, correct?

2. Where does the COMMAND pin of the controller plug connect to? I must've re-read the entire page 15 times and still can't decipher where COMMAND goes.

3. Are the 74HC165 pins not associated with buttons (A1-A8, B1-B8, etc.) left with no connection? Or do they share a connection? COMMAND, maybe?

Thanks in advance!

T_O

Here is the schematic I drew up in KiCAD. Notice the numerous NC's on the data input pins and the H2 (COMMAND) kinda floating out there alone. Again, any feedback is appreciated.


T_O

I was able to finish putting the schematic together (pic attached), thanks to some help I received. However, it's still not working. No response from any button input whatsoever.

The only thing that gave me anything was when I was fooling around on the breadboard, trying different connections, and removed the connection from pin 17 of U6 (the 74HC240). Playing Twisted Metal 2, in the title menu, the cursor just started endlessly going to the right (about 4 times per second). Reconnecting doesn't stop it, but oddly enough, when I do that and then insert CMD IN between pins 16 and 17, the cursor movement will stop at random for about half a second, and button presses (any of them) will sometimes freeze the cursor; holding the button will not keep it still, however, and no button will advance me past the title menu.

By the way: is pulling up the highs in U1 - U3 even necessary, or should I just go directly to 5V on the highs? OR should I also be pulling down the lows with resistors?


RDC

Command is used for the PSX to tell the controller to do something, like turn the Analog feature on/off or to ask what controller is connected and send it's data, but you're using all logic chips and all of that is always there and ready to go.

Connecting the Inputs to Hi/Lo via a Resistor is preferred, but for this project here either way will work fine, as long as that line will never need to be changed, aka the 2 leftover Inputs of the HC240, those should be tied Lo to Ground. Any unused Input of an HC165 should be pulled Hi via a Resistor.

I just built this circuit, and it was a royal PITA to debug on the BreadBoard, but all of the grief was pretty much down to decoupling. If you don't already have them, put a decoupling cap on each VCC pin of every IC, they only need to be 100nF or so, but also put in a 10uF or so in there somewhere on the VCC line as well. This circuit will do all kinds of weird things with no decoupling capacitors in there.

One thing I missed on the first go around was that the H Input of the very first HC165 is tied Hi, so every byte of Data is offset by 1 bit on the following HC165 chips. So U1 F thru A and then H of U2 make up the Byte of Data you are putting in there.

Note from here on 1 = 5v, 0 = Ground.

U1

H = 1, This bit has nothing to do with the Data but must be tied Hi.
G = 1, Start of the First Byte (8 bits) of Data is here, 0xFF.
F = 1
E = 1
D = 1
C = 1
B = 1
A = 1

U2

H = 1, End of First Byte is here.
G = 1, Start of Second Byte of Data, 0x41, Controller ID (Digital).
F = 0
E = 0
D = 0
C = 0
B = 0
A = 1

U3

H = 0, End of Second Byte of Data.
G = 0, Start of Third Byte of Data, 0x5A, Data Ready.
F = 1
E = 0
D = 1
C = 1
B = 0
A = 1

U4

H = 0, End of Third Byte of Data

From here on the rest of the U4 and U5 Inputs are for the buttons and should all be pulled Hi via individual
Resistors, then driven Lo by whatever button when it is pressed.

G = SELECT, Start of Fourth Byte of Data, Buttons
F = NOT USED
E = NOT USED
D = START
C = D-PAD UP
B = D-PAD RIGHT
A = D-PAD DOWN

U5

H = D-PAD LEFT, End of Fourth Byte of Data
G = L2, Start of Fifth Byte of Data, Buttons
F = R2
E = L1
D = R1
C = TRIANGLE
B = CIRCLE
A = CROSS
SDI = SQUARE, End of Fifth Byte of Data

SDI of U5, pin 10, is used as an Input to make up the last bit of Data for the Fifth Byte.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.