Hi,
I have a french Apple 2c, with a french keyboard and a toggle button
that allows to switch the keyboard layout from french to US. The button
has two effects. It switches characters codes for standard ASCII
characters (ie, 'a' becomes 'q' and vice-versa), but for "extended" characters, the code is not changed, only the display is.
For example, if I hit 'é' while in french mode, it's going to display as 'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen, the display of this character changes and becomes an '{'. (this is
quite funny, but a bit impractical).
I'd like to programmaticaly know which mode the keyboard is in, but I
can't find anything related in PEEKs and POKEs or anything. Does anyone
know if this is possible ?
Thanks!
--
Colin
https://www.colino.net/
So if you're going to probe around, I'd look at the bits in $C010 and >probably the other bytes from $C001 to $C010 and see if they show any
change when the switch is flipped.
I've checked and see no bit move in this region when toggling the
keyboard layout switch.
Well, that was worth trying ! Thanks :)
On Friday, January 20, 2023 at 3:03:05 AM UTC-5, Colin Leroy-Mira wrote:
Hi,
I have a french Apple 2c, with a french keyboard and a toggle button
that allows to switch the keyboard layout from french to US. The button
has two effects. It switches characters codes for standard ASCII
characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
characters, the code is not changed, only the display is.
For example, if I hit 'é' while in french mode, it's going to display as
'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen,
the display of this character changes and becomes an '{'. (this is
quite funny, but a bit impractical).
I'd like to programmaticaly know which mode the keyboard is in, but I
can't find anything related in PEEKs and POKEs or anything. Does anyone
know if this is possible ?
Thanks!
--
Colin
https://www.colino.net/
I don't know for sure, this is probably more a hardware question than a software question, but I'd guess it's not possible.
I did a lot of playing around with the keyboard (I had a U.S. apple //e)
and the only available information was the key pressed, read from $C000
and the high bit of the $C010 soft switch was the any-key-down flag.
So if you're going to probe around, I'd look at the bits in $C010 and probably the other bytes from $C001 to $C010 and see if they show any
change when the switch is flipped.
My guess is that this is done in hardware and never makes it to the
software side of the machine.
I only remember this so well, because I played around a lot with the
keyboard trying to make the $C010 any-key-down flag line up with the byte read from $C000 to tell me what key was down. But the important bit there
is that the auto-repeat feature of the keyboard is in hardware and not adjustable or even detectable in software, which is why I'm going to
guess that your switch isn't either.
Stu M <[email protected]> wrote:
On Friday, January 20, 2023 at 3:03:05 AM UTC-5, Colin Leroy-Mira wrote:
Hi,
I have a french Apple 2c, with a french keyboard and a toggle button
that allows to switch the keyboard layout from french to US. The button >> has two effects. It switches characters codes for standard ASCII
characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
characters, the code is not changed, only the display is.
For example, if I hit 'é' while in french mode, it's going to display as >> 'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen, >> the display of this character changes and becomes an '{'. (this is
quite funny, but a bit impractical).
I'd like to programmaticaly know which mode the keyboard is in, but I
can't find anything related in PEEKs and POKEs or anything. Does anyone >> know if this is possible ?
Thanks!
--
Colin
https://www.colino.net/
I don't know for sure, this is probably more a hardware question than a software question, but I'd guess it's not possible.
I did a lot of playing around with the keyboard (I had a U.S. apple //e) and the only available information was the key pressed, read from $C000 and the high bit of the $C010 soft switch was the any-key-down flag.
So if you're going to probe around, I'd look at the bits in $C010 and probably the other bytes from $C001 to $C010 and see if they show any change when the switch is flipped.
My guess is that this is done in hardware and never makes it to the software side of the machine.
I only remember this so well, because I played around a lot with the keyboard trying to make the $C010 any-key-down flag line up with the byte read from $C000 to tell me what key was down. But the important bit there is that the auto-repeat feature of the keyboard is in hardware and not adjustable or even detectable in software, which is why I'm going to
guess that your switch isn't either.
Stu, the Any Key Down bit reports that one or more keys are depressed. The $C000 port reports the last key depressed. One or more keys can be held down, and the code at $C000 will change as any key is depressed. If I remember correctly, the key code is also reported at $C010 a few milliseconds before it shows up at $C000 (prior to denouncing).
Take a look at the code for RTSYNTH on my website for details. This
behavior is what allowed me to implement _glissando_ keying, in which a newly pressed key sounds even as other key(s) are being held down.
--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
...which is exactly the issue in Prince of Persia, which can register "false" keypresses as a result of the polling $C010 and then fetching the wrong key from $C000.
...which is exactly the issue in Prince of Persia, which can register
"false" keypresses as a result of the polling $C010 and then fetching the wrong key from $C000.
qkumba <[email protected]> wrote:
...which is exactly the issue in Prince of Persia, which can register "false" keypresses as a result of the polling $C010 and then fetching the wrong key from $C000.
There’s more information about this issue https://www.applefritter.com/comment/101047#comment-101047
Unfortunately, as noted here on page 7-12 of James Sather's book Understanding the Apple IIe, AKD does not wait for a key to be decoded, so software must "wait until KEYSTROBE is set before interpreting the keyboard ASCII.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 160:03:59 |
| Calls: | 12,094 |
| Calls today: | 2 |
| Files: | 15,000 |
| Messages: | 6,517,761 |