diff --git a/devices/pc/panel/livestats.xml b/devices/pc/panel/livestats.xml new file mode 100644 index 000000000..6fd9ef77f --- /dev/null +++ b/devices/pc/panel/livestats.xml @@ -0,0 +1,20 @@ + + + Control Panel + + + + + + + + Enter + Clear + Run + Step + Reset + Fast + Save + + + diff --git a/devices/pc/video/video-cga-lock.xml b/devices/pc/video/video-cga-lock.xml index 091336e32..c8b7bb533 100644 --- a/devices/pc/video/video-cga-lock.xml +++ b/devices/pc/video/video-cga-lock.xml @@ -7,6 +7,7 @@ Lock Pointer + Full Screen diff --git a/modules/pcjs/bin/x86gen.js b/modules/pcjs/bin/x86gen.js index ad8a28054..6a3ebed7b 100644 --- a/modules/pcjs/bin/x86gen.js +++ b/modules/pcjs/bin/x86gen.js @@ -1034,7 +1034,7 @@ function genMode(a, d, w, mrm, sGroup, sRO) { if (sModRegBTLo) { if (!sModRegBTHi) { print(" if (BACKTRACK) " + sModRegBTLo + " = this.backTrack.btiEALo;"); - } else { + } else if (sModRegBTLo.indexOf("_") < 0) { print(" if (BACKTRACK) {"); print(" " + sModRegBTLo + " = this.backTrack.btiEALo; " + sModRegBTHi + " = this.backTrack.btiEAHi;"); print(" }"); @@ -1176,7 +1176,7 @@ function genMode(a, d, w, mrm, sGroup, sRO) { if (sModRegBTLo && sModRegBTLo.indexOf("this.") >= 0 && sRegBTLo && sModRegBTLo != sRegBTLo) { if (!sModRegBTHi || !sRegBTHi) { print(" if (BACKTRACK) " + sModRegBTLo + " = " + sRegBTLo + ";"); - } else { + } else if (sModRegBTLo.indexOf("_") < 0) { print(" if (BACKTRACK) {"); print(" " + sModRegBTLo + " = " + sRegBTLo + "; " + sModRegBTHi + " = " + sRegBTHi + ";"); print(" }"); diff --git a/modules/pcjs/lib/panel.js b/modules/pcjs/lib/panel.js index de1ca3aab..8a72876cd 100644 --- a/modules/pcjs/lib/panel.js +++ b/modules/pcjs/lib/panel.js @@ -71,10 +71,7 @@ Panel.prototype.setBinding = function(sHTMLType, sBinding, control) if (this.cpu && this.cpu.setBinding(sHTMLType, sBinding, control)) return true; if (this.kbd && this.kbd.setBinding(sHTMLType, sBinding, control)) return true; if (DEBUGGER && this.dbg && this.dbg.setBinding(sHTMLType, sBinding, control)) return true; - /* - * TODO: Determine how to declare this superclass method in order to avoid a type warning - */ - return Component.prototype.setBinding.call(this, sHTMLType, sBinding, control); + return this.parent.setBinding.call(this, sHTMLType, sBinding, control); }; /** diff --git a/modules/pcjs/lib/x86.js b/modules/pcjs/lib/x86.js index 181f9fa48..6be98849d 100644 --- a/modules/pcjs/lib/x86.js +++ b/modules/pcjs/lib/x86.js @@ -266,7 +266,7 @@ var X86 = { DMA: 0x08 // async DMA operation in progress }, /* - * Common opcodes + * Common opcodes (and/or any opcodes we need to refer to explicitly) */ OPCODE: { ES: 0x26, // opES() @@ -274,22 +274,24 @@ var X86 = { SS: 0x36, // opSS() DS: 0x3E, // opDS() PUSHSP: 0x54, - PUSHA: 0x60, - POPA: 0x61, - BOUND: 0x62, - ARPL: 0x63, - OS: 0x66, - AS: 0x67, - PUSH16: 0x68, - IMUL16: 0x69, - PUSH8: 0x6A, - IMUL8: 0x6B, - INSB: 0x6C, - INSW: 0x6D, - OUTSB: 0x6E, - OUTSW: 0x6F, - ENTER: 0xC8, - LEAVE: 0xC9, + PUSHA: 0x60, // 80186 and up + POPA: 0x61, // 80186 and up + BOUND: 0x62, // 80186 and up + ARPL: 0x63, // 80286 and up + FS: 0x64, // 80386 and up + GS: 0x65, // 80386 and up + OS: 0x66, // 80386 and up + AS: 0x67, // 80386 and up + PUSH16: 0x68, // 80186 and up + IMUL16: 0x69, // 80186 and up + PUSH8: 0x6A, // 80186 and up + IMUL8: 0x6B, // 80186 and up + INSB: 0x6C, // 80186 and up + INSW: 0x6D, // 80186 and up + OUTSB: 0x6E, // 80186 and up + OUTSW: 0x6F, // 80186 and up + ENTER: 0xC8, // 80186 and up + LEAVE: 0xC9, // 80186 and up CALLF: 0x9A, // opCALLf() MOVSB: 0xA4, // opMOVSb() MOVSW: 0xA5, // opMOVSw() @@ -315,7 +317,7 @@ var X86 = { REPZ: 0xF3, CALLW: 0x10FF, CALLDW: 0x18FF, - UD2: 0x0B0F // UD2 (invalid opcode guaranteed to generate UD_FAULT on all post-8086 processors) + UD2: 0x0B0F // UD2 (invalid opcode "guaranteed" to generate UD_FAULT on all post-8086 processors) } }; diff --git a/modules/pcjs/lib/x86cpu.js b/modules/pcjs/lib/x86cpu.js index c8b6cfef7..6bbe4baec 100644 --- a/modules/pcjs/lib/x86cpu.js +++ b/modules/pcjs/lib/x86cpu.js @@ -444,11 +444,11 @@ X86CPU.PREFETCH = { /** * initMemory(aMemBlocks, addrLimit, blockShift, blockLimit, blockMask) * - * Notification from Bus.initMemory(), giving us direct access to the entire memory - * space (aMemBlocks). + * Notification from Bus.initMemory(), giving us direct access to the entire memory space + * (aMemBlocks). * - * We also initialize an instruction byte prefetch queue, aPrefetch, which is an - * N-element array whose slots look like: + * We also initialize an instruction byte prefetch queue, aPrefetch, which is an N-element + * array with slots that look like: * * 0: [tag, b] <-- iPrefetchTail * 1: [tag, b] @@ -459,7 +459,7 @@ X86CPU.PREFETCH = { * where tag is the physical address of the byte that's been prefetched, and b is the * value of the byte. N is currently 8 (PREFETCH.ARRAY), but it can be any power-of-two * that is equal to or greater than (PREFETCH.QUEUE), the effective size of the prefetch - * queue (6 on an 8086, 4 on an 8088; currently hard-coded to the latter). All slots + * queue (6 on an 8086, 4 on an 8088; currently hard-coded to the latter). All slots * are initialized to [-1, 0] when preallocating the prefetch queue, but those initial * values are quickly overwritten and never seen again. * @@ -523,7 +523,7 @@ X86CPU.prototype.setAddressMask = function(addrMask) /** * initProcessor() * - * This isolates 80186/80188/80286 support, so that it can be selectively enabled/tested. + * This isolates 80186/80188/80286/80386 support, so that it can be selectively enabled/tested. * * Here's a summary of 80186/80188 differences according to "AP-186: Introduction to the 80186 * Microprocessor, March 1983" (pp.55-56). "The iAPX 86,88 and iAPX 186,188 User's Manual Programmer's @@ -711,8 +711,8 @@ X86CPU.prototype.initProcessor = function() if (this.model >= X86.MODEL_80186) { /* * TODO: I don't go out of my way to make 80186/80188 cycle times accurate, since no IBM PC models used - * those processors; beyond the 8086, my next priority is the 80286. But we may revisit the 80186 someday; - * instruction handlers that contain "hard-coded" 80286 cycle times include: opINSb, opINSw, opOUTSb, + * those processors; beyond the 8086, the next priority is the 80286, but we may revisit the 80186 someday. + * Instruction handlers that contain "hard-coded" 80286 cycle times include: opINSb, opINSw, opOUTSb, * opOUTSw, opENTER, and opLEAVE. */ this.nShiftCountMask = 0x1f; // on newer processors, all shift counts are MOD 32 @@ -720,11 +720,11 @@ X86CPU.prototype.initProcessor = function() this.aOps[X86.OPCODE.PUSHA] = X86OpXX.opPUSHA; this.aOps[X86.OPCODE.POPA] = X86OpXX.opPOPA; this.aOps[X86.OPCODE.BOUND] = X86OpXX.opBOUND; - this.aOps[0x63] = X86Help.opHelpInvalid; - this.aOps[0x64] = X86Help.opHelpInvalid; - this.aOps[0x65] = X86Help.opHelpInvalid; - this.aOps[0x66] = X86Help.opHelpInvalid; - this.aOps[0x67] = X86Help.opHelpInvalid; + this.aOps[X86.OPCODE.ARPL] = X86Help.opHelpInvalid; + this.aOps[X86.OPCODE.FS] = X86Help.opHelpInvalid; + this.aOps[X86.OPCODE.GS] = X86Help.opHelpInvalid; + this.aOps[X86.OPCODE.OS] = X86Help.opHelpInvalid; + this.aOps[X86.OPCODE.AS] = X86Help.opHelpInvalid; this.aOps[X86.OPCODE.PUSH16] = X86OpXX.opPUSH16; this.aOps[X86.OPCODE.IMUL16] = X86OpXX.opIMUL16; this.aOps[X86.OPCODE.PUSH8] = X86OpXX.opPUSH8; @@ -771,9 +771,7 @@ X86CPU.prototype.reset = function() this.resetRegs(); this.resetCycles(); this.clearError(); // clear any fatal error/exception that setError() may have flagged - if (SAMPLER) { - this.iSampleNext = this.iSampleFreq = this.iSampleSkip = 0; - } + if (SAMPLER) this.iSampleNext = this.iSampleFreq = this.iSampleSkip = 0; }; /** @@ -897,7 +895,7 @@ X86CPU.prototype.resetRegs = function() * * So, yes, our GDTR and IDTR "registers" differ from other segment registers in that we do NOT record * the 16-bit limit specified by the LGDT or LIDT instructions; instead, we immediately calculate the limiting - * address and record that instead. + * address, and record that instead. * * In addition to different CS:IP reset values, the CS base address must be set to the top of the 16Mb * address space rather than the top of the first 1Mb (which is why the MODEL_5170 ROM must be addressable @@ -927,7 +925,7 @@ X86CPU.prototype.resetRegs = function() this.setProtMode(); /* - * intFlags contains some internal "flags" that we use to indicate whether a hardware interrupt (INTFLAG.INTR) or + * intFlags contains some internal states we use to indicate whether a hardware interrupt (INTFLAG.INTR) or * Trap software interrupt (INTR.TRAP) has been requested, as well as when we're in a "HLT" state (INTFLAG.HALT) * that requires us to wait for a hardware interrupt (INTFLAG.INTR) before continuing execution. * @@ -1203,7 +1201,7 @@ X86CPU.prototype.restoreProtMode = function(a) * * This implements save support for the X86 component. * - * UPDATES: The current speed multiplier from getSpeed() is now saved in data group #3, so that your speed is preserved. + * UPDATES: The current speed multiplier from getSpeed() is now saved in group #3, so that your speed is preserved. * * @this {X86CPU} * @return {Object} @@ -1336,8 +1334,8 @@ X86CPU.prototype.getSeg = function(sName) /** * setCS(sel) * - * NOTE: This is used ONLY by those few undocumented 8086/8088/80186/80188 instructions that MOV or POP a value - * into CS, and which we assume have the same behavior as any other instruction that MOVs or POPs a segment register + * NOTE: This is used ONLY by those few undocumented 8086/8088/80186/80188 instructions that "MOV" or "POP" a value + * into CS, which we assume have the same behavior as any other instruction that moves or pops a segment register * (ie, suppresses h/w interrupts for one instruction). Instructions that "JMP" or "CALL" or "INT" or "IRET" a new * value into CS are always accompanied by a new IP value, so they use setCSIP() instead, which does NOT suppress * h/w interrupts. @@ -1865,8 +1863,8 @@ X86CPU.prototype.setBinding = function(sHTMLType, sBinding, control) case "SS": case "ES": case "IP": - case "PC": // deprecated as an alias for "IP" (still used by older XML files like the one at http://tpoindex.github.io/crobots/) - case "PS": // this refers to "Processor Status", aka the 16-bit flags register (DEBUG.COM actually refers to this as "PC", surprisingly) + case "PC": // deprecated as an alias for "IP" (still used by older XML files, like the one at http://tpoindex.github.io/crobots/) + case "PS": // this refers to "Processor Status", aka the 16-bit flags register (although DEBUG.COM refers to this as "PC", surprisingly) case "C": case "P": case "A": @@ -1880,7 +1878,7 @@ X86CPU.prototype.setBinding = function(sHTMLType, sBinding, control) fBound = true; break; default: - fBound = CPU.prototype.setBinding.call(this, sHTMLType, sBinding, control); + fBound = this.parent.setBinding.call(this, sHTMLType, sBinding, control); break; } return fBound; @@ -2506,6 +2504,9 @@ X86CPU.prototype.checkINTR = function() { this.assert(this.intFlags); if (!(this.opFlags & X86.OPFLAG.NOINTR)) { + /* + * TODO: Reverse the order of the INTR and TRAP tests if the processor is an 80286 or higher. + */ if ((this.intFlags & X86.INTFLAG.INTR) && (this.regPS & X86.PS.IF)) { var nIDT = this.chipset.getIRRVector(); if (nIDT >= -1) { diff --git a/modules/pcjs/lib/x86grps.js b/modules/pcjs/lib/x86grps.js index 22ef27099..c80118758 100644 --- a/modules/pcjs/lib/x86grps.js +++ b/modules/pcjs/lib/x86grps.js @@ -144,25 +144,25 @@ var X86Grps = { /** * opGrpADDw(dst, src) * - * Notes regarding carry following a 32-bit addition: + * Notes regarding carry following a 32-bit addition (which we do not YET support but will eventually): * * The following table summarizes bit 31 of dst, src, and result, along with the expected carry bit: * * dst src res carry * --- --- --- ----- - * 0 0 0 0 no - * 0 0 1 0 no (there must have been a carry out of bit 30, but it was "absorbed") - * 0 1 0 1 yes (there must have been a carry out of bit 30, but it was NOT "absorbed") - * 0 1 1 0 no - * 1 0 0 1 yes (same as the preceding "yes" case) - * 1 0 1 0 no - * 1 1 0 1 yes (since the addition of two ones must always produce a carry) - * 1 1 1 1 yes (since the addition of two ones must always produce a carry) + * 0 0 0 0 no + * 0 0 1 0 no (there must have been a carry out of bit 30, but it was "absorbed") + * 0 1 0 1 yes (there must have been a carry out of bit 30, but it was NOT "absorbed") + * 0 1 1 0 no + * 1 0 0 1 yes (same as the preceding "yes" case) + * 1 0 1 0 no + * 1 1 0 1 yes (since the addition of two ones must always produce a carry) + * 1 1 1 1 yes (since the addition of two ones must always produce a carry) * - * So, we can use “(dst ^ ((dst ^ src) & (src ^ res))) >> 15” to shift the proper carry bit into the conventional - * SIZE_WORD position; eg: + * So, we can use “(dst ^ ((dst ^ src) & (src ^ res))) >>> 15” to shift the calculated carry bit (bit 31) + * into the conventional SIZE_WORD position (bit 16); eg: * - * resultValue = ((resultValue >>> 16) | (resultValue & 0xffff)) | (((dst ^ ((dst ^ src) & (src ^ resultValue))) >> 15) & SIZE_WORD); + * resultValue = ((resultValue >>> 16) | (resultValue & 0xffff)) | (((dst ^ ((dst ^ src) & (src ^ resultValue))) >>> 15) & SIZE_WORD); * * Essentially, we’re “cramming” all 32 result bits into the low 16 bits (which will effectively represent the * zero flag), and then setting bit 16 to the effective carry flag. This transforms the zero and carry conditions diff --git a/modules/pcjs/lib/x86modw.js b/modules/pcjs/lib/x86modw.js index 31d8d6bb9..326eab909 100644 --- a/modules/pcjs/lib/x86modw.js +++ b/modules/pcjs/lib/x86modw.js @@ -8522,9 +8522,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordC4(afnGrp, fnSrc) { var w = afnGrp[0].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordC5(afnGrp, fnSrc): mod=11 (dst:reg) reg=000 (afnGrp[0]) r/m=101 (BP) @@ -8634,9 +8631,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordCC(afnGrp, fnSrc) { var w = afnGrp[1].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordCD(afnGrp, fnSrc): mod=11 (dst:reg) reg=001 (afnGrp[1]) r/m=101 (BP) @@ -8746,9 +8740,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordD4(afnGrp, fnSrc) { var w = afnGrp[2].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordD5(afnGrp, fnSrc): mod=11 (dst:reg) reg=010 (afnGrp[2]) r/m=101 (BP) @@ -8858,9 +8849,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordDC(afnGrp, fnSrc) { var w = afnGrp[3].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordDD(afnGrp, fnSrc): mod=11 (dst:reg) reg=011 (afnGrp[3]) r/m=101 (BP) @@ -8970,9 +8958,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordE4(afnGrp, fnSrc) { var w = afnGrp[4].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordE5(afnGrp, fnSrc): mod=11 (dst:reg) reg=100 (afnGrp[4]) r/m=101 (BP) @@ -9082,9 +9067,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordEC(afnGrp, fnSrc) { var w = afnGrp[5].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordED(afnGrp, fnSrc): mod=11 (dst:reg) reg=101 (afnGrp[5]) r/m=101 (BP) @@ -9194,9 +9176,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordF4(afnGrp, fnSrc) { var w = afnGrp[6].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordF5(afnGrp, fnSrc): mod=11 (dst:reg) reg=110 (afnGrp[6]) r/m=101 (BP) @@ -9306,9 +9285,6 @@ X86ModW.aOpModGrp = [ function opModGrpWordFC(afnGrp, fnSrc) { var w = afnGrp[7].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opModGrpWordFD(afnGrp, fnSrc): mod=11 (dst:reg) reg=111 (afnGrp[7]) r/m=101 (BP) diff --git a/modules/pcjs/lib/x86modw32.js b/modules/pcjs/lib/x86modw32.js index 167e61e6c..01420fc44 100644 --- a/modules/pcjs/lib/x86modw32.js +++ b/modules/pcjs/lib/x86modw32.js @@ -8570,9 +8570,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordC4(afnGrp, fnSrc) { var w = afnGrp[0].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordC5(afnGrp, fnSrc): mod=11 (dst:reg) reg=000 (afnGrp[0]) r/m=101 (EBP) @@ -8682,9 +8679,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordCC(afnGrp, fnSrc) { var w = afnGrp[1].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordCD(afnGrp, fnSrc): mod=11 (dst:reg) reg=001 (afnGrp[1]) r/m=101 (EBP) @@ -8794,9 +8788,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordD4(afnGrp, fnSrc) { var w = afnGrp[2].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordD5(afnGrp, fnSrc): mod=11 (dst:reg) reg=010 (afnGrp[2]) r/m=101 (EBP) @@ -8906,9 +8897,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordDC(afnGrp, fnSrc) { var w = afnGrp[3].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordDD(afnGrp, fnSrc): mod=11 (dst:reg) reg=011 (afnGrp[3]) r/m=101 (EBP) @@ -9018,9 +9006,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordE4(afnGrp, fnSrc) { var w = afnGrp[4].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordE5(afnGrp, fnSrc): mod=11 (dst:reg) reg=100 (afnGrp[4]) r/m=101 (EBP) @@ -9130,9 +9115,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordEC(afnGrp, fnSrc) { var w = afnGrp[5].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordED(afnGrp, fnSrc): mod=11 (dst:reg) reg=101 (afnGrp[5]) r/m=101 (EBP) @@ -9242,9 +9224,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordF4(afnGrp, fnSrc) { var w = afnGrp[6].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordF5(afnGrp, fnSrc): mod=11 (dst:reg) reg=110 (afnGrp[6]) r/m=101 (EBP) @@ -9354,9 +9333,6 @@ X86ModW32.aOpModGrp = [ function opMod32GrpWordFC(afnGrp, fnSrc) { var w = afnGrp[7].call(this, this.regESP & this.opMask, fnSrc.call(this)); this.regESP = (this.regESP & ~this.opMask) | w; - if (BACKTRACK) { - X86.BACKTRACK.SP_LO = this.backTrack.btiEALo; X86.BACKTRACK.SP_HI = this.backTrack.btiEAHi; - } }, /** * opMod32GrpWordFD(afnGrp, fnSrc): mod=11 (dst:reg) reg=111 (afnGrp[7]) r/m=101 (EBP) diff --git a/modules/pcjs/templates/components.xsl b/modules/pcjs/templates/components.xsl index 0cc80144e..c07237d9f 100644 --- a/modules/pcjs/templates/components.xsl +++ b/modules/pcjs/templates/components.xsl @@ -350,6 +350,9 @@ + + + diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index ab8aea13c..ce61dac74 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -84,9 +84,7 @@ function Component(type, parms, constructor, bitsMessage) { this.type = type; - if (!parms) { - parms = {'id': "", 'name': ""}; - } + if (!parms) parms = {'id': "", 'name': ""}; this.id = parms['id']; this.name = parms['name']; @@ -200,6 +198,7 @@ Component.subclass = function(superclass, subclass, methods, statics) { subclass.prototype = Component.inherit(superclass.prototype); subclass.prototype.constructor = subclass; + subclass.prototype.parent = superclass.prototype; if (methods) { Component.extend(subclass.prototype, methods); } @@ -583,6 +582,7 @@ Component.getElementsByClass = function(element, sClass, sObjClass) Component.prototype = { constructor: Component, + parent: null, /** * toString() *