First post, by superfury
Anyone knows the untranslated scancodes sent by the PS/2 keyboard when CTRL-BREAK, CTRL-SYSRQ or ALT-SYSRQ is pressed and/or released on the PS/2 keyboard?
What are their adjusting effects in each scancode set on the bytestream received by the PS/2 keyboard(untranslated by the 8042)?
Edit: So far, I've gotten this:
KEYBOARDENTRY_EXTENDED CTRLSYSRQ[3] = {
{ { { 0xE0,0x37,0x00,0x00,0x00,0x00 },2,{ 0x00,0x00,0x00,0x00,0x00,0x00 } },1 },
{ { { 0x00,0x00,0x00,0x00,0x00,0x00 },0,{ 0x00,0x00,0x00,0x00,0x00,0x00 } },0 },
{ { { 0x00,0x00,0x00,0x00,0x00,0x00 },0,{ 0x00,0x00,0x00,0x00,0x00,0x00 } },0 }
};
KEYBOARDENTRY_EXTENDED ALTSYSRQ[3] = {
{{{0x54,0x00,0x00,0x00,0x00,0x00},1,{0x00,0x00,0x00,0x00,0x00,0x00}},1},
{{{ 0x84,0x00,0x00,0x00,0x00,0x00 },1,{0x00,0x00,0x00,0x00,0x00,0x00 }},1},
{{{ 0x00,0x00,0x00,0x00,0x00,0x00 },0,{0x00,0x00,0x00,0x00,0x00,0x00 }},0}
};
KEYBOARDENTRY_EXTENDED CTRLBREAK[3] = {
{{ { 0x46,0x00,0x00,0x00,0x00,0x00 },1,{ 0x00,0x00,0x00,0x00,0x00,0x00 },0 },1},
{{ { 0xE0,0x46,0x00,0x00,0x00,0x00 },2,{ 0x00,0x00,0x00,0x00,0x00,0x00 },0 },1},
{{ { 0x00,0x00,0x00,0x00,0x00,0x00 },0,{ 0x00,0x00,0x00,0x00,0x00,0x00 },0 },0}
};
The entry types being:
typedef struct
{
byte keypress[8];
byte keypress_size; //1-8
byte keyrelease[8];
byte keyrelease_size; //0-8: 0 for none!
} KEYBOARDENTRY; //Entry containing keyboard character data (press/hold and release data)!
typedef struct
{
KEYBOARDENTRY entry;
byte used; //Are we used instead of a normal one?
} KEYBOARDENTRY_EXTENDED;
Set 1 defaults(no ctrl/alt applied):
{{0xE0,0x2A,0xE0,0x37,0x00,0x00,0x00,0x00},4,{0xE0,0xB7,0xE0,0xAA,0x00,0x00,0x00,0x00},4}, //PRNT SCRN
{{0xE1,0x1D,0x45,0x00,0x00,0x00,0x00,0x00},3,{0xE1,0x9D,0xC5,0x00,0x00,0x00,0x00,0x00},3}, //PAUSE
Set 2 defaults(no ctrl/alt applied):
{{0xE0,0x12,0xE0,0x7C,0x00,0x00,0x00,0x00},4,{0xE0,0xF0,0x7C,0xE0,0xF0,0x12,0x00,0x00},6}, //PRNT SCRN
{{0xE1,0x14,0x77,0xE1,0x00,0x00,0x00,0x00},4,{0xF0,0x14,0xF0,0x77,0x00,0x00,0x00,0x00},4}, //PAUSE
Set 3 defaults(no ctrl/alt applied):
{{0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00},1,{0xF0,0x57,0x00,0x00,0x00,0x00,0x00,0x00},2}, //PRNT SCRN
{{0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00},1,{0xF0,0x62,0x00,0x00,0x00,0x00,0x00,0x00},2}, //PAUSE
How far is this correct? Are there any errors left to address there?
So, what are the none/CtrlBreak/CtrlSysRq/AltSysRQ combinations to result in proper scancodes in sets 1,2 and 3?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io