Jump to content
IGNORED

Keyboard/Joystick conflict


Recommended Posts

I ran into this recently and spent some time investigating it... basically, if a key on a keyboard column shared with the joystick is pressed, the joystick axis does not respond (only the key is read).

 

Basically, this means that:

- FCTN,1,2,3,4,5 - and Alpha Lock - will disable UP

- 6,7,8,9,0 will disable DOWN

- Enter,O,I,U,Y,P will disable RIGHT

- Space,L,K,J,H,; will disable LEFT

and =,comma,period,M,N,/ will disable FIRE

 

As far as I can work out, this is because the keyboard lines are directly connected to the 9901, but the joystick lines run through protection diodes. So if a key is pressed it's basically going to sink all the current rather than pushing through the diode.

 

Since it's hardware, you can see it regardless of the software. I was able to reproduce it in TI BASIC as well as my own software. Any game should show it too, doesn't matter if it means to read the keyboard or not.

 

I was trying to use the joystick as a modifier for keypresses, copying code I used on the ColecoVision, and it took a while to figure out why UP+1 wasn't working... ;)

 

I'll add that discovery to Classic99 as well so it doesn't trip me up in the future, but I thought I'd share it in case the others didn't already know!

 

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

It would be nice someday to restore the joystick back to how it was originally going to be with variable degrees when ti was working on the keypad round wheel via rf or ir transmitter/receiver withunnamed(1).jpg.b1a087ef320facf0f66ce6dd13bfa3a1.jpg the values being returned from +16 to -16 instead of just fixed at +4 and -4 and 4 player option

Edited by Gary from OPA
  • Like 3
Link to comment
Share on other sites

29 minutes ago, Gary from OPA said:

It would be nice someday to restore the joystick back to how it was originally going to be with variable degrees when ti was working on the keypad round wheel via rf or ir transmitter/receiver withunnamed(1).jpg.b1a087ef320facf0f66ce6dd13bfa3a1.jpg the values being returned from +16 to -16 instead of just fixed at +4 and -4 and 4 player option

Considering how poorly variable joysticks were implemented at the time (self-centering, my ass,) I am happy for what we got.

Link to comment
Share on other sites

39 minutes ago, Gary from OPA said:

It would be nice someday to restore the joystick back to how it was originally going to be with variable degrees when ti was working on the keypad round wheel via rf or ir transmitter/receiver with the values being returned from +16 to -16 instead of just fixed at +4 and -4 and 4 player option

I think that's the first proper pic I've seen of it... nice.

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

9 hours ago, Tursi said:

I ran into this recently and spent some time investigating it... basically, if a key on a keyboard column shared with the joystick is pressed, the joystick axis does not respond (only the key is read).

Yes, I also expected that when I learned why this AlphaLock / Joystick-up problem occurs. So you tested it on real hardware? I'd like to add that to the TI emulation in MAME, but I cannot test for myself.

keyboard_matrix.png

  • Like 1
Link to comment
Share on other sites

2 hours ago, mizapf said:

Yes, I also expected that when I learned why this AlphaLock / Joystick-up problem occurs. So you tested it on real hardware? I'd like to add that to the TI emulation in MAME, but I cannot test for myself.

keyboard_matrix.png

Yeah, it makes perfect sense now that I know what it is. I tested every combination on hardware here last night, using several pieces of software to make sure it wasn't just software.

  • Like 1
Link to comment
Share on other sites

36 minutes ago, Tursi said:

I don't know if the joystick circuit is different on the QI... but I reckon if the Alpha Lock issue still exists there, this likely holds true. ;)

 

I have a QI and somewhere in my junk drawer I have a pair of original ti joysticks. Send me a simple test program and I can try it out.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Gary from OPA said:

I have a QI and somewhere in my junk drawer I have a pair of original ti joysticks. Send me a simple test program and I can try it out.

Don't need to! Load any software, or run something in TI BASIC. It's hardware, so the joystick will cut out when you press one of the related keys.

 

10 CALL KEY(0,K,S)
20 CALL JOYST(1,X,Y)
30 PRINT K;X;Y
40 GOTO 10

 

Link to comment
Share on other sites

1 hour ago, jrhodes said:

I'm guessing MBX joysticks would also be effected too?

This probably has implications on the MBX communicating with the TI on the whole, since it uses the joystick port for data.

  • Like 2
Link to comment
Share on other sites

Let me see if I can get this link to work. 

 

This might be useful to you, KeyBits lets you see the keyboard/joystick interactions directly:

 

 

Sometimes you may want to scan a key or two directly from the keyboard in your software rather than going through the TI KSCAN routine.  This routine, that loads into cartridge ROM, is a quick and easy way to identify the key column and row that you can use for directly addressing the TMS9901.  Also see Thierry's page on the TI keyboard implementation for a good rundown on how it works.  Just another tool in the tool set.   And, yes, the columns are listed vertically and the rows are listed horizontally ?

 

 

KBCART.bin1.49 kB · 65 downloads

KEYBITs.pdf555.88 kB · 73 downloads

  • Like 2
Link to comment
Share on other sites

Cute tool! Would have been nice when I was building Classic99. ;)

 

These days if I'm checking one key I don't generally store all 8 bits anymore. It's harder to track which bit to set, but since you usually need to change R12 anyway, you can go direct to the bit you want and save a few cycles. (Very few, true, but still ;) )

 

Link to comment
Share on other sites

I used a simpler version of it BITD to sort out some three-keypress sequences that were misbehaving.  It's also interesting to see some of the differences between the old console and the QI; especially when it comes to the joysticks.

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...