Jump to content
IGNORED

joystick adapter question


ramidavis

Recommended Posts

I do not have a schematic so I'm just speculating. You have two separate wires for each ground input on the two separate ports. This is how it differentiates which controller input is pressed. Meaning basically that they aren't common ground, they are electrically isolated grounds, and actually a chip output. One thing you will learn in digital electronics is to never tie outputs together or you will damage chips. So more than likely what is going on is each ground is switched off and on opposite of each other at a high frequency.

 

So for example if you press fire on the Joystick A port, GND is cycling between low and high really fast. You have probably two NOR gates(depends really though could be an OR gate for active low instead of high I'm just speculating), one for Joystick A fire and Joystick B fire for the other joystick. And other NOR gates for the directions but I'm just using fire as an example here. So to trigger the fire for Joystick A, during the cycle when Joystick A ground is low, and fire is pressed that would make the output of that NOR gate high becaues both inputs are low(GND for joystick A, plus the fire input line going into that NOR gate for Joystick A), telling the computer that Joystick A fire is being pressed. The GND for Joystick B which is always an opposite level of Joystick A is tied into the other NOR gate along with the fire input line.

 

Without the diodes present you would be tying GND for Joystick A and B together(which are actually outputs not just a common ground) whenever two of the same buttons or same directions are pressed on the joysticks at the same time, which isn't good.

 

 

 

I would do the diodes.

That is the way I think it probably works I don't have a schematic for it but the best way I can think it would differentiate the two inputs apart.

 

 

EDIT:

Sorry for so many edits, I realized that "Joystick A" sounds better than "A Joystick" and a few other things I tried to make clearer.

Edited by SignGuy81
Link to comment
Share on other sites

Here is a visual of what I'm trying to explain.

 

 

Here is example if say fire is pressed on Joystick B.

 

 

This is just one cycle

 

A GND = LOW \ each go into NOR gate A, OUTPUT = LOW

A FIRE = HIGH(NOT PRESSED, pullup resistor would be used to make high while not pressed) /

 

 

 

B GND = HIGH \ each go into NOR gate B, OUTPUT = LOW

B FIRE = LOW(PRESSED) /

 

 

Second cycle

 

A GND = HIGH \ each go into NOR gate A, OUTPUT = LOW

A FIRE = HIGH(NOT PRESSED) /

 

 

 

B GND = LOW \ each go into NOR gate B, OUTPUT = HIGH(as long as fire pressed this will cycle low high low high fast)

B FIRE = LOW(PRESSED) /

 

 

 

What I did here may make more since to some. You see that GND for each is a digital output for each and you don't want those to connect. If you press fire on each joystick at same time they will, or both downs, ups, and so ons. It will be bad for whatever circuit is swapping them low to high, you are shorting them out because while one is high the other will always be low.

 

Also want to reiterate that I'm not saying this is the exact setup on the TI99, this is what I would do if designing something similar, but I'm sure they have a similar setup of some type and I'm sure you need diodes.

Edited by SignGuy81
Link to comment
Share on other sites

I am pretty certain the diodes prevent one controller from interfering with the other as all of the control lines are tied together and polled using the power/return lines as selection.

 

EDIT: Ah, sorry... a much more in-depth explanation already provided :)

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

I am pretty certain the diodes prevent one controller from interfering with the other as all of the control lines are tied together and polled using the power/return lines as selection.

 

EDIT: Ah, sorry... a much more in-depth explanation already provided :)

 

That was the word I was looking for in all the mumbo jumbo I posted earlier. :)

 

However it is more to prevent damage to components I believe as apposed to one controller interfering with another. If you have 2 controllers pressing down, up, left right, fire at the same time or any other controller combination they really aren't going to interfere with each other more so than blow something if you do not use diodes. The two pins labeled for GND for Joystick A and B, are opposite high and low of each other at any given time(hence the polling you mentioned) and if you press fire or any other buttons that are same on the joysticks at the time you have one of those "GND" outputs in contact with the other while one is high and one is low, which would possibly blow something.

 

EDIT:

I just seen your edit too sry about that.

Edited by SignGuy81
Link to comment
Share on other sites

 

If you mean using a diode in general yes but it is a separate diode you have to add, and not to the joystick adapter.

 

http://www.mainbyte.com/ti99/console/alpha_lock.html

 

I did this mod and it worked perfectly. The system with the mod wound up in another 99er's hands, though.

 

  • Like 1
Link to comment
Share on other sites

However it is more to prevent damage to components I believe as apposed to one controller interfering with another.

 

It won't blow anything. It's just to prevent crosstalk. Without the diodes the joysticks interfere with the keyboard scan and each other. It's the same situation as the Alpha Lock key preventing UP from working. ;) (The joysticks are an extension of the keyboard matrix).

 

