Fixed one (of several known) TSS fault cases that pre-1.0 OS/2 builds depended on, and added support for the SysReq soft-key binding (since pre-1.0 OS/2 builds used that instead of Ctrl-Esc)

This commit is contained in:
Jeff Parsons 2016-01-23 13:21:19 -08:00
commit c7ce1c43c0
9 changed files with 638 additions and 628 deletions

View file

@ -389,7 +389,8 @@ Keyboard.SIMCODE = {
FF_CMD: Keyboard.KEYCODE.FF_CMD + Keyboard.KEYCODE.ONDOWN,
CTRL_C: Keyboard.ASCII.CTRL_C + Keyboard.KEYCODE.FAKE,
CTRL_BREAK: Keyboard.KEYCODE.BS + Keyboard.KEYCODE.FAKE,
CTRL_ALT_DEL: Keyboard.KEYCODE.DEL + Keyboard.KEYCODE.FAKE
CTRL_ALT_DEL: Keyboard.KEYCODE.DEL + Keyboard.KEYCODE.FAKE,
SYSREQ: Keyboard.KEYCODE.ESC + Keyboard.KEYCODE.FAKE
};
/*
@ -582,6 +583,7 @@ Keyboard.CLICKCODES = {
'UP': Keyboard.SIMCODE.UP, // formerly "up-arrow"
'RIGHT': Keyboard.SIMCODE.RIGHT, // formerly "right-arrow"
'DOWN': Keyboard.SIMCODE.DOWN, // formerly "down-arrow"
'SYSREQ': Keyboard.SIMCODE.SYSREQ,
/*
* These bindings are for convenience (common key combinations that can be bound to a single control)
*/
@ -716,8 +718,8 @@ Keyboard.SOFTCODES = {
/* 80 */ 'num-down': Keyboard.SIMCODE.DOWN, // formerly "down-arrow"
/* 81 */ 'num-pgdn': Keyboard.SIMCODE.PGDN, // formerly "page-down"
/* 82 */ 'num-ins': Keyboard.SIMCODE.INS, // formerly "ins"
/* 83 */ 'num-del': Keyboard.SIMCODE.DEL // formerly "del"
// /* 84 */ 'sysreq': Keyboard.SCANCODE.SYSREQ, // 84-key keyboard only (simulated with 'alt'+'prtsc' on 101-key keyboards)
/* 83 */ 'num-del': Keyboard.SIMCODE.DEL, // formerly "del"
/* 84 */ 'sysreq': Keyboard.SCANCODE.SYSREQ // 84-key keyboard only (simulated with 'alt'+'prtsc' on 101-key keyboards)
// /* 84 */ 'pause': Keyboard.SCANCODE.PAUSE, // 101-key keyboard only
// /* 85 */ 'f11': Keyboard.SCANCODE.F11,
// /* 86 */ 'f12': Keyboard.SCANCODE.F12,
@ -902,6 +904,7 @@ Keyboard.SIMCODES[Keyboard.SIMCODE.DOWN] = Keyboard.SCANCODE.NUM_DOWN;
Keyboard.SIMCODES[Keyboard.SIMCODE.PGDN] = Keyboard.SCANCODE.NUM_PGDN;
Keyboard.SIMCODES[Keyboard.SIMCODE.INS] = Keyboard.SCANCODE.NUM_INS;
Keyboard.SIMCODES[Keyboard.SIMCODE.DEL] = Keyboard.SCANCODE.NUM_DEL;
Keyboard.SIMCODES[Keyboard.SIMCODE.SYSREQ] = Keyboard.SCANCODE.SYSREQ;
/*
* Entries beyond this point are for keys that existed only on 101-key keyboards (well, except for 'sysreq',
* which also existed on the 84-key keyboard), which ALSO means that these keys essentially did not exist

View file

@ -1519,9 +1519,9 @@ X86Seg.prototype.updateMode = function(fLoad, fProt, fV86)
* @param {number} type
* @param {number} [ext]
*/
if (DEBUG) {
X86Seg.prototype.messageSeg = function(sel, base, limit, type, ext)
{
X86Seg.prototype.messageSeg = function(sel, base, limit, type, ext)
{
if (DEBUG) {
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(Messages.SEG)) {
var ch = (this.sName.length < 3? " " : "");
var sDPL = " dpl=" + this.dpl;
@ -1529,8 +1529,8 @@ if (DEBUG) {
this.dbg.message("loadSeg(" + this.sName + "):" + ch + "sel=" + str.toHexWord(sel) + " base=" + str.toHex(base) + " limit=" + str.toHexWord(limit) + " type=" + str.toHexWord(type) + sDPL, true);
}
this.cpu.assert(/* base !== X86.ADDR_INVALID && */ (this.cpu.model >= X86.MODEL_80386 || !ext || ext == X86.DESC.EXT.AVAIL));
};
}
}
};
/**
* probeDesc(sel)
@ -1541,9 +1541,9 @@ if (DEBUG) {
* @param {number} sel
* @return {number} base address of selected segment, or X86.ADDR_INVALID if error
*/
if (DEBUGGER) {
X86Seg.prototype.probeDesc = function(sel)
{
X86Seg.prototype.probeDesc = function(sel)
{
if (DEBUGGER) {
var addrDT;
var addrDTLimit;
var cpu = this.cpu;
@ -1588,8 +1588,8 @@ if (DEBUGGER) {
this.updateMode(true, true, false);
return base;
}
return X86.ADDR_INVALID;
};
}
}
return X86.ADDR_INVALID;
};
if (NODE) module.exports = X86Seg;