From f214b45da076488a4b5ae4844736fb8e6e77f341 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 18 Oct 2014 18:09:08 -0500 Subject: [PATCH] Fixed PC-DOS 7.00 boot (diskette access still seems sluggish though) --- my_modules/pcjs-client/lib/debugger.js | 663 +++++++++++++------------ my_modules/pcjs-client/lib/fdc.js | 315 ++++++------ my_modules/pcjs-client/lib/x86cpu.js | 321 ++++++------ versions/pcjs/1.15.5/pc-dbg.js | 659 ++++++++++++------------ versions/pcjs/1.15.5/pc.js | 530 ++++++++++---------- 5 files changed, 1246 insertions(+), 1242 deletions(-) diff --git a/my_modules/pcjs-client/lib/debugger.js b/my_modules/pcjs-client/lib/debugger.js index 1b9ad874b..3f3e2526a 100644 --- a/my_modules/pcjs-client/lib/debugger.js +++ b/my_modules/pcjs-client/lib/debugger.js @@ -49,7 +49,7 @@ if (DEBUGGER) { /** * Debugger(parmsDbg) - * + * * @constructor * @extends Component * @param {Object} parmsDbg @@ -57,7 +57,7 @@ if (DEBUGGER) { * The Debugger component supports the following optional (parmsDbg) properties: * * commands: string containing zero or more commands, separated by ';' - * + * * messages: string containing zero or more message categories to enable; * multiple categories must be separated by '|' or ';'. Parsed by messageInit(). * @@ -67,62 +67,62 @@ if (DEBUGGER) { function Debugger(parmsDbg) { if (DEBUGGER) { - + Component.call(this, "Debugger", parmsDbg, Debugger); - + /* * These keep track of instruction activity, but only when tracing or when Debugger checks * have been enabled (eg, one or more breakpoints have been set). - * + * * They are zeroed by the reset() notification handler. cInstructions is advanced by * stepCPU() and checkInstruction() calls. nCycles is updated by every stepCPU() or stop() * call and simply represents the number of cycles performed by the last run of instructions. */ this.nCycles = -1; this.cInstructions = -1; - + /* * Most commands that require an address call parseAddr(), which defaults to aAddrNextCode * or aAddrNextData when no address has been given. doDump() and doUnassemble(), in turn, * update aAddrNextData and aAddrNextCode, respectively, when they're done. - * + * * The format of all aAddr variables is [off, seg, addr], where seg:off is the segmented * address and addr is the corresponding physical address (if known). For certain segmented * addresses (eg, breakpoint addresses), we pre-compute the physical address and save that * in aAddr[2], so that the breakpoint will still operate as intended even if the mode changes * later (eg, from real-mode to protected-mode). - * + * * Finally, for TEMPORARY breakpoint addresses, we set aAddr[3] to true, so that they can be * automatically cleared when they're hit. */ this.aAddrNextCode = [0, 0]; this.aAddrNextData = [0, 0]; - + /* * When Enter is pressed on an empty input buffer, we default to the previous command, * which is preserved here. */ this.prevCmd = null; - + /* * fAssemble is true when "assemble mode" is active, false when not. */ this.fAssemble = false; this.aAddrAssemble = [0, 0]; - + /* * aSymbolTable is an array of 4-element arrays, one per ROM or other chunk of address space. * Each 4-element arrays contains: - * + * * [0]: addr * [1]: size * [2]: aSymbols * [3]: aOffsetPairs - * + * * See addSymbols() for more details, since that's how callers add sets of symbols to the table. */ this.aSymbolTable = []; - + /* * clearBreakpoints() initializes the breakpoints lists: aBreakExec is a list of addresses * to halt on whenever attempting to execute an instruction at the corresponding address, @@ -130,7 +130,7 @@ function Debugger(parmsDbg) * respectively, occurs at the corresponding address. */ this.clearBreakpoints(); - + /* * Execution history is allocated by initHistory() whenever checksEnabled() conditions change. * Execution history is updated whenever the CPU calls checkInstruction(), which will happen only @@ -138,7 +138,7 @@ function Debugger(parmsDbg) * This ensures that, by default, the CPU runs as fast as possible. */ this.initHistory(); - + /* * Initialize Debugger message support */ @@ -164,7 +164,7 @@ function Debugger(parmsDbg) if (DEBUG) { this.traceInit(); } - + this.sInitCommands = parmsDbg['commands']; } // endif DEBUGGER @@ -173,7 +173,7 @@ function Debugger(parmsDbg) if (DEBUGGER) { Component.subclass(Component, Debugger); - + Debugger.aCommands = { '?': "help", 'a [#]': "assemble", @@ -194,16 +194,16 @@ if (DEBUGGER) { 'u [#]': "unassemble", 'x': "execution options" }; - + /* * Address types for parseAddr(), to help choose between aAddrNextCode and aAddrNextData */ Debugger.ADDR_CODE = 1; Debugger.ADDR_DATA = 2; - + /* * Instruction ordinals (indexes into Debugger.asIns) - * + * * (And yes, there are a number of non-8086/8088 instructions in the following tables; * if I decide to expand CPU support, even if it's just to broaden real-mode support on a simulated * 286 or 386, then I might as well leave some of that support in place, since the impact is minimal). @@ -236,7 +236,7 @@ if (DEBUGGER) { GRP1W: 192, GRP1SW: 193, GRP2B: 194, GRP2W: 195, GRP2B1: 196, GRP2W1: 197, GRP2BC: 198, GRP2WC: 199, GRP3B: 200, GRP3W: 201, GRP4B: 202, GRP4W: 203, OP0F: 204, GRP6: 205, GRP7: 206 }; - + /* * Instruction names, indexed by instruction ordinal (above) */ @@ -266,13 +266,13 @@ if (DEBUGGER) { "SS:", "STC", "STD", "STI", "STOSB", "STOSW", "STR", "SUB", "TEST", "VERR", "VERW", "WAIT", "XCHG", "XLAT", "XOR" ]; - + Debugger.CPU_86 = 0; Debugger.CPU_186 = 1; Debugger.CPU_286 = 2; Debugger.CPU_386 = 3; Debugger.CPU = Debugger.CPU_86; // current CPU definition - + /* * ModRM masks and definitions */ @@ -292,13 +292,13 @@ if (DEBUGGER) { Debugger.REG_BP = 0x0D; Debugger.REG_SI = 0x0E; Debugger.REG_DI = 0x0F; - + Debugger.asRegs = [ "AL", "CL", "DL", "BL", "AH", "CH", "DH", "BH", "AX", "CX", "DX", "BX", "SP", "BP", "SI", "DI", "ES", "CS", "SS", "DS", "IP" ]; - + Debugger.REG_ES = 0x00; // bits 0-1 are standard SegReg encodings Debugger.REG_CS = 0x01; Debugger.REG_SS = 0x02; @@ -306,12 +306,12 @@ if (DEBUGGER) { Debugger.REG_FS = 0x04; Debugger.REG_GS = 0x05; Debugger.REG_UNKNOWN = 0x00; - + Debugger.MOD_NODISP = 0x00; // use RM below, no displacement Debugger.MOD_DISP8 = 0x01; // use RM below + 8-bit displacement Debugger.MOD_DISP16 = 0x02; // use RM below + 16-bit displacement Debugger.MOD_REGISTER = 0x03; // use REG above - + Debugger.RM_BXSI = 0x00; Debugger.RM_BXDI = 0x01; Debugger.RM_BPSI = 0x02; @@ -321,11 +321,11 @@ if (DEBUGGER) { Debugger.RM_BP = 0x06; Debugger.RM_IMMOFF = Debugger.RM_BP; // only if MOD_NODISP Debugger.RM_BX = 0x07; - + Debugger.asRM = [ "BX+SI", "BX+DI", "BP+SI", "BP+DI", "SI", "DI", "BP", "BX" ]; - + /* * Operand type descriptor masks and definitions * @@ -336,7 +336,7 @@ if (DEBUGGER) { Debugger.TYPE_MODE = 0x00F0; // mode field Debugger.TYPE_IREG = 0x0F00; // implied register field Debugger.TYPE_OTHER = 0xF000; // "other" field - + /* * TYPE_SIZE values. Note that some of the values (eg, TYPE_WORDIB * and TYPE_WORDIW) imply the presence of a third operand, for those @@ -354,7 +354,7 @@ if (DEBUGGER) { Debugger.TYPE_WORDIB = 0x0009; // two source operands (eg, IMUL) Debugger.TYPE_WORDIW = 0x000A; // two source operands (eg, IMUL) Debugger.TYPE_PREFIX = 0x000F; // (treat similarly to TYPE_NONE) - + /* * TYPE_MODE values. Note that order is somewhat important, as all values implying * the presence of a ModRM byte are assumed to be >= TYPE_MODRM. @@ -375,7 +375,7 @@ if (DEBUGGER) { Debugger.TYPE_CTLREG = 0x00D0; // (C) Reg selects control register Debugger.TYPE_DBGREG = 0x00E0; // (D) Reg selects debug register Debugger.TYPE_TSTREG = 0x00F0; // (T) Reg selects test register - + /* * TYPE_IREG values, based on the REG_* constants. * For convenience, they include TYPE_IMPREG or TYPE_IMPSEG as appropriate. @@ -402,7 +402,7 @@ if (DEBUGGER) { Debugger.TYPE_DS = (Debugger.REG_DS << 8 | Debugger.TYPE_IMPSEG | Debugger.TYPE_WORD); Debugger.TYPE_FS = (Debugger.REG_FS << 8 | Debugger.TYPE_IMPSEG | Debugger.TYPE_WORD); Debugger.TYPE_GS = (Debugger.REG_GS << 8 | Debugger.TYPE_IMPSEG | Debugger.TYPE_WORD); - + /* * TYPE_OTHER bit definitions */ @@ -447,18 +447,18 @@ if (DEBUGGER) { * functions. Each category has a corresponding bit value that can be combined (ie, OR'ed) as * needed. The Debugger's message command ("m") is used to turn message categories on and off, * like so: - * + * * m port on * m port off * ... - * + * * Every caller of messageInit() receives all the MESSAGE_* properties as bit values; for example, * after ChipSet calls messageInit(ChipSet), ChipSet.MESSAGE_MEM will be 0x0001, and so on. - * + * * We also call messageInit() on behalf the current Debugger instance so that other components have * the option of accessing the properties indirectly (eg, this.dbg.MESSAGE_MEM), since the Debugger * component is not a required component. - * + * * NOTE: The order of these categories can be rearranged, alphabetized, etc, as desired; just be * aware that changing the bit values could break saved Debugger states (not a huge concern, just * something to be aware of). @@ -497,11 +497,11 @@ if (DEBUGGER) { /* * Instruction trace categories supported by the traceLog() function. The Debugger's info * command ("n") is used to turn trace categories on and off, like so: - * + * * n shl on * n shl off * ... - * + * * Note that there are usually multiple entries for each category (one for each supported operand size); * all matching entries are enabled or disabled as a group. */ @@ -525,27 +525,27 @@ if (DEBUGGER) { DIVW: {ins: Debugger.INS.DIV, size: 32}, // dst is 32-bit (DX:AX), src is 16-bit (operand), result is 32-bit (DX:AX, remainder:quotient) IDIVW: {ins: Debugger.INS.IDIV, size: 32} // dst is 32-bit (DX:AX), src is 16-bit (operand), result is 32-bit (DX:AX, remainder:quotient) }; - + Debugger.TRACE_LIMIT = 100000; /* * Opcode 0x0F has a distinguished history: - * + * * On the 8086, it functioned as POP CS * On the 80186, it generated an illegal opcode (UD_FAULT) exception * On the 80286, it introduced a series of new (and growing) two-byte opcodes - * + * * Based on the active CPU model, we make every effort to execute and disassemble this (and every other) * opcode appropriately, by setting the opcode's entry in aaOpDescs accordingly. 0x0F defaults to the 8086 * entry: aOpDescPopCS. - * + * * Note that we do NOT modify aaOpDescs directly; this.aaOpDescs is a reference to it if the processor - * is an 8086, otherwise we make a copy of the array and THEN modify it. + * is an 8086, otherwise we make a copy of the array and THEN modify it. */ Debugger.aOpDescPopCS = [Debugger.INS.POP, Debugger.TYPE_CS | Debugger.TYPE_OUT]; Debugger.aOpDescUndefined = [Debugger.INS.NONE, Debugger.TYPE_NONE]; Debugger.aOpDesc0F = [Debugger.INS.OP0F, Debugger.TYPE_WORD | Debugger.TYPE_BOTH]; - + /* * The aaOpDescs array is indexed by opcode, and each element is a sub-array (aOpDesc) that describes * the corresponding opcode. The sub-elements are as follows: @@ -567,7 +567,7 @@ if (DEBUGGER) { /* 0x05 */ [Debugger.INS.ADD, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x06 */ [Debugger.INS.PUSH, Debugger.TYPE_ES | Debugger.TYPE_IN], /* 0x07 */ [Debugger.INS.POP, Debugger.TYPE_ES | Debugger.TYPE_OUT], - + /* 0x08 */ [Debugger.INS.OR, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x09 */ [Debugger.INS.OR, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x0A */ [Debugger.INS.OR, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -576,7 +576,7 @@ if (DEBUGGER) { /* 0x0D */ [Debugger.INS.OR, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x0E */ [Debugger.INS.PUSH, Debugger.TYPE_CS | Debugger.TYPE_IN], /* 0x0F */ Debugger.aOpDescPopCS, - + /* 0x10 */ [Debugger.INS.ADC, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x11 */ [Debugger.INS.ADC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x12 */ [Debugger.INS.ADC, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -585,7 +585,7 @@ if (DEBUGGER) { /* 0x15 */ [Debugger.INS.ADC, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x16 */ [Debugger.INS.PUSH, Debugger.TYPE_SS | Debugger.TYPE_IN], /* 0x17 */ [Debugger.INS.POP, Debugger.TYPE_SS | Debugger.TYPE_OUT], - + /* 0x18 */ [Debugger.INS.SBB, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x19 */ [Debugger.INS.SBB, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x1A */ [Debugger.INS.SBB, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -594,7 +594,7 @@ if (DEBUGGER) { /* 0x1D */ [Debugger.INS.SBB, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x1E */ [Debugger.INS.PUSH, Debugger.TYPE_DS | Debugger.TYPE_IN], /* 0x1F */ [Debugger.INS.POP, Debugger.TYPE_DS | Debugger.TYPE_OUT], - + /* 0x20 */ [Debugger.INS.AND, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x21 */ [Debugger.INS.AND, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x22 */ [Debugger.INS.AND, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -603,7 +603,7 @@ if (DEBUGGER) { /* 0x25 */ [Debugger.INS.AND, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x26 */ [Debugger.INS.ES, Debugger.TYPE_PREFIX], /* 0x27 */ [Debugger.INS.DAA], - + /* 0x28 */ [Debugger.INS.SUB, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x29 */ [Debugger.INS.SUB, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x2A */ [Debugger.INS.SUB, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -612,7 +612,7 @@ if (DEBUGGER) { /* 0x2D */ [Debugger.INS.SUB, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x2E */ [Debugger.INS.CS, Debugger.TYPE_PREFIX], /* 0x2F */ [Debugger.INS.DAS], - + /* 0x30 */ [Debugger.INS.XOR, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x31 */ [Debugger.INS.XOR, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x32 */ [Debugger.INS.XOR, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -621,7 +621,7 @@ if (DEBUGGER) { /* 0x35 */ [Debugger.INS.XOR, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x36 */ [Debugger.INS.SS, Debugger.TYPE_PREFIX], /* 0x37 */ [Debugger.INS.AAA], - + /* 0x38 */ [Debugger.INS.CMP, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x39 */ [Debugger.INS.CMP, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x3A */ [Debugger.INS.CMP, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -630,7 +630,7 @@ if (DEBUGGER) { /* 0x3D */ [Debugger.INS.CMP, Debugger.TYPE_AX | Debugger.TYPE_IN, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x3E */ [Debugger.INS.DS, Debugger.TYPE_PREFIX], /* 0x3F */ [Debugger.INS.AAS], - + /* 0x40 */ [Debugger.INS.INC, Debugger.TYPE_AX | Debugger.TYPE_BOTH], /* 0x41 */ [Debugger.INS.INC, Debugger.TYPE_CX | Debugger.TYPE_BOTH], /* 0x42 */ [Debugger.INS.INC, Debugger.TYPE_DX | Debugger.TYPE_BOTH], @@ -639,7 +639,7 @@ if (DEBUGGER) { /* 0x45 */ [Debugger.INS.INC, Debugger.TYPE_BP | Debugger.TYPE_BOTH], /* 0x46 */ [Debugger.INS.INC, Debugger.TYPE_SI | Debugger.TYPE_BOTH], /* 0x47 */ [Debugger.INS.INC, Debugger.TYPE_DI | Debugger.TYPE_BOTH], - + /* 0x48 */ [Debugger.INS.DEC, Debugger.TYPE_AX | Debugger.TYPE_BOTH], /* 0x49 */ [Debugger.INS.DEC, Debugger.TYPE_CX | Debugger.TYPE_BOTH], /* 0x4A */ [Debugger.INS.DEC, Debugger.TYPE_DX | Debugger.TYPE_BOTH], @@ -648,7 +648,7 @@ if (DEBUGGER) { /* 0x4D */ [Debugger.INS.DEC, Debugger.TYPE_BP | Debugger.TYPE_BOTH], /* 0x4E */ [Debugger.INS.DEC, Debugger.TYPE_SI | Debugger.TYPE_BOTH], /* 0x4F */ [Debugger.INS.DEC, Debugger.TYPE_DI | Debugger.TYPE_BOTH], - + /* 0x50 */ [Debugger.INS.PUSH, Debugger.TYPE_AX | Debugger.TYPE_IN], /* 0x51 */ [Debugger.INS.PUSH, Debugger.TYPE_CX | Debugger.TYPE_IN], /* 0x52 */ [Debugger.INS.PUSH, Debugger.TYPE_DX | Debugger.TYPE_IN], @@ -657,7 +657,7 @@ if (DEBUGGER) { /* 0x55 */ [Debugger.INS.PUSH, Debugger.TYPE_BP | Debugger.TYPE_IN], /* 0x56 */ [Debugger.INS.PUSH, Debugger.TYPE_SI | Debugger.TYPE_IN], /* 0x57 */ [Debugger.INS.PUSH, Debugger.TYPE_DI | Debugger.TYPE_IN], - + /* 0x58 */ [Debugger.INS.POP, Debugger.TYPE_AX | Debugger.TYPE_OUT], /* 0x59 */ [Debugger.INS.POP, Debugger.TYPE_CX | Debugger.TYPE_OUT], /* 0x5A */ [Debugger.INS.POP, Debugger.TYPE_DX | Debugger.TYPE_OUT], @@ -666,7 +666,7 @@ if (DEBUGGER) { /* 0x5D */ [Debugger.INS.POP, Debugger.TYPE_BP | Debugger.TYPE_OUT], /* 0x5E */ [Debugger.INS.POP, Debugger.TYPE_SI | Debugger.TYPE_OUT], /* 0x5F */ [Debugger.INS.POP, Debugger.TYPE_DI | Debugger.TYPE_OUT], - + /* 0x60 */ [Debugger.INS.PUSHA, Debugger.TYPE_NONE | Debugger.TYPE_286], /* 0x61 */ [Debugger.INS.POPA, Debugger.TYPE_NONE | Debugger.TYPE_286], /* 0x62 */ [Debugger.INS.BOUND, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_286, Debugger.TYPE_MEM | Debugger.TYPE_2WORDD | Debugger.TYPE_IN], @@ -675,7 +675,7 @@ if (DEBUGGER) { /* 0x65 */ [Debugger.INS.GS, Debugger.TYPE_NONE | Debugger.TYPE_386], /* 0x66 */ [Debugger.INS.OSIZE, Debugger.TYPE_NONE | Debugger.TYPE_386], /* 0x67 */ [Debugger.INS.ASIZE, Debugger.TYPE_NONE | Debugger.TYPE_386], - + /* 0x68 */ [Debugger.INS.PUSH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_286], /* 0x69 */ [Debugger.INS.IMUL, Debugger.TYPE_REG | Debugger.TYPE_WORD | Debugger.TYPE_BOTH | Debugger.TYPE_286, Debugger.TYPE_MODRM | Debugger.TYPE_WORDIW | Debugger.TYPE_IN], /* 0x6A */ [Debugger.INS.PUSH, Debugger.TYPE_IMM | Debugger.TYPE_SBYTE | Debugger.TYPE_IN | Debugger.TYPE_286], @@ -684,7 +684,7 @@ if (DEBUGGER) { /* 0x6D */ [Debugger.INS.INS, Debugger.TYPE_ESDI | Debugger.TYPE_VWORD | Debugger.TYPE_OUT | Debugger.TYPE_286, Debugger.TYPE_DX | Debugger.TYPE_IN], /* 0x6E */ [Debugger.INS.OUTS, Debugger.TYPE_DX | Debugger.TYPE_IN | Debugger.TYPE_286, Debugger.TYPE_DSSI | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x6F */ [Debugger.INS.OUTS, Debugger.TYPE_DX | Debugger.TYPE_IN | Debugger.TYPE_286, Debugger.TYPE_DSSI | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0x70 */ [Debugger.INS.JO, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x71 */ [Debugger.INS.JNO, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x72 */ [Debugger.INS.JC, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -693,7 +693,7 @@ if (DEBUGGER) { /* 0x75 */ [Debugger.INS.JNZ, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x76 */ [Debugger.INS.JBE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x77 */ [Debugger.INS.JNBE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], - + /* 0x78 */ [Debugger.INS.JS, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x79 */ [Debugger.INS.JNS, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x7A */ [Debugger.INS.JP, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -702,7 +702,7 @@ if (DEBUGGER) { /* 0x7D */ [Debugger.INS.JGE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x7E */ [Debugger.INS.JLE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x7F */ [Debugger.INS.JG, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], - + /* 0x80 */ [Debugger.INS.GRP1B, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x81 */ [Debugger.INS.GRP1W, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x82 */ [Debugger.INS.GRP1B, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -711,7 +711,7 @@ if (DEBUGGER) { /* 0x85 */ [Debugger.INS.TEST, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x86 */ [Debugger.INS.XCHG, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH], /* 0x87 */ [Debugger.INS.XCHG, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH], - + /* 0x88 */ [Debugger.INS.MOV, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_OUT, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x89 */ [Debugger.INS.MOV, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_OUT, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0x8A */ [Debugger.INS.MOV, Debugger.TYPE_REG | Debugger.TYPE_BYTE | Debugger.TYPE_OUT, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -720,7 +720,7 @@ if (DEBUGGER) { /* 0x8D */ [Debugger.INS.LEA, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_OUT, Debugger.TYPE_MEM | Debugger.TYPE_VWORD], /* 0x8E */ [Debugger.INS.MOV, Debugger.TYPE_SEGREG | Debugger.TYPE_WORD | Debugger.TYPE_OUT, Debugger.TYPE_MODRM | Debugger.TYPE_WORD | Debugger.TYPE_IN], /* 0x8F */ [Debugger.INS.POP, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_OUT], - + /* 0x90 */ [Debugger.INS.NOP], /* 0x91 */ [Debugger.INS.XCHG, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_CX | Debugger.TYPE_BOTH], /* 0x92 */ [Debugger.INS.XCHG, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_DX | Debugger.TYPE_BOTH], @@ -729,7 +729,7 @@ if (DEBUGGER) { /* 0x95 */ [Debugger.INS.XCHG, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_BP | Debugger.TYPE_BOTH], /* 0x96 */ [Debugger.INS.XCHG, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_SI | Debugger.TYPE_BOTH], /* 0x97 */ [Debugger.INS.XCHG, Debugger.TYPE_AX | Debugger.TYPE_BOTH, Debugger.TYPE_DI | Debugger.TYPE_BOTH], - + /* 0x98 */ [Debugger.INS.CBW], /* 0x99 */ [Debugger.INS.CWD], /* 0x9A */ [Debugger.INS.CALL, Debugger.TYPE_IMM | Debugger.TYPE_FARP | Debugger.TYPE_IN], @@ -738,7 +738,7 @@ if (DEBUGGER) { /* 0x9D */ [Debugger.INS.POPF], /* 0x9E */ [Debugger.INS.SAHF], /* 0x9F */ [Debugger.INS.LAHF], - + /* 0xA0 */ [Debugger.INS.MOV, Debugger.TYPE_AL | Debugger.TYPE_OUT, Debugger.TYPE_IMMOFF | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xA1 */ [Debugger.INS.MOV, Debugger.TYPE_AX | Debugger.TYPE_OUT, Debugger.TYPE_IMMOFF | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xA2 */ [Debugger.INS.MOV, Debugger.TYPE_IMMOFF | Debugger.TYPE_BYTE | Debugger.TYPE_OUT, Debugger.TYPE_AL | Debugger.TYPE_IN], @@ -747,7 +747,7 @@ if (DEBUGGER) { /* 0xA5 */ [Debugger.INS.MOVSW, Debugger.TYPE_ESDI | Debugger.TYPE_VWORD | Debugger.TYPE_OUT, Debugger.TYPE_DSSI | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xA6 */ [Debugger.INS.CMPSB, Debugger.TYPE_ESDI | Debugger.TYPE_BYTE | Debugger.TYPE_IN, Debugger.TYPE_DSSI | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xA7 */ [Debugger.INS.CMPSW, Debugger.TYPE_ESDI | Debugger.TYPE_VWORD | Debugger.TYPE_IN, Debugger.TYPE_DSSI | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0xA8 */ [Debugger.INS.TEST, Debugger.TYPE_AL | Debugger.TYPE_IN, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xA9 */ [Debugger.INS.TEST, Debugger.TYPE_AX | Debugger.TYPE_IN, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xAA */ [Debugger.INS.STOSB, Debugger.TYPE_ESDI | Debugger.TYPE_BYTE | Debugger.TYPE_OUT, Debugger.TYPE_AL | Debugger.TYPE_IN], @@ -756,7 +756,7 @@ if (DEBUGGER) { /* 0xAD */ [Debugger.INS.LODSW, Debugger.TYPE_AX | Debugger.TYPE_OUT, Debugger.TYPE_DSSI | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xAE */ [Debugger.INS.SCASB, Debugger.TYPE_AL | Debugger.TYPE_IN, Debugger.TYPE_ESDI | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xAF */ [Debugger.INS.SCASW, Debugger.TYPE_AX | Debugger.TYPE_IN, Debugger.TYPE_ESDI | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0xB0 */ [Debugger.INS.MOV, Debugger.TYPE_AL | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xB1 */ [Debugger.INS.MOV, Debugger.TYPE_CL | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xB2 */ [Debugger.INS.MOV, Debugger.TYPE_DL | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -765,7 +765,7 @@ if (DEBUGGER) { /* 0xB5 */ [Debugger.INS.MOV, Debugger.TYPE_CH | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xB6 */ [Debugger.INS.MOV, Debugger.TYPE_DH | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xB7 */ [Debugger.INS.MOV, Debugger.TYPE_BH | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], - + /* 0xB8 */ [Debugger.INS.MOV, Debugger.TYPE_AX | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xB9 */ [Debugger.INS.MOV, Debugger.TYPE_CX | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xBA */ [Debugger.INS.MOV, Debugger.TYPE_DX | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], @@ -774,7 +774,7 @@ if (DEBUGGER) { /* 0xBD */ [Debugger.INS.MOV, Debugger.TYPE_BP | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xBE */ [Debugger.INS.MOV, Debugger.TYPE_SI | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xBF */ [Debugger.INS.MOV, Debugger.TYPE_DI | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0xC0 */ [Debugger.INS.GRP2B, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH | Debugger.TYPE_186, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xC1 */ [Debugger.INS.GRP2W, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH | Debugger.TYPE_186, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xC2 */ [Debugger.INS.RET, Debugger.TYPE_IMM | Debugger.TYPE_WORD | Debugger.TYPE_IN], @@ -783,7 +783,7 @@ if (DEBUGGER) { /* 0xC5 */ [Debugger.INS.LDS, Debugger.TYPE_REG | Debugger.TYPE_VWORD | Debugger.TYPE_OUT, Debugger.TYPE_MEM | Debugger.TYPE_FARP | Debugger.TYPE_IN], /* 0xC6 */ [Debugger.INS.MOV, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xC7 */ [Debugger.INS.MOV, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0xC8 */ [Debugger.INS.ENTER, Debugger.TYPE_IMM | Debugger.TYPE_WORD | Debugger.TYPE_IN | Debugger.TYPE_286, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xC9 */ [Debugger.INS.LEAVE, Debugger.TYPE_NONE | Debugger.TYPE_286], /* 0xCA */ [Debugger.INS.RETF, Debugger.TYPE_IMM | Debugger.TYPE_WORD | Debugger.TYPE_IN], @@ -792,7 +792,7 @@ if (DEBUGGER) { /* 0xCD */ [Debugger.INS.INT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xCE */ [Debugger.INS.INTO], /* 0xCF */ [Debugger.INS.IRET], - + /* 0xD0 */ [Debugger.INS.GRP2B1, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_ONE | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xD1 */ [Debugger.INS.GRP2W1, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH, Debugger.TYPE_ONE | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xD2 */ [Debugger.INS.GRP2BC, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH, Debugger.TYPE_IMPREG | Debugger.TYPE_CL | Debugger.TYPE_IN], @@ -801,7 +801,7 @@ if (DEBUGGER) { /* 0xD5 */ [Debugger.INS.AAD, Debugger.TYPE_IMM | Debugger.TYPE_BYTE], /* 0xD6 */ [Debugger.INS.GBP], /* 0xD7 */ [Debugger.INS.XLAT], - + /* 0xD8 */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xD9 */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xDA */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], @@ -810,7 +810,7 @@ if (DEBUGGER) { /* 0xDD */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xDE */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xDF */ [Debugger.INS.ESC, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_IN], - + /* 0xE0 */ [Debugger.INS.LOOPNZ, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xE1 */ [Debugger.INS.LOOPZ, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xE2 */ [Debugger.INS.LOOP, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -819,7 +819,7 @@ if (DEBUGGER) { /* 0xE5 */ [Debugger.INS.IN, Debugger.TYPE_AX | Debugger.TYPE_OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0xE6 */ [Debugger.INS.OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN, Debugger.TYPE_AL | Debugger.TYPE_IN], /* 0xE7 */ [Debugger.INS.OUT, Debugger.TYPE_IMM | Debugger.TYPE_BYTE | Debugger.TYPE_IN, Debugger.TYPE_AX | Debugger.TYPE_IN], - + /* 0xE8 */ [Debugger.INS.CALL, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xE9 */ [Debugger.INS.JMP, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN], /* 0xEA */ [Debugger.INS.JMP, Debugger.TYPE_IMM | Debugger.TYPE_FARP | Debugger.TYPE_IN], @@ -828,7 +828,7 @@ if (DEBUGGER) { /* 0xED */ [Debugger.INS.IN, Debugger.TYPE_AX | Debugger.TYPE_OUT, Debugger.TYPE_DX | Debugger.TYPE_IN], /* 0xEE */ [Debugger.INS.OUT, Debugger.TYPE_DX | Debugger.TYPE_IN, Debugger.TYPE_AL | Debugger.TYPE_IN], /* 0xEF */ [Debugger.INS.OUT, Debugger.TYPE_DX | Debugger.TYPE_IN, Debugger.TYPE_AX | Debugger.TYPE_IN], - + /* 0xF0 */ [Debugger.INS.LOCK, Debugger.TYPE_PREFIX], /* 0xF1 */ [Debugger.INS.NONE], /* 0xF2 */ [Debugger.INS.REPNZ, Debugger.TYPE_PREFIX], @@ -837,7 +837,7 @@ if (DEBUGGER) { /* 0xF5 */ [Debugger.INS.CMC], /* 0xF6 */ [Debugger.INS.GRP3B, Debugger.TYPE_MODRM | Debugger.TYPE_BYTE | Debugger.TYPE_BOTH], /* 0xF7 */ [Debugger.INS.GRP3W, Debugger.TYPE_MODRM | Debugger.TYPE_VWORD | Debugger.TYPE_BOTH], - + /* 0xF8 */ [Debugger.INS.CLC], /* 0xF9 */ [Debugger.INS.STC], /* 0xFA */ [Debugger.INS.CLI], @@ -1023,21 +1023,21 @@ if (DEBUGGER) { Debugger.aOpDescUndefined ] ]; - + /* * Information regarding interrupts of interest */ Debugger.INT_DOS = 0x21; - + Debugger.INT_FUNCS = { 0x13: { 0x00: "disk reset", 0x01: "get status", - 0x02: "read drive DL, cyl CH, head DH, sec CL, AL total", - 0x03: "write drive DL, cyl CH, head DH, sec CL, AL total", - 0x04: "verify drive DL, cyl CH, head DH, sec CL, AL total", - 0x05: "format drive DL", - 0x08: "read drive DL parameters", + 0x02: "read drive DL CH:DH:CL:AL into ES:BX", + 0x03: "write drive DL CH:DH:CL:AL from ES:BX", + 0x04: "verify drive DL CH:DH:CL:AL", + 0x05: "format drive DL using ES:BX", + 0x08: "read drive DL parameters into ES:DI", 0x15: "get drive DL DASD type", 0x16: "get drive DL change line status", 0x17: "set drive DL DASD type", @@ -1070,7 +1070,7 @@ if (DEBUGGER) { 0x09: "write $-terminated string DS:DX to stdout", 0x0A: "buffered input (ds:dx)", // byte 0 is maximum chars, byte 1 is number of previous characters, byte 2 is number of characters read 0x0B: "get stdin status", - 0x0C: "flush buffer and read stdin", // AL is a function # (0x01, 0x06, 0x07, 0x08, or 0x0A) + 0x0C: "flush buffer and read stdin", // AL is a function # (0x01, 0x06, 0x07, 0x08, or 0x0A) 0x0D: "disk reset", 0x0E: "select default drive DL", // returns # of available drives in AL 0x0F: "open file using fcb DS:DX", // DS:DX -> unopened File Control Block @@ -1152,7 +1152,7 @@ if (DEBUGGER) { /** * initBus(bus, cpu, dbg) - * + * * @this {Debugger} * @param {Computer} cmp * @param {Bus} bus @@ -1167,30 +1167,30 @@ if (DEBUGGER) { this.fdc = cmp.getComponentByType("FDC"); this.hdc = cmp.getComponentByType("HDC"); if (MAXDEBUG) this.chipset = cmp.getComponentByType("ChipSet"); - + this.aaOpDescs = Debugger.aaOpDescs; if (this.cpu.model >= X86.MODEL_80186) { this.aaOpDescs = Debugger.aaOpDescs.slice(); this.aaOpDescs[0x0F] = Debugger.aOpDescUndefined; if (this.cpu.model >= X86.MODEL_80286) { this.aaOpDescs[0x0F] = Debugger.aOpDesc0F; - } + } } - + this.cpu.addIntNotify(Debugger.INT_DOS, this, this.intDOSCall); - + this.setReady(); - + if (this.sInitCommands) { var a = this.parseCommand(this.sInitCommands); delete this.sInitCommands; for (var s in a) this.doCommand(a[s]); } }; - + /** * setBinding(sHTMLClass, sHTMLType, sBinding, control) - * + * * @this {Debugger} * @param {string|null} sHTMLClass is the class of the HTML control (eg, "input", "output") * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") @@ -1221,7 +1221,7 @@ if (DEBUGGER) { * The following preventDefault() hack seems to be necessary only for IE; IE insists on giving * focus to the debugEnter control after we've processed the Enter key above (keyCode == 13) * for the debugInput control. This hack allows focus to remain with debugInput. - * + * * NOTE: In IE9, I was able to resolve this problem (or so I thought) by forcing focus back to the * debugInput control (eg, "control.focus()") but that wasn't working in IE10. Here's hoping this * also works in IE9 until I have a chance to test it. @@ -1230,7 +1230,7 @@ if (DEBUGGER) { } }; return true; - + case "debugEnter": this.bindings[sBinding] = control; web.onClickRepeat( @@ -1240,7 +1240,7 @@ if (DEBUGGER) { if (dbg.controlDebug) { var s = dbg.controlDebug.value; /* - * NOTE: If we wanted to use the debugEnter button to repeatedly enter the same command, it + * NOTE: If we wanted to use the debugEnter button to repeatedly enter the same command, it * used to be the case that we couldn't clear the command string. That's apparently no longer true. */ dbg.controlDebug.value = ""; @@ -1253,7 +1253,7 @@ if (DEBUGGER) { } ); return true; - + case "step": this.bindings[sBinding] = control; web.onClickRepeat( @@ -1270,26 +1270,26 @@ if (DEBUGGER) { } ); return true; - + default: break; } return false; }; - + /** * setFocus() - * + * * @this {Debugger} */ Debugger.prototype.setFocus = function() { if (this.controlDebug) this.controlDebug.focus(); }; - + /** * messageInit(o, sEnable, fDebugger) - * + * * @this {Debugger} * @param {Object} o * @param {string} [sEnable] contains zero or more message categories to enable, separated by '|' or ';' @@ -1310,10 +1310,10 @@ if (DEBUGGER) { if (this.bitsMessageEnabled === undefined) this.bitsMessageEnabled = 0; this.bitsMessageEnabled |= bitsEnable; }; - + /** * messageDump(bitMessage, fnDumper) - * + * * @this {Debugger} * @param {number} bitMessage is one Debugger MESSAGE_* category flag * @param {function(string)} fnDumper is a function the Debugger can use to dump data for that category @@ -1329,13 +1329,13 @@ if (DEBUGGER) { } return false; }; - + /** * messageEnabled(bitsMessage) * * NOTE: If the caller specifies multiple MESSAGE category flags, then ALL the corresponding flags * in the Debugger's bitsMessageEnabled variable must be enabled as well, else the result will be false. - * + * * @this {Debugger} * @param {number} bitsMessage is one or more Debugger MESSAGE_* category flag(s) * @return {boolean} true if message category is enabled, false if not @@ -1344,10 +1344,10 @@ if (DEBUGGER) { { return ((this.bitsMessageEnabled & bitsMessage) === bitsMessage); }; - + /** * updateRegValues() - * + * * @this {Debugger} */ Debugger.prototype.updateRegValues = function() { @@ -1375,7 +1375,7 @@ if (DEBUGGER) { this.aRegValues[asRegs[19]] = str.toHexWord(cpu.segDS.sel); this.aRegValues[asRegs[20]] = str.toHexWord(cpu.regIP); }; - + /** * messageInt(nInt, addr) * @@ -1385,14 +1385,19 @@ if (DEBUGGER) { */ Debugger.prototype.messageInt = function(nInt, addr) { - var AH = this.cpu.regAX >> 8; - var aFuncs = Debugger.INT_FUNCS[nInt]; - var sFunc = (aFuncs && aFuncs[AH]) || ""; - if (sFunc) { - this.updateRegValues(); - sFunc = " " + str.replaceArray(this.aRegValues, sFunc); + /* + * TODO: Filtering of interrupt numbers below should be user-definable; this is very quick-and-dirty. + */ + if (nInt < 0x20 && nInt != 0x10 && nInt != 0x15 && nInt != 0x16 && nInt != 0x1C) { + var AH = this.cpu.regAX >> 8; + var aFuncs = Debugger.INT_FUNCS[nInt]; + var sFunc = (aFuncs && aFuncs[AH]) || ""; + if (sFunc) { + this.updateRegValues(); + sFunc = " " + str.replaceArray(this.aRegValues, sFunc); + } + this.message("INT 0x" + str.toHexByte(nInt) + ": AH=" + str.toHexByte(AH) + " at " + str.toHexAddr(addr - this.cpu.segCS.base, this.cpu.segCS.sel) + sFunc); } - this.message("INT 0x" + str.toHexByte(nInt) + ": AH=" + str.toHexByte(AH) + " at " + str.toHexAddr(addr - this.cpu.segCS.base, this.cpu.segCS.sel) + sFunc); }; /** @@ -1413,7 +1418,7 @@ if (DEBUGGER) { * messageMem(component, addr, fWrite, addrFrom, name, bitsMessage) * * NOTE: Not currently used - * + * * @this {Debugger} * @param {Component} component * @param {number} addr @@ -1432,10 +1437,10 @@ if (DEBUGGER) { } }; */ - + /** * messagePort(component, port, bOut, addrFrom, name, bitsMessage, bIn) - * + * * @this {Debugger} * @param {Component} component * @param {number} port @@ -1458,17 +1463,17 @@ if (DEBUGGER) { this.message(component.idComponent + "." + (bOut != null? "outPort" : "inPort") + "(0x" + str.toHexWord(port) + "," + (name? name : "unknown") + (bOut != null? ",0x" + str.toHexByte(bOut) : "") + ")" + (bIn != null? (": 0x" + str.toHexByte(bIn)) : "") + (addrFrom != null? (" at " + str.toHexAddr(addrFrom, segFrom)) : "")); } }; - + /** * message(sMessage) - * + * * @this {Debugger} * @param {string} sMessage is any caller-defined message string */ Debugger.prototype.message = function(sMessage) { this.println(sMessage); // + " (" + this.cpu.getCycles() + " cycles)" - + if (this.cpu) { if (this.bitsMessageEnabled & Debugger.MESSAGES.MESSAGE_HALT.BIT) { this.cpu.haltCPU(); @@ -1477,17 +1482,17 @@ if (DEBUGGER) { * We have no idea what the frequency of println() calls might be; all we know is that they easily * screw up the CPU's careful assumptions about cycles per burst. So we need call yieldCPU() after * every message, to effectively end the current burst and start fresh. - * + * * TODO: See CPU.calcStartTime() for a discussion of why we might want to call yieldCPU() *before* * we display the message. */ this.cpu.yieldCPU(); } }; - + /** * traceInit() - * + * * @this {Debugger} */ Debugger.prototype.traceInit = function() @@ -1501,10 +1506,10 @@ if (DEBUGGER) { this.aTraceBuffer = []; // we now defer TRACE_LIMIT allocation until the first traceLog() call } }; - + /** * traceLog(prop, dst, src, flagsIn, flagsOut, result) - * + * * @this {Debugger} * @param {string} prop * @param {number} dst @@ -1525,7 +1530,7 @@ if (DEBUGGER) { if (this.iTraceBuffer >= this.aTraceBuffer.length) { /* * Instead of wrapping the buffer, we're going to turn all tracing off. - * + * * this.iTraceBuffer = 0; */ for (prop in this.traceEnabled) { @@ -1536,10 +1541,10 @@ if (DEBUGGER) { } } }; - + /** * intDOSCall(addr) - * + * * @this {Debugger} * @param {number} addr * @return {boolean} true to proceed with the INT 0x21 software interrupt, false to skip (but we NEVER skip) @@ -1549,10 +1554,10 @@ if (DEBUGGER) { if (this.messageEnabled(this.MESSAGE_DOS)) this.messageInt(Debugger.INT_DOS, addr); return true; }; - + /** * init() - * + * * @this {Debugger} */ Debugger.prototype.init = function() @@ -1562,11 +1567,11 @@ if (DEBUGGER) { /** * initHistory() - * + * * This function is intended to be called by the constructor, reset(), addBreakpoint(), findBreakpoint() * and any other function that changes the checksEnabled() criteria used to decide whether checkInstruction() * should be called. - * + * * That is, if the history arrays need to be allocated and haven't already been allocated, then allocate them, * and if the arrays are no longer needed, then deallocate them. * @@ -1602,7 +1607,7 @@ if (DEBUGGER) { /** * runCPU(fOnClick) - * + * * @this {Debugger} * @param {boolean} [fOnClick] is true if called from a click handler that might have stolen focus * @return {boolean} true if run request successful, false if not @@ -1613,10 +1618,10 @@ if (DEBUGGER) { this.cpu.runCPU(fOnClick); return true; }; - + /** * stepCPU(nCycles, fRegs, fUpdateCPU) - * + * * @this {Debugger} * @param {number} nCycles (0 for one instruction without checking breakpoints) * @param {boolean} [fRegs] is true to display registers after step (default is false) @@ -1626,7 +1631,7 @@ if (DEBUGGER) { Debugger.prototype.stepCPU = function(nCycles, fRegs, fUpdateCPU) { if (!this.isCPUAvail()) return false; - + this.nCycles = 0; do { if (!nCycles) { @@ -1651,21 +1656,21 @@ if (DEBUGGER) { this.cpu.setError(e.message || e); } } while (this.cpu.opFlags & X86.OPFLAG.PREFIXES); - + /* * Because we called cpu.stepCPU() and not cpu.runCPU(), we must nudge the cpu's update code, * and then update our own state. Normally, the only time fUpdateCPU will be false is when doStep() - * is calling us in a loop, in which case it will perform its own updateCPU() when it's done. + * is calling us in a loop, in which case it will perform its own updateCPU() when it's done. */ if (fUpdateCPU !== false) this.cpu.updateCPU(); - + this.updateStatus(fRegs || false, false); return (this.nCycles > 0); }; - + /** * haltCPU() - * + * * @this {Debugger} */ Debugger.prototype.haltCPU = function() @@ -1675,10 +1680,10 @@ if (DEBUGGER) { */ this.cpu.haltCPU(); }; - + /** * updateStatus(fRegs, fCompact) - * + * * @this {Debugger} * @param {boolean} [fRegs] (default is true) * @param {boolean} [fCompact] (default is true) @@ -1692,7 +1697,7 @@ if (DEBUGGER) { /* * this.fProcStep used to be a simple boolean, but now it's 0 (or undefined) * if inactive, 1 if stepping over an instruction without a register dump, or 2 - * if stepping over an instruction with a register dump. + * if stepping over an instruction with a register dump. */ if (!fRegs || this.fProcStep == 1) this.doUnassemble(); @@ -1700,12 +1705,12 @@ if (DEBUGGER) { this.doRegisters(null, fCompact); } }; - + /** * isCPUAvail() * * Make sure the CPU is ready (finished initializing), not busy (already running), and not in an error state. - * + * * @this {Debugger} * @return {boolean} */ @@ -1721,7 +1726,7 @@ if (DEBUGGER) { return false; return !this.cpu.isError(); }; - + /** * powerUp(data, fRepower) * @@ -1746,10 +1751,10 @@ if (DEBUGGER) { } return true; }; - + /** * powerDown(fSave, fShutdown) - * + * * @this {Debugger} * @param {boolean} fSave * @param {boolean} [fShutdown] @@ -1760,12 +1765,12 @@ if (DEBUGGER) { if (fShutdown) this.println(fSave? "suspending" : "shutting down"); return fSave && this.save? this.save() : true; }; - + /** * reset(fQuiet) * * This is a notification handler, called by the Computer, to inform us of a reset. - * + * * @this {Debugger} * @param {boolean} fQuiet (true only when called from our own powerUp handler) */ @@ -1790,7 +1795,7 @@ if (DEBUGGER) { * save() * * This implements (very rudimentary) save support for the Debugger component. - * + * * @this {Debugger} * @return {Object} */ @@ -1802,12 +1807,12 @@ if (DEBUGGER) { state.set(2, [this.prevCmd, this.fAssemble, this.bitsMessageEnabled]); return state.data(); }; - + /** * restore(data) * * This implements (very rudimentary) restore support for the Debugger component. - * + * * @this {Debugger} * @param {Object} data * @return {boolean} true if successful, false if failure @@ -1826,7 +1831,7 @@ if (DEBUGGER) { * at least in situations where I've changed the initial state, if I want to diagnose something. * Perhaps I should save/restore both the initial and current bitsMessageEnabled, and if the initial * values don't agree, then leave the current value alone. - * + * * But, it's much easier to just leave bitsMessageEnabled alone whenever it already contains set bits. */ this.bitsMessageEnabled = data[i][2]; @@ -1834,12 +1839,12 @@ if (DEBUGGER) { } return true; }; - + /** * start(ms, nCycles) * * This is a notification handler, called by the Computer, to inform us the CPU has started. - * + * * @this {Debugger} * @param {number} ms * @param {number} nCycles @@ -1851,12 +1856,12 @@ if (DEBUGGER) { this.msStart = ms; this.nCyclesStart = nCycles; }; - + /** * stop(ms, nCycles) * * This is a notification handler, called by the Computer, to inform us the CPU has now stopped. - * + * * @this {Debugger} * @param {number} ms * @param {number} nCycles @@ -1906,16 +1911,16 @@ if (DEBUGGER) { this.clearTempBreakpoint(this.cpu.regEIP); } }; - + /** * checksEnabled(fBreak) * * This "check" function is called by the CPU; we indicate whether or not every instruction needs to be checked. - * + * * Originally, this returned true even when there were only read and/or write breakpoints, but those breakpoints * no longer require the intervention of checkInstruction(); the Bus component automatically swaps in/out appropriate * functions to deal with those breakpoints in the appropriate memory blocks. So I've simplified the test below. - * + * * @this {Debugger} * @param {boolean} [fBreak] is true if the caller really wants to break (default is false) * @return {boolean} true if every instruction needs to pass through checkInstruction(), false if not @@ -1924,13 +1929,13 @@ if (DEBUGGER) { { return ((DEBUG && !fBreak)? true : (this.aBreakExec.length > 1 || this.messageEnabled(this.MESSAGE_INT) /* || this.aBreakRead.length > 1 || this.aBreakWrite.length > 1 */)); }; - + /** * checkInstruction(addr, fSkipBP) * * This "check" function is called by the CPU to inform us about the next instruction to be executed, * giving us an opportunity to look for "exec" breakpoints and update opcode frequencies and instruction history. - * + * * @this {Debugger} * @param {number} addr * @param {boolean} [fSkipBP] is true to skip breakpoint check @@ -1943,11 +1948,11 @@ if (DEBUGGER) { * this isn't intended to be complete, just a spot-check. */ Component.assert(!(this.cpu.regAX & ~0xffff) && !(this.cpu.regBX & ~0xffff) && !(this.cpu.regCX & ~0xffff) && !(this.cpu.regDX & ~0xffff), "register out of bounds"); - + if (!fSkipBP && this.checkBreakpoint(addr, this.aBreakExec)) { return true; } - + /* * The rest of the instruction tracking logic can only be performed if initHistory() has allocated * the necessary data structures; note that there is no explicit UI for enabling/disabling history, @@ -1955,17 +1960,17 @@ if (DEBUGGER) { * checkInstruction() -- well, OK, and a few other things now, like enabling MESSAGE_INT messages. */ if (this.aaOpcodeCounts.length) { - + this.cInstructions++; var bOpcode = this.bus.getByteDirect(addr); this.aaOpcodeCounts[bOpcode][1]++; - + /* * This is a good example of what NOT to do in a high-frequency function, and defeats * the entire purpose of preallocating and preinitializing the history array in initHistory(): - * + * * this.aOpcodeHistory[this.iOpcodeHistory] = this.newAddr(this.cpu.regIP, this.cpu.segCS.sel, addr); - * + * * As the name implies, newAddr() returns a new "Addr" (Array) object every time it's called. */ var a = this.aOpcodeHistory[this.iOpcodeHistory]; @@ -1976,13 +1981,13 @@ if (DEBUGGER) { } return false; }; - + /** * checkMemoryRead(addr) * * This "check" function is called by a Memory block to inform us that a memory read occurred, giving us an * opportunity to track the read if we want, and look for a matching "read" breakpoint, if any. - * + * * @this {Debugger} * @param {number} addr * @return {boolean} true if breakpoint hit, false if not @@ -1995,13 +2000,13 @@ if (DEBUGGER) { } return false; }; - + /** * checkMemoryWrite(addr) * * This "check" function is called by a Memory block to inform us that a memory write occurred, giving us an * opportunity to track the write if we want, and look for a matching "write" breakpoint, if any. - * + * * @this {Debugger} * @param {number} addr * @return {boolean} true if breakpoint hit, false if not @@ -2054,15 +2059,15 @@ if (DEBUGGER) { this.cpu.haltCPU(true); return true; }; - + /** * getSegment(sel) - * + * * If the selector matches that of any of the CPU segment registers, then return the CPU's segment * register, instead of creating our own dummy segment register. This makes it possible for us to * see what the CPU is seeing at certain critical junctures, such as after an LMSW instruction has * switched the processor from real to protected mode. - * + * * @param {number} sel * @return {X86Seg} seg */ @@ -2079,7 +2084,7 @@ if (DEBUGGER) { seg.load(sel, true); return seg; }; - + /** * getAddr(aAddr, fWrite, cb) * @@ -2115,7 +2120,7 @@ if (DEBUGGER) { /** * getByte(aAddr, inc) - * + * * getByte() should be used for all Debugger memory reads (eg, doDump, doUnassemble), to ensure * all notification handlers are bypassed for physical addresses; for segmented addresses, we must * use the CPU's X86Seg load() logic, but we don't call the CPU's getSOByte() or getByte() functions, @@ -2137,10 +2142,10 @@ if (DEBUGGER) { } return b; }; - + /** * getWord(aAddr, inc) - * + * * @this {Debugger} * @param {Array} aAddr * @param {number} [inc] @@ -2157,10 +2162,10 @@ if (DEBUGGER) { } return w; }; - + /** * setByte(aAddr, b, inc) - * + * * setByte() should be used for all Debugger memory writes (eg, doAssemble, doEdit), to insure * all memory notification handlers are bypassed; in addition, we want the Debugger to be able to * change the contents of the simulated ROM images. @@ -2179,10 +2184,10 @@ if (DEBUGGER) { this.cpu.updateCPU(); } }; - + /** * setWord(aAddr, w, inc) - * + * * @this {Debugger} * @param {Array} aAddr * @param {number} w @@ -2197,10 +2202,10 @@ if (DEBUGGER) { this.cpu.updateCPU(); } }; - + /** * hexAddr(aAddr) - * + * * @this {Debugger} * @param {Array} aAddr containing [off, seg] * @return {string} the hex representation of the address @@ -2209,10 +2214,10 @@ if (DEBUGGER) { { return aAddr[1] == null? ("%" + str.toHex(aAddr[2])) : str.toHexAddr(aAddr[0], aAddr[1]); }; - + /** * incAddr(aAddr, inc) - * + * * @this {Debugger} * @param {Array} aAddr containing [off, seg, addr] * @param {number|undefined} inc contains value to increment by (default is 1) @@ -2234,24 +2239,24 @@ if (DEBUGGER) { } } }; - + /** * newAddr(off, seg, addr) - * + * * @this {Debugger} * @param {number} off * @param {number} seg - * @param {number} [addr] is the physical address, if known + * @param {number} [addr] is the physical address, if known * @return {Array} containing [off, seg, addr] */ Debugger.prototype.newAddr = function(off, seg, addr) { return [off, seg, addr]; }; - + /** * clearBreakpoints() - * + * * @this {Debugger} */ Debugger.prototype.clearBreakpoints = function() @@ -2271,10 +2276,10 @@ if (DEBUGGER) { } this.aBreakWrite = ["write"]; }; - + /** * addBreakpoint(aBreak, aAddr, fTemp) - * + * * @this {Debugger} * @param {Array} aBreak * @param {Array} aAddr @@ -2302,10 +2307,10 @@ if (DEBUGGER) { } return false; }; - + /** * findBreakpoint(aBreak, aAddr, fRemove) - * + * * @this {Debugger} * @param {Array} aBreak * @param {Array} aAddr @@ -2335,13 +2340,13 @@ if (DEBUGGER) { } return fFound; }; - + /** * listBreakpoints(aBreak) - * + * * TODO: We may need to start listing the physical addresses of breakpoints, because * segmented address can be ambiguous. - * + * * @this {Debugger} * @param {Array} aBreak * @return {number} of breakpoints listed, 0 if none @@ -2356,11 +2361,11 @@ if (DEBUGGER) { /** * redoBreakpoints() - * + * * This function is for the Memory component: whenever the Bus allocates a new Memory block, it calls * the block's setDebugInfo() method, which clears the memory block's breakpoint counts. setDebugInfo(), * in turn, must call this function to re-apply any existing breakpoints to that block. - * + * * This ensures that, even if a memory region is remapped (which creates new Memory blocks in the process), * any breakpoints that were previously applied to that region will still work. * @@ -2386,7 +2391,7 @@ if (DEBUGGER) { /** * setTempBreakpoint(aAddr) - * + * * @this {Debugger} * @param {Array} aAddr of new temp breakpoint */ @@ -2394,10 +2399,10 @@ if (DEBUGGER) { { this.addBreakpoint(this.aBreakExec, aAddr, true); }; - + /** * clearTempBreakpoint(addr) - * + * * @this {Debugger} * @param {number|undefined} [addr] clear all temp breakpoints if no address specified */ @@ -2416,10 +2421,10 @@ if (DEBUGGER) { } } }; - + /** * checkBreakpoint(addr, aBreak, fTemp) - * + * * @this {Debugger} * @param {number} addr * @param {Array} aBreak @@ -2433,16 +2438,16 @@ if (DEBUGGER) { * or history data (see checkInstruction), since we might not actually execute the current instruction. */ var fBreak = false; - + /* * Map addresses in the top 64Kb (at the top of the 16Mb range) to the top of the 1Mb range. - * + * * The fact that those two 64Kb regions are aliases of each other on an 80286 is a pain in the BUTT, * because any CS-based breakpoint you set immediately after a CPU reset will have a physical address * in the top 16Mb, yet after the first inter-segment JMP, you will be running in the first 1Mb. */ if ((addr & 0xFF0000) == 0xFF0000) addr &= 0x0FFFFF; - + for (var i = 1; i < aBreak.length; i++) { var aAddrBreak = aBreak[i]; if (addr == this.getAddr(aAddrBreak)) { @@ -2457,10 +2462,10 @@ if (DEBUGGER) { } return fBreak; }; - + /** * getInstruction(aAddr, sComment, nSequence) - * + * * @this {Debugger} * @param {Array} aAddr (updated to next instruction) * @param {string} [sComment] is an associated comment @@ -2470,12 +2475,12 @@ if (DEBUGGER) { Debugger.prototype.getInstruction = function(aAddr, sComment, nSequence) { var aAddrIns = this.newAddr(aAddr[0], aAddr[1], aAddr[2]); - + var bOpcode = this.getByte(aAddr, 1); var aOpDesc = this.aaOpDescs[bOpcode]; var iIns = aOpDesc[0]; var bModRM = -1; - + if (iIns == Debugger.INS.OP0F) { var b = this.getByte(aAddr, 1); aOpDesc = Debugger.aaOp0FDescs[b] || Debugger.aOpDescUndefined; @@ -2487,7 +2492,7 @@ if (DEBUGGER) { bModRM = this.getByte(aAddr, 1); aOpDesc = Debugger.aaGrpDescs[iIns - Debugger.asIns.length][(bModRM >> 3) & 0x7]; } - + var cOperands = 2; var sOperands = ""; if (bOpcode >= X86.OPCODE.MOVSB && bOpcode <= X86.OPCODE.CMPSW || bOpcode >= X86.OPCODE.STOSB && bOpcode <= X86.OPCODE.SCASW) { @@ -2553,7 +2558,7 @@ if (DEBUGGER) { if (sOperands.length > 0) sOperands += ","; sOperands += sOperand; } - + var sLine = this.hexAddr(aAddrIns) + " "; var sBytes = ""; do { @@ -2562,7 +2567,7 @@ if (DEBUGGER) { sLine += (sBytes + " ").substr(0, 14); sLine += (Debugger.asIns[aOpDesc[0]] + " ").substr(0, 8); if (sOperands) sLine += " " + sOperands; - + if (sComment) { sLine += " "; sLine = sLine.substr(0, 50); @@ -2576,10 +2581,10 @@ if (DEBUGGER) { } return sLine; }; - + /** * getImmediateOperand(type, aAddr) - * + * * @this {Debugger} * @param {number} type * @param {Array} aAddr @@ -2615,10 +2620,10 @@ if (DEBUGGER) { } return sOperand; }; - + /** * getRegOperand(bReg, type, aAddr) - * + * * @this {Debugger} * @param {number} bReg * @param {number} type @@ -2633,7 +2638,7 @@ if (DEBUGGER) { bReg += 8; return Debugger.asRegs[bReg]; }; - + /** * getModRMOperand(bModRM, type, aAddr) * @@ -2678,10 +2683,10 @@ if (DEBUGGER) { } return sOperand; }; - + /** * parseInstruction(sOp, sOperand, addr) - * + * * This generally requires an exact match of both the operation code (sOp) and mode operand * (sOperand) against the aOps[] and aOpMods[] arrays, respectively; however, the regular * expression built from aOpMods and stored in regexOpModes does relax the matching criteria @@ -2731,10 +2736,10 @@ if (DEBUGGER) { this.println("not supported yet"); return aOpBytes; }; - + /** * getFlagStr(sFlag) - * + * * @this {Debugger} * @param {string} sFlag * @return {string} value of flag @@ -2807,7 +2812,7 @@ if (DEBUGGER) { /** * getRegStr(fProt) - * + * * @this {Debugger} * @param {boolean} [fProt] * @return {string} @@ -2839,10 +2844,10 @@ if (DEBUGGER) { } return s; }; - + /** * parseAddr(sAddr, type) - * + * * As discussed above, the format of aAddr variables is [off, seg, addr]; they represent a segmented * address (seg:off) when seg is defined or a physical address (addr) when seg is undefined (or null). * @@ -2859,7 +2864,7 @@ if (DEBUGGER) { * etc. The Debugger's low-level get/set memory functions verify all getAddr() results, but even if an * invalid address is passed through to the Bus memory interfaces, the address will simply be masked with * Bus.addrLimit; in the case of -1, that will generally refer to the last byte of physical address space. - * + * * @this {Debugger} * @param {string|undefined} sAddr * @param {number|undefined} type is the address segment type, in case sAddr doesn't specify a segment @@ -2870,18 +2875,18 @@ if (DEBUGGER) { var aAddrNext = (type == Debugger.ADDR_DATA? this.aAddrNextData : this.aAddrNextCode); var off = aAddrNext[0], seg = aAddrNext[1], addr = aAddrNext[2]; - + if (sAddr !== undefined) { - + if (sAddr.charAt(0) == '%') { sAddr = sAddr.substr(1); seg = null; addr = 0; } - + var aAddr = this.findSymbolAddr(sAddr); if (aAddr && aAddr.length) return aAddr; - + var iColon = sAddr.indexOf(":"); if (iColon < 0) { if (seg != null) { @@ -2899,10 +2904,10 @@ if (DEBUGGER) { } return [off, seg, addr]; }; - + /** * parseValue(sValue, sName) - * + * * @this {Debugger} * @param {string|undefined} sValue * @param {string} [sName] is the name of the value, if any @@ -2968,7 +2973,7 @@ if (DEBUGGER) { } return value; }; - + /** * addSymbols(addr, size, aSymbols) * @@ -2982,9 +2987,9 @@ if (DEBUGGER) { * "o": the offset of the symbol within the associated address space * "l": the original-case version of the symbol, present only if it wasn't originally upper-case * "a": annotation for the specified offset; eg, the original assembly language, with optional comment - * + * * To that list of properties, we also add: - * + * * "p": the physical address (calculated whenever both "s" and "o" properties are defined) * * Note that values for any "v", "b", "s" and "o" properties are unquoted decimal values, and the values @@ -3039,7 +3044,7 @@ if (DEBUGGER) { * it's quite likely that the MAP file already ordered all its symbols in offset order, but since they're * hand-edited files, we can't assume that. This insures that findSymbolAtAddr()'s binarySearch() will operate * properly. - * + * * @this {Debugger} * @param {number} addr is the physical address of the region where the given symbols are located * @param {number} size is the size of the region, in bytes @@ -3072,13 +3077,13 @@ if (DEBUGGER) { } this.aSymbolTable.push([addr, size, aSymbols, aOffsetPairs]); }; - + /** * dumpSymbols() * * TODO: Add "numerical" and "alphabetical" dump options. This is simply dumping them in whatever * order they appeared in the original MAP file. - * + * * @this {Debugger} */ Debugger.prototype.dumpSymbols = function() @@ -3100,12 +3105,12 @@ if (DEBUGGER) { } } }; - + /** * findSymbolAddr(sSymbol) * * Search aSymbolTable for sSymbol, and if found, return an aAddr (using the same format as parseAddr()) - * + * * @this {Debugger} * @param {string} sSymbol * @return {Array|null} a valid aAddr if a valid symbol, an empty aAddr if an unknown symbol, or null if not a symbol @@ -3146,15 +3151,15 @@ if (DEBUGGER) { } return aAddr; }; - + /** * findSymbolAtAddr(aAddr, fNearest) * * Search aSymbolTable for aAddr, and return an Array for the corresponding symbol (empty if not found). - * + * * If fNearest is true, and no exact match was found, then the Array returned will contain TWO sets of * entries: [0]-[3] will refer to closest preceding symbol, and [4]-[7] will refer to the closest subsequent symbol. - * + * * @this {Debugger} * @param {Array} aAddr * @param {boolean} [fNearest] @@ -3188,15 +3193,15 @@ if (DEBUGGER) { } return aSymbol; }; - + /** * returnSymbol(iTable, iOffset, aSymbol) - * + * * Helper function for findSymbolAtAddr(). - * + * * @param {number} iTable * @param {number} iOffset - * @param {Array} aSymbol is updated with the specified symbol, if it exists + * @param {Array} aSymbol is updated with the specified symbol, if it exists */ Debugger.prototype.returnSymbol = function(iTable, iOffset, aSymbol) { @@ -3216,10 +3221,10 @@ if (DEBUGGER) { aSymbol.push(symbol['a']); aSymbol.push(symbol['c']); }; - + /** * doHelp() - * + * * @this {Debugger} */ Debugger.prototype.doHelp = function() @@ -3231,10 +3236,10 @@ if (DEBUGGER) { if (!this.checksEnabled()) s += "\nnote: frequency/history disabled if no exec breakpoints"; this.println(s); }; - + /** * doAssemble(asArgs) - * + * * This always receives the complete argument array, where the order of the arguments is: * * [0]: the assemble command (assumed to be "a") @@ -3286,23 +3291,23 @@ if (DEBUGGER) { this.println(this.getInstruction(this.aAddrAssemble)); } }; - + /** * doBreak(sCmd, sAddr) - * + * * As the "help" output below indicates, the following breakpoint commands are supported: - * + * * bp [a] set exec breakpoint on physical addr [a] * br [a] set read breakpoint on physical addr [a] * bw [a] set write breakpoint on physical addr [a] * bc [a] clear breakpoint on physical addr [a] (use "*" for all breakpoints) * bl list breakpoints - * + * * to which we have recently added the following I/O breakpoint commands: - * + * * bi [p] toggle input breakpoint on port [p] (use "*" for all input ports) * bo [p] toggle output breakpoint on port [p] (use "*" for all output ports) - * + * * These two new commands operate as toggles so that if "*" is used to trap all input (or output), * you can also use these commands to NOT trap specific ports. * @@ -3380,10 +3385,10 @@ if (DEBUGGER) { } this.println("unknown breakpoint command: " + sParm); }; - + /** * doClear(sCmd) - * + * * @this {Debugger} * @param {string} sCmd (eg, "cls" or "clear") */ @@ -3394,10 +3399,10 @@ if (DEBUGGER) { */ if (this.controlPrint) this.controlPrint.value = ""; }; - + /** * doDump(sCmd, sAddr, sLen) - * + * * @this {Debugger} * @param {string} sCmd * @param {string|undefined} sAddr @@ -3447,7 +3452,7 @@ if (DEBUGGER) { if (sCmd == "ds") { /* * We used to call: - * + * * var seg = new X86Seg(this.cpu); * if (seg.load(aAddr[0], true) >= 0) { ... } * @@ -3541,10 +3546,10 @@ if (DEBUGGER) { if (sDump) this.println(sDump); this.aAddrNextData = aAddr; }; - + /** * doEdit(asArgs) - * + * * @this {Debugger} * @param {Array.} asArgs */ @@ -3564,10 +3569,10 @@ if (DEBUGGER) { this.setByte(aAddr, b, 1); } }; - + /** * doFreqs(sParm) - * + * * @this {Debugger} * @param {string|undefined} sParm */ @@ -3610,12 +3615,12 @@ if (DEBUGGER) { this.println("no frequency data available"); } }; - + /** * doHalt(sCount) * * If the CPU is running and no count is provided, then we simply haltCPU(); otherwise we treat this as a history command. - * + * * @this {Debugger} * @param {string|undefined} sCount is the number of instructions to rewind to (default is 10) */ @@ -3656,7 +3661,7 @@ if (DEBUGGER) { if (aAddr[1] == null) break; /* * We must create a new aAddr from the address we obtained from aHistory, because - * aAddr was a reference, not a copy, and we don't want getInstruction() modifying the original. + * aAddr was a reference, not a copy, and we don't want getInstruction() modifying the original. */ aAddr = this.newAddr(aAddr[0], aAddr[1], aAddr[2]); this.println(this.getInstruction(aAddr, "history", -n)); @@ -3670,10 +3675,10 @@ if (DEBUGGER) { this.nextHistory = undefined; } }; - + /** * doInfo(asArgs) - * + * * Prints the contents of the Debugger's instruction trace buffer. * * Examples: @@ -3682,7 +3687,7 @@ if (DEBUGGER) { * n shl on * n shl off * n dump 100 - * + * * @this {Debugger} * @param {Array.} asArgs * @return {boolean} true only if the instruction info command ("n") is supported @@ -3739,10 +3744,10 @@ if (DEBUGGER) { } return false; }; - + /** * doInput(sPort) - * + * * @this {Debugger} * @param {string|undefined} sPort */ @@ -3754,7 +3759,7 @@ if (DEBUGGER) { /* * NOTE: Regarding this warning, it might be nice if we had an "unchecked" version of * bus.checkPortInputNotify(), since all Debugger memory accesses are unchecked, too. - * + * * All port I/O handlers ARE aware when the Debugger is calling (addrFrom is undefined), * but changing them all to be non-destructive would take time, and situations where you * actually want to affect the hardware state are just as likely as not.... @@ -3768,10 +3773,10 @@ if (DEBUGGER) { this.println(str.toHexWord(port) + ": " + str.toHexByte(data)); } }; - + /** * doLoad(asArgs) - * + * * The format of this command mirrors the DOS DEBUG "L" command: * * l [address] [drive #] [sector #] [# sectors] @@ -3794,9 +3799,9 @@ if (DEBUGGER) { this.println("\tln [address] lists symbol(s) nearest to address"); return; } - + var aAddr = [], iDrive, iSector = 0, nSectors = 0; - + var fJSON = false; if (asArgs[1] == "json") { fJSON = true; @@ -3816,7 +3821,7 @@ if (DEBUGGER) { return; } } - + iDrive = this.parseValue(asArgs[2], "drive #"); if (iDrive === undefined) return; if (!fJSON) { @@ -3825,14 +3830,14 @@ if (DEBUGGER) { nSectors = this.parseValue(asArgs[4], "# of sectors"); if (nSectors === undefined) nSectors = 1; } - + /* * We choose the disk controller very simplistically: FDC for drives 0 or 1, and HDC for drives 2 * and up, unless no HDC is present, in which case we assume FDC for all drive numbers. - * + * * Both controllers must obviously support the same interfaces; ie, copyDrive(), seekDrive(), * and readByte(). We also rely on the disk property to determine whether the drive is "loaded". - * + * * In the case of the HDC, if the drive is valid, then by definition it is also "loaded", since an HDC * drive and its disk are inseparable; it's certainly possible that its disk object may be empty at * this point, but that will only affect whether the read succeeds or not. @@ -3886,10 +3891,10 @@ if (DEBUGGER) { this.println("disk controller not present"); } }; - + /** * doMessages(asArgs) - * + * * @this {Debugger} * @param {Array.} asArgs */ @@ -3899,7 +3904,7 @@ if (DEBUGGER) { var fCriteria = null; var sCategory = asArgs[1]; if (sCategory == "?") sCategory = undefined; - + if (sCategory !== undefined) { var bitsMessage = 0; if (sCategory == "all") { @@ -3935,7 +3940,7 @@ if (DEBUGGER) { } } } - + /* * Display those message categories that match the current criteria (on or off) */ @@ -3951,17 +3956,17 @@ if (DEBUGGER) { sCategories += Debugger.MESSAGES[m].OP; } } - + if (sCategory === undefined) { this.println("\nmessage commands:\n\tm [category] [on|off]\tturn categories on/off"); } this.println((fCriteria !== null? (fCriteria? "messages on: " : "messages off: ") : "message categories:\n\t") + (sCategories || "none")); }; - + /** * doExecOptions(asArgs) - * + * * @this {Debugger} * @param {Array.} asArgs */ @@ -4011,10 +4016,10 @@ if (DEBUGGER) { break; } }; - + /** * doOutput(sPort, sData) - * + * * @this {Debugger} * @param {string|undefined} sPort * @param {string|undefined} sData @@ -4027,7 +4032,7 @@ if (DEBUGGER) { /* * NOTE: Regarding this warning, it might be nice if we had an "Unchecked" version of * bus.checkPortOutputNotify(), since all Debugger memory accesses are unchecked, too. - * + * * All port I/O handlers ARE aware when the Debugger is calling (addrFrom is undefined), * but changing them all to be non-destructive would take time, and situations where you * actually want to affect the hardware state are just as likely as not.... @@ -4041,10 +4046,10 @@ if (DEBUGGER) { this.bus.checkPortOutputNotify(port, data); } }; - + /** * doRegisters(asArgs, fCompact) - * + * * @this {Debugger} * @param {Array.} [asArgs] * @param {boolean} [fCompact] @@ -4065,7 +4070,7 @@ if (DEBUGGER) { if (sReg == 'p') { /* * If the CPU has not defined addrGDT, then there are no protected-mode registers - * + * * TODO: Come up with a more formal way of determining the CPU's support for protected-mode, * and/or report an error. */ @@ -4196,18 +4201,18 @@ if (DEBUGGER) { this.println("updated registers:"); } } - + this.println((fCompact? '' : '\n') + this.getRegStr(fProt)); - + if (fIns) { this.aAddrNextCode = this.newAddr(this.cpu.regIP, this.cpu.segCS.sel); this.doUnassemble(this.hexAddr(this.aAddrNextCode)); } }; - + /** * doRun(sAddr) - * + * * @this {Debugger} * @param {string} sAddr */ @@ -4222,10 +4227,10 @@ if (DEBUGGER) { this.println('cpu not available, "g" command ignored'); } }; - + /** * doProcStep(sCmd) - * + * * @this {Debugger} * @param {string} [sCmd] "p" or "pr" */ @@ -4326,10 +4331,10 @@ if (DEBUGGER) { this.println("step in progress"); } }; - + /** * doStep(sCmd, sCount) - * + * * @this {Debugger} * @param {string} [sCmd] "t" or "tr" * @param {string} [sCount] # of instructions to step @@ -4356,10 +4361,10 @@ if (DEBUGGER) { } ); }; - + /** * doUnassemble(sAddr, sAddrEnd, n) - * + * * @this {Debugger} * @param {string} [sAddr] * @param {string} [sAddrEnd] @@ -4370,10 +4375,10 @@ if (DEBUGGER) { var aAddr = this.parseAddr(sAddr, Debugger.ADDR_CODE); if (aAddr[0] == null) return; - + if (n === undefined) n = 1; var aAddrEnd = this.newAddr(0xffff, aAddr[1], this.bus.addrLimit); - + if (sAddrEnd !== undefined) { aAddrEnd = this.parseAddr(sAddrEnd, Debugger.ADDR_CODE); if (aAddrEnd[0] == null || aAddrEnd[0] < aAddr[0]) @@ -4390,9 +4395,9 @@ if (DEBUGGER) { aAddrEnd[0]++; n = -1; } - + var fBlank = (aAddr[0] != this.aAddrNextCode[0]); - + while (n-- && (aAddr[1] != null? (aAddr[0] < aAddrEnd[0]) : (aAddr[2] < aAddrEnd[2]))) { /* * I pass nCycles instead of cInstructions to getInstruction() now, to assist with visual @@ -4428,10 +4433,10 @@ if (DEBUGGER) { fBlank = false; } }; - + /** * parseCommand(sCmd, fSave) - * + * * @this {Debugger} * @param {string|undefined} sCmd * @param {boolean} [fSave] is true to save the command, false if not @@ -4452,10 +4457,10 @@ if (DEBUGGER) { } return a; }; - + /** * doCommand(sCmd, fQuiet) - * + * * @this {Debugger} * @param {string} sCmd * @param {boolean} [fQuiet] @@ -4464,7 +4469,7 @@ if (DEBUGGER) { Debugger.prototype.doCommand = function(sCmd, fQuiet) { var result = true; - + if (!sCmd.length) { if (this.fAssemble) { this.println("ended assemble @" + this.hexAddr(this.aAddrAssemble)); @@ -4472,18 +4477,18 @@ if (DEBUGGER) { this.fAssemble = false; } } - + sCmd = sCmd.toLowerCase(); - + if (this.isReady() && !this.isBusy(true) && sCmd.length > 0) { - + if (this.fAssemble) { sCmd = "a " + this.hexAddr(this.aAddrAssemble) + " " + sCmd; } else { /* * Process any "whole word" commands here first (eg, "reset"). - * + * * For all other commands, if they lack a space between the command and argument portions, * insert a space before the first non-alpha character, so that split() will have the desired effect. */ @@ -4507,7 +4512,7 @@ if (DEBUGGER) { } var asArgs = sCmd.split(" "); - + switch (asArgs[0].charAt(0)) { case "a": this.doAssemble(asArgs); @@ -4576,7 +4581,7 @@ if (DEBUGGER) { } return result; }; - + /** * Debugger.init() * @@ -4597,7 +4602,7 @@ if (DEBUGGER) { Component.bindComponentControls(dbg, eDbg, PCJSCLASS); } }; - + /* * Initialize every Debugger module on the page (as IF there's ever going to be more than one ;-)) */ diff --git a/my_modules/pcjs-client/lib/fdc.js b/my_modules/pcjs-client/lib/fdc.js index 9ef41a585..d66dba83d 100644 --- a/my_modules/pcjs-client/lib/fdc.js +++ b/my_modules/pcjs-client/lib/fdc.js @@ -48,22 +48,22 @@ if (typeof module !== 'undefined') { * FDC Terms (see FDC.TERMS) * * C Cylinder Number the current or selected cylinder number - * + * * D Data the data pattern to be written to a sector - * + * * DS Drive Select the selected driver number encoded the same as bits 0 and 1 of the Digital Output * Register (DOR); eg, DS0, DS1, DS2, or DS3 - * + * * DTL Data Length when N is 00, DTL is the data length to be read from or written to a sector - * + * * EOT End Of Track the final sector number on a cylinder - * + * * GPL Gap Length the length of gap 3 (spacing between sectors excluding the VCO synchronous field) - * + * * H Head Address the head number, either 0 or 1, as specified in the ID field - * + * * HD Head the selected head number, 0 or 1 (H = HD in all command words) - * + * * HLT Head Load Time the head load time in the selected drive (2 to 256 milliseconds in 2-millisecond * increments for the 1.2M-byte drive and 4 to 512 milliseconds in 4 millisecond increments * for the 320K-byte drive) @@ -71,30 +71,30 @@ if (typeof module !== 'undefined') { * HUT Head Unload Time the head unload time after a read or write operation (0 to 240 milliseconds in * 16-millisecond increments for the 1.2M-byte drive and 0 to 480 milliseconds in * 32-millisecond increments for the 320K-byte drive) - * + * * MF FM or MFM Mode 0 selects FM mode and 1 selects MFM (MFM is selected only if it is implemented) - * + * * MT Multitrack 1 selects multitrack operation (both HD0 and HD1 will be read or written) - * + * * N Number the number of data bytes written in a sector - * + * * NCN New Cylinder Number the new cylinder number for a Seek operation - * + * * ND Non-Data Mode indicates an operation in the non-data mode - * + * * PCN Present Cylinder Number the cylinder number at the completion of a Sense Interrupt Status command * (present position of the head) - * + * * R Record the sector number to be read or written - * + * * SC Sectors Per Cylinder the number of sectors per cylinder - * + * * SK Skip this stands for skip deleted-data address mark - * + * * SRT Stepping Rate this 4 bit byte indicates the stepping rate for the diskette drive as follows: * 1.2M-Byte Diskette Drive: 1111=1ms, 1110=2ms, 1101=3ms * 320K-Byte Diskette Drive: 1111=2ms, 1110=4ms, 1101=6ms - * + * * STP STP Scan Test if STP is 1, the data in contiguous sectors is compared with the data sent * by the processor during a scan operation; if STP is 2, then alternate sections * are read and compared @@ -162,23 +162,21 @@ function FDC(parmsFDC) { /* * The following array keeps track of every disk image we've ever mounted. Each entry in the * array is another array whose elements are: - * + * * [0]: name of disk * [1]: path of disk * [2]: array of deltas, uninitialized until the disk is unmounted and/or all state is saved - * + * * See functions addDiskHistory() and updateDiskHistory(). */ this.aDiskHistory = []; /* - * If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification, - * at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need - * to do here is call setReady(). + * The remainder of FDC initialization now takes place in our initBus() handler, largely because we + * want initController() to have access to the ChipSet component, so that it can query switches and/or CMOS + * settings that determine the number of drives and their characteristics (eg, 40-track vs. 80-track), + * which it can then pass on to initDrive(). */ - this.initController(); - - if (!this.autoMount()) this.setReady(); } Component.subclass(Component, FDC); @@ -212,10 +210,10 @@ if (DEBUG) { /* * FDC Digital Output Register (DOR) (0x3F2, write-only) - * + * * NOTE: Reportedly, a drive's MOTOR had to be ON before the drive could be selected; however, outFDCOutput() no * longer verifies that. Also, motor start time for original drives was 500ms, but we make no attempt to simulate that. - * + * * On the MODEL_5170 "PC AT Fixed Disk and Diskette Drive Adapter", this port is called the Digital Output Register * or DOR. It uses the same bit definitions as the original FDC Output Register, except that only two diskette drives * are supported, hence bit 1 is always 0 (ie, FDC.REG_OUTPUT.DS2 and FDC.REG_OUTPUT.DS3 are not supported) and bits @@ -237,7 +235,7 @@ FDC.REG_OUTPUT.MOTOR_D3 = 0x80; // reserved on the MODEL_5170 /* * FDC Main Status Register (0x3F4, read-only) - * + * * On the MODEL_5170 "PC AT Fixed Disk and Diskette Drive Adapter", bits 2 and 3 are reserved, since that adapter * supported a maximum of two diskette drives. */ @@ -260,7 +258,7 @@ FDC.REG_DATA.PORT = 0x3F5; /* * FDC Digital Input Register (0x3F7, read-only, MODEL_5170 only) - * + * * Bit 7 indicates a diskette change (the MODEL_5170 introduced change-line support). Bits 0-6 are for the selected * hard disk drive, so this port must be shared with the HDC; bits 0-6 are valid for 50 microseconds after a write to * the Drive Head Register. @@ -278,7 +276,7 @@ FDC.REG_INPUT.DISK_CHANGE = 0x80; // Diskette Change /* * FDC Diskette Control Register (0x3F7, write-only, MODEL_5170 only) - * + * * Only bits 0-1 are used; bits 2-7 are reserved. */ FDC.REG_CONTROL = {}; @@ -290,14 +288,14 @@ FDC.REG_CONTROL.RATEUNUSED = 0x03; /* * FDC Commands - * + * * NOTE: FDC command bytes need to be masked with FDC.REG_DATA.CMD.MASK before comparing to the values below, since a * number of commands use the following additional bits as follows: - * + * * SK (0x20): Skip Deleted Data Address Mark * MF (0x40): Modified Frequency Modulation (as opposed to FM or Frequency Modulation) * MT (0x80): multi-track operation (ie, data processed under both head 0 and head 1) - * + * * We don't support MT (Multi-Track) operations at this time, and the MF and SK designations cannot be supported as long * as our diskette images contain only the original data bytes without any formatting information. */ @@ -324,8 +322,8 @@ FDC.REG_DATA.CMD.MT = 0x80; // MT (Multi-Track; ie, data under b /* * FDC status/error results, generally assigned according to the corresponding ST0, ST1, ST2 or ST3 status bit. - * - * TODO: Determine when EQUIP_CHECK is *really* set; "77 step pulses" sounds suspiciously like a typo. + * + * TODO: Determine when EQUIP_CHECK is *really* set; "77 step pulses" sounds suspiciously like a typo. */ FDC.REG_DATA.RES = {}; FDC.REG_DATA.RES.NONE = 0x00000000; // ST0 (IC): Normal termination of command (NT) @@ -362,7 +360,7 @@ FDC.REG_DATA.RES.ST3 = 0xFF000000; /* * FDC Command Sequences - * + * * For each command, cbReq indicates the total number of bytes in the command request sequence, * including the first (command) byte; cbRes indicates total number of bytes in the response sequence. */ @@ -451,7 +449,7 @@ FDC.prototype.setBinding = function(sHTMLClass, sHTMLType, sBinding, control) }; }(this, control); return true; - + case "descDisk": case "listDrives": this.bindings[sBinding] = control; @@ -467,7 +465,7 @@ FDC.prototype.setBinding = function(sHTMLClass, sHTMLType, sBinding, control) }; }(this, control); return true; - + case "loadDrive": this.bindings[sBinding] = control; control.onclick = function(fdc) { @@ -482,7 +480,7 @@ FDC.prototype.setBinding = function(sHTMLClass, sHTMLType, sBinding, control) return; } var sDisketteName = controlDisks.options[controlDisks.selectedIndex].text; - + /* * If the special path of "?" is selected, then we want to prompt the user for a URL. Oh, and * make sure we pass an empty string as the 2nd parameter to prompt(), so that IE won't display @@ -499,7 +497,7 @@ FDC.prototype.setBinding = function(sHTMLClass, sHTMLType, sBinding, control) sDisketteName = str.getBaseName(sDiskettePath); fdc.println("Attempting to load " + sDiskettePath + " as \"" + sDisketteName + "\""); } - + while (fdc.loadDiskette(iDrive, sDisketteName, sDiskettePath, false)) { if (!window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)")) { return; @@ -546,9 +544,18 @@ FDC.prototype.initBus = function(cmp, bus, cpu, dbg) this.chipset = cmp.getComponentByType("ChipSet"); + /* + * If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification, + * at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need + * to do here is call setReady(). + */ + this.initController(); + bus.addPortInputTable(this, FDC.aPortInput); bus.addPortOutputTable(this, FDC.aPortOutput); if (DEBUGGER) cpu.addIntNotify(FDC.BIOS.INT_DISKETTE, this, this.intBIOSDiskette); + + if (!this.autoMount()) this.setReady(); }; /** @@ -567,7 +574,7 @@ FDC.prototype.powerUp = function(data, fRepower) if (this.cmp.fReload) { /* * If the computer's fReload flag is set, we're required to toss all currently - * loaded disks and remount all disks specified in the auto-mount configuration. + * loaded disks and remount all disks specified in the auto-mount configuration. */ this.unloadAllDrives(true); this.autoMount(true); @@ -575,41 +582,29 @@ FDC.prototype.powerUp = function(data, fRepower) } else { if (!this.restore(data)) return false; } - if (this.chipset) { - var iDrive; - this.nDrives = this.chipset.getSWFloppyDrives(); - for (iDrive = 0; iDrive < this.nDrives; iDrive++) { - var drive = this.aDrives[iDrive]; - drive.bType = this.chipset.getSWFloppyDriveType(iDrive); - if (drive.bType == ChipSet.CMOS.FDRIVE.DSHD) { - drive.nCylinders = 80; - } + /* + * Populate the HTML controls to match the actual (well, um, specified) number of floppy drives. + */ + var controlDrives; + if ((controlDrives = this.bindings['listDrives'])) { + while (controlDrives.firstChild) { + controlDrives.removeChild(controlDrives.firstChild); } - /* - * Now that we finally have the SW1 settings, we can populate the HTML control - * to match the actual (well, um, specified) number of floppy drives in the system. - */ - var controlDrives; - if ((controlDrives = this.bindings['listDrives'])) { - while (controlDrives.firstChild) { - controlDrives.removeChild(controlDrives.firstChild); - } - controlDrives.innerHTML = ""; - for (iDrive = 0; iDrive < this.nDrives; iDrive++) { - var controlOption = window.document.createElement("option"); - controlOption['value'] = iDrive; - /* - * TODO: This conversion of drive number to drive letter, starting with A:, is very simplistic - * and will NOT match the drive mappings that DOS ultimately uses. We'll need to spiff this up at - * some point. - */ - controlOption.innerHTML = String.fromCharCode(0x41 + iDrive) + ":"; - controlDrives.appendChild(controlOption); - } - if (this.nDrives > 0) { - controlDrives.value = "0"; - this.displayDiskette(0); - } + controlDrives.innerHTML = ""; + for (var iDrive = 0; iDrive < this.nDrives; iDrive++) { + var controlOption = window.document.createElement("option"); + controlOption['value'] = iDrive; + /* + * TODO: This conversion of drive number to drive letter, starting with A:, is very simplistic + * and will NOT match the drive mappings that DOS ultimately uses. We'll need to spiff this up at + * some point. + */ + controlOption.innerHTML = String.fromCharCode(0x41 + iDrive) + ":"; + controlDrives.appendChild(controlOption); + } + if (this.nDrives > 0) { + controlDrives.value = "0"; + this.displayDiskette(0); } } } @@ -684,36 +679,36 @@ FDC.prototype.restore = function(data) */ FDC.prototype.initController = function(data) { - var i = 0; + var i = 0, iDrive; var fSuccess = true; - + if (data === undefined) { data = [0, 0, FDC.REG_STATUS.RQM, new Array(9), 0, 0, 0, []]; } - + /* * Selected drive (from regOutput), which can only be selected if its motor is on (see regOutput). */ this.iDrive = data[i++]; i++; // unused slot (if reused, bias by +4, since it was formerly a unit #) - + /* * Defaults to FDC.REG_STATUS.RQM set (ready for command) and FDC.REG_STATUS.READ_DATA clear (data direction * is from processor to the FDC Data Register). */ this.regStatus = data[i++]; - + /* * There can be up to 9 command bytes, and 7 result bytes, so 9 data registers are sufficient for communicating * in both directions (hence, the new Array(9) default above). */ this.regDataArray = data[i++]; - + /* * Determines the next data byte to be received. */ this.regDataIndex = data[i++]; - + /* * Determines the next data byte to be sent (internally, we use regDataIndex to read data bytes, up to this total). */ @@ -723,35 +718,46 @@ FDC.prototype.initController = function(data) /* * Initialize the disk history (if available) before initializing the drives, so that any disk deltas can be - * applied to disk images that are already loaded. + * applied to disk images that are already loaded. */ var aDiskHistory = data[i++]; if (aDiskHistory != null) this.aDiskHistory = aDiskHistory; - /* - * We allocate the maximum number of drives; we won't know the actual number of drives until we're able to query - * the SW1 switch settings. - */ if (this.aDrives === undefined) { - this.nDrives = 0; // this will be set later to the number of ACTUAL drives + this.nDrives = 4; // default to the maximum number of drives + if (this.chipset) this.nDrives = this.chipset.getSWFloppyDrives(); + /* + * I would prefer to allocate only nDrives, but as discussed in the handling of the FDC.REG_DATA.CMD.SENSE_INT + * command, we're faced with situations where the controller must respond to any drive in the range 0-3, regardless + * how many drives are actually installed. We still rely upon nDrives to determine the number of drives displayed + * to the user, however. + */ this.aDrives = new Array(4); } - for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { - if (this.aDrives[iDrive] === undefined) { - this.aDrives[iDrive] = {}; - } + + for (iDrive = 0; iDrive < this.aDrives.length; iDrive++) { var drive = this.aDrives[iDrive]; + if (drive === undefined) { + drive = this.aDrives[iDrive] = {}; + drive.bType = this.chipset.getSWFloppyDriveType(iDrive); + drive.nCylinders = 40; + drive.nSectors = 9; + if (drive.bType == ChipSet.CMOS.FDRIVE.DSHD) { + drive.nCylinders = 80; + drive.nSectors = 18; // 15 for 1.2Mb diskettes, 18 for 1.44Mb diskettes, 8/9 for everything else + } + } if (!this.initDrive(drive, iDrive, dataDrives[iDrive])) { fSuccess = false; } } - + /* * regInput and regControl (port 0x3F7) were not present on controllers prior to MODEL_5170, which is why * we don't include initializers for them in the default data array; we could eliminate them on older models, * but we don't have access to the model info right now, and there's no real cost to always including them * in the FDC state. - * + * * The bigger compatibility question is whether to always include hooks for them (see aPortInput and aPortOutput). */ this.regInput = data[i++] || 0; // TODO: Determine if we should default to FDC.REG_INPUT.DISK_CHANGE instead of 0 @@ -791,7 +797,7 @@ FDC.prototype.saveController = function() * TODO: Consider a separate Drive class that both FDC and HDC can use, since there's a lot of commonality * between the drive objects created by both controllers. This will clean up overall drive management and allow * us to factor out some common Drive methods (eg, advanceSector()). - * + * * @this {FDC} * @param {Object} drive * @param {number} iDrive @@ -802,7 +808,7 @@ FDC.prototype.initDrive = function(drive, iDrive, data) { var i = 0; var fSuccess = true; - + drive.iDrive = iDrive; if (data === undefined) { @@ -816,16 +822,12 @@ FDC.prototype.initDrive = function(drive, iDrive, data) if (typeof data[1] == "boolean") { /* * Note that when no data is provided (eg, when the controller is being reinitialized), we now take - * care to use drive.nCylinders as the default, falling back to a 40-track maximum ONLY when the drive - * hasn't been initialized. This preserves whatever maximum the powerUp() function may have obtained - * from the ChipSet component. - * - * TODO: We may need to make a similar accommodation for drive.nHeads and drive.nSectors down the road; - * they currently default to a maximum of 2 heads (see above) and 9 sectors/track (see below). + * care to preserve any drive defaults that initController() already obtained for us, falling back to + * bare minimums only when all else has failed. */ - data[1] = [FDC.DEFAULT_DRIVE_NAME, drive.nCylinders || 40, data[3], 9, 512, data[1]]; + data[1] = [FDC.DEFAULT_DRIVE_NAME, drive.nCylinders || 40, drive.nHeads || data[3], drive.nSectors || 9, drive.cbSector || 512, data[1]]; } - + /* * resCode used to be an FDC global, but in order to insulate FDC state from the operation of various functions * that operate on drive objects (eg, readByte and writeByte), I've made it a per-drive variable. This choice, @@ -833,13 +835,13 @@ FDC.prototype.initDrive = function(drive, iDrive, data) * approach, as long as it doesn't expose any incompatibilities that any software actually cares about. */ drive.resCode = data[i++]; - + /* * Some additional drive properties/defaults that are largely for the Disk component's benefit. */ drive.name = data[i][0]; drive.nCylinders = data[i][1]; // cylinders - drive.nHeads = data[i][2]; // heads/cylinders + drive.nHeads = data[i][2]; // heads/cylinders drive.nSectors = data[i][3]; // sectors/track drive.cbSector = data[i][4]; // bytes/sector drive.fRemovable = data[i][5]; @@ -851,15 +853,15 @@ FDC.prototype.initDrive = function(drive, iDrive, data) * We initialize this.iDrive (above) and drive.bHead and drive.bCylinder (below) to zero, but leave the rest undefined, * awaiting their first FDC command. We do this because the initial SENSE_INT command returns a PCN, which will also * be undefined unless we have at least zeroed both the current drive and the "present" cylinder on that drive. - * + * * Alternatively, I could make PCN a global FDC variable. That may be closer to how the actual hardware operates, * but I'm using per-drive variables so that the FDC component can be a good client to both the CPU and other components. - * + * * COMPATIBILITY ALERT: The MODEL_5170 BIOS ("DSKETTE_SETUP") attempts to discern the drive type (double-density vs. * high-capacity) by "slapping" the heads around. Literally (it uses a constant named "TRK_SLAP" equal to 48). * After seeking to "TRK_SLAP", the BIOS performs a series of seeks, looking for the precise point where the heads * return to track 0. - * + * * Here's how it works: the BIOS seeks to track 48 (which is fine on an 80-track 1.2Mb high-capacity drive, but 9 tracks * too far on a 40-track 360Kb double-density drive), then seeks to track 10, and then seeks in single-track increments * up to 10 more times until the SENSE_DRIVE command returns ST3 with the TRACK0 bit set. @@ -869,11 +871,10 @@ FDC.prototype.initDrive = function(drive, iDrive, data) * is updating a "logical" cylinder number, not the "physical" (actual) cylinder number. Presumably a RECALIBRATE * command will bring the logical and physical values into sync, but once an out-of-bounds cylinder is requested, they * will be out of sync. - * + * * To simulate this, bCylinder is now treated as the "physical" cylinder (since that's how it's ALWAYS been used here), * and bCylinderSeek will now track (pun intended) the "logical" cylinder that's programmed via SEEK commands. */ - drive.bType = ChipSet.CMOS.FDRIVE.DSDD; // default; updated later once we have the actual ChipSet object drive.bHead = data[i++]; drive.bCylinderSeek = data[i++]; // the data[] slot where we used to store drive.nHeads (or -1) drive.bCylinder = data[i++]; @@ -885,10 +886,10 @@ FDC.prototype.initDrive = function(drive, iDrive, data) drive.bSector = data[i++]; drive.bSectorEnd = data[i++]; // aka EOT drive.nBytes = data[i++]; - + /* * The next group of properties are set by user requests to load/unload diskette images. - * + * * NOTE: I now avoid reinitializing drive.disk in order to retain any previously mounted diskette across resets. * * drive.disk = null; // when a "disk" is "inserted" into the "drive", this is a Disk object @@ -911,7 +912,7 @@ FDC.prototype.initDrive = function(drive, iDrive, data) /* * If loadDiskette() must actually mount a *different* disk image at this late stage (ie, if it returns false), * then we must mark ourselves as "not ready" again, and add another "wait for ready" test in Computer before - * finally powering the CPU. Otherwise, go ahead and restore any deltas to the current image. + * finally powering the CPU. Otherwise, go ahead and restore any deltas to the current image. */ if (this.loadDiskette(iDrive, sDisketteName, sDiskettePath, true)) { if (drive.disk) { @@ -986,9 +987,9 @@ FDC.prototype.saveDrive = function(drive) * Now we deviate from the 1.01a save format: instead of next storing all the deltas for the * currently mounted disk (if any), we store only the name and path of the currently mounted disk * (if any). Deltas for ALL disks, both currently mounted and previously mounted, are stored later. - * + * * data[i++] = drive.disk? drive.disk.save() : null; - * + * * To indicate this deviation, we store neither a null nor a delta array, but Computer.VERSION_102; * if that value is not present, then the restore code will know it's dealing with a pre-v1.02 state. */ @@ -1080,7 +1081,7 @@ FDC.prototype.seekDrive = function(drive, iSector, nSectors) /* * NOTE: We don't set bSectorEnd, as an FDC command would, but it's irrelevant, because we don't actually * do anything with bSectorEnd at this point. Perhaps someday, when we faithfully honor/restrict requests - * to a single track (or a single cylinder, in the case of multi-track requests). + * to a single track (or a single cylinder, in the case of multi-track requests). */ drive.resCode = FDC.REG_DATA.RES.NONE; /* @@ -1170,7 +1171,7 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut FDC.prototype.mountDiskette = function(drive, disk, sDisketteName, sDiskettePath) { drive.fBusy = false; - + /* * We shouldn't mount the diskette unless the drive is able to handle it; for example, DSDD (40-track) * drives cannot read DSHD (80-track) diskettes. @@ -1179,23 +1180,23 @@ FDC.prototype.mountDiskette = function(drive, disk, sDisketteName, sDiskettePath this.notice("Diskette \"" + sDisketteName + "\" too large for drive " + String.fromCharCode(0x41 + drive.iDrive)); disk = null; } - + if (disk) { drive.disk = disk; drive.sDisketteName = sDisketteName; drive.sDiskettePath = sDiskettePath; this.addDiskHistory(sDisketteName, sDiskettePath, disk); - + /* * Clearly, a successful mount implies a disk change, and I suppose that, technically, an *unsuccessful* * mount should imply the same, but what would the real-world analog be? Inserting a piece of cardboard * instead of an actual diskette? In any case, if we can do the user a favor by pretending (as far as the * disk change line is concerned) that an unsuccessful mount never happened, let's do it. - * + * * Successful unmounts are a different story, however; those *do* trigger a change. See unloadDrive(). */ this.regInput |= FDC.REG_INPUT.DISK_CHANGE; - + /* * With the addition of notify(), users are now "alerted" whenever a diskette has finished loading; * notify() is selective about its output, using print() if a print window is open, alert() otherwise. @@ -1205,12 +1206,12 @@ FDC.prototype.mountDiskette = function(drive, disk, sDisketteName, sDiskettePath */ this.notice("Mounted diskette \"" + sDisketteName + "\" in drive " + String.fromCharCode(0x41 + drive.iDrive), drive.fAutoMount); } - + if (drive.fAutoMount) { drive.fAutoMount = false; if (!--this.cAutoMount) this.setReady(); } - + this.displayDiskette(drive.iDrive); }; @@ -1283,9 +1284,9 @@ FDC.prototype.unloadDrive = function(iDrive, fAutoUnload, fQuiet) drive.sDisketteName = ""; drive.sDiskettePath = ""; drive.disk = null; - + this.regInput |= FDC.REG_INPUT.DISK_CHANGE; - + /* * WARNING: This conversion of drive number to drive letter, starting with A:, is very simplistic * and is not guaranteed to match the drive mapping that DOS ultimately uses. @@ -1422,17 +1423,17 @@ FDC.prototype.outFDCOutput = function(port, bOut, addrFrom) * This no longer updates the internally selected drive (this.iDrive) based on regOutput, because (a) there seems * to be no point, as all drive-related commands include their own "drive select" bits, and (b) it breaks the * MODEL_5170 boot code. Here's why: - * + * * Unlike previous models, the MODEL_5170 BIOS probes all installed diskette drives to determine drive type; * ie, DSDD (40-track) or DSHD (80-track). So if there are two drives, the last selected drive will be drive 1. * Immediately before booting, the BIOS issues an INT 0x13/AH=0 reset, which writes regOutput two times: first * with FDC.REG_OUTPUT.ENABLE clear, and then with it set. However, both times, it ALSO loads the last selected * drive number into regOutput's "drive select" bits. - * + * * If we switched our selected drive to match regOutput, then the ST0 value we returned on an SENSE_INT command * following the regOutput reset operation would indicate drive 1 instead of drive 0. But the BIOS requires * the ST0 result from the SENSE_INT command ALWAYS be 0xC0 (not 0xC1), so the controller must not be propagating - * regOutput's "drive select" bits in the way I originally assumed. + * regOutput's "drive select" bits in the way I originally assumed. * * var iDrive = bOut & FDC.REG_OUTPUT.DS; * if (bOut & (FDC.REG_OUTPUT.MOTOR_D0 << iDrive)) this.iDrive = iDrive; @@ -1493,7 +1494,7 @@ FDC.prototype.inFDCData = function(port, addrFrom) FDC.prototype.outFDCData = function(port, bOut, addrFrom) { this.messagePort(port, bOut, addrFrom, "DATA[" + this.regDataTotal + "]"); - + if (this.regDataTotal < this.regDataArray.length) { this.regDataArray[this.regDataTotal++] = bOut; } @@ -1561,15 +1562,15 @@ FDC.prototype.doCmd = function() * The only command bit of possible interest down the road might be the FDC.REG_DATA.CMD.MT (Multi-Track); the rest relate * to storage format details that we cannot emulate as long as our diskette images contain nothing more than sector * data without any formatting data. - * - * Similarly, we ignore parameters like SRT, HUT, HLT and the like, since our "motors" don't require physical delays; + * + * Similarly, we ignore parameters like SRT, HUT, HLT and the like, since our "motors" don't require physical delays; * however, if timing issues become compatibility issues, we'll have to revisit those delays. In any case, the maximum * speed of the simulation will still be limited by various spin-loops in the ROM BIOS that wait prescribed times, so even * with infinitely fast hardware, the simulation will never run as fast as it theoretically could, unless we opt to identify * those spin-loops and either patch them or skip over them. */ var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK; - + switch (bCmdMasked) { case FDC.REG_DATA.CMD.SPECIFY: // 0x03 this.popSRT(); // SRT and HUT (encodings?) @@ -1579,7 +1580,7 @@ FDC.prototype.doCmd = function() * No results are provided by this command, and fIRQ should remain false */ break; - + case FDC.REG_DATA.CMD.SENSE_DRIVE: // 0x04 bDrive = this.popCmd(FDC.TERMS.DS); bHeadSelect = (bDrive >> 2) & 0x1; @@ -1588,7 +1589,7 @@ FDC.prototype.doCmd = function() this.beginResult(); this.pushST3(drive); break; - + case FDC.REG_DATA.CMD.WRITE_DATA: // 0x05 case FDC.REG_DATA.CMD.READ_DATA: // 0x06 bDrive = this.popCmd(FDC.TERMS.DS); @@ -1619,7 +1620,7 @@ FDC.prototype.doCmd = function() this.pushResult(n, FDC.TERMS.N); fIRQ = true; break; - + case FDC.REG_DATA.CMD.RECALIBRATE: // 0x07 bDrive = this.popCmd(FDC.TERMS.DS); this.iDrive = (bDrive & 0x3); @@ -1629,7 +1630,7 @@ FDC.prototype.doCmd = function() this.beginResult(); // no results provided; this command is typically followed by FDC.REG_DATA.CMD.SENSE_INT fIRQ = true; break; - + case FDC.REG_DATA.CMD.SENSE_INT: // 0x08 drive = this.aDrives[this.iDrive]; drive.bHead = 0; // this command is documented as ALWAYS returning a head address of 0 in ST0; see pushST0() @@ -1642,11 +1643,11 @@ FDC.prototype.doCmd = function() * in a row, and expects ST0 to contain a different drive number after each command (first 0, then 1, * then 2, and finally 3). What makes this doubly weird is SENSE INTERRUPT STATUS (unlike SENSE * DRIVE STATUS) is a drive-agnostic command. - * + * * Didn't the original PC AT "HFCOMBO" controller limit support to TWO diskette drives max? * And even if the PC AT supported other FDC controllers that DID support up to FOUR diskette drives, * why should "DISK_RESET" hard-code a 4-drive loop? - * + * * Well, whatever. All this head-scratching doesn't change the fact that I apparently have to * "auto-increment" the internal drive number (this.iDrive) after each SENSE INTERRUPT STATUS command. */ @@ -1655,13 +1656,13 @@ FDC.prototype.doCmd = function() * No interrupt is generated by this command, so fIRQ should remain false. */ break; - + case FDC.REG_DATA.CMD.READ_ID: // 0x0A /* * This command is used by "SETUP_DBL" in the MODEL_5170_REV3 BIOS to determine if a double-density * (40-track) diskette has been inserted in a high-density (80-track) drive; ie, whether "double stepping" * is required, since only 40 of the 80 possible "steps" are valid for a double-density diskette. - * + * * To start, we'll focus on making this work in the normal case (80-track diskette in 80-track drive). */ bDrive = this.popCmd(FDC.TERMS.DS); @@ -1689,7 +1690,7 @@ FDC.prototype.doCmd = function() this.pushResult(n, FDC.TERMS.N); fIRQ = true; break; - + case FDC.REG_DATA.CMD.FORMAT_TRACK: // 0x0D bDrive = this.popCmd(FDC.TERMS.DS); bHeadSelect = (bDrive >> 2) & 0x1; @@ -1712,7 +1713,7 @@ FDC.prototype.doCmd = function() this.pushResult(n, FDC.TERMS.N); fIRQ = true; break; - + case FDC.REG_DATA.CMD.SEEK: // 0x0F bDrive = this.popCmd(FDC.TERMS.DS); bHeadSelect = (bDrive >> 2) & 0x1; @@ -1723,10 +1724,10 @@ FDC.prototype.doCmd = function() * As discussed in initDrive(), we can no longer simply set bCylinder to the specified NCN; * instead, we must calculate the delta between bCylinderSeek and the NCN, and adjust bCylinder * by that amount. Then we simply move the NCN into bCylinderSeek without any range checking. - * - * Since bCylinder is now expressly defined as the "physical" cylinder number, it must never be - * allowed to exceed the physical boundaries of the drive (ie, never lower than 0, and never greater - * than or equal to nCylinders). + * + * Since bCylinder is now expressly defined as the "physical" cylinder number, it must never + * be allowed to exceed the physical boundaries of the drive (ie, never lower than 0, and never + * greater than or equal to nCylinders). */ bCylinder = this.popCmd(FDC.TERMS.NCN); drive.bCylinder += bCylinder - drive.bCylinderSeek; @@ -1742,10 +1743,10 @@ FDC.prototype.doCmd = function() if (drive.bCylinder == 0) { drive.resCode |= FDC.REG_DATA.RES.TRACK0; } - this.beginResult(); // like FDC.REG_DATA.CMD.RECALIBRATE, no results are provided + this.beginResult(); // like FDC.REG_DATA.CMD.RECALIBRATE, no results are provided fIRQ = true; break; - + default: if (DEBUG) { this.messageDebugger("FDC operation unsupported (command=0x: " + str.toHexByte(bCmd) + ")"); @@ -1760,7 +1761,7 @@ FDC.prototype.doCmd = function() * After the Execution Phase (eg, DMA Terminal Count has occurred, or the EOT sector has been read/written), * an interrupt is supposed to occur, signaling the beginning of the Result Phase. Once the first byte of the * result has been read, the interrupt is cleared (see inFDCData). - * + * * TODO: Technically, interrupt request status should be cleared by the FDC.REG_DATA.CMD.SENSE_INT command; in fact, * if that command is issued and no interrupt was pending, then FDC.REG_DATA.RES.INVALID should be returned (via ST0). */ @@ -2014,9 +2015,9 @@ FDC.prototype.doWrite = function(drive) FDC.prototype.doFormat = function(drive) { drive.resCode = FDC.REG_DATA.RES.NOT_READY | FDC.REG_DATA.RES.INCOMPLETE; - + //if (DEBUG) this.messageDebugger("doFormat()"); - + if (drive.disk) { drive.sector = null; drive.resCode = FDC.REG_DATA.RES.NONE; @@ -2186,7 +2187,7 @@ FDC.prototype.writeFormat = function(drive, b) return -1; } } - drive.cSectorsFormatted++; + drive.cSectorsFormatted++; } if (drive.cSectorsFormatted >= drive.bSectorEnd) b = -1; return b; @@ -2276,7 +2277,7 @@ FDC.prototype.messagePort = function(port, bOut, addrFrom, name, bIn) /* * Port input notification table - * + * * TODO: Even though port 0x3F7 was not present on controllers prior to MODEL_5170, I'm taking the easy * way out and always emulating it. So, consider an FDC parameter to disable that feature for stricter compatibility. */ @@ -2288,7 +2289,7 @@ FDC.aPortInput = { /* * Port output notification table - * + * * TODO: Even though port 0x3F7 was not present on controllers prior to MODEL_5170, I'm taking the easy * way out and always emulating it. So, consider an FDC parameter to disable that feature for stricter compatibility. */ diff --git a/my_modules/pcjs-client/lib/x86cpu.js b/my_modules/pcjs-client/lib/x86cpu.js index 672ce921c..d5f710425 100644 --- a/my_modules/pcjs-client/lib/x86cpu.js +++ b/my_modules/pcjs-client/lib/x86cpu.js @@ -59,7 +59,7 @@ if (typeof module !== 'undefined') { * This extends the CPU class and passes any remaining parmsCPU properties to the * CPU class constructor, along with a default speed (cycles per second) based on the * specified (or default) CPU model number. - * + * * The X86CPU class was initially written to simulate a 8086/8088 microprocessor, although * over time it is evolving to support newer microprocessors (for example, limited * support for 80186/80188 instructions can already be conditionally enabled). @@ -80,7 +80,7 @@ if (typeof module !== 'undefined') { * All that being said, this does not change the primary goal: to produce as accurate * a simulation as possible, within the limits of what JavaScript allows and how * precisely/predictably it behaves. - * + * * @constructor * @extends CPU * @param {Object} parmsCPU @@ -88,7 +88,7 @@ if (typeof module !== 'undefined') { function X86CPU(parmsCPU) { this.model = parmsCPU['model'] || X86.MODEL_8088; - + var nCyclesDefault = 0; switch(this.model) { default: @@ -103,7 +103,7 @@ function X86CPU(parmsCPU) { CPU.call(this, parmsCPU, nCyclesDefault); /* - * Initialize processor operation to match the requested model + * Initialize processor operation to match the requested model */ this.initProcessor(); @@ -138,7 +138,7 @@ function X86CPU(parmsCPU) { * or not RETF or IRET instructions need to bother calling checkIntReturn(). */ this.cIntReturn = 0; - + /* * A variety of stepCPU() state variables that don't strictly need to be initialized before the first * stepCPU() call, but it's good form to do so. @@ -265,63 +265,63 @@ X86CPU.prototype.setAddressMask = function(addrMask) /** * initProcessor() - * + * * This isolates 80186/80188/80286 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 * Reference", p.3-38, apparently contains the same information, but I've not seen that document. - * + * * Undefined Opcodes: - * + * * When the opcodes 63H, 64H, 65H, 66H, 67H, F1H, FEH/xx111xxxB and FFH/xx111xxxB are executed, * the 80186 will execute an illegal [invalid] instruction exception, interrupt 0x06. * The 8086 will ignore the opcode. - * + * * 0FH opcode: - * + * * When the opcode 0FH is encountered, the 8086 will execute a POP CS, while the 80186 will * execute an illegal [invalid] instruction exception, interrupt 0x06. - * + * * Word Write at Offset FFFFH: - * + * * When a word write is performed at offset FFFFH in a segment, the 8086 will write one byte * at offset FFFFH, and the other at offset 0, while the 80186 will write one byte at offset * FFFFH, and the other at offset 10000H (one byte beyond the end of the segment). One byte segment * underflow will also occur (on the 80186) if a stack PUSH is executed and the Stack Pointer * contains the value 1. - * + * * Shift/Rotate by Value Greater Then [sic] 31: - * + * * Before the 80186 performs a shift or rotate by a value (either in the CL register, or by an * immediate value) it ANDs the value with 1FH, limiting the number of bits rotated to less than 32. * The 8086 does not do this. - * + * * LOCK prefix: - * + * * The 8086 activates its LOCK signal immediately after executing the LOCK prefix. The 80186 does * not activate the LOCK signal until the processor is ready to begin the data cycles associated * with the LOCKed instruction. - * + * * Interrupted String Move Instructions: - * + * * If an 8086 is interrupted during the execution of a repeated string move instruction, the return * value it will push on the stack will point to the last prefix instruction before the string move * instruction. If the instruction had more than one prefix (e.g., a segment override prefix in * addition to the repeat prefix), it will not be re-executed upon returning from the interrupt. * The 80186 will push the value of the first prefix to the repeated instruction, so long as prefixes * are not repeated, allowing the string instruction to properly resume. - * + * * Conditions causing divide error with an integer divide: - * + * * The 8086 will cause a divide error whenever the absolute value of the quotient is greater then * [sic] 7FFFH (for word operations) or if the absolute value of the quotient is greater than 7FH * (for byte operations). The 80186 has expanded the range of negative numbers allowed as a quotient * by 1 to include 8000H and 80H. These numbers represent the most negative numbers representable * using 2's complement arithmetic (equaling -32768 and -128 in decimal, respectively). - * + * * ESC Opcode: - * + * * The 80186 may be programmed to cause an interrupt type 7 whenever an ESCape instruction (used for * co-processors like the 8087) is executed. The 8086 has no such provision. Before the 80186 performs * this trap, it must be programmed to do so. [The details of this "programming" are not included.] @@ -330,18 +330,18 @@ X86CPU.prototype.setAddressMask = function(addrMask) * Appendix C, p.C-1 (p.329): * * 1. Add Six Interrupt Vectors - * + * * The 80286 adds six interrupts which arise only if the 8086 program has a hidden bug. These interrupts * occur only for instructions which were undefined on the 8086/8088 or if a segment wraparound is attempted. * It is recommended that you add an interrupt handler to the 8086 software that is to be run on the 80286, * which will treat these interrupts as invalid operations. - * + * * This additional software does not significantly effect the existing 8086 software because the interrupts * do not normally occur and should not already have been used since they are in the interrupt group reserved * by Intel. [Note to Intel: IBM caaaaaaan't hear you]. - * + * * 2. Do not Rely on 8086/8088 Instruction Clock Counts - * + * * The 80286 takes fewer clocks for most instructions than the 8086/8088. The areas to look into are delays * between I/0 operations, and assumed delays in 8086/8088 operating in parallel with an 8087. * @@ -350,90 +350,90 @@ X86CPU.prototype.setAddressMask = function(addrMask) * Any interrupt on the 80286 will always leave the saved CS:IP value pointing at the beginning of the * instruction that failed (including prefixes). On the 8086, the CS:IP value saved for a divide exception * points at the next instruction. - * + * * 4. Use Interrupt 16 (0x10) for Numeric Exceptions - * + * * Any 80287 system must use interrupt vector 16 for the numeric error interrupt. If an 8086/8087 or 8088/8087 * system uses another vector for the 8087 interrupt, both vectors should point at the numeric error interrupt * handler. - * + * * 5. Numeric Exception Handlers Should allow Prefixes - * + * * The saved CS:IP value in the NPX environment save area will point at any leading prefixes before an ESC * instruction. On 8086/8088 systems, this value points only at the ESC instruction. - * + * * 6. Do Not Attempt Undefined 8086/8088 Operations - * + * * Instructions like POP CS or MOV CS,op will either cause exception 6 (undefined opcode) or perform a protection * setup operation like LIDT on the 80286. Undefined bit encodings for bits 5-3 of the second byte of POP MEM * or PUSH MEM will cause exception 13 on the 80286. - * + * * 7. Place a Far JMP Instruction at FFFF0H - * + * * After reset, CS:IP = F000:FFF0 on the 80286 (versus FFFF:0000 on the 8086/8088). This change was made to allow * sufficient code space to enter protected mode without reloading CS. Placing a far JMP instruction at FFFF0H * will avoid this difference. Note that the BOOTSTRAP option of LOC86 will automatically generate this jump * instruction. - * + * * 8. Do not Rely on the Value Written by PUSH SP - * + * * The 80286 will push a different value on the stack for PUSH SP than the 8086/8088. If the value pushed is * important [and when would it NOT be???], replace PUSH SP instructions with the following three instructions: - * + * * PUSH BP * MOV BP,SP * XCHG BP,[BP] - * + * * This code functions as the 8086/8088 PUSH SP instruction on the 80286. - * + * * 9. Do not Shift or Rotate by More than 31 Bits - * + * * The 80286 masks all shift/rotate counts to the low 5 bits. This MOD 32 operation limits the count to a maximum * of 31 bits. With this change, the longest shift/rotate instruction is 39 clocks. Without this change, the longest * shift/rotate instruction would be 264 clocks, which delays interrupt response until the instruction completes * execution. - * + * * 10. Do not Duplicate Prefixes - * + * * The 80286 sets an instruction length limit of 10 bytes. The only way to violate this limit is by duplicating * a prefix two or more times before an instruction. Exception 6 occurs if the instruction length limit is violated. * The 8086/8088 has no instruction length limit. - * + * * 11. Do not Rely on Odd 8086/8088 LOCK Characteristics - * + * * The LOCK prefix and its corresponding output signal should only be used to prevent other bus masters from * interrupting a data movement operation. The 80286 will always assert LOCK during an XCHG instruction with memory * (even if the LOCK prefix was not used). LOCK should only be used with the XCHG, MOV, MOVS, INS, and OUTS instructions. - * + * * The 80286 LOCK signal will not go active during an instruction prefetch. - * + * * 12. Do not Single Step External Interrupt Handlers - * + * * The priority of the 80286 single step interrupt is different from that of the 8086/8088. This change was made * to prevent an external interrupt from being single-stepped if it occurs while single stepping through a program. * The 80286 single step interrupt has higher priority than any external interrupt. - * + * * The 80286 will still single step through an interrupt handler invoked by INT instructions or an instruction * exception. - * + * * 13. Do not Rely on IDIV Exceptions for Quotients of 80H or 8000H - * + * * The 80286 can generate the largest negative number as a quotient for IDIV instructions. The 8086 will instead * cause exception O. - * + * * 14. Do not Rely on NMI Interrupting NMI Handlers - * + * * After an NMI is recognized, the NMI input and processor extension limit error interrupt is masked until the * first IRET instruction is executed. - * + * * 15. The NPX error signal does not pass through an interrupt controller (an 8087 INT signal does). Any interrupt * controller-oriented instructions for the 8087 may have to be deleted. - * + * * 16. If any real-mode program relies on address space wrap-around (e.g., FFF0:0400=0000:0300), then external hardware * should be used to force the upper 4 addresses to zero during real mode. - * + * * 17. Do not use I/O ports 00F8-00FFH. These are reserved for controlling 80287 and future processor extensions. - * + * * @this {X86CPU} */ X86CPU.prototype.initProcessor = function() @@ -441,7 +441,7 @@ X86CPU.prototype.initProcessor = function() this.PS_SET = X86.PS.SET; this.OPFLAG_NOINTR8086 = X86.OPFLAG.NOINTR; this.nShiftCountMask = 0xff; // on an 8086/8088, there effectively is NO mask - + /* * TODO: Make sure all segment overrides impose an additional 2-cycle penalty */ @@ -453,11 +453,11 @@ X86CPU.prototype.initProcessor = function() this.nEACyclesBaseDisp = 9; // base or index + displacement this.nEACyclesBaseIndexDisp = 11; // base + index + displacement (BP+DI+n and BX+SI+n) this.nEACyclesBaseIndexDispExtra = 12; // base + index + displacement (BP+SI+n and BX+DI+n require an extra cycle) - + this.nOpCyclesAAA = 4; // AAA, AAS, DAA, DAS, TEST acc,imm this.nOpCyclesAAD = 60; this.nOpCyclesAAM = 83; - this.nOpCyclesArithRR = 3; // ADC, ADD, AND, OR, SBB, SUB, XOR and CMP reg,reg cycle time + this.nOpCyclesArithRR = 3; // ADC, ADD, AND, OR, SBB, SUB, XOR and CMP reg,reg cycle time this.nOpCyclesArithRM = 9; // ADC, ADD, AND, OR, SBB, SUB, and XOR reg,mem (and CMP mem,reg) cycle time this.nOpCyclesArithMR = 16; // ADC, ADD, AND, OR, SBB, SUB, and XOR mem,reg cycle time this.nOpCyclesArithMID = 1; // ADC, ADD, AND, OR, SBB, SUB, XOR and CMP mem,imm cycle delta @@ -467,7 +467,7 @@ X86CPU.prototype.initProcessor = function() this.nOpCyclesCallWM = 21; this.nOpCyclesCallDM = 37; this.nOpCyclesCLI = 2; - this.nOpCyclesCompareRM = 9; // CMP reg,mem cycle time (same as nOpCyclesArithRM on an 8086 but not on a 80286) + this.nOpCyclesCompareRM = 9; // CMP reg,mem cycle time (same as nOpCyclesArithRM on an 8086 but not on a 80286) this.nOpCyclesCWD = 5; this.nOpCyclesBound = 33; // N/A if 8086/8088, 33-35 if 80186/80188 (TODO: Determine what the range means for an 80186/80188) this.nOpCyclesInP = 10; @@ -561,7 +561,7 @@ X86CPU.prototype.initProcessor = function() this.nOpCyclesXLAT = 11; this.aOps = X86OpXX.aOps.slice(); // make a copy of aOps before modifying it - + 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 @@ -570,7 +570,7 @@ X86CPU.prototype.initProcessor = function() * opOUTSw, opENTER, and opLEAVE. */ this.nShiftCountMask = 0x1f; // on newer processors, all shift counts are MOD 32 - + this.aOps[0x0F] = X86Help.opInvalid; this.aOps[X86.OPCODE.PUSHA] = X86OpXX.opPUSHA; this.aOps[X86.OPCODE.POPA] = X86OpXX.opPOPA; @@ -595,15 +595,15 @@ X86CPU.prototype.initProcessor = function() this.aOps[0xF1] = X86OpXX.opINT1; X86Grps.aOpGRP4b[0x07] = X86Grps.opGrpInvalid; X86Grps.aOpGRP4w[0x07] = X86Grps.opGrpInvalid; - + if (this.model >= X86.MODEL_80286) { this.PS_SET = X86.PS.BIT1; // on the 80286, only BIT1 of Processor Status (flags) is always set this.OPFLAG_NOINTR8086 = 0; // used with instructions that should *not* set NOINTR on an 80286 (eg, non-SS segment loads) - + this.aOps[0x0F] = X86OpXX.op0F; this.aOps[X86.OPCODE.ARPL] = X86OpXX.opARPL; this.aOps[X86.OPCODE.PUSHSP]= X86OpXX.op286PUSHSP; - + this.nWordCyclePenalty = 0; this.nEACyclesBase = 0; this.nEACyclesDisp = 0; @@ -612,7 +612,7 @@ X86CPU.prototype.initProcessor = function() this.nEACyclesBaseDisp = 0; this.nEACyclesBaseIndexDisp = 1; this.nEACyclesBaseIndexDispExtra = 1; - + this.nOpCyclesAAA = 3; this.nOpCyclesAAD = 14; this.nOpCyclesAAM = 16; @@ -658,7 +658,7 @@ X86CPU.prototype.initProcessor = function() this.nOpCyclesMovMR = 5; this.nOpCyclesMovRI = 2; this.nOpCyclesMovMI = 3; - this.nOpCyclesMovAM = 5; // this is actually slower than the MOD/RM form of MOV AX,mem (see nOpCyclesMovRM) + this.nOpCyclesMovAM = 5; // this is actually slower than the MOD/RM form of MOV AX,mem (see nOpCyclesMovRM) this.nOpCyclesMovMA = 3; this.nOpCyclesDivBR = 14; this.nOpCyclesDivWR = 22; @@ -746,9 +746,9 @@ X86CPU.prototype.reset = function() * DS/ES/SS = 0x0000 * * It is silent as to whether the remaining registers are initialized to any particular values. - * + * * According to the "80286 and 80287 Programmer's Reference Manual", these 80286 registers are reset: - * + * * PS = 0x0002 * MSW = 0xFFF0 * IP = 0xFFF0 @@ -777,7 +777,7 @@ X86CPU.prototype.resetRegs = function() this.regBP = 0; this.regSI = 0; this.regDI = 0; - + /* * NOTE: Even though the MSW and IDTR are 80286-specific, we initialize them for ALL CPUs, so that * functions like X86Help.opHelpINT() can use the same code for both. The 8086/8088 have no direct way @@ -786,7 +786,7 @@ X86CPU.prototype.resetRegs = function() this.regMSW = X86.MSW.SET; this.addrIDT = 0; this.addrIDTLimit = 0x03FF; this.descIDT = {off: 0, sel: 0, acc: 0, maskPS: -1}; - + /* * Segment registers used to be defined as separate variables (eg, regCS and regCS0 stored the * segment number and base physical address, respectively), but all segment registers are now defined @@ -801,12 +801,12 @@ X86CPU.prototype.resetRegs = function() /* * Assorted 80286-specific registers. The GDTR and IDTR registers are stored as the following pieces: - * + * * GDTR: addrGDT (24 bits) and addrGDTLimit (24 bits) * IDTR: addrIDT (24 bits) and addrIDTLimit (24 bits) - * + * * while the LDTR and TR are stored as special segment registers: segLDT and segTSS. - * + * * 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 * at both 0x0F0000 and 0xFF0000; see the ROM component's "alias" parameter). @@ -819,7 +819,7 @@ X86CPU.prototype.resetRegs = function() this.setCSIP(0xFFF0, 0xF000); // in real-mode, 0xF000 defaults the CS base address to 0x0F0000 this.segCS.setBase(0xFF0000); // which is why we must manually adjust the CS base address to 0xFF0000 } - + /* * This resets the Processor Status flags (regPS), along with all the internal "result registers". */ @@ -829,12 +829,12 @@ X86CPU.prototype.resetRegs = function() * Now that all the segment registers have been created, it's safe to set the current addressing mode. */ this.setProtMode(); - + /* * intFlags contains some internal "flags" that 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. - * + * * intFlags must be cleared only by checkINTR(), whereas opFlags must be cleared prior to every CPU operation. */ this.intFlags = X86.INTFLAG.NONE; @@ -843,7 +843,7 @@ X86CPU.prototype.resetRegs = function() * The following are internal "registers" that are used to capture intermediate values inside selected helper * functions and use them if they've been modified (or are known to always change); for example, the MUL and DIV * instructions perform calculations that must be propagated to specific registers (eg, AX and/or DX), which - * the ModRM decoder functions don't know about. We initialize them here mainly for documentation purposes. + * the ModRM decoder functions don't know about. We initialize them here mainly for documentation purposes. */ this.regMD16 = this.regMD32 = -1; @@ -866,7 +866,7 @@ X86CPU.prototype.resetRegs = function() /** * getChecksum() - * + * * @this {X86CPU} * @return {number} a 32-bit summation of key elements of the current CPU state (used by the CPU checksum code) */ @@ -879,7 +879,7 @@ X86CPU.prototype.getChecksum = function() /** * addIntNotify(nInt, component, fn) - * + * * Add an software interrupt notification handler to the CPU's list of such handlers. * * @this {X86CPU} @@ -901,9 +901,9 @@ X86CPU.prototype.addIntNotify = function(nInt, component, fn) /** * checkIntNotify(nInt) * - * NOTE: This is called ONLY for "INT N" instructions -- not "INTO" or breakpoint or single-step interrupts + * NOTE: This is called ONLY for "INT N" instructions -- not "INTO" or breakpoint or single-step interrupts * or divide exception interrupts, or hardware interrupts, or any simulation of an interrupt (eg, "PUSHF/CALLF"). - * + * * @this {X86CPU} * @param {number} nInt * @return {boolean} true if software interrupt may proceed, false if software interrupt should be skipped @@ -915,10 +915,7 @@ X86CPU.prototype.checkIntNotify = function(nInt) * speed, check fDebugCheck first. */ if (DEBUGGER && this.fDebugCheck) { - /* - * TODO: Filtering out the hard-coded interrupt numbers below should be optional; this is very quick-and-dirty. - */ - if (nInt < 0x20 && nInt != 0x10 && nInt != 0x16 && nInt != 0x1C && this.dbg.messageEnabled(this.dbg.MESSAGE_INT)) { + if (this.dbg.messageEnabled(this.dbg.MESSAGE_INT)) { this.dbg.messageInt(nInt, this.regEIP); this.addIntReturn(this.regEIP, function(cpu, nCycles) { return function onIntReturn(nLevel) { @@ -940,7 +937,7 @@ X86CPU.prototype.checkIntNotify = function(nInt) /** * addIntReturn(addr, fn) - * + * * Add a return notification handler to the CPU's list of such handlers. * * When fn(n) is called, it's passed a "software interrupt level", which will normally be 0, @@ -966,10 +963,10 @@ X86CPU.prototype.addIntReturn = function(addr, fn) /** * checkIntReturn(addr) - * + * * It is expected (though not required) that callers will check cIntReturn and avoid calling * this function if the count is zero. - * + * * @this {X86CPU} * @param {number} addr is a physical (non-segmented) address */ @@ -984,13 +981,13 @@ X86CPU.prototype.checkIntReturn = function(addr) /** * setProtMode(fProt) - * + * * Update any opcode handlers that operate significantly differently in real-mode vs. protected-mode, and * notify all the segment registers about the mode change as well -- but only those that are "bi-modal"; internal * segment registers like segLDT and segTSS do not need to be notified, because they cannot be accessed in real-mode * (ie, LLDT, LTR, SLDT, STR are invalid instructions in real-mode, and are among the opcode handlers that we * update here). - * + * * @this {X86CPU} * @param {boolean} [fProt] (use the current MSW PE bit if not specified) */ @@ -1012,9 +1009,9 @@ X86CPU.prototype.setProtMode = function(fProt) /** * saveProtMode() - * + * * Save CPU state related to protected-mode, for save() - * + * * @this {X86CPU} * @return {Array} */ @@ -1052,9 +1049,9 @@ X86CPU.prototype.restoreProtMode = function(a) * save() * * 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. - * + * * @this {X86CPU} * @return {Object} */ @@ -1073,7 +1070,7 @@ X86CPU.prototype.save = function() * restore(data) * * This implements restore support for the X86 component. - * + * * @this {X86CPU} * @param {Object} data * @return {boolean} true if restore successful, false if not @@ -1152,7 +1149,7 @@ X86CPU.prototype.verifyMemoryEnabled = function() /** * getSeg(sName) - * + * * @param {string} sName * @return {Array} */ @@ -1235,7 +1232,7 @@ X86CPU.prototype.loadIDTEntry = function(nIDT) * (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. - * + * * @this {X86CPU} * @param {number} sel */ @@ -1248,7 +1245,7 @@ X86CPU.prototype.setCS = function(sel) /** * setDS(sel) - * + * * @this {X86CPU} * @param {number} sel */ @@ -1260,7 +1257,7 @@ X86CPU.prototype.setDS = function(sel) /** * setSS(sel) - * + * * @this {X86CPU} * @param {number} sel */ @@ -1272,7 +1269,7 @@ X86CPU.prototype.setSS = function(sel) /** * setES(sel) - * + * * @this {X86CPU} * @param {number} sel */ @@ -1290,7 +1287,7 @@ X86CPU.prototype.setES = function(sel) * * In fact, for performance reasons, it's preferable to increment regIP yourself, * but you can also call advanceIP() if speed is not important. - * + * * @this {X86CPU} * @param {number} off */ @@ -1309,11 +1306,11 @@ X86CPU.prototype.setIP = function(off) * * NOTE: Unlike setIP(), which is often passed a computation, the offsets passed to setCSIP() are strictly * 16-bit values, so there's never any need to mask them with 0xffff (although it doesn't hurt to assert that). - * + * * As an aside, this function is called setCSIP() instead of setCSIP() to reflect the order of the parameters * (IP value first, CS value second), which matches the order that CS:IP values are normally stored in memory, * allowing us to make calls like this: - * + * * this.setCSIP(this.popWord(), this.popWord()); * * @this {X86CPU} @@ -1329,7 +1326,7 @@ X86CPU.prototype.setCSIP = function(off, sel) /** * advanceIP(inc) - * + * * @this {X86CPU} * @param {number} inc (may be +/-) */ @@ -1341,7 +1338,7 @@ X86CPU.prototype.advanceIP = function(inc) /** * getCF() - * + * * @this {X86CPU} * @return {number} */ @@ -1352,7 +1349,7 @@ X86CPU.prototype.getCF = function() /** * getPF() - * + * * @this {X86CPU} * @return {number} */ @@ -1363,7 +1360,7 @@ X86CPU.prototype.getPF = function() /** * getAF() - * + * * @this {X86CPU} * @return {number} */ @@ -1374,7 +1371,7 @@ X86CPU.prototype.getAF = function() /** * getZF() - * + * * @this {X86CPU} * @return {number} */ @@ -1385,7 +1382,7 @@ X86CPU.prototype.getZF = function() /** * getSF() - * + * * @this {X86CPU} * @return {number} */ @@ -1396,7 +1393,7 @@ X86CPU.prototype.getSF = function() /** * getOF() - * + * * @this {X86CPU} * @return {number} */ @@ -1407,7 +1404,7 @@ X86CPU.prototype.getOF = function() /** * getTF() - * + * * @this {X86CPU} * @return {number} */ @@ -1418,7 +1415,7 @@ X86CPU.prototype.getTF = function() /** * getIF() - * + * * @this {X86CPU} * @return {number} */ @@ -1429,7 +1426,7 @@ X86CPU.prototype.getIF = function() /** * getDF() - * + * * @this {X86CPU} * @return {number} */ @@ -1440,7 +1437,7 @@ X86CPU.prototype.getDF = function() /** * clearCF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearCF = function() @@ -1450,7 +1447,7 @@ X86CPU.prototype.clearCF = function() /** * clearPF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearPF = function() @@ -1460,7 +1457,7 @@ X86CPU.prototype.clearPF = function() /** * clearAF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearAF = function() @@ -1470,7 +1467,7 @@ X86CPU.prototype.clearAF = function() /** * clearZF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearZF = function() @@ -1480,7 +1477,7 @@ X86CPU.prototype.clearZF = function() /** * clearSF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearSF = function() @@ -1493,7 +1490,7 @@ X86CPU.prototype.clearSF = function() /** * clearIF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearIF = function() @@ -1503,7 +1500,7 @@ X86CPU.prototype.clearIF = function() /** * clearDF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearDF = function() @@ -1513,7 +1510,7 @@ X86CPU.prototype.clearDF = function() /** * clearOF() - * + * * @this {X86CPU} */ X86CPU.prototype.clearOF = function() @@ -1524,7 +1521,7 @@ X86CPU.prototype.clearOF = function() /** * setCF() - * + * * @this {X86CPU} */ X86CPU.prototype.setCF = function() @@ -1534,7 +1531,7 @@ X86CPU.prototype.setCF = function() /** * setPF() - * + * * @this {X86CPU} */ X86CPU.prototype.setPF = function() @@ -1544,7 +1541,7 @@ X86CPU.prototype.setPF = function() /** * setAF() - * + * * @this {X86CPU} */ X86CPU.prototype.setAF = function() @@ -1554,7 +1551,7 @@ X86CPU.prototype.setAF = function() /** * setZF() - * + * * @this {X86CPU} */ X86CPU.prototype.setZF = function() @@ -1564,7 +1561,7 @@ X86CPU.prototype.setZF = function() /** * setSF() - * + * * @this {X86CPU} */ X86CPU.prototype.setSF = function() @@ -1577,7 +1574,7 @@ X86CPU.prototype.setSF = function() /** * setIF() - * + * * @this {X86CPU} */ X86CPU.prototype.setIF = function() @@ -1587,7 +1584,7 @@ X86CPU.prototype.setIF = function() /** * setDF() - * + * * @this {X86CPU} */ X86CPU.prototype.setDF = function() @@ -1597,7 +1594,7 @@ X86CPU.prototype.setDF = function() /** * setOF() - * + * * @this {X86CPU} */ X86CPU.prototype.setOF = function() @@ -1608,7 +1605,7 @@ X86CPU.prototype.setOF = function() /** * getPS() - * + * * @this {X86CPU} * @return {number} */ @@ -1619,7 +1616,7 @@ X86CPU.prototype.getPS = function() /** * setPS(regPS) - * + * * @this {X86CPU} * @param {number} regPS */ @@ -1648,7 +1645,7 @@ X86CPU.prototype.setPS = function(regPS) /** * traceLog(prop, dst, src, flagsIn, flagsOut, result) - * + * * @this {X86CPU} * @param {string} prop * @param {number} dst @@ -1666,7 +1663,7 @@ X86CPU.prototype.traceLog = function(prop, dst, src, flagsIn, flagsOut, result) /** * setBinding(sHTMLClass, sHTMLType, sBinding, control) - * + * * @this {X86CPU} * @param {string|null} sHTMLClass is the class of the HTML control (eg, "input", "output") * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") @@ -1737,7 +1734,7 @@ X86CPU.prototype.getWord = function(addr) var iBlock = (addr & this.addrMask) >> this.blockShift; /* * On the 8088, it takes 4 cycles to read the additional byte REGARDLESS whether the address is odd or even. - * + * * TODO: For the 8086, the penalty is actually "(addr & 0x1) << 2" (4 additional cycles only when the address is odd). */ this.nStepCycles -= this.nWordCyclePenalty; @@ -1772,7 +1769,7 @@ X86CPU.prototype.setWord = function(addr, w) var iBlock = (addr & this.addrMask) >> this.blockShift; /* * On the 8088, it takes 4 cycles to write the additional byte REGARDLESS whether the address is odd or even. - * + * * TODO: For the 8086, the penalty is actually "(addr & 0x1) << 2" (4 additional cycles only when the address is odd). */ this.nStepCycles -= this.nWordCyclePenalty; @@ -2142,7 +2139,7 @@ X86CPU.prototype.advancePrefetch = function(inc) * getIPByte() * * NOTE: We don't need to mask the incoming regEIP, because regEIP is always masked after update. - * + * * @this {X86CPU} * @return {number} byte at the current IP; IP advanced by 1 */ @@ -2157,7 +2154,7 @@ X86CPU.prototype.getIPByte = function() * getIPDisp() * * NOTE: We don't need to mask the incoming regEIP, because regEIP is always masked after update. - * + * * @this {X86CPU} * @return {number} sign-extended value from the byte at the current IP; IP advanced by 1 */ @@ -2172,7 +2169,7 @@ X86CPU.prototype.getIPDisp = function() * getIPWord() * * NOTE: We don't need to mask the incoming regEIP, because regEIP is always masked after update. - * + * * @this {X86CPU} * @return {number} word at the current IP; IP advanced by 2 */ @@ -2185,7 +2182,7 @@ X86CPU.prototype.getIPWord = function() /** * popWord() - * + * * @this {X86CPU} * @return {number} word popped from the current SP; SP increased by 2 */ @@ -2198,7 +2195,7 @@ X86CPU.prototype.popWord = function() /** * pushWord(w) - * + * * @this {X86CPU} * @param {number} w is the word (16-bit) value to push at current SP; SP decreased by 2 */ @@ -2239,28 +2236,28 @@ X86CPU.prototype.pushWord = function(w) * intFlags has been overloaded with the INTFLAG.TRAP bit as well, since the acknowledgment of h/w interrupts * and the Trap flag are similar; they must both honor the NOINTR suppression flag, and stepCPU() shouldn't * have to check multiple variables when deciding whether to simulate an interrupt. - * + * * This function also includes a check for the new async INTFLAG.DMA flag, which is triggered by a ChipSet call * to setDMA(). This DMA flag actually has nothing to do with interrupts; it's simply an expedient way to * piggy-back on the CPU's execution logic, to help drive async DMA requests. - * + * * Originally, DMA requests (eg, FDC or HDC I/O operations) were all handled synchronously, since no actual * I/O was required to satisfy the request; from the CPU's perspective, this meant our DMA hardware was * incredibly fast. However, with the introduction of remote disk connections, some actual I/O may be required; * in practice, this means that the FIRST byte requested as part of a DMA operation may require a callback to * finish, while all remaining bytes will be retrieved during subsequent checkINTR() calls -- unless additional * remote I/O operations are required to complete the DMA operation. - * + * * As a result, the CPU will run slightly slower while an async DMA request is in progress, but the slowdown * should be negligible. The downside is that this slowdown will be in effect for the entire duration of the * I/O (ie, even while we're waiting for the remote I/O to finish), so the ChipSet component should avoid * calling setDMA() whenever possible. - * + * * TODO: While comparing SYMDEB tracing in both PCjs and VMware, I noticed that after single-stepping * ANY segment-load instruction, SYMDEB would get control immediately after that instruction in VMware, * whereas I delay acknowledgment of the Trap flag until the *following* instruction, so in PCjs, SYMDEB * doesn't get control until the following instruction. I think PCjs behavior is correct, at least for SS. - * + * * ERRATA: I do recall that early revisions of the 8086/8088 failed to suppress hardware interrupts (and * possibly also Trap acknowledgements) after an SS load, but that Intel corrected the problem at some point; * however, I don't know when that change was made or which IBM PC models may have been affected, if any. @@ -2313,7 +2310,7 @@ X86CPU.prototype.checkINTR = function() * This is how the PIC component simulates raising the INTFLAG.INTR signal. We will honor the request * only if we have a reference back to the ChipSet component. The CPU will then "respond" by calling * checkINTR() and request the corresponding interrupt vector from the ChipSet. - * + * * @this {X86CPU} * @param {boolean} fRaise is true to raise INTFLAG.INTR, false to lower */ @@ -2343,7 +2340,7 @@ X86CPU.prototype.updateINTR = function(fRaise) * * I'm assuming this never happens in practice because the PIC isn't that fast. But for us to * guarantee that, we need to provide this function to the ChipSet component. - * + * * @this {X86CPU} */ X86CPU.prototype.delayINTR = function() @@ -2353,7 +2350,7 @@ X86CPU.prototype.delayINTR = function() /** * displayStatus() - * + * * @this {X86CPU} */ X86CPU.prototype.displayStatus = function() @@ -2423,7 +2420,7 @@ X86CPU.prototype.stepCPU = function(nMinCycles) this.fComplete = true; /* - * fDebugCheck is true if we need to "check" every instruction with the Debugger. The Debugger will + * fDebugCheck is true if we need to "check" every instruction with the Debugger. The Debugger will * call cpu.stepCPU(n) with n == 0 if it's executing only ONE instruction (ie, the user just clicked the * "Step" button, or they've issued a "t" or "t1" command). Otherwise, it will call with n == 1 * (ie, the user is holding the "Step" button, or they've issued a "t#" command where # > 1). @@ -2450,7 +2447,7 @@ X86CPU.prototype.stepCPU = function(nMinCycles) * NOTE: I have moved updateAllTimers() from runCPU() to here. The effect is exactly the same, except * that this placement also insures that if the Debugger is doing a lot of single-stepping, all the timers * will still get updated. - * + * * In a typical PC configuration, the timer(s) should be updated a MINIMUM of 18.2 times per second, * otherwise there's no way to guarantee the standard 18.2 interrupts per second (and in fact, our update * frequency should probably be a bit higher, otherwise the delivery of timer interrupts may be rather @@ -2465,11 +2462,11 @@ X86CPU.prototype.stepCPU = function(nMinCycles) * to allow Debugger interactions to affect the behavior of the virtual machine in ANY way, but I'm making * this small concession to avoid the occasional and sometimes unexpected Debugger command that ends up * stepping into a hardware interrupt service routine (ISR). - * + * * Note that this is similar to the problem discussed in checkINTR() regarding the priority of external h/w * interrupts vs. Trap interrupts, but they require different solutions, because our Debugger operates * independently of the CPU. - * + * * One exception I make here is when you've asked the Debugger to display PIC messages, the idea being that * if you're watching the PIC that closely, then you want to hardware interrupts to occur regardless. */ @@ -2502,13 +2499,13 @@ X86CPU.prototype.stepCPU = function(nMinCycles) * opHLT() sets X86.INTFLAG.HALT, signalling to us that we're free to end the current burst * AND that we should not execute any more instructions until checkINTR() indicates a hardware * interrupt has been requested. - * + * * One downside to this approach is that it *might* appear to the careful observer that we * executed a full complement of instructions during bursts where X86.INTFLAG.HALT was set, * when in fact we did not. However, the steady advance of the overall cycle count, and thus * the steady series calls to stepCPU(), is needed to ensure that timer updates, video updates, * etc, all continue to occur at the expected rates. - * + * * If necessary, we can add another bookkeeping cycle counter (eg, one that keeps tracks of the * number of cycles during which we did not actually execute any instructions). */ @@ -2530,31 +2527,31 @@ X86CPU.prototype.stepCPU = function(nMinCycles) this.nBusCycles = 0; this.nSnapCycles = this.nStepCycles; } - + this.aOps[this.getIPByte()].call(this); - + if (PREFETCH) { var nSpareCycles = (this.nSnapCycles - this.nStepCycles) - this.nBusCycles; if (nSpareCycles >= 4) { this.fillPrefetch(nSpareCycles >> 2); // for every 4 spare cycles, fetch 1 instruction byte } } - + if (DEBUG) { /* * Some opcode helpers are required to temporarily redirect getEAByte/getEAWord or setEAByte/setEAWord * to null functions, effectively disabling a memory read that's unnecessary (or a memory write that could * be destructive). However, they weren't originally required to restore those memory functions when they * were done; we would simply reset all the memory functions here, after every single instruction. - * + * * That's no longer the case. Those opcode helpers (or their callers) are now required to restore the * memory access functions to their defaults, so that we don't have to waste time resetting them here, on - * every instruction. The DEBUG-only verifyMemoryEnabled() simply confirms that everyone's doing their job. + * every instruction. The DEBUG-only verifyMemoryEnabled() simply confirms that everyone's doing their job. */ this.verifyMemoryEnabled(); - + /* - * Make sure that every instruction is assessing a cycle cost, and that the cost is a net positive. + * Make sure that every instruction is assessing a cycle cost, and that the cost is a net positive. */ if (this.nStepCycles >= this.nSnapCycles && !(this.opFlags & X86.OPFLAG.PREFIXES)) { this.println("cycle miscount: " + (this.nSnapCycles - this.nStepCycles)); diff --git a/versions/pcjs/1.15.5/pc-dbg.js b/versions/pcjs/1.15.5/pc-dbg.js index 06ea06d2e..92c854d6a 100644 --- a/versions/pcjs/1.15.5/pc-dbg.js +++ b/versions/pcjs/1.15.5/pc-dbg.js @@ -8,95 +8,95 @@ n.send(q)}else n.open("GET",a,b),n.send();a=[];b||(h=n.responseText,200!=n.statu function va(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function wa(a,b,c){function d(){a-=1;0<=a&&(b()||(a=0));0=this.cg?12:14;this.ec=1<>2;this.eb=this.ec-1;this.Zg=(this.ue+this.ec)/this.ec|0;this.ye=this.Zg-1;this.rd=[];this.sd=[];this.Zf=this.$f=!1;this.Mi();this.Ta()}y(x,Va); -Va.prototype.Mi=function(){this.Aa=Array(this.Zg);for(var a=0;a>a.rb;0>this.rb;0>a.rb;0>a.rb].tg(b&a.eb)} +function(a,b,c){this.ca(a,"notice",c)}),!0;default:return!1}},log:function(){},ca:function(){},status:function(a){this.ca(this.sh+": "+a)},Ga:function(a,b){b||w(a)},Ta:function(a){!this.jd&&(this.nh=!1!==a)&&(this.name&&this.log("ready"),a=this.Fi,this.Fi=null,a&&a())},$b:function(){return this.Nb=!0},Wb:function(a,b){b&&(this.Nb=!1);return!0}};function Pa(a,b){if(a.vi)return a.Kc&&(a.Kc=!1),a.vi=!1;if(a.jd)return a.ca(a.toString()+" error"),!1;a.Kc=b;return a.Kc} +function Qa(a,b){a.Kc&&(b?a.vi=!0:void 0===b&&a.ca(a.toString()+" busy"));return a.Kc}function Ra(a,b){b&&(a.nh?b():a.Fi=b);return a.nh}function Sa(a,b){a.jd=!0;a.Ga("Fatal error: "+b)}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);function Ta(a){x.call(this,"Panel",a,Ta)}y(x,Ta);Ta.prototype.xb=function(a,b,c,d){return this.Da&&this.Da.xb(a,b,c,d)||this.S&&this.S.xb(a,b,c,d)||this.bb&&this.bb.xb(a,b,c,d)||this.X&&this.X.xb(a,b,c,d)?!0:x.prototype.xb.call(this,a,b,c,d)}; +Ta.prototype.nc=function(a,b,c,d){this.Da=a;this.S=c;this.X=d;this.bb=C(a,"Keyboard")};Ta.prototype.$b=function(a,b){b||Ua();return!0};Ta.prototype.Wb=function(){return!0};function Ua(){for(var a=!1,b=B(window.document,"pcjs","panel"),c=0;c=this.cg?12:14;this.ec=1<>2;this.eb=this.ec-1;this.Zg=(this.ue+this.ec)/this.ec|0;this.ye=this.Zg-1;this.rd=[];this.sd=[];this.Zf=this.$f=!1;this.Li();this.Ta()}y(x,Va); +Va.prototype.Li=function(){this.Aa=Array(this.Zg);for(var a=0;a>a.rb;0>this.rb;0>a.rb;0>a.rb].tg(b&a.eb)} function cb(a,b){var c=b&a.eb,d=(b&a.Ib)>>a.rb;return c!=a.eb?a.Aa[d].Oj(c):a.Aa[d++].tg(c)|a.Aa[d&a.ye].tg(0)<<8}function db(a,b,c){a.Aa[(b&a.Ib)>>a.rb].Bg(b&a.eb,c&255)}function eb(a,b,c){var d=b&a.eb;b=(b&a.Ib)>>a.rb;d!=a.eb?a.Aa[b].Xj(d,c&65535):(a.Aa[b++].Bg(d,c&255),a.Aa[b&a.ye].Bg(0,c>>8&255))} -function fb(a){for(var b=0,c=[],d=0;d>2);for(d=0;d>2]>>>((a&3)<<3)&255},hp:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ra[b]>>>a;return 24>a?c&65535:c&255|(this.ra[b+1]&255)<<8},pp:function(a,b){var c=a>> +function nb(a,b,c,d){var e=a.sd[b];void 0!==e?(e[1]&&e[1].call(e[0],b,c,d),a.X&&a.$f!=e[2]&&ob(a.X,b,c)):a.X&&(a.X.ba(a,b,c,d),a.$f&&ob(a.X,b,c))}function $a(a,b,c){w("Memory block error ("+a+","+p(b)+","+p(c)+")");return!1}function Xa(a,b,c,d){this.zm=b;this.ra=null;this.offset=0;this.mh=c;this.ia=null;this.mb=this.wk=!1;if(b)if(d)this.ia=d,a=[d.ed,a-d.cb],this.ra=a[0],this.offset=a[1],this.Pe(d.Jf);else{this.ra=Array(b>>2);for(d=0;d>2]>>>((a&3)<<3)&255},hp:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ra[b]>>>a;return 24>a?c&65535:c&255|(this.ra[b+1]&255)<<8},pp:function(a,b){var c=a>> 2,d=(a&3)<<3;this.ra[c]=this.ra[c]&~(255<>2,d=(a&3)<<3;24>d?this.ra[c]=this.ra[c]&~(65535<>8);this.mb=!0},gp:function(a){qb(this.X,this.Wd+a);return this.tg(a)},ip:function(a){qb(this.X,this.Wd+a)||qb(this.X,this.Wd+a+1);return this.Oj(a)},qp:function(a,b){rb(this.X,this.Wd+a);this.Bg(a,b)},sp:function(a,b){rb(this.X,this.Wd+a)||rb(this.X,this.Wd+a+1);this.Xj(a,b)},save:function(){return this.ia? -null:this.ra},restore:function(a){return this.ia?null===a:this.zm==a.length<<2?(this.ra=a,this.mb=!0):!1},Pe:function(a,b){a||(a=[]);void 0===b&&(b=!0);sb(this,a,b);tb(this,a,b)},Vd:function(a,b){b?0===this.rk++&&tb(this,ub):0===this.qk++&&sb(this,ub)}};function wb(a,b){b?0===--a.rk&&(a.Cc=a.mh?a.xf:a.Bg,a.jm=a.mh?a.xf:a.Xj):0===--a.qk&&(a.qc=a.tg,a.Xl=a.Oj)}function Wa(a,b,c,d,e){a.S=b;a.X=c;a.Wd=d;a.qk=a.rk=0;a.X&&xb(a.X,d,e)} -function tb(a,b,c){a.Cc=b[2]&&!a.mh?b[2]:a.xf;a.jm=b[3]&&!a.mh?b[3]:a.xf;c&&(a.Bg=b[2]?b[2]:a.xf,a.Xj=b[3]?b[3]:a.xf)}function sb(a,b,c){a.qc=b[0]?b[0]:a.Jh;a.Xl=b[1]?b[1]:a.Jh;c&&(a.tg=b[0]?b[0]:a.Jh,a.Oj=b[1]?b[1]:a.Jh)}var pb=[Xa.prototype.fp,Xa.prototype.hp,Xa.prototype.pp,Xa.prototype.rp],ub=[Xa.prototype.gp,Xa.prototype.ip,Xa.prototype.qp,Xa.prototype.sp]; -function yb(a,b){x.call(this,"CPU",a,yb);var c=a.multiplier||1;this.Hd=a.cycles||b;this.Gd=c;this.wh=Math.round(this.Hd/1E4)/100;this.Ge=this.wh*this.Gd;this.Nb=this.Mb=!1;this.vi=a.autoStart;c=Fa.autostart;void 0!==c&&(this.vi="true"==c?!0:"false"==c?!1:null);this.cf=!1;this.dg=this.mf=0;this.fg=a.csStart;this.lf=a.csInterval;this.nf=a.csStop;var d=this;this.jo=function(){d.Ne()};this.Ta()}y(x,yb);k=yb.prototype; -k.mc=function(a,b,c,d){this.na=b;this.X=d;this.Da=a;var e=C(a,"Video");e&&(this.qi=function(){zb(e)},this.Md=function(){e.Md()});this.ka=C(a,"ChipSet");this.Ta()};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};k.$b=function(a,b){if(!b){if(a&&this.restore){Ab(this);if(!this.restore(a))return!1;Bb(this)}else this.reset();this.X?this.X.Ln():this.ca("No debugger detected")}this.Mb=!0;!Cb(this)&&this.X&&Db(this.X);Eb(this);return!0}; -k.Wb=function(a){this.Mb=!1;return a&&this.save?this.save():!0};function Cb(a){return!0===a.vi||null===a.vi&&!a.X&&void 0===a.sa.run?(a.Ne(),!0):!1}k.Md=function(){};k.Ek=function(){return 0};function Bb(a){void 0===a.fg&&(a.fg=0);void 0===a.lf&&(a.lf=-1);void 0===a.nf&&(a.nf=-1);a.cf=0<=a.fg&&0=a.mf&&(a.mf+=a.lf,c=!0);0<=a.nf&&a.nf<=F(a)&&(a.lf=a.nf=-1,Bb(a),a.Ab(),c=!0);c&&a.ca(F(a)+" cycles: checksum="+p(a.dg))}}function G(a,b,c,d){void 0!==a.sa[b]&&(void 0===d&&(d=4),void 0===c&&(Sa(a,"Register "+b+" is invalid"),a.Ab()),c=p(c,d),a.sa[b].innerHTML!=c&&(a.sa[b].innerHTML=c))}k.eh=function(){};k.qi=function(){}; -k.xb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.sa[c]=d;d.onclick=function(){e.Nb?e.Ab(!0):e.Ne(!0)};a=!0;break;case "reset":this.sa[c]=d;d.onclick=function(){e.Da&&Gb(e.Da)};a=!0;break;case "speed":this.sa[c]=d;a=!0;break;case "setSpeed":this.sa[c]=d,d.onclick=function(){Hb(e,e.Gd<<1,!0)},d.innerHTML=this.Ge.toFixed(2)+"Mhz",a=!0}return a};function Ib(a,b,c){a.Ke+=b;c&&(a.Nc=a.A=0)} -function Jb(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1a.wh&&(c=Math.round(c/a.Gd));return c}function Ab(a){a.ld=0;a.zh=1;a.Ke=a.ke=a.Nc=a.A=0;Bb(a);Hb(a,1)} +null:this.ra},restore:function(a){return this.ia?null===a:this.zm==a.length<<2?(this.ra=a,this.mb=!0):!1},Pe:function(a,b){a||(a=[]);void 0===b&&(b=!0);sb(this,a,b);tb(this,a,b)},Vd:function(a,b){b?0===this.qk++&&tb(this,ub):0===this.pk++&&sb(this,ub)}};function wb(a,b){b?0===--a.qk&&(a.Dc=a.mh?a.xf:a.Bg,a.im=a.mh?a.xf:a.Xj):0===--a.pk&&(a.sc=a.tg,a.Wl=a.Oj)}function Wa(a,b,c,d,e){a.S=b;a.X=c;a.Wd=d;a.pk=a.qk=0;a.X&&xb(a.X,d,e)} +function tb(a,b,c){a.Dc=b[2]&&!a.mh?b[2]:a.xf;a.im=b[3]&&!a.mh?b[3]:a.xf;c&&(a.Bg=b[2]?b[2]:a.xf,a.Xj=b[3]?b[3]:a.xf)}function sb(a,b,c){a.sc=b[0]?b[0]:a.Ih;a.Wl=b[1]?b[1]:a.Ih;c&&(a.tg=b[0]?b[0]:a.Ih,a.Oj=b[1]?b[1]:a.Ih)}var pb=[Xa.prototype.fp,Xa.prototype.hp,Xa.prototype.pp,Xa.prototype.rp],ub=[Xa.prototype.gp,Xa.prototype.ip,Xa.prototype.qp,Xa.prototype.sp]; +function yb(a,b){x.call(this,"CPU",a,yb);var c=a.multiplier||1;this.Hd=a.cycles||b;this.Gd=c;this.wh=Math.round(this.Hd/1E4)/100;this.Ge=this.wh*this.Gd;this.Ob=this.Nb=!1;this.ui=a.autoStart;c=Fa.autostart;void 0!==c&&(this.ui="true"==c?!0:"false"==c?!1:null);this.cf=!1;this.dg=this.mf=0;this.fg=a.csStart;this.lf=a.csInterval;this.nf=a.csStop;var d=this;this.jo=function(){d.Ne()};this.Ta()}y(x,yb);k=yb.prototype; +k.nc=function(a,b,c,d){this.na=b;this.X=d;this.Da=a;var e=C(a,"Video");e&&(this.pi=function(){zb(e)},this.Md=function(){e.Md()});this.ka=C(a,"ChipSet");this.Ta()};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};k.$b=function(a,b){if(!b){if(a&&this.restore){Ab(this);if(!this.restore(a))return!1;Bb(this)}else this.reset();this.X?this.X.Ln():this.ca("No debugger detected")}this.Nb=!0;!Cb(this)&&this.X&&Db(this.X);Eb(this);return!0}; +k.Wb=function(a){this.Nb=!1;return a&&this.save?this.save():!0};function Cb(a){return!0===a.ui||null===a.ui&&!a.X&&void 0===a.sa.run?(a.Ne(),!0):!1}k.Md=function(){};k.Dk=function(){return 0};function Bb(a){void 0===a.fg&&(a.fg=0);void 0===a.lf&&(a.lf=-1);void 0===a.nf&&(a.nf=-1);a.cf=0<=a.fg&&0=a.mf&&(a.mf+=a.lf,c=!0);0<=a.nf&&a.nf<=F(a)&&(a.lf=a.nf=-1,Bb(a),a.Ab(),c=!0);c&&a.ca(F(a)+" cycles: checksum="+p(a.dg))}}function G(a,b,c,d){void 0!==a.sa[b]&&(void 0===d&&(d=4),void 0===c&&(Sa(a,"Register "+b+" is invalid"),a.Ab()),c=p(c,d),a.sa[b].innerHTML!=c&&(a.sa[b].innerHTML=c))}k.eh=function(){};k.pi=function(){}; +k.xb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.sa[c]=d;d.onclick=function(){e.Ob?e.Ab(!0):e.Ne(!0)};a=!0;break;case "reset":this.sa[c]=d;d.onclick=function(){e.Da&&Gb(e.Da)};a=!0;break;case "speed":this.sa[c]=d;a=!0;break;case "setSpeed":this.sa[c]=d,d.onclick=function(){Hb(e,e.Gd<<1,!0)},d.innerHTML=this.Ge.toFixed(2)+"Mhz",a=!0}return a};function Ib(a,b,c){a.Ke+=b;c&&(a.Oc=a.A=0)} +function Jb(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1a.wh&&(c=Math.round(c/a.Gd));return c}function Ab(a){a.ld=0;a.zh=1;a.Ke=a.ke=a.Oc=a.A=0;Bb(a);Hb(a,1)} function Hb(a,b,c){void 0!==b&&(0.8>a.ld/a.Ge&&(b=1),a.Gd=b,b=a.wh*a.Gd,a.Ge!=b&&(a.Ge=b,b=a.Ge.toFixed(2)+"Mhz",a.sa.setSpeed&&(a.sa.setSpeed.innerHTML=b),a.ca("target speed: "+b)),c&&a.Md());Ib(a,a.ke);a.ke=0;a.kf=oa();a.He=0;Jb(a)} -k.Ne=function(a){if(Pa(this,!0)){this.Nb||(Hb(this),this.Da&&this.Da.start(this.kf,F(this)),this.Nb=!0,this.ka&&Kb(this.ka),this.sa.run&&(this.sa.run.innerHTML="Halt"),a&&this.Md());this.Hj>=this.Hd&&Jb(this,!0);this.ig=0;this.xh=oa();this.He&&(a=this.xh-this.He,a>this.Lk&&(this.kf+=a,this.kf>this.xh&&(this.kf=this.xh)));try{do{this.wf(this.cf?1:Math.round(this.$n/this.zh));var b=this.Nc-this.A;this.ke+=b;this.ig+=b;Ib(this,0,!0);Fb(this,b);this.hg-=b;0>=this.hg&&(this.hg+=this.Pk,this.qi());this.gg-= -b;0>=this.gg&&(this.gg+=this.Ok,this.eh());this.of-=b;if(0>=this.of){this.of+=this.Ti;break}}while(this.Nb)}catch(c){this.Ab();Eb(this);this.Da&&this.Da.stop(oa(),F(this));Pa(this,!1);Sa(this,c.message);return}b=setTimeout;a=this.jo;this.He=oa();var d=this.Lk;this.ig&&(d=Math.round(d*this.ig/this.Ti));var d=d-(this.He-this.xh),e=this.He-this.kf;e&&(this.ld=Math.round(this.ke/(10*e))/100,864E5<=e&&(this.Ke=0,this.ka&&Lb(this.ka,!0),Hb(this)));if(0>d||this.ld=this.Hd&&Jb(this,!0);this.ig=0;this.xh=oa();this.He&&(a=this.xh-this.He,a>this.Kk&&(this.kf+=a,this.kf>this.xh&&(this.kf=this.xh)));try{do{this.wf(this.cf?1:Math.round(this.$n/this.zh));var b=this.Oc-this.A;this.ke+=b;this.ig+=b;Ib(this,0,!0);Fb(this,b);this.hg-=b;0>=this.hg&&(this.hg+=this.Ok,this.pi());this.gg-= +b;0>=this.gg&&(this.gg+=this.Nk,this.eh());this.of-=b;if(0>=this.of){this.of+=this.Si;break}}while(this.Ob)}catch(c){this.Ab();Eb(this);this.Da&&this.Da.stop(oa(),F(this));Pa(this,!1);Sa(this,c.message);return}b=setTimeout;a=this.jo;this.He=oa();var d=this.Kk;this.ig&&(d=Math.round(d*this.ig/this.Si));var d=d-(this.He-this.xh),e=this.He-this.kf;e&&(this.ld=Math.round(this.ke/(10*e))/100,864E5<=e&&(this.Ke=0,this.ka&&Lb(this.ka,!0),Hb(this)));if(0>d||this.ld>13;return this.Ua=e}if(b&&768>=b)return this.oa=a,this.Mc=c,this.ab=d,this.Lc=(d&24576)>>13,this.Ua=e}return-1}function Wb(a){return this.Ua+a} -function Xb(a){return this.Ua+a}function Sb(a,b,c){return a+b<=this.Mc?this.Ua+a:Ub.call(this,0,0,c)}function Ub(a,b,c){c||Yb.call(this.S,13,0);return-1}function Tb(a,b,c){return a+b<=this.Mc?this.Ua+a:Vb.call(this,0,0,c)}function Vb(a,b,c){c||Yb.call(this.S,13,0);return-1}Nb.prototype.save=function(){return[this.oa,this.Ua,this.Mc,this.ab,this.Lc,this.xg]};Nb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.oa=a[0],this.Ua=a[1],this.Mc=a[2],this.ab=a[3],this.Lc=a[4],this.xg=a[5])}; -function Pb(a,b){void 0===b&&(b=!!(a.S.ad&1));b?(a.load=Rb,a.Vc=Sb,a.Yb=Tb):(a.load=Qb,a.Vc=Wb,a.Yb=Xb)} -function Zb(a){this.Fa=a.model||8088;var b=0;switch(this.Fa){default:case 8088:b=4772727;break;case 80286:b=6E6}yb.call(this,a,b);this.dk=61442;this.Jg=4;this.pf=255;this.Ij=4;this.aa=5;this.ta=6;this.fa=7;this.ga=8;this.P=9;this.V=11;this.W=12;this.Ie=4;this.Rk=60;this.Sk=83;this.Tb=3;this.sb=9;this.fc=16;this.Dh=1;this.Wk=19;this.Yk=28;this.$k=16;this.Zk=21;this.Xk=37;this.Uk=2;this.aj=9;this.Vk=5;this.Tk=33;this.cj=10;this.bj=8;this.mg=3;this.lg=15;this.nl=51;this.ol=1;this.pl=2;this.ql=4;this.ml= -32;this.sl=this.dj=15;this.Ub=16;this.Vb=4;this.ul=11;this.tl=18;this.rl=24;this.Cb=4;this.vl=2;this.ej=16;this.wl=17;this.jj=18;this.xl=19;this.ij=5;this.kj=6;this.Cl=2;this.Bl=8;this.zl=9;this.mj=this.lj=this.yl=this.Al=10;this.bl=80;this.dl=144;this.al=86;this.cl=154;this.fl=101;this.hl=165;this.el=107;this.gl=171;this.El=70;this.Gl=113;this.Dl=76;this.Fl=124;this.jl=80;this.ll=128;this.il=86;this.kl=134;this.og=3;this.ng=16;this.rj=10;this.qj=8;this.Hl=51;this.gc=8;this.Il=17;this.Jl=36;this.oc= -11;this.Kl=16;this.pg=10;this.Ob=2;this.Yi=18;this.Zi=9-this.Ob;this.$i=17-this.Ob;this.fj=12;this.gj=9-this.Ob;this.hj=13-this.Ob;this.nj=18;this.oj=9-this.Ob;this.pj=17-this.Ob;this.sj=15;this.tj=9-this.Ob;this.uj=15-this.Ob;this.yj=11;this.zj=9-this.Ob;this.Aj=10-this.Ob;this.Ll=8;this.Ol=12;this.Ml=18;this.Nl=17;this.Pl=15;this.wj=8;this.vj=20;this.xj=2;this.Dj=3;this.qg=9;this.Cj=5;this.Bj=11;this.Fj=4;this.Ej=17;this.Ql=11;this.Sa=$b.slice();80186<=this.Fa&&(this.pf=31,this.Sa[15]=ac,this.Sa[96]= -bc,this.Sa[97]=cc,this.Sa[98]=dc,this.Sa[99]=ac,this.Sa[100]=ac,this.Sa[101]=ac,this.Sa[102]=ac,this.Sa[103]=ac,this.Sa[104]=ec,this.Sa[105]=fc,this.Sa[106]=gc,this.Sa[107]=hc,this.Sa[108]=ic,this.Sa[109]=jc,this.Sa[110]=kc,this.Sa[111]=lc,this.Sa[192]=mc,this.Sa[193]=nc,this.Sa[200]=oc,this.Sa[201]=pc,this.Sa[241]=qc,rc[7]=sc,tc[7]=sc,80286<=this.Fa&&(this.dk=2,this.Jg=0,this.Sa[15]=uc,this.Sa[99]=vc,this.Sa[84]=wc,this.P=this.ga=this.fa=this.ta=this.aa=this.Ij=0,this.W=this.V=1,this.Ie=3,this.Rk= -14,this.Sk=16,this.Tb=2,this.fc=this.sb=7,this.Dh=0,this.Wk=7,this.Yk=13,this.$k=7,this.Zk=11,this.Xk=16,this.Uk=3,this.aj=6,this.Vk=2,this.Tk=13,this.bj=this.cj=5,this.mg=2,this.lg=7,this.nl=23,this.ol=0,this.pl=1,this.ql=3,this.ml=17,this.dj=7,this.sl=11,this.Ub=7,this.Vb=3,this.ul=7,this.tl=11,this.rl=15,this.Cb=2,this.vl=3,this.ej=7,this.xl=this.jj=this.wl=8,this.kj=this.ij=4,this.Cl=2,this.Bl=3,this.zl=5,this.Al=2,this.yl=3,this.lj=5,this.mj=3,this.bl=14,this.dl=22,this.al=17,this.cl=25,this.fl= -17,this.hl=25,this.el=20,this.gl=28,this.El=13,this.Gl=21,this.Dl=16,this.Fl=24,this.jl=13,this.ll=21,this.il=16,this.kl=24,this.og=2,this.ng=7,this.qj=this.rj=5,this.Hl=19,this.Il=this.gc=5,this.Jl=17,this.oc=3,this.Kl=5,this.pg=3,this.Ob=0,this.Yi=8,this.Zi=5,this.$i=9,this.gj=this.fj=5,this.hj=4,this.oj=this.nj=5,this.pj=4,this.sj=7,this.tj=5,this.uj=8,this.yj=3,this.zj=4,this.Aj=3,this.Ol=this.Ll=11,this.Nl=this.Ml=15,this.Pl=7,this.wj=5,this.vj=8,this.xj=0,this.Dj=2,this.qg=6,this.Cj=3,this.Bj= -6,this.Fj=3,this.Ql=this.Ej=5));this.Lg=[];this.Mg=[];this.Nc=this.ah=0;this.kh=this.zi=!1;this.Aa=[];this.ue=this.Ib=this.rb=this.eb=this.ye=0;this.T=this.Jm;this.U=this.Km;this.N=this.Rn;this.O=this.Sn;this.Q=this.np;this.R=this.op;xc(this)}y(yb,Zb);k=Zb.prototype;k.Mi=function(a,b,c,d,e){this.Aa=a;this.ue=this.Ib=b;this.rb=c;this.eb=d;this.ye=e};k.reset=function(){this.Nb&&this.Ab();xc(this);Ab(this);this.jd=!1}; -function xc(a){a.G=0;a.B=0;a.I=0;a.J=0;a.Y=0;a.H=0;a.F=0;a.D=0;a.ad=65520;a.dd=0;a.te=1023;a.Ic={Jj:0,oa:0,ab:0,vh:-1};a.ua=new Nb(a,"CS");a.Eb=new Nb(a,"DS");a.wb=new Nb(a,"SS");a.Za=new Nb(a,"ES");a.gm=new Nb(a,"ZERO");yc(a,0,65535);80286<=a.Fa&&(a.Rc=a.Ye=0,a.Ld=new Nb(a,"LDT",!0),a.Ag=new Nb(a,"TSS",!0),a.Pb=new Nb(a,"VER",!0),yc(a,65520,61440),a.ua.Ua=16711680);zc(a,0);Ac(a);a.nb=0;a.Db=a.ug=-1;a.Ug=0;a.ha=a.Ka=-1;a.C=a.Eb;a.M=a.wb;a.$=a.wa=0} -k.Ek=function(){var a=this.G+this.B+this.I+this.J+this.Y+this.H+this.F+this.D|0;return a=a+this.qa+this.ua.oa+this.Eb.oa+this.wb.oa+this.Za.oa+Bc(this)|0};function Cc(a,b,c,d){void 0!==d&&(void 0===a.Lg[b]&&(a.Lg[b]=[]),a.Lg[b].push([c,d]))}function Dc(a,b){a.zi&&32>b&&16!=b&&22!=b&&28!=b&&E(a.X,a.X.$j)&&(Ec(a.X,b,a.Ba),Fc(a,a.Ba,function(a,c){return function(d){Gc(a.X,b,d,F(a)-c)}}(a,F(a))));var c=a.Lg[b];if(void 0!==c)for(var d=0;d>13;return this.Ua=e}if(b&&768>=b)return this.oa=a,this.Nc=c,this.ab=d,this.Mc=(d&24576)>>13,this.Ua=e}return-1}function Wb(a){return this.Ua+a} +function Xb(a){return this.Ua+a}function Sb(a,b,c){return a+b<=this.Nc?this.Ua+a:Ub.call(this,0,0,c)}function Ub(a,b,c){c||Yb.call(this.S,13,0);return-1}function Tb(a,b,c){return a+b<=this.Nc?this.Ua+a:Vb.call(this,0,0,c)}function Vb(a,b,c){c||Yb.call(this.S,13,0);return-1}Nb.prototype.save=function(){return[this.oa,this.Ua,this.Nc,this.ab,this.Mc,this.xg]};Nb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.oa=a[0],this.Ua=a[1],this.Nc=a[2],this.ab=a[3],this.Mc=a[4],this.xg=a[5])}; +function Pb(a,b){void 0===b&&(b=!!(a.S.ad&1));b?(a.load=Rb,a.Wc=Sb,a.Yb=Tb):(a.load=Qb,a.Wc=Wb,a.Yb=Xb)} +function Zb(a){this.Fa=a.model||8088;var b=0;switch(this.Fa){default:case 8088:b=4772727;break;case 80286:b=6E6}yb.call(this,a,b);this.dk=61442;this.Jg=4;this.pf=255;this.Ij=4;this.aa=5;this.ta=6;this.fa=7;this.ga=8;this.P=9;this.V=11;this.W=12;this.Ie=4;this.Qk=60;this.Rk=83;this.Tb=3;this.sb=9;this.gc=16;this.Ch=1;this.Vk=19;this.Xk=28;this.Zk=16;this.Yk=21;this.Wk=37;this.Tk=2;this.aj=9;this.Uk=5;this.Sk=33;this.cj=10;this.bj=8;this.mg=3;this.lg=15;this.ml=51;this.nl=1;this.ol=2;this.pl=4;this.ll= +32;this.rl=this.dj=15;this.Ub=16;this.Vb=4;this.tl=11;this.sl=18;this.ql=24;this.Cb=4;this.ul=2;this.ej=16;this.vl=17;this.jj=18;this.wl=19;this.ij=5;this.kj=6;this.Bl=2;this.Al=8;this.yl=9;this.mj=this.lj=this.xl=this.zl=10;this.al=80;this.cl=144;this.$k=86;this.bl=154;this.el=101;this.gl=165;this.dl=107;this.fl=171;this.Dl=70;this.Fl=113;this.Cl=76;this.El=124;this.il=80;this.kl=128;this.hl=86;this.jl=134;this.og=3;this.ng=16;this.rj=10;this.qj=8;this.Gl=51;this.hc=8;this.Hl=17;this.Il=36;this.pc= +11;this.Jl=16;this.pg=10;this.Pb=2;this.Yi=18;this.Zi=9-this.Pb;this.$i=17-this.Pb;this.fj=12;this.gj=9-this.Pb;this.hj=13-this.Pb;this.nj=18;this.oj=9-this.Pb;this.pj=17-this.Pb;this.sj=15;this.tj=9-this.Pb;this.uj=15-this.Pb;this.yj=11;this.zj=9-this.Pb;this.Aj=10-this.Pb;this.Kl=8;this.Nl=12;this.Ll=18;this.Ml=17;this.Ol=15;this.wj=8;this.vj=20;this.xj=2;this.Dj=3;this.qg=9;this.Cj=5;this.Bj=11;this.Fj=4;this.Ej=17;this.Pl=11;this.Sa=$b.slice();80186<=this.Fa&&(this.pf=31,this.Sa[15]=ac,this.Sa[96]= +bc,this.Sa[97]=cc,this.Sa[98]=dc,this.Sa[99]=ac,this.Sa[100]=ac,this.Sa[101]=ac,this.Sa[102]=ac,this.Sa[103]=ac,this.Sa[104]=ec,this.Sa[105]=fc,this.Sa[106]=gc,this.Sa[107]=hc,this.Sa[108]=ic,this.Sa[109]=jc,this.Sa[110]=kc,this.Sa[111]=lc,this.Sa[192]=mc,this.Sa[193]=nc,this.Sa[200]=oc,this.Sa[201]=pc,this.Sa[241]=qc,rc[7]=sc,tc[7]=sc,80286<=this.Fa&&(this.dk=2,this.Jg=0,this.Sa[15]=uc,this.Sa[99]=vc,this.Sa[84]=wc,this.P=this.ga=this.fa=this.ta=this.aa=this.Ij=0,this.W=this.V=1,this.Ie=3,this.Qk= +14,this.Rk=16,this.Tb=2,this.gc=this.sb=7,this.Ch=0,this.Vk=7,this.Xk=13,this.Zk=7,this.Yk=11,this.Wk=16,this.Tk=3,this.aj=6,this.Uk=2,this.Sk=13,this.bj=this.cj=5,this.mg=2,this.lg=7,this.ml=23,this.nl=0,this.ol=1,this.pl=3,this.ll=17,this.dj=7,this.rl=11,this.Ub=7,this.Vb=3,this.tl=7,this.sl=11,this.ql=15,this.Cb=2,this.ul=3,this.ej=7,this.wl=this.jj=this.vl=8,this.kj=this.ij=4,this.Bl=2,this.Al=3,this.yl=5,this.zl=2,this.xl=3,this.lj=5,this.mj=3,this.al=14,this.cl=22,this.$k=17,this.bl=25,this.el= +17,this.gl=25,this.dl=20,this.fl=28,this.Dl=13,this.Fl=21,this.Cl=16,this.El=24,this.il=13,this.kl=21,this.hl=16,this.jl=24,this.og=2,this.ng=7,this.qj=this.rj=5,this.Gl=19,this.Hl=this.hc=5,this.Il=17,this.pc=3,this.Jl=5,this.pg=3,this.Pb=0,this.Yi=8,this.Zi=5,this.$i=9,this.gj=this.fj=5,this.hj=4,this.oj=this.nj=5,this.pj=4,this.sj=7,this.tj=5,this.uj=8,this.yj=3,this.zj=4,this.Aj=3,this.Nl=this.Kl=11,this.Ml=this.Ll=15,this.Ol=7,this.wj=5,this.vj=8,this.xj=0,this.Dj=2,this.qg=6,this.Cj=3,this.Bj= +6,this.Fj=3,this.Pl=this.Ej=5));this.Lg=[];this.Mg=[];this.Oc=this.ah=0;this.kh=this.yi=!1;this.Aa=[];this.ue=this.Ib=this.rb=this.eb=this.ye=0;this.T=this.Jm;this.U=this.Km;this.N=this.Rn;this.O=this.Sn;this.Q=this.np;this.R=this.op;xc(this)}y(yb,Zb);k=Zb.prototype;k.Li=function(a,b,c,d,e){this.Aa=a;this.ue=this.Ib=b;this.rb=c;this.eb=d;this.ye=e};k.reset=function(){this.Ob&&this.Ab();xc(this);Ab(this);this.jd=!1}; +function xc(a){a.G=0;a.B=0;a.I=0;a.J=0;a.Y=0;a.H=0;a.F=0;a.D=0;a.ad=65520;a.dd=0;a.te=1023;a.Jc={Jj:0,oa:0,ab:0,vh:-1};a.ua=new Nb(a,"CS");a.Eb=new Nb(a,"DS");a.wb=new Nb(a,"SS");a.Za=new Nb(a,"ES");a.fm=new Nb(a,"ZERO");yc(a,0,65535);80286<=a.Fa&&(a.Sc=a.Ye=0,a.Ld=new Nb(a,"LDT",!0),a.Ag=new Nb(a,"TSS",!0),a.Qb=new Nb(a,"VER",!0),yc(a,65520,61440),a.ua.Ua=16711680);zc(a,0);Ac(a);a.nb=0;a.Db=a.ug=-1;a.Ug=0;a.ha=a.Ka=-1;a.C=a.Eb;a.M=a.wb;a.$=a.wa=0} +k.Dk=function(){var a=this.G+this.B+this.I+this.J+this.Y+this.H+this.F+this.D|0;return a=a+this.qa+this.ua.oa+this.Eb.oa+this.wb.oa+this.Za.oa+Bc(this)|0};function Cc(a,b,c,d){void 0!==d&&(void 0===a.Lg[b]&&(a.Lg[b]=[]),a.Lg[b].push([c,d]))}function Dc(a,b){a.yi&&E(a.X,a.X.$j)&&(Ec(a.X,b,a.Ba),Fc(a,a.Ba,function(a,c){return function(d){Gc(a.X,b,d,F(a)-c)}}(a,F(a))));var c=a.Lg[b];if(void 0!==c)for(var d=0;d>1?128:0} function Zc(a){return(a.ja^a.ma^a.ja>>1)&a.da>>1?2048:0}function $c(a){a.Z&=~a.da}function ad(a){a.ma=a.ja&16|a.ma&-17}function bd(a){a.Z|=a.da-1}function cd(a){Yc(a)&&(a.ja^=a.da>>1|a.da>>2,a.ma^=32896)}function dd(a){a.ja&=~a.da;a.ma=a.ja&32896|a.ma&-32897}function ed(a){a.Z|=a.da}function fd(a){a.ma=~(a.ja&16)&16|a.ma&-17}function gd(a){a.Z&=~(a.da-1)}function hd(a){Yc(a)||(a.ja^=a.da>>1|a.da>>2,a.ma^=32896)}function id(a){a.ja|=a.da;a.ma=a.ja&32896|a.ma&-32897} -function Bc(a){return a.ya&-2262|Uc(a)|Vc(a)|Wc(a)|Xc(a)|Yc(a)|Zc(a)}function zc(a,b){a.da=256;a.Z=a.ja=a.ma=0;b&1&&ed(a);b&4||(a.ja|=1);b&16&&(a.ma|=16);b&64||bd(a);b&128&&hd(a);b&2048&&id(a);a.ya=a.ya&-1793|b&1792|a.dk;a.ya&256&&(a.nb|=2,a.$|=4)} -k.xb=function(a,b,c,d){var e=!1;switch(c){case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "CS":case "DS":case "SS":case "ES":case "IP":case "PC":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "O":this.sa[c]=d;e=!0;break;default:e=yb.prototype.xb.call(this,a,b,c,d)}return e};k.ub=function(a){return this.Aa[(a&this.Ib)>>this.rb].qc(a&this.eb)}; -k.Ia=function(a){var b=a&this.eb;a=(a&this.Ib)>>this.rb;this.A-=this.Ij;return b!=this.eb?this.Aa[a].Xl(b):this.Aa[a++].qc(b)|this.Aa[a&this.ye].qc(0)<<8};k.bd=function(a,b){this.Aa[(a&this.Ib)>>this.rb].Cc(a&this.eb,b&255)};k.Nd=function(a,b){var c=a&this.eb,d=(a&this.Ib)>>this.rb;this.A-=this.Ij;c!=this.eb?this.Aa[d].jm(c,b&65535):(this.Aa[d++].Cc(c,b&255),this.Aa[d&this.ye].Cc(0,b>>8&255))};k.Jm=function(a,b){this.zg=a;this.ha=a.Vc(this.rg=b,0);return this.$&1?0:this.ub(this.ha)}; -k.Km=function(a,b){this.zg=a;this.ha=a.Vc(this.rg=b,1);return this.$&1?0:this.Ia(this.ha)};k.Rn=function(a,b){this.zg=a;this.Ka=this.ha=a.Vc(this.rg=b,0);return this.$&1?0:this.ub(this.ha)};k.Sn=function(a,b){this.zg=a;this.Ka=this.ha=a.Vc(this.rg=b,1);return this.$&1?0:this.Ia(this.ha)};k.np=function(a){this.$&2||this.bd(this.zg.Yb(this.rg,1),a)};k.op=function(a){this.$&2||this.Nd(this.zg.Yb(this.rg,2),a)};k.ea=function(){var a=this.ub(this.Ba);this.Ba=this.ua.Ua+(this.qa=this.qa+1&65535);return a}; -k.L=function(){var a=this.ub(this.Ba)<<24>>24;this.Ba=this.ua.Ua+(this.qa=this.qa+1&65535);return a&65535};k.K=function(){var a=this.Ia(this.Ba);this.Ba=this.ua.Ua+(this.qa=this.qa+2&65535);return a};k.Ja=function(){var a=this.Y;this.Y=this.Y+2&65535;return this.Ia(this.wb.Vc(a,1))};function K(a,b){var c=a.Y=a.Y-2&65535;a.Nd(a.wb.Yb(c,1),b)} +function Bc(a){return a.xa&-2262|Uc(a)|Vc(a)|Wc(a)|Xc(a)|Yc(a)|Zc(a)}function zc(a,b){a.da=256;a.Z=a.ja=a.ma=0;b&1&&ed(a);b&4||(a.ja|=1);b&16&&(a.ma|=16);b&64||bd(a);b&128&&hd(a);b&2048&&id(a);a.xa=a.xa&-1793|b&1792|a.dk;a.xa&256&&(a.nb|=2,a.$|=4)} +k.xb=function(a,b,c,d){var e=!1;switch(c){case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "CS":case "DS":case "SS":case "ES":case "IP":case "PC":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "O":this.sa[c]=d;e=!0;break;default:e=yb.prototype.xb.call(this,a,b,c,d)}return e};k.ub=function(a){return this.Aa[(a&this.Ib)>>this.rb].sc(a&this.eb)}; +k.Ia=function(a){var b=a&this.eb;a=(a&this.Ib)>>this.rb;this.A-=this.Ij;return b!=this.eb?this.Aa[a].Wl(b):this.Aa[a++].sc(b)|this.Aa[a&this.ye].sc(0)<<8};k.bd=function(a,b){this.Aa[(a&this.Ib)>>this.rb].Dc(a&this.eb,b&255)};k.Nd=function(a,b){var c=a&this.eb,d=(a&this.Ib)>>this.rb;this.A-=this.Ij;c!=this.eb?this.Aa[d].im(c,b&65535):(this.Aa[d++].Dc(c,b&255),this.Aa[d&this.ye].Dc(0,b>>8&255))};k.Jm=function(a,b){this.zg=a;this.ha=a.Wc(this.rg=b,0);return this.$&1?0:this.ub(this.ha)}; +k.Km=function(a,b){this.zg=a;this.ha=a.Wc(this.rg=b,1);return this.$&1?0:this.Ia(this.ha)};k.Rn=function(a,b){this.zg=a;this.Ka=this.ha=a.Wc(this.rg=b,0);return this.$&1?0:this.ub(this.ha)};k.Sn=function(a,b){this.zg=a;this.Ka=this.ha=a.Wc(this.rg=b,1);return this.$&1?0:this.Ia(this.ha)};k.np=function(a){this.$&2||this.bd(this.zg.Yb(this.rg,1),a)};k.op=function(a){this.$&2||this.Nd(this.zg.Yb(this.rg,2),a)};k.ea=function(){var a=this.ub(this.Ba);this.Ba=this.ua.Ua+(this.qa=this.qa+1&65535);return a}; +k.L=function(){var a=this.ub(this.Ba)<<24>>24;this.Ba=this.ua.Ua+(this.qa=this.qa+1&65535);return a&65535};k.K=function(){var a=this.Ia(this.Ba);this.Ba=this.ua.Ua+(this.qa=this.qa+2&65535);return a};k.Ja=function(){var a=this.Y;this.Y=this.Y+2&65535;return this.Ia(this.wb.Wc(a,1))};function K(a,b){var c=a.Y=a.Y-2&65535;a.Nd(a.wb.Yb(c,1),b)} k.eh=function(){G(this,"AX",this.G);G(this,"BX",this.B);G(this,"CX",this.I);G(this,"DX",this.J);G(this,"SP",this.Y);G(this,"BP",this.H);G(this,"SI",this.F);G(this,"DI",this.D);G(this,"CS",this.ua.oa);G(this,"DS",this.Eb.oa);G(this,"SS",this.wb.oa);G(this,"ES",this.Za.oa);G(this,"IP",this.qa);var a=Bc(this);G(this,"PS",a);G(this,"C",a&1?1:0,1);G(this,"P",a&4?1:0,1);G(this,"A",a&16?1:0,1);G(this,"Z",a&64?1:0,1);G(this,"S",a&128?1:0,1);G(this,"T",a&256?1:0,1);G(this,"I",a&512?1:0,1);G(this,"D",a&1024? -1:0,1);G(this,"O",a&2048?1:0,1);this.sa.speed&&(this.sa.speed.innerHTML=this.Nb&&this.ld?this.ld.toFixed(2)+"Mhz":"Stopped")}; -k.wf=function(a){this.kh=!0;this.zi=a&&this.X&&jd(this.X);this.Nc=this.A=a;this.ka&&Lb(this.ka);a||!this.X||E(this.X,this.X.Te)||(this.$|=4);do{var b=this.$&240;if(b)this.wa|=b;else if(this.Gh=this.Ba,this.ha=this.Ka=-1,this.C=this.Eb,this.M=this.wb,this.wa=this.$&256,this.nb){a:{if(!(this.$&4))if(this.nb&1&&this.ya&512){if(b=kd(this.ka),-1<=b&&(this.nb&=-2,0<=b)){this.nb&=-5;ld.call(this,b,null,11);b=!0;break a}}else if(this.nb&2){this.nb&=-3;ld.call(this,1,null,11);b=!0;break a}if(b=this.nb&8){for(var b= -this.ka,c=!1,d=0;dthis.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=a+b)&255}function pd(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a|b)&255} -function qd(a,b){this.ma=a^b;this.Z=this.ja=a+b+(this.Z&this.da?1:0);this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return this.Z&255}function rd(a,b){this.ma=a^b;this.Z=this.ja=a-b-(this.Z&this.da?1:0);this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return this.Z&255}function sd(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a&b)&255} -function td(a,b){this.ma=a^b;this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=a-b)&255}function ud(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a^b)&255}function vd(a,b){this.ma=a^b;this.da=256;this.Z=this.ja=a-b;this.A-=0>this.Ka?0>this.ha?this.Tb:this.aj:this.sb;this.$|=2;return a} -function wd(a,b){this.ma=a^b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=a+b)&65535}function xd(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a|b)&65535}function yd(a,b){this.ma=a^b;this.Z=this.ja=a+b+(this.Z&this.da?1:0);this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return this.Z&65535} -function zd(a,b){this.ma=a^b;this.Z=this.ja=a-b-(this.Z&this.da?1:0);this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return this.Z&65535}function Ad(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a&b)&65535}function Bd(a,b){this.ma=a^b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=a-b)&65535} -function Cd(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.fc;return(this.Z=this.ja=this.ma=a^b)&65535}function Dd(a,b){this.ma=a^b;this.da=65536;this.Z=this.ja=a-b;this.A-=0>this.Ka?0>this.ha?this.Tb:this.aj:this.sb;this.$|=2;return a}function Ed(a,b){this.Z=this.Z&this.da-1|(a&b?this.da:0);(a^a>>1)&b>>1?id(this):dd(this)}function Fd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<>8-e)&255:d=a<<8;Ed.call(this,d,256)}return c} +1:0,1);G(this,"O",a&2048?1:0,1);this.sa.speed&&(this.sa.speed.innerHTML=this.Ob&&this.ld?this.ld.toFixed(2)+"Mhz":"Stopped")}; +k.wf=function(a){this.kh=!0;this.yi=a&&this.X&&jd(this.X);this.Oc=this.A=a;this.ka&&Lb(this.ka);a||!this.X||E(this.X,this.X.Te)||(this.$|=4);do{var b=this.$&240;if(b)this.wa|=b;else if(this.Fh=this.Ba,this.ha=this.Ka=-1,this.C=this.Eb,this.M=this.wb,this.wa=this.$&256,this.nb){a:{if(!(this.$&4))if(this.nb&1&&this.xa&512){if(b=kd(this.ka),-1<=b&&(this.nb&=-2,0<=b)){this.nb&=-5;ld.call(this,b,null,11);b=!0;break a}}else if(this.nb&2){this.nb&=-3;ld.call(this,1,null,11);b=!0;break a}if(b=this.nb&8){for(var b= +this.ka,c=!1,d=0;dthis.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=a+b)&255}function pd(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a|b)&255} +function qd(a,b){this.ma=a^b;this.Z=this.ja=a+b+(this.Z&this.da?1:0);this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return this.Z&255}function rd(a,b){this.ma=a^b;this.Z=this.ja=a-b-(this.Z&this.da?1:0);this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return this.Z&255}function sd(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a&b)&255} +function td(a,b){this.ma=a^b;this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=a-b)&255}function ud(a,b){this.da=256;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a^b)&255}function vd(a,b){this.ma=a^b;this.da=256;this.Z=this.ja=a-b;this.A-=0>this.Ka?0>this.ha?this.Tb:this.aj:this.sb;this.$|=2;return a} +function wd(a,b){this.ma=a^b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=a+b)&65535}function xd(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a|b)&65535}function yd(a,b){this.ma=a^b;this.Z=this.ja=a+b+(this.Z&this.da?1:0);this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return this.Z&65535} +function zd(a,b){this.ma=a^b;this.Z=this.ja=a-b-(this.Z&this.da?1:0);this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return this.Z&65535}function Ad(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a&b)&65535}function Bd(a,b){this.ma=a^b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=a-b)&65535} +function Cd(a,b){this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Tb:this.sb:this.gc;return(this.Z=this.ja=this.ma=a^b)&65535}function Dd(a,b){this.ma=a^b;this.da=65536;this.Z=this.ja=a-b;this.A-=0>this.Ka?0>this.ha?this.Tb:this.aj:this.sb;this.$|=2;return a}function Ed(a,b){this.Z=this.Z&this.da-1|(a&b?this.da:0);(a^a>>1)&b>>1?id(this):dd(this)}function Fd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<>8-e)&255:d=a<<8;Ed.call(this,d,256)}return c} function Gd(a,b){var c=a;if(b){var d,e=b&15;e?c=(d=a<>16-e)&65535:d=a<<16;Ed.call(this,d,65536)}return c}function Hd(a,b){var c=a;if(b){var d,c=b&7,c=d=(a>>c|a<<8-c)&255;d&128&&(d|=256);Ed.call(this,d,256)}return c}function Id(a,b){var c=a;if(b){var d,c=b&15,c=d=(a>>c|a<<16-c)&65535;d&32768&&(d|=65536);Ed.call(this,d,65536)}return c} function Jd(a,b){var c=a;if(b){var d;(d=(b&this.pf)%9)?(d=a<>9-d,c=d&255):d=a|(this.Z&this.da?1:0)<<8;Ed.call(this,d,256)}return c}function Kd(a,b){var c=a;if(b){var d;(d=(b&this.pf)%17)?(d=a<>17-d,c=d&65535):d=a|(this.Z&this.da?1:0)<<16;Ed.call(this,d,65536)}return c}function Ld(a,b){var c=a;b&&(c=(b&this.pf)%9,c=a>>c|(this.Z&this.da?1:0)<<8-c|a<<9-c,Ed.call(this,c,256),c&=255);return c} function Md(a,b){var c=a;b&&(c=(b&this.pf)%17,c=a>>c|(this.Z&this.da?1:0)<<16-c|a<<17-c,Ed.call(this,c,65536),c&=65535);return c}function Nd(a,b){var c=a;b&&(c=8>b-1;this.Z=this.ja=c>>1;this.Z=c&1?this.Z|256:this.Z&-257;this.ma=a^this.Z;this.da=256;a=this.Z}return a&255}function Qd(a,b){if(b){var c=16>b-1;this.Z=this.ja=c>>1;this.Z=c&1?this.Z|65536:this.Z&-65537;this.ma=a^this.Z;this.da=65536;a=this.Z}return a&65535}function Rd(a,b){if(b){8>24>>b-1;this.Z=this.ja=c>>1;this.Z=c&1?this.Z|256:this.Z&-257;this.ma=a^this.Z;this.da=256;a=this.Z}return a&255} -function Sd(a,b){if(b){16>16>>b-1;this.Z=this.ja=c>>1;this.Z=c&1?this.Z|65536:this.Z&-65537;this.ma=a^this.Z;this.da=65536;a=this.Z}return a&65535}function Td(){this.A-=0>this.ha?2:this.Pl;return 1}function Ud(){var a=this.I&this.pf;this.A-=(0>this.ha?this.wj:this.vj)+(a<this.ha?this.wj:this.vj)+(a<>16>>b-1;this.Z=this.ja=c>>1;this.Z=c&1?this.Z|65536:this.Z&-65537;this.ma=a^this.Z;this.da=65536;a=this.Z}return a&65535}function Td(){this.A-=0>this.ha?2:this.Ol;return 1}function Ud(){var a=this.I&this.pf;this.A-=(0>this.ha?this.wj:this.vj)+(a<this.ha?this.wj:this.vj)+(a<this.Ka?this.gc:this.Il;return b},$d,$d,$d,$d,$d,$d,$d],de=[function(a,b){this.A-=0>this.Ka?this.Al:this.yl;return b},L,L,L,L,L,L,L],ee=[Fd,Hd,Jd,Ld,Nd,Pd,L,Rd],fe=[Gd,Id,Kd,Md,Od,Qd,L,Sd],he=[function(a,b){b=this.ea();this.Z=this.ja=this.ma=a&b;this.da=256;this.A-=0>this.ha?this.Cj:this.Bj;this.$|=2;return a},L,function(a){this.A-=0>this.ha?this.og:this.ng;return a^255},function(a,b){b=0;this.ma=a^b;this.da= -256;this.A-=0>this.ha?this.og:this.ng;return(this.Z=this.ja=b-a)&255},function(a){this.G=this.Db=(this.Z=(this.G&255)*a)&65535;this.ma=this.ja=this.Z;this.da=256;this.G&65280?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.El:this.Dl;this.$|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.Db=b&65535;this.Z=this.ma=this.ja=b;this.da=256;127b?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.jl:this.il;this.$|=2;return a},function(a){if(!a)return ge.call(this), -a;var b=this.G/a;if(255this.ha?this.bl:this.al;this.$|=2;return a},function(a){if(!a)return ge.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return ge.call(this),a;this.Db=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.ja=this.ma=this.Z=b|256;this.da=256;this.A-=0>this.ha?this.fl:this.el;this.$|=2;return a}],ie=[function(a,b){b=this.K();this.Z=this.ja= -this.ma=a&b;this.da=65536;this.A-=0>this.ha?this.Cj:this.Bj;this.$|=2;return a},L,function(a){this.A-=0>this.ha?this.og:this.ng;return a^65535},function(a,b){b=0;this.ma=a^b;this.da=65536;this.A-=0>this.ha?this.og:this.ng;return(this.Z=this.ja=b-a)&65535},function(a){this.Db=this.G=(this.Z=this.G*a)&65535;this.ug=this.J=this.Z>>16&65535;this.ma=this.ja=this.Z;this.da=65536;this.J?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.Gl:this.Fl;this.$|=2;return a},function(a){var b=(this.G<< -16>>16)*(a<<16>>16);this.G=this.Db=b&65535;this.J=this.ug=b>>16&65535;this.Z=this.ma=this.ja=b;this.da=65536;32767b?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.ll:this.kl;this.$|=2;return a},function(a,b){if(!a)return ge.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return ge.call(this),a;this.Db=this.G=c&65535;this.ug=this.J=b%a&65535;this.ja=this.ma=this.Z=c|65536;this.da=65536;this.A-=0>this.ha?this.dl:this.cl;this.$|=2;return a},function(a, -b){if(!a)return ge.call(this),a;var c=a<<16>>16;b=this.J<<16|this.G;var d=Math.floor(b/c);if(d!=(d&65535)<<16>>16)return ge.call(this),a;this.Db=this.G=d&65535;this.ug=this.J=b%c&65535;this.ja=this.ma=this.Z=d|65536;this.da=65536;this.A-=0>this.ha?this.hl:this.gl;this.$|=2;return a}],rc=[function(a){this.ma=a;a=(this.ja=a+1)&255;this.Z=a|(this.Z&this.da?1:0)<<8;this.da=256;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){this.ma=a;a=(this.ja=a-1)&255;this.Z=a|(this.Z&this.da?1:0)<<8;this.da= -256;this.A-=0>this.ha?this.mg:this.lg;return a},L,L,L,L,L,L],tc=[function(a){this.ma=a;a=(this.ja=a+1)&65535;this.Z=a|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){this.ma=a;a=(this.ja=a-1)&65535;this.Z=a|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){K(this,this.qa);I(this,a);this.A-=0>this.ha?this.$k:this.Zk;this.$|=2;return a},function(a){if(0>this.ha)return L.call(this,a);K(this,this.ua.oa);K(this, -this.qa);yc(this,a,this.Ia(this.ha+2));this.A-=this.Xk;this.$|=2;return a},function(a){I(this,a);this.A-=0>this.ha?this.ul:this.tl;this.$|=2;return a},function(a){if(0>this.ha)return L.call(this,a);yc(this,a,this.Ia(this.ha+2));this.A-=this.rl;this.$|=2;return a},function(a){var b=a;this.$&512&&(a=a-2&65535,80286>this.Fa&&(b=a));K(this,b);this.A-=0>this.ha?this.oc:this.Kl;this.$|=2;return a},$d],je=[Fd,Hd,Jd,Ld,Nd,Pd,L,Rd],ke=[Gd,Id,Kd,Md,Od,Qd,L,Sd]; -function le(a,b){this.A-=0>this.Ka?0>this.ha?this.Cl:this.Bl:this.zl;return b}function me(){return le.call(this,0,this.Db)}function ne(a,b){this.Z=this.ja=this.ma=a&b;this.da=256;this.A-=0>this.Ka?0>this.ha?this.Dj:this.qg:this.qg;this.$|=2;return a}function oe(a,b){this.Z=this.ja=this.ma=a&b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Dj:this.qg:this.qg;this.$|=2;return a} -function pe(a,b){var c=(b<<16>>16)*(this.ea()<<24>>24);this.Z=this.ma=this.ja=c;this.da=256;32767c?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?21:24;return c&65535}function qe(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.Z=this.ma=this.ja=c;this.da=65536;32767c?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?21:24;return c&65535}function re(a){return a}function se(a){if(0>this.ha)return M.call(this),a;this.A-=this.vl;return this.ha} -function te(a,b){if(0>this.ha)return M.call(this),a;Oc(this,this.Ia(this.ha+2));this.A-=this.ej;return b}function ue(a,b){if(0>this.ha)return M.call(this),a;Tc(this,this.Ia(this.ha+2));this.A-=this.ej;return b}function ve(a){if(0>this.ha)return ac.call(this),a;var b=a<<16>>16,c=this.Ia(this.ha)<<16>>16,d=this.Ia(this.ha+2)<<16>>16;this.A-=this.Tk;if(bd)I(this,this.Gh-this.ua.Ua),ld.call(this,5,null,0);this.$|=2;return a} -function we(a,b){this.A-=10+(0>this.ha?0:1);if((a&3)<(b&3))return a=a&-4|b&3,gd(this),a;bd(this);return a}function xe(a,b){this.A-=14+(0>this.ha?0:2);if(0<=this.Pb.load(b,!0)&&this.Pb.Lc>=(this.ua.oa&3)&&this.Pb.Lc>=(b&3))return gd(this),this.Pb.ab&65280;bd(this);return a}function ye(a,b){this.A-=14+(0>this.ha?0:2);if(b&65528&&0<=this.Pb.load(b,!0)&&(3072==(this.Pb.ab&3072)||this.Pb.Lc>=(this.ua.oa&3))&&this.Pb.Lc>=(b&3))return gd(this),this.Pb.Mc;bd(this);return a} +var ae=[od,pd,qd,rd,sd,td,ud,vd],be=[wd,xd,yd,zd,Ad,Bd,Cd,Dd],ce=[function(a,b){this.A-=0>this.Ka?this.hc:this.Hl;return b},$d,$d,$d,$d,$d,$d,$d],de=[function(a,b){this.A-=0>this.Ka?this.zl:this.xl;return b},L,L,L,L,L,L,L],ee=[Fd,Hd,Jd,Ld,Nd,Pd,L,Rd],fe=[Gd,Id,Kd,Md,Od,Qd,L,Sd],he=[function(a,b){b=this.ea();this.Z=this.ja=this.ma=a&b;this.da=256;this.A-=0>this.ha?this.Cj:this.Bj;this.$|=2;return a},L,function(a){this.A-=0>this.ha?this.og:this.ng;return a^255},function(a,b){b=0;this.ma=a^b;this.da= +256;this.A-=0>this.ha?this.og:this.ng;return(this.Z=this.ja=b-a)&255},function(a){this.G=this.Db=(this.Z=(this.G&255)*a)&65535;this.ma=this.ja=this.Z;this.da=256;this.G&65280?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.Dl:this.Cl;this.$|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.Db=b&65535;this.Z=this.ma=this.ja=b;this.da=256;127b?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.il:this.hl;this.$|=2;return a},function(a){if(!a)return ge.call(this), +a;var b=this.G/a;if(255this.ha?this.al:this.$k;this.$|=2;return a},function(a){if(!a)return ge.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return ge.call(this),a;this.Db=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.ja=this.ma=this.Z=b|256;this.da=256;this.A-=0>this.ha?this.el:this.dl;this.$|=2;return a}],ie=[function(a,b){b=this.K();this.Z=this.ja= +this.ma=a&b;this.da=65536;this.A-=0>this.ha?this.Cj:this.Bj;this.$|=2;return a},L,function(a){this.A-=0>this.ha?this.og:this.ng;return a^65535},function(a,b){b=0;this.ma=a^b;this.da=65536;this.A-=0>this.ha?this.og:this.ng;return(this.Z=this.ja=b-a)&65535},function(a){this.Db=this.G=(this.Z=this.G*a)&65535;this.ug=this.J=this.Z>>16&65535;this.ma=this.ja=this.Z;this.da=65536;this.J?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.Fl:this.El;this.$|=2;return a},function(a){var b=(this.G<< +16>>16)*(a<<16>>16);this.G=this.Db=b&65535;this.J=this.ug=b>>16&65535;this.Z=this.ma=this.ja=b;this.da=65536;32767b?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?this.kl:this.jl;this.$|=2;return a},function(a,b){if(!a)return ge.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return ge.call(this),a;this.Db=this.G=c&65535;this.ug=this.J=b%a&65535;this.ja=this.ma=this.Z=c|65536;this.da=65536;this.A-=0>this.ha?this.cl:this.bl;this.$|=2;return a},function(a, +b){if(!a)return ge.call(this),a;var c=a<<16>>16;b=this.J<<16|this.G;var d=Math.floor(b/c);if(d!=(d&65535)<<16>>16)return ge.call(this),a;this.Db=this.G=d&65535;this.ug=this.J=b%c&65535;this.ja=this.ma=this.Z=d|65536;this.da=65536;this.A-=0>this.ha?this.gl:this.fl;this.$|=2;return a}],rc=[function(a){this.ma=a;a=(this.ja=a+1)&255;this.Z=a|(this.Z&this.da?1:0)<<8;this.da=256;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){this.ma=a;a=(this.ja=a-1)&255;this.Z=a|(this.Z&this.da?1:0)<<8;this.da= +256;this.A-=0>this.ha?this.mg:this.lg;return a},L,L,L,L,L,L],tc=[function(a){this.ma=a;a=(this.ja=a+1)&65535;this.Z=a|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){this.ma=a;a=(this.ja=a-1)&65535;this.Z=a|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=0>this.ha?this.mg:this.lg;return a},function(a){K(this,this.qa);I(this,a);this.A-=0>this.ha?this.Zk:this.Yk;this.$|=2;return a},function(a){if(0>this.ha)return L.call(this,a);K(this,this.ua.oa);K(this, +this.qa);yc(this,a,this.Ia(this.ha+2));this.A-=this.Wk;this.$|=2;return a},function(a){I(this,a);this.A-=0>this.ha?this.tl:this.sl;this.$|=2;return a},function(a){if(0>this.ha)return L.call(this,a);yc(this,a,this.Ia(this.ha+2));this.A-=this.ql;this.$|=2;return a},function(a){var b=a;this.$&512&&(a=a-2&65535,80286>this.Fa&&(b=a));K(this,b);this.A-=0>this.ha?this.pc:this.Jl;this.$|=2;return a},$d],je=[Fd,Hd,Jd,Ld,Nd,Pd,L,Rd],ke=[Gd,Id,Kd,Md,Od,Qd,L,Sd]; +function le(a,b){this.A-=0>this.Ka?0>this.ha?this.Bl:this.Al:this.yl;return b}function me(){return le.call(this,0,this.Db)}function ne(a,b){this.Z=this.ja=this.ma=a&b;this.da=256;this.A-=0>this.Ka?0>this.ha?this.Dj:this.qg:this.qg;this.$|=2;return a}function oe(a,b){this.Z=this.ja=this.ma=a&b;this.da=65536;this.A-=0>this.Ka?0>this.ha?this.Dj:this.qg:this.qg;this.$|=2;return a} +function pe(a,b){var c=(b<<16>>16)*(this.ea()<<24>>24);this.Z=this.ma=this.ja=c;this.da=256;32767c?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?21:24;return c&65535}function qe(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.Z=this.ma=this.ja=c;this.da=65536;32767c?(ed(this),id(this)):($c(this),dd(this));this.A-=0>this.ha?21:24;return c&65535}function re(a){return a}function se(a){if(0>this.ha)return M.call(this),a;this.A-=this.ul;return this.ha} +function te(a,b){if(0>this.ha)return M.call(this),a;Oc(this,this.Ia(this.ha+2));this.A-=this.ej;return b}function ue(a,b){if(0>this.ha)return M.call(this),a;Tc(this,this.Ia(this.ha+2));this.A-=this.ej;return b}function ve(a){if(0>this.ha)return ac.call(this),a;var b=a<<16>>16,c=this.Ia(this.ha)<<16>>16,d=this.Ia(this.ha+2)<<16>>16;this.A-=this.Sk;if(bd)I(this,this.Fh-this.ua.Ua),ld.call(this,5,null,0);this.$|=2;return a} +function we(a,b){this.A-=10+(0>this.ha?0:1);if((a&3)<(b&3))return a=a&-4|b&3,gd(this),a;bd(this);return a}function xe(a,b){this.A-=14+(0>this.ha?0:2);if(0<=this.Qb.load(b,!0)&&this.Qb.Mc>=(this.ua.oa&3)&&this.Qb.Mc>=(b&3))return gd(this),this.Qb.ab&65280;bd(this);return a}function ye(a,b){this.A-=14+(0>this.ha?0:2);if(b&65528&&0<=this.Qb.load(b,!0)&&(3072==(this.Qb.ab&3072)||this.Qb.Mc>=(this.ua.oa&3))&&this.Qb.Mc>=(b&3))return gd(this),this.Qb.Nc;bd(this);return a} function ze(a,b){if(0>this.ha){switch(this.Ug&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.J=this.J&-256|a;break;case 3:this.B=this.B&-256|a;break;case 4:this.G=this.G&255|a<<8;break;case 5:this.I=this.I&255|a<<8;break;case 6:this.J=this.J&255|a<<8;break;case 7:this.B=this.B&255|a<<8}this.A-=this.Fj}else this.Ka=this.ha,this.Q(a),this.A-=this.Ej;return b} -function Ae(a,b){if(0>this.ha){switch(this.Ug&7){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.J=a;break;case 3:this.B=a;break;case 4:this.Y=a;break;case 5:this.H=a;break;case 6:this.F=a;break;case 7:this.D=a}this.A-=this.Fj}else this.Ka=this.ha,this.R(a),this.A-=this.Ej;return b}function ld(a,b,c){Mc(this,a)&&(K(this,Bc(this)),this.ya&=this.Ic.vh,K(this,this.ua.oa),K(this,this.qa),null!=b&&K(this,b),yc(this,this.Ic.Jj,this.Ic.oa),this.A-=this.nl+c)} -function ge(){I(this,this.Gh-this.ua.Ua);ld.call(this,0,null,2)}function Yb(a,b){this.X&&E(this.X,this.X.om)&&this.X.message("Fault 0x"+r(a)+(null!=b?" (0x"+u(b)+")":"")+" on opcode 0x"+r(bb(this.na,this.Ba))+" at "+da(this.qa,this.ua.oa));80186<=this.Fa&&(I(this,this.Gh-this.ua.Ua),ld.call(this,a,b,0))}function ac(){Yb.call(this,6);this.Ab()}function M(){I(this,this.Gh-this.ua.Ua);Sa(this,"Undefined opcode 0x"+r(bb(this.na,this.Ba))+" at "+da(this.qa,this.ua.oa));this.Ab()} +function Ae(a,b){if(0>this.ha){switch(this.Ug&7){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.J=a;break;case 3:this.B=a;break;case 4:this.Y=a;break;case 5:this.H=a;break;case 6:this.F=a;break;case 7:this.D=a}this.A-=this.Fj}else this.Ka=this.ha,this.R(a),this.A-=this.Ej;return b}function ld(a,b,c){Mc(this,a)&&(K(this,Bc(this)),this.xa&=this.Jc.vh,K(this,this.ua.oa),K(this,this.qa),null!=b&&K(this,b),yc(this,this.Jc.Jj,this.Jc.oa),this.A-=this.ml+c)} +function ge(){I(this,this.Fh-this.ua.Ua);ld.call(this,0,null,2)}function Yb(a,b){this.X&&E(this.X,this.X.nm)&&this.X.message("Fault 0x"+r(a)+(null!=b?" (0x"+u(b)+")":"")+" on opcode 0x"+r(bb(this.na,this.Ba))+" at "+da(this.qa,this.ua.oa));80186<=this.Fa&&(I(this,this.Fh-this.ua.Ua),ld.call(this,a,b,0))}function ac(){Yb.call(this,6);this.Ab()}function M(){I(this,this.Fh-this.ua.Ua);Sa(this,"Undefined opcode 0x"+r(bb(this.na,this.Ba))+" at "+da(this.qa,this.ua.oa));this.Ab()} function Be(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a}function Ce(a){a=a.call(this,this.G&255,this.I&255);this.G=this.G&-256|a}function De(a){a=a.call(this,this.G&255,this.J&255);this.G=this.G&-256|a}function Ee(a){a=a.call(this,this.G&255,this.B&255);this.G=this.G&-256|a}function Fe(a){a=a.call(this,this.G&255,this.G>>8);this.G=this.G&-256|a}function Ge(a){a=a.call(this,this.G&255,this.I>>8);this.G=this.G&-256|a} function He(a){a=a.call(this,this.G&255,this.J>>8);this.G=this.G&-256|a}function Ie(a){a=a.call(this,this.G&255,this.B>>8);this.G=this.G&-256|a}function Je(a){a=a.call(this,this.I&255,this.G&255);this.I=this.I&-256|a}function Ke(a){a=a.call(this,this.I&255,this.I&255);this.I=this.I&-256|a}function Le(a){a=a.call(this,this.I&255,this.J&255);this.I=this.I&-256|a}function Me(a){a=a.call(this,this.I&255,this.B&255);this.I=this.I&-256|a} function Ne(a){a=a.call(this,this.I&255,this.G>>8);this.I=this.I&-256|a}function Oe(a){a=a.call(this,this.I&255,this.I>>8);this.I=this.I&-256|a}function Pe(a){a=a.call(this,this.I&255,this.J>>8);this.I=this.I&-256|a}function Qe(a){a=a.call(this,this.I&255,this.B>>8);this.I=this.I&-256|a}function Re(a){a=a.call(this,this.J&255,this.G&255);this.J=this.J&-256|a}function Se(a){a=a.call(this,this.J&255,this.I&255);this.J=this.J&-256|a} @@ -372,275 +372,275 @@ function(a,b){this.J=a[5].call(this,this.J,b.call(this))},function(a,b){this.B=a b.call(this))},function(a,b){this.B=a[6].call(this,this.B,b.call(this))},function(a,b){this.$|=512;this.Y=a[6].call(this,this.Y,b.call(this))},function(a,b){this.H=a[6].call(this,this.H,b.call(this))},function(a,b){this.F=a[6].call(this,this.F,b.call(this))},function(a,b){this.D=a[6].call(this,this.D,b.call(this))},function(a,b){this.G=a[7].call(this,this.G,b.call(this))},function(a,b){this.I=a[7].call(this,this.I,b.call(this))},function(a,b){this.J=a[7].call(this,this.J,b.call(this))},function(a, b){this.B=a[7].call(this,this.B,b.call(this))},function(a,b){this.Y=a[7].call(this,this.Y,b.call(this))},function(a,b){this.H=a[7].call(this,this.H,b.call(this))},function(a,b){this.F=a[7].call(this,this.F,b.call(this))},function(a,b){this.D=a[7].call(this,this.D,b.call(this))}],dh=[function(){var a=this.ea();16>(a&56)&&(this.$|=1);bh[a].call(this,Ic,Wd)},function(){var a=this.ea();a&16||(this.$|=1);bh[a].call(this,ch,Wd)},function(){N[this.ea()].call(this,xe)},function(){N[this.ea()].call(this,ye)}, M,M,M,M,M,M,M,ac,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M, -M,M],Jc=[function(){this.A-=2+(0>this.ha?0:1);return this.Ld.oa},function(){this.A-=2+(0>this.ha?0:1);return this.Ag.oa},function(a){this.$|=2;this.Ld.load(a);this.A-=17+(0>this.ha?0:2);return a},function(a){this.$|=2;this.Ag.load(a);this.A-=17+(0>this.ha?0:2);return a},function(a){this.$|=2;this.A-=14+(0>this.ha?0:2);if(0<=this.Pb.load(a,!0)&&2048!=(this.Pb.ab&2560)&&(3072==(this.Pb.ab&3072)||this.Pb.Lc>=(this.ua.oa&3)&&this.Pb.Lc>=(a&3)))return gd(this),a;bd(this);return a},function(a){this.$|= -2;this.A-=14+(0>this.ha?0:2);if(0<=this.Pb.load(a,!0)&&512==(this.Pb.ab&2560)&&this.Pb.Lc>=(this.ua.oa&3)&&this.Pb.Lc>=(a&3))return gd(this),a;bd(this);return a},L,L],Kc=[sc,sc,sc,sc,sc,sc,L,L],Ic=Kc,ch=[function(a){0>this.ha?ac.call(this):(this.Nd(this.ha+2,this.Rc),this.bd(this.ha+4,this.Rc>>16),a=this.Ye-this.Rc,this.A-=11);return a},function(a){0>this.ha?ac.call(this):(this.Nd(this.ha+2,this.dd),this.bd(this.ha+4,this.dd>>16),a=this.te-this.dd,this.A-=12);return a},function(a){0>this.ha?ac.call(this): -(this.Rc=this.Ia(this.ha+2)|this.ub(this.ha+4)<<16,this.Ye=this.Rc+a,this.$|=2,this.A-=11);return a},function(a){0>this.ha?ac.call(this):(this.dd=this.Ia(this.ha+2)|this.ub(this.ha+4)<<16,this.te=this.dd+a,this.$|=2,this.A-=12);return a},function(){this.A-=2+(0>this.ha?0:1);return this.ad},L,function(a){this.ad=this.ad&65520|a&-65521;this.A-=3+(0>this.ha?0:3);this.ad&1&&Ac(this,!0);this.$|=2;return a},L];function uc(){dh[this.ea()].call(this)}function wc(){K(this,this.Y);this.A-=this.oc} -function bc(){var a=this.Y;K(this,this.G);K(this,this.I);K(this,this.J);K(this,this.B);K(this,a);K(this,this.H);K(this,this.F);K(this,this.D);this.A-=this.Jl}function cc(){this.D=this.Ja();this.F=this.Ja();this.H=this.Ja();this.Y+=2;this.B=this.Ja();this.J=this.Ja();this.I=this.Ja();this.G=this.Ja();this.A-=this.Hl}function dc(){N[this.ea()].call(this,ve)}function vc(){Zg[this.ea()].call(this,we)}function ec(){K(this,this.K());this.A-=this.oc}function fc(){N[this.ea()].call(this,qe)} -function gc(){K(this,this.ea());this.A-=this.oc}function hc(){N[this.ea()].call(this,pe)}function ic(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=jb(this.na,this.J,this.Ba-b-1);this.bd(this.Za.Yb(this.D,0),d);this.D=this.D+(this.ya&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}} -function jc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.Ba-b-1,d=jb(this.na,this.J,d)|jb(this.na,this.J,d)<<8;this.Nd(this.Za.Yb(this.D,1),d);this.D=this.D+(this.ya&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}} -function kc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.ub(this.Eb.Vc(this.F,0));this.F=this.F+(this.ya&1024?-1:1)&65535;this.A-=c;this.I-=b;nb(this.na,this.J,d,this.Ba-b-1);a&&(J(this,-2),this.$|=256)}} -function lc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.Ia(this.Eb.Vc(this.F,1));this.F=this.F+(this.ya&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Ba-b-1;nb(this.na,this.J,d&255,b);nb(this.na,this.J,d>>8,b);a&&(J(this,-2),this.$|=256)}}function eh(){var a=this.L();Zc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function fh(){var a=this.L();Zc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)} +M,M],Jc=[function(){this.A-=2+(0>this.ha?0:1);return this.Ld.oa},function(){this.A-=2+(0>this.ha?0:1);return this.Ag.oa},function(a){this.$|=2;this.Ld.load(a);this.A-=17+(0>this.ha?0:2);return a},function(a){this.$|=2;this.Ag.load(a);this.A-=17+(0>this.ha?0:2);return a},function(a){this.$|=2;this.A-=14+(0>this.ha?0:2);if(0<=this.Qb.load(a,!0)&&2048!=(this.Qb.ab&2560)&&(3072==(this.Qb.ab&3072)||this.Qb.Mc>=(this.ua.oa&3)&&this.Qb.Mc>=(a&3)))return gd(this),a;bd(this);return a},function(a){this.$|= +2;this.A-=14+(0>this.ha?0:2);if(0<=this.Qb.load(a,!0)&&512==(this.Qb.ab&2560)&&this.Qb.Mc>=(this.ua.oa&3)&&this.Qb.Mc>=(a&3))return gd(this),a;bd(this);return a},L,L],Kc=[sc,sc,sc,sc,sc,sc,L,L],Ic=Kc,ch=[function(a){0>this.ha?ac.call(this):(this.Nd(this.ha+2,this.Sc),this.bd(this.ha+4,this.Sc>>16),a=this.Ye-this.Sc,this.A-=11);return a},function(a){0>this.ha?ac.call(this):(this.Nd(this.ha+2,this.dd),this.bd(this.ha+4,this.dd>>16),a=this.te-this.dd,this.A-=12);return a},function(a){0>this.ha?ac.call(this): +(this.Sc=this.Ia(this.ha+2)|this.ub(this.ha+4)<<16,this.Ye=this.Sc+a,this.$|=2,this.A-=11);return a},function(a){0>this.ha?ac.call(this):(this.dd=this.Ia(this.ha+2)|this.ub(this.ha+4)<<16,this.te=this.dd+a,this.$|=2,this.A-=12);return a},function(){this.A-=2+(0>this.ha?0:1);return this.ad},L,function(a){this.ad=this.ad&65520|a&-65521;this.A-=3+(0>this.ha?0:3);this.ad&1&&Ac(this,!0);this.$|=2;return a},L];function uc(){dh[this.ea()].call(this)}function wc(){K(this,this.Y);this.A-=this.pc} +function bc(){var a=this.Y;K(this,this.G);K(this,this.I);K(this,this.J);K(this,this.B);K(this,a);K(this,this.H);K(this,this.F);K(this,this.D);this.A-=this.Il}function cc(){this.D=this.Ja();this.F=this.Ja();this.H=this.Ja();this.Y+=2;this.B=this.Ja();this.J=this.Ja();this.I=this.Ja();this.G=this.Ja();this.A-=this.Gl}function dc(){N[this.ea()].call(this,ve)}function vc(){Zg[this.ea()].call(this,we)}function ec(){K(this,this.K());this.A-=this.pc}function fc(){N[this.ea()].call(this,qe)} +function gc(){K(this,this.ea());this.A-=this.pc}function hc(){N[this.ea()].call(this,pe)}function ic(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=jb(this.na,this.J,this.Ba-b-1);this.bd(this.Za.Yb(this.D,0),d);this.D=this.D+(this.xa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}} +function jc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.Ba-b-1,d=jb(this.na,this.J,d)|jb(this.na,this.J,d)<<8;this.Nd(this.Za.Yb(this.D,1),d);this.D=this.D+(this.xa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}} +function kc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.ub(this.Eb.Wc(this.F,0));this.F=this.F+(this.xa&1024?-1:1)&65535;this.A-=c;this.I-=b;nb(this.na,this.J,d,this.Ba-b-1);a&&(J(this,-2),this.$|=256)}} +function lc(){var a=1,b=0,c=5;this.wa&192&&(a=this.I,b=1,this.wa&256&&(c=4));if(a--){var d=this.Ia(this.Eb.Wc(this.F,1));this.F=this.F+(this.xa&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Ba-b-1;nb(this.na,this.J,d&255,b);nb(this.na,this.J,d>>8,b);a&&(J(this,-2),this.$|=256)}}function eh(){var a=this.L();Zc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function fh(){var a=this.L();Zc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)} function gh(){var a=this.L();Uc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function hh(){var a=this.L();Uc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)}function ih(){var a=this.L();Xc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function jh(){var a=this.L();Xc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)}function kh(){var a=this.L();Uc(this)||Xc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb} function lh(){var a=this.L();Uc(this)||Xc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)}function mh(){var a=this.L();Yc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function nh(){var a=this.L();Yc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)}function oh(){var a=this.L();Vc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function ph(){var a=this.L();Vc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)} function qh(){var a=this.L();!Yc(this)!=!Zc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function rh(){var a=this.L();!Yc(this)==!Zc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function sh(){var a=this.L();Xc(this)||!Yc(this)!=!Zc(this)?(I(this,this.qa+a),this.A-=this.Ub):this.A-=this.Vb}function th(){var a=this.L();Xc(this)||!Yc(this)!=!Zc(this)?this.A-=this.Vb:(I(this,this.qa+a),this.A-=this.Ub)} -function uh(){ah[this.ea()].call(this,ae,this.ea);this.A-=0>this.Ka?1:this.Dh}function mc(){ah[this.ea()].call(this,je,Vd)}function nc(){bh[this.ea()].call(this,ke,Vd)}function vh(){var a=this.K();I(this,this.Ja());this.Y=this.Y+a&65535;this.A-=this.Ol}function wh(){I(this,this.Ja());this.A-=this.Ll} -function oc(){var a=this.K(),b=this.ea()&31;this.A-=11;K(this,this.H);var c=this.Y;if(0this.Ka?1:this.Ch}function mc(){ah[this.ea()].call(this,je,Vd)}function nc(){bh[this.ea()].call(this,ke,Vd)}function vh(){var a=this.K();I(this,this.Ja());this.Y=this.Y+a&65535;this.A-=this.Nl}function wh(){I(this,this.Ja());this.A-=this.Kl} +function oc(){var a=this.K(),b=this.ea()&31;this.A-=11;K(this,this.H);var c=this.Y;if(0>8,c,d=Wc(this);9<(a&15)||d?(a=a+6&15,b=b+1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Z=a);this.da=65536;c&&(this.Z|=this.da);d?fd(this):ad(this);this.A-=this.Ie},function(){Yg[this.ea()].call(this,vd)},function(){Zg[this.ea()].call(this,Dd)},function(){$g[this.ea()].call(this,vd)},function(){N[this.ea()].call(this,Dd)},function(){this.G=this.G&-256|vd.call(this,this.G&255,this.ea());this.A--},function(){this.G=Dd.call(this,this.G,this.K());this.A--},function(){this.$|= -20;this.C=this.M=this.Eb;this.A-=this.Ob},function(){var a=this.G&255,b=this.G>>8,c,d=Wc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Z=a);this.da=65536;c&&(this.Z|=this.da);d?fd(this):ad(this);this.A-=this.Ie},function(){this.ma=this.G;this.G=(this.ja=this.G+1)&65535;this.Z=this.G|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.I;this.I=(this.ja=this.I+1)&65535;this.Z=this.I|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.J; +this.Pb},function(){var a=this.G&255,b=this.G>>8,c,d=Wc(this);9<(a&15)||d?(a=a+6&15,b=b+1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Z=a);this.da=65536;c&&(this.Z|=this.da);d?fd(this):ad(this);this.A-=this.Ie},function(){Yg[this.ea()].call(this,vd)},function(){Zg[this.ea()].call(this,Dd)},function(){$g[this.ea()].call(this,vd)},function(){N[this.ea()].call(this,Dd)},function(){this.G=this.G&-256|vd.call(this,this.G&255,this.ea());this.A--},function(){this.G=Dd.call(this,this.G,this.K());this.A--},function(){this.$|= +20;this.C=this.M=this.Eb;this.A-=this.Pb},function(){var a=this.G&255,b=this.G>>8,c,d=Wc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Z=a);this.da=65536;c&&(this.Z|=this.da);d?fd(this):ad(this);this.A-=this.Ie},function(){this.ma=this.G;this.G=(this.ja=this.G+1)&65535;this.Z=this.G|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.I;this.I=(this.ja=this.I+1)&65535;this.Z=this.I|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.J; this.J=(this.ja=this.J+1)&65535;this.Z=this.J|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.B;this.B=(this.ja=this.B+1)&65535;this.Z=this.B|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.Y;this.Y=(this.ja=this.Y+1)&65535;this.Z=this.Y|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.H;this.H=(this.ja=this.H+1)&65535;this.Z=this.H|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.F;this.F=(this.ja= this.F+1)&65535;this.Z=this.F|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.D;this.D=(this.ja=this.D+1)&65535;this.Z=this.D|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.G;this.G=(this.ja=this.G-1)&65535;this.Z=this.G|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.I;this.I=(this.ja=this.I-1)&65535;this.Z=this.I|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.J;this.J=(this.ja=this.J-1)&65535; this.Z=this.J|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.B;this.B=(this.ja=this.B-1)&65535;this.Z=this.B|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.Y;this.Y=(this.ja=this.Y-1)&65535;this.Z=this.Y|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.H;this.H=(this.ja=this.H-1)&65535;this.Z=this.H|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.F;this.F=(this.ja=this.F-1)&65535;this.Z=this.F| -(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.D;this.D=(this.ja=this.D-1)&65535;this.Z=this.D|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){K(this,this.G);this.A-=this.oc},function(){K(this,this.I);this.A-=this.oc},function(){K(this,this.J);this.A-=this.oc},function(){K(this,this.B);this.A-=this.oc},function(){K(this,this.Y-2&65535);this.A-=this.oc},function(){K(this,this.H);this.A-=this.oc},function(){K(this,this.F);this.A-=this.oc},function(){K(this,this.D); -this.A-=this.oc},function(){this.G=this.Ja();this.A-=this.gc},function(){this.I=this.Ja();this.A-=this.gc},function(){this.J=this.Ja();this.A-=this.gc},function(){this.B=this.Ja();this.A-=this.gc},function(){this.Y=this.Ja();this.A-=this.gc},function(){this.H=this.Ja();this.A-=this.gc},function(){this.F=this.Ja();this.A-=this.gc},function(){this.D=this.Ja();this.A-=this.gc},eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,uh,function(){bh[this.ea()].call(this, -be,this.K);this.A-=0>this.Ka?1:this.Dh},uh,function(){bh[this.ea()].call(this,be,this.L);this.A-=0>this.Ka?1:this.Dh},function(){Yg[this.ea()].call(this,ne)},function(){Zg[this.ea()].call(this,oe)},function(){$g[this.Ug=this.ea()].call(this,ze)},function(){N[this.Ug=this.ea()].call(this,Ae)},function(){this.$|=1;Yg[this.ea()].call(this,le)},function(){this.$|=1;Zg[this.ea()].call(this,le)},function(){$g[this.ea()].call(this,le)},function(){N[this.ea()].call(this,le)},function(){var a=this.ea();switch((a& -56)>>3){case 0:this.Db=this.Za.oa;break;case 1:this.Db=this.ua.oa;break;case 2:this.Db=this.wb.oa;break;case 3:this.Db=this.Eb.oa;break;default:M.call(this);return}this.$|=1;Zg[a].call(this,me)},function(){this.$|=1;this.C=this.M=this.gm;N[this.ea()].call(this,se)},function(){var a,b=this.ea(),c=(b&56)>>3;switch(c){case 0:a=this.G;break;case 2:a=this.J;break;case 3:a=this.B;break;default:if(80286<=this.Fa){ac.call(this);return}switch(c){case 1:a=this.I;break;case 4:a=this.Y;break;case 5:a=this.H; +(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){this.ma=this.D;this.D=(this.ja=this.D-1)&65535;this.Z=this.D|(this.Z&this.da?1:0)<<16;this.da=65536;this.A-=2},function(){K(this,this.G);this.A-=this.pc},function(){K(this,this.I);this.A-=this.pc},function(){K(this,this.J);this.A-=this.pc},function(){K(this,this.B);this.A-=this.pc},function(){K(this,this.Y-2&65535);this.A-=this.pc},function(){K(this,this.H);this.A-=this.pc},function(){K(this,this.F);this.A-=this.pc},function(){K(this,this.D); +this.A-=this.pc},function(){this.G=this.Ja();this.A-=this.hc},function(){this.I=this.Ja();this.A-=this.hc},function(){this.J=this.Ja();this.A-=this.hc},function(){this.B=this.Ja();this.A-=this.hc},function(){this.Y=this.Ja();this.A-=this.hc},function(){this.H=this.Ja();this.A-=this.hc},function(){this.F=this.Ja();this.A-=this.hc},function(){this.D=this.Ja();this.A-=this.hc},eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,uh,function(){bh[this.ea()].call(this, +be,this.K);this.A-=0>this.Ka?1:this.Ch},uh,function(){bh[this.ea()].call(this,be,this.L);this.A-=0>this.Ka?1:this.Ch},function(){Yg[this.ea()].call(this,ne)},function(){Zg[this.ea()].call(this,oe)},function(){$g[this.Ug=this.ea()].call(this,ze)},function(){N[this.Ug=this.ea()].call(this,Ae)},function(){this.$|=1;Yg[this.ea()].call(this,le)},function(){this.$|=1;Zg[this.ea()].call(this,le)},function(){$g[this.ea()].call(this,le)},function(){N[this.ea()].call(this,le)},function(){var a=this.ea();switch((a& +56)>>3){case 0:this.Db=this.Za.oa;break;case 1:this.Db=this.ua.oa;break;case 2:this.Db=this.wb.oa;break;case 3:this.Db=this.Eb.oa;break;default:M.call(this);return}this.$|=1;Zg[a].call(this,me)},function(){this.$|=1;this.C=this.M=this.fm;N[this.ea()].call(this,se)},function(){var a,b=this.ea(),c=(b&56)>>3;switch(c){case 0:a=this.G;break;case 2:a=this.J;break;case 3:a=this.B;break;default:if(80286<=this.Fa){ac.call(this);return}switch(c){case 1:a=this.I;break;case 4:a=this.Y;break;case 5:a=this.H; break;case 6:a=this.F;break;case 7:a=this.D}}N[b].call(this,le);switch(c){case 0:Tc(this,this.G);this.G=a;break;case 1:Nc(this,this.I);this.I=a;break;case 2:Pc(this,this.J);this.J=a;break;case 3:Oc(this,this.B);this.B=a;break;case 4:Tc(this,this.Y);this.Y=a;break;case 5:Nc(this,this.H);this.H=a;break;case 6:Pc(this,this.F);this.F=a;break;case 7:Oc(this,this.D),this.D=a}},function(){this.$|=1;bh[this.ea()].call(this,ce,this.Ja)},function(){this.A-=3},function(){var a=this.G;this.G=this.I;this.I=a; -this.A-=3},function(){var a=this.G;this.G=this.J;this.J=a;this.A-=3},function(){var a=this.G;this.G=this.B;this.B=a;this.A-=3},function(){var a=this.G;this.G=this.Y;this.Y=a;this.A-=3},function(){var a=this.G;this.G=this.H;this.H=a;this.A-=3},function(){var a=this.G;this.G=this.F;this.F=a;this.A-=3},function(){var a=this.G;this.G=this.D;this.D=a;this.A-=3},function(){this.G=this.G<<24>>24&65535;this.A-=2},function(){this.J=this.G&32768?65535:0;this.A-=this.Vk},function(){var a=this.K(),b=this.K(); -K(this,this.ua.oa);K(this,this.qa);yc(this,a,b);this.A-=this.Yk},function(){M.call(this)},function(){K(this,Bc(this));this.A-=this.oc},function(){zc(this,this.Ja());this.A-=this.gc},function(){var a=this.G>>8;a&1?ed(this):$c(this);a&4?Vc(this)||(this.ja^=1):Vc(this)&&(this.ja^=1);a&16?fd(this):ad(this);a&64?gd(this):bd(this);a&128?hd(this):cd(this);this.A-=this.Cb},function(){this.G=this.G&255|(Bc(this)&213)<<8;this.A-=this.Cb},function(){this.G=this.G&-256|this.T(this.C,this.K());this.A-=this.lj}, -function(){this.G=this.U(this.C,this.K());this.A-=this.lj},function(){var a=this.K(),b=this.G;this.bd(this.C.Yb(a,0),b);this.A-=this.mj},function(){var a=this.K(),b=this.G;this.Nd(this.C.Yb(a,1),b);this.A-=this.mj},function(){var a=1,b=0,c=this.nj;this.wa&192&&(a=this.I,b=1,c=this.pj,this.wa&256||(this.A-=this.oj));if(a--){var d=this.ya&1024?-1:1,e=this.T(this.C,this.F);this.bd(this.Za.Yb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.wa&16?-3:-2),this.$|= -256)}},function(){var a=1,b=0,c=this.nj;this.wa&192&&(a=this.I,b=1,c=this.pj,this.wa&256||(this.A-=this.oj));if(a--){var d=this.ya&1024?-2:2,e=this.U(this.C,this.F);this.Nd(this.Za.Yb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){var a=1,b=0,c=this.Yi;this.wa&192&&(a=this.I,b=1,c=this.$i,this.wa&256||(this.A-=this.Zi));if(a--){var d=this.ya&1024?-1:1,e=this.T(this.C,this.F),f=this.N(this.Za,this.D);vd.call(this, -e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.sb;this.I-=b;a&&Xc(this)==(this.wa&64)&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){var a=1,b=0,c=this.Yi;this.wa&192&&(a=this.I,b=1,c=this.$i,this.wa&256||(this.A-=this.Zi));if(a--){var d=this.ya&1024?-2:2,e=this.U(this.C,this.F),f=this.O(this.Za,this.D);Dd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.sb;this.I-=b;a&&Xc(this)==(this.wa&64)&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){this.Z= -this.ja=this.ma=this.G&255&this.ea();this.da=256;this.A-=this.Ie},function(){this.Z=this.ja=this.ma=this.G&this.K();this.da=65536;this.A-=this.Ie},function(){var a=1,b=0,c=this.yj;this.wa&192&&(a=this.I,b=1,c=this.Aj,this.wa&256||(this.A-=this.zj));if(a--){var d=this.G;this.bd(this.Za.Yb(this.D,0),d);this.D=this.D+(this.ya&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}},function(){var a=1,b=0,c=this.yj;this.wa&192&&(a=this.I,b=1,c=this.Aj,this.wa&256||(this.A-=this.zj));if(a--){var d= -this.G;this.Nd(this.Za.Yb(this.D,1),d);this.D=this.D+(this.ya&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}},function(){var a=1,b=0,c=this.fj;this.wa&192&&(a=this.I,b=1,c=this.hj,this.wa&256||(this.A-=this.gj));a--&&(this.G=this.G&-256|this.T(this.C,this.F),this.F=this.F+(this.ya&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(J(this,this.wa&16?-3:-2),this.$|=256))},function(){var a=1,b=0,c=this.fj;this.wa&192&&(a=this.I,b=1,c=this.hj,this.wa&256||(this.A-=this.gj));a--&&(this.G=this.U(this.C, -this.F),this.F=this.F+(this.ya&1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(J(this,this.wa&16?-3:-2),this.$|=256))},function(){var a=1,b=0,c=this.sj;this.wa&192&&(a=this.I,b=1,c=this.uj,this.wa&256||(this.A-=this.tj));a--&&(vd.call(this,this.G&255,this.N(this.Za,this.D)),this.D=this.D+(this.ya&1024?-1:1)&65535,this.A-=c-this.sb,this.I-=b,a&&Xc(this)==(this.wa&64)&&(J(this,-2),this.$|=256))},function(){var a=1,b=0,c=this.sj;this.wa&192&&(a=this.I,b=1,c=this.uj,this.wa&256||(this.A-=this.tj));a--&&(Dd.call(this, -this.G,this.O(this.Za,this.D)),this.D=this.D+(this.ya&1024?-2:2)&65535,this.A-=c-this.sb,this.I-=b,a&&Xc(this)==(this.wa&64)&&(J(this,-2),this.$|=256))},function(){this.G=this.G&-256|this.ea();this.A-=this.Cb},function(){this.I=this.I&-256|this.ea();this.A-=this.Cb},function(){this.J=this.J&-256|this.ea();this.A-=this.Cb},function(){this.B=this.B&-256|this.ea();this.A-=this.Cb},function(){this.G=this.G&255|this.ea()<<8;this.A-=this.Cb},function(){this.I=this.I&255|this.ea()<<8;this.A-=this.Cb},function(){this.J= +this.A-=3},function(){var a=this.G;this.G=this.J;this.J=a;this.A-=3},function(){var a=this.G;this.G=this.B;this.B=a;this.A-=3},function(){var a=this.G;this.G=this.Y;this.Y=a;this.A-=3},function(){var a=this.G;this.G=this.H;this.H=a;this.A-=3},function(){var a=this.G;this.G=this.F;this.F=a;this.A-=3},function(){var a=this.G;this.G=this.D;this.D=a;this.A-=3},function(){this.G=this.G<<24>>24&65535;this.A-=2},function(){this.J=this.G&32768?65535:0;this.A-=this.Uk},function(){var a=this.K(),b=this.K(); +K(this,this.ua.oa);K(this,this.qa);yc(this,a,b);this.A-=this.Xk},function(){M.call(this)},function(){K(this,Bc(this));this.A-=this.pc},function(){zc(this,this.Ja());this.A-=this.hc},function(){var a=this.G>>8;a&1?ed(this):$c(this);a&4?Vc(this)||(this.ja^=1):Vc(this)&&(this.ja^=1);a&16?fd(this):ad(this);a&64?gd(this):bd(this);a&128?hd(this):cd(this);this.A-=this.Cb},function(){this.G=this.G&255|(Bc(this)&213)<<8;this.A-=this.Cb},function(){this.G=this.G&-256|this.T(this.C,this.K());this.A-=this.lj}, +function(){this.G=this.U(this.C,this.K());this.A-=this.lj},function(){var a=this.K(),b=this.G;this.bd(this.C.Yb(a,0),b);this.A-=this.mj},function(){var a=this.K(),b=this.G;this.Nd(this.C.Yb(a,1),b);this.A-=this.mj},function(){var a=1,b=0,c=this.nj;this.wa&192&&(a=this.I,b=1,c=this.pj,this.wa&256||(this.A-=this.oj));if(a--){var d=this.xa&1024?-1:1,e=this.T(this.C,this.F);this.bd(this.Za.Yb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.wa&16?-3:-2),this.$|= +256)}},function(){var a=1,b=0,c=this.nj;this.wa&192&&(a=this.I,b=1,c=this.pj,this.wa&256||(this.A-=this.oj));if(a--){var d=this.xa&1024?-2:2,e=this.U(this.C,this.F);this.Nd(this.Za.Yb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){var a=1,b=0,c=this.Yi;this.wa&192&&(a=this.I,b=1,c=this.$i,this.wa&256||(this.A-=this.Zi));if(a--){var d=this.xa&1024?-1:1,e=this.T(this.C,this.F),f=this.N(this.Za,this.D);vd.call(this, +e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.sb;this.I-=b;a&&Xc(this)==(this.wa&64)&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){var a=1,b=0,c=this.Yi;this.wa&192&&(a=this.I,b=1,c=this.$i,this.wa&256||(this.A-=this.Zi));if(a--){var d=this.xa&1024?-2:2,e=this.U(this.C,this.F),f=this.O(this.Za,this.D);Dd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.sb;this.I-=b;a&&Xc(this)==(this.wa&64)&&(J(this,this.wa&16?-3:-2),this.$|=256)}},function(){this.Z= +this.ja=this.ma=this.G&255&this.ea();this.da=256;this.A-=this.Ie},function(){this.Z=this.ja=this.ma=this.G&this.K();this.da=65536;this.A-=this.Ie},function(){var a=1,b=0,c=this.yj;this.wa&192&&(a=this.I,b=1,c=this.Aj,this.wa&256||(this.A-=this.zj));if(a--){var d=this.G;this.bd(this.Za.Yb(this.D,0),d);this.D=this.D+(this.xa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}},function(){var a=1,b=0,c=this.yj;this.wa&192&&(a=this.I,b=1,c=this.Aj,this.wa&256||(this.A-=this.zj));if(a--){var d= +this.G;this.Nd(this.Za.Yb(this.D,1),d);this.D=this.D+(this.xa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.$|=256)}},function(){var a=1,b=0,c=this.fj;this.wa&192&&(a=this.I,b=1,c=this.hj,this.wa&256||(this.A-=this.gj));a--&&(this.G=this.G&-256|this.T(this.C,this.F),this.F=this.F+(this.xa&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(J(this,this.wa&16?-3:-2),this.$|=256))},function(){var a=1,b=0,c=this.fj;this.wa&192&&(a=this.I,b=1,c=this.hj,this.wa&256||(this.A-=this.gj));a--&&(this.G=this.U(this.C, +this.F),this.F=this.F+(this.xa&1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(J(this,this.wa&16?-3:-2),this.$|=256))},function(){var a=1,b=0,c=this.sj;this.wa&192&&(a=this.I,b=1,c=this.uj,this.wa&256||(this.A-=this.tj));a--&&(vd.call(this,this.G&255,this.N(this.Za,this.D)),this.D=this.D+(this.xa&1024?-1:1)&65535,this.A-=c-this.sb,this.I-=b,a&&Xc(this)==(this.wa&64)&&(J(this,-2),this.$|=256))},function(){var a=1,b=0,c=this.sj;this.wa&192&&(a=this.I,b=1,c=this.uj,this.wa&256||(this.A-=this.tj));a--&&(Dd.call(this, +this.G,this.O(this.Za,this.D)),this.D=this.D+(this.xa&1024?-2:2)&65535,this.A-=c-this.sb,this.I-=b,a&&Xc(this)==(this.wa&64)&&(J(this,-2),this.$|=256))},function(){this.G=this.G&-256|this.ea();this.A-=this.Cb},function(){this.I=this.I&-256|this.ea();this.A-=this.Cb},function(){this.J=this.J&-256|this.ea();this.A-=this.Cb},function(){this.B=this.B&-256|this.ea();this.A-=this.Cb},function(){this.G=this.G&255|this.ea()<<8;this.A-=this.Cb},function(){this.I=this.I&255|this.ea()<<8;this.A-=this.Cb},function(){this.J= this.J&255|this.ea()<<8;this.A-=this.Cb},function(){this.B=this.B&255|this.ea()<<8;this.A-=this.Cb},function(){this.G=this.K();this.A-=this.Cb},function(){this.I=this.K();this.A-=this.Cb},function(){this.J=this.K();this.A-=this.Cb},function(){this.B=this.K();this.A-=this.Cb},function(){this.Y=this.K();this.A-=this.Cb},function(){this.H=this.K();this.A-=this.Cb},function(){this.F=this.K();this.A-=this.Cb},function(){this.D=this.K();this.A-=this.Cb},vh,wh,vh,wh,function(){N[this.ea()].call(this,ue)}, -function(){N[this.ea()].call(this,te)},function(){this.$|=1;ah[this.ea()].call(this,de,this.ea)},function(){this.$|=1;bh[this.ea()].call(this,de,this.K)},xh,yh,xh,yh,function(){ld.call(this,3,null,this.ol)},function(){var a=this.ea();Dc(this,a)?ld.call(this,a,null,0):this.A--},function(){Zc(this)?ld.call(this,4,null,this.pl):this.A-=this.ql},function(){yc(this,this.Ja(),this.Ja());zc(this,this.Ja());this.ah&&Hc(this,this.Ba);this.A-=this.ml},function(){ah[this.ea()].call(this,ee,Td)},function(){bh[this.ea()].call(this, -fe,Td)},function(){ah[this.ea()].call(this,ee,Ud)},function(){bh[this.ea()].call(this,fe,Ud)},function(){var a=this.ea(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.da=256;this.Z=this.ja=b;this.A-=this.Sk},function(){var a=this.ea();this.Z=this.ja=this.G=(this.G>>8)*a+this.G&255;this.da=256;this.A-=this.Rk},function(){this.G=this.G&-256|(Uc(this)?255:0);this.A-=2},function(){this.G=this.G&-256|this.T(this.C,this.B+(this.G&255)&65535);this.A-=this.Ql},zh,zh,zh,zh,zh,zh,zh,zh,function(){var a=this.L(); -(this.I=this.I-1&65535)&&this.Z&this.da-1?(I(this,this.qa+a),this.A-=this.xl):this.A-=this.ij},function(){var a=this.L();!(this.I=this.I-1&65535)||this.Z&this.da-1?this.A-=this.kj:(I(this,this.qa+a),this.A-=this.jj)},function(){var a=this.L();(this.I=this.I-1&65535)?(I(this,this.qa+a),this.A-=this.wl):this.A-=this.ij},function(){var a=this.L();this.I?this.A-=this.kj:(I(this,this.qa+a),this.A-=this.jj)},function(){var a=this.ea();this.G=this.G&-256|jb(this.na,a,this.Ba-2);this.A-=this.cj},function(){var a= -this.ea();this.G=jb(this.na,a,this.Ba-1)|jb(this.na,a+1&65535,this.Ba-2)<<8;this.A-=this.cj},function(){var a=this.ea();nb(this.na,a,this.G&255,this.Ba-2);this.A-=this.rj},function(){var a=this.ea();nb(this.na,a,this.G&255,this.Ba-2);nb(this.na,a+1&65535,this.G>>8,this.Ba-2);this.A-=this.rj},function(){var a=this.K();K(this,this.qa);I(this,this.qa+a);this.A-=this.Wk},function(){var a=this.K();I(this,this.qa+a);this.A-=this.dj},function(){yc(this,this.K(),this.K());this.A-=this.sl},function(){var a= -this.L();I(this,this.qa+a);this.A-=this.dj},function(){this.G=this.G&-256|jb(this.na,this.J,this.Ba-1);this.A-=this.bj},function(){this.G=jb(this.na,this.J,this.Ba-1)|jb(this.na,this.J+1&65535,this.Ba-1)<<8;this.A-=this.bj},function(){nb(this.na,this.J,this.G&255,this.Ba-1);this.A-=this.qj},function(){nb(this.na,this.J,this.G&255,this.Ba-1);nb(this.na,this.J+1&65535,this.G>>8,this.Ba-1);this.A-=this.qj},Ah,Ah,function(){this.$|=132;this.A-=this.Ob},function(){this.$|=68;this.A-=this.Ob},function(){this.nb|= -4;this.A-=2;this.X&&jd(this.X)?(J(this,-1),this.Ab()):this.ya&512||(this.X&&J(this,-1),this.Ab())},function(){Uc(this)?$c(this):ed(this);this.A-=2},function(){this.Db=-1;ah[this.ea()].call(this,he,Wd);0<=this.Db&&(this.G=this.Db)},function(){this.Db=-1;bh[this.ea()].call(this,ie,Wd);0<=this.Db&&(this.G=this.Db,this.J=this.ug)},function(){this.Z&=~this.da;this.A-=2},function(){this.Z|=this.da;this.A-=2},function(){this.ya&=-513;this.A-=this.Uk},function(){this.ya|=512;this.$|=4;this.A-=2},function(){this.ya&= --1025;this.A-=2},function(){this.ya|=1024;this.A-=2},function(){ah[this.ea()].call(this,rc,Wd)},function(){bh[this.ea()].call(this,tc,Wd)}]; -function O(a){x.call(this,"ChipSet",a,O);this.Fa=a.model;this.Fa=void 0!==this.Fa?parseInt(this.Fa,10):Bh;this.Xb=0;var b=a.sw1;if(b)this.Xb=Ch(b,Dh|Eh.wm);else if(b=a.fdrives||2,this.Xb|=Fh.Vh,b--,this.Xb|=(b&3)<=Gh&&(this.Pf=this.Qf=2);this.oh=a.scaleTimers||!1;this.mp=a.rtcDate;this.Bk=!1;a.sound&&window&&"webkitAudioContext"in window&& -(this.ni=new webkitAudioContext);this.reset();this.Ta()}y(x,O);var Bh=5150,Gh=5170,Hh={none:0,tv:1,color:2,mono:3,ega:0},Fh={Vh:1,ONE:0,Rp:64,Pp:128,yp:192,Bf:192,Df:6},Dh=12,Eh={Qp:16,tp:32,wm:48,Bf:48,Df:4};k=O.prototype; +function(){N[this.ea()].call(this,te)},function(){this.$|=1;ah[this.ea()].call(this,de,this.ea)},function(){this.$|=1;bh[this.ea()].call(this,de,this.K)},xh,yh,xh,yh,function(){ld.call(this,3,null,this.nl)},function(){var a=this.ea();Dc(this,a)?ld.call(this,a,null,0):this.A--},function(){Zc(this)?ld.call(this,4,null,this.ol):this.A-=this.pl},function(){yc(this,this.Ja(),this.Ja());zc(this,this.Ja());this.ah&&Hc(this,this.Ba);this.A-=this.ll},function(){ah[this.ea()].call(this,ee,Td)},function(){bh[this.ea()].call(this, +fe,Td)},function(){ah[this.ea()].call(this,ee,Ud)},function(){bh[this.ea()].call(this,fe,Ud)},function(){var a=this.ea(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.da=256;this.Z=this.ja=b;this.A-=this.Rk},function(){var a=this.ea();this.Z=this.ja=this.G=(this.G>>8)*a+this.G&255;this.da=256;this.A-=this.Qk},function(){this.G=this.G&-256|(Uc(this)?255:0);this.A-=2},function(){this.G=this.G&-256|this.T(this.C,this.B+(this.G&255)&65535);this.A-=this.Pl},zh,zh,zh,zh,zh,zh,zh,zh,function(){var a=this.L(); +(this.I=this.I-1&65535)&&this.Z&this.da-1?(I(this,this.qa+a),this.A-=this.wl):this.A-=this.ij},function(){var a=this.L();!(this.I=this.I-1&65535)||this.Z&this.da-1?this.A-=this.kj:(I(this,this.qa+a),this.A-=this.jj)},function(){var a=this.L();(this.I=this.I-1&65535)?(I(this,this.qa+a),this.A-=this.vl):this.A-=this.ij},function(){var a=this.L();this.I?this.A-=this.kj:(I(this,this.qa+a),this.A-=this.jj)},function(){var a=this.ea();this.G=this.G&-256|jb(this.na,a,this.Ba-2);this.A-=this.cj},function(){var a= +this.ea();this.G=jb(this.na,a,this.Ba-1)|jb(this.na,a+1&65535,this.Ba-2)<<8;this.A-=this.cj},function(){var a=this.ea();nb(this.na,a,this.G&255,this.Ba-2);this.A-=this.rj},function(){var a=this.ea();nb(this.na,a,this.G&255,this.Ba-2);nb(this.na,a+1&65535,this.G>>8,this.Ba-2);this.A-=this.rj},function(){var a=this.K();K(this,this.qa);I(this,this.qa+a);this.A-=this.Vk},function(){var a=this.K();I(this,this.qa+a);this.A-=this.dj},function(){yc(this,this.K(),this.K());this.A-=this.rl},function(){var a= +this.L();I(this,this.qa+a);this.A-=this.dj},function(){this.G=this.G&-256|jb(this.na,this.J,this.Ba-1);this.A-=this.bj},function(){this.G=jb(this.na,this.J,this.Ba-1)|jb(this.na,this.J+1&65535,this.Ba-1)<<8;this.A-=this.bj},function(){nb(this.na,this.J,this.G&255,this.Ba-1);this.A-=this.qj},function(){nb(this.na,this.J,this.G&255,this.Ba-1);nb(this.na,this.J+1&65535,this.G>>8,this.Ba-1);this.A-=this.qj},Ah,Ah,function(){this.$|=132;this.A-=this.Pb},function(){this.$|=68;this.A-=this.Pb},function(){this.nb|= +4;this.A-=2;this.X&&jd(this.X)?(J(this,-1),this.Ab()):this.xa&512||(this.X&&J(this,-1),this.Ab())},function(){Uc(this)?$c(this):ed(this);this.A-=2},function(){this.Db=-1;ah[this.ea()].call(this,he,Wd);0<=this.Db&&(this.G=this.Db)},function(){this.Db=-1;bh[this.ea()].call(this,ie,Wd);0<=this.Db&&(this.G=this.Db,this.J=this.ug)},function(){this.Z&=~this.da;this.A-=2},function(){this.Z|=this.da;this.A-=2},function(){this.xa&=-513;this.A-=this.Tk},function(){this.xa|=512;this.$|=4;this.A-=2},function(){this.xa&= +-1025;this.A-=2},function(){this.xa|=1024;this.A-=2},function(){ah[this.ea()].call(this,rc,Wd)},function(){bh[this.ea()].call(this,tc,Wd)}]; +function O(a){x.call(this,"ChipSet",a,O);this.Fa=a.model;this.Fa=void 0!==this.Fa?parseInt(this.Fa,10):Bh;this.Xb=0;var b=a.sw1;if(b)this.Xb=Ch(b,Dh|Eh.vm);else if(b=a.fdrives||2,this.Xb|=Fh.Uh,b--,this.Xb|=(b&3)<=Gh&&(this.Pf=this.Qf=2);this.oh=a.scaleTimers||!1;this.mp=a.rtcDate;this.Ak=!1;a.sound&&window&&"webkitAudioContext"in window&& +(this.mi=new webkitAudioContext);this.reset();this.Ta()}y(x,O);var Bh=5150,Gh=5170,Hh={none:0,tv:1,color:2,mono:3,ega:0},Fh={Uh:1,ONE:0,Rp:64,Pp:128,yp:192,Bf:192,Df:6},Dh=12,Eh={Qp:16,tp:32,vm:48,Bf:48,Df:4};k=O.prototype; k.xb=function(a,b,c,d){switch(c){case "sw1":return this.sa[c]=d,Ih(this,c,d,this.Xb,{0:this.Fa==Bh?"Bootable Floppy Drive":"Loop on POST",1:this.Fa==Bh?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Fa==Bh)return this.sa[c]=d,Ih(this,c,d,this.pe,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.sa[c]=d,!0}return!1}; -k.mc=function(a,b,c,d){this.na=b;this.S=c;this.X=d;this.Da=a;this.bb=C(a,"Keyboard");this.Rl=Math.round(c.Hd/1193181);ib(b,this,Jh);mb(b,this,Kh);this.Fab;b++){var c=13>=b?Sh(e,b):e.pa[b];a&&(a+="\n");a+="CMOS[0x"+r(b)+"]: 0x"+r(c)}e.X.message(a)})}Cc(c,26,this,this.Nn)};k.$b=function(a,b){if(!b)if(!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.Wb=function(a){return a&&this.save?this.save():!0}; -k.reset=function(a){var b;this.cd=this.Xb;this.Qe=this.pe;Th(this);this.$a=Array(this.Pf);for(b=0;b=Gh){this.kb=16;this.ud=0;this.Xd=16;this.Rg=0;this.ve=160;512<=Xh(this)&&(this.ve|=16);3==Yh(this)&&(this.ve|=64);this.gi=3;this.Mf=0;this.Ng=Array(7);this.we=0;a||(this.pa=Array(64)); -Zh(this,this.mp);for(a=14;46>a;a++)void 0===this.pa[a]&&(this.pa[a]=0);this.pa[20]=this.cd&(Eh.Bf|2|Fh.Vh|Fh.Bf);this.pa[16]=$h(this,0)<<4|$h(this,1);ai(this)}}; +k.reset=function(a){var b;this.cd=this.Xb;this.Qe=this.pe;Th(this);this.$a=Array(this.Pf);for(b=0;b=Gh){this.kb=16;this.ud=0;this.Xd=16;this.Rg=0;this.ve=160;512<=Xh(this)&&(this.ve|=16);3==Yh(this)&&(this.ve|=64);this.fi=3;this.Mf=0;this.Ng=Array(7);this.we=0;a||(this.pa=Array(64)); +Zh(this,this.mp);for(a=14;46>a;a++)void 0===this.pa[a]&&(this.pa[a]=0);this.pa[20]=this.cd&(Eh.Bf|2|Fh.Uh|Fh.Bf);this.pa[16]=$h(this,0)<<4|$h(this,1);ai(this)}}; function Zh(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.ca("CMOS date invalid ("+b+"), using "+c)):b&&a.ca("CMOS date: "+c);a.pa[0]=c.getSeconds();a.pa[1]=0;a.pa[2]=c.getMinutes();a.pa[3]=0;a.pa[4]=c.getHours();a.pa[5]=0;a.pa[6]=c.getDay()+1;a.pa[7]=c.getDate();a.pa[8]=c.getMonth()+1;c=c.getFullYear();a.pa[9]=c%100;c/=100;a.pa[50]=c%10|c/10<<4;a.eg=-1;a.pa[10]=38;a.pa[11]=2;a.pa[12]=0;a.pa[13]=128} function Sh(a,b){var c=a.pa[b];if(10>b){var d=!1;4!=b&&5!=b||a.pa[11]&2||(c=12>c?c?c:12:(c-=12)?c+128:140,d=!0);a.pa[11]&4||(d&&128c;c++)b+=a.pa[c];a.pa[47]=b&255;a.pa[46]=b>>8} -k.save=function(){var a=new H(this);a.set(0,[this.Xb,this.pe,this.cd,this.Qe]);for(var b=[],c=0;c=Gh&&(a.set(5,[this.kb,this.ud,this.Xd,this.Rg,this.ve,this.gi]),a.set(6,[this.Mf,this.Ng,this.we,this.pa,this.eg]));return a.data()}; -k.restore=function(a){var b,c;b=a[0];this.Xb=b[0];this.pe=b[1];this.cd=b[2];this.Qe=b[3];b=a[1];this.$a=Array(this.Pf);for(c=0;c>2)+1)*a.Qn+32*((b?a.pe:a.Qe)&15)}function di(a,b){var c=b?a.Xb:a.cd;return a.Fa!=Bh||c&Fh.Vh?((c&Fh.Bf)>>Fh.Df)+1:0}function $h(a,b){return b>Eh.Df} +k.save=function(){var a=new H(this);a.set(0,[this.Xb,this.pe,this.cd,this.Qe]);for(var b=[],c=0;c=Gh&&(a.set(5,[this.kb,this.ud,this.Xd,this.Rg,this.ve,this.fi]),a.set(6,[this.Mf,this.Ng,this.we,this.pa,this.eg]));return a.data()}; +k.restore=function(a){var b,c;b=a[0];this.Xb=b[0];this.pe=b[1];this.cd=b[2];this.Qe=b[3];b=a[1];this.$a=Array(this.Pf);for(c=0;c>2)+1)*a.Qn+32*((b?a.pe:a.Qe)&15)}function di(a,b){var c=b?a.Xb:a.cd;return a.Fa!=Bh||c&Fh.Uh?((c&Fh.Bf)>>Fh.Df)+1:0}function $h(a,b){return b>Eh.Df} function Ih(a,b,c,d,e){for(var f="",g=1;8>=g;g++){var h="pcjs-bitCell";g||(h+=" pcjs-bitCellLeft");f+='
'+g+"
\n"}c.innerHTML=f;b=B(c,"pcjs-bitCell");c=null;for(g=0;g>2].Gb[b&3],c,d,e)}function mi(a,b,c){b=a.$a[b>>2].Gb[b&3];b.dh&&b.Hi&&b.Fh?(c&&(b.fh=c),b.Fd||md(a,b,!0)):c&&c(!0)} -function md(a,b,c){c&&(b.count=b.Zb[1]<<8|b.Zb[0],b.km=b.mode&12,b.Ck=b.jd=!1);for(var d=!1;0<=b.count&&(c=b.Xg<<16|b.Qb[1]<<8|b.Qb[0],4==b.km?(d=!0,function(c){b.Hi.call(b.dh,b.Fh,-1,function(f,g){0>f&&(b.Ck||(b.Ck=!0),f=255);b.Fd||db(a.na,c,f);(d=g)&&setTimeout(function(){ti(b)||md(a,b)},0)})}(c)):8==b.km?(c=bb(a.na,c),0>b.Hi.call(b.dh,b.Fh,c)&&(b.jd=!0)):b.jd=!0),!d&&!ti(b););} -function ti(a){if(!a.jd&&0<=--a.count&&(a.mode&32?(a.Qb[0]--,0>a.Qb[0]&&(a.Qb[0]=255,a.Qb[1]--,0>a.Qb[1]&&(a.Qb[1]=255))):(a.Qb[0]++,255>3,e=a.tb[d];e.Jb|=1<<(b&7);e.jg=c||0;1==d&&(a.tb[0].Jb|=4);wi(a,d)} -function Ai(a,b){var c=b>>3,d=a.tb[c],e=1<<(b&7);d.Jb&e&&(d.Jb&=~e,1!=c||d.Jb||(a.tb[0].Jb&=-5),wi(a,c))}function kd(a,b){void 0===b&&(b=0);var c=-1,d=a.tb[b];if(d.jg)c=-2,d.jg--;else for(var e=d.Jb&((d.Ec|d.vd)^255),f=d.xe+1;;){var f=f&7,g=1<>6;if(3!=a){c=b&1;var d=b&14;if(b&=48){var e=this.Hb[a];e.vg=b;e.mode=d;e.ok=c;e.Hc=[0,0];e.Zb=[0,0];e.Vf=[0,0];e.kd=!1;e.Yf=!1;e.df=!1;Ci(this,a);0==a&&Ai(this,0);2==a&&255==this.tb[0].vd&&77==this.yc&&(a=this.Hb[0],a.Xc[0]=a.Hc[0],a.Xc[1]=a.Hc[1],a.me=F(this.S,this.oh))}else Rh(this,a),b=this.Hb[a],b.Vf[0]=b.Zb[0],b.Vf[1]=b.Zb[1],b.Yf=!0,Ci(this,a)}}; -function Ei(a,b){var c=a.Hb[b],d=c.Hc[1]<<8|c.Hc[0];d||(d=1==c.gd?256:65536);return d}function Ci(a,b){var c=a.Hb[b];c.de=32==c.vg?1:0;c.gd=48==c.vg?2:1} -function Rh(a,b,c){var d=a.Hb[b];if(d.df&&(2!=b||a.yc&1)){var e=F(a.S,a.oh),f=(e-d.me)/a.Rl|0;0>f&&(d.me=e,f=0);var g=Ei(a,b),h=a.Hb[b],m=h.Xc[1]<<8|h.Xc[0];m||(m=1==h.gd?256:65536);h=m-f;0==d.mode?(0>=h&&(h=0),h||(d.kd=!0,d.df=!1,b||zi(a,0))):4==d.mode?(d.kd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Xc[0]=h&255,d.Xc[1]=h>>8,d.me=e,!b&&d.kd&&zi(a,0))):6==d.mode&&(h-=f,0>=h&&(d.kd=!d.kd,h=g+h,0>=h&&(h=g),d.Xc[0]=h&255,d.Xc[1]=h>>8,d.me=e,!b&&d.kd&&zi(a,0)));d.Zb[0]=h&255;d.Zb[1]=h>>8;c&&(a.me=0)}return d} +function si(a,b,c,d,e){ci(a.$a[b>>2].Gb[b&3],c,d,e)}function mi(a,b,c){b=a.$a[b>>2].Gb[b&3];b.dh&&b.Gi&&b.Eh?(c&&(b.fh=c),b.Fd||md(a,b,!0)):c&&c(!0)} +function md(a,b,c){c&&(b.count=b.Zb[1]<<8|b.Zb[0],b.jm=b.mode&12,b.Bk=b.jd=!1);for(var d=!1;0<=b.count&&(c=b.Xg<<16|b.Rb[1]<<8|b.Rb[0],4==b.jm?(d=!0,function(c){b.Gi.call(b.dh,b.Eh,-1,function(f,g){0>f&&(b.Bk||(b.Bk=!0),f=255);b.Fd||db(a.na,c,f);(d=g)&&setTimeout(function(){ti(b)||md(a,b)},0)})}(c)):8==b.jm?(c=bb(a.na,c),0>b.Gi.call(b.dh,b.Eh,c)&&(b.jd=!0)):b.jd=!0),!d&&!ti(b););} +function ti(a){if(!a.jd&&0<=--a.count&&(a.mode&32?(a.Rb[0]--,0>a.Rb[0]&&(a.Rb[0]=255,a.Rb[1]--,0>a.Rb[1]&&(a.Rb[1]=255))):(a.Rb[0]++,255>3,e=a.tb[d];e.Jb|=1<<(b&7);e.jg=c||0;1==d&&(a.tb[0].Jb|=4);wi(a,d)} +function Ai(a,b){var c=b>>3,d=a.tb[c],e=1<<(b&7);d.Jb&e&&(d.Jb&=~e,1!=c||d.Jb||(a.tb[0].Jb&=-5),wi(a,c))}function kd(a,b){void 0===b&&(b=0);var c=-1,d=a.tb[b];if(d.jg)c=-2,d.jg--;else for(var e=d.Jb&((d.Fc|d.vd)^255),f=d.xe+1;;){var f=f&7,g=1<>6;if(3!=a){c=b&1;var d=b&14;if(b&=48){var e=this.Hb[a];e.vg=b;e.mode=d;e.nk=c;e.Ic=[0,0];e.Zb=[0,0];e.Vf=[0,0];e.kd=!1;e.Yf=!1;e.df=!1;Ci(this,a);0==a&&Ai(this,0);2==a&&255==this.tb[0].vd&&77==this.Ac&&(a=this.Hb[0],a.Yc[0]=a.Ic[0],a.Yc[1]=a.Ic[1],a.me=F(this.S,this.oh))}else Rh(this,a),b=this.Hb[a],b.Vf[0]=b.Zb[0],b.Vf[1]=b.Zb[1],b.Yf=!0,Ci(this,a)}}; +function Ei(a,b){var c=a.Hb[b],d=c.Ic[1]<<8|c.Ic[0];d||(d=1==c.gd?256:65536);return d}function Ci(a,b){var c=a.Hb[b];c.de=32==c.vg?1:0;c.gd=48==c.vg?2:1} +function Rh(a,b,c){var d=a.Hb[b];if(d.df&&(2!=b||a.Ac&1)){var e=F(a.S,a.oh),f=(e-d.me)/a.Ql|0;0>f&&(d.me=e,f=0);var g=Ei(a,b),h=a.Hb[b],m=h.Yc[1]<<8|h.Yc[0];m||(m=1==h.gd?256:65536);h=m-f;0==d.mode?(0>=h&&(h=0),h||(d.kd=!0,d.df=!1,b||zi(a,0))):4==d.mode?(d.kd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Yc[0]=h&255,d.Yc[1]=h>>8,d.me=e,!b&&d.kd&&zi(a,0))):6==d.mode&&(h-=f,0>=h&&(d.kd=!d.kd,h=g+h,0>=h&&(h=g),d.Yc[0]=h&255,d.Yc[1]=h>>8,d.me=e,!b&&d.kd&&zi(a,0)));d.Zb[0]=h&255;d.Zb[1]=h>>8;c&&(a.me=0)}return d} function Lb(a,b){for(var c=0;c=Gh){var c=0,d=a.S.Hd,e=F(a.S,a.oh);if(0<=a.eg&&(c=e-a.eg,Math.floor(c/d)&&60<=++a.pa[0]&&(a.pa[0]=0,60<=++a.pa[2]&&(a.pa[2]=0,24<=++a.pa[4])))){a.pa[4]=0;a.pa[6]=a.pa[6]%7+1;var f=a.pa[9],g=qa[a.pa[8]-1];28==g&&0===f%4&&(f%100||0===f%400)&&g++;++a.pa[7]>g&&(a.pa[7]=1,12<++a.pa[8]&&(a.pa[8]=1,a.pa[9]=(a.pa[9]+1)%100))}a.eg=e-c%d}} -k.zn=function(a,b){var c=this.Wg;this.Of&16&&(this.yc&128?c=this.cd:this.bb&&(c=Fi(this.bb)));this.ba(a,null,b,"PPI_A",O.sc,c);return c};k.So=function(a,b,c){this.ba(a,b,c,"PPI_A",O.sc);this.Wg=b};k.An=function(a,b){var c=this.yc;this.ba(a,null,b,"PPI_B",O.sc,c);return c};k.To=function(a,b,c){this.ba(a,b,c,"PPI_B",O.sc);Gi(this,b);this.bb&&Hi(this.bb,b&128?!1:!0,b&64?!0:!1)};function Gi(a,b){var c=!!(b&2),d=!!(a.yc&2);a.yc=b;c!=d&&Kb(a,c)} -k.Bn=function(a,b){var c=0,c=this.Fa==Bh?this.yc&4?c|this.Qe&15:c|this.Qe>>4&1:this.yc&8?c|this.cd>>4:c|this.cd&15;this.yc&1&&Rh(this,2).kd&&(c=this.yc&2?c|32:c|16);this.ba(a,null,b,"PPI_C",O.sc|O.Fg,c);return c};k.Uo=function(a,b,c){this.ba(a,b,c,"PPI_C",O.sc);this.ii=b};k.Cn=function(a,b){var c=this.Of;this.ba(a,null,b,"PPI_CTRL",O.sc,c);return c};k.Vo=function(a,b,c){this.ba(a,b,c,"PPI_CTRL",O.sc);this.Of=b}; -k.Pm=function(a,b){var c=this.Rg;this.ba(a,null,b,"8042_OUTBUFF",O.Se,c);this.kb&=-258;var d=this.bb&&Fi(this.bb,!0);d&&Ii(this,d);return c};k.mo=function(a,b,c){this.ba(a,b,c,"8042_INBUF.DATA",O.Se);if(this.kb&8)switch(this.ud){case 96:Ji(this,b);break;case 209:Ki(this,b);break;default:if(Ji(this,this.Xd&-17),this.bb){a=-1;switch(b){case 255:a=250,Li(this.bb)}Ii(this,a)}}this.ud=b;this.kb&=-9};k.Qm=function(a,b){var c=this.yc&-209|(F(this.S)&64?16:0);this.ba(a,null,b,"8042_RWREG",O.Se|O.sm,c);return c}; +k.zn=function(a,b){var c=this.Wg;this.Of&16&&(this.Ac&128?c=this.cd:this.bb&&(c=Fi(this.bb)));this.ba(a,null,b,"PPI_A",O.uc,c);return c};k.So=function(a,b,c){this.ba(a,b,c,"PPI_A",O.uc);this.Wg=b};k.An=function(a,b){var c=this.Ac;this.ba(a,null,b,"PPI_B",O.uc,c);return c};k.To=function(a,b,c){this.ba(a,b,c,"PPI_B",O.uc);Gi(this,b);this.bb&&Hi(this.bb,b&128?!1:!0,b&64?!0:!1)};function Gi(a,b){var c=!!(b&2),d=!!(a.Ac&2);a.Ac=b;c!=d&&Kb(a,c)} +k.Bn=function(a,b){var c=0,c=this.Fa==Bh?this.Ac&4?c|this.Qe&15:c|this.Qe>>4&1:this.Ac&8?c|this.cd>>4:c|this.cd&15;this.Ac&1&&Rh(this,2).kd&&(c=this.Ac&2?c|32:c|16);this.ba(a,null,b,"PPI_C",O.uc|O.Fg,c);return c};k.Uo=function(a,b,c){this.ba(a,b,c,"PPI_C",O.uc);this.hi=b};k.Cn=function(a,b){var c=this.Of;this.ba(a,null,b,"PPI_CTRL",O.uc,c);return c};k.Vo=function(a,b,c){this.ba(a,b,c,"PPI_CTRL",O.uc);this.Of=b}; +k.Pm=function(a,b){var c=this.Rg;this.ba(a,null,b,"8042_OUTBUFF",O.Se,c);this.kb&=-258;var d=this.bb&&Fi(this.bb,!0);d&&Ii(this,d);return c};k.mo=function(a,b,c){this.ba(a,b,c,"8042_INBUF.DATA",O.Se);if(this.kb&8)switch(this.ud){case 96:Ji(this,b);break;case 209:Ki(this,b);break;default:if(Ji(this,this.Xd&-17),this.bb){a=-1;switch(b){case 255:a=250,Li(this.bb)}Ii(this,a)}}this.ud=b;this.kb&=-9};k.Qm=function(a,b){var c=this.Ac&-209|(F(this.S)&64?16:0);this.ba(a,null,b,"8042_RWREG",O.Se|O.rm,c);return c}; k.no=function(a,b,c){this.ba(a,b,c,"8042_RWREG",O.Se);Gi(this,b)};k.Rm=function(a,b){this.ba(a,null,b,"8042_STATUS",O.Se,this.kb);var c=this.kb&255;this.kb&256&&(this.kb|=1,this.kb&=-257);return c}; k.lo=function(a,b,c){this.ba(a,b,c,"8042_INBUFF.CMD",O.Se);this.ud=b;this.kb|=8;a=0;240<=this.ud&&(a=this.ud^15,this.ud=240);switch(this.ud){case 192:Ii(this,this.ve);break;case 173:Ji(this,this.Xd|16);break;case 174:Ji(this,this.Xd&-17);break;case 170:this.bb&&Mi(this.bb,!0);Ji(this,this.Xd|16);Ii(this,85);Ki(this,3);break;case 224:Ii(this,this.Xd&16?0:1);break;case 240:a&1&&xc(this.S)}};function Ji(a,b){a.Xd=b;a.kb=a.kb&-5|b&4;a.bb&&Hi(a.bb,!!(b&8),!(b&16))&&Ii(a,Fi(a.bb,!0))} -function Ii(a,b){0<=b&&(a.Rg=b,a.kb&=-2,a.kb|=256)}function Ki(a,b){a.gi=b;Ya(a.na,!!(b&2));b&1||xc(a.S)}k.en=function(a,b){this.ba(a,null,b,"CMOS_ADDR",O.Cf,this.we);return this.we};k.Ao=function(a,b,c){this.ba(a,b,c,"CMOS_ADDR",O.Cf);this.we=b;this.Vg=b&128?0:128};k.fn=function(a,b){var c=this.we&63,d=13>=c?Sh(this,c):this.pa[c];this.ba(a,null,b,"CMOS_DATA["+r(c)+"]",O.Cf,d);return d}; -k.Bo=function(a,b,c){var d=this.we&63;this.ba(a,b,c,"CMOS_DATA["+r(d)+"]",O.Cf);a=this.pa;13>=d&&10>d&&(c=!1,this.pa[11]&4||(b=10*(b>>4)+(b&15),c=!0),4==d||5==d)&&(c&&12=b?b=12==b?0:b:(b-=116,b=24==b?12:b)));a[d]=b};k.xn=function(a,b){this.ba(a,null,b,"MFG_DATA",O.sc,this.Mf);return this.Mf};k.Po=function(a,b,c){this.ba(a,b,c,"MFG_DATA",O.sc);this.Mf=b};k.Ro=function(a,b,c){this.ba(a,b,c,"NMI",O.sc);this.Vg=b}; -k.Nn=function(a){var b=this.S.G>>8;this.X&&E(this.X,O.um)&&(Ec(this.X,26,a),Fc(this.S,a,function(a,d){return function(e){d=F(a.S)-d;var f,g=a.S.J&255,h=a.S.J>>8,m=a.S.J&255,n=a.S.J>>8;if(2==b||3==b)f=" CH(hour)="+u(h)+" CL(min)="+r(g)+" DH(sec)="+r(n);else if(4==b||5==b)f=" CX(year)="+u(a.S.I)+" DH(month)="+r(n)+" DL(day)="+r(m);Gc(a.X,26,e,d,f)}}(this,F(this.S))));return!0};function Ch(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;ec||2E4=c?Sh(this,c):this.pa[c];this.ba(a,null,b,"CMOS_DATA["+r(c)+"]",O.Cf,d);return d}; +k.Bo=function(a,b,c){var d=this.we&63;this.ba(a,b,c,"CMOS_DATA["+r(d)+"]",O.Cf);a=this.pa;13>=d&&10>d&&(c=!1,this.pa[11]&4||(b=10*(b>>4)+(b&15),c=!0),4==d||5==d)&&(c&&12=b?b=12==b?0:b:(b-=116,b=24==b?12:b)));a[d]=b};k.xn=function(a,b){this.ba(a,null,b,"MFG_DATA",O.uc,this.Mf);return this.Mf};k.Po=function(a,b,c){this.ba(a,b,c,"MFG_DATA",O.uc);this.Mf=b};k.Ro=function(a,b,c){this.ba(a,b,c,"NMI",O.uc);this.Vg=b}; +k.Nn=function(a){var b=this.S.G>>8;this.X&&E(this.X,O.tm)&&(Ec(this.X,26,a),Fc(this.S,a,function(a,d){return function(e){d=F(a.S)-d;var f,g=a.S.J&255,h=a.S.J>>8,m=a.S.J&255,n=a.S.J>>8;if(2==b||3==b)f=" CH(hour)="+u(h)+" CL(min)="+r(g)+" DH(sec)="+r(n);else if(4==b||5==b)f=" CX(year)="+u(a.S.I)+" DH(month)="+r(n)+" DL(day)="+r(m);Gc(a.X,26,e,d,f)}}(this,F(this.S))));return!0};function Ch(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;ec||2E4>8&255,this.yb[c++]=f[b]>>16&255,this.yb[c++]=f[b]>>24&255;else this.yb=d;this.bi=d.symbols;if(!this.yb.length){w("Empty ROM: "+a);return}if(1==this.yb.length){w(this.yb[0]);return}}catch(g){this.Ga("ROM data error: "+ -g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.yb=Array(a.length),d=0;d>8&255,this.yb[c++]=f[b]>>16&255,this.yb[c++]=f[b]>>24&255;else this.yb=d;this.ai=d.symbols;if(!this.yb.length){w("Empty ROM: "+a);return}if(1==this.yb.length){w(this.yb[0]);return}}catch(g){this.Ga("ROM data error: "+ +g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.yb=Array(a.length),d=0;dthis.Pg?21:23,c=a.pa[b]|a.pa[b+1]<<8,c=c+(this.Od>>10);a.pa[b]=c&255;a.pa[b+1]=c>>8;ai(a)}}else w("No RAM allocated")}; -Ba(function(){for(var a=B(window.document,"pcjs","ram"),b=0;ba.xc.length){if(!(!d&&!a.ai[c]||d&&a.ai[c])){a.ai[c]=d;a.Qa("scan code "+r(b)+" buffered");a.xc.push(b);1==a.xc.length&&a.ka&&zi(a.ka,1);for(var e in Yi)if(Yi[e]==c){(c=a.sa["key-"+e])&&void 0!==d&&(c.style.color=d?"#ffffff":"#000000",c.style.backgroundColor=d?"#000000":"#ffffff");break}}}else 20==a.xc.length&&a.xc.push(255),a.Qa("scan code buffer overflow")}function cj(a,b){var c=b?a.Wn:a.Vn;a.S&&a.S.ld&&(c/=a.S.ld);return c} +d,b=function(a,b,c){return function(){bj(a,c)}}(this,c,Yi[c]),c=function(a,b,c){return function(){bj(a,c)}}(this,c,Yi[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};k.nc=function(a,b,c,d){this.na=b;this.S=c;this.X=d;this.Da=a;this.ka=C(a,"ChipSet")};k.Ta=function(){this.yk=(this.Om=va("iOS"))||va("Android");this.Qa("mobile keyboard support: "+(this.yk?"true":"false"));return x.prototype.Ta.call(this)}; +function Li(a){a.Qa("keyboard reset",!0);a.zc=[170];a.ka&&zi(a.ka,1,4)}function Hi(a,b,c){var d=!1;a.xi!==c&&(a.xi=a.Di=c);a.lh!==b&&(a.lh=b)&&!a.Di&&Mi(a);a.lh&&a.Di&&(Li(a),a.Di=!1,d=!0);return d}function Fi(a,b){var c=0;a.zc.length&&(c=a.zc[0],a.Qa("scan code "+r(c)+" delivered"),b&&Mi(a));return c}function Mi(a,b){0a.zc.length){if(!(!d&&!a.$h[c]||d&&a.$h[c])){a.$h[c]=d;a.Qa("scan code "+r(b)+" buffered");a.zc.push(b);1==a.zc.length&&a.ka&&zi(a.ka,1);for(var e in Yi)if(Yi[e]==c){(c=a.sa["key-"+e])&&void 0!==d&&(c.style.color=d?"#ffffff":"#000000",c.style.backgroundColor=d?"#000000":"#ffffff");break}}}else 20==a.zc.length&&a.zc.push(255),a.Qa("scan code buffer overflow")}function cj(a,b){var c=b?a.Wn:a.Vn;a.S&&a.S.ld&&(c/=a.S.ld);return c} function dj(a,b){!a.Me||void 0!==b&&b==a.Me||(clearTimeout(a.qd[a.Me]),ej(a,a.Me,!1))} -function $i(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.Wl=f);240==f+224?(a.Ea&=-2,c&&(a.Ea|=1),f+=224,e=!1):241==f+224?(a.Ea&=-5,c&&(a.Ea|=4),f+=224,e=!1):242==f+224?(a.Ea&=-9,c&&(a.Ea|=8),f+=224,e=!1):244==f+224?(a.Ea&=-17,c&&(a.Ea|=16),f+=224,d=aj(a,f)):91==f?(a.Ea&=-33,c&&(a.Ea|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&4==(a.Ea&12)&&(f=254),d=c?!aj(a,f):!1):void 0!==P[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.Ea&=-33,a.zk||f!=a.Wl||dj(a));void 0===d&&(d=!ej(a,f,c));return d} +function $i(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.Vl=f);240==f+224?(a.Ea&=-2,c&&(a.Ea|=1),f+=224,e=!1):241==f+224?(a.Ea&=-5,c&&(a.Ea|=4),f+=224,e=!1):242==f+224?(a.Ea&=-9,c&&(a.Ea|=8),f+=224,e=!1):244==f+224?(a.Ea&=-17,c&&(a.Ea|=16),f+=224,d=aj(a,f)):91==f?(a.Ea&=-33,c&&(a.Ea|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&4==(a.Ea&12)&&(f=254),d=c?!aj(a,f):!1):void 0!==P[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.Ea&=-33,a.yk||f!=a.Vl||dj(a));void 0===d&&(d=!ej(a,f,c));return d} function aj(a,b,c){var d=!1;dj(a,b);ej(a,b,!0)&&(c?ej(a,b,!1):(c=!1,a.qd[b]&&(clearTimeout(a.qd[b]),c=!0),c=cj(a,c),a.qd[a.Me=b]=setTimeout(function(a){return function(){ej(a,b,!1)}}(a),c)),d=!0);return d} function ej(a,b,c){var d=!1;c||(a.qd[b]=null,a.Me==b&&(a.Me=0));var e=P[b];void 0===e&&1<=b&&26>=b&&(e=P[b+64]&255|61696);if(void 0!==e){14==e&&12==(a.Ea&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.Ea&17||(d=42):224==f?a.Ea&18||(d=54):241==f?a.Ea&4||(d=29):242==f&&(a.Ea&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;cc.length)c=[!1,0,null,null,0,Array(qj)];this.X=a.X;this.type=e[0];this.port=e[1];this.he=b;this.cb=e[2];this.rc=e[3];this.Uc=d||e[4];65536<=this.Uc&&720896<=this.cb&&(this.rc=Math.min(this.Uc>>2,32768));this.jc=c[0];this.zc=c[1];this.$e=c[2];this.vf=c[3];this.lc=c[4]&255;this.rh=c[4]>>8&255;this.bc=c[5];this.Oi=qj;this.Qg=rj;if(5==b){this.Oi=sj;this.Qg=tj;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5), -0,0,0,Array(9),0,this.Uc,Array(this.Uc>>2),771,0,4294967295,0,4294967295,0,4294967295,0]);this.hd=b[0];this.Bd=b[1];this.Rd=b[2];this.di=uj;this.Sh=b[3];this.bg=b[4];this.qh=b[5];this.Dd=b[6];this.Ff=b[7];this.fi=vj;this.Ii=b[8];this.Ji=b[9];this.Cd=b[10];this.se=b[11];this.ei=wj;this.vb=b[12];d=this.Uc>>2;if((this.ed=b[14])&&this.ed.lengthc.length)c=[!1,0,null,null,0,Array(qj)];this.X=a.X;this.type=e[0];this.port=e[1];this.he=b;this.cb=e[2];this.tc=e[3];this.Vc=d||e[4];65536<=this.Vc&&720896<=this.cb&&(this.tc=Math.min(this.Vc>>2,32768));this.kc=c[0];this.Bc=c[1];this.$e=c[2];this.vf=c[3];this.mc=c[4]&255;this.rh=c[4]>>8&255;this.bc=c[5];this.Ni=qj;this.Qg=rj;if(5==b){this.Ni=sj;this.Qg=tj;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5), +0,0,0,Array(9),0,this.Vc,Array(this.Vc>>2),771,0,4294967295,0,4294967295,0,4294967295,0]);this.hd=b[0];this.Bd=b[1];this.Rd=b[2];this.ci=uj;this.Rh=b[3];this.bg=b[4];this.qh=b[5];this.Dd=b[6];this.Ff=b[7];this.ei=vj;this.Hi=b[8];this.Ii=b[9];this.Cd=b[10];this.se=b[11];this.di=wj;this.vb=b[12];d=this.Vc>>2;if((this.ed=b[14])&&this.ed.length>8&255)} -var U=[,,function(a){a+=this.offset;return(this.ia.vb=this.ra[a])>>this.ia.Gj&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.ra[b]>>8:this.ra[b])&255}];U[16]=function(a){a+=this.offset;a=this.ra[a];for(var b=this.ia.Qi&this.ia.Ri,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};U[512]=function(a,b){var c=a+this.offset,d;d=this.ra[c]&~this.ia.gb|(b|b<<8|b<<16|b<<24)&this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; +uj="PAL00 PAL01 PAL02 PAL03 PAL04 PAL05 PAL06 PAL07 PAL08 PAL09 PAL0A PAL0B PAL0C PAL0D PAL0E PAL0F MODE OVRSCAN PLANES HORZPAN".split(" "),vj=["RESET","CLK","MAPMASK","CHARMAP","MODE"],wj="SRESET ESRESET COLRCMP DATAROT READMAP MODE MISC COLRDC BITMASK".split(" ");function xj(a){return this.sc(a)|this.sc(a+1)<<8}function yj(a,b){this.Dc(a,b&255);this.Dc(a+1,b>>8&255)} +var U=[,,function(a){a+=this.offset;return(this.ia.vb=this.ra[a])>>this.ia.Gj&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.ra[b]>>8:this.ra[b])&255}];U[16]=function(a){a+=this.offset;a=this.ra[a];for(var b=this.ia.Pi&this.ia.Qi,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};U[512]=function(a,b){var c=a+this.offset,d;d=this.ra[c]&~this.ia.gb|(b|b<<8|b<<16|b<<24)&this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; U[1024]=function(a,b){var c=a+this.offset;b=b>>this.ia.md|b<<8-this.ia.md&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ia.le|this.ia.Je;d=d&this.ia.gb|this.ra[c]&~this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; U[1536]=function(a,b){var c=a+this.offset;b=b>>this.ia.md|b<<8-this.ia.md&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ia.le|this.ia.Je;d&=this.ia.vb;d=d&this.ia.gb|this.ra[c]&~this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; U[2560]=function(a,b){var c=a+this.offset;b=b>>this.ia.md|b<<8-this.ia.md&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ia.le|this.ia.Je;d|=this.ia.vb;d=d&this.ia.gb|this.ra[c]&~this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; U[3584]=function(a,b){var c=a+this.offset;b=b>>this.ia.md|b<<8-this.ia.md&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ia.le|this.ia.Je;d^=this.ia.vb;d=d&this.ia.gb|this.ra[c]&~this.ia.gb;d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)};U[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ia.gb&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.ra[d]&~c;c=c&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[d]!=c&&(this.ra[d]=c,this.mb=!0)}; U[4096]=function(a){a+=this.offset;var b=this.ra[a]&~this.ia.gb|this.ia.vb&this.ia.gb;this.ra[a]!=b&&(this.ra[a]=b,this.mb=!0)};U[8192]=function(a,b){var c=a+this.offset,d=nj[b&15],d=d&this.ia.gb|this.ra[c]&~this.ia.gb,d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)};U[24576]=function(a,b){var c=a+this.offset,d=nj[b&15],d=d&this.ia.vb,d=d&this.ia.gb|this.ra[c]&~this.ia.gb,d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; U[40960]=function(a,b){var c=a+this.offset,d=nj[b&15],d=d|this.ia.vb,d=d&this.ia.gb|this.ra[c]&~this.ia.gb,d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)};U[57344]=function(a,b){var c=a+this.offset,d=nj[b&15],d=d^this.ia.vb,d=d&this.ia.gb|this.ra[c]&~this.ia.gb,d=d&this.ia.ob|this.ia.vb&~this.ia.ob;this.ra[c]!=d&&(this.ra[c]=d,this.mb=!0)}; -function zj(a){var b=[];if(void 0!==a.he){b[0]=a.jc;b[1]=a.zc;b[2]=a.$e;b[3]=a.vf;b[4]=a.lc|a.rh<<8;b[5]=a.bc;if(5==a.he){var c=[];c[0]=a.hd;c[1]=a.Bd;c[2]=a.Rd;c[3]=a.Sh;c[4]=a.bg;c[5]=a.qh;c[6]=a.Dd;c[7]=a.Ff;c[8]=a.Ii;c[9]=a.Ji;c[10]=a.Cd;c[11]=a.se;c[12]=a.vb;c[13]=a.Uc;var d;a:if(d=a.ed){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=m;h=n}if(f.lengtha&&(a=0);for(var c="",d=0;8>d;d++){for(var n=p(b.cb+a)+":",q=0;8>q&&ag;g++)for(var h=g;h>1;f[e++]=m;h=n}if(f.lengtha&&(a=0);for(var c="",d=0;8>d;d++){for(var n=p(b.cb+a)+":",q=0;8>q&&a>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),eb(this.na,b,c|d<<8);zb(this,!0)}};function Hj(a){a.la.bg&1?(a.Tc=a.li,a.zb=a.la):(a.Tc=a.la,a.zb=a.bh)}k.save=function(){var a=new H(this);a.set(0,zj(this.li));a.set(1,zj(this.bh));a.set(2,[this.je,this.nd,this.Jd]);a.set(3,zj(this.la));return a.data()}; -k.restore=function(a){var b=a[2];this.je=b[0];this.nd=b[1];this.Jd=b[2];this.Ca=null;this.Tc=this.li=new oj(this,1,a[0]);this.zb=this.bh=new oj(this,3,a[1]);this.la=new oj(this,5,a[3],this.Uc);this.la.jc&&Hj(this);Ij(this);if(!Kj(this))return!1;Lj(this);return!0}; +k.reset=function(){var a=!0,b=0;this.ka&&(b=Yh(this.ka));var c=!1;if(this.Fa)switch(this.Fa){case "ega":var c=!0,d=hj[this.Sg];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.je!==b&&(this.je=b,a=!0);this.Ca=null;this.Uc=this.ki=new oj(this,1);this.zb=this.bh=new oj(this,3);c?(this.la=new oj(this,5,null,this.Vc),Hj(this)):this.la=new oj;Ij(this);this.Jd=null;this.nd=3==b?fj:3;this.Be=this.Lc=-1;this.Ae=0;Jj(this,this.nd);if(this.Ca.cb&&a){a=this.Ca.cb+this.li;for(b=this.Ca.cb;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),eb(this.na,b,c|d<<8);zb(this,!0)}};function Hj(a){a.la.bg&1?(a.Uc=a.ki,a.zb=a.la):(a.Uc=a.la,a.zb=a.bh)}k.save=function(){var a=new H(this);a.set(0,zj(this.ki));a.set(1,zj(this.bh));a.set(2,[this.je,this.nd,this.Jd]);a.set(3,zj(this.la));return a.data()}; +k.restore=function(a){var b=a[2];this.je=b[0];this.nd=b[1];this.Jd=b[2];this.Ca=null;this.Uc=this.ki=new oj(this,1,a[0]);this.zb=this.bh=new oj(this,3,a[1]);this.la=new oj(this,5,a[3],this.Vc);this.la.kc&&Hj(this);Ij(this);if(!Kj(this))return!1;Lj(this);return!0}; k.ho=function(a,b,c){if(c)this.Ga("Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){w("Empty font ROM image: "+a);return}if(1==d.length){w(d[0]);return}if(8192==d.length)Ri(this,d,[0,6144]);else{this.Ga("Unrecognized font data length ("+d.length+")");return}}catch(e){this.Ga("Font ROM data error: "+e.message);return}this.Ta()}}; -function Mj(a,b){if(1==b)return a.td[0]=S[0],a.td[1]=S[7],a.td;if(2==b){var c=a.Ca.$e;if(a.Ca===a.la){var d=a.la.Rd[0],c=d&7;d&16&&(c|=8);18!=a.la.Rd[1]&&(c|=32)}a.td[0]=S[c&15];c=c&32?lj:kj;for(d=0;dvb||!ka?vb:8,Yd=Ti.createImageData(n.hc,n.ic),Ha=0;256>Ha;Ha++){for(gb= -0;gb=vb-2,rl=Qc[gb>(8<=Ob&&176<=Ha&&223>=Ha?7:Ob)?s:Xd;Pj(Yd,Ui,Vi,Wi);A&&Pj(Yd,Ui+1,Vi,Wi)}Ti.putImageData(Yd,(Ha&15)*n.hc,(Ha>>4)*n.ic)}n.Ve[v]="#"+r(s[0])+r(s[1])+r(s[2]);n.fk[v]=s;n.Yh[v]=Rc;n=!0}}a.Td[b]=t;return n}function Qj(a){0a.Be&&(a.Be=0):a.Be=-1} -function Lj(a){if(a.Sb){for(var b=10;15>=b;b++)if(null==a.Ca.bc[b])return;var c=a.Ca.bc[10],b=c&31,d=a.Ca.bc[11]&31,e=a.Ca.bc[9]&31,f=!1;a.Ca===a.la&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Rj(a);else{c=a.Ca.bc[15]+((a.Ca.bc[14]&63)<<8);a.Kc!=c&&(Rj(a),a.Kc=c);d=d-b+1;if(a.lm!=b||a.vk!=d)a.lm=b,a.vk=d;a.ee=e+1;Qj(a)}}} -function Rj(a){if(0<=a.Kc){if(void 0!==a.cc){var b=a.cc[a.Kc];if(b&131072){var b=b&-131073,c=a.Kc%a.Bb,d=Math.floor(a.Kc/a.Bb);a.Sb&&a.Td[a.Sb]&&(a.af&&Sj(a,c,d,b,a.af),Sj(a,c,d,b));a.cc[a.Kc]=b}}a.Kc=-1}} -function Tj(a){var b;a=a.Ca;var c=a.se[5];if(null!=c){b=2;var d=512,e=a.se[3]&31;switch(c&3){case 0:if(e){d=1024;switch(e&24){case 8:d=1536;break;case 16:d=2560;break;case 24:d=3584}a.md=e&7}break;case 1:d=4096;break;case 2:switch(e&24){default:d=8192;break;case 8:d=24576;break;case 16:d=40960;break;case 24:d=57344}}c&8&&(b=16);c&16&&(b|=1,d|=256);b|=d}return b}k.Pe=function(a){var b=this.Ca;null!=a&&b&&a!=b.yh&&(b.Ph(a),this.na.Ph(b.cb,b.rc,b.Jf))}; -function Kj(a,b){var c,d=a.Jd,e=a.Ca;if(e)if(1==e.he)d=fj;else if(5==e.he){var d=null,f=e.Uc>>2,g=32768f&&(d=c?13:14):c&&(d-=2));c=Tj(a)}}else e.zc&8&&(e.zc&2?(d=e.zc&16?6:5,e.zc&4||(d-=1)):(d=e.zc&1?3:1,e.zc&4&&(d-= +function Mj(a,b){if(1==b)return a.td[0]=S[0],a.td[1]=S[7],a.td;if(2==b){var c=a.Ca.$e;if(a.Ca===a.la){var d=a.la.Rd[0],c=d&7;d&16&&(c|=8);18!=a.la.Rd[1]&&(c|=32)}a.td[0]=S[c&15];c=c&32?lj:kj;for(d=0;dvb||!ka?vb:8,Yd=Ti.createImageData(n.ic,n.jc),Ha=0;256>Ha;Ha++){for(gb= +0;gb=vb-2,rl=Qc[gb>(8<=Ob&&176<=Ha&&223>=Ha?7:Ob)?s:Xd;Pj(Yd,Ui,Vi,Wi);A&&Pj(Yd,Ui+1,Vi,Wi)}Ti.putImageData(Yd,(Ha&15)*n.ic,(Ha>>4)*n.jc)}n.Ve[v]="#"+r(s[0])+r(s[1])+r(s[2]);n.fk[v]=s;n.Xh[v]=Rc;n=!0}}a.Td[b]=t;return n}function Qj(a){0a.Be&&(a.Be=0):a.Be=-1} +function Lj(a){if(a.Sb){for(var b=10;15>=b;b++)if(null==a.Ca.bc[b])return;var c=a.Ca.bc[10],b=c&31,d=a.Ca.bc[11]&31,e=a.Ca.bc[9]&31,f=!1;a.Ca===a.la&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Rj(a);else{c=a.Ca.bc[15]+((a.Ca.bc[14]&63)<<8);a.Lc!=c&&(Rj(a),a.Lc=c);d=d-b+1;if(a.km!=b||a.uk!=d)a.km=b,a.uk=d;a.ee=e+1;Qj(a)}}} +function Rj(a){if(0<=a.Lc){if(void 0!==a.cc){var b=a.cc[a.Lc];if(b&131072){var b=b&-131073,c=a.Lc%a.Bb,d=Math.floor(a.Lc/a.Bb);a.Sb&&a.Td[a.Sb]&&(a.af&&Sj(a,c,d,b,a.af),Sj(a,c,d,b));a.cc[a.Lc]=b}}a.Lc=-1}} +function Tj(a){var b;a=a.Ca;var c=a.se[5];if(null!=c){b=2;var d=512,e=a.se[3]&31;switch(c&3){case 0:if(e){d=1024;switch(e&24){case 8:d=1536;break;case 16:d=2560;break;case 24:d=3584}a.md=e&7}break;case 1:d=4096;break;case 2:switch(e&24){default:d=8192;break;case 8:d=24576;break;case 16:d=40960;break;case 24:d=57344}}c&8&&(b=16);c&16&&(b|=1,d|=256);b|=d}return b}k.Pe=function(a){var b=this.Ca;null!=a&&b&&a!=b.yh&&(b.Oh(a),this.na.Oh(b.cb,b.tc,b.Jf))}; +function Kj(a,b){var c,d=a.Jd,e=a.Ca;if(e)if(1==e.he)d=fj;else if(5==e.he){var d=null,f=e.Vc>>2,g=32768f&&(d=c?13:14):c&&(d-=2));c=Tj(a)}}else e.Bc&8&&(e.Bc&2?(d=e.Bc&16?6:5,e.Bc&4||(d-=1)):(d=e.Bc&1?3:1,e.Bc&4&&(d-= 1)));else a.Jd=null,null==d&&(d=a.nd);if(!Jj(a,d,b))return!1;a.Pe(c);return!0} -function Jj(a,b,c){if(null!=b&&(b!=a.Jd||c)){a.ym=0;a.Jd=b;b=a.Ca||(b==fj?a.Tc:a.zb);if(b!=a.Ca||b.cb!=a.cb||b.rc!=a.rc){Rj(a);if(a.cb){if(!ab(a.na,a.cb,a.rc))return!1;a.Ca&&(a.Ca.jc=!1)}a.Ca=b;b.jc=!0;a.cb=b.cb;a.rc=b.rc;if(!Za(a.na,b.cb,b.rc,!1,b===a.la?b:null))return!1}a.Sb=0;a.Bb=a.Bh;a.pc=a.Ui;a.Pi=R[fj][2];b=0;var d=R[a.Jd];d&&(a.Bb=d[0],a.pc=d[1],a.Pi=d[2],b=d[3]||0,a.Sb=d[4],4==a.je&&a.Ca===a.la&&3==a.Sb&&(7==a.la.bc[9]?a.pc=43:a.Sb=5));a.Nk=a.Bb*a.pc;a.Ah=a.Nk/a.Pi;a.mi=(a.Ah<<1)+b;a.sk= -b?a.mi+b>>1:0;13<=a.Jd&&(a.Ah<<=1);a.Td.length&&(a.yd=Math.floor(a.xd/a.Bb),a.zd=Math.floor(a.fe/a.pc),a.Sb?(b=a.Td[a.Sb],d=a.Td[a.Sb<<1],a.Fm&&80==a.Bb?d&&a.yd>=3*d.hc>>2&&(a.Sb<<=1,b=d):(d&&a.yd>=d.hc&&(a.Sb<<=1,b=d),b&&(a.yd=b.hc,a.zd=b.ic)),a.Wf=a.Xf=0,b&&(a.Wf=a.Bb*b.hc,a.Xf=a.pc*b.ic)):(a.yd=a.zd=1,a.Wf=a.Bb,a.Xf=a.pc),a.uh=a.Wc.createImageData(a.Wf,a.Xf),a.Ze=window.document.createElement("canvas"),a.Ze.width=a.Wf,a.Ze.height=a.Xf,a.af=a.Ze.getContext("2d"),a.Yj=a.Zj=0,a.oi=a.xd,a.pi=a.fe, -b=a.xd-a.Bb*a.yd,d=a.fe-a.pc*a.zd,0>1,a.oi-=b),0>1,a.pi-=d),b||d)&&(a.Wc.fillStyle=a.Lb.style.backgroundColor,a.Wc.fillRect(0,0,a.xd,a.fe));!1!==c?zb(a,!0):Uj(a,!0)}return!0}function Pj(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b+0]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Uj(a,b){var c;if(b){if(c=a.Ah,void 0===a.cc||a.cc.length!=c)a.cc=Array(c)}else{if(void 0===a.cc)return;c=a.cc.length}for(var d=0;d>8;d=g&15;var h=a.Td[a.Sb];h.Ef&&(d=h.Ef[d]);var m=g>>4&15;h.Ef&&(m=h.Ef[m]);e?(b*=h.hc,c*=h.ic,e.fillStyle=h.Ve[m],e.fillRect(b,c,h.hc,h.ic)):(b=b*a.yd+a.Yj,c=c*a.zd+a.Zj,a.Wc.fillStyle=h.Ve[m],a.Wc.fillRect(b,c,a.yd,a.zd));g&256&&(m=(f&15)*h.hc,f=(f>>4)*h.ic,e?e.drawImage(h.Yh[d],m,f,h.hc,h.ic,b,c,h.hc,h.ic):a.Wc.drawImage(h.Yh[d],m,f,h.hc,h.ic,b,c,a.yd,a.zd));g&512&&(f=a.lm,g=a.vk,e?(a.ee&&a.ee!==h.ic&&(f=Math.floor(f*h.ic/a.ee),g=Math.floor(g*h.ic/a.ee)), -e.fillStyle=h.Ve[d],e.fillRect(b,c+f,h.hc,g)):(a.ee&&a.ee!==a.zd&&(f=Math.floor(f*a.zd/a.ee),g=Math.floor(g*a.zd/a.ee)),a.Wc.fillStyle=h.Ve[d],a.Wc.fillRect(b,c+f,a.yd,g)))} -function zb(a,b){if(a.Mb){var c=!1;a.Ca&&(a.Ca===a.la?a.la.Bd&32&&(c=!0):a.Ca.zc&8&&(c=!0));if(c||b){if(b)Uj(a,!0);else if(void 0===a.cc)return;var d=!1;!(b||++a.ym&15)&&0<=a.Be&&(a.Be++,d=!0);var e=0,f=a.Nk,c=a.Ca.cb,g=c+a.Ca.rc,h=(a.Ca.bc[12]<<8)+a.Ca.bc[13];a.Sb&&(h<<=1);var c=c+h,m=a.mi;c+m>g&&(m=g-c,0>m&&(m=0));g=c+m;if(h=!b){for(var h=a.na,n=!0,q=c>>h.rb;0a.Kc)return;e=a.Kc;f=e+1}}if(a.Sb){if(a.Td[a.Sb]){d= -0;h=a.Ae=0;m=1048575;a.Ca.zc&32&&(h=32768,m&=~h,a.Be&2||(m&=-65537));for(c+=e<<1;c>8| -(t&255)<<8;s=h;var vb=16;q>=m))>>(vb-=m);Pj(a.uh,q++,v,n[Xd])}q>D&&(D=q);v=la&&(la=v+1)}e+=2;g++;if(q>=a.Bb){q=0;v+=2;if(v>a.pc)break;v==a.pc&&(v=1,e=c+a.sk)}}Aka;ka++)la=D&2155905152, -0>la&&(la=-la),la=T[la]||0,Pj(a.uh,h++,m,g[la]),D<<=1;h>q&&(q=h);m=A&&(A=m+1)}e++;if(h>=a.Bb&&(h=0,++m>a.pc))break}n>2),c=this.la.Sh&-17|(this.Sg&1<f&&(f=0);f%b.Si>b.Zn&&(d|=1);f%=b.Qk;f>b.bo&&(d|=8);b.Xi=e-f;b===a.la?(d|=b.vf&48^48,b.hd=!1):d=(b.vf^=9)|240;b.vf=d;a.ba(b.port+6,null,c,b===a.la?"STATUS1":"STATUS",d);return d}k.Qa=function(a,b){this.X&&(b||E(this.X,this.X.Hg))&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Hg,e)}; -var Bj={948:Q.prototype.un,949:Q.prototype.tn,952:Q.prototype.vn,954:Q.prototype.wn,980:Q.prototype.bn,981:Q.prototype.an,984:Q.prototype.cn,985:Q.prototype.$m,986:Q.prototype.dn},Cj={948:Q.prototype.No,949:Q.prototype.Mo,952:Q.prototype.Oo,980:Q.prototype.yo,981:Q.prototype.xo,984:Q.prototype.zo,985:Q.prototype.wo},Dj={960:Q.prototype.Jk,961:Q.prototype.Jk,962:Q.prototype.Gn,964:Q.prototype.Fn,965:Q.prototype.En,970:Q.prototype.nn,972:Q.prototype.mn,974:Q.prototype.ln,975:Q.prototype.kn},Ej={954:Q.prototype.Ul, -960:Q.prototype.Tl,961:Q.prototype.Tl,962:Q.prototype.Qo,964:Q.prototype.Xo,965:Q.prototype.Wo,970:Q.prototype.Io,972:Q.prototype.Ho,974:Q.prototype.Go,975:Q.prototype.Fo,986:Q.prototype.Ul}; +function Jj(a,b,c){if(null!=b&&(b!=a.Jd||c)){a.ym=0;a.Jd=b;b=a.Ca||(b==fj?a.Uc:a.zb);if(b!=a.Ca||b.cb!=a.cb||b.tc!=a.tc){Rj(a);if(a.cb){if(!ab(a.na,a.cb,a.tc))return!1;a.Ca&&(a.Ca.kc=!1)}a.Ca=b;b.kc=!0;a.cb=b.cb;a.tc=b.tc;if(!Za(a.na,b.cb,b.tc,!1,b===a.la?b:null))return!1}a.Sb=0;a.Bb=a.Bh;a.qc=a.Ti;a.Oi=R[fj][2];b=0;var d=R[a.Jd];d&&(a.Bb=d[0],a.qc=d[1],a.Oi=d[2],b=d[3]||0,a.Sb=d[4],4==a.je&&a.Ca===a.la&&3==a.Sb&&(7==a.la.bc[9]?a.qc=43:a.Sb=5));a.Mk=a.Bb*a.qc;a.Ah=a.Mk/a.Oi;a.li=(a.Ah<<1)+b;a.rk= +b?a.li+b>>1:0;13<=a.Jd&&(a.Ah<<=1);a.Td.length&&(a.yd=Math.floor(a.xd/a.Bb),a.zd=Math.floor(a.fe/a.qc),a.Sb?(b=a.Td[a.Sb],d=a.Td[a.Sb<<1],a.Fm&&80==a.Bb?d&&a.yd>=3*d.ic>>2&&(a.Sb<<=1,b=d):(d&&a.yd>=d.ic&&(a.Sb<<=1,b=d),b&&(a.yd=b.ic,a.zd=b.jc)),a.Wf=a.Xf=0,b&&(a.Wf=a.Bb*b.ic,a.Xf=a.qc*b.jc)):(a.yd=a.zd=1,a.Wf=a.Bb,a.Xf=a.qc),a.uh=a.Xc.createImageData(a.Wf,a.Xf),a.Ze=window.document.createElement("canvas"),a.Ze.width=a.Wf,a.Ze.height=a.Xf,a.af=a.Ze.getContext("2d"),a.Yj=a.Zj=0,a.ni=a.xd,a.oi=a.fe, +b=a.xd-a.Bb*a.yd,d=a.fe-a.qc*a.zd,0>1,a.ni-=b),0>1,a.oi-=d),b||d)&&(a.Xc.fillStyle=a.Lb.style.backgroundColor,a.Xc.fillRect(0,0,a.xd,a.fe));!1!==c?zb(a,!0):Uj(a,!0)}return!0}function Pj(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b+0]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Uj(a,b){var c;if(b){if(c=a.Ah,void 0===a.cc||a.cc.length!=c)a.cc=Array(c)}else{if(void 0===a.cc)return;c=a.cc.length}for(var d=0;d>8;d=g&15;var h=a.Td[a.Sb];h.Ef&&(d=h.Ef[d]);var m=g>>4&15;h.Ef&&(m=h.Ef[m]);e?(b*=h.ic,c*=h.jc,e.fillStyle=h.Ve[m],e.fillRect(b,c,h.ic,h.jc)):(b=b*a.yd+a.Yj,c=c*a.zd+a.Zj,a.Xc.fillStyle=h.Ve[m],a.Xc.fillRect(b,c,a.yd,a.zd));g&256&&(m=(f&15)*h.ic,f=(f>>4)*h.jc,e?e.drawImage(h.Xh[d],m,f,h.ic,h.jc,b,c,h.ic,h.jc):a.Xc.drawImage(h.Xh[d],m,f,h.ic,h.jc,b,c,a.yd,a.zd));g&512&&(f=a.km,g=a.uk,e?(a.ee&&a.ee!==h.jc&&(f=Math.floor(f*h.jc/a.ee),g=Math.floor(g*h.jc/a.ee)), +e.fillStyle=h.Ve[d],e.fillRect(b,c+f,h.ic,g)):(a.ee&&a.ee!==a.zd&&(f=Math.floor(f*a.zd/a.ee),g=Math.floor(g*a.zd/a.ee)),a.Xc.fillStyle=h.Ve[d],a.Xc.fillRect(b,c+f,a.yd,g)))} +function zb(a,b){if(a.Nb){var c=!1;a.Ca&&(a.Ca===a.la?a.la.Bd&32&&(c=!0):a.Ca.Bc&8&&(c=!0));if(c||b){if(b)Uj(a,!0);else if(void 0===a.cc)return;var d=!1;!(b||++a.ym&15)&&0<=a.Be&&(a.Be++,d=!0);var e=0,f=a.Mk,c=a.Ca.cb,g=c+a.Ca.tc,h=(a.Ca.bc[12]<<8)+a.Ca.bc[13];a.Sb&&(h<<=1);var c=c+h,m=a.li;c+m>g&&(m=g-c,0>m&&(m=0));g=c+m;if(h=!b){for(var h=a.na,n=!0,q=c>>h.rb;0a.Lc)return;e=a.Lc;f=e+1}}if(a.Sb){if(a.Td[a.Sb]){d= +0;h=a.Ae=0;m=1048575;a.Ca.Bc&32&&(h=32768,m&=~h,a.Be&2||(m&=-65537));for(c+=e<<1;c>8| +(t&255)<<8;s=h;var vb=16;q>=m))>>(vb-=m);Pj(a.uh,q++,v,n[Xd])}q>D&&(D=q);v=la&&(la=v+1)}e+=2;g++;if(q>=a.Bb){q=0;v+=2;if(v>a.qc)break;v==a.qc&&(v=1,e=c+a.rk)}}Aka;ka++)la=D&2155905152, +0>la&&(la=-la),la=T[la]||0,Pj(a.uh,h++,m,g[la]),D<<=1;h>q&&(q=h);m=A&&(A=m+1)}e++;if(h>=a.Bb&&(h=0,++m>a.qc))break}n>2),c=this.la.Rh&-17|(this.Sg&1<f&&(f=0);f%b.Ri>b.Zn&&(d|=1);f%=b.Pk;f>b.bo&&(d|=8);b.Xi=e-f;b===a.la?(d|=b.vf&48^48,b.hd=!1):d=(b.vf^=9)|240;b.vf=d;a.ba(b.port+6,null,c,b===a.la?"STATUS1":"STATUS",d);return d}k.Qa=function(a,b){this.X&&(b||E(this.X,this.X.Hg))&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Hg,e)}; +var Bj={948:Q.prototype.un,949:Q.prototype.tn,952:Q.prototype.vn,954:Q.prototype.wn,980:Q.prototype.bn,981:Q.prototype.an,984:Q.prototype.cn,985:Q.prototype.$m,986:Q.prototype.dn},Cj={948:Q.prototype.No,949:Q.prototype.Mo,952:Q.prototype.Oo,980:Q.prototype.yo,981:Q.prototype.xo,984:Q.prototype.zo,985:Q.prototype.wo},Dj={960:Q.prototype.Ik,961:Q.prototype.Ik,962:Q.prototype.Gn,964:Q.prototype.Fn,965:Q.prototype.En,970:Q.prototype.nn,972:Q.prototype.mn,974:Q.prototype.ln,975:Q.prototype.kn},Ej={954:Q.prototype.Tl, +960:Q.prototype.Sl,961:Q.prototype.Sl,962:Q.prototype.Qo,964:Q.prototype.Xo,965:Q.prototype.Wo,970:Q.prototype.Io,972:Q.prototype.Ho,974:Q.prototype.Go,975:Q.prototype.Fo,986:Q.prototype.Tl}; Ba(function(){for(var a=B(window.document,"pcjs","video"),b=0;bMissing <canvas> support; try a new web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.setAttribute("contenteditable","true");e.setAttribute("autocapitalize","off");e.setAttribute("autocorrect","off");e.style.backgroundColor=d.screenColor; e.style.height=c.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(e.style.height=(c.clientWidth*d.screenHeight/d.screenWidth|0)+"px",c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight));c.appendChild(e);var f=e.getContext("2d"),d=new Q(d,e,f);Oa(d,c)}}); -function V(a){this.Gk=a.adapter;switch(this.Gk){case 1:this.Nj=1016;this.kg=4;break;case 2:this.Nj=760;this.kg=3;break;default:w("Unrecognized serial adapter #"+this.Gk);return}this.ce=null;x.call(this,"SerialPort",a,V);var b=a.binding,c;a=ak;b&&(void 0===c&&(c="Panel"),(c=Na(c,this.id))&&(b=c.sa[b])&&this.xb(null,null,a,b))}y(x,V);var ak="buffer";k=V.prototype;k.ik=function(a,b){return a==this.sh?(this.Kk=b,this):null}; -k.xb=function(a,b,c,d){var e=this;switch(c){case ak:return this.sa[c]=this.ce=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),bk(e,[b]))},d.onkeypress=function(a){a=a||window.event;bk(e,[a.which||a.keyCode])},!0}return!1};k.mc=function(a,b,c,d){this.na=b;this.S=c;this.X=d;this.ka=C(a,"ChipSet");d&&Ph(d,V);ib(b,this,ck,this.Nj);mb(b,this,dk,this.Nj);this.Ta()}; -k.$b=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Wb=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.ie()};k.save=function(){var a=new H(this),b=0,c=[];c[b++]=this.ji;c[b++]=this.mk;c[b++]=this.Re;c[b++]=this.Tg;c[b++]=this.Zd;c[b++]=this.Sc;c[b++]=this.fd;c[b++]=this.Fc;c[b++]=this.kk;c[b]=this.Hf;a.set(0,c);return a.data()};k.restore=function(a){return this.ie(a[0])}; -k.ie=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.ji=a[b++];this.mk=a[b++];this.Re=a[b++];this.Tg=a[b++];this.Zd=a[b++];this.Sc=a[b++];this.fd=a[b++];this.Fc=a[b++];this.kk=a[b++];this.Hf=a[b];return!0};function bk(a,b){a.Hf=a.Hf.concat(b);ek(a)}function ek(a){0>8:this.Tg;this.ba(a,null,b,this.Sc&128?"DLM":"IER",c);return c};k.pn=function(a,b){var c=this.Zd;this.ba(a,null,b,"IIR",c);return c};k.qn=function(a,b){var c=this.Sc;this.ba(a,null,b,"LCR",c);return c};k.sn=function(a,b){var c=this.fd;this.ba(a,null,b,"MCR",c);return c}; -k.rn=function(a,b){var c=this.Fc;this.ba(a,null,b,"LSR",c);return c};k.yn=function(a,b){var c=this.kk;this.ba(a,null,b,"MSR",c);return c};k.Yo=function(a,b,c){this.ba(a,b,c,this.Sc&128?"DLL":"THR");this.Sc&128?this.Re=this.Re&-256|b:(this.mk=b,this.Fc&=-97,this.ce?(13!=b&&(8==b?this.ce.value=this.ce.value.slice(0,-1):(this.ce.value+=String.fromCharCode(b),this.ce.scrollTop=this.ce.scrollHeight)),a=!0):a=!1,a&&(this.Fc|=96))}; -k.Jo=function(a,b,c){this.ba(a,b,c,this.Sc&128?"DLM":"IER");this.Sc&128?this.Re=this.Re&255|b<<8:this.Tg=b};k.Ko=function(a,b,c){this.ba(a,b,c,"LCR");this.Sc=b}; -k.Lo=function(a,b,c){var d=this.fd;this.ba(a,b,c,"MCR");this.fd=b;this.Kk&&(d^b)&3&&(a=this.Kk,b=this.fd,(c=3==(b&3))?a.jc||(d=!1,a.fd&2||(a.reset(),a.Qa("serial mouse reset"),d=!0),a.fd&1||(a.Qa("serial mouse ID requested"),d=!0),d&&(bk(a.Sf,[77]),a.Qa("serial mouse ID sent")),fk(a,a.Lb),a.jc=c):a.jc&&(a.Qa("serial mouse inactive"),gk(a.Lb),a.jc=c),a.fd=b)};k.Qa=function(a){this.X&&E(this.X,this.X.ck)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.ck,e)}; -var ck={0:V.prototype.Dn,1:V.prototype.on,2:V.prototype.pn,3:V.prototype.qn,4:V.prototype.sn,5:V.prototype.rn,6:V.prototype.yn},dk={0:V.prototype.Yo,1:V.prototype.Jo,3:V.prototype.Ko,4:V.prototype.Lo};Ba(function(){for(var a=B(window.document,"pcjs","serial"),b=0;ba.Cg||0>a.Dg)a.Cg=b.clientX,a.Dg=b.clientY;a.yf=b.clientX-a.Cg;a.zf=b.clientY-a.Dg;(a.yf||a.zf)&&ik(a,null,b.clientX,b.clientY);a.Cg=b.clientX;a.Dg=b.clientY}},!1),b.addEventListener("mousedown",function(b){jk(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){jk(a,b.button,!1)},!1),a.xi=!0),b.style.cursor="none")}function gk(a){a&&(a.style.cursor="auto")} -function jk(a,b,c){if(a.jc&&a.S&&a.S.Nb)switch(b){case 0:a.ih!=c&&(a.ih=c,ik(a,"mouse button1 "+(c?"dn":"up")));break;case 2:a.jh!=c&&(a.jh=c,ik(a,"mouse button2 "+(c?"dn":"up")))}}function ik(a,b,c,d){var e=64|(a.ih?32:0)|(a.jh?16:0)|(a.zf&192)>>4|(a.yf&192)>>6,f=a.yf&63,g=a.zf&63;a.Qa((b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+r(e)+","+r(f)+","+r(g)+"]");bk(a.Sf,[e,f,g]);a.yf=a.zf=0}k.Qa=function(a){this.X&&E(this.X,this.X.tm)&&this.X.message(a)}; -Ba(function(){for(var a=B(window.document,"pcjs","mouse"),b=0;bb.indexOf("/api/v1/dump")&&(a=fa(b),"json"==a?d=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(a="action=open&volume="+b+("&mode="+this.mode),a+="&chs="+this.Ac+":"+this.nc+":"+this.$c+":"+this.Rb,a+="&machine="+this.ia.gf(),a+="&user="+this.ia.ge(),d=sa()+"/api/v1/disk?"+a,this.Ci=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): +function V(a){this.Fk=a.adapter;switch(this.Fk){case 1:this.Nj=1016;this.kg=4;break;case 2:this.Nj=760;this.kg=3;break;default:w("Unrecognized serial adapter #"+this.Fk);return}this.ce=null;x.call(this,"SerialPort",a,V);var b=a.binding,c;a=ak;b&&(void 0===c&&(c="Panel"),(c=Na(c,this.id))&&(b=c.sa[b])&&this.xb(null,null,a,b))}y(x,V);var ak="buffer";k=V.prototype;k.ik=function(a,b){return a==this.sh?(this.Jk=b,this):null}; +k.xb=function(a,b,c,d){var e=this;switch(c){case ak:return this.sa[c]=this.ce=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),bk(e,[b]))},d.onkeypress=function(a){a=a||window.event;bk(e,[a.which||a.keyCode])},!0}return!1};k.nc=function(a,b,c,d){this.na=b;this.S=c;this.X=d;this.ka=C(a,"ChipSet");d&&Ph(d,V);ib(b,this,ck,this.Nj);mb(b,this,dk,this.Nj);this.Ta()}; +k.$b=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Wb=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.ie()};k.save=function(){var a=new H(this),b=0,c=[];c[b++]=this.ii;c[b++]=this.mk;c[b++]=this.Re;c[b++]=this.Tg;c[b++]=this.Zd;c[b++]=this.Tc;c[b++]=this.fd;c[b++]=this.Gc;c[b++]=this.kk;c[b]=this.Hf;a.set(0,c);return a.data()};k.restore=function(a){return this.ie(a[0])}; +k.ie=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.ii=a[b++];this.mk=a[b++];this.Re=a[b++];this.Tg=a[b++];this.Zd=a[b++];this.Tc=a[b++];this.fd=a[b++];this.Gc=a[b++];this.kk=a[b++];this.Hf=a[b];return!0};function bk(a,b){a.Hf=a.Hf.concat(b);ek(a)}function ek(a){0>8:this.Tg;this.ba(a,null,b,this.Tc&128?"DLM":"IER",c);return c};k.pn=function(a,b){var c=this.Zd;this.ba(a,null,b,"IIR",c);return c};k.qn=function(a,b){var c=this.Tc;this.ba(a,null,b,"LCR",c);return c};k.sn=function(a,b){var c=this.fd;this.ba(a,null,b,"MCR",c);return c}; +k.rn=function(a,b){var c=this.Gc;this.ba(a,null,b,"LSR",c);return c};k.yn=function(a,b){var c=this.kk;this.ba(a,null,b,"MSR",c);return c};k.Yo=function(a,b,c){this.ba(a,b,c,this.Tc&128?"DLL":"THR");this.Tc&128?this.Re=this.Re&-256|b:(this.mk=b,this.Gc&=-97,this.ce?(13!=b&&(8==b?this.ce.value=this.ce.value.slice(0,-1):(this.ce.value+=String.fromCharCode(b),this.ce.scrollTop=this.ce.scrollHeight)),a=!0):a=!1,a&&(this.Gc|=96))}; +k.Jo=function(a,b,c){this.ba(a,b,c,this.Tc&128?"DLM":"IER");this.Tc&128?this.Re=this.Re&255|b<<8:this.Tg=b};k.Ko=function(a,b,c){this.ba(a,b,c,"LCR");this.Tc=b}; +k.Lo=function(a,b,c){var d=this.fd;this.ba(a,b,c,"MCR");this.fd=b;this.Jk&&(d^b)&3&&(a=this.Jk,b=this.fd,(c=3==(b&3))?a.kc||(d=!1,a.fd&2||(a.reset(),a.Qa("serial mouse reset"),d=!0),a.fd&1||(a.Qa("serial mouse ID requested"),d=!0),d&&(bk(a.Sf,[77]),a.Qa("serial mouse ID sent")),fk(a,a.Lb),a.kc=c):a.kc&&(a.Qa("serial mouse inactive"),gk(a.Lb),a.kc=c),a.fd=b)};k.Qa=function(a){this.X&&E(this.X,this.X.ck)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.ck,e)}; +var ck={0:V.prototype.Dn,1:V.prototype.on,2:V.prototype.pn,3:V.prototype.qn,4:V.prototype.sn,5:V.prototype.rn,6:V.prototype.yn},dk={0:V.prototype.Yo,1:V.prototype.Jo,3:V.prototype.Ko,4:V.prototype.Lo};Ba(function(){for(var a=B(window.document,"pcjs","serial"),b=0;ba.Cg||0>a.Dg)a.Cg=b.clientX,a.Dg=b.clientY;a.yf=b.clientX-a.Cg;a.zf=b.clientY-a.Dg;(a.yf||a.zf)&&ik(a,null,b.clientX,b.clientY);a.Cg=b.clientX;a.Dg=b.clientY}},!1),b.addEventListener("mousedown",function(b){jk(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){jk(a,b.button,!1)},!1),a.wi=!0),b.style.cursor="none")}function gk(a){a&&(a.style.cursor="auto")} +function jk(a,b,c){if(a.kc&&a.S&&a.S.Ob)switch(b){case 0:a.ih!=c&&(a.ih=c,ik(a,"mouse button1 "+(c?"dn":"up")));break;case 2:a.jh!=c&&(a.jh=c,ik(a,"mouse button2 "+(c?"dn":"up")))}}function ik(a,b,c,d){var e=64|(a.ih?32:0)|(a.jh?16:0)|(a.zf&192)>>4|(a.yf&192)>>6,f=a.yf&63,g=a.zf&63;a.Qa((b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+r(e)+","+r(f)+","+r(g)+"]");bk(a.Sf,[e,f,g]);a.yf=a.zf=0}k.Qa=function(a){this.X&&E(this.X,this.X.sm)&&this.X.message(a)}; +Ba(function(){for(var a=B(window.document,"pcjs","mouse"),b=0;bb.indexOf("/api/v1/dump")&&(a=fa(b),"json"==a?d=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(a="action=open&volume="+b+("&mode="+this.mode),a+="&chs="+this.oc+":"+this.fc+":"+this.rc+":"+this.Mb,a+="&machine="+this.ia.gf(),a+="&user="+this.ia.ge(),d=sa()+"/api/v1/disk?"+a,this.Bi=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): -1!==b.indexOf("/",b.length-1)&&(c="dir"),d=sa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.ef?"":d)+"&format=json"));ra(d,!0,null,this,this.co,b)}; -k.co=function(a,b,c,d){var e=null;this.ff=!1;var f=0>c&&this.Da&&!this.Da.Mb;if(this.Ci)c?this.Ga('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Ad=!0,e=this);else if(c)this.Ga('Unable to load disk "'+this.Kd+'" (error '+c+")",f);else try{if(0g&&0b.indexOf("0x")&&'["'!= +k.co=function(a,b,c,d){var e=null;this.ff=!1;var f=0>c&&this.Da&&!this.Da.Nb;if(this.Bi)c?this.Ga('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Ad=!0,e=this);else if(c)this.Ga('Unable to load disk "'+this.Kd+'" (error '+c+")",f);else try{if(0g&&0b.indexOf("0x")&&'["'!= b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(h.length)if(1==h.length)w(h[0]);else{for(b=a=0;b>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var t=m.data;if(void 0===t){var s=m.bytes;if(void 0!==s&&s.length){for(var f=n<<2,v=s.length;vb&&(b=0);2E3b&&(b=0);2E3>2,e=Array(d),f=0;f>2,e=a.data;a=a.pattern;for(var f=0;f>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}function tk(a,b){var c=-1;if(b>2,c=(d>((b&3)<<3)&255;return c} -k.write=function(a,b,c){if(this.ff)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Gc?f=a.Yc+a.Gc&&(a.Gc+=f-(a.Yc+a.Gc)+1):(a.Yc=f,a.Gc=1);d[f]=d[f]&~(255<>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Hc?f=a.Zc+a.Hc&&(a.Hc+=f-(a.Zc+a.Hc)+1):(a.Zc=f,a.Hc=1);d[f]=d[f]&~(255<=this.ib.length||m>=this.ib[h].length||n>=this.ib[h][m].length){c="sector "+h+":"+m+":"+n+" out of range ("+b+" changes applied)";b=-1;break}if(this.ff){c="unable to modify write-protected disk";b=-1;break}e= -g[f++];f=g[f++];g=e+f.length;h=this.ib[h][m][n];for(m=h.data.length;mb&&this.Ga("unable to restore disk '"+this.Kd+": "+c);return b};k.Qa=function(a){this.X&&E(this.X,this.X.pm)&&this.X.message(a)}; -function uk(a){x.call(this,"FDC",a,uk);this.dmaRead=this.ri;this.dmaWrite=this.si;this.dmaFormat=this.Am;this.Le=null;if(a.autoMount&&(this.Le=a.autoMount,"string"==typeof this.Le))try{this.Le=eval("("+a.autoMount+")")}catch(b){w("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Le=null}this.uc=[];this.Ed();this.Kf()||this.Ta()}y(x,uk);l={};aa={}; +g[f++];f=g[f++];g=e+f.length;h=this.ib[h][m][n];for(m=h.data.length;mb&&this.Ga("unable to restore disk '"+this.Kd+": "+c);return b};k.Qa=function(a){this.X&&E(this.X,this.X.om)&&this.X.message(a)}; +function uk(a){x.call(this,"FDC",a,uk);this.dmaRead=this.qi;this.dmaWrite=this.ri;this.dmaFormat=this.Am;this.Le=null;if(a.autoMount&&(this.Le=a.autoMount,"string"==typeof this.Le))try{this.Le=eval("("+a.autoMount+")")}catch(b){w("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Le=null}this.wc=[]}y(x,uk);l={};aa={}; var vk={3:{wd:3,be:0,name:aa.Jp},4:{wd:2,be:1,name:aa.Hp},5:{wd:9,be:7,name:aa.Sp},6:{wd:9,be:7,name:aa.Cp},7:{wd:2,be:0,name:aa.Ep},8:{wd:1,be:2,name:aa.Ip},10:{wd:2,be:7,name:aa.Dp},13:{wd:6,be:7,name:aa.xp},15:{wd:3,be:0,name:aa.Gp}};k=uk.prototype; k.xb=function(a,b,c,d){switch(c){case "listDisks":return this.sa[c]=d,a=window.document.createElement("option"),a.value="?",a.innerHTML="User-defined URL...",d.appendChild(a),d.onchange=function(a,b){return function(){var c=a.sa.descDisk;if(c){var d=b.options[b.selectedIndex];if(d){var m={};if(d=d.getAttribute("data-value"))try{m=eval("({"+d+"})")}catch(n){w("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d=''+d+"");c.innerHTML= -d}}}}(this,d),!0;case "descDisk":case "listDrives":return this.sa[c]=d,d.onchange=function(a,b){return function(){var c=parseInt(b.value,10);isNaN(c)||wk(a,c)}}(this,d),!0;case "loadDrive":return this.sa[c]=d,d.onclick=function(a){return function(){var b,c=a.sa.listDisks,d=a.sa.listDrives;if(c&&d&&!isNaN(b=parseInt(d.value,10))&&0<=b&&ba.va.restore(f)&&(e=!1);e&&a.va&&void 0!==a.Va&&(a.Ra=a.va.seek(a.lb,a.Ha,a.Na));return e};k.Uj=function(){for(var a=0,b=[],c=0;ca.Ac&&(this.Ga('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.fb)),b=null);b&&(a.va=b,a.cm=c,a.Oe=d,Dk(this,c,d,b),this.oe|=128,this.Ga('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.fb),a.Fe));a.Fe&&(a.Fe=!1,--this.ze||this.Ta());wk(this,a.fb)}; -function wk(a,b){if(0<=b&&b=this.Xa&&(this.za&=-81,this.pb=this.Xa=0);return c}; -k.Do=function(a,b,c){this.ba(a,b,c,"DATA["+this.Xa+"]");this.Xa=vk[a].wd){b=!1;this.pb=0;var d;a=this.Oa()&31;switch(a){case 3:this.Oa(l.Kp);this.Oa(l.zp);this.Kb();break;case 4:c=this.Oa(l.Af);this.fb=c&3;d=this.xa[this.fb];this.Kb();this.hb((d.Ya&4278190080)>>>24,l.Op);break;case 5:case 6:c=this.Oa(l.Af);this.fb=c&3;d=this.xa[this.fb];d.Ha=c>>2&1;d.lb=this.Oa(l.Th);this.Oa(l.Uh);d.Na=this.Oa(l.Xh);b=this.Oa(l.Ig); -d.Wa=128<>2&1;d.Na=1;b=0;d.Ya=0;d.va&& -(d.Ra=d.va.seek(d.lb,d.Ha,d.Na))?b=d.Ra.length:d.Ya=1088;Ek(this,d);Fk(this,d);Gk(this,d);this.hb(d.lb,l.Th);this.hb(d.Ha,l.Uh);this.hb(d.Na,l.Xh);this.hb(b,l.Ig);b=!0;break;case 13:c=this.Oa(l.Af);this.fb=c&3;d=this.xa[this.fb];d.Ha=c>>2&1;b=this.Oa(l.Ig);d.Wa=128<>2&1,a=this.Oa(l.Ap),d.lb+=a-d.Yd,0>d.lb&&(d.lb=0),d.lb>=d.Ac&&(d.lb=d.Ac-1),d.Yd=a,d.Ya=32,0==d.lb&&(d.Ya|=268435456),this.Kb(),b=!0}0>>8,l.Mp)}function Gk(a,b){a.hb((b.Ya&16711680)>>>16,l.Np)}k.ri=function(a,b,c){void 0===b||0>b?this.qc(a,c):c(-1,!1)};k.si=function(a,b){return void 0!==b&&0<=b?this.Cc(a,b):-1};k.Am=function(a,b){return void 0!==b&&0<=b?this.Wj(a,b):-1};k.ti=function(a){a.Ya=72;a.va&&(a.Ra=null,a.Ya=0,this.ka&&(si(this.ka,2,this,"dmaRead",a),mi(this.ka,2)))}; -k.ui=function(a){a.Ya=72;a.va&&(a.va.ff?a.Ya=576:(a.Ra=null,a.Ya=0,this.ka&&(si(this.ka,2,this,"dmaWrite",a),mi(this.ka,2))))};k.wk=function(a){a.Ya=72;a.va&&(a.Ra=null,a.Ya=0,this.ka&&(a.Ce=0,a.wc=Array(4),a.Lf=!0,a.Rf=0,si(this.ka,2,this,"dmaFormat",a),mi(this.ka,2),a.Lf=!1))};k.qc=function(a,b){var c=-1;if(!a.Ya&&a.va){do{if(a.Ra&&0<=(c=tk(a.Ra,a.Va++)))break;a.Ra=a.va.seek(a.lb,a.Ha,a.Na);if(!a.Ra){a.Ya=1088;break}a.Va=0;this.If(a)}while(1)}b(c,!1)}; -k.Cc=function(a,b){if(a.Ya||!a.va)return-1;do{if(a.Ra&&a.va.write(a.Ra,a.Va++,b))break;a.Ra=a.va.seek(a.lb,a.Ha,a.Na);if(!a.Ra){a.Ya=8256;b=-1;break}a.Va=0;this.If(a)}while(1);return b};k.If=function(a){a.Na++;a.Na>=a.$c+1&&(a.Na=1,a.Ha++,a.Ha>=a.nc&&(a.Ha=0,a.lb++))};k.Wj=function(a,b){if(a.Ya)return-1;a.wc[a.Ce++]=b;if(a.Ce==a.wc.length){a.lb=a.wc[0];a.Ha=a.wc[1];a.Na=a.wc[2];a.Wa=128<this.Cc(a,a.jk))return-1;a.Rf++}a.Rf>=a.$d&&(b=-1);return b}; -k.Ni=function(a){var b=this.S.J&255;this.X&&E(this.X,this.X.Eg)&&128>b&&(Ec(this.X,19,a),Fc(this.S,a,function(a,b){return function(e){Gc(a.X,19,e,F(a.S)-b)}}(this,F(this.S))));return!0};k.Qa=function(a){this.X&&E(this.X,this.X.Eg)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Eg,e)};var zk={1012:uk.prototype.jn,1013:uk.prototype.gn,1015:uk.prototype.hn},Ak={1010:uk.prototype.Eo,1013:uk.prototype.Do,1015:uk.prototype.Co}; -Ba(function(){for(var a=B(window.document,"pcjs","fdc"),b=0;b=e&&(this.qf|=(f.type&3)<<(1-e<<1))}return d}; -k.Sj=function(){var a=0,b=[];this.Ee?(b[a++]=this.ne,b[a++]=this.bm,b[a++]=this.Mh,b[a++]=this.Nh,b[a++]=this.Lh,b[a++]=this.Kh,b[a++]=this.rf,b[a++]=this.za,b[a++]=this.Pj):(b[a++]=this.qf,b[a++]=this.za,b[a++]=this.ac,b[a++]=this.pb,b[a++]=this.Xa,b[a++]=this.am,b[a++]=this.$l,b[a++]=this.Zl,b[a++]=this.hf);b[a]=this.Uj();return b}; -k.Li=function(a,b,c,d,e){var f=0,g=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.fb=a;b.errorCode=d[f++];b.hm=d[f++];b.ef=d[f++];b.We=d[f++];b.Xe=d[f++];b.Ha=d[f++];b.nc=d[f++];b.Qd=d[f++];b.Na=d[f++];b.$d=d[f++];b.Wa=d[f++];b.Yg=this.Ee?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.ge()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hk[this.ag][b.type])b.type=this.Mm;c=Hk[this.ag][b.type]; -b.$c=c[2]||17;b.Rb=c[3]||512;if(e&&this.ka&&(e=this.ka,c=b.type,e.pa)){var h=e.pa[18],h=a?h&240|c:h&15|c<<4;e.pa&&(e.pa[18]=h,ai(e))}void 0===b.va&&(b.va=null,this.Ga("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Mk(this,b);b.Va=d[f++];b.Ra=null;b.va&&(a=d[f],void 0!==a&&0>b.va.restore(a)&&(g=!1),g&&void 0!==b.Va&&(b.Ra=b.va.seek(b.Qd,b.Ha,b.Na+b.Yg)));return g};k.Uj=function(){for(var a=0,b=[],c=0;c=this.Xa&&(this.pb=this.Xa=0,this.za&=-15);return c}; -k.$o=function(a,b,c){this.ba(a,b,c,"DATA["+this.Xa+"]");this.Xa=a&&(this.za|=2,this.za&=-2,Nk(this))};k.Kn=function(a,b){var c=this.za;this.ba(a,null,b,"STATUS",c);this.pb=this.Pa.Rb){var e=this;this.qc(this.Pa,function(a){0<=a?e.ka&&zi(e.ka,14):(e.za=1,e.ne=16)},!1)}else this.za=80;d||this.ba(a,null,b,"DATA",c);return c}; -k.ro=function(a,b,c){this.Pa&&0!=this.Pa.Va||this.ba(a,b,c,"DATA");this.Pa&&this.Pa.Wa>=this.Pa.Rb&&(0>this.Cc(this.Pa,b)?(this.za=1,this.ne=16):this.Pa.Va==this.Pa.Rb&&(this.Pa.Wa-=this.Pa.Rb,this.ka&&zi(this.ka,14),this.Pa.Wa>=this.Pa.Rb||(this.za=80)))};k.Wm=function(a,b){var c=this.ne;this.ba(a,null,b,"ERROR",c);return c};k.vo=function(a,b,c){this.ba(a,b,c,"WPREC");this.bm=b};k.Xm=function(a,b){var c=this.Mh;this.ba(a,null,b,"SECCNT",c);return c}; -k.to=function(a,b,c){this.ba(a,b,c,"SECCNT");this.Mh=b};k.Ym=function(a,b){var c=this.Nh;this.ba(a,null,b,"SECNUM",c);return c};k.uo=function(a,b,c){this.ba(a,b,c,"SECNUM");this.Nh=b};k.Tm=function(a,b){var c=this.Lh;this.ba(a,null,b,"CYLLO",c);return c};k.qo=function(a,b,c){this.ba(a,b,c,"CYLLO");this.Lh=b};k.Sm=function(a,b){var c=this.Kh;this.ba(a,null,b,"CYLHI",c);return c};k.po=function(a,b,c){this.ba(a,b,c,"CYLHI");this.Kh=b};k.Vm=function(a,b){var c=this.rf;this.ba(a,null,b,"DRVHD",c);return c}; -k.so=function(a,b,c){this.ba(a,b,c,"DRVHD");this.rf=b;this.za=this.xa[this.rf&16?1:0]?this.za|64:this.za&-65};k.Zm=function(a,b){var c=this.za;this.ba(a,null,b,"STATUS",c);return c};k.oo=function(a,b,c){this.ba(a,b,c,"COMMAND");this.Pj=b;this.ka&&Ai(this.ka,14);Ok(this)}; -function Ok(a){var b=!1,c=a.Pj,d=a.rf&16?1:0,e=a.rf&15,f=a.Lh|(a.Kh&3)<<8,g=a.Nh,h=a.Mh;a.Pa=null;a.ne=0;a.za=80;(d=a.xa[d])?(d.Qd=f,d.Ha=e,d.Na=g,d.Wa=h*d.Rb,c=144<=c?c:c&240,d.Ra=null,d.errorCode=0,a.Pa=d):c=-1;switch(c&240){case 32:a.qc(d,function(b){0<=b&&a.ka?(zi(a.ka,14),a.za=136):(a.za=1,a.ne=16)},!1);break;case 48:a.ka?(zi(a.ka,14),a.za=136):(a.za=1,a.ne=4);break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.ne=1;b=!0;break;case 145:d.nc=e+1,d.$c=h,b=!0}b&&a.ka&&zi(a.ka,14)} -function Nk(a){a.pb=0;var b=a.Oa(),c=a.Oa(),d=c&32,e=d>>5,f=c&31,g=a.Oa(),h=a.Oa(),m=g<<2&768|h,n=g&63,q=a.Oa(),t=a.Oa(),s=a.xa[e];s&&(s.Qd=m,s.Ha=f,s.Na=n,s.Wa=q*s.Rb);switch(b){case 3:a.Kb(s?s.errorCode:4);a.hb(c);a.hb(g);a.hb(h);a.hb(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.Oa());)s&&cb?this.qc(a,c):c(-1,!1)}; -k.si=function(a,b){return void 0!==b&&0<=b?this.Cc(a,b):-1};k.Bm=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Va=a.$c+b&&(a.Na=b,a.Ha++,a.Ha>=a.nc&&(a.Ha=0,a.Qd++))}; -k.Wj=function(a,b){if(a.errorCode)return-1;a.wc[a.Ce++]=b;if(a.Ce==a.wc.length){a.Qd=a.wc[0];a.Ha=a.wc[1];a.Na=a.wc[2];a.Wa=128<this.Cc(a,a.jk))return-1;a.Rf++}a.Rf>=a.$d&&(b=-1);return b};k.Mn=function(a){var b=this.S.J&255;!(this.S.G>>8)&&128>8)||(a=!this.ka)||(a=!(this.ka.tb[0].vd&64));return a?!0:!1};k.Qa=function(a){this.X&&E(this.X,this.X.Wh)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Wh,e)}; +d}}}}(this,d),!0;case "descDisk":case "listDrives":return this.sa[c]=d,d.onchange=function(a,b){return function(){var c=parseInt(b.value,10);isNaN(c)||wk(a,c)}}(this,d),!0;case "loadDrive":return this.sa[c]=d,d.onclick=function(a){return function(){var b,c=a.sa.listDisks,d=a.sa.listDrives;if(c&&d&&!isNaN(b=parseInt(d.value,10))&&0<=b&&ba.va.restore(f)&&(e=!1);e&&a.va&&void 0!==a.Va&&(a.Ra=a.va.seek(a.lb,a.Ha,a.Na));return e};k.Uj=function(){for(var a=0,b=[],c=0;ca.oc&&(this.Ga('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.fb)),b=null);b&&(a.va=b,a.bm=c,a.Oe=d,Dk(this,c,d,b),this.oe|=128,this.Ga('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.fb),a.Fe));a.Fe&&(a.Fe=!1,--this.ze||this.Ta());wk(this,a.fb)}; +function wk(a,b){if(0<=b&&b=this.Xa&&(this.ya&=-81,this.pb=this.Xa=0);return c}; +k.Do=function(a,b,c){this.ba(a,b,c,"DATA["+this.Xa+"]");this.Xa=vk[a].wd){b=!1;this.pb=0;var d;a=this.Oa()&31;switch(a){case 3:this.Oa(l.Kp);this.Oa(l.zp);this.Kb();break;case 4:c=this.Oa(l.Af);this.fb=c&3;d=this.za[this.fb];this.Kb();this.hb((d.Ya&4278190080)>>>24,l.Op);break;case 5:case 6:c=this.Oa(l.Af);this.fb=c&3;d=this.za[this.fb];d.Ha=c>>2&1;d.lb=this.Oa(l.Sh);this.Oa(l.Th);d.Na=this.Oa(l.Wh);b=this.Oa(l.Ig); +d.Wa=128<>2&1;d.Na=1;b=0;d.Ya=0;d.va&& +(d.Ra=d.va.seek(d.lb,d.Ha,d.Na))?b=d.Ra.length:d.Ya=1088;Ek(this,d);Fk(this,d);Gk(this,d);this.hb(d.lb,l.Sh);this.hb(d.Ha,l.Th);this.hb(d.Na,l.Wh);this.hb(b,l.Ig);b=!0;break;case 13:c=this.Oa(l.Af);this.fb=c&3;d=this.za[this.fb];d.Ha=c>>2&1;b=this.Oa(l.Ig);d.Wa=128<>2&1,a=this.Oa(l.Ap),d.lb+=a-d.Yd,0>d.lb&&(d.lb=0),d.lb>=d.oc&&(d.lb=d.oc-1),d.Yd=a,d.Ya=32,0==d.lb&&(d.Ya|=268435456),this.Kb(),b=!0}0>>8,l.Mp)}function Gk(a,b){a.hb((b.Ya&16711680)>>>16,l.Np)}k.qi=function(a,b,c){void 0===b||0>b?this.sc(a,c):c(-1,!1)};k.ri=function(a,b){return void 0!==b&&0<=b?this.Dc(a,b):-1};k.Am=function(a,b){return void 0!==b&&0<=b?this.Wj(a,b):-1};k.si=function(a){a.Ya=72;a.va&&(a.Ra=null,a.Ya=0,this.ka&&(si(this.ka,2,this,"dmaRead",a),mi(this.ka,2)))}; +k.ti=function(a){a.Ya=72;a.va&&(a.va.ff?a.Ya=576:(a.Ra=null,a.Ya=0,this.ka&&(si(this.ka,2,this,"dmaWrite",a),mi(this.ka,2))))};k.vk=function(a){a.Ya=72;a.va&&(a.Ra=null,a.Ya=0,this.ka&&(a.Ce=0,a.yc=Array(4),a.Lf=!0,a.Rf=0,si(this.ka,2,this,"dmaFormat",a),mi(this.ka,2),a.Lf=!1))};k.sc=function(a,b){var c=-1;if(!a.Ya&&a.va){do{if(a.Ra&&0<=(c=tk(a.Ra,a.Va++)))break;a.Ra=a.va.seek(a.lb,a.Ha,a.Na);if(!a.Ra){a.Ya=1088;break}a.Va=0;this.If(a)}while(1)}b(c,!1)}; +k.Dc=function(a,b){if(a.Ya||!a.va)return-1;do{if(a.Ra&&a.va.write(a.Ra,a.Va++,b))break;a.Ra=a.va.seek(a.lb,a.Ha,a.Na);if(!a.Ra){a.Ya=8256;b=-1;break}a.Va=0;this.If(a)}while(1);return b};k.If=function(a){a.Na++;a.Na>=a.rc+1&&(a.Na=1,a.Ha++,a.Ha>=a.fc&&(a.Ha=0,a.lb++))};k.Wj=function(a,b){if(a.Ya)return-1;a.yc[a.Ce++]=b;if(a.Ce==a.yc.length){a.lb=a.yc[0];a.Ha=a.yc[1];a.Na=a.yc[2];a.Wa=128<this.Dc(a,a.jk))return-1;a.Rf++}a.Rf>=a.$d&&(b=-1);return b}; +k.Mi=function(a){var b=this.S.J&255;this.X&&E(this.X,this.X.Eg)&&128>b&&(Ec(this.X,19,a),Fc(this.S,a,function(a,b){return function(e){Gc(a.X,19,e,F(a.S)-b)}}(this,F(this.S))));return!0};k.Qa=function(a){this.X&&E(this.X,this.X.Eg)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Eg,e)};var zk={1012:uk.prototype.jn,1013:uk.prototype.gn,1015:uk.prototype.hn},Ak={1010:uk.prototype.Eo,1013:uk.prototype.Do,1015:uk.prototype.Co}; +Ba(function(){for(var a=B(window.document,"pcjs","fdc"),b=0;b=e&&(this.qf|=(f.type&3)<<(1-e<<1))}return d}; +k.Sj=function(){var a=0,b=[];this.Ee?(b[a++]=this.ne,b[a++]=this.am,b[a++]=this.Lh,b[a++]=this.Mh,b[a++]=this.Kh,b[a++]=this.Jh,b[a++]=this.rf,b[a++]=this.ya,b[a++]=this.Pj):(b[a++]=this.qf,b[a++]=this.ya,b[a++]=this.ac,b[a++]=this.pb,b[a++]=this.Xa,b[a++]=this.$l,b[a++]=this.Zl,b[a++]=this.Yl,b[a++]=this.hf);b[a]=this.Uj();return b}; +k.Ki=function(a,b,c,d,e){var f=0,g=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.fb=a;b.errorCode=d[f++];b.gm=d[f++];b.ef=d[f++];b.We=d[f++];b.Xe=d[f++];b.Ha=d[f++];b.fc=d[f++];b.Qd=d[f++];b.Na=d[f++];b.$d=d[f++];b.Wa=d[f++];b.Yg=this.Ee?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.ge()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hk[this.ag][b.type])b.type=this.Mm;c=Hk[this.ag][b.type]; +b.rc=c[2]||17;b.Mb=c[3]||512;if(e&&this.ka&&(e=this.ka,c=b.type,e.pa)){var h=e.pa[18],h=a?h&240|c:h&15|c<<4;e.pa&&(e.pa[18]=h,ai(e))}void 0===b.va&&(b.va=null,this.Ga("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Mk(this,b);b.Va=d[f++];b.Ra=null;b.va&&(a=d[f],void 0!==a&&0>b.va.restore(a)&&(g=!1),g&&void 0!==b.Va&&(b.Ra=b.va.seek(b.Qd,b.Ha,b.Na+b.Yg)));return g};k.Uj=function(){for(var a=0,b=[],c=0;c=this.Xa&&(this.pb=this.Xa=0,this.ya&=-15);return c}; +k.$o=function(a,b,c){this.ba(a,b,c,"DATA["+this.Xa+"]");this.Xa=a&&(this.ya|=2,this.ya&=-2,Nk(this))};k.Kn=function(a,b){var c=this.ya;this.ba(a,null,b,"STATUS",c);this.pb=this.Pa.Mb){var e=this;this.sc(this.Pa,function(a){0<=a?e.ka&&zi(e.ka,14):(e.ya=1,e.ne=16)},!1)}else this.ya=80;d||this.ba(a,null,b,"DATA",c);return c}; +k.ro=function(a,b,c){this.Pa&&0!=this.Pa.Va||this.ba(a,b,c,"DATA");this.Pa&&this.Pa.Wa>=this.Pa.Mb&&(0>this.Dc(this.Pa,b)?(this.ya=1,this.ne=16):this.Pa.Va==this.Pa.Mb&&(this.Pa.Wa-=this.Pa.Mb,this.ka&&zi(this.ka,14),this.Pa.Wa>=this.Pa.Mb||(this.ya=80)))};k.Wm=function(a,b){var c=this.ne;this.ba(a,null,b,"ERROR",c);return c};k.vo=function(a,b,c){this.ba(a,b,c,"WPREC");this.am=b};k.Xm=function(a,b){var c=this.Lh;this.ba(a,null,b,"SECCNT",c);return c}; +k.to=function(a,b,c){this.ba(a,b,c,"SECCNT");this.Lh=b};k.Ym=function(a,b){var c=this.Mh;this.ba(a,null,b,"SECNUM",c);return c};k.uo=function(a,b,c){this.ba(a,b,c,"SECNUM");this.Mh=b};k.Tm=function(a,b){var c=this.Kh;this.ba(a,null,b,"CYLLO",c);return c};k.qo=function(a,b,c){this.ba(a,b,c,"CYLLO");this.Kh=b};k.Sm=function(a,b){var c=this.Jh;this.ba(a,null,b,"CYLHI",c);return c};k.po=function(a,b,c){this.ba(a,b,c,"CYLHI");this.Jh=b};k.Vm=function(a,b){var c=this.rf;this.ba(a,null,b,"DRVHD",c);return c}; +k.so=function(a,b,c){this.ba(a,b,c,"DRVHD");this.rf=b;this.ya=this.za[this.rf&16?1:0]?this.ya|64:this.ya&-65};k.Zm=function(a,b){var c=this.ya;this.ba(a,null,b,"STATUS",c);return c};k.oo=function(a,b,c){this.ba(a,b,c,"COMMAND");this.Pj=b;this.ka&&Ai(this.ka,14);Ok(this)}; +function Ok(a){var b=!1,c=a.Pj,d=a.rf&16?1:0,e=a.rf&15,f=a.Kh|(a.Jh&3)<<8,g=a.Mh,h=a.Lh;a.Pa=null;a.ne=0;a.ya=80;(d=a.za[d])?(d.Qd=f,d.Ha=e,d.Na=g,d.Wa=h*d.Mb,c=144<=c?c:c&240,d.Ra=null,d.errorCode=0,a.Pa=d):c=-1;switch(c&240){case 32:a.sc(d,function(b){0<=b&&a.ka?(zi(a.ka,14),a.ya=136):(a.ya=1,a.ne=16)},!1);break;case 48:a.ka?(zi(a.ka,14),a.ya=136):(a.ya=1,a.ne=4);break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.ne=1;b=!0;break;case 145:d.fc=e+1,d.rc=h,b=!0}b&&a.ka&&zi(a.ka,14)} +function Nk(a){a.pb=0;var b=a.Oa(),c=a.Oa(),d=c&32,e=d>>5,f=c&31,g=a.Oa(),h=a.Oa(),m=g<<2&768|h,n=g&63,q=a.Oa(),t=a.Oa(),s=a.za[e];s&&(s.Qd=m,s.Ha=f,s.Na=n,s.Wa=q*s.Mb);switch(b){case 3:a.Kb(s?s.errorCode:4);a.hb(c);a.hb(g);a.hb(h);a.hb(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.Oa());)s&&cb?this.sc(a,c):c(-1,!1)}; +k.ri=function(a,b){return void 0!==b&&0<=b?this.Dc(a,b):-1};k.Bm=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Va=a.rc+b&&(a.Na=b,a.Ha++,a.Ha>=a.fc&&(a.Ha=0,a.Qd++))}; +k.Wj=function(a,b){if(a.errorCode)return-1;a.yc[a.Ce++]=b;if(a.Ce==a.yc.length){a.Qd=a.yc[0];a.Ha=a.yc[1];a.Na=a.yc[2];a.Wa=128<this.Dc(a,a.jk))return-1;a.Rf++}a.Rf>=a.$d&&(b=-1);return b};k.Mn=function(a){var b=this.S.J&255;!(this.S.G>>8)&&128>8)||(a=!this.ka)||(a=!(this.ka.tb[0].vd&64));return a?!0:!1};k.Qa=function(a){this.X&&E(this.X,this.X.Vh)&&this.X.message(a)};k.ba=function(a,b,c,d,e){this.X&&this.X.ba(this,a,b,c,d,this.X.Vh,e)}; var Jk={800:W.prototype.Jn,801:W.prototype.Kn,802:W.prototype.In},Ik={496:W.prototype.Um,497:W.prototype.Wm,498:W.prototype.Xm,499:W.prototype.Ym,500:W.prototype.Tm,501:W.prototype.Sm,502:W.prototype.Vm,503:W.prototype.Zm},Lk={800:W.prototype.$o,801:W.prototype.cp,802:W.prototype.bp,803:W.prototype.ap,807:W.prototype.Kj,811:W.prototype.Kj,815:W.prototype.Kj},Kk={496:W.prototype.ro,497:W.prototype.vo,498:W.prototype.to,499:W.prototype.uo,500:W.prototype.qo,501:W.prototype.po,502:W.prototype.so,503:W.prototype.oo}; -Ba(function(){for(var a=B(window.document,"pcjs","hdc"),b=0;b>8,e=$k[b];if(e=e&&e[d]||""){var f=a.S;a.jb[X[0]]=r(f.G&255);a.jb[X[1]]=r(f.I&255);a.jb[X[2]]=r(f.J&255);a.jb[X[3]]=r(f.B&255);a.jb[X[4]]=r(f.G>>8);a.jb[X[5]]=r(f.I>>8);a.jb[X[6]]=r(f.J>>8);a.jb[X[7]]=r(f.B>>8);a.jb[X[8]]=u(f.G);a.jb[X[9]]=u(f.I);a.jb[X[10]]=u(f.J);a.jb[X[11]]=u(f.B);a.jb[X[12]]=u(f.Y);a.jb[X[13]]=u(f.H);a.jb[X[14]]=u(f.F);a.jb[X[15]]=u(f.D);a.jb[X[16]]=u(f.Za.oa);a.jb[X[17]]=u(f.ua.oa);a.jb[X[18]]=u(f.wb.oa);a.jb[X[19]]=u(f.Eb.oa);a.jb[X[20]]=u(f.qa); -e=" "+ia(a.jb,e)}a.message("INT 0x"+r(b)+": AH="+r(d)+" at "+da(c-a.S.ua.Ua,a.S.ua.oa)+e)}function Gc(a,b,c,d,e){a.message("INT 0x"+r(b)+"("+c+"): C="+(Uc(a.S)?1:0)+(e||"")+" (cycles="+d+")")}k.ba=function(a,b,c,d,e,f,g){f||(f=0);f|=Y.bk.La;if(null==d||(this.dc&f)==f)f=null,null!=d&&(f=this.S.ua.oa,d-=this.S.ua.Ua),this.message(a.sh+"."+(null!=c?"outPort":"inPort")+"(0x"+u(b)+","+(e?e:"unknown")+(null!=c?",0x"+r(c):"")+")"+(null!=g?": 0x"+r(g):"")+(null!=d?" at "+da(d,f):""))}; -k.message=function(a){this.ca(a);this.S&&(this.dc&Y.rm.La&&this.S.Ab(),a=this.S,a.of=0,a.Nc-=a.A,a.A=0,a.eh())};k.Pn=function(a){E(this,this.qm)&&Ec(this,33,a);return!0};k.Ln=function(){this.ca("Type ? for list of debugger commands")};function Sk(a){var b;if(jd(a)){if(!a.Ud||!a.Ud.length){a.Ud=Array(1E4);for(b=0;bb&&16!=b&&21!=b&&22!=b&&28!=b){var d=a.S.G>>8,e=$k[b];if(e=e&&e[d]||""){var f=a.S;a.jb[X[0]]=r(f.G&255);a.jb[X[1]]=r(f.I&255);a.jb[X[2]]=r(f.J&255);a.jb[X[3]]=r(f.B&255);a.jb[X[4]]=r(f.G>>8);a.jb[X[5]]=r(f.I>>8);a.jb[X[6]]=r(f.J>>8);a.jb[X[7]]=r(f.B>>8);a.jb[X[8]]=u(f.G);a.jb[X[9]]=u(f.I);a.jb[X[10]]=u(f.J);a.jb[X[11]]=u(f.B);a.jb[X[12]]=u(f.Y);a.jb[X[13]]=u(f.H);a.jb[X[14]]=u(f.F);a.jb[X[15]]=u(f.D);a.jb[X[16]]=u(f.Za.oa);a.jb[X[17]]=u(f.ua.oa);a.jb[X[18]]=u(f.wb.oa);a.jb[X[19]]= +u(f.Eb.oa);a.jb[X[20]]=u(f.qa);e=" "+ia(a.jb,e)}a.message("INT 0x"+r(b)+": AH="+r(d)+" at "+da(c-a.S.ua.Ua,a.S.ua.oa)+e)}}function Gc(a,b,c,d,e){a.message("INT 0x"+r(b)+"("+c+"): C="+(Uc(a.S)?1:0)+(e||"")+" (cycles="+d+")")} +k.ba=function(a,b,c,d,e,f,g){f||(f=0);f|=Y.bk.La;if(null==d||(this.dc&f)==f)f=null,null!=d&&(f=this.S.ua.oa,d-=this.S.ua.Ua),this.message(a.sh+"."+(null!=c?"outPort":"inPort")+"(0x"+u(b)+","+(e?e:"unknown")+(null!=c?",0x"+r(c):"")+")"+(null!=g?": 0x"+r(g):"")+(null!=d?" at "+da(d,f):""))};k.message=function(a){this.ca(a);this.S&&(this.dc&Y.qm.La&&this.S.Ab(),a=this.S,a.of=0,a.Oc-=a.A,a.A=0,a.eh())};k.Pn=function(a){E(this,this.pm)&&Ec(this,33,a);return!0};k.Ln=function(){this.ca("Type ? for list of debugger commands")}; +function Sk(a){var b;if(jd(a)){if(!a.Ud||!a.Ud.length){a.Ud=Array(1E4);for(b=0;b>c.rb],!1)}a.Sd=["read"];if(void 0!==a.Pc)for(b=1;b>c.rb],!0);a.Pc=["write"]}k.Vd=function(a,b,c){if(!kl(this,a,b)){b[2]=il(this,b);b[3]=c;a.push(b);if(a!=this.tc){var d=this.na,e=il(this,b);d.Aa[e>>d.rb].Vd(e&d.eb,a==this.Pc)}c||this.ca("breakpoint enabled: "+$(b)+" ("+a[0]+")");Sk(this);return!0}return!1}; -function kl(a,b,c,d){var e=!1;c=il(a,c);for(var f=1;f>d.rb],b==a.Pc));g[3]||a.ca("breakpoint cleared: "+$(g)+" ("+b[0]+")");Sk(a);break}a.ca("breakpoint exists: "+$(g)+" ("+b[0]+")");break}}return e}function ll(a,b){for(var c=1;c=b&&f>g.rb].Vd(f&g.eb,d==a.Pc)}}}function fl(a,b){if(void 0!==b)gl(a,b,a.tc,!0),a.kc=0;else for(var c=1;c>c.rb],!1)}a.Sd=["read"];if(void 0!==a.Qc)for(b=1;b>c.rb],!0);a.Qc=["write"]}k.Vd=function(a,b,c){if(!kl(this,a,b)){b[2]=il(this,b);b[3]=c;a.push(b);if(a!=this.vc){var d=this.na,e=il(this,b);d.Aa[e>>d.rb].Vd(e&d.eb,a==this.Qc)}c||this.ca("breakpoint enabled: "+$(b)+" ("+a[0]+")");Sk(this);return!0}return!1}; +function kl(a,b,c,d){var e=!1;c=il(a,c);for(var f=1;f>d.rb],b==a.Qc));g[3]||a.ca("breakpoint cleared: "+$(g)+" ("+b[0]+")");Sk(a);break}a.ca("breakpoint exists: "+$(g)+" ("+b[0]+")");break}}return e}function ll(a,b){for(var c=1;c=b&&f>g.rb].Vd(f&g.eb,d==a.Qc)}}}function fl(a,b){if(void 0!==b)gl(a,b,a.vc,!0),a.lc=0;else for(var c=1;c=Uk.length&&(m=a.ub(b,1),g=Zk[h-Uk.length][m>>3&7]);var n=2,h="";if(164<=f&&167>=f||170<=f&&175>=f)n=0;for(f=1;f<=n;f++){var q="",t=g[f];if(void 0!==t){var s=t&15;if(0!=s&&15!=s){var v=t&240;if(128<=v)if(0>m&&(m=a.ub(b,1)),160<=v)q=m>>3&7,176==(t&240)?q+=16:3<=(t&15)&&(q+=8),q=X[q];else{if(128<=v){var q=a,A=t,s=b,D="",v=m>>6,D=m&7;3>v?(A=void 0,v||6!=D?(D=Vk[D],1==v?(A=q.ub(s, 1),A&128?(A=A<<24>>24,D+="-"+r(-A)):D+="+"+r(A)):2==v&&(A=q.Ia(s,2),D+="+"+u(A))):(A=q.Ia(s,2),D=u(A)),D="["+D+"]"):D=X[D+(1==(A&15)?0:8)];q=D}}else if(16==v)q="1";else if(0==v){q=a;v=t;s=b;A=" ";switch(v&15){case 1:v&12288&&(A=r(q.ub(s,1)));break;case 2:A=u(q.ub(s,1)<<24>>24);break;case 3:case 4:A=u(q.Ia(s,2));break;case 6:v=q.Ia(s,2);q=q.Ia(s,2);A=$([v,q,void 0]);break;default:A="imm("+u(v)+")"}q=A}else 32==v?q="["+u(a.Ia(b,2))+"]":48==v?(1==s?(q=a.ub(b,1),q=q<<24>>24):q=a.Ia(b,2),q=b[0]+q&65535, q=nl(a,[q,b[1],void 0])[0]||u(q)):96==v?q=X[(t&3840)>>8]:112==v?q=X[((t&3840)>>8)+16]:64==v?q="DS:[SI]":80==v&&(q="ES:[DI]");q.length||(q="type("+u(t)+")");0>>4),d[0]=g,d[1]=h,void 0!==m.p&&(d[2]=m.p));break}}if(d&&d.length)return d;d=b.indexOf(":");0>d?null!=e?(c=ul(a,b),d=null):d=ul(a,b):(e=ul(a,b.substring(0,d)),c=ul(a,b.substring(d+1)),d= +function ol(a,b){var c;switch(b){case "V":c=Zc(a.S);break;case "D":c=a.S.xa&1024;break;case "I":c=a.S.xa&512;break;case "T":c=a.S.xa&256;break;case "S":c=Yc(a.S);break;case "Z":c=Xc(a.S);break;case "A":c=Wc(a.S);break;case "P":c=Vc(a.S);break;case "C":c=Uc(a.S);break;default:c=0}return" "+b+(c?"1":"0")}function pl(a,b){return a.xg+"="+u(a.oa)+(b?"["+p(a.Ua,6)+","+u(a.Nc)+"]":"")}function sl(a,b,c,d){return a+"="+(null!=b?u(b):"")+"["+p(c,6)+","+u(d-c)+"]"} +function tl(a,b,c){var d=2==c?a.ek:a.Ec;c=d[0];var e=d[1],d=d[2];if(void 0!==b){"%"==b.charAt(0)&&(b=b.substr(1),e=null);var f=b,d=null;if(f.match(/^[a-z_][a-z0-9_]*$/i))for(var d=[],g=f.toUpperCase(),h=0;h>>4),d[0]=g,d[1]=h,void 0!==m.p&&(d[2]=m.p));break}}if(d&&d.length)return d;d=b.indexOf(":");0>d?null!=e?(c=ul(a,b),d=null):d=ul(a,b):(e=ul(a,b.substring(0,d)),c=ul(a,b.substring(d+1)),d= null)}return[c,e,d]} function ul(a,b,c){var d;if(void 0!==b)switch(b=b.toUpperCase(),b){case "AX":d=a.S.G;break;case "BX":d=a.S.B;break;case "CX":d=a.S.I;break;case "DX":d=a.S.J;break;case "SI":d=a.S.F;break;case "DI":d=a.S.D;break;case "BP":d=a.S.H;break;case "SP":d=a.S.Y;break;case "CS":d=a.S.ua.oa;break;case "DS":d=a.S.Eb.oa;break;case "ES":d=a.S.Za.oa;break;case "SS":d=a.S.wb.oa;break;case "IP":d=a.S.qa;break;default:d=ca(b),void 0===d&&a.ca("invalid "+(c?c:"value")+": "+b)}else a.ca("missing "+(c?c:"value"));return d} -function Pi(a,b,c,d){function e(a,b){return a[0]>b[0]?1:a[0]=g&&eb[0]?1:a[0]b[0]?1:a[0]=g&&eb[0]?1:a[0]c?(a.ca("out of data at address "+$(b)),q=!0):(a.bd(b,c,1),n++)})})(a,c);a.ca(n+" bytes read at "+e)}else a.ca("sector "+e+" request out of range");else a.ca("drive "+d+" not loaded");else a.ca("invalid drive: "+d)}else a.ca("disk controller not present")}}} -function dl(a,b,c){if(b&&"?"==b[1])a.ca("\nregister commands:"),a.ca("\tr\t\tdisplay all registers"),a.ca("\tr [target=#]\tmodify target register"),a.ca("supported targets:"),a.ca("\tall registers and flags V,D,I,S,Z,A,P,C");else{var d=!0,e;if(null!=b&&1c?(a.ca("out of data at address "+$(b)),q=!0):(a.bd(b,c,1),n++)})})(a,c);a.ca(n+" bytes read at "+e)}else a.ca("sector "+e+" request out of range");else a.ca("drive "+d+" not loaded");else a.ca("invalid drive: "+d)}else a.ca("disk controller not present")}}} +function dl(a,b,c){if(b&&"?"==b[1])a.ca("\nregister commands:"),a.ca("\tr\t\tdisplay all registers"),a.ca("\tr [target=#]\tmodify target register"),a.ca("supported targets:"),a.ca("\tall registers and flags V,D,I,S,Z,A,P,C");else{var d=!0,e;if(null!=b&&1c||"z">>4),(d=h[f].l)&&(f=d),a.ca(da(n,m)+" "+f)));else{for(n in Y)if(g==Y[n].Ma){(f=a.ci[n])?f(m):a.ca("no dump registered for "+g);break a}f=tl(a,g,2);if(null!=f[0])if("ds"==h)if(c=hl(a,f[0]),null!=c.oa){f="selector="+u(f[0])+" limit="+u(c.Mc)+" base="+p(c.Ua);if(c.ab){f+= +break;case "BP":a.S.H=b&65535;break;case "SI":a.S.F=b&65535;break;case "DI":a.S.D=b&65535;break;case "DS":Oc(a.S,b);break;case "ES":Tc(a.S,b);break;case "SS":Pc(a.S,b);break;case "CS":d=!0;Nc(a.S,b);a.Ec=[a.S.qa,a.S.ua.oa,void 0];break;case "IP":d=!0;I(a.S,b);a.Ec=[a.S.qa,a.S.ua.oa,void 0];break;case "C":b?ed(a.S):$c(a.S);break;case "P":b?(f=a.S,Vc(f)||(f.ja^=1)):(f=a.S,Vc(f)&&(f.ja^=1));break;case "A":b?fd(a.S):ad(a.S);break;case "Z":b?gd(a.S):bd(a.S);break;case "S":b?hd(a.S):cd(a.S);break;case "I":b? +(f=a.S,f.xa|=512):(f=a.S,f.xa&=-513);break;case "D":b?(f=a.S,f.xa|=1024):(f=a.S,f.xa&=-1025);break;case "V":b?id(a.S):dd(a.S);break;default:a.ca("unknown register: "+f);return}Eb(a.S);a.ca("updated registers:")}}f=e;void 0===f&&(f=!!(a.S.ad&1));e="AX="+u(a.S.G)+" BX="+u(a.S.B)+" CX="+u(a.S.I)+" DX="+u(a.S.J)+" SP="+u(a.S.Y)+" BP="+u(a.S.H)+" SI="+u(a.S.F)+" DI="+u(a.S.D)+"\n";e+=pl(a.S.Eb,f)+" "+pl(a.S.Za,f)+" "+pl(a.S.wb,f);e=e+(f?"\n":" ")+(pl(a.S.ua,f)+" IP="+u(a.S.qa)+ol(a,"V")+ol(a,"D")+ol(a, +"I")+ol(a,"T")+ol(a,"S")+ol(a,"Z")+ol(a,"A")+ol(a,"P")+ol(a,"C"));f&&(f=a.na,e+=" MS="+u(a.S.ad)+"\n"+sl("LD",a.S.Ld.oa,a.S.Ld.Ua,a.S.Ld.Nc)+" "+sl("GD",null,a.S.Sc,a.S.Ye)+" "+sl("ID",null,a.S.dd,a.S.te)+" TR="+u(a.S.Ag.oa)+" A20="+(f.ue==f.Ib?"ON":"OFF"));a.ca((c?"":"\n")+e);d&&(a.Ec=[a.S.qa,a.S.ua.oa,void 0],el(a,$(a.Ec)))}}function yl(a,b,c){var d="tr"==b;b=null!=c?parseInt(c,10):1;var e=1==b?0:1;wa(b,function(){return Pa(a,!0)&&a.wf(e,d,!1)},function(){Eb(a.S);Pa(a,!1)})} +function el(a,b,c,d){b=tl(a,b,1);if(null!=b[0]){void 0===d&&(d=1);var e=[65535,b[1],a.na.ue];if(void 0!==c){e=tl(a,c,1);if(null==e[0]||e[0]c||"z">>4),(d=h[f].l)&&(f=d),a.ca(da(n,m)+" "+f)));else{for(n in Y)if(g==Y[n].Ma){(f=a.bi[n])?f(m):a.ca("no dump registered for "+g);break a}f=tl(a,g,2);if(null!=f[0])if("ds"==h)if(c=hl(a,f[0]),null!=c.oa){f="selector="+u(f[0])+" limit="+u(c.Nc)+" base="+p(c.Ua);if(c.ab){f+= " access="+u(c.ab);if(c.ab&4096)c.ab&2048?(f=f+"code:"+(c.ab&512?"readable,":"execonly,"),f+=c.ab&1024?"conforming,":"nonconforming,"):(f+="data:",f+=c.ab&512?"writeable,":"readonly,",f+=c.ab&1024?"expand down,":"expand up,"),f+=c.ab&256?"accessed":"not accessed";else switch(f+="type:",c.ab&7936){case 256:f+="tss";break;case 512:f+="ldt";break;case 768:f+="tss(busy)";break;case 1024:f+="call";break;case 1280:f+="task";break;case 1536:f+="int";break;case 1792:f+="trap";break;default:f+="unknown"}f+= ",dpl"+(c.ab>>13&24576);f+=c.ab&32768?",present":",not present"}a.ca(f)}else a.ca("invalid selector: "+u(f[0]));else{c=0;void 0!==m&&("l"==m.charAt(0)&&(m=m.substr(1)),c=parseInt(m,10));n="";c||(c=8);for(m=0;mt;t++){var s=a.ub(f,1);"dw"==h?t&1&&(d+=u(q|s<<8)+(7==t?" - ":" ")):d+=r(s)+(7==t?"-":" ");e+=32<=s&&128>s?String.fromCharCode(s):".";q=s}n&&(n+="\n");n+=g+" "+d+" "+e}n&&a.ca(n);a.ek=f}}}break;case "e":f=c[1];if(void 0===f)a.ca("missing address");else if(f= -tl(a,f,2),null!=f[0])for(g=2;gh.length&&(a.ca("note: only "+h.length+" available"),n=h.length),g-= -n,0>g&&(null!=h[h.length-1][1]?g+=h.length:(n=g+n,g=0)),void 0!==m&&a.ca(n+" instructions earlier:");c&&g!=a.jf;){m=h[g];if(null==m[1])break;m=[m[0],m[1],m[2]];a.ca(ml(a,m,"history",-n));++g==h.length&&(g=0);a.Sl=--n;c--}10==c&&(a.ca("no "+f+"history available"),a.Sl=void 0)}break;case "i":(f=c[1])&&"?"!=f?(f=ul(a,f),void 0!==f&&(c=jb(a.na,f),a.ca(u(f)+": "+r(c)))):(a.ca("\ninput commands:"),a.ca("\ti [p]\tread port [p]"),a.ca("warning: port accesses can affect hardware state"));break;case "l":xl(a, +tl(a,f,2),null!=f[0])for(g=2;gh.length&&(a.ca("note: only "+h.length+" available"),n=h.length),g-= +n,0>g&&(null!=h[h.length-1][1]?g+=h.length:(n=g+n,g=0)),void 0!==m&&a.ca(n+" instructions earlier:");c&&g!=a.jf;){m=h[g];if(null==m[1])break;m=[m[0],m[1],m[2]];a.ca(ml(a,m,"history",-n));++g==h.length&&(g=0);a.Rl=--n;c--}10==c&&(a.ca("no "+f+"history available"),a.Rl=void 0)}break;case "i":(f=c[1])&&"?"!=f?(f=ul(a,f),void 0!==f&&(c=jb(a.na,f),a.ca(u(f)+": "+r(c)))):(a.ca("\ninput commands:"),a.ca("\ti [p]\tread port [p]"),a.ca("warning: port accesses can affect hardware state"));break;case "l":xl(a, c);break;case "m":a:{f=null;h=c[1];"?"==h&&(h=void 0);if(void 0!==h){n=0;if("all"==h)n=4294967295,h=null;else if("on"==h)f=!0,h=null;else if("off"==h)f=!1,h=null;else{for(g in Y)if(h==Y[g].Ma){n=Y[g].La;f=!!(a.dc&n);break}if(!n){a.ca("unknown message category: "+h);break a}}n&&("on"==c[2]?(a.dc|=n,f=!0):"off"==c[2]&&(a.dc&=~n,f=!1))}c=0;n="";for(g in Y)if(!h||h==Y[g].Ma)if(m=!!(a.dc&Y[g].La),null===f||f==m)n&&(n+=","),++c%10||(n+="\n\t"),n+=Y[g].Ma;void 0===h&&a.ca("\nmessage commands:\n\tm [category] [on|off]\tturn categories on/off"); -a.ca((null!==f?f?"messages on: ":"messages off: ":"message categories:\n\t")+(n||"none"))}break;case "o":f=c[1];c=c[2];f&&"?"!=f?(f=ul(a,f,"port #"),c=ul(a,c),void 0!==f&&void 0!==c&&nb(a.na,f,c)):(a.ca("\noutput commands:"),a.ca("\to [p] [d]\twrite data [d] to port [p]"),a.ca("warning: port accesses can affect hardware state"));break;case "p":case "pr":f="pr"==c[0]?1:0;c=1+f;if(a.kc)a.ca("step in progress");else{h=!1;n=[a.S.qa,a.S.ua.oa,void 0];do switch(g=!1,a.ub(n)){case 38:case 46:case 54:case 62:case 240:jl(n, -1);g=!0;break;case 204:case 206:a.kc=c;jl(n,1);break;case 205:case 224:case 225:case 226:a.kc=c;jl(n,2);break;case 232:a.kc=c;jl(n,3);break;case 154:a.kc=c;jl(n,5);break;case 255:a.kc=0<=ml(a,n).indexOf("CALL")?c:0;break;case 243:case 242:jl(n,1);h=g=!0;break;case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:h&&(a.kc=c,jl(n,1))}while(g);a.kc?(a.Vd(a.tc,n,!0),a.Ne()||(a.S.Md(),a.kc=0)):yl(a,f?"tr":"t")}break;case "r":dl(a,c);break;case "t":case "tr":yl(a,c[0], +a.ca((null!==f?f?"messages on: ":"messages off: ":"message categories:\n\t")+(n||"none"))}break;case "o":f=c[1];c=c[2];f&&"?"!=f?(f=ul(a,f,"port #"),c=ul(a,c),void 0!==f&&void 0!==c&&nb(a.na,f,c)):(a.ca("\noutput commands:"),a.ca("\to [p] [d]\twrite data [d] to port [p]"),a.ca("warning: port accesses can affect hardware state"));break;case "p":case "pr":f="pr"==c[0]?1:0;c=1+f;if(a.lc)a.ca("step in progress");else{h=!1;n=[a.S.qa,a.S.ua.oa,void 0];do switch(g=!1,a.ub(n)){case 38:case 46:case 54:case 62:case 240:jl(n, +1);g=!0;break;case 204:case 206:a.lc=c;jl(n,1);break;case 205:case 224:case 225:case 226:a.lc=c;jl(n,2);break;case 232:a.lc=c;jl(n,3);break;case 154:a.lc=c;jl(n,5);break;case 255:a.lc=0<=ml(a,n).indexOf("CALL")?c:0;break;case 243:case 242:jl(n,1);h=g=!0;break;case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:h&&(a.lc=c,jl(n,1))}while(g);a.lc?(a.Vd(a.vc,n,!0),a.Ne()||(a.S.Md(),a.lc=0)):yl(a,f?"tr":"t")}break;case "r":dl(a,c);break;case "t":case "tr":yl(a,c[0], c[1]);break;case "u":el(a,c[1],c[2],8);break;case "x":a:if(void 0===c[1]||"?"==c[1])a.ca("\nexecution options:"),a.ca("\tcs int #\tset checksum cycle interval to #"),a.ca("\tcs start #\tset checksum cycle start count to #"),a.ca("\tcs stop #\tset checksum cycle stop count to #"),a.ca("\tsp #\t\tset speed multiplier to #");else switch(c[1]){case "cs":void 0!==c[3]&&(m=parseInt(c[3],10));switch(c[2]){case "int":a.S.lf=m;break;case "start":a.S.fg=m;break;case "stop":a.S.nf=m;break;default:a.ca("unknown cs option"); break a}void 0!==m&&Bb(a.S);a.ca("checksums "+(a.S.cf?"enabled":"disabled"));break;case "sp":void 0!==c[2]&&Hb(a.S,parseInt(c[2],10));a.ca("target speed: "+(a.S.Ge.toFixed(2)+"Mhz")+" ("+a.S.Gd+"x)");break;default:a.ca("unknown option: "+c[1])}break;case "?":f="commands:";for(h in Tk)f+="\n"+h+" ".substr(0,7-h.length)+Tk[h];jd(a)||(f+="\nnote: frequency/history disabled if no exec breakpoints");a.ca(f);break;default:a.ca("unknown command: "+b)}}} Ba(function(){for(var a=B(window.document,"pcjs","debugger"),b=0;bFl){if(d.load(this.yg)){this.uf=new H(this,"1.15.5","failsafe");this.uf.load()&&(Jl(this,d),a=2);this.uf.set("timestamp",pa());Dl(this.uf);var e=this.Bc&&!this.ph;if(1==a||ta("Click OK to restore previous PCjs machine state.")){if(c=d.parse()){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.Ga("Error: "+g),"unable to verify user"== -g&&(ua(""),this.Oc=null)):this.ca(f+": "+g),Bl(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&Il(this,c?d:null)}else 2==a&&d.clear()}else Il(this);delete this.yg;delete this.Rh}e=La(this.id);for(f=0;fa[1];a=a[2];this.Mb=!0;this.yk||(this.ca("PCjs v1.15.5\nCopyright \u00a9 2012-2014 Jeff Parsons \nLicense: GPL version 3 or later "),this.yk=!0);this.S&&Kl(this,this.S,b,c,a);this.Ak&&(Jl(this,b),b.clear());!c&&this.uf&&(this.uf.clear(),delete this.uf)}; +k.Gh=function(a){void 0===a&&(a=this.yg?1:this.Cc);var b=!1,c=!1;this.zk=!1;var d=this.Qh||new H(this,"1.15.5");if(-1==a)b=!0;else if(a>Fl){if(d.load(this.yg)){this.uf=new H(this,"1.15.5","failsafe");this.uf.load()&&(Jl(this,d),a=2);this.uf.set("timestamp",pa());Dl(this.uf);var e=this.Cc&&!this.ph;if(1==a||ta("Click OK to restore previous PCjs machine state.")){if(c=d.parse()){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.Ga("Error: "+g),"unable to verify user"== +g&&(ua(""),this.Pc=null)):this.ca(f+": "+g),Bl(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&Il(this,c?d:null)}else 2==a&&d.clear()}else Il(this);delete this.yg;delete this.Qh}e=La(this.id);for(f=0;fa[1];a=a[2];this.Nb=!0;this.xk||(this.ca("PCjs v1.15.5\nCopyright \u00a9 2012-2014 Jeff Parsons \nLicense: GPL version 3 or later "),this.xk=!0);this.S&&Kl(this,this.S,b,c,a);this.zk&&(Jl(this,b),b.clear());!c&&this.uf&&(this.uf.clear(),delete this.uf)}; function Jl(a,b){if(ta("There may be a problem with PCjs.\nClick OK to send your PCjs machine state to http://www.pcjs.org.")){var c=a.ge(),d=b.toString(),e={app:"PCjs",ver:"1.15.5"};e.url=a.url;e.user=c;e.type="bug";e.data=d;ra("http://www.pcjs.org/api/v1/report",!0,e)}} -function zl(a,b,c){var d,e="none",f=new H(a,"1.15.5"),g=new H(a,"1.15.5","validate"),h=pa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.15.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.S&&a.S.Wb&&(c&&a.S.Ab(),d=a.S.Wb(b,c),"object"===typeof d&&f.set(a.S.id,d),c&&(a.S.Mb=!1,!1===d&&(e=null)));for(var h=La(a.id),m=0;m/g;f=g.exec(a);){var h=f[2],m=ra(h),n=m[1];if(m[0]||!n)throw c="unable to resolve XML reference: "+f[0]+" ("+m[0]+")",Error(c);if(m=f[3]){var q=n.match(new RegExp("<"+f[1]+"[^>]*>"));if(q){for(var h=q[0],t,s=/( [a-z]+=)(['"])(.*?)\2/g;t=s.exec(m);)h=0>h.indexOf(t[1])?h.replace(">",t[0]+">"):h.replace(new RegExp(t[1]+"(['\"])(.*?)\\1"),t[0]);q[0]!=h&&(n=n.replace(q[0],h))}else throw c="missing <"+f[1]+"> in "+h, Error(c);}n=n.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(f[0],n);g.lastIndex=0}c&&(b&&0>b.indexOf("/")&&(b=window.location.pathname+b),a=a.replace(/(]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(b?" url=$2"+b+"$2":"")));if(0===a.indexOf("<"))window.ActiveXObject||"ActiveXObject"in window?(e||(a=a.replace(/\s*/g,"")),f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml");else throw Error("unrecognized XML: "+ (255"']/g,function(a){return fa[a]})}function h function t(a,b,c,d,e,f){b=!!b;var l=0,k=null,m=da(a),n=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");b&&(n.onreadystatechange=function(){4===n.readyState&&(n.onreadystatechange=void 0,k=n.responseText,200!=n.status&&(l=n.status||-1),d&&e&&e.call(d,m,k,l,f))});if(c){var q="",s;for(s in c)c.hasOwnProperty(s)&&(q&&(q+="&"),q+=s+"="+encodeURIComponent(c[s]));q=q.replace(/%20/g,"+");n.open("POST",a,b);n.setRequestHeader("Content-type","application/x-www-form-urlencoded"); n.send(q)}else n.open("GET",a,b),n.send();a=[];b||(k=n.responseText,200!=n.status&&(l=n.status||-1),d&&e&&e.call(d,m,k,l,f),a=[l,k]);return a}function ka(){return"http://"+(window?window.location.host:"www.pcjs.org")}function u(a){window?window.alert(a):console.log(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}function ma(a){if(window)try{window.localStorage.setItem("user",a)}catch(b){}} function na(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var oa={init:[],show:[],exit:[]},pa=!0;function qa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function v(a){oa.init.push(a)}function ra(a){if(pa)for(var b=0;b=this.hf?12:14;this.mc=1<>2;this.eb=this.mc-1;this.Zf=(this.Oe+this.mc)/this.mc|0;this.Pd=this.Zf-1;this.Mf=[];this.Nf=[];this.Ih();this.Pa()}z(w,Ha);Ha.prototype.Ih=function(){this.ya=Array(this.Zf);for(var a=0;a>a.Ib;0>this.Ib;0>a.Ib;0>a.Ib].Ki(b&a.eb)}function Oa(a,b){var c=b&a.eb,d=(b&a.vb)>>a.Ib;return c!=a.eb?a.ya[d].Bn(c):a.ya[d++].Ki(c)|a.ya[d&a.Pd].Ki(0)<<8} -function Pa(a,b,c){a.ya[(b&a.vb)>>a.Ib].Si(b&a.eb,c&255)}function Qa(a,b,c){var d=b&a.eb;b=(b&a.vb)>>a.Ib;d!=a.eb?a.ya[b].Ln(d,c&65535):(a.ya[b++].Si(d,c&255),a.ya[b&a.Pd].Si(0,c>>8&255))}function Sa(a){for(var b=0,c=[],d=0;d=this.hf?12:14;this.nc=1<>2;this.eb=this.nc-1;this.Zf=(this.Oe+this.nc)/this.nc|0;this.Pd=this.Zf-1;this.Mf=[];this.Nf=[];this.Hh();this.Pa()}z(w,Ha);Ha.prototype.Hh=function(){this.ya=Array(this.Zf);for(var a=0;a>a.Ib;0>this.Ib;0>a.Ib;0>a.Ib].Ki(b&a.eb)}function Oa(a,b){var c=b&a.eb,d=(b&a.wb)>>a.Ib;return c!=a.eb?a.ya[d].Bn(c):a.ya[d++].Ki(c)|a.ya[d&a.Pd].Ki(0)<<8} +function Pa(a,b,c){a.ya[(b&a.wb)>>a.Ib].Si(b&a.eb,c&255)}function Qa(a,b,c){var d=b&a.eb;b=(b&a.wb)>>a.Ib;d!=a.eb?a.ya[b].Ln(d,c&65535):(a.ya[b++].Si(d,c&255),a.ya[b&a.Pd].Si(0,c>>8&255))}function Sa(a){for(var b=0,c=[],d=0;d>2);for(d=0;d>2]>>>((a&3)<<3)&255},Cn:function(a){var b=a>>2;a=(a&3)<<3;var c=this.la[b]>>>a;return 24>a?c&65535:c&255|(this.la[b+1]&255)<<8},Jn:function(a,b){var c=a>>2,d=(a&3)<<3;this.la[c]=this.la[c]&~(255<>2,d=(a&3)<<3;24>d?this.la[c]=this.la[c]&~(65535<>8);this.Xa=!0},save:function(){return this.ea? -null:this.la},restore:function(a){return this.ea?null===a:this.cl==a.length<<2?(this.la=a,this.Xa=!0):!1},fe:function(a,b){a||(a=[]);void 0===b&&(b=!0);var c=a;this.uc=c[0]?c[0]:this.Fg;this.An=c[1]?c[1]:this.Fg;b&&(this.Ki=c[0]?c[0]:this.Fg,this.Bn=c[1]?c[1]:this.Fg);c=a;this.wc=c[2]&&!this.oj?c[2]:this.Qg;this.Kn=c[3]&&!this.oj?c[3]:this.Qg;b&&(this.Si=c[2]?c[2]:this.Qg,this.Ln=c[3]?c[3]:this.Qg)}};var Xa=[Ia.prototype.zn,Ia.prototype.Cn,Ia.prototype.Jn,Ia.prototype.Mn]; -function Ya(a,b){w.call(this,"CPU",a,Ya);var c=a.multiplier||1;this.cd=a.cycles||b;this.yd=c;this.rg=Math.round(this.cd/1E4)/100;this.we=this.rg*this.yd;this.qc=this.zb=!1;this.qh=a.autoStart;c=ua.autostart;void 0!==c&&(this.qh="true"==c?!0:"false"==c?!1:null);this.gg=!1;this.wg=this.ye=0;this.xg=a.csStart;this.kf=a.csInterval;this.lf=a.csStop;var d=this;this.Dm=function(){Za(d)};this.Pa()}z(w,Ya);g=Ya.prototype; -g.gc=function(a,b,c,d){this.ma=b;this.Na=d;this.Fa=a;var e=D(a,"Video");e&&(this.df=function(){$a(e)},this.Ee=function(){e.Ee()});this.ga=D(a,"ChipSet");this.Pa()};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.Rb=function(a,b){if(!b){if(a&&this.restore){ab(this);if(!this.restore(a))return!1;bb(this)}else this.reset();this.Sb("No debugger detected")}this.zb=!0;!cb(this)&&this.Na&&this.Na.to();this.df();this.cf();return!0}; -g.Jb=function(a){this.zb=!1;return a&&this.save?this.save():!0};function cb(a){return!0===a.qh||null===a.qh&&void 0===a.oa.run?(Za(a),!0):!1}g.Ee=function(){};g.tj=function(){return 0};function bb(a){void 0===a.xg&&(a.xg=0);void 0===a.kf&&(a.kf=-1);void 0===a.lf&&(a.lf=-1);a.gg=0<=a.xg&&0c&&(c=60);2>c&&(c=2);var d=1;b&&1a.rg&&(c=Math.round(c/a.yd));return c}function ab(a){a.Kc=0;a.ug=1;a.be=a.Bd=a.Lc=a.A=0;bb(a);fb(a,1)} -function fb(a,b,c){void 0!==b&&(0.8>a.Kc/a.we&&(b=1),a.yd=b,b=a.rg*a.yd,a.we!=b&&(a.we=b,b=a.we.toFixed(2)+"Mhz",a.oa.setSpeed&&(a.oa.setSpeed.innerHTML=b),a.Sb("target speed: "+b)),c&&a.Ee());hb(a,a.Bd);a.Bd=0;a.xe=ha();a.Zd=0;ib(a)} -function Za(a,b){if(Ca(a,!0)){a.qc||(fb(a),a.Fa&&a.Fa.start(a.xe,jb(a)),a.qc=!0,a.ga&&kb(a.ga),a.oa.run&&(a.oa.run.innerHTML="Halt"),b&&a.Ee());a.Di>=a.cd&&ib(a,!0);a.pf=0;a.tg=ha();if(a.Zd){var c=a.tg-a.Zd;c>a.zj&&(a.xe+=c,a.xe>a.tg&&(a.xe=a.tg))}try{do{a.Uk(a.gg?1:Math.round(a.wm/a.ug));var d=a.Lc-a.A;a.Bd+=d;a.pf+=d;hb(a,0,!0);var c=a,e=d;if(c.gg){var f=!1;c.wg=c.wg+c.tj()|0;c.ye-=e;0>=c.ye&&(c.ye+=c.kf,f=!0);0<=c.lf&&c.lf<=jb(c)&&(c.kf=c.lf=-1,bb(c),db(c),f=!0);f&&c.Sb(jb(c)+" cycles: checksum="+ -p(c.wg))}a.nf-=d;0>=a.nf&&(a.nf+=a.Dj,a.df());a.mf-=d;0>=a.mf&&(a.mf+=a.Cj,a.cf());a.of-=d;if(0>=a.of){a.of+=a.Ph;break}}while(a.qc)}catch(l){db(a);a.df();a.cf();a.Fa&&a.Fa.stop(ha(),jb(a));Ca(a,!1);Ea(a,l.message);return}d=setTimeout;c=a.Dm;a.Zd=ha();e=a.zj;a.pf&&(e=Math.round(e*a.pf/a.Ph));e-=a.Zd-a.tg;if(f=a.Zd-a.xe)a.Kc=Math.round(a.Bd/(10*f))/100,864E5<=f&&(a.be=0,a.ga&&lb(a.ga,!0),fb(a));if(0>e||a.Kc>2);for(d=0;d>2]>>>((a&3)<<3)&255},Cn:function(a){var b=a>>2;a=(a&3)<<3;var c=this.la[b]>>>a;return 24>a?c&65535:c&255|(this.la[b+1]&255)<<8},Jn:function(a,b){var c=a>>2,d=(a&3)<<3;this.la[c]=this.la[c]&~(255<>2,d=(a&3)<<3;24>d?this.la[c]=this.la[c]&~(65535<>8);this.Xa=!0},save:function(){return this.ea? +null:this.la},restore:function(a){return this.ea?null===a:this.cl==a.length<<2?(this.la=a,this.Xa=!0):!1},fe:function(a,b){a||(a=[]);void 0===b&&(b=!0);var c=a;this.vc=c[0]?c[0]:this.Eg;this.An=c[1]?c[1]:this.Eg;b&&(this.Ki=c[0]?c[0]:this.Eg,this.Bn=c[1]?c[1]:this.Eg);c=a;this.xc=c[2]&&!this.nj?c[2]:this.Pg;this.Kn=c[3]&&!this.nj?c[3]:this.Pg;b&&(this.Si=c[2]?c[2]:this.Pg,this.Ln=c[3]?c[3]:this.Pg)}};var Xa=[Ia.prototype.zn,Ia.prototype.Cn,Ia.prototype.Jn,Ia.prototype.Mn]; +function Ya(a,b){w.call(this,"CPU",a,Ya);var c=a.multiplier||1;this.cd=a.cycles||b;this.yd=c;this.rg=Math.round(this.cd/1E4)/100;this.we=this.rg*this.yd;this.rc=this.zb=!1;this.ph=a.autoStart;c=ua.autostart;void 0!==c&&(this.ph="true"==c?!0:"false"==c?!1:null);this.gg=!1;this.wg=this.ye=0;this.xg=a.csStart;this.kf=a.csInterval;this.lf=a.csStop;var d=this;this.Dm=function(){Za(d)};this.Pa()}z(w,Ya);g=Ya.prototype; +g.ic=function(a,b,c,d){this.ma=b;this.Na=d;this.Fa=a;var e=D(a,"Video");e&&(this.df=function(){$a(e)},this.Ee=function(){e.Ee()});this.ga=D(a,"ChipSet");this.Pa()};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.Sb=function(a,b){if(!b){if(a&&this.restore){ab(this);if(!this.restore(a))return!1;bb(this)}else this.reset();this.Tb("No debugger detected")}this.zb=!0;!cb(this)&&this.Na&&this.Na.to();this.df();this.cf();return!0}; +g.Jb=function(a){this.zb=!1;return a&&this.save?this.save():!0};function cb(a){return!0===a.ph||null===a.ph&&void 0===a.oa.run?(Za(a),!0):!1}g.Ee=function(){};g.sj=function(){return 0};function bb(a){void 0===a.xg&&(a.xg=0);void 0===a.kf&&(a.kf=-1);void 0===a.lf&&(a.lf=-1);a.gg=0<=a.xg&&0c&&(c=60);2>c&&(c=2);var d=1;b&&1a.rg&&(c=Math.round(c/a.yd));return c}function ab(a){a.Kc=0;a.ug=1;a.be=a.Bd=a.Lc=a.A=0;bb(a);fb(a,1)} +function fb(a,b,c){void 0!==b&&(0.8>a.Kc/a.we&&(b=1),a.yd=b,b=a.rg*a.yd,a.we!=b&&(a.we=b,b=a.we.toFixed(2)+"Mhz",a.oa.setSpeed&&(a.oa.setSpeed.innerHTML=b),a.Tb("target speed: "+b)),c&&a.Ee());hb(a,a.Bd);a.Bd=0;a.xe=ha();a.Zd=0;ib(a)} +function Za(a,b){if(Ca(a,!0)){a.rc||(fb(a),a.Fa&&a.Fa.start(a.xe,jb(a)),a.rc=!0,a.ga&&kb(a.ga),a.oa.run&&(a.oa.run.innerHTML="Halt"),b&&a.Ee());a.Di>=a.cd&&ib(a,!0);a.pf=0;a.tg=ha();if(a.Zd){var c=a.tg-a.Zd;c>a.yj&&(a.xe+=c,a.xe>a.tg&&(a.xe=a.tg))}try{do{a.Tk(a.gg?1:Math.round(a.wm/a.ug));var d=a.Lc-a.A;a.Bd+=d;a.pf+=d;hb(a,0,!0);var c=a,e=d;if(c.gg){var f=!1;c.wg=c.wg+c.sj()|0;c.ye-=e;0>=c.ye&&(c.ye+=c.kf,f=!0);0<=c.lf&&c.lf<=jb(c)&&(c.kf=c.lf=-1,bb(c),db(c),f=!0);f&&c.Tb(jb(c)+" cycles: checksum="+ +p(c.wg))}a.nf-=d;0>=a.nf&&(a.nf+=a.Cj,a.df());a.mf-=d;0>=a.mf&&(a.mf+=a.Bj,a.cf());a.of-=d;if(0>=a.of){a.of+=a.Oh;break}}while(a.rc)}catch(l){db(a);a.df();a.cf();a.Fa&&a.Fa.stop(ha(),jb(a));Ca(a,!1);Ea(a,l.message);return}d=setTimeout;c=a.Dm;a.Zd=ha();e=a.yj;a.pf&&(e=Math.round(e*a.pf/a.Oh));e-=a.Zd-a.tg;if(f=a.Zd-a.xe)a.Kc=Math.round(a.Bd/(10*f))/100,864E5<=f&&(a.be=0,a.ga&&lb(a.ga,!0),fb(a));if(0>e||a.Kc>13;return this.gb=e}if(b&&768>=b)return this.ua=a,this.ad=c,this.kc=d,this.tc=(d&24576)>>13,this.gb=e}return-1} -function wb(a){return this.gb+a}function xb(a){return this.gb+a}function rb(a,b,c){return a+b<=this.ad?this.gb+a:ub.call(this,0,0,c)}function ub(a,b,c){c||yb.call(this.ia,13,0);return-1}function tb(a,b,c){return a+b<=this.ad?this.gb+a:vb.call(this,0,0,c)}function vb(a,b,c){c||yb.call(this.ia,13,0);return-1}nb.prototype.save=function(){return[this.ua,this.gb,this.ad,this.kc,this.tc,this.Kg]}; -nb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.ua=a[0],this.gb=a[1],this.ad=a[2],this.kc=a[3],this.tc=a[4],this.Kg=a[5])};function ob(a,b){void 0===b&&(b=!!(a.ia.ed&1));b?(a.load=qb,a.Ic=rb,a.Nb=tb):(a.load=pb,a.Ic=wb,a.Nb=xb)} -function zb(a){this.Ca=a.model||8088;var b=0;switch(this.Ca){default:case 8088:b=4772727;break;case 80286:b=6E6}Ya.call(this,a,b);this.Wi=61442;this.Kf=4;this.ze=255;this.Ei=4;this.Z=5;this.na=6;this.ba=7;this.ca=8;this.P=9;this.U=11;this.V=12;this.$d=4;this.Fj=60;this.Gj=83;this.Bb=3;this.fb=9;this.Pb=16;this.Ag=1;this.Kj=19;this.Mj=28;this.Oj=16;this.Nj=21;this.Lj=37;this.Ij=2;this.Xh=9;this.Jj=5;this.Hj=33;this.Zh=10;this.Yh=8;this.tf=3;this.sf=15;this.bk=51;this.ck=1;this.dk=2;this.ek=4;this.ak= -32;this.gk=this.$h=15;this.Cb=16;this.Db=4;this.ik=11;this.hk=18;this.fk=24;this.mb=4;this.jk=2;this.ai=16;this.kk=17;this.fi=18;this.lk=19;this.ei=5;this.gi=6;this.qk=2;this.pk=8;this.nk=9;this.ii=this.hi=this.mk=this.ok=10;this.Qj=80;this.Sj=144;this.Pj=86;this.Rj=154;this.Uj=101;this.Wj=165;this.Tj=107;this.Vj=171;this.sk=70;this.uk=113;this.rk=76;this.tk=124;this.Yj=80;this.$j=128;this.Xj=86;this.Zj=134;this.vf=3;this.uf=16;this.ni=10;this.mi=8;this.vk=51;this.Qb=8;this.wk=17;this.xk=36;this.Zb= -11;this.yk=16;this.wf=10;this.rb=2;this.Uh=18;this.Vh=9-this.rb;this.Wh=17-this.rb;this.bi=12;this.ci=9-this.rb;this.di=13-this.rb;this.ji=18;this.ki=9-this.rb;this.li=17-this.rb;this.oi=15;this.pi=9-this.rb;this.qi=15-this.rb;this.ui=11;this.vi=9-this.rb;this.wi=10-this.rb;this.zk=8;this.Ck=12;this.Ak=18;this.Bk=17;this.Dk=15;this.si=8;this.ri=20;this.ti=2;this.zi=3;this.xf=9;this.yi=5;this.xi=11;this.Bi=4;this.Ai=17;this.Ek=11;this.Ma=Ab.slice();80186<=this.Ca&&(this.ze=31,this.Ma[15]=G,this.Ma[96]= -Bb,this.Ma[97]=Cb,this.Ma[98]=Db,this.Ma[99]=G,this.Ma[100]=G,this.Ma[101]=G,this.Ma[102]=G,this.Ma[103]=G,this.Ma[104]=Eb,this.Ma[105]=Fb,this.Ma[106]=Gb,this.Ma[107]=Hb,this.Ma[108]=Ib,this.Ma[109]=Jb,this.Ma[110]=Kb,this.Ma[111]=Lb,this.Ma[192]=Mb,this.Ma[193]=Nb,this.Ma[200]=Ob,this.Ma[201]=Pb,this.Ma[241]=Qb,Rb[7]=Sb,Tb[7]=Sb,80286<=this.Ca&&(this.Wi=2,this.Kf=0,this.Ma[15]=Ub,this.Ma[99]=Vb,this.Ma[84]=Wb,this.P=this.ca=this.ba=this.na=this.Z=this.Ei=0,this.V=this.U=1,this.$d=3,this.Fj=14,this.Gj= -16,this.Bb=2,this.Pb=this.fb=7,this.Ag=0,this.Kj=7,this.Mj=13,this.Oj=7,this.Nj=11,this.Lj=16,this.Ij=3,this.Xh=6,this.Jj=2,this.Hj=13,this.Yh=this.Zh=5,this.tf=2,this.sf=7,this.bk=23,this.ck=0,this.dk=1,this.ek=3,this.ak=17,this.$h=7,this.gk=11,this.Cb=7,this.Db=3,this.ik=7,this.hk=11,this.fk=15,this.mb=2,this.jk=3,this.ai=7,this.lk=this.fi=this.kk=8,this.gi=this.ei=4,this.qk=2,this.pk=3,this.nk=5,this.ok=2,this.mk=3,this.hi=5,this.ii=3,this.Qj=14,this.Sj=22,this.Pj=17,this.Rj=25,this.Uj=17,this.Wj= -25,this.Tj=20,this.Vj=28,this.sk=13,this.uk=21,this.rk=16,this.tk=24,this.Yj=13,this.$j=21,this.Xj=16,this.Zj=24,this.vf=2,this.uf=7,this.mi=this.ni=5,this.vk=19,this.wk=this.Qb=5,this.xk=17,this.Zb=3,this.yk=5,this.wf=3,this.rb=0,this.Uh=8,this.Vh=5,this.Wh=9,this.ci=this.bi=5,this.di=4,this.ki=this.ji=5,this.li=4,this.oi=7,this.pi=5,this.qi=8,this.ui=3,this.vi=4,this.wi=3,this.Ck=this.zk=11,this.Bk=this.Ak=15,this.Dk=7,this.si=5,this.ri=8,this.ti=0,this.zi=2,this.xf=6,this.yi=3,this.xi=6,this.Bi= -3,this.Ek=this.Ai=5));this.$k=[];this.Xi=[];this.Lc=this.fh=0;this.hg=!1;this.ya=[];this.Oe=this.vb=this.Ib=this.eb=this.Pd=0;this.S=this.ml;this.T=this.nl;this.N=this.om;this.O=this.pm;this.Q=this.Hn;this.R=this.In;Xb(this)}z(Ya,zb);g=zb.prototype;g.Ih=function(a,b,c,d,e){this.ya=a;this.Oe=this.vb=b;this.Ib=c;this.eb=d;this.Pd=e};g.reset=function(){this.qc&&db(this);Xb(this);ab(this);this.Yc=!1}; -function Xb(a){a.G=0;a.B=0;a.I=0;a.J=0;a.X=0;a.H=0;a.F=0;a.D=0;a.ed=65520;a.Sc=0;a.me=1023;a.pc={Fi:0,ua:0,kc:0,qg:-1};a.Ia=new nb(a,"CS");a.ac=new nb(a,"DS");a.Tb=new nb(a,"SS");a.ib=new nb(a,"ES");a.Sk=new nb(a,"ZERO");Yb(a,0,65535);80286<=a.Ca&&(a.Rc=a.Ne=0,a.De=new nb(a,"LDT",!0),a.Mg=new nb(a,"TSS",!0),a.sb=new nb(a,"VER",!0),Yb(a,65520,61440),a.Ia.gb=16711680);Zb(a,0);$b(a);a.Ya=0;a.nb=a.Bf=-1;a.Vf=0;a.da=a.Ba=-1;a.C=a.ac;a.M=a.Tb;a.Y=a.pa=0} -g.tj=function(){var a=this.G+this.B+this.I+this.J+this.X+this.H+this.F+this.D|0;return a=a+this.qa+this.Ia.ua+this.ac.ua+this.Tb.ua+this.ib.ua+ac(this)|0};function bc(a,b){var c=a.Xi[b];null!=c&&(c(--a.fh),delete a.Xi[b])}function $b(a,b){void 0===b&&(b=!!(a.ed&1));cc=b?dc:ec;ob(a.Ia,b);ob(a.ac,b);ob(a.Tb,b);ob(a.ib,b)} -g.save=function(){var a=new H(this);a.set(0,[this.G,this.B,this.I,this.J,this.X,this.H,this.F,this.D]);a.set(1,[this.qa,this.Ia.save(),this.ac.save(),this.Tb.save(),this.ib.save(),ac(this),null!=this.Rc?[this.ed,this.Rc,this.Ne,this.Sc,this.me,this.De.save(),this.Mg.save()]:null]);a.set(2,[this.C.Kg,this.M.Kg,this.Y,this.pa,this.Ya,this.da,this.Ba]);a.set(3,[this.ug,this.be,this.yd]);a.set(4,Sa(this.ma));return a.data()}; -g.restore=function(a){var b;b=a[0];this.G=b[0];this.B=b[1];this.I=b[2];this.J=b[3];this.X=b[4];this.H=b[5];this.F=b[6];this.D=b[7];b=a[1];this.Ia.restore(b[1]);this.ac.restore(b[2]);this.Tb.restore(b[3]);this.ib.restore(b[4]);Zb(this,b[5]);var c=b[6];c&&c.length&&(this.ed=c[0],this.Rc=c[1],this.Ne=c[2],this.Sc=c[3],this.me=c[4],this.De.restore(c[5]),this.Mg.restore(c[6]),$b(this));I(this,b[0]);b=a[2];this.C=fc(this,b[0]);this.M=fc(this,b[1]);this.Y=b[2];this.pa=b[3];this.Ya=b[4];this.da=b[5];this.Ba= -b[6];b=a[3];this.ug=b[0];this.be=b[1];fb(this,b[2]);a:{b=this.ma;a=a[4];for(c=0;c>1?128:0} +0,0,1,1,0,1,0,0,1];function nb(a,b,c){this.ia=a;this.gb=this.ua=0;this.ad=65535;this.uc=this.lc=0;this.Jg=b;ob(this,c)}function pb(a){this.ua=a;this.ad=65535;return this.gb=a<<4} +function qb(a){var b,c;a&4?(b=this.ia.De.gb,c=this.ia.De.ad):(b=this.ia.Rc,c=this.ia.Ne);b+=a&65528;if(b+7<=c){this.Ic=rb;this.Nb=tb;this.ia.A-=15;c=F(this.ia,b+0);var d=F(this.ia,b+4),e=F(this.ia,b+2)|(d&255)<<16;F(this.ia,b+6);b=d&7936;if(b&4096){2048==(b&2560)&&(this.Nb=ub);if(b&2048||!(b&512))this.Nb=vb;this.ua=a;this.ad=c;this.lc=d;this.uc=(d&24576)>>13;return this.gb=e}if(b&&768>=b)return this.ua=a,this.ad=c,this.lc=d,this.uc=(d&24576)>>13,this.gb=e}return-1} +function wb(a){return this.gb+a}function xb(a){return this.gb+a}function rb(a,b,c){return a+b<=this.ad?this.gb+a:ub.call(this,0,0,c)}function ub(a,b,c){c||yb.call(this.ia,13,0);return-1}function tb(a,b,c){return a+b<=this.ad?this.gb+a:vb.call(this,0,0,c)}function vb(a,b,c){c||yb.call(this.ia,13,0);return-1}nb.prototype.save=function(){return[this.ua,this.gb,this.ad,this.lc,this.uc,this.Jg]}; +nb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.ua=a[0],this.gb=a[1],this.ad=a[2],this.lc=a[3],this.uc=a[4],this.Jg=a[5])};function ob(a,b){void 0===b&&(b=!!(a.ia.ed&1));b?(a.load=qb,a.Ic=rb,a.Nb=tb):(a.load=pb,a.Ic=wb,a.Nb=xb)} +function zb(a){this.Ca=a.model||8088;var b=0;switch(this.Ca){default:case 8088:b=4772727;break;case 80286:b=6E6}Ya.call(this,a,b);this.Wi=61442;this.Kf=4;this.ze=255;this.Ei=4;this.Z=5;this.na=6;this.ba=7;this.ca=8;this.P=9;this.U=11;this.V=12;this.$d=4;this.Ej=60;this.Fj=83;this.Bb=3;this.fb=9;this.Qb=16;this.zg=1;this.Jj=19;this.Lj=28;this.Nj=16;this.Mj=21;this.Kj=37;this.Hj=2;this.Xh=9;this.Ij=5;this.Gj=33;this.Zh=10;this.Yh=8;this.tf=3;this.sf=15;this.ak=51;this.bk=1;this.ck=2;this.dk=4;this.$j= +32;this.fk=this.$h=15;this.Cb=16;this.Db=4;this.hk=11;this.gk=18;this.ek=24;this.mb=4;this.ik=2;this.ai=16;this.jk=17;this.fi=18;this.kk=19;this.ei=5;this.gi=6;this.pk=2;this.ok=8;this.mk=9;this.ii=this.hi=this.lk=this.nk=10;this.Pj=80;this.Rj=144;this.Oj=86;this.Qj=154;this.Tj=101;this.Vj=165;this.Sj=107;this.Uj=171;this.rk=70;this.tk=113;this.qk=76;this.sk=124;this.Xj=80;this.Zj=128;this.Wj=86;this.Yj=134;this.vf=3;this.uf=16;this.ni=10;this.mi=8;this.uk=51;this.Rb=8;this.vk=17;this.wk=36;this.$b= +11;this.xk=16;this.wf=10;this.sb=2;this.Uh=18;this.Vh=9-this.sb;this.Wh=17-this.sb;this.bi=12;this.ci=9-this.sb;this.di=13-this.sb;this.ji=18;this.ki=9-this.sb;this.li=17-this.sb;this.oi=15;this.pi=9-this.sb;this.qi=15-this.sb;this.ui=11;this.vi=9-this.sb;this.wi=10-this.sb;this.yk=8;this.Bk=12;this.zk=18;this.Ak=17;this.Ck=15;this.si=8;this.ri=20;this.ti=2;this.zi=3;this.xf=9;this.yi=5;this.xi=11;this.Bi=4;this.Ai=17;this.Dk=11;this.Ma=Ab.slice();80186<=this.Ca&&(this.ze=31,this.Ma[15]=G,this.Ma[96]= +Bb,this.Ma[97]=Cb,this.Ma[98]=Db,this.Ma[99]=G,this.Ma[100]=G,this.Ma[101]=G,this.Ma[102]=G,this.Ma[103]=G,this.Ma[104]=Eb,this.Ma[105]=Fb,this.Ma[106]=Gb,this.Ma[107]=Hb,this.Ma[108]=Ib,this.Ma[109]=Jb,this.Ma[110]=Kb,this.Ma[111]=Lb,this.Ma[192]=Mb,this.Ma[193]=Nb,this.Ma[200]=Ob,this.Ma[201]=Pb,this.Ma[241]=Qb,Rb[7]=Sb,Tb[7]=Sb,80286<=this.Ca&&(this.Wi=2,this.Kf=0,this.Ma[15]=Ub,this.Ma[99]=Vb,this.Ma[84]=Wb,this.P=this.ca=this.ba=this.na=this.Z=this.Ei=0,this.V=this.U=1,this.$d=3,this.Ej=14,this.Fj= +16,this.Bb=2,this.Qb=this.fb=7,this.zg=0,this.Jj=7,this.Lj=13,this.Nj=7,this.Mj=11,this.Kj=16,this.Hj=3,this.Xh=6,this.Ij=2,this.Gj=13,this.Yh=this.Zh=5,this.tf=2,this.sf=7,this.ak=23,this.bk=0,this.ck=1,this.dk=3,this.$j=17,this.$h=7,this.fk=11,this.Cb=7,this.Db=3,this.hk=7,this.gk=11,this.ek=15,this.mb=2,this.ik=3,this.ai=7,this.kk=this.fi=this.jk=8,this.gi=this.ei=4,this.pk=2,this.ok=3,this.mk=5,this.nk=2,this.lk=3,this.hi=5,this.ii=3,this.Pj=14,this.Rj=22,this.Oj=17,this.Qj=25,this.Tj=17,this.Vj= +25,this.Sj=20,this.Uj=28,this.rk=13,this.tk=21,this.qk=16,this.sk=24,this.Xj=13,this.Zj=21,this.Wj=16,this.Yj=24,this.vf=2,this.uf=7,this.mi=this.ni=5,this.uk=19,this.vk=this.Rb=5,this.wk=17,this.$b=3,this.xk=5,this.wf=3,this.sb=0,this.Uh=8,this.Vh=5,this.Wh=9,this.ci=this.bi=5,this.di=4,this.ki=this.ji=5,this.li=4,this.oi=7,this.pi=5,this.qi=8,this.ui=3,this.vi=4,this.wi=3,this.Bk=this.yk=11,this.Ak=this.zk=15,this.Ck=7,this.si=5,this.ri=8,this.ti=0,this.zi=2,this.xf=6,this.yi=3,this.xi=6,this.Bi= +3,this.Dk=this.Ai=5));this.Zk=[];this.Xi=[];this.Lc=this.eh=0;this.hg=!1;this.ya=[];this.Oe=this.wb=this.Ib=this.eb=this.Pd=0;this.S=this.ml;this.T=this.nl;this.N=this.om;this.O=this.pm;this.Q=this.Hn;this.R=this.In;Xb(this)}z(Ya,zb);g=zb.prototype;g.Hh=function(a,b,c,d,e){this.ya=a;this.Oe=this.wb=b;this.Ib=c;this.eb=d;this.Pd=e};g.reset=function(){this.rc&&db(this);Xb(this);ab(this);this.Yc=!1}; +function Xb(a){a.G=0;a.B=0;a.I=0;a.J=0;a.X=0;a.H=0;a.F=0;a.D=0;a.ed=65520;a.Sc=0;a.me=1023;a.qc={Fi:0,ua:0,lc:0,qg:-1};a.Ia=new nb(a,"CS");a.cc=new nb(a,"DS");a.Ub=new nb(a,"SS");a.ib=new nb(a,"ES");a.Rk=new nb(a,"ZERO");Yb(a,0,65535);80286<=a.Ca&&(a.Rc=a.Ne=0,a.De=new nb(a,"LDT",!0),a.Lg=new nb(a,"TSS",!0),a.tb=new nb(a,"VER",!0),Yb(a,65520,61440),a.Ia.gb=16711680);Zb(a,0);$b(a);a.Ya=0;a.nb=a.Bf=-1;a.Vf=0;a.da=a.Ba=-1;a.C=a.cc;a.M=a.Ub;a.Y=a.pa=0} +g.sj=function(){var a=this.G+this.B+this.I+this.J+this.X+this.H+this.F+this.D|0;return a=a+this.qa+this.Ia.ua+this.cc.ua+this.Ub.ua+this.ib.ua+ac(this)|0};function bc(a,b){var c=a.Xi[b];null!=c&&(c(--a.eh),delete a.Xi[b])}function $b(a,b){void 0===b&&(b=!!(a.ed&1));cc=b?dc:ec;ob(a.Ia,b);ob(a.cc,b);ob(a.Ub,b);ob(a.ib,b)} +g.save=function(){var a=new H(this);a.set(0,[this.G,this.B,this.I,this.J,this.X,this.H,this.F,this.D]);a.set(1,[this.qa,this.Ia.save(),this.cc.save(),this.Ub.save(),this.ib.save(),ac(this),null!=this.Rc?[this.ed,this.Rc,this.Ne,this.Sc,this.me,this.De.save(),this.Lg.save()]:null]);a.set(2,[this.C.Jg,this.M.Jg,this.Y,this.pa,this.Ya,this.da,this.Ba]);a.set(3,[this.ug,this.be,this.yd]);a.set(4,Sa(this.ma));return a.data()}; +g.restore=function(a){var b;b=a[0];this.G=b[0];this.B=b[1];this.I=b[2];this.J=b[3];this.X=b[4];this.H=b[5];this.F=b[6];this.D=b[7];b=a[1];this.Ia.restore(b[1]);this.cc.restore(b[2]);this.Ub.restore(b[3]);this.ib.restore(b[4]);Zb(this,b[5]);var c=b[6];c&&c.length&&(this.ed=c[0],this.Rc=c[1],this.Ne=c[2],this.Sc=c[3],this.me=c[4],this.De.restore(c[5]),this.Lg.restore(c[6]),$b(this));I(this,b[0]);b=a[2];this.C=fc(this,b[0]);this.M=fc(this,b[1]);this.Y=b[2];this.pa=b[3];this.Ya=b[4];this.da=b[5];this.Ba= +b[6];b=a[3];this.ug=b[0];this.be=b[1];fb(this,b[2]);a:{b=this.ma;a=a[4];for(c=0;c>1?128:0} function tc(a){return(a.fa^a.ha^a.fa>>1)&a.$>>1?2048:0}function uc(a){a.W&=~a.$}function vc(a){a.ha=a.fa&16|a.ha&-17}function wc(a){a.W|=a.$-1}function xc(a){a.fa&=~a.$;a.ha=a.fa&32896|a.ha&-32897}function yc(a){a.W|=a.$}function zc(a){a.ha=~(a.fa&16)&16|a.ha&-17}function Ac(a){a.W&=~(a.$-1)}function Bc(a){sc(a)||(a.fa^=a.$>>1|a.$>>2,a.ha^=32896)}function Cc(a){a.fa|=a.$;a.ha=a.fa&32896|a.ha&-32897}function ac(a){return a.Ha&-2262|oc(a)|pc(a)|qc(a)|rc(a)|sc(a)|tc(a)} function Zb(a,b){a.$=256;a.W=a.fa=a.ha=0;b&1&&yc(a);b&4||(a.fa|=1);b&16&&(a.ha|=16);b&64||wc(a);b&128&&Bc(a);b&2048&&Cc(a);a.Ha=a.Ha&-1793|b&1792|a.Wi;a.Ha&256&&(a.Ya|=2,a.Y|=4)} -g.tb=function(a,b,c,d){var e=!1;switch(c){case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "CS":case "DS":case "SS":case "ES":case "IP":case "PC":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "O":this.oa[c]=d;e=!0;break;default:e=Ya.prototype.tb.call(this,a,b,c,d)}return e};function Dc(a,b){return a.ya[(b&a.vb)>>a.Ib].uc(b&a.eb)} -function F(a,b){var c=b&a.eb,d=(b&a.vb)>>a.Ib;a.A-=a.Ei;return c!=a.eb?a.ya[d].An(c):a.ya[d++].uc(c)|a.ya[d&a.Pd].uc(0)<<8}function Ec(a,b,c){a.ya[(b&a.vb)>>a.Ib].wc(b&a.eb,c&255)}function Fc(a,b,c){var d=b&a.eb;b=(b&a.vb)>>a.Ib;a.A-=a.Ei;d!=a.eb?a.ya[b].Kn(d,c&65535):(a.ya[b++].wc(d,c&255),a.ya[b&a.Pd].wc(0,c>>8&255))}g.ml=function(a,b){this.Ff=a;this.da=a.Ic(this.yf=b,0);return this.Y&1?0:Dc(this,this.da)};g.nl=function(a,b){this.Ff=a;this.da=a.Ic(this.yf=b,1);return this.Y&1?0:F(this,this.da)}; +g.ub=function(a,b,c,d){var e=!1;switch(c){case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "CS":case "DS":case "SS":case "ES":case "IP":case "PC":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "O":this.oa[c]=d;e=!0;break;default:e=Ya.prototype.ub.call(this,a,b,c,d)}return e};function Dc(a,b){return a.ya[(b&a.wb)>>a.Ib].vc(b&a.eb)} +function F(a,b){var c=b&a.eb,d=(b&a.wb)>>a.Ib;a.A-=a.Ei;return c!=a.eb?a.ya[d].An(c):a.ya[d++].vc(c)|a.ya[d&a.Pd].vc(0)<<8}function Ec(a,b,c){a.ya[(b&a.wb)>>a.Ib].xc(b&a.eb,c&255)}function Fc(a,b,c){var d=b&a.eb;b=(b&a.wb)>>a.Ib;a.A-=a.Ei;d!=a.eb?a.ya[b].Kn(d,c&65535):(a.ya[b++].xc(d,c&255),a.ya[b&a.Pd].xc(0,c>>8&255))}g.ml=function(a,b){this.Ff=a;this.da=a.Ic(this.yf=b,0);return this.Y&1?0:Dc(this,this.da)};g.nl=function(a,b){this.Ff=a;this.da=a.Ic(this.yf=b,1);return this.Y&1?0:F(this,this.da)}; g.om=function(a,b){this.Ff=a;this.Ba=this.da=a.Ic(this.yf=b,0);return this.Y&1?0:Dc(this,this.da)};g.pm=function(a,b){this.Ff=a;this.Ba=this.da=a.Ic(this.yf=b,1);return this.Y&1?0:F(this,this.da)};g.Hn=function(a){this.Y&2||Ec(this,this.Ff.Nb(this.yf,1),a)};g.In=function(a){this.Y&2||Fc(this,this.Ff.Nb(this.yf,2),a)};g.aa=function(){var a=Dc(this,this.Da);this.Da=this.Ia.gb+(this.qa=this.qa+1&65535);return a}; -g.L=function(){var a=Dc(this,this.Da)<<24>>24;this.Da=this.Ia.gb+(this.qa=this.qa+1&65535);return a&65535};g.K=function(){var a=F(this,this.Da);this.Da=this.Ia.gb+(this.qa=this.qa+2&65535);return a};g.Aa=function(){var a=this.X;this.X=this.X+2&65535;return F(this,this.Tb.Ic(a,1))};function K(a,b){var c=a.X=a.X-2&65535;Fc(a,a.Tb.Nb(c,1),b)} -g.cf=function(){E(this,"AX",this.G);E(this,"BX",this.B);E(this,"CX",this.I);E(this,"DX",this.J);E(this,"SP",this.X);E(this,"BP",this.H);E(this,"SI",this.F);E(this,"DI",this.D);E(this,"CS",this.Ia.ua);E(this,"DS",this.ac.ua);E(this,"SS",this.Tb.ua);E(this,"ES",this.ib.ua);E(this,"IP",this.qa);var a=ac(this);E(this,"PS",a);E(this,"C",a&1?1:0,1);E(this,"P",a&4?1:0,1);E(this,"A",a&16?1:0,1);E(this,"Z",a&64?1:0,1);E(this,"S",a&128?1:0,1);E(this,"T",a&256?1:0,1);E(this,"I",a&512?1:0,1);E(this,"D",a&1024? -1:0,1);E(this,"O",a&2048?1:0,1);this.oa.speed&&(this.oa.speed.innerHTML=this.qc&&this.Kc?this.Kc.toFixed(2)+"Mhz":"Stopped")}; -g.Uk=function(a){this.hg=!0;this.Lc=this.A=a;this.ga&&lb(this.ga);a||!this.Na||this.Na.ro(this.Na.Un)||(this.Y|=4);do{if(a=this.Y&240)this.pa|=a;else if(this.Dg=this.Da,this.da=this.Ba=-1,this.C=this.ac,this.M=this.Tb,this.pa=this.Y&256,this.Ya){a:{if(!(this.Y&4))if(this.Ya&1&&this.Ha&512){if(a=Gc(this.ga),-1<=a&&(this.Ya&=-2,0<=a)){this.Ya&=-5;Hc.call(this,a,null,11);break a}}else if(this.Ya&2){this.Ya&=-3;Hc.call(this,1,null,11);break a}if(a=this.Ya&8){a=this.ga;for(var b=!1,c=0;cthis.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=a+b)&255} -function Kc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a|b)&255}function Lc(a,b){this.ha=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return this.W&255}function Mc(a,b){this.ha=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return this.W&255} -function Nc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a&b)&255}function Oc(a,b){this.ha=a^b;this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=a-b)&255}function Pc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a^b)&255}function Qc(a,b){this.ha=a^b;this.$=256;this.W=this.fa=a-b;this.A-=0>this.Ba?0>this.da?this.Bb:this.Xh:this.fb;this.Y|=2;return a} -function Rc(a,b){this.ha=a^b;this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=a+b)&65535}function Sc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a|b)&65535}function Tc(a,b){this.ha=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return this.W&65535} -function Uc(a,b){this.ha=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return this.W&65535}function Vc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a&b)&65535}function Wc(a,b){this.ha=a^b;this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=a-b)&65535} -function Xc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Pb;return(this.W=this.fa=this.ha=a^b)&65535}function Yc(a,b){this.ha=a^b;this.$=65536;this.W=this.fa=a-b;this.A-=0>this.Ba?0>this.da?this.Bb:this.Xh:this.fb;this.Y|=2;return a}function Zc(a,b){this.W=this.W&this.$-1|(a&b?this.$:0);(a^a>>1)&b>>1?Cc(this):xc(this)}function $c(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<>8-e)&255:d=a<<8;Zc.call(this,d,256)}return c} +g.L=function(){var a=Dc(this,this.Da)<<24>>24;this.Da=this.Ia.gb+(this.qa=this.qa+1&65535);return a&65535};g.K=function(){var a=F(this,this.Da);this.Da=this.Ia.gb+(this.qa=this.qa+2&65535);return a};g.Aa=function(){var a=this.X;this.X=this.X+2&65535;return F(this,this.Ub.Ic(a,1))};function K(a,b){var c=a.X=a.X-2&65535;Fc(a,a.Ub.Nb(c,1),b)} +g.cf=function(){E(this,"AX",this.G);E(this,"BX",this.B);E(this,"CX",this.I);E(this,"DX",this.J);E(this,"SP",this.X);E(this,"BP",this.H);E(this,"SI",this.F);E(this,"DI",this.D);E(this,"CS",this.Ia.ua);E(this,"DS",this.cc.ua);E(this,"SS",this.Ub.ua);E(this,"ES",this.ib.ua);E(this,"IP",this.qa);var a=ac(this);E(this,"PS",a);E(this,"C",a&1?1:0,1);E(this,"P",a&4?1:0,1);E(this,"A",a&16?1:0,1);E(this,"Z",a&64?1:0,1);E(this,"S",a&128?1:0,1);E(this,"T",a&256?1:0,1);E(this,"I",a&512?1:0,1);E(this,"D",a&1024? +1:0,1);E(this,"O",a&2048?1:0,1);this.oa.speed&&(this.oa.speed.innerHTML=this.rc&&this.Kc?this.Kc.toFixed(2)+"Mhz":"Stopped")}; +g.Tk=function(a){this.hg=!0;this.Lc=this.A=a;this.ga&&lb(this.ga);a||!this.Na||this.Na.ro(this.Na.Un)||(this.Y|=4);do{if(a=this.Y&240)this.pa|=a;else if(this.Cg=this.Da,this.da=this.Ba=-1,this.C=this.cc,this.M=this.Ub,this.pa=this.Y&256,this.Ya){a:{if(!(this.Y&4))if(this.Ya&1&&this.Ha&512){if(a=Gc(this.ga),-1<=a&&(this.Ya&=-2,0<=a)){this.Ya&=-5;Hc.call(this,a,null,11);break a}}else if(this.Ya&2){this.Ya&=-3;Hc.call(this,1,null,11);break a}if(a=this.Ya&8){a=this.ga;for(var b=!1,c=0;cthis.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=a+b)&255} +function Kc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a|b)&255}function Lc(a,b){this.ha=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return this.W&255}function Mc(a,b){this.ha=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return this.W&255} +function Nc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a&b)&255}function Oc(a,b){this.ha=a^b;this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=a-b)&255}function Pc(a,b){this.$=256;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a^b)&255}function Qc(a,b){this.ha=a^b;this.$=256;this.W=this.fa=a-b;this.A-=0>this.Ba?0>this.da?this.Bb:this.Xh:this.fb;this.Y|=2;return a} +function Rc(a,b){this.ha=a^b;this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=a+b)&65535}function Sc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a|b)&65535}function Tc(a,b){this.ha=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return this.W&65535} +function Uc(a,b){this.ha=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return this.W&65535}function Vc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a&b)&65535}function Wc(a,b){this.ha=a^b;this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=a-b)&65535} +function Xc(a,b){this.$=65536;this.A-=0>this.Ba?0>this.da?this.Bb:this.fb:this.Qb;return(this.W=this.fa=this.ha=a^b)&65535}function Yc(a,b){this.ha=a^b;this.$=65536;this.W=this.fa=a-b;this.A-=0>this.Ba?0>this.da?this.Bb:this.Xh:this.fb;this.Y|=2;return a}function Zc(a,b){this.W=this.W&this.$-1|(a&b?this.$:0);(a^a>>1)&b>>1?Cc(this):xc(this)}function $c(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<>8-e)&255:d=a<<8;Zc.call(this,d,256)}return c} function ad(a,b){var c=a;if(b){var d,e=b&15;e?c=(d=a<>16-e)&65535:d=a<<16;Zc.call(this,d,65536)}return c}function bd(a,b){var c=a;if(b){var d,c=b&7,c=d=(a>>c|a<<8-c)&255;d&128&&(d|=256);Zc.call(this,d,256)}return c}function cd(a,b){var c=a;if(b){var d,c=b&15,c=d=(a>>c|a<<16-c)&65535;d&32768&&(d|=65536);Zc.call(this,d,65536)}return c}function dd(a,b){var c=a;if(b){var d;(d=(b&this.ze)%9)?(d=a<>9-d,c=d&255):d=a|(this.W&this.$?1:0)<<8;Zc.call(this,d,256)}return c} function ed(a,b){var c=a;if(b){var d;(d=(b&this.ze)%17)?(d=a<>17-d,c=d&65535):d=a|(this.W&this.$?1:0)<<16;Zc.call(this,d,65536)}return c}function fd(a,b){var c=a;b&&(c=(b&this.ze)%9,c=a>>c|(this.W&this.$?1:0)<<8-c|a<<9-c,Zc.call(this,c,256),c&=255);return c}function gd(a,b){var c=a;b&&(c=(b&this.ze)%17,c=a>>c|(this.W&this.$?1:0)<<16-c|a<<17-c,Zc.call(this,c,65536),c&=65535);return c} function hd(a,b){var c=a;b&&(c=8>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ha=a^this.W;this.$=256;a=this.W}return a&255} function nd(a,b){if(b){var c=16>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ha=a^this.W;this.$=65536;a=this.W}return a&65535}function od(a,b){if(b){8>24>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ha=a^this.W;this.$=256;a=this.W}return a&255}function pd(a,b){if(b){16>16>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ha=a^this.W;this.$=65536;a=this.W}return a&65535} -function qd(){this.A-=0>this.da?2:this.Dk;return 1}function rd(){var a=this.I&this.ze;this.A-=(0>this.da?this.si:this.ri)+(a<this.da?this.si:this.ri)+(a<this.Ba?this.Qb:this.wk;return b},ud,ud,ud,ud,ud,ud,ud],yd=[function(a,b){this.A-=0>this.Ba?this.ok:this.mk;return b},L,L,L,L,L,L,L],zd=[$c,bd,dd,fd,hd,md,L,od],Ad=[ad,cd,ed,gd,id,nd,L,pd],Cd=[function(a,b){b=this.aa();this.W=this.fa=this.ha=a&b;this.$=256;this.A-=0>this.da?this.yi:this.xi;this.Y|=2;return a},L,function(a){this.A-=0>this.da?this.vf:this.uf;return a^255},function(a,b){b=0;this.ha=a^b;this.$=256; -this.A-=0>this.da?this.vf:this.uf;return(this.W=this.fa=b-a)&255},function(a){this.G=this.nb=(this.W=(this.G&255)*a)&65535;this.ha=this.fa=this.W;this.$=256;this.G&65280?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.sk:this.rk;this.Y|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.nb=b&65535;this.W=this.ha=this.fa=b;this.$=256;127b?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.Yj:this.Xj;this.Y|=2;return a},function(a){if(!a)return Bd.call(this), -a;var b=this.G/a;if(255this.da?this.Qj:this.Pj;this.Y|=2;return a},function(a){if(!a)return Bd.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return Bd.call(this),a;this.nb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.fa=this.ha=this.W=b|256;this.$=256;this.A-=0>this.da?this.Uj:this.Tj;this.Y|=2;return a}],Dd=[function(a,b){b=this.K();this.W=this.fa=this.ha= -a&b;this.$=65536;this.A-=0>this.da?this.yi:this.xi;this.Y|=2;return a},L,function(a){this.A-=0>this.da?this.vf:this.uf;return a^65535},function(a,b){b=0;this.ha=a^b;this.$=65536;this.A-=0>this.da?this.vf:this.uf;return(this.W=this.fa=b-a)&65535},function(a){this.nb=this.G=(this.W=this.G*a)&65535;this.Bf=this.J=this.W>>16&65535;this.ha=this.fa=this.W;this.$=65536;this.J?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.uk:this.tk;this.Y|=2;return a},function(a){var b=(this.G<<16>>16)* -(a<<16>>16);this.G=this.nb=b&65535;this.J=this.Bf=b>>16&65535;this.W=this.ha=this.fa=b;this.$=65536;32767b?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.$j:this.Zj;this.Y|=2;return a},function(a,b){if(!a)return Bd.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return Bd.call(this),a;this.nb=this.G=c&65535;this.Bf=this.J=b%a&65535;this.fa=this.ha=this.W=c|65536;this.$=65536;this.A-=0>this.da?this.Sj:this.Rj;this.Y|=2;return a},function(a,b){if(!a)return Bd.call(this), -a;var c=a<<16>>16;b=this.J<<16|this.G;var d=Math.floor(b/c);if(d!=(d&65535)<<16>>16)return Bd.call(this),a;this.nb=this.G=d&65535;this.Bf=this.J=b%c&65535;this.fa=this.ha=this.W=d|65536;this.$=65536;this.A-=0>this.da?this.Wj:this.Vj;this.Y|=2;return a}],Rb=[function(a){this.ha=a;a=(this.fa=a+1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.tf:this.sf;return a},function(a){this.ha=a;a=(this.fa=a-1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.tf:this.sf; -return a},L,L,L,L,L,L],Tb=[function(a){this.ha=a;a=(this.fa=a+1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.tf:this.sf;return a},function(a){this.ha=a;a=(this.fa=a-1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.tf:this.sf;return a},function(a){K(this,this.qa);I(this,a);this.A-=0>this.da?this.Oj:this.Nj;this.Y|=2;return a},function(a){if(0>this.da)return L.call(this,a);K(this,this.Ia.ua);K(this,this.qa);Yb(this,a,F(this,this.da+2));this.A-= -this.Lj;this.Y|=2;return a},function(a){I(this,a);this.A-=0>this.da?this.ik:this.hk;this.Y|=2;return a},function(a){if(0>this.da)return L.call(this,a);Yb(this,a,F(this,this.da+2));this.A-=this.fk;this.Y|=2;return a},function(a){var b=a;this.Y&512&&(a=a-2&65535,80286>this.Ca&&(b=a));K(this,b);this.A-=0>this.da?this.Zb:this.yk;this.Y|=2;return a},ud],Ed=[$c,bd,dd,fd,hd,md,L,od],Fd=[ad,cd,ed,gd,id,nd,L,pd];function Gd(a,b){this.A-=0>this.Ba?0>this.da?this.qk:this.pk:this.nk;return b} +function qd(){this.A-=0>this.da?2:this.Ck;return 1}function rd(){var a=this.I&this.ze;this.A-=(0>this.da?this.si:this.ri)+(a<this.da?this.si:this.ri)+(a<this.Ba?this.Rb:this.vk;return b},ud,ud,ud,ud,ud,ud,ud],yd=[function(a,b){this.A-=0>this.Ba?this.nk:this.lk;return b},L,L,L,L,L,L,L],zd=[$c,bd,dd,fd,hd,md,L,od],Ad=[ad,cd,ed,gd,id,nd,L,pd],Cd=[function(a,b){b=this.aa();this.W=this.fa=this.ha=a&b;this.$=256;this.A-=0>this.da?this.yi:this.xi;this.Y|=2;return a},L,function(a){this.A-=0>this.da?this.vf:this.uf;return a^255},function(a,b){b=0;this.ha=a^b;this.$=256; +this.A-=0>this.da?this.vf:this.uf;return(this.W=this.fa=b-a)&255},function(a){this.G=this.nb=(this.W=(this.G&255)*a)&65535;this.ha=this.fa=this.W;this.$=256;this.G&65280?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.rk:this.qk;this.Y|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.nb=b&65535;this.W=this.ha=this.fa=b;this.$=256;127b?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.Xj:this.Wj;this.Y|=2;return a},function(a){if(!a)return Bd.call(this), +a;var b=this.G/a;if(255this.da?this.Pj:this.Oj;this.Y|=2;return a},function(a){if(!a)return Bd.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return Bd.call(this),a;this.nb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.fa=this.ha=this.W=b|256;this.$=256;this.A-=0>this.da?this.Tj:this.Sj;this.Y|=2;return a}],Dd=[function(a,b){b=this.K();this.W=this.fa=this.ha= +a&b;this.$=65536;this.A-=0>this.da?this.yi:this.xi;this.Y|=2;return a},L,function(a){this.A-=0>this.da?this.vf:this.uf;return a^65535},function(a,b){b=0;this.ha=a^b;this.$=65536;this.A-=0>this.da?this.vf:this.uf;return(this.W=this.fa=b-a)&65535},function(a){this.nb=this.G=(this.W=this.G*a)&65535;this.Bf=this.J=this.W>>16&65535;this.ha=this.fa=this.W;this.$=65536;this.J?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.tk:this.sk;this.Y|=2;return a},function(a){var b=(this.G<<16>>16)* +(a<<16>>16);this.G=this.nb=b&65535;this.J=this.Bf=b>>16&65535;this.W=this.ha=this.fa=b;this.$=65536;32767b?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?this.Zj:this.Yj;this.Y|=2;return a},function(a,b){if(!a)return Bd.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return Bd.call(this),a;this.nb=this.G=c&65535;this.Bf=this.J=b%a&65535;this.fa=this.ha=this.W=c|65536;this.$=65536;this.A-=0>this.da?this.Rj:this.Qj;this.Y|=2;return a},function(a,b){if(!a)return Bd.call(this), +a;var c=a<<16>>16;b=this.J<<16|this.G;var d=Math.floor(b/c);if(d!=(d&65535)<<16>>16)return Bd.call(this),a;this.nb=this.G=d&65535;this.Bf=this.J=b%c&65535;this.fa=this.ha=this.W=d|65536;this.$=65536;this.A-=0>this.da?this.Vj:this.Uj;this.Y|=2;return a}],Rb=[function(a){this.ha=a;a=(this.fa=a+1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.tf:this.sf;return a},function(a){this.ha=a;a=(this.fa=a-1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.tf:this.sf; +return a},L,L,L,L,L,L],Tb=[function(a){this.ha=a;a=(this.fa=a+1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.tf:this.sf;return a},function(a){this.ha=a;a=(this.fa=a-1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.tf:this.sf;return a},function(a){K(this,this.qa);I(this,a);this.A-=0>this.da?this.Nj:this.Mj;this.Y|=2;return a},function(a){if(0>this.da)return L.call(this,a);K(this,this.Ia.ua);K(this,this.qa);Yb(this,a,F(this,this.da+2));this.A-= +this.Kj;this.Y|=2;return a},function(a){I(this,a);this.A-=0>this.da?this.hk:this.gk;this.Y|=2;return a},function(a){if(0>this.da)return L.call(this,a);Yb(this,a,F(this,this.da+2));this.A-=this.ek;this.Y|=2;return a},function(a){var b=a;this.Y&512&&(a=a-2&65535,80286>this.Ca&&(b=a));K(this,b);this.A-=0>this.da?this.$b:this.xk;this.Y|=2;return a},ud],Ed=[$c,bd,dd,fd,hd,md,L,od],Fd=[ad,cd,ed,gd,id,nd,L,pd];function Gd(a,b){this.A-=0>this.Ba?0>this.da?this.pk:this.ok:this.mk;return b} function Hd(){return Gd.call(this,0,this.nb)}function Id(a,b){this.W=this.fa=this.ha=a&b;this.$=256;this.A-=0>this.Ba?0>this.da?this.zi:this.xf:this.xf;this.Y|=2;return a}function Jd(a,b){this.W=this.fa=this.ha=a&b;this.$=65536;this.A-=0>this.Ba?0>this.da?this.zi:this.xf:this.xf;this.Y|=2;return a}function Kd(a,b){var c=(b<<16>>16)*(this.aa()<<24>>24);this.W=this.ha=this.fa=c;this.$=256;32767c?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?21:24;return c&65535} -function Ld(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.W=this.ha=this.fa=c;this.$=65536;32767c?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?21:24;return c&65535}function Md(a){return a}function Nd(a){if(0>this.da)return N.call(this),a;this.A-=this.jk;return this.da}function Od(a,b){if(0>this.da)return N.call(this),a;ic(this,F(this,this.da+2));this.A-=this.ai;return b} -function Pd(a,b){if(0>this.da)return N.call(this),a;kc(this,F(this,this.da+2));this.A-=this.ai;return b}function Qd(a){if(0>this.da)return G.call(this),a;var b=a<<16>>16,c=F(this,this.da)<<16>>16,d=F(this,this.da+2)<<16>>16;this.A-=this.Hj;if(bd)I(this,this.Dg-this.Ia.gb),Hc.call(this,5,null,0);this.Y|=2;return a}function Rd(a,b){this.A-=10+(0>this.da?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Ac(this),a;wc(this);return a} -function Sd(a,b){this.A-=14+(0>this.da?0:2);if(0<=this.sb.load(b,!0)&&this.sb.tc>=(this.Ia.ua&3)&&this.sb.tc>=(b&3))return Ac(this),this.sb.kc&65280;wc(this);return a}function Td(a,b){this.A-=14+(0>this.da?0:2);if(b&65528&&0<=this.sb.load(b,!0)&&(3072==(this.sb.kc&3072)||this.sb.tc>=(this.Ia.ua&3))&&this.sb.tc>=(b&3))return Ac(this),this.sb.ad;wc(this);return a} +function Ld(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.W=this.ha=this.fa=c;this.$=65536;32767c?(yc(this),Cc(this)):(uc(this),xc(this));this.A-=0>this.da?21:24;return c&65535}function Md(a){return a}function Nd(a){if(0>this.da)return N.call(this),a;this.A-=this.ik;return this.da}function Od(a,b){if(0>this.da)return N.call(this),a;ic(this,F(this,this.da+2));this.A-=this.ai;return b} +function Pd(a,b){if(0>this.da)return N.call(this),a;kc(this,F(this,this.da+2));this.A-=this.ai;return b}function Qd(a){if(0>this.da)return G.call(this),a;var b=a<<16>>16,c=F(this,this.da)<<16>>16,d=F(this,this.da+2)<<16>>16;this.A-=this.Gj;if(bd)I(this,this.Cg-this.Ia.gb),Hc.call(this,5,null,0);this.Y|=2;return a}function Rd(a,b){this.A-=10+(0>this.da?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Ac(this),a;wc(this);return a} +function Sd(a,b){this.A-=14+(0>this.da?0:2);if(0<=this.tb.load(b,!0)&&this.tb.uc>=(this.Ia.ua&3)&&this.tb.uc>=(b&3))return Ac(this),this.tb.lc&65280;wc(this);return a}function Td(a,b){this.A-=14+(0>this.da?0:2);if(b&65528&&0<=this.tb.load(b,!0)&&(3072==(this.tb.lc&3072)||this.tb.uc>=(this.Ia.ua&3))&&this.tb.uc>=(b&3))return Ac(this),this.tb.ad;wc(this);return a} function Ud(a,b){if(0>this.da){switch(this.Vf&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.J=this.J&-256|a;break;case 3:this.B=this.B&-256|a;break;case 4:this.G=this.G&255|a<<8;break;case 5:this.I=this.I&255|a<<8;break;case 6:this.J=this.J&255|a<<8;break;case 7:this.B=this.B&255|a<<8}this.A-=this.Bi}else this.Ba=this.da,this.Q(a),this.A-=this.Ai;return b} -function Vd(a,b){if(0>this.da){switch(this.Vf&7){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.J=a;break;case 3:this.B=a;break;case 4:this.X=a;break;case 5:this.H=a;break;case 6:this.F=a;break;case 7:this.D=a}this.A-=this.Bi}else this.Ba=this.da,this.R(a),this.A-=this.Ai;return b}function Hc(a,b,c){gc(this,a)&&(K(this,ac(this)),this.Ha&=this.pc.qg,K(this,this.Ia.ua),K(this,this.qa),null!=b&&K(this,b),Yb(this,this.pc.Fi,this.pc.ua),this.A-=this.bk+c)} -function Bd(){I(this,this.Dg-this.Ia.gb);Hc.call(this,0,null,2)}function yb(a,b){80186<=this.Ca&&(I(this,this.Dg-this.Ia.gb),Hc.call(this,a,b,0))}function G(){yb.call(this,6);db(this)}function N(){I(this,this.Dg-this.Ia.gb);var a=Na(this.ma,this.Da),b=this.qa,c=this.Ia.ua;Ea(this,"Undefined opcode 0x"+p(a,2)+" at "+(void 0!==c?p(c,4)+":"+p(b,4):p(b)));db(this)}function Wd(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a} +function Vd(a,b){if(0>this.da){switch(this.Vf&7){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.J=a;break;case 3:this.B=a;break;case 4:this.X=a;break;case 5:this.H=a;break;case 6:this.F=a;break;case 7:this.D=a}this.A-=this.Bi}else this.Ba=this.da,this.R(a),this.A-=this.Ai;return b}function Hc(a,b,c){gc(this,a)&&(K(this,ac(this)),this.Ha&=this.qc.qg,K(this,this.Ia.ua),K(this,this.qa),null!=b&&K(this,b),Yb(this,this.qc.Fi,this.qc.ua),this.A-=this.ak+c)} +function Bd(){I(this,this.Cg-this.Ia.gb);Hc.call(this,0,null,2)}function yb(a,b){80186<=this.Ca&&(I(this,this.Cg-this.Ia.gb),Hc.call(this,a,b,0))}function G(){yb.call(this,6);db(this)}function N(){I(this,this.Cg-this.Ia.gb);var a=Na(this.ma,this.Da),b=this.qa,c=this.Ia.ua;Ea(this,"Undefined opcode 0x"+p(a,2)+" at "+(void 0!==c?p(c,4)+":"+p(b,4):p(b)));db(this)}function Wd(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a} function Xd(a){a=a.call(this,this.G&255,this.I&255);this.G=this.G&-256|a}function Yd(a){a=a.call(this,this.G&255,this.J&255);this.G=this.G&-256|a}function Zd(a){a=a.call(this,this.G&255,this.B&255);this.G=this.G&-256|a}function $d(a){a=a.call(this,this.G&255,this.G>>8);this.G=this.G&-256|a}function ae(a){a=a.call(this,this.G&255,this.I>>8);this.G=this.G&-256|a}function be(a){a=a.call(this,this.G&255,this.J>>8);this.G=this.G&-256|a} function ce(a){a=a.call(this,this.G&255,this.B>>8);this.G=this.G&-256|a}function de(a){a=a.call(this,this.I&255,this.G&255);this.I=this.I&-256|a}function ee(a){a=a.call(this,this.I&255,this.I&255);this.I=this.I&-256|a}function fe(a){a=a.call(this,this.I&255,this.J&255);this.I=this.I&-256|a}function ge(a){a=a.call(this,this.I&255,this.B&255);this.I=this.I&-256|a}function he(a){a=a.call(this,this.I&255,this.G>>8);this.I=this.I&-256|a} function ie(a){a=a.call(this,this.I&255,this.I>>8);this.I=this.I&-256|a}function je(a){a=a.call(this,this.I&255,this.J>>8);this.I=this.I&-256|a}function ke(a){a=a.call(this,this.I&255,this.B>>8);this.I=this.I&-256|a}function le(a){a=a.call(this,this.J&255,this.G&255);this.J=this.J&-256|a}function me(a){a=a.call(this,this.J&255,this.I&255);this.J=this.J&-256|a}function ne(a){a=a.call(this,this.J&255,this.J&255);this.J=this.J&-256|a} @@ -359,39 +359,39 @@ function(a,b){this.X=a[4].call(this,this.X,b.call(this))},function(a,b){this.H=a b.call(this))},function(a,b){this.H=a[5].call(this,this.H,b.call(this))},function(a,b){this.F=a[5].call(this,this.F,b.call(this))},function(a,b){this.D=a[5].call(this,this.D,b.call(this))},function(a,b){this.G=a[6].call(this,this.G,b.call(this))},function(a,b){this.I=a[6].call(this,this.I,b.call(this))},function(a,b){this.J=a[6].call(this,this.J,b.call(this))},function(a,b){this.B=a[6].call(this,this.B,b.call(this))},function(a,b){this.Y|=512;this.X=a[6].call(this,this.X,b.call(this))},function(a, b){this.H=a[6].call(this,this.H,b.call(this))},function(a,b){this.F=a[6].call(this,this.F,b.call(this))},function(a,b){this.D=a[6].call(this,this.D,b.call(this))},function(a,b){this.G=a[7].call(this,this.G,b.call(this))},function(a,b){this.I=a[7].call(this,this.I,b.call(this))},function(a,b){this.J=a[7].call(this,this.J,b.call(this))},function(a,b){this.B=a[7].call(this,this.B,b.call(this))},function(a,b){this.X=a[7].call(this,this.X,b.call(this))},function(a,b){this.H=a[7].call(this,this.H,b.call(this))}, function(a,b){this.F=a[7].call(this,this.F,b.call(this))},function(a,b){this.D=a[7].call(this,this.D,b.call(this))}],xg=[function(){var a=this.aa();16>(a&56)&&(this.Y|=1);vg[a].call(this,cc,td)},function(){var a=this.aa();a&16||(this.Y|=1);vg[a].call(this,wg,td)},function(){P[this.aa()].call(this,Sd)},function(){P[this.aa()].call(this,Td)},N,N,N,N,N,N,N,G,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N, -N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N],dc=[function(){this.A-=2+(0>this.da?0:1);return this.De.ua},function(){this.A-=2+(0>this.da?0:1);return this.Mg.ua},function(a){this.Y|=2;this.De.load(a);this.A-= -17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.Mg.load(a);this.A-=17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.sb.load(a,!0)&&2048!=(this.sb.kc&2560)&&(3072==(this.sb.kc&3072)||this.sb.tc>=(this.Ia.ua&3)&&this.sb.tc>=(a&3)))return Ac(this),a;wc(this);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.sb.load(a,!0)&&512==(this.sb.kc&2560)&&this.sb.tc>=(this.Ia.ua&3)&&this.sb.tc>=(a&3))return Ac(this),a;wc(this);return a},L,L], +N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N],dc=[function(){this.A-=2+(0>this.da?0:1);return this.De.ua},function(){this.A-=2+(0>this.da?0:1);return this.Lg.ua},function(a){this.Y|=2;this.De.load(a);this.A-= +17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.Lg.load(a);this.A-=17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.tb.load(a,!0)&&2048!=(this.tb.lc&2560)&&(3072==(this.tb.lc&3072)||this.tb.uc>=(this.Ia.ua&3)&&this.tb.uc>=(a&3)))return Ac(this),a;wc(this);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.tb.load(a,!0)&&512==(this.tb.lc&2560)&&this.tb.uc>=(this.Ia.ua&3)&&this.tb.uc>=(a&3))return Ac(this),a;wc(this);return a},L,L], ec=[Sb,Sb,Sb,Sb,Sb,Sb,L,L],cc=ec,wg=[function(a){0>this.da?G.call(this):(Fc(this,this.da+2,this.Rc),Ec(this,this.da+4,this.Rc>>16),a=this.Ne-this.Rc,this.A-=11);return a},function(a){0>this.da?G.call(this):(Fc(this,this.da+2,this.Sc),Ec(this,this.da+4,this.Sc>>16),a=this.me-this.Sc,this.A-=12);return a},function(a){0>this.da?G.call(this):(this.Rc=F(this,this.da+2)|Dc(this,this.da+4)<<16,this.Ne=this.Rc+a,this.Y|=2,this.A-=11);return a},function(a){0>this.da?G.call(this):(this.Sc=F(this,this.da+2)| -Dc(this,this.da+4)<<16,this.me=this.Sc+a,this.Y|=2,this.A-=12);return a},function(){this.A-=2+(0>this.da?0:1);return this.ed},L,function(a){this.ed=this.ed&65520|a&-65521;this.A-=3+(0>this.da?0:3);this.ed&1&&$b(this,!0);this.Y|=2;return a},L];function Ub(){xg[this.aa()].call(this)}function Wb(){K(this,this.X);this.A-=this.Zb}function Bb(){var a=this.X;K(this,this.G);K(this,this.I);K(this,this.J);K(this,this.B);K(this,a);K(this,this.H);K(this,this.F);K(this,this.D);this.A-=this.xk} -function Cb(){this.D=this.Aa();this.F=this.Aa();this.H=this.Aa();this.X+=2;this.B=this.Aa();this.J=this.Aa();this.I=this.Aa();this.G=this.Aa();this.A-=this.vk}function Db(){P[this.aa()].call(this,Qd)}function Vb(){O[this.aa()].call(this,Rd)}function Eb(){K(this,this.K());this.A-=this.Zb}function Fb(){P[this.aa()].call(this,Ld)}function Gb(){K(this,this.aa());this.A-=this.Zb}function Hb(){P[this.aa()].call(this,Kd)} +Dc(this,this.da+4)<<16,this.me=this.Sc+a,this.Y|=2,this.A-=12);return a},function(){this.A-=2+(0>this.da?0:1);return this.ed},L,function(a){this.ed=this.ed&65520|a&-65521;this.A-=3+(0>this.da?0:3);this.ed&1&&$b(this,!0);this.Y|=2;return a},L];function Ub(){xg[this.aa()].call(this)}function Wb(){K(this,this.X);this.A-=this.$b}function Bb(){var a=this.X;K(this,this.G);K(this,this.I);K(this,this.J);K(this,this.B);K(this,a);K(this,this.H);K(this,this.F);K(this,this.D);this.A-=this.wk} +function Cb(){this.D=this.Aa();this.F=this.Aa();this.H=this.Aa();this.X+=2;this.B=this.Aa();this.J=this.Aa();this.I=this.Aa();this.G=this.Aa();this.A-=this.uk}function Db(){P[this.aa()].call(this,Qd)}function Vb(){O[this.aa()].call(this,Rd)}function Eb(){K(this,this.K());this.A-=this.$b}function Fb(){P[this.aa()].call(this,Ld)}function Gb(){K(this,this.aa());this.A-=this.$b}function Hb(){P[this.aa()].call(this,Kd)} function Ib(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Ua(this.ma,this.J,this.Da-b-1);Ec(this,this.ib.Nb(this.D,0),d);this.D=this.D+(this.Ha&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.Y|=256)}} function Jb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=this.Da-b-1,d=Ua(this.ma,this.J,d)|Ua(this.ma,this.J,d)<<8;Fc(this,this.ib.Nb(this.D,1),d);this.D=this.D+(this.Ha&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(J(this,-2),this.Y|=256)}} -function Kb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Dc(this,this.ac.Ic(this.F,0));this.F=this.F+(this.Ha&1024?-1:1)&65535;this.A-=c;this.I-=b;Wa(this.ma,this.J,d,this.Da-b-1);a&&(J(this,-2),this.Y|=256)}} -function Lb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=F(this,this.ac.Ic(this.F,1));this.F=this.F+(this.Ha&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Da-b-1;Wa(this.ma,this.J,d&255,b);Wa(this.ma,this.J,d>>8,b);a&&(J(this,-2),this.Y|=256)}}function yg(){var a=this.L();tc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function zg(){var a=this.L();tc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)} +function Kb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Dc(this,this.cc.Ic(this.F,0));this.F=this.F+(this.Ha&1024?-1:1)&65535;this.A-=c;this.I-=b;Wa(this.ma,this.J,d,this.Da-b-1);a&&(J(this,-2),this.Y|=256)}} +function Lb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=F(this,this.cc.Ic(this.F,1));this.F=this.F+(this.Ha&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Da-b-1;Wa(this.ma,this.J,d&255,b);Wa(this.ma,this.J,d>>8,b);a&&(J(this,-2),this.Y|=256)}}function yg(){var a=this.L();tc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function zg(){var a=this.L();tc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)} function Ag(){var a=this.L();oc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Bg(){var a=this.L();oc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)}function Cg(){var a=this.L();rc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Dg(){var a=this.L();rc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)}function Eg(){var a=this.L();oc(this)||rc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db} function Fg(){var a=this.L();oc(this)||rc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)}function Gg(){var a=this.L();sc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Hg(){var a=this.L();sc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)}function Ig(){var a=this.L();pc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Jg(){var a=this.L();pc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)} function Kg(){var a=this.L();!sc(this)!=!tc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Lg(){var a=this.L();!sc(this)==!tc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Mg(){var a=this.L();rc(this)||!sc(this)!=!tc(this)?(I(this,this.qa+a),this.A-=this.Cb):this.A-=this.Db}function Ng(){var a=this.L();rc(this)||!sc(this)!=!tc(this)?this.A-=this.Db:(I(this,this.qa+a),this.A-=this.Cb)} -function Og(){ug[this.aa()].call(this,vd,this.aa);this.A-=0>this.Ba?1:this.Ag}function Mb(){ug[this.aa()].call(this,Ed,sd)}function Nb(){vg[this.aa()].call(this,Fd,sd)}function Pg(){var a=this.K();I(this,this.Aa());this.X=this.X+a&65535;this.A-=this.Ck}function Qg(){I(this,this.Aa());this.A-=this.zk} -function Ob(){var a=this.K(),b=this.aa()&31;this.A-=11;K(this,this.H);var c=this.X;if(0this.Ba?1:this.zg}function Mb(){ug[this.aa()].call(this,Ed,sd)}function Nb(){vg[this.aa()].call(this,Fd,sd)}function Pg(){var a=this.K();I(this,this.Aa());this.X=this.X+a&65535;this.A-=this.Bk}function Qg(){I(this,this.Aa());this.A-=this.yk} +function Ob(){var a=this.K(),b=this.aa()&31;this.A-=11;K(this,this.H);var c=this.X;if(0>8,c,d=qc(this);9<(a&15)||d?(a=a+6&15,b=b+1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.W=a);this.$=65536;c&&(this.W|=this.$);d?zc(this):vc(this);this.A-=this.$d},function(){sg[this.aa()].call(this,Qc)},function(){O[this.aa()].call(this,Yc)},function(){tg[this.aa()].call(this,Qc)},function(){P[this.aa()].call(this,Yc)},function(){this.G=this.G&-256|Qc.call(this,this.G&255,this.aa());this.A--},function(){this.G=Yc.call(this,this.G,this.K());this.A--},function(){this.Y|= -20;this.C=this.M=this.ac;this.A-=this.rb},function(){var a=this.G&255,b=this.G>>8,c,d=qc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.W=a);this.$=65536;c&&(this.W|=this.$);d?zc(this):vc(this);this.A-=this.$d},function(){this.ha=this.G;this.G=(this.fa=this.G+1)&65535;this.W=this.G|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.I;this.I=(this.fa=this.I+1)&65535;this.W=this.I|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.J; +20;this.C=this.M=this.cc;this.A-=this.sb},function(){var a=this.G&255,b=this.G>>8,c,d=qc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.W=a);this.$=65536;c&&(this.W|=this.$);d?zc(this):vc(this);this.A-=this.$d},function(){this.ha=this.G;this.G=(this.fa=this.G+1)&65535;this.W=this.G|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.I;this.I=(this.fa=this.I+1)&65535;this.W=this.I|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.J; this.J=(this.fa=this.J+1)&65535;this.W=this.J|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.B;this.B=(this.fa=this.B+1)&65535;this.W=this.B|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.X;this.X=(this.fa=this.X+1)&65535;this.W=this.X|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.H;this.H=(this.fa=this.H+1)&65535;this.W=this.H|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.F;this.F=(this.fa=this.F+ 1)&65535;this.W=this.F|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.D;this.D=(this.fa=this.D+1)&65535;this.W=this.D|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.G;this.G=(this.fa=this.G-1)&65535;this.W=this.G|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.I;this.I=(this.fa=this.I-1)&65535;this.W=this.I|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.J;this.J=(this.fa=this.J-1)&65535;this.W=this.J| (this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.B;this.B=(this.fa=this.B-1)&65535;this.W=this.B|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.X;this.X=(this.fa=this.X-1)&65535;this.W=this.X|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.H;this.H=(this.fa=this.H-1)&65535;this.W=this.H|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ha=this.F;this.F=(this.fa=this.F-1)&65535;this.W=this.F|(this.W&this.$?1:0)<< -16;this.$=65536;this.A-=2},function(){this.ha=this.D;this.D=(this.fa=this.D-1)&65535;this.W=this.D|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){K(this,this.G);this.A-=this.Zb},function(){K(this,this.I);this.A-=this.Zb},function(){K(this,this.J);this.A-=this.Zb},function(){K(this,this.B);this.A-=this.Zb},function(){K(this,this.X-2&65535);this.A-=this.Zb},function(){K(this,this.H);this.A-=this.Zb},function(){K(this,this.F);this.A-=this.Zb},function(){K(this,this.D);this.A-=this.Zb},function(){this.G= -this.Aa();this.A-=this.Qb},function(){this.I=this.Aa();this.A-=this.Qb},function(){this.J=this.Aa();this.A-=this.Qb},function(){this.B=this.Aa();this.A-=this.Qb},function(){this.X=this.Aa();this.A-=this.Qb},function(){this.H=this.Aa();this.A-=this.Qb},function(){this.F=this.Aa();this.A-=this.Qb},function(){this.D=this.Aa();this.A-=this.Qb},yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,function(){vg[this.aa()].call(this,wd,this.K);this.A-=0>this.Ba? -1:this.Ag},Og,function(){vg[this.aa()].call(this,wd,this.L);this.A-=0>this.Ba?1:this.Ag},function(){sg[this.aa()].call(this,Id)},function(){O[this.aa()].call(this,Jd)},function(){tg[this.Vf=this.aa()].call(this,Ud)},function(){P[this.Vf=this.aa()].call(this,Vd)},function(){this.Y|=1;sg[this.aa()].call(this,Gd)},function(){this.Y|=1;O[this.aa()].call(this,Gd)},function(){tg[this.aa()].call(this,Gd)},function(){P[this.aa()].call(this,Gd)},function(){var a=this.aa();switch((a&56)>>3){case 0:this.nb= -this.ib.ua;break;case 1:this.nb=this.Ia.ua;break;case 2:this.nb=this.Tb.ua;break;case 3:this.nb=this.ac.ua;break;default:N.call(this);return}this.Y|=1;O[a].call(this,Hd)},function(){this.Y|=1;this.C=this.M=this.Sk;P[this.aa()].call(this,Nd)},function(){var a,b=this.aa(),c=(b&56)>>3;switch(c){case 0:a=this.G;break;case 2:a=this.J;break;case 3:a=this.B;break;default:if(80286<=this.Ca){G.call(this);return}switch(c){case 1:a=this.I;break;case 4:a=this.X;break;case 5:a=this.H;break;case 6:a=this.F;break; +16;this.$=65536;this.A-=2},function(){this.ha=this.D;this.D=(this.fa=this.D-1)&65535;this.W=this.D|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){K(this,this.G);this.A-=this.$b},function(){K(this,this.I);this.A-=this.$b},function(){K(this,this.J);this.A-=this.$b},function(){K(this,this.B);this.A-=this.$b},function(){K(this,this.X-2&65535);this.A-=this.$b},function(){K(this,this.H);this.A-=this.$b},function(){K(this,this.F);this.A-=this.$b},function(){K(this,this.D);this.A-=this.$b},function(){this.G= +this.Aa();this.A-=this.Rb},function(){this.I=this.Aa();this.A-=this.Rb},function(){this.J=this.Aa();this.A-=this.Rb},function(){this.B=this.Aa();this.A-=this.Rb},function(){this.X=this.Aa();this.A-=this.Rb},function(){this.H=this.Aa();this.A-=this.Rb},function(){this.F=this.Aa();this.A-=this.Rb},function(){this.D=this.Aa();this.A-=this.Rb},yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,function(){vg[this.aa()].call(this,wd,this.K);this.A-=0>this.Ba? +1:this.zg},Og,function(){vg[this.aa()].call(this,wd,this.L);this.A-=0>this.Ba?1:this.zg},function(){sg[this.aa()].call(this,Id)},function(){O[this.aa()].call(this,Jd)},function(){tg[this.Vf=this.aa()].call(this,Ud)},function(){P[this.Vf=this.aa()].call(this,Vd)},function(){this.Y|=1;sg[this.aa()].call(this,Gd)},function(){this.Y|=1;O[this.aa()].call(this,Gd)},function(){tg[this.aa()].call(this,Gd)},function(){P[this.aa()].call(this,Gd)},function(){var a=this.aa();switch((a&56)>>3){case 0:this.nb= +this.ib.ua;break;case 1:this.nb=this.Ia.ua;break;case 2:this.nb=this.Ub.ua;break;case 3:this.nb=this.cc.ua;break;default:N.call(this);return}this.Y|=1;O[a].call(this,Hd)},function(){this.Y|=1;this.C=this.M=this.Rk;P[this.aa()].call(this,Nd)},function(){var a,b=this.aa(),c=(b&56)>>3;switch(c){case 0:a=this.G;break;case 2:a=this.J;break;case 3:a=this.B;break;default:if(80286<=this.Ca){G.call(this);return}switch(c){case 1:a=this.I;break;case 4:a=this.X;break;case 5:a=this.H;break;case 6:a=this.F;break; case 7:a=this.D}}P[b].call(this,Gd);switch(c){case 0:kc(this,this.G);this.G=a;break;case 1:hc(this,this.I);this.I=a;break;case 2:jc(this,this.J);this.J=a;break;case 3:ic(this,this.B);this.B=a;break;case 4:kc(this,this.X);this.X=a;break;case 5:hc(this,this.H);this.H=a;break;case 6:jc(this,this.F);this.F=a;break;case 7:ic(this,this.D),this.D=a}},function(){this.Y|=1;vg[this.aa()].call(this,xd,this.Aa)},function(){this.A-=3},function(){var a=this.G;this.G=this.I;this.I=a;this.A-=3},function(){var a= -this.G;this.G=this.J;this.J=a;this.A-=3},function(){var a=this.G;this.G=this.B;this.B=a;this.A-=3},function(){var a=this.G;this.G=this.X;this.X=a;this.A-=3},function(){var a=this.G;this.G=this.H;this.H=a;this.A-=3},function(){var a=this.G;this.G=this.F;this.F=a;this.A-=3},function(){var a=this.G;this.G=this.D;this.D=a;this.A-=3},function(){this.G=this.G<<24>>24&65535;this.A-=2},function(){this.J=this.G&32768?65535:0;this.A-=this.Jj},function(){var a=this.K(),b=this.K();K(this,this.Ia.ua);K(this,this.qa); -Yb(this,a,b);this.A-=this.Mj},function(){N.call(this)},function(){K(this,ac(this));this.A-=this.Zb},function(){Zb(this,this.Aa());this.A-=this.Qb},function(){var a=this.G>>8;a&1?yc(this):uc(this);a&4?pc(this)||(this.fa^=1):pc(this)&&(this.fa^=1);a&16?zc(this):vc(this);a&64?Ac(this):wc(this);a&128?Bc(this):sc(this)&&(this.fa^=this.$>>1|this.$>>2,this.ha^=32896);this.A-=this.mb},function(){this.G=this.G&255|(ac(this)&213)<<8;this.A-=this.mb},function(){this.G=this.G&-256|this.S(this.C,this.K());this.A-= +this.G;this.G=this.J;this.J=a;this.A-=3},function(){var a=this.G;this.G=this.B;this.B=a;this.A-=3},function(){var a=this.G;this.G=this.X;this.X=a;this.A-=3},function(){var a=this.G;this.G=this.H;this.H=a;this.A-=3},function(){var a=this.G;this.G=this.F;this.F=a;this.A-=3},function(){var a=this.G;this.G=this.D;this.D=a;this.A-=3},function(){this.G=this.G<<24>>24&65535;this.A-=2},function(){this.J=this.G&32768?65535:0;this.A-=this.Ij},function(){var a=this.K(),b=this.K();K(this,this.Ia.ua);K(this,this.qa); +Yb(this,a,b);this.A-=this.Lj},function(){N.call(this)},function(){K(this,ac(this));this.A-=this.$b},function(){Zb(this,this.Aa());this.A-=this.Rb},function(){var a=this.G>>8;a&1?yc(this):uc(this);a&4?pc(this)||(this.fa^=1):pc(this)&&(this.fa^=1);a&16?zc(this):vc(this);a&64?Ac(this):wc(this);a&128?Bc(this):sc(this)&&(this.fa^=this.$>>1|this.$>>2,this.ha^=32896);this.A-=this.mb},function(){this.G=this.G&255|(ac(this)&213)<<8;this.A-=this.mb},function(){this.G=this.G&-256|this.S(this.C,this.K());this.A-= this.hi},function(){this.G=this.T(this.C,this.K());this.A-=this.hi},function(){var a=this.K(),b=this.G;Ec(this,this.C.Nb(a,0),b);this.A-=this.ii},function(){var a=this.K(),b=this.G;Fc(this,this.C.Nb(a,1),b);this.A-=this.ii},function(){var a=1,b=0,c=this.ji;this.pa&192&&(a=this.I,b=1,c=this.li,this.pa&256||(this.A-=this.ki));if(a--){var d=this.Ha&1024?-1:1,e=this.S(this.C,this.F);Ec(this,this.ib.Nb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.pa&16?-3: -2),this.Y|=256)}},function(){var a=1,b=0,c=this.ji;this.pa&192&&(a=this.I,b=1,c=this.li,this.pa&256||(this.A-=this.ki));if(a--){var d=this.Ha&1024?-2:2,e=this.T(this.C,this.F);Fc(this,this.ib.Nb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(J(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Uh;this.pa&192&&(a=this.I,b=1,c=this.Wh,this.pa&256||(this.A-=this.Vh));if(a--){var d=this.Ha&1024?-1:1,e=this.S(this.C,this.F),f=this.N(this.ib,this.D);Qc.call(this, e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.fb;this.I-=b;a&&rc(this)==(this.pa&64)&&(J(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Uh;this.pa&192&&(a=this.I,b=1,c=this.Wh,this.pa&256||(this.A-=this.Vh));if(a--){var d=this.Ha&1024?-2:2,e=this.T(this.C,this.F),f=this.O(this.ib,this.D);Yc.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.fb;this.I-=b;a&&rc(this)==(this.pa&64)&&(J(this,this.pa&16?-3:-2),this.Y|=256)}},function(){this.W= @@ -400,227 +400,227 @@ this.G;Fc(this,this.ib.Nb(this.D,1),d);this.D=this.D+(this.Ha&1024?-2:2)&65535;t this.F),this.F=this.F+(this.Ha&1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(J(this,this.pa&16?-3:-2),this.Y|=256))},function(){var a=1,b=0,c=this.oi;this.pa&192&&(a=this.I,b=1,c=this.qi,this.pa&256||(this.A-=this.pi));a--&&(Qc.call(this,this.G&255,this.N(this.ib,this.D)),this.D=this.D+(this.Ha&1024?-1:1)&65535,this.A-=c-this.fb,this.I-=b,a&&rc(this)==(this.pa&64)&&(J(this,-2),this.Y|=256))},function(){var a=1,b=0,c=this.oi;this.pa&192&&(a=this.I,b=1,c=this.qi,this.pa&256||(this.A-=this.pi));a--&&(Yc.call(this, this.G,this.O(this.ib,this.D)),this.D=this.D+(this.Ha&1024?-2:2)&65535,this.A-=c-this.fb,this.I-=b,a&&rc(this)==(this.pa&64)&&(J(this,-2),this.Y|=256))},function(){this.G=this.G&-256|this.aa();this.A-=this.mb},function(){this.I=this.I&-256|this.aa();this.A-=this.mb},function(){this.J=this.J&-256|this.aa();this.A-=this.mb},function(){this.B=this.B&-256|this.aa();this.A-=this.mb},function(){this.G=this.G&255|this.aa()<<8;this.A-=this.mb},function(){this.I=this.I&255|this.aa()<<8;this.A-=this.mb},function(){this.J= this.J&255|this.aa()<<8;this.A-=this.mb},function(){this.B=this.B&255|this.aa()<<8;this.A-=this.mb},function(){this.G=this.K();this.A-=this.mb},function(){this.I=this.K();this.A-=this.mb},function(){this.J=this.K();this.A-=this.mb},function(){this.B=this.K();this.A-=this.mb},function(){this.X=this.K();this.A-=this.mb},function(){this.H=this.K();this.A-=this.mb},function(){this.F=this.K();this.A-=this.mb},function(){this.D=this.K();this.A-=this.mb},Pg,Qg,Pg,Qg,function(){P[this.aa()].call(this,Pd)}, -function(){P[this.aa()].call(this,Od)},function(){this.Y|=1;ug[this.aa()].call(this,yd,this.aa)},function(){this.Y|=1;vg[this.aa()].call(this,yd,this.K)},Rg,Sg,Rg,Sg,function(){Hc.call(this,3,null,this.ck)},function(){var a=this.aa(),b;a:{b=this.$k[a];if(void 0!==b)for(var c=0;c>8)*a+this.G&255;this.$=256;this.A-=this.Fj},function(){this.G=this.G&-256|(oc(this)?255:0);this.A-=2},function(){this.G= -this.G&-256|this.S(this.C,this.B+(this.G&255)&65535);this.A-=this.Ek},Tg,Tg,Tg,Tg,Tg,Tg,Tg,Tg,function(){var a=this.L();(this.I=this.I-1&65535)&&this.W&this.$-1?(I(this,this.qa+a),this.A-=this.lk):this.A-=this.ei},function(){var a=this.L();!(this.I=this.I-1&65535)||this.W&this.$-1?this.A-=this.gi:(I(this,this.qa+a),this.A-=this.fi)},function(){var a=this.L();(this.I=this.I-1&65535)?(I(this,this.qa+a),this.A-=this.kk):this.A-=this.ei},function(){var a=this.L();this.I?this.A-=this.gi:(I(this,this.qa+ -a),this.A-=this.fi)},function(){var a=this.aa();this.G=this.G&-256|Ua(this.ma,a,this.Da-2);this.A-=this.Zh},function(){var a=this.aa();this.G=Ua(this.ma,a,this.Da-1)|Ua(this.ma,a+1&65535,this.Da-2)<<8;this.A-=this.Zh},function(){var a=this.aa();Wa(this.ma,a,this.G&255,this.Da-2);this.A-=this.ni},function(){var a=this.aa();Wa(this.ma,a,this.G&255,this.Da-2);Wa(this.ma,a+1&65535,this.G>>8,this.Da-2);this.A-=this.ni},function(){var a=this.K();K(this,this.qa);I(this,this.qa+a);this.A-=this.Kj},function(){var a= -this.K();I(this,this.qa+a);this.A-=this.$h},function(){Yb(this,this.K(),this.K());this.A-=this.gk},function(){var a=this.L();I(this,this.qa+a);this.A-=this.$h},function(){this.G=this.G&-256|Ua(this.ma,this.J,this.Da-1);this.A-=this.Yh},function(){this.G=Ua(this.ma,this.J,this.Da-1)|Ua(this.ma,this.J+1&65535,this.Da-1)<<8;this.A-=this.Yh},function(){Wa(this.ma,this.J,this.G&255,this.Da-1);this.A-=this.mi},function(){Wa(this.ma,this.J,this.G&255,this.Da-1);Wa(this.ma,this.J+1&65535,this.G>>8,this.Da- -1);this.A-=this.mi},Ug,Ug,function(){this.Y|=132;this.A-=this.rb},function(){this.Y|=68;this.A-=this.rb},function(){this.Ya|=4;this.A-=2;this.Ha&512||db(this)},function(){oc(this)?uc(this):yc(this);this.A-=2},function(){this.nb=-1;ug[this.aa()].call(this,Cd,td);0<=this.nb&&(this.G=this.nb)},function(){this.nb=-1;vg[this.aa()].call(this,Dd,td);0<=this.nb&&(this.G=this.nb,this.J=this.Bf)},function(){this.W&=~this.$;this.A-=2},function(){this.W|=this.$;this.A-=2},function(){this.Ha&=-513;this.A-=this.Ij}, +function(){P[this.aa()].call(this,Od)},function(){this.Y|=1;ug[this.aa()].call(this,yd,this.aa)},function(){this.Y|=1;vg[this.aa()].call(this,yd,this.K)},Rg,Sg,Rg,Sg,function(){Hc.call(this,3,null,this.bk)},function(){var a=this.aa(),b;a:{b=this.Zk[a];if(void 0!==b)for(var c=0;c>8)*a+this.G&255;this.$=256;this.A-=this.Ej},function(){this.G=this.G&-256|(oc(this)?255:0);this.A-=2},function(){this.G= +this.G&-256|this.S(this.C,this.B+(this.G&255)&65535);this.A-=this.Dk},Tg,Tg,Tg,Tg,Tg,Tg,Tg,Tg,function(){var a=this.L();(this.I=this.I-1&65535)&&this.W&this.$-1?(I(this,this.qa+a),this.A-=this.kk):this.A-=this.ei},function(){var a=this.L();!(this.I=this.I-1&65535)||this.W&this.$-1?this.A-=this.gi:(I(this,this.qa+a),this.A-=this.fi)},function(){var a=this.L();(this.I=this.I-1&65535)?(I(this,this.qa+a),this.A-=this.jk):this.A-=this.ei},function(){var a=this.L();this.I?this.A-=this.gi:(I(this,this.qa+ +a),this.A-=this.fi)},function(){var a=this.aa();this.G=this.G&-256|Ua(this.ma,a,this.Da-2);this.A-=this.Zh},function(){var a=this.aa();this.G=Ua(this.ma,a,this.Da-1)|Ua(this.ma,a+1&65535,this.Da-2)<<8;this.A-=this.Zh},function(){var a=this.aa();Wa(this.ma,a,this.G&255,this.Da-2);this.A-=this.ni},function(){var a=this.aa();Wa(this.ma,a,this.G&255,this.Da-2);Wa(this.ma,a+1&65535,this.G>>8,this.Da-2);this.A-=this.ni},function(){var a=this.K();K(this,this.qa);I(this,this.qa+a);this.A-=this.Jj},function(){var a= +this.K();I(this,this.qa+a);this.A-=this.$h},function(){Yb(this,this.K(),this.K());this.A-=this.fk},function(){var a=this.L();I(this,this.qa+a);this.A-=this.$h},function(){this.G=this.G&-256|Ua(this.ma,this.J,this.Da-1);this.A-=this.Yh},function(){this.G=Ua(this.ma,this.J,this.Da-1)|Ua(this.ma,this.J+1&65535,this.Da-1)<<8;this.A-=this.Yh},function(){Wa(this.ma,this.J,this.G&255,this.Da-1);this.A-=this.mi},function(){Wa(this.ma,this.J,this.G&255,this.Da-1);Wa(this.ma,this.J+1&65535,this.G>>8,this.Da- +1);this.A-=this.mi},Ug,Ug,function(){this.Y|=132;this.A-=this.sb},function(){this.Y|=68;this.A-=this.sb},function(){this.Ya|=4;this.A-=2;this.Ha&512||db(this)},function(){oc(this)?uc(this):yc(this);this.A-=2},function(){this.nb=-1;ug[this.aa()].call(this,Cd,td);0<=this.nb&&(this.G=this.nb)},function(){this.nb=-1;vg[this.aa()].call(this,Dd,td);0<=this.nb&&(this.G=this.nb,this.J=this.Bf)},function(){this.W&=~this.$;this.A-=2},function(){this.W|=this.$;this.A-=2},function(){this.Ha&=-513;this.A-=this.Hj}, function(){this.Ha|=512;this.Y|=4;this.A-=2},function(){this.Ha&=-1025;this.A-=2},function(){this.Ha|=1024;this.A-=2},function(){ug[this.aa()].call(this,Rb,td)},function(){vg[this.aa()].call(this,Tb,td)}]; -function Q(a){w.call(this,"ChipSet",a,Q);this.Ca=a.model;this.Ca=void 0!==this.Ca?parseInt(this.Ca,10):Vg;this.Eb=0;var b=a.sw1;if(b)this.Eb=Wg(b,Xg|Yg.Zk);else if(b=a.fdrives||2,this.Eb|=Zg.Tg,b--,this.Eb|=(b&3)<=$g&&(this.Ve=this.We=2);this.kg=a.scaleTimers||!1;this.Gn=a.rtcDate;this.qj=!1;a.sound&&window&&"webkitAudioContext"in window&& -(this.ih=new webkitAudioContext);this.reset();this.Pa()}z(w,Q);var Vg=5150,$g=5170,ah={none:0,tv:1,color:2,mono:3,ega:0},Zg={Tg:1,ONE:0,no:64,lo:128,Sn:192,Je:192,Ke:6},Xg=12,Yg={mo:16,Nn:32,Zk:48,Je:48,Ke:4};g=Q.prototype; -g.tb=function(a,b,c,d){switch(c){case "sw1":return this.oa[c]=d,bh(this,c,d,this.Eb,{0:this.Ca==Vg?"Bootable Floppy Drive":"Loop on POST",1:this.Ca==Vg?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Ca==Vg)return this.oa[c]=d,bh(this,c,d,this.Gd,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.oa[c]=d,!0}return!1}; -g.gc=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.Fa=a;this.Qa=D(a,"Keyboard");this.Fk=Math.round(c.cd/1193181);Ta(b,this,ch);Va(b,this,dh);this.Ca<$g?(Ta(b,this,eh),Va(b,this,fh)):(Ta(b,this,gh),Va(b,this,hh))};g.Rb=function(a,b){if(!b)if(!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};g.Jb=function(a){return a&&this.save?this.save():!0}; -g.reset=function(a){var b;this.Gc=this.Eb;this.ge=this.Gd;ih(this);this.va=Array(this.Ve);for(b=0;b=$g){this.bb=16;this.Tc=0;this.kd=16;this.Rf=0;this.Md=160;512<=mh(this)&&(this.Md|=16);3==nh(this)&&(this.Md|=64);this.$g=3;this.Uf=0;this.Hb=Array(7);this.ne=0;a||(this.ka=Array(64)); -oh(this,this.Gn);for(a=14;46>a;a++)void 0===this.ka[a]&&(this.ka[a]=0);this.ka[20]=this.Gc&(Yg.Je|2|Zg.Tg|Zg.Je);this.ka[16]=ph(this,0)<<4|ph(this,1);qh(this)}}; -function oh(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.Sb("CMOS date invalid ("+b+"), using "+c)):b&&a.Sb("CMOS date: "+c);a.ka[0]=c.getSeconds();a.ka[1]=0;a.ka[2]=c.getMinutes();a.ka[3]=0;a.ka[4]=c.getHours();a.ka[5]=0;a.ka[6]=c.getDay()+1;a.ka[7]=c.getDate();a.ka[8]=c.getMonth()+1;c=c.getFullYear();a.ka[9]=c%100;c/=100;a.ka[50]=c%10|c/10<<4;a.jf=-1;a.ka[10]=38;a.ka[11]=2;a.ka[12]=0;a.ka[13]=128} +function Q(a){w.call(this,"ChipSet",a,Q);this.Ca=a.model;this.Ca=void 0!==this.Ca?parseInt(this.Ca,10):Vg;this.Eb=0;var b=a.sw1;if(b)this.Eb=Wg(b,Xg|Yg.Yk);else if(b=a.fdrives||2,this.Eb|=Zg.Sg,b--,this.Eb|=(b&3)<=$g&&(this.Ve=this.We=2);this.kg=a.scaleTimers||!1;this.Gn=a.rtcDate;this.pj=!1;a.sound&&window&&"webkitAudioContext"in window&& +(this.hh=new webkitAudioContext);this.reset();this.Pa()}z(w,Q);var Vg=5150,$g=5170,ah={none:0,tv:1,color:2,mono:3,ega:0},Zg={Sg:1,ONE:0,no:64,lo:128,Sn:192,Je:192,Ke:6},Xg=12,Yg={mo:16,Nn:32,Yk:48,Je:48,Ke:4};g=Q.prototype; +g.ub=function(a,b,c,d){switch(c){case "sw1":return this.oa[c]=d,bh(this,c,d,this.Eb,{0:this.Ca==Vg?"Bootable Floppy Drive":"Loop on POST",1:this.Ca==Vg?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Ca==Vg)return this.oa[c]=d,bh(this,c,d,this.Gd,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.oa[c]=d,!0}return!1}; +g.ic=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.Fa=a;this.Qa=D(a,"Keyboard");this.Ek=Math.round(c.cd/1193181);Ta(b,this,ch);Va(b,this,dh);this.Ca<$g?(Ta(b,this,eh),Va(b,this,fh)):(Ta(b,this,gh),Va(b,this,hh))};g.Sb=function(a,b){if(!b)if(!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};g.Jb=function(a){return a&&this.save?this.save():!0}; +g.reset=function(a){var b;this.Gc=this.Eb;this.ge=this.Gd;ih(this);this.va=Array(this.Ve);for(b=0;b=$g){this.bb=16;this.Tc=0;this.kd=16;this.Rf=0;this.Md=160;512<=mh(this)&&(this.Md|=16);3==nh(this)&&(this.Md|=64);this.Zg=3;this.Uf=0;this.Hb=Array(7);this.ne=0;a||(this.ka=Array(64)); +oh(this,this.Gn);for(a=14;46>a;a++)void 0===this.ka[a]&&(this.ka[a]=0);this.ka[20]=this.Gc&(Yg.Je|2|Zg.Sg|Zg.Je);this.ka[16]=ph(this,0)<<4|ph(this,1);qh(this)}}; +function oh(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.Tb("CMOS date invalid ("+b+"), using "+c)):b&&a.Tb("CMOS date: "+c);a.ka[0]=c.getSeconds();a.ka[1]=0;a.ka[2]=c.getMinutes();a.ka[3]=0;a.ka[4]=c.getHours();a.ka[5]=0;a.ka[6]=c.getDay()+1;a.ka[7]=c.getDate();a.ka[8]=c.getMonth()+1;c=c.getFullYear();a.ka[9]=c%100;c/=100;a.ka[50]=c%10|c/10<<4;a.jf=-1;a.ka[10]=38;a.ka[11]=2;a.ka[12]=0;a.ka[13]=128} function qh(a){for(var b=0,c=16;46>c;c++)b+=a.ka[c];a.ka[47]=b&255;a.ka[46]=b>>8} -g.save=function(){var a=new H(this);a.set(0,[this.Eb,this.Gd,this.Gc,this.ge]);for(var b=[],c=0;c=$g&&(a.set(5,[this.bb,this.Tc,this.kd,this.Rf,this.Md,this.$g]),a.set(6,[this.Uf,this.Hb,this.ne,this.ka,this.jf]));return a.data()}; -g.restore=function(a){var b,c;b=a[0];this.Eb=b[0];this.Gd=b[1];this.Gc=b[2];this.ge=b[3];b=a[1];this.va=Array(this.Ve);for(c=0;c>2)+1)*a.nm+32*((b?a.Gd:a.ge)&15)}function th(a,b){var c=b?a.Eb:a.Gc;return a.Ca!=Vg||c&Zg.Tg?((c&Zg.Je)>>Zg.Ke)+1:0}function ph(a,b){return b>Yg.Ke} +g.save=function(){var a=new H(this);a.set(0,[this.Eb,this.Gd,this.Gc,this.ge]);for(var b=[],c=0;c=$g&&(a.set(5,[this.bb,this.Tc,this.kd,this.Rf,this.Md,this.Zg]),a.set(6,[this.Uf,this.Hb,this.ne,this.ka,this.jf]));return a.data()}; +g.restore=function(a){var b,c;b=a[0];this.Eb=b[0];this.Gd=b[1];this.Gc=b[2];this.ge=b[3];b=a[1];this.va=Array(this.Ve);for(c=0;c>2)+1)*a.nm+32*((b?a.Gd:a.ge)&15)}function th(a,b){var c=b?a.Eb:a.Gc;return a.Ca!=Vg||c&Zg.Sg?((c&Zg.Je)>>Zg.Ke)+1:0}function ph(a,b){return b>Yg.Ke} function bh(a,b,c,d,e){for(var f="",l=1;8>=l;l++){var k="pcjs-bitCell";l||(k+=" pcjs-bitCellLeft");f+='
'+l+"
\n"}c.innerHTML=f;b=C(c,"pcjs-bitCell");c=null;for(l=0;l>2].La[b&3],c,d,e)}function Ch(a,b,c){b=a.va[b>>2].La[b&3];b.ag&&b.Ch&&b.Cg?(c&&(b.bg=c),b.bd||Ic(a,b,!0)):c&&c(!0)} -function Ic(a,b,c){c&&(b.count=b.Ob[1]<<8|b.Ob[0],b.Wk=b.mode&12,b.rj=b.Yc=!1);for(var d=!1;0<=b.count&&(c=b.yc<<16|b.ub[1]<<8|b.ub[0],4==b.Wk?(d=!0,function(c){b.Ch.call(b.ag,b.Cg,-1,function(f,l){0>f&&(b.rj||(b.rj=!0),f=255);b.bd||Pa(a.ma,c,f);(d=l)&&setTimeout(function(){Fh(b)||Ic(a,b)},0)})}(c)):8==b.Wk?(c=Na(a.ma,c),0>b.Ch.call(b.ag,b.Cg,c)&&(b.Yc=!0)):b.Yc=!0),!d&&!Fh(b););} -function Fh(a){if(!a.Yc&&0<=--a.count&&(a.mode&32?(a.ub[0]--,0>a.ub[0]&&(a.ub[0]=255,a.ub[1]--,0>a.ub[1]&&(a.ub[1]=255))):(a.ub[0]++,255>3,e=a.ob[d];e.wb|=1<<(b&7);e.qf=c||0;1==d&&(a.ob[0].wb|=4);Ih(a,d)}function Kh(a,b){var c=b>>3,d=a.ob[c],e=1<<(b&7);d.wb&e&&(d.wb&=~e,1!=c||d.wb||(a.ob[0].wb&=-5),Ih(a,c))} -function Gc(a,b){void 0===b&&(b=0);var c=-1,d=a.ob[b];if(d.qf)c=-2,d.qf--;else for(var e=d.wb&((d.xc|d.nd)^255),f=d.Nd+1;;){var f=f&7,l=1<>6;if(3!=c){var d=b&1,e=b&14,f=b&48;if(f){var l=this.Gb[c];l.Cf=f;l.mode=e;l.gj=d;l.oc=[0,0];l.Ob=[0,0];l.$e=[0,0];l.Jc=!1;l.ef=!1;l.qe=!1;Mh(this,c);0==c&&Kh(this,0);2==c&&255==this.ob[0].nd&&77==this.fc&&(c=this.Gb[0],c.Cc[0]=c.oc[0],c.Cc[1]=c.oc[1],c.Dd=jb(this.ia,this.kg))}else Nh(this,c),d=this.Gb[c],d.$e[0]=d.Ob[0],d.$e[1]=d.Ob[1],d.ef=!0,Mh(this,c)}};function Ph(a,b){var c=a.Gb[b],d=c.oc[1]<<8|c.oc[0];d||(d=1==c.Ud?256:65536);return d} +function vh(a,b,c){a=a.va[b];c=a.La[c].vb[a.yb];a.yb^=1;return c}function wh(a,b,c,d){a=a.va[b];c=a.La[c];c.vb[a.yb]=c.Zi[a.yb]=d;a.yb^=1}function xh(a,b,c){a=a.va[b];c=a.La[c].Ob[a.yb];a.yb^=1;return c}function yh(a,b,c,d){a=a.va[b];c=a.La[c];c.Ob[a.yb]=c.pc[a.yb]=d;a.yb^=1}function zh(a,b){var c=a.va[b],d=c.pd|1;c.pd&=-16;return d}function Ah(a,b,c){a=a.va[b];b=c&3;a.pd=a.pd&~(16<>2].La[b&3],c,d,e)}function Ch(a,b,c){b=a.va[b>>2].La[b&3];b.ag&&b.Bh&&b.Bg?(c&&(b.bg=c),b.bd||Ic(a,b,!0)):c&&c(!0)} +function Ic(a,b,c){c&&(b.count=b.Ob[1]<<8|b.Ob[0],b.Vk=b.mode&12,b.qj=b.Yc=!1);for(var d=!1;0<=b.count&&(c=b.zc<<16|b.vb[1]<<8|b.vb[0],4==b.Vk?(d=!0,function(c){b.Bh.call(b.ag,b.Bg,-1,function(f,l){0>f&&(b.qj||(b.qj=!0),f=255);b.bd||Pa(a.ma,c,f);(d=l)&&setTimeout(function(){Fh(b)||Ic(a,b)},0)})}(c)):8==b.Vk?(c=Na(a.ma,c),0>b.Bh.call(b.ag,b.Bg,c)&&(b.Yc=!0)):b.Yc=!0),!d&&!Fh(b););} +function Fh(a){if(!a.Yc&&0<=--a.count&&(a.mode&32?(a.vb[0]--,0>a.vb[0]&&(a.vb[0]=255,a.vb[1]--,0>a.vb[1]&&(a.vb[1]=255))):(a.vb[0]++,255>3,e=a.ob[d];e.xb|=1<<(b&7);e.qf=c||0;1==d&&(a.ob[0].xb|=4);Ih(a,d)}function Kh(a,b){var c=b>>3,d=a.ob[c],e=1<<(b&7);d.xb&e&&(d.xb&=~e,1!=c||d.xb||(a.ob[0].xb&=-5),Ih(a,c))} +function Gc(a,b){void 0===b&&(b=0);var c=-1,d=a.ob[b];if(d.qf)c=-2,d.qf--;else for(var e=d.xb&((d.yc|d.nd)^255),f=d.Nd+1;;){var f=f&7,l=1<>6;if(3!=c){var d=b&1,e=b&14,f=b&48;if(f){var l=this.Gb[c];l.Cf=f;l.mode=e;l.fj=d;l.pc=[0,0];l.Ob=[0,0];l.$e=[0,0];l.Jc=!1;l.ef=!1;l.qe=!1;Mh(this,c);0==c&&Kh(this,0);2==c&&255==this.ob[0].nd&&77==this.hc&&(c=this.Gb[0],c.Dc[0]=c.pc[0],c.Dc[1]=c.pc[1],c.Dd=jb(this.ia,this.kg))}else Nh(this,c),d=this.Gb[c],d.$e[0]=d.Ob[0],d.$e[1]=d.Ob[1],d.ef=!0,Mh(this,c)}};function Ph(a,b){var c=a.Gb[b],d=c.pc[1]<<8|c.pc[0];d||(d=1==c.Ud?256:65536);return d} function Mh(a,b){var c=a.Gb[b];c.sd=32==c.Cf?1:0;c.Ud=48==c.Cf?2:1} -function Nh(a,b,c){var d=a.Gb[b];if(d.qe&&(2!=b||a.fc&1)){var e=jb(a.ia,a.kg),f=(e-d.Dd)/a.Fk|0;0>f&&(d.Dd=e,f=0);var l=Ph(a,b),k=a.Gb[b],m=k.Cc[1]<<8|k.Cc[0];m||(m=1==k.Ud?256:65536);k=m-f;0==d.mode?(0>=k&&(k=0),k||(d.Jc=!0,d.qe=!1,b||R(a,0))):4==d.mode?(d.Jc=1!=k,0>=k&&(k=l+k,0>=k&&(k=l),d.Cc[0]=k&255,d.Cc[1]=k>>8,d.Dd=e,!b&&d.Jc&&R(a,0))):6==d.mode&&(k-=f,0>=k&&(d.Jc=!d.Jc,k=l+k,0>=k&&(k=l),d.Cc[0]=k&255,d.Cc[1]=k>>8,d.Dd=e,!b&&d.Jc&&R(a,0)));d.Ob[0]=k&255;d.Ob[1]=k>>8;c&&(a.Dd=0)}return d} -function lb(a,b){for(var c=0;c=$g){var c=0,d=a.ia.cd,e=jb(a.ia,a.kg);if(0<=a.jf&&(c=e-a.jf,Math.floor(c/d)&&60<=++a.ka[0]&&(a.ka[0]=0,60<=++a.ka[2]&&(a.ka[2]=0,24<=++a.ka[4])))){a.ka[4]=0;a.ka[6]=a.ka[6]%7+1;var f=a.ka[9],l=ja[a.ka[8]-1];28==l&&0===f%4&&(f%100||0===f%400)&&l++;++a.ka[7]>l&&(a.ka[7]=1,12<++a.ka[8]&&(a.ka[8]=1,a.ka[9]=(a.ka[9]+1)%100))}a.jf=e-c%d}}g.bm=function(){var a=this.Xf;this.Ue&16&&(this.fc&128?a=this.Gc:this.Qa&&(a=Uh(this.Qa)));return a}; -g.mn=function(a,b){this.Xf=b};g.cm=function(){return this.fc};g.nn=function(a,b){Vh(this,b);this.Qa&&Wh(this.Qa,b&128?!1:!0,b&64?!0:!1)};function Vh(a,b){var c=!!(b&2),d=!!(a.fc&2);a.fc=b;c!=d&&kb(a,c)}g.dm=function(){var a=0,a=this.Ca==Vg?this.fc&4?a|this.ge&15:a|this.ge>>4&1:this.fc&8?a|this.Gc>>4:a|this.Gc&15;this.fc&1&&Nh(this,2).Jc&&(a=this.fc&2?a|32:a|16);return a};g.on=function(a,b){this.bh=b};g.em=function(){return this.Ue};g.pn=function(a,b){this.Ue=b}; -g.sl=function(){var a=this.Rf;this.bb&=-258;var b=this.Qa&&Uh(this.Qa,!0);b&&Xh(this,b);return a};g.Gm=function(a,b){if(this.bb&8)switch(this.Tc){case 96:Yh(this,b);break;case 209:Zh(this,b);break;default:if(Yh(this,this.kd&-17),this.Qa){var c=-1;switch(b){case 255:c=250,$h(this.Qa)}Xh(this,c)}}this.Tc=b;this.bb&=-9};g.tl=function(){return this.fc&-209|(jb(this.ia)&64?16:0)};g.Hm=function(a,b){Vh(this,b)};g.ul=function(){var a=this.bb&255;this.bb&256&&(this.bb|=1,this.bb&=-257);return a}; +function Nh(a,b,c){var d=a.Gb[b];if(d.qe&&(2!=b||a.hc&1)){var e=jb(a.ia,a.kg),f=(e-d.Dd)/a.Ek|0;0>f&&(d.Dd=e,f=0);var l=Ph(a,b),k=a.Gb[b],m=k.Dc[1]<<8|k.Dc[0];m||(m=1==k.Ud?256:65536);k=m-f;0==d.mode?(0>=k&&(k=0),k||(d.Jc=!0,d.qe=!1,b||R(a,0))):4==d.mode?(d.Jc=1!=k,0>=k&&(k=l+k,0>=k&&(k=l),d.Dc[0]=k&255,d.Dc[1]=k>>8,d.Dd=e,!b&&d.Jc&&R(a,0))):6==d.mode&&(k-=f,0>=k&&(d.Jc=!d.Jc,k=l+k,0>=k&&(k=l),d.Dc[0]=k&255,d.Dc[1]=k>>8,d.Dd=e,!b&&d.Jc&&R(a,0)));d.Ob[0]=k&255;d.Ob[1]=k>>8;c&&(a.Dd=0)}return d} +function lb(a,b){for(var c=0;c=$g){var c=0,d=a.ia.cd,e=jb(a.ia,a.kg);if(0<=a.jf&&(c=e-a.jf,Math.floor(c/d)&&60<=++a.ka[0]&&(a.ka[0]=0,60<=++a.ka[2]&&(a.ka[2]=0,24<=++a.ka[4])))){a.ka[4]=0;a.ka[6]=a.ka[6]%7+1;var f=a.ka[9],l=ja[a.ka[8]-1];28==l&&0===f%4&&(f%100||0===f%400)&&l++;++a.ka[7]>l&&(a.ka[7]=1,12<++a.ka[8]&&(a.ka[8]=1,a.ka[9]=(a.ka[9]+1)%100))}a.jf=e-c%d}}g.bm=function(){var a=this.Xf;this.Ue&16&&(this.hc&128?a=this.Gc:this.Qa&&(a=Uh(this.Qa)));return a}; +g.mn=function(a,b){this.Xf=b};g.cm=function(){return this.hc};g.nn=function(a,b){Vh(this,b);this.Qa&&Wh(this.Qa,b&128?!1:!0,b&64?!0:!1)};function Vh(a,b){var c=!!(b&2),d=!!(a.hc&2);a.hc=b;c!=d&&kb(a,c)}g.dm=function(){var a=0,a=this.Ca==Vg?this.hc&4?a|this.ge&15:a|this.ge>>4&1:this.hc&8?a|this.Gc>>4:a|this.Gc&15;this.hc&1&&Nh(this,2).Jc&&(a=this.hc&2?a|32:a|16);return a};g.on=function(a,b){this.ah=b};g.em=function(){return this.Ue};g.pn=function(a,b){this.Ue=b}; +g.sl=function(){var a=this.Rf;this.bb&=-258;var b=this.Qa&&Uh(this.Qa,!0);b&&Xh(this,b);return a};g.Gm=function(a,b){if(this.bb&8)switch(this.Tc){case 96:Yh(this,b);break;case 209:Zh(this,b);break;default:if(Yh(this,this.kd&-17),this.Qa){var c=-1;switch(b){case 255:c=250,$h(this.Qa)}Xh(this,c)}}this.Tc=b;this.bb&=-9};g.tl=function(){return this.hc&-209|(jb(this.ia)&64?16:0)};g.Hm=function(a,b){Vh(this,b)};g.ul=function(){var a=this.bb&255;this.bb&256&&(this.bb|=1,this.bb&=-257);return a}; g.Fm=function(a,b){this.Tc=b;this.bb|=8;var c=0;240<=this.Tc&&(c=this.Tc^15,this.Tc=240);switch(this.Tc){case 192:Xh(this,this.Md);break;case 173:Yh(this,this.kd|16);break;case 174:Yh(this,this.kd&-17);break;case 170:this.Qa&&ai(this.Qa,!0);Yh(this,this.kd|16);Xh(this,85);Zh(this,3);break;case 224:Xh(this,this.kd&16?0:1);break;case 240:c&1&&Xb(this.ia)}};function Yh(a,b){a.kd=b;a.bb=a.bb&-5|b&4;a.Qa&&Wh(a.Qa,!!(b&8),!(b&16))&&Xh(a,Uh(a.Qa,!0))}function Xh(a,b){0<=b&&(a.Rf=b,a.bb&=-2,a.bb|=256)} -function Zh(a,b){a.$g=b;Ja(a.ma,!!(b&2));b&1||Xb(a.ia)}g.Il=function(){return this.ne};g.Um=function(a,b){this.ne=b;this.Wf=b&128?0:128};g.Jl=function(){var a=this.ne&63;if(13>=a){var b=this.ka[a];if(10>a){var c=!1;4!=a&&5!=a||this.ka[11]&2||(b=12>b?b?b:12:(b-=12)?b+128:140,c=!0);this.ka[11]&4||(c&&128=a){var b=this.ka[a];if(10>a){var c=!1;4!=a&&5!=a||this.ka[11]&2||(b=12>b?b?b:12:(b-=12)?b+128:140,c=!0);this.ka[11]&4||(c&&128=c){if(e=b,10>c){var f=!1;this.ka[11]&4||(e=10*(e>>4)+(e&15),f=!0);if(4==c||5==c)f&&12=e?e=12==e?0:e:(e-=116,e=24==e?12:e))}}else e=b;d[c]=e};g.$l=function(){return this.Uf};g.jn=function(a,b){this.Uf=b};g.ln=function(a,b){this.Wf=b};function Wg(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;ec||2E4c||2E4>8&255,this.jb[c++]=f[b]>>16&255,this.jb[c++]=f[b]>>24&255;else this.jb=d;this.Zg=d.symbols;if(!this.jb.length){u("Empty ROM: "+a);return}if(1==this.jb.length){u(this.jb[0]);return}}catch(l){this.xa("ROM data error: "+ -l.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.jb=Array(a.length),d=0;d>8&255,this.jb[c++]=f[b]>>16&255,this.jb[c++]=f[b]>>24&255;else this.jb=d;this.Yg=d.symbols;if(!this.jb.length){u("Empty ROM: "+a);return}if(1==this.jb.length){u(this.jb[0]);return}}catch(l){this.xa("ROM data error: "+ +l.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.jb=Array(a.length),d=0;dthis.Qf?21:23,c=a.ka[b]|a.ka[b+1]<<8,c=c+(this.gd>>10);a.ka[b]=c&255;a.ka[b+1]=c>>8;qh(a)}}else u("No RAM allocated")}; -v(function(){for(var a=C(window.document,"pcjs","ram"),b=0;ba.ec.length){if(!(!d&&!a.Yg[c]||d&&a.Yg[c])){a.Yg[c]=d;a.ec.push(b);1==a.ec.length&&a.ga&&R(a.ga,1);for(var e in hi)if(hi[e]==c){(c=a.oa["key-"+e])&&void 0!==d&&(c.style.color=d?"#ffffff":"#000000",c.style.backgroundColor=d?"#000000":"#ffffff");break}}}else 20==a.ec.length&&a.ec.push(255)}function mi(a,b){var c=b?a.tm:a.sm;a.ia&&a.ia.Kc&&(c/=a.ia.Kc);return c}function ni(a,b){!a.de||void 0!==b&&b==a.de||(clearTimeout(a.Pc[a.de]),oi(a,a.de,!1))} -function ji(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.Jk=f);240==f+224?(a.wa&=-2,c&&(a.wa|=1),f+=224,e=!1):241==f+224?(a.wa&=-5,c&&(a.wa|=4),f+=224,e=!1):242==f+224?(a.wa&=-9,c&&(a.wa|=8),f+=224,e=!1):244==f+224?(a.wa&=-17,c&&(a.wa|=16),f+=224,d=ki(a,f)):91==f?(a.wa&=-33,c&&(a.wa|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&4==(a.wa&12)&&(f=254),d=c?!ki(a,f):!1):void 0!==S[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.wa&=-33,a.il||f!=a.Jk||ni(a));void 0===d&&(d=!oi(a,f,c));return d} +g.ub=function(a,b,c,d){var e=this;a=b+"-"+c;if(void 0===this.oa[a])switch(c){case "kbd":return this.oa[a]=d,d.onkeydown=function(a){return ji(e,a,!0)},d.onkeypress=function(a){var b=!0;a=a||window.event;a=a.which||a.keyCode;8==a||9==a?b=!1:e.wa&32?e.wa&=-33:b=e.wa&12?!1:!ki(e,a);return b},d.onkeyup=function(a){return ji(e,a,!1)},!0;default:if(void 0!==ii[c]&&"button"==b)return this.oa[a]=d,d.onclick=function(a,b,c){return function(){a.ia&&a.ia.Ee();return!ki(a,c)}}(this,c,ii[c]),!0;if(void 0!==hi[c])return this.oa[a]= +d,b=function(a,b,c){return function(){li(a,c)}}(this,c,hi[c]),c=function(a,b,c){return function(){li(a,c)}}(this,c,hi[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};g.ic=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.Fa=a;this.ga=D(a,"ChipSet")};g.Pa=function(){this.il=(this.rl=na("iOS"))||na("Android");return w.prototype.Pa.call(this)};function $h(a){a.gc=[170];a.ga&&R(a.ga,1,4)} +function Wh(a,b,c){var d=!1;a.sh!==c&&(a.sh=a.xh=c);a.ig!==b&&(a.ig=b)&&!a.xh&&ai(a);a.ig&&a.xh&&($h(a),a.xh=!1,d=!0);return d}function Uh(a,b){var c=0;a.gc.length&&(c=a.gc[0],b&&ai(a));return c}function ai(a,b){0a.gc.length){if(!(!d&&!a.Xg[c]||d&&a.Xg[c])){a.Xg[c]=d;a.gc.push(b);1==a.gc.length&&a.ga&&R(a.ga,1);for(var e in hi)if(hi[e]==c){(c=a.oa["key-"+e])&&void 0!==d&&(c.style.color=d?"#ffffff":"#000000",c.style.backgroundColor=d?"#000000":"#ffffff");break}}}else 20==a.gc.length&&a.gc.push(255)}function mi(a,b){var c=b?a.tm:a.sm;a.ia&&a.ia.Kc&&(c/=a.ia.Kc);return c}function ni(a,b){!a.de||void 0!==b&&b==a.de||(clearTimeout(a.Pc[a.de]),oi(a,a.de,!1))} +function ji(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.Ik=f);240==f+224?(a.wa&=-2,c&&(a.wa|=1),f+=224,e=!1):241==f+224?(a.wa&=-5,c&&(a.wa|=4),f+=224,e=!1):242==f+224?(a.wa&=-9,c&&(a.wa|=8),f+=224,e=!1):244==f+224?(a.wa&=-17,c&&(a.wa|=16),f+=224,d=ki(a,f)):91==f?(a.wa&=-33,c&&(a.wa|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&4==(a.wa&12)&&(f=254),d=c?!ki(a,f):!1):void 0!==S[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.wa&=-33,a.il||f!=a.Ik||ni(a));void 0===d&&(d=!oi(a,f,c));return d} function ki(a,b,c){var d=!1;ni(a,b);oi(a,b,!0)&&(c?oi(a,b,!1):(c=!1,a.Pc[b]&&(clearTimeout(a.Pc[b]),c=!0),c=mi(a,c),a.Pc[a.de=b]=setTimeout(function(a){return function(){oi(a,b,!1)}}(a),c)),d=!0);return d} function oi(a,b,c){var d=!1;c||(a.Pc[b]=null,a.de==b&&(a.de=0));var e=S[b];void 0===e&&1<=b&&26>=b&&(e=S[b+64]&255|61696);if(void 0!==e){14==e&&12==(a.wa&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.wa&17||(d=42):224==f?a.wa&18||(d=54):241==f?a.wa&4||(d=29):242==f&&(a.wa&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;cc.length)c=[!1,0,null,null,0,Array(Ai)];this.ng=b;this.ab=e[2];this.bc=e[3];this.Ac=d||e[4];65536<=this.Ac&&720896<=this.ab&&(this.bc=Math.min(this.Ac>>2,32768));this.Xb=c[0];this.hc=c[1];this.Ye=c[2];this.Gf=c[3];this.rc=c[4]&255;this.mg=c[4]>>8&255;this.Ub=c[5];this.Kh=Ai;if(5==b){this.Kh=Bi;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5),0,0,0,Array(9),0,this.Ac,Array(this.Ac>>2),771,0,4294967295, -0,4294967295,0,4294967295,0]);this.vd=b[0];this.Yd=b[1];this.Id=b[2];this.Ri=b[3];this.sg=b[4];this.Ah=b[5];this.ve=b[6];this.Of=b[7];this.Dh=b[8];this.Eh=b[9];this.ue=b[10];this.je=b[11];this.kb=b[12];d=this.Ac>>2;if((this.Ld=b[14])&&this.Ld.length>8&255)}var Y=[,,function(a){a+=this.offset;return(this.ea.kb=this.la[a])>>this.ea.Ci&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.la[b]>>8:this.la[b])&255}]; -Y[16]=function(a){a+=this.offset;a=this.la[a];for(var b=this.ea.Mh&this.ea.Nh,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};Y[512]=function(a,b){var c=a+this.offset,d;d=this.la[c]&~this.ea.Ua|(b|b<<8|b<<16|b<<24)&this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; +function yi(a,b,c,d){if(void 0!==b&&(!c||c.length)){var e=zi[b],f=a.Ad||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(Ai)];this.ng=b;this.ab=e[2];this.dc=e[3];this.Bc=d||e[4];65536<=this.Bc&&720896<=this.ab&&(this.dc=Math.min(this.Bc>>2,32768));this.Yb=c[0];this.jc=c[1];this.Ye=c[2];this.Gf=c[3];this.sc=c[4]&255;this.mg=c[4]>>8&255;this.Vb=c[5];this.Jh=Ai;if(5==b){this.Jh=Bi;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5),0,0,0,Array(9),0,this.Bc,Array(this.Bc>>2),771,0,4294967295, +0,4294967295,0,4294967295,0]);this.vd=b[0];this.Yd=b[1];this.Id=b[2];this.Ri=b[3];this.sg=b[4];this.zh=b[5];this.ve=b[6];this.Of=b[7];this.Ch=b[8];this.Dh=b[9];this.ue=b[10];this.je=b[11];this.kb=b[12];d=this.Bc>>2;if((this.Ld=b[14])&&this.Ld.length>8&255)}var Y=[,,function(a){a+=this.offset;return(this.ea.kb=this.la[a])>>this.ea.Ci&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.la[b]>>8:this.la[b])&255}]; +Y[16]=function(a){a+=this.offset;a=this.la[a];for(var b=this.ea.Lh&this.ea.Mh,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};Y[512]=function(a,b){var c=a+this.offset,d;d=this.la[c]&~this.ea.Ua|(b|b<<8|b<<16|b<<24)&this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; Y[1024]=function(a,b){var c=a+this.offset;b=b>>this.ea.Mc|b<<8-this.ea.Mc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.Cd|this.ea.ae;d=d&this.ea.Ua|this.la[c]&~this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; Y[1536]=function(a,b){var c=a+this.offset;b=b>>this.ea.Mc|b<<8-this.ea.Mc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.Cd|this.ea.ae;d&=this.ea.kb;d=d&this.ea.Ua|this.la[c]&~this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; Y[2560]=function(a,b){var c=a+this.offset;b=b>>this.ea.Mc|b<<8-this.ea.Mc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.Cd|this.ea.ae;d|=this.ea.kb;d=d&this.ea.Ua|this.la[c]&~this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; Y[3584]=function(a,b){var c=a+this.offset;b=b>>this.ea.Mc|b<<8-this.ea.Mc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.Cd|this.ea.ae;d^=this.ea.kb;d=d&this.ea.Ua|this.la[c]&~this.ea.Ua;d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)};Y[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ea.Ua&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.la[d]&~c;c=c&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[d]!=c&&(this.la[d]=c,this.Xa=!0)}; Y[4096]=function(a){a+=this.offset;var b=this.la[a]&~this.ea.Ua|this.ea.kb&this.ea.Ua;this.la[a]!=b&&(this.la[a]=b,this.Xa=!0)};Y[8192]=function(a,b){var c=a+this.offset,d=xi[b&15],d=d&this.ea.Ua|this.la[c]&~this.ea.Ua,d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)};Y[24576]=function(a,b){var c=a+this.offset,d=xi[b&15],d=d&this.ea.kb,d=d&this.ea.Ua|this.la[c]&~this.ea.Ua,d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; Y[40960]=function(a,b){var c=a+this.offset,d=xi[b&15],d=d|this.ea.kb,d=d&this.ea.Ua|this.la[c]&~this.ea.Ua,d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)};Y[57344]=function(a,b){var c=a+this.offset,d=xi[b&15],d=d^this.ea.kb,d=d&this.ea.Ua|this.la[c]&~this.ea.Ua,d=d&this.ea.Za|this.ea.kb&~this.ea.Za;this.la[c]!=d&&(this.la[c]=d,this.Xa=!0)}; -function Ei(a){var b=[];if(void 0!==a.ng){b[0]=a.Xb;b[1]=a.hc;b[2]=a.Ye;b[3]=a.Gf;b[4]=a.rc|a.mg<<8;b[5]=a.Ub;if(5==a.ng){var c=[];c[0]=a.vd;c[1]=a.Yd;c[2]=a.Id;c[3]=a.Ri;c[4]=a.sg;c[5]=a.Ah;c[6]=a.ve;c[7]=a.Of;c[8]=a.Dh;c[9]=a.Eh;c[10]=a.ue;c[11]=a.je;c[12]=a.kb;c[13]=a.Ac;var d;a:if(d=a.Ld){var e=0,f=[];if(void 0!==d[0])for(var l=0;2>l;l++)for(var k=l;k>1;f[e++]=m;k=n}if(f.lengthl;l++)for(var k=l;k>1;f[e++]=m;k=n}if(f.length>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),Qa(this.ma,b,c|d<<8);$a(this,!0)}};function Li(a){a.ja.sg&1?(a.zc=a.gh,a.Mb=a.ja):(a.zc=a.ja,a.Mb=a.$f)}g.save=function(){var a=new H(this);a.set(0,Ei(this.gh));a.set(1,Ei(this.$f));a.set(2,[this.Ad,this.Nc,this.zd]);a.set(3,Ei(this.ja));return a.data()}; -g.restore=function(a){var b=a[2];this.Ad=b[0];this.Nc=b[1];this.zd=b[2];this.za=null;this.zc=this.gh=new yi(this,1,a[0]);this.Mb=this.$f=new yi(this,3,a[1]);this.ja=new yi(this,5,a[3],this.Ac);this.ja.Xb&&Li(this);Mi(this);if(!Oi(this))return!1;Pi(this);return!0}; +g.reset=function(){var a=!0,b=0;this.ga&&(b=nh(this.ga));var c=!1;if(this.Ca)switch(this.Ca){case "ega":var c=!0,d=ri[this.Sf];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.Ad!==b&&(this.Ad=b,a=!0);this.za=null;this.Ac=this.fh=new yi(this,1);this.Mb=this.$f=new yi(this,3);c?(this.ja=new yi(this,5,null,this.Bc),Li(this)):this.ja=new yi;Mi(this);this.zd=null;this.Nc=3==b?pi:3;this.Sd=this.tc=-1;this.Rd=0;Ni(this,this.Nc);if(this.za.ab&&a){a=this.za.ab+this.gh;for(b=this.za.ab;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),Qa(this.ma,b,c|d<<8);$a(this,!0)}};function Li(a){a.ja.sg&1?(a.Ac=a.fh,a.Mb=a.ja):(a.Ac=a.ja,a.Mb=a.$f)}g.save=function(){var a=new H(this);a.set(0,Ei(this.fh));a.set(1,Ei(this.$f));a.set(2,[this.Ad,this.Nc,this.zd]);a.set(3,Ei(this.ja));return a.data()}; +g.restore=function(a){var b=a[2];this.Ad=b[0];this.Nc=b[1];this.zd=b[2];this.za=null;this.Ac=this.fh=new yi(this,1,a[0]);this.Mb=this.$f=new yi(this,3,a[1]);this.ja=new yi(this,5,a[3],this.Bc);this.ja.Yb&&Li(this);Mi(this);if(!Oi(this))return!1;Pi(this);return!0}; g.Bm=function(a,b,c){if(c)this.xa("Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){u("Empty font ROM image: "+a);return}if(1==d.length){u(d[0]);return}if(8192==d.length)ei(this,d,[0,6144]);else{this.xa("Unrecognized font data length ("+d.length+")");return}}catch(e){this.xa("Font ROM data error: "+e.message);return}this.Pa()}}; -function Qi(a,b){if(1==b)return a.Qc[0]=W[0],a.Qc[1]=W[7],a.Qc;if(2==b){var c=a.za.Ye;if(a.za===a.ja){var d=a.ja.Id[0],c=d&7;d&16&&(c|=8);18!=a.ja.Id[1]&&(c|=32)}a.Qc[0]=W[c&15];c=c&32?vi:ui;for(d=0;dgb||!aa?gb:8,kd=Qh.createImageData(n.Vb,n.Wb),sa=0;256>sa;sa++){for(Ra= -0;Ra=gb-2,Sj=lc[Ra>(8<=sb&&176<=sa&&223>=sa?7:sb)?r:jd;Ti(kd,Rh,Sh,Th);M&&Ti(kd,Rh+1,Sh,Th)}Qh.putImageData(kd,(sa&15)*n.Vb,(sa>>4)*n.Wb)}n.ie[y]="#"+p(r[0],2)+p(r[1],2)+p(r[2],2);n.Yi[y]=r;n.Vg[y]=mc;n=!0}}a.jd[b]=s;return n}function Ui(a){0a.Sd&&(a.Sd=0):a.Sd=-1} -function Pi(a){if(a.Ab){for(var b=10;15>=b;b++)if(null==a.za.Ub[b])return;var c=a.za.Ub[10],b=c&31,d=a.za.Ub[11]&31,e=a.za.Ub[9]&31,f=!1;a.za===a.ja&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Vi(a);else{c=a.za.Ub[15]+((a.za.Ub[14]&63)<<8);a.sc!=c&&(Vi(a),a.sc=c);d=d-b+1;if(a.Xk!=b||a.kj!=d)a.Xk=b,a.kj=d;a.td=e+1;Ui(a)}}} -function Vi(a){if(0<=a.sc){if(void 0!==a.Lb){var b=a.Lb[a.sc];if(b&131072){var b=b&-131073,c=a.sc%a.lb,d=Math.floor(a.sc/a.lb);a.Ab&&a.jd[a.Ab]&&(a.pe&&Wi(a,c,d,b,a.pe),Wi(a,c,d,b));a.Lb[a.sc]=b}}a.sc=-1}} -function Xi(a){var b;a=a.za;var c=a.je[5];if(null!=c){b=2;var d=512,e=a.je[3]&31;switch(c&3){case 0:if(e){d=1024;switch(e&24){case 8:d=1536;break;case 16:d=2560;break;case 24:d=3584}a.Mc=e&7}break;case 1:d=4096;break;case 2:switch(e&24){default:d=8192;break;case 8:d=24576;break;case 16:d=40960;break;case 24:d=57344}}c&8&&(b=16);c&16&&(b|=1,d|=256);b|=d}return b}g.fe=function(a){var b=this.za;null!=a&&b&&a!=b.Jh&&(b.Ng(a),this.ma.Ng(b.ab,b.bc,b.Qe))}; -function Oi(a,b){var c,d=a.zd,e=a.za;if(e)if(1==e.ng)d=pi;else if(5==e.ng){var d=null,f=e.Ac>>2,l=32768f&&(d=c?13:14):c&&(d-=2));c=Xi(a)}}else e.hc&8&&(e.hc&2?(d=e.hc&16?6:5,e.hc&4||(d-=1)):(d=e.hc&1?3:1,e.hc&4&&(d-= +function Qi(a,b){if(1==b)return a.Qc[0]=W[0],a.Qc[1]=W[7],a.Qc;if(2==b){var c=a.za.Ye;if(a.za===a.ja){var d=a.ja.Id[0],c=d&7;d&16&&(c|=8);18!=a.ja.Id[1]&&(c|=32)}a.Qc[0]=W[c&15];c=c&32?vi:ui;for(d=0;dgb||!aa?gb:8,kd=Qh.createImageData(n.Wb,n.Xb),sa=0;256>sa;sa++){for(Ra= +0;Ra=gb-2,Sj=lc[Ra>(8<=sb&&176<=sa&&223>=sa?7:sb)?r:jd;Ti(kd,Rh,Sh,Th);M&&Ti(kd,Rh+1,Sh,Th)}Qh.putImageData(kd,(sa&15)*n.Wb,(sa>>4)*n.Xb)}n.ie[y]="#"+p(r[0],2)+p(r[1],2)+p(r[2],2);n.Yi[y]=r;n.Ug[y]=mc;n=!0}}a.jd[b]=s;return n}function Ui(a){0a.Sd&&(a.Sd=0):a.Sd=-1} +function Pi(a){if(a.Ab){for(var b=10;15>=b;b++)if(null==a.za.Vb[b])return;var c=a.za.Vb[10],b=c&31,d=a.za.Vb[11]&31,e=a.za.Vb[9]&31,f=!1;a.za===a.ja&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Vi(a);else{c=a.za.Vb[15]+((a.za.Vb[14]&63)<<8);a.tc!=c&&(Vi(a),a.tc=c);d=d-b+1;if(a.Wk!=b||a.jj!=d)a.Wk=b,a.jj=d;a.td=e+1;Ui(a)}}} +function Vi(a){if(0<=a.tc){if(void 0!==a.Lb){var b=a.Lb[a.tc];if(b&131072){var b=b&-131073,c=a.tc%a.lb,d=Math.floor(a.tc/a.lb);a.Ab&&a.jd[a.Ab]&&(a.pe&&Wi(a,c,d,b,a.pe),Wi(a,c,d,b));a.Lb[a.tc]=b}}a.tc=-1}} +function Xi(a){var b;a=a.za;var c=a.je[5];if(null!=c){b=2;var d=512,e=a.je[3]&31;switch(c&3){case 0:if(e){d=1024;switch(e&24){case 8:d=1536;break;case 16:d=2560;break;case 24:d=3584}a.Mc=e&7}break;case 1:d=4096;break;case 2:switch(e&24){default:d=8192;break;case 8:d=24576;break;case 16:d=40960;break;case 24:d=57344}}c&8&&(b=16);c&16&&(b|=1,d|=256);b|=d}return b}g.fe=function(a){var b=this.za;null!=a&&b&&a!=b.Ih&&(b.Mg(a),this.ma.Mg(b.ab,b.dc,b.Qe))}; +function Oi(a,b){var c,d=a.zd,e=a.za;if(e)if(1==e.ng)d=pi;else if(5==e.ng){var d=null,f=e.Bc>>2,l=32768f&&(d=c?13:14):c&&(d-=2));c=Xi(a)}}else e.jc&8&&(e.jc&2?(d=e.jc&16?6:5,e.jc&4||(d-=1)):(d=e.jc&1?3:1,e.jc&4&&(d-= 1)));else a.zd=null,null==d&&(d=a.Nc);if(!Ni(a,d,b))return!1;a.fe(c);return!0} -function Ni(a,b,c){if(null!=b&&(b!=a.zd||c)){a.bl=0;a.zd=b;b=a.za||(b==pi?a.zc:a.Mb);if(b!=a.za||b.ab!=a.ab||b.bc!=a.bc){Vi(a);if(a.ab){if(!Ma(a.ma,a.ab,a.bc))return!1;a.za&&(a.za.Xb=!1)}a.za=b;b.Xb=!0;a.ab=b.ab;a.bc=b.bc;if(!Ka(a.ma,b.ab,b.bc,!1,b===a.ja?b:null))return!1}a.Ab=0;a.lb=a.yg;a.$b=a.Qh;a.Lh=U[pi][2];b=0;var d=U[a.zd];d&&(a.lb=d[0],a.$b=d[1],a.Lh=d[2],b=d[3]||0,a.Ab=d[4],4==a.Ad&&a.za===a.ja&&3==a.Ab&&(7==a.ja.Ub[9]?a.$b=43:a.Ab=5));a.Bj=a.lb*a.$b;a.vg=a.Bj/a.Lh;a.hh=(a.vg<<1)+b;a.ij= -b?a.hh+b>>1:0;13<=a.zd&&(a.vg<<=1);a.jd.length&&(a.Wc=Math.floor(a.Vc/a.lb),a.Xc=Math.floor(a.ud/a.$b),a.Ab?(b=a.jd[a.Ab],d=a.jd[a.Ab<<1],a.jl&&80==a.lb?d&&a.Wc>=3*d.Vb>>2&&(a.Ab<<=1,b=d):(d&&a.Wc>=d.Vb&&(a.Ab<<=1,b=d),b&&(a.Wc=b.Vb,a.Xc=b.Wb)),a.af=a.bf=0,b&&(a.af=a.lb*b.Vb,a.bf=a.$b*b.Wb)):(a.Wc=a.Xc=1,a.af=a.lb,a.bf=a.$b),a.pg=a.Bc.createImageData(a.af,a.bf),a.oe=window.document.createElement("canvas"),a.oe.width=a.af,a.oe.height=a.bf,a.pe=a.oe.getContext("2d"),a.Ui=a.Vi=0,a.kh=a.Vc,a.lh=a.ud, -b=a.Vc-a.lb*a.Wc,d=a.ud-a.$b*a.Xc,0>1,a.kh-=b),0>1,a.lh-=d),b||d)&&(a.Bc.fillStyle=a.qb.style.backgroundColor,a.Bc.fillRect(0,0,a.Vc,a.ud));!1!==c?$a(a,!0):Yi(a,!0)}return!0}function Ti(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b+0]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Yi(a,b){var c;if(b){if(c=a.vg,void 0===a.Lb||a.Lb.length!=c)a.Lb=Array(c)}else{if(void 0===a.Lb)return;c=a.Lb.length}for(var d=0;d>8;d=l&15;var k=a.jd[a.Ab];k.Le&&(d=k.Le[d]);var m=l>>4&15;k.Le&&(m=k.Le[m]);e?(b*=k.Vb,c*=k.Wb,e.fillStyle=k.ie[m],e.fillRect(b,c,k.Vb,k.Wb)):(b=b*a.Wc+a.Ui,c=c*a.Xc+a.Vi,a.Bc.fillStyle=k.ie[m],a.Bc.fillRect(b,c,a.Wc,a.Xc));l&256&&(m=(f&15)*k.Vb,f=(f>>4)*k.Wb,e?e.drawImage(k.Vg[d],m,f,k.Vb,k.Wb,b,c,k.Vb,k.Wb):a.Bc.drawImage(k.Vg[d],m,f,k.Vb,k.Wb,b,c,a.Wc,a.Xc));l&512&&(f=a.Xk,l=a.kj,e?(a.td&&a.td!==k.Wb&&(f=Math.floor(f*k.Wb/a.td),l=Math.floor(l*k.Wb/a.td)), -e.fillStyle=k.ie[d],e.fillRect(b,c+f,k.Vb,l)):(a.td&&a.td!==a.Xc&&(f=Math.floor(f*a.Xc/a.td),l=Math.floor(l*a.Xc/a.td)),a.Bc.fillStyle=k.ie[d],a.Bc.fillRect(b,c+f,a.Wc,l)))} -function $a(a,b){if(a.zb){var c=!1;a.za&&(a.za===a.ja?a.ja.Yd&32&&(c=!0):a.za.hc&8&&(c=!0));if(c||b){if(b)Yi(a,!0);else if(void 0===a.Lb)return;var d=!1;!(b||++a.bl&15)&&0<=a.Sd&&(a.Sd++,d=!0);var e=0,f=a.Bj,c=a.za.ab,l=c+a.za.bc,k=(a.za.Ub[12]<<8)+a.za.Ub[13];a.Ab&&(k<<=1);var c=c+k,m=a.hh;c+m>l&&(m=l-c,0>m&&(m=0));l=c+m;if(k=!b){for(var k=a.ma,n=!0,q=c>>k.Ib;0a.sc)return;e=a.sc;f=e+1}}if(a.Ab){if(a.jd[a.Ab]){d= -0;k=a.Rd=0;m=1048575;a.za.hc&32&&(k=32768,m&=~k,a.Sd&2||(m&=-65537));for(c+=e<<1;c>8| -(s&255)<<8;r=k;var gb=16;q>=m))>>(gb-=m);Ti(a.pg,q++,y,n[jd])}q>V&&(V=q);y=ba&&(ba=y+1)}e+=2;l++;if(q>=a.lb){q=0;y+=2;if(y>a.$b)break;y==a.$b&&(y=1,e=c+a.ij)}}Maa;aa++)ba=V&2155905152, -0>ba&&(ba=-ba),ba=X[ba]||0,Ti(a.pg,k++,m,l[ba]),V<<=1;k>q&&(q=k);m=M&&(M=m+1)}e++;if(k>=a.lb&&(k=0,++m>a.$b))break}n>2),a=this.ja.Ri&-17|(this.Sf&1<e&&(e=0);e%b.Oh>b.vm&&(c|=1);e%=b.Ej;e>b.xm&&(c|=8);b.Th=d-e;b===a.ja?(c|=b.Gf&48^48,b.vd=!1):c=(b.Gf^=9)|240;return b.Gf=c} -var Fi={948:T.prototype.Xl,949:T.prototype.Wl,952:T.prototype.Yl,954:T.prototype.Zl,980:T.prototype.Fl,981:T.prototype.El,984:T.prototype.Gl,985:T.prototype.Dl,986:T.prototype.Hl},Gi={948:T.prototype.gn,949:T.prototype.fn,952:T.prototype.hn,980:T.prototype.Sm,981:T.prototype.Rm,984:T.prototype.Tm,985:T.prototype.Qm},Hi={960:T.prototype.xj,961:T.prototype.xj,962:T.prototype.im,964:T.prototype.hm,965:T.prototype.gm,970:T.prototype.Ql,972:T.prototype.Pl,974:T.prototype.Ol,975:T.prototype.Nl},Ii={954:T.prototype.Hk, -960:T.prototype.Gk,961:T.prototype.Gk,962:T.prototype.kn,964:T.prototype.rn,965:T.prototype.qn,970:T.prototype.bn,972:T.prototype.an,974:T.prototype.$m,975:T.prototype.Zm,986:T.prototype.Hk}; +function Ni(a,b,c){if(null!=b&&(b!=a.zd||c)){a.bl=0;a.zd=b;b=a.za||(b==pi?a.Ac:a.Mb);if(b!=a.za||b.ab!=a.ab||b.dc!=a.dc){Vi(a);if(a.ab){if(!Ma(a.ma,a.ab,a.dc))return!1;a.za&&(a.za.Yb=!1)}a.za=b;b.Yb=!0;a.ab=b.ab;a.dc=b.dc;if(!Ka(a.ma,b.ab,b.dc,!1,b===a.ja?b:null))return!1}a.Ab=0;a.lb=a.yg;a.ac=a.Ph;a.Kh=U[pi][2];b=0;var d=U[a.zd];d&&(a.lb=d[0],a.ac=d[1],a.Kh=d[2],b=d[3]||0,a.Ab=d[4],4==a.Ad&&a.za===a.ja&&3==a.Ab&&(7==a.ja.Vb[9]?a.ac=43:a.Ab=5));a.Aj=a.lb*a.ac;a.vg=a.Aj/a.Kh;a.gh=(a.vg<<1)+b;a.hj= +b?a.gh+b>>1:0;13<=a.zd&&(a.vg<<=1);a.jd.length&&(a.Wc=Math.floor(a.Vc/a.lb),a.Xc=Math.floor(a.ud/a.ac),a.Ab?(b=a.jd[a.Ab],d=a.jd[a.Ab<<1],a.jl&&80==a.lb?d&&a.Wc>=3*d.Wb>>2&&(a.Ab<<=1,b=d):(d&&a.Wc>=d.Wb&&(a.Ab<<=1,b=d),b&&(a.Wc=b.Wb,a.Xc=b.Xb)),a.af=a.bf=0,b&&(a.af=a.lb*b.Wb,a.bf=a.ac*b.Xb)):(a.Wc=a.Xc=1,a.af=a.lb,a.bf=a.ac),a.pg=a.Cc.createImageData(a.af,a.bf),a.oe=window.document.createElement("canvas"),a.oe.width=a.af,a.oe.height=a.bf,a.pe=a.oe.getContext("2d"),a.Ui=a.Vi=0,a.jh=a.Vc,a.kh=a.ud, +b=a.Vc-a.lb*a.Wc,d=a.ud-a.ac*a.Xc,0>1,a.jh-=b),0>1,a.kh-=d),b||d)&&(a.Cc.fillStyle=a.qb.style.backgroundColor,a.Cc.fillRect(0,0,a.Vc,a.ud));!1!==c?$a(a,!0):Yi(a,!0)}return!0}function Ti(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b+0]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Yi(a,b){var c;if(b){if(c=a.vg,void 0===a.Lb||a.Lb.length!=c)a.Lb=Array(c)}else{if(void 0===a.Lb)return;c=a.Lb.length}for(var d=0;d>8;d=l&15;var k=a.jd[a.Ab];k.Le&&(d=k.Le[d]);var m=l>>4&15;k.Le&&(m=k.Le[m]);e?(b*=k.Wb,c*=k.Xb,e.fillStyle=k.ie[m],e.fillRect(b,c,k.Wb,k.Xb)):(b=b*a.Wc+a.Ui,c=c*a.Xc+a.Vi,a.Cc.fillStyle=k.ie[m],a.Cc.fillRect(b,c,a.Wc,a.Xc));l&256&&(m=(f&15)*k.Wb,f=(f>>4)*k.Xb,e?e.drawImage(k.Ug[d],m,f,k.Wb,k.Xb,b,c,k.Wb,k.Xb):a.Cc.drawImage(k.Ug[d],m,f,k.Wb,k.Xb,b,c,a.Wc,a.Xc));l&512&&(f=a.Wk,l=a.jj,e?(a.td&&a.td!==k.Xb&&(f=Math.floor(f*k.Xb/a.td),l=Math.floor(l*k.Xb/a.td)), +e.fillStyle=k.ie[d],e.fillRect(b,c+f,k.Wb,l)):(a.td&&a.td!==a.Xc&&(f=Math.floor(f*a.Xc/a.td),l=Math.floor(l*a.Xc/a.td)),a.Cc.fillStyle=k.ie[d],a.Cc.fillRect(b,c+f,a.Wc,l)))} +function $a(a,b){if(a.zb){var c=!1;a.za&&(a.za===a.ja?a.ja.Yd&32&&(c=!0):a.za.jc&8&&(c=!0));if(c||b){if(b)Yi(a,!0);else if(void 0===a.Lb)return;var d=!1;!(b||++a.bl&15)&&0<=a.Sd&&(a.Sd++,d=!0);var e=0,f=a.Aj,c=a.za.ab,l=c+a.za.dc,k=(a.za.Vb[12]<<8)+a.za.Vb[13];a.Ab&&(k<<=1);var c=c+k,m=a.gh;c+m>l&&(m=l-c,0>m&&(m=0));l=c+m;if(k=!b){for(var k=a.ma,n=!0,q=c>>k.Ib;0a.tc)return;e=a.tc;f=e+1}}if(a.Ab){if(a.jd[a.Ab]){d= +0;k=a.Rd=0;m=1048575;a.za.jc&32&&(k=32768,m&=~k,a.Sd&2||(m&=-65537));for(c+=e<<1;c>8| +(s&255)<<8;r=k;var gb=16;q>=m))>>(gb-=m);Ti(a.pg,q++,y,n[jd])}q>V&&(V=q);y=ba&&(ba=y+1)}e+=2;l++;if(q>=a.lb){q=0;y+=2;if(y>a.ac)break;y==a.ac&&(y=1,e=c+a.hj)}}Maa;aa++)ba=V&2155905152, +0>ba&&(ba=-ba),ba=X[ba]||0,Ti(a.pg,k++,m,l[ba]),V<<=1;k>q&&(q=k);m=M&&(M=m+1)}e++;if(k>=a.lb&&(k=0,++m>a.ac))break}n>2),a=this.ja.Ri&-17|(this.Sf&1<e&&(e=0);e%b.Nh>b.vm&&(c|=1);e%=b.Dj;e>b.xm&&(c|=8);b.Th=d-e;b===a.ja?(c|=b.Gf&48^48,b.vd=!1):c=(b.Gf^=9)|240;return b.Gf=c} +var Fi={948:T.prototype.Xl,949:T.prototype.Wl,952:T.prototype.Yl,954:T.prototype.Zl,980:T.prototype.Fl,981:T.prototype.El,984:T.prototype.Gl,985:T.prototype.Dl,986:T.prototype.Hl},Gi={948:T.prototype.gn,949:T.prototype.fn,952:T.prototype.hn,980:T.prototype.Sm,981:T.prototype.Rm,984:T.prototype.Tm,985:T.prototype.Qm},Hi={960:T.prototype.wj,961:T.prototype.wj,962:T.prototype.im,964:T.prototype.hm,965:T.prototype.gm,970:T.prototype.Ql,972:T.prototype.Pl,974:T.prototype.Ol,975:T.prototype.Nl},Ii={954:T.prototype.Gk, +960:T.prototype.Fk,961:T.prototype.Fk,962:T.prototype.kn,964:T.prototype.rn,965:T.prototype.qn,970:T.prototype.bn,972:T.prototype.an,974:T.prototype.$m,975:T.prototype.Zm,986:T.prototype.Gk}; v(function(){for(var a=C(window.document,"pcjs","video"),b=0;bMissing <canvas> support; try a new web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.setAttribute("contenteditable","true");e.setAttribute("autocapitalize","off");e.setAttribute("autocorrect","off");e.style.backgroundColor=d.screenColor; e.style.height=c.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(e.style.height=(c.clientWidth*d.screenHeight/d.screenWidth|0)+"px",c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight));c.appendChild(e);var f=e.getContext("2d"),d=new T(d,e,f);B(d,c)}}); -function Z(a){this.uj=a.adapter;switch(this.uj){case 1:this.Ji=1016;this.rf=4;break;case 2:this.Ji=760;this.rf=3;break;default:u("Unrecognized serial adapter #"+this.uj);return}this.rd=null;w.call(this,"SerialPort",a,Z);var b=a.binding,c;a=bj;b&&(void 0===c&&(c="Panel"),(c=Ba(c,this.id))&&(b=c.oa[b])&&this.tb(null,null,a,b))}z(w,Z);var bj="buffer";g=Z.prototype;g.aj=function(a,b){return a==this.Gh?(this.yj=b,this):null}; -g.tb=function(a,b,c,d){var e=this;switch(c){case bj:return this.oa[c]=this.rd=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),cj(e,[b]))},d.onkeypress=function(a){a=a||window.event;cj(e,[a.which||a.keyCode])},!0}return!1};g.gc=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.ga=D(a,"ChipSet");Ta(b,this,dj,this.Ji);Va(b,this,ej,this.Ji);this.Pa()}; -g.Rb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Jb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.xd()};g.save=function(){var a=new H(this),b=0,c=[];c[b++]=this.dh;c[b++]=this.ej;c[b++]=this.he;c[b++]=this.Tf;c[b++]=this.md;c[b++]=this.Od;c[b++]=this.Hc;c[b++]=this.lc;c[b++]=this.cj;c[b]=this.Me;a.set(0,c);return a.data()};g.restore=function(a){return this.xd(a[0])}; -g.xd=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.dh=a[b++];this.ej=a[b++];this.he=a[b++];this.Tf=a[b++];this.md=a[b++];this.Od=a[b++];this.Hc=a[b++];this.lc=a[b++];this.cj=a[b++];this.Me=a[b];return!0};function cj(a,b){a.Me=a.Me.concat(b);fj(a)}function fj(a){0>8:this.Tf};g.Sl=function(){return this.md};g.Tl=function(){return this.Od};g.Vl=function(){return this.Hc};g.Ul=function(){return this.lc};g.am=function(){return this.cj}; -g.sn=function(a,b){if(this.Od&128)this.he=this.he&-256|b;else{this.ej=b;this.lc&=-97;var c;this.rd?(13!=b&&(8==b?this.rd.value=this.rd.value.slice(0,-1):(this.rd.value+=String.fromCharCode(b),this.rd.scrollTop=this.rd.scrollHeight)),c=!0):c=!1;c&&(this.lc|=96)}};g.cn=function(a,b){this.Od&128?this.he=this.he&255|b<<8:this.Tf=b};g.dn=function(a,b){this.Od=b}; -g.en=function(a,b){var c=this.Hc;this.Hc=b;if(this.yj&&(c^b)&3){var c=this.yj,d=this.Hc,e=3==(d&3);if(e){if(!c.Xb){var f=!1;c.Hc&2||(c.reset(),f=!0);c.Hc&1||(f=!0);f&&cj(c.Ze,[77]);gj(c,c.qb);c.Xb=e}}else c.Xb&&(hj(c.qb),c.Xb=e);c.Hc=d}};var dj={0:Z.prototype.fm,1:Z.prototype.Rl,2:Z.prototype.Sl,3:Z.prototype.Tl,4:Z.prototype.Vl,5:Z.prototype.Ul,6:Z.prototype.am},ej={0:Z.prototype.sn,1:Z.prototype.cn,3:Z.prototype.dn,4:Z.prototype.en}; -v(function(){for(var a=C(window.document,"pcjs","serial"),b=0;ba.Hf||0>a.If)a.Hf=b.clientX,a.If=b.clientY;a.Ge=b.clientX-a.Hf;a.He=b.clientY-a.If;(a.Ge||a.He)&&jj(a);a.Hf=b.clientX;a.If=b.clientY}},!1),b.addEventListener("mousedown",function(b){kj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){kj(a,b.button,!1)},!1),a.sh=!0),b.style.cursor="none")}function hj(a){a&&(a.style.cursor="auto")} -function kj(a,b,c){if(a.Xb&&a.ia&&a.ia.qc)switch(b){case 0:a.eg!=c&&(a.eg=c,jj(a));break;case 2:a.fg!=c&&(a.fg=c,jj(a))}}function jj(a){cj(a.Ze,[64|(a.eg?32:0)|(a.fg?16:0)|(a.He&192)>>4|(a.Ge&192)>>6,a.Ge&63,a.He&63]);a.Ge=a.He=0}v(function(){for(var a=C(window.document,"pcjs","mouse"),b=0;bb.indexOf("/api/v1/dump")&&(a=ea(b),"json"==a?d=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(a="action=open&volume="+b+("&mode="+this.mode),a+="&chs="+this.ic+":"+this.Yb+":"+this.Fc+":"+this.yb,a+="&machine="+this.ea.te(),a+="&user="+this.ea.wd(),d=ka()+"/api/v1/disk?"+a,this.wh=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): +function Z(a){this.tj=a.adapter;switch(this.tj){case 1:this.Ji=1016;this.rf=4;break;case 2:this.Ji=760;this.rf=3;break;default:u("Unrecognized serial adapter #"+this.tj);return}this.rd=null;w.call(this,"SerialPort",a,Z);var b=a.binding,c;a=bj;b&&(void 0===c&&(c="Panel"),(c=Ba(c,this.id))&&(b=c.oa[b])&&this.ub(null,null,a,b))}z(w,Z);var bj="buffer";g=Z.prototype;g.aj=function(a,b){return a==this.Fh?(this.xj=b,this):null}; +g.ub=function(a,b,c,d){var e=this;switch(c){case bj:return this.oa[c]=this.rd=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),cj(e,[b]))},d.onkeypress=function(a){a=a||window.event;cj(e,[a.which||a.keyCode])},!0}return!1};g.ic=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.ga=D(a,"ChipSet");Ta(b,this,dj,this.Ji);Va(b,this,ej,this.Ji);this.Pa()}; +g.Sb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Jb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.xd()};g.save=function(){var a=new H(this),b=0,c=[];c[b++]=this.bh;c[b++]=this.ej;c[b++]=this.he;c[b++]=this.Tf;c[b++]=this.md;c[b++]=this.Od;c[b++]=this.Hc;c[b++]=this.mc;c[b++]=this.cj;c[b]=this.Me;a.set(0,c);return a.data()};g.restore=function(a){return this.xd(a[0])}; +g.xd=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.bh=a[b++];this.ej=a[b++];this.he=a[b++];this.Tf=a[b++];this.md=a[b++];this.Od=a[b++];this.Hc=a[b++];this.mc=a[b++];this.cj=a[b++];this.Me=a[b];return!0};function cj(a,b){a.Me=a.Me.concat(b);fj(a)}function fj(a){0>8:this.Tf};g.Sl=function(){return this.md};g.Tl=function(){return this.Od};g.Vl=function(){return this.Hc};g.Ul=function(){return this.mc};g.am=function(){return this.cj}; +g.sn=function(a,b){if(this.Od&128)this.he=this.he&-256|b;else{this.ej=b;this.mc&=-97;var c;this.rd?(13!=b&&(8==b?this.rd.value=this.rd.value.slice(0,-1):(this.rd.value+=String.fromCharCode(b),this.rd.scrollTop=this.rd.scrollHeight)),c=!0):c=!1;c&&(this.mc|=96)}};g.cn=function(a,b){this.Od&128?this.he=this.he&255|b<<8:this.Tf=b};g.dn=function(a,b){this.Od=b}; +g.en=function(a,b){var c=this.Hc;this.Hc=b;if(this.xj&&(c^b)&3){var c=this.xj,d=this.Hc,e=3==(d&3);if(e){if(!c.Yb){var f=!1;c.Hc&2||(c.reset(),f=!0);c.Hc&1||(f=!0);f&&cj(c.Ze,[77]);gj(c,c.qb);c.Yb=e}}else c.Yb&&(hj(c.qb),c.Yb=e);c.Hc=d}};var dj={0:Z.prototype.fm,1:Z.prototype.Rl,2:Z.prototype.Sl,3:Z.prototype.Tl,4:Z.prototype.Vl,5:Z.prototype.Ul,6:Z.prototype.am},ej={0:Z.prototype.sn,1:Z.prototype.cn,3:Z.prototype.dn,4:Z.prototype.en}; +v(function(){for(var a=C(window.document,"pcjs","serial"),b=0;ba.Hf||0>a.If)a.Hf=b.clientX,a.If=b.clientY;a.Ge=b.clientX-a.Hf;a.He=b.clientY-a.If;(a.Ge||a.He)&&jj(a);a.Hf=b.clientX;a.If=b.clientY}},!1),b.addEventListener("mousedown",function(b){kj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){kj(a,b.button,!1)},!1),a.rh=!0),b.style.cursor="none")}function hj(a){a&&(a.style.cursor="auto")} +function kj(a,b,c){if(a.Yb&&a.ia&&a.ia.rc)switch(b){case 0:a.eg!=c&&(a.eg=c,jj(a));break;case 2:a.fg!=c&&(a.fg=c,jj(a))}}function jj(a){cj(a.Ze,[64|(a.eg?32:0)|(a.fg?16:0)|(a.He&192)>>4|(a.Ge&192)>>6,a.Ge&63,a.He&63]);a.Ge=a.He=0}v(function(){for(var a=C(window.document,"pcjs","mouse"),b=0;bb.indexOf("/api/v1/dump")&&(a=ea(b),"json"==a?d=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(a="action=open&volume="+b+("&mode="+this.mode),a+="&chs="+this.Zb+":"+this.Pb+":"+this.bc+":"+this.rb,a+="&machine="+this.ea.te(),a+="&user="+this.ea.wd(),d=ka()+"/api/v1/disk?"+a,this.vh=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): -1!==b.indexOf("/",b.length-1)&&(c="dir"),d=ka()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.re?"":d)+"&format=json"));t(d,!0,null,this,this.ym,b)}; -g.ym=function(a,b,c,d){var e=null;this.se=!1;var f=0>c&&this.Fa&&!this.Fa.zb;if(this.wh)c?this.xa('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Zc=!0,e=this);else if(c)this.xa('Unable to load disk "'+this.fd+'" (error '+c+")",f);else try{if(0l&&0b.indexOf("0x")&&'["'!= +g.ym=function(a,b,c,d){var e=null;this.se=!1;var f=0>c&&this.Fa&&!this.Fa.zb;if(this.vh)c?this.xa('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Zc=!0,e=this);else if(c)this.xa('Unable to load disk "'+this.fd+'" (error '+c+")",f);else try{if(0l&&0b.indexOf("0x")&&'["'!= b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(k.length)if(1==k.length)u(k[0]);else{for(b=a=0;b>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var s=m.data;if(void 0===s){var r=m.bytes;if(void 0!==r&&r.length){for(var f=n<<2,y=r.length;yb&&(b=0);2E3b&&(b=0);2E3>2,e=Array(d),f=0;f>2,e=a.data;a=a.pattern;for(var f=0;f>8&255;c[d++]=l>>16&255;c[d++]=l>>24&255}return c}function tj(a,b){var c=-1;if(b>2,c=(d>((b&3)<<3)&255;return c} -g.write=function(a,b,c){if(this.se)return!1;if(b>2;b=(b&3)<<3;for(var l=d.length;l<=f;l++)d[l]=e;a.nc?f=a.Ec+a.nc&&(a.nc+=f-(a.Ec+a.nc)+1):(a.Ec=f,a.nc=1);d[f]=d[f]&~(255<>2;b=(b&3)<<3;for(var l=d.length;l<=f;l++)d[l]=e;a.oc?f=a.Fc+a.oc&&(a.oc+=f-(a.Fc+a.oc)+1):(a.Fc=f,a.oc=1);d[f]=d[f]&~(255<=this.Fb.length||m>=this.Fb[k].length||n>=this.Fb[k][m].length){c="sector "+k+":"+m+":"+n+" out of range ("+b+" changes applied)";b=-1;break}if(this.se){c="unable to modify write-protected disk";b=-1;break}e= -l[f++];f=l[f++];l=e+f.length;k=this.Fb[k][m][n];for(m=k.data.length;mb&&this.xa("unable to restore disk '"+this.fd+": "+c);return b}; -function uj(a){w.call(this,"FDC",a,uj);this.dmaRead=this.mh;this.dmaWrite=this.nh;this.dmaFormat=this.dl;this.ce=null;if(a.autoMount&&(this.ce=a.autoMount,"string"==typeof this.ce))try{this.ce=eval("("+a.autoMount+")")}catch(b){u("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.ce=null}this.cc=[];this.$c();this.Re()||this.Pa()}z(w,uj);h={};ca={}; +l[f++];f=l[f++];l=e+f.length;k=this.Fb[k][m][n];for(m=k.data.length;mb&&this.xa("unable to restore disk '"+this.fd+": "+c);return b}; +function uj(a){w.call(this,"FDC",a,uj);this.dmaRead=this.lh;this.dmaWrite=this.mh;this.dmaFormat=this.dl;this.ce=null;if(a.autoMount&&(this.ce=a.autoMount,"string"==typeof this.ce))try{this.ce=eval("("+a.autoMount+")")}catch(b){u("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.ce=null}this.ec=[]}z(w,uj);h={};ca={}; var vj={3:{Uc:3,qd:0,name:ca.eo},4:{Uc:2,qd:1,name:ca.bo},5:{Uc:9,qd:7,name:ca.oo},6:{Uc:9,qd:7,name:ca.Xn},7:{Uc:2,qd:0,name:ca.Zn},8:{Uc:1,qd:2,name:ca.co},10:{Uc:2,qd:7,name:ca.Yn},13:{Uc:6,qd:7,name:ca.Rn},15:{Uc:3,qd:0,name:ca.ao}};g=uj.prototype; -g.tb=function(a,b,c,d){switch(c){case "listDisks":return this.oa[c]=d,a=window.document.createElement("option"),a.value="?",a.innerHTML="User-defined URL...",d.appendChild(a),d.onchange=function(a,b){return function(){var c=a.oa.descDisk;if(c){var d=b.options[b.selectedIndex];if(d){var m={};if(d=d.getAttribute("data-value"))try{m=eval("({"+d+"})")}catch(n){u("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d=''+d+"");c.innerHTML= -d}}}}(this,d),!0;case "descDisk":case "listDrives":return this.oa[c]=d,d.onchange=function(a,b){return function(){var c=parseInt(b.value,10);isNaN(c)||wj(a,c)}}(this,d),!0;case "loadDrive":return this.oa[c]=d,d.onclick=function(a){return function(){var b,c=a.oa.listDisks,d=a.oa.listDrives;if(c&&d&&!isNaN(b=parseInt(d.value,10))&&0<=b&&ba.ra.restore(f)&&(e=!1);e&&a.ra&&void 0!==a.Ta&&(a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka));return e};g.Pi=function(){for(var a=0,b=[],c=0;ca.ic&&(this.xa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Sa)),b=null);b&&(a.ra=b,a.Pk=c,a.ee=d,Dj(this,c,d,b),this.Fd|=128,this.xa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Sa),a.Xd));a.Xd&&(a.Xd=!1,--this.Qd||this.Pa());wj(this,a.Sa)}; -function wj(a,b){if(0<=b&&b=this.Wa&&(this.sa&=-81,this.hb=this.Wa=0);return a}; -g.Xm=function(a,b){this.Wa=vj[c].Uc){var d=!1;this.hb=0;var e,f,c=this.Ga()&31;switch(c){case 3:this.Ga(h.fo);this.Ga(h.Tn);this.pb();break;case 4:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];this.pb();this.Va((e.Ra&4278190080)>>>24,h.ko);break;case 5:case 6:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];e.Ea=f>>2&1;e.cb=this.Ga(h.Rg);this.Ga(h.Sg);e.Ka=this.Ga(h.Ug);d=this.Ga(h.Jf);e.$a=128<>2&1;e.Ka=1;d=0;e.Ra=0;e.ra&&(e.Ja=e.ra.seek(e.cb,e.Ea,e.Ka))? -d=e.Ja.length:e.Ra=1088;Ej(this,e);Fj(this,e);Gj(this,e);this.Va(e.cb,h.Rg);this.Va(e.Ea,h.Sg);this.Va(e.Ka,h.Ug);this.Va(d,h.Jf);d=!0;break;case 13:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];e.Ea=f>>2&1;d=this.Ga(h.Jf);e.$a=128<>2&1,c=this.Ga(h.Vn), -e.cb+=c-e.ld,0>e.cb&&(e.cb=0),e.cb>=e.ic&&(e.cb=e.ic-1),e.ld=c,e.Ra=32,0==e.cb&&(e.Ra|=268435456),this.pb(),d=!0}0>>8,h.io)}function Gj(a,b){a.Va((b.Ra&16711680)>>>16,h.jo)}g.mh=function(a,b,c){void 0===b||0>b?this.uc(a,c):c(-1,!1)};g.nh=function(a,b){return void 0!==b&&0<=b?this.wc(a,b):-1};g.dl=function(a,b){return void 0!==b&&0<=b?this.Ti(a,b):-1};g.oh=function(a){a.Ra=72;a.ra&&(a.Ja=null,a.Ra=0,this.ga&&(Eh(this.ga,2,this,"dmaRead",a),Ch(this.ga,2)))}; -g.ph=function(a){a.Ra=72;a.ra&&(a.ra.se?a.Ra=576:(a.Ja=null,a.Ra=0,this.ga&&(Eh(this.ga,2,this,"dmaWrite",a),Ch(this.ga,2))))};g.lj=function(a){a.Ra=72;a.ra&&(a.Ja=null,a.Ra=0,this.ga&&(a.Td=0,a.dc=Array(4),a.Se=!0,a.Xe=0,Eh(this.ga,2,this,"dmaFormat",a),Ch(this.ga,2),a.Se=!1))};g.uc=function(a,b){var c=-1;if(!a.Ra&&a.ra){do{if(a.Ja&&0<=(c=tj(a.Ja,a.Ta++)))break;a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka);if(!a.Ja){a.Ra=1088;break}a.Ta=0;this.Pe(a)}while(1)}b(c,!1)}; -g.wc=function(a,b){if(a.Ra||!a.ra)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.Ta++,b))break;a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka);if(!a.Ja){a.Ra=8256;b=-1;break}a.Ta=0;this.Pe(a)}while(1);return b};g.Pe=function(a){a.Ka++;a.Ka>=a.Fc+1&&(a.Ka=1,a.Ea++,a.Ea>=a.Yb&&(a.Ea=0,a.cb++))};g.Ti=function(a,b){if(a.Ra)return-1;a.dc[a.Td++]=b;if(a.Td==a.dc.length){a.cb=a.dc[0];a.Ea=a.dc[1];a.Ka=a.dc[2];a.$a=128<this.wc(a,a.bj))return-1;a.Xe++}a.Xe>=a.od&&(b=-1);return b}; +g.ub=function(a,b,c,d){switch(c){case "listDisks":return this.oa[c]=d,a=window.document.createElement("option"),a.value="?",a.innerHTML="User-defined URL...",d.appendChild(a),d.onchange=function(a,b){return function(){var c=a.oa.descDisk;if(c){var d=b.options[b.selectedIndex];if(d){var m={};if(d=d.getAttribute("data-value"))try{m=eval("({"+d+"})")}catch(n){u("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d=''+d+"");c.innerHTML= +d}}}}(this,d),!0;case "descDisk":case "listDrives":return this.oa[c]=d,d.onchange=function(a,b){return function(){var c=parseInt(b.value,10);isNaN(c)||wj(a,c)}}(this,d),!0;case "loadDrive":return this.oa[c]=d,d.onclick=function(a){return function(){var b,c=a.oa.listDisks,d=a.oa.listDrives;if(c&&d&&!isNaN(b=parseInt(d.value,10))&&0<=b&&ba.ra.restore(f)&&(e=!1);e&&a.ra&&void 0!==a.Ta&&(a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka));return e};g.Pi=function(){for(var a=0,b=[],c=0;ca.Zb&&(this.xa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Sa)),b=null);b&&(a.ra=b,a.Ok=c,a.ee=d,Dj(this,c,d,b),this.Fd|=128,this.xa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Sa),a.Xd));a.Xd&&(a.Xd=!1,--this.Qd||this.Pa());wj(this,a.Sa)}; +function wj(a,b){if(0<=b&&b=this.Wa&&(this.sa&=-81,this.hb=this.Wa=0);return a}; +g.Xm=function(a,b){this.Wa=vj[c].Uc){var d=!1;this.hb=0;var e,f,c=this.Ga()&31;switch(c){case 3:this.Ga(h.fo);this.Ga(h.Tn);this.pb();break;case 4:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];this.pb();this.Va((e.Ra&4278190080)>>>24,h.ko);break;case 5:case 6:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];e.Ea=f>>2&1;e.cb=this.Ga(h.Qg);this.Ga(h.Rg);e.Ka=this.Ga(h.Tg);d=this.Ga(h.Jf);e.$a=128<>2&1;e.Ka=1;d=0;e.Ra=0;e.ra&&(e.Ja=e.ra.seek(e.cb,e.Ea,e.Ka))? +d=e.Ja.length:e.Ra=1088;Ej(this,e);Fj(this,e);Gj(this,e);this.Va(e.cb,h.Qg);this.Va(e.Ea,h.Rg);this.Va(e.Ka,h.Tg);this.Va(d,h.Jf);d=!0;break;case 13:f=this.Ga(h.Ie);this.Sa=f&3;e=this.ta[this.Sa];e.Ea=f>>2&1;d=this.Ga(h.Jf);e.$a=128<>2&1,c=this.Ga(h.Vn), +e.cb+=c-e.ld,0>e.cb&&(e.cb=0),e.cb>=e.Zb&&(e.cb=e.Zb-1),e.ld=c,e.Ra=32,0==e.cb&&(e.Ra|=268435456),this.pb(),d=!0}0>>8,h.io)}function Gj(a,b){a.Va((b.Ra&16711680)>>>16,h.jo)}g.lh=function(a,b,c){void 0===b||0>b?this.vc(a,c):c(-1,!1)};g.mh=function(a,b){return void 0!==b&&0<=b?this.xc(a,b):-1};g.dl=function(a,b){return void 0!==b&&0<=b?this.Ti(a,b):-1};g.nh=function(a){a.Ra=72;a.ra&&(a.Ja=null,a.Ra=0,this.ga&&(Eh(this.ga,2,this,"dmaRead",a),Ch(this.ga,2)))}; +g.oh=function(a){a.Ra=72;a.ra&&(a.ra.se?a.Ra=576:(a.Ja=null,a.Ra=0,this.ga&&(Eh(this.ga,2,this,"dmaWrite",a),Ch(this.ga,2))))};g.kj=function(a){a.Ra=72;a.ra&&(a.Ja=null,a.Ra=0,this.ga&&(a.Td=0,a.fc=Array(4),a.Se=!0,a.Xe=0,Eh(this.ga,2,this,"dmaFormat",a),Ch(this.ga,2),a.Se=!1))};g.vc=function(a,b){var c=-1;if(!a.Ra&&a.ra){do{if(a.Ja&&0<=(c=tj(a.Ja,a.Ta++)))break;a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka);if(!a.Ja){a.Ra=1088;break}a.Ta=0;this.Pe(a)}while(1)}b(c,!1)}; +g.xc=function(a,b){if(a.Ra||!a.ra)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.Ta++,b))break;a.Ja=a.ra.seek(a.cb,a.Ea,a.Ka);if(!a.Ja){a.Ra=8256;b=-1;break}a.Ta=0;this.Pe(a)}while(1);return b};g.Pe=function(a){a.Ka++;a.Ka>=a.bc+1&&(a.Ka=1,a.Ea++,a.Ea>=a.Pb&&(a.Ea=0,a.cb++))};g.Ti=function(a,b){if(a.Ra)return-1;a.fc[a.Td++]=b;if(a.Td==a.fc.length){a.cb=a.fc[0];a.Ea=a.fc[1];a.Ka=a.fc[2];a.$a=128<this.xc(a,a.bj))return-1;a.Xe++}a.Xe>=a.od&&(b=-1);return b}; var zj={1012:uj.prototype.Ml,1013:uj.prototype.Kl,1015:uj.prototype.Ll},Aj={1010:uj.prototype.Ym,1013:uj.prototype.Xm,1015:uj.prototype.Wm};v(function(){for(var a=C(window.document,"pcjs","fdc"),b=0;b=e&&(this.Af|=(f.type&3)<<(1-e<<1))}return d}; -g.Ni=function(){var a=0,b=[];this.Wd?(b[a++]=this.Ed,b[a++]=this.Ok,b[a++]=this.Ig,b[a++]=this.Jg,b[a++]=this.Hg,b[a++]=this.Gg,b[a++]=this.Ae,b[a++]=this.sa,b[a++]=this.Li):(b[a++]=this.Af,b[a++]=this.sa,b[a++]=this.Kb,b[a++]=this.hb,b[a++]=this.Wa,b[a++]=this.Nk,b[a++]=this.Mk,b[a++]=this.Lk,b[a++]=this.ff);b[a]=this.Pi();return b}; -g.Hh=function(a,b,c,d,e){var f=0,l=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.Sa=a;b.errorCode=d[f++];b.Tk=d[f++];b.re=d[f++];b.ke=d[f++];b.le=d[f++];b.Ea=d[f++];b.Yb=d[f++];b.Hd=d[f++];b.Ka=d[f++];b.od=d[f++];b.$a=d[f++];b.Yf=this.Wd?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.wd()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hj[this.gf][b.type])b.type=this.pl;c=Hj[this.gf][b.type]; -b.Fc=c[2]||17;b.yb=c[3]||512;if(e&&this.ga&&(e=this.ga,c=b.type,e.ka)){var k=e.ka[18],k=a?k&240|c:k&15|c<<4;e.ka&&(e.ka[18]=k,qh(e))}void 0===b.ra&&(b.ra=null,this.xa("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Mj(this,b);b.Ta=d[f++];b.Ja=null;b.ra&&(a=d[f],void 0!==a&&0>b.ra.restore(a)&&(l=!1),l&&void 0!==b.Ta&&(b.Ja=b.ra.seek(b.Hd,b.Ea,b.Ka+b.Yf)));return l};g.Pi=function(){for(var a=0,b=[],c=0;c=this.Wa&&(this.hb=this.Wa=0,this.sa&=-15);return a};g.un=function(a,b){this.Wa=c&&(this.sa|=2,this.sa&=-2,Nj(this))};g.mm=function(){var a=this.sa;this.hb=this.Oa.yb){var b=this;this.uc(this.Oa,function(a){0<=a?b.ga&&R(b.ga,14):(b.sa=1,b.Ed=16)},!1)}else this.sa=80;return a}; -g.Lm=function(a,b){this.Oa&&this.Oa.$a>=this.Oa.yb&&(0>this.wc(this.Oa,b)?(this.sa=1,this.Ed=16):this.Oa.Ta==this.Oa.yb&&(this.Oa.$a-=this.Oa.yb,this.ga&&R(this.ga,14),this.Oa.$a>=this.Oa.yb||(this.sa=80)))};g.zl=function(){return this.Ed};g.Pm=function(a,b){this.Ok=b};g.Al=function(){return this.Ig};g.Nm=function(a,b){this.Ig=b};g.Bl=function(){return this.Jg};g.Om=function(a,b){this.Jg=b};g.wl=function(){return this.Hg};g.Km=function(a,b){this.Hg=b};g.vl=function(){return this.Gg}; -g.Jm=function(a,b){this.Gg=b};g.yl=function(){return this.Ae};g.Mm=function(a,b){this.Ae=b;this.sa=this.ta[this.Ae&16?1:0]?this.sa|64:this.sa&-65};g.Cl=function(){return this.sa};g.Im=function(a,b){this.Li=b;this.ga&&Kh(this.ga,14);Oj(this)}; -function Oj(a){var b=!1,c=a.Li,d=a.Ae&16?1:0,e=a.Ae&15,f=a.Hg|(a.Gg&3)<<8,l=a.Jg,k=a.Ig;a.Oa=null;a.Ed=0;a.sa=80;(d=a.ta[d])?(d.Hd=f,d.Ea=e,d.Ka=l,d.$a=k*d.yb,c=144<=c?c:c&240,d.Ja=null,d.errorCode=0,a.Oa=d):c=-1;switch(c&240){case 32:a.uc(d,function(b){0<=b&&a.ga?(R(a.ga,14),a.sa=136):(a.sa=1,a.Ed=16)},!1);break;case 48:a.ga?(R(a.ga,14),a.sa=136):(a.sa=1,a.Ed=4);break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.Ed=1;b=!0;break;case 145:d.Yb=e+1,d.Fc=k,b=!0}b&&a.ga&&R(a.ga,14)} -function Nj(a){a.hb=0;var b=a.Ga(),c=a.Ga(),d=c&32,e=d>>5,f=c&31,l=a.Ga(),k=a.Ga(),m=l<<2&768|k,n=l&63,q=a.Ga(),s=a.Ga(),r=a.ta[e];r&&(r.Hd=m,r.Ea=f,r.Ka=n,r.$a=q*r.yb);switch(b){case 3:a.pb(r?r.errorCode:4);a.Va(c);a.Va(l);a.Va(k);a.Va(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.Ga());)r&&cb?this.uc(a,c):c(-1,!1)}; -g.nh=function(a,b){return void 0!==b&&0<=b?this.wc(a,b):-1};g.el=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Ta=a.Fc+b&&(a.Ka=b,a.Ea++,a.Ea>=a.Yb&&(a.Ea=0,a.Hd++))}; -g.Ti=function(a,b){if(a.errorCode)return-1;a.dc[a.Td++]=b;if(a.Td==a.dc.length){a.Hd=a.dc[0];a.Ea=a.dc[1];a.Ka=a.dc[2];a.$a=128<this.wc(a,a.bj))return-1;a.Xe++}a.Xe>=a.od&&(b=-1);return b}; +function $(a){w.call(this,"HDC",a,$);this.dmaRead=this.lh;this.dmaWrite=this.mh;this.dmaWriteBuffer=this.el;this.dmaWriteFormat=this.fl;this.Vg=[];if(a.drives)try{this.Vg=eval("("+a.drives+")")}catch(b){u("HDC drive configuration error: "+b.message+" ("+a.drives+")")}this.gf=(this.Wd="at"==a.type)?1:0;this.pl=this.Wd?2:3}z(w,$); +var Hj=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7]}];g=$.prototype;g.ub=function(){return!1};g.ic=function(a,b,c,d){this.ma=b;this.ia=c;this.Na=d;this.Fa=a;this.ga=D(a,"ChipSet");Ta(b,this,this.Wd?Ij:Jj);Va(b,this,this.Wd?Kj:Lj);this.reset();this.Re()||this.Pa()}; +g.Sb=function(a,b){if(!b)if(!a||!this.restore)this.$c(),this.Fa.wh&&this.Re(!0);else if(!this.restore(a))return!1;return!0};g.Jb=function(a){return a&&this.save?this.save():!0};g.te=function(){return this.Fa?this.Fa.te():""};g.wd=function(){return this.Fa?this.Fa.wd():""};g.reset=function(){this.$c(null,!0)};g.save=function(){var a=new H(this);a.set(0,this.Ni());return a.data()};g.restore=function(a){return this.$c(a[0])}; +g.$c=function(a,b){var c=0,d=!0;if(this.Wd)null==a&&(a=[0,0,0,0,0,0,0,0,64,0]),this.Ed=a[c++],this.Nk=a[c++],this.Hg=a[c++],this.Ig=a[c++],this.Gg=a[c++],this.Fg=a[c++],this.Ae=a[c++],this.sa=a[c++],this.Li=a[c++];else{null==a&&(a=[0,0,Array(14),0,0]);this.Af=a[c++];this.sa=a[c++];this.Kb=a[c++];this.hb=a[c++];this.Wa=a[c++];this.Mk=a[c++];this.Lk=a[c++];this.Kk=a[c++];var e=a[c++];void 0!==e?this.ff=e:void 0===this.ff&&(this.ff=-1)}void 0===this.ta&&(this.ta=Array(this.Vg.length));c=a[c];void 0=== +c&&(c=[]);for(e=0;e=e&&(this.Af|=(f.type&3)<<(1-e<<1))}return d}; +g.Ni=function(){var a=0,b=[];this.Wd?(b[a++]=this.Ed,b[a++]=this.Nk,b[a++]=this.Hg,b[a++]=this.Ig,b[a++]=this.Gg,b[a++]=this.Fg,b[a++]=this.Ae,b[a++]=this.sa,b[a++]=this.Li):(b[a++]=this.Af,b[a++]=this.sa,b[a++]=this.Kb,b[a++]=this.hb,b[a++]=this.Wa,b[a++]=this.Mk,b[a++]=this.Lk,b[a++]=this.Kk,b[a++]=this.ff);b[a]=this.Pi();return b}; +g.Gh=function(a,b,c,d,e){var f=0,l=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.Sa=a;b.errorCode=d[f++];b.Sk=d[f++];b.re=d[f++];b.ke=d[f++];b.le=d[f++];b.Ea=d[f++];b.Pb=d[f++];b.Hd=d[f++];b.Ka=d[f++];b.od=d[f++];b.$a=d[f++];b.Yf=this.Wd?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.wd()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hj[this.gf][b.type])b.type=this.pl;c=Hj[this.gf][b.type]; +b.bc=c[2]||17;b.rb=c[3]||512;if(e&&this.ga&&(e=this.ga,c=b.type,e.ka)){var k=e.ka[18],k=a?k&240|c:k&15|c<<4;e.ka&&(e.ka[18]=k,qh(e))}void 0===b.ra&&(b.ra=null,this.xa("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Mj(this,b);b.Ta=d[f++];b.Ja=null;b.ra&&(a=d[f],void 0!==a&&0>b.ra.restore(a)&&(l=!1),l&&void 0!==b.Ta&&(b.Ja=b.ra.seek(b.Hd,b.Ea,b.Ka+b.Yf)));return l};g.Pi=function(){for(var a=0,b=[],c=0;c=this.Wa&&(this.hb=this.Wa=0,this.sa&=-15);return a};g.un=function(a,b){this.Wa=c&&(this.sa|=2,this.sa&=-2,Nj(this))};g.mm=function(){var a=this.sa;this.hb=this.Oa.rb){var b=this;this.vc(this.Oa,function(a){0<=a?b.ga&&R(b.ga,14):(b.sa=1,b.Ed=16)},!1)}else this.sa=80;return a}; +g.Lm=function(a,b){this.Oa&&this.Oa.$a>=this.Oa.rb&&(0>this.xc(this.Oa,b)?(this.sa=1,this.Ed=16):this.Oa.Ta==this.Oa.rb&&(this.Oa.$a-=this.Oa.rb,this.ga&&R(this.ga,14),this.Oa.$a>=this.Oa.rb||(this.sa=80)))};g.zl=function(){return this.Ed};g.Pm=function(a,b){this.Nk=b};g.Al=function(){return this.Hg};g.Nm=function(a,b){this.Hg=b};g.Bl=function(){return this.Ig};g.Om=function(a,b){this.Ig=b};g.wl=function(){return this.Gg};g.Km=function(a,b){this.Gg=b};g.vl=function(){return this.Fg}; +g.Jm=function(a,b){this.Fg=b};g.yl=function(){return this.Ae};g.Mm=function(a,b){this.Ae=b;this.sa=this.ta[this.Ae&16?1:0]?this.sa|64:this.sa&-65};g.Cl=function(){return this.sa};g.Im=function(a,b){this.Li=b;this.ga&&Kh(this.ga,14);Oj(this)}; +function Oj(a){var b=!1,c=a.Li,d=a.Ae&16?1:0,e=a.Ae&15,f=a.Gg|(a.Fg&3)<<8,l=a.Ig,k=a.Hg;a.Oa=null;a.Ed=0;a.sa=80;(d=a.ta[d])?(d.Hd=f,d.Ea=e,d.Ka=l,d.$a=k*d.rb,c=144<=c?c:c&240,d.Ja=null,d.errorCode=0,a.Oa=d):c=-1;switch(c&240){case 32:a.vc(d,function(b){0<=b&&a.ga?(R(a.ga,14),a.sa=136):(a.sa=1,a.Ed=16)},!1);break;case 48:a.ga?(R(a.ga,14),a.sa=136):(a.sa=1,a.Ed=4);break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.Ed=1;b=!0;break;case 145:d.Pb=e+1,d.bc=k,b=!0}b&&a.ga&&R(a.ga,14)} +function Nj(a){a.hb=0;var b=a.Ga(),c=a.Ga(),d=c&32,e=d>>5,f=c&31,l=a.Ga(),k=a.Ga(),m=l<<2&768|k,n=l&63,q=a.Ga(),s=a.Ga(),r=a.ta[e];r&&(r.Hd=m,r.Ea=f,r.Ka=n,r.$a=q*r.rb);switch(b){case 3:a.pb(r?r.errorCode:4);a.Va(c);a.Va(l);a.Va(k);a.Va(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.Ga());)r&&cb?this.vc(a,c):c(-1,!1)}; +g.mh=function(a,b){return void 0!==b&&0<=b?this.xc(a,b):-1};g.el=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Ta=a.bc+b&&(a.Ka=b,a.Ea++,a.Ea>=a.Pb&&(a.Ea=0,a.Hd++))}; +g.Ti=function(a,b){if(a.errorCode)return-1;a.fc[a.Td++]=b;if(a.Td==a.fc.length){a.Hd=a.fc[0];a.Ea=a.fc[1];a.Ka=a.fc[2];a.$a=128<this.xc(a,a.bj))return-1;a.Xe++}a.Xe>=a.od&&(b=-1);return b}; var Jj={800:$.prototype.lm,801:$.prototype.mm,802:$.prototype.km},Ij={496:$.prototype.xl,497:$.prototype.zl,498:$.prototype.Al,499:$.prototype.Bl,500:$.prototype.wl,501:$.prototype.vl,502:$.prototype.yl,503:$.prototype.Cl},Lj={800:$.prototype.un,801:$.prototype.xn,802:$.prototype.wn,803:$.prototype.vn,807:$.prototype.Gi,811:$.prototype.Gi,815:$.prototype.Gi},Kj={496:$.prototype.Lm,497:$.prototype.Pm,498:$.prototype.Nm,499:$.prototype.Om,500:$.prototype.Km,501:$.prototype.Jm,502:$.prototype.Mm,503:$.prototype.Im}; v(function(){for(var a=C(window.document,"pcjs","hdc"),b=0;bXj){if(d.load(this.Ef)){this.Fe=new H(this,"1.15.5","failsafe");this.Fe.load()&&(bk(this,d),a=2);this.Fe.set("timestamp",ia());Vj(this.Fe);var e=this.jc&&!this.lg;if(1==a||la("Click OK to restore previous PCjs machine state.")){if(c=d.parse()){var f=d.get("code"),l=d.get("data");f&&("ok"==f?d.load(l):("error"==f&&"no machine state"!=l?(this.xa("Error: "+l),"unable to verify user"== -l&&(ma(""),this.vc=null)):this.Sb(f+": "+l),Tj(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&ak(this,c?d:null)}else 2==a&&d.clear()}else ak(this);delete this.Ef;delete this.Pg}e=za(this.id);for(f=0;fa[1];a=a[2];this.zb=!0;this.nj||(this.Sb("PCjs v1.15.5\nCopyright \u00a9 2012-2014 Jeff Parsons \nLicense: GPL version 3 or later "),this.nj=!0);this.ia&&ck(this,this.ia,b,c,a);this.pj&&(bk(this,b),b.clear());!c&&this.Fe&&(this.Fe.clear(),delete this.Fe)}; +g.Dg=function(a){void 0===a&&(a=this.Ef?1:this.kc);var b=!1,c=!1;this.oj=!1;var d=this.Og||new H(this,"1.15.5");if(-1==a)b=!0;else if(a>Xj){if(d.load(this.Ef)){this.Fe=new H(this,"1.15.5","failsafe");this.Fe.load()&&(bk(this,d),a=2);this.Fe.set("timestamp",ia());Vj(this.Fe);var e=this.kc&&!this.lg;if(1==a||la("Click OK to restore previous PCjs machine state.")){if(c=d.parse()){var f=d.get("code"),l=d.get("data");f&&("ok"==f?d.load(l):("error"==f&&"no machine state"!=l?(this.xa("Error: "+l),"unable to verify user"== +l&&(ma(""),this.wc=null)):this.Tb(f+": "+l),Tj(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&ak(this,c?d:null)}else 2==a&&d.clear()}else ak(this);delete this.Ef;delete this.Og}e=za(this.id);for(f=0;fa[1];a=a[2];this.zb=!0;this.mj||(this.Tb("PCjs v1.15.5\nCopyright \u00a9 2012-2014 Jeff Parsons \nLicense: GPL version 3 or later "),this.mj=!0);this.ia&&ck(this,this.ia,b,c,a);this.oj&&(bk(this,b),b.clear());!c&&this.Fe&&(this.Fe.clear(),delete this.Fe)}; function bk(a,b){if(la("There may be a problem with PCjs.\nClick OK to send your PCjs machine state to http://www.pcjs.org.")){var c=a.wd(),d=b.toString(),e={app:"PCjs",ver:"1.15.5"};e.url=a.url;e.user=c;e.type="bug";e.data=d;t("http://www.pcjs.org/api/v1/report",!0,e)}} function dk(a,b,c){var d,e="none",f=new H(a,"1.15.5"),l=new H(a,"1.15.5","validate"),k=ia();l.set("timestamp",k);f.set("timestamp",k);f.set("version","1.15.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.ia&&a.ia.Jb&&(c&&db(a.ia),d=a.ia.Jb(b,c),"object"===typeof d&&f.set(a.ia.id,d),c&&(a.ia.zb=!1,!1===d&&(e=null)));for(var k=za(a.id),m=0;m/g;f=l.exec(a);){var k=f[2],m=t(k),n=m[1];if(m[0]||!n)throw c="unable to resolve XML reference: "+f[0]+" ("+m[0]+")",Error(c);if(m=f[3]){var q=n.match(new RegExp("<"+f[1]+"[^>]*>"));if(q){for(var k=q[0],s,r=/( [a-z]+=)(['"])(.*?)\2/g;s=r.exec(m);)k=0>k.indexOf(s[1])?k.replace(">",s[0]+">"):k.replace(new RegExp(s[1]+"(['\"])(.*?)\\1"),s[0]);q[0]!=k&&(n=n.replace(q[0],k))}else throw c="missing <"+f[1]+"> in "+k,Error(c); }n=n.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(f[0],n);l.lastIndex=0}c&&(b&&0>b.indexOf("/")&&(b=window.location.pathname+b),a=a.replace(/(]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(b?" url=$2"+b+"$2":"")));if(0===a.indexOf("<"))window.ActiveXObject||"ActiveXObject"in window?(e||(a=a.replace(/\s*/g,"")),f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml");else throw Error("unrecognized XML: "+ (255