Nothing on the joystick port ever goes high. The commons are either low or open.

Edited by Tursi
  • Like 1
Link to comment
Share on other sites

 

It won't blow anything. It's just to prevent crosstalk. Without the diodes the joysticks interfere with the keyboard scan and each other. It's the same situation as the Alpha Lock key preventing UP from working. ;) (The joysticks are an extension of the keyboard matrix).

 

Nothing on the joystick port ever goes high. The commons are either low or open.

 

Yeah, I don't have a schematic I was just guessing, but yeah there would be a cycling and you are correct I'm sure, it probably goes to a transistor for each as well first before making it to the GND for each Joystick so instead each will cycle open, low instead of open, high but I didn't know for sure so to err on the safe side I figured I'd suggest the diodes, and my apologies to the other guy then because he was correct.

 

EDIT:

 

I can probably design a similar circuit with a 555 timer, a PNP and NPN transistor and it will work like you said to where each would be low/open opposite of each other to poll each controller going into a single port to have something to do for fun, and have an LED for each input for each controller. Like I said though not knowing the unit or having a schematic as far as I knew it could have been a chip output cycling from high to low for each, cause either would work but I should have known better that it was probably designed a little better than that. Thank you for the clarification. :)

Edited by SignGuy81
Link to comment
Share on other sites

Schematics are not too hard to come by, see attached for everything you could want to know. ;) Another good reference is http://www.unige.ch/medecine/nouspikel/ti99/titechpages.htm

 

The keyboard matrix and joystick ports are wired directly to the 9901 I/O controller. No transistors inside the console.

(EDIT: I'm partially lying - I keep forgetting the select is wired to a 1-of-8 decoder, which is WHY we get on power no the joystick port and why we can't get more than a single bit active... ;) )

 

The problem with putting active circuitry on the joystick port is that there is no 5v line, so you need to get power from somewhere else. ;)

 

bunyard-hardware-manual-for-the-texas-instruments-994a.pdf

Edited by Tursi
  • Like 2
Link to comment
Share on other sites

Again I was thinking about how I would do it with an oscillating circuit using a timer chip I would need transistors because it would have a high/low cycle and if I wanted to do the same with the 555 I would need them for low/open instead. Everything would be internal on the I/O chip so I guess I was wrong when I said it probably had transistors for the outputs. Thank you for the links.

Edited by SignGuy81
Link to comment
Share on other sites

Looks like I was lying a lot and your instincts were better than I thought. ;) While I know the keyboard side of it relatively well, I haven't directly interfaced to the joysticks much. ;) I began to wonder when I remembered the 1-of-8 decoder, since that SHOULD have resulted in a high on the inactive pin. The schematics show that for the joystick selects only, the select signals run through a small circuit that changes them from high/low to open collector. The transistor is in fact there (along with a few resistors and a cap). Sorry about that! But that does answer one question for me anyway (that being "why is there no + voltage, anyway?") I guess TI was just trying to be cautious.

  • Like 2
Link to comment
Share on other sites

yeah i saw the transistors in the link you provided me in the pdf but they used two NPNs, the way I would have to do it with a single output alternating high/low to change to low/open alternating with two I'd have to use a PNP and NPN so they do have it designed different than I was originally thinking they would have.

Edited by SignGuy81
  • Like 1
Link to comment
Share on other sites

Also I was over looking a point when I was thinking there wouldn't be any interference.

 

I was thinking if two people press same button same time each controller it wouldn't matter as far as interference goes in the circuit like for example here with transistors low/open cycle, because the input would just see ground anyway and same button pressed on each controller anyway so why would it matter. But if the two cross they are seeing each others low at opposite halves of each cycle so it is basically like they are low constantly while each controller has same button pressed instead of low/open cycle, and even though the input on whatever chip will still see the input as low for each controller, it will not be at the low/open cycling it is expecting to see at whatever frequency and is instead seeing a constant low for whatever button was pushed and may cause some problems since it is expecting to see the low/open cycle for when a button is pressed for whichever input and not just constant on. So I can understand now how it may cause interference without diodes. I was more concerned at first with damage to components without them because I thought possibility of them each having a low/high cycle coming from a chip possibly(but that is cleared up now).

Edited by SignGuy81
  • Like 1
Link to comment
Share on other sites

  • 5 years later...
On 3/26/2023 at 11:16 AM, TomInOhio said:

Hello everyone, if I make an adapter to support only one joystick (Joystick A), do I still need to add diodes to it?  Thanks.

imho yes. otherwise it will interfere with keyboard use ..  if you don't ever want to use the whole keyboard while the joystick is plugged in then it doesn't matter

 

Greg

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...