Jump to content
IGNORED

TransKey-II in development


mytek

Recommended Posts

 

4 hours ago, wildstar87 said:

I'm running into another problem.  I've been using the TK-II on the 130XE Remake board, and it's been working fine with PS/2 Keyboard.  I'm working on putting in a new mechanical keyboard into the 130XE from @ScreamingAtTheRadio, and I was having issues having the keyboard working at all.  All the function keys other than Help seem to work, all other keys don't.  It seems that if TK-II is installed, it blocks the inputs from the physical keyboard, but if I remove the PIC chip entirely, the keyboard does work.  I hadn't been using the built-in keyboard, since I've been fiddling with upgrading it, so never used it along with TK-II, which is why I never saw this before.  Doesn't seem to matter if the PS/2 keyboard is plugged in or not.

Just got online and saw this. @chevymad pegged the problem, and the solution. The function is called the XEGS Mode Setting. It has to do with the fact that both the XEGS as well as the 1200XL don't have pull-up resistors on Pokey's KR lines. So if the stock keyboard is not connected, those inputs float and you will get ghost key presses. When XEGS Mode = ON, it changes from open drain style outputs to TTL push-pull outputs which solves the problem, but blocks the stock keyboard if that's also present. Since the stock keyboard in both situations contains the KR pull-up resistors, the XEGS Mode should be set to OFF when it's in circuit.

 

ALT+X will show the present state of this setting, and CTRL+ALT+X will toggle it.

 

7 minutes ago, wildstar87 said:

That was it, thanks!  I was really close, it was specifically XEGS mode off, I was trying it on.  I read through the manual, but for some reason, completely missed the note.  Note: If the stock keyboard is to be used in parallel with the TK-II, then the XEGS Mode should be set to OFF. This feature is toggled by pressing CTRL+ALT+X, with the last setting retained in non-volatile memory.

Glad this got sorted for you :)

  • Like 1
Link to comment
Share on other sites

19 hours ago, mytek said:

The function is called the XEGS Mode Setting. It has to do with the fact that both the XEGS as well as the 1200XL don't have pull-up resistors on Pokey's KR lines. So if the stock keyboard is not connected, those inputs float and you will get ghost key presses.

I wonder if this is what's been happening in my 1088XLD recently.  I'm getting phantom key presses - haven't written a debug program yet to show me which "key(s)" are being "pressed".  I will make myself a note to check this setting.

Link to comment
Share on other sites

2 hours ago, Stephen said:

I wonder if this is what's been happening in my 1088XLD recently.  I'm getting phantom key presses - haven't written a debug program yet to show me which "key(s)" are being "pressed".  I will make myself a note to check this setting.

Yep the XEL and XLD also need it set to XEGS Mode = ON.

 

Alt+X will show what it's presently set to.

  • Like 2
Link to comment
Share on other sites

A bit of history...

 

This problem of the absence of pull-up resistors on Pokey's Key Response (KR1 & KR2) inputs caught me by surprise after having already designed and released the original TK-II boards. At the time I was using an Atari 800XL as my test bed, and just like the 400/800 that came before, it had these pull-up resistors already in place.

 

800xl_06.thumb.png.25488b8a60adcbe0475f72296942a81e.png

 

However my troubles began when I made and released a TK-II dongle to plug into the XEGS's external keyboard port, not realizing that Atari had moved the pull-up resistors from the motherboard over to the external keyboard. For some reason I hadn't seen it during testing, but ghost key presses started to be reported by the end users. It was then that I discovered the reason why. And because people had already bought into these early TK-II upgrades, it wasn't like I could simply redesign a new board with the pull-up resistors now integrated without kinda screwing over those early adopters. Hence the reason that the solution was done in the firmware instead of the hardware, and thus the XEGS Mode was born. This firmware upgrade did solve the problem, but kinda created another in that it needs to be appropriately set depending upon whether the stock Atari keyboard would still be used in non-XEGS machines (XEGS Mode = ON for XEGS systems, and OFF for any factory produced Atari computer still using the stock keyboard in parallel).

 

Later still it was discovered that the 1200XL shares this same problem with the XEGS, of having it's pull-up resistors in the keyboard assembly and not on the motherboard. However the 1200XL comes with such a wonderful keyboard to begin with, that there wasn't a great demand for using an external PS/2 keyboard on this system, and even so, with the stock keyboard still present this is not an issue.

 

Later when the 1088 XEL & XLD series motherboards came along, they had a TK-II integrated, and assumed it would be set to the XEGS Mode by default. And by leaving out the pull-ups on these home brew systems a whopping 20 cents was saved while more importantly making more room for other components (PCB space was at a premium on the XEL). This was not considered a problem on these systems, since you couldn't plug-in a stock Atari keyboard without major modifications anyway. And then when the 576NUC+ came along, the trend continued.

 

It's not like cost was ever a factor in leaving out the pull-up resistors in the TK-II series. It was simply overlooked as an issue, and by the time it was recognized too many boats had already left the harbor.

 

--------------

 

