Saturn keyboard and extended keys
Posted: Sat Jul 13, 2019 2:56 pm
As you may know, in the West the Saturn didn't get a dedicated keyboard (unlike Japan) but an adapter that takes a PS/2 keyboard instead. This means it could potentially be taking in any keyboard layout, including keys it wasn't designed for, so it would be nice to document what it does with those keys. I don't have one of those keyboards at hand though so I'd need other people to look into them.
First of all, some quick overview: Saturn keyboard scancodes are more or less based on the PS/2 set 2 scancodes. The latter shares a the same idiosyncracy from set 1 scancodes in that some keys have a 0xE0 prefix to indicate they're "extended" (this was intended to make translation between sets easier, as a dumb look-up table would do). This is relevant since the Saturn keyboard doesn't have the concept of extended scancodes and so the adapter has to handle them in a special way, which is where things start breaking.
From information I've seen so far:
Can anybody help confirm this behavior?
First of all, some quick overview: Saturn keyboard scancodes are more or less based on the PS/2 set 2 scancodes. The latter shares a the same idiosyncracy from set 1 scancodes in that some keys have a 0xE0 prefix to indicate they're "extended" (this was intended to make translation between sets easier, as a dumb look-up table would do). This is relevant since the Saturn keyboard doesn't have the concept of extended scancodes and so the adapter has to handle them in a special way, which is where things start breaking.
From information I've seen so far:
- Simple scancodes are used as-is
- Extended scancodes from 101/102-key keyboards (arrows, etc.) are handled in a special way and remapped to new scancodes (that don't clash with any existing set 2 scancodes)
- Extended scancodes not caught above are passed as-is (without the prefix)… but make and break flags are never set, rendering them unusable (in a reasonable way)
Can anybody help confirm this behavior?