Jump to content



0

POKEY keyboard scanning


4 replies to this topic

#1 Fox-1 / mnx OFFLINE  

Fox-1 / mnx

    Dragonstomper

  • 938 posts
  • BBSing is terminal...
  • Location:NL, Earth 2.0

Posted Tue Feb 7, 2012 8:41 PM

Confirmation wanted :-)

I want to emulate some shift+key combo's with logic gates, like 74LS/74HCT and was under the impression I need to delay the actual key press a little bit after shift was pressed to get it to work.

After reading the Altirra hardware manual ( chapter 5.8 ) I'm not so sure anymore if I have to delay anything at all.

Does setting the "shift" bit together with another key's bit, simultaneously, give me the right result?

Edited by Fox-1 / mnx, Tue Feb 7, 2012 8:42 PM.


#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 10,314 posts
  • Location:Australia

Posted Tue Feb 7, 2012 9:02 PM

Unsure. Shift, Ctrl, Break are outside the normal 8x8 matrix.

AFAIK it takes 2 full scans to validate a normal keypress within the matrix. The extra keys I think are a special case and quicker to validate.

If you're emulating a keyboard, e.g. plugged into an XEGS, then you'd need to monitor the row/columns being strobed and provide the returned key at the relevant time.

#3 phaeron OFFLINE  

phaeron

    Dragonstomper

  • 629 posts
  • Location:USA

Posted Tue Feb 7, 2012 11:05 PM

Shift/Ctrl/Break are outside of the matrix, but they are multiplexed onto the KR2 line based on the keyboard scan. Looking at the schematics, the modifier keys need to be scanned into their own latches before they can be latched into KBCODE, so they'd need to be held down during the previous scanning cycle (4-8ms per cycle). Since it takes two full scans to detect a key as Rybags says, you should be OK if the shift key goes down at the same time as the other key.

#4 Fox-1 / mnx OFFLINE  

Fox-1 / mnx

    Dragonstomper

  • 938 posts
  • BBSing is terminal...
  • Location:NL, Earth 2.0

Posted Wed Feb 8, 2012 9:34 AM

View PostRybags, on Tue Feb 7, 2012 9:02 PM, said:

If you're emulating a keyboard, e.g. plugged into an XEGS

I'm building a custom keyboard that will be connected to the regular connector on an XE, so, using the multiplexers on the XE board.


View Postphaeron, on Tue Feb 7, 2012 11:05 PM, said:

Since it takes two full scans to detect a key as Rybags says, you should be OK if the shift key goes down at the same time as the other key.

That's what I thought but wasn't sure.

Thanks. This saves me some testing.

#5 fox OFFLINE  

fox

    Chopper Commander

  • 189 posts
  • Location:Poland

Posted Wed Feb 8, 2012 10:36 AM

The keyboard matrix can be viewed as 9x8 - 8x8 for normal keys plus additional column for Shift, Control and Break.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users