As I mentioned, the only con to the firmware fix is that it needs to be set to OFF whenever the stock Atari keyboard is still going to be used. The TK-II firmware has this set to ON by default on a newly flashed PIC chip, because of its EEPROM memory being in a limbo state and wanting to be sure that the PS/2 keyboard works reliably out of the box on all systems. It has been suggested that this should default to OFF instead, thereby allowing the stock keyboard to always work first thing after a TK-II installation. But in my mind I figure that anyone who buys and/or installs a TK-II should have a PS/2 keyboard ready to go with it, and thus have the means to set it however they want to match their setup. There is an exception that came along much later, and that is what I called the TK-II-Stereo board. It was brought to my attention that someone might have gotten one of these solely for the Stereo Pokey aspect and had no intention of ever using the built-in TK-II aspect, and without a PS/2 keyboard to change the setting their stock Atari keyboard would be locked out. At the time when I released the TK-II-Stereo board design, Lotharek was selling the Simple Stereo board which was a far cheaper option. So my presumption was that the only reason someone would go for my more expensive stereo board, was if they also wanted the PS/2 keyboard option it came with. But all is not lost... if you don't want the TK-II aspect, just leave the PIC chip out of the build, or if it's already there - desolder it or clip it out.

 

--------------

 

XEGS MODE PS/2 Keyboard Commands

 

  • ALT+X shows the present state of this mode
  • CTRL+ALT+X toggles it between ON and OFF

 

  • XEGS Mode = OFF is to be used whenever a stock Atari keyboard is installed in the system
  • XEGS Mode = ON should always be the setting for an XEGS, 1088XEL, 1088XLD, 576NUC+

 

This setting is stored in the non-volatile EEPROM memory of the TK-II PIC chip, and will be restored upon power-up to it's last entered setting.

  • Like 2
Link to comment
Share on other sites

I think you meant that XEGS Mode = Off should be when a stock keyboard IS installed in the system. 🙂

4 hours ago, mytek said:

XEGS MODE PS/2 Keyboard Commands

 

  • ALT+X shows the present state of this mode
  • CTRL+ALT+X toggles it between ON and OFF

 

  • XEGS Mode = OFF is to be used whenever a stock Atari keyboard is not installed in the system
  • XEGS Mode = ON should always be the setting for an XEGS, 1088XEL, 1088XLD, 576NUC+

 

This setting is stored in the non-volatile EEPROM memory of the TK-II PIC chip, and will be restored upon power-up to it's last entered setting.

 

  • Thanks 1
Link to comment
Share on other sites

On 9/4/2023 at 12:26 PM, mytek said:
  • XEGS Mode = OFF is to be used whenever a stock Atari keyboard is not installed in the system
  • XEGS Mode = ON should always be the setting for an XEGS, 1088XEL, 1088XLD, 576NUC+

Any idea what would cause my 1088XLD to still have spurious key presses (it's never a key that displays onscreen - by this, I mean it doesn't ever type a visible character, but makes a keyclick sound, and any software that has a "press any key to continue" will respond to it).  I can whip up a quick test program which will display the value in CH ($02FC) constantly to see if it helps see what is being scanned, if it's random, etc.

Link to comment
Share on other sites

Yes that is a 'null' character key press that you are hearing. It's used whenever the Atari screensaver 'attract mode' is being automatically disabled by the TK-II (happens approximately every 3 minutes). To restore the default attract mode, press CTRL+ALT+S.  And to see what it's set to, press ALT+S.

 

Normally the 'null' key is not responded to by the Atari, nor would you hear any key click. But sometimes a program has been written to intercept the normal key handler, which bypasses the filtering, so any key press (even the null character) will register with a click. BTW, the null character is CTRL+ALT+A I believe (if I'm remembering correctly).

  • Thanks 1
Link to comment
Share on other sites

On 9/7/2023 at 1:14 AM, mytek said:

Yes that is a 'null' character key press that you are hearing. It's used whenever the Atari screensaver 'attract mode' is being automatically disabled by the TK-II (happens approximately every 3 minutes). To restore the default attract mode, press CTRL+ALT+S.  And to see what it's set to, press ALT+S.

 

Normally the 'null' key is not responded to by the Atari, nor would you hear any key click. But sometimes a program has been written to intercept the normal key handler, which bypasses the filtering, so any key press (even the null character) will register with a click. BTW, the null character is CTRL+ALT+A I believe (if I'm remembering correctly).

Sorry for the delay, but I was correct in what I was remembering (finally verified it).  I have both XEGS mode ON, and Screensaver OFF, and I am still getting spurious key presses.  I'll put together a little exe that monitors for key presses and displays the key code this weekend (time permitting).

Link to comment
Share on other sites

3 hours ago, Stephen said:

I have both XEGS mode ON, and Screensaver OFF, and I am still getting spurious key presses.

I think you misunderstood what is happening, or I didn't explain it correctly.  Edit: Actually I just didn't go into enough detail.

 

When the TK-II Screensaver Mode = OFF, CTRL+SHIFT+A is being sent approximately every 3 minutes. So think of it like you are sitting in front of the computer and you are pressing that combination every 3 minutes. Guess what will not happen? If you guessed that the Atari's attract mode won't time out because it keeps seeing keyboard activity you would be correct. The regular key presses will keep resetting the timer. So that means that the A8's Screensaver Mode AKA Attract Mode will not activate, and no color cycling will occur.

 

When TK-II Screensaver Mode = ON, there are no automatic key presses being sent, so the Attract Mode timer will count down if no key presses are detected within the timeout period, and thus the screen colors will begin cycling. This is a normal Atari function that is not being circumvented by the TK-II.

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