Fixed 5170 diskette drive detection (40-track vs. 80-track drives)
This commit is contained in:
parent
a474ddfa74
commit
367db06996
16 changed files with 1498 additions and 1263 deletions
37
README.md
37
README.md
|
|
@ -52,11 +52,11 @@ and the original machine are available in the [C1Pjs Documentation](/docs/c1pjs/
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Development Notes
|
Developer Notes
|
||||||
---
|
---
|
||||||
|
|
||||||
The [PCjs repository](https://github.com/jeffpar/pcjs) on GitHub contains everything used to create the [pcjs.org](http://www.pcjs.org/)
|
The [PCjs repository](https://github.com/jeffpar/pcjs) on GitHub contains everything needed to start a local
|
||||||
website, including:
|
copy of the [PCjs web server](http://www.pcjs.org/) and run PCjs simulations:
|
||||||
|
|
||||||
+ A simple Node-based web server ([server.js](server.js))
|
+ A simple Node-based web server ([server.js](server.js))
|
||||||
+ Custom Node modules used by the web server ([HTMLOut](my_modules/htmlout/), [MarkOut](my_modules/markout/), [DiskDump](my_modules/diskdump/), [FileDump](my_modules/filedump/))
|
+ Custom Node modules used by the web server ([HTMLOut](my_modules/htmlout/), [MarkOut](my_modules/markout/), [DiskDump](my_modules/diskdump/), [FileDump](my_modules/filedump/))
|
||||||
|
|
@ -64,37 +64,46 @@ website, including:
|
||||||
+ The [PCjs](my_modules/pcjs-client/lib/) and [C1Pjs](my_modules/c1pjs-client/lib/) client applications, both "compiled" and uncompiled
|
+ The [PCjs](my_modules/pcjs-client/lib/) and [C1Pjs](my_modules/c1pjs-client/lib/) client applications, both "compiled" and uncompiled
|
||||||
+ A smattering of [PCjs](docs/pcjs/) and [C1Pjs](docs/c1pjs/) documentation, along with [blog posts](blog/), related [publications](pubs/) and more
|
+ A smattering of [PCjs](docs/pcjs/) and [C1Pjs](docs/c1pjs/) documentation, along with [blog posts](blog/), related [publications](pubs/) and more
|
||||||
|
|
||||||
|
The PCjs web server is *not* required to run most PCjs simulations. Any web server (Node, Apache, Nginx, etc)
|
||||||
|
that can serve the necessary JavaScript files to your browser will work. However, instructions for doing
|
||||||
|
that are beyond the scope of this "Quick Start" document. Also, it is possible to create simulations that require
|
||||||
|
access to PCjs web server APIs; however, none of the simulations in the repository should require API access.
|
||||||
|
|
||||||
### Installing PCjs
|
### Installing PCjs
|
||||||
|
|
||||||
The following instructions were written for OS X users. However, users of other operating systems should have
|
The following instructions were written for OS X users. However, users of other operating systems should have
|
||||||
no problem following along.
|
no problem following along. There are some prerequisites:
|
||||||
|
|
||||||
Open Terminal and `cd` to a directory where you'd like to install PCjs, and run the following commands:
|
- Git (included with OS X Developer Tools; separate download required for Windows)
|
||||||
|
- Python (used by NPM and included with OS X; separate download required for Windows)
|
||||||
|
- Node with NPM (download an appropriate installation package from [nodejs.org](http://nodejs.org/download/))
|
||||||
|
|
||||||
|
Once you have the prerequisites, open a command-line window, `cd` to the directory where you'd like to install PCjs,
|
||||||
|
and type the following commands:
|
||||||
|
|
||||||
git clone git@github.com:jeffpar/pcjs.git pcjs
|
git clone git@github.com:jeffpar/pcjs.git pcjs
|
||||||
cd pcjs
|
cd pcjs
|
||||||
npm install
|
npm install
|
||||||
node server.js
|
node server.js
|
||||||
|
|
||||||
Now open a web browser and go to `http://localhost:8088/`. You're done!
|
Now open a web browser and go to `http://localhost:8088/`. Done!
|
||||||
|
|
||||||
NOTE: If you just want to run the server and don't plan to do any development, you can reduce the footprint
|
If you just want to launch the web server or don't plan to do any development, you can reduce the
|
||||||
slightly by asking NPM to install only "productions" modules:
|
footprint slightly by asking NPM to install only "productions" modules (which can also eliminate some
|
||||||
|
errors if, for example, you neglected to install Python):
|
||||||
|
|
||||||
npm install --production
|
npm install --production
|
||||||
|
|
||||||
If you ever inadvertently run `npm install` without `--production`, you can easily eliminate any unwanted
|
If you ever inadvertently run `npm install` without `--production`, you can easily uninstall all the
|
||||||
"devDependencies" with:
|
"devDependencies" listed in [package.json](package.json) with this command:
|
||||||
|
|
||||||
npm prune --production
|
npm prune --production
|
||||||
|
|
||||||
Finally, when installing the project on an AWS server, you have complete control of how Node is launched, but you
|
Finally, when installing on an AWS server, although you have complete control over how Node is launched, you
|
||||||
don't have direct control of NPM; the best you can do is set the following AWS "Environment Property":
|
don't have direct control over NPM; the best you can do is set the following AWS "Environment Property":
|
||||||
|
|
||||||
NPM_CONFIG_PRODUCTION=true
|
NPM_CONFIG_PRODUCTION=true
|
||||||
|
|
||||||
It's assumed that the OS X Developer Tools (which include Git) have already been installed, as well as
|
|
||||||
Node and NPM. Node (which now includes NPM) can be downloaded from [nodejs.org](http://nodejs.org/download/).
|
|
||||||
The current version of Node ([0.10.32](http://nodejs.org/dist/v0.10.32/node-v0.10.32.pkg) at the time of this
|
The current version of Node ([0.10.32](http://nodejs.org/dist/v0.10.32/node-v0.10.32.pkg) at the time of this
|
||||||
writing) should work fine, but version [0.10.26](http://nodejs.org/dist/v0.10.26/node-v0.10.26.pkg)
|
writing) should work fine, but version [0.10.26](http://nodejs.org/dist/v0.10.26/node-v0.10.26.pkg)
|
||||||
is what's been used to develop and test PCjs so far.
|
is what's been used to develop and test PCjs so far.
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ using the following API request:
|
||||||
|
|
||||||
http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/VC.COM;../README.md&format=json
|
http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/VC.COM;../README.md&format=json
|
||||||
|
|
||||||
The PCjs `diskdump` module processes the dump request and generates a JSON-encoded DOS 2.x-compatible disk image
|
The PCjs DiskDump module processes the dump request and generates a JSON-encoded DOS 2.x-compatible disk image
|
||||||
containing all the specified files.
|
containing all the specified files.
|
||||||
|
|
||||||
However, to avoid the PCjs web server re-generating the same disk image for every user-initiated disk load, we
|
However, to avoid the PCjs web server re-generating the same disk image for every user-initiated disk load, we
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
My (JavaScript) Coding Conventions
|
My (JavaScript) Coding Conventions
|
||||||
---
|
---
|
||||||
|
|
||||||
Some ramblings about my JavaScript coding conventions. This is not an attempt to change anyone's mind
|
Some ramblings about my JavaScript coding conventions. This is not an attempt to convince anyone of
|
||||||
about anything, just an explanation of why things are they way they are (and will be more useful once PCjs
|
anything, just an explanation of why things are they way they are (and which will be more useful once PCjs
|
||||||
moves from a private to a public GitHub repository).
|
moves from a private to a public GitHub repository in the near future).
|
||||||
|
|
||||||
### Tabs vs. Spaces
|
### Tabs vs. Spaces
|
||||||
|
|
||||||
|
|
@ -41,10 +41,10 @@ within a given file at least.
|
||||||
|
|
||||||
I still tend to follow Charles Simonyi's "[Hungarian](http://en.wikipedia.org/wiki/Hungarian_notation)" naming
|
I still tend to follow Charles Simonyi's "[Hungarian](http://en.wikipedia.org/wiki/Hungarian_notation)" naming
|
||||||
conventions -- or rather, a naming convention loosely inspired by Hungarian. I know lots of people sneer at
|
conventions -- or rather, a naming convention loosely inspired by Hungarian. I know lots of people sneer at
|
||||||
those conventions and think they're useless, and all I can say is, they're wrong: they are not useless to ME.
|
those conventions or simply think they're useless, and all I can say is, they're wrong: they are not useless to *me*.
|
||||||
|
|
||||||
I admit they may be useless to anyone who has a phenomenal memory and can remember that an obscure variable named
|
I admit they may be useless to anyone who has a phenomenal memory and can remember that an obscure variable named
|
||||||
"foo" was initialized with a string or a number, or whose IDE can answer that question with the press of a key (or two),
|
"foo" was initialized with a string or a number, or whose IDE can answer the question with the press of a key (or two),
|
||||||
but for me, with my non-phenomenal memory and lazy fingers, I prefer being able to simply look at a variable to
|
but for me, with my non-phenomenal memory and lazy fingers, I prefer being able to simply look at a variable to
|
||||||
immediately know what *type* of data it contains, if nothing else.
|
immediately know what *type* of data it contains, if nothing else.
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ And finally, speaking of warnings, I've had to tell PhpStorm to "shut up" about
|
||||||
- “throw” of exception caught locally
|
- “throw” of exception caught locally
|
||||||
|
|
||||||
I acknowledge those those features can introduce bugs if you're not careful, so I make sure I'm careful. I don't
|
I acknowledge those those features can introduce bugs if you're not careful, so I make sure I'm careful. I don't
|
||||||
subscribe to the dogmatic approach that others (eg, the author of JSHint) take about so-called "risky" features.
|
subscribe to the dogmatic approach that others (eg, the author of JSLint) take about so-called "risky" features.
|
||||||
I agree that it's always a good idea to walk to the crosswalk before crossing a street, but I don't agree that it's
|
I agree that it's always a good idea to walk to the crosswalk before crossing a street, but I don't agree that it's
|
||||||
*never* a good idea to cross in the middle sometimes, too.
|
*never* a good idea to cross in the middle sometimes, too.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ an *href* value to the <disk> section that was used to create the image:
|
||||||
<link href="http://www.bricklin.com/history/vclicense.htm">VisiCalc License</link>
|
<link href="http://www.bricklin.com/history/vclicense.htm">VisiCalc License</link>
|
||||||
</disk>
|
</disk>
|
||||||
|
|
||||||
The PCjs "diskdump" module is used to create all our pre-generated JSON-encoded disk images. In the above example, a
|
The PCjs DiskDump module is used to create all our pre-generated JSON-encoded disk images. In the above example, a
|
||||||
pre-generated disk image could be created from the command-line with either the "--dir" option (which will traverse all
|
pre-generated disk image could be created from the command-line with either the "--dir" option (which will traverse all
|
||||||
subdirectories as well):
|
subdirectories as well):
|
||||||
|
|
||||||
|
|
@ -54,6 +54,6 @@ or with the "--path" option, which specifies either a single file or a set files
|
||||||
|
|
||||||
node diskdump "--path=./apps/pc/1981/visicalc/bin/vc.com;../readme.md" --format=json --output=./apps/pc/1981/visicalc/disk.json
|
node diskdump "--path=./apps/pc/1981/visicalc/bin/vc.com;../readme.md" --format=json --output=./apps/pc/1981/visicalc/disk.json
|
||||||
|
|
||||||
or via the PCjs server's "diskdump" API:
|
or via the PCjs server's DiskDump API:
|
||||||
|
|
||||||
http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/vc.com&format=json
|
http://www.pcjs.org/api/v1/dump?path=/apps/pc/1981/visicalc/bin/vc.com&format=json
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -37,8 +37,14 @@
|
||||||
F000:05FF @ POST2_CP38 ; CHECKPOINT 0x38 (RE-ENABLE KEYBOARD)
|
F000:05FF @ POST2_CP38 ; CHECKPOINT 0x38 (RE-ENABLE KEYBOARD)
|
||||||
F000:0612 @ POST2_CP39 ; CHECKPOINT 0x39 (STUCK KEYS)
|
F000:0612 @ POST2_CP39 ; CHECKPOINT 0x39 (STUCK KEYS)
|
||||||
F000:0655 @ POST2_CP3A ; CHECKPOINT 0x3A
|
F000:0655 @ POST2_CP3A ; CHECKPOINT 0x3A
|
||||||
|
F000:06E0 @ POST2_TEST23 ; TEST.23: DISKETTE ATTACHMENT TEST
|
||||||
F000:079E @ POST2_RTCUP ; TEST CLOCK UPDATING
|
F000:079E @ POST2_RTCUP ; TEST CLOCK UPDATING
|
||||||
F000:080D @ POST2_COMBOHF ; CHECK FOR COMBO HARD FILE/DISKETTE CARD
|
F000:080D @ POST2_COMBOHF ; CHECK FOR COMBO HARD/FLOPPY CARD
|
||||||
|
F000:0877 @ POST2_TEST22 ; TEST.22: CHECK FOR OPTIONAL ROM
|
||||||
|
F000:08C3 @ POST2_PRINTER ; SETUP PRINTER_BASE
|
||||||
|
F000:08E6 @ POST2_PS232 ; SETUP RS232
|
||||||
|
F000:0998 @ POST2_SETTOD ; SET TIME OF DAY
|
||||||
|
F000:0A6C @ POST2_INT19 ; GO TO BOOT LOADER
|
||||||
1753 +
|
1753 +
|
||||||
F000:0000 @ POST4
|
F000:0000 @ POST4
|
||||||
F000:007F @ KBD_RESET
|
F000:007F @ KBD_RESET
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ Browse [IBM PC](pc/) and [Challenger 1P](c1p/) disk images.
|
||||||
PCjs works best with disk images in a **JSON** format, to save conversion time, so that's the only
|
PCjs works best with disk images in a **JSON** format, to save conversion time, so that's the only
|
||||||
disk image format you'll find on the PCjs website.
|
disk image format you'll find on the PCjs website.
|
||||||
|
|
||||||
To convert any of our **JSON** disk images back into an **IMG** file, you can use the **diskdump** API
|
To convert any of our **JSON** disk images back into an **IMG** file, you can use the DiskDump API
|
||||||
with the *format* parameter set to `img` instead of `json`. For example:
|
with the *format* parameter set to `img` instead of `json`. For example:
|
||||||
|
|
||||||
http://www.pcjs.org/api/v1/dump?disk=/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json&format=img
|
http://www.pcjs.org/api/v1/dump?disk=/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json&format=img
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ commented JSON, and IMG files).
|
||||||
Building images from folders/files
|
Building images from folders/files
|
||||||
---
|
---
|
||||||
I finally ported the code in [convdisk.php](/bin/convdisk.php) that creates disk images
|
I finally ported the code in [convdisk.php](/bin/convdisk.php) that creates disk images
|
||||||
from the contents of local files/folders, which you can now access via the *diskdump* API.
|
from the contents of local files/folders, which you can now access via the *DiskDump* API.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,8 @@ if (typeof module !== 'undefined') {
|
||||||
*
|
*
|
||||||
* MODEL_5170 Description
|
* MODEL_5170 Description
|
||||||
* ---------- -----------
|
* ---------- -----------
|
||||||
* 070 [3] CMOS Address ChipSet.CMOS_ADDR.PORT
|
* 070 [3] CMOS Address ChipSet.CMOS.ADDR.PORT
|
||||||
* 071 CMOS Data ChipSet.CMOS_DATA.PORT
|
* 071 CMOS Data ChipSet.CMOS.DATA.PORT
|
||||||
* 0F0 Coprocessor Clear Busy (output 0x00)
|
* 0F0 Coprocessor Clear Busy (output 0x00)
|
||||||
* 0F1 Coprocessor Reset (output 0x00)
|
* 0F1 Coprocessor Reset (output 0x00)
|
||||||
*
|
*
|
||||||
|
|
@ -178,6 +178,10 @@ function ChipSet(parmsChipSet)
|
||||||
this.cDMACs = this.cPICs = 1;
|
this.cDMACs = this.cPICs = 1;
|
||||||
if (this.model >= ChipSet.MODEL_5170) {
|
if (this.model >= ChipSet.MODEL_5170) {
|
||||||
this.cDMACs = this.cPICs = 2;
|
this.cDMACs = this.cPICs = 2;
|
||||||
|
this.regsHFCombo = {
|
||||||
|
bCtrl: 0x00, // port 0x1F4
|
||||||
|
bStatus: 0x7F // port 0x1F7
|
||||||
|
};
|
||||||
}
|
}
|
||||||
this.fScaleTimers = parmsChipSet['scaleTimers'] || false;
|
this.fScaleTimers = parmsChipSet['scaleTimers'] || false;
|
||||||
this.sRTCDate = parmsChipSet['rtcDate'];
|
this.sRTCDate = parmsChipSet['rtcDate'];
|
||||||
|
|
@ -220,7 +224,7 @@ ChipSet.MODEL_5160 = 5160;
|
||||||
ChipSet.MODEL_5170 = 5170;
|
ChipSet.MODEL_5170 = 5170;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Values returned by ChipSet.getSW1VideoMonitor()
|
* Values returned by ChipSet.getSWVideoMonitor()
|
||||||
*/
|
*/
|
||||||
ChipSet.MONITOR = {};
|
ChipSet.MONITOR = {};
|
||||||
ChipSet.MONITOR.NONE = 0;
|
ChipSet.MONITOR.NONE = 0;
|
||||||
|
|
@ -514,7 +518,7 @@ ChipSet.PPI_CTRL.A_MODE = 0x60;
|
||||||
/*
|
/*
|
||||||
* On the MODEL_5150, the following PPI_SW bits are exposed through PPI_A.
|
* On the MODEL_5150, the following PPI_SW bits are exposed through PPI_A.
|
||||||
*
|
*
|
||||||
* On the MODEL_5160, either the low or high 4 bits are exposed through PPI_C_SW, if PPI_B.ENABLE_SW_HI is clear or set.
|
* On the MODEL_5160, either the low or high 4 bits are exposed through PPI_C.SW, if PPI_B.ENABLE_SW_HI is clear or set.
|
||||||
*/
|
*/
|
||||||
ChipSet.PPI_SW = {};
|
ChipSet.PPI_SW = {};
|
||||||
ChipSet.PPI_SW.FDRIVE = {};
|
ChipSet.PPI_SW.FDRIVE = {};
|
||||||
|
|
@ -533,7 +537,7 @@ ChipSet.PPI_SW.MONITOR.CGA80 = 0x20;
|
||||||
ChipSet.PPI_SW.MONITOR.MDA = 0x30;
|
ChipSet.PPI_SW.MONITOR.MDA = 0x30;
|
||||||
ChipSet.PPI_SW.MONITOR.MASK = 0x30;
|
ChipSet.PPI_SW.MONITOR.MASK = 0x30;
|
||||||
ChipSet.PPI_SW.MONITOR.SHIFT = 4;
|
ChipSet.PPI_SW.MONITOR.SHIFT = 4;
|
||||||
ChipSet.PPI_SW.FDRIVE.ONE = 0x00; // 1 floppy drive attached (or 0 drives if PPI_SW_FDRIVE_IPL is not set -- MODEL_5150 only)
|
ChipSet.PPI_SW.FDRIVE.ONE = 0x00; // 1 floppy drive attached (or 0 drives if PPI_SW.FDRIVE_IPL is not set -- MODEL_5150 only)
|
||||||
ChipSet.PPI_SW.FDRIVE.TWO = 0x40; // 2 floppy drives attached
|
ChipSet.PPI_SW.FDRIVE.TWO = 0x40; // 2 floppy drives attached
|
||||||
ChipSet.PPI_SW.FDRIVE.THREE = 0x80; // 3 floppy drives attached
|
ChipSet.PPI_SW.FDRIVE.THREE = 0x80; // 3 floppy drives attached
|
||||||
ChipSet.PPI_SW.FDRIVE.FOUR = 0xC0; // 4 floppy drives attached
|
ChipSet.PPI_SW.FDRIVE.FOUR = 0xC0; // 4 floppy drives attached
|
||||||
|
|
@ -558,7 +562,7 @@ ChipSet.PPI_SW.FDRIVE.SHIFT = 6;
|
||||||
* the same register (bPPIB) but install different I/O handlers. It's also bi-directional: at one point, the BIOS
|
* the same register (bPPIB) but install different I/O handlers. It's also bi-directional: at one point, the BIOS
|
||||||
* reads KBD_RWREG.REFRESH_BIT (bit 4) to verify that it's alternating.
|
* reads KBD_RWREG.REFRESH_BIT (bit 4) to verify that it's alternating.
|
||||||
*
|
*
|
||||||
* PPI_C and PPI_CTRL are neither documented nor used by the MODEL_5170 BIOS, so I'm assuming they're obsolete.
|
* PPI_C and PPI_CTRL don't seem to be documented or used by the MODEL_5170 BIOS, so I'm assuming they're obsolete.
|
||||||
*
|
*
|
||||||
* NOTE: For more information on the 8042 Controller, including information on undocumented commands, refer to the
|
* NOTE: For more information on the 8042 Controller, including information on undocumented commands, refer to the
|
||||||
* documents in /devices/pc/keyboard/, as well as the following websites:
|
* documents in /devices/pc/keyboard/, as well as the following websites:
|
||||||
|
|
@ -566,40 +570,36 @@ ChipSet.PPI_SW.FDRIVE.SHIFT = 6;
|
||||||
* http://halicery.com/8042/8042_INTERN_TXT.htm
|
* http://halicery.com/8042/8042_INTERN_TXT.htm
|
||||||
* http://www.os2museum.com/wp/?p=589 ("IBM PC/AT 8042 Keyboard Controller Commands")
|
* http://www.os2museum.com/wp/?p=589 ("IBM PC/AT 8042 Keyboard Controller Commands")
|
||||||
*/
|
*/
|
||||||
ChipSet.KBD_DATA = { // this.b8042OutBuff (PPI_A on previous models, still referred to as "PORT A" by the MODEL_5170 BIOS)
|
ChipSet.KBC = {};
|
||||||
PORT: 0x60
|
ChipSet.KBC.DATA = { // this.b8042OutBuff (PPI_A on previous models, still referred to as "PORT A" by the MODEL_5170 BIOS)
|
||||||
|
PORT: 0x60,
|
||||||
|
SELF_TEST: { // result of ChipSet.KBC.CMD.SELF_TEST command (0xAA)
|
||||||
|
OK: 0x55
|
||||||
|
},
|
||||||
|
INTF_TEST: { // result of ChipSet.KBC.CMD.INTF_TEST command (0xAB)
|
||||||
|
OK: 0x00, // no error
|
||||||
|
CLOCK_LO: 0x01, // keyboard clock line stuck low
|
||||||
|
CLOCK_HI: 0x02, // keyboard clock line stuck high
|
||||||
|
DATA_LO: 0x03, // keyboard data line stuck low
|
||||||
|
DATA_HI: 0x04 // keyboard data line stuck high
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.DATA.CMD = { // this.b8042CmdData (KBD_DATA.CMD "data bytes" written to port 0x60, after writing a KBD_CMD byte to port 0x64)
|
||||||
ChipSet.KBD_DATA.CMD = { // this.b8042CmdData (KBD_DATA.CMD "data bytes" written to port 0x60, after writing a KBD_CMD byte to port 0x64)
|
|
||||||
PC_COMPAT: 0x40, // generate IBM PC-compatible scan codes
|
PC_COMPAT: 0x40, // generate IBM PC-compatible scan codes
|
||||||
PC_MODE: 0x20,
|
PC_MODE: 0x20,
|
||||||
NO_CLOCK: 0x10, // disable keyboard by driving "clock" line low
|
NO_CLOCK: 0x10, // disable keyboard by driving "clock" line low
|
||||||
NO_INHIBIT: 0x08, // disable inhibit function
|
NO_INHIBIT: 0x08, // disable inhibit function
|
||||||
SYS_FLAG: 0x04, // this value is propagated to ChipSet.KBD_STATUS.SYS_FLAG
|
SYS_FLAG: 0x04, // this value is propagated to ChipSet.KBC.STATUS.SYS_FLAG
|
||||||
INT_ENABLE: 0x01 // generate an interrupt when the controller places data in the output buffer
|
INT_ENABLE: 0x01 // generate an interrupt when the controller places data in the output buffer
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.INPORT = { // this.b8042InPort
|
||||||
ChipSet.KBD_DATA.SELF_TEST = {
|
|
||||||
OK: 0x55
|
|
||||||
};
|
|
||||||
|
|
||||||
ChipSet.KBD_DATA.INTF_TEST = { // result of ChipSet.KBD_CMD.INTF_TEST command (0xAB)
|
|
||||||
OK: 0x00, // no error
|
|
||||||
KBD_CLOCK_LO: 0x01, // keyboard clock line stuck low
|
|
||||||
KBD_CLOCK_HI: 0x02, // keyboard clock line stuck high
|
|
||||||
KBD_DATA_LO: 0x03, // keyboard data line stuck low
|
|
||||||
KBD_DATA_HI: 0x04 // keyboard data line stuck high
|
|
||||||
};
|
|
||||||
|
|
||||||
ChipSet.KBD_DATA.INPORT = { // this.b8042InPort
|
|
||||||
UNDEFINED: 0x0F, // undefined
|
UNDEFINED: 0x0F, // undefined
|
||||||
ENABLE_256KB: 0x10, // enable 2nd 256Kb of system board RAM
|
ENABLE_256KB: 0x10, // enable 2nd 256Kb of system board RAM
|
||||||
MFG_OFF: 0x20, // manufacturing jumper not installed
|
MFG_OFF: 0x20, // manufacturing jumper not installed
|
||||||
MONO: 0x40, // monochrome monitor is primary display
|
MONO: 0x40, // monochrome monitor is primary display
|
||||||
KBD_ON: 0x80 // keyboard not inhibited
|
KBD_ON: 0x80 // keyboard not inhibited
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.OUTPORT = { // this.b8042OutPort
|
||||||
ChipSet.KBD_DATA.OUTPORT = { // this.b8042OutPort
|
|
||||||
NO_RESET: 0x01, // set by default
|
NO_RESET: 0x01, // set by default
|
||||||
A20_ON: 0x02, // set by default
|
A20_ON: 0x02, // set by default
|
||||||
OUTBUFF_FULL: 0x10, // output buffer full
|
OUTBUFF_FULL: 0x10, // output buffer full
|
||||||
|
|
@ -607,13 +607,11 @@ ChipSet.KBD_DATA.OUTPORT = { // this.b8042OutPort
|
||||||
KBD_CLOCK: 0x40, // keyboard clock (output)
|
KBD_CLOCK: 0x40, // keyboard clock (output)
|
||||||
KBD_DATA: 0x80 // keyboard data (output)
|
KBD_DATA: 0x80 // keyboard data (output)
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.TESTPORT = { // generated "on the fly"
|
||||||
ChipSet.KBD_DATA.TESTPORT = { // generated "on the fly"
|
|
||||||
KBD_CLOCK: 0x01, // keyboard clock (input)
|
KBD_CLOCK: 0x01, // keyboard clock (input)
|
||||||
KBD_DATA: 0x02 // keyboard data (input)
|
KBD_DATA: 0x02 // keyboard data (input)
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.RWREG = { // this.bPPIB (since CLK_TIMER2 and SPK_TIMER2 are in both PPI_B and KBD_RWREG)
|
||||||
ChipSet.KBD_RWREG = { // this.bPPIB (since CLK_TIMER2 and SPK_TIMER2 are in both PPI_B and KBD_RWREG)
|
|
||||||
PORT: 0x61,
|
PORT: 0x61,
|
||||||
CLK_TIMER2: 0x01, // set to enable clock to TIMER2
|
CLK_TIMER2: 0x01, // set to enable clock to TIMER2
|
||||||
SPK_TIMER2: 0x02, // set to connect output of TIMER2 to speaker
|
SPK_TIMER2: 0x02, // set to connect output of TIMER2 to speaker
|
||||||
|
|
@ -623,17 +621,7 @@ ChipSet.KBD_RWREG = { // this.bPPIB (since CLK_TIMER2 and SPK_TIMER2 a
|
||||||
PARITY_CHK: 0x80, // indicates RAM parity check
|
PARITY_CHK: 0x80, // indicates RAM parity check
|
||||||
PARITY_ERR: 0xC0
|
PARITY_ERR: 0xC0
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.CMD = { // this.b8042InBuff (on write to port 0x64, interpret this as a CMD)
|
||||||
ChipSet.KBD_DATA.CMD = { // this.b8042CmdData (KBD_DATA.CMD "data bytes" written to port 0x60, after writing a KBD_CMD byte to port 0x64)
|
|
||||||
PC_COMPAT: 0x40, // generate IBM PC-compatible scan codes
|
|
||||||
PC_MODE: 0x20,
|
|
||||||
NO_CLOCK: 0x10, // disable keyboard by driving "clock" line low
|
|
||||||
NO_INHIBIT: 0x08, // disable inhibit function
|
|
||||||
SYS_FLAG: 0x04, // this value is propagated to ChipSet.KBD_STATUS.SYS_FLAG
|
|
||||||
INT_ENABLE: 0x01 // generate an interrupt when the controller places data in the output buffer
|
|
||||||
};
|
|
||||||
|
|
||||||
ChipSet.KBD_CMD = { // this.b8042InBuff (on write to port 0x64, interpret this as a CMD)
|
|
||||||
PORT: 0x64,
|
PORT: 0x64,
|
||||||
READ_CMD: 0x20,
|
READ_CMD: 0x20,
|
||||||
WRITE_CMD: 0x60, // followed by a command byte written to KBD_DATA.PORT (see KBD_DATA.CMD)
|
WRITE_CMD: 0x60, // followed by a command byte written to KBD_DATA.PORT (see KBD_DATA.CMD)
|
||||||
|
|
@ -648,8 +636,7 @@ ChipSet.KBD_CMD = { // this.b8042InBuff (on write to port 0x64, inte
|
||||||
READ_TEST: 0xE0,
|
READ_TEST: 0xE0,
|
||||||
PULSE_OUTPORT: 0xF0 // this is the 1st of 16 commands (0xF0-0xFF) that pulse bits 0-3 of the output port
|
PULSE_OUTPORT: 0xF0 // this is the 1st of 16 commands (0xF0-0xFF) that pulse bits 0-3 of the output port
|
||||||
};
|
};
|
||||||
|
ChipSet.KBC.STATUS = { // this.b8042Status (on read from port 0x64)
|
||||||
ChipSet.KBD_STATUS = { // this.b8042Status (on read from port 0x64)
|
|
||||||
PORT: 0x64,
|
PORT: 0x64,
|
||||||
OUTBUFF_FULL: 0x01,
|
OUTBUFF_FULL: 0x01,
|
||||||
INBUFF_FULL: 0x02, // set if the controller has received but not yet read data written to the input buffer (not normally set)
|
INBUFF_FULL: 0x02, // set if the controller has received but not yet read data written to the input buffer (not normally set)
|
||||||
|
|
@ -665,90 +652,89 @@ ChipSet.KBD_STATUS = { // this.b8042Status (on read from port 0x64)
|
||||||
/*
|
/*
|
||||||
* MC146818A RTC/CMOS Ports (MODEL_5170)
|
* MC146818A RTC/CMOS Ports (MODEL_5170)
|
||||||
*
|
*
|
||||||
* Write a CMOS address to ChipSet.CMOS_ADDR.PORT, then read/write data from/to ChipSet.CMOS_DATA.PORT.
|
* Write a CMOS address to ChipSet.CMOS.ADDR.PORT, then read/write data from/to ChipSet.CMOS.DATA.PORT.
|
||||||
*
|
*
|
||||||
* The ADDR port also controls NMI: write an address with bit 7 clear to enable NMI or set to disable NMI.
|
* The ADDR port also controls NMI: write an address with bit 7 clear to enable NMI or set to disable NMI.
|
||||||
*/
|
*/
|
||||||
ChipSet.CMOS_ADDR = {}; // this.bCMOSAddr
|
ChipSet.CMOS = {};
|
||||||
ChipSet.CMOS_ADDR.PORT = 0x70;
|
ChipSet.CMOS.ADDR = {}; // this.bCMOSAddr
|
||||||
ChipSet.CMOS_ADDR.RTC_SEC = 0x00;
|
ChipSet.CMOS.ADDR.PORT = 0x70;
|
||||||
ChipSet.CMOS_ADDR.RTC_SEC_ALRM = 0x01;
|
ChipSet.CMOS.ADDR.RTC_SEC = 0x00;
|
||||||
ChipSet.CMOS_ADDR.RTC_MIN = 0x02;
|
ChipSet.CMOS.ADDR.RTC_SEC_ALRM = 0x01;
|
||||||
ChipSet.CMOS_ADDR.RTC_MIN_ALRM = 0x03;
|
ChipSet.CMOS.ADDR.RTC_MIN = 0x02;
|
||||||
ChipSet.CMOS_ADDR.RTC_HOUR = 0x04;
|
ChipSet.CMOS.ADDR.RTC_MIN_ALRM = 0x03;
|
||||||
ChipSet.CMOS_ADDR.RTC_HOUR_ALRM = 0x05;
|
ChipSet.CMOS.ADDR.RTC_HOUR = 0x04;
|
||||||
ChipSet.CMOS_ADDR.RTC_WEEK_DAY = 0x06;
|
ChipSet.CMOS.ADDR.RTC_HOUR_ALRM = 0x05;
|
||||||
ChipSet.CMOS_ADDR.RTC_MONTH_DAY = 0x07;
|
ChipSet.CMOS.ADDR.RTC_WEEK_DAY = 0x06;
|
||||||
ChipSet.CMOS_ADDR.RTC_MONTH = 0x08;
|
ChipSet.CMOS.ADDR.RTC_MONTH_DAY = 0x07;
|
||||||
ChipSet.CMOS_ADDR.RTC_YEAR = 0x09;
|
ChipSet.CMOS.ADDR.RTC_MONTH = 0x08;
|
||||||
ChipSet.CMOS_ADDR.RTC_STATUSA = 0x0A;
|
ChipSet.CMOS.ADDR.RTC_YEAR = 0x09;
|
||||||
ChipSet.CMOS_ADDR.RTC_STATUSB = 0x0B;
|
ChipSet.CMOS.ADDR.RTC_STATUSA = 0x0A;
|
||||||
ChipSet.CMOS_ADDR.RTC_STATUSC = 0x0C;
|
ChipSet.CMOS.ADDR.RTC_STATUSB = 0x0B;
|
||||||
ChipSet.CMOS_ADDR.RTC_STATUSD = 0x0D;
|
ChipSet.CMOS.ADDR.RTC_STATUSC = 0x0C;
|
||||||
ChipSet.CMOS_ADDR.DIAG = 0x0E;
|
ChipSet.CMOS.ADDR.RTC_STATUSD = 0x0D;
|
||||||
ChipSet.CMOS_ADDR.SHUTDOWN = 0x0F;
|
ChipSet.CMOS.ADDR.DIAG = 0x0E;
|
||||||
ChipSet.CMOS_ADDR.FDRIVE = 0x10;
|
ChipSet.CMOS.ADDR.SHUTDOWN = 0x0F;
|
||||||
ChipSet.CMOS_ADDR.HDRIVE = 0x12;
|
ChipSet.CMOS.ADDR.FDRIVE = 0x10; // drive 0 ChipSet.FDRIVE in high nibble, drive 1 ChipSet.FDRIVE value in low nibble
|
||||||
ChipSet.CMOS_ADDR.EQUIP = 0x14;
|
ChipSet.CMOS.ADDR.HDRIVE = 0x12;
|
||||||
ChipSet.CMOS_ADDR.BASEMEM_LO = 0x15;
|
ChipSet.CMOS.ADDR.EQUIP = 0x14;
|
||||||
ChipSet.CMOS_ADDR.BASEMEM_HI = 0x16; //the BASEMEM values indicate the total Kb of base memory, up to 0x280 (640Kb)
|
ChipSet.CMOS.ADDR.BASEMEM_LO = 0x15;
|
||||||
ChipSet.CMOS_ADDR.EXTMEM_LO = 0x17;
|
ChipSet.CMOS.ADDR.BASEMEM_HI = 0x16; // the BASEMEM values indicate the total Kb of base memory, up to 0x280 (640Kb)
|
||||||
ChipSet.CMOS_ADDR.EXTMEM_HI = 0x18; //the EXTMEM values indicate the total Kb of extended memory, up to 0x3C00 (15Mb)
|
ChipSet.CMOS.ADDR.EXTMEM_LO = 0x17;
|
||||||
ChipSet.CMOS_ADDR.CHKSUM_HI = 0x2E;
|
ChipSet.CMOS.ADDR.EXTMEM_HI = 0x18; // the EXTMEM values indicate the total Kb of extended memory, up to 0x3C00 (15Mb)
|
||||||
ChipSet.CMOS_ADDR.CHKSUM_LO = 0x2F; // CMOS bytes included in the checksum calculation: 0x10-0x2D
|
ChipSet.CMOS.ADDR.CHKSUM_HI = 0x2E;
|
||||||
ChipSet.CMOS_ADDR.EXTMEM2_LO = 0x30;
|
ChipSet.CMOS.ADDR.CHKSUM_LO = 0x2F; // CMOS bytes included in the checksum calculation: 0x10-0x2D
|
||||||
ChipSet.CMOS_ADDR.EXTMEM2_HI = 0x31;
|
ChipSet.CMOS.ADDR.EXTMEM2_LO = 0x30;
|
||||||
ChipSet.CMOS_ADDR.CENTURY_DATE = 0x32; // BCD value for the current century (eg, 0x19 for 20th century, 0x20 for 21st century)
|
ChipSet.CMOS.ADDR.EXTMEM2_HI = 0x31;
|
||||||
ChipSet.CMOS_ADDR.BOOT_INFO = 0x33; // 0x80 if 128Kb expansion memory installed, 0x40 if Setup Utility wants an initial setup message
|
ChipSet.CMOS.ADDR.CENTURY_DATE = 0x32; // BCD value for the current century (eg, 0x19 for 20th century, 0x20 for 21st century)
|
||||||
ChipSet.CMOS_ADDR.MASK = 0x3F;
|
ChipSet.CMOS.ADDR.BOOT_INFO = 0x33; // 0x80 if 128Kb expansion memory installed, 0x40 if Setup Utility wants an initial setup message
|
||||||
ChipSet.CMOS_ADDR.TOTAL = 0x40;
|
ChipSet.CMOS.ADDR.MASK = 0x3F;
|
||||||
ChipSet.CMOS_ADDR.NMI_DISABLE = 0x80;
|
ChipSet.CMOS.ADDR.TOTAL = 0x40;
|
||||||
|
ChipSet.CMOS.ADDR.NMI_DISABLE = 0x80;
|
||||||
|
|
||||||
ChipSet.CMOS_DATA = {}; // this.abCMOSData
|
ChipSet.CMOS.DATA = {}; // this.abCMOSData
|
||||||
ChipSet.CMOS_DATA.PORT = 0x71;
|
ChipSet.CMOS.DATA.PORT = 0x71;
|
||||||
|
|
||||||
ChipSet.CMOS_STATUSA = {}; // abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSA]
|
ChipSet.CMOS.STATUSA = {}; // abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSA]
|
||||||
ChipSet.CMOS_STATUSA.UIP = 0x80; // bit 7: 1 indicates Update-In-Progress, 0 indicates date/time ready to read
|
ChipSet.CMOS.STATUSA.UIP = 0x80; // bit 7: 1 indicates Update-In-Progress, 0 indicates date/time ready to read
|
||||||
ChipSet.CMOS_STATUSA.DV = 0x70; // bits 6-4 (DV2-DV0) are programmed to 010 to select a 32.768Khz time base
|
ChipSet.CMOS.STATUSA.DV = 0x70; // bits 6-4 (DV2-DV0) are programmed to 010 to select a 32.768Khz time base
|
||||||
ChipSet.CMOS_STATUSA.RS = 0x0F; // bits 3-0 (RS3-RS0) are programmed to 0110 to select a 976.562us interrupt rate
|
ChipSet.CMOS.STATUSA.RS = 0x0F; // bits 3-0 (RS3-RS0) are programmed to 0110 to select a 976.562us interrupt rate
|
||||||
|
|
||||||
ChipSet.CMOS_STATUSB = {}; // abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB]
|
ChipSet.CMOS.STATUSB = {}; // abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB]
|
||||||
ChipSet.CMOS_STATUSB.SET = 0x80; // bit 7: 1 to set any/all of the 14 time-bytes
|
ChipSet.CMOS.STATUSB.SET = 0x80; // bit 7: 1 to set any/all of the 14 time-bytes
|
||||||
ChipSet.CMOS_STATUSB.PIE = 0x40; // bit 6: 1 for Periodic Interrupt Enable
|
ChipSet.CMOS.STATUSB.PIE = 0x40; // bit 6: 1 for Periodic Interrupt Enable
|
||||||
ChipSet.CMOS_STATUSB.AIE = 0x20; // bit 5: 1 for Alarm Interrupt Enable
|
ChipSet.CMOS.STATUSB.AIE = 0x20; // bit 5: 1 for Alarm Interrupt Enable
|
||||||
ChipSet.CMOS_STATUSB.UIE = 0x10; // bit 4: 1 for Update-Ended Interrupt Enable
|
ChipSet.CMOS.STATUSB.UIE = 0x10; // bit 4: 1 for Update-Ended Interrupt Enable
|
||||||
ChipSet.CMOS_STATUSB.SQWE = 0x08; // bit 3: 1 for Square Wave Enabled (as set by the STATUSA rate selection bits)
|
ChipSet.CMOS.STATUSB.SQWE = 0x08; // bit 3: 1 for Square Wave Enabled (as set by the STATUSA rate selection bits)
|
||||||
ChipSet.CMOS_STATUSB.BINARY = 0x04; // bit 2: 1 for binary Date Mode, 0 for BCD Date Mode
|
ChipSet.CMOS.STATUSB.BINARY = 0x04; // bit 2: 1 for binary Date Mode, 0 for BCD Date Mode
|
||||||
ChipSet.CMOS_STATUSB.HOUR24 = 0x02; // bit 1: 1 for 24-hour mode, 0 for 12-hour mode
|
ChipSet.CMOS.STATUSB.HOUR24 = 0x02; // bit 1: 1 for 24-hour mode, 0 for 12-hour mode
|
||||||
ChipSet.CMOS_STATUSB.DST = 0x01; // bit 0: 1 for Daylight Savings Time enabled
|
ChipSet.CMOS.STATUSB.DST = 0x01; // bit 0: 1 for Daylight Savings Time enabled
|
||||||
|
|
||||||
ChipSet.CMOS_STATUSC = {}; // abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSC] TODO: Does reading this register clear these interrupt conditions? (see F000:01C6 in the MODEL_5170 BIOS)
|
ChipSet.CMOS.STATUSC = {}; // abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSC] TODO: Does reading this register clear these interrupt conditions? (see F000:01C6 in the MODEL_5170 BIOS)
|
||||||
ChipSet.CMOS_STATUSC.IRQF = 0x80; // bit 7
|
ChipSet.CMOS.STATUSC.IRQF = 0x80; // bit 7
|
||||||
ChipSet.CMOS_STATUSC.PF = 0x40; // bit 6: 1 indicates Periodic Interrupt
|
ChipSet.CMOS.STATUSC.PF = 0x40; // bit 6: 1 indicates Periodic Interrupt
|
||||||
ChipSet.CMOS_STATUSC.AF = 0x20; // bit 5: 1 indicates Alarm Interrupt
|
ChipSet.CMOS.STATUSC.AF = 0x20; // bit 5: 1 indicates Alarm Interrupt
|
||||||
ChipSet.CMOS_STATUSC.UF = 0x10; // bit 4: 1 indicates Update-Ended Interrupt
|
ChipSet.CMOS.STATUSC.UF = 0x10; // bit 4: 1 indicates Update-Ended Interrupt
|
||||||
ChipSet.CMOS_STATUSC.RESERVED = 0x0F;
|
ChipSet.CMOS.STATUSC.RESERVED = 0x0F;
|
||||||
|
|
||||||
ChipSet.CMOS_STATUSD = {}; // abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSD]
|
ChipSet.CMOS.STATUSD = {}; // abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSD]
|
||||||
ChipSet.CMOS_STATUSD.VRB = 0x80; // bit 7: 1 indicates Valid RAM Bit (0 implies power was and/or is lost)
|
ChipSet.CMOS.STATUSD.VRB = 0x80; // bit 7: 1 indicates Valid RAM Bit (0 implies power was and/or is lost)
|
||||||
ChipSet.CMOS_STATUSD.RESERVED = 0x7F;
|
ChipSet.CMOS.STATUSD.RESERVED = 0x7F;
|
||||||
|
|
||||||
ChipSet.CMOS_DIAG = {}; // abCMOSData[ChipSet.CMOS_ADDR.DIAG]
|
ChipSet.CMOS.DIAG = {}; // abCMOSData[ChipSet.CMOS.ADDR.DIAG]
|
||||||
ChipSet.CMOS_DIAG.RTCFAIL = 0x80; // bit 7: 1 indicates RTC lost power
|
ChipSet.CMOS.DIAG.RTCFAIL = 0x80; // bit 7: 1 indicates RTC lost power
|
||||||
ChipSet.CMOS_DIAG.CHKSUMFAIL = 0x40; // bit 6: 1 indicates bad CMOS checksum
|
ChipSet.CMOS.DIAG.CHKSUMFAIL = 0x40; // bit 6: 1 indicates bad CMOS checksum
|
||||||
ChipSet.CMOS_DIAG.CONFIGFAIL = 0x20; // bit 5: 1 indicates bad CMOS configuration info
|
ChipSet.CMOS.DIAG.CONFIGFAIL = 0x20; // bit 5: 1 indicates bad CMOS configuration info
|
||||||
ChipSet.CMOS_DIAG.MEMSIZEFAIL = 0x10; // bit 4: 1 indicates memory size miscompare
|
ChipSet.CMOS.DIAG.MEMSIZEFAIL = 0x10; // bit 4: 1 indicates memory size miscompare
|
||||||
ChipSet.CMOS_DIAG.HDRIVEFAIL = 0x08; // bit 3: 1 indicates hard drive controller or drive init failure
|
ChipSet.CMOS.DIAG.HDRIVEFAIL = 0x08; // bit 3: 1 indicates hard drive controller or drive init failure
|
||||||
ChipSet.CMOS_DIAG.TIMEFAIL = 0x04; // bit 2: 1 indicates time failure
|
ChipSet.CMOS.DIAG.TIMEFAIL = 0x04; // bit 2: 1 indicates time failure
|
||||||
ChipSet.CMOS_DIAG.RESERVED = 0x03;
|
ChipSet.CMOS.DIAG.RESERVED = 0x03;
|
||||||
|
|
||||||
ChipSet.CMOS_FDRIVE = {}; // abCMOSData[ChipSet.CMOS_ADDR.FDRIVE]
|
ChipSet.FDRIVE = { // abCMOSData[ChipSet.CMOS.ADDR.FDRIVE] values (drive 0 value in high nibble, drive 1 value in low nibble)
|
||||||
ChipSet.CMOS_FDRIVE.D0 = 0xF0;
|
NONE: 0, // no drive
|
||||||
ChipSet.CMOS_FDRIVE.D0_DS = 0x10; // double-sided drive (48 TPI)
|
DSDD: 1, // double-sided double-density drive (48 TPI, 40-track, 360Kb max)
|
||||||
ChipSet.CMOS_FDRIVE.D0_HC = 0x20; // high-capacity drive (96 TPI)
|
DSHC: 2 // double-sided high-capacity drive (96 TPI, 80-track, 1.2Mb max)
|
||||||
ChipSet.CMOS_FDRIVE.D1 = 0x0F;
|
};
|
||||||
ChipSet.CMOS_FDRIVE.D1_DS = 0x01; // double-sided drive (48 TPI)
|
|
||||||
ChipSet.CMOS_FDRIVE.D1_HC = 0x02; // high-capacity drive (96 TPI)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following HDRIVE types are supported by the MODEL_5170, where C is Cylinders, H is Heads,
|
* The following HDRIVE types are supported by the MODEL_5170, where C is Cylinders, H is Heads,
|
||||||
|
|
@ -772,17 +758,17 @@ ChipSet.CMOS_FDRIVE.D1_HC = 0x02; // high-capacity drive (96 TPI)
|
||||||
* 14 733 7 no 733
|
* 14 733 7 no 733
|
||||||
* 15 (reserved--all zeros)
|
* 15 (reserved--all zeros)
|
||||||
*/
|
*/
|
||||||
ChipSet.CMOS_HDRIVE = {}; // abCMOSData[ChipSet.CMOS_ADDR.HDRIVE]
|
ChipSet.CMOS.HDRIVE = {}; // abCMOSData[ChipSet.CMOS.ADDR.HDRIVE]
|
||||||
ChipSet.CMOS_HDRIVE.D0 = 0xF0;
|
ChipSet.CMOS.HDRIVE.D0 = 0xF0;
|
||||||
ChipSet.CMOS_HDRIVE.D1 = 0x0F;
|
ChipSet.CMOS.HDRIVE.D1 = 0x0F;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The CMOS equipment flags use the same format as the older PPI equipment flags
|
* The CMOS equipment flags use the same format as the older PPI equipment flags
|
||||||
*/
|
*/
|
||||||
ChipSet.CMOS_EQUIP = {}; // abCMOSData[ChipSet.CMOS_ADDR.EQUIP]
|
ChipSet.CMOS.EQUIP = {}; // abCMOSData[ChipSet.CMOS.ADDR.EQUIP]
|
||||||
ChipSet.CMOS_EQUIP.MONITOR = ChipSet.PPI_SW.MONITOR; // PPI_SW.MONITOR.MASK == 0x30
|
ChipSet.CMOS.EQUIP.MONITOR = ChipSet.PPI_SW.MONITOR; // PPI_SW.MONITOR.MASK == 0x30
|
||||||
ChipSet.CMOS_EQUIP.COPROC = ChipSet.PPI_SW.COPROC; // PPI_SW.COPROC == 0x02
|
ChipSet.CMOS.EQUIP.COPROC = ChipSet.PPI_SW.COPROC; // PPI_SW.COPROC == 0x02
|
||||||
ChipSet.CMOS_EQUIP.FDRIVE = ChipSet.PPI_SW.FDRIVE; // PPI_SW.FDRIVE.IPL == 0x01 and PPI_SW.FDRIVE.MASK = 0xC0
|
ChipSet.CMOS.EQUIP.FDRIVE = ChipSet.PPI_SW.FDRIVE; // PPI_SW.FDRIVE.IPL == 0x01 and PPI_SW.FDRIVE.MASK = 0xC0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Manufacturing Test Ports (MODEL_5170)
|
* Manufacturing Test Ports (MODEL_5170)
|
||||||
|
|
@ -819,10 +805,24 @@ ChipSet.COPROC.PORT_RESET = 0xF1; // reset the coprocessor
|
||||||
/*
|
/*
|
||||||
* Ports used by MODEL_5170 BIOS for "Combo Hard File/Diskette Card" check (@F000:144C)
|
* Ports used by MODEL_5170 BIOS for "Combo Hard File/Diskette Card" check (@F000:144C)
|
||||||
*
|
*
|
||||||
* We're intercepting reads for this card's STATUS port simply to reduce boot time; otherwise,
|
* The ChipSet component provides minimal boot-time support for the "IBM Personal Computer
|
||||||
* our default unknown port response (0xFF) maximizes boot delay. The STATUS port simply needs
|
* AT Fixed Disk and Diskette Drive Adapter", aka the HFCOMBO card, until we're able to fork
|
||||||
* to return a byte with bit 7 clear, so that the BIOS will then attempt to write/read the CTRL
|
* the HDC component into a new HDCombo component to deal with the "Fixed Disk" portion
|
||||||
* port, which will immediately fail (since the write will be ignored).
|
* of the HFCOMBO card. Fortunately, the "Diskette Drive Adapter" portion of the card is
|
||||||
|
* quite compatible with the existing FDC component, so that component can be used as-is,
|
||||||
|
* with minor tweaks.
|
||||||
|
*
|
||||||
|
* Initially, we intercepted reads for HFCOMBO's STATUS port simply to reduce boot time;
|
||||||
|
* otherwise, our default "unknown port" response of 0xFF would maximize boot delay. To solve
|
||||||
|
* that, the STATUS port simply needs to return a byte with bit 7 clear, so that the BIOS
|
||||||
|
* will then attempt to write/read the CTRL port.
|
||||||
|
*
|
||||||
|
* Next, we initially treated the HFCOMBO's CTRL port as an "unknown port", because again,
|
||||||
|
* we didn't need HDC support and it didn't seem to affect FDC support. But it turns out
|
||||||
|
* that FDC support IS affected, because if the BIOS doesn't set the "DUAL" bit (bit 0) of the
|
||||||
|
* "HFCNTRL" byte at 40:8F, then when it comes time later to report the diskette drive type,
|
||||||
|
* the "DISK_TYPE" function (@F000:273D) will branch to one of two almost-identical blocks of
|
||||||
|
* code -- specifically, the block that disallows diskette drive types >= 2 instead of >= 3.
|
||||||
*/
|
*/
|
||||||
ChipSet.HFCOMBO = {};
|
ChipSet.HFCOMBO = {};
|
||||||
ChipSet.HFCOMBO.CTRL = {PORT: 0x1F4};
|
ChipSet.HFCOMBO.CTRL = {PORT: 0x1F4};
|
||||||
|
|
@ -1001,21 +1001,21 @@ ChipSet.prototype.reset = function()
|
||||||
* TODO: Consider a UI for the Keyboard INHIBIT switch. By default, our keyboard is never inhibited
|
* TODO: Consider a UI for the Keyboard INHIBIT switch. By default, our keyboard is never inhibited
|
||||||
* (ie, locked). Also, note that the hardware changes this bit only when new data is sent to b8042OutBuff.
|
* (ie, locked). Also, note that the hardware changes this bit only when new data is sent to b8042OutBuff.
|
||||||
*/
|
*/
|
||||||
this.b8042Status = ChipSet.KBD_STATUS.NO_INHIBIT;
|
this.b8042Status = ChipSet.KBC.STATUS.NO_INHIBIT;
|
||||||
this.b8042InBuff = 0;
|
this.b8042InBuff = 0;
|
||||||
this.b8042CmdData = ChipSet.KBD_DATA.CMD.NO_CLOCK;
|
this.b8042CmdData = ChipSet.KBC.DATA.CMD.NO_CLOCK;
|
||||||
this.b8042OutBuff = 0;
|
this.b8042OutBuff = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: Provide more control over these 8042 "Input Port" bits (eg, the keyboard lock)
|
* TODO: Provide more control over these 8042 "Input Port" bits (eg, the keyboard lock)
|
||||||
*/
|
*/
|
||||||
this.b8042InPort = ChipSet.KBD_DATA.INPORT.MFG_OFF | ChipSet.KBD_DATA.INPORT.KBD_ON;
|
this.b8042InPort = ChipSet.KBC.INPORT.MFG_OFF | ChipSet.KBC.INPORT.KBD_ON;
|
||||||
if (this.getSWMemorySize() >= 512) this.b8042InPort |= ChipSet.KBD_DATA.INPORT.ENABLE_256KB;
|
if (this.getSWMemorySize() >= 512) this.b8042InPort |= ChipSet.KBC.INPORT.ENABLE_256KB;
|
||||||
if (this.getSW1VideoMonitor() == ChipSet.MONITOR.MONO) this.b8042InPort |= ChipSet.KBD_DATA.INPORT.MONO;
|
if (this.getSWVideoMonitor() == ChipSet.MONITOR.MONO) this.b8042InPort |= ChipSet.KBC.INPORT.MONO;
|
||||||
|
|
||||||
this.b8042OutPort = ChipSet.KBD_DATA.OUTPORT.NO_RESET | ChipSet.KBD_DATA.OUTPORT.A20_ON;
|
this.b8042OutPort = ChipSet.KBC.OUTPORT.NO_RESET | ChipSet.KBC.OUTPORT.A20_ON;
|
||||||
this.bCMOSAddr = 0; // NMI is enabled, since the ChipSet.CMOS_ADDR.NMI_DISABLE bit is not set in bCMOSAddr
|
this.bCMOSAddr = 0; // NMI is enabled, since the ChipSet.CMOS.ADDR.NMI_DISABLE bit is not set in bCMOSAddr
|
||||||
this.abCMOSData = new Array(ChipSet.CMOS_ADDR.TOTAL);
|
this.abCMOSData = new Array(ChipSet.CMOS.ADDR.TOTAL);
|
||||||
this.initRTCDate(this.sRTCDate);
|
this.initRTCDate(this.sRTCDate);
|
||||||
this.initCMOSData();
|
this.initCMOSData();
|
||||||
/*
|
/*
|
||||||
|
|
@ -1066,23 +1066,23 @@ ChipSet.prototype.initRTCDate = function(sDate)
|
||||||
*/
|
*/
|
||||||
var date = sDate? new Date(sDate) : new Date();
|
var date = sDate? new Date(sDate) : new Date();
|
||||||
|
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_SEC] = date.getSeconds();
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_SEC] = date.getSeconds();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_SEC_ALRM] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_SEC_ALRM] = 0;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MIN] = date.getMinutes();
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MIN] = date.getMinutes();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MIN_ALRM] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MIN_ALRM] = 0;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_HOUR] = date.getHours();
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_HOUR] = date.getHours();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_HOUR_ALRM] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_HOUR_ALRM] = 0;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_WEEK_DAY] = date.getDay() + 1;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_WEEK_DAY] = date.getDay() + 1;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH_DAY] = date.getDate();
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH_DAY] = date.getDate();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH] = date.getMonth() + 1;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH] = date.getMonth() + 1;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_YEAR] = date.getFullYear() % 100;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_YEAR] = date.getFullYear() % 100;
|
||||||
|
|
||||||
this.nCyclesCMOSLastUpdate = -1;
|
this.nCyclesCMOSLastUpdate = -1;
|
||||||
|
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSA] = 0x26; // hard-coded default; refer to ChipSet.CMOS_STATUSA.DV and ChipSet.CMOS_STATUSA.RS
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSA] = 0x26; // hard-coded default; refer to ChipSet.CMOS.STATUSA.DV and ChipSet.CMOS.STATUSA.RS
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB] = ChipSet.CMOS_STATUSB.HOUR24; // default to BCD mode (ChipSet.CMOS_STATUSB.BINARY not set)
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB] = ChipSet.CMOS.STATUSB.HOUR24; // default to BCD mode (ChipSet.CMOS.STATUSB.BINARY not set)
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSC] = 0x00;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSC] = 0x00;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSD] = ChipSet.CMOS_STATUSD.VRB;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSD] = ChipSet.CMOS.STATUSD.VRB;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1093,14 +1093,14 @@ ChipSet.prototype.initRTCDate = function(sDate)
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.getRTCByte = function(iRTC)
|
ChipSet.prototype.getRTCByte = function(iRTC)
|
||||||
{
|
{
|
||||||
Component.assert(iRTC >= 0 && iRTC <= ChipSet.CMOS_ADDR.RTC_STATUSD);
|
Component.assert(iRTC >= 0 && iRTC <= ChipSet.CMOS.ADDR.RTC_STATUSD);
|
||||||
|
|
||||||
var b = this.abCMOSData[iRTC];
|
var b = this.abCMOSData[iRTC];
|
||||||
|
|
||||||
if (iRTC < ChipSet.CMOS_ADDR.RTC_STATUSA) {
|
if (iRTC < ChipSet.CMOS.ADDR.RTC_STATUSA) {
|
||||||
var f12HourValue = false;
|
var f12HourValue = false;
|
||||||
if (iRTC == ChipSet.CMOS_ADDR.RTC_HOUR || iRTC == ChipSet.CMOS_ADDR.RTC_HOUR_ALRM) {
|
if (iRTC == ChipSet.CMOS.ADDR.RTC_HOUR || iRTC == ChipSet.CMOS.ADDR.RTC_HOUR_ALRM) {
|
||||||
if (!(this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB] & ChipSet.CMOS_STATUSB.HOUR24)) {
|
if (!(this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB] & ChipSet.CMOS.STATUSB.HOUR24)) {
|
||||||
if (b < 12) {
|
if (b < 12) {
|
||||||
b = (!b? 12 : b);
|
b = (!b? 12 : b);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1110,7 +1110,7 @@ ChipSet.prototype.getRTCByte = function(iRTC)
|
||||||
f12HourValue = true;
|
f12HourValue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB] & ChipSet.CMOS_STATUSB.BINARY)) {
|
if (!(this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB] & ChipSet.CMOS.STATUSB.BINARY)) {
|
||||||
/*
|
/*
|
||||||
* We're in BCD mode, so we must convert b from BINARY to BCD. But first:
|
* We're in BCD mode, so we must convert b from BINARY to BCD. But first:
|
||||||
*
|
*
|
||||||
|
|
@ -1125,12 +1125,12 @@ ChipSet.prototype.getRTCByte = function(iRTC)
|
||||||
b = (b % 10) | ((b / 10) << 4);
|
b = (b % 10) | ((b / 10) << 4);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (iRTC == ChipSet.CMOS_ADDR.RTC_STATUSA) {
|
if (iRTC == ChipSet.CMOS.ADDR.RTC_STATUSA) {
|
||||||
/*
|
/*
|
||||||
* HACK: Perform a mindless toggling of the "Update-In-Progress" bit, so that it's flipped
|
* HACK: Perform a mindless toggling of the "Update-In-Progress" bit, so that it's flipped
|
||||||
* on the next read; this makes the MODEL_5170 BIOS ("POST2_RTCUP") happy.
|
* on the next read; this makes the MODEL_5170 BIOS ("POST2_RTCUP") happy.
|
||||||
*/
|
*/
|
||||||
this.abCMOSData[iRTC] ^= ChipSet.CMOS_STATUSA.UIP;
|
this.abCMOSData[iRTC] ^= ChipSet.CMOS.STATUSA.UIP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
|
|
@ -1145,11 +1145,11 @@ ChipSet.prototype.getRTCByte = function(iRTC)
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.setRTCByte = function(iRTC, b)
|
ChipSet.prototype.setRTCByte = function(iRTC, b)
|
||||||
{
|
{
|
||||||
Component.assert(iRTC >= 0 && iRTC <= ChipSet.CMOS_ADDR.RTC_STATUSD);
|
Component.assert(iRTC >= 0 && iRTC <= ChipSet.CMOS.ADDR.RTC_STATUSD);
|
||||||
|
|
||||||
if (iRTC < ChipSet.CMOS_ADDR.RTC_STATUSA) {
|
if (iRTC < ChipSet.CMOS.ADDR.RTC_STATUSA) {
|
||||||
var fBCD = false;
|
var fBCD = false;
|
||||||
if (!(this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB] & ChipSet.CMOS_STATUSB.BINARY)) {
|
if (!(this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB] & ChipSet.CMOS.STATUSB.BINARY)) {
|
||||||
/*
|
/*
|
||||||
* We're in BCD mode, so we must convert b from BCD to BINARY (we assume it's valid
|
* We're in BCD mode, so we must convert b from BCD to BINARY (we assume it's valid
|
||||||
* BCD; ie, that both nibbles contain only 0-9, not A-F).
|
* BCD; ie, that both nibbles contain only 0-9, not A-F).
|
||||||
|
|
@ -1157,7 +1157,7 @@ ChipSet.prototype.setRTCByte = function(iRTC, b)
|
||||||
b = (b >> 4) * 10 + (b & 0xf);
|
b = (b >> 4) * 10 + (b & 0xf);
|
||||||
fBCD = true;
|
fBCD = true;
|
||||||
}
|
}
|
||||||
if (iRTC == ChipSet.CMOS_ADDR.RTC_HOUR || iRTC == ChipSet.CMOS_ADDR.RTC_HOUR_ALRM) {
|
if (iRTC == ChipSet.CMOS.ADDR.RTC_HOUR || iRTC == ChipSet.CMOS.ADDR.RTC_HOUR_ALRM) {
|
||||||
if (fBCD) {
|
if (fBCD) {
|
||||||
/*
|
/*
|
||||||
* If the original BCD hour was 0x81-0x92, then the previous BINARY-to-BCD conversion
|
* If the original BCD hour was 0x81-0x92, then the previous BINARY-to-BCD conversion
|
||||||
|
|
@ -1168,7 +1168,7 @@ ChipSet.prototype.setRTCByte = function(iRTC, b)
|
||||||
b += 0x30;
|
b += 0x30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(this.abCMOSData[ChipSet.CMOS_ADDR.RTC_STATUSB] & ChipSet.CMOS_STATUSB.HOUR24)) {
|
if (!(this.abCMOSData[ChipSet.CMOS.ADDR.RTC_STATUSB] & ChipSet.CMOS.STATUSB.HOUR24)) {
|
||||||
if (b <= 12) {
|
if (b <= 12) {
|
||||||
b = (b == 12? 0 : b);
|
b = (b == 12? 0 : b);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1209,19 +1209,19 @@ ChipSet.prototype.updateRTCDate = function()
|
||||||
*/
|
*/
|
||||||
Component.assert(nSecondsDelta <= 1);
|
Component.assert(nSecondsDelta <= 1);
|
||||||
if (nSecondsDelta) {
|
if (nSecondsDelta) {
|
||||||
if (++this.abCMOSData[ChipSet.CMOS_ADDR.RTC_SEC] >= 60) {
|
if (++this.abCMOSData[ChipSet.CMOS.ADDR.RTC_SEC] >= 60) {
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_SEC] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_SEC] = 0;
|
||||||
if (++this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MIN] >= 60) {
|
if (++this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MIN] >= 60) {
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MIN] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MIN] = 0;
|
||||||
if (++this.abCMOSData[ChipSet.CMOS_ADDR.RTC_HOUR] >= 24) {
|
if (++this.abCMOSData[ChipSet.CMOS.ADDR.RTC_HOUR] >= 24) {
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_HOUR] = 0;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_HOUR] = 0;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_WEEK_DAY] = (this.abCMOSData[ChipSet.CMOS_ADDR.RTC_WEEK_DAY] % 7) + 1;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_WEEK_DAY] = (this.abCMOSData[ChipSet.CMOS.ADDR.RTC_WEEK_DAY] % 7) + 1;
|
||||||
var nDayMax = usr.getMonthDays(this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH], this.abCMOSData[ChipSet.CMOS_ADDR.RTC_YEAR]);
|
var nDayMax = usr.getMonthDays(this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH], this.abCMOSData[ChipSet.CMOS.ADDR.RTC_YEAR]);
|
||||||
if (++this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH_DAY] > nDayMax) {
|
if (++this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH_DAY] > nDayMax) {
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH_DAY] = 1;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH_DAY] = 1;
|
||||||
if (++this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH] > 12) {
|
if (++this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH] > 12) {
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_MONTH] = 1;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_MONTH] = 1;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.RTC_YEAR] = (this.abCMOSData[ChipSet.CMOS_ADDR.RTC_YEAR] + 1) % 100;
|
this.abCMOSData[ChipSet.CMOS.ADDR.RTC_YEAR] = (this.abCMOSData[ChipSet.CMOS.ADDR.RTC_YEAR] + 1) % 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1249,7 +1249,7 @@ ChipSet.prototype.initCMOSData = function()
|
||||||
* Make sure all the "checksummed" CMOS bytes get initialized (not just the handful we set below) to ensure
|
* Make sure all the "checksummed" CMOS bytes get initialized (not just the handful we set below) to ensure
|
||||||
* that the checksum will be valid.
|
* that the checksum will be valid.
|
||||||
*/
|
*/
|
||||||
for (var iCMOS = ChipSet.CMOS_ADDR.DIAG; iCMOS < ChipSet.CMOS_ADDR.CHKSUM_HI; iCMOS++) {
|
for (var iCMOS = ChipSet.CMOS.ADDR.DIAG; iCMOS < ChipSet.CMOS.ADDR.CHKSUM_HI; iCMOS++) {
|
||||||
this.abCMOSData[iCMOS] = 0;
|
this.abCMOSData[iCMOS] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1263,29 +1263,21 @@ ChipSet.prototype.initCMOSData = function()
|
||||||
* incomplete; for example, does the FDC component have a way of specifying the number of drives, and do we honor that?
|
* incomplete; for example, does the FDC component have a way of specifying the number of drives, and do we honor that?
|
||||||
* I think not....
|
* I think not....
|
||||||
*/
|
*/
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.EQUIP] = this.sw1 & (ChipSet.PPI_SW.MONITOR.MASK | ChipSet.PPI_SW.COPROC | ChipSet.PPI_SW.FDRIVE.IPL | ChipSet.PPI_SW.FDRIVE.MASK);
|
this.abCMOSData[ChipSet.CMOS.ADDR.EQUIP] = this.sw1 & (ChipSet.PPI_SW.MONITOR.MASK | ChipSet.PPI_SW.COPROC | ChipSet.PPI_SW.FDRIVE.IPL | ChipSet.PPI_SW.FDRIVE.MASK);
|
||||||
|
|
||||||
/*
|
this.abCMOSData[ChipSet.CMOS.ADDR.FDRIVE] = (this.getSWFloppyDriveType(0) << 4) | this.getSWFloppyDriveType(1);
|
||||||
* TODO: We default all floppy diskette drives to High Capacity, but MODEL_5170 machines will need more control
|
|
||||||
* over settings like this.
|
|
||||||
*/
|
|
||||||
var bDisketteTypes = 0;
|
|
||||||
var cDisketteDrives = this.getSW1FloppyDrives();
|
|
||||||
if (cDisketteDrives > 0) bDisketteTypes |= ChipSet.CMOS_FDRIVE.D0_HC;
|
|
||||||
if (cDisketteDrives > 1) bDisketteTypes |= ChipSet.CMOS_FDRIVE.D1_HC;
|
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.FDRIVE] = bDisketteTypes;
|
|
||||||
|
|
||||||
var wBaseMemKb = this.getSWMemorySize();
|
var wBaseMemKb = this.getSWMemorySize();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.BASEMEM_LO] = wBaseMemKb & 0xff;
|
this.abCMOSData[ChipSet.CMOS.ADDR.BASEMEM_LO] = wBaseMemKb & 0xff;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.BASEMEM_HI] = wBaseMemKb >> 8;
|
this.abCMOSData[ChipSet.CMOS.ADDR.BASEMEM_HI] = wBaseMemKb >> 8;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The final step is calculating the CMOS checksum, which we then store into the CMOS as a courtesy, so that the
|
* The final step is calculating the CMOS checksum, which we then store into the CMOS as a courtesy, so that the
|
||||||
* user doesn't get unnecessary CMOS errors.
|
* user doesn't get unnecessary CMOS errors.
|
||||||
*/
|
*/
|
||||||
var wChecksum = this.getCMOSChecksum();
|
var wChecksum = this.getCMOSChecksum();
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.CHKSUM_LO] = wChecksum & 0xff;
|
this.abCMOSData[ChipSet.CMOS.ADDR.CHKSUM_LO] = wChecksum & 0xff;
|
||||||
this.abCMOSData[ChipSet.CMOS_ADDR.CHKSUM_HI] = wChecksum >> 8;
|
this.abCMOSData[ChipSet.CMOS.ADDR.CHKSUM_HI] = wChecksum >> 8;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1303,7 +1295,7 @@ ChipSet.prototype.initCMOSData = function()
|
||||||
ChipSet.prototype.getCMOSChecksum = function()
|
ChipSet.prototype.getCMOSChecksum = function()
|
||||||
{
|
{
|
||||||
var wChecksum = 0;
|
var wChecksum = 0;
|
||||||
for (var iCMOS = ChipSet.CMOS_ADDR.FDRIVE; iCMOS < ChipSet.CMOS_ADDR.CHKSUM_HI; iCMOS++) {
|
for (var iCMOS = ChipSet.CMOS.ADDR.FDRIVE; iCMOS < ChipSet.CMOS.ADDR.CHKSUM_HI; iCMOS++) {
|
||||||
wChecksum += this.abCMOSData[iCMOS];
|
wChecksum += this.abCMOSData[iCMOS];
|
||||||
}
|
}
|
||||||
return wChecksum;
|
return wChecksum;
|
||||||
|
|
@ -1643,26 +1635,44 @@ ChipSet.prototype.getSWMemorySize = function(fInit)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSW1FloppyDrives(fInit)
|
* getSWFloppyDrives(fInit)
|
||||||
*
|
*
|
||||||
* @this {ChipSet}
|
* @this {ChipSet}
|
||||||
* @param {boolean|undefined} [fInit] is true for init switch value(s) only, current value(s) otherwise
|
* @param {boolean|undefined} [fInit] is true for init switch value(s) only, current value(s) otherwise
|
||||||
* @return {number} number of floppy drives specified by SW1 (range is 0 to 4)
|
* @return {number} number of floppy drives specified by SW1 (range is 0 to 4)
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.getSW1FloppyDrives = function(fInit)
|
ChipSet.prototype.getSWFloppyDrives = function(fInit)
|
||||||
{
|
{
|
||||||
var sw1 = (fInit? this.sw1Init : this.sw1);
|
var sw1 = (fInit? this.sw1Init : this.sw1);
|
||||||
return ((this.model != ChipSet.MODEL_5150) || (sw1 & ChipSet.PPI_SW.FDRIVE.IPL))? ((sw1 & ChipSet.PPI_SW.FDRIVE.MASK) >> ChipSet.PPI_SW.FDRIVE.SHIFT) + 1 : 0;
|
return ((this.model != ChipSet.MODEL_5150) || (sw1 & ChipSet.PPI_SW.FDRIVE.IPL))? ((sw1 & ChipSet.PPI_SW.FDRIVE.MASK) >> ChipSet.PPI_SW.FDRIVE.SHIFT) + 1 : 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSW1VideoMonitor(fInit)
|
* getSWFloppyDriveType(iDrive)
|
||||||
|
*
|
||||||
|
* @this {ChipSet}
|
||||||
|
* @param {number} iDrive (0-based)
|
||||||
|
* @return {number} one of the ChipSet.FDRIVE values (ie, NONE: 0, DSDD: 1, DSHC: 2)
|
||||||
|
*/
|
||||||
|
ChipSet.prototype.getSWFloppyDriveType = function(iDrive)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* TODO: For MODEL_5170, we default all floppy drive types to High Capacity, but more control would be nice.
|
||||||
|
*/
|
||||||
|
if (iDrive < this.getSWFloppyDrives()) {
|
||||||
|
return (this.model < ChipSet.MODEL_5170? ChipSet.FDRIVE.DSDD : ChipSet.FDRIVE.DSHC);
|
||||||
|
}
|
||||||
|
return ChipSet.FDRIVE.NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getSWVideoMonitor(fInit)
|
||||||
*
|
*
|
||||||
* @this {ChipSet}
|
* @this {ChipSet}
|
||||||
* @param {boolean|undefined} [fInit] is true for init switch value(s) only, current value(s) otherwise
|
* @param {boolean|undefined} [fInit] is true for init switch value(s) only, current value(s) otherwise
|
||||||
* @return {number} one of ChipSet.MONITOR.*
|
* @return {number} one of ChipSet.MONITOR.*
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.getSW1VideoMonitor = function(fInit)
|
ChipSet.prototype.getSWVideoMonitor = function(fInit)
|
||||||
{
|
{
|
||||||
var sw1 = (fInit? this.sw1Init : this.sw1);
|
var sw1 = (fInit? this.sw1Init : this.sw1);
|
||||||
return (sw1 & ChipSet.PPI_SW.MONITOR.MASK) >> ChipSet.PPI_SW.MONITOR.SHIFT;
|
return (sw1 & ChipSet.PPI_SW.MONITOR.MASK) >> ChipSet.PPI_SW.MONITOR.SHIFT;
|
||||||
|
|
@ -1786,8 +1796,8 @@ ChipSet.prototype.updateSwitchDesc = function()
|
||||||
if (controlDesc !== undefined) {
|
if (controlDesc !== undefined) {
|
||||||
var sHTML = "";
|
var sHTML = "";
|
||||||
sHTML += this.getSWMemorySize(true) + "Kb";
|
sHTML += this.getSWMemorySize(true) + "Kb";
|
||||||
sHTML += ", " + asMonitorTypes[this.getSW1VideoMonitor(true)] + " Monitor";
|
sHTML += ", " + asMonitorTypes[this.getSWVideoMonitor(true)] + " Monitor";
|
||||||
sHTML += ", " + this.getSW1FloppyDrives(true) + " Floppy Drives";
|
sHTML += ", " + this.getSWFloppyDrives(true) + " Floppy Drives";
|
||||||
if (this.sw1 !== undefined && this.sw1 != this.sw1Init || this.sw2 !== undefined && this.sw2 != this.sw2Init)
|
if (this.sw1 !== undefined && this.sw1 != this.sw1Init || this.sw2 !== undefined && this.sw2 != this.sw2Init)
|
||||||
sHTML += " (Reset required)";
|
sHTML += " (Reset required)";
|
||||||
controlDesc.innerHTML = sHTML;
|
controlDesc.innerHTML = sHTML;
|
||||||
|
|
@ -3397,7 +3407,7 @@ ChipSet.prototype.inPPIC = function(port, addrFrom)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you ever wanted to simulate I/O channel errors or R/W memory parity errors, you could
|
* If you ever wanted to simulate I/O channel errors or R/W memory parity errors, you could
|
||||||
* add either PPI_C_IO_CHANNEL_CHK (0x40) or PPI_C_RW_PARITY_CHK (0x80) to the return value (b).
|
* add either PPI_C.IO_CHANNEL_CHK (0x40) or PPI_C.RW_PARITY_CHK (0x80) to the return value (b).
|
||||||
*/
|
*/
|
||||||
if (this.model == ChipSet.MODEL_5150) {
|
if (this.model == ChipSet.MODEL_5150) {
|
||||||
if (this.bPPIB & ChipSet.PPI_B.ENABLE_SW2) {
|
if (this.bPPIB & ChipSet.PPI_B.ENABLE_SW2) {
|
||||||
|
|
@ -3486,7 +3496,7 @@ ChipSet.prototype.in8042OutBuff = function(port, addrFrom)
|
||||||
{
|
{
|
||||||
var b = this.b8042OutBuff;
|
var b = this.b8042OutBuff;
|
||||||
this.messagePort(port, null, addrFrom, "8042_OUTBUFF", ChipSet.MESSAGE_CHIPSET, b);
|
this.messagePort(port, null, addrFrom, "8042_OUTBUFF", ChipSet.MESSAGE_CHIPSET, b);
|
||||||
this.b8042Status &= ~(ChipSet.KBD_STATUS.OUTBUFF_FULL | ChipSet.KBD_STATUS.OUTBUFF_DELAY);
|
this.b8042Status &= ~(ChipSet.KBC.STATUS.OUTBUFF_FULL | ChipSet.KBC.STATUS.OUTBUFF_DELAY);
|
||||||
var bNext = this.kbd && this.kbd.readScanCode(true);
|
var bNext = this.kbd && this.kbd.readScanCode(true);
|
||||||
if (bNext) this.set8042OutBuff(bNext);
|
if (bNext) this.set8042OutBuff(bNext);
|
||||||
return b;
|
return b;
|
||||||
|
|
@ -3508,16 +3518,16 @@ ChipSet.prototype.out8042InBuffData = function(port, bOut, addrFrom)
|
||||||
{
|
{
|
||||||
this.messagePort(port, bOut, addrFrom, "8042_INBUF.DATA", ChipSet.MESSAGE_CHIPSET);
|
this.messagePort(port, bOut, addrFrom, "8042_INBUF.DATA", ChipSet.MESSAGE_CHIPSET);
|
||||||
|
|
||||||
if (this.b8042Status & ChipSet.KBD_STATUS.CMD_FLAG) {
|
if (this.b8042Status & ChipSet.KBC.STATUS.CMD_FLAG) {
|
||||||
switch (this.b8042InBuff) {
|
switch (this.b8042InBuff) {
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.WRITE_CMD:
|
case ChipSet.KBC.CMD.WRITE_CMD:
|
||||||
this.b8042CmdData = bOut;
|
this.b8042CmdData = bOut;
|
||||||
Component.assert(ChipSet.KBD_DATA.CMD.SYS_FLAG === ChipSet.KBD_STATUS.SYS_FLAG);
|
Component.assert(ChipSet.KBC.DATA.CMD.SYS_FLAG === ChipSet.KBC.STATUS.SYS_FLAG);
|
||||||
this.b8042Status = (this.b8042Status & ~ChipSet.KBD_STATUS.SYS_FLAG) | (bOut & ChipSet.KBD_DATA.CMD.SYS_FLAG);
|
this.b8042Status = (this.b8042Status & ~ChipSet.KBC.STATUS.SYS_FLAG) | (bOut & ChipSet.KBC.DATA.CMD.SYS_FLAG);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.WRITE_OUTPORT:
|
case ChipSet.KBC.CMD.WRITE_OUTPORT:
|
||||||
this.set8042OutPort(bOut);
|
this.set8042OutPort(bOut);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -3586,13 +3596,13 @@ ChipSet.prototype.out8042InBuffData = function(port, bOut, addrFrom)
|
||||||
* error, but "TEST.21" assumes that it is.
|
* error, but "TEST.21" assumes that it is.
|
||||||
*/
|
*/
|
||||||
default:
|
default:
|
||||||
this.b8042CmdData &= ~ChipSet.KBD_DATA.CMD.NO_CLOCK;
|
this.b8042CmdData &= ~ChipSet.KBC.DATA.CMD.NO_CLOCK;
|
||||||
if (this.kbd) this.set8042OutBuff(this.kbd.sendCmd(bOut));
|
if (this.kbd) this.set8042OutBuff(this.kbd.sendCmd(bOut));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.b8042InBuff = bOut;
|
this.b8042InBuff = bOut;
|
||||||
this.b8042Status &= ~ChipSet.KBD_STATUS.CMD_FLAG;
|
this.b8042Status &= ~ChipSet.KBC.STATUS.CMD_FLAG;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3609,12 +3619,12 @@ ChipSet.prototype.in8042RWReg = function(port, addrFrom)
|
||||||
* Normally, we return whatever was last written to this port, but we do need to mask the
|
* Normally, we return whatever was last written to this port, but we do need to mask the
|
||||||
* two upper-most bits (KBD_RWREG.PARITY_ERR), because we never want to report a parity error.
|
* two upper-most bits (KBD_RWREG.PARITY_ERR), because we never want to report a parity error.
|
||||||
*/
|
*/
|
||||||
var b = this.bPPIB & ~ChipSet.KBD_RWREG.PARITY_ERR;
|
var b = this.bPPIB & ~ChipSet.KBC.RWREG.PARITY_ERR;
|
||||||
this.messagePort(port, null, addrFrom, "8042_RWREG", ChipSet.MESSAGE_CHIPSET, b);
|
this.messagePort(port, null, addrFrom, "8042_RWREG", ChipSet.MESSAGE_CHIPSET, b);
|
||||||
/*
|
/*
|
||||||
* "TEST.09" of the MODEL_5170 BIOS expects the following bit ("REFRESH_BIT") to alternate, so we oblige.
|
* "TEST.09" of the MODEL_5170 BIOS expects the following bit ("REFRESH_BIT") to alternate, so we oblige.
|
||||||
*/
|
*/
|
||||||
this.bPPIB ^= ChipSet.KBD_RWREG.REFRESH_BIT;
|
this.bPPIB ^= ChipSet.KBC.RWREG.REFRESH_BIT;
|
||||||
return b;
|
return b;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3659,9 +3669,9 @@ ChipSet.prototype.in8042Status = function(port, addrFrom)
|
||||||
* If longer delays are needed down the road, we may need to set a delay count in the upper (hidden)
|
* If longer delays are needed down the road, we may need to set a delay count in the upper (hidden)
|
||||||
* bits of b8042Status, instead of using a single "OUTBUFF_DELAY" bit.
|
* bits of b8042Status, instead of using a single "OUTBUFF_DELAY" bit.
|
||||||
*/
|
*/
|
||||||
if (this.b8042Status & ChipSet.KBD_STATUS.OUTBUFF_DELAY) {
|
if (this.b8042Status & ChipSet.KBC.STATUS.OUTBUFF_DELAY) {
|
||||||
this.b8042Status |= ChipSet.KBD_STATUS.OUTBUFF_FULL;
|
this.b8042Status |= ChipSet.KBC.STATUS.OUTBUFF_FULL;
|
||||||
this.b8042Status &= ~ChipSet.KBD_STATUS.OUTBUFF_DELAY;
|
this.b8042Status &= ~ChipSet.KBC.STATUS.OUTBUFF_DELAY;
|
||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
};
|
};
|
||||||
|
|
@ -3681,34 +3691,34 @@ ChipSet.prototype.in8042Status = function(port, addrFrom)
|
||||||
ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
|
ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
|
||||||
{
|
{
|
||||||
this.messagePort(port, bOut, addrFrom, "8042_INBUFF.CMD", ChipSet.MESSAGE_CHIPSET);
|
this.messagePort(port, bOut, addrFrom, "8042_INBUFF.CMD", ChipSet.MESSAGE_CHIPSET);
|
||||||
Component.assert(!(this.b8042Status & ChipSet.KBD_STATUS.INBUFF_FULL));
|
Component.assert(!(this.b8042Status & ChipSet.KBC.STATUS.INBUFF_FULL));
|
||||||
this.b8042InBuff = bOut;
|
this.b8042InBuff = bOut;
|
||||||
|
|
||||||
this.b8042Status |= ChipSet.KBD_STATUS.CMD_FLAG;
|
this.b8042Status |= ChipSet.KBC.STATUS.CMD_FLAG;
|
||||||
|
|
||||||
var bPulseBits = 0;
|
var bPulseBits = 0;
|
||||||
if (this.b8042InBuff >= ChipSet.KBD_CMD.PULSE_OUTPORT) {
|
if (this.b8042InBuff >= ChipSet.KBC.CMD.PULSE_OUTPORT) {
|
||||||
bPulseBits = (this.b8042InBuff ^ 0xf);
|
bPulseBits = (this.b8042InBuff ^ 0xf);
|
||||||
/*
|
/*
|
||||||
* Now that we have isolated the bit(s) to pulse, map all pulse commands to KBD_CMD.PULSE_OUTPORT
|
* Now that we have isolated the bit(s) to pulse, map all pulse commands to KBD_CMD.PULSE_OUTPORT
|
||||||
*/
|
*/
|
||||||
this.b8042InBuff = ChipSet.KBD_CMD.PULSE_OUTPORT;
|
this.b8042InBuff = ChipSet.KBC.CMD.PULSE_OUTPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this.b8042InBuff) {
|
switch (this.b8042InBuff) {
|
||||||
case ChipSet.KBD_CMD.WRITE_CMD: // 0x60
|
case ChipSet.KBC.CMD.WRITE_CMD: // 0x60
|
||||||
case ChipSet.KBD_CMD.WRITE_OUTPORT: // 0xD1
|
case ChipSet.KBC.CMD.WRITE_OUTPORT: // 0xD1
|
||||||
/*
|
/*
|
||||||
* No further action required for this first group of commands; more data is expected via out8042InBuffData()
|
* No further action required for this first group of commands; more data is expected via out8042InBuffData()
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.READ_INPORT: // 0xC0
|
case ChipSet.KBC.CMD.READ_INPORT: // 0xC0
|
||||||
this.set8042OutBuff(this.b8042InPort);
|
this.set8042OutBuff(this.b8042InPort);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.DISABLE_KBD: // 0xAD
|
case ChipSet.KBC.CMD.DISABLE_KBD: // 0xAD
|
||||||
this.b8042CmdData |= ChipSet.KBD_DATA.CMD.NO_CLOCK;
|
this.b8042CmdData |= ChipSet.KBC.DATA.CMD.NO_CLOCK;
|
||||||
if (DEBUG) this.messageDebugger("keyboard disabled", ChipSet.MESSAGE_KBD);
|
if (DEBUG) this.messageDebugger("keyboard disabled", ChipSet.MESSAGE_KBD);
|
||||||
/*
|
/*
|
||||||
* TODO: Determine where to honor KBD_DATA.CMD.NO_CLOCK; note that the MODEL_5170 BIOS calls "KBD_RESET" (F000:17D2)
|
* TODO: Determine where to honor KBD_DATA.CMD.NO_CLOCK; note that the MODEL_5170 BIOS calls "KBD_RESET" (F000:17D2)
|
||||||
|
|
@ -3716,24 +3726,24 @@ ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.ENABLE_KBD: // 0xAE
|
case ChipSet.KBC.CMD.ENABLE_KBD: // 0xAE
|
||||||
this.b8042CmdData &= ~ChipSet.KBD_DATA.CMD.NO_CLOCK;
|
this.b8042CmdData &= ~ChipSet.KBC.DATA.CMD.NO_CLOCK;
|
||||||
if (DEBUG) this.messageDebugger("keyboard re-enabled", ChipSet.MESSAGE_KBD);
|
if (DEBUG) this.messageDebugger("keyboard re-enabled", ChipSet.MESSAGE_KBD);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.SELF_TEST: // 0xAA
|
case ChipSet.KBC.CMD.SELF_TEST: // 0xAA
|
||||||
if (this.kbd) this.kbd.shiftScanCode(true);
|
if (this.kbd) this.kbd.shiftScanCode(true);
|
||||||
this.b8042CmdData |= ChipSet.KBD_DATA.CMD.NO_CLOCK;
|
this.b8042CmdData |= ChipSet.KBC.DATA.CMD.NO_CLOCK;
|
||||||
if (DEBUG) this.messageDebugger("keyboard disabled on reset", ChipSet.MESSAGE_KBD);
|
if (DEBUG) this.messageDebugger("keyboard disabled on reset", ChipSet.MESSAGE_KBD);
|
||||||
this.set8042OutBuff(ChipSet.KBD_DATA.SELF_TEST.OK);
|
this.set8042OutBuff(ChipSet.KBC.DATA.SELF_TEST.OK);
|
||||||
this.set8042OutPort(ChipSet.KBD_DATA.OUTPORT.NO_RESET | ChipSet.KBD_DATA.OUTPORT.A20_ON);
|
this.set8042OutPort(ChipSet.KBC.OUTPORT.NO_RESET | ChipSet.KBC.OUTPORT.A20_ON);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.READ_TEST: // 0xE0
|
case ChipSet.KBC.CMD.READ_TEST: // 0xE0
|
||||||
this.set8042OutBuff((this.b8042CmdData & ChipSet.KBD_DATA.CMD.NO_CLOCK)? 0 : ChipSet.KBD_DATA.TESTPORT.KBD_CLOCK);
|
this.set8042OutBuff((this.b8042CmdData & ChipSet.KBC.DATA.CMD.NO_CLOCK)? 0 : ChipSet.KBC.TESTPORT.KBD_CLOCK);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChipSet.KBD_CMD.PULSE_OUTPORT: // 0xF0-0xFF
|
case ChipSet.KBC.CMD.PULSE_OUTPORT: // 0xF0-0xFF
|
||||||
if (bPulseBits & 0x1) {
|
if (bPulseBits & 0x1) {
|
||||||
/*
|
/*
|
||||||
* Bit 0 of the 8042's output port is connected to RESET. If it's pulsed, the processor resets.
|
* Bit 0 of the 8042's output port is connected to RESET. If it's pulsed, the processor resets.
|
||||||
|
|
@ -3763,8 +3773,8 @@ ChipSet.prototype.set8042OutBuff = function(b)
|
||||||
{
|
{
|
||||||
if (b >= 0) {
|
if (b >= 0) {
|
||||||
this.b8042OutBuff = b;
|
this.b8042OutBuff = b;
|
||||||
this.b8042Status &= ~ChipSet.KBD_STATUS.OUTBUFF_FULL;
|
this.b8042Status &= ~ChipSet.KBC.STATUS.OUTBUFF_FULL;
|
||||||
this.b8042Status |= ChipSet.KBD_STATUS.OUTBUFF_DELAY;
|
this.b8042Status |= ChipSet.KBC.STATUS.OUTBUFF_DELAY;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3777,8 +3787,8 @@ ChipSet.prototype.set8042OutBuff = function(b)
|
||||||
ChipSet.prototype.set8042OutPort = function(b)
|
ChipSet.prototype.set8042OutPort = function(b)
|
||||||
{
|
{
|
||||||
this.b8042OutPort = b;
|
this.b8042OutPort = b;
|
||||||
this.bus.setA20(!!(b & ChipSet.KBD_DATA.OUTPORT.A20_ON));
|
this.bus.setA20(!!(b & ChipSet.KBC.OUTPORT.A20_ON));
|
||||||
if (!(b & ChipSet.KBD_DATA.OUTPORT.NO_RESET)) {
|
if (!(b & ChipSet.KBC.OUTPORT.NO_RESET)) {
|
||||||
/*
|
/*
|
||||||
* Bit 0 of the 8042's output port is connected to RESET. Normally, it's "pulsed" with the
|
* Bit 0 of the 8042's output port is connected to RESET. Normally, it's "pulsed" with the
|
||||||
* KBD_CMD.PULSE_OUTPORT command, so if a RESET is detected via this command, we should try to
|
* KBD_CMD.PULSE_OUTPORT command, so if a RESET is detected via this command, we should try to
|
||||||
|
|
@ -3818,7 +3828,7 @@ ChipSet.prototype.outCMOSAddr = function(port, bOut, addrFrom)
|
||||||
{
|
{
|
||||||
this.messagePort(port, bOut, addrFrom, "CMOS_ADDR", ChipSet.MESSAGE_CHIPSET);
|
this.messagePort(port, bOut, addrFrom, "CMOS_ADDR", ChipSet.MESSAGE_CHIPSET);
|
||||||
this.bCMOSAddr = bOut;
|
this.bCMOSAddr = bOut;
|
||||||
this.bNMI = (bOut & ChipSet.CMOS_ADDR.NMI_DISABLE)? ChipSet.NMI.DISABLE : ChipSet.NMI.ENABLE;
|
this.bNMI = (bOut & ChipSet.CMOS.ADDR.NMI_DISABLE)? ChipSet.NMI.DISABLE : ChipSet.NMI.ENABLE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3831,8 +3841,8 @@ ChipSet.prototype.outCMOSAddr = function(port, bOut, addrFrom)
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.inCMOSData = function(port, addrFrom)
|
ChipSet.prototype.inCMOSData = function(port, addrFrom)
|
||||||
{
|
{
|
||||||
var bAddr = this.bCMOSAddr & ChipSet.CMOS_ADDR.MASK;
|
var bAddr = this.bCMOSAddr & ChipSet.CMOS.ADDR.MASK;
|
||||||
var bIn = (bAddr <= ChipSet.CMOS_ADDR.RTC_STATUSD? this.getRTCByte(bAddr) : this.abCMOSData[bAddr]);
|
var bIn = (bAddr <= ChipSet.CMOS.ADDR.RTC_STATUSD? this.getRTCByte(bAddr) : this.abCMOSData[bAddr]);
|
||||||
this.messagePort(port, null, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CHIPSET, bIn);
|
this.messagePort(port, null, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CHIPSET, bIn);
|
||||||
return bIn;
|
return bIn;
|
||||||
};
|
};
|
||||||
|
|
@ -3847,9 +3857,9 @@ ChipSet.prototype.inCMOSData = function(port, addrFrom)
|
||||||
*/
|
*/
|
||||||
ChipSet.prototype.outCMOSData = function(port, bOut, addrFrom)
|
ChipSet.prototype.outCMOSData = function(port, bOut, addrFrom)
|
||||||
{
|
{
|
||||||
var bAddr = this.bCMOSAddr & ChipSet.CMOS_ADDR.MASK;
|
var bAddr = this.bCMOSAddr & ChipSet.CMOS.ADDR.MASK;
|
||||||
this.messagePort(port, bOut, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CHIPSET);
|
this.messagePort(port, bOut, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CHIPSET);
|
||||||
this.abCMOSData[bAddr] = (bAddr <= ChipSet.CMOS_ADDR.RTC_STATUSD? this.setRTCByte(bAddr, bOut) : bOut);
|
this.abCMOSData[bAddr] = (bAddr <= ChipSet.CMOS.ADDR.RTC_STATUSD? this.setRTCByte(bAddr, bOut) : bOut);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3896,6 +3906,50 @@ ChipSet.prototype.outNMI = function(port, bOut, addrFrom)
|
||||||
this.bNMI = bOut;
|
this.bNMI = bOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inHFCCtrl(port, addrFrom)
|
||||||
|
*
|
||||||
|
* @this {ChipSet}
|
||||||
|
* @param {number} port (0x1F4)
|
||||||
|
* @param {number|undefined} addrFrom (not defined if the Debugger is trying to read the specified port)
|
||||||
|
* @return {number} simulated port value
|
||||||
|
*/
|
||||||
|
ChipSet.prototype.inHFCCtrl = function(port, addrFrom)
|
||||||
|
{
|
||||||
|
var b = this.regsHFCombo.bCtrl;
|
||||||
|
this.messagePort(port, null, addrFrom, "HFC_CTRL", ChipSet.MESSAGE_CHIPSET, b);
|
||||||
|
return b;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* outHFCCtrl(port, bOut, addrFrom)
|
||||||
|
*
|
||||||
|
* @this {ChipSet}
|
||||||
|
* @param {number} port (0x1F4)
|
||||||
|
* @param {number} bOut
|
||||||
|
* @param {number|undefined} addrFrom (not defined if the Debugger is trying to write the specified port)
|
||||||
|
*/
|
||||||
|
ChipSet.prototype.outHFCCtrl = function(port, bOut, addrFrom)
|
||||||
|
{
|
||||||
|
this.messagePort(port, bOut, addrFrom, "HFC_CTRL", ChipSet.MESSAGE_CHIPSET);
|
||||||
|
this.regsHFCombo.bCtrl = bOut;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inHFCStatus(port, addrFrom)
|
||||||
|
*
|
||||||
|
* @this {ChipSet}
|
||||||
|
* @param {number} port (0x1F7)
|
||||||
|
* @param {number|undefined} addrFrom (not defined if the Debugger is trying to read the specified port)
|
||||||
|
* @return {number} simulated port value
|
||||||
|
*/
|
||||||
|
ChipSet.prototype.inHFCStatus = function(port, addrFrom)
|
||||||
|
{
|
||||||
|
var b = this.regsHFCombo.bStatus;
|
||||||
|
this.messagePort(port, null, addrFrom, "HFC_STATUS", ChipSet.MESSAGE_CHIPSET, b);
|
||||||
|
return b;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* parseSwitches(s, def)
|
* parseSwitches(s, def)
|
||||||
*
|
*
|
||||||
|
|
@ -4076,7 +4130,8 @@ ChipSet.aPortInput5170 = {
|
||||||
0xCC: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAChannelAddr(ChipSet.DMA1.INDEX, 3, port, addrFrom); },
|
0xCC: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAChannelAddr(ChipSet.DMA1.INDEX, 3, port, addrFrom); },
|
||||||
0xCE: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAChannelCount(ChipSet.DMA1.INDEX, 3, port, addrFrom); },
|
0xCE: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAChannelCount(ChipSet.DMA1.INDEX, 3, port, addrFrom); },
|
||||||
0xD0: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAStatus(ChipSet.DMA1.INDEX, port, addrFrom); },
|
0xD0: /** @this {ChipSet} */ function(port, addrFrom) { return this.inDMAStatus(ChipSet.DMA1.INDEX, port, addrFrom); },
|
||||||
0x1F7: /** @this {ChipSet} */ function(port, addrFrom) { return 0x7F; } // refer to comments regarding HFCOMBO.STATUS
|
0x1F4: ChipSet.prototype.inHFCCtrl, // refer to comments regarding HFCOMBO.CTRL
|
||||||
|
0x1F7: ChipSet.prototype.inHFCStatus // refer to comments regarding HFCOMBO.STATUS
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -4150,7 +4205,8 @@ ChipSet.aPortOutput5170 = {
|
||||||
0xD4: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAMask(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
0xD4: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAMask(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
||||||
0xD6: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAMode(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
0xD6: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAMode(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
||||||
0xD8: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAIndex(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
0xD8: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAIndex(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
||||||
0xDA: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAClear(ChipSet.DMA1.INDEX, port, bOut, addrFrom); }
|
0xDA: /** @this {ChipSet} */ function(port, bOut, addrFrom) { this.outDMAClear(ChipSet.DMA1.INDEX, port, bOut, addrFrom); },
|
||||||
|
0x1F4: ChipSet.prototype.outHFCCtrl // refer to comments regarding HFCOMBO.CTRL
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ Component.subclass(Component, CPU);
|
||||||
*/
|
*/
|
||||||
CPU.YIELDS_PER_SECOND = 30;
|
CPU.YIELDS_PER_SECOND = 30;
|
||||||
CPU.VIDEO_UPDATES_PER_SECOND = 60; // WARNING: if you change this, beware of side-effects in the Video component
|
CPU.VIDEO_UPDATES_PER_SECOND = 60; // WARNING: if you change this, beware of side-effects in the Video component
|
||||||
CPU.STATUS_UPDATES_PER_SECOND = 5;
|
CPU.STATUS_UPDATES_PER_SECOND = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initBus(cmp, bus, cpu, dbg)
|
* initBus(cmp, bus, cpu, dbg)
|
||||||
|
|
|
||||||
|
|
@ -1518,14 +1518,15 @@ if (DEBUGGER) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* stepCPU(nCycles, fRegs)
|
* stepCPU(nCycles, fRegs, fUpdateCPU)
|
||||||
*
|
*
|
||||||
* @this {Debugger}
|
* @this {Debugger}
|
||||||
* @param {number} nCycles (0 for one instruction without checking breakpoints)
|
* @param {number} nCycles (0 for one instruction without checking breakpoints)
|
||||||
* @param {boolean} [fRegs] is true to display registers after step (default is false)
|
* @param {boolean} [fRegs] is true to display registers after step (default is false)
|
||||||
|
* @param {boolean} [fUpdateCPU] is false to disable calls to updateCPU() (default is true)
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
Debugger.prototype.stepCPU = function(nCycles, fRegs)
|
Debugger.prototype.stepCPU = function(nCycles, fRegs, fUpdateCPU)
|
||||||
{
|
{
|
||||||
if (!this.isCPUAvail()) return false;
|
if (!this.isCPUAvail()) return false;
|
||||||
|
|
||||||
|
|
@ -1556,9 +1557,11 @@ if (DEBUGGER) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Because we called cpu.stepCPU() and not cpu.runCPU(), we must nudge the cpu's update code,
|
* Because we called cpu.stepCPU() and not cpu.runCPU(), we must nudge the cpu's update code,
|
||||||
* and then update our own state.
|
* 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.
|
||||||
*/
|
*/
|
||||||
this.cpu.updateCPU();
|
if (fUpdateCPU !== false) this.cpu.updateCPU();
|
||||||
|
|
||||||
this.updateStatus(!fRegs);
|
this.updateStatus(!fRegs);
|
||||||
return (this.nCycles > 0);
|
return (this.nCycles > 0);
|
||||||
};
|
};
|
||||||
|
|
@ -1593,7 +1596,6 @@ if (DEBUGGER) {
|
||||||
if (fStep || this.fProcStep == 1)
|
if (fStep || this.fProcStep == 1)
|
||||||
this.doUnassemble();
|
this.doUnassemble();
|
||||||
else {
|
else {
|
||||||
// if (fStep === false) this.println();
|
|
||||||
this.doRegisters();
|
this.doRegisters();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1768,7 +1770,9 @@ if (DEBUGGER) {
|
||||||
if (this.nCycles) {
|
if (this.nCycles) {
|
||||||
var msTotal = ms - this.msStart;
|
var msTotal = ms - this.msStart;
|
||||||
var nCyclesPerSecond = (msTotal > 0? Math.round(this.nCycles * 1000 / msTotal) : 0);
|
var nCyclesPerSecond = (msTotal > 0? Math.round(this.nCycles * 1000 / msTotal) : 0);
|
||||||
sStopped += " (" + this.cInstructions + " ops, " + this.nCycles + " cycles, " + msTotal + "ms, " + nCyclesPerSecond + "hz)";
|
sStopped += " (";
|
||||||
|
if (this.checksEnabled()) sStopped += this.cInstructions + " ops, ";
|
||||||
|
sStopped += this.nCycles + " cycles, " + msTotal + " ms, " + nCyclesPerSecond + " hz)";
|
||||||
if (MAXDEBUG && this.chipset) {
|
if (MAXDEBUG && this.chipset) {
|
||||||
var i, c, n;
|
var i, c, n;
|
||||||
for (i = 0; i < this.chipset.acInterrupts.length; i++) {
|
for (i = 0; i < this.chipset.acInterrupts.length; i++) {
|
||||||
|
|
@ -4069,7 +4073,9 @@ if (DEBUGGER) {
|
||||||
this.println("updated registers:");
|
this.println("updated registers:");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.println(this.getRegStr(fProt));
|
|
||||||
|
this.println('\n' + this.getRegStr(fProt));
|
||||||
|
|
||||||
if (fIns) {
|
if (fIns) {
|
||||||
this.aAddrNextCode = this.newAddr(this.cpu.regIP, this.cpu.segCS.sel);
|
this.aAddrNextCode = this.newAddr(this.cpu.regIP, this.cpu.segCS.sel);
|
||||||
this.doUnassemble(this.hexAddr(this.aAddrNextCode));
|
this.doUnassemble(this.hexAddr(this.aAddrNextCode));
|
||||||
|
|
@ -4219,9 +4225,15 @@ if (DEBUGGER) {
|
||||||
web.onCountRepeat(
|
web.onCountRepeat(
|
||||||
count,
|
count,
|
||||||
function onCountStep() {
|
function onCountStep() {
|
||||||
return dbg.setBusy(true) && dbg.stepCPU(nCycles, fRegs);
|
return dbg.setBusy(true) && dbg.stepCPU(nCycles, fRegs, false);
|
||||||
},
|
},
|
||||||
function onCountStepComplete() {
|
function onCountStepComplete() {
|
||||||
|
/*
|
||||||
|
* We explicitly called stepCPU() with fUpdateCPU === false, because repeatedly
|
||||||
|
* calling updateCPU() is very slow, so once the repeat count has been exhausted,
|
||||||
|
* we need to perform a final updateCPU().
|
||||||
|
*/
|
||||||
|
dbg.cpu.updateCPU();
|
||||||
dbg.setBusy(false);
|
dbg.setBusy(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,62 @@ if (typeof module !== 'undefined') {
|
||||||
var State = require("./state");
|
var State = require("./state");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
*
|
||||||
|
* 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 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
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FDC(parmsFDC)
|
* FDC(parmsFDC)
|
||||||
*
|
*
|
||||||
|
|
@ -136,28 +192,29 @@ FDC.BIOS.DISKETTE_INT = 0x13;
|
||||||
FDC.DEFAULT_DRIVE_NAME = "Floppy Drive";
|
FDC.DEFAULT_DRIVE_NAME = "Floppy Drive";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FDC Output Register (0x3F2, write-only)
|
* FDC Digital Output Register (DOR) (0x3F2, write-only)
|
||||||
*
|
*
|
||||||
* NOTE: A drive's MOTOR bit must be ON before the the drive can be selected. Motor start time is 500ms.
|
* NOTE: Reportedly, a drive's MOTOR bit had to be ON before the the drive could be selected, so outFDCOutput()
|
||||||
|
* verifies that. Also, motor start time for early model 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
|
* 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
|
* 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 (FDC.REG_OUTPUT.SELECT_C and FDC.REG_OUTPUT.SELECT_D are not supported)
|
* are supported, hence bit 1 is always 0 (ie, FDC.REG_OUTPUT.DS2 and FDC.REG_OUTPUT.DS3 are not supported) and bits
|
||||||
* and bits 6 and 7 are unused (FDC.REG_OUTPUT.MOTOR_C and FDC.REG_OUTPUT.MOTOR_D are not supported).
|
* 6 and 7 are unused (FDC.REG_OUTPUT.MOTOR_D2 and FDC.REG_OUTPUT.MOTOR_D3 are not supported).
|
||||||
*/
|
*/
|
||||||
FDC.REG_OUTPUT = {};
|
FDC.REG_OUTPUT = {};
|
||||||
FDC.REG_OUTPUT.PORT = 0x3F2;
|
FDC.REG_OUTPUT.PORT = 0x3F2;
|
||||||
FDC.REG_OUTPUT.SELECT = 0x03;
|
FDC.REG_OUTPUT.DS = 0x03; // drive select bits
|
||||||
FDC.REG_OUTPUT.SELECT_A = 0x00;
|
FDC.REG_OUTPUT.DS0 = 0x00;
|
||||||
FDC.REG_OUTPUT.SELECT_B = 0x01;
|
FDC.REG_OUTPUT.DS1 = 0x01;
|
||||||
FDC.REG_OUTPUT.SELECT_C = 0x02; // reserved on the MODEL_5170
|
FDC.REG_OUTPUT.DS2 = 0x02; // reserved on the MODEL_5170
|
||||||
FDC.REG_OUTPUT.SELECT_D = 0x03; // reserved on the MODEL_5170
|
FDC.REG_OUTPUT.DS3 = 0x03; // reserved on the MODEL_5170
|
||||||
FDC.REG_OUTPUT.ENABLE = 0x04; // clearing this bit resets the FDC
|
FDC.REG_OUTPUT.ENABLE = 0x04; // clearing this bit resets the FDC
|
||||||
FDC.REG_OUTPUT.INT_ENABLE = 0x08; // enables both FDC and DMA (Channel 2) interrupt requests (IRQ 6)
|
FDC.REG_OUTPUT.INT_ENABLE = 0x08; // enables both FDC and DMA (Channel 2) interrupt requests (IRQ 6)
|
||||||
FDC.REG_OUTPUT.MOTOR_A = 0x10;
|
FDC.REG_OUTPUT.MOTOR_D0 = 0x10;
|
||||||
FDC.REG_OUTPUT.MOTOR_B = 0x20;
|
FDC.REG_OUTPUT.MOTOR_D1 = 0x20;
|
||||||
FDC.REG_OUTPUT.MOTOR_C = 0x40; // reserved on the MODEL_5170
|
FDC.REG_OUTPUT.MOTOR_D2 = 0x40; // reserved on the MODEL_5170
|
||||||
FDC.REG_OUTPUT.MOTOR_D = 0x80; // reserved on the MODEL_5170
|
FDC.REG_OUTPUT.MOTOR_D3 = 0x80; // reserved on the MODEL_5170
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FDC Main Status Register (0x3F4, read-only)
|
* FDC Main Status Register (0x3F4, read-only)
|
||||||
|
|
@ -247,32 +304,42 @@ FDC.REG_DATA.CMD.MF = 0x40; // MF (Modified Frequency Modulation
|
||||||
FDC.REG_DATA.CMD.MT = 0x80; // MT (Multi-Track; ie, data under both heads will be processed)
|
FDC.REG_DATA.CMD.MT = 0x80; // MT (Multi-Track; ie, data under both heads will be processed)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FDC error conditions, generally assigned according to the corresponding ST0, ST1 or ST2 error bit.
|
* 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.
|
||||||
*/
|
*/
|
||||||
FDC.REG_DATA.ERR = {};
|
FDC.REG_DATA.RES = {};
|
||||||
FDC.REG_DATA.ERR.NONE = 0x000000; // ST0 (IC): Normal termination of command (NT)
|
FDC.REG_DATA.RES.NONE = 0x00000000; // ST0 (IC): Normal termination of command (NT)
|
||||||
FDC.REG_DATA.ERR.NOT_READY = 0x000008; // ST0 (NR): When the FDD is in the not-ready state and a read or write command is issued, this flag is set; if a read or write command is issued to side 1 of a single sided drive, then this flag is set
|
FDC.REG_DATA.RES.NOT_READY = 0x00000008; // ST0 (NR): When the FDD is in the not-ready state and a read or write command is issued, this flag is set; if a read or write command is issued to side 1 of a single sided drive, then this flag is set
|
||||||
FDC.REG_DATA.ERR.EQUIP_CHECK = 0x000010; // ST0 (EC): If a fault signal is received from the FDD, or if the track 0 signal fails to occur after 77 step pulses (recalibrate command), then this flag is set
|
FDC.REG_DATA.RES.EQUIP_CHECK = 0x00000010; // ST0 (EC): If a fault signal is received from the FDD, or if the track 0 signal fails to occur after 77 step pulses (recalibrate command), then this flag is set
|
||||||
FDC.REG_DATA.ERR.SEEK_END = 0x000020; // ST0 (SE): When the FDC completes the Seek command, this flag is set to 1 (high)
|
FDC.REG_DATA.RES.SEEK_END = 0x00000020; // ST0 (SE): When the FDC completes the Seek command, this flag is set to 1 (high)
|
||||||
FDC.REG_DATA.ERR.INCOMPLETE = 0x000040; // ST0 (IC): Abnormal termination of command (AT); execution of command was started, but was not successfully completed
|
FDC.REG_DATA.RES.INCOMPLETE = 0x00000040; // ST0 (IC): Abnormal termination of command (AT); execution of command was started, but was not successfully completed
|
||||||
FDC.REG_DATA.ERR.RESET = 0x0000C0; // ST0 (IC): Abnormal termination because during command execution the ready signal from FOO changed state
|
FDC.REG_DATA.RES.RESET = 0x000000C0; // ST0 (IC): Abnormal termination because during command execution the ready signal from the drive changed state
|
||||||
FDC.REG_DATA.ERR.INVALID = 0x000080; // ST0 (IC): Invalid command issue (IC); command which was issued was never started
|
FDC.REG_DATA.RES.INVALID = 0x00000080; // ST0 (IC): Invalid command issue (IC); command which was issued was never started
|
||||||
FDC.REG_DATA.ERR.ST0 = 0x0000FF;
|
FDC.REG_DATA.RES.ST0 = 0x000000FF;
|
||||||
FDC.REG_DATA.ERR.NO_ID_MARK = 0x000100; // ST1 (MA): If the FDC cannot detect the ID Address Mark, this flag is set; at the same time, the MD (Missing Address Mark in Data Field) of Status Register 2 is set
|
FDC.REG_DATA.RES.NO_ID_MARK = 0x00000100; // ST1 (MA): If the FDC cannot detect the ID Address Mark, this flag is set; at the same time, the MD (Missing Address Mark in Data Field) of Status Register 2 is set
|
||||||
FDC.REG_DATA.ERR.NOT_WRITABLE = 0x000200; // ST1 (NW): During Execution of a Write Data, Write Deleted Data, or Format a Cylinder command, if the FDC detects a write protect signal from the FDD, then this flag is set
|
FDC.REG_DATA.RES.NOT_WRITABLE = 0x00000200; // ST1 (NW): During Execution of a Write Data, Write Deleted Data, or Format a Cylinder command, if the FDC detects a write protect signal from the FDD, then this flag is set
|
||||||
FDC.REG_DATA.ERR.NO_DATA = 0x000400; // ST1 (ND): FDC cannot find specified sector (or specified ID if READ_ID command)
|
FDC.REG_DATA.RES.NO_DATA = 0x00000400; // ST1 (ND): FDC cannot find specified sector (or specified ID if READ_ID command)
|
||||||
FDC.REG_DATA.ERR.DMA_OVERRUN = 0x001000; // ST1 (OR): If the FDC is not serviced by the main systems during data transfers within a certain time interval, this flag is set
|
FDC.REG_DATA.RES.DMA_OVERRUN = 0x00001000; // ST1 (OR): If the FDC is not serviced by the main systems during data transfers within a certain time interval, this flag is set
|
||||||
FDC.REG_DATA.ERR.CRC_ERROR = 0x002000; // ST1 (DE): When the FDC detects a CRC error in either the ID field or the data field, this flag is set
|
FDC.REG_DATA.RES.CRC_ERROR = 0x00002000; // ST1 (DE): When the FDC detects a CRC error in either the ID field or the data field, this flag is set
|
||||||
FDC.REG_DATA.ERR.END_OF_CYL = 0x008000; // ST1 (EN): When the FDC tries to access a sector beyond the final sector of a cylinder, this flag is set
|
FDC.REG_DATA.RES.END_OF_CYL = 0x00008000; // ST1 (EN): When the FDC tries to access a sector beyond the final sector of a cylinder, this flag is set
|
||||||
FDC.REG_DATA.ERR.ST1 = 0x00FF00;
|
FDC.REG_DATA.RES.ST1 = 0x0000FF00;
|
||||||
FDC.REG_DATA.ERR.NO_DATA_MARK = 0x010000; // ST2 (MD): When data is read from the medium, if the FDC cannot find a Data Address Mark or Deleted Data Address Mark, then this flag is set
|
FDC.REG_DATA.RES.NO_DATA_MARK = 0x00010000; // ST2 (MD): When data is read from the medium, if the FDC cannot find a Data Address Mark or Deleted Data Address Mark, then this flag is set
|
||||||
FDC.REG_DATA.ERR.BAD_CYL = 0x020000; // ST2 (BC): This bit is related to the ND bit, and when the contents of C on the medium are different from that stored in the ID Register, and the content of C is FF, then this flag is set
|
FDC.REG_DATA.RES.BAD_CYL = 0x00020000; // ST2 (BC): This bit is related to the ND bit, and when the contents of C on the medium are different from that stored in the ID Register, and the content of C is FF, then this flag is set
|
||||||
FDC.REG_DATA.ERR.SCAN_FAILED = 0x040000; // ST2 (SN): During execution of the Scan command, if the FDC cannot find a sector on the cylinder which meets the condition, then this flag is set
|
FDC.REG_DATA.RES.SCAN_FAILED = 0x00040000; // ST2 (SN): During execution of the Scan command, if the FDC cannot find a sector on the cylinder which meets the condition, then this flag is set
|
||||||
FDC.REG_DATA.ERR.SCAN_EQUAL = 0x080000; // ST2 (SH): During execution of the Scan command, if the condition of "equal" is satisfied, this flag is set
|
FDC.REG_DATA.RES.SCAN_EQUAL = 0x00080000; // ST2 (SH): During execution of the Scan command, if the condition of "equal" is satisfied, this flag is set
|
||||||
FDC.REG_DATA.ERR.WRONG_CYL = 0x100000; // ST2 (WC): This bit is related to the ND bit, and when the contents of C on the medium are different from that stored in the ID Register, this flag is set
|
FDC.REG_DATA.RES.WRONG_CYL = 0x00100000; // ST2 (WC): This bit is related to the ND bit, and when the contents of C on the medium are different from that stored in the ID Register, this flag is set
|
||||||
FDC.REG_DATA.ERR.DATA_FIELD = 0x200000; // ST2 (DD): If the FDC detects a CRC error in the data, then this flag is set
|
FDC.REG_DATA.RES.DATA_FIELD = 0x00200000; // ST2 (DD): If the FDC detects a CRC error in the data, then this flag is set
|
||||||
FDC.REG_DATA.ERR.STRL_MARK = 0x400000; // ST2 (CM): During execution of the Read Data or Scan command, if the FDC encounters a sector which contains a Deleted Data Address Mark, this flag is set
|
FDC.REG_DATA.RES.STRL_MARK = 0x00400000; // ST2 (CM): During execution of the Read Data or Scan command, if the FDC encounters a sector which contains a Deleted Data Address Mark, this flag is set
|
||||||
FDC.REG_DATA.ERR.ST2 = 0xFF0000;
|
FDC.REG_DATA.RES.ST2 = 0x00FF0000;
|
||||||
|
FDC.REG_DATA.RES.DRIVE = 0x03000000; // ST3 (Ux): Status of the "Drive Select" signals from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.HEAD = 0x04000000; // ST3 (HD): Status of the "Side Select" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.TWOSIDE = 0x08000000; // ST3 (TS): Status of the "Two Side" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.TRACK0 = 0x10000000; // ST3 (T0): Status of the "Track 0" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.READY = 0x20000000; // ST3 (RY): Status of the "Ready" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.WRITEPROT = 0x40000000; // ST3 (WP): Status of the "Write Protect" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.FAULT = 0x80000000; // ST3 (FT): Status of the "Fault" signal from the diskette drive
|
||||||
|
FDC.REG_DATA.RES.ST3 = 0xFF000000;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FDC Command Sequences
|
* FDC Command Sequences
|
||||||
|
|
@ -466,7 +533,15 @@ FDC.prototype.powerUp = function(data, fRepower)
|
||||||
if (!this.restore(data)) return false;
|
if (!this.restore(data)) return false;
|
||||||
}
|
}
|
||||||
if (this.chipset) {
|
if (this.chipset) {
|
||||||
this.nDrives = this.chipset.getSW1FloppyDrives();
|
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.FDRIVE.DSHC) {
|
||||||
|
drive.nCylinders = 80;
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Now that we finally have the SW1 settings, we can populate the HTML control
|
* 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.
|
* to match the actual (well, um, specified) number of floppy drives in the system.
|
||||||
|
|
@ -477,7 +552,7 @@ FDC.prototype.powerUp = function(data, fRepower)
|
||||||
controlDrives.removeChild(controlDrives.firstChild);
|
controlDrives.removeChild(controlDrives.firstChild);
|
||||||
}
|
}
|
||||||
controlDrives.innerHTML = "";
|
controlDrives.innerHTML = "";
|
||||||
for (var iDrive = 0; iDrive < this.nDrives; iDrive++) {
|
for (iDrive = 0; iDrive < this.nDrives; iDrive++) {
|
||||||
var controlOption = window.document.createElement("option");
|
var controlOption = window.document.createElement("option");
|
||||||
controlOption['value'] = iDrive;
|
controlOption['value'] = iDrive;
|
||||||
/*
|
/*
|
||||||
|
|
@ -507,7 +582,7 @@ FDC.prototype.powerUp = function(data, fRepower)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.powerDown = function(fSave)
|
FDC.prototype.powerDown = function(fSave)
|
||||||
{
|
{
|
||||||
return fSave && this.save ? this.save() : true;
|
return fSave && this.save? this.save() : true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -577,25 +652,25 @@ FDC.prototype.initController = function(data)
|
||||||
* Selected drive (from reOutput), which can only be selected if its motor is on (see regOutput).
|
* Selected drive (from reOutput), which can only be selected if its motor is on (see regOutput).
|
||||||
*/
|
*/
|
||||||
this.iDrive = data[i++];
|
this.iDrive = data[i++];
|
||||||
/*
|
i++; // unused slot (if reused, bias by +4, since it was formerly a unit #)
|
||||||
* FDC commands select a unit, which I assume should always match the selected drive, but since they're
|
|
||||||
* independent, we'll use independent variables.
|
|
||||||
*/
|
|
||||||
this.iUnit = data[i++];
|
|
||||||
/*
|
/*
|
||||||
* Defaults to FDC.REG_STATUS.RQM set (ready for command) and FDC.REG_STATUS.READ_DATA clear (data direction
|
* 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).
|
* is from processor to the FDC Data Register).
|
||||||
*/
|
*/
|
||||||
this.regStatus = data[i++];
|
this.regStatus = data[i++];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There can be up to 9 command bytes, and 7 result bytes, so 9 data registers are sufficient for communicating
|
* 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).
|
* in both directions (hence, the new Array(9) default above).
|
||||||
*/
|
*/
|
||||||
this.regDataArray = data[i++];
|
this.regDataArray = data[i++];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determines the next data byte to be received.
|
* Determines the next data byte to be received.
|
||||||
*/
|
*/
|
||||||
this.regDataIndex = data[i++];
|
this.regDataIndex = data[i++];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determines the next data byte to be sent (internally, we use regDataIndex to read data bytes, up to this total).
|
* Determines the next data byte to be sent (internally, we use regDataIndex to read data bytes, up to this total).
|
||||||
*/
|
*/
|
||||||
|
|
@ -615,6 +690,7 @@ FDC.prototype.initController = function(data)
|
||||||
* the SW1 switch settings.
|
* the SW1 switch settings.
|
||||||
*/
|
*/
|
||||||
if (this.aDrives === undefined) {
|
if (this.aDrives === undefined) {
|
||||||
|
this.nDrives = 0; // this will be set later to the number of ACTUAL drives
|
||||||
this.aDrives = new Array(4);
|
this.aDrives = new Array(4);
|
||||||
}
|
}
|
||||||
for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) {
|
for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) {
|
||||||
|
|
@ -653,7 +729,7 @@ FDC.prototype.saveController = function()
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var data = [];
|
var data = [];
|
||||||
data[i++] = this.iDrive;
|
data[i++] = this.iDrive;
|
||||||
data[i++] = this.iUnit;
|
data[i++] = 0;
|
||||||
data[i++] = this.regStatus;
|
data[i++] = this.regStatus;
|
||||||
data[i++] = this.regDataArray;
|
data[i++] = this.regDataArray;
|
||||||
data[i++] = this.regDataIndex;
|
data[i++] = this.regDataIndex;
|
||||||
|
|
@ -668,7 +744,7 @@ FDC.prototype.saveController = function()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initDrive(drive, iDrive, data)
|
* initDrive(drive, iDrive, data)
|
||||||
*
|
*
|
||||||
* @this {FDC}
|
* @this {FDC}
|
||||||
* @param {Object} drive
|
* @param {Object} drive
|
||||||
* @param {number} iDrive
|
* @param {number} iDrive
|
||||||
|
|
@ -684,23 +760,32 @@ FDC.prototype.initDrive = function(drive, iDrive, data)
|
||||||
|
|
||||||
if (data === undefined) {
|
if (data === undefined) {
|
||||||
/*
|
/*
|
||||||
* We set a default of two heads (MODEL_5150 PCs originally shipped with single-sided drives only,
|
* We set a default of two heads (MODEL_5150 PCs originally shipped with single-sided drives,
|
||||||
* but the ROM BIOS appears to have always supported both drive types).
|
* but the ROM BIOS appears to have always supported both drive types).
|
||||||
*/
|
*/
|
||||||
data = [FDC.REG_DATA.ERR.RESET, true, 0, 2, 0];
|
data = [FDC.REG_DATA.RES.RESET, true, 0, 2, 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof data[1] == "boolean") {
|
if (typeof data[1] == "boolean") {
|
||||||
data[1] = [FDC.DEFAULT_DRIVE_NAME, 40, data[3], 9, 512, data[1]];
|
/*
|
||||||
|
* 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).
|
||||||
|
*/
|
||||||
|
data[1] = [FDC.DEFAULT_DRIVE_NAME, drive.nCylinders || 40, data[3], 9, 512, data[1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* errorCode used to be an FDC global, but in order to insulate FDC state from the operation of various functions that operate on drive
|
* resCode used to be an FDC global, but in order to insulate FDC state from the operation of various functions
|
||||||
* objects (eg, readByte and writeByte), I've made it a per-drive variable. This choice, similar to my choice for handling PCN, is
|
* that operate on drive objects (eg, readByte and writeByte), I've made it a per-drive variable. This choice,
|
||||||
* probably contrary to how the actual hardware works, but I prefer this approach, as long as it doesn't expose any incompatibilities that
|
* similar to my choice for handling PCN, may be contrary to how the actual hardware works, but I prefer this
|
||||||
* any software actually cares about.
|
* approach, as long as it doesn't expose any incompatibilities that any software actually cares about.
|
||||||
*/
|
*/
|
||||||
drive.errorCode = data[i++];
|
drive.resCode = data[i++];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some additional drive properties/defaults that are largely for the Disk component's benefit.
|
* Some additional drive properties/defaults that are largely for the Disk component's benefit.
|
||||||
|
|
@ -720,12 +805,36 @@ FDC.prototype.initDrive = function(drive, iDrive, data)
|
||||||
* awaiting their first FDC command. We do this because the initial INT_STATUS command returns a PCN, which will also
|
* awaiting their first FDC command. We do this because the initial INT_STATUS 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.
|
* 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's probably closer to how the actual hardware operates,
|
* Alternatively, I could make PCN a global FDC variable. That may be closer to how the actual hardware operates,
|
||||||
* but I'm eschewing global FDC variables so that the FDC component can be a good client to both the CPU and other components.
|
* 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 DRIVE_STATUS command returns ST3 with the TRACK0 bit set.
|
||||||
|
*
|
||||||
|
* This implies that SEEK isn't really seeking to a specified cylinder, but rather it is calculating a delta from
|
||||||
|
* the previous cylinder to the specified cylinder, and stepping over that number of tracks. Which means that SEEK
|
||||||
|
* 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.FDRIVE.DSDD; // default; updated later once we have the actual ChipSet object
|
||||||
drive.bHead = data[i++];
|
drive.bHead = data[i++];
|
||||||
i++; // skip the data[] slot where we used to store drive.nHeads (no longer used)
|
drive.bCylinderSeek = data[i++]; // the data[] slot where we used to store drive.nHeads (or -1)
|
||||||
drive.bCylinder = data[i++];
|
drive.bCylinder = data[i++];
|
||||||
|
if (drive.bCylinderSeek >= 100) { // verify that the saved bCylinderSeek is valid, otherwise sync it with bCylinder
|
||||||
|
drive.bCylinderSeek -= 100;
|
||||||
|
} else {
|
||||||
|
drive.bCylinderSeek -= drive.bCylinder;
|
||||||
|
}
|
||||||
drive.bSector = data[i++];
|
drive.bSector = data[i++];
|
||||||
drive.bSectorEnd = data[i++]; // aka EOT
|
drive.bSectorEnd = data[i++]; // aka EOT
|
||||||
drive.nBytes = data[i++];
|
drive.nBytes = data[i++];
|
||||||
|
|
@ -735,7 +844,7 @@ FDC.prototype.initDrive = function(drive, iDrive, data)
|
||||||
*
|
*
|
||||||
* NOTE: I now avoid reinitializing drive.disk in order to retain any previously mounted diskette across resets.
|
* 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 variable contains a Disk object
|
* drive.disk = null; // when a "disk" is "inserted" into the "drive", this is a Disk object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -813,10 +922,14 @@ FDC.prototype.saveDrive = function(drive)
|
||||||
{
|
{
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var data = [];
|
var data = [];
|
||||||
data[i++] = drive.errorCode;
|
data[i++] = drive.resCode;
|
||||||
data[i++] = [drive.name, drive.nCylinders, drive.nHeads, drive.nSectors, drive.cbSector, drive.fRemovable];
|
data[i++] = [drive.name, drive.nCylinders, drive.nHeads, drive.nSectors, drive.cbSector, drive.fRemovable];
|
||||||
data[i++] = drive.bHead;
|
data[i++] = drive.bHead;
|
||||||
data[i++] = -1; // where we used to store drive.nHeads (no longer used)
|
/*
|
||||||
|
* We used to store drive.nHeads in the next slot, but now we store bCylinderSeek,
|
||||||
|
* and we bias it by +100 so that initDrive() can distinguish it from older values.
|
||||||
|
*/
|
||||||
|
data[i++] = drive.bCylinderSeek + 100;
|
||||||
data[i++] = drive.bCylinder;
|
data[i++] = drive.bCylinder;
|
||||||
data[i++] = drive.bSector;
|
data[i++] = drive.bSector;
|
||||||
data[i++] = drive.bSectorEnd;
|
data[i++] = drive.bSectorEnd;
|
||||||
|
|
@ -922,7 +1035,7 @@ FDC.prototype.seekDrive = function(drive, iSector, nSectors)
|
||||||
* do anything with bSectorEnd at this point. Perhaps someday, when we faithfully honor/restrict requests
|
* 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.errorCode = FDC.REG_DATA.ERR.NONE;
|
drive.resCode = FDC.REG_DATA.RES.NONE;
|
||||||
/*
|
/*
|
||||||
* At this point, we've finished simulating what an FDC.REG_DATA.CMD.READ_DATA command would have performed,
|
* At this point, we've finished simulating what an FDC.REG_DATA.CMD.READ_DATA command would have performed,
|
||||||
* up through doRead(). Now it's the caller responsibility to call readByte(), just like the DMA Controller would.
|
* up through doRead(). Now it's the caller responsibility to call readByte(), just like the DMA Controller would.
|
||||||
|
|
@ -1228,17 +1341,41 @@ FDC.prototype.outFDCOutput = function(port, bOut, addrFrom)
|
||||||
this.messagePort(port, bOut, addrFrom, "OUTPUT");
|
this.messagePort(port, bOut, addrFrom, "OUTPUT");
|
||||||
if (!(bOut & FDC.REG_OUTPUT.ENABLE)) {
|
if (!(bOut & FDC.REG_OUTPUT.ENABLE)) {
|
||||||
this.initController();
|
this.initController();
|
||||||
} else if (!(this.regOutput & FDC.REG_OUTPUT.ENABLE)) {
|
|
||||||
/*
|
/*
|
||||||
* When FDC.REG_OUTPUT.ENABLE transitions from 0 to 1, generate an interrupt
|
* initController() resets, among other things, the selected drive (this.iDrive), so if we were
|
||||||
|
* still updating this.iDrive below based on the "drive select" bits in regOutput, we would want
|
||||||
|
* to make sure those bits now match what initController() set. But since we no longer do that
|
||||||
|
* (see below), this is no longer needed either.
|
||||||
|
*/
|
||||||
|
// bOut = (bOut & ~FDC.REG_OUTPUT.DS) | this.iDrive;
|
||||||
|
}
|
||||||
|
else if (!(this.regOutput & FDC.REG_OUTPUT.ENABLE)) {
|
||||||
|
/*
|
||||||
|
* When FDC.REG_OUTPUT.ENABLE transitions from 0 to 1, generate an interrupt.
|
||||||
*/
|
*/
|
||||||
if (this.regOutput & FDC.REG_OUTPUT.INT_ENABLE) {
|
if (this.regOutput & FDC.REG_OUTPUT.INT_ENABLE) {
|
||||||
if (this.chipset) this.chipset.setIRR(ChipSet.IRQ.FDC);
|
if (this.chipset) this.chipset.setIRR(ChipSet.IRQ.FDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var iDrive = bOut & FDC.REG_OUTPUT.SELECT;
|
/*
|
||||||
if (bOut & (FDC.REG_OUTPUT.MOTOR_A << iDrive))
|
* This no longer updates the internally selected drive (this.iDrive) based on regOutput, because (a) there seems
|
||||||
this.iDrive = iDrive;
|
* 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 DSHC (80-track). So if there are two drives, the last selected drive will be drive 1.
|
||||||
|
* Immediately before booting, the BIOS issues an INT 0x3/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 # into regOutput's "drive select" bits.
|
||||||
|
*
|
||||||
|
* If we switched our selected drive to match regOutput, then the ST0 value we returned on an INT_STATUS command
|
||||||
|
* following the regOutput reset operation would indicate drive 1 instead of drive 0. But the BIOS requires
|
||||||
|
* the ST0 result from the INT_STATUS command ALWAYS be 0xC0, not 0xC1, so the controller must not be propagating
|
||||||
|
* 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;
|
||||||
|
|
||||||
this.regOutput = bOut;
|
this.regOutput = bOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1404,7 +1541,7 @@ FDC.prototype.intBIOSDisketteReturn = function(nCycles, nLevel)
|
||||||
{
|
{
|
||||||
if (DEBUGGER) {
|
if (DEBUGGER) {
|
||||||
nCycles = this.cpu.getCycles() - nCycles;
|
nCycles = this.cpu.getCycles() - nCycles;
|
||||||
this.messageDebugger("FDC.intBIOSReturn(" + nLevel + "): C=" + (this.cpu.getCF() ? 1 : 0) + " (cycles=" + nCycles + ")");
|
this.messageDebugger("FDC.intBIOSReturn(" + nLevel + "): C=" + (this.cpu.getCF()? 1 : 0) + " (cycles=" + nCycles + ")");
|
||||||
// if (DEBUG && nCycles > 10000) this.cpu.haltCPU();
|
// if (DEBUG && nCycles > 10000) this.cpu.haltCPU();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1419,7 +1556,7 @@ FDC.prototype.doCmd = function()
|
||||||
var fIRQ = false;
|
var fIRQ = false;
|
||||||
this.regDataIndex = 0;
|
this.regDataIndex = 0;
|
||||||
var bCmd = this.popCmd();
|
var bCmd = this.popCmd();
|
||||||
var iUnitSelect, drive, bHeadSelect, bHead, n;
|
var drive, bDrive, bHeadSelect, bHead, bCylinder, n;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: We currently ignore the FDC.REG_DATA.CMD.SK, FDC.REG_DATA.CMD.MF and FDC.REG_DATA.CMD.MT bits of every command.
|
* NOTE: We currently ignore the FDC.REG_DATA.CMD.SK, FDC.REG_DATA.CMD.MF and FDC.REG_DATA.CMD.MT bits of every command.
|
||||||
|
|
@ -1428,109 +1565,129 @@ FDC.prototype.doCmd = function()
|
||||||
* data without any formatting data.
|
* 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 might have to start honoring those delays. In any case,
|
* however, if timing issues become compatibility issues, we'll have to revisit those delays. In any case, the maximum
|
||||||
* the maximum speed of the simulation will still be limited by various spin-loops in the ROM BIOS that wait prescribed
|
* speed of the simulation will still be limited by various spin-loops in the ROM BIOS that wait prescribed times, so even
|
||||||
* times, so even with infinitely fast hardware, the simulation will never run as fast as it theoretically could,
|
* with infinitely fast hardware, the simulation will never run as fast as it theoretically could, unless we opt to identify
|
||||||
* unless we opt to identify those spin-loops and either patch them or skip over them.
|
* those spin-loops and either patch them or skip over them.
|
||||||
*/
|
*/
|
||||||
var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK;
|
var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK;
|
||||||
|
|
||||||
switch (bCmdMasked) {
|
switch (bCmdMasked) {
|
||||||
case FDC.REG_DATA.CMD.SPECIFY: // 0x03
|
case FDC.REG_DATA.CMD.SPECIFY: // 0x03
|
||||||
this.popSRT(); // SRT and HUT (encodings?)
|
this.popSRT(); // SRT and HUT (encodings?)
|
||||||
this.popHLT(); // HLT and ND (encodings?)
|
this.popHLT(); // HLT and ND (encodings?)
|
||||||
this.beginResult(); // no results are provided by this command, and fIRQ should remain false
|
this.beginResult(); // no results are provided by this command, and fIRQ should remain false
|
||||||
break;
|
break;
|
||||||
case FDC.REG_DATA.CMD.DRIVE_STATUS: // 0x04
|
case FDC.REG_DATA.CMD.DRIVE_STATUS: // 0x04 (SENSE DRIVE STATUS)
|
||||||
iUnitSelect = this.popCmd("US");
|
bDrive = this.popCmd("DS");
|
||||||
bHeadSelect = (iUnitSelect >> 2) & 0x1;
|
bHeadSelect = (bDrive >> 2) & 0x1;
|
||||||
this.iUnit = (iUnitSelect &= 0x3);
|
this.iDrive = (bDrive & 0x3);
|
||||||
drive = this.aDrives[iUnitSelect];
|
drive = this.aDrives[this.iDrive];
|
||||||
this.beginResult();
|
this.beginResult();
|
||||||
this.pushST3(drive);
|
this.pushST3(drive);
|
||||||
break;
|
break;
|
||||||
case FDC.REG_DATA.CMD.WRITE_DATA: // 0x05
|
case FDC.REG_DATA.CMD.WRITE_DATA: // 0x05
|
||||||
case FDC.REG_DATA.CMD.READ_DATA: // 0x06
|
case FDC.REG_DATA.CMD.READ_DATA: // 0x06
|
||||||
iUnitSelect = this.popCmd("US");
|
bDrive = this.popCmd("DS");
|
||||||
bHeadSelect = (iUnitSelect >> 2) & 0x1;
|
bHeadSelect = (bDrive >> 2) & 0x1;
|
||||||
iUnitSelect &= 0x3;
|
this.iDrive = (bDrive & 0x3);
|
||||||
this.iUnit = iUnitSelect;
|
drive = this.aDrives[this.iDrive];
|
||||||
drive = this.aDrives[iUnitSelect];
|
drive.bHead = bHeadSelect;
|
||||||
drive.bHead = bHeadSelect;
|
drive.bCylinder = this.popCmd("C"); // C
|
||||||
drive.bCylinder = this.popCmd("C"); // C
|
bHead = this.popCmd("H"); // H
|
||||||
bHead = this.popCmd("H"); // H
|
Component.assert(bHead == bHeadSelect);
|
||||||
Component.assert(bHead == bHeadSelect);
|
drive.bSector = this.popCmd("R"); // R
|
||||||
drive.bSector = this.popCmd("R"); // R
|
n = this.popCmd("N"); // N
|
||||||
n = this.popCmd("N"); // N
|
drive.nBytes = 128 << n; // 0 => 128, 1 => 256, 2 => 512, 3 => 1024
|
||||||
drive.nBytes = 128 << n; // 0 => 128, 1 => 256, 2 => 512, 3 => 1024
|
drive.bSectorEnd = this.popCmd("EOT"); // EOT (final sector number on a cylinder)
|
||||||
drive.bSectorEnd = this.popCmd("EOT"); // EOT (final sector number on a cylinder)
|
this.popCmd("GPL"); // GPL (spacing between sectors, excluding VCO Sync Field; 3)
|
||||||
this.popCmd("GPL"); // GPL (spacing between sectors, excluding VCO Sync Field; 3)
|
this.popCmd("DTL"); // DTL (when N is 0, DTL stands for the data length to read out or write into the sector)
|
||||||
this.popCmd("DTL"); // DTL (when N is 0, DTL stands for the data length to read out or write into the sector)
|
if (bCmdMasked == FDC.REG_DATA.CMD.READ_DATA)
|
||||||
if (bCmdMasked == FDC.REG_DATA.CMD.READ_DATA)
|
this.doRead(drive);
|
||||||
this.doRead(drive);
|
else
|
||||||
else
|
this.doWrite(drive);
|
||||||
this.doWrite(drive);
|
this.beginResult();
|
||||||
this.beginResult();
|
this.pushST0(drive);
|
||||||
this.pushST0(drive.errorCode);
|
this.pushST1(drive);
|
||||||
this.pushST1(drive.errorCode);
|
this.pushST2(drive);
|
||||||
this.pushST2(drive.errorCode);
|
this.pushResult(drive.bCylinder, "C");
|
||||||
this.pushResult(drive.bCylinder, "C");
|
this.pushResult(drive.bHead, "H");
|
||||||
this.pushResult(drive.bHead, "H");
|
this.pushResult(drive.bSector, "R");
|
||||||
this.pushResult(drive.bSector, "R");
|
this.pushResult(n, "N");
|
||||||
this.pushResult(n, "N");
|
fIRQ = true;
|
||||||
fIRQ = true;
|
break;
|
||||||
break;
|
case FDC.REG_DATA.CMD.RECALIBRATE: // 0x07
|
||||||
case FDC.REG_DATA.CMD.RECALIBRATE: // 0x07
|
bDrive = this.popCmd("DS");
|
||||||
this.iUnit = iUnitSelect = this.popCmd("US") & 0x3;
|
this.iDrive = (bDrive & 0x3);
|
||||||
drive = this.aDrives[iUnitSelect];
|
drive = this.aDrives[this.iDrive];
|
||||||
drive.bCylinder = 0;
|
drive.bCylinder = drive.bCylinderSeek = 0;
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.SEEK_END;
|
drive.resCode = FDC.REG_DATA.RES.SEEK_END | FDC.REG_DATA.RES.TRACK0;
|
||||||
this.beginResult(); // no results are provided; this command is typically followed by FDC.REG_DATA.CMD.INT_STATUS
|
this.beginResult(); // no results are provided; this command is typically followed by FDC.REG_DATA.CMD.INT_STATUS
|
||||||
fIRQ = true;
|
fIRQ = true;
|
||||||
break;
|
break;
|
||||||
case FDC.REG_DATA.CMD.INT_STATUS: // 0x08
|
case FDC.REG_DATA.CMD.INT_STATUS: // 0x08 (SENSE INTERRUPT STATUS)
|
||||||
this.iUnit = this.iDrive;
|
drive = this.aDrives[this.iDrive];
|
||||||
drive = this.aDrives[this.iUnit];
|
this.beginResult();
|
||||||
this.beginResult();
|
this.pushST0(drive);
|
||||||
this.pushST0(drive.errorCode);
|
this.pushResult(drive.bCylinder, "PCN");// no interrupt is generated by this command, so fIRQ should remain false
|
||||||
this.pushResult(drive.bCylinder, "PCN");// no interrupt is generated by this command, so fIRQ should remain false
|
break;
|
||||||
break;
|
case FDC.REG_DATA.CMD.FORMAT_TRACK: // 0x0D
|
||||||
case FDC.REG_DATA.CMD.FORMAT_TRACK: // 0x0D
|
bDrive = this.popCmd("DS");
|
||||||
iUnitSelect = this.popCmd("US");
|
bHeadSelect = (bDrive >> 2) & 0x1;
|
||||||
bHeadSelect = (iUnitSelect >> 2) & 0x1;
|
this.iDrive = (bDrive & 0x3);
|
||||||
iUnitSelect &= 0x3;
|
drive = this.aDrives[this.iDrive];
|
||||||
this.iUnit = iUnitSelect;
|
drive.bHead = bHeadSelect;
|
||||||
drive = this.aDrives[iUnitSelect];
|
n = this.popCmd("N"); // N
|
||||||
drive.bHead = bHeadSelect;
|
drive.nBytes = 128 << n; // 0 => 128, 1 => 256, 2 => 512, 3 => 1024 (bytes/sector)
|
||||||
n = this.popCmd("N"); // N
|
drive.bSectorEnd = this.popCmd("SC"); // SC (sectors/track)
|
||||||
drive.nBytes = 128 << n; // 0 => 128, 1 => 256, 2 => 512, 3 => 1024 (bytes/sector)
|
this.popCmd("GPL"); // GPL (spacing between sectors, excluding VCO Sync Field; 3)
|
||||||
drive.bSectorEnd = this.popCmd("SC"); // SC (sectors/track)
|
drive.bFiller = this.popCmd("D"); // D (filler byte)
|
||||||
this.popCmd("GPL"); // GPL (spacing between sectors, excluding VCO Sync Field; 3)
|
this.doFormat(drive);
|
||||||
drive.bFiller = this.popCmd("D"); // D (filler byte)
|
this.beginResult();
|
||||||
this.doFormat(drive);
|
this.pushST0(drive);
|
||||||
this.beginResult();
|
this.pushST1(drive);
|
||||||
this.pushST0(drive.errorCode);
|
this.pushST2(drive);
|
||||||
this.pushST1(drive.errorCode);
|
this.pushResult(drive.bCylinder, "C");
|
||||||
this.pushST2(drive.errorCode);
|
this.pushResult(drive.bHead, "H");
|
||||||
this.pushResult(drive.bCylinder, "C");
|
this.pushResult(drive.bSector, "R");
|
||||||
this.pushResult(drive.bHead, "H");
|
this.pushResult(n, "N");
|
||||||
this.pushResult(drive.bSector, "R");
|
fIRQ = true;
|
||||||
this.pushResult(n, "N");
|
break;
|
||||||
fIRQ = true;
|
case FDC.REG_DATA.CMD.SEEK: // 0x0F
|
||||||
break;
|
bDrive = this.popCmd("DS");
|
||||||
case FDC.REG_DATA.CMD.SEEK: // 0x0F
|
bHeadSelect = (bDrive >> 2) & 0x1;
|
||||||
iUnitSelect = this.popCmd("US");
|
this.iDrive = (bDrive & 0x3);
|
||||||
bHeadSelect = (iUnitSelect >> 2) & 0x1;
|
drive = this.aDrives[this.iDrive];
|
||||||
this.iUnit = (iUnitSelect &= 0x3);
|
drive.bHead = bHeadSelect;
|
||||||
drive = this.aDrives[iUnitSelect];
|
/*
|
||||||
drive.bHead = bHeadSelect;
|
* As discussed in initDrive(), we can no longer simply set bCylinder to the specified NCN;
|
||||||
drive.bCylinder = this.popCmd("NCN");
|
* instead, we must calculate the delta between bCylinderSeek and the NCN, and adjust bCylinder
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.SEEK_END;
|
* by that amount. Then we simply move the NCN into bCylinderSeek without any range checking.
|
||||||
this.beginResult(); // like FDC.REG_DATA.CMD.RECALIBRATE, no results are provided
|
*
|
||||||
fIRQ = true;
|
* Since bCylinder is now expressly defined as the "physical" cylinder number, it must never be
|
||||||
break;
|
* allowed to exceed the physical boundaries of the drive (ie, never lower than 0, and never greater
|
||||||
default:
|
* than or equal to nCylinders).
|
||||||
if (DEBUG) this.messageDebugger("FDC operation unsupported (command=0x: " + str.toHexByte(bCmd) + ")");
|
*/
|
||||||
break;
|
bCylinder = this.popCmd("NCN");
|
||||||
|
drive.bCylinder += bCylinder - drive.bCylinderSeek;
|
||||||
|
if (drive.bCylinder < 0) drive.bCylinder = 0;
|
||||||
|
if (drive.bCylinder >= drive.nCylinders) drive.bCylinder = drive.nCylinders - 1;
|
||||||
|
drive.bCylinderSeek = bCylinder;
|
||||||
|
drive.resCode = FDC.REG_DATA.RES.SEEK_END;
|
||||||
|
/*
|
||||||
|
* TODO: To properly support ALL the ST3 result bits (not just TRACK0), we need a resCode
|
||||||
|
* update() function that all FDC commands can use. This code is merely sufficient to get us
|
||||||
|
* through the "DSKETTE_SETUP" gauntlet in the MODEL_5170 BIOS.
|
||||||
|
*/
|
||||||
|
if (drive.bCylinder == 0) {
|
||||||
|
drive.resCode |= FDC.REG_DATA.RES.TRACK0;
|
||||||
|
}
|
||||||
|
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) + ")");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.regDataTotal > 0) this.regStatus |= (FDC.REG_STATUS.READ_DATA | FDC.REG_STATUS.BUSY);
|
if (this.regDataTotal > 0) this.regStatus |= (FDC.REG_STATUS.READ_DATA | FDC.REG_STATUS.BUSY);
|
||||||
|
|
@ -1541,10 +1698,10 @@ FDC.prototype.doCmd = function()
|
||||||
* result has been read, the interrupt is cleared (see inFDCData).
|
* result has been read, the interrupt is cleared (see inFDCData).
|
||||||
*
|
*
|
||||||
* TODO: Technically, interrupt request status should be cleared by the FDC.REG_DATA.CMD.INT_STATUS command; in fact,
|
* TODO: Technically, interrupt request status should be cleared by the FDC.REG_DATA.CMD.INT_STATUS command; in fact,
|
||||||
* if that command is issued and no interrupt was pending, then FDC.REG_DATA.ERR.INVALID should be returned (via ST0).
|
* if that command is issued and no interrupt was pending, then FDC.REG_DATA.RES.INVALID should be returned (via ST0).
|
||||||
*/
|
*/
|
||||||
if (this.regOutput & FDC.REG_OUTPUT.INT_ENABLE) {
|
if (this.regOutput & FDC.REG_OUTPUT.INT_ENABLE) {
|
||||||
if (drive && !(drive.errorCode & FDC.REG_DATA.ERR.NOT_READY) && fIRQ) {
|
if (drive && !(drive.resCode & FDC.REG_DATA.RES.NOT_READY) && fIRQ) {
|
||||||
if (this.chipset) this.chipset.setIRR(ChipSet.IRQ.FDC);
|
if (this.chipset) this.chipset.setIRR(ChipSet.IRQ.FDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1561,10 +1718,10 @@ FDC.prototype.popCmd = function(name)
|
||||||
{
|
{
|
||||||
Component.assert((!this.regDataIndex || name !== undefined) && this.regDataIndex < this.regDataTotal);
|
Component.assert((!this.regDataIndex || name !== undefined) && this.regDataIndex < this.regDataTotal);
|
||||||
var bCmd = this.regDataArray[this.regDataIndex];
|
var bCmd = this.regDataArray[this.regDataIndex];
|
||||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled((this.regDataIndex > 0 ? this.dbg.MESSAGE_PORT : 0) | this.dbg.MESSAGE_FDC)) {
|
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled((this.regDataIndex > 0? this.dbg.MESSAGE_PORT : 0) | this.dbg.MESSAGE_FDC)) {
|
||||||
var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK;
|
var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK;
|
||||||
if (!name && !this.regDataIndex && FDC.aCmdSeqs[bCmdMasked]) name = FDC.aCmdSeqs[bCmdMasked].name;
|
if (!name && !this.regDataIndex && FDC.aCmdSeqs[bCmdMasked]) name = FDC.aCmdSeqs[bCmdMasked].name;
|
||||||
this.dbg.message("FDC.CMD[" + (name !== undefined ? name : this.regDataIndex) + "]: 0x" + str.toHexByte(bCmd));
|
this.dbg.message("FDC.CMD[" + (name || this.regDataIndex) + "]: 0x" + str.toHexByte(bCmd));
|
||||||
}
|
}
|
||||||
this.regDataIndex++;
|
this.regDataIndex++;
|
||||||
return bCmd;
|
return bCmd;
|
||||||
|
|
@ -1615,41 +1772,41 @@ FDC.prototype.beginResult = function()
|
||||||
*/
|
*/
|
||||||
FDC.prototype.pushResult = function(bResult, name)
|
FDC.prototype.pushResult = function(bResult, name)
|
||||||
{
|
{
|
||||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_PORT | this.dbg.MESSAGE_FDC)) this.dbg.message("FDC.RES[" + (name !== undefined ? name : this.regDataTotal) + "]: 0x" + str.toHexByte(bResult));
|
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_PORT | this.dbg.MESSAGE_FDC)) this.dbg.message("FDC.RES[" + (name || this.regDataTotal) + "]: 0x" + str.toHexByte(bResult));
|
||||||
this.regDataArray[this.regDataTotal++] = bResult;
|
this.regDataArray[this.regDataTotal++] = bResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pushST0(errorCode)
|
* pushST0(drive)
|
||||||
*
|
*
|
||||||
* @this {FDC}
|
* @this {FDC}
|
||||||
* @param {number} errorCode
|
* @param {Object} drive
|
||||||
*/
|
*/
|
||||||
FDC.prototype.pushST0 = function(errorCode)
|
FDC.prototype.pushST0 = function(drive)
|
||||||
{
|
{
|
||||||
this.pushResult(this.iUnit | this.aDrives[this.iUnit].bHead | (errorCode & FDC.REG_DATA.ERR.ST0), "ST0");
|
this.pushResult(drive.iDrive | drive.bHead | (drive.resCode & FDC.REG_DATA.RES.ST0), "ST0");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pushST1(errorCode)
|
* pushST1(drive)
|
||||||
*
|
*
|
||||||
* @this {FDC}
|
* @this {FDC}
|
||||||
* @param {number} errorCode
|
* @param {Object} drive
|
||||||
*/
|
*/
|
||||||
FDC.prototype.pushST1 = function(errorCode)
|
FDC.prototype.pushST1 = function(drive)
|
||||||
{
|
{
|
||||||
this.pushResult((errorCode & FDC.REG_DATA.ERR.ST1) >> 8, "ST1");
|
this.pushResult((drive.resCode & FDC.REG_DATA.RES.ST1) >>> 8, "ST1");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pushST2(errorCode)
|
* pushST2(drive)
|
||||||
*
|
*
|
||||||
* @this {FDC}
|
* @this {FDC}
|
||||||
* @param {number} errorCode
|
* @param {Object} drive
|
||||||
*/
|
*/
|
||||||
FDC.prototype.pushST2 = function(errorCode)
|
FDC.prototype.pushST2 = function(drive)
|
||||||
{
|
{
|
||||||
this.pushResult((errorCode & FDC.REG_DATA.ERR.ST2) >> 16, "ST2");
|
this.pushResult((drive.resCode & FDC.REG_DATA.RES.ST2) >>> 16, "ST2");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1660,10 +1817,7 @@ FDC.prototype.pushST2 = function(errorCode)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.pushST3 = function(drive)
|
FDC.prototype.pushST3 = function(drive)
|
||||||
{
|
{
|
||||||
//
|
this.pushResult((drive.resCode & FDC.REG_DATA.RES.ST3) >>> 24, "ST3");
|
||||||
// WARNING: Unimplemented
|
|
||||||
//
|
|
||||||
this.pushResult(0x00, "ST3");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1737,13 +1891,13 @@ FDC.prototype.doRead = function(drive)
|
||||||
* With only NOT_READY and INCOMPLETE set, an empty drive causes DOS to report "General Failure";
|
* With only NOT_READY and INCOMPLETE set, an empty drive causes DOS to report "General Failure";
|
||||||
* with the addition of NO_DATA, DOS reports "Sector not found".
|
* with the addition of NO_DATA, DOS reports "Sector not found".
|
||||||
*/
|
*/
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NOT_READY | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.NOT_READY | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
|
|
||||||
if (DEBUG) this.messageDebugger("FDC.doRead(" + drive.bCylinder + ":" + drive.bHead + ":" + drive.bSector + ":" + drive.nBytes + ")");
|
if (DEBUG) this.messageDebugger("FDC.doRead(" + drive.bCylinder + ":" + drive.bHead + ":" + drive.bSector + ":" + drive.nBytes + ")");
|
||||||
|
|
||||||
if (drive.disk) {
|
if (drive.disk) {
|
||||||
drive.sector = null;
|
drive.sector = null;
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NONE;
|
drive.resCode = FDC.REG_DATA.RES.NONE;
|
||||||
if (this.chipset) {
|
if (this.chipset) {
|
||||||
this.chipset.connectDMA(ChipSet.DMA_FDC, this, 'dmaRead', drive);
|
this.chipset.connectDMA(ChipSet.DMA_FDC, this, 'dmaRead', drive);
|
||||||
this.chipset.requestDMA(ChipSet.DMA_FDC);
|
this.chipset.requestDMA(ChipSet.DMA_FDC);
|
||||||
|
|
@ -1759,17 +1913,17 @@ FDC.prototype.doRead = function(drive)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.doWrite = function(drive)
|
FDC.prototype.doWrite = function(drive)
|
||||||
{
|
{
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NOT_READY | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.NOT_READY | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
|
|
||||||
if (DEBUG) this.messageDebugger("FDC.doWrite(" + drive.bCylinder + ":" + drive.bHead + ":" + drive.bSector + ":" + drive.nBytes + ")");
|
if (DEBUG) this.messageDebugger("FDC.doWrite(" + drive.bCylinder + ":" + drive.bHead + ":" + drive.bSector + ":" + drive.nBytes + ")");
|
||||||
|
|
||||||
if (drive.disk) {
|
if (drive.disk) {
|
||||||
if (drive.disk.fWriteProtected) {
|
if (drive.disk.fWriteProtected) {
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NOT_WRITABLE | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.NOT_WRITABLE | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
drive.sector = null;
|
drive.sector = null;
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NONE;
|
drive.resCode = FDC.REG_DATA.RES.NONE;
|
||||||
if (this.chipset) {
|
if (this.chipset) {
|
||||||
this.chipset.connectDMA(ChipSet.DMA_FDC, this, 'dmaWrite', drive);
|
this.chipset.connectDMA(ChipSet.DMA_FDC, this, 'dmaWrite', drive);
|
||||||
this.chipset.requestDMA(ChipSet.DMA_FDC);
|
this.chipset.requestDMA(ChipSet.DMA_FDC);
|
||||||
|
|
@ -1794,13 +1948,13 @@ FDC.prototype.doWrite = function(drive)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.doFormat = function(drive)
|
FDC.prototype.doFormat = function(drive)
|
||||||
{
|
{
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NOT_READY | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.NOT_READY | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
|
|
||||||
//if (DEBUG) this.messageDebugger("doFormat()");
|
//if (DEBUG) this.messageDebugger("doFormat()");
|
||||||
|
|
||||||
if (drive.disk) {
|
if (drive.disk) {
|
||||||
drive.sector = null;
|
drive.sector = null;
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NONE;
|
drive.resCode = FDC.REG_DATA.RES.NONE;
|
||||||
if (this.chipset) {
|
if (this.chipset) {
|
||||||
drive.cbFormat = 0;
|
drive.cbFormat = 0;
|
||||||
drive.abFormat = new Array(4);
|
drive.abFormat = new Array(4);
|
||||||
|
|
@ -1840,7 +1994,7 @@ FDC.prototype.doFormat = function(drive)
|
||||||
FDC.prototype.readByte = function(drive, done)
|
FDC.prototype.readByte = function(drive, done)
|
||||||
{
|
{
|
||||||
var b = -1;
|
var b = -1;
|
||||||
if (!drive.errorCode && drive.disk) {
|
if (!drive.resCode && drive.disk) {
|
||||||
do {
|
do {
|
||||||
if (drive.sector) {
|
if (drive.sector) {
|
||||||
if ((b = drive.disk.read(drive.sector, drive.ibSector++)) >= 0)
|
if ((b = drive.disk.read(drive.sector, drive.ibSector++)) >= 0)
|
||||||
|
|
@ -1851,7 +2005,7 @@ FDC.prototype.readByte = function(drive, done)
|
||||||
*/
|
*/
|
||||||
drive.sector = drive.disk.seek(drive.bCylinder, drive.bHead, drive.bSector);
|
drive.sector = drive.disk.seek(drive.bCylinder, drive.bHead, drive.bSector);
|
||||||
if (!drive.sector) {
|
if (!drive.sector) {
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.NO_DATA | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.NO_DATA | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
drive.ibSector = 0;
|
drive.ibSector = 0;
|
||||||
|
|
@ -1888,7 +2042,7 @@ FDC.prototype.readByte = function(drive, done)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.writeByte = function(drive, b)
|
FDC.prototype.writeByte = function(drive, b)
|
||||||
{
|
{
|
||||||
if (drive.errorCode || !drive.disk) return -1;
|
if (drive.resCode || !drive.disk) return -1;
|
||||||
do {
|
do {
|
||||||
if (drive.sector) {
|
if (drive.sector) {
|
||||||
if (drive.disk.write(drive.sector, drive.ibSector++, b))
|
if (drive.disk.write(drive.sector, drive.ibSector++, b))
|
||||||
|
|
@ -1900,9 +2054,9 @@ FDC.prototype.writeByte = function(drive, b)
|
||||||
drive.sector = drive.disk.seek(drive.bCylinder, drive.bHead, drive.bSector);
|
drive.sector = drive.disk.seek(drive.bCylinder, drive.bHead, drive.bSector);
|
||||||
if (!drive.sector) {
|
if (!drive.sector) {
|
||||||
/*
|
/*
|
||||||
* TODO: Determine whether this should be FDC.REG_DATA.ERR.CRC_ERROR or FDC.REG_DATA.ERR.DATA_FIELD
|
* TODO: Determine whether this should be FDC.REG_DATA.RES.CRC_ERROR or FDC.REG_DATA.RES.DATA_FIELD
|
||||||
*/
|
*/
|
||||||
drive.errorCode = FDC.REG_DATA.ERR.CRC_ERROR | FDC.REG_DATA.ERR.INCOMPLETE;
|
drive.resCode = FDC.REG_DATA.RES.CRC_ERROR | FDC.REG_DATA.RES.INCOMPLETE;
|
||||||
b = -1;
|
b = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1922,7 +2076,7 @@ FDC.prototype.writeByte = function(drive, b)
|
||||||
*/
|
*/
|
||||||
FDC.prototype.writeFormat = function(drive, b)
|
FDC.prototype.writeFormat = function(drive, b)
|
||||||
{
|
{
|
||||||
if (drive.errorCode) return -1;
|
if (drive.resCode) return -1;
|
||||||
drive.abFormat[drive.cbFormat++] = b;
|
drive.abFormat[drive.cbFormat++] = b;
|
||||||
if (drive.cbFormat == drive.abFormat.length) {
|
if (drive.cbFormat == drive.abFormat.length) {
|
||||||
drive.bCylinder = drive.abFormat[0]; // C
|
drive.bCylinder = drive.abFormat[0]; // C
|
||||||
|
|
|
||||||
|
|
@ -1228,49 +1228,51 @@ HDC.prototype.doCmd = function() {
|
||||||
* processed in the first group, and all the rest should be processed in the second group.
|
* processed in the first group, and all the rest should be processed in the second group.
|
||||||
*/
|
*/
|
||||||
switch (bCmd) {
|
switch (bCmd) {
|
||||||
case HDC.REG_DATA.CMD.REQUEST_SENSE: // 0x03
|
case HDC.REG_DATA.CMD.REQUEST_SENSE: // 0x03
|
||||||
this.beginResult(drive? drive.errorCode : HDC.REG_DATA.ERR.NOT_READY);
|
this.beginResult(drive? drive.errorCode : HDC.REG_DATA.ERR.NOT_READY);
|
||||||
this.pushResult(b1);
|
this.pushResult(b1);
|
||||||
this.pushResult(b2);
|
this.pushResult(b2);
|
||||||
this.pushResult(b3);
|
this.pushResult(b3);
|
||||||
/*
|
/*
|
||||||
* Although not terribly clear from IBM's "Fixed Disk Adapter" documentation,
|
* Although not terribly clear from IBM's "Fixed Disk Adapter" documentation,
|
||||||
* a data "status byte" also follows the 4 "sense bytes". Interestingly, The HDC BIOS
|
* a data "status byte" also follows the 4 "sense bytes". Interestingly, The HDC BIOS
|
||||||
* checks that data status byte for REG_DATA.STATUS_ERROR, but I have to wonder if it
|
* checks that data status byte for REG_DATA.STATUS_ERROR, but I have to wonder if it
|
||||||
* would have ever been set for this command....
|
* would have ever been set for this command....
|
||||||
*
|
*
|
||||||
* The whole point of the HDC.REG_DATA.CMD.REQUEST_SENSE command is to obtain details about a
|
* The whole point of the HDC.REG_DATA.CMD.REQUEST_SENSE command is to obtain details about a
|
||||||
* previous error, so if HDC.REG_DATA.CMD.REQUEST_SENSE itself reports an error, what would that mean?
|
* previous error, so if HDC.REG_DATA.CMD.REQUEST_SENSE itself reports an error, what would that mean?
|
||||||
*/
|
*/
|
||||||
this.pushResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
this.pushResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
||||||
bCmd = -1; // mark the command as complete
|
bCmd = -1; // mark the command as complete
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.INIT_DRIVE: // 0x0C
|
case HDC.REG_DATA.CMD.INIT_DRIVE: // 0x0C
|
||||||
/*
|
/*
|
||||||
* Pop off all the extra "Initialize Drive Characteristics" bytes and store them,
|
* Pop off all the extra "Initialize Drive Characteristics" bytes and store them,
|
||||||
* for the benefit of other functions, like verifyDrive().
|
* for the benefit of other functions, like verifyDrive().
|
||||||
*/
|
*/
|
||||||
var i = 0;
|
var i = 0;
|
||||||
while ((bParm = this.popCmd()) >= 0) {
|
while ((bParm = this.popCmd()) >= 0) {
|
||||||
if (drive && i < drive.abDriveParms.length) {
|
if (drive && i < drive.abDriveParms.length) {
|
||||||
drive.abDriveParms[i++] = bParm;
|
drive.abDriveParms[i++] = bParm;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (drive) this.verifyDrive(drive);
|
}
|
||||||
bDataStatus = HDC.REG_DATA.STATUS_OK;
|
if (drive) this.verifyDrive(drive);
|
||||||
if (!drive && this.iDriveAllowFail == iDrive) {
|
bDataStatus = HDC.REG_DATA.STATUS_OK;
|
||||||
this.iDriveAllowFail = -1;
|
if (!drive && this.iDriveAllowFail == iDrive) {
|
||||||
if (DEBUG) this.messageDebugger("HDC.doCmd(): fake failure triggered");
|
this.iDriveAllowFail = -1;
|
||||||
bDataStatus = HDC.REG_DATA.STATUS_ERROR;
|
if (DEBUG) this.messageDebugger("HDC.doCmd(): fake failure triggered");
|
||||||
}
|
bDataStatus = HDC.REG_DATA.STATUS_ERROR;
|
||||||
this.beginResult(bDataStatus | bDrive);
|
}
|
||||||
bCmd = -1; // mark the command as complete
|
this.beginResult(bDataStatus | bDrive);
|
||||||
break;
|
bCmd = -1; // mark the command as complete
|
||||||
case HDC.REG_DATA.CMD.RAM_DIAGNOSTIC: // 0xE0
|
break;
|
||||||
case HDC.REG_DATA.CMD.CTL_DIAGNOSTIC: // 0xE4
|
case HDC.REG_DATA.CMD.RAM_DIAGNOSTIC: // 0xE0
|
||||||
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
case HDC.REG_DATA.CMD.CTL_DIAGNOSTIC: // 0xE4
|
||||||
bCmd = -1; // mark the command as complete
|
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
||||||
break;
|
bCmd = -1; // mark the command as complete
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bCmd >= 0) {
|
if (bCmd >= 0) {
|
||||||
|
|
@ -1286,46 +1288,46 @@ HDC.prototype.doCmd = function() {
|
||||||
drive.senseCode = 0;
|
drive.senseCode = 0;
|
||||||
}
|
}
|
||||||
switch (bCmd) {
|
switch (bCmd) {
|
||||||
case HDC.REG_DATA.CMD.TEST_READY: // 0x00
|
case HDC.REG_DATA.CMD.TEST_READY: // 0x00
|
||||||
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.RECALIBRATE: // 0x01
|
case HDC.REG_DATA.CMD.RECALIBRATE: // 0x01
|
||||||
drive.bControl = bControl;
|
drive.bControl = bControl;
|
||||||
if (DEBUG) this.messageDebugger("HDC.doCmd(): drive " + iDrive + " control byte: 0x" + str.toHexByte(bControl));
|
if (DEBUG) this.messageDebugger("HDC.doCmd(): drive " + iDrive + " control byte: 0x" + str.toHexByte(bControl));
|
||||||
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.READ_VERIFY: // 0x05
|
case HDC.REG_DATA.CMD.READ_VERIFY: // 0x05
|
||||||
/*
|
/*
|
||||||
* This is a non-DMA operation, so we simply pretend everything is OK for now; TODO: Revisit.
|
* This is a non-DMA operation, so we simply pretend everything is OK for now; TODO: Revisit.
|
||||||
*/
|
*/
|
||||||
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
this.beginResult(HDC.REG_DATA.STATUS_OK | bDrive);
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.READ_DATA: // 0x08
|
case HDC.REG_DATA.CMD.READ_DATA: // 0x08
|
||||||
this.doRead(drive, function(bStatus) {
|
this.doRead(drive, function(bStatus) {
|
||||||
hdc.beginResult(bStatus | bDrive);
|
hdc.beginResult(bStatus | bDrive);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.WRITE_DATA: // 0x0A
|
case HDC.REG_DATA.CMD.WRITE_DATA: // 0x0A
|
||||||
/*
|
/*
|
||||||
* QUESTION: The IBM TechRef (p1-188) implies that bCount is used as part of HDC.REG_DATA.CMD.WRITE_DATA command,
|
* QUESTION: The IBM TechRef (p1-188) implies that bCount is used as part of HDC.REG_DATA.CMD.WRITE_DATA command,
|
||||||
* but it is omitted from the HDC.REG_DATA.CMD.READ_DATA command. Is that correct? Note that, as far as the length
|
* but it is omitted from the HDC.REG_DATA.CMD.READ_DATA command. Is that correct? Note that, as far as the length
|
||||||
* of the transfer is concerned, we rely exclusively on the DMA controller being programmed with the
|
* of the transfer is concerned, we rely exclusively on the DMA controller being programmed with the
|
||||||
* appropriate byte count.
|
* appropriate byte count.
|
||||||
*/
|
*/
|
||||||
this.doWrite(drive, function(bStatus) {
|
this.doWrite(drive, function(bStatus) {
|
||||||
hdc.beginResult(bStatus | bDrive);
|
hdc.beginResult(bStatus | bDrive);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case HDC.REG_DATA.CMD.WRITE_BUFFER: // 0x0F
|
case HDC.REG_DATA.CMD.WRITE_BUFFER: // 0x0F
|
||||||
this.doWriteToBuffer(drive, function(bStatus) {
|
this.doWriteToBuffer(drive, function(bStatus) {
|
||||||
hdc.beginResult(bStatus | bDrive);
|
hdc.beginResult(bStatus | bDrive);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (DEBUG) this.messageDebugger((bCmd < 0? "HDC.doCmd(): invalid drive" : "unsupported operation") + " (command=0x" + str.toHexByte(bCmdOrig) + ",drive=" + iDrive + ")");
|
if (DEBUG) this.messageDebugger((bCmd < 0? "HDC.doCmd(): invalid drive" : "unsupported operation") + " (command=0x" + str.toHexByte(bCmdOrig) + ",drive=" + iDrive + ")");
|
||||||
this.beginResult(HDC.REG_DATA.STATUS_ERROR | bDrive);
|
this.beginResult(HDC.REG_DATA.STATUS_ERROR | bDrive);
|
||||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
|
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2268,7 +2268,7 @@ Video.prototype.reset = function()
|
||||||
* on the EGA's own switch settings instead.
|
* on the EGA's own switch settings instead.
|
||||||
*/
|
*/
|
||||||
if (this.chipset) {
|
if (this.chipset) {
|
||||||
nMonitorType = this.chipset.getSW1VideoMonitor();
|
nMonitorType = this.chipset.getSWVideoMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
var fEGA = false;
|
var fEGA = false;
|
||||||
|
|
|
||||||
|
|
@ -7,95 +7,95 @@ n.send(r)}else n.open("GET",a,b),n.send();a=[];b||(h=n.responseText,200!=n.statu
|
||||||
function ta(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 ua(a,b,c){function d(){a-=1;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
function ta(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 ua(a,b,c){function d(){a-=1;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||||
function va(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var wa={init:[],show:[],exit:[]},xa=!0;function ya(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function za(a){wa.init.push(a)}
|
function va(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var wa={init:[],show:[],exit:[]},xa=!0;function ya(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function za(a){wa.init.push(a)}
|
||||||
function Aa(a){if(xa)for(var b=0;b<a.length;b++)a[b]()}ya("onload",function(){Aa(wa.init)});ya("onpageshow",function(){Aa(wa.show)});ya(ta("Opera")||ta("iOS")?"onunload":"onbeforeunload",function(){Aa(wa.exit)});
|
function Aa(a){if(xa)for(var b=0;b<a.length;b++)a[b]()}ya("onload",function(){Aa(wa.init)});ya("onpageshow",function(){Aa(wa.show)});ya(ta("Opera")||ta("iOS")?"onunload":"onbeforeunload",function(){Aa(wa.exit)});
|
||||||
function s(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Vj=b.comment;this.so=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Xg=this.id.substr(0,b),this.Wg=this.id.substr(b+1)):this.Wg=this.id;this[a]=c;this.ei=null;this.ad=this.Eb=this.zc=this.Vh=this.Rg=!1;this.sa={};this.aa=null;this.Xg&&this.Xg.match(/\d+/);Ba[Ba.length]=this}var Ca,Da=void 0,Ea={};
|
function s(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Yj=b.comment;this.to=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Xg=this.id.substr(0,b),this.Wg=this.id.substr(b+1)):this.Wg=this.id;this[a]=c;this.fi=null;this.ed=this.Hb=this.Bc=this.Wh=this.Rg=!1;this.sa={};this.aa=null;this.Xg&&this.Xg.match(/\d+/);Ba[Ba.length]=this}var Ca,Da=void 0,Ea={};
|
||||||
if(window){Da||(Da=window.location.search.substr(1));for(var Ga,Ha=/\+/g,Ia=/([^&=]+)=?([^&]*)/g;Ga=Ia.exec(Da);)Ea[decodeURIComponent(Ga[1].replace(Ha," "))]=decodeURIComponent(Ga[2].replace(Ha," "))}function Ja(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function w(a,b){b.prototype=Ja(a.prototype)}var Ba=[];function Ka(){}function La(a,b){b||qa(a)}
|
if(window){Da||(Da=window.location.search.substr(1));for(var Fa,Ha=/\+/g,Ia=/([^&=]+)=?([^&]*)/g;Fa=Ia.exec(Da);)Ea[decodeURIComponent(Fa[1].replace(Ha," "))]=decodeURIComponent(Fa[2].replace(Ha," "))}function Ja(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function w(a,b){b.prototype=Ja(a.prototype)}var Ba=[];function Ka(){}function La(a,b){b||qa(a)}
|
||||||
function Ma(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):void 0);for(b=0;b<Ba.length;b++){var d=Ba[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Na(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Ba.length;c++)if(Ba[c].id===a)return Ba[c]}return null}
|
function Ma(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):void 0);for(b=0;b<Ba.length;b++){var d=Ba[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Na(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Ba.length;c++)if(Ba[c].id===a)return Ba[c]}return null}
|
||||||
function Oa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):void 0);for(d=0;d<Ba.length;d++)if(c)c==Ba[d]&&(c=null);else if(!(a!=Ba[d].type||b&&Ba[d].id.indexOf(b)))return Ba[d]}return null}function x(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){qa(c.message+" ("+a+")")}return b}
|
function Oa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):void 0);for(d=0;d<Ba.length;d++)if(c)c==Ba[d]&&(c=null);else if(!(a!=Ba[d].type||b&&Ba[d].id.indexOf(b)))return Ba[d]}return null}function x(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){qa(c.message+" ("+a+")")}return b}
|
||||||
function Pa(a,b){var c,d;d=y(b.parentNode,"pcjs-control");for(c=0;c<d.length;c++){var e,f;f=d[c].childNodes;for(e=0;e<f.length;e++){var g=f[e];if(g.nodeType===window.document.ELEMENT_NODE){var h=g.getAttribute("class");if(h){var m,n;n=h.split(" ");for(m=0;m<n.length;m++)switch(h=n[m],h){case "pcjs-input":case "pcjs-output":(n=x(g))&&n.binding&&a.pb(h,n.type,n.binding,g),n=[]}}}}}}
|
function Pa(a,b){var c,d;d=y(b.parentNode,"pcjs-control");for(c=0;c<d.length;c++){var e,f;f=d[c].childNodes;for(e=0;e<f.length;e++){var g=f[e];if(g.nodeType===window.document.ELEMENT_NODE){var h=g.getAttribute("class");if(h){var m,n;n=h.split(" ");for(m=0;m<n.length;m++)switch(h=n[m],h){case "pcjs-input":case "pcjs-output":(n=x(g))&&n.binding&&a.qb(h,n.type,n.binding,g),n=[]}}}}}}
|
||||||
function y(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function y(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
s.prototype={toString:function(){return this.name?this.name:this.id||this.type},pb:function(a,b,c,d){switch(c){case "clear":return this.sa[c]||(this.sa[c]=d,d.onclick=function(a){return function(){a.sa.print&&(a.sa.print.value="")}}(this)),!0;case "print":return this.sa[c]||(this.sa[c]=d,d.value="",Ka=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(d),La=function(a,b,c){Ka(a,
|
s.prototype={toString:function(){return this.name?this.name:this.id||this.type},qb:function(a,b,c,d){switch(c){case "clear":return this.sa[c]||(this.sa[c]=d,d.onclick=function(a){return function(){a.sa.print&&(a.sa.print.value="")}}(this)),!0;case "print":return this.sa[c]||(this.sa[c]=d,d.value="",Ka=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(d),La=function(a,b,c){Ka(a,
|
||||||
"notice",c)},Ca=d),!0}return!1},log:function(){},status:function(a){z(this,this.Wg+": "+a)},error:function(a){qa(a)},La:function(a){!this.ad&&(this.Rg=!1!==a)&&(this.name&&this.log("ready"),a=this.ei,this.ei=null,a&&a())},Ub:function(){return this.Eb=!0},Rb:function(a,b){b&&(this.Eb=!1);return!0}};function Qa(a,b){if(a.Vh)return a.zc&&(a.zc=!1),a.Vh=!1;if(a.ad)return z(a,a.toString()+" error"),!1;a.zc=b;return a.zc}
|
"notice",c)},Ca=d),!0}return!1},log:function(){},status:function(a){z(this,this.Wg+": "+a)},error:function(a){qa(a)},Ma:function(a){!this.ed&&(this.Rg=!1!==a)&&(this.name&&this.log("ready"),a=this.fi,this.fi=null,a&&a())},Xb:function(){return this.Hb=!0},Ub:function(a,b){b&&(this.Hb=!1);return!0}};function Qa(a,b){if(a.Wh)return a.Bc&&(a.Bc=!1),a.Wh=!1;if(a.ed)return z(a,a.toString()+" error"),!1;a.Bc=b;return a.Bc}
|
||||||
function Ra(a,b){a.zc&&(b?a.Vh=!0:void 0===b&&z(a,a.toString()+" busy"));return a.zc}function Sa(a,b){b&&(a.Rg?b():a.ei=b);return a.Rg}function Ta(a,b){a.ad=!0;B(a,"Fatal error: "+b)}function B(a,b,c){La(b,c,a.id)}function z(a,b){Ka(b,void 0,a.id)}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);var Ua="undefined"!==typeof window.Sl;function Va(a){s.call(this,"Panel",a,Va)}w(s,Va);
|
function Ra(a,b){a.Bc&&(b?a.Wh=!0:void 0===b&&z(a,a.toString()+" busy"));return a.Bc}function Sa(a,b){b&&(a.Rg?b():a.fi=b);return a.Rg}function Ta(a,b){a.ed=!0;B(a,"Fatal error: "+b)}function B(a,b,c){La(b,c,a.id)}function z(a,b){Ka(b,void 0,a.id)}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);var Ua="undefined"!==typeof window.Ul;function Va(a){s.call(this,"Panel",a,Va)}w(s,Va);
|
||||||
Va.prototype.pb=function(a,b,c,d){return this.Ba&&this.Ba.pb(a,b,c,d)||this.S&&this.S.pb(a,b,c,d)||this.ib&&this.ib.pb(a,b,c,d)||this.aa&&this.aa.pb(a,b,c,d)?!0:s.prototype.pb.call(this,a,b,c,d)};Va.prototype.gc=function(a,b,c,d){this.Ba=a;this.S=c;this.aa=d;this.ib=C(a,"Keyboard")};Va.prototype.Ub=function(a,b){b||Wa();return!0};Va.prototype.Rb=function(){return!0};
|
Va.prototype.qb=function(a,b,c,d){return this.Ba&&this.Ba.qb(a,b,c,d)||this.S&&this.S.qb(a,b,c,d)||this.jb&&this.jb.qb(a,b,c,d)||this.aa&&this.aa.qb(a,b,c,d)?!0:s.prototype.qb.call(this,a,b,c,d)};Va.prototype.jc=function(a,b,c,d){this.Ba=a;this.S=c;this.aa=d;this.jb=C(a,"Keyboard")};Va.prototype.Xb=function(a,b){b||Wa();return!0};Va.prototype.Ub=function(){return!0};
|
||||||
function Wa(){for(var a=!1,b=y(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=x(d),f=Na(e.id);f||(a=!0,f=new Va(e));Pa(f,d);a&&f.La()}}za(Wa);function Xa(a,b,c){s.call(this,"Bus",a,Xa);this.S=b;this.aa=c;this.Pf=a.buswidth||20;this.oe=this.Ab=(1<<this.Pf)-1;this.hb=20>=this.Pf?12:14;this.$b=1<<this.hb;this.Qj=this.$b>>2;this.Ya=this.$b-1;this.Fg=(this.oe+this.$b)/this.$b|0;this.se=this.Fg-1;this.ld=[];this.md=[];this.Mf=this.Nf=!1;this.ki();this.La()}w(s,Xa);
|
function Wa(){for(var a=!1,b=y(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=x(d),f=Na(e.id);f||(a=!0,f=new Va(e));Pa(f,d);a&&f.Ma()}}za(Wa);function Xa(a,b,c){s.call(this,"Bus",a,Xa);this.S=b;this.aa=c;this.Pf=a.buswidth||20;this.oe=this.Db=(1<<this.Pf)-1;this.ib=20>=this.Pf?12:14;this.cc=1<<this.ib;this.Tj=this.cc>>2;this.Za=this.cc-1;this.Fg=(this.oe+this.cc)/this.cc|0;this.se=this.Fg-1;this.od=[];this.pd=[];this.Mf=this.Nf=!1;this.li();this.Ma()}w(s,Xa);
|
||||||
Xa.prototype.ki=function(){this.ya=Array(this.Fg);for(var a=0;a<this.Fg;a++){var b=a*this.$b;Ya(this.ya[a]=new E(b),this.S,this.aa,b,this.$b)}this.S.ki(this.ya,this.oe,this.hb,this.Ya,this.se);this.S.Ab=this.Ab};Xa.prototype.reset=function(){Za(this,!0)};function $a(a,b,c,d,e){if(!(b&a.Ya||!c||c&a.Ya)){for(var f=b>>a.hb;0<c&&f<a.ya.length;){var g=a.ya[f];if(void 0!==g&&g.size)return ab(a,1,b,c);b=f*a.$b;g=a.ya[f++]=new E(b,a.$b,d,e);Ya(g,a.S,a.aa,b,a.$b);c-=a.$b}return!0}return ab(a,2,b,c)}
|
Xa.prototype.li=function(){this.ya=Array(this.Fg);for(var a=0;a<this.Fg;a++){var b=a*this.cc;Ya(this.ya[a]=new E(b),this.S,this.aa,b,this.cc)}this.S.li(this.ya,this.oe,this.ib,this.Za,this.se);this.S.Db=this.Db};Xa.prototype.reset=function(){Za(this,!0)};function $a(a,b,c,d,e){if(!(b&a.Za||!c||c&a.Za)){for(var f=b>>a.ib;0<c&&f<a.ya.length;){var g=a.ya[f];if(void 0!==g&&g.size)return ab(a,1,b,c);b=f*a.cc;g=a.ya[f++]=new E(b,a.cc,d,e);Ya(g,a.S,a.aa,b,a.cc);c-=a.cc}return!0}return ab(a,2,b,c)}
|
||||||
function Za(a,b){if(void 0!==b&&20<a.Pf){var c=a.Ab&-1048577|(b?1048576:0);c!=a.Ab&&(a.Ab=c,a.S&&(a.S.Ab=c))}}Xa.prototype.oh=function(a,b,c){if(!(a&this.Ya||!b||b&this.Ya)){for(var d=a>>this.hb;0<b;){var e=this.ya[d];if(!e.ha)return ab(this,5,a,b);e.ge(c);b-=this.$b;d++}return!0}return ab(this,3,a,b)};function bb(a,b,c){if(!(b&a.Ya||!c||c&a.Ya)){for(var d=b>>a.hb;0<c;)b=d*a.$b,Ya(a.ya[d++]=new E(b),a.S,a.aa,b,a.$b),c-=a.$b;return!0}return ab(a,4,b,c)}
|
function Za(a,b){if(void 0!==b&&20<a.Pf){var c=a.Db&-1048577|(b?1048576:0);c!=a.Db&&(a.Db=c,a.S&&(a.S.Db=c))}}Xa.prototype.ph=function(a,b,c){if(!(a&this.Za||!b||b&this.Za)){for(var d=a>>this.ib;0<b;){var e=this.ya[d];if(!e.ha)return ab(this,5,a,b);e.he(c);b-=this.cc;d++}return!0}return ab(this,3,a,b)};function bb(a,b,c){if(!(b&a.Za||!c||c&a.Za)){for(var d=b>>a.ib;0<c;)b=d*a.cc,Ya(a.ya[d++]=new E(b),a.S,a.aa,b,a.cc),c-=a.cc;return!0}return ab(a,4,b,c)}
|
||||||
function cb(a,b){return a.ya[(b&a.Ab)>>a.hb].eg(b&a.Ya)}function db(a,b){var c=b&a.Ya,d=(b&a.Ab)>>a.hb;return c!=a.Ya?a.ya[d].mj(c):a.ya[d++].eg(c)|a.ya[d&a.se].eg(0)<<8}function eb(a,b,c){a.ya[(b&a.Ab)>>a.hb].ng(b&a.Ya,c&255)}function gb(a,b,c){var d=b&a.Ya;b=(b&a.Ab)>>a.hb;d!=a.Ya?a.ya[b].uj(d,c&65535):(a.ya[b++].ng(d,c&255),a.ya[b&a.se].ng(0,c>>8&255))}
|
function cb(a,b){return a.ya[(b&a.Db)>>a.ib].eg(b&a.Za)}function db(a,b){var c=b&a.Za,d=(b&a.Db)>>a.ib;return c!=a.Za?a.ya[d].nj(c):a.ya[d++].eg(c)|a.ya[d&a.se].eg(0)<<8}function fb(a,b,c){a.ya[(b&a.Db)>>a.ib].ng(b&a.Za,c&255)}function gb(a,b,c){var d=b&a.Za;b=(b&a.Db)>>a.ib;d!=a.Za?a.ya[b].wj(d,c&65535):(a.ya[b++].ng(d,c&255),a.ya[b&a.se].ng(0,c>>8&255))}
|
||||||
function hb(a){for(var b=0,c=[],d=0;d<a.Fg;d++){var e=a.ya[d];if(e.Ta||e.ak){c[b++]=d;var f=c,g=b++;a:if(e=e.save()){for(var h=0,m=0,n=[];h<e.length;){for(var r=e[h],u=h+1;u<e.length&&e[u]===r;)u++;n[m++]=u-h;n[m++]=r;h=u}if(n.length<e.length){e=n;break a}}f[g]=e}}c[b]=a.oe==a.Ab;return c}
|
function hb(a){for(var b=0,c=[],d=0;d<a.Fg;d++){var e=a.ya[d];if(e.Va||e.dk){c[b++]=d;var f=c,g=b++;a:if(e=e.save()){for(var h=0,m=0,n=[];h<e.length;){for(var r=e[h],u=h+1;u<e.length&&e[u]===r;)u++;n[m++]=u-h;n[m++]=r;h=u}if(n.length<e.length){e=n;break a}}f[g]=e}}c[b]=a.oe==a.Db;return c}
|
||||||
function ib(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,g=e+d,h=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=g;n++)void 0!==f.ld[n]?qa("Input port "+q(n)+" registered by "+f.ld[n][0].id+", ignoring "+h.id):f.ld[n]=[h,m,!1,!1]}}function jb(a,b,c){var d=255,e=a.ld[b];void 0!==e?(e[1]&&(d=e[1].call(e[0],b,c)),a.aa&&a.Mf!=e[2]&&kb(a.aa,b,d)):a.aa&&(a.aa.ca(a,b,null,c),a.Mf&&kb(a.aa,b,d));return d}
|
function ib(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,g=e+d,h=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=g;n++)void 0!==f.od[n]?qa("Input port "+q(n)+" registered by "+f.od[n][0].id+", ignoring "+h.id):f.od[n]=[h,m,!1,!1]}}function jb(a,b,c){var d=255,e=a.od[b];void 0!==e?(e[1]&&(d=e[1].call(e[0],b,c)),a.aa&&a.Mf!=e[2]&&kb(a.aa,b,d)):a.aa&&(a.aa.ca(a,b,null,c),a.Mf&&kb(a.aa,b,d));return d}
|
||||||
function lb(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,g=e+d,h=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=g;n++)void 0!==f.md[n]?qa("Output port "+q(n)+" registered by "+f.md[n][0].id+", ignoring "+h.id):f.md[n]=[h,m,!1,!1]}}function mb(a,b,c,d){var e=a.md[b];void 0!==e?(e[1]&&e[1].call(e[0],b,c,d),a.aa&&a.Nf!=e[2]&&nb(a.aa,b,c)):a.aa&&(a.aa.ca(a,b,c,d),a.Nf&&nb(a.aa,b,c))}function ab(a,b,c,d){a.error("Memory block error ("+b+","+l(c)+","+l(d)+")");return!1}
|
function lb(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,g=e+d,h=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=g;n++)void 0!==f.pd[n]?qa("Output port "+q(n)+" registered by "+f.pd[n][0].id+", ignoring "+h.id):f.pd[n]=[h,m,!1,!1]}}function mb(a,b,c,d){var e=a.pd[b];void 0!==e?(e[1]&&e[1].call(e[0],b,c,d),a.aa&&a.Nf!=e[2]&&nb(a.aa,b,c)):a.aa&&(a.aa.ca(a,b,c,d),a.Nf&&nb(a.aa,b,c))}function ab(a,b,c,d){a.error("Memory block error ("+b+","+l(c)+","+l(d)+")");return!1}
|
||||||
function E(a,b,c,d){this.Tj=b;this.oa=null;this.offset=0;this.Qg=c;this.ha=null;this.Ta=this.ak=!1;if(b)if(d)this.ha=d,a=[d.Xc,a-d.Wa],this.oa=a[0],this.offset=a[1],this.ge(d.yf);else if(Ua)this.buffer=new window.Sl(b),this.Gj=new window.Uo(this.buffer,0,b),this.$j=new window.Oo(this.buffer,0,b),this.oa=new window.Qo(this.buffer,0,b>>2),this.ge(ob);else{this.oa=Array(b>>2);for(d=0;d<this.oa.length;d++)this.oa[d]=0;this.ge(pb)}else this.ge()}
|
function E(a,b,c,d){this.Wj=b;this.oa=null;this.offset=0;this.Qg=c;this.ha=null;this.Va=this.dk=!1;if(b)if(d)this.ha=d,a=[d.$c,a-d.Xa],this.oa=a[0],this.offset=a[1],this.he(d.yf);else if(Ua)this.buffer=new window.Ul(b),this.Hj=new window.Vo(this.buffer,0,b),this.ck=new window.Po(this.buffer,0,b),this.oa=new window.Ro(this.buffer,0,b>>2),this.he(ob);else{this.oa=Array(b>>2);for(d=0;d<this.oa.length;d++)this.oa[d]=0;this.he(pb)}else this.he()}
|
||||||
E.prototype={mh:function(){return 0},pf:function(){},vo:function(a){return this.Gj[a]},yo:function(a){return this.$j.getUint16(a,!0)},Ho:function(a,b){this.Gj[a]=b;this.Ta=!0},Ko:function(a,b){this.$j.setUint16(a,b,!0);this.Ta=!0},uo:function(a){return this.oa[a>>2]>>((a&3)<<3)&255},xo:function(a){var b=a>>2;a=(a&3)<<3;var c=this.oa[b]>>a;return 24>a?c&65535:c&255|(this.oa[b+1]&255)<<8},Go:function(a,b){var c=a>>2,d=(a&3)<<3;this.oa[c]=this.oa[c]&~(255<<d)|b<<d;this.Ta=!0},Jo:function(a,b){var c=
|
E.prototype={nh:function(){return 0},pf:function(){},wo:function(a){return this.Hj[a]},zo:function(a){return this.ck.getUint16(a,!0)},Io:function(a,b){this.Hj[a]=b;this.Va=!0},Lo:function(a,b){this.ck.setUint16(a,b,!0);this.Va=!0},vo:function(a){return this.oa[a>>2]>>((a&3)<<3)&255},yo:function(a){var b=a>>2;a=(a&3)<<3;var c=this.oa[b]>>a;return 24>a?c&65535:c&255|(this.oa[b+1]&255)<<8},Ho:function(a,b){var c=a>>2,d=(a&3)<<3;this.oa[c]=this.oa[c]&~(255<<d)|b<<d;this.Va=!0},Ko:function(a,b){var c=
|
||||||
a>>2,d=(a&3)<<3;24>d?this.oa[c]=this.oa[c]&~(65535<<d)|b<<d:(this.oa[c]=this.oa[c]&16777215|b<<24,c++,this.oa[c]=this.oa[c]&4294967040|b>>8);this.Ta=!0},wo:function(a){qb(this.aa,this.Qe+a);return this.eg(a)},zo:function(a){qb(this.aa,this.Qe+a)||qb(this.aa,this.Qe+a+1);return this.mj(a)},Io:function(a,b){tb(this.aa,this.Qe+a);this.ng(a,b)},Lo:function(a,b){tb(this.aa,this.Qe+a)||tb(this.aa,this.Qe+a+1);this.uj(a,b)},save:function(){var a,b;if(this.ha)a=null;else if(Ua)for(a=Array(this.Tj>>2),b=0;b<
|
a>>2,d=(a&3)<<3;24>d?this.oa[c]=this.oa[c]&~(65535<<d)|b<<d:(this.oa[c]=this.oa[c]&16777215|b<<24,c++,this.oa[c]=this.oa[c]&4294967040|b>>8);this.Va=!0},xo:function(a){sb(this.aa,this.Qe+a);return this.eg(a)},Ao:function(a){sb(this.aa,this.Qe+a)||sb(this.aa,this.Qe+a+1);return this.nj(a)},Jo:function(a,b){tb(this.aa,this.Qe+a);this.ng(a,b)},Mo:function(a,b){tb(this.aa,this.Qe+a)||tb(this.aa,this.Qe+a+1);this.wj(a,b)},save:function(){var a,b;if(this.ha)a=null;else if(Ua)for(a=Array(this.Wj>>2),b=0;b<
|
||||||
a.length;b++)a[b]=this.oa[b];else a=this.oa;return a},restore:function(a){if(this.ha)return null===a;if(this.Tj==a.length<<2){var b;if(Ua)for(b=0;b<this.oa.length;b++)this.oa[b]=a[b];else this.oa=a;return this.Ta=!0}return!1},ge:function(a,b){a||(a=[]);void 0===b&&(b=!0);ub(this,a,b);vb(this,a,b)},Nd:function(a,b){b?0===this.Sj++&&vb(this,wb):0===this.Rj++&&ub(this,wb)}};function xb(a,b){b?0===--a.Sj&&(a.Ec=a.Qg?a.pf:a.ng,a.Pl=a.Qg?a.pf:a.uj):0===--a.Rj&&(a.Rc=a.eg,a.Dl=a.mj)}
|
a.length;b++)a[b]=this.oa[b];else a=this.oa;return a},restore:function(a){if(this.ha)return null===a;if(this.Wj==a.length<<2){var b;if(Ua)for(b=0;b<this.oa.length;b++)this.oa[b]=a[b];else this.oa=a;return this.Va=!0}return!1},he:function(a,b){a||(a=[]);void 0===b&&(b=!0);ub(this,a,b);vb(this,a,b)},Qd:function(a,b){b?0===this.Vj++&&vb(this,wb):0===this.Uj++&&ub(this,wb)}};function xb(a,b){b?0===--a.Vj&&(a.Hc=a.Qg?a.pf:a.ng,a.Rl=a.Qg?a.pf:a.wj):0===--a.Uj&&(a.Uc=a.eg,a.Fl=a.nj)}
|
||||||
function Ya(a,b,c,d,e){a.S=b;a.aa=c;a.Qe=d;a.Rj=a.Sj=0;a.aa&&yb(a.aa,d,e)}function vb(a,b,c){a.Ec=b[2]&&!a.Qg?b[2]:a.pf;a.Pl=b[3]&&!a.Qg?b[3]:a.pf;c&&(a.ng=b[2]?b[2]:a.pf,a.uj=b[3]?b[3]:a.pf)}function ub(a,b,c){a.Rc=b[0]?b[0]:a.mh;a.Dl=b[1]?b[1]:a.mh;c&&(a.eg=b[0]?b[0]:a.mh,a.mj=b[1]?b[1]:a.mh)}var pb=[E.prototype.uo,E.prototype.xo,E.prototype.Go,E.prototype.Jo],wb=[E.prototype.wo,E.prototype.zo,E.prototype.Io,E.prototype.Lo];if(Ua)var ob=[E.prototype.vo,E.prototype.yo,E.prototype.Ho,E.prototype.Ko];
|
function Ya(a,b,c,d,e){a.S=b;a.aa=c;a.Qe=d;a.Uj=a.Vj=0;a.aa&&yb(a.aa,d,e)}function vb(a,b,c){a.Hc=b[2]&&!a.Qg?b[2]:a.pf;a.Rl=b[3]&&!a.Qg?b[3]:a.pf;c&&(a.ng=b[2]?b[2]:a.pf,a.wj=b[3]?b[3]:a.pf)}function ub(a,b,c){a.Uc=b[0]?b[0]:a.nh;a.Fl=b[1]?b[1]:a.nh;c&&(a.eg=b[0]?b[0]:a.nh,a.nj=b[1]?b[1]:a.nh)}var pb=[E.prototype.vo,E.prototype.yo,E.prototype.Ho,E.prototype.Ko],wb=[E.prototype.xo,E.prototype.Ao,E.prototype.Jo,E.prototype.Mo];if(Ua)var ob=[E.prototype.wo,E.prototype.zo,E.prototype.Io,E.prototype.Lo];
|
||||||
function zb(a,b){s.call(this,"CPU",a,zb);var c=a.multiplier||1;this.Bd=a.cycles||b;this.Ad=c;this.$g=Math.round(this.Bd/1E4)/100;this.cf=this.$g*this.Ad;this.Fb=this.Eb=!1;this.Uh=a.autoStart;c=Ea.autostart;void 0!==c&&(this.Uh="true"==c?!0:"false"==c?!1:null);this.We=!1;this.Qf=this.ff=0;this.Sf=a.csStart;this.ef=a.csInterval;this.gf=a.csStop;var d=this;this.En=function(){d.Ge()};this.La()}w(s,zb);k=zb.prototype;
|
function zb(a,b){s.call(this,"CPU",a,zb);var c=a.multiplier||1;this.Ed=a.cycles||b;this.Dd=c;this.$g=Math.round(this.Ed/1E4)/100;this.cf=this.$g*this.Dd;this.Ib=this.Hb=!1;this.Vh=a.autoStart;c=Ea.autostart;void 0!==c&&(this.Vh="true"==c?!0:"false"==c?!1:null);this.We=!1;this.Qf=this.ff=0;this.Sf=a.csStart;this.ef=a.csInterval;this.gf=a.csStop;var d=this;this.En=function(){d.Ge()};this.Ma()}w(s,zb);k=zb.prototype;
|
||||||
k.gc=function(a,b,c,d){this.la=b;this.aa=d;this.Ba=a;var e=C(a,"Video");e&&(this.Oh=function(){Ab(e)},this.Gd=function(){e.Gd()});this.ma=C(a,"ChipSet");this.La()};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};k.Ub=function(a,b){if(!b){if(a&&this.restore){Bb(this);if(!this.restore(a))return!1;Cb(this)}else this.reset();this.aa?this.aa.hn():Ca&&qa("No debugger detected")}this.Eb=!0;!Db(this)&&this.aa&&Eb(this.aa);Fb(this);return!0};
|
k.jc=function(a,b,c,d){this.la=b;this.aa=d;this.Ba=a;var e=C(a,"Video");e&&(this.Ph=function(){Ab(e)},this.Jd=function(){e.Jd()});this.ma=C(a,"ChipSet");this.Ma()};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};k.Xb=function(a,b){if(!b){if(a&&this.restore){Bb(this);if(!this.restore(a))return!1;Cb(this)}else this.reset();this.aa?this.aa.hn():Ca&&qa("No debugger detected")}this.Hb=!0;!Db(this)&&this.aa&&Eb(this.aa);Fb(this);return!0};
|
||||||
k.Rb=function(a){this.Eb=!1;return a&&this.save?this.save():!0};function Db(a){return!0===a.Uh||null===a.Uh&&!a.aa&&void 0===a.sa.run?(a.Ge(),!0):!1}k.Gd=function(){};k.jk=function(){return 0};function Cb(a){void 0===a.Sf&&(a.Sf=0);void 0===a.ef&&(a.ef=-1);void 0===a.gf&&(a.gf=-1);a.We=0<=a.Sf&&0<a.ef;a.We&&(a.Qf=0,a.ff=a.Sf-a.De)}
|
k.Ub=function(a){this.Hb=!1;return a&&this.save?this.save():!0};function Db(a){return!0===a.Vh||null===a.Vh&&!a.aa&&void 0===a.sa.run?(a.Ge(),!0):!1}k.Jd=function(){};k.mk=function(){return 0};function Cb(a){void 0===a.Sf&&(a.Sf=0);void 0===a.ef&&(a.ef=-1);void 0===a.gf&&(a.gf=-1);a.We=0<=a.Sf&&0<a.ef;a.We&&(a.Qf=0,a.ff=a.Sf-a.De)}
|
||||||
function Gb(a,b){if(a.We){var c=!1;a.Qf=a.Qf+a.jk()|0;a.ff-=b;0>=a.ff&&(a.ff+=a.ef,c=!0);0<=a.gf&&a.gf<=F(a)&&(a.ef=a.gf=-1,Cb(a),a.sb(),c=!0);c&&z(a,F(a)+" cycles: checksum="+l(a.Qf))}}function G(a,b,c,d){void 0!==a.sa[b]&&(void 0===d&&(d=4),void 0===c&&(Ta(a,"Register "+b+" is invalid"),a.sb()),c=l(c,d),a.sa[b].innerHTML!=c&&(a.sa[b].innerHTML=c))}k.Kg=function(){};k.Oh=function(){};
|
function Gb(a,b){if(a.We){var c=!1;a.Qf=a.Qf+a.mk()|0;a.ff-=b;0>=a.ff&&(a.ff+=a.ef,c=!0);0<=a.gf&&a.gf<=F(a)&&(a.ef=a.gf=-1,Cb(a),a.ub(),c=!0);c&&z(a,F(a)+" cycles: checksum="+l(a.Qf))}}function G(a,b,c,d){void 0!==a.sa[b]&&(void 0===d&&(d=4),void 0===c&&(Ta(a,"Register "+b+" is invalid"),a.ub()),c=l(c,d),a.sa[b].innerHTML!=c&&(a.sa[b].innerHTML=c))}k.Kg=function(){};k.Ph=function(){};
|
||||||
k.pb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.sa[c]=d;d.onclick=function(){e.Fb?e.sb(!0):e.Ge(!0)};a=!0;break;case "reset":this.sa[c]=d;d.onclick=function(){e.Ba&&Ib(e.Ba)};a=!0;break;case "speed":this.sa[c]=d;a=!0;break;case "setSpeed":this.sa[c]=d,d.onclick=function(){Jb(e,e.Ad<<1,!0)},d.innerHTML=this.cf.toFixed(2)+"Mhz",a=!0}return a};function Kb(a,b,c){a.De+=b;c&&(a.Oc=a.A=0)}
|
k.qb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.sa[c]=d;d.onclick=function(){e.Ib?e.ub(!0):e.Ge(!0)};a=!0;break;case "reset":this.sa[c]=d;d.onclick=function(){e.Ba&&Ib(e.Ba)};a=!0;break;case "speed":this.sa[c]=d;a=!0;break;case "setSpeed":this.sa[c]=d,d.onclick=function(){Jb(e,e.Dd<<1,!0)},d.innerHTML=this.cf.toFixed(2)+"Mhz",a=!0}return a};function Kb(a,b,c){a.De+=b;c&&(a.Rc=a.A=0)}
|
||||||
function Lb(a,b){var c=30;60>c&&(c=60);5>c&&(c=5);var d=1;b&&1<a.Ad&&a.dd&&(d=a.dd/a.$g);a.qk=Math.round(1E3/30);a.wn=Math.floor(a.Bd/c*d);a.ri=Math.floor(a.Bd/30*d);a.uk=Math.floor(a.Bd/60*d);a.tk=Math.floor(a.Bd/5*d);b||(a.hf=a.ri,a.Uf=a.uk,a.Tf=a.tk);a.fj=0}function F(a,b){var c=a.De+a.be+a.Oc-a.A;b&&1<a.Ad&&a.dd>a.$g&&(c=Math.round(c/a.Ad));return c}function Bb(a){a.dd=0;a.dh=1;a.De=a.be=a.Oc=a.A=0;Cb(a);Jb(a,1)}
|
function Lb(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1<a.Dd&&a.gd&&(d=a.gd/a.$g);a.tk=Math.round(1E3/30);a.wn=Math.floor(a.Ed/c*d);a.si=Math.floor(a.Ed/30*d);a.xk=Math.floor(a.Ed/60*d);a.wk=Math.floor(a.Ed/2*d);b||(a.hf=a.si,a.Uf=a.xk,a.Tf=a.wk);a.gj=0}function F(a,b){var c=a.De+a.ce+a.Rc-a.A;b&&1<a.Dd&&a.gd>a.$g&&(c=Math.round(c/a.Dd));return c}function Bb(a){a.gd=0;a.dh=1;a.De=a.ce=a.Rc=a.A=0;Cb(a);Jb(a,1)}
|
||||||
function Jb(a,b,c){void 0!==b&&(0.8>a.dd/a.cf&&(b=1),a.Ad=b,a.cf=a.$g*a.Ad,b=a.cf.toFixed(2)+"Mhz",a.sa.setSpeed&&(a.sa.setSpeed.innerHTML=b),z(a,"target speed: "+b),c&&a.Gd());Kb(a,a.be);a.be=0;a.df=la();a.Ae=0;Lb(a)}
|
function Jb(a,b,c){void 0!==b&&(0.8>a.gd/a.cf&&(b=1),a.Dd=b,a.cf=a.$g*a.Dd,b=a.cf.toFixed(2)+"Mhz",a.sa.setSpeed&&(a.sa.setSpeed.innerHTML=b),z(a,"target speed: "+b),c&&a.Jd());Kb(a,a.ce);a.ce=0;a.df=la();a.Ae=0;Lb(a)}
|
||||||
k.Ge=function(a){if(Qa(this,!0)){this.Fb||(Jb(this),this.Ba&&this.Ba.start(this.df,F(this)),this.Fb=!0,this.ma&&Mb(this.ma),this.sa.run&&(this.sa.run.innerHTML="Halt"),a&&this.Gd());this.fj>=this.Bd&&Lb(this,!0);this.Vf=0;this.ah=la();this.Ae&&(a=this.ah-this.Ae,a>this.qk&&(this.df+=a,this.df>this.ah&&(this.df=this.ah)));try{do{this.of(this.We?1:Math.round(this.wn/this.dh));var b=this.Oc-this.A;this.be+=b;this.Vf+=b;Kb(this,0,!0);Gb(this,b);this.Uf-=b;0>=this.Uf&&(this.Uf+=this.uk,this.Oh());this.Tf-=
|
k.Ge=function(a){if(Qa(this,!0)){this.Ib||(Jb(this),this.Ba&&this.Ba.start(this.df,F(this)),this.Ib=!0,this.ma&&Mb(this.ma),this.sa.run&&(this.sa.run.innerHTML="Halt"),a&&this.Jd());this.gj>=this.Ed&&Lb(this,!0);this.Vf=0;this.ah=la();this.Ae&&(a=this.ah-this.Ae,a>this.tk&&(this.df+=a,this.df>this.ah&&(this.df=this.ah)));try{do{this.of(this.We?1:Math.round(this.wn/this.dh));var b=this.Rc-this.A;this.ce+=b;this.Vf+=b;Kb(this,0,!0);Gb(this,b);this.Uf-=b;0>=this.Uf&&(this.Uf+=this.xk,this.Ph());this.Tf-=
|
||||||
b;0>=this.Tf&&(this.Tf+=this.tk,this.Kg());this.hf-=b;if(0>=this.hf){this.hf+=this.ri;break}}while(this.Fb)}catch(c){this.sb();Fb(this);this.Ba&&this.Ba.stop(la(),F(this));Qa(this,!1);Ta(this,c.message);return}b=setTimeout;a=this.En;this.Ae=la();var d=this.qk;this.Vf&&(d=Math.round(d*this.Vf/this.ri));var d=d-(this.Ae-this.ah),e=this.Ae-this.df;e&&(this.dd=Math.round(this.be/(10*e))/100,864E5<=e&&(this.De=0,this.ma&&Nb(this.ma,!0),Jb(this)));if(0>d||this.dd<this.cf)d=0;this.fj+=this.Vf;this.Ae+=d;
|
b;0>=this.Tf&&(this.Tf+=this.wk,this.Kg());this.hf-=b;if(0>=this.hf){this.hf+=this.si;break}}while(this.Ib)}catch(c){this.ub();Fb(this);this.Ba&&this.Ba.stop(la(),F(this));Qa(this,!1);Ta(this,c.message);return}b=setTimeout;a=this.En;this.Ae=la();var d=this.tk;this.Vf&&(d=Math.round(d*this.Vf/this.si));var d=d-(this.Ae-this.ah),e=this.Ae-this.df;e&&(this.gd=Math.round(this.ce/(10*e))/100,864E5<=e&&(this.De=0,this.ma&&Nb(this.ma,!0),Jb(this)));if(0>d||this.gd<this.cf)d=0;this.gj+=this.Vf;this.Ae+=d;
|
||||||
b(a,d)}else Fb(this),this.Ba&&this.Ba.stop(la(),F(this))};k.sb=function(a){Ra(this,!0);this.Oc-=this.A;this.A=0;Kb(this,this.be);this.be=0;this.Fb&&(this.Fb=!1,this.ma&&Mb(this.ma),this.sa.run&&(this.sa.run.innerHTML="Run"));this.Yh=a};k.of=function(){return 0};function Fb(a){a.Oh();a.Kg()}
|
b(a,d)}else Fb(this),this.Ba&&this.Ba.stop(la(),F(this))};k.ub=function(a){Ra(this,!0);this.Rc-=this.A;this.A=0;Kb(this,this.ce);this.ce=0;this.Ib&&(this.Ib=!1,this.ma&&Mb(this.ma),this.sa.run&&(this.sa.run.innerHTML="Run"));this.Zh=a};k.of=function(){return 0};function Fb(a){a.Ph();a.Kg()}
|
||||||
var Ob=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,
|
var Ob=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,
|
||||||
0,0,1,1,0,1,0,0,1];function Pb(a,b,c){this.S=a;this.Ia=this.na=0;this.Cc=65535;this.Bc=this.Sa=0;this.jg=b;Qb(this,c)}function Rb(a){this.na=a;this.Cc=65535;return this.Ia=a<<4}
|
0,0,1,1,0,1,0,0,1];function Pb(a,b,c){this.S=a;this.Ia=this.na=0;this.Ec=65535;this.Dc=this.Ua=0;this.jg=b;Qb(this,c)}function Rb(a){this.na=a;this.Ec=65535;return this.Ia=a<<4}
|
||||||
function Sb(a){var b,c;a&4?(b=this.S.Fd.Ia,c=this.S.Fd.Cc):(b=this.S.Gc,c=this.S.Re);var d=b+(a&65528);if(d+7<=c){this.Kc=Tb;this.Sb=Ub;this.S.A-=15;c=this.S.Ga(d+0);b=this.S.Ga(d+4);var d=this.S.Ga(d+2)|(b&255)<<16,e=b&7936;if(e&4096){2048==(e&2560)&&(this.Sb=Vb);if(e&2048||!(e&512))this.Sb=Wb;this.na=a;this.Cc=c;this.Sa=b;this.Bc=(b&24576)>>13;return this.Ia=d}if(e&&768>=e)return this.na=a,this.Cc=c,this.Sa=b,this.Bc=(b&24576)>>13,this.Ia=d}return-1}function Xb(a){return this.Ia+a}
|
function Sb(a){var b,c;a&4?(b=this.S.Id.Ia,c=this.S.Id.Ec):(b=this.S.Jc,c=this.S.Re);var d=b+(a&65528);if(d+7<=c){this.Nc=Tb;this.Vb=Ub;this.S.A-=15;c=this.S.Ha(d+0);b=this.S.Ha(d+4);var d=this.S.Ha(d+2)|(b&255)<<16,e=b&7936;if(e&4096){2048==(e&2560)&&(this.Vb=Vb);if(e&2048||!(e&512))this.Vb=Wb;this.na=a;this.Ec=c;this.Ua=b;this.Dc=(b&24576)>>13;return this.Ia=d}if(e&&768>=e)return this.na=a,this.Ec=c,this.Ua=b,this.Dc=(b&24576)>>13,this.Ia=d}return-1}function Xb(a){return this.Ia+a}
|
||||||
function Yb(a){return this.Ia+a}function Tb(a,b,c){return a+b<=this.Cc?this.Ia+a:Vb.call(this,0,0,c)}function Vb(a,b,c){c||Zb.call(this.S,13,0);return-1}function Ub(a,b,c){return a+b<=this.Cc?this.Ia+a:Wb.call(this,0,0,c)}function Wb(a,b,c){c||Zb.call(this.S,13,0);return-1}Pb.prototype.save=function(){return[this.na,this.Ia,this.Cc,this.Sa,this.Bc,this.jg]};Pb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.na=a[0],this.Ia=a[1],this.Cc=a[2],this.Sa=a[3],this.Bc=a[4],this.jg=a[5])};
|
function Yb(a){return this.Ia+a}function Tb(a,b,c){return a+b<=this.Ec?this.Ia+a:Vb.call(this,0,0,c)}function Vb(a,b,c){c||Zb.call(this.S,13,0);return-1}function Ub(a,b,c){return a+b<=this.Ec?this.Ia+a:Wb.call(this,0,0,c)}function Wb(a,b,c){c||Zb.call(this.S,13,0);return-1}Pb.prototype.save=function(){return[this.na,this.Ia,this.Ec,this.Ua,this.Dc,this.jg]};Pb.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.na=a[0],this.Ia=a[1],this.Ec=a[2],this.Ua=a[3],this.Dc=a[4],this.jg=a[5])};
|
||||||
function Qb(a,b){void 0===b&&(b=!!(a.S.Sc&1));b?(a.load=Sb,a.Kc=Tb,a.Sb=Ub):(a.load=Rb,a.Kc=Xb,a.Sb=Yb)}
|
function Qb(a,b){void 0===b&&(b=!!(a.S.Vc&1));b?(a.load=Sb,a.Nc=Tb,a.Vb=Ub):(a.load=Rb,a.Nc=Xb,a.Vb=Yb)}
|
||||||
function $b(a){this.Ha=a.model||8088;var b=0;switch(this.Ha){default:case 8088:b=4772727;break;case 80286:b=6E6}zb.call(this,a,b);this.Cj=61442;this.tg=4;this.jf=255;this.gj=4;this.$=5;this.ta=6;this.ea=7;this.fa=8;this.P=9;this.V=11;this.W=12;this.Be=4;this.xk=60;this.yk=83;this.Ob=3;this.jb=9;this.ac=16;this.gh=1;this.Ck=19;this.Ek=28;this.Gk=16;this.Fk=21;this.Dk=37;this.Ak=2;this.zi=9;this.Bk=5;this.zk=33;this.Bi=10;this.Ai=8;this.Zf=3;this.Yf=15;this.Uk=51;this.Vk=1;this.Wk=2;this.Xk=4;this.Tk=
|
function $b(a){this.Ea=a.model||8088;var b=0;switch(this.Ea){default:case 8088:b=4772727;break;case 80286:b=6E6}zb.call(this,a,b);this.Ej=61442;this.tg=4;this.jf=255;this.hj=4;this.$=5;this.ta=6;this.ea=7;this.fa=8;this.P=9;this.V=11;this.W=12;this.Be=4;this.zk=60;this.Ak=83;this.Rb=3;this.kb=9;this.dc=16;this.hh=1;this.Ek=19;this.Gk=28;this.Ik=16;this.Hk=21;this.Fk=37;this.Ck=2;this.Ai=9;this.Dk=5;this.Bk=33;this.Ci=10;this.Bi=8;this.Zf=3;this.Yf=15;this.Wk=51;this.Xk=1;this.Yk=2;this.Zk=4;this.Vk=
|
||||||
32;this.Zk=this.Ci=15;this.Pb=16;this.Qb=4;this.al=11;this.$k=18;this.Yk=24;this.ub=4;this.bl=2;this.Di=16;this.cl=17;this.Ii=18;this.dl=19;this.Hi=5;this.Ji=6;this.il=2;this.hl=8;this.fl=9;this.Li=this.Ki=this.el=this.gl=10;this.Ik=80;this.Kk=144;this.Hk=86;this.Jk=154;this.Mk=101;this.Ok=165;this.Lk=107;this.Nk=171;this.kl=70;this.ml=113;this.jl=76;this.ll=124;this.Qk=80;this.Sk=128;this.Pk=86;this.Rk=134;this.ag=3;this.$f=16;this.Qi=10;this.Pi=8;this.nl=51;this.bc=8;this.ol=17;this.pl=36;this.hc=
|
32;this.al=this.Di=15;this.Sb=16;this.Tb=4;this.cl=11;this.bl=18;this.$k=24;this.wb=4;this.dl=2;this.Ei=16;this.el=17;this.Ji=18;this.fl=19;this.Ii=5;this.Ki=6;this.kl=2;this.jl=8;this.hl=9;this.Mi=this.Li=this.gl=this.il=10;this.Kk=80;this.Mk=144;this.Jk=86;this.Lk=154;this.Ok=101;this.Qk=165;this.Nk=107;this.Pk=171;this.ml=70;this.ol=113;this.ll=76;this.nl=124;this.Sk=80;this.Uk=128;this.Rk=86;this.Tk=134;this.ag=3;this.$f=16;this.Ri=10;this.Qi=8;this.pl=51;this.ec=8;this.ql=17;this.rl=36;this.kc=
|
||||||
11;this.ql=16;this.bg=10;this.Gb=2;this.wi=18;this.xi=9-this.Gb;this.yi=17-this.Gb;this.Ei=12;this.Fi=9-this.Gb;this.Gi=13-this.Gb;this.Mi=18;this.Ni=9-this.Gb;this.Oi=17-this.Gb;this.Ri=15;this.Si=9-this.Gb;this.Ti=15-this.Gb;this.Xi=11;this.Yi=9-this.Gb;this.Zi=10-this.Gb;this.rl=8;this.ul=12;this.sl=18;this.tl=17;this.vl=15;this.Vi=8;this.Ui=20;this.Wi=2;this.bj=3;this.cg=9;this.aj=5;this.$i=11;this.dj=4;this.cj=17;this.wl=11;this.Ka=ac.slice();80186<=this.Ha&&(this.jf=31,this.Ka[15]=H,this.Ka[96]=
|
11;this.sl=16;this.bg=10;this.Kb=2;this.xi=18;this.yi=9-this.Kb;this.zi=17-this.Kb;this.Fi=12;this.Gi=9-this.Kb;this.Hi=13-this.Kb;this.Ni=18;this.Oi=9-this.Kb;this.Pi=17-this.Kb;this.Si=15;this.Ti=9-this.Kb;this.Ui=15-this.Kb;this.Yi=11;this.Zi=9-this.Kb;this.$i=10-this.Kb;this.tl=8;this.wl=12;this.ul=18;this.vl=17;this.xl=15;this.Wi=8;this.Vi=20;this.Xi=2;this.cj=3;this.cg=9;this.bj=5;this.aj=11;this.ej=4;this.dj=17;this.yl=11;this.La=ac.slice();80186<=this.Ea&&(this.jf=31,this.La[15]=H,this.La[96]=
|
||||||
bc,this.Ka[97]=cc,this.Ka[98]=dc,this.Ka[99]=H,this.Ka[100]=H,this.Ka[101]=H,this.Ka[102]=H,this.Ka[103]=H,this.Ka[104]=ec,this.Ka[105]=fc,this.Ka[106]=gc,this.Ka[107]=hc,this.Ka[108]=ic,this.Ka[109]=jc,this.Ka[110]=kc,this.Ka[111]=lc,this.Ka[192]=mc,this.Ka[193]=nc,this.Ka[200]=oc,this.Ka[200]=pc,this.Ka[241]=qc,rc[7]=sc,tc[7]=sc,80286<=this.Ha&&(this.Cj=2,this.tg=0,this.Ka[15]=uc,this.Ka[99]=vc,this.Ka[84]=wc,this.P=this.fa=this.ea=this.ta=this.$=this.gj=0,this.W=this.V=1,this.Be=3,this.xk=14,this.yk=
|
bc,this.La[97]=cc,this.La[98]=dc,this.La[99]=H,this.La[100]=H,this.La[101]=H,this.La[102]=H,this.La[103]=H,this.La[104]=ec,this.La[105]=fc,this.La[106]=gc,this.La[107]=hc,this.La[108]=ic,this.La[109]=jc,this.La[110]=kc,this.La[111]=lc,this.La[192]=mc,this.La[193]=nc,this.La[200]=oc,this.La[200]=pc,this.La[241]=qc,rc[7]=sc,tc[7]=sc,80286<=this.Ea&&(this.Ej=2,this.tg=0,this.La[15]=uc,this.La[99]=vc,this.La[84]=wc,this.P=this.fa=this.ea=this.ta=this.$=this.hj=0,this.W=this.V=1,this.Be=3,this.zk=14,this.Ak=
|
||||||
16,this.Ob=2,this.ac=this.jb=7,this.gh=0,this.Ck=7,this.Ek=13,this.Gk=7,this.Fk=11,this.Dk=16,this.Ak=3,this.zi=6,this.Bk=2,this.zk=13,this.Ai=this.Bi=5,this.Zf=2,this.Yf=7,this.Uk=23,this.Vk=0,this.Wk=1,this.Xk=3,this.Tk=17,this.Ci=7,this.Zk=11,this.Pb=7,this.Qb=3,this.al=7,this.$k=11,this.Yk=15,this.ub=2,this.bl=3,this.Di=7,this.dl=this.Ii=this.cl=8,this.Ji=this.Hi=4,this.il=2,this.hl=3,this.fl=5,this.gl=2,this.el=3,this.Ki=5,this.Li=3,this.Ik=14,this.Kk=22,this.Hk=17,this.Jk=25,this.Mk=17,this.Ok=
|
16,this.Rb=2,this.dc=this.kb=7,this.hh=0,this.Ek=7,this.Gk=13,this.Ik=7,this.Hk=11,this.Fk=16,this.Ck=3,this.Ai=6,this.Dk=2,this.Bk=13,this.Bi=this.Ci=5,this.Zf=2,this.Yf=7,this.Wk=23,this.Xk=0,this.Yk=1,this.Zk=3,this.Vk=17,this.Di=7,this.al=11,this.Sb=7,this.Tb=3,this.cl=7,this.bl=11,this.$k=15,this.wb=2,this.dl=3,this.Ei=7,this.fl=this.Ji=this.el=8,this.Ki=this.Ii=4,this.kl=2,this.jl=3,this.hl=5,this.il=2,this.gl=3,this.Li=5,this.Mi=3,this.Kk=14,this.Mk=22,this.Jk=17,this.Lk=25,this.Ok=17,this.Qk=
|
||||||
25,this.Lk=20,this.Nk=28,this.kl=13,this.ml=21,this.jl=16,this.ll=24,this.Qk=13,this.Sk=21,this.Pk=16,this.Rk=24,this.ag=2,this.$f=7,this.Pi=this.Qi=5,this.nl=19,this.ol=this.bc=5,this.pl=17,this.hc=3,this.ql=5,this.bg=3,this.Gb=0,this.wi=8,this.xi=5,this.yi=9,this.Fi=this.Ei=5,this.Gi=4,this.Ni=this.Mi=5,this.Oi=4,this.Ri=7,this.Si=5,this.Ti=8,this.Xi=3,this.Yi=4,this.Zi=3,this.ul=this.rl=11,this.tl=this.sl=15,this.vl=7,this.Vi=5,this.Ui=8,this.Wi=0,this.bj=2,this.cg=6,this.aj=3,this.$i=6,this.dj=
|
25,this.Nk=20,this.Pk=28,this.ml=13,this.ol=21,this.ll=16,this.nl=24,this.Sk=13,this.Uk=21,this.Rk=16,this.Tk=24,this.ag=2,this.$f=7,this.Qi=this.Ri=5,this.pl=19,this.ql=this.ec=5,this.rl=17,this.kc=3,this.sl=5,this.bg=3,this.Kb=0,this.xi=8,this.yi=5,this.zi=9,this.Gi=this.Fi=5,this.Hi=4,this.Oi=this.Ni=5,this.Pi=4,this.Si=7,this.Ti=5,this.Ui=8,this.Yi=3,this.Zi=4,this.$i=3,this.wl=this.tl=11,this.vl=this.ul=15,this.xl=7,this.Wi=5,this.Vi=8,this.Xi=0,this.cj=2,this.cg=6,this.bj=3,this.aj=6,this.ej=
|
||||||
3,this.wl=this.cj=5));this.vg=[];this.uf=[];this.Hg=0;this.ya=[];this.oe=this.Ab=this.hb=this.Ya=this.se=0;this.T=this.pm;this.U=this.qm;this.N=this.nn;this.O=this.on;this.Q=this.Eo;this.R=this.Fo;xc(this)}w(zb,$b);k=$b.prototype;k.ki=function(a,b,c,d,e){this.ya=a;this.oe=this.Ab=b;this.hb=c;this.Ya=d;this.se=e};k.reset=function(){this.Fb&&this.sb();xc(this);Bb(this);this.ad=!1};
|
3,this.yl=this.dj=5));this.vg=[];this.uf=[];this.Hg=0;this.ya=[];this.oe=this.Db=this.ib=this.Za=this.se=0;this.T=this.nm;this.U=this.om;this.N=this.nn;this.O=this.on;this.Q=this.Fo;this.R=this.Go;xc(this)}w(zb,$b);k=$b.prototype;k.li=function(a,b,c,d,e){this.ya=a;this.oe=this.Db=b;this.ib=c;this.Za=d;this.se=e};k.reset=function(){this.Ib&&this.ub();xc(this);Bb(this);this.ed=!1};
|
||||||
function xc(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.Sc=65520;a.Wc=0;a.ne=1023;a.yc={hj:0,na:0,Sa:0,Zg:-1};a.qa=new Pb(a,"CS");a.Hb=new Pb(a,"DS");a.wb=new Pb(a,"SS");a.Ua=new Pb(a,"ES");a.Ml=new Pb(a,"ZERO");yc(a,0,65535);80286<=a.Ha&&(a.Gc=a.Re=0,a.Fd=new Pb(a,"LDT",!0),a.mg=new Pb(a,"TSS",!0),a.Ib=new Pb(a,"VER",!0),yc(a,65520,61440),a.qa.Ia=16711680);zc(a,0);Ac(a);a.bb=0;a.vb=a.gg=-1;a.Bg=0;a.ga=a.Fa=-1;a.C=a.Hb;a.M=a.wb;a.Z=a.va=0}
|
function xc(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.Vc=65520;a.Zc=0;a.ne=1023;a.Ac={ij:0,na:0,Ua:0,Zg:-1};a.qa=new Pb(a,"CS");a.Lb=new Pb(a,"DS");a.yb=new Pb(a,"SS");a.Wa=new Pb(a,"ES");a.Ol=new Pb(a,"ZERO");yc(a,0,65535);80286<=a.Ea&&(a.Jc=a.Re=0,a.Id=new Pb(a,"LDT",!0),a.mg=new Pb(a,"TSS",!0),a.Mb=new Pb(a,"VER",!0),yc(a,65520,61440),a.qa.Ia=16711680);zc(a,0);Ac(a);a.cb=0;a.xb=a.gg=-1;a.Bg=0;a.ga=a.Ga=-1;a.C=a.Lb;a.M=a.yb;a.Z=a.va=0}
|
||||||
k.jk=function(){var a=this.G+this.B+this.I+this.J+this.X+this.H+this.F+this.D|0;return a=a+this.pa+this.qa.na+this.Hb.na+this.wb.na+this.Ua.na+Bc(this)|0};function Cc(a,b,c,d){void 0!==d&&(void 0===a.vg[b]&&(a.vg[b]=[]),a.vg[b].push([c,d]))}function Dc(a,b,c){void 0!==c&&(void 0===a.uf[b]&&(a.uf[b]=[]),a.uf[b].push(c),a.Hg++)}function Ec(a,b){var c=a.uf[b];if(void 0!==c){for(;0<c.length;)c.pop()(--a.Hg);delete a.uf[b]}}
|
k.mk=function(){var a=this.G+this.B+this.I+this.J+this.X+this.H+this.F+this.D|0;return a=a+this.pa+this.qa.na+this.Lb.na+this.yb.na+this.Wa.na+Bc(this)|0};function Cc(a,b,c,d){void 0!==d&&(void 0===a.vg[b]&&(a.vg[b]=[]),a.vg[b].push([c,d]))}function Dc(a,b,c){void 0!==c&&(void 0===a.uf[b]&&(a.uf[b]=[]),a.uf[b].push(c),a.Hg++)}function Ec(a,b){var c=a.uf[b];if(void 0!==c){for(;0<c.length;)c.pop()(--a.Hg);delete a.uf[b]}}
|
||||||
function Ac(a,b){void 0===b&&(b=!!(a.Sc&1));Fc=b?Gc:Hc;Qb(a.qa,b);Qb(a.Hb,b);Qb(a.wb,b);Qb(a.Ua,b)}
|
function Ac(a,b){void 0===b&&(b=!!(a.Vc&1));Fc=b?Gc:Hc;Qb(a.qa,b);Qb(a.Lb,b);Qb(a.yb,b);Qb(a.Wa,b)}
|
||||||
k.save=function(){var a=new I(this);a.set(0,[this.G,this.B,this.I,this.J,this.X,this.H,this.F,this.D]);a.set(1,[this.pa,this.qa.save(),this.Hb.save(),this.wb.save(),this.Ua.save(),Bc(this),null!=this.Gc?[this.Sc,this.Gc,this.Re,this.Wc,this.ne,this.Fd.save(),this.mg.save()]:null]);a.set(2,[this.C.jg,this.M.jg,this.Z,this.va,this.bb,this.ga,this.Fa]);a.set(3,[this.dh,this.De,this.Ad]);a.set(4,hb(this.la));return a.data()};
|
k.save=function(){var a=new I(this);a.set(0,[this.G,this.B,this.I,this.J,this.X,this.H,this.F,this.D]);a.set(1,[this.pa,this.qa.save(),this.Lb.save(),this.yb.save(),this.Wa.save(),Bc(this),null!=this.Jc?[this.Vc,this.Jc,this.Re,this.Zc,this.ne,this.Id.save(),this.mg.save()]:null]);a.set(2,[this.C.jg,this.M.jg,this.Z,this.va,this.cb,this.ga,this.Ga]);a.set(3,[this.dh,this.De,this.Dd]);a.set(4,hb(this.la));return a.data()};
|
||||||
k.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.qa.restore(b[1]);this.Hb.restore(b[2]);this.wb.restore(b[3]);this.Ua.restore(b[4]);zc(this,b[5]);var c=b[6];c&&c.length&&(this.Sc=c[0],this.Gc=c[1],this.Re=c[2],this.Wc=c[3],this.ne=c[4],this.Fd.restore(c[5]),this.mg.restore(c[6]),Ac(this));J(this,b[0]);b=a[2];this.C=Ic(this,b[0]);this.M=Ic(this,b[1]);this.Z=b[2];this.va=b[3];this.bb=b[4];this.ga=b[5];this.Fa=
|
k.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.qa.restore(b[1]);this.Lb.restore(b[2]);this.yb.restore(b[3]);this.Wa.restore(b[4]);zc(this,b[5]);var c=b[6];c&&c.length&&(this.Vc=c[0],this.Jc=c[1],this.Re=c[2],this.Zc=c[3],this.ne=c[4],this.Id.restore(c[5]),this.mg.restore(c[6]),Ac(this));J(this,b[0]);b=a[2];this.C=Ic(this,b[0]);this.M=Ic(this,b[1]);this.Z=b[2];this.va=b[3];this.cb=b[4];this.ga=b[5];this.Ga=
|
||||||
b[6];b=a[3];this.dh=b[0];this.De=b[1];Jb(this,b[2]);a:{b=this.la;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.Qj){for(var f=0,g=Array(b.Qj),h=0;h<e.length-1;)for(var m=e[h++],n=e[h++];m--;)g[f++]=n;e=g}f=b.ya[d];if(!f||!f.restore(e)){b.error("Unable to restore memory block "+d);b=!1;break a}}void 0!==a[c]&&Za(b,a[c]);b=!0}return b};
|
b[6];b=a[3];this.dh=b[0];this.De=b[1];Jb(this,b[2]);a:{b=this.la;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.Tj){for(var f=0,g=Array(b.Tj),h=0;h<e.length-1;)for(var m=e[h++],n=e[h++];m--;)g[f++]=n;e=g}f=b.ya[d];if(!f||!f.restore(e)){b.error("Unable to restore memory block "+d);b=!1;break a}}void 0!==a[c]&&Za(b,a[c]);b=!0}return b};
|
||||||
function Ic(a,b){switch(b){case "CS":return a.qa;case "DS":return a.Hb;case "SS":return a.wb;case "ES":return a.Ua;case "ZERO":return a.Ml;default:return[0,b,0,0,""]}}function Jc(a,b){var c;if(a.Sc&1){if(c=a.Wc+(b<<3),c+7<=a.ne){a.yc.hj=a.Ga(c);a.yc.na=a.Ga(c+2);a.yc.Sa=a.Ga(c+4);switch(a.yc.Sa&7936){case 1536:a.yc.Zg=-17153;break;case 1792:a.yc.Zg=-16641;break;default:return!1}return!0}}else if(c=a.Wc+(b<<2),c+7<=a.ne)return a.yc.hj=a.Ga(c),a.yc.na=a.Ga(c+2),a.yc.Zg=-769,!0;return!1}
|
function Ic(a,b){switch(b){case "CS":return a.qa;case "DS":return a.Lb;case "SS":return a.yb;case "ES":return a.Wa;case "ZERO":return a.Ol;default:return[0,b,0,0,""]}}function Jc(a,b){var c;if(a.Vc&1){if(c=a.Zc+(b<<3),c+7<=a.ne){a.Ac.ij=a.Ha(c);a.Ac.na=a.Ha(c+2);a.Ac.Ua=a.Ha(c+4);switch(a.Ac.Ua&7936){case 1536:a.Ac.Zg=-17153;break;case 1792:a.Ac.Zg=-16641;break;default:return!1}return!0}}else if(c=a.Zc+(b<<2),c+7<=a.ne)return a.Ac.ij=a.Ha(c),a.Ac.na=a.Ha(c+2),a.Ac.Zg=-769,!0;return!1}
|
||||||
function Kc(a,b){a.Aa=a.qa.load(b)+a.pa;a.Z|=a.tg}function Lc(a,b){a.Hb.load(b);a.Z|=a.tg}function Pc(a,b){a.wb.load(b);a.Z|=4}function Qc(a,b){a.Ua.load(b);a.Z|=a.tg}function J(a,b){a.Aa=a.qa.Ia+(a.pa=b&65535)}function yc(a,b,c){a.Aa=a.qa.load(c)+(a.pa=b)}function K(a,b){a.Aa=a.qa.Ia+(a.pa=a.pa+b&65535)}function Rc(a){return a.Y&a.ba?1:0}function Sc(a){return Ob[a.ia&255]?4:0}function Tc(a){return(a.ia^a.ka)&16?16:0}function Uc(a){return a.Y&a.ba-1?0:64}function Vc(a){return a.ia&a.ba>>1?128:0}
|
function Kc(a,b){a.Aa=a.qa.load(b)+a.pa;a.Z|=a.tg}function Oc(a,b){a.Lb.load(b);a.Z|=a.tg}function Pc(a,b){a.yb.load(b);a.Z|=4}function Qc(a,b){a.Wa.load(b);a.Z|=a.tg}function J(a,b){a.Aa=a.qa.Ia+(a.pa=b&65535)}function yc(a,b,c){a.Aa=a.qa.load(c)+(a.pa=b)}function K(a,b){a.Aa=a.qa.Ia+(a.pa=a.pa+b&65535)}function Rc(a){return a.Y&a.ba?1:0}function Sc(a){return Ob[a.ia&255]?4:0}function Tc(a){return(a.ia^a.ka)&16?16:0}function Uc(a){return a.Y&a.ba-1?0:64}function Vc(a){return a.ia&a.ba>>1?128:0}
|
||||||
function Wc(a){return(a.ia^a.ka^a.ia>>1)&a.ba>>1?2048:0}function Xc(a){a.Y&=~a.ba}function Yc(a){a.ka=a.ia&16|a.ka&-17}function Zc(a){a.Y|=a.ba-1}function $c(a){Vc(a)&&(a.ia^=a.ba>>1|a.ba>>2,a.ka^=32896)}function ad(a){a.ia&=~a.ba;a.ka=a.ia&32896|a.ka&-32897}function bd(a){a.Y|=a.ba}function cd(a){a.ka=~(a.ia&16)&16|a.ka&-17}function dd(a){a.Y&=~(a.ba-1)}function ed(a){Vc(a)||(a.ia^=a.ba>>1|a.ba>>2,a.ka^=32896)}function fd(a){a.ia|=a.ba;a.ka=a.ia&32896|a.ka&-32897}
|
function Wc(a){return(a.ia^a.ka^a.ia>>1)&a.ba>>1?2048:0}function Xc(a){a.Y&=~a.ba}function Yc(a){a.ka=a.ia&16|a.ka&-17}function Zc(a){a.Y|=a.ba-1}function $c(a){Vc(a)&&(a.ia^=a.ba>>1|a.ba>>2,a.ka^=32896)}function ad(a){a.ia&=~a.ba;a.ka=a.ia&32896|a.ka&-32897}function bd(a){a.Y|=a.ba}function cd(a){a.ka=~(a.ia&16)&16|a.ka&-17}function dd(a){a.Y&=~(a.ba-1)}function ed(a){Vc(a)||(a.ia^=a.ba>>1|a.ba>>2,a.ka^=32896)}function fd(a){a.ia|=a.ba;a.ka=a.ia&32896|a.ka&-32897}
|
||||||
function Bc(a){return a.wa&-2262|Rc(a)|Sc(a)|Tc(a)|Uc(a)|Vc(a)|Wc(a)}function zc(a,b){a.ba=256;a.Y=a.ia=a.ka=0;b&1&&bd(a);b&4||(a.ia|=1);b&16&&(a.ka|=16);b&64||Zc(a);b&128&&ed(a);b&2048&&fd(a);a.wa=a.wa&-1793|b&1792|a.Cj;a.wa&256&&(a.bb|=2,a.Z|=4)}
|
function Bc(a){return a.wa&-2262|Rc(a)|Sc(a)|Tc(a)|Uc(a)|Vc(a)|Wc(a)}function zc(a,b){a.ba=256;a.Y=a.ia=a.ka=0;b&1&&bd(a);b&4||(a.ia|=1);b&16&&(a.ka|=16);b&64||Zc(a);b&128&&ed(a);b&2048&&fd(a);a.wa=a.wa&-1793|b&1792|a.Ej;a.wa&256&&(a.cb|=2,a.Z|=4)}
|
||||||
k.pb=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=zb.prototype.pb.call(this,a,b,c,d)}return e};k.nb=function(a){return this.ya[(a&this.Ab)>>this.hb].Rc(a&this.Ya)};
|
k.qb=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=zb.prototype.qb.call(this,a,b,c,d)}return e};k.ob=function(a){return this.ya[(a&this.Db)>>this.ib].Uc(a&this.Za)};
|
||||||
k.Ga=function(a){var b=a&this.Ya;a=(a&this.Ab)>>this.hb;this.A-=this.gj;return b!=this.Ya?this.ya[a].Dl(b):this.ya[a++].Rc(b)|this.ya[a&this.se].Rc(0)<<8};k.Tc=function(a,b){this.ya[(a&this.Ab)>>this.hb].Ec(a&this.Ya,b&255)};k.Hd=function(a,b){var c=a&this.Ya,d=(a&this.Ab)>>this.hb;this.A-=this.gj;c!=this.Ya?this.ya[d].Pl(c,b&65535):(this.ya[d++].Ec(c,b&255),this.ya[d&this.se].Ec(0,b>>8&255))};k.pm=function(a,b){this.lg=a;this.ga=a.Kc(this.dg=b,0);return this.Z&1?0:this.nb(this.ga)};
|
k.Ha=function(a){var b=a&this.Za;a=(a&this.Db)>>this.ib;this.A-=this.hj;return b!=this.Za?this.ya[a].Fl(b):this.ya[a++].Uc(b)|this.ya[a&this.se].Uc(0)<<8};k.Wc=function(a,b){this.ya[(a&this.Db)>>this.ib].Hc(a&this.Za,b&255)};k.Kd=function(a,b){var c=a&this.Za,d=(a&this.Db)>>this.ib;this.A-=this.hj;c!=this.Za?this.ya[d].Rl(c,b&65535):(this.ya[d++].Hc(c,b&255),this.ya[d&this.se].Hc(0,b>>8&255))};k.nm=function(a,b){this.lg=a;this.ga=a.Nc(this.dg=b,0);return this.Z&1?0:this.ob(this.ga)};
|
||||||
k.qm=function(a,b){this.lg=a;this.ga=a.Kc(this.dg=b,1);return this.Z&1?0:this.Ga(this.ga)};k.nn=function(a,b){this.lg=a;this.Fa=this.ga=a.Kc(this.dg=b,0);return this.Z&1?0:this.nb(this.ga)};k.on=function(a,b){this.lg=a;this.Fa=this.ga=a.Kc(this.dg=b,1);return this.Z&1?0:this.Ga(this.ga)};k.Eo=function(a){this.Z&2||this.Tc(this.lg.Sb(this.dg,1),a)};k.Fo=function(a){this.Z&2||this.Hd(this.lg.Sb(this.dg,2),a)};k.da=function(){var a=this.nb(this.Aa);this.Aa=this.qa.Ia+(this.pa=this.pa+1&65535);return a};
|
k.om=function(a,b){this.lg=a;this.ga=a.Nc(this.dg=b,1);return this.Z&1?0:this.Ha(this.ga)};k.nn=function(a,b){this.lg=a;this.Ga=this.ga=a.Nc(this.dg=b,0);return this.Z&1?0:this.ob(this.ga)};k.on=function(a,b){this.lg=a;this.Ga=this.ga=a.Nc(this.dg=b,1);return this.Z&1?0:this.Ha(this.ga)};k.Fo=function(a){this.Z&2||this.Wc(this.lg.Vb(this.dg,1),a)};k.Go=function(a){this.Z&2||this.Kd(this.lg.Vb(this.dg,2),a)};k.da=function(){var a=this.ob(this.Aa);this.Aa=this.qa.Ia+(this.pa=this.pa+1&65535);return a};
|
||||||
k.L=function(){var a=this.nb(this.Aa)<<24>>24;this.Aa=this.qa.Ia+(this.pa=this.pa+1&65535);return a&65535};k.K=function(){var a=this.Ga(this.Aa);this.Aa=this.qa.Ia+(this.pa=this.pa+2&65535);return a};k.Ea=function(){var a=this.X;this.X=this.X+2&65535;return this.Ga(this.wb.Kc(a,1))};function L(a,b){var c=a.X=a.X-2&65535;a.Hd(a.wb.Sb(c,1),b)}
|
k.L=function(){var a=this.ob(this.Aa)<<24>>24;this.Aa=this.qa.Ia+(this.pa=this.pa+1&65535);return a&65535};k.K=function(){var a=this.Ha(this.Aa);this.Aa=this.qa.Ia+(this.pa=this.pa+2&65535);return a};k.Fa=function(){var a=this.X;this.X=this.X+2&65535;return this.Ha(this.yb.Nc(a,1))};function L(a,b){var c=a.X=a.X-2&65535;a.Kd(a.yb.Vb(c,1),b)}
|
||||||
k.Kg=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.X);G(this,"BP",this.H);G(this,"SI",this.F);G(this,"DI",this.D);G(this,"CS",this.qa.na);G(this,"DS",this.Hb.na);G(this,"SS",this.wb.na);G(this,"ES",this.Ua.na);G(this,"IP",this.pa);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?
|
k.Kg=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.X);G(this,"BP",this.H);G(this,"SI",this.F);G(this,"DI",this.D);G(this,"CS",this.qa.na);G(this,"DS",this.Lb.na);G(this,"SS",this.yb.na);G(this,"ES",this.Wa.na);G(this,"IP",this.pa);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.Fb&&this.dd?this.dd.toFixed(2)+"Mhz":"Stopped")};
|
1:0,1);G(this,"O",a&2048?1:0,1);this.sa.speed&&(this.sa.speed.innerHTML=this.Ib&&this.gd?this.gd.toFixed(2)+"Mhz":"Stopped")};
|
||||||
k.of=function(a){this.Yh=!0;this.im=a&&this.aa&&1<this.aa.Jb.length;this.Oc=this.A=a;this.ma&&Nb(this.ma);a||!this.aa||M(this.aa,this.aa.Le)||(this.Z|=4);do{var b=this.Z&240;if(b)this.va|=b;else if(this.jh=this.Aa,this.ga=this.Fa=-1,this.C=this.Hb,this.M=this.wb,this.va=this.Z&256,this.bb){a:{if(!(this.Z&4))if(this.bb&1&&this.wa&512){if(b=gd(this.ma),-1<=b&&(this.bb&=-2,0<=b)){this.bb&=-5;hd.call(this,b,null,11);b=!0;break a}}else if(this.bb&2){this.bb&=-3;hd.call(this,1,null,11);b=!0;break a}if(b=
|
k.of=function(a){this.Zh=!0;this.gm=a&&this.aa&&1<this.aa.Ab.length;this.Rc=this.A=a;this.ma&&Nb(this.ma);a||!this.aa||M(this.aa,this.aa.Le)||(this.Z|=4);do{var b=this.Z&240;if(b)this.va|=b;else if(this.kh=this.Aa,this.ga=this.Ga=-1,this.C=this.Lb,this.M=this.yb,this.va=this.Z&256,this.cb){a:{if(!(this.Z&4))if(this.cb&1&&this.wa&512){if(b=gd(this.ma),-1<=b&&(this.cb&=-2,0<=b)){this.cb&=-5;hd.call(this,b,null,11);b=!0;break a}}else if(this.cb&2){this.cb&=-3;hd.call(this,1,null,11);b=!0;break a}if(b=
|
||||||
this.bb&8){for(var b=this.ma,c=!1,d=0;d<b.Ra;d++)for(var e=b.Ra[d],f=0;f<e.yb.length;f++){var g=e.yb[f];g.zd||(id(b,g),g.zd||(c=!0))}b=!c}b&&(this.bb&=-9);b=!1}if(b&&!a){this.Z=0;break}if(this.bb&4){this.Z=this.A=0;break}}if(this.im&&jd(this.aa,this.Aa)){this.sb();break}this.Z=0;this.Ka[this.da()].call(this)}while(0<this.A);return this.Yh?this.Oc-this.A:void 0===this.Yh?0:-1};k.Da=function(a){this.aa&&M(this.aa,this.aa.zj)&&this.aa.message(a)};
|
this.cb&8){for(var b=this.ma,c=!1,d=0;d<b.Ta;d++)for(var e=b.Ta[d],f=0;f<e.Bb.length;f++){var g=e.Bb[f];g.Cd||(id(b,g),g.Cd||(c=!0))}b=!c}b&&(this.cb&=-9);b=!1}if(b&&!a){this.Z=0;break}if(this.cb&4){this.Z=this.A=0;break}}if(this.gm&&jd(this.aa,this.Aa)){this.ub();break}this.Z=0;this.La[this.da()].call(this)}while(0<this.A);return this.Zh?this.Rc-this.A:void 0===this.Zh?0:-1};k.Da=function(a){this.aa&&M(this.aa,this.aa.Bj)&&this.aa.message(a)};
|
||||||
za(function(){for(var a=y(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new $b(d);Pa(d,c)}});function kd(a,b){this.ka=a^b;this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=a+b)&255}function ld(a,b){this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a|b)&255}
|
za(function(){for(var a=y(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new $b(d);Pa(d,c)}});function kd(a,b){this.ka=a^b;this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=a+b)&255}function ld(a,b){this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a|b)&255}
|
||||||
function md(a,b){this.ka=a^b;this.Y=this.ia=a+b+(this.Y&this.ba?1:0);this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return this.Y&255}function nd(a,b){this.ka=a^b;this.Y=this.ia=a-b-(this.Y&this.ba?1:0);this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return this.Y&255}function od(a,b){this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a&b)&255}
|
function md(a,b){this.ka=a^b;this.Y=this.ia=a+b+(this.Y&this.ba?1:0);this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return this.Y&255}function nd(a,b){this.ka=a^b;this.Y=this.ia=a-b-(this.Y&this.ba?1:0);this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return this.Y&255}function od(a,b){this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a&b)&255}
|
||||||
function pd(a,b){this.ka=a^b;this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=a-b)&255}function qd(a,b){this.ba=256;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a^b)&255}function rd(a,b){this.ka=a^b;this.ba=256;this.Y=this.ia=a-b;this.A-=0>this.Fa?0>this.ga?this.Ob:this.zi:this.jb;this.Z|=2;return a}
|
function pd(a,b){this.ka=a^b;this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=a-b)&255}function qd(a,b){this.ba=256;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a^b)&255}function rd(a,b){this.ka=a^b;this.ba=256;this.Y=this.ia=a-b;this.A-=0>this.Ga?0>this.ga?this.Rb:this.Ai:this.kb;this.Z|=2;return a}
|
||||||
function sd(a,b){this.ka=a^b;this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=a+b)&65535}function td(a,b){this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a|b)&65535}function ud(a,b){this.ka=a^b;this.Y=this.ia=a+b+(this.Y&this.ba?1:0);this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return this.Y&65535}
|
function sd(a,b){this.ka=a^b;this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=a+b)&65535}function td(a,b){this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a|b)&65535}function ud(a,b){this.ka=a^b;this.Y=this.ia=a+b+(this.Y&this.ba?1:0);this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return this.Y&65535}
|
||||||
function vd(a,b){this.ka=a^b;this.Y=this.ia=a-b-(this.Y&this.ba?1:0);this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return this.Y&65535}function wd(a,b){this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a&b)&65535}function xd(a,b){this.ka=a^b;this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=a-b)&65535}
|
function vd(a,b){this.ka=a^b;this.Y=this.ia=a-b-(this.Y&this.ba?1:0);this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return this.Y&65535}function wd(a,b){this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a&b)&65535}function xd(a,b){this.ka=a^b;this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=a-b)&65535}
|
||||||
function yd(a,b){this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.Ob:this.jb:this.ac;return(this.Y=this.ia=this.ka=a^b)&65535}function zd(a,b){this.ka=a^b;this.ba=65536;this.Y=this.ia=a-b;this.A-=0>this.Fa?0>this.ga?this.Ob:this.zi:this.jb;this.Z|=2;return a}function Ad(a,b){this.Y=this.Y&this.ba-1|(a&b?this.ba:0);(a^a>>1)&b>>1?fd(this):ad(this)}function Bd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<<e|a>>8-e)&255:d=a<<8;Ad.call(this,d,256)}return c}
|
function yd(a,b){this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.Rb:this.kb:this.dc;return(this.Y=this.ia=this.ka=a^b)&65535}function zd(a,b){this.ka=a^b;this.ba=65536;this.Y=this.ia=a-b;this.A-=0>this.Ga?0>this.ga?this.Rb:this.Ai:this.kb;this.Z|=2;return a}function Ad(a,b){this.Y=this.Y&this.ba-1|(a&b?this.ba:0);(a^a>>1)&b>>1?fd(this):ad(this)}function Bd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<<e|a>>8-e)&255:d=a<<8;Ad.call(this,d,256)}return c}
|
||||||
function Cd(a,b){var c=a;if(b){var d,e=b&15;e?c=(d=a<<e|a>>16-e)&65535:d=a<<16;Ad.call(this,d,65536)}return c}function Dd(a,b){var c=a;if(b){var d,c=b&7,c=d=(a>>c|a<<8-c)&255;d&128&&(d|=256);Ad.call(this,d,256)}return c}function Ed(a,b){var c=a;if(b){var d,c=b&15,c=d=(a>>c|a<<16-c)&65535;d&32768&&(d|=65536);Ad.call(this,d,65536)}return c}
|
function Cd(a,b){var c=a;if(b){var d,e=b&15;e?c=(d=a<<e|a>>16-e)&65535:d=a<<16;Ad.call(this,d,65536)}return c}function Dd(a,b){var c=a;if(b){var d,c=b&7,c=d=(a>>c|a<<8-c)&255;d&128&&(d|=256);Ad.call(this,d,256)}return c}function Ed(a,b){var c=a;if(b){var d,c=b&15,c=d=(a>>c|a<<16-c)&65535;d&32768&&(d|=65536);Ad.call(this,d,65536)}return c}
|
||||||
function Fd(a,b){var c=a;if(b){var d;(d=(b&this.jf)%9)?(d=a<<d|(this.Y&this.ba?1:0)<<d-1|a>>9-d,c=d&255):d=a|(this.Y&this.ba?1:0)<<8;Ad.call(this,d,256)}return c}function Gd(a,b){var c=a;if(b){var d;(d=(b&this.jf)%17)?(d=a<<d|(this.Y&this.ba?1:0)<<d-1|a>>17-d,c=d&65535):d=a|(this.Y&this.ba?1:0)<<16;Ad.call(this,d,65536)}return c}function Hd(a,b){var c=a;b&&(c=(b&this.jf)%9,c=a>>c|(this.Y&this.ba?1:0)<<8-c|a<<9-c,Ad.call(this,c,256),c&=255);return c}
|
function Fd(a,b){var c=a;if(b){var d;(d=(b&this.jf)%9)?(d=a<<d|(this.Y&this.ba?1:0)<<d-1|a>>9-d,c=d&255):d=a|(this.Y&this.ba?1:0)<<8;Ad.call(this,d,256)}return c}function Gd(a,b){var c=a;if(b){var d;(d=(b&this.jf)%17)?(d=a<<d|(this.Y&this.ba?1:0)<<d-1|a>>17-d,c=d&65535):d=a|(this.Y&this.ba?1:0)<<16;Ad.call(this,d,65536)}return c}function Hd(a,b){var c=a;b&&(c=(b&this.jf)%9,c=a>>c|(this.Y&this.ba?1:0)<<8-c|a<<9-c,Ad.call(this,c,256),c&=255);return c}
|
||||||
function Id(a,b){var c=a;b&&(c=(b&this.jf)%17,c=a>>c|(this.Y&this.ba?1:0)<<16-c|a<<17-c,Ad.call(this,c,65536),c&=65535);return c}function Jd(a,b){var c=a;b&&(c=8<b?this.Y=this.ia=0:(this.Y=this.ia=a<<b)&255,this.ka=0,this.ba=256);return c}function Kd(a,b){var c=a;b&&(c=16<b?this.Y=this.ia=0:(this.Y=this.ia=a<<b)&65535,this.ka=0,this.ba=65536);return c}
|
function Id(a,b){var c=a;b&&(c=(b&this.jf)%17,c=a>>c|(this.Y&this.ba?1:0)<<16-c|a<<17-c,Ad.call(this,c,65536),c&=65535);return c}function Jd(a,b){var c=a;b&&(c=8<b?this.Y=this.ia=0:(this.Y=this.ia=a<<b)&255,this.ka=0,this.ba=256);return c}function Kd(a,b){var c=a;b&&(c=16<b?this.Y=this.ia=0:(this.Y=this.ia=a<<b)&65535,this.ka=0,this.ba=65536);return c}
|
||||||
function Ld(a,b){if(b){var c=8<b?0:a>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|256:this.Y&-257;this.ka=a^this.Y;this.ba=256;a=this.Y}return a&255}function Md(a,b){if(b){var c=16<b?0:a>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|65536:this.Y&-65537;this.ka=a^this.Y;this.ba=65536;a=this.Y}return a&65535}function Nd(a,b){if(b){8<b&&(b=9);var c=a<<24>>24>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|256:this.Y&-257;this.ka=a^this.Y;this.ba=256;a=this.Y}return a&255}
|
function Ld(a,b){if(b){var c=8<b?0:a>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|256:this.Y&-257;this.ka=a^this.Y;this.ba=256;a=this.Y}return a&255}function Md(a,b){if(b){var c=16<b?0:a>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|65536:this.Y&-65537;this.ka=a^this.Y;this.ba=65536;a=this.Y}return a&65535}function Nd(a,b){if(b){8<b&&(b=9);var c=a<<24>>24>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|256:this.Y&-257;this.ka=a^this.Y;this.ba=256;a=this.Y}return a&255}
|
||||||
function Od(a,b){if(b){16<b&&(b=17);var c=a<<16>>16>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|65536:this.Y&-65537;this.ka=a^this.Y;this.ba=65536;a=this.Y}return a&65535}function Pd(){this.A-=0>this.ga?2:this.vl;return 1}function Qd(){var a=this.I&this.jf;this.A-=(0>this.ga?this.Vi:this.Ui)+(a<<this.Wi);return a}function Rd(){var a=this.da();this.A-=(0>this.ga?this.Vi:this.Ui)+(a<<this.Wi);return a}function Vd(){return null}function Wd(a){Zb.call(this,13,0);return a}
|
function Od(a,b){if(b){16<b&&(b=17);var c=a<<16>>16>>b-1;this.Y=this.ia=c>>1;this.Y=c&1?this.Y|65536:this.Y&-65537;this.ka=a^this.Y;this.ba=65536;a=this.Y}return a&65535}function Pd(){this.A-=0>this.ga?2:this.xl;return 1}function Qd(){var a=this.I&this.jf;this.A-=(0>this.ga?this.Wi:this.Vi)+(a<<this.Xi);return a}function Rd(){var a=this.da();this.A-=(0>this.ga?this.Wi:this.Vi)+(a<<this.Xi);return a}function Vd(){return null}function Wd(a){Zb.call(this,13,0);return a}
|
||||||
function sc(a){H.call(this);return a}function N(a){O.call(this);return a}
|
function sc(a){H.call(this);return a}function N(a){O.call(this);return a}
|
||||||
var Xd=[kd,ld,md,nd,od,pd,qd,rd],Yd=[sd,td,ud,vd,wd,xd,yd,zd],Zd=[function(a,b){this.A-=0>this.Fa?this.bc:this.ol;return b},Wd,Wd,Wd,Wd,Wd,Wd,Wd],$d=[function(a,b){this.A-=0>this.Fa?this.gl:this.el;return b},N,N,N,N,N,N,N],ae=[Bd,Dd,Fd,Hd,Jd,Ld,N,Nd],be=[Cd,Ed,Gd,Id,Kd,Md,N,Od],de=[function(a,b){b=this.da();this.Y=this.ia=this.ka=a&b;this.ba=256;this.A-=0>this.ga?this.aj:this.$i;this.Z|=2;return a},N,function(a){this.A-=0>this.ga?this.ag:this.$f;return a^255},function(a,b){b=0;this.ka=a^b;this.ba=
|
var Xd=[kd,ld,md,nd,od,pd,qd,rd],Yd=[sd,td,ud,vd,wd,xd,yd,zd],Zd=[function(a,b){this.A-=0>this.Ga?this.ec:this.ql;return b},Wd,Wd,Wd,Wd,Wd,Wd,Wd],$d=[function(a,b){this.A-=0>this.Ga?this.il:this.gl;return b},N,N,N,N,N,N,N],ae=[Bd,Dd,Fd,Hd,Jd,Ld,N,Nd],be=[Cd,Ed,Gd,Id,Kd,Md,N,Od],de=[function(a,b){b=this.da();this.Y=this.ia=this.ka=a&b;this.ba=256;this.A-=0>this.ga?this.bj:this.aj;this.Z|=2;return a},N,function(a){this.A-=0>this.ga?this.ag:this.$f;return a^255},function(a,b){b=0;this.ka=a^b;this.ba=
|
||||||
256;this.A-=0>this.ga?this.ag:this.$f;return(this.Y=this.ia=b-a)&255},function(a){this.G=this.vb=(this.Y=(this.G&255)*a)&65535;this.ka=this.ia=this.Y;this.ba=256;this.G&65280?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.kl:this.jl;this.Z|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.vb=b&65535;this.Y=this.ka=this.ia=b;this.ba=256;127<b||-128>b?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.Qk:this.Pk;this.Z|=2;return a},function(a){if(!a)return ce.call(this),
|
256;this.A-=0>this.ga?this.ag:this.$f;return(this.Y=this.ia=b-a)&255},function(a){this.G=this.xb=(this.Y=(this.G&255)*a)&65535;this.ka=this.ia=this.Y;this.ba=256;this.G&65280?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.ml:this.ll;this.Z|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.xb=b&65535;this.Y=this.ka=this.ia=b;this.ba=256;127<b||-128>b?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.Sk:this.Rk;this.Z|=2;return a},function(a){if(!a)return ce.call(this),
|
||||||
a;var b=this.G/a;if(255<b)return ce.call(this),a;this.vb=this.G=b&255|(this.G%a&255)<<8;this.ia=this.ka=this.Y=b|256;this.ba=256;this.A-=0>this.ga?this.Ik:this.Hk;this.Z|=2;return a},function(a){if(!a)return ce.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return ce.call(this),a;this.vb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.ia=this.ka=this.Y=b|256;this.ba=256;this.A-=0>this.ga?this.Mk:this.Lk;this.Z|=2;return a}],ee=[function(a,b){b=this.K();this.Y=this.ia=
|
a;var b=this.G/a;if(255<b)return ce.call(this),a;this.xb=this.G=b&255|(this.G%a&255)<<8;this.ia=this.ka=this.Y=b|256;this.ba=256;this.A-=0>this.ga?this.Kk:this.Jk;this.Z|=2;return a},function(a){if(!a)return ce.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return ce.call(this),a;this.xb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.ia=this.ka=this.Y=b|256;this.ba=256;this.A-=0>this.ga?this.Ok:this.Nk;this.Z|=2;return a}],ee=[function(a,b){b=this.K();this.Y=this.ia=
|
||||||
this.ka=a&b;this.ba=65536;this.A-=0>this.ga?this.aj:this.$i;this.Z|=2;return a},N,function(a){this.A-=0>this.ga?this.ag:this.$f;return a^65535},function(a,b){b=0;this.ka=a^b;this.ba=65536;this.A-=0>this.ga?this.ag:this.$f;return(this.Y=this.ia=b-a)&65535},function(a){this.vb=this.G=(this.Y=this.G*a)&65535;this.gg=this.J=this.Y>>16&65535;this.ka=this.ia=this.Y;this.ba=65536;this.J?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.ml:this.ll;this.Z|=2;return a},function(a){var b=(this.G<<
|
this.ka=a&b;this.ba=65536;this.A-=0>this.ga?this.bj:this.aj;this.Z|=2;return a},N,function(a){this.A-=0>this.ga?this.ag:this.$f;return a^65535},function(a,b){b=0;this.ka=a^b;this.ba=65536;this.A-=0>this.ga?this.ag:this.$f;return(this.Y=this.ia=b-a)&65535},function(a){this.xb=this.G=(this.Y=this.G*a)&65535;this.gg=this.J=this.Y>>16&65535;this.ka=this.ia=this.Y;this.ba=65536;this.J?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.ol:this.nl;this.Z|=2;return a},function(a){var b=(this.G<<
|
||||||
16>>16)*(a<<16>>16);this.G=this.vb=b&65535;this.J=this.gg=b>>16&65535;this.Y=this.ka=this.ia=b;this.ba=65536;32767<b||-32768>b?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.Sk:this.Rk;this.Z|=2;return a},function(a,b){if(!a)return ce.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return ce.call(this),a;this.vb=this.G=c&65535;this.gg=this.J=b%a&65535;this.ia=this.ka=this.Y=c|65536;this.ba=65536;this.A-=0>this.ga?this.Kk:this.Jk;this.Z|=2;return a},function(a,
|
16>>16)*(a<<16>>16);this.G=this.xb=b&65535;this.J=this.gg=b>>16&65535;this.Y=this.ka=this.ia=b;this.ba=65536;32767<b||-32768>b?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?this.Uk:this.Tk;this.Z|=2;return a},function(a,b){if(!a)return ce.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return ce.call(this),a;this.xb=this.G=c&65535;this.gg=this.J=b%a&65535;this.ia=this.ka=this.Y=c|65536;this.ba=65536;this.A-=0>this.ga?this.Mk:this.Lk;this.Z|=2;return a},function(a,
|
||||||
b){if(!a)return ce.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 ce.call(this),a;this.vb=this.G=d&65535;this.gg=this.J=b%c&65535;this.ia=this.ka=this.Y=d|65536;this.ba=65536;this.A-=0>this.ga?this.Ok:this.Nk;this.Z|=2;return a}],rc=[function(a){this.ka=a;a=(this.ia=a+1)&255;this.Y=a|(this.Y&this.ba?1:0)<<8;this.ba=256;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){this.ka=a;a=(this.ia=a-1)&255;this.Y=a|(this.Y&this.ba?1:0)<<8;this.ba=
|
b){if(!a)return ce.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 ce.call(this),a;this.xb=this.G=d&65535;this.gg=this.J=b%c&65535;this.ia=this.ka=this.Y=d|65536;this.ba=65536;this.A-=0>this.ga?this.Qk:this.Pk;this.Z|=2;return a}],rc=[function(a){this.ka=a;a=(this.ia=a+1)&255;this.Y=a|(this.Y&this.ba?1:0)<<8;this.ba=256;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){this.ka=a;a=(this.ia=a-1)&255;this.Y=a|(this.Y&this.ba?1:0)<<8;this.ba=
|
||||||
256;this.A-=0>this.ga?this.Zf:this.Yf;return a},N,N,N,N,N,N],tc=[function(a){this.ka=a;a=(this.ia=a+1)&65535;this.Y=a|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){this.ka=a;a=(this.ia=a-1)&65535;this.Y=a|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){L(this,this.pa);J(this,a);this.A-=0>this.ga?this.Gk:this.Fk;this.Z|=2;return a},function(a){if(0>this.ga)return N.call(this,a);L(this,this.qa.na);L(this,
|
256;this.A-=0>this.ga?this.Zf:this.Yf;return a},N,N,N,N,N,N],tc=[function(a){this.ka=a;a=(this.ia=a+1)&65535;this.Y=a|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){this.ka=a;a=(this.ia=a-1)&65535;this.Y=a|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=0>this.ga?this.Zf:this.Yf;return a},function(a){L(this,this.pa);J(this,a);this.A-=0>this.ga?this.Ik:this.Hk;this.Z|=2;return a},function(a){if(0>this.ga)return N.call(this,a);L(this,this.qa.na);L(this,
|
||||||
this.pa);yc(this,a,this.Ga(this.ga+2));this.A-=this.Dk;this.Z|=2;return a},function(a){J(this,a);this.A-=0>this.ga?this.al:this.$k;this.Z|=2;return a},function(a){if(0>this.ga)return N.call(this,a);yc(this,a,this.Ga(this.ga+2));this.A-=this.Yk;this.Z|=2;return a},function(a){var b=a;this.Z&512&&(a=a-2&65535,80286>this.Ha&&(b=a));L(this,b);this.A-=0>this.ga?this.hc:this.ql;this.Z|=2;return a},Wd],fe=[Bd,Dd,Fd,Hd,Jd,Ld,N,Nd],ge=[Cd,Ed,Gd,Id,Kd,Md,N,Od];
|
this.pa);yc(this,a,this.Ha(this.ga+2));this.A-=this.Fk;this.Z|=2;return a},function(a){J(this,a);this.A-=0>this.ga?this.cl:this.bl;this.Z|=2;return a},function(a){if(0>this.ga)return N.call(this,a);yc(this,a,this.Ha(this.ga+2));this.A-=this.$k;this.Z|=2;return a},function(a){var b=a;this.Z&512&&(a=a-2&65535,80286>this.Ea&&(b=a));L(this,b);this.A-=0>this.ga?this.kc:this.sl;this.Z|=2;return a},Wd],fe=[Bd,Dd,Fd,Hd,Jd,Ld,N,Nd],ge=[Cd,Ed,Gd,Id,Kd,Md,N,Od];
|
||||||
function he(a,b){this.A-=0>this.Fa?0>this.ga?this.il:this.hl:this.fl;return b}function ie(){return he.call(this,0,this.vb)}function je(a,b){this.Y=this.ia=this.ka=a&b;this.ba=256;this.A-=0>this.Fa?0>this.ga?this.bj:this.cg:this.cg;this.Z|=2;return a}function ke(a,b){this.Y=this.ia=this.ka=a&b;this.ba=65536;this.A-=0>this.Fa?0>this.ga?this.bj:this.cg:this.cg;this.Z|=2;return a}
|
function he(a,b){this.A-=0>this.Ga?0>this.ga?this.kl:this.jl:this.hl;return b}function ie(){return he.call(this,0,this.xb)}function je(a,b){this.Y=this.ia=this.ka=a&b;this.ba=256;this.A-=0>this.Ga?0>this.ga?this.cj:this.cg:this.cg;this.Z|=2;return a}function ke(a,b){this.Y=this.ia=this.ka=a&b;this.ba=65536;this.A-=0>this.Ga?0>this.ga?this.cj:this.cg:this.cg;this.Z|=2;return a}
|
||||||
function le(a,b){var c=(b<<16>>16)*(this.da()<<24>>24);this.Y=this.ka=this.ia=c;this.ba=256;32767<c||-32768>c?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?21:24;return c&65535}function me(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.Y=this.ka=this.ia=c;this.ba=65536;32767<c||-32768>c?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?21:24;return c&65535}function ne(a){return a}function oe(a){if(0>this.ga)return O.call(this),a;this.A-=this.bl;return this.ga}
|
function le(a,b){var c=(b<<16>>16)*(this.da()<<24>>24);this.Y=this.ka=this.ia=c;this.ba=256;32767<c||-32768>c?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?21:24;return c&65535}function me(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.Y=this.ka=this.ia=c;this.ba=65536;32767<c||-32768>c?(bd(this),fd(this)):(Xc(this),ad(this));this.A-=0>this.ga?21:24;return c&65535}function ne(a){return a}function oe(a){if(0>this.ga)return O.call(this),a;this.A-=this.dl;return this.ga}
|
||||||
function pe(a,b){if(0>this.ga)return O.call(this),a;Lc(this,this.Ga(this.ga+2));this.A-=this.Di;return b}function qe(a,b){if(0>this.ga)return O.call(this),a;Qc(this,this.Ga(this.ga+2));this.A-=this.Di;return b}function re(a){if(0>this.ga)return H.call(this),a;var b=a<<16>>16,c=this.Ga(this.ga)<<16>>16,d=this.Ga(this.ga+2)<<16>>16;this.A-=this.zk;if(b<c||b>d)J(this,this.jh-this.qa.Ia),hd.call(this,5,null,0);this.Z|=2;return a}
|
function pe(a,b){if(0>this.ga)return O.call(this),a;Oc(this,this.Ha(this.ga+2));this.A-=this.Ei;return b}function qe(a,b){if(0>this.ga)return O.call(this),a;Qc(this,this.Ha(this.ga+2));this.A-=this.Ei;return b}function re(a){if(0>this.ga)return H.call(this),a;var b=a<<16>>16,c=this.Ha(this.ga)<<16>>16,d=this.Ha(this.ga+2)<<16>>16;this.A-=this.Bk;if(b<c||b>d)J(this,this.kh-this.qa.Ia),hd.call(this,5,null,0);this.Z|=2;return a}
|
||||||
function se(a,b){this.A-=10+(0>this.ga?0:1);if((a&3)<(b&3))return a=a&-4|b&3,dd(this),a;Zc(this);return a}function te(a,b){this.A-=14+(0>this.ga?0:2);if(0<=this.Ib.load(b,!0)&&this.Ib.Bc>=(this.qa.na&3)&&this.Ib.Bc>=(b&3))return dd(this),this.Ib.Sa&65280;Zc(this);return a}function ue(a,b){this.A-=14+(0>this.ga?0:2);if(b&65528&&0<=this.Ib.load(b,!0)&&(3072==(this.Ib.Sa&3072)||this.Ib.Bc>=(this.qa.na&3))&&this.Ib.Bc>=(b&3))return dd(this),this.Ib.Cc;Zc(this);return a}
|
function se(a,b){this.A-=10+(0>this.ga?0:1);if((a&3)<(b&3))return a=a&-4|b&3,dd(this),a;Zc(this);return a}function te(a,b){this.A-=14+(0>this.ga?0:2);if(0<=this.Mb.load(b,!0)&&this.Mb.Dc>=(this.qa.na&3)&&this.Mb.Dc>=(b&3))return dd(this),this.Mb.Ua&65280;Zc(this);return a}function ue(a,b){this.A-=14+(0>this.ga?0:2);if(b&65528&&0<=this.Mb.load(b,!0)&&(3072==(this.Mb.Ua&3072)||this.Mb.Dc>=(this.qa.na&3))&&this.Mb.Dc>=(b&3))return dd(this),this.Mb.Ec;Zc(this);return a}
|
||||||
function ve(a,b){if(0>this.ga){switch(this.Bg&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.dj}else this.Fa=this.ga,this.Q(a),this.A-=this.cj;return b}
|
function ve(a,b){if(0>this.ga){switch(this.Bg&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.ej}else this.Ga=this.ga,this.Q(a),this.A-=this.dj;return b}
|
||||||
function we(a,b){if(0>this.ga){switch(this.Bg&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.dj}else this.Fa=this.ga,this.R(a),this.A-=this.cj;return b}function hd(a,b,c){Jc(this,a)&&(L(this,Bc(this)),this.wa&=this.yc.Zg,L(this,this.qa.na),L(this,this.pa),null!=b&&L(this,b),yc(this,this.yc.hj,this.yc.na),this.A-=this.Uk+c)}
|
function we(a,b){if(0>this.ga){switch(this.Bg&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.ej}else this.Ga=this.ga,this.R(a),this.A-=this.dj;return b}function hd(a,b,c){Jc(this,a)&&(L(this,Bc(this)),this.wa&=this.Ac.Zg,L(this,this.qa.na),L(this,this.pa),null!=b&&L(this,b),yc(this,this.Ac.ij,this.Ac.na),this.A-=this.Wk+c)}
|
||||||
function ce(){J(this,this.jh-this.qa.Ia);hd.call(this,0,null,2)}function Zb(a,b){this.aa&&this.aa.message("Fault 0x"+p(a)+(null!=b?" (0x"+q(b)+")":"")+" on opcode 0x"+p(cb(this.la,this.Aa))+" at "+ca(this.pa,this.qa.na));80186<=this.Ha&&(J(this,this.jh-this.qa.Ia),hd.call(this,a,b,0))}function H(){Zb.call(this,6);this.sb()}function O(){J(this,this.jh-this.qa.Ia);Ta(this,"Undefined opcode 0x"+p(cb(this.la,this.Aa))+" at "+ca(this.pa,this.qa.na));this.sb()}
|
function ce(){J(this,this.kh-this.qa.Ia);hd.call(this,0,null,2)}function Zb(a,b){this.aa&&this.aa.message("Fault 0x"+p(a)+(null!=b?" (0x"+q(b)+")":"")+" on opcode 0x"+p(cb(this.la,this.Aa))+" at "+ca(this.pa,this.qa.na));80186<=this.Ea&&(J(this,this.kh-this.qa.Ia),hd.call(this,a,b,0))}function H(){Zb.call(this,6);this.ub()}function O(){J(this,this.kh-this.qa.Ia);Ta(this,"Undefined opcode 0x"+p(cb(this.la,this.Aa))+" at "+ca(this.pa,this.qa.na));this.ub()}
|
||||||
function xe(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a}function ye(a){a=a.call(this,this.G&255,this.I&255);this.G=this.G&-256|a}function ze(a){a=a.call(this,this.G&255,this.J&255);this.G=this.G&-256|a}function Ae(a){a=a.call(this,this.G&255,this.B&255);this.G=this.G&-256|a}function Be(a){a=a.call(this,this.G&255,this.G>>8);this.G=this.G&-256|a}function Ce(a){a=a.call(this,this.G&255,this.I>>8);this.G=this.G&-256|a}
|
function xe(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a}function ye(a){a=a.call(this,this.G&255,this.I&255);this.G=this.G&-256|a}function ze(a){a=a.call(this,this.G&255,this.J&255);this.G=this.G&-256|a}function Ae(a){a=a.call(this,this.G&255,this.B&255);this.G=this.G&-256|a}function Be(a){a=a.call(this,this.G&255,this.G>>8);this.G=this.G&-256|a}function Ce(a){a=a.call(this,this.G&255,this.I>>8);this.G=this.G&-256|a}
|
||||||
function De(a){a=a.call(this,this.G&255,this.J>>8);this.G=this.G&-256|a}function Ee(a){a=a.call(this,this.G&255,this.B>>8);this.G=this.G&-256|a}function Fe(a){a=a.call(this,this.I&255,this.G&255);this.I=this.I&-256|a}function Ge(a){a=a.call(this,this.I&255,this.I&255);this.I=this.I&-256|a}function He(a){a=a.call(this,this.I&255,this.J&255);this.I=this.I&-256|a}function Ie(a){a=a.call(this,this.I&255,this.B&255);this.I=this.I&-256|a}
|
function De(a){a=a.call(this,this.G&255,this.J>>8);this.G=this.G&-256|a}function Ee(a){a=a.call(this,this.G&255,this.B>>8);this.G=this.G&-256|a}function Fe(a){a=a.call(this,this.I&255,this.G&255);this.I=this.I&-256|a}function Ge(a){a=a.call(this,this.I&255,this.I&255);this.I=this.I&-256|a}function He(a){a=a.call(this,this.I&255,this.J&255);this.I=this.I&-256|a}function Ie(a){a=a.call(this,this.I&255,this.B&255);this.I=this.I&-256|a}
|
||||||
function Je(a){a=a.call(this,this.I&255,this.G>>8);this.I=this.I&-256|a}function Ke(a){a=a.call(this,this.I&255,this.I>>8);this.I=this.I&-256|a}function Le(a){a=a.call(this,this.I&255,this.J>>8);this.I=this.I&-256|a}function Me(a){a=a.call(this,this.I&255,this.B>>8);this.I=this.I&-256|a}function Ne(a){a=a.call(this,this.J&255,this.G&255);this.J=this.J&-256|a}function Oe(a){a=a.call(this,this.J&255,this.I&255);this.J=this.J&-256|a}
|
function Je(a){a=a.call(this,this.I&255,this.G>>8);this.I=this.I&-256|a}function Ke(a){a=a.call(this,this.I&255,this.I>>8);this.I=this.I&-256|a}function Le(a){a=a.call(this,this.I&255,this.J>>8);this.I=this.I&-256|a}function Me(a){a=a.call(this,this.I&255,this.B>>8);this.I=this.I&-256|a}function Ne(a){a=a.call(this,this.J&255,this.G&255);this.J=this.J&-256|a}function Oe(a){a=a.call(this,this.J&255,this.I&255);this.J=this.J&-256|a}
|
||||||
|
|
@ -370,265 +370,263 @@ 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.Z|=512;this.X=a[6].call(this,this.X,b.call(this))},function(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.Z|=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))},
|
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))}],$g=[function(){var a=this.da();16>(a&56)&&(this.Z|=1);Yg[a].call(this,Fc,Vd)},function(){var a=this.da();a&16||(this.Z|=1);Yg[a].call(this,Zg,Vd)},function(){P[this.da()].call(this,te)},function(){P[this.da()].call(this,ue)},O,O,O,O,O,O,O,H,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,
|
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))}],$g=[function(){var a=this.da();16>(a&56)&&(this.Z|=1);Yg[a].call(this,Fc,Vd)},function(){var a=this.da();a&16||(this.Z|=1);Yg[a].call(this,Zg,Vd)},function(){P[this.da()].call(this,te)},function(){P[this.da()].call(this,ue)},O,O,O,O,O,O,O,H,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,
|
||||||
O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O],Gc=[function(){this.A-=2+(0>this.ga?0:1);return this.Fd.na},function(){this.A-=2+(0>this.ga?0:1);return this.mg.na},function(a){this.Z|=2;this.Fd.load(a);this.A-=
|
O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O],Gc=[function(){this.A-=2+(0>this.ga?0:1);return this.Id.na},function(){this.A-=2+(0>this.ga?0:1);return this.mg.na},function(a){this.Z|=2;this.Id.load(a);this.A-=
|
||||||
17+(0>this.ga?0:2);return a},function(a){this.Z|=2;this.mg.load(a);this.A-=17+(0>this.ga?0:2);return a},function(a){this.Z|=2;this.A-=14+(0>this.ga?0:2);if(0<=this.Ib.load(a,!0)&&2048!=(this.Ib.Sa&2560)&&(3072==(this.Ib.Sa&3072)||this.Ib.Bc>=(this.qa.na&3)&&this.Ib.Bc>=(a&3)))return dd(this),a;Zc(this);return a},function(a){this.Z|=2;this.A-=14+(0>this.ga?0:2);if(0<=this.Ib.load(a,!0)&&512==(this.Ib.Sa&2560)&&this.Ib.Bc>=(this.qa.na&3)&&this.Ib.Bc>=(a&3))return dd(this),a;Zc(this);return a},N,N],
|
17+(0>this.ga?0:2);return a},function(a){this.Z|=2;this.mg.load(a);this.A-=17+(0>this.ga?0:2);return a},function(a){this.Z|=2;this.A-=14+(0>this.ga?0:2);if(0<=this.Mb.load(a,!0)&&2048!=(this.Mb.Ua&2560)&&(3072==(this.Mb.Ua&3072)||this.Mb.Dc>=(this.qa.na&3)&&this.Mb.Dc>=(a&3)))return dd(this),a;Zc(this);return a},function(a){this.Z|=2;this.A-=14+(0>this.ga?0:2);if(0<=this.Mb.load(a,!0)&&512==(this.Mb.Ua&2560)&&this.Mb.Dc>=(this.qa.na&3)&&this.Mb.Dc>=(a&3))return dd(this),a;Zc(this);return a},N,N],
|
||||||
Hc=[sc,sc,sc,sc,sc,sc,N,N],Fc=Hc,Zg=[function(a){0>this.ga?H.call(this):(this.Hd(this.ga+2,this.Gc),this.Tc(this.ga+4,this.Gc>>16),a=this.Re-this.Gc,this.A-=11);return a},function(a){0>this.ga?H.call(this):(this.Hd(this.ga+2,this.Wc),this.Tc(this.ga+4,this.Wc>>16),a=this.ne-this.Wc,this.A-=12);return a},function(a){0>this.ga?H.call(this):(this.Gc=this.Ga(this.ga+2)|this.nb(this.ga+4)<<16,this.Re=this.Gc+a,this.Z|=2,this.A-=11);return a},function(a){0>this.ga?H.call(this):(this.Wc=this.Ga(this.ga+
|
Hc=[sc,sc,sc,sc,sc,sc,N,N],Fc=Hc,Zg=[function(a){0>this.ga?H.call(this):(this.Kd(this.ga+2,this.Jc),this.Wc(this.ga+4,this.Jc>>16),a=this.Re-this.Jc,this.A-=11);return a},function(a){0>this.ga?H.call(this):(this.Kd(this.ga+2,this.Zc),this.Wc(this.ga+4,this.Zc>>16),a=this.ne-this.Zc,this.A-=12);return a},function(a){0>this.ga?H.call(this):(this.Jc=this.Ha(this.ga+2)|this.ob(this.ga+4)<<16,this.Re=this.Jc+a,this.Z|=2,this.A-=11);return a},function(a){0>this.ga?H.call(this):(this.Zc=this.Ha(this.ga+
|
||||||
2)|this.nb(this.ga+4)<<16,this.ne=this.Wc+a,this.Z|=2,this.A-=12);return a},function(){this.A-=2+(0>this.ga?0:1);return this.Sc},N,function(a){this.Sc=this.Sc&65520|a&-65521;this.A-=3+(0>this.ga?0:3);this.Sc&1&&Ac(this,!0);this.Z|=2;return a},N];function uc(){$g[this.da()].call(this)}function wc(){L(this,this.X);this.A-=this.hc}function bc(){var a=this.X;L(this,this.G);L(this,this.I);L(this,this.J);L(this,this.B);L(this,a);L(this,this.H);L(this,this.F);L(this,this.D);this.A-=this.pl}
|
2)|this.ob(this.ga+4)<<16,this.ne=this.Zc+a,this.Z|=2,this.A-=12);return a},function(){this.A-=2+(0>this.ga?0:1);return this.Vc},N,function(a){this.Vc=this.Vc&65520|a&-65521;this.A-=3+(0>this.ga?0:3);this.Vc&1&&Ac(this,!0);this.Z|=2;return a},N];function uc(){$g[this.da()].call(this)}function wc(){L(this,this.X);this.A-=this.kc}function bc(){var a=this.X;L(this,this.G);L(this,this.I);L(this,this.J);L(this,this.B);L(this,a);L(this,this.H);L(this,this.F);L(this,this.D);this.A-=this.rl}
|
||||||
function cc(){this.D=this.Ea();this.F=this.Ea();this.H=this.Ea();this.X+=2;this.B=this.Ea();this.J=this.Ea();this.I=this.Ea();this.G=this.Ea();this.A-=this.nl}function dc(){P[this.da()].call(this,re)}function vc(){Vg[this.da()].call(this,se)}function ec(){L(this,this.K());this.A-=this.hc}function fc(){P[this.da()].call(this,me)}function gc(){L(this,this.da());this.A-=this.hc}function hc(){P[this.da()].call(this,le)}
|
function cc(){this.D=this.Fa();this.F=this.Fa();this.H=this.Fa();this.X+=2;this.B=this.Fa();this.J=this.Fa();this.I=this.Fa();this.G=this.Fa();this.A-=this.pl}function dc(){P[this.da()].call(this,re)}function vc(){Vg[this.da()].call(this,se)}function ec(){L(this,this.K());this.A-=this.kc}function fc(){P[this.da()].call(this,me)}function gc(){L(this,this.da());this.A-=this.kc}function hc(){P[this.da()].call(this,le)}
|
||||||
function ic(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=jb(this.la,this.J,this.Aa-b-1);this.Tc(this.Ua.Sb(this.D,0),d);this.D=this.D+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}}
|
function ic(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=jb(this.la,this.J,this.Aa-b-1);this.Wc(this.Wa.Vb(this.D,0),d);this.D=this.D+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}}
|
||||||
function jc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.Aa-b-1,d=jb(this.la,this.J,d)|jb(this.la,this.J+1&65535,d)<<8;this.Hd(this.Ua.Sb(this.D,1),d);this.D=this.D+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}}
|
function jc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.Aa-b-1,d=jb(this.la,this.J,d)|jb(this.la,this.J+1&65535,d)<<8;this.Kd(this.Wa.Vb(this.D,1),d);this.D=this.D+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}}
|
||||||
function kc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.nb(this.Hb.Kc(this.F,0));this.F=this.F+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;mb(this.la,this.J,d,this.Aa-b-1);a&&(K(this,-2),this.Z|=256)}}
|
function kc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.ob(this.Lb.Nc(this.F,0));this.F=this.F+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;mb(this.la,this.J,d,this.Aa-b-1);a&&(K(this,-2),this.Z|=256)}}
|
||||||
function lc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.Ga(this.Hb.Kc(this.F,1));this.F=this.F+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Aa-b-1;mb(this.la,this.J,d&255,b);mb(this.la,this.J+1&65535,d>>8,b);a&&(K(this,-2),this.Z|=256)}}function ah(){var a=this.L();Wc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function bh(){var a=this.L();Wc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}
|
function lc(){var a=1,b=0,c=5;this.va&192&&(a=this.I,b=1,this.va&256&&(c=4));if(a--){var d=this.Ha(this.Lb.Nc(this.F,1));this.F=this.F+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Aa-b-1;mb(this.la,this.J,d&255,b);mb(this.la,this.J+1&65535,d>>8,b);a&&(K(this,-2),this.Z|=256)}}function ah(){var a=this.L();Wc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function bh(){var a=this.L();Wc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}
|
||||||
function ch(){var a=this.L();Rc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function dh(){var a=this.L();Rc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}function eh(){var a=this.L();Uc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function fh(){var a=this.L();Uc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}function gh(){var a=this.L();Rc(this)||Uc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}
|
function ch(){var a=this.L();Rc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function dh(){var a=this.L();Rc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}function eh(){var a=this.L();Uc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function fh(){var a=this.L();Uc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}function gh(){var a=this.L();Rc(this)||Uc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}
|
||||||
function hh(){var a=this.L();Rc(this)||Uc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}function ih(){var a=this.L();Vc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function jh(){var a=this.L();Vc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}function kh(){var a=this.L();Sc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function lh(){var a=this.L();Sc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}
|
function hh(){var a=this.L();Rc(this)||Uc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}function ih(){var a=this.L();Vc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function jh(){var a=this.L();Vc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}function kh(){var a=this.L();Sc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function lh(){var a=this.L();Sc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}
|
||||||
function mh(){var a=this.L();!Vc(this)!=!Wc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function nh(){var a=this.L();!Vc(this)==!Wc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function oh(){var a=this.L();Uc(this)||!Vc(this)!=!Wc(this)?(J(this,this.pa+a),this.A-=this.Pb):this.A-=this.Qb}function ph(){var a=this.L();Uc(this)||!Vc(this)!=!Wc(this)?this.A-=this.Qb:(J(this,this.pa+a),this.A-=this.Pb)}
|
function mh(){var a=this.L();!Vc(this)!=!Wc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function nh(){var a=this.L();!Vc(this)==!Wc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function oh(){var a=this.L();Uc(this)||!Vc(this)!=!Wc(this)?(J(this,this.pa+a),this.A-=this.Sb):this.A-=this.Tb}function ph(){var a=this.L();Uc(this)||!Vc(this)!=!Wc(this)?this.A-=this.Tb:(J(this,this.pa+a),this.A-=this.Sb)}
|
||||||
function qh(){Xg[this.da()].call(this,Xd,this.da);this.A-=0>this.Fa?1:this.gh}function mc(){Xg[this.da()].call(this,fe,Rd)}function nc(){Yg[this.da()].call(this,ge,Rd)}function rh(){var a=this.K();J(this,this.Ea());this.X=this.X+a&65535;this.A-=this.ul}function sh(){J(this,this.Ea());this.A-=this.rl}
|
function qh(){Xg[this.da()].call(this,Xd,this.da);this.A-=0>this.Ga?1:this.hh}function mc(){Xg[this.da()].call(this,fe,Rd)}function nc(){Yg[this.da()].call(this,ge,Rd)}function rh(){var a=this.K();J(this,this.Fa());this.X=this.X+a&65535;this.A-=this.wl}function sh(){J(this,this.Fa());this.A-=this.tl}
|
||||||
function oc(){var a=this.K(),b=this.da()&31;this.A-=11;L(this,this.H);var c=this.X;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.H=this.H-2&65535,L(this,this.Ga(this.wb.Kc(this.H,1)));L(this,c)}this.H=c;this.X=this.X-a&65535}function pc(){this.X=this.H;this.H=this.Ea();this.A-=5}function th(){var a=this.K();yc(this,this.Ea(),this.Ea());this.X=this.X+a&65535;this.Hg&&Ec(this,this.Aa);this.A-=this.tl}function uh(){yc(this,this.Ea(),this.Ea());this.A-=this.sl}
|
function oc(){var a=this.K(),b=this.da()&31;this.A-=11;L(this,this.H);var c=this.X;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.H=this.H-2&65535,L(this,this.Ha(this.yb.Nc(this.H,1)));L(this,c)}this.H=c;this.X=this.X-a&65535}function pc(){this.X=this.H;this.H=this.Fa();this.A-=5}function th(){var a=this.K();yc(this,this.Fa(),this.Fa());this.X=this.X+a&65535;this.Hg&&Ec(this,this.Aa);this.A-=this.vl}function uh(){yc(this,this.Fa(),this.Fa());this.A-=this.ul}
|
||||||
function vh(){P[this.da()].call(this,ne);this.A-=8}function wh(){this.Z|=36;this.A-=this.Gb}function qc(){O.call(this)}
|
function vh(){P[this.da()].call(this,ne);this.A-=8}function wh(){this.Z|=36;this.A-=this.Kb}function qc(){O.call(this)}
|
||||||
var ac=[function(){var a=this.da();Ug[a].call(this,kd)},function(){Vg[this.da()].call(this,sd)},function(){Wg[this.da()].call(this,kd)},function(){P[this.da()].call(this,sd)},function(){this.G=this.G&-256|kd.call(this,this.G&255,this.da());this.A--},function(){this.G=sd.call(this,this.G,this.K());this.A--},function(){L(this,this.Ua.na);this.A-=this.bg},function(){Qc(this,this.Ea());this.A-=this.bc},function(){Ug[this.da()].call(this,ld)},function(){Vg[this.da()].call(this,td)},function(){Wg[this.da()].call(this,
|
var ac=[function(){var a=this.da();Ug[a].call(this,kd)},function(){Vg[this.da()].call(this,sd)},function(){Wg[this.da()].call(this,kd)},function(){P[this.da()].call(this,sd)},function(){this.G=this.G&-256|kd.call(this,this.G&255,this.da());this.A--},function(){this.G=sd.call(this,this.G,this.K());this.A--},function(){L(this,this.Wa.na);this.A-=this.bg},function(){Qc(this,this.Fa());this.A-=this.ec},function(){Ug[this.da()].call(this,ld)},function(){Vg[this.da()].call(this,td)},function(){Wg[this.da()].call(this,
|
||||||
ld)},function(){P[this.da()].call(this,td)},function(){this.G=this.G&-256|ld.call(this,this.G&255,this.da());this.A--},function(){this.G=td.call(this,this.G,this.K());this.A--},function(){L(this,this.qa.na);this.A-=this.bg},function(){Kc(this,this.Ea());this.A-=this.bc},function(){Ug[this.da()].call(this,md)},function(){Vg[this.da()].call(this,ud)},function(){Wg[this.da()].call(this,md)},function(){P[this.da()].call(this,ud)},function(){this.G=this.G&-256|md.call(this,this.G&255,this.da());this.A--},
|
ld)},function(){P[this.da()].call(this,td)},function(){this.G=this.G&-256|ld.call(this,this.G&255,this.da());this.A--},function(){this.G=td.call(this,this.G,this.K());this.A--},function(){L(this,this.qa.na);this.A-=this.bg},function(){Kc(this,this.Fa());this.A-=this.ec},function(){Ug[this.da()].call(this,md)},function(){Vg[this.da()].call(this,ud)},function(){Wg[this.da()].call(this,md)},function(){P[this.da()].call(this,ud)},function(){this.G=this.G&-256|md.call(this,this.G&255,this.da());this.A--},
|
||||||
function(){this.G=ud.call(this,this.G,this.K());this.A--},function(){L(this,this.wb.na);this.A-=this.bg},function(){Pc(this,this.Ea());this.A-=this.bc},function(){Ug[this.da()].call(this,nd)},function(){Vg[this.da()].call(this,vd)},function(){Wg[this.da()].call(this,nd)},function(){P[this.da()].call(this,vd)},function(){this.G=this.G&-256|nd.call(this,this.G&255,this.da());this.A--},function(){this.G=vd.call(this,this.G,this.K());this.A--},function(){L(this,this.Hb.na);this.A-=this.bg},function(){Lc(this,
|
function(){this.G=ud.call(this,this.G,this.K());this.A--},function(){L(this,this.yb.na);this.A-=this.bg},function(){Pc(this,this.Fa());this.A-=this.ec},function(){Ug[this.da()].call(this,nd)},function(){Vg[this.da()].call(this,vd)},function(){Wg[this.da()].call(this,nd)},function(){P[this.da()].call(this,vd)},function(){this.G=this.G&-256|nd.call(this,this.G&255,this.da());this.A--},function(){this.G=vd.call(this,this.G,this.K());this.A--},function(){L(this,this.Lb.na);this.A-=this.bg},function(){Oc(this,
|
||||||
this.Ea());this.A-=this.bc},function(){Ug[this.da()].call(this,od)},function(){Vg[this.da()].call(this,wd)},function(){Wg[this.da()].call(this,od)},function(){P[this.da()].call(this,wd)},function(){this.G=this.G&-256|od.call(this,this.G&255,this.da());this.A--},function(){this.G=wd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.Ua;this.A-=this.Gb},function(){var a=this.G&255,b=Tc(this),c=this.Y&this.ba;if(9<(a&15)||b)a+=6,b=!0;if(159<a||c)a+=96,c=!0;this.G=this.G&-256|
|
this.Fa());this.A-=this.ec},function(){Ug[this.da()].call(this,od)},function(){Vg[this.da()].call(this,wd)},function(){Wg[this.da()].call(this,od)},function(){P[this.da()].call(this,wd)},function(){this.G=this.G&-256|od.call(this,this.G&255,this.da());this.A--},function(){this.G=wd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.Wa;this.A-=this.Kb},function(){var a=this.G&255,b=Tc(this),c=this.Y&this.ba;if(9<(a&15)||b)a+=6,b=!0;if(159<a||c)a+=96,c=!0;this.G=this.G&-256|
|
||||||
(this.Y=this.ia=a&255);this.ba=65536;c&&(this.Y|=this.ba);b?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,pd)},function(){Vg[this.da()].call(this,xd)},function(){Wg[this.da()].call(this,pd)},function(){P[this.da()].call(this,xd)},function(){this.G=this.G&-256|pd.call(this,this.G&255,this.da());this.A--},function(){this.G=xd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.qa;this.A-=this.Gb},function(){var a=this.G&255,b=Tc(this),c=this.Y&this.ba;
|
(this.Y=this.ia=a&255);this.ba=65536;c&&(this.Y|=this.ba);b?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,pd)},function(){Vg[this.da()].call(this,xd)},function(){Wg[this.da()].call(this,pd)},function(){P[this.da()].call(this,xd)},function(){this.G=this.G&-256|pd.call(this,this.G&255,this.da());this.A--},function(){this.G=xd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.qa;this.A-=this.Kb},function(){var a=this.G&255,b=Tc(this),c=this.Y&this.ba;
|
||||||
if(9<(a&15)||b)a-=6,b=!0;if(159<a||c)a-=96,c=!0;this.G=this.G&-256|(this.Y=this.ia=a&255);this.ba=65536;c&&(this.Y|=this.ba);b?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,qd)},function(){Vg[this.da()].call(this,yd)},function(){Wg[this.da()].call(this,qd)},function(){P[this.da()].call(this,yd)},function(){this.G=this.G&-256|qd.call(this,this.G&255,this.da());this.A--},function(){this.G=yd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.wb;this.A-=
|
if(9<(a&15)||b)a-=6,b=!0;if(159<a||c)a-=96,c=!0;this.G=this.G&-256|(this.Y=this.ia=a&255);this.ba=65536;c&&(this.Y|=this.ba);b?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,qd)},function(){Vg[this.da()].call(this,yd)},function(){Wg[this.da()].call(this,qd)},function(){P[this.da()].call(this,yd)},function(){this.G=this.G&-256|qd.call(this,this.G&255,this.da());this.A--},function(){this.G=yd.call(this,this.G,this.K());this.A--},function(){this.Z|=20;this.C=this.M=this.yb;this.A-=
|
||||||
this.Gb},function(){var a=this.G&255,b=this.G>>8,c,d=Tc(this);9<(a&15)||d?(a=a+6&15,b=b+1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Y=a);this.ba=65536;c&&(this.Y|=this.ba);d?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,rd)},function(){Vg[this.da()].call(this,zd)},function(){Wg[this.da()].call(this,rd)},function(){P[this.da()].call(this,zd)},function(){this.G=this.G&-256|rd.call(this,this.G&255,this.da());this.A--},function(){this.G=zd.call(this,this.G,this.K());this.A--},function(){this.Z|=
|
this.Kb},function(){var a=this.G&255,b=this.G>>8,c,d=Tc(this);9<(a&15)||d?(a=a+6&15,b=b+1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Y=a);this.ba=65536;c&&(this.Y|=this.ba);d?cd(this):Yc(this);this.A-=this.Be},function(){Ug[this.da()].call(this,rd)},function(){Vg[this.da()].call(this,zd)},function(){Wg[this.da()].call(this,rd)},function(){P[this.da()].call(this,zd)},function(){this.G=this.G&-256|rd.call(this,this.G&255,this.da());this.A--},function(){this.G=zd.call(this,this.G,this.K());this.A--},function(){this.Z|=
|
||||||
20;this.C=this.M=this.Hb;this.A-=this.Gb},function(){var a=this.G&255,b=this.G>>8,c,d=Tc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Y=a);this.ba=65536;c&&(this.Y|=this.ba);d?cd(this):Yc(this);this.A-=this.Be},function(){this.ka=this.G;this.G=(this.ia=this.G+1)&65535;this.Y=this.G|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.I;this.I=(this.ia=this.I+1)&65535;this.Y=this.I|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.J;
|
20;this.C=this.M=this.Lb;this.A-=this.Kb},function(){var a=this.G&255,b=this.G>>8,c,d=Tc(this);9<(a&15)||d?(a=a-6&15,b=b-1&255,c=d=!0):c=d=!1;this.G=b<<8|(this.Y=a);this.ba=65536;c&&(this.Y|=this.ba);d?cd(this):Yc(this);this.A-=this.Be},function(){this.ka=this.G;this.G=(this.ia=this.G+1)&65535;this.Y=this.G|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.I;this.I=(this.ia=this.I+1)&65535;this.Y=this.I|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.J;
|
||||||
this.J=(this.ia=this.J+1)&65535;this.Y=this.J|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.B;this.B=(this.ia=this.B+1)&65535;this.Y=this.B|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.X;this.X=(this.ia=this.X+1)&65535;this.Y=this.X|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.H;this.H=(this.ia=this.H+1)&65535;this.Y=this.H|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.F;this.F=(this.ia=
|
this.J=(this.ia=this.J+1)&65535;this.Y=this.J|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.B;this.B=(this.ia=this.B+1)&65535;this.Y=this.B|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.X;this.X=(this.ia=this.X+1)&65535;this.Y=this.X|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.H;this.H=(this.ia=this.H+1)&65535;this.Y=this.H|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.F;this.F=(this.ia=
|
||||||
this.F+1)&65535;this.Y=this.F|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.D;this.D=(this.ia=this.D+1)&65535;this.Y=this.D|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.G;this.G=(this.ia=this.G-1)&65535;this.Y=this.G|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.I;this.I=(this.ia=this.I-1)&65535;this.Y=this.I|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.J;this.J=(this.ia=this.J-1)&65535;
|
this.F+1)&65535;this.Y=this.F|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.D;this.D=(this.ia=this.D+1)&65535;this.Y=this.D|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.G;this.G=(this.ia=this.G-1)&65535;this.Y=this.G|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.I;this.I=(this.ia=this.I-1)&65535;this.Y=this.I|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.J;this.J=(this.ia=this.J-1)&65535;
|
||||||
this.Y=this.J|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.B;this.B=(this.ia=this.B-1)&65535;this.Y=this.B|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.X;this.X=(this.ia=this.X-1)&65535;this.Y=this.X|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.H;this.H=(this.ia=this.H-1)&65535;this.Y=this.H|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.F;this.F=(this.ia=this.F-1)&65535;this.Y=this.F|
|
this.Y=this.J|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.B;this.B=(this.ia=this.B-1)&65535;this.Y=this.B|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.X;this.X=(this.ia=this.X-1)&65535;this.Y=this.X|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.H;this.H=(this.ia=this.H-1)&65535;this.Y=this.H|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.F;this.F=(this.ia=this.F-1)&65535;this.Y=this.F|
|
||||||
(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.D;this.D=(this.ia=this.D-1)&65535;this.Y=this.D|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){L(this,this.G);this.A-=this.hc},function(){L(this,this.I);this.A-=this.hc},function(){L(this,this.J);this.A-=this.hc},function(){L(this,this.B);this.A-=this.hc},function(){L(this,this.X-2&65535);this.A-=this.hc},function(){L(this,this.H);this.A-=this.hc},function(){L(this,this.F);this.A-=this.hc},function(){L(this,this.D);
|
(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){this.ka=this.D;this.D=(this.ia=this.D-1)&65535;this.Y=this.D|(this.Y&this.ba?1:0)<<16;this.ba=65536;this.A-=2},function(){L(this,this.G);this.A-=this.kc},function(){L(this,this.I);this.A-=this.kc},function(){L(this,this.J);this.A-=this.kc},function(){L(this,this.B);this.A-=this.kc},function(){L(this,this.X-2&65535);this.A-=this.kc},function(){L(this,this.H);this.A-=this.kc},function(){L(this,this.F);this.A-=this.kc},function(){L(this,this.D);
|
||||||
this.A-=this.hc},function(){this.G=this.Ea();this.A-=this.bc},function(){this.I=this.Ea();this.A-=this.bc},function(){this.J=this.Ea();this.A-=this.bc},function(){this.B=this.Ea();this.A-=this.bc},function(){this.X=this.Ea();this.A-=this.bc},function(){this.H=this.Ea();this.A-=this.bc},function(){this.F=this.Ea();this.A-=this.bc},function(){this.D=this.Ea();this.A-=this.bc},ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,function(){Yg[this.da()].call(this,
|
this.A-=this.kc},function(){this.G=this.Fa();this.A-=this.ec},function(){this.I=this.Fa();this.A-=this.ec},function(){this.J=this.Fa();this.A-=this.ec},function(){this.B=this.Fa();this.A-=this.ec},function(){this.X=this.Fa();this.A-=this.ec},function(){this.H=this.Fa();this.A-=this.ec},function(){this.F=this.Fa();this.A-=this.ec},function(){this.D=this.Fa();this.A-=this.ec},ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,function(){Yg[this.da()].call(this,
|
||||||
Yd,this.K);this.A-=0>this.Fa?1:this.gh},qh,function(){Yg[this.da()].call(this,Yd,this.L);this.A-=0>this.Fa?1:this.gh},function(){Ug[this.da()].call(this,je)},function(){Vg[this.da()].call(this,ke)},function(){Wg[this.Bg=this.da()].call(this,ve)},function(){P[this.Bg=this.da()].call(this,we)},function(){this.Z|=1;Ug[this.da()].call(this,he)},function(){this.Z|=1;Vg[this.da()].call(this,he)},function(){Wg[this.da()].call(this,he)},function(){P[this.da()].call(this,he)},function(){var a=this.da();switch((a&
|
Yd,this.K);this.A-=0>this.Ga?1:this.hh},qh,function(){Yg[this.da()].call(this,Yd,this.L);this.A-=0>this.Ga?1:this.hh},function(){Ug[this.da()].call(this,je)},function(){Vg[this.da()].call(this,ke)},function(){Wg[this.Bg=this.da()].call(this,ve)},function(){P[this.Bg=this.da()].call(this,we)},function(){this.Z|=1;Ug[this.da()].call(this,he)},function(){this.Z|=1;Vg[this.da()].call(this,he)},function(){Wg[this.da()].call(this,he)},function(){P[this.da()].call(this,he)},function(){var a=this.da();switch((a&
|
||||||
56)>>3){case 0:this.vb=this.Ua.na;break;case 1:this.vb=this.qa.na;break;case 2:this.vb=this.wb.na;break;case 3:this.vb=this.Hb.na;break;default:O.call(this);return}this.Z|=1;Vg[a].call(this,ie)},function(){this.Z|=1;this.C=this.M=this.Ml;P[this.da()].call(this,oe)},function(){var a,b=this.da(),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.Ha){H.call(this);return}switch(c){case 1:a=this.I;break;case 4:a=this.X;break;case 5:a=this.H;break;
|
56)>>3){case 0:this.xb=this.Wa.na;break;case 1:this.xb=this.qa.na;break;case 2:this.xb=this.yb.na;break;case 3:this.xb=this.Lb.na;break;default:O.call(this);return}this.Z|=1;Vg[a].call(this,ie)},function(){this.Z|=1;this.C=this.M=this.Ol;P[this.da()].call(this,oe)},function(){var a,b=this.da(),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.Ea){H.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,he);switch(c){case 0:Qc(this,this.G);this.G=a;break;case 1:Kc(this,this.I);this.I=a;break;case 2:Pc(this,this.J);this.J=a;break;case 3:Lc(this,this.B);this.B=a;break;case 4:Qc(this,this.X);this.X=a;break;case 5:Kc(this,this.H);this.H=a;break;case 6:Pc(this,this.F);this.F=a;break;case 7:Lc(this,this.D),this.D=a}},function(){this.Z|=1;Yg[this.da()].call(this,Zd,this.Ea)},function(){this.A-=3},function(){var a=this.G;this.G=this.I;this.I=a;this.A-=
|
case 6:a=this.F;break;case 7:a=this.D}}P[b].call(this,he);switch(c){case 0:Qc(this,this.G);this.G=a;break;case 1:Kc(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:Qc(this,this.X);this.X=a;break;case 5:Kc(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.Z|=1;Yg[this.da()].call(this,Zd,this.Fa)},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.Bk},function(){var a=this.K(),b=this.K();L(this,
|
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.Dk},function(){var a=this.K(),b=this.K();L(this,
|
||||||
this.qa.na);L(this,this.pa);yc(this,a,b);this.A-=this.Ek},function(){O.call(this)},function(){L(this,Bc(this));this.A-=this.hc},function(){zc(this,this.Ea());this.A-=this.bc},function(){var a=this.G>>8;a&1?bd(this):Xc(this);a&4?Sc(this)||(this.ia^=1):Sc(this)&&(this.ia^=1);a&16?cd(this):Yc(this);a&64?dd(this):Zc(this);a&128?ed(this):$c(this);this.A-=this.ub},function(){this.G=this.G&255|(Bc(this)&213)<<8;this.A-=this.ub},function(){this.G=this.G&-256|this.T(this.C,this.K());this.A-=this.Ki},function(){this.G=
|
this.qa.na);L(this,this.pa);yc(this,a,b);this.A-=this.Gk},function(){O.call(this)},function(){L(this,Bc(this));this.A-=this.kc},function(){zc(this,this.Fa());this.A-=this.ec},function(){var a=this.G>>8;a&1?bd(this):Xc(this);a&4?Sc(this)||(this.ia^=1):Sc(this)&&(this.ia^=1);a&16?cd(this):Yc(this);a&64?dd(this):Zc(this);a&128?ed(this):$c(this);this.A-=this.wb},function(){this.G=this.G&255|(Bc(this)&213)<<8;this.A-=this.wb},function(){this.G=this.G&-256|this.T(this.C,this.K());this.A-=this.Li},function(){this.G=
|
||||||
this.U(this.C,this.K());this.A-=this.Ki},function(){var a=this.K(),b=this.G;this.Tc(this.C.Sb(a,0),b);this.A-=this.Li},function(){var a=this.K(),b=this.G;this.Hd(this.C.Sb(a,1),b);this.A-=this.Li},function(){var a=1,b=0,c=this.Mi;this.va&192&&(a=this.I,b=1,c=this.Oi,this.va&256||(this.A-=this.Ni));if(a--){var d=this.wa&1024?-1:1,e=this.T(this.C,this.F);this.Tc(this.Ua.Sb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=
|
this.U(this.C,this.K());this.A-=this.Li},function(){var a=this.K(),b=this.G;this.Wc(this.C.Vb(a,0),b);this.A-=this.Mi},function(){var a=this.K(),b=this.G;this.Kd(this.C.Vb(a,1),b);this.A-=this.Mi},function(){var a=1,b=0,c=this.Ni;this.va&192&&(a=this.I,b=1,c=this.Pi,this.va&256||(this.A-=this.Oi));if(a--){var d=this.wa&1024?-1:1,e=this.T(this.C,this.F);this.Wc(this.Wa.Vb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=
|
||||||
1,b=0,c=this.Mi;this.va&192&&(a=this.I,b=1,c=this.Oi,this.va&256||(this.A-=this.Ni));if(a--){var d=this.wa&1024?-2:2,e=this.U(this.C,this.F);this.Hd(this.Ua.Sb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=1,b=0,c=this.wi;this.va&192&&(a=this.I,b=1,c=this.yi,this.va&256||(this.A-=this.xi));if(a--){var d=this.wa&1024?-1:1,e=this.T(this.C,this.F),f=this.N(this.Ua,this.D);rd.call(this,e,f);this.F=this.F+d&65535;
|
1,b=0,c=this.Ni;this.va&192&&(a=this.I,b=1,c=this.Pi,this.va&256||(this.A-=this.Oi));if(a--){var d=this.wa&1024?-2:2,e=this.U(this.C,this.F);this.Kd(this.Wa.Vb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=1,b=0,c=this.xi;this.va&192&&(a=this.I,b=1,c=this.zi,this.va&256||(this.A-=this.yi));if(a--){var d=this.wa&1024?-1:1,e=this.T(this.C,this.F),f=this.N(this.Wa,this.D);rd.call(this,e,f);this.F=this.F+d&65535;
|
||||||
this.D=this.D+d&65535;this.A-=c-this.jb;this.I-=b;a&&Uc(this)==(this.va&64)&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=1,b=0,c=this.wi;this.va&192&&(a=this.I,b=1,c=this.yi,this.va&256||(this.A-=this.xi));if(a--){var d=this.wa&1024?-2:2,e=this.U(this.C,this.F),f=this.O(this.Ua,this.D);zd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.jb;this.I-=b;a&&Uc(this)==(this.va&64)&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){this.Y=this.ia=this.ka=this.G&255&
|
this.D=this.D+d&65535;this.A-=c-this.kb;this.I-=b;a&&Uc(this)==(this.va&64)&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){var a=1,b=0,c=this.xi;this.va&192&&(a=this.I,b=1,c=this.zi,this.va&256||(this.A-=this.yi));if(a--){var d=this.wa&1024?-2:2,e=this.U(this.C,this.F),f=this.O(this.Wa,this.D);zd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.kb;this.I-=b;a&&Uc(this)==(this.va&64)&&(K(this,this.va&16?-3:-2),this.Z|=256)}},function(){this.Y=this.ia=this.ka=this.G&255&
|
||||||
this.da();this.ba=256;this.A-=this.Be},function(){this.Y=this.ia=this.ka=this.G&this.K();this.ba=65536;this.A-=this.Be},function(){var a=1,b=0,c=this.Xi;this.va&192&&(a=this.I,b=1,c=this.Zi,this.va&256||(this.A-=this.Yi));if(a--){var d=this.G;this.Tc(this.Ua.Sb(this.D,0),d);this.D=this.D+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}},function(){var a=1,b=0,c=this.Xi;this.va&192&&(a=this.I,b=1,c=this.Zi,this.va&256||(this.A-=this.Yi));if(a--){var d=this.G;this.Hd(this.Ua.Sb(this.D,
|
this.da();this.ba=256;this.A-=this.Be},function(){this.Y=this.ia=this.ka=this.G&this.K();this.ba=65536;this.A-=this.Be},function(){var a=1,b=0,c=this.Yi;this.va&192&&(a=this.I,b=1,c=this.$i,this.va&256||(this.A-=this.Zi));if(a--){var d=this.G;this.Wc(this.Wa.Vb(this.D,0),d);this.D=this.D+(this.wa&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}},function(){var a=1,b=0,c=this.Yi;this.va&192&&(a=this.I,b=1,c=this.$i,this.va&256||(this.A-=this.Zi));if(a--){var d=this.G;this.Kd(this.Wa.Vb(this.D,
|
||||||
1),d);this.D=this.D+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}},function(){var a=1,b=0,c=this.Ei;this.va&192&&(a=this.I,b=1,c=this.Gi,this.va&256||(this.A-=this.Fi));a--&&(this.G=this.G&-256|this.T(this.C,this.F),this.F=this.F+(this.wa&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(K(this,this.va&16?-3:-2),this.Z|=256))},function(){var a=1,b=0,c=this.Ei;this.va&192&&(a=this.I,b=1,c=this.Gi,this.va&256||(this.A-=this.Fi));a--&&(this.G=this.U(this.C,this.F),this.F=this.F+(this.wa&
|
1),d);this.D=this.D+(this.wa&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(K(this,-2),this.Z|=256)}},function(){var a=1,b=0,c=this.Fi;this.va&192&&(a=this.I,b=1,c=this.Hi,this.va&256||(this.A-=this.Gi));a--&&(this.G=this.G&-256|this.T(this.C,this.F),this.F=this.F+(this.wa&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(K(this,this.va&16?-3:-2),this.Z|=256))},function(){var a=1,b=0,c=this.Fi;this.va&192&&(a=this.I,b=1,c=this.Hi,this.va&256||(this.A-=this.Gi));a--&&(this.G=this.U(this.C,this.F),this.F=this.F+(this.wa&
|
||||||
1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(K(this,this.va&16?-3:-2),this.Z|=256))},function(){var a=1,b=0,c=this.Ri;this.va&192&&(a=this.I,b=1,c=this.Ti,this.va&256||(this.A-=this.Si));a--&&(rd.call(this,this.G&255,this.N(this.Ua,this.D)),this.D=this.D+(this.wa&1024?-1:1)&65535,this.A-=c-this.jb,this.I-=b,a&&Uc(this)==(this.va&64)&&(K(this,-2),this.Z|=256))},function(){var a=1,b=0,c=this.Ri;this.va&192&&(a=this.I,b=1,c=this.Ti,this.va&256||(this.A-=this.Si));a--&&(zd.call(this,this.G,this.O(this.Ua,
|
1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(K(this,this.va&16?-3:-2),this.Z|=256))},function(){var a=1,b=0,c=this.Si;this.va&192&&(a=this.I,b=1,c=this.Ui,this.va&256||(this.A-=this.Ti));a--&&(rd.call(this,this.G&255,this.N(this.Wa,this.D)),this.D=this.D+(this.wa&1024?-1:1)&65535,this.A-=c-this.kb,this.I-=b,a&&Uc(this)==(this.va&64)&&(K(this,-2),this.Z|=256))},function(){var a=1,b=0,c=this.Si;this.va&192&&(a=this.I,b=1,c=this.Ui,this.va&256||(this.A-=this.Ti));a--&&(zd.call(this,this.G,this.O(this.Wa,
|
||||||
this.D)),this.D=this.D+(this.wa&1024?-2:2)&65535,this.A-=c-this.jb,this.I-=b,a&&Uc(this)==(this.va&64)&&(K(this,-2),this.Z|=256))},function(){this.G=this.G&-256|this.da();this.A-=this.ub},function(){this.I=this.I&-256|this.da();this.A-=this.ub},function(){this.J=this.J&-256|this.da();this.A-=this.ub},function(){this.B=this.B&-256|this.da();this.A-=this.ub},function(){this.G=this.G&255|this.da()<<8;this.A-=this.ub},function(){this.I=this.I&255|this.da()<<8;this.A-=this.ub},function(){this.J=this.J&
|
this.D)),this.D=this.D+(this.wa&1024?-2:2)&65535,this.A-=c-this.kb,this.I-=b,a&&Uc(this)==(this.va&64)&&(K(this,-2),this.Z|=256))},function(){this.G=this.G&-256|this.da();this.A-=this.wb},function(){this.I=this.I&-256|this.da();this.A-=this.wb},function(){this.J=this.J&-256|this.da();this.A-=this.wb},function(){this.B=this.B&-256|this.da();this.A-=this.wb},function(){this.G=this.G&255|this.da()<<8;this.A-=this.wb},function(){this.I=this.I&255|this.da()<<8;this.A-=this.wb},function(){this.J=this.J&
|
||||||
255|this.da()<<8;this.A-=this.ub},function(){this.B=this.B&255|this.da()<<8;this.A-=this.ub},function(){this.G=this.K();this.A-=this.ub},function(){this.I=this.K();this.A-=this.ub},function(){this.J=this.K();this.A-=this.ub},function(){this.B=this.K();this.A-=this.ub},function(){this.X=this.K();this.A-=this.ub},function(){this.H=this.K();this.A-=this.ub},function(){this.F=this.K();this.A-=this.ub},function(){this.D=this.K();this.A-=this.ub},rh,sh,rh,sh,function(){P[this.da()].call(this,qe)},function(){P[this.da()].call(this,
|
255|this.da()<<8;this.A-=this.wb},function(){this.B=this.B&255|this.da()<<8;this.A-=this.wb},function(){this.G=this.K();this.A-=this.wb},function(){this.I=this.K();this.A-=this.wb},function(){this.J=this.K();this.A-=this.wb},function(){this.B=this.K();this.A-=this.wb},function(){this.X=this.K();this.A-=this.wb},function(){this.H=this.K();this.A-=this.wb},function(){this.F=this.K();this.A-=this.wb},function(){this.D=this.K();this.A-=this.wb},rh,sh,rh,sh,function(){P[this.da()].call(this,qe)},function(){P[this.da()].call(this,
|
||||||
pe)},function(){this.Z|=1;Xg[this.da()].call(this,$d,this.da)},function(){this.Z|=1;Yg[this.da()].call(this,$d,this.K)},th,uh,th,uh,function(){hd.call(this,3,null,this.Vk)},function(){var a=this.da(),b;a:{b=this.vg[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c][1].call(b[c][0],this.Aa)){b=!1;break a}b=!0}b?hd.call(this,a,null,0):this.A--},function(){Wc(this)?hd.call(this,4,null,this.Wk):this.A-=this.Xk},function(){yc(this,this.Ea(),this.Ea());zc(this,this.Ea());this.Hg&&Ec(this,this.Aa);this.A-=
|
pe)},function(){this.Z|=1;Xg[this.da()].call(this,$d,this.da)},function(){this.Z|=1;Yg[this.da()].call(this,$d,this.K)},th,uh,th,uh,function(){hd.call(this,3,null,this.Xk)},function(){var a=this.da(),b;a:{b=this.vg[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c][1].call(b[c][0],this.Aa)){b=!1;break a}b=!0}b?hd.call(this,a,null,0):this.A--},function(){Wc(this)?hd.call(this,4,null,this.Yk):this.A-=this.Zk},function(){yc(this,this.Fa(),this.Fa());zc(this,this.Fa());this.Hg&&Ec(this,this.Aa);this.A-=
|
||||||
this.Tk},function(){Xg[this.da()].call(this,ae,Pd)},function(){Yg[this.da()].call(this,be,Pd)},function(){Xg[this.da()].call(this,ae,Qd)},function(){Yg[this.da()].call(this,be,Qd)},function(){var a=this.da(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.ba=256;this.Y=this.ia=b;this.A-=this.yk},function(){var a=this.da();this.Y=this.ia=this.G=(this.G>>8)*a+this.G&255;this.ba=256;this.A-=this.xk},function(){this.G=this.G&-256|(Rc(this)?255:0);this.A-=2},function(){this.G=this.G&-256|this.T(this.C,this.B+
|
this.Vk},function(){Xg[this.da()].call(this,ae,Pd)},function(){Yg[this.da()].call(this,be,Pd)},function(){Xg[this.da()].call(this,ae,Qd)},function(){Yg[this.da()].call(this,be,Qd)},function(){var a=this.da(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.ba=256;this.Y=this.ia=b;this.A-=this.Ak},function(){var a=this.da();this.Y=this.ia=this.G=(this.G>>8)*a+this.G&255;this.ba=256;this.A-=this.zk},function(){this.G=this.G&-256|(Rc(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.wl},vh,vh,vh,vh,vh,vh,vh,vh,function(){var a=this.L();(this.I=this.I-1&65535)&&this.Y&this.ba-1?(J(this,this.pa+a),this.A-=this.dl):this.A-=this.Hi},function(){var a=this.L();!(this.I=this.I-1&65535)||this.Y&this.ba-1?this.A-=this.Ji:(J(this,this.pa+a),this.A-=this.Ii)},function(){var a=this.L();(this.I=this.I-1&65535)?(J(this,this.pa+a),this.A-=this.cl):this.A-=this.Hi},function(){var a=this.L();this.I?this.A-=this.Ji:(J(this,this.pa+a),this.A-=this.Ii)},function(){var a=
|
(this.G&255)&65535);this.A-=this.yl},vh,vh,vh,vh,vh,vh,vh,vh,function(){var a=this.L();(this.I=this.I-1&65535)&&this.Y&this.ba-1?(J(this,this.pa+a),this.A-=this.fl):this.A-=this.Ii},function(){var a=this.L();!(this.I=this.I-1&65535)||this.Y&this.ba-1?this.A-=this.Ki:(J(this,this.pa+a),this.A-=this.Ji)},function(){var a=this.L();(this.I=this.I-1&65535)?(J(this,this.pa+a),this.A-=this.el):this.A-=this.Ii},function(){var a=this.L();this.I?this.A-=this.Ki:(J(this,this.pa+a),this.A-=this.Ji)},function(){var a=
|
||||||
this.da();this.G=this.G&-256|jb(this.la,a,this.Aa-2);this.A-=this.Bi},function(){var a=this.da();this.G=jb(this.la,a,this.Aa-1)|jb(this.la,a+1&65535,this.Aa-2)<<8;this.A-=this.Bi},function(){var a=this.da();mb(this.la,a,this.G&255,this.Aa-2);this.A-=this.Qi},function(){var a=this.da();mb(this.la,a,this.G&255,this.Aa-2);mb(this.la,a+1&65535,this.G>>8,this.Aa-2);this.A-=this.Qi},function(){var a=this.K();L(this,this.pa);J(this,this.pa+a);this.A-=this.Ck},function(){var a=this.K();J(this,this.pa+a);
|
this.da();this.G=this.G&-256|jb(this.la,a,this.Aa-2);this.A-=this.Ci},function(){var a=this.da();this.G=jb(this.la,a,this.Aa-1)|jb(this.la,a+1&65535,this.Aa-2)<<8;this.A-=this.Ci},function(){var a=this.da();mb(this.la,a,this.G&255,this.Aa-2);this.A-=this.Ri},function(){var a=this.da();mb(this.la,a,this.G&255,this.Aa-2);mb(this.la,a+1&65535,this.G>>8,this.Aa-2);this.A-=this.Ri},function(){var a=this.K();L(this,this.pa);J(this,this.pa+a);this.A-=this.Ek},function(){var a=this.K();J(this,this.pa+a);
|
||||||
this.A-=this.Ci},function(){yc(this,this.K(),this.K());this.A-=this.Zk},function(){var a=this.L();J(this,this.pa+a);this.A-=this.Ci},function(){this.G=this.G&-256|jb(this.la,this.J,this.Aa-1);this.A-=this.Ai},function(){this.G=jb(this.la,this.J,this.Aa-1)|jb(this.la,this.J+1&65535,this.Aa-1)<<8;this.A-=this.Ai},function(){mb(this.la,this.J,this.G&255,this.Aa-1);this.A-=this.Pi},function(){mb(this.la,this.J,this.G&255,this.Aa-1);mb(this.la,this.J+1&65535,this.G>>8,this.Aa-1);this.A-=this.Pi},wh,wh,
|
this.A-=this.Di},function(){yc(this,this.K(),this.K());this.A-=this.al},function(){var a=this.L();J(this,this.pa+a);this.A-=this.Di},function(){this.G=this.G&-256|jb(this.la,this.J,this.Aa-1);this.A-=this.Bi},function(){this.G=jb(this.la,this.J,this.Aa-1)|jb(this.la,this.J+1&65535,this.Aa-1)<<8;this.A-=this.Bi},function(){mb(this.la,this.J,this.G&255,this.Aa-1);this.A-=this.Qi},function(){mb(this.la,this.J,this.G&255,this.Aa-1);mb(this.la,this.J+1&65535,this.G>>8,this.Aa-1);this.A-=this.Qi},wh,wh,
|
||||||
function(){this.Z|=132;this.A-=this.Gb},function(){this.Z|=68;this.A-=this.Gb},function(){this.bb|=4;this.A-=2;this.aa&&1<this.aa.Jb.length?(K(this,-1),this.sb()):this.wa&512||(this.aa&&K(this,-1),this.sb())},function(){Rc(this)?Xc(this):bd(this);this.A-=2},function(){this.vb=-1;Xg[this.da()].call(this,de,Vd);0<=this.vb&&(this.G=this.vb)},function(){this.vb=-1;Yg[this.da()].call(this,ee,Vd);0<=this.vb&&(this.G=this.vb,this.J=this.gg)},function(){this.Y&=~this.ba;this.A-=2},function(){this.Y|=this.ba;
|
function(){this.Z|=132;this.A-=this.Kb},function(){this.Z|=68;this.A-=this.Kb},function(){this.cb|=4;this.A-=2;this.aa&&1<this.aa.Ab.length?(K(this,-1),this.ub()):this.wa&512||(this.aa&&K(this,-1),this.ub())},function(){Rc(this)?Xc(this):bd(this);this.A-=2},function(){this.xb=-1;Xg[this.da()].call(this,de,Vd);0<=this.xb&&(this.G=this.xb)},function(){this.xb=-1;Yg[this.da()].call(this,ee,Vd);0<=this.xb&&(this.G=this.xb,this.J=this.gg)},function(){this.Y&=~this.ba;this.A-=2},function(){this.Y|=this.ba;
|
||||||
this.A-=2},function(){this.wa&=-513;this.A-=this.Ak},function(){this.wa|=512;this.Z|=4;this.A-=2},function(){this.wa&=-1025;this.A-=2},function(){this.wa|=1024;this.A-=2},function(){Xg[this.da()].call(this,rc,Vd)},function(){Yg[this.da()].call(this,tc,Vd)}];
|
this.A-=2},function(){this.wa&=-513;this.A-=this.Ck},function(){this.wa|=512;this.Z|=4;this.A-=2},function(){this.wa&=-1025;this.A-=2},function(){this.wa|=1024;this.A-=2},function(){Xg[this.da()].call(this,rc,Vd)},function(){Yg[this.da()].call(this,tc,Vd)}];
|
||||||
function Q(a){s.call(this,"ChipSet",a,Q);this.Ha=a.model;this.Ha=void 0!==this.Ha?parseInt(this.Ha,10):xh;this.hd=yh(a.sw1,zh|Ah.Ul);this.ie=yh(a.sw2,0);this.mn=this.Ha==xh?16:64;this.Df=this.Ef=1;this.Ha>=Bh&&(this.Df=this.Ef=2);this.Sg=a.scaleTimers||!1;this.Do=a.rtcDate;this.fk=!1;a.sound&&window&&"webkitAudioContext"in window&&(this.Lh=new webkitAudioContext);this.La()}w(s,Q);var xh=5150,Bh=5170,Ch={xj:1},zh=12,Ah={Mo:16,No:32,Ul:48,sf:48,th:4};Ch.ONE=0;Ch.To=64;Ch.So=128;Ch.Po=192;Ch.sf=192;
|
function Q(a){s.call(this,"ChipSet",a,Q);this.Ea=a.model;this.Ea=void 0!==this.Ea?parseInt(this.Ea,10):xh;this.ld=yh(a.sw1,zh|Ah.Vl);this.je=yh(a.sw2,0);this.mn=this.Ea==xh?16:64;this.Df=this.Ef=1;this.Ea>=Bh&&(this.Df=this.Ef=2,this.oj={Mj:0,bd:127});this.Sg=a.scaleTimers||!1;this.Eo=a.rtcDate;this.ik=!1;a.sound&&window&&"webkitAudioContext"in window&&(this.Mh=new webkitAudioContext);this.Ma()}w(s,Q);var xh=5150,Bh=5170,Ch={zj:1},zh=12,Ah={No:16,Oo:32,Vl:48,sf:48,uh:4};Ch.ONE=0;Ch.Uo=64;Ch.To=128;
|
||||||
Ch.th=6;var Dh={bm:64,cm:32,je:16,am:8,Dj:4,Tl:1},Dh={bm:64,cm:32,je:16,am:8,Dj:4,Tl:1};k=Q.prototype;
|
Ch.Qo=192;Ch.sf=192;Ch.uh=6;k=Q.prototype;k.qb=function(a,b,c,d){switch(c){case "sw1":return this.sa[c]=d,Dh(this,c,d,this.ld,{0:this.Ea==xh?"Bootable Floppy Drive":"Loop on POST",1:this.Ea==xh?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Ea==xh)return this.sa[c]=d,Dh(this,c,d,this.je,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.sa[c]=d,!0}return!1};
|
||||||
k.pb=function(a,b,c,d){switch(c){case "sw1":return this.sa[c]=d,Eh(this,c,d,this.hd,{0:this.Ha==xh?"Bootable Floppy Drive":"Loop on POST",1:this.Ha==xh?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Ha==xh)return this.sa[c]=d,Eh(this,c,d,this.ie,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.sa[c]=d,!0}return!1};
|
k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.jb=C(a,"Keyboard");if(d){var e=this;Eh(d,Q);Fh(d,Q.Le,function(){for(var a=0;a<e.mb.length;a++){for(var b=e.mb[a],c="PIC"+a+":",d=0;d<b.md.length;d++)c+=" IC"+(d+1)+"="+p(b.md[d]);c+=" IMR="+p(b.sd)+" IRR="+p(b.Eb)+" ISR="+p(b.wc);e.aa.message(c)}});Fh(d,Q.Me,function(){for(var a=0;a<e.Cb.length;a++){Gh(e,a);var b=e.Cb[a],c="TIMER"+a+":",d=0;if(void 0!==b.cd)for(var n=0;n<=b.cd;n++)d|=b.Wb[n]<<8*n;c+=" MODE"+b.mode+" BYTES="+b.cd+
|
||||||
k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ib=C(a,"Keyboard");if(d){var e=this;Fh(d,Q);Gh(d,Q.Le,function(){for(var a=0;a<e.lb.length;a++){for(var b=e.lb[a],c="PIC"+a+":",d=0;d<b.jd.length;d++)c+=" IC"+(d+1)+"="+p(b.jd[d]);c+=" IMR="+p(b.pd)+" IRR="+p(b.Bb)+" ISR="+p(b.uc);e.aa.message(c)}});Gh(d,Q.Me,function(){for(var a=0;a<e.zb.length;a++){Hh(e,a);var b=e.zb[a],c="TIMER"+a+":",d=0;if(void 0!==b.Zc)for(var n=0;n<=b.Zc;n++)d|=b.Tb[n]<<8*n;c+=" MODE"+b.mode+" BYTES="+b.Zc+
|
" COUNT="+q(d);e.aa.message(c)}})}ib(b,this,Hh);lb(b,this,Ih);this.Ea<Bh?(ib(b,this,Jh),lb(b,this,Kh)):(ib(b,this,Lh),lb(b,this,Mh));this.zl=Math.round(c.Ed/1193181)};k.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ub=function(a){return a&&this.save?this.save():!0};
|
||||||
" COUNT="+q(d);e.aa.message(c)}})}ib(b,this,Ih);lb(b,this,Jh);this.Ha<Bh?(ib(b,this,Kh),lb(b,this,Lh)):(ib(b,this,Mh),lb(b,this,Nh));this.xl=Math.round(c.Bd/1193181)};k.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Rb=function(a){return a&&this.save?this.save():!0};
|
k.reset=function(){var a;this.Xc=this.ld;this.Ie=this.je;Nh(this);this.Ta=Array(this.Df);for(a=0;a<this.Df;a++)Oh(this,a);this.mb=Array(this.Ef);Ph(this,0,32);1<this.Ef&&Ph(this,1,160);this.Jh=void 0;this.Cb=Array(3);for(a=0;a<this.Cb.length;a++)Qh(this,a);this.Cf=this.Hh=this.ac=this.Dg=void 0;this.Cg=0;if(this.Ea>=Bh){this.bb=16;this.rd=0;this.vc=16;this.yg=0;this.pe=160;512<=Rh(this)&&(this.pe|=16);3==Sh(this)&&(this.pe|=64);this.Eh=3;this.qe=0;this.ra=Array(64);a=(a=this.Eo)?new Date(a):new Date;
|
||||||
k.reset=function(){var a;this.Uc=this.hd;this.Ie=this.ie;Oh(this);this.Ra=Array(this.Df);for(a=0;a<this.Df;a++)Ph(this,a);this.lb=Array(this.Ef);Qh(this,0,32);1<this.Ef&&Qh(this,1,160);this.Ih=void 0;this.zb=Array(3);for(a=0;a<this.zb.length;a++)Rh(this,a);this.Cf=this.Gh=this.Yb=this.Dg=void 0;this.Cg=0;if(this.Ha>=Bh){this.ab=16;this.od=0;this.sc=Dh.je;this.yg=0;this.pe=160;512<=Sh(this)&&(this.pe|=16);3==Th(this)&&(this.pe|=64);this.Dh=3;this.qe=0;this.ra=Array(64);a=(a=this.Do)?new Date(a):new Date;
|
this.ra[0]=a.getSeconds();this.ra[1]=0;this.ra[2]=a.getMinutes();this.ra[3]=0;this.ra[4]=a.getHours();this.ra[5]=0;this.ra[6]=a.getDay()+1;this.ra[7]=a.getDate();this.ra[8]=a.getMonth()+1;this.ra[9]=a.getFullYear()%100;this.Rf=-1;this.ra[10]=38;this.ra[11]=2;this.ra[12]=0;this.ra[13]=128;for(a=14;46>a;a++)this.ra[a]=0;this.ra[20]=this.Xc&(Ah.sf|2|Ch.zj|Ch.sf);this.ra[16]=Th(this,0)<<4|Th(this,1);a=Rh(this);this.ra[21]=a&255;this.ra[22]=a>>8;a=0;for(var b=16;46>b;b++)a+=this.ra[b];this.ra[47]=a&255;
|
||||||
this.ra[0]=a.getSeconds();this.ra[1]=0;this.ra[2]=a.getMinutes();this.ra[3]=0;this.ra[4]=a.getHours();this.ra[5]=0;this.ra[6]=a.getDay()+1;this.ra[7]=a.getDate();this.ra[8]=a.getMonth()+1;this.ra[9]=a.getFullYear()%100;this.Rf=-1;this.ra[10]=38;this.ra[11]=2;this.ra[12]=0;this.ra[13]=128;for(a=14;46>a;a++)this.ra[a]=0;this.ra[20]=this.Uc&(Ah.sf|2|Ch.xj|Ch.sf);a=0;var b=Uh(this);0<b&&(a|=32);1<b&&(a|=2);this.ra[16]=a;a=Sh(this);this.ra[21]=a&255;this.ra[22]=a>>8;a=0;for(b=16;46>b;b++)a+=this.ra[b];
|
this.ra[46]=a>>8;this.Gh=0;this.Ij=Array(7)}};
|
||||||
this.ra[47]=a&255;this.ra[46]=a>>8;this.Fh=0;this.Hj=Array(7)}};
|
k.save=function(){var a=new I(this);a.set(0,[this.ld,this.je,this.Xc,this.Ie]);for(var b=[],c=0;c<this.Ta;c++){var d=[],e=this.Ta[c];d[0]=e.bd;d[1]=e.Fh;d[2]=e.Pj;d[3]=e.hb;for(var f=[],g=0;g<e.Bb.length;g++){var h=[],m=e.Bb[g];h[0]=m.Cd;h[1]=m.Jj;h[2]=m.zc;h[3]=m.Nb;h[4]=m.Wb;h[5]=m.mode;h[6]=m.Eg;h[8]=m.Bo;h[9]=m.Co;f[g]=h}d[4]=f;b[c]=d}a.set(1,[b]);b=[];for(c=0;c<this.mb.length;c++)d=[],e=this.mb[c],d[0]=e.Wf,d[1]=e.md,d[2]=e.Fd,d[3]=e.sd,d[4]=e.Eb,d[5]=e.wc,d[6]=e.re,d[7]=e.Bf,b[c]=d;a.set(2,
|
||||||
k.save=function(){var a=new I(this);a.set(0,[this.hd,this.ie,this.Uc,this.Ie]);for(var b=[],c=0;c<this.Ra;c++){var d=[],e=this.Ra[c];d[0]=e.Qd;d[1]=e.Eh;d[2]=e.Nj;d[3]=e.gb;for(var f=[],g=0;g<e.yb.length;g++){var h=[],m=e.yb[g];h[0]=m.zd;h[1]=m.Ij;h[2]=m.xc;h[3]=m.Kb;h[4]=m.Tb;h[5]=m.mode;h[6]=m.Eg;h[8]=m.Ao;h[9]=m.Bo;f[g]=h}d[4]=f;b[c]=d}a.set(1,[b]);b=[];for(c=0;c<this.lb.length;c++)d=[],e=this.lb[c],d[0]=e.Wf,d[1]=e.jd,d[2]=e.Cd,d[3]=e.pd,d[4]=e.Bb,d[5]=e.uc,d[6]=e.re,d[7]=e.Bf,b[c]=d;a.set(2,
|
[b]);b=[];for(c=0;c<this.Cb.length;c++)d=[],e=this.Cb[c],d[0]=e.zc,d[1]=e.Pc,d[2]=e.Wb,d[3]=e.If,d[4]=e.Sj,d[5]=e.mode,d[6]=e.hg,d[7]=e.Wd,d[8]=e.cd,d[9]=e.fd,d[10]=e.Lf,d[11]=e.Xe,d[12]=e.fe,b[c]=d;a.set(3,[this.Jh,b]);a.set(4,[this.Dg,this.ac,this.Hh,this.Cf,this.Cg]);this.Ea>=Bh&&(a.set(5,[this.bb,this.rd,this.vc,this.yg,this.pe,this.Eh]),a.set(6,[this.qe,this.ra,this.Rf]));return a.data()};
|
||||||
[b]);b=[];for(c=0;c<this.zb.length;c++)d=[],e=this.zb[c],d[0]=e.xc,d[1]=e.Mc,d[2]=e.Tb,d[3]=e.If,d[4]=e.Pj,d[5]=e.mode,d[6]=e.hg,d[7]=e.Td,d[8]=e.Zc,d[9]=e.bd,d[10]=e.Lf,d[11]=e.Xe,d[12]=e.ee,b[c]=d;a.set(3,[this.Ih,b]);a.set(4,[this.Dg,this.Yb,this.Gh,this.Cf,this.Cg]);this.Ha>=Bh&&(a.set(5,[this.ab,this.od,this.sc,this.yg,this.pe,this.Dh]),a.set(6,[this.qe,this.ra,this.Rf]));return a.data()};
|
k.restore=function(a){var b,c;b=a[0];this.ld=b[0];this.je=b[1];this.Xc=b[2];this.Ie=b[3];b=a[1];this.Ta=Array(this.Df);for(c=0;c<this.Df;c++)Oh(this,c,1==b.length?b[0][c]:b);b=a[2];this.mb=Array(this.Ef);for(c=0;c<this.Ef;c++)Ph(this,c,0===c?32:160,b[0][c]);b=a[3];this.Jh=b[0];this.Cb=Array(3);for(c=0;c<this.Cb.length;c++)Qh(this,c,b[1][c]);b=a[4];this.Dg=b[0];this.ac=b[1];this.Hh=b[2];this.Cf=b[3];this.Cg=b[4];if(b=a[5])this.bb=b[0],this.rd=b[1],this.vc=b[2],this.yg=b[3],this.pe=b[4],this.Eh=b[5];
|
||||||
k.restore=function(a){var b,c;b=a[0];this.hd=b[0];this.ie=b[1];this.Uc=b[2];this.Ie=b[3];b=a[1];this.Ra=Array(this.Df);for(c=0;c<this.Df;c++)Ph(this,c,1==b.length?b[0][c]:b);b=a[2];this.lb=Array(this.Ef);for(c=0;c<this.Ef;c++)Qh(this,c,0===c?32:160,b[0][c]);b=a[3];this.Ih=b[0];this.zb=Array(3);for(c=0;c<this.zb.length;c++)Rh(this,c,b[1][c]);b=a[4];this.Dg=b[0];this.Yb=b[1];this.Gh=b[2];this.Cf=b[3];this.Cg=b[4];if(b=a[5])this.ab=b[0],this.od=b[1],this.sc=b[2],this.yg=b[3],this.pe=b[4],this.Dh=b[5];
|
if(b=a[6])this.qe=b[0],this.ra=b[1],this.Rf=b[2];return!0};function Oh(a,b,c){a=a.Ta[b]={};c&&5==c.length||(c=[0,void 0,void 0,0,[]]);a.bd=c[0];a.Fh=c[1];a.Pj=c[2];a.hb=c[3];a.un=b<<2;a.Bb=Array(4);for(b=0;b<a.Bb.length;b++)Uh(a,b,c[4][b])}function Uh(a,b,c){var d=a.Bb[b]={};if(void 0===c||8!=c.length)c=[!0,[],[],[],[]];d.ha=a;d.pk=b;d.Cd=c[0];d.Jj=c[1];d.zc=c[2];d.Nb=c[3];d.Wb=c[4];d.mode=c[5];d.Eg=c[6];Vh(d,c[8],c[9])}
|
||||||
if(b=a[6])this.qe=b[0],this.ra=b[1],this.Rf=b[2];return!0};function Ph(a,b,c){a=a.Ra[b]={};c&&5==c.length||(c=[0,void 0,void 0,0,[]]);a.Qd=c[0];a.Eh=c[1];a.Nj=c[2];a.gb=c[3];a.un=b<<2;a.yb=Array(4);for(b=0;b<a.yb.length;b++)Vh(a,b,c[4][b])}function Vh(a,b,c){var d=a.yb[b]={};if(void 0===c||8!=c.length)c=[!0,[],[],[],[]];d.ha=a;d.mk=b;d.zd=c[0];d.Ij=c[1];d.xc=c[2];d.Kb=c[3];d.Tb=c[4];d.mode=c[5];d.Eg=c[6];Wh(d,c[8],c[9])}
|
function Vh(a,b,c,d){"string"==typeof b&&(b=Na(b));b&&(a.Lg=null,a.Bo=b.id,a.Co=c,a.Jg=b,a.gi=b[c],a.jh=d)}function Ph(a,b,c,d){a=a.mb[b]={};d&&8==d.length||(d=[0,[void 0,void 0,void 0,void 0]]);a.port=c;a.Xo=b<<3;a.Wf=d[0];a.md=d[1];a.Fd=d[2];a.sd=d[3];a.Eb=d[4];a.wc=d[5];a.re=d[6];a.Bf=d[7]}
|
||||||
function Wh(a,b,c,d){"string"==typeof b&&(b=Na(b));b&&(a.Lg=null,a.Ao=b.id,a.Bo=c,a.Jg=b,a.fi=b[c],a.ih=d)}function Qh(a,b,c,d){a=a.lb[b]={};d&&8==d.length||(d=[0,[void 0,void 0,void 0,void 0]]);a.port=c;a.Wo=b<<3;a.Wf=d[0];a.jd=d[1];a.Cd=d[2];a.pd=d[3];a.Bb=d[4];a.uc=d[5];a.re=d[6];a.Bf=d[7]}
|
function Qh(a,b,c){a=a.Cb[b]={};if(void 0===c||13!=c.length)c=[[],[],[],[]];a.zc=c[0];a.Pc=c[1];a.Wb=c[2];a.If=c[3];a.Sj=c[4];a.mode=c[5];a.hg=c[6];a.Wd=c[7];a.cd=c[8];a.fd=c[9];a.Lf=c[10];a.Xe=c[11];a.fe=c[12]}function Rh(a,b){return((((b?a.ld:a.Xc)&12)>>2)+1)*a.mn+32*((b?a.je:a.Ie)&15)}function Wh(a,b){var c=b?a.ld:a.Xc;return a.Ea!=xh||c&Ch.zj?((c&Ch.sf)>>Ch.uh)+1:0}function Th(a,b){return b<Wh(a)?a.Ea<Bh?1:2:0}function Sh(a,b){return((b?a.ld:a.Xc)&Ah.sf)>>Ah.uh}
|
||||||
function Rh(a,b,c){a=a.zb[b]={};if(void 0===c||13!=c.length)c=[[],[],[],[]];a.xc=c[0];a.Mc=c[1];a.Tb=c[2];a.If=c[3];a.Pj=c[4];a.mode=c[5];a.hg=c[6];a.Td=c[7];a.Zc=c[8];a.bd=c[9];a.Lf=c[10];a.Xe=c[11];a.ee=c[12]}function Sh(a,b){return((((b?a.hd:a.Uc)&12)>>2)+1)*a.mn+32*((b?a.ie:a.Ie)&15)}function Uh(a,b){var c=b?a.hd:a.Uc;return a.Ha!=xh||c&Ch.xj?((c&Ch.sf)>>Ch.th)+1:0}function Th(a,b){return((b?a.hd:a.Uc)&Ah.sf)>>Ah.th}
|
function Dh(a,b,c,d,e){for(var f="",g=1;8>=g;g++){var h="pcjs-bitCell";g||(h+=" pcjs-bitCellLeft");f+='<div id="'+(b+"-"+g)+'" class="'+h+'" data-value="0">'+g+"</div>\n"}c.innerHTML=f;b=y(c,"pcjs-bitCell");c=null;for(g=0;g<b.length;g++)void 0!==e&&void 0!==e[g]&&(c=e[g]),c&&b[g].setAttribute("title",c),Xh(b[g],d&1<<g?!1:!0),b[g].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");Xh(b,c);var d=b.getAttribute("id").split("-"),e=1<<parseInt(d[1],10)-1;switch(d[0]){case "sw1":a.ld=
|
||||||
function Eh(a,b,c,d,e){for(var f="",g=1;8>=g;g++){var h="pcjs-bitCell";g||(h+=" pcjs-bitCellLeft");f+='<div id="'+(b+"-"+g)+'" class="'+h+'" data-value="0">'+g+"</div>\n"}c.innerHTML=f;b=y(c,"pcjs-bitCell");c=null;for(g=0;g<b.length;g++)void 0!==e&&void 0!==e[g]&&(c=e[g]),c&&b[g].setAttribute("title",c),Xh(b[g],d&1<<g?!1:!0),b[g].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");Xh(b,c);var d=b.getAttribute("id").split("-"),e=1<<parseInt(d[1],10)-1;switch(d[0]){case "sw1":a.hd=
|
a.ld&~e|(c?0:e);break;case "sw2":a.je=a.je&~e|(c?0:e)}Nh(a)}}(a,b[g])}function Xh(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Nh(a){var b=a.sa.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(void 0!==b){var d;d=""+(Rh(a,!0)+"Kb");d+=", "+c[Sh(a,!0)]+" Monitor";d+=", "+Wh(a,!0)+" Floppy Drives";if(void 0!==a.Xc&&a.Xc!=a.ld||void 0!==a.Ie&&a.Ie!=a.je)d+=" (Reset required)";b.innerHTML=d}}
|
||||||
a.hd&~e|(c?0:e);break;case "sw2":a.ie=a.ie&~e|(c?0:e)}Oh(a)}}(a,b[g])}function Xh(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Oh(a){var b=a.sa.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(void 0!==b){var d;d=""+(Sh(a,!0)+"Kb");d+=", "+c[Th(a,!0)]+" Monitor";d+=", "+Uh(a,!0)+" Floppy Drives";if(void 0!==a.Uc&&a.Uc!=a.hd||void 0!==a.Ie&&a.Ie!=a.ie)d+=" (Reset required)";b.innerHTML=d}}
|
function Yh(a,b,c,d,e){var f=a.Ta[b],g=f.Bb[c].Nb[f.hb];f.hb^=1;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.hb+"]",Q.zb,g);return g}function Zh(a,b,c,d,e,f){var g=a.Ta[b];a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.hb+"]",Q.zb);a=g.Bb[c];a.Nb[g.hb]=a.Jj[g.hb]=e;g.hb^=1}function $h(a,b,c,d,e){var f=a.Ta[b],g=f.Bb[c].Wb[f.hb];f.hb^=1;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.hb+"]",Q.zb,g);return g}
|
||||||
function Yh(a,b,c,d,e){var f=a.Ra[b],g=f.yb[c].Kb[f.gb];f.gb^=1;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.gb+"]",Q.xb,g);return g}function Zh(a,b,c,d,e,f){var g=a.Ra[b];a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.gb+"]",Q.xb);a=g.yb[c];a.Kb[g.gb]=a.Ij[g.gb]=e;g.gb^=1}function $h(a,b,c,d,e){var f=a.Ra[b],g=f.yb[c].Tb[f.gb];f.gb^=1;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.gb+"]",Q.xb,g);return g}
|
function ai(a,b,c,d,e,f){var g=a.Ta[b];a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.hb+"]",Q.zb);a=g.Bb[c];a.Wb[g.hb]=a.zc[g.hb]=e;g.hb^=1}function bi(a,b,c,d){var e=a.Ta[b],f=e.bd|1;e.bd&=-16;a.ca(c,null,d,"DMA"+b+".STATUS",Q.zb,f);return f}function ci(a,b,c,d,e){var f=a.Ta[b];a.ca(c,d,e,"DMA"+b+".REQ",Q.zb);a=d&3;f.bd=f.bd&~(16<<a)|(d&4)<<a+2;f.Pj=d}function di(a,b,c,d,e){var f=a.Ta[b];a.ca(c,d,e,"DMA"+b+".MASK",Q.zb);b=d&3;c=f.Bb[b];c.Cd=d&4?!0:!1;c.Cd||ei(a,f.un+b)}
|
||||||
function ai(a,b,c,d,e,f){var g=a.Ra[b];a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.gb+"]",Q.xb);a=g.yb[c];a.Tb[g.gb]=a.xc[g.gb]=e;g.gb^=1}function bi(a,b,c,d){var e=a.Ra[b],f=e.Qd|1;e.Qd&=-16;a.ca(c,null,d,"DMA"+b+".STATUS",Q.xb,f);return f}function ci(a,b,c,d,e){var f=a.Ra[b];a.ca(c,d,e,"DMA"+b+".REQ",Q.xb);a=d&3;f.Qd=f.Qd&~(16<<a)|(d&4)<<a+2;f.Nj=d}function di(a,b,c,d,e){var f=a.Ra[b];a.ca(c,d,e,"DMA"+b+".MASK",Q.xb);b=d&3;c=f.yb[b];c.zd=d&4?!0:!1;c.zd||ei(a,f.un+b)}
|
function fi(a,b,c,d,e){a.ca(c,d,e,"DMA"+b+".CLEAR",Q.zb);a=a.Ta[b];for(b=0;b<a.Bb.length;b++)Uh(a,b)}function gi(a,b,c,d,e){var f=a.Ta[b].Bb[c].Eg;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".PAGE",Q.zb,f);return f}function hi(a,b,c,d,e,f){a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".PAGE",Q.zb);a.Ta[b].Bb[c].Eg=e}function ii(a,b,c,d){var e=a.Ij[b];a.ca(c,null,d,"DMA.SPARE"+b+".PAGE",Q.zb,e);return e}function ji(a,b,c,d,e){a.ca(c,d,e,"DMA.SPARE"+b+".PAGE",Q.zb);a.Ij[b]=d}
|
||||||
function fi(a,b,c,d,e){a.ca(c,d,e,"DMA"+b+".CLEAR",Q.xb);a=a.Ra[b];for(b=0;b<a.yb.length;b++)Vh(a,b)}function gi(a,b,c,d,e){var f=a.Ra[b].yb[c].Eg;a.ca(d,null,e,"DMA"+b+".CHANNEL"+c+".PAGE",Q.xb,f);return f}function hi(a,b,c,d,e,f){a.ca(d,e,f,"DMA"+b+".CHANNEL"+c+".PAGE",Q.xb);a.Ra[b].yb[c].Eg=e}function ii(a,b,c,d){var e=a.Hj[b];a.ca(c,null,d,"DMA.SPARE"+b+".PAGE",Q.xb,e);return e}function ji(a,b,c,d,e){a.ca(c,d,e,"DMA.SPARE"+b+".PAGE",Q.xb);a.Hj[b]=d}
|
function ki(a,b,c,d,e){Vh(a.Ta[b>>2].Bb[b&3],c,d,e)}function ei(a,b,c){b=a.Ta[b>>2].Bb[b&3];b.Jg&&b.gi&&b.jh?(c&&(b.Lg=c),b.Cd||id(a,b,!0)):c&&c(!0)}
|
||||||
function ki(a,b,c,d,e){Wh(a.Ra[b>>2].yb[b&3],c,d,e)}function ei(a,b,c){b=a.Ra[b>>2].yb[b&3];b.Jg&&b.fi&&b.ih?(c&&(b.Lg=c),b.zd||id(a,b,!0)):c&&c(!0)}
|
function id(a,b,c){c&&(b.count=b.Wb[1]<<8|b.Wb[0],b.Sl=b.mode&12,b.jk=b.ed=!1);for(var d=!1;0<=b.count&&(c=b.Eg<<16|b.Nb[1]<<8|b.Nb[0],4==b.Sl?(d=!0,function(c){b.gi.call(b.Jg,b.jh,-1,function(f,g){0>f&&(b.jk||(b.jk=!0),f=255);b.Cd||fb(a.la,c,f);(d=g)&&setTimeout(function(){li(b)||id(a,b)},0)})}(c)):8==b.Sl?(c=cb(a.la,c),0>b.gi.call(b.Jg,b.jh,c)&&(b.ed=!0)):b.ed=!0),!d&&!li(b););}
|
||||||
function id(a,b,c){c&&(b.count=b.Tb[1]<<8|b.Tb[0],b.Ql=b.mode&12,b.gk=b.ad=!1);for(var d=!1;0<=b.count&&(c=b.Eg<<16|b.Kb[1]<<8|b.Kb[0],4==b.Ql?(d=!0,function(c){b.fi.call(b.Jg,b.ih,-1,function(f,g){0>f&&(b.gk||(b.gk=!0),f=255);b.zd||eb(a.la,c,f);(d=g)&&setTimeout(function(){li(b)||id(a,b)},0)})}(c)):8==b.Ql?(c=cb(a.la,c),0>b.fi.call(b.Jg,b.ih,c)&&(b.ad=!0)):b.ad=!0),!d&&!li(b););}
|
function li(a){if(!a.ed&&0<=--a.count&&(a.mode&32?(a.Nb[0]--,0>a.Nb[0]&&(a.Nb[0]=255,a.Nb[1]--,0>a.Nb[1]&&(a.Nb[1]=255))):(a.Nb[0]++,255<a.Nb[0]&&(a.Nb[0]=0,a.Nb[1]++,255<a.Nb[1]&&(a.Nb[1]=0))),!a.Cd))return!1;var b=a.ha;b.bd=b.bd&~(16<<a.pk)|1<<a.pk;a.mode&16||(a.Cd=!0,a.Jg=a.jh=null);a.Lg&&(a.Lg(!a.ed),a.Lg=null);return!0}function mi(a,b,c){var d=0,e=a.mb[b];if(void 0!==e.Bf)switch(e.Bf&3){case 2:d=e.Eb;break;case 3:d=e.wc}a.ca(e.port,null,c,"PIC"+b,Q.Le,d);return d}
|
||||||
function li(a){if(!a.ad&&0<=--a.count&&(a.mode&32?(a.Kb[0]--,0>a.Kb[0]&&(a.Kb[0]=255,a.Kb[1]--,0>a.Kb[1]&&(a.Kb[1]=255))):(a.Kb[0]++,255<a.Kb[0]&&(a.Kb[0]=0,a.Kb[1]++,255<a.Kb[1]&&(a.Kb[1]=0))),!a.zd))return!1;var b=a.ha;b.Qd=b.Qd&~(16<<a.mk)|1<<a.mk;a.mode&16||(a.zd=!0,a.Jg=a.ih=null);a.Lg&&(a.Lg(!a.ad),a.Lg=null);return!0}function mi(a,b,c){var d=0,e=a.lb[b];if(void 0!==e.Bf)switch(e.Bf&3){case 2:d=e.Bb;break;case 3:d=e.uc}a.ca(e.port,null,c,"PIC"+b,Q.Le,d);return d}
|
function ni(a,b,c,d){var e=a.mb[b];a.ca(e.port,c,d,"PIC"+b,Q.Le);if(c&16)e.Fd=0,e.md[e.Fd++]=c,e.sd=0,e.re=7,e.Eb=e.wc=0,e.Bf=10;else if(c&8)e.Bf=c;else{var f=c&224;if(f&32){d=0;if(96==(f&96))d=1<<(c&7);else for(c=e.re+1;;){c&=7;f=1<<c;if(e.wc&f){d=f;break}if(c++==e.re)break}e.wc&d&&(e.wc&=~d,oi(a,b))}else 192==f&&(e.re=c&7)}}function pi(a,b,c){var d=a.mb[b],e=d.sd;a.ca(d.port+1,null,c,"PIC"+b,Q.Le,e);return e}
|
||||||
function ni(a,b,c,d){var e=a.lb[b];a.ca(e.port,c,d,"PIC"+b,Q.Le);if(c&16)e.Cd=0,e.jd[e.Cd++]=c,e.pd=0,e.re=7,e.Bb=e.uc=0,e.Bf=10;else if(c&8)e.Bf=c;else{var f=c&224;if(f&32){d=0;if(96==(f&96))d=1<<(c&7);else for(c=e.re+1;;){c&=7;f=1<<c;if(e.uc&f){d=f;break}if(c++==e.re)break}e.uc&d&&(e.uc&=~d,oi(a,b))}else 192==f&&(e.re=c&7)}}function pi(a,b,c){var d=a.lb[b],e=d.pd;a.ca(d.port+1,null,c,"PIC"+b,Q.Le,e);return e}
|
function qi(a,b,c,d){var e=a.mb[b];a.ca(e.port+1,c,d,"PIC"+b,Q.Le);e.Fd<e.md.length?(e.md[e.Fd++]=c,2==e.Fd&&e.md[0]&2&&e.Fd++,3!=e.Fd||e.md[0]&1||e.Fd++):(e.sd=c,d=a.S,d.Z|=4,oi(a,b,b||253!=c?0:6))}function oi(a,b,c){b=a.mb[b];var d=((b.wc|b.sd)^255)&b.Eb;a=a.S;a.ma&&(a.cb=d?a.cb|1:a.cb&-2);d&&c&&(b.Wf=c)}function ri(a,b,c){var d=b>>3,e=a.mb[d];e.Eb|=1<<(b&7);e.Wf=c||0;1==d&&(a.mb[0].Eb|=4);oi(a,d)}
|
||||||
function qi(a,b,c,d){var e=a.lb[b];a.ca(e.port+1,c,d,"PIC"+b,Q.Le);e.Cd<e.jd.length?(e.jd[e.Cd++]=c,2==e.Cd&&e.jd[0]&2&&e.Cd++,3!=e.Cd||e.jd[0]&1||e.Cd++):(e.pd=c,d=a.S,d.Z|=4,oi(a,b,b||253!=c?0:6))}function oi(a,b,c){b=a.lb[b];var d=((b.uc|b.pd)^255)&b.Bb;a=a.S;a.ma&&(a.bb=d?a.bb|1:a.bb&-2);d&&c&&(b.Wf=c)}function ri(a,b,c){var d=b>>3,e=a.lb[d];e.Bb|=1<<(b&7);e.Wf=c||0;1==d&&(a.lb[0].Bb|=4);oi(a,d)}
|
function si(a,b){var c=b>>3,d=a.mb[c],e=1<<(b&7);d.Eb&e&&(d.Eb&=~e,1!=c||d.Eb||(a.mb[0].Eb&=-5),oi(a,c))}function gd(a,b){void 0===b&&(b=0);var c=-1,d=a.mb[b];if(d.Wf)c=-2,d.Wf--;else for(var e=d.Eb&((d.wc|d.sd)^255),f=d.re+1;;){var f=f&7,g=1<<f;if(e&g){c=b||2!=f?d.md[1]+f:gd(a,1);0<=c&&(d.wc|=g,d.Eb&=~g);break}if(f++==d.re)break}return c}function ti(a,b,c){var d;d=a.Cb[b];d.Wd==d.cd&&ui(a,b);if(d.Lf)return d.If[d.Wd++];Gh(a,b);d=d.Wb[d.Wd++];a.ca(64+b,null,c,"TIMER"+b,Q.Me,d);return d}
|
||||||
function si(a,b){var c=b>>3,d=a.lb[c],e=1<<(b&7);d.Bb&e&&(d.Bb&=~e,1!=c||d.Bb||(a.lb[0].Bb&=-5),oi(a,c))}function gd(a,b){void 0===b&&(b=0);var c=-1,d=a.lb[b];if(d.Wf)c=-2,d.Wf--;else for(var e=d.Bb&((d.uc|d.pd)^255),f=d.re+1;;){var f=f&7,g=1<<f;if(e&g){c=b||2!=f?d.jd[1]+f:gd(a,1);0<=c&&(d.uc|=g,d.Bb&=~g);break}if(f++==d.re)break}return c}function ti(a,b,c){var d;d=a.zb[b];d.Td==d.Zc&&ui(a,b);if(d.Lf)return d.If[d.Td++];Hh(a,b);d=d.Tb[d.Td++];a.ca(64+b,null,c,"TIMER"+b,Q.Me,d);return d}
|
function vi(a,b,c,d){a.ca(64+b,c,d,"TIMER"+b,Q.Me);d=a.Cb[b];d.Wd==d.cd&&ui(a,b);d.zc[d.Wd++]=c;if(d.Wd==d.cd){d.Xe&&0!=d.mode&&8!=d.mode||(d.Lf=!1,d.Wb[0]=d.Pc[0]=d.zc[0],d.Wb[1]=d.Pc[1]=d.zc[1],d.fe=F(a.S,a.Sg),d.Xe=!0,d.fd=0!=d.mode,0==b&&si(a,0));2==b&&Mb(a);if(0==b){var e=wi(a,0);2048<=e&&(a.S.dh=Math.round(65536/e))}0==b&&0==d.mode&&16==d.hg&&(b=a.S,b.Ib&&(a=b.A-c*a.zl,b.A-=a,b.Rc-=a))}}k.gn=function(a,b){this.ca(a,null,b,"TIMER_CTRL",Q.Me);return null};
|
||||||
function vi(a,b,c,d){a.ca(64+b,c,d,"TIMER"+b,Q.Me);d=a.zb[b];d.Td==d.Zc&&ui(a,b);d.xc[d.Td++]=c;if(d.Td==d.Zc){d.Xe&&0!=d.mode&&8!=d.mode||(d.Lf=!1,d.Tb[0]=d.Mc[0]=d.xc[0],d.Tb[1]=d.Mc[1]=d.xc[1],d.ee=F(a.S,a.Sg),d.Xe=!0,d.bd=0!=d.mode,0==b&&si(a,0));2==b&&Mb(a);if(0==b){var e=wi(a,0);2048<=e&&(a.S.dh=Math.round(65536/e))}0==b&&0==d.mode&&16==d.hg&&(b=a.S,b.Fb&&(a=b.A-c*a.xl,b.A-=a,b.Oc-=a))}}k.gn=function(a,b){this.ca(a,null,b,"TIMER_CTRL",Q.Me);return null};
|
k.so=function(a,b,c){this.ca(a,b,c,"TIMER_CTRL",Q.Me);this.Jh=b;a=(b&192)>>6;if(3!=a){c=b&1;var d=b&14;if(b&=48){var e=this.Cb[a];e.hg=b;e.mode=d;e.Sj=c;e.zc=[0,0];e.Wb=[0,0];e.If=[0,0];e.fd=!1;e.Lf=!1;e.Xe=!1;ui(this,a);0==a&&si(this,0);2==a&&255==this.mb[0].sd&&77==this.ac&&(a=this.Cb[0],a.Pc[0]=a.zc[0],a.Pc[1]=a.zc[1],a.fe=F(this.S,this.Sg))}else Gh(this,a),b=this.Cb[a],b.If[0]=b.Wb[0],b.If[1]=b.Wb[1],b.Lf=!0,ui(this,a)}};
|
||||||
k.ro=function(a,b,c){this.ca(a,b,c,"TIMER_CTRL",Q.Me);this.Ih=b;a=(b&192)>>6;if(3!=a){c=b&1;var d=b&14;if(b&=48){var e=this.zb[a];e.hg=b;e.mode=d;e.Pj=c;e.xc=[0,0];e.Tb=[0,0];e.If=[0,0];e.bd=!1;e.Lf=!1;e.Xe=!1;ui(this,a);0==a&&si(this,0);2==a&&255==this.lb[0].pd&&77==this.Yb&&(a=this.zb[0],a.Mc[0]=a.xc[0],a.Mc[1]=a.xc[1],a.ee=F(this.S,this.Sg))}else Hh(this,a),b=this.zb[a],b.If[0]=b.Tb[0],b.If[1]=b.Tb[1],b.Lf=!0,ui(this,a)}};
|
function wi(a,b){var c=a.Cb[b],d=c.zc[1]<<8|c.zc[0];d||(d=1==c.cd?256:65536);return d}function ui(a,b){var c=a.Cb[b];c.Wd=32==c.hg?1:0;c.cd=48==c.hg?2:1}
|
||||||
function wi(a,b){var c=a.zb[b],d=c.xc[1]<<8|c.xc[0];d||(d=1==c.Zc?256:65536);return d}function ui(a,b){var c=a.zb[b];c.Td=32==c.hg?1:0;c.Zc=48==c.hg?2:1}
|
function Gh(a,b,c){var d=a.Cb[b];if(d.Xe&&(2!=b||a.ac&1)){var e=F(a.S,a.Sg),f=(e-d.fe)/a.zl|0;0>f&&(d.fe=e,f=0);var g=wi(a,b),h=a.Cb[b],m=h.Pc[1]<<8|h.Pc[0];m||(m=1==h.cd?256:65536);h=m-f;0==d.mode?(0>=h&&(h=0),h||(d.fd=!0,d.Xe=!1,b||ri(a,0))):4==d.mode?(d.fd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8,d.fe=e,!b&&d.fd&&ri(a,0))):6==d.mode&&(h-=f,0>=h&&(d.fd=!d.fd,h=g+h,0>=h&&(h=g),d.Pc[0]=h&255,d.Pc[1]=h>>8,d.fe=e,!b&&d.fd&&ri(a,0)));d.Wb[0]=h&255;d.Wb[1]=h>>8;c&&(a.fe=0)}return d}
|
||||||
function Hh(a,b,c){var d=a.zb[b];if(d.Xe&&(2!=b||a.Yb&1)){var e=F(a.S,a.Sg),f=(e-d.ee)/a.xl|0;0>f&&(d.ee=e,f=0);var g=wi(a,b),h=a.zb[b],m=h.Mc[1]<<8|h.Mc[0];m||(m=1==h.Zc?256:65536);h=m-f;0==d.mode?(0>=h&&(h=0),h||(d.bd=!0,d.Xe=!1,b||ri(a,0))):4==d.mode?(d.bd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8,d.ee=e,!b&&d.bd&&ri(a,0))):6==d.mode&&(h-=f,0>=h&&(d.bd=!d.bd,h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8,d.ee=e,!b&&d.bd&&ri(a,0)));d.Tb[0]=h&255;d.Tb[1]=h>>8;c&&(a.ee=0)}return d}
|
function Nb(a,b){for(var c=0;c<a.Cb.length;c++)Gh(a,c,b);if(a.Ea>=Bh){var c=0,d=a.S.Ed,e=F(a.S,a.Sg);if(0<=a.Rf&&(c=e-a.Rf,Math.floor(c/d)&&60<=++a.ra[0]&&(a.ra[0]=0,60<=++a.ra[2]&&(a.ra[2]=0,24<=++a.ra[4])))){a.ra[4]=0;a.ra[6]=a.ra[6]%7+1;var f=a.ra[9],g=na[a.ra[8]-1];28==g&&0===f%4&&(f%100||0===f%400)&&g++;++a.ra[7]>g&&(a.ra[7]=1,12<++a.ra[8]&&(a.ra[8]=1,a.ra[9]=(a.ra[9]+1)%100))}a.Rf=e-c%d}}
|
||||||
function Nb(a,b){for(var c=0;c<a.zb.length;c++)Hh(a,c,b);if(a.Ha>=Bh){var c=0,d=a.S.Bd,e=F(a.S,a.Sg);if(0<=a.Rf&&(c=e-a.Rf,Math.floor(c/d)&&60<=++a.ra[0]&&(a.ra[0]=0,60<=++a.ra[2]&&(a.ra[2]=0,24<=++a.ra[4])))){a.ra[4]=0;a.ra[6]=a.ra[6]%7+1;var f=a.ra[9],g=na[a.ra[8]-1];28==g&&0===f%4&&(f%100||0===f%400)&&g++;++a.ra[7]>g&&(a.ra[7]=1,12<++a.ra[8]&&(a.ra[8]=1,a.ra[9]=(a.ra[9]+1)%100))}a.Rf=e-c%d}}function xi(a,b){var c=!!(b&2),d=!!(a.Yb&2);a.Yb=b;c!=d&&Mb(a,c)}
|
k.Zm=function(a,b){var c=this.Dg;this.Cf&16&&(this.ac&128?c=this.Xc:this.jb&&(c=xi(this.jb)));this.ca(a,null,b,"PPI_A",Q.Ka,c);return c};k.lo=function(a,b,c){this.ca(a,b,c,"PPI_A",Q.Ka);this.Dg=b};k.$m=function(a,b){var c=this.ac;this.ca(a,null,b,"PPI_B",Q.Ka,c);return c};k.mo=function(a,b,c){this.ca(a,b,c,"PPI_B",Q.Ka);yi(this,b);this.jb&&(a=this.jb,c=b&128?!1:!0,b=b&64?!0:!1,a.Yh!==b&&(a.Yh=a.gk=b),a.$h!==c&&(a.$h=c))&&(a.gk?(zi(a),a.gk=!1):Ai(a))};
|
||||||
k.Zm=function(a,b){var c=this.Dg;this.Cf&16&&(this.Yb&128?c=this.Uc:this.ib&&(c=yi(this.ib)));this.ca(a,null,b,"PPI_A",Q.Va,c);return c};k.ko=function(a,b,c){this.ca(a,b,c,"PPI_A",Q.Va);this.Dg=b};k.$m=function(a,b){var c=this.Yb;this.ca(a,null,b,"PPI_B",Q.Va,c);return c};k.lo=function(a,b,c){this.ca(a,b,c,"PPI_B",Q.Va);xi(this,b);this.ib&&(a=this.ib,c=b&128?!1:!0,b=b&64?!0:!1,a.Xh!==b&&(a.Xh=a.dk=b),a.Zh!==c&&(a.Zh=c))&&(a.dk?(zi(a),a.dk=!1):Ai(a))};
|
function yi(a,b){var c=!!(b&2),d=!!(a.ac&2);a.ac=b;c!=d&&Mb(a,c)}k.an=function(a,b){var c=0,c=this.Ea==xh?this.ac&4?c|this.Ie&15:c|this.Ie>>4&1:this.ac&8?c|this.Xc>>4:c|this.Xc&15;this.ac&1&&Gh(this,2).fd&&(c=this.ac&2?c|32:c|16);this.ca(a,null,b,"PPI_C",Q.Bj|Q.Ka,c);return c};k.no=function(a,b,c){this.ca(a,b,c,"PPI_C",Q.Ka);this.Hh=b};k.bn=function(a,b){var c=this.Cf;this.ca(a,null,b,"PPI_CTRL",Q.Ka,c);return c};k.oo=function(a,b,c){this.ca(a,b,c,"PPI_CTRL",Q.Ka);this.Cf=b};
|
||||||
k.an=function(a,b){var c=0,c=this.Ha==xh?this.Yb&4?c|this.Ie&15:c|this.Ie>>4&1:this.Yb&8?c|this.Uc>>4:c|this.Uc&15;this.Yb&1&&Hh(this,2).bd&&(c=this.Yb&2?c|32:c|16);this.ca(a,null,b,"PPI_C",Q.zj|Q.Va,c);return c};k.mo=function(a,b,c){this.ca(a,b,c,"PPI_C",Q.Va);this.Gh=b};k.bn=function(a,b){var c=this.Cf;this.ca(a,null,b,"PPI_CTRL",Q.Va,c);return c};k.no=function(a,b,c){this.ca(a,b,c,"PPI_CTRL",Q.Va);this.Cf=b};
|
k.sm=function(a,b){var c=this.yg;this.ca(a,null,b,"8042_OUTBUFF",Q.Ka,c);this.bb&=-258;var d=this.jb&&xi(this.jb,!0);d&&Bi(this,d);return c};k.Hn=function(a,b,c){this.ca(a,b,c,"8042_INBUF.DATA",Q.Ka);if(this.bb&8)switch(this.rd){case 96:this.vc=b;this.bb=this.bb&-5|b&4;break;case 209:Ci(this,b);break;default:if(this.vc&=-17,this.jb){a=-1;switch(b){case 255:a=250,zi(this.jb)}Bi(this,a)}}this.rd=b;this.bb&=-9};k.tm=function(a,b){var c=this.ac&-193;this.ca(a,null,b,"8042_RWREG",Q.Ka,c);this.ac^=16;return c};
|
||||||
k.um=function(a,b){var c=this.yg;this.ca(a,null,b,"8042_OUTBUFF",Q.Va,c);this.ab&=-258;var d=this.ib&&yi(this.ib,!0);d&&Bi(this,d);return c};k.Hn=function(a,b,c){this.ca(a,b,c,"8042_INBUF.DATA",Q.Va);if(this.ab&8)switch(this.od){case 96:this.sc=b;this.ab=this.ab&-5|b&Dh.Dj;break;case 209:Ci(this,b);break;default:if(this.sc&=~Dh.je,this.ib){a=-1;switch(b){case 255:a=250,zi(this.ib)}Bi(this,a)}}this.od=b;this.ab&=-9};
|
k.In=function(a,b,c){this.ca(a,b,c,"8042_RWREG",Q.Ka);yi(this,b)};k.um=function(a,b){this.ca(a,null,b,"8042_STATUS",Q.Ka,this.bb);var c=this.bb&255;this.bb&256&&(this.bb|=1,this.bb&=-257);return c};
|
||||||
k.vm=function(a,b){var c=this.Yb&-193;this.ca(a,null,b,"8042_RWREG",Q.Va,c);this.Yb^=16;return c};k.In=function(a,b,c){this.ca(a,b,c,"8042_RWREG",Q.Va);xi(this,b)};k.wm=function(a,b){this.ca(a,null,b,"8042_STATUS",Q.Va,this.ab);var c=this.ab&255;this.ab&256&&(this.ab|=1,this.ab&=-257);return c};
|
k.Gn=function(a,b,c){this.ca(a,b,c,"8042_INBUFF.CMD",Q.Ka);this.rd=b;this.bb|=8;a=0;240<=this.rd&&(a=this.rd^15,this.rd=240);switch(this.rd){case 192:Bi(this,this.pe);break;case 173:this.vc|=16;break;case 174:this.vc&=-17;break;case 170:this.jb&&Ai(this.jb,!0);this.vc|=16;Bi(this,85);Ci(this,3);break;case 224:Bi(this,this.vc&16?0:1);break;case 240:a&1&&xc(this.S)}};function Bi(a,b){0<=b&&(a.yg=b,a.bb&=-2,a.bb|=256)}function Ci(a,b){a.Eh=b;Za(a.la,!!(b&2));b&1||xc(a.S)}
|
||||||
k.Gn=function(a,b,c){this.ca(a,b,c,"8042_INBUFF.CMD",Q.Va);this.od=b;this.ab|=8;a=0;240<=this.od&&(a=this.od^15,this.od=240);switch(this.od){case 192:Bi(this,this.pe);break;case 173:this.sc|=Dh.je;break;case 174:this.sc&=~Dh.je;break;case 170:this.ib&&Ai(this.ib,!0);this.sc|=Dh.je;Bi(this,85);Ci(this,3);break;case 224:Bi(this,this.sc&Dh.je?0:1);break;case 240:a&1&&xc(this.S)}};function Bi(a,b){0<=b&&(a.yg=b,a.ab&=-2,a.ab|=256)}function Ci(a,b){a.Dh=b;Za(a.la,!!(b&2));b&1||xc(a.S)}
|
k.Am=function(a,b){this.ca(a,null,b,"CMOS_ADDR",Q.Ka,this.qe);return this.qe};k.Nn=function(a,b,c){this.ca(a,b,c,"CMOS_ADDR",Q.Ka);this.qe=b;this.Cg=b&128?0:128};k.Bm=function(a,b){var c=this.qe&63,d;if(13>=c)if(d=this.ra[c],10>c){var e=!1;4!=c&&5!=c||this.ra[11]&2||(d=12>d?d?d:12:(d-=12)?d+128:140,e=!0);this.ra[11]&4||(e&&128<d&&(d-=48),d=d%10|d/10<<4)}else 10==c&&(this.ra[c]^=128);else d=this.ra[c];this.ca(a,null,b,"CMOS_DATA["+p(c)+"]",Q.Ka,d);return d};
|
||||||
k.Cm=function(a,b){this.ca(a,null,b,"CMOS_ADDR",Q.Va,this.qe);return this.qe};k.Nn=function(a,b,c){this.ca(a,b,c,"CMOS_ADDR",Q.Va);this.qe=b;this.Cg=b&128?0:128};k.Dm=function(a,b){var c=this.qe&63,d;if(13>=c)if(d=this.ra[c],10>c){var e=!1;4!=c&&5!=c||this.ra[11]&2||(d=12>d?d?d:12:(d-=12)?d+128:140,e=!0);this.ra[11]&4||(e&&128<d&&(d-=48),d=d%10|d/10<<4)}else 10==c&&(this.ra[c]^=128);else d=this.ra[c];this.ca(a,null,b,"CMOS_DATA["+p(c)+"]",Q.Va,d);return d};
|
k.On=function(a,b,c){var d=this.qe&63;this.ca(a,b,c,"CMOS_DATA["+p(d)+"]",Q.Ka);a=this.ra;13>=d&&10>d&&(c=!1,this.ra[11]&4||(b=10*(b>>4)+(b&15),c=!0),4==d||5==d)&&(c&&12<b&&(b+=48),this.ra[11]&2||(12>=b?b=12==b?0:b:(b-=116,b=24==b?12:b)));a[d]=b};k.Xm=function(a,b){this.ca(a,null,b,"MFG_DATA",Q.Ka,this.Gh);return this.Gh};k.io=function(a,b,c){this.ca(a,b,c,"MFG_DATA",Q.Ka);this.Gh=b};k.ko=function(a,b,c){this.ca(a,b,c,"NMI",Q.Ka);this.Cg=b};
|
||||||
k.On=function(a,b,c){var d=this.qe&63;this.ca(a,b,c,"CMOS_DATA["+p(d)+"]",Q.Va);a=this.ra;13>=d&&10>d&&(c=!1,this.ra[11]&4||(b=10*(b>>4)+(b&15),c=!0),4==d||5==d)&&(c&&12<b&&(b+=48),this.ra[11]&2||(12>=b?b=12==b?0:b:(b-=116,b=24==b?12:b)));a[d]=b};k.Xm=function(a,b){this.ca(a,null,b,"MFG_DATA",Q.Va,this.Fh);return this.Fh};k.ho=function(a,b,c){this.ca(a,b,c,"MFG_DATA",Q.Va);this.Fh=b};k.jo=function(a,b,c){this.ca(a,b,c,"NMI",Q.Va);this.Cg=b};
|
k.Mm=function(a,b){var c=this.oj.Mj;this.ca(a,null,b,"HFC_CTRL",Q.Ka,c);return c};k.$n=function(a,b,c){this.ca(a,b,c,"HFC_CTRL",Q.Ka);this.oj.Mj=b};k.Nm=function(a,b){var c=this.oj.bd;this.ca(a,null,b,"HFC_STATUS",Q.Ka,c);return c};function yh(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}
|
||||||
function yh(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}
|
function Mb(a,b){if(a.Mh){void 0!==b?a.ik=b:b=a.ik&&a.S&&a.S.Ib;var c=Math.round(1193181/wi(a,2));if(20>c||2E4<c)b=!1;b?a.kd?(a.kd.frequency.value=c,a.Da("speaker set to "+c+"hz",Q.rg)):(a.kd=a.Mh.createOscillator(),a.kd.type=1,a.kd.connect(a.Mh.destination),a.kd.frequency.value=c,a.Da("speaker on at "+c+"hz",Q.rg),a.kd.noteOn(0)):a.kd&&(a.kd.noteOff(0),a.kd.disconnect(),delete a.kd,a.Da("speaker off at "+c+"hz",Q.rg))}else b&&a.Da("BEEP",Q.rg)}
|
||||||
function Mb(a,b){if(a.Lh){void 0!==b?a.fk=b:b=a.fk&&a.S&&a.S.Fb;var c=Math.round(1193181/wi(a,2));if(20>c||2E4<c)b=!1;b?a.gd?(a.gd.frequency.value=c,a.Da("speaker set to "+c+"hz",Q.rg)):(a.gd=a.Lh.createOscillator(),a.gd.type=1,a.gd.connect(a.Lh.destination),a.gd.frequency.value=c,a.Da("speaker on at "+c+"hz",Q.rg),a.gd.noteOn(0)):a.gd&&(a.gd.noteOff(0),a.gd.disconnect(),delete a.gd,a.Da("speaker off at "+c+"hz",Q.rg))}else b&&a.Da("BEEP",Q.rg)}
|
k.Da=function(a,b,c){this.aa&&(null==b&&(b=Q.Ka),void 0!==c&&(b|=0==c?Q.Me:1==c?Q.Aj:6==c?Q.qg:0),M(this.aa,b)&&this.aa.message(a))};k.ca=function(a,b,c,d,e,f){this.aa&&(null==e&&(e=Q.Ka),this.aa.ca(this,a,b,c,d,e,f))};
|
||||||
k.Da=function(a,b,c){this.aa&&(null==b&&(b=Q.Va),void 0!==c&&(b|=0==c?Q.Me:1==c?Q.yj:6==c?Q.qg:0),M(this.aa,b)&&this.aa.message(a))};k.ca=function(a,b,c,d,e,f){this.aa&&(null==e&&(e=Q.Va),this.aa.ca(this,a,b,c,d,e,f))};
|
var Hh={0:function(a,b){return Yh(this,0,0,a,b)},1:function(a,b){return $h(this,0,0,a,b)},2:function(a,b){return Yh(this,0,1,a,b)},3:function(a,b){return $h(this,0,1,a,b)},4:function(a,b){return Yh(this,0,2,a,b)},5:function(a,b){return $h(this,0,2,a,b)},6:function(a,b){return Yh(this,0,3,a,b)},7:function(a,b){return $h(this,0,3,a,b)},8:function(a,b){return bi(this,0,a,b)},32:function(a,b){return mi(this,0,b)},33:function(a,b){return pi(this,0,b)},64:function(a,b){return ti(this,0,b)},65:function(a,
|
||||||
var Ih={0:function(a,b){return Yh(this,0,0,a,b)},1:function(a,b){return $h(this,0,0,a,b)},2:function(a,b){return Yh(this,0,1,a,b)},3:function(a,b){return $h(this,0,1,a,b)},4:function(a,b){return Yh(this,0,2,a,b)},5:function(a,b){return $h(this,0,2,a,b)},6:function(a,b){return Yh(this,0,3,a,b)},7:function(a,b){return $h(this,0,3,a,b)},8:function(a,b){return bi(this,0,a,b)},32:function(a,b){return mi(this,0,b)},33:function(a,b){return pi(this,0,b)},64:function(a,b){return ti(this,0,b)},65:function(a,
|
b){return ti(this,1,b)},66:function(a,b){return ti(this,2,b)},67:Q.prototype.gn,129:function(a,b){return gi(this,0,2,a,b)},130:function(a,b){return gi(this,0,3,a,b)},131:function(a,b){return gi(this,0,1,a,b)},135:function(a,b){return gi(this,0,0,a,b)}},Jh={96:Q.prototype.Zm,97:Q.prototype.$m,98:Q.prototype.an,99:Q.prototype.bn},Lh={96:Q.prototype.sm,97:Q.prototype.tm,100:Q.prototype.um,112:Q.prototype.Am,113:Q.prototype.Bm,128:Q.prototype.Xm,132:function(a,b){return ii(this,0,a,b)},133:function(a,
|
||||||
b){return ti(this,1,b)},66:function(a,b){return ti(this,2,b)},67:Q.prototype.gn,129:function(a,b){return gi(this,0,2,a,b)},130:function(a,b){return gi(this,0,3,a,b)},131:function(a,b){return gi(this,0,1,a,b)},135:function(a,b){return gi(this,0,0,a,b)}},Kh={96:Q.prototype.Zm,97:Q.prototype.$m,98:Q.prototype.an,99:Q.prototype.bn},Mh={96:Q.prototype.um,97:Q.prototype.vm,100:Q.prototype.wm,112:Q.prototype.Cm,113:Q.prototype.Dm,128:Q.prototype.Xm,132:function(a,b){return ii(this,0,a,b)},133:function(a,
|
|
||||||
b){return ii(this,1,a,b)},134:function(a,b){return ii(this,2,a,b)},136:function(a,b){return ii(this,3,a,b)},137:function(a,b){return gi(this,1,2,a,b)},138:function(a,b){return gi(this,1,3,a,b)},139:function(a,b){return gi(this,1,1,a,b)},140:function(a,b){return ii(this,4,a,b)},141:function(a,b){return ii(this,5,a,b)},142:function(a,b){return ii(this,6,a,b)},143:function(a,b){return gi(this,1,0,a,b)},160:function(a,b){return mi(this,1,b)},161:function(a,b){return pi(this,1,b)},192:function(a,b){return Yh(this,
|
b){return ii(this,1,a,b)},134:function(a,b){return ii(this,2,a,b)},136:function(a,b){return ii(this,3,a,b)},137:function(a,b){return gi(this,1,2,a,b)},138:function(a,b){return gi(this,1,3,a,b)},139:function(a,b){return gi(this,1,1,a,b)},140:function(a,b){return ii(this,4,a,b)},141:function(a,b){return ii(this,5,a,b)},142:function(a,b){return ii(this,6,a,b)},143:function(a,b){return gi(this,1,0,a,b)},160:function(a,b){return mi(this,1,b)},161:function(a,b){return pi(this,1,b)},192:function(a,b){return Yh(this,
|
||||||
1,0,a,b)},194:function(a,b){return $h(this,1,0,a,b)},196:function(a,b){return Yh(this,1,1,a,b)},198:function(a,b){return $h(this,1,1,a,b)},200:function(a,b){return Yh(this,1,2,a,b)},202:function(a,b){return $h(this,1,2,a,b)},204:function(a,b){return Yh(this,1,3,a,b)},206:function(a,b){return $h(this,1,3,a,b)},208:function(a,b){return bi(this,1,a,b)},503:function(){return 127}},Jh={0:function(a,b,c){Zh(this,0,0,a,b,c)},1:function(a,b,c){ai(this,0,0,a,b,c)},2:function(a,b,c){Zh(this,0,1,a,b,c)},3:function(a,
|
1,0,a,b)},194:function(a,b){return $h(this,1,0,a,b)},196:function(a,b){return Yh(this,1,1,a,b)},198:function(a,b){return $h(this,1,1,a,b)},200:function(a,b){return Yh(this,1,2,a,b)},202:function(a,b){return $h(this,1,2,a,b)},204:function(a,b){return Yh(this,1,3,a,b)},206:function(a,b){return $h(this,1,3,a,b)},208:function(a,b){return bi(this,1,a,b)},500:Q.prototype.Mm,503:Q.prototype.Nm},Ih={0:function(a,b,c){Zh(this,0,0,a,b,c)},1:function(a,b,c){ai(this,0,0,a,b,c)},2:function(a,b,c){Zh(this,0,1,
|
||||||
b,c){ai(this,0,1,a,b,c)},4:function(a,b,c){Zh(this,0,2,a,b,c)},5:function(a,b,c){ai(this,0,2,a,b,c)},6:function(a,b,c){Zh(this,0,3,a,b,c)},7:function(a,b,c){ai(this,0,3,a,b,c)},8:function(a,b,c){this.ca(a,b,c,"DMA0.CMD",Q.xb);this.Ra[0].Eh=b},9:function(a,b,c){ci(this,0,a,b,c)},10:function(a,b,c){di(this,0,a,b,c)},11:function(a,b,c){this.ca(a,b,c,"DMA0.MODE",Q.xb);this.Ra[0].yb[b&3].mode=b},12:function(a,b,c){this.ca(a,b,c,"DMA0.INDEX",Q.xb);this.Ra[0].gb=0},13:function(a,b,c){fi(this,0,a,b,c)},32:function(a,
|
a,b,c)},3:function(a,b,c){ai(this,0,1,a,b,c)},4:function(a,b,c){Zh(this,0,2,a,b,c)},5:function(a,b,c){ai(this,0,2,a,b,c)},6:function(a,b,c){Zh(this,0,3,a,b,c)},7:function(a,b,c){ai(this,0,3,a,b,c)},8:function(a,b,c){this.ca(a,b,c,"DMA0.CMD",Q.zb);this.Ta[0].Fh=b},9:function(a,b,c){ci(this,0,a,b,c)},10:function(a,b,c){di(this,0,a,b,c)},11:function(a,b,c){this.ca(a,b,c,"DMA0.MODE",Q.zb);this.Ta[0].Bb[b&3].mode=b},12:function(a,b,c){this.ca(a,b,c,"DMA0.INDEX",Q.zb);this.Ta[0].hb=0},13:function(a,b,c){fi(this,
|
||||||
b,c){ni(this,0,b,c)},33:function(a,b,c){qi(this,0,b,c)},64:function(a,b,c){vi(this,0,b,c)},65:function(a,b,c){vi(this,1,b,c)},66:function(a,b,c){vi(this,2,b,c)},67:Q.prototype.ro,129:function(a,b,c){hi(this,0,2,a,b,c)},130:function(a,b,c){hi(this,0,3,a,b,c)},131:function(a,b,c){hi(this,0,1,a,b,c)},135:function(a,b,c){hi(this,0,0,a,b,c)}},Lh={96:Q.prototype.ko,97:Q.prototype.lo,98:Q.prototype.mo,99:Q.prototype.no,160:Q.prototype.jo},Nh={96:Q.prototype.Hn,97:Q.prototype.In,100:Q.prototype.Gn,112:Q.prototype.Nn,
|
0,a,b,c)},32:function(a,b,c){ni(this,0,b,c)},33:function(a,b,c){qi(this,0,b,c)},64:function(a,b,c){vi(this,0,b,c)},65:function(a,b,c){vi(this,1,b,c)},66:function(a,b,c){vi(this,2,b,c)},67:Q.prototype.so,129:function(a,b,c){hi(this,0,2,a,b,c)},130:function(a,b,c){hi(this,0,3,a,b,c)},131:function(a,b,c){hi(this,0,1,a,b,c)},135:function(a,b,c){hi(this,0,0,a,b,c)}},Kh={96:Q.prototype.lo,97:Q.prototype.mo,98:Q.prototype.no,99:Q.prototype.oo,160:Q.prototype.ko},Mh={96:Q.prototype.Hn,97:Q.prototype.In,100:Q.prototype.Gn,
|
||||||
113:Q.prototype.On,128:Q.prototype.ho,132:function(a,b,c){ji(this,0,a,b,c)},133:function(a,b,c){ji(this,1,a,b,c)},134:function(a,b,c){ji(this,2,a,b,c)},136:function(a,b,c){ji(this,3,a,b,c)},137:function(a,b,c){hi(this,1,2,a,b,c)},138:function(a,b,c){hi(this,1,3,a,b,c)},139:function(a,b,c){hi(this,1,1,a,b,c)},140:function(a,b,c){ji(this,4,a,b,c)},141:function(a,b,c){ji(this,5,a,b,c)},142:function(a,b,c){ji(this,6,a,b,c)},143:function(a,b,c){hi(this,1,0,a,b,c)},160:function(a,b,c){ni(this,1,b,c)},161:function(a,
|
112:Q.prototype.Nn,113:Q.prototype.On,128:Q.prototype.io,132:function(a,b,c){ji(this,0,a,b,c)},133:function(a,b,c){ji(this,1,a,b,c)},134:function(a,b,c){ji(this,2,a,b,c)},136:function(a,b,c){ji(this,3,a,b,c)},137:function(a,b,c){hi(this,1,2,a,b,c)},138:function(a,b,c){hi(this,1,3,a,b,c)},139:function(a,b,c){hi(this,1,1,a,b,c)},140:function(a,b,c){ji(this,4,a,b,c)},141:function(a,b,c){ji(this,5,a,b,c)},142:function(a,b,c){ji(this,6,a,b,c)},143:function(a,b,c){hi(this,1,0,a,b,c)},160:function(a,b,c){ni(this,
|
||||||
b,c){qi(this,1,b,c)},192:function(a,b,c){Zh(this,1,0,a,b,c)},194:function(a,b,c){ai(this,1,0,a,b,c)},196:function(a,b,c){Zh(this,1,1,a,b,c)},198:function(a,b,c){ai(this,1,1,a,b,c)},200:function(a,b,c){Zh(this,1,2,a,b,c)},202:function(a,b,c){ai(this,1,2,a,b,c)},204:function(a,b,c){Zh(this,1,3,a,b,c)},206:function(a,b,c){ai(this,1,3,a,b,c)},208:function(a,b,c){this.ca(a,b,c,"DMA1.CMD",Q.xb);this.Ra[1].Eh=b},210:function(a,b,c){ci(this,1,a,b,c)},212:function(a,b,c){di(this,1,a,b,c)},214:function(a,b,
|
1,b,c)},161:function(a,b,c){qi(this,1,b,c)},192:function(a,b,c){Zh(this,1,0,a,b,c)},194:function(a,b,c){ai(this,1,0,a,b,c)},196:function(a,b,c){Zh(this,1,1,a,b,c)},198:function(a,b,c){ai(this,1,1,a,b,c)},200:function(a,b,c){Zh(this,1,2,a,b,c)},202:function(a,b,c){ai(this,1,2,a,b,c)},204:function(a,b,c){Zh(this,1,3,a,b,c)},206:function(a,b,c){ai(this,1,3,a,b,c)},208:function(a,b,c){this.ca(a,b,c,"DMA1.CMD",Q.zb);this.Ta[1].Fh=b},210:function(a,b,c){ci(this,1,a,b,c)},212:function(a,b,c){di(this,1,a,
|
||||||
c){this.ca(a,b,c,"DMA1.MODE",Q.xb);this.Ra[1].yb[b&3].mode=b},216:function(a,b,c){this.ca(a,b,c,"DMA1.INDEX",Q.xb);this.Ra[1].gb=0},218:function(a,b,c){fi(this,1,a,b,c)}};za(function(){for(var a=y(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Q(d);Pa(d,c);Oh(d)}});
|
b,c)},214:function(a,b,c){this.ca(a,b,c,"DMA1.MODE",Q.zb);this.Ta[1].Bb[b&3].mode=b},216:function(a,b,c){this.ca(a,b,c,"DMA1.INDEX",Q.zb);this.Ta[1].hb=0},218:function(a,b,c){fi(this,1,a,b,c)},500:Q.prototype.$n};za(function(){for(var a=y(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Q(d);Pa(d,c);Nh(d)}});
|
||||||
function Di(a){s.call(this,"ROM",a,Di);this.qb=null;this.Jj=a.addr;this.ph=a.size;this.dm=a.alias;this.ig=a.file;this.nk=a.notify;if(this.ig){a=this.ig;var b=ea(this.ig);"json"!=b&&"hex"!=b&&(a=pa()+"/api/v1/dump?file="+this.ig+"&format=bytes&decimal=true");oa(a,!0,null,this,Di.prototype.Bn)}}w(s,Di);Di.prototype.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;Ei(this)};Di.prototype.Ub=function(){this.yh&&(this.aa&&Fi(this.aa,this.Jj,this.ph,this.yh),delete this.yh);return!0};Di.prototype.Rb=function(){return!0};
|
function Di(a){s.call(this,"ROM",a,Di);this.rb=null;this.Kj=a.addr;this.qh=a.size;this.bm=a.alias;this.ig=a.file;this.qk=a.notify;if(this.ig){a=this.ig;var b=ea(this.ig);"json"!=b&&"hex"!=b&&(a=pa()+"/api/v1/dump?file="+this.ig+"&format=bytes&decimal=true");oa(a,!0,null,this,Di.prototype.Bn)}}w(s,Di);Di.prototype.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;Ei(this)};Di.prototype.Xb=function(){this.zh&&(this.aa&&Fi(this.aa,this.Kj,this.qh,this.zh),delete this.zh);return!0};Di.prototype.Ub=function(){return!0};
|
||||||
Di.prototype.Bn=function(a,b,c){if(c)B(this,"Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,f=d.data;if(e)this.qb=e;else if(f)for(this.qb=Array(4*f.length),c=b=0;b<f.length;b++)this.qb[c++]=f[b]&255,this.qb[c++]=f[b]>>8&255,this.qb[c++]=f[b]>>16&255,this.qb[c++]=f[b]>>24&255;else this.qb=d;this.yh=d.symbols;if(!this.qb.length){this.error("Empty ROM: "+a);return}if(1==this.qb.length){this.error(this.qb[0]);return}}catch(g){B(this,
|
Di.prototype.Bn=function(a,b,c){if(c)B(this,"Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,f=d.data;if(e)this.rb=e;else if(f)for(this.rb=Array(4*f.length),c=b=0;b<f.length;b++)this.rb[c++]=f[b]&255,this.rb[c++]=f[b]>>8&255,this.rb[c++]=f[b]>>16&255,this.rb[c++]=f[b]>>24&255;else this.rb=d;this.zh=d.symbols;if(!this.rb.length){this.error("Empty ROM: "+a);return}if(1==this.rb.length){this.error(this.rb[0]);return}}catch(g){B(this,
|
||||||
"ROM data error: "+g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.qb=Array(a.length),d=0;d<a.length;d++)this.qb[d]=parseInt(a[d],16);Ei(this)}};function Ei(a){if(!Sa(a))if(!a.ig)a.La();else if(a.qb&&a.la){if(a.qb.length!=a.ph)Ta(a,"ROM size (0x"+l(a.qb.length)+") does not match specified size (0x"+l(a.ph)+")");else if(Gi(a,a.Jj)&&Gi(a,a.dm)){if(a.nk){var b=Na(a.nk,a.id);b&&("ega"==b.Ha&&Hi(b,a.qb,[8752,12640],8),b.La())}delete a.qb}a.La()}}
|
"ROM data error: "+g.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.rb=Array(a.length),d=0;d<a.length;d++)this.rb[d]=parseInt(a[d],16);Ei(this)}};function Ei(a){if(!Sa(a))if(!a.ig)a.Ma();else if(a.rb&&a.la){if(a.rb.length!=a.qh)Ta(a,"ROM size (0x"+l(a.rb.length)+") does not match specified size (0x"+l(a.qh)+")");else if(Gi(a,a.Kj)&&Gi(a,a.bm)){if(a.qk){var b=Na(a.qk,a.id);b&&("ega"==b.Ea&&Hi(b,a.rb,[8752,12640],8),b.Ma())}delete a.rb}a.Ma()}}
|
||||||
function Gi(a,b){if(null==b)return!0;if($a(a.la,b,a.ph,!0)){for(var c=0;c<a.qb.length;c++)eb(a.la,b+c,a.qb[c]);return!0}return!1}za(function(){for(var a=y(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Di(d);Pa(d,c)}});function Ii(a){s.call(this,"RAM",a,Ii);this.zh=a.addr;this.he=a.size;this.mm=a.test;this.km=!!this.he;this.Ng=!1}w(s,Ii);Ii.prototype.gc=function(a,b,c){this.la=b;this.S=c;this.Ba=a;this.ma=C(a,"ChipSet");this.La()};
|
function Gi(a,b){if(null==b)return!0;if($a(a.la,b,a.qh,!0)){for(var c=0;c<a.rb.length;c++)fb(a.la,b+c,a.rb[c]);return!0}return!1}za(function(){for(var a=y(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Di(d);Pa(d,c)}});function Ii(a){s.call(this,"RAM",a,Ii);this.Ah=a.addr;this.ie=a.size;this.km=a.test;this.im=!!this.ie;this.Ng=!1}w(s,Ii);Ii.prototype.jc=function(a,b,c){this.la=b;this.S=c;this.Ba=a;this.ma=C(a,"ChipSet");this.Ma()};
|
||||||
Ii.prototype.Ub=function(a,b){b||this.reset();return!0};Ii.prototype.Rb=function(){return!0};Ii.prototype.reset=function(){if(!this.zh&&!this.km&&this.ma){var a=1024*Sh(this.ma);this.he&&a!=this.he&&(bb(this.la,this.zh,this.he),this.Ng=!1);this.he=a}!this.Ng&&this.he&&$a(this.la,this.zh,this.he)&&(this.Ng=!0,this.status(Math.floor(this.he/1024)+"Kb"));this.Ng?this.mm||gb(this.la,1138,4660):this.error("No RAM allocated")};
|
Ii.prototype.Xb=function(a,b){b||this.reset();return!0};Ii.prototype.Ub=function(){return!0};Ii.prototype.reset=function(){if(!this.Ah&&!this.im&&this.ma){var a=1024*Rh(this.ma);this.ie&&a!=this.ie&&(bb(this.la,this.Ah,this.ie),this.Ng=!1);this.ie=a}!this.Ng&&this.ie&&$a(this.la,this.Ah,this.ie)&&(this.Ng=!0,this.status(Math.floor(this.ie/1024)+"Kb"));this.Ng?this.km||gb(this.la,1138,4660):this.error("No RAM allocated")};
|
||||||
za(function(){for(var a=y(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ii(d);Pa(d,c)}});function Ji(a){s.call(this,"Keyboard",a,Ji);this.xh={};this.rn=250;this.sn=100;this.La()}w(s,Ji);
|
za(function(){for(var a=y(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ii(d);Pa(d,c)}});function Ji(a){s.call(this,"Keyboard",a,Ji);this.yh={};this.rn=250;this.sn=100;this.Ma()}w(s,Ji);
|
||||||
var Oi={esc:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10,0:11,"-":12,"=":13,backspace:14,tab:15,q:16,w:17,e:18,r:19,t:20,y:21,u:22,i:23,o:24,p:25,"[":26,"]":27,enter:28,ctrl:29,a:30,s:31,d:32,f:33,g:34,h:35,j:36,k:37,l:38,";":39,squote:40,bquote:41,lshift:42,bslash:43,z:44,x:45,c:46,v:47,b:48,n:49,m:50,",":51,".":52,"/":53,rshift:54,prtsc:55,alt:56,space:57,"caps-lock":58,f1:59,f2:60,f3:61,f4:62,f5:63,f6:64,f7:65,f8:66,f9:67,f10:68,"num-lock":69,"scroll-lock":70,home:71,"up-arrow":72,"page-up":73,"num-minus":74,
|
var Oi={esc:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10,0:11,"-":12,"=":13,backspace:14,tab:15,q:16,w:17,e:18,r:19,t:20,y:21,u:22,i:23,o:24,p:25,"[":26,"]":27,enter:28,ctrl:29,a:30,s:31,d:32,f:33,g:34,h:35,j:36,k:37,l:38,";":39,squote:40,bquote:41,lshift:42,bslash:43,z:44,x:45,c:46,v:47,b:48,n:49,m:50,",":51,".":52,"/":53,rshift:54,prtsc:55,alt:56,space:57,"caps-lock":58,f1:59,f2:60,f3:61,f4:62,f5:63,f6:64,f7:65,f8:66,f9:67,f10:68,"num-lock":69,"scroll-lock":70,home:71,"up-arrow":72,"page-up":73,"num-minus":74,
|
||||||
"left-arrow":75,center:76,"right-arrow":77,"num-plus":78,end:79,"down-arrow":80,"page-down":81,ins:82,del:83},Pi={tab:9,esc:27,rshift:224,lshift:240,ctrl:241,alt:242,"caps-lock":244,f1:336,f2:337,f3:338,f4:339,f5:340,f6:341,f7:342,f8:343,f9:344,f10:345,"left-arrow":261,"up-arrow":262,"right-arrow":263,"down-arrow":264,"ctrl-c":3,"ctrl-break":254,"ctrl-alt-del":255},R=[];R[32]=57;R[49]=2;R[33]=61442;R[50]=3;R[64]=61443;R[51]=4;R[35]=61444;R[52]=5;R[36]=61445;R[53]=6;R[37]=61446;R[54]=7;R[94]=61447;
|
"left-arrow":75,center:76,"right-arrow":77,"num-plus":78,end:79,"down-arrow":80,"page-down":81,ins:82,del:83},Pi={tab:9,esc:27,rshift:224,lshift:240,ctrl:241,alt:242,"caps-lock":244,f1:336,f2:337,f3:338,f4:339,f5:340,f6:341,f7:342,f8:343,f9:344,f10:345,"left-arrow":261,"up-arrow":262,"right-arrow":263,"down-arrow":264,"ctrl-c":3,"ctrl-break":254,"ctrl-alt-del":255},R=[];R[32]=57;R[49]=2;R[33]=61442;R[50]=3;R[64]=61443;R[51]=4;R[35]=61444;R[52]=5;R[36]=61445;R[53]=6;R[37]=61446;R[54]=7;R[94]=61447;
|
||||||
R[55]=8;R[38]=61448;R[56]=9;R[42]=61449;R[57]=10;R[40]=61450;R[48]=11;R[41]=61451;R[45]=12;R[95]=61452;R[61]=13;R[43]=61453;R[113]=16;R[81]=61456;R[119]=17;R[87]=61457;R[101]=18;R[69]=61458;R[114]=19;R[82]=61459;R[116]=20;R[84]=61460;R[121]=21;R[89]=61461;R[117]=22;R[85]=61462;R[105]=23;R[73]=61463;R[111]=24;R[79]=61464;R[112]=25;R[80]=61465;R[91]=26;R[123]=61466;R[93]=27;R[125]=61467;R[97]=30;R[65]=61470;R[115]=31;R[83]=61471;R[100]=32;R[68]=61472;R[102]=33;R[70]=61473;R[103]=34;R[71]=61474;
|
R[55]=8;R[38]=61448;R[56]=9;R[42]=61449;R[57]=10;R[40]=61450;R[48]=11;R[41]=61451;R[45]=12;R[95]=61452;R[61]=13;R[43]=61453;R[113]=16;R[81]=61456;R[119]=17;R[87]=61457;R[101]=18;R[69]=61458;R[114]=19;R[82]=61459;R[116]=20;R[84]=61460;R[121]=21;R[89]=61461;R[117]=22;R[85]=61462;R[105]=23;R[73]=61463;R[111]=24;R[79]=61464;R[112]=25;R[80]=61465;R[91]=26;R[123]=61466;R[93]=27;R[125]=61467;R[97]=30;R[65]=61470;R[115]=31;R[83]=61471;R[100]=32;R[68]=61472;R[102]=33;R[70]=61473;R[103]=34;R[71]=61474;
|
||||||
R[104]=35;R[72]=61475;R[106]=36;R[74]=61476;R[107]=37;R[75]=61477;R[108]=38;R[76]=61478;R[59]=39;R[58]=61479;R[39]=40;R[34]=61480;R[96]=41;R[126]=61481;R[92]=43;R[124]=61483;R[122]=44;R[90]=61484;R[120]=45;R[88]=61485;R[99]=46;R[67]=61486;R[118]=47;R[86]=61487;R[98]=48;R[66]=61488;R[110]=49;R[78]=61489;R[109]=50;R[77]=61490;R[44]=51;R[60]=61491;R[46]=52;R[62]=61492;R[47]=53;R[63]=61493;R[8]=14;R[9]=15;R[13]=28;R[27]=1;R[240]=42;R[224]=54;R[241]=29;R[242]=56;R[244]=58;R[336]=59;R[337]=60;R[338]=61;
|
R[104]=35;R[72]=61475;R[106]=36;R[74]=61476;R[107]=37;R[75]=61477;R[108]=38;R[76]=61478;R[59]=39;R[58]=61479;R[39]=40;R[34]=61480;R[96]=41;R[126]=61481;R[92]=43;R[124]=61483;R[122]=44;R[90]=61484;R[120]=45;R[88]=61485;R[99]=46;R[67]=61486;R[118]=47;R[86]=61487;R[98]=48;R[66]=61488;R[110]=49;R[78]=61489;R[109]=50;R[77]=61490;R[44]=51;R[60]=61491;R[46]=52;R[62]=61492;R[47]=53;R[63]=61493;R[8]=14;R[9]=15;R[13]=28;R[27]=1;R[240]=42;R[224]=54;R[241]=29;R[242]=56;R[244]=58;R[336]=59;R[337]=60;R[338]=61;
|
||||||
R[339]=62;R[340]=63;R[341]=64;R[342]=65;R[343]=66;R[344]=67;R[345]=68;R[261]=75;R[262]=72;R[263]=77;R[264]=80;R[254]=61766;R[255]=15921491;k=Ji.prototype;
|
R[339]=62;R[340]=63;R[341]=64;R[342]=65;R[343]=66;R[344]=67;R[345]=68;R[261]=75;R[262]=72;R[263]=77;R[264]=80;R[254]=61766;R[255]=15921491;k=Ji.prototype;
|
||||||
k.pb=function(a,b,c,d){var e=this;a=b+"-"+c;if(void 0===this.sa[a])switch(c){case "kbd":return this.sa[a]=d,d.onkeydown=function(a){return Qi(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.Ca&32?e.Ca&=-33:b=e.Ca&12?!1:!Ri(e,a);return b},d.onkeyup=function(a){return Qi(e,a,!1)},!0;default:if(void 0!==Pi[c]&&"button"==b)return this.sa[a]=d,d.onclick=function(a,b,c){return function(){a.S&&a.S.Gd();return!Ri(a,c)}}(this,c,Pi[c]),!0;if(void 0!==Oi[c])return this.sa[a]=
|
k.qb=function(a,b,c,d){var e=this;a=b+"-"+c;if(void 0===this.sa[a])switch(c){case "kbd":return this.sa[a]=d,d.onkeydown=function(a){return Qi(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.Ca&32?e.Ca&=-33:b=e.Ca&12?!1:!Ri(e,a);return b},d.onkeyup=function(a){return Qi(e,a,!1)},!0;default:if(void 0!==Pi[c]&&"button"==b)return this.sa[a]=d,d.onclick=function(a,b,c){return function(){a.S&&a.S.Jd();return!Ri(a,c)}}(this,c,Pi[c]),!0;if(void 0!==Oi[c])return this.sa[a]=
|
||||||
d,b=function(a,b,c){return function(){Si(a,c)}}(this,c,Oi[c]),c=function(a,b,c){return function(){Si(a,c)}}(this,c,Oi[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet")};k.La=function(){this.ck=(this.tm=ta("iOS"))||ta("Android");this.Da("mobile keyboard support: "+(this.ck?"true":"false"));return s.prototype.La.call(this)};
|
d,b=function(a,b,c){return function(){Si(a,c)}}(this,c,Oi[c]),c=function(a,b,c){return function(){Si(a,c)}}(this,c,Oi[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet")};k.Ma=function(){this.fk=(this.rm=ta("iOS"))||ta("Android");this.Da("mobile keyboard support: "+(this.fk?"true":"false"));return s.prototype.Ma.call(this)};
|
||||||
function zi(a){a.Da("keyboard reset",!0);a.nc=[170];a.ma&&ri(a.ma,1,4)}function yi(a,b){var c=0;a.nc.length&&(c=a.nc[0],a.Da("scan code "+p(c)+" delivered"),b&&Ai(a));return c}function Ai(a,b){0<a.nc.length&&(b?a.nc=[]:(a.nc.shift(),0<a.nc.length&&a.ma&&ri(a.ma,1)))}k.Ub=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};k.Rb=function(a){return a&&this.save?this.save():!0};
|
function zi(a){a.Da("keyboard reset",!0);a.qc=[170];a.ma&&ri(a.ma,1,4)}function xi(a,b){var c=0;a.qc.length&&(c=a.qc[0],a.Da("scan code "+p(c)+" delivered"),b&&Ai(a));return c}function Ai(a,b){0<a.qc.length&&(b?a.qc=[]:(a.qc.shift(),0<a.qc.length&&a.ma&&ri(a.ma,1)))}k.Xb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};k.Ub=function(a){return a&&this.save?this.save():!0};
|
||||||
k.reset=function(){this.Zd();this.Ca=0;this.nc=[];if(this.kd)for(var a in this.kd)aa(a)||this.kd[a]&&clearTimeout(this.kd[a]);this.kd=[];this.Cl=this.Fe=0};k.save=function(){var a=new I(this);a.set(0,this.sj());return a.data()};k.restore=function(a){return this.Zd(a[0])};k.Zd=function(a){var b=0;void 0===a&&(a=[]);this.Xh=a[b++];this.Zh=a[b];return!0};k.sj=function(){var a=0,b=[];b[a++]=this.Xh;b[a]=this.Zh;return b};
|
k.reset=function(){this.ae();this.Ca=0;this.qc=[];if(this.nd)for(var a in this.nd)aa(a)||this.nd[a]&&clearTimeout(this.nd[a]);this.nd=[];this.El=this.Fe=0};k.save=function(){var a=new I(this);a.set(0,this.uj());return a.data()};k.restore=function(a){return this.ae(a[0])};k.ae=function(a){var b=0;void 0===a&&(a=[]);this.Yh=a[b++];this.$h=a[b];return!0};k.uj=function(){var a=0,b=[];b[a++]=this.Yh;b[a]=this.$h;return b};
|
||||||
function Si(a,b){var c=b&127,d=c==b;if(a.nc)if(20>a.nc.length){if(!(!d&&!a.xh[c]||d&&a.xh[c])){a.xh[c]=d;a.Da("scan code "+p(b)+" buffered");a.nc.push(b);1==a.nc.length&&a.ma&&ri(a.ma,1);for(var e in Oi)if(Oi[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.nc.length&&a.nc.push(255),a.Da("scan code buffer overflow")}function Ti(a,b){var c=b?a.sn:a.rn;a.S&&a.S.dd&&(c/=a.S.dd);return c}
|
function Si(a,b){var c=b&127,d=c==b;if(a.qc)if(20>a.qc.length){if(!(!d&&!a.yh[c]||d&&a.yh[c])){a.yh[c]=d;a.Da("scan code "+p(b)+" buffered");a.qc.push(b);1==a.qc.length&&a.ma&&ri(a.ma,1);for(var e in Oi)if(Oi[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.qc.length&&a.qc.push(255),a.Da("scan code buffer overflow")}function Ti(a,b){var c=b?a.sn:a.rn;a.S&&a.S.gd&&(c/=a.S.gd);return c}
|
||||||
function Ui(a,b){!a.Fe||void 0!==b&&b==a.Fe||(clearTimeout(a.kd[a.Fe]),Vi(a,a.Fe,!1))}
|
function Ui(a,b){!a.Fe||void 0!==b&&b==a.Fe||(clearTimeout(a.nd[a.Fe]),Vi(a,a.Fe,!1))}
|
||||||
function Qi(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.Cl=f);240==f+224?(a.Ca&=-2,c&&(a.Ca|=1),f+=224,e=!1):241==f+224?(a.Ca&=-5,c&&(a.Ca|=4),f+=224,e=!1):242==f+224?(a.Ca&=-9,c&&(a.Ca|=8),f+=224,e=!1):244==f+224?(a.Ca&=-17,c&&(a.Ca|=16),f+=224,d=Ri(a,f)):91==f?(a.Ca&=-33,c&&(a.Ca|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&a.Ca&4&&(f=254),d=c?!Ri(a,f):!1):void 0!==R[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.Ca&=-33,a.ck||f!=a.Cl||Ui(a));void 0===d&&(d=!Vi(a,f,c));return d}
|
function Qi(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.El=f);240==f+224?(a.Ca&=-2,c&&(a.Ca|=1),f+=224,e=!1):241==f+224?(a.Ca&=-5,c&&(a.Ca|=4),f+=224,e=!1):242==f+224?(a.Ca&=-9,c&&(a.Ca|=8),f+=224,e=!1):244==f+224?(a.Ca&=-17,c&&(a.Ca|=16),f+=224,d=Ri(a,f)):91==f?(a.Ca&=-33,c&&(a.Ca|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&a.Ca&4&&(f=254),d=c?!Ri(a,f):!1):void 0!==R[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.Ca&=-33,a.fk||f!=a.El||Ui(a));void 0===d&&(d=!Vi(a,f,c));return d}
|
||||||
function Ri(a,b,c){var d=!1;Ui(a,b);Vi(a,b,!0)&&(c?Vi(a,b,!1):(c=!1,a.kd[b]&&(clearTimeout(a.kd[b]),c=!0),c=Ti(a,c),a.kd[a.Fe=b]=setTimeout(function(a){return function(){Vi(a,b,!1)}}(a),c)),d=!0);return d}
|
function Ri(a,b,c){var d=!1;Ui(a,b);Vi(a,b,!0)&&(c?Vi(a,b,!1):(c=!1,a.nd[b]&&(clearTimeout(a.nd[b]),c=!0),c=Ti(a,c),a.nd[a.Fe=b]=setTimeout(function(a){return function(){Vi(a,b,!1)}}(a),c)),d=!0);return d}
|
||||||
function Vi(a,b,c){var d=!1;c||(a.kd[b]=null,a.Fe==b&&(a.Fe=0));var e=R[b];void 0===e&&1<=b&&26>=b&&(e=R[b+64]&255|61696);if(void 0!==e){14==e&&12==(a.Ca&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.Ca&17||(d=42):224==f?a.Ca&18||(d=54):241==f?a.Ca&4||(d=29):242==f&&(a.Ca&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;c<b.length;c++)Si(a,b[c]);d=!0}return d}k.Da=function(a,b){this.aa&&M(this.aa,this.aa.yj|(b?this.aa.Aj:0))&&this.aa.message(a)};
|
function Vi(a,b,c){var d=!1;c||(a.nd[b]=null,a.Fe==b&&(a.Fe=0));var e=R[b];void 0===e&&1<=b&&26>=b&&(e=R[b+64]&255|61696);if(void 0!==e){14==e&&12==(a.Ca&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.Ca&17||(d=42):224==f?a.Ca&18||(d=54):241==f?a.Ca&4||(d=29):242==f&&(a.Ca&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;c<b.length;c++)Si(a,b[c]);d=!0}return d}k.Da=function(a,b){this.aa&&M(this.aa,this.aa.Aj|(b?this.aa.Cj:0))&&this.aa.message(a)};
|
||||||
za(function(){for(var a=y(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ji(d);Pa(d,c)}});
|
za(function(){for(var a=y(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ji(d);Pa(d,c)}});
|
||||||
function S(a,b,c,d){s.call(this,"Video",a,S);this.Ha=a.model;this.Jc=0;"ega"==this.Ha&&(this.Jl=a.switches,this.Jc=a.memory||0);this.fd=a.mode;if(void 0===this.fd||void 0===T[this.fd])this.fd=Wi;this.fh=a.charCols;this.si=a.charRows;if(void 0===this.fh||void 0===this.si)this.fh=T[this.fd][0],this.si=T[this.fd][1];this.rd=a.screenWidth;this.Vd=a.screenHeight;this.lm=a.scale;this.jm=12<=Math.round(this.rd/this.fh);this.nm=a.touchScreen;this.Db=b;this.Lc=c;this.Ol=d;this.Wa=this.jc=0;this.Ld=[];this.nd=
|
function S(a,b,c,d){s.call(this,"Video",a,S);this.Ea=a.model;this.Mc=0;"ega"==this.Ea&&(this.Ll=a.switches,this.Mc=a.memory||0);this.jd=a.mode;if(void 0===this.jd||void 0===T[this.jd])this.jd=Wi;this.fh=a.charCols;this.ti=a.charRows;if(void 0===this.fh||void 0===this.ti)this.fh=T[this.jd][0],this.ti=T[this.jd][1];this.ud=a.screenWidth;this.Yd=a.screenHeight;this.jm=a.scale;this.hm=12<=Math.round(this.ud/this.fh);this.lm=a.touchScreen;this.Gb=b;this.Oc=c;this.Ql=d;this.Xa=this.mc=0;this.Od=[];this.qd=
|
||||||
Array(16);this.$h=!1;var e=this;this.Db&&(this.Db.onfocus=function(){e.$h=!0},this.Db.onblur=function(){e.$h=!1});if(a=a.fontROM)"json"!=ea(a)&&(a=pa()+"/api/v1/dump?file="+a+"&format=bytes"),oa(a,!0,null,this,this.Cn)}w(s,S);
|
Array(16);this.ai=!1;var e=this;this.Gb&&(this.Gb.onfocus=function(){e.ai=!0},this.Gb.onblur=function(){e.ai=!1});if(a=a.fontROM)"json"!=ea(a)&&(a=pa()+"/api/v1/dump?file="+a+"&format=bytes"),oa(a,!0,null,this,this.Cn)}w(s,S);
|
||||||
var Xi={2:{ui:15700,ti:208,jj:85,kj:96},3:{ui:18432,ti:364,jj:85,kj:96},4:{ui:21850,ti:364,jj:85,kj:96}},Yi={6:[1,3,!0],7:[2,3,!0],8:[5,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[5,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},Wi=7,T=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];T[Wi]=[80,25,1,0,1];T[13]=[320,200,16];T[14]=[640,200,16];T[15]=[640,350,16];T[16]=[640,350,16];T[0]=T[1];T[2]=T[3];T[5]=T[4];var Zi=Array(5);Zi[0]=[0,0,0,255];Zi[1]=[127,192,127,255];
|
var Xi={2:{vi:15700,ui:208,kj:85,lj:96},3:{vi:18432,ui:364,kj:85,lj:96},4:{vi:21850,ui:364,kj:85,lj:96}},Yi={6:[1,3,!0],7:[2,3,!0],8:[5,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[5,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},Wi=7,T=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];T[Wi]=[80,25,1,0,1];T[13]=[320,200,16];T[14]=[640,200,16];T[15]=[640,350,16];T[16]=[640,350,16];T[0]=T[1];T[2]=T[3];T[5]=T[4];var Zi=Array(5);Zi[0]=[0,0,0,255];Zi[1]=[127,192,127,255];
|
||||||
Zi[2]=[127,192,127,255];Zi[3]=[127,255,127,255];Zi[4]=[127,255,127,255];var $i=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],U=Array(16);U[0]=[0,0,0,255];U[1]=[0,0,170,255];U[2]=[0,170,0,255];U[3]=[0,170,170,255];U[4]=[170,0,0,255];U[5]=[170,0,170,255];U[6]=[170,85,0,255];U[7]=[170,170,170,255];U[8]=[85,85,85,255];U[9]=[85,85,255,255];U[10]=[85,255,85,255];U[11]=[85,255,255,255];U[12]=[255,85,85,255];U[13]=[255,85,255,255];U[14]=[255,255,85,255];U[15]=[255,255,255,255];
|
Zi[2]=[127,192,127,255];Zi[3]=[127,255,127,255];Zi[4]=[127,255,127,255];var $i=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],U=Array(16);U[0]=[0,0,0,255];U[1]=[0,0,170,255];U[2]=[0,170,0,255];U[3]=[0,170,170,255];U[4]=[170,0,0,255];U[5]=[170,0,170,255];U[6]=[170,85,0,255];U[7]=[170,170,170,255];U[8]=[85,85,85,255];U[9]=[85,85,255,255];U[10]=[85,255,85,255];U[11]=[85,255,255,255];U[12]=[255,85,85,255];U[13]=[255,85,255,255];U[14]=[255,255,85,255];U[15]=[255,255,255,255];
|
||||||
var aj=[2,4,6],bj=[3,5,7],cj=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],dj=[0,255,65280,65535,16711680,16711935,16776960,16777215,4278190080,4278190335,4278255360,4278255615,4294901760,4294902015,4294967040,4294967295],V=[0];V[128]=1;V[32768]=2;V[32896]=3;V[8388608]=4;V[8388736]=5;V[8421376]=6;V[8421504]=7;V[2147483648]=8;V[2147483776]=9;V[2147516416]=10;V[2147516544]=11;V[2155872256]=12;V[2155872384]=13;V[2155905024]=14;V[2155905152]=15;
|
var aj=[2,4,6],bj=[3,5,7],cj=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],dj=[0,255,65280,65535,16711680,16711935,16776960,16777215,4278190080,4278190335,4278255360,4278255615,4294901760,4294902015,4294967040,4294967295],V=[0];V[128]=1;V[32768]=2;V[32896]=3;V[8388608]=4;V[8388736]=5;V[8421376]=6;V[8421504]=7;V[2147483648]=8;V[2147483776]=9;V[2147516416]=10;V[2147516544]=11;V[2155872256]=12;V[2155872384]=13;V[2155905024]=14;V[2155905152]=15;
|
||||||
function ej(a,b,c,d){if(void 0!==b&&(!c||c.length)){var e=fj[b],f=a.ae||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(gj)];this.aa=a.aa;this.type=e[0];this.port=e[1];this.Xd=b;this.Wa=e[2];this.jc=e[3];this.Jc=d||e[4];65536<=this.Jc&&720896<=this.Wa&&(this.jc=Math.min(this.Jc>>2,32768));this.ec=c[0];this.pc=c[1];this.Te=c[2];this.nf=c[3];this.fc=c[4]&255;this.Vg=c[4]>>8&255;this.Wb=c[5];this.mi=gj;this.xg=hj;if(5==b){this.mi=ij;this.xg=jj;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==f?0:1,0,0,Array(5),
|
function ej(a,b,c,d){if(void 0!==b&&(!c||c.length)){var e=fj[b],f=a.be||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(gj)];this.aa=a.aa;this.type=e[0];this.port=e[1];this.$d=b;this.Xa=e[2];this.mc=e[3];this.Mc=d||e[4];65536<=this.Mc&&720896<=this.Xa&&(this.mc=Math.min(this.Mc>>2,32768));this.hc=c[0];this.sc=c[1];this.Te=c[2];this.nf=c[3];this.ic=c[4]&255;this.Vg=c[4]>>8&255;this.Zb=c[5];this.ni=gj;this.xg=hj;if(5==b){this.ni=ij;this.xg=jj;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.Jc,Array(this.Jc>>2),771,0,4294967295,0,4294967295,0,4294967295,0]);this.$c=b[0];this.vd=b[1];this.Jd=b[2];this.Ah=kj;this.rh=b[3];this.Of=b[4];this.Ug=b[5];this.xd=b[6];this.vf=b[7];this.Ch=lj;this.gi=b[8];this.hi=b[9];this.wd=b[10];this.me=b[11];this.Bh=mj;this.ob=b[12];d=this.Jc>>2;if((this.Xc=b[14])&&this.Xc.length<d){for(var e=this.Xc,g=0,h=Array(d),m=0;m<e.length-1;){for(var n=e[m++],r=e[m++];n--;)h[g]=r,g+=2;g==d&&(g=1)}this.Xc=h}this.oh(b[15]);this.ej=b[16];this.$a=b[17];
|
0,0,0,Array(9),0,this.Mc,Array(this.Mc>>2),771,0,4294967295,0,4294967295,0,4294967295,0]);this.dd=b[0];this.yd=b[1];this.Md=b[2];this.Bh=kj;this.sh=b[3];this.Of=b[4];this.Ug=b[5];this.Ad=b[6];this.vf=b[7];this.Dh=lj;this.hi=b[8];this.ii=b[9];this.zd=b[10];this.me=b[11];this.Ch=mj;this.pb=b[12];d=this.Mc>>2;if((this.$c=b[14])&&this.$c.length<d){for(var e=this.$c,g=0,h=Array(d),m=0;m<e.length-1;){for(var n=e[m++],r=e[m++];n--;)h[g]=r,g+=2;g==d&&(g=1)}this.$c=h}this.ph(b[15]);this.fj=b[16];this.ab=b[17];
|
||||||
this.ed=b[18];this.cb=b[19];this.hh=b[20];this.de=b[21];this.Ce=b[22];this.oi=b[23];this.pi=b[24]}f=Xi[f]||Xi[3];this.qi=a.S.Bd/f.ui|0;this.vn=this.qi*f.jj/100|0;this.vk=this.qi*f.ti;this.yn=this.vk*f.kj/100|0;this.vi=null==c[7]?0:c[7]}}
|
this.hd=b[18];this.eb=b[19];this.ih=b[20];this.ee=b[21];this.Ce=b[22];this.pi=b[23];this.qi=b[24]}f=Xi[f]||Xi[3];this.ri=a.S.Ed/f.vi|0;this.vn=this.ri*f.kj/100|0;this.yk=this.ri*f.ui;this.yn=this.yk*f.lj/100|0;this.wi=null==c[7]?0:c[7]}}
|
||||||
var gj=18,ij=25,hj="HORZ_TOTAL HORZ_DISP HORZ_SYNC_POS HORZ_SYNC_WIDTH VERT_TOTAL VERT_TOTAL_ADJ VERT_DISP VERT_SYNC_POS INTERLACE_POS MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO LIGHT_PEN_HI LIGHT_PEN_LO".split(" "),jj="HORZ_TOTAL HORZ_DISP_END HORZ_BLANK_START HORZ_BLANK_END HORZ_RETRACE_START HORZ_RETRACE_END VERT_TOTAL CRTC_OVERFLOW PRESET_ROW_SCAN MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO LIGHT_PEN_HI LIGHT_PEN_LO VERT_DISP_END OFFSET UNDERLINE VERT_BLANK_START VERT_BLANK_END MODE_CTRL LONE_COMPARE".split(" "),
|
var gj=18,ij=25,hj="HORZ_TOTAL HORZ_DISP HORZ_SYNC_POS HORZ_SYNC_WIDTH VERT_TOTAL VERT_TOTAL_ADJ VERT_DISP VERT_SYNC_POS INTERLACE_POS MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO LIGHT_PEN_HI LIGHT_PEN_LO".split(" "),jj="HORZ_TOTAL HORZ_DISP_END HORZ_BLANK_START HORZ_BLANK_END HORZ_RETRACE_START HORZ_RETRACE_END VERT_TOTAL CRTC_OVERFLOW PRESET_ROW_SCAN MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO LIGHT_PEN_HI LIGHT_PEN_LO VERT_DISP_END OFFSET UNDERLINE VERT_BLANK_START VERT_BLANK_END MODE_CTRL LONE_COMPARE".split(" "),
|
||||||
kj="PAL00 PAL01 PAL02 PAL03 PAL04 PAL05 PAL06 PAL07 PAL08 PAL09 PAL0A PAL0B PAL0C PAL0D PAL0E PAL0F MODE OVRSCAN PLANES HORZPAN".split(" "),lj=["RESET","CLK","MAPMASK","CHARMAP","MODE"],mj="SRESET ESRESET COLRCMP DATAROT READMAP MODE MISC COLRDC BITMASK".split(" ");function nj(a){return this.Rc(a)|this.Rc(a+1)<<8}function oj(a,b){this.Ec(a,b&255);this.Ec(a+1,b>>8&255)}
|
kj="PAL00 PAL01 PAL02 PAL03 PAL04 PAL05 PAL06 PAL07 PAL08 PAL09 PAL0A PAL0B PAL0C PAL0D PAL0E PAL0F MODE OVRSCAN PLANES HORZPAN".split(" "),lj=["RESET","CLK","MAPMASK","CHARMAP","MODE"],mj="SRESET ESRESET COLRCMP DATAROT READMAP MODE MISC COLRDC BITMASK".split(" ");function nj(a){return this.Uc(a)|this.Uc(a+1)<<8}function oj(a,b){this.Hc(a,b&255);this.Hc(a+1,b>>8&255)}
|
||||||
var W=[,,function(a){a+=this.offset;return(this.ha.ob=this.oa[a])>>this.ha.ej&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.oa[b]>>8:this.oa[b])&255}];W[16]=function(a){a+=this.offset;a=this.oa[a];for(var b=this.ha.oi&this.ha.pi,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};W[512]=function(a,b){var c=a+this.offset,d;d=this.oa[c]&~this.ha.$a|(b|b<<8|b<<16|b<<24)&this.ha.$a;d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
var W=[,,function(a){a+=this.offset;return(this.ha.pb=this.oa[a])>>this.ha.fj&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.oa[b]>>8:this.oa[b])&255}];W[16]=function(a){a+=this.offset;a=this.oa[a];for(var b=this.ha.pi&this.ha.qi,c=0,d=128;d;)(a&b)==b&&(c|=d),b>>>=1,d>>=1;return c};W[512]=function(a,b){var c=a+this.offset,d;d=this.oa[c]&~this.ha.ab|(b|b<<8|b<<16|b<<24)&this.ha.ab;d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
W[1024]=function(a,b){var c=a+this.offset;b=b>>this.ha.ed|b<<8-this.ha.ed&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.de|this.ha.Ce;d=d&this.ha.$a|this.oa[c]&~this.ha.$a;d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
W[1024]=function(a,b){var c=a+this.offset;b=b>>this.ha.hd|b<<8-this.ha.hd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.ee|this.ha.Ce;d=d&this.ha.ab|this.oa[c]&~this.ha.ab;d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
W[1536]=function(a,b){var c=a+this.offset;b=b>>this.ha.ed|b<<8-this.ha.ed&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.de|this.ha.Ce;d&=this.ha.ob;d=d&this.ha.$a|this.oa[c]&~this.ha.$a;d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
W[1536]=function(a,b){var c=a+this.offset;b=b>>this.ha.hd|b<<8-this.ha.hd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.ee|this.ha.Ce;d&=this.ha.pb;d=d&this.ha.ab|this.oa[c]&~this.ha.ab;d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
W[2560]=function(a,b){var c=a+this.offset;b=b>>this.ha.ed|b<<8-this.ha.ed&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.de|this.ha.Ce;d|=this.ha.ob;d=d&this.ha.$a|this.oa[c]&~this.ha.$a;d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
W[2560]=function(a,b){var c=a+this.offset;b=b>>this.ha.hd|b<<8-this.ha.hd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.ee|this.ha.Ce;d|=this.ha.pb;d=d&this.ha.ab|this.oa[c]&~this.ha.ab;d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
W[3584]=function(a,b){var c=a+this.offset;b=b>>this.ha.ed|b<<8-this.ha.ed&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.de|this.ha.Ce;d^=this.ha.ob;d=d&this.ha.$a|this.oa[c]&~this.ha.$a;d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};W[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ha.$a&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.oa[d]&~c;c=c&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[d]!=c&&(this.oa[d]=c,this.Ta=!0)};
|
W[3584]=function(a,b){var c=a+this.offset;b=b>>this.ha.hd|b<<8-this.ha.hd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ha.ee|this.ha.Ce;d^=this.ha.pb;d=d&this.ha.ab|this.oa[c]&~this.ha.ab;d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};W[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ha.ab&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.oa[d]&~c;c=c&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[d]!=c&&(this.oa[d]=c,this.Va=!0)};
|
||||||
W[4096]=function(a){a+=this.offset;var b=this.oa[a]&~this.ha.$a|this.ha.ob&this.ha.$a;this.oa[a]!=b&&(this.oa[a]=b,this.Ta=!0)};W[8192]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d&this.ha.$a|this.oa[c]&~this.ha.$a,d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};W[24576]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d&this.ha.ob,d=d&this.ha.$a|this.oa[c]&~this.ha.$a,d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
W[4096]=function(a){a+=this.offset;var b=this.oa[a]&~this.ha.ab|this.ha.pb&this.ha.ab;this.oa[a]!=b&&(this.oa[a]=b,this.Va=!0)};W[8192]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d&this.ha.ab|this.oa[c]&~this.ha.ab,d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};W[24576]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d&this.ha.pb,d=d&this.ha.ab|this.oa[c]&~this.ha.ab,d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
W[40960]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d|this.ha.ob,d=d&this.ha.$a|this.oa[c]&~this.ha.$a,d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};W[57344]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d^this.ha.ob,d=d&this.ha.$a|this.oa[c]&~this.ha.$a,d=d&this.ha.cb|this.ha.ob&~this.ha.cb;this.oa[c]!=d&&(this.oa[c]=d,this.Ta=!0)};
|
W[40960]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d|this.ha.pb,d=d&this.ha.ab|this.oa[c]&~this.ha.ab,d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};W[57344]=function(a,b){var c=a+this.offset,d=dj[b&15],d=d^this.ha.pb,d=d&this.ha.ab|this.oa[c]&~this.ha.ab,d=d&this.ha.eb|this.ha.pb&~this.ha.eb;this.oa[c]!=d&&(this.oa[c]=d,this.Va=!0)};
|
||||||
function pj(a){var b=[];if(void 0!==a.Xd){b[0]=a.ec;b[1]=a.pc;b[2]=a.Te;b[3]=a.nf;b[4]=a.fc|a.Vg<<8;b[5]=a.Wb;if(5==a.Xd){var c=[];c[0]=a.$c;c[1]=a.vd;c[2]=a.Jd;c[3]=a.rh;c[4]=a.Of;c[5]=a.Ug;c[6]=a.xd;c[7]=a.vf;c[8]=a.gi;c[9]=a.hi;c[10]=a.wd;c[11]=a.me;c[12]=a.ob;c[13]=a.Jc;var d;a:if(d=a.Xc){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var m=d[h],n=h+2;n<d.length&&d[n]===m;)n+=2;f[e++]=n-h>>1;f[e++]=m;h=n}if(f.length<d.length){d=f;break a}}c[14]=d;c[15]=a.bh;c[16]=
|
function pj(a){var b=[];if(void 0!==a.$d){b[0]=a.hc;b[1]=a.sc;b[2]=a.Te;b[3]=a.nf;b[4]=a.ic|a.Vg<<8;b[5]=a.Zb;if(5==a.$d){var c=[];c[0]=a.dd;c[1]=a.yd;c[2]=a.Md;c[3]=a.sh;c[4]=a.Of;c[5]=a.Ug;c[6]=a.Ad;c[7]=a.vf;c[8]=a.hi;c[9]=a.ii;c[10]=a.zd;c[11]=a.me;c[12]=a.pb;c[13]=a.Mc;var d;a:if(d=a.$c){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var m=d[h],n=h+2;n<d.length&&d[n]===m;)n+=2;f[e++]=n-h>>1;f[e++]=m;h=n}if(f.length<d.length){d=f;break a}}c[14]=d;c[15]=a.bh;c[16]=
|
||||||
a.ej;c[17]=a.$a;c[18]=a.ed;c[19]=a.cb;c[20]=a.hh;c[21]=a.de;c[22]=a.Ce;c[23]=a.oi;c[24]=a.pi;b[6]=c}b[7]=a.vi}return b}function qj(a,b,c,d,e){if(d){var f="",g,h=0;for(g=0;g<e.length;g++)h<e[g].length&&(h=e[g].length);h++;for(g=0;g<e.length;g++){f&&(f+="\n");var m=e[g],f=f+(b+"["+p(g)+"]: "+(m+" ".substr(0,h-m.length))+p(d[g])+(g===c?"*":""))}a.aa.message(f)}else a.aa.message(b+": "+p(c))}
|
a.fj;c[17]=a.ab;c[18]=a.hd;c[19]=a.eb;c[20]=a.ih;c[21]=a.ee;c[22]=a.Ce;c[23]=a.pi;c[24]=a.qi;b[6]=c}b[7]=a.wi}return b}function qj(a,b,c,d,e){if(d){var f="",g,h=0;for(g=0;g<e.length;g++)h<e[g].length&&(h=e[g].length);h++;for(g=0;g<e.length;g++){f&&(f+="\n");var m=e[g],f=f+(b+"["+p(g)+"]: "+(m+" ".substr(0,h-m.length))+p(d[g])+(g===c?"*":""))}a.aa.message(f)}else a.aa.message(b+": "+p(c))}
|
||||||
ej.prototype.oh=function(a){if(null!=a&&a!=this.bh){var b=a&255,c=W[b];c||b&1&&(c=W[1]);var b=a&65280,d=W[b];d||b&256&&(d=W[256]);this.yf||(this.yf=[null,nj,null,oj]);this.yf[0]=c;this.yf[2]=d;this.bh=a}};var fj=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];k=S.prototype;
|
ej.prototype.ph=function(a){if(null!=a&&a!=this.bh){var b=a&255,c=W[b];c||b&1&&(c=W[1]);var b=a&65280,d=W[b];d||b&256&&(d=W[256]);this.yf||(this.yf=[null,nj,null,oj]);this.yf[0]=c;this.yf[2]=d;this.bh=a}};var fj=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];k=S.prototype;
|
||||||
k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;ib(b,this,rj);lb(b,this,sj);"ega"==this.Ha&&(ib(b,this,tj),lb(b,this,uj));if(d){var e=this;Cc(this.S,16,this,this.kn);Gh(d,d.sg,function(a){if(e.za)if(a){var b=e.za;if(b.Xc){a=ba(a);a=void 0!==a?a-b.Wa:b.to||0;0>a&&(a=0);for(var c="",d=0;8>d;d++){for(var n=l(b.Wa+a)+":",r=0;8>r&&a<b.Xc.length;r++)var u=b.Xc[a++],n=n+(" "+l(u));c&&(c+="\n");c+=n}c&&b.aa.message(c);b.to=a}else b.aa.message("no buffer")}else{e.aa.message("BIOSMODE: "+p(e.Dd));b=e.za;
|
k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;ib(b,this,rj);lb(b,this,sj);"ega"==this.Ea&&(ib(b,this,tj),lb(b,this,uj));if(d){var e=this;Cc(this.S,16,this,this.kn);Fh(d,d.sg,function(a){if(e.za)if(a){var b=e.za;if(b.$c){a=ba(a);a=void 0!==a?a-b.Xa:b.uo||0;0>a&&(a=0);for(var c="",d=0;8>d;d++){for(var n=l(b.Xa+a)+":",r=0;8>r&&a<b.$c.length;r++)var u=b.$c[a++],n=n+(" "+l(u));c&&(c+="\n");c+=n}c&&b.aa.message(c);b.uo=a}else b.aa.message("no buffer")}else{e.aa.message("BIOSMODE: "+p(e.Gd));b=e.za;
|
||||||
qj(b,"CRTC",b.fc,b.Wb,b.xg);if(1==b.Xd||3==b.Xd)qj(b," MODEREG",b.pc),qj(b," STATUS1",b.nf);3==b.Xd&&qj(b," COLOR",b.Te);5==b.Xd&&(b.aa.message(" ATCDATA: "+b.$c),qj(b," ATC",b.vd,b.Jd,b.Ah),qj(b," GRC",b.wd,b.me,b.Bh),qj(b," SEQ",b.xd,b.vf,b.Ch),qj(b," FEAT",b.Ug),qj(b," MISC",b.Of),qj(b," STATUS0",b.rh),qj(b," LATCHES",b.ob),b.aa.message(" ACCESS: "+q(b.bh)),b.aa.message("Use 'dump video buffer' to dump video memory"))}else e.aa.message("no active video card")})}(this.ib=C(a,"Keyboard"))&&
|
qj(b,"CRTC",b.ic,b.Zb,b.xg);if(1==b.$d||3==b.$d)qj(b," MODEREG",b.sc),qj(b," STATUS1",b.nf);3==b.$d&&qj(b," COLOR",b.Te);5==b.$d&&(b.aa.message(" ATCDATA: "+b.dd),qj(b," ATC",b.yd,b.Md,b.Bh),qj(b," GRC",b.zd,b.me,b.Ch),qj(b," SEQ",b.Ad,b.vf,b.Dh),qj(b," FEAT",b.Ug),qj(b," MISC",b.Of),qj(b," STATUS0",b.sh),qj(b," LATCHES",b.pb),b.aa.message(" ACCESS: "+q(b.bh)),b.aa.message("Use 'dump video buffer' to dump video memory"))}else e.aa.message("no active video card")})}(this.jb=C(a,"Keyboard"))&&
|
||||||
this.Db&&this.ib.pb("input",this.Ol?"textarea":"canvas","kbd",this.Ol||this.Db);this.zg=9;(this.ma=C(a,"ChipSet"))&&this.Jl&&(this.zg=yh(this.Jl,this.zg));this.ib&&this.nm&&vj(this)};k.kn=function(a){this.aa&&M(this.aa,this.aa.sg)&&(this.aa.message("Video.intBIOS(AX="+q(this.S.G)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,c){return function(d){var e=c,e=F(a.S)-e;a.Da("Video.intBIOSReturn("+d+") (cycles="+e+")")}}(this,F(this.S))));return!0};
|
this.Gb&&this.jb.qb("input",this.Ql?"textarea":"canvas","kbd",this.Ql||this.Gb);this.zg=9;(this.ma=C(a,"ChipSet"))&&this.Ll&&(this.zg=yh(this.Ll,this.zg));this.jb&&this.lm&&vj(this)};k.kn=function(a){this.aa&&M(this.aa,this.aa.sg)&&(this.aa.message("Video.intBIOS(AX="+q(this.S.G)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,c){return function(d){var e=c,e=F(a.S)-e;a.Da("Video.intBIOSReturn("+d+") (cycles="+e+")")}}(this,F(this.S))));return!0};
|
||||||
k.pb=function(a,b,c,d){var e=this;switch(c){case "refresh":return this.sa[c]=d,d.onclick=function(){Ab(e,!0)},!0}return!1};k.Gd=function(){this.Db&&this.Db.focus()};function vj(a){var b=a.Db;b&&!a.Wh&&(b.addEventListener("touchstart",function(b){wj(a,b)},!1),b.addEventListener("touchmove",function(b){wj(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Wh=!0)}
|
k.qb=function(a,b,c,d){var e=this;switch(c){case "refresh":return this.sa[c]=d,d.onclick=function(){Ab(e,!0)},!0}return!1};k.Jd=function(){this.Gb&&this.Gb.focus()};function vj(a){var b=a.Gb;b&&!a.Xh&&(b.addEventListener("touchstart",function(b){wj(a,b)},!1),b.addEventListener("touchmove",function(b){wj(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Xh=!0)}
|
||||||
function wj(a,b){a.$h&&b.preventDefault();var c=0,d=0,e=a.Db;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);c=a.rd/a.Db.offsetWidth*(b.targetTouches[0].pageX-c)/(a.rd/3)|0;d=a.Vd/a.Db.offsetHeight*(b.targetTouches[0].pageY-d)/(a.Vd/3)|0;1!=d?d?Ri(a.ib,264,!0):Ri(a.ib,262,!0):1!=c&&(c?Ri(a.ib,263,!0):Ri(a.ib,261,!0))}k.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
function wj(a,b){a.ai&&b.preventDefault();var c=0,d=0,e=a.Gb;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);c=a.ud/a.Gb.offsetWidth*(b.targetTouches[0].pageX-c)/(a.ud/3)|0;d=a.Yd/a.Gb.offsetHeight*(b.targetTouches[0].pageY-d)/(a.Yd/3)|0;1!=d?d?Ri(a.jb,264,!0):Ri(a.jb,262,!0):1!=c&&(c?Ri(a.jb,263,!0):Ri(a.jb,261,!0))}k.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
k.Rb=function(a){return a&&this.save?this.save():!0};
|
k.Ub=function(a){return a&&this.save?this.save():!0};
|
||||||
k.reset=function(){var a=!0,b=0;this.ma&&(b=Th(this.ma));var c=!1;if(this.Ha)switch(this.Ha){case "ega":var c=!0,d=Yi[this.zg];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.ae!==b&&(this.ae=b,a=!0);this.za=null;this.Ic=this.Jh=new ej(this,1);this.rb=this.Ig=new ej(this,3);c?(this.ja=new ej(this,5,null,this.Jc),xj(this)):this.ja=new ej;yj(this);this.Dd=null;this.fd=3==b?Wi:3;this.ve=this.Ac=-1;this.ue=0;zj(this,this.fd);if(this.za.Wa&&a){a=this.za.Wa+this.Kh;for(b=this.za.Wa;b<a;b+=
|
k.reset=function(){var a=!0,b=0;this.ma&&(b=Sh(this.ma));var c=!1;if(this.Ea)switch(this.Ea){case "ega":var c=!0,d=Yi[this.zg];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.be!==b&&(this.be=b,a=!0);this.za=null;this.Lc=this.Kh=new ej(this,1);this.tb=this.Ig=new ej(this,3);c?(this.ja=new ej(this,5,null,this.Mc),xj(this)):this.ja=new ej;yj(this);this.Gd=null;this.jd=3==b?Wi:3;this.ve=this.Cc=-1;this.ue=0;zj(this,this.jd);if(this.za.Xa&&a){a=this.za.Xa+this.Lh;for(b=this.za.Xa;b<a;b+=
|
||||||
2)d=Math.floor(65536*Math.random()),4==this.ae?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),gb(this.la,b,c|d<<8);Ab(this,!0)}};function xj(a){a.ja.Of&1?(a.Ic=a.Jh,a.rb=a.ja):(a.Ic=a.ja,a.rb=a.Ig)}k.save=function(){var a=new I(this);a.set(0,pj(this.Jh));a.set(1,pj(this.Ig));a.set(2,[this.ae,this.fd,this.Dd]);a.set(3,pj(this.ja));return a.data()};
|
2)d=Math.floor(65536*Math.random()),4==this.be?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),gb(this.la,b,c|d<<8);Ab(this,!0)}};function xj(a){a.ja.Of&1?(a.Lc=a.Kh,a.tb=a.ja):(a.Lc=a.ja,a.tb=a.Ig)}k.save=function(){var a=new I(this);a.set(0,pj(this.Kh));a.set(1,pj(this.Ig));a.set(2,[this.be,this.jd,this.Gd]);a.set(3,pj(this.ja));return a.data()};
|
||||||
k.restore=function(a){var b=a[2];this.ae=b[0];this.fd=b[1];this.Dd=b[2];this.za=null;this.Ic=this.Jh=new ej(this,1,a[0]);this.rb=this.Ig=new ej(this,3,a[1]);this.ja=new ej(this,5,a[3],this.Jc);this.ja.ec&&xj(this);yj(this);if(!Aj(this))return!1;Bj(this);return!0};
|
k.restore=function(a){var b=a[2];this.be=b[0];this.jd=b[1];this.Gd=b[2];this.za=null;this.Lc=this.Kh=new ej(this,1,a[0]);this.tb=this.Ig=new ej(this,3,a[1]);this.ja=new ej(this,5,a[3],this.Mc);this.ja.hc&&xj(this);yj(this);if(!Aj(this))return!1;Bj(this);return!0};
|
||||||
k.Cn=function(a,b,c){if(c)B(this,"Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){this.error("Empty font ROM image: "+a);return}if(1==d.length){this.error(d[0]);return}if(8192==d.length)Hi(this,d,[0,6144]);else{B(this,"Unrecognized font data length ("+d.length+")");return}}catch(e){B(this,"Font ROM data error: "+e.message);return}this.La()}};
|
k.Cn=function(a,b,c){if(c)B(this,"Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){this.error("Empty font ROM image: "+a);return}if(1==d.length){this.error(d[0]);return}if(8192==d.length)Hi(this,d,[0,6144]);else{B(this,"Unrecognized font data length ("+d.length+")");return}}catch(e){B(this,"Font ROM data error: "+e.message);return}this.Ma()}};
|
||||||
function Cj(a,b){if(1==b)return a.nd[0]=U[0],a.nd[1]=U[7],a.nd;if(2==b){var c=a.za.Te;if(a.za===a.ja){var d=a.ja.Jd[0],c=d&7;d&16&&(c|=8);18!=a.ja.Jd[1]&&(c|=32)}a.nd[0]=U[c&15];c=c&32?bj:aj;for(d=0;d<c.length;d++)a.nd[d+1]=U[c[d]];return a.nd}if(a.rb===a.Ig)return U;c=null!=a.ja.Jd[15]?a.ja.Jd:cj;for(d=0;d<a.nd.length;d++){var e=c[d]||0;a.nd[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.nd}function Hi(a,b,c,d){a.wg=b;a.wh=c;a.ye=d}
|
function Cj(a,b){if(1==b)return a.qd[0]=U[0],a.qd[1]=U[7],a.qd;if(2==b){var c=a.za.Te;if(a.za===a.ja){var d=a.ja.Md[0],c=d&7;d&16&&(c|=8);18!=a.ja.Md[1]&&(c|=32)}a.qd[0]=U[c&15];c=c&32?bj:aj;for(d=0;d<c.length;d++)a.qd[d+1]=U[c[d]];return a.qd}if(a.tb===a.Ig)return U;c=null!=a.ja.Md[15]?a.ja.Md:cj;for(d=0;d<a.qd.length;d++){var e=c[d]||0;a.qd[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.qd}function Hi(a,b,c,d){a.wg=b;a.xh=c;a.ye=d}
|
||||||
function yj(a){var b=!1;if(window&&a.wg){var c=a.ye?0:2048,d=a.ye?a.ye:9;Dj(a,1,a.wh[0],c,d,14,a.wg,Zi,$i)&&(b=!0);c=Cj(a);d=a.ye?a.ye:8;Dj(a,3,a.wh[1],0,d,8,a.wg,c)&&(b=!0);a.ye&&Dj(a,5,a.wh[0],0,a.ye,14,a.wg,c)&&(b=!0)}return b}function Dj(a,b,c,d,e,f,g,h,m){var n=!1;Ej(a,b,c,d,e,f,g,h,m)&&(n=!0);a.jm&&Ej(a,b<<1,c,d,e,f,g,h,m)&&(n=!0);return n}
|
function yj(a){var b=!1;if(window&&a.wg){var c=a.ye?0:2048,d=a.ye?a.ye:9;Dj(a,1,a.xh[0],c,d,14,a.wg,Zi,$i)&&(b=!0);c=Cj(a);d=a.ye?a.ye:8;Dj(a,3,a.xh[1],0,d,8,a.wg,c)&&(b=!0);a.ye&&Dj(a,5,a.xh[0],0,a.ye,14,a.wg,c)&&(b=!0)}return b}function Dj(a,b,c,d,e,f,g,h,m){var n=!1;Ej(a,b,c,d,e,f,g,h,m)&&(n=!0);a.hm&&Ej(a,b<<1,c,d,e,f,g,h,m)&&(n=!0);return n}
|
||||||
function Ej(a,b,c,d,e,f,g,h,m){var n=!1,r=b&1?0:1,u=a.Ld[b];u||(u={cc:e<<r,dc:f<<r,Ne:Array(h.length),Fj:h.slice(),tf:m,uh:Array(h.length)});for(m=0;m<h.length;m++){var t=h[m],v=u.Ne[m]?u.Fj[m]:[];if(t[0]!==v[0]||t[1]!==v[1]||t[2]!==v[2]){var n=u,v=m,A=r,D=c,ia=d,rb=e,sb=f,Mc=g,Sd=[0,0,0,0],Nc=window.document.createElement("canvas");Nc.width=n.cc<<4;Nc.height=n.dc<<4;for(var Ki=Nc.getContext("2d"),Fa=void 0,Hb=void 0,fb=void 0,Oc=8>sb||!ia?sb:8,Td=Ki.createImageData(n.cc,n.dc),Fa=0;256>Fa;Fa++){for(fb=
|
function Ej(a,b,c,d,e,f,g,h,m){var n=!1,r=b&1?0:1,u=a.Od[b];u||(u={fc:e<<r,gc:f<<r,Ne:Array(h.length),Gj:h.slice(),tf:m,vh:Array(h.length)});for(m=0;m<h.length;m++){var t=h[m],v=u.Ne[m]?u.Gj[m]:[];if(t[0]!==v[0]||t[1]!==v[1]||t[2]!==v[2]){var n=u,v=m,A=r,D=c,ia=d,qb=e,rb=f,Lc=g,Sd=[0,0,0,0],Mc=window.document.createElement("canvas");Mc.width=n.fc<<4;Mc.height=n.gc<<4;for(var Ki=Mc.getContext("2d"),Ga=void 0,Hb=void 0,eb=void 0,Nc=8>rb||!ia?rb:8,Td=Ki.createImageData(n.fc,n.gc),Ga=0;256>Ga;Ga++){for(eb=
|
||||||
0;fb<sb;fb++)for(var el=n.tf&&v&1&&fb>=sb-2,fl=Mc[fb<Oc?D+Fa*Oc+fb:ia+Fa*Oc+fb-Oc],Ud=0;Ud<=A;Ud++)for(Hb=0;Hb<rb;Hb++){var Li=Hb<<A,Mi=(fb<<A)+Ud,Ni=el||fl&128>>(8<=Hb&&176<=Fa&&223>=Fa?7:Hb)?t:Sd;Fj(Td,Li,Mi,Ni);A&&Fj(Td,Li+1,Mi,Ni)}Ki.putImageData(Td,(Fa&15)*n.cc,(Fa>>4)*n.dc)}n.Ne[v]="#"+p(t[0])+p(t[1])+p(t[2]);n.Fj[v]=t;n.uh[v]=Nc;n=!0}}a.Ld[b]=u;return n}function Gj(a){0<a.ue||0<=a.Ac?0>a.ve&&(a.ve=0):a.ve=-1}
|
0;eb<rb;eb++)for(var el=n.tf&&v&1&&eb>=rb-2,fl=Lc[eb<Nc?D+Ga*Nc+eb:ia+Ga*Nc+eb-Nc],Ud=0;Ud<=A;Ud++)for(Hb=0;Hb<qb;Hb++){var Li=Hb<<A,Mi=(eb<<A)+Ud,Ni=el||fl&128>>(8<=Hb&&176<=Ga&&223>=Ga?7:Hb)?t:Sd;Fj(Td,Li,Mi,Ni);A&&Fj(Td,Li+1,Mi,Ni)}Ki.putImageData(Td,(Ga&15)*n.fc,(Ga>>4)*n.gc)}n.Ne[v]="#"+p(t[0])+p(t[1])+p(t[2]);n.Gj[v]=t;n.vh[v]=Mc;n=!0}}a.Od[b]=u;return n}function Gj(a){0<a.ue||0<=a.Cc?0>a.ve&&(a.ve=0):a.ve=-1}
|
||||||
function Bj(a){if(a.Nb){for(var b=10;15>=b;b++)if(null==a.za.Wb[b])return;var c=a.za.Wb[10],b=c&31,d=a.za.Wb[11]&31,e=a.za.Wb[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)Hj(a);else{c=a.za.Wb[15]+((a.za.Wb[14]&63)<<8);a.Ac!=c&&(Hj(a),a.Ac=c);d=d-b+1;if(a.Rl!=b||a.Xj!=d)a.Rl=b,a.Xj=d;a.Ud=e+1;Gj(a)}}}
|
function Bj(a){if(a.Qb){for(var b=10;15>=b;b++)if(null==a.za.Zb[b])return;var c=a.za.Zb[10],b=c&31,d=a.za.Zb[11]&31,e=a.za.Zb[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)Hj(a);else{c=a.za.Zb[15]+((a.za.Zb[14]&63)<<8);a.Cc!=c&&(Hj(a),a.Cc=c);d=d-b+1;if(a.Tl!=b||a.$j!=d)a.Tl=b,a.$j=d;a.Xd=e+1;Gj(a)}}}
|
||||||
function Hj(a){if(0<=a.Ac){if(void 0!==a.Xb){var b=a.Xb[a.Ac];if(b&131072){var b=b&-131073,c=a.Ac%a.tb,d=Math.floor(a.Ac/a.tb);a.Nb&&a.Ld[a.Nb]&&(a.Ue&&Ij(a,c,d,b,a.Ue),Ij(a,c,d,b));a.Xb[a.Ac]=b}}a.Ac=-1}}
|
function Hj(a){if(0<=a.Cc){if(void 0!==a.$b){var b=a.$b[a.Cc];if(b&131072){var b=b&-131073,c=a.Cc%a.vb,d=Math.floor(a.Cc/a.vb);a.Qb&&a.Od[a.Qb]&&(a.Ue&&Ij(a,c,d,b,a.Ue),Ij(a,c,d,b));a.$b[a.Cc]=b}}a.Cc=-1}}
|
||||||
function Jj(a){var b;a=a.za;var c=a.me[5];if(null!=c){b=2;var d=512,e=a.me[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.ed=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.ge=function(a){var b=this.za;null!=a&&b&&a!=b.bh&&(b.oh(a),this.la.oh(b.Wa,b.jc,b.yf))};
|
function Jj(a){var b;a=a.za;var c=a.me[5];if(null!=c){b=2;var d=512,e=a.me[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.hd=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.he=function(a){var b=this.za;null!=a&&b&&a!=b.bh&&(b.ph(a),this.la.ph(b.Xa,b.mc,b.yf))};
|
||||||
function Aj(a,b){var c,d=a.Dd,e=a.za;if(e)if(1==e.Xd)d=Wi;else if(5==e.Xd){var d=null,f=e.Jc>>2,g=32768<f?32768:f,h=e.me[6];if(null!=h){switch(h&12){case 0:e.Wa=655360;e.jc=f;d=255;break;case 4:e.Wa=655360;e.jc=f;d=3==a.ae?15:16;break;case 8:e.Wa=720896;e.jc=g;d=Wi;break;case 12:e.Wa=753664,e.jc=g,d=3==a.ae?2:3}c=e.vf[1]&8;f=e.Wb[6]|(e.Wb[7]&1)<<8;255!=d&&(h&1?753664==e.Wa?d=c?7-d:6:350>f&&(d=c?13:14):c&&(d-=2));c=Jj(a)}}else e.pc&8&&(e.pc&2?(d=e.pc&16?6:5,e.pc&4||(d-=1)):(d=e.pc&1?3:1,e.pc&4&&(d-=
|
function Aj(a,b){var c,d=a.Gd,e=a.za;if(e)if(1==e.$d)d=Wi;else if(5==e.$d){var d=null,f=e.Mc>>2,g=32768<f?32768:f,h=e.me[6];if(null!=h){switch(h&12){case 0:e.Xa=655360;e.mc=f;d=255;break;case 4:e.Xa=655360;e.mc=f;d=3==a.be?15:16;break;case 8:e.Xa=720896;e.mc=g;d=Wi;break;case 12:e.Xa=753664,e.mc=g,d=3==a.be?2:3}c=e.vf[1]&8;f=e.Zb[6]|(e.Zb[7]&1)<<8;255!=d&&(h&1?753664==e.Xa?d=c?7-d:6:350>f&&(d=c?13:14):c&&(d-=2));c=Jj(a)}}else e.sc&8&&(e.sc&2?(d=e.sc&16?6:5,e.sc&4||(d-=1)):(d=e.sc&1?3:1,e.sc&4&&(d-=
|
||||||
1)));else a.Dd=null,null==d&&(d=a.fd);if(!zj(a,d,b))return!1;a.ge(c);return!0}
|
1)));else a.Gd=null,null==d&&(d=a.jd);if(!zj(a,d,b))return!1;a.he(c);return!0}
|
||||||
function zj(a,b,c){if(null!=b&&(b!=a.Dd||c)){a.em=0;a.Dd=b;b=a.za||(b==Wi?a.Ic:a.rb);if(b!=a.za||b.Wa!=a.Wa||b.jc!=a.jc){Hj(a);if(a.Wa){if(!bb(a.la,a.Wa,a.jc))return!1;a.za&&(a.za.ec=!1)}a.za=b;b.ec=!0;a.Wa=b.Wa;a.jc=b.jc;if(!$a(a.la,b.Wa,b.jc,!1,b===a.ja?b:null))return!1}a.Nb=0;a.tb=a.fh;a.ic=a.si;a.ni=T[Wi][2];b=0;var d=T[a.Dd];d&&(a.tb=d[0],a.ic=d[1],a.ni=d[2],b=d[3]||0,a.Nb=d[4],4==a.ae&&a.za===a.ja&&3==a.Nb&&(7==a.ja.Wb[9]?a.ic=43:a.Nb=5));a.sk=a.tb*a.ic;a.eh=a.sk/a.ni;a.Kh=(a.eh<<1)+b;a.Uj=
|
function zj(a,b,c){if(null!=b&&(b!=a.Gd||c)){a.cm=0;a.Gd=b;b=a.za||(b==Wi?a.Lc:a.tb);if(b!=a.za||b.Xa!=a.Xa||b.mc!=a.mc){Hj(a);if(a.Xa){if(!bb(a.la,a.Xa,a.mc))return!1;a.za&&(a.za.hc=!1)}a.za=b;b.hc=!0;a.Xa=b.Xa;a.mc=b.mc;if(!$a(a.la,b.Xa,b.mc,!1,b===a.ja?b:null))return!1}a.Qb=0;a.vb=a.fh;a.lc=a.ti;a.oi=T[Wi][2];b=0;var d=T[a.Gd];d&&(a.vb=d[0],a.lc=d[1],a.oi=d[2],b=d[3]||0,a.Qb=d[4],4==a.be&&a.za===a.ja&&3==a.Qb&&(7==a.ja.Zb[9]?a.lc=43:a.Qb=5));a.vk=a.vb*a.lc;a.eh=a.vk/a.oi;a.Lh=(a.eh<<1)+b;a.Xj=
|
||||||
b?a.Kh+b>>1:0;13<=a.Dd&&(a.eh<<=1);a.Ld.length&&(a.sd=Math.floor(a.rd/a.tb),a.td=Math.floor(a.Vd/a.ic),a.Nb?(b=a.Ld[a.Nb],d=a.Ld[a.Nb<<1],a.lm&&80==a.tb?d&&a.sd>=3*d.cc>>2&&(a.Nb<<=1,b=d):(d&&a.sd>=d.cc&&(a.Nb<<=1,b=d),b&&(a.sd=b.cc,a.td=b.dc)),a.Jf=a.Kf=0,b&&(a.Jf=a.tb*b.cc,a.Kf=a.ic*b.dc)):(a.sd=a.td=1,a.Jf=a.tb,a.Kf=a.ic),a.Yg=a.Lc.createImageData(a.Jf,a.Kf),a.Se=window.document.createElement("canvas"),a.Se.width=a.Jf,a.Se.height=a.Kf,a.Ue=a.Se.getContext("2d"),a.vj=a.wj=0,a.Mh=a.rd,a.Nh=a.Vd,
|
b?a.Lh+b>>1:0;13<=a.Gd&&(a.eh<<=1);a.Od.length&&(a.vd=Math.floor(a.ud/a.vb),a.wd=Math.floor(a.Yd/a.lc),a.Qb?(b=a.Od[a.Qb],d=a.Od[a.Qb<<1],a.jm&&80==a.vb?d&&a.vd>=3*d.fc>>2&&(a.Qb<<=1,b=d):(d&&a.vd>=d.fc&&(a.Qb<<=1,b=d),b&&(a.vd=b.fc,a.wd=b.gc)),a.Jf=a.Kf=0,b&&(a.Jf=a.vb*b.fc,a.Kf=a.lc*b.gc)):(a.vd=a.wd=1,a.Jf=a.vb,a.Kf=a.lc),a.Yg=a.Oc.createImageData(a.Jf,a.Kf),a.Se=window.document.createElement("canvas"),a.Se.width=a.Jf,a.Se.height=a.Kf,a.Ue=a.Se.getContext("2d"),a.xj=a.yj=0,a.Nh=a.ud,a.Oh=a.Yd,
|
||||||
b=a.rd-a.tb*a.sd,d=a.Vd-a.ic*a.td,0<b&&(a.vj=b>>1,a.Mh-=b),0<d&&(a.wj=d>>1,a.Nh-=d),b||d)&&(a.Lc.fillStyle=a.Db.style.backgroundColor,a.Lc.fillRect(0,0,a.rd,a.Vd));!1!==c?Ab(a,!0):Kj(a,!0)}return!0}function Fj(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 Kj(a,b){var c;if(b){if(c=a.eh,void 0===a.Xb||a.Xb.length!=c)a.Xb=Array(c)}else{if(void 0===a.Xb)return;c=a.Xb.length}for(var d=0;d<c;d++)a.Xb[d]=-1;a.ue=-1}
|
b=a.ud-a.vb*a.vd,d=a.Yd-a.lc*a.wd,0<b&&(a.xj=b>>1,a.Nh-=b),0<d&&(a.yj=d>>1,a.Oh-=d),b||d)&&(a.Oc.fillStyle=a.Gb.style.backgroundColor,a.Oc.fillRect(0,0,a.ud,a.Yd));!1!==c?Ab(a,!0):Kj(a,!0)}return!0}function Fj(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 Kj(a,b){var c;if(b){if(c=a.eh,void 0===a.$b||a.$b.length!=c)a.$b=Array(c)}else{if(void 0===a.$b)return;c=a.$b.length}for(var d=0;d<c;d++)a.$b[d]=-1;a.ue=-1}
|
||||||
function Ij(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Ld[a.Nb];h.tf&&(d=h.tf[d]);var m=g>>4&15;h.tf&&(m=h.tf[m]);e?(b*=h.cc,c*=h.dc,e.fillStyle=h.Ne[m],e.fillRect(b,c,h.cc,h.dc)):(b=b*a.sd+a.vj,c=c*a.td+a.wj,a.Lc.fillStyle=h.Ne[m],a.Lc.fillRect(b,c,a.sd,a.td));g&256&&(m=(f&15)*h.cc,f=(f>>4)*h.dc,e?e.drawImage(h.uh[d],m,f,h.cc,h.dc,b,c,h.cc,h.dc):a.Lc.drawImage(h.uh[d],m,f,h.cc,h.dc,b,c,a.sd,a.td));g&512&&(f=a.Rl,g=a.Xj,e?(a.Ud&&a.Ud!==h.dc&&(f=Math.floor(f*h.dc/a.Ud),g=Math.floor(g*h.dc/a.Ud)),
|
function Ij(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Od[a.Qb];h.tf&&(d=h.tf[d]);var m=g>>4&15;h.tf&&(m=h.tf[m]);e?(b*=h.fc,c*=h.gc,e.fillStyle=h.Ne[m],e.fillRect(b,c,h.fc,h.gc)):(b=b*a.vd+a.xj,c=c*a.wd+a.yj,a.Oc.fillStyle=h.Ne[m],a.Oc.fillRect(b,c,a.vd,a.wd));g&256&&(m=(f&15)*h.fc,f=(f>>4)*h.gc,e?e.drawImage(h.vh[d],m,f,h.fc,h.gc,b,c,h.fc,h.gc):a.Oc.drawImage(h.vh[d],m,f,h.fc,h.gc,b,c,a.vd,a.wd));g&512&&(f=a.Tl,g=a.$j,e?(a.Xd&&a.Xd!==h.gc&&(f=Math.floor(f*h.gc/a.Xd),g=Math.floor(g*h.gc/a.Xd)),
|
||||||
e.fillStyle=h.Ne[d],e.fillRect(b,c+f,h.cc,g)):(a.Ud&&a.Ud!==a.td&&(f=Math.floor(f*a.td/a.Ud),g=Math.floor(g*a.td/a.Ud)),a.Lc.fillStyle=h.Ne[d],a.Lc.fillRect(b,c+f,a.sd,g)))}
|
e.fillStyle=h.Ne[d],e.fillRect(b,c+f,h.fc,g)):(a.Xd&&a.Xd!==a.wd&&(f=Math.floor(f*a.wd/a.Xd),g=Math.floor(g*a.wd/a.Xd)),a.Oc.fillStyle=h.Ne[d],a.Oc.fillRect(b,c+f,a.vd,g)))}
|
||||||
function Ab(a,b){if(a.Eb){var c=!1;a.za&&(a.za===a.ja?a.ja.vd&32&&(c=!0):a.za.pc&8&&(c=!0));if(c||b){if(b)Kj(a,!0);else if(void 0===a.Xb)return;var d=!1;!(b||++a.em&15)&&0<=a.ve&&(a.ve++,d=!0);var e=0,f=a.sk,c=a.za.Wa,g=c+a.za.jc,h=(a.za.Wb[12]<<8)+a.za.Wb[13];a.Nb&&(h<<=1);var c=c+h,m=a.Kh;c+m>g&&(m=g-c,0>m&&(m=0));g=c+m;if(h=!b){for(var h=a.la,n=!0,r=c>>h.hb;0<m&&r<h.ya.length;)h.ya[r].Ta&&(h.ya[r].Ta=n=!1,h.ya[r].ak=!0),m-=h.$b,r++;h=n}if(h){if(!d)return;if(!a.ue){if(0>a.Ac)return;e=a.Ac;f=e+1}}if(a.Nb){if(a.Ld[a.Nb]){d=
|
function Ab(a,b){if(a.Hb){var c=!1;a.za&&(a.za===a.ja?a.ja.yd&32&&(c=!0):a.za.sc&8&&(c=!0));if(c||b){if(b)Kj(a,!0);else if(void 0===a.$b)return;var d=!1;!(b||++a.cm&15)&&0<=a.ve&&(a.ve++,d=!0);var e=0,f=a.vk,c=a.za.Xa,g=c+a.za.mc,h=(a.za.Zb[12]<<8)+a.za.Zb[13];a.Qb&&(h<<=1);var c=c+h,m=a.Lh;c+m>g&&(m=g-c,0>m&&(m=0));g=c+m;if(h=!b){for(var h=a.la,n=!0,r=c>>h.ib;0<m&&r<h.ya.length;)h.ya[r].Va&&(h.ya[r].Va=n=!1,h.ya[r].dk=!0),m-=h.cc,r++;h=n}if(h){if(!d)return;if(!a.ue){if(0>a.Cc)return;e=a.Cc;f=e+1}}if(a.Qb){if(a.Od[a.Qb]){d=
|
||||||
0;h=a.ue=0;m=1048575;a.za.pc&32&&(h=32768,m&=~h,a.ve&2||(m&=-65537));for(c+=e<<1;c<g&&e<f;)n=db(a.la,c),n|=65536,n&h&&(a.ue++,n&=m),e==a.Ac&&(n|=a.ve&1?131072:0),r=a.Xb[e],r!=n&&(Ij(a,e%a.tb,Math.floor(e/a.tb),n,a.Ue),a.Xb[e]=n,d++),c+=2,e++;d&&a.Ue&&a.Lc.drawImage(a.Se,0,0,a.Jf,a.Kf,a.vj,a.wj,a.Mh,a.Nh);Gj(a)}}else if(a.Uj){for(var f=g,u,t,e=c,g=a.ue=0,d=a.ni,h=16==d?65536:196608,m=16==d?1:2,n=Cj(a,m),v=r=0,A=a.tb,D=0,ia=a.ic,rb=0;e<f;){u=db(a.la,e);t=a.Xb[g];if(t===u)r+=d;else{a.Xb[g]=u;u=u>>8|
|
0;h=a.ue=0;m=1048575;a.za.sc&32&&(h=32768,m&=~h,a.ve&2||(m&=-65537));for(c+=e<<1;c<g&&e<f;)n=db(a.la,c),n|=65536,n&h&&(a.ue++,n&=m),e==a.Cc&&(n|=a.ve&1?131072:0),r=a.$b[e],r!=n&&(Ij(a,e%a.vb,Math.floor(e/a.vb),n,a.Ue),a.$b[e]=n,d++),c+=2,e++;d&&a.Ue&&a.Oc.drawImage(a.Se,0,0,a.Jf,a.Kf,a.xj,a.yj,a.Nh,a.Oh);Gj(a)}}else if(a.Xj){for(var f=g,u,t,e=c,g=a.ue=0,d=a.oi,h=16==d?65536:196608,m=16==d?1:2,n=Cj(a,m),v=r=0,A=a.vb,D=0,ia=a.lc,qb=0;e<f;){u=db(a.la,e);t=a.$b[g];if(t===u)r+=d;else{a.$b[g]=u;u=u>>8|
|
||||||
(u&255)<<8;t=h;var sb=16;r<A&&(A=r);for(var Mc=0;Mc<d;Mc++){var Sd=(u&(t>>=m))>>(sb-=m);Fj(a.Yg,r++,v,n[Sd])}r>D&&(D=r);v<ia&&(ia=v);v>=rb&&(rb=v+1)}e+=2;g++;if(r>=a.tb){r=0;v+=2;if(v>a.ic)break;v==a.ic&&(v=1,e=c+a.Uj)}}A<a.tb&&(a.Ue.putImageData(a.Yg,0,0,A,ia,D-A,rb-ia),a.Lc.drawImage(a.Se,0,0,a.tb,a.ic,0,0,a.rd,a.Vd))}else{f=g;e=a.ue=0;g=Cj(a);d=a.za.Xc;m=h=0;n=a.tb;r=0;v=a.ic;for(A=0;c<f;){D=c++-a.Wa;D=d[D];ia=a.Xb[e];if(ia===D)h+=8;else{a.Xb[e]=D;h<n&&(n=h);for(ia=0;8>ia;ia++)rb=V[D&2155905152],
|
(u&255)<<8;t=h;var rb=16;r<A&&(A=r);for(var Lc=0;Lc<d;Lc++){var Sd=(u&(t>>=m))>>(rb-=m);Fj(a.Yg,r++,v,n[Sd])}r>D&&(D=r);v<ia&&(ia=v);v>=qb&&(qb=v+1)}e+=2;g++;if(r>=a.vb){r=0;v+=2;if(v>a.lc)break;v==a.lc&&(v=1,e=c+a.Xj)}}A<a.vb&&(a.Ue.putImageData(a.Yg,0,0,A,ia,D-A,qb-ia),a.Oc.drawImage(a.Se,0,0,a.vb,a.lc,0,0,a.ud,a.Yd))}else{f=g;e=a.ue=0;g=Cj(a);d=a.za.$c;m=h=0;n=a.vb;r=0;v=a.lc;for(A=0;c<f;){D=c++-a.Xa;D=d[D];ia=a.$b[e];if(ia===D)h+=8;else{a.$b[e]=D;h<n&&(n=h);for(ia=0;8>ia;ia++)qb=V[D&2155905152],
|
||||||
Fj(a.Yg,h++,m,g[rb]),D<<=1;h>r&&(r=h);m<v&&(v=m);m>=A&&(A=m+1)}e++;if(h>=a.tb&&(h=0,++m>a.ic))break}n<a.tb&&(a.Ue.putImageData(a.Yg,0,0,n,v,r-n,A-v),a.Lc.drawImage(a.Se,0,0,a.tb,a.ic,0,0,a.rd,a.Vd))}}}}k.Um=function(a,b){return Lj(this,this.Ic,b)};k.eo=function(a,b,c){a=this.Ic;a.Vg=a.fc;a.fc=b&31;this.ca(a.port,b,c,"CRTC.INDX")};k.Tm=function(a,b){return Mj(this,this.Ic,b)};k.co=function(a,b,c){Nj(this,this.Ic,b,c)};k.Vm=function(a,b){return Oj(this,this.Ic,b)};
|
Fj(a.Yg,h++,m,g[qb]),D<<=1;h>r&&(r=h);m<v&&(v=m);m>=A&&(A=m+1)}e++;if(h>=a.vb&&(h=0,++m>a.lc))break}n<a.vb&&(a.Ue.putImageData(a.Yg,0,0,n,v,r-n,A-v),a.Oc.drawImage(a.Se,0,0,a.vb,a.lc,0,0,a.ud,a.Yd))}}}}k.Um=function(a,b){return Lj(this,this.Lc,b)};k.fo=function(a,b,c){a=this.Lc;a.Vg=a.ic;a.ic=b&31;this.ca(a.port,b,c,"CRTC.INDX")};k.Tm=function(a,b){return Mj(this,this.Lc,b)};k.eo=function(a,b,c){Nj(this,this.Lc,b,c)};k.Vm=function(a,b){return Oj(this,this.Lc,b)};
|
||||||
k.fo=function(a,b,c){a=this.Ic;this.ca(a.port+4,b,c,"MODE");a.pc=b;Aj(this,!1)};k.Wm=function(a,b){return Pj(this,this.Ic,b)};k.Al=function(a,b,c){this.ja.Ug=this.ja.Ug&-4|b&3;this.ca(a,b,c,"FEAT")};k.ok=function(a,b){var c=this.ja.$c?this.ja.Jd[this.ja.vd&31]:this.ja.vd;this.ca(960,null,b,"ATC."+(this.ja.$c?this.ja.Ah[this.ja.vd&31]:"INDX"),c);this.ja.$c=!this.ja.$c;return c};
|
k.ho=function(a,b,c){a=this.Lc;this.ca(a.port+4,b,c,"MODE");a.sc=b;Aj(this,!1)};k.Wm=function(a,b){return Pj(this,this.Lc,b)};k.Cl=function(a,b,c){this.ja.Ug=this.ja.Ug&-4|b&3;this.ca(a,b,c,"FEAT")};k.rk=function(a,b){var c=this.ja.dd?this.ja.Md[this.ja.yd&31]:this.ja.yd;this.ca(960,null,b,"ATC."+(this.ja.dd?this.ja.Bh[this.ja.yd&31]:"INDX"),c);this.ja.dd=!this.ja.dd;return c};
|
||||||
k.zl=function(a,b,c){var d=this.ja.vd&32;if(this.ja.$c){var e=this.ja.vd&31;if(16<=e||!d)this.ca(a,b,c,"ATC."+this.ja.Ah[e]),this.ja.Jd[e]=b;this.ja.$c=!1}else this.ja.vd=b,this.ca(a,b,c,"ATC.INDX"),this.ja.$c=!0,b&32&&!d&&yj(this)&&Ab(this,!0)};k.fn=function(a,b){var c=3-((this.ja.Of&12)>>2),c=this.ja.rh&-17|(this.zg&1<<c)<<4-c;this.ja.rh=c;this.ca(962,null,b,"STATUS0",c);return c};k.io=function(a,b,c){this.ja.Of=b;xj(this);this.ca(962,b,c,"MISC")};
|
k.Bl=function(a,b,c){var d=this.ja.yd&32;if(this.ja.dd){var e=this.ja.yd&31;if(16<=e||!d)this.ca(a,b,c,"ATC."+this.ja.Bh[e]),this.ja.Md[e]=b;this.ja.dd=!1}else this.ja.yd=b,this.ca(a,b,c,"ATC.INDX"),this.ja.dd=!0,b&32&&!d&&yj(this)&&Ab(this,!0)};k.fn=function(a,b){var c=3-((this.ja.Of&12)>>2),c=this.ja.sh&-17|(this.zg&1<<c)<<4-c;this.ja.sh=c;this.ca(962,null,b,"STATUS0",c);return c};k.jo=function(a,b,c){this.ja.Of=b;xj(this);this.ca(962,b,c,"MISC")};
|
||||||
k.en=function(a,b){var c=this.ja.xd;this.ca(964,null,b,"SEQ.INDX",c);return c};k.po=function(a,b,c){this.ja.xd=b;this.ca(964,b,c,"SEQ.INDX")};k.dn=function(a,b){var c=this.ja.vf[this.ja.xd];this.ca(965,null,b,"SEQ"+this.ja.Ch[this.ja.xd],c);return c};k.oo=function(a,b,c){this.ca(965,b,c,"SEQ."+this.ja.Ch[this.ja.xd]);this.ja.vf[this.ja.xd]=b;2==this.ja.xd&&(this.ja.$a=dj[b&15])};k.Jm=function(a,b){var c=this.ja.gi;this.ca(972,null,b,"GRC1",c);return c};
|
k.en=function(a,b){var c=this.ja.Ad;this.ca(964,null,b,"SEQ.INDX",c);return c};k.qo=function(a,b,c){this.ja.Ad=b;this.ca(964,b,c,"SEQ.INDX")};k.dn=function(a,b){var c=this.ja.vf[this.ja.Ad];this.ca(965,null,b,"SEQ"+this.ja.Dh[this.ja.Ad],c);return c};k.po=function(a,b,c){this.ca(965,b,c,"SEQ."+this.ja.Dh[this.ja.Ad]);this.ja.vf[this.ja.Ad]=b;2==this.ja.Ad&&(this.ja.ab=dj[b&15])};k.Hm=function(a,b){var c=this.ja.hi;this.ca(972,null,b,"GRC1",c);return c};
|
||||||
k.Un=function(a,b,c){this.ja.gi=b;this.ca(972,b,c,"GRC1")};k.Km=function(a,b){var c=this.ja.hi;this.ca(970,null,b,"GRC2",c);return c};k.Vn=function(a,b,c){this.ja.hi=b;this.ca(970,b,c,"GRC2")};k.Im=function(a,b){var c=this.ja.wd;this.ca(974,null,b,"GRC.INDX",c);return c};k.Tn=function(a,b,c){this.ja.wd=b;this.ca(974,b,c,"GRC.INDX")};k.Hm=function(a,b){var c=this.ja.me[this.ja.wd];this.ca(975,null,b,"GRC."+this.ja.Bh[this.ja.wd],c);return c};
|
k.Un=function(a,b,c){this.ja.hi=b;this.ca(972,b,c,"GRC1")};k.Im=function(a,b){var c=this.ja.ii;this.ca(970,null,b,"GRC2",c);return c};k.Vn=function(a,b,c){this.ja.ii=b;this.ca(970,b,c,"GRC2")};k.Gm=function(a,b){var c=this.ja.zd;this.ca(974,null,b,"GRC.INDX",c);return c};k.Tn=function(a,b,c){this.ja.zd=b;this.ca(974,b,c,"GRC.INDX")};k.Fm=function(a,b){var c=this.ja.me[this.ja.zd];this.ca(975,null,b,"GRC."+this.ja.Ch[this.ja.zd],c);return c};
|
||||||
k.Sn=function(a,b,c){this.ca(975,b,c,"GRC."+this.ja.Bh[this.ja.wd]);this.ja.me[this.ja.wd]=b;switch(this.ja.wd){case 0:this.ja.hh=dj[b&15];this.ja.Ce=this.ja.hh&~this.ja.de;break;case 1:this.ja.de=~dj[b&15];this.ja.Ce=this.ja.hh&~this.ja.de;break;case 2:this.ja.oi=dj[b&15]&2155905152;break;case 3:case 5:this.ge(Jj(this));break;case 4:this.ja.ej=(b&3)<<3;break;case 6:Aj(this,!1);break;case 7:this.ja.pi=dj[b&15^15]&2155905152;break;case 8:this.ja.cb=b|b<<8|b<<16|b<<24}};
|
k.Sn=function(a,b,c){this.ca(975,b,c,"GRC."+this.ja.Ch[this.ja.zd]);this.ja.me[this.ja.zd]=b;switch(this.ja.zd){case 0:this.ja.ih=dj[b&15];this.ja.Ce=this.ja.ih&~this.ja.ee;break;case 1:this.ja.ee=~dj[b&15];this.ja.Ce=this.ja.ih&~this.ja.ee;break;case 2:this.ja.pi=dj[b&15]&2155905152;break;case 3:case 5:this.he(Jj(this));break;case 4:this.ja.fj=(b&3)<<3;break;case 6:Aj(this,!1);break;case 7:this.ja.qi=dj[b&15^15]&2155905152;break;case 8:this.ja.eb=b|b<<8|b<<16|b<<24}};
|
||||||
k.zm=function(a,b){return Lj(this,this.rb,b)};k.Ln=function(a,b,c){a=this.rb;a.Vg=a.fc;a.fc=b&31;this.ca(a.port,b,c,"CRTC.INDX")};k.ym=function(a,b){return Mj(this,this.rb,b)};k.Kn=function(a,b,c){Nj(this,this.rb,b,c)};k.Am=function(a,b){return Oj(this,this.rb,b)};k.Mn=function(a,b,c){a=this.rb;this.ca(a.port+4,b,c,"MODE");a.pc=b;Aj(this,!1)};k.xm=function(a,b){var c=this.rb.Te;this.ca(this.rb.port+5,null,b,this.rb.type+".COLOR",c);return c};
|
k.xm=function(a,b){return Lj(this,this.tb,b)};k.Ln=function(a,b,c){a=this.tb;a.Vg=a.ic;a.ic=b&31;this.ca(a.port,b,c,"CRTC.INDX")};k.wm=function(a,b){return Mj(this,this.tb,b)};k.Kn=function(a,b,c){Nj(this,this.tb,b,c)};k.ym=function(a,b){return Oj(this,this.tb,b)};k.Mn=function(a,b,c){a=this.tb;this.ca(a.port+4,b,c,"MODE");a.sc=b;Aj(this,!1)};k.vm=function(a,b){var c=this.tb.Te;this.ca(this.tb.port+5,null,b,this.tb.type+".COLOR",c);return c};
|
||||||
k.Jn=function(a,b,c){this.ca(this.rb.port+5,b,c,this.rb.type+".COLOR");this.rb.Te!==b&&(this.rb.Te=b,Kj(this,!1))};k.Bm=function(a,b){return Pj(this,this.rb,b)};function Lj(a,b,c){var d=b.fc;a.ca(b.port,null,c,"CRTC.INDX",d);return d}function Mj(a,b,c){var d;b.fc<b.mi&&(d=b.Wb[b.fc]);a.ca(b.port+1,null,c,"CRTC."+b.xg[b.fc],d);return d}function Nj(a,b,c,d){b.fc<b.mi&&(a.ca(b.port+1,c,d,"CRTC."+b.xg[b.fc]),b.Wb[b.fc]=c,9==b.fc&&8!=b.Vg&&Aj(a,!0),Bj(a))}
|
k.Jn=function(a,b,c){this.ca(this.tb.port+5,b,c,this.tb.type+".COLOR");this.tb.Te!==b&&(this.tb.Te=b,Kj(this,!1))};k.zm=function(a,b){return Pj(this,this.tb,b)};function Lj(a,b,c){var d=b.ic;a.ca(b.port,null,c,"CRTC.INDX",d);return d}function Mj(a,b,c){var d;b.ic<b.ni&&(d=b.Zb[b.ic]);a.ca(b.port+1,null,c,"CRTC."+b.xg[b.ic],d);return d}function Nj(a,b,c,d){b.ic<b.ni&&(a.ca(b.port+1,c,d,"CRTC."+b.xg[b.ic]),b.Zb[b.ic]=c,9==b.ic&&8!=b.Vg&&Aj(a,!0),Bj(a))}
|
||||||
function Oj(a,b,c){var d=b.pc;a.ca(b.port+4,null,c,"MODE",d);return d}function Pj(a,b,c){var d=0,e=F(a.S),f=e-b.vi;0>f&&(f=0);f%b.qi>b.vn&&(d|=1);f%=b.vk;f>b.yn&&(d|=8);b.vi=e-f;b===a.ja?(d|=b.nf&48^48,b.$c=!1):d=(b.nf^=9)|240;b.nf=d;a.ca(b.port+6,null,c,b===a.ja?"STATUS1":"STATUS",d);return d}k.Da=function(a,b){this.aa&&(b||M(this.aa,this.aa.sg))&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.sg,e)};
|
function Oj(a,b,c){var d=b.sc;a.ca(b.port+4,null,c,"MODE",d);return d}function Pj(a,b,c){var d=0,e=F(a.S),f=e-b.wi;0>f&&(f=0);f%b.ri>b.vn&&(d|=1);f%=b.yk;f>b.yn&&(d|=8);b.wi=e-f;b===a.ja?(d|=b.nf&48^48,b.dd=!1):d=(b.nf^=9)|240;b.nf=d;a.ca(b.port+6,null,c,b===a.ja?"STATUS1":"STATUS",d);return d}k.Da=function(a,b){this.aa&&(b||M(this.aa,this.aa.sg))&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.sg,e)};
|
||||||
var rj={948:S.prototype.Um,949:S.prototype.Tm,952:S.prototype.Vm,954:S.prototype.Wm,980:S.prototype.zm,981:S.prototype.ym,984:S.prototype.Am,985:S.prototype.xm,986:S.prototype.Bm},sj={948:S.prototype.eo,949:S.prototype.co,952:S.prototype.fo,980:S.prototype.Ln,981:S.prototype.Kn,984:S.prototype.Mn,985:S.prototype.Jn},tj={960:S.prototype.ok,961:S.prototype.ok,962:S.prototype.fn,964:S.prototype.en,965:S.prototype.dn,970:S.prototype.Km,972:S.prototype.Jm,974:S.prototype.Im,975:S.prototype.Hm},uj={954:S.prototype.Al,
|
var rj={948:S.prototype.Um,949:S.prototype.Tm,952:S.prototype.Vm,954:S.prototype.Wm,980:S.prototype.xm,981:S.prototype.wm,984:S.prototype.ym,985:S.prototype.vm,986:S.prototype.zm},sj={948:S.prototype.fo,949:S.prototype.eo,952:S.prototype.ho,980:S.prototype.Ln,981:S.prototype.Kn,984:S.prototype.Mn,985:S.prototype.Jn},tj={960:S.prototype.rk,961:S.prototype.rk,962:S.prototype.fn,964:S.prototype.en,965:S.prototype.dn,970:S.prototype.Im,972:S.prototype.Hm,974:S.prototype.Gm,975:S.prototype.Fm},uj={954:S.prototype.Cl,
|
||||||
960:S.prototype.zl,961:S.prototype.zl,962:S.prototype.io,964:S.prototype.po,965:S.prototype.oo,970:S.prototype.Vn,972:S.prototype.Un,974:S.prototype.Tn,975:S.prototype.Sn,986:S.prototype.Al};
|
960:S.prototype.Bl,961:S.prototype.Bl,962:S.prototype.jo,964:S.prototype.qo,965:S.prototype.po,970:S.prototype.Vn,972:S.prototype.Un,974:S.prototype.Tn,975:S.prototype.Sn,986:S.prototype.Cl};
|
||||||
za(function(){for(var a=y(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=x(c),e=window.document.createElement("canvas");if(void 0===e){c.innerHTML="<br/>Missing <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;
|
za(function(){for(var a=y(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=x(c),e=window.document.createElement("canvas");if(void 0===e){c.innerHTML="<br/>Missing <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 S(d,e,f);Pa(d,c)}});
|
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 S(d,e,f);Pa(d,c)}});
|
||||||
function X(a){this.lk=a.adapter;switch(this.lk){case 1:this.lj=1016;this.Xf=4;break;case 2:this.lj=760;this.Xf=3;break;default:qa("Unrecognized serial adapter #"+this.lk);return}this.Sd=null;s.call(this,"SerialPort",a,X);var b=a.binding,c;a=Qj;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.sa[b])&&this.pb(null,null,a,b))}w(s,X);var Qj="buffer";k=X.prototype;k.Kj=function(a,b){return a==this.Wg?(this.pk=b,this):null};
|
function X(a){this.ok=a.adapter;switch(this.ok){case 1:this.mj=1016;this.Xf=4;break;case 2:this.mj=760;this.Xf=3;break;default:qa("Unrecognized serial adapter #"+this.ok);return}this.Vd=null;s.call(this,"SerialPort",a,X);var b=a.binding,c;a=Qj;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.sa[b])&&this.qb(null,null,a,b))}w(s,X);var Qj="buffer";k=X.prototype;k.Lj=function(a,b){return a==this.Wg?(this.sk=b,this):null};
|
||||||
k.pb=function(a,b,c,d){var e=this;switch(c){case Qj:return this.sa[c]=this.Sd=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),Rj(e,[b]))},d.onkeypress=function(a){a=a||window.event;Rj(e,[a.which||a.keyCode])},!0}return!1};k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.ma=C(a,"ChipSet");d&&Fh(d,X);ib(b,this,Sj,this.lj);lb(b,this,Tj,this.lj);this.La()};
|
k.qb=function(a,b,c,d){var e=this;switch(c){case Qj:return this.sa[c]=this.Vd=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),Rj(e,[b]))},d.onkeypress=function(a){a=a||window.event;Rj(e,[a.which||a.keyCode])},!0}return!1};k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.ma=C(a,"ChipSet");d&&Eh(d,X);ib(b,this,Sj,this.mj);lb(b,this,Tj,this.mj);this.Ma()};
|
||||||
k.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Rb=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.Zd()};k.save=function(){var a=new I(this),b=0,c=[];c[b++]=this.Hh;c[b++]=this.Oj;c[b++]=this.Ke;c[b++]=this.Ag;c[b++]=this.Od;c[b++]=this.Hc;c[b++]=this.Yc;c[b++]=this.vc;c[b++]=this.Mj;c[b]=this.xf;a.set(0,c);return a.data()};k.restore=function(a){return this.Zd(a[0])};
|
k.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ub=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.ae()};k.save=function(){var a=new I(this),b=0,c=[];c[b++]=this.Ih;c[b++]=this.Qj;c[b++]=this.Ke;c[b++]=this.Ag;c[b++]=this.Sd;c[b++]=this.Kc;c[b++]=this.ad;c[b++]=this.xc;c[b++]=this.Oj;c[b]=this.xf;a.set(0,c);return a.data()};k.restore=function(a){return this.ae(a[0])};
|
||||||
k.Zd=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.Hh=a[b++];this.Oj=a[b++];this.Ke=a[b++];this.Ag=a[b++];this.Od=a[b++];this.Hc=a[b++];this.Yc=a[b++];this.vc=a[b++];this.Mj=a[b++];this.xf=a[b];return!0};function Rj(a,b){a.xf=a.xf.concat(b);Uj(a)}function Uj(a){0<a.xf.length&&!(a.vc&1)&&(a.Hh=a.xf.shift(),a.vc|=1);var b=-1;a.vc&1&&a.Ag&1&&(b=4);0<=b?(a.Od&=-8,a.Od|=b,a.ma&&a.Xf&&ri(a.ma,a.Xf)):(a.Od|=1,a.ma&&a.Xf&&si(a.ma,a.Xf))}
|
k.ae=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.Ih=a[b++];this.Qj=a[b++];this.Ke=a[b++];this.Ag=a[b++];this.Sd=a[b++];this.Kc=a[b++];this.ad=a[b++];this.xc=a[b++];this.Oj=a[b++];this.xf=a[b];return!0};function Rj(a,b){a.xf=a.xf.concat(b);Uj(a)}function Uj(a){0<a.xf.length&&!(a.xc&1)&&(a.Ih=a.xf.shift(),a.xc|=1);var b=-1;a.xc&1&&a.Ag&1&&(b=4);0<=b?(a.Sd&=-8,a.Sd|=b,a.ma&&a.Xf&&ri(a.ma,a.Xf)):(a.Sd|=1,a.ma&&a.Xf&&si(a.ma,a.Xf))}
|
||||||
k.cn=function(a,b){var c=this.Hc&128?this.Ke&255:this.Hh;this.ca(a,null,b,this.Hc&128?"DLL":"RBR",c);this.vc&=-2;Uj(this);return c};k.Om=function(a,b){var c=this.Hc&128?this.Ke>>8:this.Ag;this.ca(a,null,b,this.Hc&128?"DLM":"IER",c);return c};k.Pm=function(a,b){var c=this.Od;this.ca(a,null,b,"IIR",c);return c};k.Qm=function(a,b){var c=this.Hc;this.ca(a,null,b,"LCR",c);return c};k.Sm=function(a,b){var c=this.Yc;this.ca(a,null,b,"MCR",c);return c};
|
k.cn=function(a,b){var c=this.Kc&128?this.Ke&255:this.Ih;this.ca(a,null,b,this.Kc&128?"DLL":"RBR",c);this.xc&=-2;Uj(this);return c};k.Om=function(a,b){var c=this.Kc&128?this.Ke>>8:this.Ag;this.ca(a,null,b,this.Kc&128?"DLM":"IER",c);return c};k.Pm=function(a,b){var c=this.Sd;this.ca(a,null,b,"IIR",c);return c};k.Qm=function(a,b){var c=this.Kc;this.ca(a,null,b,"LCR",c);return c};k.Sm=function(a,b){var c=this.ad;this.ca(a,null,b,"MCR",c);return c};
|
||||||
k.Rm=function(a,b){var c=this.vc;this.ca(a,null,b,"LSR",c);return c};k.Ym=function(a,b){var c=this.Mj;this.ca(a,null,b,"MSR",c);return c};k.qo=function(a,b,c){this.ca(a,b,c,this.Hc&128?"DLL":"THR");this.Hc&128?this.Ke=this.Ke&-256|b:(this.Oj=b,this.vc&=-97,this.Sd?(13!=b&&(8==b?this.Sd.value=this.Sd.value.slice(0,-1):(this.Sd.value+=String.fromCharCode(b),this.Sd.scrollTop=this.Sd.scrollHeight)),a=!0):a=!1,a&&(this.vc|=96))};
|
k.Rm=function(a,b){var c=this.xc;this.ca(a,null,b,"LSR",c);return c};k.Ym=function(a,b){var c=this.Oj;this.ca(a,null,b,"MSR",c);return c};k.ro=function(a,b,c){this.ca(a,b,c,this.Kc&128?"DLL":"THR");this.Kc&128?this.Ke=this.Ke&-256|b:(this.Qj=b,this.xc&=-97,this.Vd?(13!=b&&(8==b?this.Vd.value=this.Vd.value.slice(0,-1):(this.Vd.value+=String.fromCharCode(b),this.Vd.scrollTop=this.Vd.scrollHeight)),a=!0):a=!1,a&&(this.xc|=96))};
|
||||||
k.$n=function(a,b,c){this.ca(a,b,c,this.Hc&128?"DLM":"IER");this.Hc&128?this.Ke=this.Ke&255|b<<8:this.Ag=b};k.ao=function(a,b,c){this.ca(a,b,c,"LCR");this.Hc=b};
|
k.ao=function(a,b,c){this.ca(a,b,c,this.Kc&128?"DLM":"IER");this.Kc&128?this.Ke=this.Ke&255|b<<8:this.Ag=b};k.bo=function(a,b,c){this.ca(a,b,c,"LCR");this.Kc=b};
|
||||||
k.bo=function(a,b,c){var d=this.Yc;this.ca(a,b,c,"MCR");this.Yc=b;this.pk&&(d^b)&3&&(a=this.pk,b=this.Yc,(c=3==(b&3))?a.ec||(d=!1,a.Yc&2||(a.reset(),a.Da("serial mouse reset"),d=!0),a.Yc&1||(a.Da("serial mouse ID requested"),d=!0),d&&(Rj(a.Gf,[77]),a.Da("serial mouse ID sent")),Vj(a,a.Db),a.ec=c):a.ec&&(a.Da("serial mouse inactive"),Wj(a.Db),a.ec=c),a.Yc=b)};k.Da=function(a){this.aa&&M(this.aa,this.aa.Bj)&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.Bj,e)};
|
k.co=function(a,b,c){var d=this.ad;this.ca(a,b,c,"MCR");this.ad=b;this.sk&&(d^b)&3&&(a=this.sk,b=this.ad,(c=3==(b&3))?a.hc||(d=!1,a.ad&2||(a.reset(),a.Da("serial mouse reset"),d=!0),a.ad&1||(a.Da("serial mouse ID requested"),d=!0),d&&(Rj(a.Gf,[77]),a.Da("serial mouse ID sent")),Vj(a,a.Gb),a.hc=c):a.hc&&(a.Da("serial mouse inactive"),Wj(a.Gb),a.hc=c),a.ad=b)};k.Da=function(a){this.aa&&M(this.aa,this.aa.Dj)&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.Dj,e)};
|
||||||
var Sj={0:X.prototype.cn,1:X.prototype.Om,2:X.prototype.Pm,3:X.prototype.Qm,4:X.prototype.Sm,5:X.prototype.Rm,6:X.prototype.Ym},Tj={0:X.prototype.qo,1:X.prototype.$n,3:X.prototype.ao,4:X.prototype.bo};za(function(){for(var a=y(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new X(d);Pa(d,c)}});function Xj(a){s.call(this,"Mouse",a,Xj);if(this.ii=a.serial)this.nj="SerialPort";this.ec=!1;this.La()}w(s,Xj);k=Xj.prototype;
|
var Sj={0:X.prototype.cn,1:X.prototype.Om,2:X.prototype.Pm,3:X.prototype.Qm,4:X.prototype.Sm,5:X.prototype.Rm,6:X.prototype.Ym},Tj={0:X.prototype.ro,1:X.prototype.ao,3:X.prototype.bo,4:X.prototype.co};za(function(){for(var a=y(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new X(d);Pa(d,c)}});function Xj(a){s.call(this,"Mouse",a,Xj);if(this.ji=a.serial)this.pj="SerialPort";this.hc=!1;this.Ma()}w(s,Xj);k=Xj.prototype;
|
||||||
k.gc=function(a,b,c,d){this.Ba=a;this.la=b;this.S=c;(this.aa=d)&&Fh(d,Xj)};k.Ub=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.nj&&!this.Gf){for(var c=null;(c=C(this.Ba,this.nj,c))&&(!c.Kj||!(this.Gf=c.Kj(this.ii,this))););if(this.Gf){if(c=C(this.Ba,"Video"))this.Db=c.Db}else qa(this.id+": "+this.nj+" "+this.ii+" unavailable")}this.ec?Vj(this,this.Db):Wj(this.Db)}return!0};k.Rb=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.Zd()};
|
k.jc=function(a,b,c,d){this.Ba=a;this.la=b;this.S=c;(this.aa=d)&&Eh(d,Xj)};k.Xb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.pj&&!this.Gf){for(var c=null;(c=C(this.Ba,this.pj,c))&&(!c.Lj||!(this.Gf=c.Lj(this.ji,this))););if(this.Gf){if(c=C(this.Ba,"Video"))this.Gb=c.Gb}else qa(this.id+": "+this.pj+" "+this.ji+" unavailable")}this.hc?Vj(this,this.Gb):Wj(this.Gb)}return!0};k.Ub=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.ae()};
|
||||||
k.save=function(){var a=new I(this);a.set(0,this.sj());return a.data()};k.restore=function(a){return this.Zd(a[0])};k.Zd=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.ec=a[b++];this.og=a[b++];this.pg=a[b++];this.qf=a[b++];this.rf=a[b++];this.Og=a[b++];this.Pg=a[b++];this.Yc=a[b];return!0};k.sj=function(){var a=0,b=[];b[a++]=this.ec;b[a++]=this.og;b[a++]=this.pg;b[a++]=this.qf;b[a++]=this.rf;b[a++]=this.Og;b[a++]=this.Pg;b[a]=this.Yc;return b};
|
k.save=function(){var a=new I(this);a.set(0,this.uj());return a.data()};k.restore=function(a){return this.ae(a[0])};k.ae=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.hc=a[b++];this.og=a[b++];this.pg=a[b++];this.qf=a[b++];this.rf=a[b++];this.Og=a[b++];this.Pg=a[b++];this.ad=a[b];return!0};k.uj=function(){var a=0,b=[];b[a++]=this.hc;b[a++]=this.og;b[a++]=this.pg;b[a++]=this.qf;b[a++]=this.rf;b[a++]=this.Og;b[a++]=this.Pg;b[a]=this.ad;return b};
|
||||||
function Vj(a,b){b&&(a.Wh||(b.addEventListener("mousemove",function(b){if(a.ec&&a.S&&a.S.Fb){if(0>a.og||0>a.pg)a.og=b.clientX,a.pg=b.clientY;a.qf=b.clientX-a.og;a.rf=b.clientY-a.pg;(a.qf||a.rf)&&Yj(a,null,b.clientX,b.clientY);a.og=b.clientX;a.pg=b.clientY}},!1),b.addEventListener("mousedown",function(b){Zj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){Zj(a,b.button,!1)},!1),a.Wh=!0),b.style.cursor="none")}function Wj(a){a&&(a.style.cursor="auto")}
|
function Vj(a,b){b&&(a.Xh||(b.addEventListener("mousemove",function(b){if(a.hc&&a.S&&a.S.Ib){if(0>a.og||0>a.pg)a.og=b.clientX,a.pg=b.clientY;a.qf=b.clientX-a.og;a.rf=b.clientY-a.pg;(a.qf||a.rf)&&Yj(a,null,b.clientX,b.clientY);a.og=b.clientX;a.pg=b.clientY}},!1),b.addEventListener("mousedown",function(b){Zj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){Zj(a,b.button,!1)},!1),a.Xh=!0),b.style.cursor="none")}function Wj(a){a&&(a.style.cursor="auto")}
|
||||||
function Zj(a,b,c){if(a.ec&&a.S&&a.S.Fb)switch(b){case 0:a.Og!=c&&(a.Og=c,Yj(a,"mouse button1 "+(c?"dn":"up")));break;case 2:a.Pg!=c&&(a.Pg=c,Yj(a,"mouse button2 "+(c?"dn":"up")))}}function Yj(a,b,c,d){var e=64|(a.Og?32:0)|(a.Pg?16:0)|(a.rf&192)>>4|(a.qf&192)>>6,f=a.qf&63,g=a.rf&63;a.Da((b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+p(e)+","+p(f)+","+p(g)+"]");Rj(a.Gf,[e,f,g]);a.qf=a.rf=0}k.Da=function(a){this.aa&&M(this.aa,this.aa.Zl)&&this.aa.message(a)};
|
function Zj(a,b,c){if(a.hc&&a.S&&a.S.Ib)switch(b){case 0:a.Og!=c&&(a.Og=c,Yj(a,"mouse button1 "+(c?"dn":"up")));break;case 2:a.Pg!=c&&(a.Pg=c,Yj(a,"mouse button2 "+(c?"dn":"up")))}}function Yj(a,b,c,d){var e=64|(a.Og?32:0)|(a.Pg?16:0)|(a.rf&192)>>4|(a.qf&192)>>6,f=a.qf&63,g=a.rf&63;a.Da((b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+p(e)+","+p(f)+","+p(g)+"]");Rj(a.Gf,[e,f,g]);a.qf=a.rf=0}k.Da=function(a){this.aa&&M(this.aa,this.aa.$l)&&this.aa.message(a)};
|
||||||
za(function(){for(var a=y(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Xj(d);Pa(d,c)}});function ak(a,b,c){s.call(this,"Disk",{id:a.Xg+".disk"+bk++},ak);this.ha=a;this.Ba=a.Ba;this.aa=a.aa;this.Zj=b;this.mode=c;this.Ed=b.name;this.$d=b.$d;this.Qc=b.Qc;this.ce=b.ce;this.qd=b.qd;this.Ye=b.Ye;this.bi=this.ud=!1;this.create();this.le=[];this.ug=[];this.Id=null;this.rk=0;this.di=!1;this.La()}var bk=0;w(s,ak);k=ak.prototype;k.gc=function(a,b,c,d){this.aa=d};
|
za(function(){for(var a=y(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Xj(d);Pa(d,c)}});function ak(a,b,c){s.call(this,"Disk",{id:a.Xg+".disk"+bk++},ak);this.ha=a;this.Ba=a.Ba;this.aa=a.aa;this.bk=b;this.mode=c;this.Hd=b.name;this.Fc=b.Fc;this.Tc=b.Tc;this.de=b.de;this.td=b.td;this.Ye=b.Ye;this.ci=this.xd=!1;this.create();this.le=[];this.ug=[];this.Ld=null;this.uk=0;this.ei=!1;this.Ma()}var bk=0;w(s,ak);k=ak.prototype;k.jc=function(a,b,c,d){this.aa=d};
|
||||||
k.Ub=function(a,b){b||this.bi&&!this.ud&&this.load(this.Ed,this.lf);return!0};k.Rb=function(a,b){if(this.ud){var c,d=0;if(this.di&&!ra("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=ck(this,!1);)if(d=c[0]){B(this,'Unable to save "'+this.Ed+'" (error '+d+")");break}b&&this.ud&&(c="action=close&volume="+this.lf,c+="&machine="+this.ha.$e(),c+="&user="+this.ha.Wd(),oa(pa()+"/api/v1/disk?"+c,!0),this.ud=!1);d||B(this,this.Ed+" saved")}return!0};
|
k.Xb=function(a,b){b||this.ci&&!this.xd&&this.load(this.Hd,this.lf);return!0};k.Ub=function(a,b){if(this.xd){var c,d=0;if(this.ei&&!ra("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=ck(this,!1);)if(d=c[0]){B(this,'Unable to save "'+this.Hd+'" (error '+d+")");break}b&&this.xd&&(c="action=close&volume="+this.lf,c+="&machine="+this.ha.$e(),c+="&user="+this.ha.Zd(),oa(pa()+"/api/v1/disk?"+c,!0),this.xd=!1);d||B(this,this.Hd+" saved")}return!0};
|
||||||
k.create=function(){this.fb=[];if("preload"!=this.mode){for(var a=Array(this.$d),b=0;b<a.length;b++){for(var c=Array(this.Qc),d=0;d<c.length;d++){for(var e=Array(this.ce),f=1;f<=e.length;f++)e[f-1]=dk(null,b,d,f,this.qd,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.fb=a}this.Mg=0};
|
k.create=function(){this.gb=[];if("preload"!=this.mode){for(var a=Array(this.Fc),b=0;b<a.length;b++){for(var c=Array(this.Tc),d=0;d<c.length;d++){for(var e=Array(this.de),f=1;f<=e.length;f++)e[f-1]=dk(null,b,d,f,this.td,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.gb=a}this.Mg=0};
|
||||||
k.load=function(a,b,c){var d=b;this.Ed=a;this.lf=b;this.ik=c;0>b.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.$d+":"+this.Qc+":"+this.ce+":"+this.qd,a+="&machine="+this.ha.$e(),a+="&user="+this.ha.Wd(),d=pa()+"/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"):
|
k.load=function(a,b,c){var d=b;this.Hd=a;this.lf=b;this.lk=c;0>b.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.Fc+":"+this.Tc+":"+this.de+":"+this.td,a+="&machine="+this.ha.$e(),a+="&user="+this.ha.Zd(),d=pa()+"/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"):
|
||||||
-1!==b.indexOf("/",b.length-1)&&(c="dir"),d=pa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Ye?"":d)+"&format=json"));oa(d,!0,null,this,this.zn,b)};
|
-1!==b.indexOf("/",b.length-1)&&(c="dir"),d=pa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Ye?"":d)+"&format=json"));oa(d,!0,null,this,this.zn,b)};
|
||||||
k.zn=function(a,b,c,d){var e=null;this.Ze=!1;var f=0>c&&this.Ba&&!this.Ba.Eb;if(this.bi)c?B(this,'Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.ud=!0,e=this);else if(c)B(this,'Unable to load disk "'+this.Ed+'" (error '+c+")",f);else try{if(0<da(a,!0).toLowerCase().indexOf("-readonly"))this.Ze=!0;else{var g=b.indexOf("\n");0<g&&1024>g&&0<b.substring(0,g).indexOf("write-protected")&&(this.Ze=!0)}var h;h="<"==b.substr(0,1)?["Missing disk image: "+this.Ed]:0>b.indexOf("0x")&&'["'!=
|
k.zn=function(a,b,c,d){var e=null;this.Ze=!1;var f=0>c&&this.Ba&&!this.Ba.Hb;if(this.ci)c?B(this,'Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.xd=!0,e=this);else if(c)B(this,'Unable to load disk "'+this.Hd+'" (error '+c+")",f);else try{if(0<da(a,!0).toLowerCase().indexOf("-readonly"))this.Ze=!0;else{var g=b.indexOf("\n");0<g&&1024>g&&0<b.substring(0,g).indexOf("write-protected")&&(this.Ze=!0)}var h;h="<"==b.substr(0,1)?["Missing disk image: "+this.Hd]:0>b.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)this.error(h[0]);else{for(b=a=0;b<h.length;b++)for(c=0;c<h[b].length;c++)for(d=0;d<h[b][c].length;d++){var m=h[b][c][d],n=m.length;void 0===n&&(n=m.length=512);var n=n>>2,r=m.pattern;void 0===r&&(r=m.pattern=0);var u=m.data;if(void 0===u){var t=m.bytes;if(void 0!==t&&t.length){for(var f=n<<2,v=t.length;v<f;v++)t[v]=r;this.fill(m,t,0)}else u=[],r=m.pattern=r|r<<8|r<<16|r<<
|
b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(h.length)if(1==h.length)this.error(h[0]);else{for(b=a=0;b<h.length;b++)for(c=0;c<h[b].length;c++)for(d=0;d<h[b][c].length;d++){var m=h[b][c][d],n=m.length;void 0===n&&(n=m.length=512);var n=n>>2,r=m.pattern;void 0===r&&(r=m.pattern=0);var u=m.data;if(void 0===u){var t=m.bytes;if(void 0!==t&&t.length){for(var f=n<<2,v=t.length;v<f;v++)t[v]=r;this.fill(m,t,0)}else u=[],r=m.pattern=r|r<<8|r<<16|r<<
|
||||||
24,m.data=u;delete m.bytes}dk(m,b,c);for(f=0;f<u.length;f++)a=a+u[f]&4294967295}this.fb=h;this.Mg=a;e=this}else this.error("Empty disk image: "+this.Ed)}catch(A){this.error("Disk image error: "+A.message)}this.ik&&this.ik.call(this.ha,this.Zj,e,this.Ed,this.lf)};function dk(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.rm=b;a.sm=c;a.Nc=a.wc=0;a.Ta=!1;return a}
|
24,m.data=u;delete m.bytes}dk(m,b,c);for(f=0;f<u.length;f++)a=a+u[f]&4294967295}this.gb=h;this.Mg=a;e=this}else this.error("Empty disk image: "+this.Hd)}catch(A){this.error("Disk image error: "+A.message)}this.lk&&this.lk.call(this.ha,this.bk,e,this.Hd,this.lf)};function dk(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.pm=b;a.qm=c;a.Qc=a.yc=0;a.Va=!1;return a}
|
||||||
k.An=function(a,b,c,d){a=!1;if(!c){var e=d[0],f=d[1],g=d[2],h=d[3];a=d[4];b=JSON.parse(b);for(var m=0;h--;){var n=this.seek(e,f,g,!0);if(!n)break;this.fill(n,b,m);m+=n.length;g++}}(d=d[5])&&d(c,a)};function ek(a,b,c,d,e,f){if(a.ud){var g;g="action=read&volume="+a.lf;g+="&chs="+a.$d+":"+a.Qc+":"+a.ce+":"+a.qd;g=g+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.ha.$e());g+="&user="+a.ha.Wd();oa(pa()+"/api/v1/disk?"+g,!0,null,a,a.An,[b,c,d,e,!0,f])}else f&&f(-1,!1)}
|
k.An=function(a,b,c,d){a=!1;if(!c){var e=d[0],f=d[1],g=d[2],h=d[3];a=d[4];b=JSON.parse(b);for(var m=0;h--;){var n=this.seek(e,f,g,!0);if(!n)break;this.fill(n,b,m);m+=n.length;g++}}(d=d[5])&&d(c,a)};function ek(a,b,c,d,e,f){if(a.xd){var g;g="action=read&volume="+a.lf;g+="&chs="+a.Fc+":"+a.Tc+":"+a.de+":"+a.td;g=g+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.ha.$e());g+="&user="+a.ha.Zd();oa(pa()+"/api/v1/disk?"+g,!0,null,a,a.An,[b,c,d,e,!0,f])}else f&&f(-1,!1)}
|
||||||
function fk(a,b,c){b.Ta=!0;var d=a.le.indexOf(b);0<=d&&(a.le.splice(d,1),a.ug.splice(d,1));a.le.push(b);a.ug.push(la());c&&gk(a)}function gk(a){if(a.le.length){var b=a.ug[0]+2E3;a.Id&&a.rk<b&&(clearTimeout(a.Id),a.Id=null);if(!a.Id){var c=la(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.Id=setTimeout(function(){ck(a,!0)},b);a.rk=c+b}}else a.Id&&(clearTimeout(a.Id),a.Id=null)}
|
function fk(a,b,c){b.Va=!0;var d=a.le.indexOf(b);0<=d&&(a.le.splice(d,1),a.ug.splice(d,1));a.le.push(b);a.ug.push(la());c&&gk(a)}function gk(a){if(a.le.length){var b=a.ug[0]+2E3;a.Ld&&a.uk<b&&(clearTimeout(a.Ld),a.Ld=null);if(!a.Ld){var c=la(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.Ld=setTimeout(function(){ck(a,!0)},b);a.uk=c+b}}else a.Ld&&(clearTimeout(a.Ld),a.Ld=null)}
|
||||||
function ck(a,b){b&&(a.Id=null);var c=a.le[0];if(c){for(var d=c.rm,e=c.sm,c=c.sector,f=0,g=[],h=c-1;h<a.fb[d][e].length;h++){var m=a.fb[d][e][h];if(!m.Ta)break;var n=a.le.indexOf(m);a.le.splice(n,1);a.ug.splice(n,1);g=g.concat(hk(m));m.Ta=!1;f++}a.ud?(h={},a.di=!0,h.action="write",h.volume=a.lf,h.chs=a.$d+":"+a.Qc+":"+a.ce+":"+a.qd,h.addr=d+":"+e+":"+c+":"+f,h.machine=a.ha.$e(),h.user=a.ha.Wd(),h.data=JSON.stringify(g),d=oa(pa()+"/api/v1/disk",b,h,a,a.Fn,[d,e,c,f,b])):d=!1;return b||d}return!1}
|
function ck(a,b){b&&(a.Ld=null);var c=a.le[0];if(c){for(var d=c.pm,e=c.qm,c=c.sector,f=0,g=[],h=c-1;h<a.gb[d][e].length;h++){var m=a.gb[d][e][h];if(!m.Va)break;var n=a.le.indexOf(m);a.le.splice(n,1);a.ug.splice(n,1);g=g.concat(hk(m));m.Va=!1;f++}a.xd?(h={},a.ei=!0,h.action="write",h.volume=a.lf,h.chs=a.Fc+":"+a.Tc+":"+a.de+":"+a.td,h.addr=d+":"+e+":"+c+":"+f,h.machine=a.ha.$e(),h.user=a.ha.Zd(),h.data=JSON.stringify(g),d=oa(pa()+"/api/v1/disk",b,h,a,a.Fn,[d,e,c,f,b])):d=!1;return b||d}return!1}
|
||||||
k.Fn=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],f=d[3];d=d[4];this.di=!1;if(0<=a&&a<this.fb.length&&0<=b&&b<this.fb[a].length)for(e-=1;0<f--&&0<=e&&e<this.fb[a][b].length;e++){var g=this.fb[a][b][e];c?fk(this,g,!1):g.Ta||(g.Nc=g.wc=0)}d&&gk(this)};k.info=function(){return this.fb.length?[this.fb.length,this.fb[0].length,this.fb[0][0].length,this.fb[0][0][0].length]:[0,0,0,0]};
|
k.Fn=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],f=d[3];d=d[4];this.ei=!1;if(0<=a&&a<this.gb.length&&0<=b&&b<this.gb[a].length)for(e-=1;0<f--&&0<=e&&e<this.gb[a][b].length;e++){var g=this.gb[a][b][e];c?fk(this,g,!1):g.Va||(g.Qc=g.yc=0)}d&&gk(this)};k.info=function(){return this.gb.length?[this.gb.length,this.gb[0].length,this.gb[0][0].length,this.gb[0][0][0].length]:[0,0,0,0]};
|
||||||
function ik(a){a=JSON.stringify(a.fb);a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");return a=a.replace(/(sector|length|data|pattern):/gm,'"$1":')}
|
function ik(a){a=JSON.stringify(a.gb);a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");return a=a.replace(/(sector|length|data|pattern):/gm,'"$1":')}
|
||||||
k.seek=function(a,b,c,d,e){var f=null,g=this.Zj,h=this.fb[a];if(h){var m=h[b];if(!m&&g.Af&&b<g.Qc)for(m=h[b]=Array(g.Pd),h=0;h<m.length;h++)m[h]=dk(null,a,b,h+1,g.Mb,0);if(m){for(h=0;h<m.length;h++)if(m[h].sector==c){f=m[h];if(null===f.pattern)if(d)f.pattern=0;else if(e){for(d=1;++h<m.length;)null===m[h].pattern&&d++;ek(this,a,b,c,d,function(a,b){a&&(f=null);e(f,b)});return null}break}!f&&g.Af&&9==g.Xa&&(f=m[h]=dk(null,a,b,g.Xa,g.Mb,0))}}e&&e(f,!1);return f};
|
k.seek=function(a,b,c,d,e){var f=null,g=this.bk,h=this.gb[a];if(h){var m=h[b];if(!m&&g.Af&&b<g.Tc)for(m=h[b]=Array(g.Td),h=0;h<m.length;h++)m[h]=dk(null,a,b,h+1,g.Pb,0);if(m){for(h=0;h<m.length;h++)if(m[h].sector==c){f=m[h];if(null===f.pattern)if(d)f.pattern=0;else if(e){for(d=1;++h<m.length;)null===m[h].pattern&&d++;ek(this,a,b,c,d,function(a,b){a&&(f=null);e(f,b)});return null}break}!f&&g.Af&&9==g.Ya&&(f=m[h]=dk(null,a,b,g.Ya,g.Pb,0))}}e&&e(f,!1);return f};
|
||||||
k.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function hk(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}function jk(a,b){var c=-1;if(b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
|
k.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function hk(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}function jk(a,b){var c=-1;if(b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
|
||||||
k.write=function(a,b,c){if(this.Ze)return!1;if(b<a.length){if(c!=jk(a,b)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.wc?f<a.Nc?(a.wc+=a.Nc-f,a.Nc=f):f>=a.Nc+a.wc&&(a.wc+=f-(a.Nc+a.wc)+1):(a.Nc=f,a.wc=1);d[f]=d[f]&~(255<<b)|c<<b;this.ud&&fk(this,a,!0)}return!0}return null};
|
k.write=function(a,b,c){if(this.Ze)return!1;if(b<a.length){if(c!=jk(a,b)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Qc?(a.yc+=a.Qc-f,a.Qc=f):f>=a.Qc+a.yc&&(a.yc+=f-(a.Qc+a.yc)+1):(a.Qc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.xd&&fk(this,a,!0)}return!0}return null};
|
||||||
k.save=function(){var a=0,b=[];b[a++]=[this.lf,this.Mg];if(!this.ud&&!this.Ze)for(var c=this.fb,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g.wc){for(var h=[],m=0,n=g.Nc,r=g.Nc+g.wc;n<r;)h[m++]=g.data[n++];b[a++]=[d,e,f,g.Nc,h]}}return b};
|
k.save=function(){var a=0,b=[];b[a++]=[this.lf,this.Mg];if(!this.xd&&!this.Ze)for(var c=this.gb,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g.yc){for(var h=[],m=0,n=g.Qc,r=g.Qc+g.yc;n<r;)h[m++]=g.data[n++];b[a++]=[d,e,f,g.Qc,h]}}return b};
|
||||||
k.restore=function(a){var b=0,c="unsupported restore format";if(this.fb.length&&a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&e[1]!=this.Mg&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.Mg+")",b=-1);for(;d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],m=g[f++],n=g[f++];if(h>=this.fb.length||m>=this.fb[h].length||n>=this.fb[h][m].length){c="sector "+h+":"+m+":"+n+" out of range ("+b+" changes applied)";b=-1;break}if(this.Ze){c="unable to modify write-protected disk";b=-1;break}e=
|
k.restore=function(a){var b=0,c="unsupported restore format";if(this.gb.length&&a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&e[1]!=this.Mg&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.Mg+")",b=-1);for(;d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],m=g[f++],n=g[f++];if(h>=this.gb.length||m>=this.gb[h].length||n>=this.gb[h][m].length){c="sector "+h+":"+m+":"+n+" out of range ("+b+" changes applied)";b=-1;break}if(this.Ze){c="unable to modify write-protected disk";b=-1;break}e=
|
||||||
g[f++];f=g[f++];g=e+f.length;h=this.fb[h][m][n];for(m=h.data.length;m<e;)h.data[m++]=h.pattern;m=0;h.Nc=e;for(h.wc=f.length;e<g;)h.data[e++]=f[m++];b++}}0>b&&B(this,"unable to restore disk '"+this.Ed+": "+c);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.Wl)&&this.aa.message(a)};
|
g[f++];f=g[f++];g=e+f.length;h=this.gb[h][m][n];for(m=h.data.length;m<e;)h.data[m++]=h.pattern;m=0;h.Qc=e;for(h.yc=f.length;e<g;)h.data[e++]=f[m++];b++}}0>b&&B(this,"unable to restore disk '"+this.Hd+": "+c);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.Xl)&&this.aa.message(a)};
|
||||||
function kk(a){s.call(this,"FDC",a,kk);this.dmaRead=this.Ph;this.dmaWrite=this.Qh;this.dmaFormat=this.fm;this.Ee=null;if(a.autoMount&&(this.Ee=a.autoMount,"string"==typeof this.Ee))try{this.Ee=eval("("+a.autoMount+")")}catch(b){this.error("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Ee=null}this.kc=[];this.yd();this.zf()||this.La()}w(s,kk);
|
function kk(a){s.call(this,"FDC",a,kk);this.dmaRead=this.Qh;this.dmaWrite=this.Rh;this.dmaFormat=this.dm;this.Ee=null;if(a.autoMount&&(this.Ee=a.autoMount,"string"==typeof this.Ee))try{this.Ee=eval("("+a.autoMount+")")}catch(b){this.error("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Ee=null}this.nc=[];this.Bd();this.zf()||this.Ma()}w(s,kk);
|
||||||
var lk={3:{Rd:3,xe:0,name:"SPECIFY"},4:{Rd:2,xe:1,name:"DRIVE_STATUS"},5:{Rd:9,xe:7,name:"WRITE_DATA"},6:{Rd:9,xe:7,name:"READ_DATA"},7:{Rd:2,xe:0,name:"RECALIBRATE"},8:{Rd:1,xe:2,name:"INT_STATUS"},13:{Rd:6,xe:7,name:"FORMAT"},15:{Rd:3,xe:0,name:"SEEK"}};k=kk.prototype;
|
var lk={3:{Ud:3,xe:0,name:"SPECIFY"},4:{Ud:2,xe:1,name:"DRIVE_STATUS"},5:{Ud:9,xe:7,name:"WRITE_DATA"},6:{Ud:9,xe:7,name:"READ_DATA"},7:{Ud:2,xe:0,name:"RECALIBRATE"},8:{Ud:1,xe:2,name:"INT_STATUS"},13:{Ud:6,xe:7,name:"FORMAT"},15:{Ud:3,xe:0,name:"SEEK"}};k=kk.prototype;
|
||||||
k.pb=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){a.error("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d='<a href="'+m+'" target="_blank">'+d+"</a>");
|
k.qb=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){a.error("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d='<a href="'+m+'" target="_blank">'+d+"</a>");
|
||||||
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)||mk(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&&b<a.xa.length)if(d=c.value){c=c.options[c.selectedIndex].text;if("?"==d){d=window.prompt("Enter the URL of a disk image to load.","");if(!d)return;c=da(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)||mk(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&&b<a.xa.length)if(d=c.value){c=c.options[c.selectedIndex].text;if("?"==d){d=window.prompt("Enter the URL of a disk image to load.","");if(!d)return;c=da(d);
|
||||||
z(a,"Attempting to load "+d+' as "'+c+'"')}for(;nk(a,b,c,d,!1)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var m=a,n=d,r=void 0,r=0;r<m.kc.length;r++)if(m.kc[r][1]==n){m.kc.splice(r,1);break}ok(a,b,!1,!0)}}else ok(a,b);else B(a,"Nothing to load")}}(this),!0}return!1};k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet");ib(b,this,pk);lb(b,this,qk);Cc(c,19,this,this.li)};
|
z(a,"Attempting to load "+d+' as "'+c+'"')}for(;nk(a,b,c,d,!1)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var m=a,n=d,r=void 0,r=0;r<m.nc.length;r++)if(m.nc[r][1]==n){m.nc.splice(r,1);break}ok(a,b,!1,!0)}}else ok(a,b);else B(a,"Nothing to load")}}(this),!0}return!1};k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet");ib(b,this,pk);lb(b,this,qk);Cc(c,19,this,this.mi)};
|
||||||
k.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.Ba.ci){this.kc=[];for(var c=0;c<this.xa.length;c++)ok(this,c,!0);this.zf(!0)}}else if(!this.restore(a))return!1;if(this.ma&&(this.wk=Uh(this.ma),c=this.sa.listDrives)){for(;c.firstChild;)c.removeChild(c.firstChild);c.innerHTML="";for(var d=0;d<this.wk;d++){var e=window.document.createElement("option");e.value=d;e.innerHTML=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.wk&&(c.value="0",mk(this,0))}}return!0};
|
k.Xb=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.Ba.di){this.nc=[];for(var c=0;c<this.xa.length;c++)ok(this,c,!0);this.zf(!0)}}else if(!this.restore(a))return!1;if(this.ma){this.gh=Wh(this.ma);for(c=0;c<this.gh;c++){var d=this.xa[c];d.Rj=Th(this.ma,c);2==d.Rj&&(d.Fc=80)}if(d=this.sa.listDrives){for(;d.firstChild;)d.removeChild(d.firstChild);d.innerHTML="";for(c=0;c<this.gh;c++){var e=window.document.createElement("option");e.value=c;e.innerHTML=String.fromCharCode(65+c)+":";d.appendChild(e)}0<
|
||||||
k.Rb=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.yd()};k.save=function(){var a=new I(this);a.set(0,this.pj());return a.data()};k.restore=function(a){return this.yd(a[0])};
|
this.gh&&(d.value="0",mk(this,0))}}}return!0};k.Ub=function(a){return a&&this.save?this.save():!0};k.reset=function(){this.Bd()};k.save=function(){var a=new I(this);a.set(0,this.rj());return a.data()};k.restore=function(a){return this.Bd(a[0])};
|
||||||
k.yd=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.Yd=a[b++];this.cd=a[b++];this.Pa=a[b++];this.Vb=a[b++];this.eb=a[b++];this.Oa=a[b++];this.kf=a[b++];var d=a[b++],e=a[b++];null!=e&&(this.kc=e);void 0===this.xa&&(this.xa=Array(4));for(e=0;e<this.xa.length;e++)void 0===this.xa[e]&&(this.xa[e]={}),this.ji(this.xa[e],e,d[e])||(c=!1);this.fe=a[b++]||0;this.El=a[b]||0;return c};
|
k.Bd=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.Jb=a[b++];b++;this.Qa=a[b++];this.Yb=a[b++];this.fb=a[b++];this.Pa=a[b++];this.kf=a[b++];var d=a[b++],e=a[b++];null!=e&&(this.nc=e);void 0===this.xa&&(this.gh=0,this.xa=Array(4));for(e=0;e<this.xa.length;e++)void 0===this.xa[e]&&(this.xa[e]={}),this.ki(this.xa[e],e,d[e])||(c=!1);this.ge=a[b++]||0;this.Gl=a[b]||0;return c};
|
||||||
k.pj=function(){var a=0,b=[];b[a++]=this.Yd;b[a++]=this.cd;b[a++]=this.Pa;b[a++]=this.Vb;b[a++]=this.eb;b[a++]=this.Oa;b[a++]=this.kf;b[a++]=this.rj();for(var c=a++,d=0;d<this.xa.length;d++){var e=this.xa[d];e.ua&&rk(this,e.He,e.ua)}b[c]=this.kc;b[a++]=this.fe;b[a]=this.El;return b};
|
k.rj=function(){var a=0,b=[];b[a++]=this.Jb;b[a++]=0;b[a++]=this.Qa;b[a++]=this.Yb;b[a++]=this.fb;b[a++]=this.Pa;b[a++]=this.kf;b[a++]=this.tj();for(var c=a++,d=0;d<this.xa.length;d++){var e=this.xa[d];e.ua&&rk(this,e.He,e.ua)}b[c]=this.nc;b[a++]=this.ge;b[a]=this.Gl;return b};
|
||||||
k.ji=function(a,b,c){var d=0,e=!0;a.Yd=b;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",40,c[3],9,512,c[1]]);a.errorCode=c[d++];a.name=c[d][0];a.$d=c[d][1];a.Qc=c[d][2];a.ce=c[d][3];a.qd=c[d][4];a.Ye=c[d][5];d++;a.mb=c[d++];d++;a.tc=c[d++];a.Xa=c[d++];a.Pd=c[d++];a.Mb=c[d++];a.Lb=c[d++];a.Qa=null;a.ua||(a.He="");var f=c[d++];f===sk?(f=c[d++],c=c[d],nk(this,b,f,c,!0)?a.ua&&tk(this,f,c,a.ua):this.La(!1)):void 0!==f&&a.ua&&0>a.ua.restore(f)&&(e=!1);e&&a.ua&&void 0!==a.Lb&&
|
k.ki=function(a,b,c){var d=0,e=!0;a.Jb=b;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",a.Fc||40,c[3],9,512,c[1]]);a.Ra=c[d++];a.name=c[d][0];a.Fc=c[d][1];a.Tc=c[d][2];a.de=c[d][3];a.td=c[d][4];a.Ye=c[d][5];d++;a.Rj=1;a.nb=c[d++];a.Rd=c[d++];a.sb=c[d++];a.Rd=100<=a.Rd?a.Rd-100:a.Rd-a.sb;a.Ya=c[d++];a.Td=c[d++];a.Pb=c[d++];a.Ob=c[d++];a.Sa=null;a.ua||(a.He="");var f=c[d++];f===sk?(f=c[d++],c=c[d],nk(this,b,f,c,!0)?a.ua&&tk(this,f,c,a.ua):this.Ma(!1)):void 0!==f&&a.ua&&
|
||||||
(a.Qa=a.ua.seek(a.tc,a.mb,a.Xa));return e};k.rj=function(){for(var a=0,b=[],c=0;c<this.xa.length;c++)b[a++]=this.qj(this.xa[c]);return b};k.qj=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=[a.name,a.$d,a.Qc,a.ce,a.qd,a.Ye];c[b++]=a.mb;c[b++]=-1;c[b++]=a.tc;c[b++]=a.Xa;c[b++]=a.Pd;c[b++]=a.Mb;c[b++]=a.Lb;c[b++]=sk;c[b++]=a.Il;c[b]=a.He;return c};k.Wj=function(a){var b;a=this.xa[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};
|
0>a.ua.restore(f)&&(e=!1);e&&a.ua&&void 0!==a.Ob&&(a.Sa=a.ua.seek(a.sb,a.nb,a.Ya));return e};k.tj=function(){for(var a=0,b=[],c=0;c<this.xa.length;c++)b[a++]=this.sj(this.xa[c]);return b};k.sj=function(a){var b=0,c=[];c[b++]=a.Ra;c[b++]=[a.name,a.Fc,a.Tc,a.de,a.td,a.Ye];c[b++]=a.nb;c[b++]=a.Rd+100;c[b++]=a.sb;c[b++]=a.Ya;c[b++]=a.Td;c[b++]=a.Pb;c[b++]=a.Ob;c[b++]=sk;c[b++]=a.Kl;c[b]=a.He;return c};k.Zj=function(a){var b;a=this.xa[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};
|
||||||
k.Ll=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.tc=Math.floor(b/f),b%=f,a.mb=Math.floor(b/e),a.Xa=b%e+1,a.Mb=c*d[3],a.errorCode=0,!0}return!1};k.zf=function(a){a||(this.te=0);if(this.Ee)for(var b in this.Ee){var c=this.Ee[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.xa.length){!nk(this,d,c.name,c.path,!0)&&a&&this.La(!1);continue}}B(this,"Unrecognized auto-mount specification for drive "+b)}return!!this.te};
|
k.Nl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.sb=Math.floor(b/f),b%=f,a.nb=Math.floor(b/e),a.Ya=b%e+1,a.Pb=c*d[3],a.Ra=0,!0}return!1};k.zf=function(a){a||(this.te=0);if(this.Ee)for(var b in this.Ee){var c=this.Ee[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.xa.length){!nk(this,d,c.name,c.path,!0)&&a&&this.Ma(!1);continue}}B(this,"Unrecognized auto-mount specification for drive "+b)}return!!this.te};
|
||||||
function nk(a,b,c,d,e){var f=a.xa[b];if(d&&f.He!=d){ok(a,b,e,!0);if(f.zc)return B(a,"Drive "+b+" busy"),!0;f.zc=!0;e&&(f.ze=!0,a.te++,a.Da("loading diskette '"+c+"'"));(new ak(a,f,"preload")).load(c,d,a.qn);return!1}return!0}k.qn=function(a,b,c,d){a.zc=!1;if(a.ua=b)a.Il=c,a.He=d,tk(this,c,d,b),this.fe|=128,B(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(65+a.Yd),a.ze);a.ze&&(a.ze=!1,--this.te||this.La());mk(this,a.Yd)};
|
function nk(a,b,c,d,e){var f=a.xa[b];if(d&&f.He!=d){ok(a,b,e,!0);if(f.Bc)return B(a,"Drive "+b+" busy"),!0;f.Bc=!0;e&&(f.ze=!0,a.te++,a.Da("loading diskette '"+c+"'"));(new ak(a,f,"preload")).load(c,d,a.qn);return!1}return!0}k.qn=function(a,b,c,d){a.Bc=!1;if(a.ua=b)a.Kl=c,a.He=d,tk(this,c,d,b),this.ge|=128,B(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(65+a.Jb),a.ze);a.ze&&(a.ze=!1,--this.te||this.Ma());mk(this,a.Jb)};
|
||||||
function mk(a,b){if(0<=b&&b<a.xa.length){var c=a.xa[b],d=a.sa.listDisks,e=a.sa.listDrives;if(d&&e&&(e=parseInt(e.value,10),!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c.He){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function ok(a,b,c,d){var e=a.xa[b];e.ua&&(rk(a,e.He,e.ua),e.Il="",e.He="",e.ua=null,a.fe|=128,d||B(a,"Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||mk(a,b))}
|
function mk(a,b){if(0<=b&&b<a.xa.length){var c=a.xa[b],d=a.sa.listDisks,e=a.sa.listDrives;if(d&&e&&(e=parseInt(e.value,10),!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c.He){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}function ok(a,b,c,d){var e=a.xa[b];e.ua&&(rk(a,e.He,e.ua),e.Kl="",e.He="",e.ua=null,a.ge|=128,d||B(a,"Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||mk(a,b))}
|
||||||
function tk(a,b,c,d){var e;for(e=0;e<a.kc.length;e++)if(a.kc[e][1]==c){d.restore(a.kc[e][2]);return}a.kc[e]=[b,c,[]]}function rk(a,b,c){var d;for(d=0;d<a.kc.length;d++)if(a.kc[d][1]==b){a.kc[d][2]=c.save();break}}k.Rn=function(a,b,c){this.ca(a,b,c,"OUTPUT");b&4?this.kf&4||this.kf&8&&this.ma&&ri(this.ma,6):this.yd();a=b&3;b&16<<a&&(this.Yd=a);this.kf=b};k.Gm=function(a,b){this.ca(a,null,b,"STATUS",this.Pa);return this.Pa};
|
function tk(a,b,c,d){var e;for(e=0;e<a.nc.length;e++)if(a.nc[e][1]==c){d.restore(a.nc[e][2]);return}a.nc[e]=[b,c,[]]}function rk(a,b,c){var d;for(d=0;d<a.nc.length;d++)if(a.nc[d][1]==b){a.nc[d][2]=c.save();break}}k.Rn=function(a,b,c){this.ca(a,b,c,"OUTPUT");b&4?this.kf&4||this.kf&8&&this.ma&&ri(this.ma,6):this.Bd();this.kf=b};k.Em=function(a,b){this.ca(a,null,b,"STATUS",this.Qa);return this.Qa};
|
||||||
k.Em=function(a,b){var c=0;this.eb<this.Oa&&(c=this.Vb[this.eb]);this.kf&8&&this.ma&&si(this.ma,6);this.ca(a,null,b,"DATA["+this.eb+"]",c);++this.eb>=this.Oa&&(this.Pa&=-81,this.eb=this.Oa=0);return c};k.Qn=function(a,b,c){this.ca(a,b,c,"DATA["+this.Oa+"]");this.Oa<this.Vb.length&&(this.Vb[this.Oa++]=b);a=this.Vb[0]&31;void 0!==lk[a]&&this.Oa>=lk[a].Rd&&this.Rh()};k.Fm=function(a,b){var c=this.fe;this.fe&=-129;this.ca(a,null,b,"INPUT",c);return c};
|
k.Cm=function(a,b){var c=0;this.fb<this.Pa&&(c=this.Yb[this.fb]);this.kf&8&&this.ma&&si(this.ma,6);this.ca(a,null,b,"DATA["+this.fb+"]",c);++this.fb>=this.Pa&&(this.Qa&=-81,this.fb=this.Pa=0);return c};k.Qn=function(a,b,c){this.ca(a,b,c,"DATA["+this.Pa+"]");this.Pa<this.Yb.length&&(this.Yb[this.Pa++]=b);a=this.Yb[0]&31;void 0!==lk[a]&&this.Pa>=lk[a].Ud&&this.Sh()};k.Dm=function(a,b){var c=this.ge;this.ge&=-129;this.ca(a,null,b,"INPUT",c);return c};
|
||||||
k.Pn=function(a,b,c){this.ca(a,b,c,"CONTROL");this.El=b};k.li=function(a){var b=this.S.G&255,c=this.S.G>>8,d=this.S.I&255,e=this.S.I>>8,f=this.S.J&255,g=this.S.J>>8;this.aa&&M(this.aa,this.aa.qg)&&128>f&&(this.aa.message("FDC.intBIOS(AH="+p(c)+",D="+p(f)+",C="+p(e)+",H="+p(g)+",S="+p(d)+",N="+p(b)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,b){return function(c){var d=b,d=F(a.S)-d;a.Da("FDC.intBIOSReturn("+c+"): C="+(Rc(a.S)?1:0)+" (cycles="+d+")")}}(this,F(this.S))));return!0};
|
k.Pn=function(a,b,c){this.ca(a,b,c,"CONTROL");this.Gl=b};k.mi=function(a){var b=this.S.G&255,c=this.S.G>>8,d=this.S.I&255,e=this.S.I>>8,f=this.S.J&255,g=this.S.J>>8;this.aa&&M(this.aa,this.aa.qg)&&128>f&&(this.aa.message("FDC.intBIOS(AH="+p(c)+",D="+p(f)+",C="+p(e)+",H="+p(g)+",S="+p(d)+",N="+p(b)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,b){return function(c){var d=b,d=F(a.S)-d;a.Da("FDC.intBIOSReturn("+c+"): C="+(Rc(a.S)?1:0)+" (cycles="+d+")")}}(this,F(this.S))));return!0};
|
||||||
k.Rh=function(){var a=!1;this.eb=0;var b,c=this.Ja()&31;switch(c){case 3:this.Ja("SRT");this.Ja("HLT");this.Cb();break;case 4:b=this.Ja("US");this.cd=b&=3;b=this.xa[b];this.Cb();this.kb(0,"ST3");break;case 5:case 6:b=this.Ja("US");a=b>>2&1;this.cd=b&=3;b=this.xa[b];b.mb=a;b.tc=this.Ja("C");this.Ja("H");b.Xa=this.Ja("R");a=this.Ja("N");b.Mb=128<<a;b.Pd=this.Ja("EOT");this.Ja("GPL");this.Ja("DTL");6==c?this.Sh(b):this.Th(b);this.Cb();uk(this,b.errorCode);this.kb((b.errorCode&65280)>>8,"ST1");this.kb((b.errorCode&
|
k.Sh=function(){var a=!1;this.fb=0;var b,c,d;d=this.Ja()&31;switch(d){case 3:this.Ja("SRT");this.Ja("HLT");this.Fb();break;case 4:c=this.Ja("DS");this.Jb=c&3;b=this.xa[this.Jb];this.Fb();this.lb((b.Ra&4278190080)>>>24,"ST3");break;case 5:case 6:c=this.Ja("DS");this.Jb=c&3;b=this.xa[this.Jb];b.nb=c>>2&1;b.sb=this.Ja("C");this.Ja("H");b.Ya=this.Ja("R");a=this.Ja("N");b.Pb=128<<a;b.Td=this.Ja("EOT");this.Ja("GPL");this.Ja("DTL");6==d?this.Th(b):this.Uh(b);this.Fb();uk(this,b);this.lb((b.Ra&65280)>>>
|
||||||
16711680)>>16,"ST2");this.kb(b.tc,"C");this.kb(b.mb,"H");this.kb(b.Xa,"R");this.kb(a,"N");a=!0;break;case 7:this.cd=b=this.Ja("US")&3;b=this.xa[b];b.tc=0;b.errorCode=32;this.Cb();a=!0;break;case 8:this.cd=this.Yd;b=this.xa[this.cd];this.Cb();uk(this,b.errorCode);this.kb(b.tc,"PCN");break;case 13:b=this.Ja("US");a=b>>2&1;this.cd=b&=3;b=this.xa[b];b.mb=a;a=this.Ja("N");b.Mb=128<<a;b.Pd=this.Ja("SC");this.Ja("GPL");b.Lj=this.Ja("D");this.Yj(b);this.Cb();uk(this,b.errorCode);this.kb((b.errorCode&65280)>>
|
8,"ST1");this.lb((b.Ra&16711680)>>>16,"ST2");this.lb(b.sb,"C");this.lb(b.nb,"H");this.lb(b.Ya,"R");this.lb(a,"N");a=!0;break;case 7:c=this.Ja("DS");this.Jb=c&3;b=this.xa[this.Jb];b.sb=b.Rd=0;b.Ra=268435488;this.Fb();a=!0;break;case 8:b=this.xa[this.Jb];this.Fb();uk(this,b);this.lb(b.sb,"PCN");break;case 13:c=this.Ja("DS");this.Jb=c&3;b=this.xa[this.Jb];b.nb=c>>2&1;a=this.Ja("N");b.Pb=128<<a;b.Td=this.Ja("SC");this.Ja("GPL");b.Nj=this.Ja("D");this.ak(b);this.Fb();uk(this,b);this.lb((b.Ra&65280)>>>
|
||||||
8,"ST1");this.kb((b.errorCode&16711680)>>16,"ST2");this.kb(b.tc,"C");this.kb(b.mb,"H");this.kb(b.Xa,"R");this.kb(a,"N");a=!0;break;case 15:b=this.Ja("US"),a=b>>2&1,this.cd=b&=3,b=this.xa[b],b.mb=a,b.tc=this.Ja("NCN"),b.errorCode=32,this.Cb(),a=!0}0<this.Oa&&(this.Pa|=80);this.kf&8&&(!b||b.errorCode&8||!a||this.ma&&ri(this.ma,6))};k.Ja=function(){var a=this.Vb[this.eb];this.eb++;return a};k.Cb=function(){this.eb=this.Oa=0};k.kb=function(a){this.Vb[this.Oa++]=a};
|
8,"ST1");this.lb((b.Ra&16711680)>>>16,"ST2");this.lb(b.sb,"C");this.lb(b.nb,"H");this.lb(b.Ya,"R");this.lb(a,"N");a=!0;break;case 15:c=this.Ja("DS"),this.Jb=c&3,b=this.xa[this.Jb],b.nb=c>>2&1,d=this.Ja("NCN"),b.sb+=d-b.Rd,0>b.sb&&(b.sb=0),b.sb>=b.Fc&&(b.sb=b.Fc-1),b.Rd=d,b.Ra=32,0==b.sb&&(b.Ra|=268435456),this.Fb(),a=!0}0<this.Pa&&(this.Qa|=80);this.kf&8&&(!b||b.Ra&8||!a||this.ma&&ri(this.ma,6))};k.Ja=function(){var a=this.Yb[this.fb];this.fb++;return a};k.Fb=function(){this.fb=this.Pa=0};
|
||||||
function uk(a,b){a.kb(a.cd|a.xa[a.cd].mb|b&255,"ST0")}k.Ph=function(a,b,c){void 0===b||0>b?this.Rc(a,c):c(-1,!1)};k.Qh=function(a,b){return void 0!==b&&0<=b?this.Ec(a,b):-1};k.fm=function(a,b){return void 0!==b&&0<=b?this.tj(a,b):-1};k.Sh=function(a){a.errorCode=72;a.ua&&(a.Qa=null,a.errorCode=0,this.ma&&(ki(this.ma,2,this,"dmaRead",a),ei(this.ma,2)))};k.Th=function(a){a.errorCode=72;a.ua&&(a.ua.Ze?a.errorCode=576:(a.Qa=null,a.errorCode=0,this.ma&&(ki(this.ma,2,this,"dmaWrite",a),ei(this.ma,2))))};
|
k.lb=function(a){this.Yb[this.Pa++]=a};function uk(a,b){a.lb(b.Jb|b.nb|b.Ra&255,"ST0")}k.Qh=function(a,b,c){void 0===b||0>b?this.Uc(a,c):c(-1,!1)};k.Rh=function(a,b){return void 0!==b&&0<=b?this.Hc(a,b):-1};k.dm=function(a,b){return void 0!==b&&0<=b?this.vj(a,b):-1};k.Th=function(a){a.Ra=72;a.ua&&(a.Sa=null,a.Ra=0,this.ma&&(ki(this.ma,2,this,"dmaRead",a),ei(this.ma,2)))};k.Uh=function(a){a.Ra=72;a.ua&&(a.ua.Ze?a.Ra=576:(a.Sa=null,a.Ra=0,this.ma&&(ki(this.ma,2,this,"dmaWrite",a),ei(this.ma,2))))};
|
||||||
k.Yj=function(a){a.errorCode=72;a.ua&&(a.Qa=null,a.errorCode=0,this.ma&&(a.we=0,a.mc=Array(4),a.Af=!0,a.Ff=0,ki(this.ma,2,this,"dmaFormat",a),ei(this.ma,2),a.Af=!1))};k.Rc=function(a,b){var c=-1;if(!a.errorCode&&a.ua){do{if(a.Qa&&0<=(c=jk(a.Qa,a.Lb++)))break;a.Qa=a.ua.seek(a.tc,a.mb,a.Xa);if(!a.Qa){a.errorCode=1088;break}a.Lb=0;a.Xa++}while(1)}b(c,!1)};
|
k.ak=function(a){a.Ra=72;a.ua&&(a.Sa=null,a.Ra=0,this.ma&&(a.we=0,a.pc=Array(4),a.Af=!0,a.Ff=0,ki(this.ma,2,this,"dmaFormat",a),ei(this.ma,2),a.Af=!1))};k.Uc=function(a,b){var c=-1;if(!a.Ra&&a.ua){do{if(a.Sa&&0<=(c=jk(a.Sa,a.Ob++)))break;a.Sa=a.ua.seek(a.sb,a.nb,a.Ya);if(!a.Sa){a.Ra=1088;break}a.Ob=0;a.Ya++}while(1)}b(c,!1)};k.Hc=function(a,b){if(a.Ra||!a.ua)return-1;do{if(a.Sa&&a.ua.write(a.Sa,a.Ob++,b))break;a.Sa=a.ua.seek(a.sb,a.nb,a.Ya);if(!a.Sa){a.Ra=8256;b=-1;break}a.Ob=0;a.Ya++}while(1);return b};
|
||||||
k.Ec=function(a,b){if(a.errorCode||!a.ua)return-1;do{if(a.Qa&&a.ua.write(a.Qa,a.Lb++,b))break;a.Qa=a.ua.seek(a.tc,a.mb,a.Xa);if(!a.Qa){a.errorCode=8256;b=-1;break}a.Lb=0;a.Xa++}while(1);return b};k.tj=function(a,b){if(a.errorCode)return-1;a.mc[a.we++]=b;if(a.we==a.mc.length){a.tc=a.mc[0];a.mb=a.mc[1];a.Xa=a.mc[2];a.Mb=128<<a.mc[3];for(var c=a.we=0;c<a.Mb;c++)if(0>this.Ec(a,a.Lj))return-1;a.Ff++}a.Ff>=a.Pd&&(b=-1);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.qg)&&this.aa.message(a)};
|
k.vj=function(a,b){if(a.Ra)return-1;a.pc[a.we++]=b;if(a.we==a.pc.length){a.sb=a.pc[0];a.nb=a.pc[1];a.Ya=a.pc[2];a.Pb=128<<a.pc[3];for(var c=a.we=0;c<a.Pb;c++)if(0>this.Hc(a,a.Nj))return-1;a.Ff++}a.Ff>=a.Td&&(b=-1);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.qg)&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.qg,e)};var pk={1012:kk.prototype.Em,1013:kk.prototype.Cm,1015:kk.prototype.Dm},qk={1010:kk.prototype.Rn,1013:kk.prototype.Qn,1015:kk.prototype.Pn};
|
||||||
k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.qg,e)};var pk={1012:kk.prototype.Gm,1013:kk.prototype.Em,1015:kk.prototype.Fm},qk={1010:kk.prototype.Rn,1013:kk.prototype.Qn,1015:kk.prototype.Pn};za(function(){for(var a=y(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new kk(d);Pa(d,c)}});
|
za(function(){for(var a=y(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new kk(d);Pa(d,c)}});function Y(a){s.call(this,"HDC",a,Y);this.dmaRead=this.Qh;this.dmaWrite=this.Rh;this.dmaWriteBuffer=this.em;this.dmaWriteFormat=this.fm;this.wh=[];if(a.drives)try{this.wh=eval("("+a.drives+")")}catch(b){this.error("HDC drive configuration error: "+b.message+" ("+a.drives+")")}}w(s,Y);var vk={0:[306,2,17,512],1:[375,8,17,512],2:[306,6,17,512],3:[306,4,17,512]};k=Y.prototype;k.qb=function(){return!1};
|
||||||
function Y(a){s.call(this,"HDC",a,Y);this.dmaRead=this.Ph;this.dmaWrite=this.Qh;this.dmaWriteBuffer=this.gm;this.dmaWriteFormat=this.hm;this.vh=[];if(a.drives)try{this.vh=eval("("+a.drives+")")}catch(b){this.error("HDC drive configuration error: "+b.message+" ("+a.drives+")")}}w(s,Y);var vk={0:[306,2,17,512],1:[375,8,17,512],2:[306,6,17,512],3:[306,4,17,512]};k=Y.prototype;k.pb=function(){return!1};
|
k.jc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet");ib(b,this,wk);lb(b,this,xk);Cc(c,19,this,this.jn);Cc(c,64,this,this.mi);this.Bd();this.zf()||this.Ma()};k.Xb=function(a,b){if(!b)if(!a||!this.restore)this.reset(),this.Ba.di&&this.zf(!0);else if(!this.restore(a))return!1;return!0};k.Ub=function(a){return a&&this.save?this.save():!0};k.$e=function(){return this.Ba?this.Ba.$e():""};k.Zd=function(){return this.Ba?this.Ba.Zd():""};k.reset=function(){this.Bd()};
|
||||||
k.gc=function(a,b,c,d){this.la=b;this.S=c;this.aa=d;this.Ba=a;this.ma=C(a,"ChipSet");ib(b,this,wk);lb(b,this,xk);Cc(c,19,this,this.jn);Cc(c,64,this,this.li);this.yd();this.zf()||this.La()};k.Ub=function(a,b){if(!b)if(!a||!this.restore)this.reset(),this.Ba.ci&&this.zf(!0);else if(!this.restore(a))return!1;return!0};k.Rb=function(a){return a&&this.save?this.save():!0};k.$e=function(){return this.Ba?this.Ba.$e():""};k.Wd=function(){return this.Ba?this.Ba.Wd():""};k.reset=function(){this.yd()};
|
k.save=function(){var a=new I(this);a.set(0,this.rj());return a.data()};k.restore=function(a){return this.Bd(a[0])};
|
||||||
k.save=function(){var a=new I(this);a.set(0,this.pj());return a.data()};k.restore=function(a){return this.yd(a[0])};
|
k.Bd=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,Array(14),0,0]);this.fg=a[b++];this.Qa=a[b++];this.Yb=a[b++];this.fb=a[b++];this.Pa=a[b++];this.Jl=a[b++];this.Il=a[b++];this.Hl=a[b++];var d=a[b++];void 0!==d?this.af=d:void 0===this.af&&(this.af=-1);void 0===this.xa&&(this.xa=Array(this.wh.length));a=a[b];void 0===a&&(a=[]);for(b=0;b<this.xa.length;b++)void 0===this.xa[b]&&(this.xa[b]={}),d=this.xa[b],this.ki(b,d,this.wh[b],a[b])||(c=!1),1>=b&&(this.fg|=(d.type&3)<<(1-b<<1));return c};
|
||||||
k.yd=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,Array(14),0,0]);this.fg=a[b++];this.Pa=a[b++];this.Vb=a[b++];this.eb=a[b++];this.Oa=a[b++];this.Hl=a[b++];this.Gl=a[b++];this.Fl=a[b++];var d=a[b++];void 0!==d?this.af=d:void 0===this.af&&(this.af=-1);void 0===this.xa&&(this.xa=Array(this.vh.length));a=a[b];void 0===a&&(a=[]);for(b=0;b<this.xa.length;b++)void 0===this.xa[b]&&(this.xa[b]={}),d=this.xa[b],this.ji(b,d,this.vh[b],a[b])||(c=!1),1>=b&&(this.fg|=(d.type&3)<<(1-b<<1));return c};
|
k.rj=function(){var a=0,b=[];b[a++]=this.fg;b[a++]=this.Qa;b[a++]=this.Yb;b[a++]=this.fb;b[a++]=this.Pa;b[a++]=this.Jl;b[a++]=this.Il;b[a++]=this.Hl;b[a++]=this.af;b[a]=this.tj();return b};
|
||||||
k.pj=function(){var a=0,b=[];b[a++]=this.fg;b[a++]=this.Pa;b[a++]=this.Vb;b[a++]=this.eb;b[a++]=this.Oa;b[a++]=this.Hl;b[a++]=this.Gl;b[a++]=this.Fl;b[a++]=this.af;b[a]=this.rj();return b};
|
k.ki=function(a,b,c,d){var e=0,f=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.Jb=a;b.errorCode=d[e++];b.Pl=d[e++];b.Ye=d[e++];b.Oe=d[e++];b.Pe=d[e++];b.nb=d[e++];b.Tc=d[e++];b.Je=d[e++];b.Ya=d[e++];b.Td=d[e++];b.Pb=d[e++];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.Zd()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===vk[b.type])b.type=3;c=vk[b.type];b.de=c[2];b.td=c[3];void 0===b.ua&&
|
||||||
k.ji=function(a,b,c,d){var e=0,f=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.Yd=a;b.errorCode=d[e++];b.Nl=d[e++];b.Ye=d[e++];b.Oe=d[e++];b.Pe=d[e++];b.mb=d[e++];b.Qc=d[e++];b.Je=d[e++];b.Xa=d[e++];b.Pd=d[e++];b.Mb=d[e++];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===vk[b.type])b.type=3;c=vk[b.type];b.ce=c[2];b.qd=c[3];void 0===b.ua&&
|
(b.ua=null,B(this,"Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));yk(this,b);b.Ob=d[e++];b.Sa=null;b.ua&&(a=d[e],void 0!==a&&0>b.ua.restore(a)&&(f=!1),f&&void 0!==b.Ob&&(b.Sa=b.ua.seek(b.Je,b.nb,b.Ya+1)));return f};k.tj=function(){for(var a=0,b=[],c=0;c<this.xa.length;c++)b[a++]=this.sj(this.xa[c]);return b};
|
||||||
(b.ua=null,B(this,"Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));yk(this,b);b.Lb=d[e++];b.Qa=null;b.ua&&(a=d[e],void 0!==a&&0>b.ua.restore(a)&&(f=!1),f&&void 0!==b.Lb&&(b.Qa=b.ua.seek(b.Je,b.mb,b.Xa+1)));return f};k.rj=function(){for(var a=0,b=[],c=0;c<this.xa.length;c++)b[a++]=this.qj(this.xa[c]);return b};
|
k.sj=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Pl;c[b++]=a.Ye;c[b++]=a.Oe;c[b++]=a.Pe;c[b++]=a.nb;c[b++]=a.Tc;c[b++]=a.Je;c[b++]=a.Ya;c[b++]=a.Td;c[b++]=a.Pb;c[b++]=a.Ob;c[b]=a.ua?a.ua.save():null;return c};k.Zj=function(a){var b;a=this.xa[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};
|
||||||
k.qj=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Nl;c[b++]=a.Ye;c[b++]=a.Oe;c[b++]=a.Pe;c[b++]=a.mb;c[b++]=a.Qc;c[b++]=a.Je;c[b++]=a.Xa;c[b++]=a.Pd;c[b++]=a.Mb;c[b++]=a.Lb;c[b]=a.ua?a.ua.save():null;return c};k.Wj=function(a){var b;a=this.xa[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};
|
function yk(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Oe[2])?e=b.Oe[0]<<8|b.Oe[1]:c=b.type);null==c||d||(d=vk[c][1],e=vk[c][0]);d&&((c=vk[b.type])&&e!=c[0]&&d!=c[1]&&B(a,"Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.Fc=e,b.Tc=d,null==b.ua&&(b.ua=new ak(a,b,b.mode)))}}
|
||||||
function yk(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Oe[2])?e=b.Oe[0]<<8|b.Oe[1]:c=b.type);null==c||d||(d=vk[c][1],e=vk[c][0]);d&&((c=vk[b.type])&&e!=c[0]&&d!=c[1]&&B(a,"Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.$d=e,b.Qc=d,null==b.ua&&(b.ua=new ak(a,b,b.mode)))}}
|
k.Nl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Je=Math.floor(b/g),b%=g,a.nb=Math.floor(b/f),a.Ya=b%f,a.Pb=c*d[3],a.errorCode=0,!0}}return!1};
|
||||||
k.Ll=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Je=Math.floor(b/g),b%=g,a.mb=Math.floor(b/f),a.Xa=b%f,a.Mb=c*d[3],a.errorCode=0,!0}}return!1};
|
k.zf=function(a){a||(this.te=0);for(var b=0;b<this.xa.length;b++){var c=this.xa[b];if(c.name&&c.path){var d;d=c.name;var c=c.path,e=this.xa[b];e.Bc?(B(this,"Drive "+b+" busy"),d=!0):(e.Bc=!0,e.ze=!0,this.te++,this.Da("loading "+d),(e.ua||new ak(this,e,e.mode)).load(d,c,this.pn),d=!1);!d&&a&&this.Ma(!1)}else a&&void 0!==c.type&&(c.ua=null,yk(this,c,c.type))}return!!this.te};
|
||||||
k.zf=function(a){a||(this.te=0);for(var b=0;b<this.xa.length;b++){var c=this.xa[b];if(c.name&&c.path){var d;d=c.name;var c=c.path,e=this.xa[b];e.zc?(B(this,"Drive "+b+" busy"),d=!0):(e.zc=!0,e.ze=!0,this.te++,this.Da("loading "+d),(e.ua||new ak(this,e,e.mode)).load(d,c,this.pn),d=!1);!d&&a&&this.La(!1)}else a&&void 0!==c.type&&(c.ua=null,yk(this,c,c.type))}return!!this.te};
|
k.pn=function(a,b,c){a.Bc=!1;(a.ua=b)&&B(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Jb),a.ze);a.ze&&(a.ze=!1,--this.te||this.Ma())};k.Km=function(a,b){var c=0;this.fb<this.Pa&&(c=this.Yb[this.fb]);this.ma&&si(this.ma,5);this.Qa&=-33;this.ca(a,null,b,"DATA["+this.fb+"]",c);++this.fb>=this.Pa&&(this.fb=this.Pa=0,this.Qa&=-15);return c};
|
||||||
k.pn=function(a,b,c){a.zc=!1;(a.ua=b)&&B(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Yd),a.ze);a.ze&&(a.ze=!1,--this.te||this.La())};k.Mm=function(a,b){var c=0;this.eb<this.Oa&&(c=this.Vb[this.eb]);this.ma&&si(this.ma,5);this.Pa&=-33;this.ca(a,null,b,"DATA["+this.eb+"]",c);++this.eb>=this.Oa&&(this.eb=this.Oa=0,this.Pa&=-15);return c};
|
k.Wn=function(a,b,c){this.ca(a,b,c,"DATA["+this.Pa+"]");this.Pa<this.Yb.length&&(this.Yb[this.Pa++]=b);a=12!=this.Yb[0]?6:this.Yb.length;6==this.Pa&&(this.Qa&=-2);this.Pa>=a&&(this.Qa|=2,this.Qa&=-2,this.Sh())};k.Lm=function(a,b){var c=this.Qa;this.ca(a,null,b,"STATUS",c);this.fb<this.Pa&&(this.Qa|=1);return c};k.Zn=function(a,b,c){this.ca(a,b,c,"RESET");this.Jl=b;this.ma&&si(this.ma,5);this.Bd()};k.Jm=function(a,b){this.ca(a,null,b,"CONFIG",this.fg);return this.fg};
|
||||||
k.Wn=function(a,b,c){this.ca(a,b,c,"DATA["+this.Oa+"]");this.Oa<this.Vb.length&&(this.Vb[this.Oa++]=b);a=12!=this.Vb[0]?6:this.Vb.length;6==this.Oa&&(this.Pa&=-2);this.Oa>=a&&(this.Pa|=2,this.Pa&=-2,this.Rh())};k.Nm=function(a,b){var c=this.Pa;this.ca(a,null,b,"STATUS",c);this.eb<this.Oa&&(this.Pa|=1);return c};k.Zn=function(a,b,c){this.ca(a,b,c,"RESET");this.Hl=b;this.ma&&si(this.ma,5);this.yd()};k.Lm=function(a,b){this.ca(a,null,b,"CONFIG",this.fg);return this.fg};
|
k.Yn=function(a,b,c){this.ca(a,b,c,"PULSE");this.Il=b;this.Qa=13};k.Xn=function(a,b,c){this.ca(a,b,c,"PATTERN");this.Hl=b};k.jj=function(a,b,c){this.ca(a,b,c,"NOISE")};
|
||||||
k.Yn=function(a,b,c){this.ca(a,b,c,"PULSE");this.Gl=b;this.Pa=13};k.Xn=function(a,b,c){this.ca(a,b,c,"PATTERN");this.Fl=b};k.ij=function(a,b,c){this.ca(a,b,c,"NOISE")};
|
k.jn=function(a){var b=this.S.J&255;!(this.S.G>>8)&&128<b&&(this.af=b-128);this.aa&&M(this.aa,this.aa.th)&&128<=b&&(this.aa.message("HDC.intBIOSDisk(AX="+q(this.S.G)+",DL="+p(b)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,b){return function(e){var f=b,f=F(a.S)-f;a.Da("HDC.intBIOSDiskReturn("+e+"): C="+(Rc(a.S)?1:0)+" (cycles="+f+")")}}(this,F(this.S))));return!0};k.mi=function(){var a;(a=this.S.G>>8)||(a=!this.ma)||(a=!(this.ma.mb[0].sd&64));return a?!0:!1};
|
||||||
k.jn=function(a){var b=this.S.J&255;!(this.S.G>>8)&&128<b&&(this.af=b-128);this.aa&&M(this.aa,this.aa.sh)&&128<=b&&(this.aa.message("HDC.intBIOSDisk(AX="+q(this.S.G)+",DL="+p(b)+") at "+ca(a-this.S.qa.Ia,this.S.qa.na)),Dc(this.S,a,function(a,b){return function(e){var f=b,f=F(a.S)-f;a.Da("HDC.intBIOSDiskReturn("+e+"): C="+(Rc(a.S)?1:0)+" (cycles="+f+")")}}(this,F(this.S))));return!0};k.li=function(){var a;(a=this.S.G>>8)||(a=!this.ma)||(a=!(this.ma.lb[0].pd&64));return a?!0:!1};
|
k.Sh=function(){var a=this;this.fb=0;var b=this.Ja(),c=this.Ja(),d=c&32,e=d>>5,f=c&31,g=this.Ja(),h=this.Ja(),m=g<<2&768|h,n=g&63,r=this.Ja(),u=this.Ja(),t=this.xa[e];t&&(t.Je=m,t.nb=f,t.Ya=n,t.Pb=r*t.td);switch(b){case 3:this.Fb(t?t.errorCode:4);this.lb(c);this.lb(g);this.lb(h);this.lb(0|d);b=-1;break;case 12:for(c=0;0<=(b=this.Ja());)t&&c<t.Oe.length&&(t.Oe[c++]=b);t&&yk(this,t);b=0;t||this.af!=e||(this.af=-1,b=2);this.Fb(b|d);b=-1;break;case 224:case 228:this.Fb(0|d),b=-1}if(0<=b)switch(void 0===
|
||||||
k.Rh=function(){var a=this;this.eb=0;var b=this.Ja(),c=this.Ja(),d=c&32,e=d>>5,f=c&31,g=this.Ja(),h=this.Ja(),m=g<<2&768|h,n=g&63,r=this.Ja(),u=this.Ja(),t=this.xa[e];t&&(t.Je=m,t.mb=f,t.Xa=n,t.Mb=r*t.qd);switch(b){case 3:this.Cb(t?t.errorCode:4);this.kb(c);this.kb(g);this.kb(h);this.kb(0|d);b=-1;break;case 12:for(c=0;0<=(b=this.Ja());)t&&c<t.Oe.length&&(t.Oe[c++]=b);t&&yk(this,t);b=0;t||this.af!=e||(this.af=-1,b=2);this.Cb(b|d);b=-1;break;case 224:case 228:this.Cb(0|d),b=-1}if(0<=b)switch(void 0===
|
t?b=-1:(t.errorCode=0,t.Pl=0),b){case 0:this.Fb(0|d);break;case 1:t.Wo=u;this.Fb(0|d);break;case 5:this.Fb(0|d);break;case 8:this.Th(t,function(b){a.Fb(b|d)});break;case 10:this.Uh(t,function(b){a.Fb(b|d)});break;case 15:zk(this,t,function(b){a.Fb(b|d)});break;default:this.Fb(2|d)}};k.Ja=function(){var a=-1;this.fb<this.Pa&&(a=this.Yb[this.fb++]);return a};k.Fb=function(a){this.fb=this.Pa=0;void 0!==a&&this.lb(a);this.ma&&ri(this.ma,5);this.Qa|=32};k.lb=function(a){this.Yb[this.Pa++]=a};
|
||||||
t?b=-1:(t.errorCode=0,t.Nl=0),b){case 0:this.Cb(0|d);break;case 1:t.Vo=u;this.Cb(0|d);break;case 5:this.Cb(0|d);break;case 8:this.Sh(t,function(b){a.Cb(b|d)});break;case 10:this.Th(t,function(b){a.Cb(b|d)});break;case 15:zk(this,t,function(b){a.Cb(b|d)});break;default:this.Cb(2|d)}};k.Ja=function(){var a=-1;this.eb<this.Oa&&(a=this.Vb[this.eb++]);return a};k.Cb=function(a){this.eb=this.Oa=0;void 0!==a&&this.kb(a);this.ma&&ri(this.ma,5);this.Pa|=32};k.kb=function(a){this.Vb[this.Oa++]=a};
|
k.Qh=function(a,b,c){void 0===b||0>b?this.Uc(a,c):c(-1,!1)};k.Rh=function(a,b){return void 0!==b&&0<=b?this.Hc(a,b):-1};k.em=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Ob<a.Pe.length?a.Pe[a.Ob++]=c:(a.errorCode=20,c=-1)):c=-1;return c};k.fm=function(a,b){return void 0!==b&&0<=b?this.vj(a,b):-1};
|
||||||
k.Ph=function(a,b,c){void 0===b||0>b?this.Rc(a,c):c(-1,!1)};k.Qh=function(a,b){return void 0!==b&&0<=b?this.Ec(a,b):-1};k.gm=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Lb<a.Pe.length?a.Pe[a.Lb++]=c:(a.errorCode=20,c=-1)):c=-1;return c};k.hm=function(a,b){return void 0!==b&&0<=b?this.tj(a,b):-1};
|
k.Th=function(a,b){a.errorCode=4;if(a.ua&&(a.Sa=null,this.ma)){a.errorCode=0;ki(this.ma,3,this,"dmaRead",a);ei(this.ma,3,function(c){c||0!=a.errorCode||(a.errorCode=4);b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};k.Uh=function(a,b){a.errorCode=4;if(a.ua&&(a.Sa=null,this.ma)){a.errorCode=0;ki(this.ma,3,this,"dmaWrite",a);ei(this.ma,3,function(c){c||(0==a.errorCode&&(a.errorCode=4),20==a.errorCode&&(a.errorCode=0));b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
||||||
k.Sh=function(a,b){a.errorCode=4;if(a.ua&&(a.Qa=null,this.ma)){a.errorCode=0;ki(this.ma,3,this,"dmaRead",a);ei(this.ma,3,function(c){c||0!=a.errorCode||(a.errorCode=4);b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};k.Th=function(a,b){a.errorCode=4;if(a.ua&&(a.Qa=null,this.ma)){a.errorCode=0;ki(this.ma,3,this,"dmaWrite",a);ei(this.ma,3,function(c){c||(0==a.errorCode&&(a.errorCode=4),20==a.errorCode&&(a.errorCode=0));b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
function zk(a,b,c){b.errorCode=4;b.Pe&&b.Pe.length==b.Pb||(b.Pe=Array(b.Pb));b.Ob=0;a.ma?(b.errorCode=0,ki(a.ma,3,a,"dmaWriteBuffer",b),ei(a.ma,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}k.ak=function(a,b){a.errorCode=4;if(a.ua&&(a.Sa=null,this.ma)){a.we=0;a.pc=Array(4);a.Af=!0;a.Ff=0;a.errorCode=0;ki(this.ma,3,this,"dmaWriteFormat",a);ei(this.ma,3,function(c){c||0!=a.errorCode||(a.errorCode=4);a.Af=!1;b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
||||||
function zk(a,b,c){b.errorCode=4;b.Pe&&b.Pe.length==b.Mb||(b.Pe=Array(b.Mb));b.Lb=0;a.ma?(b.errorCode=0,ki(a.ma,3,a,"dmaWriteBuffer",b),ei(a.ma,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}k.Yj=function(a,b){a.errorCode=4;if(a.ua&&(a.Qa=null,this.ma)){a.we=0;a.mc=Array(4);a.Af=!0;a.Ff=0;a.errorCode=0;ki(this.ma,3,this,"dmaWriteFormat",a);ei(this.ma,3,function(c){c||0!=a.errorCode||(a.errorCode=4);a.Af=!1;b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
k.Uc=function(a,b){var c=-1;if(a.errorCode)b(c,!1);else{if(a.Sa&&(c=jk(a.Sa,a.Ob++),0<=c)){b(c,!1);return}a.ua.seek(a.Je,a.nb,a.Ya+1,!1,function(c,e){var f=-1;(a.Sa=c)?(a.Ob=0,a.Ya++,f=jk(a.Sa,a.Ob++)):a.errorCode=20;b(f,e)})}};k.Hc=function(a,b){if(a.errorCode)return-1;do{if(a.Sa&&a.ua.write(a.Sa,a.Ob++,b))break;a.ua.seek(a.Je,a.nb,a.Ya+1,!0,function(b){a.Sa=b});if(!a.Sa){a.errorCode=20;b=-1;break}a.Ob=0;a.Ya++}while(1);return b};
|
||||||
k.Rc=function(a,b){var c=-1;if(a.errorCode)b(c,!1);else{if(a.Qa&&(c=jk(a.Qa,a.Lb++),0<=c)){b(c,!1);return}a.ua.seek(a.Je,a.mb,a.Xa+1,!1,function(c,e){var f=-1;(a.Qa=c)?(a.Lb=0,a.Xa++,f=jk(a.Qa,a.Lb++)):a.errorCode=20;b(f,e)})}};k.Ec=function(a,b){if(a.errorCode)return-1;do{if(a.Qa&&a.ua.write(a.Qa,a.Lb++,b))break;a.ua.seek(a.Je,a.mb,a.Xa+1,!0,function(b){a.Qa=b});if(!a.Qa){a.errorCode=20;b=-1;break}a.Lb=0;a.Xa++}while(1);return b};
|
k.vj=function(a,b){if(a.errorCode)return-1;a.pc[a.we++]=b;if(a.we==a.pc.length){a.Je=a.pc[0];a.nb=a.pc[1];a.Ya=a.pc[2];a.Pb=128<<a.pc[3];for(var c=a.we=0;c<a.Pb;c++)if(0>this.Hc(a,a.Nj))return-1;a.Ff++}a.Ff>=a.Td&&(b=-1);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.th)&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.th,e)};
|
||||||
k.tj=function(a,b){if(a.errorCode)return-1;a.mc[a.we++]=b;if(a.we==a.mc.length){a.Je=a.mc[0];a.mb=a.mc[1];a.Xa=a.mc[2];a.Mb=128<<a.mc[3];for(var c=a.we=0;c<a.Mb;c++)if(0>this.Ec(a,a.Lj))return-1;a.Ff++}a.Ff>=a.Pd&&(b=-1);return b};k.Da=function(a){this.aa&&M(this.aa,this.aa.sh)&&this.aa.message(a)};k.ca=function(a,b,c,d,e){this.aa&&this.aa.ca(this,a,b,c,d,this.aa.sh,e)};
|
var wk={800:Y.prototype.Km,801:Y.prototype.Lm,802:Y.prototype.Jm},xk={800:Y.prototype.Wn,801:Y.prototype.Zn,802:Y.prototype.Yn,803:Y.prototype.Xn,807:Y.prototype.jj,811:Y.prototype.jj,815:Y.prototype.jj};za(function(){for(var a=y(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Y(d);Pa(d,c)}});
|
||||||
var wk={800:Y.prototype.Mm,801:Y.prototype.Nm,802:Y.prototype.Lm},xk={800:Y.prototype.Wn,801:Y.prototype.Zn,802:Y.prototype.Yn,803:Y.prototype.Xn,807:Y.prototype.ij,811:Y.prototype.ij,815:Y.prototype.ij};za(function(){for(var a=y(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Y(d);Pa(d,c)}});
|
function Ak(a){s.call(this,"Debugger",a,Ak);this.Gg=this.Sc=-1;this.uc=[0,0];this.Fj=[0,0];this.mh=null;this.Ve=!1;this.ke=[0,0];this.oc=[];Bk(this);Ck(this);this.$a={Bj:{Na:1,Oa:"mem"},Cj:{Na:2,Oa:"port"},zb:{Na:4,Oa:"dma"},Le:{Na:8,Oa:"pic"},Me:{Na:16,Oa:"timer"},Aj:{Na:32,Oa:"keyboard"},sg:{Na:64,Oa:"video"},qg:{Na:128,Oa:"fdc"},th:{Na:256,Oa:"hdc"},Xl:{Na:512,Oa:"disk"},Dj:{Na:1024,Oa:"serial"},rg:{Na:2048,Oa:"speaker"},Ka:{Na:4096,Oa:"chipset"},am:{Na:8192,Oa:"state"},$l:{Na:16384,Oa:"mouse"},
|
||||||
function Ak(a){s.call(this,"Debugger",a,Ak);this.Gg=this.Pc=-1;this.rc=[0,0];this.Ej=[0,0];this.lh=null;this.Ve=!1;this.ke=[0,0];this.lc=[];Bk(this);Ck(this);this.Za={zj:{Ma:1,Na:"mem"},Aj:{Ma:2,Na:"port"},xb:{Ma:4,Na:"dma"},Le:{Ma:8,Na:"pic"},Me:{Ma:16,Na:"timer"},yj:{Ma:32,Na:"keyboard"},sg:{Ma:64,Na:"video"},qg:{Ma:128,Na:"fdc"},sh:{Ma:256,Na:"hdc"},Wl:{Ma:512,Na:"disk"},Bj:{Ma:1024,Na:"serial"},rg:{Ma:2048,Na:"speaker"},Va:{Ma:4096,Na:"chipset"},$l:{Ma:8192,Na:"state"},Zl:{Ma:16384,Na:"mouse"},
|
Wl:{Na:32768,Oa:"computer"},Yl:{Na:65536,Oa:"dos"},So:{Na:131072,Oa:"log"},Zl:{Na:262144,Oa:"halt"}};Eh(this,this,a.messages);this.qj=a.commands}w(s,Ak);
|
||||||
Vl:{Ma:32768,Na:"computer"},Xl:{Ma:65536,Na:"dos"},Ro:{Ma:131072,Na:"log"},Yl:{Ma:262144,Na:"halt"}};Fh(this,this,a.messages);this.oj=a.commands}w(s,Ak);
|
|
||||||
var Dk={"?":"help","a [#]":"assemble","b [#]":"breakpoint",c:"clear window","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]","h [#]":"halt/history","i [#]":"input port #",l:"load sector(s)",m:"messages","o [#]":"output port #",p:"step over",r:"dump/edit registers","t [#]":"step instruction(s)","u [#]":"unassemble",x:"execution options"},Ek="DB AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FADD FBLD FBSTP FCOM FCOMP FDIV FDIVR FIADD FICOM FICOMP FIDIV FIDIVR FILD FIMUL FIST FISTP FISUB FISUBR FLD FLDCW FLDENV FMUL FNSAVE FNSTCW FNSTENV FNSTSW FRSTOR FS: FST FSTP FSUB FSUBR GBP GS: HLT IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JNBE JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSH PUSHA PUSHF RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XCHG XLAT XOR".split(" "),
|
var Dk={"?":"help","a [#]":"assemble","b [#]":"breakpoint",c:"clear window","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]","h [#]":"halt/history","i [#]":"input port #",l:"load sector(s)",m:"messages","o [#]":"output port #",p:"step over",r:"dump/edit registers","t [#]":"step instruction(s)","u [#]":"unassemble",x:"execution options"},Ek="DB AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FADD FBLD FBSTP FCOM FCOMP FDIV FDIVR FIADD FICOM FICOMP FIDIV FIDIVR FILD FIMUL FIST FISTP FISUB FISUBR FLD FLDCW FLDENV FMUL FNSAVE FNSTCW FNSTENV FNSTSW FRSTOR FS: FST FSTP FSUB FSUBR GBP GS: HLT IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JNBE JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSH PUSHA PUSHF RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XCHG XLAT XOR".split(" "),
|
||||||
Fk="AL CL DL BL AH CH DH BH AX CX DX BX SP BP SI DI ES CS SS DS IP".split(" "),Gk="BX+SI BX+DI BP+SI BP+DI SI DI BP BX".split(" "),Z=[0,0],Hk=[204,12291],Ik=[[6,12417,4257],[6,12420,4260],[6,12449,4225],[6,12452,4228],[6,12385,4097],[6,14435,4100],[136,4211],[133,8307],[129,12417,4257],[129,12420,4260],[129,12449,4225],[129,12452,4228],[129,12385,4097],[129,14435,4100],[136,4467],[133,8563],[5,12417,4257],[5,12420,4260],[5,12449,4225],[5,12452,4228],[5,12385,4097],[5,14435,4100],[136,4723],[133,8819],
|
Fk="AL CL DL BL AH CH DH BH AX CX DX BX SP BP SI DI ES CS SS DS IP".split(" "),Gk="BX+SI BX+DI BP+SI BP+DI SI DI BP BX".split(" "),Z=[0,0],Hk=[204,12291],Ik=[[6,12417,4257],[6,12420,4260],[6,12449,4225],[6,12452,4228],[6,12385,4097],[6,14435,4100],[136,4211],[133,8307],[129,12417,4257],[129,12420,4260],[129,12449,4225],[129,12452,4228],[129,12385,4097],[129,14435,4100],[136,4467],[133,8563],[5,12417,4257],[5,12420,4260],[5,12449,4225],[5,12452,4228],[5,12385,4097],[5,14435,4100],[136,4723],[133,8819],
|
||||||
[149,12417,4257],[149,12420,4260],[149,12449,4225],[149,12452,4228],[149,12385,4097],[149,14435,4100],[136,4979],[133,9075],[7,12417,4257],[7,12420,4260],[7,12449,4225],[7,12452,4228],[7,12385,4097],[7,14435,4100],[35,15],[29],[183,12417,4257],[183,12420,4260],[183,12449,4225],[183,12452,4228],[183,12385,4097],[183,14435,4100],[27,15],[30],[190,12417,4257],[190,12420,4260],[190,12449,4225],[190,12452,4228],[190,12385,4097],[190,14435,4100],[176,15],[1],[24,4225,4257],[24,4228,4260],[24,4257,4225],
|
[149,12417,4257],[149,12420,4260],[149,12449,4225],[149,12452,4228],[149,12385,4097],[149,14435,4100],[136,4979],[133,9075],[7,12417,4257],[7,12420,4260],[7,12449,4225],[7,12452,4228],[7,12385,4097],[7,14435,4100],[35,15],[29],[183,12417,4257],[183,12420,4260],[183,12449,4225],[183,12452,4228],[183,12385,4097],[183,14435,4100],[27,15],[30],[190,12417,4257],[190,12420,4260],[190,12449,4225],[190,12452,4228],[190,12385,4097],[190,14435,4100],[176,15],[1],[24,4225,4257],[24,4228,4260],[24,4257,4225],
|
||||||
|
|
@ -648,78 +646,78 @@ Kk=[[[6,12417,4097],[129,12417,4097],[5,12417,4097],[149,12417,4097],[7,12417,40
|
||||||
62:"close file (<BX)",63:"read (<CX) bytes from file (<BX) into buffer (<DS:DX)",64:"write (<CX) bytes to file (<BX) from buffer (<DS:DX)",65:"delete file (<DS:DX)",66:"set position (<CX:DX) of file (<BX) relative to (<AL)",67:"get/set (AL=0/1) attributes (CX) of file (<DS:DX)",68:"get device information (IOCTL)",69:"duplicate file handle (<BX)",70:"force file handle (<CX) to duplicate file handle (<BX)",71:"get current directory (DS:SI>) for drive (<DL)",72:"allocate memory segment with (<BX) paragraphs",
|
62:"close file (<BX)",63:"read (<CX) bytes from file (<BX) into buffer (<DS:DX)",64:"write (<CX) bytes to file (<BX) from buffer (<DS:DX)",65:"delete file (<DS:DX)",66:"set position (<CX:DX) of file (<BX) relative to (<AL)",67:"get/set (AL=0/1) attributes (CX) of file (<DS:DX)",68:"get device information (IOCTL)",69:"duplicate file handle (<BX)",70:"force file handle (<CX) to duplicate file handle (<BX)",71:"get current directory (DS:SI>) for drive (<DL)",72:"allocate memory segment with (<BX) paragraphs",
|
||||||
73:"free memory segment (<ES)",74:"resize memory segment (<ES) to (<BX) paragraphs",75:"load program (<DS:DX) using parameter block (<ES:BX)",76:"terminate with return code (<AL)",77:"get return code (AL>)",78:"find first matching file (<DS:DX) with attributes (<CX)",79:"find next matching file",80:"set current PSP (<BX)",81:"get current PSP (BX>)",82:"get system variables (ES:BX>)",83:"translate BPB (<DS:SI) to DPB (ES:BP>)",84:"get verify flag (AL>)",85:"create child PSP at segment (<DX)",86:"rename file (<DS:DX) to name (<ES:DI)",
|
73:"free memory segment (<ES)",74:"resize memory segment (<ES) to (<BX) paragraphs",75:"load program (<DS:DX) using parameter block (<ES:BX)",76:"terminate with return code (<AL)",77:"get return code (AL>)",78:"find first matching file (<DS:DX) with attributes (<CX)",79:"find next matching file",80:"set current PSP (<BX)",81:"get current PSP (BX>)",82:"get system variables (ES:BX>)",83:"translate BPB (<DS:SI) to DPB (ES:BP>)",84:"get verify flag (AL>)",85:"create child PSP at segment (<DX)",86:"rename file (<DS:DX) to name (<ES:DI)",
|
||||||
87:"get/set (AL=0/1) file date (DX>) and time (CX>)",88:"get/set (AL=0/1) memory allocation strategy",89:"get extended error information",90:"create temporary file (<DS:DX) with attributes (<CX)",91:"create file (<DS:DX) with attributes (<CX)",92:"lock/unlock (AL=0/1) file (<BX) region (<CX:DX) length (<SI:DI)"};k=Ak.prototype;
|
87:"get/set (AL=0/1) file date (DX>) and time (CX>)",88:"get/set (AL=0/1) memory allocation strategy",89:"get extended error information",90:"create temporary file (<DS:DX) with attributes (<CX)",91:"create file (<DS:DX) with attributes (<CX)",92:"lock/unlock (AL=0/1) file (<BX) region (<CX:DX) length (<SI:DI)"};k=Ak.prototype;
|
||||||
k.gc=function(a,b,c){this.la=b;this.S=c;this.Ba=a;this.om=C(a,"FDC");this.kk=C(a,"HDC");this.wf=Ik;80186<=this.S.Ha&&(this.wf=Ik.slice(),this.wf[15]=Z,80286<=this.S.Ha&&(this.wf[15]=Hk));Cc(this.S,33,this,this.ln);this.La();if(this.oj){a=Mk(this,this.oj);delete this.oj;for(var d in a)Nk(this,a[d])}};
|
k.jc=function(a,b,c){this.la=b;this.S=c;this.Ba=a;this.mm=C(a,"FDC");this.nk=C(a,"HDC");this.wf=Ik;80186<=this.S.Ea&&(this.wf=Ik.slice(),this.wf[15]=Z,80286<=this.S.Ea&&(this.wf[15]=Hk));Cc(this.S,33,this,this.ln);this.Ma();if(this.qj){a=Mk(this,this.qj);delete this.qj;for(var d in a)Nk(this,a[d])}};
|
||||||
k.pb=function(a,b,c,d){var e=this;switch(c){case "debugInput":return this.Hf=this.sa[c]=d,d.onkeypress=function(a){if(13==a.keyCode){var b=d.value;d.value="";var c=Mk(e,b,!0);for(b in c)Nk(e,c[b]);a.preventDefault&&a.preventDefault()}},!0;case "debugEnter":return this.sa[c]=d,va(d,function(){if(e.Hf){var a=e.Hf.value;e.Hf.value="";var b=Mk(e,a,!0);for(a in b)Nk(e,b[a]);return!0}return!1}),!0;case "step":return this.sa[c]=d,va(d,function(a){var b=!1;Ra(e,!0)||(Qa(e,!0),b=e.of(a?1:0),Qa(e,!1));return b}),
|
k.qb=function(a,b,c,d){var e=this;switch(c){case "debugInput":return this.Hf=this.sa[c]=d,d.onkeypress=function(a){if(13==a.keyCode){var b=d.value;d.value="";var c=Mk(e,b,!0);for(b in c)Nk(e,c[b]);a.preventDefault&&a.preventDefault()}},!0;case "debugEnter":return this.sa[c]=d,va(d,function(){if(e.Hf){var a=e.Hf.value;e.Hf.value="";var b=Mk(e,a,!0);for(a in b)Nk(e,b[a]);return!0}return!1}),!0;case "step":return this.sa[c]=d,va(d,function(a){var b=!1;Ra(e,!0)||(Qa(e,!0),b=e.of(a?1:0),Qa(e,!1));return b}),
|
||||||
!0}return!1};k.Gd=function(){this.Hf&&this.Hf.focus()};function Fh(a,b,c){var d=0;c=Mk(a,c);for(var e in a.Za)b[e]=a.Za[e].Ma,0<=c.indexOf(a.Za[e].Na)&&(d|=a.Za[e].Ma,z(a,a.Za[e].Na+" messages enabled"));void 0===a.Zb&&(a.Zb=0);a.Zb|=d}function Gh(a,b,c){for(var d in a.Za)if(b==a.Za[d].Ma){a.Za[d].hk=c;break}}function M(a,b){return(a.Zb&b)===b}
|
!0}return!1};k.Jd=function(){this.Hf&&this.Hf.focus()};function Eh(a,b,c){var d=0;c=Mk(a,c);for(var e in a.$a)b[e]=a.$a[e].Na,0<=c.indexOf(a.$a[e].Oa)&&(d|=a.$a[e].Na,z(a,a.$a[e].Oa+" messages enabled"));void 0===a.bc&&(a.bc=0);a.bc|=d}function Fh(a,b,c){for(var d in a.$a)if(b==a.$a[d].Na){a.$a[d].kk=c;break}}function M(a,b){return(a.bc&b)===b}
|
||||||
k.ca=function(a,b,c,d,e,f,g){f||(f=0);f|=this.Za.Aj.Ma;if(null==d||(this.Zb&f)==f)f=null,null!=d&&(f=this.S.qa.na,d-=this.S.qa.Ia),this.message(a.Wg+"."+(null!=c?"outPort":"inPort")+"(0x"+q(b)+","+(e?e:"unknown")+(null!=c?",0x"+p(c):"")+")"+(null!=g?": 0x"+p(g):"")+(null!=d?" at "+ca(d,f):""))};k.message=function(a){z(this,a);this.S&&(this.Zb&this.Za.Yl.Ma&&this.S.sb(),a=this.S,a.hf=0,a.Oc-=a.A,a.A=0,a.Kg())};
|
k.ca=function(a,b,c,d,e,f,g){f||(f=0);f|=this.$a.Cj.Na;if(null==d||(this.bc&f)==f)f=null,null!=d&&(f=this.S.qa.na,d-=this.S.qa.Ia),this.message(a.Wg+"."+(null!=c?"outPort":"inPort")+"(0x"+q(b)+","+(e?e:"unknown")+(null!=c?",0x"+p(c):"")+")"+(null!=g?": 0x"+p(g):"")+(null!=d?" at "+ca(d,f):""))};k.message=function(a){z(this,a);this.S&&(this.bc&this.$a.Zl.Na&&this.S.ub(),a=this.S,a.hf=0,a.Rc-=a.A,a.A=0,a.Kg())};
|
||||||
k.ln=function(a){var b=this.S.G>>8;if(M(this,this.Xl)){var c=Lk[b],c=c?": "+c.replace(/\((<|>)/g,"("):"";this.message("INT 0x21: AH="+p(b)+" at "+ca(a-this.S.qa.Ia,this.S.qa.na)+c)}return!0};k.hn=function(){z(this,"Type ? for list of debugger commands")};function Ck(a){var b;if(1<a.Jb.length){if(!a.Md||!a.Md.length){a.Md=Array(1E4);for(b=0;b<a.Md.length;b++)a.Md[b]=[0,null,0];a.bf=0}if(!a.Vc||!a.Vc.length)for(a.Vc=Array(256),b=0;b<a.Vc.length;b++)a.Vc[b]=[b,0]}else a.bf=0,a.Md=[],a.Vc=[]}
|
k.ln=function(a){var b=this.S.G>>8;if(M(this,this.Yl)){var c=Lk[b],c=c?": "+c.replace(/\((<|>)/g,"("):"";this.message("INT 0x21: AH="+p(b)+" at "+ca(a-this.S.qa.Ia,this.S.qa.na)+c)}return!0};k.hn=function(){z(this,"Type ? for list of debugger commands")};function Ck(a){var b;if(1<a.Ab.length){if(!a.Pd||!a.Pd.length){a.Pd=Array(1E4);for(b=0;b<a.Pd.length;b++)a.Pd[b]=[0,null,0];a.bf=0}if(!a.Yc||!a.Yc.length)for(a.Yc=Array(256),b=0;b<a.Yc.length;b++)a.Yc[b]=[b,0]}else a.bf=0,a.Pd=[],a.Yc=[]}
|
||||||
k.Ge=function(a){if(!Ok(this))return!1;this.S.Ge(a);return!0};k.of=function(a,b){if(!Ok(this))return!1;this.Pc=0;do{a||1<this.Jb.length&&jd(this,this.S.Aa,!0);try{var c=this.S.of(a);0<c&&(this.Pc+=c,Kb(this.S,c,!0),Gb(this.S,c),this.Gg++)}catch(d){this.Pc=0,Ta(this.S,d.message||d)}}while(this.S.Z&240);Fb(this.S);Eb(this,!b);return 0<this.Pc};k.sb=function(){this.S.sb()};function Eb(a,b){a.rc=[a.S.pa,a.S.qa.na,void 0];b||1==a.oc?Pk(a):Qk(a)}
|
k.Ge=function(a){if(!Ok(this))return!1;this.S.Ge(a);return!0};k.of=function(a,b,c){if(!Ok(this))return!1;this.Sc=0;do{a||1<this.Ab.length&&jd(this,this.S.Aa,!0);try{var d=this.S.of(a);0<d&&(this.Sc+=d,Kb(this.S,d,!0),Gb(this.S,d),this.Gg++)}catch(e){this.Sc=0,Ta(this.S,e.message||e)}}while(this.S.Z&240);!1!==c&&Fb(this.S);Eb(this,!b);return 0<this.Sc};k.ub=function(){this.S.ub()};function Eb(a,b){a.uc=[a.S.pa,a.S.qa.na,void 0];b||1==a.rc?Pk(a):Qk(a)}
|
||||||
function Ok(a){a.S&&Sa(a.S)&&a.S.Eb&&!Ra(a.S)?(a=a.S,a.ad?(z(a,a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}k.Ub=function(a,b){return!b&&(this.reset(!0),z(this,a?"resuming":"powering up"),a&&this.restore&&!this.restore(a))?!1:!0};k.Rb=function(a,b){b&&z(this,a?"suspending":"shutting down");return a&&this.save?this.save():!0};k.reset=function(a){Ck(this);this.Pc=this.Gg=0;this.rc=[this.S.pa,this.S.qa.na,void 0];void 0===this.Fb||a||z(this,"reset");this.Fb=!1;Rk(this);a||Eb(this)};
|
function Ok(a){a.S&&Sa(a.S)&&a.S.Hb&&!Ra(a.S)?(a=a.S,a.ed?(z(a,a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}k.Xb=function(a,b){return!b&&(this.reset(!0),z(this,a?"resuming":"powering up"),a&&this.restore&&!this.restore(a))?!1:!0};k.Ub=function(a,b){b&&z(this,a?"suspending":"shutting down");return a&&this.save?this.save():!0};k.reset=function(a){Ck(this);this.Sc=this.Gg=0;this.uc=[this.S.pa,this.S.qa.na,void 0];void 0===this.Ib||a||z(this,"reset");this.Ib=!1;Rk(this);a||Eb(this)};
|
||||||
k.save=function(){var a=new I(this);a.set(0,this.rc);a.set(1,this.ke);a.set(2,[this.lh,this.Ve,this.Zb]);return a.data()};k.restore=function(a){var b=0;void 0!==a[2]&&(this.rc=a[b++],this.ke=a[b++],this.lh=a[b][0],this.Ve=a[b][1],this.Zb||(this.Zb=a[b][2]));return!0};k.start=function(a,b){this.oc||z(this,"running");this.Fb=!0;this.tn=a;this.xn=b};
|
k.save=function(){var a=new I(this);a.set(0,this.uc);a.set(1,this.ke);a.set(2,[this.mh,this.Ve,this.bc]);return a.data()};k.restore=function(a){var b=0;void 0!==a[2]&&(this.uc=a[b++],this.ke=a[b++],this.mh=a[b][0],this.Ve=a[b][1],this.bc||(this.bc=a[b][2]));return!0};k.start=function(a,b){this.rc||z(this,"running");this.Ib=!0;this.tn=a;this.xn=b};
|
||||||
k.stop=function(a,b){if(this.Fb){this.Fb=!1;this.Pc=b-this.xn;if(!this.oc){var c="stopped";if(this.Pc)var d=a-this.tn,c=c+(" ("+this.Gg+" ops, "+this.Pc+" cycles, "+d+"ms, "+(0<d?Math.round(1E3*this.Pc/d):0)+"hz)");z(this,c)}Eb(this);this.Gd();Rk(this,this.S.Aa)}};function jd(a,b,c){if(!c&&Sk(a,b,a.Jb))return!0;a.Gg++;c=cb(a.la,b);a.Vc[c][1]++;c=a.Md[a.bf];c[0]=a.S.pa;c[1]=a.S.qa.na;c[2]=b;++a.bf==a.Md.length&&(a.bf=0);return!1}function qb(a,b){return Sk(a,b,a.Kd)?(a.S.sb(!0),!0):!1}
|
k.stop=function(a,b){if(this.Ib){this.Ib=!1;this.Sc=b-this.xn;if(!this.rc){var c="stopped";if(this.Sc){var d=a-this.tn,e=0<d?Math.round(1E3*this.Sc/d):0,c=c+" (";1<this.Ab.length&&(c+=this.Gg+" ops, ");c+=this.Sc+" cycles, "+d+" ms, "+e+" hz)"}z(this,c)}Eb(this);this.Jd();Rk(this,this.S.Aa)}};function jd(a,b,c){if(!c&&Sk(a,b,a.Ab))return!0;a.Gg++;c=cb(a.la,b);a.Yc[c][1]++;c=a.Pd[a.bf];c[0]=a.S.pa;c[1]=a.S.qa.na;c[2]=b;++a.bf==a.Pd.length&&(a.bf=0);return!1}
|
||||||
function tb(a,b){return Sk(a,b,a.Fc)?(a.S.sb(!0),!0):!1}function kb(a,b,c){z(a,"break on input from port "+q(b)+": "+p(c));a.S.sb(!0)}function nb(a,b,c){z(a,"break on output to port "+q(b)+": "+p(c));a.S.sb(!0)}function Tk(a,b){if(b==a.S.qa.na)return a.S.qa;if(b==a.S.Hb.na)return a.S.Hb;if(b==a.S.Ua.na)return a.S.Ua;if(b==a.S.wb.na)return a.S.wb;var c=new Pb(a.S);c.load(b,!0);return c}
|
function sb(a,b){return Sk(a,b,a.Nd)?(a.S.ub(!0),!0):!1}function tb(a,b){return Sk(a,b,a.Ic)?(a.S.ub(!0),!0):!1}function kb(a,b,c){z(a,"break on input from port "+q(b)+": "+p(c));a.S.ub(!0)}function nb(a,b,c){z(a,"break on output to port "+q(b)+": "+p(c));a.S.ub(!0)}function Tk(a,b){if(b==a.S.qa.na)return a.S.qa;if(b==a.S.Lb.na)return a.S.Lb;if(b==a.S.Wa.na)return a.S.Wa;if(b==a.S.yb.na)return a.S.yb;var c=new Pb(a.S);c.load(b,!0);return c}
|
||||||
function Uk(a,b,c,d){var e=b[2];null==e&&(a=Tk(a,b[1]),e=c?a.Sb(b[0],d||0,!0):a.Kc(b[0],d||0,!0));16711680==(e&16711680)&&(e&=1048575);return e}k.nb=function(a,b){var c=255,d=Uk(this,a,!1,0);0<=d&&(c=cb(this.la,d),void 0!==b&&Vk(a,b));return c};k.Ga=function(a,b){var c=65535,d=Uk(this,a,!1,1);0<=d&&(c=db(this.la,d),void 0!==b&&Vk(a,b));return c};k.Tc=function(a,b,c){var d=Uk(this,a,!0,0);0<=d&&(eb(this.la,d,b),void 0!==c&&Vk(a,c),Fb(this.S))};
|
function Uk(a,b,c,d){var e=b[2];null==e&&(a=Tk(a,b[1]),e=c?a.Vb(b[0],d||0,!0):a.Nc(b[0],d||0,!0));16711680==(e&16711680)&&(e&=1048575);return e}k.ob=function(a,b){var c=255,d=Uk(this,a,!1,0);0<=d&&(c=cb(this.la,d),void 0!==b&&Vk(a,b));return c};k.Ha=function(a,b){var c=65535,d=Uk(this,a,!1,1);0<=d&&(c=db(this.la,d),void 0!==b&&Vk(a,b));return c};k.Wc=function(a,b,c){var d=Uk(this,a,!0,0);0<=d&&(fb(this.la,d,b),void 0!==c&&Vk(a,c),Fb(this.S))};
|
||||||
k.Hd=function(a,b,c){var d=Uk(this,a,!0,1);0<=d&&(gb(this.la,d,b),void 0!==c&&Vk(a,c),Fb(this.S))};function $(a){return null==a[1]?"%"+l(a[2]):ca(a[0],a[1])}function Vk(a,b){b=void 0===b?1:b;null!=a[2]&&(a[2]+=b);null!=a[1]&&(a[0]+=b,a[0]!=(a[0]&65535)&&(a[0]&=65535,a[2]=null))}
|
k.Kd=function(a,b,c){var d=Uk(this,a,!0,1);0<=d&&(gb(this.la,d,b),void 0!==c&&Vk(a,c),Fb(this.S))};function $(a){return null==a[1]?"%"+l(a[2]):ca(a[0],a[1])}function Vk(a,b){b=void 0===b?1:b;null!=a[2]&&(a[2]+=b);null!=a[1]&&(a[0]+=b,a[0]!=(a[0]&65535)&&(a[0]&=65535,a[2]=null))}
|
||||||
function Bk(a){var b;a.Jb=["exec"];if(void 0!==a.Kd)for(b=1;b<a.Kd.length;b++){var c=a.la,d=Uk(a,a.Kd[b]);xb(c.ya[d>>c.hb],!1)}a.Kd=["read"];if(void 0!==a.Fc)for(b=1;b<a.Fc.length;b++)c=a.la,d=Uk(a,a.Fc[b]),xb(c.ya[d>>c.hb],!0);a.Fc=["write"]}k.Nd=function(a,b,c){if(!Wk(this,a,b)){b[2]=Uk(this,b);b[3]=c;a.push(b);if(a!=this.Jb){var d=this.la,e=Uk(this,b);d.ya[e>>d.hb].Nd(e&d.Ya,a==this.Fc)}c||z(this,"breakpoint enabled: "+$(b)+" ("+a[0]+")");Ck(this);return!0}return!1};
|
function Bk(a){var b;a.Ab=["exec"];if(void 0!==a.Nd)for(b=1;b<a.Nd.length;b++){var c=a.la,d=Uk(a,a.Nd[b]);xb(c.ya[d>>c.ib],!1)}a.Nd=["read"];if(void 0!==a.Ic)for(b=1;b<a.Ic.length;b++)c=a.la,d=Uk(a,a.Ic[b]),xb(c.ya[d>>c.ib],!0);a.Ic=["write"]}k.Qd=function(a,b,c){if(!Wk(this,a,b)){b[2]=Uk(this,b);b[3]=c;a.push(b);if(a!=this.Ab){var d=this.la,e=Uk(this,b);d.ya[e>>d.ib].Qd(e&d.Za,a==this.Ic)}c||z(this,"breakpoint enabled: "+$(b)+" ("+a[0]+")");Ck(this);return!0}return!1};
|
||||||
function Wk(a,b,c,d){var e=!1;c=Uk(a,c);for(var f=1;f<b.length;f++){var g=b[f];if(c==Uk(a,g)){e=!0;if(d){b.splice(f,1);b!=a.Jb&&(d=a.la,xb(d.ya[c>>d.hb],b==a.Fc));g[3]||z(a,"breakpoint cleared: "+$(g)+" ("+b[0]+")");Ck(a);break}z(a,"breakpoint exists: "+$(g)+" ("+b[0]+")");break}}return e}function Xk(a,b){for(var c=1;c<b.length;c++)z(a,"breakpoint enabled: "+$(b[c])+" ("+b[0]+")");return b.length-1}
|
function Wk(a,b,c,d){var e=!1;c=Uk(a,c);for(var f=1;f<b.length;f++){var g=b[f];if(c==Uk(a,g)){e=!0;if(d){b.splice(f,1);b!=a.Ab&&(d=a.la,xb(d.ya[c>>d.ib],b==a.Ic));g[3]||z(a,"breakpoint cleared: "+$(g)+" ("+b[0]+")");Ck(a);break}z(a,"breakpoint exists: "+$(g)+" ("+b[0]+")");break}}return e}function Xk(a,b){for(var c=1;c<b.length;c++)z(a,"breakpoint enabled: "+$(b[c])+" ("+b[0]+")");return b.length-1}
|
||||||
function yb(a,b,c,d){if(void 0===d)yb(a,b,c,a.Kd),yb(a,b,c,a.Fc);else for(var e=1;e<d.length;e++){var f=Uk(a,d[e]);if(f>=b&&f<b+c){var g=a.la;g.ya[f>>g.hb].Nd(f&g.Ya,d==a.Fc)}}}function Rk(a,b){if(void 0!==b)Sk(a,b,a.Jb,!0),a.oc=0;else for(var c=1;c<a.Jb.length;c++){var d=a.Jb[c];if(d[3]){if(!Wk(a,a.Jb,d,!0))break;c=0}}}
|
function yb(a,b,c,d){if(void 0===d)yb(a,b,c,a.Nd),yb(a,b,c,a.Ic);else for(var e=1;e<d.length;e++){var f=Uk(a,d[e]);if(f>=b&&f<b+c){var g=a.la;g.ya[f>>g.ib].Qd(f&g.Za,d==a.Ic)}}}function Rk(a,b){if(void 0!==b)Sk(a,b,a.Ab,!0),a.rc=0;else for(var c=1;c<a.Ab.length;c++){var d=a.Ab[c];if(d[3]){if(!Wk(a,a.Ab,d,!0))break;c=0}}}
|
||||||
function Sk(a,b,c,d){var e=!1;16711680==(b&16711680)&&(b&=1048575);for(var f=1;f<c.length;f++){var g=c[f];if(b==Uk(a,g)){g[3]?Wk(a,c,g,!0):d||z(a,"breakpoint hit: "+$(g)+" ("+c[0]+")");e=!0;break}}return e}
|
function Sk(a,b,c,d){var e=!1;16711680==(b&16711680)&&(b&=1048575);for(var f=1;f<c.length;f++){var g=c[f];if(b==Uk(a,g)){g[3]?Wk(a,c,g,!0):d||z(a,"breakpoint hit: "+$(g)+" ("+c[0]+")");e=!0;break}}return e}
|
||||||
function Yk(a,b,c,d){var e=[b[0],b[1],b[2]],f=a.nb(b,1),g=a.wf[f],h=g[0],m=-1;204==h&&(h=a.nb(b,1),g=Jk[h]||Z,f|=h<<8,h=g[0]);h>=Ek.length&&(m=a.nb(b,1),g=Kk[h-Ek.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 r="",u=g[f];if(void 0!==u){var t=u&15;if(0!=t&&15!=t){var v=u&240;if(128<=v)if(0>m&&(m=a.nb(b,1)),160<=v)r=m>>3&7,176==(u&240)?r+=16:3<=(u&15)&&(r+=8),r=Fk[r];else{if(128<=v){var r=a,A=u,t=b,D="",v=m>>6,D=m&7;3>v?(A=void 0,v||6!=D?(D=Gk[D],1==v?(A=
|
function Yk(a,b,c,d){var e=[b[0],b[1],b[2]],f=a.ob(b,1),g=a.wf[f],h=g[0],m=-1;204==h&&(h=a.ob(b,1),g=Jk[h]||Z,f|=h<<8,h=g[0]);h>=Ek.length&&(m=a.ob(b,1),g=Kk[h-Ek.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 r="",u=g[f];if(void 0!==u){var t=u&15;if(0!=t&&15!=t){var v=u&240;if(128<=v)if(0>m&&(m=a.ob(b,1)),160<=v)r=m>>3&7,176==(u&240)?r+=16:3<=(u&15)&&(r+=8),r=Fk[r];else{if(128<=v){var r=a,A=u,t=b,D="",v=m>>6,D=m&7;3>v?(A=void 0,v||6!=D?(D=Gk[D],1==v?(A=
|
||||||
r.nb(t,1),A&128?(A=A<<24>>24,D+="-"+p(-A)):D+="+"+p(A)):2==v&&(A=r.Ga(t,2),D+="+"+q(A))):(A=r.Ga(t,2),D=q(A)),D="["+D+"]"):D=Fk[D+(1==(A&15)?0:8)];r=D}}else if(16==v)r="1";else if(0==v){r=a;v=u;t=b;A=" ";switch(v&15){case 1:v&12288&&(A=p(r.nb(t,1)));break;case 2:A=q(r.nb(t,1)<<24>>24);break;case 3:case 4:A=q(r.Ga(t,2));break;case 6:v=r.Ga(t,2);r=r.Ga(t,2);A=$([v,r,void 0]);break;default:A="imm("+q(v)+")"}r=A}else 32==v?r="["+q(a.Ga(b,2))+"]":48==v?(1==t?(r=a.nb(b,1),r=r<<24>>24):r=a.Ga(b,2),r=b[0]+
|
r.ob(t,1),A&128?(A=A<<24>>24,D+="-"+p(-A)):D+="+"+p(A)):2==v&&(A=r.Ha(t,2),D+="+"+q(A))):(A=r.Ha(t,2),D=q(A)),D="["+D+"]"):D=Fk[D+(1==(A&15)?0:8)];r=D}}else if(16==v)r="1";else if(0==v){r=a;v=u;t=b;A=" ";switch(v&15){case 1:v&12288&&(A=p(r.ob(t,1)));break;case 2:A=q(r.ob(t,1)<<24>>24);break;case 3:case 4:A=q(r.Ha(t,2));break;case 6:v=r.Ha(t,2);r=r.Ha(t,2);A=$([v,r,void 0]);break;default:A="imm("+q(v)+")"}r=A}else 32==v?r="["+q(a.Ha(b,2))+"]":48==v?(1==t?(r=a.ob(b,1),r=r<<24>>24):r=a.Ha(b,2),r=b[0]+
|
||||||
r&65535,r=Zk(a,[r,b[1],void 0])[0]||q(r)):96==v?r=Fk[(u&3840)>>8]:112==v&&(r=Fk[((u&3840)>>8)+16]);r.length||(r="type("+q(u)+")");0<h.length&&(h+=",");h+=r}}}m=$(e)+" ";n="";do n+=p(a.nb(e,1));while(e[0]!=b[0]);m+=(n+" ").substr(0,14);m+=(Ek[g[0]]+" ").substr(0,8);h&&(m+=" "+h);c&&(m=(m+" ").substr(0,50),m+=";",m=a.S.We?m+("cycles="+F(a.S).toString()+" cs="+l(a.S.Qf)):m+(c+(null!=d?"="+d.toString():"")));return m}
|
r&65535,r=Zk(a,[r,b[1],void 0])[0]||q(r)):96==v?r=Fk[(u&3840)>>8]:112==v&&(r=Fk[((u&3840)>>8)+16]);r.length||(r="type("+q(u)+")");0<h.length&&(h+=",");h+=r}}}m=$(e)+" ";n="";do n+=p(a.ob(e,1));while(e[0]!=b[0]);m+=(n+" ").substr(0,14);m+=(Ek[g[0]]+" ").substr(0,8);h&&(m+=" "+h);c&&(m=(m+" ").substr(0,50),m+=";",m=a.S.We?m+("cycles="+F(a.S).toString()+" cs="+l(a.S.Qf)):m+(c+(null!=d?"="+d.toString():"")));return m}
|
||||||
function $k(a,b){var c;switch(b){case "V":c=Wc(a.S);break;case "D":c=a.S.wa&1024;break;case "I":c=a.S.wa&512;break;case "T":c=a.S.wa&256;break;case "S":c=Vc(a.S);break;case "Z":c=Uc(a.S);break;case "A":c=Tc(a.S);break;case "P":c=Sc(a.S);break;case "C":c=Rc(a.S);break;default:c=0}return" "+b+(c?"1":"0")}function al(a,b){return a.jg+"="+q(a.na)+(b?"["+l(a.Ia,6)+","+q(a.Cc)+"]":"")}function bl(a,b,c,d){return a+"="+(null!=b?q(b):"")+"["+l(c,6)+","+q(d-c)+"]"}
|
function $k(a,b){var c;switch(b){case "V":c=Wc(a.S);break;case "D":c=a.S.wa&1024;break;case "I":c=a.S.wa&512;break;case "T":c=a.S.wa&256;break;case "S":c=Vc(a.S);break;case "Z":c=Uc(a.S);break;case "A":c=Tc(a.S);break;case "P":c=Sc(a.S);break;case "C":c=Rc(a.S);break;default:c=0}return" "+b+(c?"1":"0")}function al(a,b){return a.jg+"="+q(a.na)+(b?"["+l(a.Ia,6)+","+q(a.Ec)+"]":"")}function bl(a,b,c,d){return a+"="+(null!=b?q(b):"")+"["+l(c,6)+","+q(d-c)+"]"}
|
||||||
function cl(a,b,c){var d=2==c?a.Ej:a.rc;c=d[0];var e=d[1],d=d[2];if(void 0!==b){"%"==b.charAt(0)&&(b=b.substr(1),e=null,d=0);var f,g=b;f=null;if(g.match(/^[a-z_][a-z0-9_]*$/i)){f=[];for(var h=g.toUpperCase(),m=0;m<a.lc.length;m++){var g=a.lc[m][0],n=a.lc[m][2][h];if(void 0!==n){h=n.o;void 0!==h&&(m=n.s,void 0===m&&(m=g>>>4),f[0]=h,f[1]=m,void 0!==n.p&&(f[2]=n.p));break}}}if(f&&f.length)return f;f=b.indexOf(":");0>f?null==d?c=dl(a,b):d=dl(a,b):(e=dl(a,b.substring(0,f)),c=dl(a,b.substring(f+1)))}return[c,
|
function cl(a,b,c){var d=2==c?a.Fj:a.uc;c=d[0];var e=d[1],d=d[2];if(void 0!==b){"%"==b.charAt(0)&&(b=b.substr(1),e=null,d=0);var f,g=b;f=null;if(g.match(/^[a-z_][a-z0-9_]*$/i)){f=[];for(var h=g.toUpperCase(),m=0;m<a.oc.length;m++){var g=a.oc[m][0],n=a.oc[m][2][h];if(void 0!==n){h=n.o;void 0!==h&&(m=n.s,void 0===m&&(m=g>>>4),f[0]=h,f[1]=m,void 0!==n.p&&(f[2]=n.p));break}}}if(f&&f.length)return f;f=b.indexOf(":");0>f?null!=e?c=dl(a,b):d=dl(a,b):(e=dl(a,b.substring(0,f)),c=dl(a,b.substring(f+1)),d=null)}return[c,
|
||||||
e,d]}
|
e,d]}
|
||||||
function dl(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.X;break;case "CS":d=a.S.qa.na;break;case "DS":d=a.S.Hb.na;break;case "ES":d=a.S.Ua.na;break;case "SS":d=a.S.wb.na;break;case "IP":d=a.S.pa;break;default:d=ba(b),void 0===d&&z(a,"invalid "+(c?c:"value")+": "+b)}else z(a,"missing "+(c?c:"value"));return d}
|
function dl(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.X;break;case "CS":d=a.S.qa.na;break;case "DS":d=a.S.Lb.na;break;case "ES":d=a.S.Wa.na;break;case "SS":d=a.S.yb.na;break;case "IP":d=a.S.pa;break;default:d=ba(b),void 0===d&&z(a,"invalid "+(c?c:"value")+": "+b)}else z(a,"missing "+(c?c:"value"));return d}
|
||||||
function Fi(a,b,c,d){function e(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0}var f=[],g=[],h;for(h in d){var m=d[h];"number"==typeof m&&(d[h]=m={o:m});var n=m.o,r=m.s,u=m.a;void 0!==n&&(void 0!==r&&(f[0]=n,f[1]=r,m.p=Uk(a,f)),ka(g,[n,h],e));u&&(m.a=u.replace(/''/g,'"'))}a.lc.push([b,c,d,g])}
|
function Fi(a,b,c,d){function e(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0}var f=[],g=[],h;for(h in d){var m=d[h];"number"==typeof m&&(d[h]=m={o:m});var n=m.o,r=m.s,u=m.a;void 0!==n&&(void 0!==r&&(f[0]=n,f[1]=r,m.p=Uk(a,f)),ka(g,[n,h],e));u&&(m.a=u.replace(/''/g,'"'))}a.oc.push([b,c,d,g])}
|
||||||
function Zk(a,b,c){for(var d=[],e=Uk(a,b),f=0;f<a.lc.length;f++){var g=a.lc[f][0],h=a.lc[f][1];if(e>=g&&e<g+h){b=ja(a.lc[f][3],[b[0]],function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0});0<=b?gl(a,f,b,d):c&&(b=~b,gl(a,f,b-1,d),gl(a,f,b,d));break}}return d}function gl(a,b,c,d){var e={},f=a.lc[b][3],g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.lc[b][2][h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
function Zk(a,b,c){for(var d=[],e=Uk(a,b),f=0;f<a.oc.length;f++){var g=a.oc[f][0],h=a.oc[f][1];if(e>=g&&e<g+h){b=ja(a.oc[f][3],[b[0]],function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0});0<=b?gl(a,f,b,d):c&&(b=~b,gl(a,f,b-1,d),gl(a,f,b,d));break}}return d}function gl(a,b,c,d){var e={},f=a.oc[b][3],g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.oc[b][2][h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
||||||
function hl(a,b){if("?"==b)z(a,"\nfrequency commands:"),z(a,"\tclear\tclear all frequency counts");else{var c,d=0;if(a.Vc)if("clear"==b){for(c=0;c<a.Vc.length;c++)a.Vc[c]=[c,0];z(a,"frequency data cleared");d++}else if(void 0!==b)z(a,"unknown frequency command: "+b),d++;else{var e=a.Vc.slice();e.sort(function(a,b){return b[1]-a[1]});for(c=0;c<e.length;c++){var f=e[c][0],g=e[c][1];g&&(z(a,(Ek[a.wf[f][0]]+" ").substr(0,5)+" ("+p(f)+"): "+g+" times"),d++)}}d||z(a,"no frequency data available")}}
|
function hl(a,b){if("?"==b)z(a,"\nfrequency commands:"),z(a,"\tclear\tclear all frequency counts");else{var c,d=0;if(a.Yc)if("clear"==b){for(c=0;c<a.Yc.length;c++)a.Yc[c]=[c,0];z(a,"frequency data cleared");d++}else if(void 0!==b)z(a,"unknown frequency command: "+b),d++;else{var e=a.Yc.slice();e.sort(function(a,b){return b[1]-a[1]});for(c=0;c<e.length;c++){var f=e[c][0],g=e[c][1];g&&(z(a,(Ek[a.wf[f][0]]+" ").substr(0,5)+" ("+p(f)+"): "+g+" times"),d++)}}d||z(a,"no frequency data available")}}
|
||||||
function il(a,b){if("l"==b[0]&&void 0===b[1]||"?"==b[1])z(a,"\nlist/load commands:"),z(a,"\tl [address] [drive #] [sector #] [# sectors]"),z(a,"\tln [address] lists symbol(s) nearest to address");else{var c=[],d,e=0,f=0,g=!1;if("json"==b[1])g=!0;else if(d="ln"==b[0],c=cl(a,b[1],d?1:2),d){c=Zk(a,c,!0);c.length?(c[0]&&z(a,q(c[1])+": "+c[0]),4<c.length&&c[4]&&z(a,q(c[5])+": "+c[4])):z(a,"no symbols");return}d=dl(a,b[2],"drive #");if(void 0!==d){if(!g){e=dl(a,b[3],"sector #");if(void 0===e)return;f=dl(a,
|
function il(a,b){if("l"==b[0]&&void 0===b[1]||"?"==b[1])z(a,"\nlist/load commands:"),z(a,"\tl [address] [drive #] [sector #] [# sectors]"),z(a,"\tln [address] lists symbol(s) nearest to address");else{var c=[],d,e=0,f=0,g=!1;if("json"==b[1])g=!0;else if(d="ln"==b[0],c=cl(a,b[1],d?1:2),d){c=Zk(a,c,!0);c.length?(c[0]&&z(a,q(c[1])+": "+c[0]),4<c.length&&c[4]&&z(a,q(c[5])+": "+c[4])):z(a,"no symbols");return}d=dl(a,b[2],"drive #");if(void 0!==d){if(!g){e=dl(a,b[3],"sector #");if(void 0===e)return;f=dl(a,
|
||||||
b[4],"# of sectors");void 0===f&&(f=1)}var h=a.om;2<=d&&a.kk&&(d-=2,h=a.kk);if(h){var m=h.Wj(d);if(m)if(m.ua)if(g)z(a,ik(m.ua));else if(h.Ll(m,e,f)){for(var n=0,r=!1,e=$(c);!r&&0<m.Mb--;)(function(a,b){h.Rc(m,function(c){0>c?(z(a,"out of data at address "+$(b)),r=!0):(a.Tc(b,c,1),n++)})})(a,c);z(a,n+" bytes read at "+e)}else z(a,"sector "+e+" request out of range");else z(a,"drive "+d+" not loaded");else z(a,"invalid drive: "+d)}else z(a,"disk controller not present")}}}
|
b[4],"# of sectors");void 0===f&&(f=1)}var h=a.mm;2<=d&&a.nk&&(d-=2,h=a.nk);if(h){var m=h.Zj(d);if(m)if(m.ua)if(g)z(a,ik(m.ua));else if(h.Nl(m,e,f)){for(var n=0,r=!1,e=$(c);!r&&0<m.Pb--;)(function(a,b){h.Uc(m,function(c){0>c?(z(a,"out of data at address "+$(b)),r=!0):(a.Wc(b,c,1),n++)})})(a,c);z(a,n+" bytes read at "+e)}else z(a,"sector "+e+" request out of range");else z(a,"drive "+d+" not loaded");else z(a,"invalid drive: "+d)}else z(a,"disk controller not present")}}}
|
||||||
function Qk(a,b){if(b&&"?"==b[1])z(a,"\nregister commands:"),z(a,"\tr\t\tdisplay all registers"),z(a,"\tr [target=#]\tmodify target register"),z(a,"supported targets:"),z(a,"\tall registers and flags V,D,I,S,Z,A,P,C");else{var c=!0,d;if(void 0!==b&&1<b.length){var e=b[1];if("p"==e)d=void 0!==a.S.Gc;else{var c=!1,f=null,g=e.indexOf("=");if(0<g)f=e.substr(g+1),e=e.substr(0,g);else if(2<b.length)f=b[2];else{z(a,"missing value for "+b[1]);return}g=parseInt(f,16);if(isNaN(g)){z(a,"invalid value: "+f);
|
function Qk(a,b){if(b&&"?"==b[1])z(a,"\nregister commands:"),z(a,"\tr\t\tdisplay all registers"),z(a,"\tr [target=#]\tmodify target register"),z(a,"supported targets:"),z(a,"\tall registers and flags V,D,I,S,Z,A,P,C");else{var c=!0,d;if(void 0!==b&&1<b.length){var e=b[1];if("p"==e)d=void 0!==a.S.Jc;else{var c=!1,f=null,g=e.indexOf("=");if(0<g)f=e.substr(g+1),e=e.substr(0,g);else if(2<b.length)f=b[2];else{z(a,"missing value for "+b[1]);return}g=parseInt(f,16);if(isNaN(g)){z(a,"invalid value: "+f);
|
||||||
return}switch(e.toUpperCase()){case "AL":a.S.G=a.S.G&65280|g&255;break;case "AH":a.S.G=a.S.G&255|g<<8&255;break;case "AX":a.S.G=g&65535;break;case "BL":a.S.B=a.S.B&65280|g&255;break;case "BH":a.S.B=a.S.B&255|g<<8&255;break;case "BX":a.S.B=g&65535;break;case "CL":a.S.I=a.S.I&65280|g&255;break;case "CH":a.S.I=a.S.I&255|g<<8&255;break;case "CX":a.S.I=g&65535;break;case "DL":a.S.J=a.S.J&65280|g&255;break;case "DH":a.S.J=a.S.J&255|g<<8&255;break;case "DX":a.S.J=g&65535;break;case "SP":a.S.X=g&65535;break;
|
return}switch(e.toUpperCase()){case "AL":a.S.G=a.S.G&65280|g&255;break;case "AH":a.S.G=a.S.G&255|g<<8&255;break;case "AX":a.S.G=g&65535;break;case "BL":a.S.B=a.S.B&65280|g&255;break;case "BH":a.S.B=a.S.B&255|g<<8&255;break;case "BX":a.S.B=g&65535;break;case "CL":a.S.I=a.S.I&65280|g&255;break;case "CH":a.S.I=a.S.I&255|g<<8&255;break;case "CX":a.S.I=g&65535;break;case "DL":a.S.J=a.S.J&65280|g&255;break;case "DH":a.S.J=a.S.J&255|g<<8&255;break;case "DX":a.S.J=g&65535;break;case "SP":a.S.X=g&65535;break;
|
||||||
case "BP":a.S.H=g&65535;break;case "SI":a.S.F=g&65535;break;case "DI":a.S.D=g&65535;break;case "DS":Lc(a.S,g);break;case "ES":Qc(a.S,g);break;case "SS":Pc(a.S,g);break;case "CS":c=!0;Kc(a.S,g);a.rc=[a.S.pa,a.S.qa.na,void 0];break;case "IP":c=!0;J(a.S,g);a.rc=[a.S.pa,a.S.qa.na,void 0];break;case "C":g?bd(a.S):Xc(a.S);break;case "P":g?(e=a.S,Sc(e)||(e.ia^=1)):(e=a.S,Sc(e)&&(e.ia^=1));break;case "A":g?cd(a.S):Yc(a.S);break;case "Z":g?dd(a.S):Zc(a.S);break;case "S":g?ed(a.S):$c(a.S);break;case "I":g?
|
case "BP":a.S.H=g&65535;break;case "SI":a.S.F=g&65535;break;case "DI":a.S.D=g&65535;break;case "DS":Oc(a.S,g);break;case "ES":Qc(a.S,g);break;case "SS":Pc(a.S,g);break;case "CS":c=!0;Kc(a.S,g);a.uc=[a.S.pa,a.S.qa.na,void 0];break;case "IP":c=!0;J(a.S,g);a.uc=[a.S.pa,a.S.qa.na,void 0];break;case "C":g?bd(a.S):Xc(a.S);break;case "P":g?(e=a.S,Sc(e)||(e.ia^=1)):(e=a.S,Sc(e)&&(e.ia^=1));break;case "A":g?cd(a.S):Yc(a.S);break;case "Z":g?dd(a.S):Zc(a.S);break;case "S":g?ed(a.S):$c(a.S);break;case "I":g?
|
||||||
(e=a.S,e.wa|=512):(e=a.S,e.wa&=-513);break;case "D":g?(e=a.S,e.wa|=1024):(e=a.S,e.wa&=-1025);break;case "V":g?fd(a.S):ad(a.S);break;default:z(a,"unknown register: "+e);return}Fb(a.S);z(a,"updated registers:")}}e=d;void 0===e&&(e=!!(a.S.Sc&1));d="AX="+q(a.S.G)+" BX="+q(a.S.B)+" CX="+q(a.S.I)+" DX="+q(a.S.J)+" SP="+q(a.S.X)+" BP="+q(a.S.H)+" SI="+q(a.S.F)+" DI="+q(a.S.D)+"\n";d+=al(a.S.Hb,e)+" "+al(a.S.Ua,e)+" "+al(a.S.wb,e);d=d+(e?"\n":" ")+(al(a.S.qa,e)+" IP="+q(a.S.pa)+$k(a,"V")+$k(a,"D")+$k(a,"I")+
|
(e=a.S,e.wa|=512):(e=a.S,e.wa&=-513);break;case "D":g?(e=a.S,e.wa|=1024):(e=a.S,e.wa&=-1025);break;case "V":g?fd(a.S):ad(a.S);break;default:z(a,"unknown register: "+e);return}Fb(a.S);z(a,"updated registers:")}}e=d;void 0===e&&(e=!!(a.S.Vc&1));d="AX="+q(a.S.G)+" BX="+q(a.S.B)+" CX="+q(a.S.I)+" DX="+q(a.S.J)+" SP="+q(a.S.X)+" BP="+q(a.S.H)+" SI="+q(a.S.F)+" DI="+q(a.S.D)+"\n";d+=al(a.S.Lb,e)+" "+al(a.S.Wa,e)+" "+al(a.S.yb,e);d=d+(e?"\n":" ")+(al(a.S.qa,e)+" IP="+q(a.S.pa)+$k(a,"V")+$k(a,"D")+$k(a,"I")+
|
||||||
$k(a,"T")+$k(a,"S")+$k(a,"Z")+$k(a,"A")+$k(a,"P")+$k(a,"C"));e&&(e=a.la,d+=" MS="+q(a.S.Sc)+"\n"+bl("LD",a.S.Fd.na,a.S.Fd.Ia,a.S.Fd.Cc)+" "+bl("GD",null,a.S.Gc,a.S.Re)+" "+bl("ID",null,a.S.Wc,a.S.ne)+" TR="+q(a.S.mg.na)+" A20="+(e.oe==e.Ab?"ON":"OFF"));z(a,d);c&&(a.rc=[a.S.pa,a.S.qa.na,void 0],Pk(a,$(a.rc)))}}function jl(a,b,c){var d="tr"==b;b=null!=c?parseInt(c,10):1;var e=1==b?0:1;ua(b,function(){return Qa(a,!0)&&a.of(e,d)},function(){Qa(a,!1)})}
|
$k(a,"T")+$k(a,"S")+$k(a,"Z")+$k(a,"A")+$k(a,"P")+$k(a,"C"));e&&(e=a.la,d+=" MS="+q(a.S.Vc)+"\n"+bl("LD",a.S.Id.na,a.S.Id.Ia,a.S.Id.Ec)+" "+bl("GD",null,a.S.Jc,a.S.Re)+" "+bl("ID",null,a.S.Zc,a.S.ne)+" TR="+q(a.S.mg.na)+" A20="+(e.oe==e.Db?"ON":"OFF"));z(a,"\n"+d);c&&(a.uc=[a.S.pa,a.S.qa.na,void 0],Pk(a,$(a.uc)))}}function jl(a,b,c){var d="tr"==b;b=null!=c?parseInt(c,10):1;var e=1==b?0:1;ua(b,function(){return Qa(a,!0)&&a.of(e,d,!1)},function(){Fb(a.S);Qa(a,!1)})}
|
||||||
function Pk(a,b,c,d){b=cl(a,b,1);if(null!=b[0]){void 0===d&&(d=1);var e=[65535,b[1],a.la.oe];if(void 0!==c){e=cl(a,c,1);if(null==e[0]||e[0]<b[0])return;if(256<e[0]-b[0]){z(a,"range too large");return}e[0]++;d=-1}for(c=b[0]!=a.rc[0];d--&&(null!=b[1]?b[0]<e[0]:b[2]<e[2]);){var f=a.nb(b),g=Ra(a,!1)||a.oc?a.Pc:null;if(38==f||46==f||54==f||62==f||240==f||242==f||243==f)g=null,d||d++;var f=null!=g?"cycles":null,h=Zk(a,b);if(h[0]){var m=h[0]+":";c=!1;h[2]&&(m+=" "+h[2]);z(a,m)}c&&z(a);h[3]&&(f=h[3],g=null);
|
function Pk(a,b,c,d){b=cl(a,b,1);if(null!=b[0]){void 0===d&&(d=1);var e=[65535,b[1],a.la.oe];if(void 0!==c){e=cl(a,c,1);if(null==e[0]||e[0]<b[0])return;if(256<e[0]-b[0]){z(a,"range too large");return}e[0]++;d=-1}for(c=b[0]!=a.uc[0];d--&&(null!=b[1]?b[0]<e[0]:b[2]<e[2]);){var f=a.ob(b),g=Ra(a,!1)||a.rc?a.Sc:null;if(38==f||46==f||54==f||62==f||240==f||242==f||243==f)g=null,d||d++;var f=null!=g?"cycles":null,h=Zk(a,b);if(h[0]){var m=h[0]+":";c=!1;h[2]&&(m+=" "+h[2]);z(a,m)}c&&z(a);h[3]&&(f=h[3],g=null);
|
||||||
c=Yk(a,b,f,g);z(a,c);a.rc=b;c=!1}}}function Mk(a,b,c){c&&(b?a.lh=b:b=a.lh);a=b?b.split(0<=b.indexOf("|")?"|":";"):[""];for(var d in a)a[d]=ha(a[d]);return a}
|
c=Yk(a,b,f,g);z(a,c);a.uc=b;c=!1}}}function Mk(a,b,c){c&&(b?a.mh=b:b=a.mh);a=b?b.split(0<=b.indexOf("|")?"|":";"):[""];for(var d in a)a[d]=ha(a[d]);return a}
|
||||||
function Nk(a,b){!b.length&&a.Ve&&(z(a,"ended assemble @"+$(a.ke)),a.rc=a.ke,a.Ve=!1);b=b.toLowerCase();if(Sa(a)&&!Ra(a,!0)&&0<b.length){if(a.Ve)b="a "+$(a.ke)+" "+b;else{var c,d,e;switch(b){case "reset":a.Ba&&a.Ba.reset();return;default:for(d=b.charAt(0),e=1;e<b.length;e++){c=b.charAt(e);if(" "==c)break;if("r"==d||"a">c||"z"<c){b=b.substring(0,e)+" "+b.substring(e);break}}}}c=b.split(" ");switch(c[0].charAt(0)){case "a":var f=cl(a,c[1],1);if(null!=f[0])if(a.ke=f,void 0===c[2])z(a,"begin assemble @"+
|
function Nk(a,b){!b.length&&a.Ve&&(z(a,"ended assemble @"+$(a.ke)),a.uc=a.ke,a.Ve=!1);b=b.toLowerCase();if(Sa(a)&&!Ra(a,!0)&&0<b.length){if(a.Ve)b="a "+$(a.ke)+" "+b;else{var c,d,e;switch(b){case "reset":a.Ba&&a.Ba.reset();return;default:for(d=b.charAt(0),e=1;e<b.length;e++){c=b.charAt(e);if(" "==c)break;if("r"==d||"a">c||"z"<c){b=b.substring(0,e)+" "+b.substring(e);break}}}}c=b.split(" ");switch(c[0].charAt(0)){case "a":var f=cl(a,c[1],1);if(null!=f[0])if(a.ke=f,void 0===c[2])z(a,"begin assemble @"+
|
||||||
$(f)),a.Ve=!0,Fb(a.S);else if(z(a,"not supported yet"),c=[],c.length){for(var g=0;g<c.length;g++)a.Tc(f,c[g],1);z(a,Yk(a,a.ke))}break;case "b":a:if(f=c[1],(g=c[0].charAt(1))&&"?"!=g)if("l"==g)f=0+Xk(a,a.Jb),f+=Xk(a,a.Kd),(f+=Xk(a,a.Fc))||z(a,"no breakpoints");else if(void 0===f)z(a,"missing breakpoint address");else{c=[];if("*"!=f&&(c=cl(a,f,1),null==c[0]))break a;f=null==c[0]?f:q(c[0]);"c"==g?null==c[0]?(Bk(a),z(a,"all breakpoints cleared")):Wk(a,a.Jb,c,!0)||Wk(a,a.Kd,c,!0)||Wk(a,a.Fc,c,!0)||z(a,
|
$(f)),a.Ve=!0,Fb(a.S);else if(z(a,"not supported yet"),c=[],c.length){for(var g=0;g<c.length;g++)a.Wc(f,c[g],1);z(a,Yk(a,a.ke))}break;case "b":a:if(f=c[1],(g=c[0].charAt(1))&&"?"!=g)if("l"==g)f=0+Xk(a,a.Ab),f+=Xk(a,a.Nd),(f+=Xk(a,a.Ic))||z(a,"no breakpoints");else if(void 0===f)z(a,"missing breakpoint address");else{c=[];if("*"!=f&&(c=cl(a,f,1),null==c[0]))break a;f=null==c[0]?f:q(c[0]);"c"==g?null==c[0]?(Bk(a),z(a,"all breakpoints cleared")):Wk(a,a.Ab,c,!0)||Wk(a,a.Nd,c,!0)||Wk(a,a.Ic,c,!0)||z(a,
|
||||||
"breakpoint missing: "+$(c)):"i"==g?(g=a.la,c=c[0],void 0===c?(g.Mf=!g.Mf,c=g.Mf):(void 0===g.ld[c]&&(g.ld[c]=[null,null,!1]),g.ld[c][2]=!g.ld[c][2],c=g.ld[c][2]),z(a,"breakpoint "+(c?"enabled":"cleared")+": port "+f+" (input)")):"o"==g?(g=a.la,c=c[0],void 0===c?(g.Nf=!g.Nf,c=g.Nf):(void 0===g.md[c]&&(g.md[c]=[null,null,!1]),g.md[c][2]=!g.md[c][2],c=g.md[c][2]),z(a,"breakpoint "+(c?"enabled":"cleared")+": port "+f+" (output)")):null!=c[0]&&("p"==g?a.Nd(a.Jb,c):"r"==g?a.Nd(a.Kd,c):"w"==g?a.Nd(a.Fc,
|
"breakpoint missing: "+$(c)):"i"==g?(g=a.la,c=c[0],void 0===c?(g.Mf=!g.Mf,c=g.Mf):(void 0===g.od[c]&&(g.od[c]=[null,null,!1]),g.od[c][2]=!g.od[c][2],c=g.od[c][2]),z(a,"breakpoint "+(c?"enabled":"cleared")+": port "+f+" (input)")):"o"==g?(g=a.la,c=c[0],void 0===c?(g.Nf=!g.Nf,c=g.Nf):(void 0===g.pd[c]&&(g.pd[c]=[null,null,!1]),g.pd[c][2]=!g.pd[c][2],c=g.pd[c][2]),z(a,"breakpoint "+(c?"enabled":"cleared")+": port "+f+" (output)")):null!=c[0]&&("p"==g?a.Qd(a.Ab,c):"r"==g?a.Qd(a.Nd,c):"w"==g?a.Qd(a.Ic,
|
||||||
c):z(a,"unknown breakpoint command: "+g))}else z(a,"\nbreakpoint commands:"),z(a,"\tbi [p]\ttoggle break on input port [p]"),z(a,"\tbo [p]\ttoggle break on output port [p]"),z(a,"\tbp [a]\tset exec breakpoint at addr [a]"),z(a,"\tbr [a]\tset read breakpoint at addr [a]"),z(a,"\tbw [a]\tset write breakpoint at addr [a]"),z(a,"\tbc [a]\tclear breakpoint at addr [a]"),z(a,"\tbl\tlist all breakpoints");break;case "c":Ca&&(Ca.value="");break;case "d":a:{var g=c[0],h=c[1],m=c[2],n;if("?"==h){f="symbols";
|
c):z(a,"unknown breakpoint command: "+g))}else z(a,"\nbreakpoint commands:"),z(a,"\tbi [p]\ttoggle break on input port [p]"),z(a,"\tbo [p]\ttoggle break on output port [p]"),z(a,"\tbp [a]\tset exec breakpoint at addr [a]"),z(a,"\tbr [a]\tset read breakpoint at addr [a]"),z(a,"\tbw [a]\tset write breakpoint at addr [a]"),z(a,"\tbc [a]\tclear breakpoint at addr [a]"),z(a,"\tbl\tlist all breakpoints");break;case "c":Ca&&(Ca.value="");break;case "d":a:{var g=c[0],h=c[1],m=c[2],n;if("?"==h){f="symbols";
|
||||||
for(n in a.Za)void 0!==a.Za[n].hk&&(f.length&&(f+=","),f+=a.Za[n].Na);f+=",state";z(a,"\ndump commands:");z(a,"\tdb [a] [#] dump bytes at address a");z(a,"\tdw [a] [#] dump words at address a");z(a,"\tds [s] dump descriptor for selector s");f.length&&z(a,"dumps are also available for: "+f)}else if("state"==h)z(a,kl(a.Ba,!0));else if("symbols"==h)for(c=0;c<a.lc.length;c++)for(f in g=a.lc[c][0],h=a.lc[c][2],h)"."!=f.charAt(0)&&(m=h[f],n=m.o,void 0!==n&&(m=m.s,void 0===m&&(m=g>>>4),(d=h[f].l)&&
|
for(n in a.$a)void 0!==a.$a[n].kk&&(f.length&&(f+=","),f+=a.$a[n].Oa);f+=",state";z(a,"\ndump commands:");z(a,"\tdb [a] [#] dump bytes at address a");z(a,"\tdw [a] [#] dump words at address a");z(a,"\tds [s] dump descriptor for selector s");f.length&&z(a,"dumps are also available for: "+f)}else if("state"==h)z(a,kl(a.Ba,!0));else if("symbols"==h)for(c=0;c<a.oc.length;c++)for(f in g=a.oc[c][0],h=a.oc[c][2],h)"."!=f.charAt(0)&&(m=h[f],n=m.o,void 0!==n&&(m=m.s,void 0===m&&(m=g>>>4),(d=h[f].l)&&
|
||||||
(f=d),z(a,ca(n,m)+" "+f)));else{for(n in a.Za)if(h==a.Za[n].Na){a.Za[n].hk(m);break a}f=cl(a,h,2);if(null!=f[0])if("ds"==g)if(c=Tk(a,f[0]),null!=c.na){f="selector="+q(f[0])+" limit="+q(c.Cc)+" base="+l(c.Ia);if(c.Sa){f+=" access="+q(c.Sa);if(c.Sa&4096)c.Sa&2048?(f=f+"code:"+(c.Sa&512?"readable,":"execonly,"),f+=c.Sa&1024?"conforming,":"nonconforming,"):(f+="data:",f+=c.Sa&512?"writeable,":"readonly,",f+=c.Sa&1024?"expand down,":"expand up,"),f+=c.Sa&256?"accessed":"not accessed";else switch(f+="type:",
|
(f=d),z(a,ca(n,m)+" "+f)));else{for(n in a.$a)if(h==a.$a[n].Oa){a.$a[n].kk(m);break a}f=cl(a,h,2);if(null!=f[0])if("ds"==g)if(c=Tk(a,f[0]),null!=c.na){f="selector="+q(f[0])+" limit="+q(c.Ec)+" base="+l(c.Ia);if(c.Ua){f+=" access="+q(c.Ua);if(c.Ua&4096)c.Ua&2048?(f=f+"code:"+(c.Ua&512?"readable,":"execonly,"),f+=c.Ua&1024?"conforming,":"nonconforming,"):(f+="data:",f+=c.Ua&512?"writeable,":"readonly,",f+=c.Ua&1024?"expand down,":"expand up,"),f+=c.Ua&256?"accessed":"not accessed";else switch(f+="type:",
|
||||||
c.Sa&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.Sa>>13&24576);f+=c.Sa&32768?",present":",not present"}z(a,f)}else z(a,"invalid selector: "+q(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;m<c;m++){e=d="";for(var h=$(f),r=0,u=0;16>u;u++){var t=a.nb(f,1);"dw"==g?u&1&&(d+=
|
c.Ua&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.Ua>>13&24576);f+=c.Ua&32768?",present":",not present"}z(a,f)}else z(a,"invalid selector: "+q(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;m<c;m++){e=d="";for(var h=$(f),r=0,u=0;16>u;u++){var t=a.ob(f,1);"dw"==g?u&1&&(d+=
|
||||||
q(r|t<<8)+(7==u?" - ":" ")):d+=p(t)+(7==u?"-":" ");e+=32<=t&&128>t?String.fromCharCode(t):".";r=t}n&&(n+="\n");n+=h+" "+d+" "+e}n&&z(a,n);a.Ej=f}}}break;case "e":f=c[1];if(void 0===f)z(a,"missing address");else if(f=cl(a,f,2),null!=f[0])for(g=2;g<c.length;g++)h=parseInt(c[g],16),z(a,"setting "+$(f)+" to "+p(h)),a.Tc(f,h,1);break;case "f":hl(a,c[1]);break;case "g":a:{f=c[1];if(void 0!==f){f=cl(a,f,1);if(null==f[0])break a;a.Nd(a.Jb,f,!0)}a.Ge(!0)||z(a,'cpu not available, "g" command ignored')}break;
|
q(r|t<<8)+(7==u?" - ":" ")):d+=p(t)+(7==u?"-":" ");e+=32<=t&&128>t?String.fromCharCode(t):".";r=t}n&&(n+="\n");n+=h+" "+d+" "+e}n&&z(a,n);a.Fj=f}}}break;case "e":f=c[1];if(void 0===f)z(a,"missing address");else if(f=cl(a,f,2),null!=f[0])for(g=2;g<c.length;g++)h=parseInt(c[g],16),z(a,"setting "+$(f)+" to "+p(h)),a.Wc(f,h,1);break;case "f":hl(a,c[1]);break;case "g":a:{f=c[1];if(void 0!==f){f=cl(a,f,1);if(null==f[0])break a;a.Qd(a.Ab,f,!0)}a.Ge(!0)||z(a,'cpu not available, "g" command ignored')}break;
|
||||||
case "h":m=c[1];if(a.Fb&&void 0===m)a.sb();else{f="";c=10;g=a.bf;h=a.Md;if(void 0!==h)for(n=void 0===m?a.yl:parseInt(m,10),isNaN(n)?n=c:f="more ",n>h.length&&(z(a,"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&&z(a,n+" instructions earlier:");c&&g!=a.bf;){m=h[g];if(null==m[1])break;m=[m[0],m[1],m[2]];z(a,Yk(a,m,"history",-n));++g==h.length&&(g=0);a.yl=--n;c--}10==c&&(z(a,"no "+f+"history available"),a.yl=void 0)}break;case "i":(f=
|
case "h":m=c[1];if(a.Ib&&void 0===m)a.ub();else{f="";c=10;g=a.bf;h=a.Pd;if(void 0!==h)for(n=void 0===m?a.Al:parseInt(m,10),isNaN(n)?n=c:f="more ",n>h.length&&(z(a,"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&&z(a,n+" instructions earlier:");c&&g!=a.bf;){m=h[g];if(null==m[1])break;m=[m[0],m[1],m[2]];z(a,Yk(a,m,"history",-n));++g==h.length&&(g=0);a.Al=--n;c--}10==c&&(z(a,"no "+f+"history available"),a.Al=void 0)}break;case "i":(f=
|
||||||
c[1])&&"?"!=f?(f=dl(a,f),void 0!==f&&(c=jb(a.la,f),z(a,q(f)+": "+p(c)))):(z(a,"\ninput commands:"),z(a,"\ti [p]\tread port [p]"),z(a,"warning: port accesses can affect hardware state"));break;case "l":il(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 a.Za)if(h==a.Za[g].Na){n=a.Za[g].Ma;f=!!(a.Zb&n);break}if(!n){z(a,"unknown message category: "+h);break a}}n&&("on"==c[2]?
|
c[1])&&"?"!=f?(f=dl(a,f),void 0!==f&&(c=jb(a.la,f),z(a,q(f)+": "+p(c)))):(z(a,"\ninput commands:"),z(a,"\ti [p]\tread port [p]"),z(a,"warning: port accesses can affect hardware state"));break;case "l":il(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 a.$a)if(h==a.$a[g].Oa){n=a.$a[g].Na;f=!!(a.bc&n);break}if(!n){z(a,"unknown message category: "+h);break a}}n&&("on"==c[2]?
|
||||||
(a.Zb|=n,f=!0):"off"==c[2]&&(a.Zb&=~n,f=!1))}c=0;n="";for(g in a.Za)if(!h||h==a.Za[g].Na)if(m=!!(a.Zb&a.Za[g].Ma),null===f||f==m)n&&(n+=","),++c%10||(n+="\n\t"),n+=a.Za[g].Na;void 0===h&&z(a,"\nmessage commands:\n\tm [category] [on|off]\tturn categories on/off");z(a,(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=dl(a,f,"port #"),c=dl(a,c),void 0!==f&&void 0!==c&&mb(a.la,f,c)):(z(a,"\noutput commands:"),z(a,"\to [p] [d]\twrite data [d] to port [p]"),
|
(a.bc|=n,f=!0):"off"==c[2]&&(a.bc&=~n,f=!1))}c=0;n="";for(g in a.$a)if(!h||h==a.$a[g].Oa)if(m=!!(a.bc&a.$a[g].Na),null===f||f==m)n&&(n+=","),++c%10||(n+="\n\t"),n+=a.$a[g].Oa;void 0===h&&z(a,"\nmessage commands:\n\tm [category] [on|off]\tturn categories on/off");z(a,(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=dl(a,f,"port #"),c=dl(a,c),void 0!==f&&void 0!==c&&mb(a.la,f,c)):(z(a,"\noutput commands:"),z(a,"\to [p] [d]\twrite data [d] to port [p]"),
|
||||||
z(a,"warning: port accesses can affect hardware state"));break;case "p":case "pr":f="pr"==c[0]?1:0;c=1+f;if(a.oc)z(a,"step in progress");else{h=!1;n=[a.S.pa,a.S.qa.na,void 0];do switch(g=!1,a.nb(n)){case 38:case 46:case 54:case 62:case 240:Vk(n,1);g=!0;break;case 204:case 206:a.oc=c;Vk(n,1);break;case 205:case 224:case 225:case 226:a.oc=c;Vk(n,2);break;case 232:a.oc=c;Vk(n,3);break;case 154:a.oc=c;Vk(n,5);break;case 255:a.oc=0<=Yk(a,n).indexOf("CALL")?c:0;break;case 243:case 242:Vk(n,1);h=g=!0;break;
|
z(a,"warning: port accesses can affect hardware state"));break;case "p":case "pr":f="pr"==c[0]?1:0;c=1+f;if(a.rc)z(a,"step in progress");else{h=!1;n=[a.S.pa,a.S.qa.na,void 0];do switch(g=!1,a.ob(n)){case 38:case 46:case 54:case 62:case 240:Vk(n,1);g=!0;break;case 204:case 206:a.rc=c;Vk(n,1);break;case 205:case 224:case 225:case 226:a.rc=c;Vk(n,2);break;case 232:a.rc=c;Vk(n,3);break;case 154:a.rc=c;Vk(n,5);break;case 255:a.rc=0<=Yk(a,n).indexOf("CALL")?c:0;break;case 243:case 242:Vk(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.oc=c,Vk(n,1))}while(g);a.oc?(a.Nd(a.Jb,n,!0),a.Ge()||(a.S.Gd(),a.oc=0)):jl(a,f?"tr":"t")}break;case "r":Qk(a,c);break;case "t":case "tr":jl(a,c[0],c[1]);break;case "u":Pk(a,c[1],c[2],8);break;case "x":a:if(void 0===c[1]||"?"==c[1])z(a,"\nexecution options:"),z(a,"\tcs int #\tset checksum cycle interval to #"),z(a,"\tcs start #\tset checksum cycle start count to #"),z(a,"\tcs stop #\tset checksum cycle stop count to #"),
|
case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:h&&(a.rc=c,Vk(n,1))}while(g);a.rc?(a.Qd(a.Ab,n,!0),a.Ge()||(a.S.Jd(),a.rc=0)):jl(a,f?"tr":"t")}break;case "r":Qk(a,c);break;case "t":case "tr":jl(a,c[0],c[1]);break;case "u":Pk(a,c[1],c[2],8);break;case "x":a:if(void 0===c[1]||"?"==c[1])z(a,"\nexecution options:"),z(a,"\tcs int #\tset checksum cycle interval to #"),z(a,"\tcs start #\tset checksum cycle start count to #"),z(a,"\tcs stop #\tset checksum cycle stop count to #"),
|
||||||
z(a,"\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.ef=m;break;case "start":a.S.Sf=m;break;case "stop":a.S.gf=m;break;default:z(a,"unknown cs option");break a}void 0!==m&&Cb(a.S);z(a,"checksums "+(a.S.We?"enabled":"disabled"));break;case "sp":void 0!==c[2]&&Jb(a.S,parseInt(c[2],10));z(a,"target speed: "+(a.S.cf.toFixed(2)+"Mhz")+" ("+a.S.Ad+"x)");break;default:z(a,"unknown option: "+c[1])}break;case "?":f="commands:";
|
z(a,"\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.ef=m;break;case "start":a.S.Sf=m;break;case "stop":a.S.gf=m;break;default:z(a,"unknown cs option");break a}void 0!==m&&Cb(a.S);z(a,"checksums "+(a.S.We?"enabled":"disabled"));break;case "sp":void 0!==c[2]&&Jb(a.S,parseInt(c[2],10));z(a,"target speed: "+(a.S.cf.toFixed(2)+"Mhz")+" ("+a.S.Dd+"x)");break;default:z(a,"unknown option: "+c[1])}break;case "?":f="commands:";
|
||||||
for(h in Dk)f+="\n"+h+" ".substr(0,7-h.length)+Dk[h];1<a.Jb.length||(f+="\nnote: frequency/history disabled if no exec breakpoints");z(a,f);break;default:z(a,"unknown command: "+b)}}}za(function(){for(var a=y(window.document,"pcjs","debugger"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ak(d);Pa(d,c)}});function I(a,b,c){this.id=a.id;this.key=ll(a,b,c);this.aa=a.aa;ml(this,a.so)}function ll(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
for(h in Dk)f+="\n"+h+" ".substr(0,7-h.length)+Dk[h];1<a.Ab.length||(f+="\nnote: frequency/history disabled if no exec breakpoints");z(a,f);break;default:z(a,"unknown command: "+b)}}}za(function(){for(var a=y(window.document,"pcjs","debugger"),b=0;b<a.length;b++){var c=a[b],d=x(c),d=new Ak(d);Pa(d,c)}});function I(a,b,c){this.id=a.id;this.key=ll(a,b,c);this.aa=a.aa;ml(this,a.to)}function ll(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
I.prototype={set:function(a,b){this[this.id][a]=b},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.ai=!0):this.ai?!0:window.localStorage&&(a=window.localStorage.getItem(this.key))?(this[this.id]=a,this.ai=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){qa(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==
|
I.prototype={set:function(a,b){this[this.id][a]=b},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.bi=!0):this.bi?!0:window.localStorage&&(a=window.localStorage.getItem(this.key))?(this[this.id]=a,this.bi=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){qa(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==
|
||||||
typeof a?a:JSON.stringify(a)},clear:function(a){ml(this);if(window.localStorage)for(var b=0;b<window.localStorage.length;){var c=window.localStorage.key(b++);c&&(a||c.substr(0,this.key.length)==this.key)&&(window.localStorage.removeItem(c),b=0)}},Da:function(a){this.aa&&M(this.aa,this.aa.$l)&&this.aa.message(a)}};function ml(a,b){a[a.id]={};b&&a.set("parms",b);a.ai=!1}
|
typeof a?a:JSON.stringify(a)},clear:function(a){ml(this);if(window.localStorage)for(var b=0;b<window.localStorage.length;){var c=window.localStorage.key(b++);c&&(a||c.substr(0,this.key.length)==this.key)&&(window.localStorage.removeItem(c),b=0)}},Da:function(a){this.aa&&M(this.aa,this.aa.am)&&this.aa.message(a)}};function ml(a,b){a[a.id]={};b&&a.set("parms",b);a.bi=!1}
|
||||||
function nl(a){var b=!0;if(window.localStorage){var c=JSON.stringify(a[a.id]);try{window.localStorage.setItem(a.key,c)}catch(d){qa("Unable to store "+c.length+" bytes in browser local storage"),b=!1}}return b}
|
function nl(a){var b=!0;if(window.localStorage){var c=JSON.stringify(a[a.id]);try{window.localStorage.setItem(a.key,c)}catch(d){qa("Unable to store "+c.length+" bytes in browser local storage"),b=!1}}return b}
|
||||||
function ol(a,b,c){s.call(this,"Computer",a,ol);this.Eb=!1;this.Pf=a.buswidth;this.qc=pl;this.kg=null;this.Tg=!1;this.url=b?b.url:null;this.Co=(Math.random()+0.1).toString(36).substr(2,12);this.Dc=ql(this);if(this.S=Oa("CPU",this.id)){this.aa=Oa("Debugger",this.id);this.la=new Xa({id:this.Xg+".bus",buswidth:this.Pf},this.S,this.aa);b=Ma(this.id);for(var d=0;d<b.length;d++){var e=b[d];e.gc&&e.gc(this,this.la,this.S,this.aa)}b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.nh=d:this.qc=parseInt(d,10));
|
function ol(a,b,c){s.call(this,"Computer",a,ol);this.Hb=!1;this.Pf=a.buswidth;this.tc=pl;this.kg=null;this.Tg=!1;this.url=b?b.url:null;this.Do=(Math.random()+0.1).toString(36).substr(2,12);this.Gc=ql(this);if(this.S=Oa("CPU",this.id)){this.aa=Oa("Debugger",this.id);this.la=new Xa({id:this.Xg+".bus",buswidth:this.Pf},this.S,this.aa);b=Ma(this.id);for(var d=0;d<b.length;d++){var e=b[d];e.jc&&e.jc(this,this.la,this.S,this.aa)}b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.oh=d:this.tc=parseInt(d,10));
|
||||||
var f;if(a=Ea&&Ea.state||(f=!0,a.state))b=this.Kl=a,f||(this.Tg=!0,this.qc=pl),this.qc&&(this.qh=new I(this,"1.15.3"),this.qh.load()?b=null:delete this.qh);!b&&this.qc&&(f=null,this.Dc&&(f=pa()+"/api/v1/user?req=load&user="+this.Dc+"&state="+ll(this,"1.15.3")),b=f)&&(this.Tg=!0);b?oa(b,!0,null,this,this.Dn):this.La();c||rl(this,this.kh)}else qa("Unable to find CPU component")}w(s,ol);var sk=102,pl=0;k=ol.prototype;k.$e=function(){return this.Co};k.Wd=function(){return this.Dc?this.Dc:""};
|
var f;if(a=Ea&&Ea.state||(f=!0,a.state))b=this.Ml=a,f||(this.Tg=!0,this.tc=pl),this.tc&&(this.rh=new I(this,"1.15.3"),this.rh.load()?b=null:delete this.rh);!b&&this.tc&&(f=null,this.Gc&&(f=pa()+"/api/v1/user?req=load&user="+this.Gc+"&state="+ll(this,"1.15.3")),b=f)&&(this.Tg=!0);b?oa(b,!0,null,this,this.Dn):this.Ma();c||rl(this,this.lh)}else qa("Unable to find CPU component")}w(s,ol);var sk=102,pl=0;k=ol.prototype;k.$e=function(){return this.Do};k.Zd=function(){return this.Gc?this.Gc:""};
|
||||||
k.Dn=function(a,b,c){c?(this.nh=null,this.Tg=!1,B(this,"Unable to load machine state from server (error "+c+(b?": "+ha(b):"")+")")):this.kg=b;this.La()};function rl(a,b,c){for(var d=Ma(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Sa(f)){Sa(f,function(){rl(a,b,c)});return}}b.call(a,c)}
|
k.Dn=function(a,b,c){c?(this.oh=null,this.Tg=!1,B(this,"Unable to load machine state from server (error "+c+(b?": "+ha(b):"")+")")):this.kg=b;this.Ma()};function rl(a,b,c){for(var d=Ma(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Sa(f)){Sa(f,function(){rl(a,b,c)});return}}b.call(a,c)}
|
||||||
function sl(a,b){var c=new I(a,"1.15.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(B(a,"Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
function sl(a,b){var c=new I(a,"1.15.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(B(a,"Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||||
k.kh=function(a){void 0===a&&(a=this.kg?1:this.qc);var b=!1,c=!1;this.ek=!1;var d=this.qh||new I(this,"1.15.3");if(-1==a)b=!0;else if(a>pl){if(d.load(this.kg)){this.mf=new I(this,"1.15.3","failsafe");this.mf.load()&&(tl(this,d),a=2);this.mf.set("timestamp",ma());nl(this.mf);var e=this.qc&&!this.Tg;if(1==a||ra("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?(B(this,"Error: "+g),"unable to verify user"==
|
k.lh=function(a){void 0===a&&(a=this.kg?1:this.tc);var b=!1,c=!1;this.hk=!1;var d=this.rh||new I(this,"1.15.3");if(-1==a)b=!0;else if(a>pl){if(d.load(this.kg)){this.mf=new I(this,"1.15.3","failsafe");this.mf.load()&&(tl(this,d),a=2);this.mf.set("timestamp",ma());nl(this.mf);var e=this.tc&&!this.Tg;if(1==a||ra("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?(B(this,"Error: "+g),"unable to verify user"==
|
||||||
g&&(sa(""),this.Dc=null)):z(this,f+": "+g),ml(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&sl(this,c?d:null)}else 2==a&&d.clear()}else sl(this);delete this.kg;delete this.qh}e=Ma(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.S&&(c=ul(this,g,d,b,c));b=[d,a,c];-1!=a?rl(this,this.Bl,b):this.Bl(b)};
|
g&&(sa(""),this.Gc=null)):z(this,f+": "+g),ml(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&sl(this,c?d:null)}else 2==a&&d.clear()}else sl(this);delete this.kg;delete this.rh}e=Ma(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.S&&(c=ul(this,g,d,b,c));b=[d,a,c];-1!=a?rl(this,this.Dl,b):this.Dl(b)};
|
||||||
function ul(a,b,c,d,e){if(!b.Eb){b.Eb=!0;if(b.Ub){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ub(f,d)&&f&&(a.error("Unable to restore state for "+b.type),a.Kl&&!a.kg?(c.clear(),a.qc=pl,window&&window.location.reload()):a.ek=!0,b.Ub(null),e=!1)}if(!d&&b.Vj)for(a=b.Vj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function ul(a,b,c,d,e){if(!b.Hb){b.Hb=!0;if(b.Xb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Xb(f,d)&&f&&(a.error("Unable to restore state for "+b.type),a.Ml&&!a.kg?(c.clear(),a.tc=pl,window&&window.location.reload()):a.hk=!0,b.Xb(null),e=!1)}if(!d&&b.Yj)for(a=b.Yj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
k.Bl=function(a){var b=a[0],c=0>a[1];a=a[2];this.Eb=!0;this.bk||(z(this,"PCjs v1.15.3\nCopyright \u00a9 2012-2014 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.bk=!0);this.S&&ul(this,this.S,b,c,a);this.ek&&(tl(this,b),b.clear());!c&&this.mf&&(this.mf.clear(),delete this.mf)};
|
k.Dl=function(a){var b=a[0],c=0>a[1];a=a[2];this.Hb=!0;this.ek||(z(this,"PCjs v1.15.3\nCopyright \u00a9 2012-2014 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.ek=!0);this.S&&ul(this,this.S,b,c,a);this.hk&&(tl(this,b),b.clear());!c&&this.mf&&(this.mf.clear(),delete this.mf)};
|
||||||
function tl(a,b){if(ra("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.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;oa("http://www.pcjs.org/api/v1/report",!0,e)}}
|
function tl(a,b){if(ra("There may be a problem with PCjs.\nClick OK to send your PCjs machine state to http://www.pcjs.org.")){var c=a.Zd(),d=b.toString(),e={app:"PCjs",ver:"1.15.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;oa("http://www.pcjs.org/api/v1/report",!0,e)}}
|
||||||
function kl(a,b,c){var d,e="none",f=new I(a,"1.15.3"),g=new I(a,"1.15.3","validate"),h=ma();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.15.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.S&&a.S.Rb&&(c&&a.S.sb(),d=a.S.Rb(b,c),"object"===typeof d&&f.set(a.S.id,d),c&&(a.S.Eb=!1,!1===d&&(e=null)));for(var h=Ma(a.id),m=0;m<h.length;m++){var n=h[m];n.Eb&&(n.Rb&&(d=n.Rb(b,c),"object"===typeof d&&f.set(n.id,d)),c&&(n.Eb=!1,!1===d&&
|
function kl(a,b,c){var d,e="none",f=new I(a,"1.15.3"),g=new I(a,"1.15.3","validate"),h=ma();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.15.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.S&&a.S.Ub&&(c&&a.S.ub(),d=a.S.Ub(b,c),"object"===typeof d&&f.set(a.S.id,d),c&&(a.S.Hb=!1,!1===d&&(e=null)));for(var h=Ma(a.id),m=0;m<h.length;m++){var n=h[m];n.Hb&&(n.Ub&&(d=n.Ub(b,c),"object"===typeof d&&f.set(n.id,d)),c&&(n.Hb=!1,!1===d&&
|
||||||
(e=null)))}e&&(c?(h=d=!1,b?(a.Dc&&vl(a,a.Dc,f.toString()),nl(g)&&nl(f)||(e=null,d=h=!0)):a.qc&&(d=!0,h=3==a.qc),d&&f.clear(h)):e=f.toString());c&&(a.Eb=!1);return e}k.reset=function(){this.la&&this.la.reset&&(this.Da("Resetting "+this.la.type,!0),this.la.reset());for(var a=Ma(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.la&&c.reset&&(this.Da("Resetting "+c.type,!0),c.reset())}};
|
(e=null)))}e&&(c?(h=d=!1,b?(a.Gc&&vl(a,a.Gc,f.toString()),nl(g)&&nl(f)||(e=null,d=h=!0)):a.tc&&(d=!0,h=3==a.tc),d&&f.clear(h)):e=f.toString());c&&(a.Hb=!1);return e}k.reset=function(){this.la&&this.la.reset&&(this.Da("Resetting "+this.la.type,!0),this.la.reset());for(var a=Ma(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.la&&c.reset&&(this.Da("Resetting "+c.type,!0),c.reset())}};
|
||||||
k.start=function(a,b){for(var c=Ma(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};k.stop=function(a,b){for(var c=Ma(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
k.start=function(a,b){for(var c=Ma(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};k.stop=function(a,b){for(var c=Ma(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||||
k.pb=function(a,b,c,d){var e=this;switch(c){case "save":return this.sa[c]=d,d.onclick=function(){var a=ql(e,!0);if(a){var b=!(!e.qc||e.nh),c=kl(e,b);b?vl(e,a,c):B(e,"Resume disabled, machine state not saved")}},!0;case "reset":return this.sa[c]=d,d.onclick=function(){Ib(e)},!0}return!1};
|
k.qb=function(a,b,c,d){var e=this;switch(c){case "save":return this.sa[c]=d,d.onclick=function(){var a=ql(e,!0);if(a){var b=!(!e.tc||e.oh),c=kl(e,b);b?vl(e,a,c):B(e,"Resume disabled, machine state not saved")}},!0;case "reset":return this.sa[c]=d,d.onclick=function(){Ib(e)},!0}return!1};
|
||||||
function ql(a,b){var c=a.Dc;if(!c){var d;window&&(d=window.localStorage.getItem("user"));c=d;void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email Jeff@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=wl(a,c))||B(a,"Your user ID has not been approved."))):b&&B(a,"Browser local storage is not available")}return c}
|
function ql(a,b){var c=a.Gc;if(!c){var d;window&&(d=window.localStorage.getItem("user"));c=d;void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email Jeff@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=wl(a,c))||B(a,"Your user ID has not been approved."))):b&&B(a,"Browser local storage is not available")}return c}
|
||||||
function wl(a,b){a.Dc=null;var c=oa(pa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(sa(c.data),a.Dc=c.data)}catch(e){qa(e.message+" ("+d+")")}return a.Dc}
|
function wl(a,b){a.Gc=null;var c=oa(pa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(sa(c.data),a.Gc=c.data)}catch(e){qa(e.message+" ("+d+")")}return a.Gc}
|
||||||
function vl(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=ll(a,"1.15.3");d.data=c;b=oa(pa()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?B(a,"Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,B(a,c),sa(""),a.Dc=null)}}
|
function vl(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=ll(a,"1.15.3");d.data=c;b=oa(pa()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?B(a,"Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,B(a,c),sa(""),a.Gc=null)}}
|
||||||
function Ib(a){if(a.qc&&!a.nh){var b=1==a.qc||!ra("Click OK to reset the PCjs machine state.\n(WARNING: All disk changes will be discarded)");kl(a,b,!0);!b&&a.Kl?window&&window.location.reload():(b||(a.ci=!0),a.kh(pl),a.ci=!1)}else a.reset(),a.S&&Db(a.S)}function C(a,b,c){a=Ma(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}k.Da=function(a,b){this.aa&&(b||M(this.aa,this.aa.Vl))&&this.aa.message(a)};
|
function Ib(a){if(a.tc&&!a.oh){var b=1==a.tc||!ra("Click OK to reset the PCjs machine state.\n(WARNING: All disk changes will be discarded)");kl(a,b,!0);!b&&a.Ml?window&&window.location.reload():(b||(a.di=!0),a.lh(pl),a.di=!1)}else a.reset(),a.S&&Db(a.S)}function C(a,b,c){a=Ma(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}k.Da=function(a,b){this.aa&&(b||M(this.aa,this.aa.Wl))&&this.aa.message(a)};
|
||||||
za(function(){for(var a=y(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=x(c),c=y(c,"pcjs","computer"),e=0;e<c.length;e++){var f=c[e],g=x(f),g=new ol(g,d,!0);Pa(g,f);rl(g,g.kh)}});wa.show.push(function(){for(var a=y(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=x(a[b]);(c=Oa("Computer",c.id))&&c.bk&&!c.Eb&&c.kh(-1)}});
|
za(function(){for(var a=y(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=x(c),c=y(c,"pcjs","computer"),e=0;e<c.length;e++){var f=c[e],g=x(f),g=new ol(g,d,!0);Pa(g,f);rl(g,g.lh)}});wa.show.push(function(){for(var a=y(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=x(a[b]);(c=Oa("Computer",c.id))&&c.ek&&!c.Hb&&c.lh(-1)}});
|
||||||
wa.exit.push(function(){for(var a=y(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=x(a[b]);(c=Oa("Computer",c.id))&&c.Eb&&kl(c,!(!c.qc||c.nh),!0)}});function xl(a,b,c,d){var e=oa(a);if(e[0])throw Error(e[1]);return yl(e[1],a,b,c,d)}
|
wa.exit.push(function(){for(var a=y(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=x(a[b]);(c=Oa("Computer",c.id))&&c.Hb&&kl(c,!(!c.tc||c.oh),!0)}});function xl(a,b,c,d){var e=oa(a);if(e[0])throw Error(e[1]);return yl(e[1],a,b,c,d)}
|
||||||
function yl(a,b,c,d,e){var f=null;if(a){if(e)for(var g=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g;f=g.exec(a);){var h=f[2],m=oa(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 r=n.match(new RegExp("<"+f[1]+"[^>]*>"));if(r){for(var h=r[0],u,t=/( [a-z]+=)(['"])(.*?)\2/g;u=t.exec(m);)h=0>h.indexOf(u[1])?h.replace(">",u[0]+">"):h.replace(new RegExp(u[1]+"(['\"])(.*?)\\1"),u[0]);r[0]!=h&&(n=n.replace(r[0],h))}else throw c="missing <"+f[1]+"> in "+h,
|
function yl(a,b,c,d,e){var f=null;if(a){if(e)for(var g=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g;f=g.exec(a);){var h=f[2],m=oa(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 r=n.match(new RegExp("<"+f[1]+"[^>]*>"));if(r){for(var h=r[0],u,t=/( [a-z]+=)(['"])(.*?)\2/g;u=t.exec(m);)h=0>h.indexOf(u[1])?h.replace(">",u[0]+">"):h.replace(new RegExp(u[1]+"(['\"])(.*?)\\1"),u[0]);r[0]!=h&&(n=n.replace(r[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(/(<machine[^>]*\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(/<!DOCTYPE(.|[\r\n])*\]>\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: "+
|
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(/(<machine[^>]*\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(/<!DOCTYPE(.|[\r\n])*\]>\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<a.length?a.substr(0,255)+"...":a));}return[a,f]}
|
(255<a.length?a.substr(0,255)+"...":a));}return[a,f]}
|
||||||
|
|
|
||||||
|
|
@ -3,89 +3,89 @@ var fa={"&":"&","<":"<",">":">",'"':""","'":"'"};function ga
|
||||||
function p(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");
|
function p(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 t(a){window?window.alert(a):console.log(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}function ma(a){window&&window.localStorage.setItem("user",a)}
|
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 t(a){window?window.alert(a):console.log(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}function ma(a){window&&window.localStorage.setItem("user",a)}
|
||||||
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 u(a){oa.init.push(a)}function ra(a){if(pa)for(var b=0;b<a.length;b++)a[b]()}qa("onload",function(){ra(oa.init)});qa("onpageshow",function(){ra(oa.show)});
|
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 u(a){oa.init.push(a)}function ra(a){if(pa)for(var b=0;b<a.length;b++)a[b]()}qa("onload",function(){ra(oa.init)});qa("onpageshow",function(){ra(oa.show)});
|
||||||
qa(na("Opera")||na("iOS")?"onunload":"onbeforeunload",function(){ra(oa.exit)});function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Qi=b.comment;this.Tm=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Xf=this.id.substr(0,b),this.jh=this.id.substr(b+1)):this.jh=this.id;this[a]=c;this.eh=null;this.Qc=this.rb=this.tc=this.Tg=this.Sf=!1;this.oa={};this.Ea=null;this.Xf&&this.Xf.match(/\d+/);w[w.length]=this}var ta,ua=void 0,va={};
|
qa(na("Opera")||na("iOS")?"onunload":"onbeforeunload",function(){ra(oa.exit)});function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Ti=b.comment;this.Um=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Xf=this.id.substr(0,b),this.kh=this.id.substr(b+1)):this.kh=this.id;this[a]=c;this.fh=null;this.Tc=this.ub=this.wc=this.Ug=this.Sf=!1;this.oa={};this.Fa=null;this.Xf&&this.Xf.match(/\d+/);w[w.length]=this}var ta,ua=void 0,va={};
|
||||||
if(window){ua||(ua=window.location.search.substr(1));for(var wa,xa=/\+/g,ya=/([^&=]+)=?([^&]*)/g;wa=ya.exec(ua);)va[decodeURIComponent(wa[1].replace(xa," "))]=decodeURIComponent(wa[2].replace(xa," "))}function za(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function y(a,b){b.prototype=za(a.prototype)}var w=[];function Aa(){}function Ba(a,b){b||t(a)}
|
if(window){ua||(ua=window.location.search.substr(1));for(var wa,xa=/\+/g,ya=/([^&=]+)=?([^&]*)/g;wa=ya.exec(ua);)va[decodeURIComponent(wa[1].replace(xa," "))]=decodeURIComponent(wa[2].replace(xa," "))}function za(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function x(a,b){b.prototype=za(a.prototype)}var w=[];function Aa(){}function Ba(a,b){b||t(a)}
|
||||||
function Ca(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):void 0);for(b=0;b<w.length;b++){var d=w[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Da(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<w.length;c++)if(w[c].id===a)return w[c]}return null}
|
function Ca(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):void 0);for(b=0;b<w.length;b++){var d=w[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Da(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<w.length;c++)if(w[c].id===a)return w[c]}return null}
|
||||||
function Ea(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):void 0);for(d=0;d<w.length;d++)if(c)c==w[d]&&(c=null);else if(!(a!=w[d].type||b&&w[d].id.indexOf(b)))return w[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){t(c.message+" ("+a+")")}return b}
|
function Ea(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):void 0);for(d=0;d<w.length;d++)if(c)c==w[d]&&(c=null);else if(!(a!=w[d].type||b&&w[d].id.indexOf(b)))return w[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){t(c.message+" ("+a+")")}return b}
|
||||||
function A(a,b){var c,d;d=B(b.parentNode,"pcjs-control");for(c=0;c<d.length;c++){var e,f;f=d[c].childNodes;for(e=0;e<f.length;e++){var l=f[e];if(l.nodeType===window.document.ELEMENT_NODE){var k=l.getAttribute("class");if(k){var m,n;n=k.split(" ");for(m=0;m<n.length;m++)switch(k=n[m],k){case "pcjs-input":case "pcjs-output":(n=z(l))&&n.binding&&a.mb(k,n.type,n.binding,l),n=[]}}}}}}
|
function A(a,b){var c,d;d=B(b.parentNode,"pcjs-control");for(c=0;c<d.length;c++){var e,f;f=d[c].childNodes;for(e=0;e<f.length;e++){var l=f[e];if(l.nodeType===window.document.ELEMENT_NODE){var k=l.getAttribute("class");if(k){var m,n;n=k.split(" ");for(m=0;m<n.length;m++)switch(k=n[m],k){case "pcjs-input":case "pcjs-output":(n=z(l))&&n.binding&&a.pb(k,n.type,n.binding,l),n=[]}}}}}}
|
||||||
function B(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function B(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
v.prototype={toString:function(){return this.name?this.name:this.id||this.type},mb:function(a,b,c,d){switch(c){case "clear":return this.oa[c]||(this.oa[c]=d,d.onclick=function(a){return function(){a.oa.print&&(a.oa.print.value="")}}(this)),!0;case "print":return this.oa[c]||(this.oa[c]=d,d.value="",Aa=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(d),Ba=function(a,b,c){Aa(a,
|
v.prototype={toString:function(){return this.name?this.name:this.id||this.type},pb:function(a,b,c,d){switch(c){case "clear":return this.oa[c]||(this.oa[c]=d,d.onclick=function(a){return function(){a.oa.print&&(a.oa.print.value="")}}(this)),!0;case "print":return this.oa[c]||(this.oa[c]=d,d.value="",Aa=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(d),Ba=function(a,b,c){Aa(a,
|
||||||
"notice",c)},ta=d),!0}return!1},log:function(){},status:function(a){Fa(this,this.jh+": "+a)},error:function(a){t(a)},Ka:function(a){!this.Qc&&(this.Sf=!1!==a)&&(this.name&&this.log("ready"),a=this.eh,this.eh=null,a&&a())},Jb:function(){return this.rb=!0},zb:function(a,b){b&&(this.rb=!1);return!0}};function Ga(a,b){if(a.Tg)return a.tc&&(a.tc=!1),a.Tg=!1;if(a.Qc)return Fa(a,a.toString()+" error"),!1;a.tc=b;return a.tc}function Ha(a,b){b&&(a.Sf?b():a.eh=b);return a.Sf}
|
"notice",c)},ta=d),!0}return!1},log:function(){},status:function(a){Fa(this,this.kh+": "+a)},error:function(a){t(a)},Ka:function(a){!this.Tc&&(this.Sf=!1!==a)&&(this.name&&this.log("ready"),a=this.fh,this.fh=null,a&&a())},Mb:function(){return this.ub=!0},Cb:function(a,b){b&&(this.ub=!1);return!0}};function Ga(a,b){if(a.Ug)return a.wc&&(a.wc=!1),a.Ug=!1;if(a.Tc)return Fa(a,a.toString()+" error"),!1;a.wc=b;return a.wc}function Ha(a,b){b&&(a.Sf?b():a.fh=b);return a.Sf}
|
||||||
function Ia(a,b){a.Qc=!0;C(a,"Fatal error: "+b)}function C(a,b,c){Ba(b,c,a.id)}function Fa(a,b){Aa(b,void 0,a.id)}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);var Ja="undefined"!==typeof window.Hk;function Ka(a){v.call(this,"Panel",a,Ka)}y(v,Ka);Ka.prototype.mb=function(a,b,c,d){return this.Ca&&this.Ca.mb(a,b,c,d)||this.ia&&this.ia.mb(a,b,c,d)||this.Va&&this.Va.mb(a,b,c,d)?!0:v.prototype.mb.call(this,a,b,c,d)};
|
function Ia(a,b){a.Tc=!0;C(a,"Fatal error: "+b)}function C(a,b,c){Ba(b,c,a.id)}function Fa(a,b){Aa(b,void 0,a.id)}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);var Ja="undefined"!==typeof window.Jk;function Ka(a){v.call(this,"Panel",a,Ka)}x(v,Ka);Ka.prototype.pb=function(a,b,c,d){return this.Ca&&this.Ca.pb(a,b,c,d)||this.ja&&this.ja.pb(a,b,c,d)||this.Wa&&this.Wa.pb(a,b,c,d)?!0:v.prototype.pb.call(this,a,b,c,d)};
|
||||||
Ka.prototype.Yb=function(a,b,c,d){this.Ca=a;this.ia=c;this.Ea=d;this.Va=D(a,"Keyboard")};Ka.prototype.Jb=function(a,b){b||La();return!0};Ka.prototype.zb=function(){return!0};function La(){for(var a=!1,b=B(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=Da(e.id);f||(a=!0,f=new Ka(e));A(f,d);a&&f.Ka()}}u(La);
|
Ka.prototype.ac=function(a,b,c,d){this.Ca=a;this.ja=c;this.Fa=d;this.Wa=D(a,"Keyboard")};Ka.prototype.Mb=function(a,b){b||La();return!0};Ka.prototype.Cb=function(){return!0};function La(){for(var a=!1,b=B(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=Da(e.id);f||(a=!0,f=new Ka(e));A(f,d);a&&f.Ka()}}u(La);
|
||||||
function Ma(a,b,c){v.call(this,"Bus",a,Ma);this.ia=b;this.Ea=c;this.Ye=a.buswidth||20;this.Fe=this.ob=(1<<this.Ye)-1;this.yb=20>=this.Ye?12:14;this.dc=1<<this.yb;this.Ni=this.dc>>2;this.Ua=this.dc-1;this.Jf=(this.Fe+this.dc)/this.dc|0;this.Kd=this.Jf-1;this.zf=[];this.Af=[];this.lh();this.Ka()}y(v,Ma);Ma.prototype.lh=function(){this.wa=Array(this.Jf);for(var a=0;a<this.Jf;a++)this.wa[a]=new E(a*this.dc);this.ia.lh(this.wa,this.Fe,this.yb,this.Ua,this.Kd);this.ia.ob=this.ob};
|
function Ma(a,b,c){v.call(this,"Bus",a,Ma);this.ja=b;this.Fa=c;this.Ye=a.buswidth||20;this.Fe=this.rb=(1<<this.Ye)-1;this.Bb=20>=this.Ye?12:14;this.gc=1<<this.Bb;this.Qi=this.gc>>2;this.Va=this.gc-1;this.Jf=(this.Fe+this.gc)/this.gc|0;this.Kd=this.Jf-1;this.zf=[];this.Af=[];this.mh();this.Ka()}x(v,Ma);Ma.prototype.mh=function(){this.wa=Array(this.Jf);for(var a=0;a<this.Jf;a++)this.wa[a]=new E(a*this.gc);this.ja.mh(this.wa,this.Fe,this.Bb,this.Va,this.Kd);this.ja.rb=this.rb};
|
||||||
Ma.prototype.reset=function(){Na(this,!0)};function Oa(a,b,c,d,e){if(!(b&a.Ua||!c||c&a.Ua)){for(var f=b>>a.yb;0<c&&f<a.wa.length;){var l=a.wa[f];if(void 0!==l&&l.size)return Pa(a,1,b,c);b=f*a.dc;a.wa[f++]=new E(b,a.dc,d,e);c-=a.dc}return!0}return Pa(a,2,b,c)}function Na(a,b){if(void 0!==b&&20<a.Ye){var c=a.ob&-1048577|(b?1048576:0);c!=a.ob&&(a.ob=c,a.ia&&(a.ia.ob=c))}}
|
Ma.prototype.reset=function(){Na(this,!0)};function Oa(a,b,c,d,e){if(!(b&a.Va||!c||c&a.Va)){for(var f=b>>a.Bb;0<c&&f<a.wa.length;){var l=a.wa[f];if(void 0!==l&&l.size)return Pa(a,1,b,c);b=f*a.gc;a.wa[f++]=new E(b,a.gc,d,e);c-=a.gc}return!0}return Pa(a,2,b,c)}function Na(a,b){if(void 0!==b&&20<a.Ye){var c=a.rb&-1048577|(b?1048576:0);c!=a.rb&&(a.rb=c,a.ja&&(a.ja.rb=c))}}
|
||||||
Ma.prototype.rg=function(a,b,c){if(!(a&this.Ua||!b||b&this.Ua)){for(var d=a>>this.yb;0<b;){var e=this.wa[d];if(!e.ea)return Pa(this,5,a,b);e.zd(c);b-=this.dc;d++}return!0}return Pa(this,3,a,b)};function Qa(a,b,c){if(!(b&a.Ua||!c||c&a.Ua)){for(var d=b>>a.yb;0<c;)b=d*a.dc,a.wa[d++]=new E(b),c-=a.dc;return!0}return Pa(a,4,b,c)}function Sa(a,b){return a.wa[(b&a.ob)>>a.yb].ni(b&a.Ua)}function Ta(a,b){var c=b&a.Ua,d=(b&a.ob)>>a.yb;return c!=a.Ua?a.wa[d].Xm(c):a.wa[d++].ni(c)|a.wa[d&a.Kd].ni(0)<<8}
|
Ma.prototype.sg=function(a,b,c){if(!(a&this.Va||!b||b&this.Va)){for(var d=a>>this.Bb;0<b;){var e=this.wa[d];if(!e.ea)return Pa(this,5,a,b);e.Ad(c);b-=this.gc;d++}return!0}return Pa(this,3,a,b)};function Ra(a,b,c){if(!(b&a.Va||!c||c&a.Va)){for(var d=b>>a.Bb;0<c;)b=d*a.gc,a.wa[d++]=new E(b),c-=a.gc;return!0}return Pa(a,4,b,c)}function Sa(a,b){return a.wa[(b&a.rb)>>a.Bb].oi(b&a.Va)}function Ta(a,b){var c=b&a.Va,d=(b&a.rb)>>a.Bb;return c!=a.Va?a.wa[d].Ym(c):a.wa[d++].oi(c)|a.wa[d&a.Kd].oi(0)<<8}
|
||||||
function Ua(a,b,c){a.wa[(b&a.ob)>>a.yb].ui(b&a.Ua,c&255)}function Va(a,b,c){var d=b&a.Ua;b=(b&a.ob)>>a.yb;d!=a.Ua?a.wa[b].jn(d,c&65535):(a.wa[b++].ui(d,c&255),a.wa[b&a.Kd].ui(0,c>>8&255))}function Wa(a){for(var b=0,c=[],d=0;d<a.Jf;d++){var e=a.wa[d];if(e.La||e.Vi){c[b++]=d;var f=c,l=b++;a:if(e=e.save()){for(var k=0,m=0,n=[];k<e.length;){for(var q=e[k],s=k+1;s<e.length&&e[s]===q;)s++;n[m++]=s-k;n[m++]=q;k=s}if(n.length<e.length){e=n;break a}}f[l]=e}}c[b]=a.Fe==a.ob;return c}
|
function Ua(a,b,c){a.wa[(b&a.rb)>>a.Bb].wi(b&a.Va,c&255)}function Va(a,b,c){var d=b&a.Va;b=(b&a.rb)>>a.Bb;d!=a.Va?a.wa[b].kn(d,c&65535):(a.wa[b++].wi(d,c&255),a.wa[b&a.Kd].wi(0,c>>8&255))}function Wa(a){for(var b=0,c=[],d=0;d<a.Jf;d++){var e=a.wa[d];if(e.La||e.Yi){c[b++]=d;var f=c,l=b++;a:if(e=e.save()){for(var k=0,m=0,n=[];k<e.length;){for(var q=e[k],s=k+1;s<e.length&&e[s]===q;)s++;n[m++]=s-k;n[m++]=q;k=s}if(n.length<e.length){e=n;break a}}f[l]=e}}c[b]=a.Fe==a.rb;return c}
|
||||||
function Xa(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,l=e+d,k=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=l;n++)void 0!==f.zf[n]?t("Input port "+h(n,4)+" registered by "+f.zf[n][0].id+", ignoring "+k.id):f.zf[n]=[k,m,!1,!1]}}function Ya(a,b,c){var d=255;a=a.zf[b];void 0!==a&&a[1]&&(d=a[1].call(a[0],b,c));return d}
|
function Xa(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,l=e+d,k=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=l;n++)void 0!==f.zf[n]?t("Input port "+h(n,4)+" registered by "+f.zf[n][0].id+", ignoring "+k.id):f.zf[n]=[k,m,!1,!1]}}function Ya(a,b,c){var d=255;a=a.zf[b];void 0!==a&&a[1]&&(d=a[1].call(a[0],b,c));return d}
|
||||||
function Za(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,l=e+d,k=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=l;n++)void 0!==f.Af[n]?t("Output port "+h(n,4)+" registered by "+f.Af[n][0].id+", ignoring "+k.id):f.Af[n]=[k,m,!1,!1]}}function $a(a,b,c,d){a=a.Af[b];void 0!==a&&a[1]&&a[1].call(a[0],b,c,d)}function Pa(a,b,c,d){a.error("Memory block error ("+b+","+h(c)+","+h(d)+")");return!1}
|
function Za(a,b,c,d){void 0===d&&(d=0);for(var e in c){e=parseInt(e,10);var f=a,l=e+d,k=b,m=c[e];if(void 0!==m)for(var n=e+d;n<=l;n++)void 0!==f.Af[n]?t("Output port "+h(n,4)+" registered by "+f.Af[n][0].id+", ignoring "+k.id):f.Af[n]=[k,m,!1,!1]}}function $a(a,b,c,d){a=a.Af[b];void 0!==a&&a[1]&&a[1].call(a[0],b,c,d)}function Pa(a,b,c,d){a.error("Memory block error ("+b+","+h(c)+","+h(d)+")");return!1}
|
||||||
function E(a,b,c,d){this.Oi=b;this.ka=null;this.offset=0;this.Xi=c;this.ea=null;this.La=this.Vi=!1;if(b)if(d)this.ea=d,a=[d.Gd,a-d.Ra],this.ka=a[0],this.offset=a[1],this.zd(d.Ge);else if(Ja)this.buffer=new window.Hk(b),this.Di=new window.un(this.buffer,0,b),this.Ui=new window.on(this.buffer,0,b),this.ka=new window.qn(this.buffer,0,b>>2),this.zd(ab);else{this.ka=Array(b>>2);for(d=0;d<this.ka.length;d++)this.ka[d]=0;this.zd(bb)}else this.zd()}
|
function E(a,b,c,d){this.Ri=b;this.ka=null;this.offset=0;this.$i=c;this.ea=null;this.La=this.Yi=!1;if(b)if(d)this.ea=d,a=[d.Gd,a-d.Sa],this.ka=a[0],this.offset=a[1],this.Ad(d.Ge);else if(Ja)this.buffer=new window.Jk(b),this.Ei=new window.vn(this.buffer,0,b),this.Xi=new window.pn(this.buffer,0,b),this.ka=new window.rn(this.buffer,0,b>>2),this.Ad(ab);else{this.ka=Array(b>>2);for(d=0;d<this.ka.length;d++)this.ka[d]=0;this.Ad(bb)}else this.Ad()}
|
||||||
E.prototype={mg:function(){return 0},ug:function(){},Vm:function(a){return this.Di[a]},Zm:function(a){return this.Ui.getUint16(a,!0)},gn:function(a,b){this.Di[a]=b;this.La=!0},ln:function(a,b){this.Ui.setUint16(a,b,!0);this.La=!0},Um:function(a){return this.ka[a>>2]>>((a&3)<<3)&255},Ym:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ka[b]>>a;return 24>a?c&65535:c&255|(this.ka[b+1]&255)<<8},fn:function(a,b){var c=a>>2,d=(a&3)<<3;this.ka[c]=this.ka[c]&~(255<<d)|b<<d;this.La=!0},kn:function(a,b){var c=
|
E.prototype={ng:function(){return 0},vg:function(){},Wm:function(a){return this.Ei[a]},$m:function(a){return this.Xi.getUint16(a,!0)},hn:function(a,b){this.Ei[a]=b;this.La=!0},mn:function(a,b){this.Xi.setUint16(a,b,!0);this.La=!0},Vm:function(a){return this.ka[a>>2]>>((a&3)<<3)&255},Zm:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ka[b]>>a;return 24>a?c&65535:c&255|(this.ka[b+1]&255)<<8},gn:function(a,b){var c=a>>2,d=(a&3)<<3;this.ka[c]=this.ka[c]&~(255<<d)|b<<d;this.La=!0},ln:function(a,b){var c=
|
||||||
a>>2,d=(a&3)<<3;24>d?this.ka[c]=this.ka[c]&~(65535<<d)|b<<d:(this.ka[c]=this.ka[c]&16777215|b<<24,c++,this.ka[c]=this.ka[c]&4294967040|b>>8);this.La=!0},save:function(){var a,b;if(this.ea)a=null;else if(Ja)for(a=Array(this.Oi>>2),b=0;b<a.length;b++)a[b]=this.ka[b];else a=this.ka;return a},restore:function(a){if(this.ea)return null===a;if(this.Oi==a.length<<2){var b;if(Ja)for(b=0;b<this.ka.length;b++)this.ka[b]=a[b];else this.ka=a;return this.La=!0}return!1},zd:function(a,b){a||(a=[]);void 0===b&&
|
a>>2,d=(a&3)<<3;24>d?this.ka[c]=this.ka[c]&~(65535<<d)|b<<d:(this.ka[c]=this.ka[c]&16777215|b<<24,c++,this.ka[c]=this.ka[c]&4294967040|b>>8);this.La=!0},save:function(){var a,b;if(this.ea)a=null;else if(Ja)for(a=Array(this.Ri>>2),b=0;b<a.length;b++)a[b]=this.ka[b];else a=this.ka;return a},restore:function(a){if(this.ea)return null===a;if(this.Ri==a.length<<2){var b;if(Ja)for(b=0;b<this.ka.length;b++)this.ka[b]=a[b];else this.ka=a;return this.La=!0}return!1},Ad:function(a,b){a||(a=[]);void 0===b&&
|
||||||
(b=!0);var c=a;this.Yc=c[0]?c[0]:this.mg;this.Wm=c[1]?c[1]:this.mg;b&&(this.ni=c[0]?c[0]:this.mg,this.Xm=c[1]?c[1]:this.mg);c=a;this.xc=c[2]&&!this.Xi?c[2]:this.ug;this.hn=c[3]&&!this.Xi?c[3]:this.ug;b&&(this.ui=c[2]?c[2]:this.ug,this.jn=c[3]?c[3]:this.ug)}};var bb=[E.prototype.Um,E.prototype.Ym,E.prototype.fn,E.prototype.kn];if(Ja)var ab=[E.prototype.Vm,E.prototype.Zm,E.prototype.gn,E.prototype.ln];
|
(b=!0);var c=a;this.ad=c[0]?c[0]:this.ng;this.Xm=c[1]?c[1]:this.ng;b&&(this.oi=c[0]?c[0]:this.ng,this.Ym=c[1]?c[1]:this.ng);c=a;this.Ac=c[2]&&!this.$i?c[2]:this.vg;this.jn=c[3]&&!this.$i?c[3]:this.vg;b&&(this.wi=c[2]?c[2]:this.vg,this.kn=c[3]?c[3]:this.vg)}};var bb=[E.prototype.Vm,E.prototype.Zm,E.prototype.gn,E.prototype.ln];if(Ja)var ab=[E.prototype.Wm,E.prototype.$m,E.prototype.hn,E.prototype.mn];
|
||||||
function cb(a,b){v.call(this,"CPU",a,cb);var c=a.multiplier||1;this.Wc=a.cycles||b;this.qd=c;this.$f=Math.round(this.Wc/1E4)/100;this.Xe=this.$f*this.qd;this.hc=this.rb=!1;this.Sg=a.autoStart;c=va.autostart;void 0!==c&&(this.Sg="true"==c?!0:"false"==c?!1:null);this.Rf=!1;this.eg=this.re=0;this.fg=a.csStart;this.$e=a.csInterval;this.af=a.csStop;var d=this;this.gm=function(){db(d)};this.Ka()}y(v,cb);g=cb.prototype;
|
function cb(a,b){v.call(this,"CPU",a,cb);var c=a.multiplier||1;this.Zc=a.cycles||b;this.sd=c;this.$f=Math.round(this.Zc/1E4)/100;this.Xe=this.$f*this.sd;this.kc=this.ub=!1;this.Tg=a.autoStart;c=va.autostart;void 0!==c&&(this.Tg="true"==c?!0:"false"==c?!1:null);this.Rf=!1;this.eg=this.re=0;this.fg=a.csStart;this.$e=a.csInterval;this.af=a.csStop;var d=this;this.gm=function(){fb(d)};this.Ka()}x(v,cb);g=cb.prototype;
|
||||||
g.Yb=function(a,b,c,d){this.la=b;this.Ea=d;this.Ca=a;var e=D(a,"Video");e&&(this.Ue=function(){gb(e)},this.we=function(){e.we()});this.ja=D(a,"ChipSet");this.Ka()};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.Jb=function(a,b){if(!b){if(a&&this.restore){hb(this);if(!this.restore(a))return!1;ib(this)}else this.reset();ta&&t("No debugger detected")}this.rb=!0;!jb(this)&&this.Ea&&this.Ea.zn();this.Ue();this.Te();return!0};
|
g.ac=function(a,b,c,d){this.la=b;this.Fa=d;this.Ca=a;var e=D(a,"Video");e&&(this.Ue=function(){gb(e)},this.we=function(){e.we()});this.ia=D(a,"ChipSet");this.Ka()};g.reset=function(){};g.save=function(){return null};g.restore=function(){return!1};g.Mb=function(a,b){if(!b){if(a&&this.restore){hb(this);if(!this.restore(a))return!1;ib(this)}else this.reset();ta&&t("No debugger detected")}this.ub=!0;!jb(this)&&this.Fa&&this.Fa.An();this.Ue();this.Te();return!0};
|
||||||
g.zb=function(a){this.rb=!1;return a&&this.save?this.save():!0};function jb(a){return!0===a.Sg||null===a.Sg&&void 0===a.oa.run?(db(a),!0):!1}g.we=function(){};g.cj=function(){return 0};function ib(a){void 0===a.fg&&(a.fg=0);void 0===a.$e&&(a.$e=-1);void 0===a.af&&(a.af=-1);a.Rf=0<=a.fg&&0<a.$e;a.Rf&&(a.eg=0,a.re=a.fg-a.Xd)}function F(a,b,c,d){void 0!==a.oa[b]&&(void 0===d&&(d=4),void 0===c&&(Ia(a,"Register "+b+" is invalid"),kb(a)),c=h(c,d),a.oa[b].innerHTML!=c&&(a.oa[b].innerHTML=c))}g.Te=function(){};
|
g.Cb=function(a){this.ub=!1;return a&&this.save?this.save():!0};function jb(a){return!0===a.Tg||null===a.Tg&&void 0===a.oa.run?(fb(a),!0):!1}g.we=function(){};g.fj=function(){return 0};function ib(a){void 0===a.fg&&(a.fg=0);void 0===a.$e&&(a.$e=-1);void 0===a.af&&(a.af=-1);a.Rf=0<=a.fg&&0<a.$e;a.Rf&&(a.eg=0,a.re=a.fg-a.Xd)}function F(a,b,c,d){void 0!==a.oa[b]&&(void 0===d&&(d=4),void 0===c&&(Ia(a,"Register "+b+" is invalid"),kb(a)),c=h(c,d),a.oa[b].innerHTML!=c&&(a.oa[b].innerHTML=c))}g.Te=function(){};
|
||||||
g.Ue=function(){};g.mb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.oa[c]=d;d.onclick=function(){e.hc?kb(e,!0):db(e,!0)};a=!0;break;case "reset":this.oa[c]=d;d.onclick=function(){e.Ca&&lb(e.Ca)};a=!0;break;case "speed":this.oa[c]=d;a=!0;break;case "setSpeed":this.oa[c]=d,d.onclick=function(){mb(e,e.qd<<1,!0)},d.innerHTML=this.Xe.toFixed(2)+"Mhz",a=!0}return a};function nb(a,b,c){a.Xd+=b;c&&(a.Vc=a.A=0)}
|
g.Ue=function(){};g.pb=function(a,b,c,d){var e=this;a=!1;switch(c){case "run":this.oa[c]=d;d.onclick=function(){e.kc?kb(e,!0):fb(e,!0)};a=!0;break;case "reset":this.oa[c]=d;d.onclick=function(){e.Ca&&lb(e.Ca)};a=!0;break;case "speed":this.oa[c]=d;a=!0;break;case "setSpeed":this.oa[c]=d,d.onclick=function(){mb(e,e.sd<<1,!0)},d.innerHTML=this.Xe.toFixed(2)+"Mhz",a=!0}return a};function nb(a,b,c){a.Xd+=b;c&&(a.Yc=a.A=0)}
|
||||||
function ob(a,b){var c=30;60>c&&(c=60);5>c&&(c=5);var d=1;b&&1<a.qd&&a.Cc&&(d=a.Cc/a.$f);a.ij=Math.round(1E3/30);a.$l=Math.floor(a.Wc/c*d);a.sh=Math.floor(a.Wc/30*d);a.mj=Math.floor(a.Wc/60*d);a.lj=Math.floor(a.Wc/5*d);b||(a.df=a.sh,a.cf=a.mj,a.bf=a.lj);a.gi=0}function pb(a,b){var c=a.Xd+a.ud+a.Vc-a.A;b&&1<a.qd&&a.Cc>a.$f&&(c=Math.round(c/a.qd));return c}function hb(a){a.Cc=0;a.cg=1;a.Xd=a.ud=a.Vc=a.A=0;ib(a);mb(a,1)}
|
function ob(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1<a.sd&&a.Fc&&(d=a.Fc/a.$f);a.lj=Math.round(1E3/30);a.$l=Math.floor(a.Zc/c*d);a.th=Math.floor(a.Zc/30*d);a.pj=Math.floor(a.Zc/60*d);a.oj=Math.floor(a.Zc/2*d);b||(a.df=a.th,a.cf=a.pj,a.bf=a.oj);a.hi=0}function pb(a,b){var c=a.Xd+a.vd+a.Yc-a.A;b&&1<a.sd&&a.Fc>a.$f&&(c=Math.round(c/a.sd));return c}function hb(a){a.Fc=0;a.cg=1;a.Xd=a.vd=a.Yc=a.A=0;ib(a);mb(a,1)}
|
||||||
function mb(a,b,c){void 0!==b&&(0.8>a.Cc/a.Xe&&(b=1),a.qd=b,a.Xe=a.$f*a.qd,b=a.Xe.toFixed(2)+"Mhz",a.oa.setSpeed&&(a.oa.setSpeed.innerHTML=b),Fa(a,"target speed: "+b),c&&a.we());nb(a,a.ud);a.ud=0;a.qe=ha();a.Ud=0;ob(a)}
|
function mb(a,b,c){void 0!==b&&(0.8>a.Fc/a.Xe&&(b=1),a.sd=b,a.Xe=a.$f*a.sd,b=a.Xe.toFixed(2)+"Mhz",a.oa.setSpeed&&(a.oa.setSpeed.innerHTML=b),Fa(a,"target speed: "+b),c&&a.we());nb(a,a.vd);a.vd=0;a.qe=ha();a.Ud=0;ob(a)}
|
||||||
function db(a,b){if(Ga(a,!0)){a.hc||(mb(a),a.Ca&&a.Ca.start(a.qe,pb(a)),a.hc=!0,a.ja&&qb(a.ja),a.oa.run&&(a.oa.run.innerHTML="Halt"),b&&a.we());a.gi>=a.Wc&&ob(a,!0);a.ef=0;a.bg=ha();if(a.Ud){var c=a.bg-a.Ud;c>a.ij&&(a.qe+=c,a.qe>a.bg&&(a.qe=a.bg))}try{do{a.Dk(a.Rf?1:Math.round(a.$l/a.cg));var d=a.Vc-a.A;a.ud+=d;a.ef+=d;nb(a,0,!0);var c=a,e=d;if(c.Rf){var f=!1;c.eg=c.eg+c.cj()|0;c.re-=e;0>=c.re&&(c.re+=c.$e,f=!0);0<=c.af&&c.af<=pb(c)&&(c.$e=c.af=-1,ib(c),kb(c),f=!0);f&&Fa(c,pb(c)+" cycles: checksum="+
|
function fb(a,b){if(Ga(a,!0)){a.kc||(mb(a),a.Ca&&a.Ca.start(a.qe,pb(a)),a.kc=!0,a.ia&&qb(a.ia),a.oa.run&&(a.oa.run.innerHTML="Halt"),b&&a.we());a.hi>=a.Zc&&ob(a,!0);a.ef=0;a.bg=ha();if(a.Ud){var c=a.bg-a.Ud;c>a.lj&&(a.qe+=c,a.qe>a.bg&&(a.qe=a.bg))}try{do{a.Fk(a.Rf?1:Math.round(a.$l/a.cg));var d=a.Yc-a.A;a.vd+=d;a.ef+=d;nb(a,0,!0);var c=a,e=d;if(c.Rf){var f=!1;c.eg=c.eg+c.fj()|0;c.re-=e;0>=c.re&&(c.re+=c.$e,f=!0);0<=c.af&&c.af<=pb(c)&&(c.$e=c.af=-1,ib(c),kb(c),f=!0);f&&Fa(c,pb(c)+" cycles: checksum="+
|
||||||
h(c.eg))}a.cf-=d;0>=a.cf&&(a.cf+=a.mj,a.Ue());a.bf-=d;0>=a.bf&&(a.bf+=a.lj,a.Te());a.df-=d;if(0>=a.df){a.df+=a.sh;break}}while(a.hc)}catch(l){kb(a);a.Ue();a.Te();a.Ca&&a.Ca.stop(ha(),pb(a));Ga(a,!1);Ia(a,l.message);return}d=setTimeout;c=a.gm;a.Ud=ha();e=a.ij;a.ef&&(e=Math.round(e*a.ef/a.sh));e-=a.Ud-a.bg;if(f=a.Ud-a.qe)a.Cc=Math.round(a.ud/(10*f))/100,864E5<=f&&(a.Xd=0,a.ja&&sb(a.ja,!0),mb(a));if(0>e||a.Cc<a.Xe)e=0;a.gi+=a.ef;a.Ud+=e;d(c,e)}else a.Ue(),a.Te(),a.Ca&&a.Ca.stop(ha(),pb(a))}
|
h(c.eg))}a.cf-=d;0>=a.cf&&(a.cf+=a.pj,a.Ue());a.bf-=d;0>=a.bf&&(a.bf+=a.oj,a.Te());a.df-=d;if(0>=a.df){a.df+=a.th;break}}while(a.kc)}catch(l){kb(a);a.Ue();a.Te();a.Ca&&a.Ca.stop(ha(),pb(a));Ga(a,!1);Ia(a,l.message);return}d=setTimeout;c=a.gm;a.Ud=ha();e=a.lj;a.ef&&(e=Math.round(e*a.ef/a.th));e-=a.Ud-a.bg;if(f=a.Ud-a.qe)a.Fc=Math.round(a.vd/(10*f))/100,864E5<=f&&(a.Xd=0,a.ia&&sb(a.ia,!0),mb(a));if(0>e||a.Fc<a.Xe)e=0;a.hi+=a.ef;a.Ud+=e;d(c,e)}else a.Ue(),a.Te(),a.Ca&&a.Ca.stop(ha(),pb(a))}
|
||||||
function kb(a,b){a.tc&&(a.Tg=!0);a.Vc-=a.A;a.A=0;nb(a,a.ud);a.ud=0;a.hc&&(a.hc=!1,a.ja&&qb(a.ja),a.oa.run&&(a.oa.run.innerHTML="Run"));a.Wg=b}g.Dk=function(){return 0};
|
function kb(a,b){a.wc&&(a.Ug=!0);a.Yc-=a.A;a.A=0;nb(a,a.vd);a.vd=0;a.kc&&(a.kc=!1,a.ia&&qb(a.ia),a.oa.run&&(a.oa.run.innerHTML="Run"));a.Xg=b}g.Fk=function(){return 0};
|
||||||
var tb=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,
|
var tb=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,
|
||||||
0,0,1,1,0,1,0,0,1];function ub(a,b,c){this.ia=a;this.Ya=this.sa=0;this.Tc=65535;this.kc=this.ac=0;this.og=b;vb(this,c)}function wb(a){this.sa=a;this.Tc=65535;return this.Ya=a<<4}
|
0,0,1,1,0,1,0,0,1];function ub(a,b,c){this.ja=a;this.Za=this.sa=0;this.Wc=65535;this.nc=this.dc=0;this.pg=b;vb(this,c)}function wb(a){this.sa=a;this.Wc=65535;return this.Za=a<<4}
|
||||||
function xb(a){var b,c;a&4?(b=this.ia.ve.Ya,c=this.ia.ve.Tc):(b=this.ia.Jc,c=this.ia.Ee);var d=b+(a&65528);if(d+7<=c){this.zc=yb;this.Fb=zb;this.ia.A-=15;c=G(this.ia,d+0);b=G(this.ia,d+4);var d=G(this.ia,d+2)|(b&255)<<16,e=b&7936;if(e&4096){2048==(e&2560)&&(this.Fb=Ab);if(e&2048||!(e&512))this.Fb=Bb;this.sa=a;this.Tc=c;this.ac=b;this.kc=(b&24576)>>13;return this.Ya=d}if(e&&768>=e)return this.sa=a,this.Tc=c,this.ac=b,this.kc=(b&24576)>>13,this.Ya=d}return-1}function Cb(a){return this.Ya+a}
|
function xb(a){var b,c;a&4?(b=this.ja.ve.Za,c=this.ja.ve.Wc):(b=this.ja.Mc,c=this.ja.Ee);var d=b+(a&65528);if(d+7<=c){this.Dc=yb;this.Ib=zb;this.ja.A-=15;c=G(this.ja,d+0);b=G(this.ja,d+4);var d=G(this.ja,d+2)|(b&255)<<16,e=b&7936;if(e&4096){2048==(e&2560)&&(this.Ib=Ab);if(e&2048||!(e&512))this.Ib=Bb;this.sa=a;this.Wc=c;this.dc=b;this.nc=(b&24576)>>13;return this.Za=d}if(e&&768>=e)return this.sa=a,this.Wc=c,this.dc=b,this.nc=(b&24576)>>13,this.Za=d}return-1}function Cb(a){return this.Za+a}
|
||||||
function Db(a){return this.Ya+a}function yb(a,b,c){return a+b<=this.Tc?this.Ya+a:Ab.call(this,0,0,c)}function Ab(a,b,c){c||Eb.call(this.ia,13,0);return-1}function zb(a,b,c){return a+b<=this.Tc?this.Ya+a:Bb.call(this,0,0,c)}function Bb(a,b,c){c||Eb.call(this.ia,13,0);return-1}ub.prototype.save=function(){return[this.sa,this.Ya,this.Tc,this.ac,this.kc,this.og]};
|
function Db(a){return this.Za+a}function yb(a,b,c){return a+b<=this.Wc?this.Za+a:Ab.call(this,0,0,c)}function Ab(a,b,c){c||Eb.call(this.ja,13,0);return-1}function zb(a,b,c){return a+b<=this.Wc?this.Za+a:Bb.call(this,0,0,c)}function Bb(a,b,c){c||Eb.call(this.ja,13,0);return-1}ub.prototype.save=function(){return[this.sa,this.Za,this.Wc,this.dc,this.nc,this.pg]};
|
||||||
ub.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.sa=a[0],this.Ya=a[1],this.Tc=a[2],this.ac=a[3],this.kc=a[4],this.og=a[5])};function vb(a,b){void 0===b&&(b=!!(a.ia.Zc&1));b?(a.load=xb,a.zc=yb,a.Fb=zb):(a.load=wb,a.zc=Cb,a.Fb=Db)}
|
ub.prototype.restore=function(a){"number"==typeof a?this.load(a):(this.sa=a[0],this.Za=a[1],this.Wc=a[2],this.dc=a[3],this.nc=a[4],this.pg=a[5])};function vb(a,b){void 0===b&&(b=!!(a.ja.bd&1));b?(a.load=xb,a.Dc=yb,a.Ib=zb):(a.load=wb,a.Dc=Cb,a.Ib=Db)}
|
||||||
function Fb(a){this.Fa=a.model||8088;var b=0;switch(this.Fa){default:case 8088:b=4772727;break;case 80286:b=6E6}cb.call(this,a,b);this.zi=61442;this.xf=4;this.se=255;this.hi=4;this.Z=5;this.na=6;this.ba=7;this.ca=8;this.P=9;this.U=11;this.V=12;this.Vd=4;this.pj=60;this.qj=83;this.ub=3;this.Wa=9;this.Hb=16;this.hg=1;this.uj=19;this.wj=28;this.yj=16;this.xj=21;this.vj=37;this.sj=2;this.Ah=9;this.tj=5;this.rj=33;this.Ch=10;this.Bh=8;this.jf=3;this.hf=15;this.Mj=51;this.Nj=1;this.Oj=2;this.Pj=4;this.Lj=
|
function Fb(a){this.Da=a.model||8088;var b=0;switch(this.Da){default:case 8088:b=4772727;break;case 80286:b=6E6}cb.call(this,a,b);this.Bi=61442;this.xf=4;this.se=255;this.ii=4;this.Z=5;this.na=6;this.ba=7;this.ca=8;this.P=9;this.U=11;this.V=12;this.Vd=4;this.rj=60;this.sj=83;this.xb=3;this.Xa=9;this.Kb=16;this.ig=1;this.wj=19;this.yj=28;this.Aj=16;this.zj=21;this.xj=37;this.uj=2;this.Bh=9;this.vj=5;this.tj=33;this.Dh=10;this.Ch=8;this.jf=3;this.hf=15;this.Oj=51;this.Pj=1;this.Qj=2;this.Rj=4;this.Nj=
|
||||||
32;this.Rj=this.Dh=15;this.vb=16;this.wb=4;this.Tj=11;this.Sj=18;this.Qj=24;this.eb=4;this.Uj=2;this.Eh=16;this.Vj=17;this.Jh=18;this.Wj=19;this.Ih=5;this.Kh=6;this.ak=2;this.$j=8;this.Yj=9;this.Mh=this.Lh=this.Xj=this.Zj=10;this.Aj=80;this.Cj=144;this.zj=86;this.Bj=154;this.Ej=101;this.Gj=165;this.Dj=107;this.Fj=171;this.ck=70;this.ek=113;this.bk=76;this.dk=124;this.Ij=80;this.Kj=128;this.Hj=86;this.Jj=134;this.lf=3;this.kf=16;this.Rh=10;this.Qh=8;this.fk=51;this.Ib=8;this.gk=17;this.hk=36;this.Rb=
|
32;this.Tj=this.Eh=15;this.yb=16;this.zb=4;this.Vj=11;this.Uj=18;this.Sj=24;this.fb=4;this.Wj=2;this.Fh=16;this.Xj=17;this.Kh=18;this.Yj=19;this.Jh=5;this.Lh=6;this.ck=2;this.bk=8;this.$j=9;this.Nh=this.Mh=this.Zj=this.ak=10;this.Cj=80;this.Ej=144;this.Bj=86;this.Dj=154;this.Gj=101;this.Ij=165;this.Fj=107;this.Hj=171;this.ek=70;this.gk=113;this.dk=76;this.fk=124;this.Kj=80;this.Mj=128;this.Jj=86;this.Lj=134;this.lf=3;this.kf=16;this.Sh=10;this.Rh=8;this.hk=51;this.Lb=8;this.ik=17;this.jk=36;this.Ub=
|
||||||
11;this.ik=16;this.mf=10;this.kb=2;this.xh=18;this.yh=9-this.kb;this.zh=17-this.kb;this.Fh=12;this.Gh=9-this.kb;this.Hh=13-this.kb;this.Nh=18;this.Oh=9-this.kb;this.Ph=17-this.kb;this.Sh=15;this.Th=9-this.kb;this.Uh=15-this.kb;this.Yh=11;this.Zh=9-this.kb;this.$h=10-this.kb;this.jk=8;this.mk=12;this.kk=18;this.lk=17;this.nk=15;this.Wh=8;this.Vh=20;this.Xh=2;this.ci=3;this.nf=9;this.bi=5;this.ai=11;this.ei=4;this.di=17;this.ok=11;this.Ia=Gb.slice();80186<=this.Fa&&(this.se=31,this.Ia[15]=H,this.Ia[96]=
|
11;this.kk=16;this.mf=10;this.nb=2;this.yh=18;this.zh=9-this.nb;this.Ah=17-this.nb;this.Gh=12;this.Hh=9-this.nb;this.Ih=13-this.nb;this.Oh=18;this.Ph=9-this.nb;this.Qh=17-this.nb;this.Th=15;this.Uh=9-this.nb;this.Vh=15-this.nb;this.Zh=11;this.$h=9-this.nb;this.ai=10-this.nb;this.lk=8;this.ok=12;this.mk=18;this.nk=17;this.pk=15;this.Xh=8;this.Wh=20;this.Yh=2;this.di=3;this.nf=9;this.ci=5;this.bi=11;this.fi=4;this.ei=17;this.qk=11;this.Ia=Gb.slice();80186<=this.Da&&(this.se=31,this.Ia[15]=H,this.Ia[96]=
|
||||||
Hb,this.Ia[97]=Ib,this.Ia[98]=Jb,this.Ia[99]=H,this.Ia[100]=H,this.Ia[101]=H,this.Ia[102]=H,this.Ia[103]=H,this.Ia[104]=Kb,this.Ia[105]=Lb,this.Ia[106]=Mb,this.Ia[107]=Nb,this.Ia[108]=Ob,this.Ia[109]=Pb,this.Ia[110]=Qb,this.Ia[111]=Rb,this.Ia[192]=Sb,this.Ia[193]=Tb,this.Ia[200]=Ub,this.Ia[200]=Vb,this.Ia[241]=Wb,Xb[7]=Yb,Zb[7]=Yb,80286<=this.Fa&&(this.zi=2,this.xf=0,this.Ia[15]=$b,this.Ia[99]=ac,this.Ia[84]=bc,this.P=this.ca=this.ba=this.na=this.Z=this.hi=0,this.V=this.U=1,this.Vd=3,this.pj=14,this.qj=
|
Hb,this.Ia[97]=Ib,this.Ia[98]=Jb,this.Ia[99]=H,this.Ia[100]=H,this.Ia[101]=H,this.Ia[102]=H,this.Ia[103]=H,this.Ia[104]=Kb,this.Ia[105]=Lb,this.Ia[106]=Mb,this.Ia[107]=Nb,this.Ia[108]=Ob,this.Ia[109]=Pb,this.Ia[110]=Qb,this.Ia[111]=Rb,this.Ia[192]=Sb,this.Ia[193]=Tb,this.Ia[200]=Ub,this.Ia[200]=Vb,this.Ia[241]=Wb,Xb[7]=Yb,Zb[7]=Yb,80286<=this.Da&&(this.Bi=2,this.xf=0,this.Ia[15]=$b,this.Ia[99]=ac,this.Ia[84]=bc,this.P=this.ca=this.ba=this.na=this.Z=this.ii=0,this.V=this.U=1,this.Vd=3,this.rj=14,this.sj=
|
||||||
16,this.ub=2,this.Hb=this.Wa=7,this.hg=0,this.uj=7,this.wj=13,this.yj=7,this.xj=11,this.vj=16,this.sj=3,this.Ah=6,this.tj=2,this.rj=13,this.Bh=this.Ch=5,this.jf=2,this.hf=7,this.Mj=23,this.Nj=0,this.Oj=1,this.Pj=3,this.Lj=17,this.Dh=7,this.Rj=11,this.vb=7,this.wb=3,this.Tj=7,this.Sj=11,this.Qj=15,this.eb=2,this.Uj=3,this.Eh=7,this.Wj=this.Jh=this.Vj=8,this.Kh=this.Ih=4,this.ak=2,this.$j=3,this.Yj=5,this.Zj=2,this.Xj=3,this.Lh=5,this.Mh=3,this.Aj=14,this.Cj=22,this.zj=17,this.Bj=25,this.Ej=17,this.Gj=
|
16,this.xb=2,this.Kb=this.Xa=7,this.ig=0,this.wj=7,this.yj=13,this.Aj=7,this.zj=11,this.xj=16,this.uj=3,this.Bh=6,this.vj=2,this.tj=13,this.Ch=this.Dh=5,this.jf=2,this.hf=7,this.Oj=23,this.Pj=0,this.Qj=1,this.Rj=3,this.Nj=17,this.Eh=7,this.Tj=11,this.yb=7,this.zb=3,this.Vj=7,this.Uj=11,this.Sj=15,this.fb=2,this.Wj=3,this.Fh=7,this.Yj=this.Kh=this.Xj=8,this.Lh=this.Jh=4,this.ck=2,this.bk=3,this.$j=5,this.ak=2,this.Zj=3,this.Mh=5,this.Nh=3,this.Cj=14,this.Ej=22,this.Bj=17,this.Dj=25,this.Gj=17,this.Ij=
|
||||||
25,this.Dj=20,this.Fj=28,this.ck=13,this.ek=21,this.bk=16,this.dk=24,this.Ij=13,this.Kj=21,this.Hj=16,this.Jj=24,this.lf=2,this.kf=7,this.Qh=this.Rh=5,this.fk=19,this.gk=this.Ib=5,this.hk=17,this.Rb=3,this.ik=5,this.mf=3,this.kb=0,this.xh=8,this.yh=5,this.zh=9,this.Gh=this.Fh=5,this.Hh=4,this.Oh=this.Nh=5,this.Ph=4,this.Sh=7,this.Th=5,this.Uh=8,this.Yh=3,this.Zh=4,this.$h=3,this.mk=this.jk=11,this.lk=this.kk=15,this.nk=7,this.Wh=5,this.Vh=8,this.Xh=0,this.ci=2,this.nf=6,this.bi=3,this.ai=6,this.ei=
|
25,this.Fj=20,this.Hj=28,this.ek=13,this.gk=21,this.dk=16,this.fk=24,this.Kj=13,this.Mj=21,this.Jj=16,this.Lj=24,this.lf=2,this.kf=7,this.Rh=this.Sh=5,this.hk=19,this.ik=this.Lb=5,this.jk=17,this.Ub=3,this.kk=5,this.mf=3,this.nb=0,this.yh=8,this.zh=5,this.Ah=9,this.Hh=this.Gh=5,this.Ih=4,this.Ph=this.Oh=5,this.Qh=4,this.Th=7,this.Uh=5,this.Vh=8,this.Zh=3,this.$h=4,this.ai=3,this.ok=this.lk=11,this.nk=this.mk=15,this.pk=7,this.Xh=5,this.Wh=8,this.Yh=0,this.di=2,this.nf=6,this.ci=3,this.bi=6,this.fi=
|
||||||
3,this.ok=this.di=5));this.Nk=[];this.Bi=[];this.Hg=0;this.wa=[];this.Fe=this.ob=this.yb=this.Ua=this.Kd=0;this.S=this.Zk;this.T=this.$k;this.N=this.Sl;this.O=this.Tl;this.Q=this.dn;this.R=this.en;cc(this)}y(cb,Fb);g=Fb.prototype;g.lh=function(a,b,c,d,e){this.wa=a;this.Fe=this.ob=b;this.yb=c;this.Ua=d;this.Kd=e};g.reset=function(){this.hc&&kb(this);cc(this);hb(this);this.Qc=!1};
|
3,this.qk=this.ei=5));this.Lk=[];this.Ci=[];this.Ig=0;this.wa=[];this.Fe=this.rb=this.Bb=this.Va=this.Kd=0;this.S=this.Xk;this.T=this.Yk;this.N=this.Sl;this.O=this.Tl;this.Q=this.en;this.R=this.fn;cc(this)}x(cb,Fb);g=Fb.prototype;g.mh=function(a,b,c,d,e){this.wa=a;this.Fe=this.rb=b;this.Bb=c;this.Va=d;this.Kd=e};g.reset=function(){this.kc&&kb(this);cc(this);hb(this);this.Tc=!1};
|
||||||
function cc(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.Zc=65520;a.Kc=0;a.ge=1023;a.gc={ii:0,sa:0,ac:0,Zf:-1};a.Ba=new ub(a,"CS");a.Tb=new ub(a,"DS");a.Kb=new ub(a,"SS");a.$a=new ub(a,"ES");a.Bk=new ub(a,"ZERO");dc(a,0,65535);80286<=a.Fa&&(a.Jc=a.Ee=0,a.ve=new ub(a,"LDT",!0),a.qg=new ub(a,"TSS",!0),a.lb=new ub(a,"VER",!0),dc(a,65520,61440),a.Ba.Ya=16711680);ec(a,0);fc(a);a.Pa=0;a.fb=a.pf=-1;a.Gf=0;a.da=a.za=-1;a.C=a.Tb;a.M=a.Kb;a.Y=a.pa=0}
|
function cc(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.bd=65520;a.Nc=0;a.ge=1023;a.jc={ji:0,sa:0,dc:0,Zf:-1};a.Ba=new ub(a,"CS");a.Wb=new ub(a,"DS");a.Nb=new ub(a,"SS");a.ab=new ub(a,"ES");a.Dk=new ub(a,"ZERO");dc(a,0,65535);80286<=a.Da&&(a.Mc=a.Ee=0,a.ve=new ub(a,"LDT",!0),a.rg=new ub(a,"TSS",!0),a.ob=new ub(a,"VER",!0),dc(a,65520,61440),a.Ba.Za=16711680);ec(a,0);fc(a);a.Qa=0;a.gb=a.pf=-1;a.Gf=0;a.da=a.za=-1;a.C=a.Wb;a.M=a.Nb;a.Y=a.pa=0}
|
||||||
g.cj=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.Ba.sa+this.Tb.sa+this.Kb.sa+this.$a.sa+gc(this)|0};function hc(a,b){var c=a.Bi[b];if(void 0!==c){for(;0<c.length;)c.pop()(--a.Hg);delete a.Bi[b]}}function fc(a,b){void 0===b&&(b=!!(a.Zc&1));ic=b?jc:kc;vb(a.Ba,b);vb(a.Tb,b);vb(a.Kb,b);vb(a.$a,b)}
|
g.fj=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.Ba.sa+this.Wb.sa+this.Nb.sa+this.ab.sa+gc(this)|0};function hc(a,b){var c=a.Ci[b];if(void 0!==c){for(;0<c.length;)c.pop()(--a.Ig);delete a.Ci[b]}}function fc(a,b){void 0===b&&(b=!!(a.bd&1));ic=b?jc:kc;vb(a.Ba,b);vb(a.Wb,b);vb(a.Nb,b);vb(a.ab,b)}
|
||||||
g.save=function(){var a=new I(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.Ba.save(),this.Tb.save(),this.Kb.save(),this.$a.save(),gc(this),null!=this.Jc?[this.Zc,this.Jc,this.Ee,this.Kc,this.ge,this.ve.save(),this.qg.save()]:null]);a.set(2,[this.C.og,this.M.og,this.Y,this.pa,this.Pa,this.da,this.za]);a.set(3,[this.cg,this.Xd,this.qd]);a.set(4,Wa(this.la));return a.data()};
|
g.save=function(){var a=new I(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.Ba.save(),this.Wb.save(),this.Nb.save(),this.ab.save(),gc(this),null!=this.Mc?[this.bd,this.Mc,this.Ee,this.Nc,this.ge,this.ve.save(),this.rg.save()]:null]);a.set(2,[this.C.pg,this.M.pg,this.Y,this.pa,this.Qa,this.da,this.za]);a.set(3,[this.cg,this.Xd,this.sd]);a.set(4,Wa(this.la));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.Ba.restore(b[1]);this.Tb.restore(b[2]);this.Kb.restore(b[3]);this.$a.restore(b[4]);ec(this,b[5]);var c=b[6];c&&c.length&&(this.Zc=c[0],this.Jc=c[1],this.Ee=c[2],this.Kc=c[3],this.ge=c[4],this.ve.restore(c[5]),this.qg.restore(c[6]),fc(this));J(this,b[0]);b=a[2];this.C=lc(this,b[0]);this.M=lc(this,b[1]);this.Y=b[2];this.pa=b[3];this.Pa=b[4];this.da=b[5];this.za=
|
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.Ba.restore(b[1]);this.Wb.restore(b[2]);this.Nb.restore(b[3]);this.ab.restore(b[4]);ec(this,b[5]);var c=b[6];c&&c.length&&(this.bd=c[0],this.Mc=c[1],this.Ee=c[2],this.Nc=c[3],this.ge=c[4],this.ve.restore(c[5]),this.rg.restore(c[6]),fc(this));J(this,b[0]);b=a[2];this.C=lc(this,b[0]);this.M=lc(this,b[1]);this.Y=b[2];this.pa=b[3];this.Qa=b[4];this.da=b[5];this.za=
|
||||||
b[6];b=a[3];this.cg=b[0];this.Xd=b[1];mb(this,b[2]);a:{b=this.la;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.Ni){for(var f=0,l=Array(b.Ni),k=0;k<e.length-1;)for(var m=e[k++],n=e[k++];m--;)l[f++]=n;e=l}f=b.wa[d];if(!f||!f.restore(e)){b.error("Unable to restore memory block "+d);b=!1;break a}}void 0!==a[c]&&Na(b,a[c]);b=!0}return b};
|
b[6];b=a[3];this.cg=b[0];this.Xd=b[1];mb(this,b[2]);a:{b=this.la;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.Qi){for(var f=0,l=Array(b.Qi),k=0;k<e.length-1;)for(var m=e[k++],n=e[k++];m--;)l[f++]=n;e=l}f=b.wa[d];if(!f||!f.restore(e)){b.error("Unable to restore memory block "+d);b=!1;break a}}void 0!==a[c]&&Na(b,a[c]);b=!0}return b};
|
||||||
function lc(a,b){switch(b){case "CS":return a.Ba;case "DS":return a.Tb;case "SS":return a.Kb;case "ES":return a.$a;case "ZERO":return a.Bk;default:return[0,b,0,0,""]}}function mc(a,b){var c;if(a.Zc&1){if(c=a.Kc+(b<<3),c+7<=a.ge){a.gc.ii=G(a,c);a.gc.sa=G(a,c+2);a.gc.ac=G(a,c+4);switch(a.gc.ac&7936){case 1536:a.gc.Zf=-17153;break;case 1792:a.gc.Zf=-16641;break;default:return!1}return!0}}else if(c=a.Kc+(b<<2),c+7<=a.ge)return a.gc.ii=G(a,c),a.gc.sa=G(a,c+2),a.gc.Zf=-769,!0;return!1}
|
function lc(a,b){switch(b){case "CS":return a.Ba;case "DS":return a.Wb;case "SS":return a.Nb;case "ES":return a.ab;case "ZERO":return a.Dk;default:return[0,b,0,0,""]}}function mc(a,b){var c;if(a.bd&1){if(c=a.Nc+(b<<3),c+7<=a.ge){a.jc.ji=G(a,c);a.jc.sa=G(a,c+2);a.jc.dc=G(a,c+4);switch(a.jc.dc&7936){case 1536:a.jc.Zf=-17153;break;case 1792:a.jc.Zf=-16641;break;default:return!1}return!0}}else if(c=a.Nc+(b<<2),c+7<=a.ge)return a.jc.ji=G(a,c),a.jc.sa=G(a,c+2),a.jc.Zf=-769,!0;return!1}
|
||||||
function nc(a,b){a.Aa=a.Ba.load(b)+a.qa;a.Y|=a.xf}function rc(a,b){a.Tb.load(b);a.Y|=a.xf}function sc(a,b){a.Kb.load(b);a.Y|=4}function tc(a,b){a.$a.load(b);a.Y|=a.xf}function J(a,b){a.Aa=a.Ba.Ya+(a.qa=b&65535)}function dc(a,b,c){a.Aa=a.Ba.load(c)+(a.qa=b)}function L(a,b){a.Aa=a.Ba.Ya+(a.qa=a.qa+b&65535)}function uc(a){return a.W&a.$?1:0}function vc(a){return tb[a.fa&255]?4:0}function wc(a){return(a.fa^a.ga)&16?16:0}function xc(a){return a.W&a.$-1?0:64}function yc(a){return a.fa&a.$>>1?128:0}
|
function qc(a,b){a.Aa=a.Ba.load(b)+a.qa;a.Y|=a.xf}function rc(a,b){a.Wb.load(b);a.Y|=a.xf}function sc(a,b){a.Nb.load(b);a.Y|=4}function tc(a,b){a.ab.load(b);a.Y|=a.xf}function J(a,b){a.Aa=a.Ba.Za+(a.qa=b&65535)}function dc(a,b,c){a.Aa=a.Ba.load(c)+(a.qa=b)}function L(a,b){a.Aa=a.Ba.Za+(a.qa=a.qa+b&65535)}function uc(a){return a.W&a.$?1:0}function vc(a){return tb[a.fa&255]?4:0}function wc(a){return(a.fa^a.ga)&16?16:0}function xc(a){return a.W&a.$-1?0:64}function yc(a){return a.fa&a.$>>1?128:0}
|
||||||
function zc(a){return(a.fa^a.ga^a.fa>>1)&a.$>>1?2048:0}function Ac(a){a.W&=~a.$}function Bc(a){a.ga=a.fa&16|a.ga&-17}function Cc(a){a.W|=a.$-1}function Dc(a){a.fa&=~a.$;a.ga=a.fa&32896|a.ga&-32897}function Ec(a){a.W|=a.$}function Fc(a){a.ga=~(a.fa&16)&16|a.ga&-17}function Gc(a){a.W&=~(a.$-1)}function Hc(a){yc(a)||(a.fa^=a.$>>1|a.$>>2,a.ga^=32896)}function Ic(a){a.fa|=a.$;a.ga=a.fa&32896|a.ga&-32897}function gc(a){return a.Da&-2262|uc(a)|vc(a)|wc(a)|xc(a)|yc(a)|zc(a)}
|
function zc(a){return(a.fa^a.ga^a.fa>>1)&a.$>>1?2048:0}function Ac(a){a.W&=~a.$}function Bc(a){a.ga=a.fa&16|a.ga&-17}function Cc(a){a.W|=a.$-1}function Dc(a){a.fa&=~a.$;a.ga=a.fa&32896|a.ga&-32897}function Ec(a){a.W|=a.$}function Fc(a){a.ga=~(a.fa&16)&16|a.ga&-17}function Gc(a){a.W&=~(a.$-1)}function Hc(a){yc(a)||(a.fa^=a.$>>1|a.$>>2,a.ga^=32896)}function Ic(a){a.fa|=a.$;a.ga=a.fa&32896|a.ga&-32897}function gc(a){return a.Ea&-2262|uc(a)|vc(a)|wc(a)|xc(a)|yc(a)|zc(a)}
|
||||||
function ec(a,b){a.$=256;a.W=a.fa=a.ga=0;b&1&&Ec(a);b&4||(a.fa|=1);b&16&&(a.ga|=16);b&64||Cc(a);b&128&&Hc(a);b&2048&&Ic(a);a.Da=a.Da&-1793|b&1792|a.zi;a.Da&256&&(a.Pa|=2,a.Y|=4)}
|
function ec(a,b){a.$=256;a.W=a.fa=a.ga=0;b&1&&Ec(a);b&4||(a.fa|=1);b&16&&(a.ga|=16);b&64||Cc(a);b&128&&Hc(a);b&2048&&Ic(a);a.Ea=a.Ea&-1793|b&1792|a.Bi;a.Ea&256&&(a.Qa|=2,a.Y|=4)}
|
||||||
g.mb=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=cb.prototype.mb.call(this,a,b,c,d)}return e};function Jc(a,b){return a.wa[(b&a.ob)>>a.yb].Yc(b&a.Ua)}
|
g.pb=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=cb.prototype.pb.call(this,a,b,c,d)}return e};function Jc(a,b){return a.wa[(b&a.rb)>>a.Bb].ad(b&a.Va)}
|
||||||
function G(a,b){var c=b&a.Ua,d=(b&a.ob)>>a.yb;a.A-=a.hi;return c!=a.Ua?a.wa[d].Wm(c):a.wa[d++].Yc(c)|a.wa[d&a.Kd].Yc(0)<<8}function Kc(a,b,c){a.wa[(b&a.ob)>>a.yb].xc(b&a.Ua,c&255)}function Lc(a,b,c){var d=b&a.Ua;b=(b&a.ob)>>a.yb;a.A-=a.hi;d!=a.Ua?a.wa[b].hn(d,c&65535):(a.wa[b++].xc(d,c&255),a.wa[b&a.Kd].xc(0,c>>8&255))}g.Zk=function(a,b){this.tf=a;this.da=a.zc(this.of=b,0);return this.Y&1?0:Jc(this,this.da)};g.$k=function(a,b){this.tf=a;this.da=a.zc(this.of=b,1);return this.Y&1?0:G(this,this.da)};
|
function G(a,b){var c=b&a.Va,d=(b&a.rb)>>a.Bb;a.A-=a.ii;return c!=a.Va?a.wa[d].Xm(c):a.wa[d++].ad(c)|a.wa[d&a.Kd].ad(0)<<8}function Kc(a,b,c){a.wa[(b&a.rb)>>a.Bb].Ac(b&a.Va,c&255)}function Lc(a,b,c){var d=b&a.Va;b=(b&a.rb)>>a.Bb;a.A-=a.ii;d!=a.Va?a.wa[b].jn(d,c&65535):(a.wa[b++].Ac(d,c&255),a.wa[b&a.Kd].Ac(0,c>>8&255))}g.Xk=function(a,b){this.tf=a;this.da=a.Dc(this.of=b,0);return this.Y&1?0:Jc(this,this.da)};g.Yk=function(a,b){this.tf=a;this.da=a.Dc(this.of=b,1);return this.Y&1?0:G(this,this.da)};
|
||||||
g.Sl=function(a,b){this.tf=a;this.za=this.da=a.zc(this.of=b,0);return this.Y&1?0:Jc(this,this.da)};g.Tl=function(a,b){this.tf=a;this.za=this.da=a.zc(this.of=b,1);return this.Y&1?0:G(this,this.da)};g.dn=function(a){this.Y&2||Kc(this,this.tf.Fb(this.of,1),a)};g.en=function(a){this.Y&2||Lc(this,this.tf.Fb(this.of,2),a)};g.aa=function(){var a=Jc(this,this.Aa);this.Aa=this.Ba.Ya+(this.qa=this.qa+1&65535);return a};
|
g.Sl=function(a,b){this.tf=a;this.za=this.da=a.Dc(this.of=b,0);return this.Y&1?0:Jc(this,this.da)};g.Tl=function(a,b){this.tf=a;this.za=this.da=a.Dc(this.of=b,1);return this.Y&1?0:G(this,this.da)};g.en=function(a){this.Y&2||Kc(this,this.tf.Ib(this.of,1),a)};g.fn=function(a){this.Y&2||Lc(this,this.tf.Ib(this.of,2),a)};g.aa=function(){var a=Jc(this,this.Aa);this.Aa=this.Ba.Za+(this.qa=this.qa+1&65535);return a};
|
||||||
g.L=function(){var a=Jc(this,this.Aa)<<24>>24;this.Aa=this.Ba.Ya+(this.qa=this.qa+1&65535);return a&65535};g.K=function(){var a=G(this,this.Aa);this.Aa=this.Ba.Ya+(this.qa=this.qa+2&65535);return a};g.ya=function(){var a=this.X;this.X=this.X+2&65535;return G(this,this.Kb.zc(a,1))};function M(a,b){var c=a.X=a.X-2&65535;Lc(a,a.Kb.Fb(c,1),b)}
|
g.L=function(){var a=Jc(this,this.Aa)<<24>>24;this.Aa=this.Ba.Za+(this.qa=this.qa+1&65535);return a&65535};g.K=function(){var a=G(this,this.Aa);this.Aa=this.Ba.Za+(this.qa=this.qa+2&65535);return a};g.ya=function(){var a=this.X;this.X=this.X+2&65535;return G(this,this.Nb.Dc(a,1))};function M(a,b){var c=a.X=a.X-2&65535;Lc(a,a.Nb.Ib(c,1),b)}
|
||||||
g.Te=function(){F(this,"AX",this.G);F(this,"BX",this.B);F(this,"CX",this.I);F(this,"DX",this.J);F(this,"SP",this.X);F(this,"BP",this.H);F(this,"SI",this.F);F(this,"DI",this.D);F(this,"CS",this.Ba.sa);F(this,"DS",this.Tb.sa);F(this,"SS",this.Kb.sa);F(this,"ES",this.$a.sa);F(this,"IP",this.qa);var a=gc(this);F(this,"PS",a);F(this,"C",a&1?1:0,1);F(this,"P",a&4?1:0,1);F(this,"A",a&16?1:0,1);F(this,"Z",a&64?1:0,1);F(this,"S",a&128?1:0,1);F(this,"T",a&256?1:0,1);F(this,"I",a&512?1:0,1);F(this,"D",a&1024?
|
g.Te=function(){F(this,"AX",this.G);F(this,"BX",this.B);F(this,"CX",this.I);F(this,"DX",this.J);F(this,"SP",this.X);F(this,"BP",this.H);F(this,"SI",this.F);F(this,"DI",this.D);F(this,"CS",this.Ba.sa);F(this,"DS",this.Wb.sa);F(this,"SS",this.Nb.sa);F(this,"ES",this.ab.sa);F(this,"IP",this.qa);var a=gc(this);F(this,"PS",a);F(this,"C",a&1?1:0,1);F(this,"P",a&4?1:0,1);F(this,"A",a&16?1:0,1);F(this,"Z",a&64?1:0,1);F(this,"S",a&128?1:0,1);F(this,"T",a&256?1:0,1);F(this,"I",a&512?1:0,1);F(this,"D",a&1024?
|
||||||
1:0,1);F(this,"O",a&2048?1:0,1);this.oa.speed&&(this.oa.speed.innerHTML=this.hc&&this.Cc?this.Cc.toFixed(2)+"Mhz":"Stopped")};
|
1:0,1);F(this,"O",a&2048?1:0,1);this.oa.speed&&(this.oa.speed.innerHTML=this.kc&&this.Fc?this.Fc.toFixed(2)+"Mhz":"Stopped")};
|
||||||
g.Dk=function(a){this.Wg=!0;this.Vc=this.A=a;this.ja&&sb(this.ja);a||!this.Ea||this.Ea.xn(this.Ea.rn)||(this.Y|=4);do{if(a=this.Y&240)this.pa|=a;else if(this.kg=this.Aa,this.da=this.za=-1,this.C=this.Tb,this.M=this.Kb,this.pa=this.Y&256,this.Pa){a:{if(!(this.Y&4))if(this.Pa&1&&this.Da&512){if(a=Mc(this.ja),-1<=a&&(this.Pa&=-2,0<=a)){this.Pa&=-5;Nc.call(this,a,null,11);break a}}else if(this.Pa&2){this.Pa&=-3;Nc.call(this,1,null,11);break a}if(a=this.Pa&8){a=this.ja;for(var b=!1,c=0;c<a.ua;c++)for(var d=
|
g.Fk=function(a){this.Xg=!0;this.Yc=this.A=a;this.ia&&sb(this.ia);a||!this.Fa||this.Fa.yn(this.Fa.sn)||(this.Y|=4);do{if(a=this.Y&240)this.pa|=a;else if(this.lg=this.Aa,this.da=this.za=-1,this.C=this.Wb,this.M=this.Nb,this.pa=this.Y&256,this.Qa){a:{if(!(this.Y&4))if(this.Qa&1&&this.Ea&512){if(a=Mc(this.ia),-1<=a&&(this.Qa&=-2,0<=a)){this.Qa&=-5;Nc.call(this,a,null,11);break a}}else if(this.Qa&2){this.Qa&=-3;Nc.call(this,1,null,11);break a}if(a=this.Qa&8){a=this.ia;for(var b=!1,c=0;c<a.ua;c++)for(var d=
|
||||||
a.ua[c],e=0;e<d.Ha.length;e++){var f=d.Ha[e];f.Uc||(Oc(a,f),f.Uc||(b=!0))}a=!b}a&&(this.Pa&=-9)}if(this.Pa&4){this.Y=this.A=0;break}}this.Y=0;this.Ia[this.aa()].call(this)}while(0<this.A);return this.Wg?this.Vc-this.A:void 0===this.Wg?0:-1};u(function(){for(var a=B(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Fb(d);A(d,c)}});function Pc(a,b){this.ga=a^b;this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=a+b)&255}
|
a.ua[c],e=0;e<d.Ha.length;e++){var f=d.Ha[e];f.Xc||(Oc(a,f),f.Xc||(b=!0))}a=!b}a&&(this.Qa&=-9)}if(this.Qa&4){this.Y=this.A=0;break}}this.Y=0;this.Ia[this.aa()].call(this)}while(0<this.A);return this.Xg?this.Yc-this.A:void 0===this.Xg?0:-1};u(function(){for(var a=B(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Fb(d);A(d,c)}});function Pc(a,b){this.ga=a^b;this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=a+b)&255}
|
||||||
function Qc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a|b)&255}function Rc(a,b){this.ga=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return this.W&255}function Sc(a,b){this.ga=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return this.W&255}
|
function Qc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a|b)&255}function Rc(a,b){this.ga=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return this.W&255}function Sc(a,b){this.ga=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return this.W&255}
|
||||||
function Tc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a&b)&255}function Uc(a,b){this.ga=a^b;this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=a-b)&255}function Vc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a^b)&255}function Wc(a,b){this.ga=a^b;this.$=256;this.W=this.fa=a-b;this.A-=0>this.za?0>this.da?this.ub:this.Ah:this.Wa;this.Y|=2;return a}
|
function Tc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a&b)&255}function Uc(a,b){this.ga=a^b;this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=a-b)&255}function Vc(a,b){this.$=256;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a^b)&255}function Wc(a,b){this.ga=a^b;this.$=256;this.W=this.fa=a-b;this.A-=0>this.za?0>this.da?this.xb:this.Bh:this.Xa;this.Y|=2;return a}
|
||||||
function Xc(a,b){this.ga=a^b;this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=a+b)&65535}function Yc(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a|b)&65535}function Zc(a,b){this.ga=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return this.W&65535}
|
function Xc(a,b){this.ga=a^b;this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=a+b)&65535}function Yc(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a|b)&65535}function Zc(a,b){this.ga=a^b;this.W=this.fa=a+b+(this.W&this.$?1:0);this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return this.W&65535}
|
||||||
function $c(a,b){this.ga=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return this.W&65535}function ad(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a&b)&65535}function bd(a,b){this.ga=a^b;this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=a-b)&65535}
|
function $c(a,b){this.ga=a^b;this.W=this.fa=a-b-(this.W&this.$?1:0);this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return this.W&65535}function ad(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a&b)&65535}function bd(a,b){this.ga=a^b;this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=a-b)&65535}
|
||||||
function cd(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.ub:this.Wa:this.Hb;return(this.W=this.fa=this.ga=a^b)&65535}function dd(a,b){this.ga=a^b;this.$=65536;this.W=this.fa=a-b;this.A-=0>this.za?0>this.da?this.ub:this.Ah:this.Wa;this.Y|=2;return a}function ed(a,b){this.W=this.W&this.$-1|(a&b?this.$:0);(a^a>>1)&b>>1?Ic(this):Dc(this)}function fd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<<e|a>>8-e)&255:d=a<<8;ed.call(this,d,256)}return c}
|
function cd(a,b){this.$=65536;this.A-=0>this.za?0>this.da?this.xb:this.Xa:this.Kb;return(this.W=this.fa=this.ga=a^b)&65535}function dd(a,b){this.ga=a^b;this.$=65536;this.W=this.fa=a-b;this.A-=0>this.za?0>this.da?this.xb:this.Bh:this.Xa;this.Y|=2;return a}function ed(a,b){this.W=this.W&this.$-1|(a&b?this.$:0);(a^a>>1)&b>>1?Ic(this):Dc(this)}function fd(a,b){var c=a;if(b){var d,e=b&7;e?c=(d=a<<e|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<<e|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 md(a,b){var c=a;if(b){var d;(d=(b&this.se)%9)?(d=a<<d|(this.W&this.$?1:0)<<d-1|a>>9-d,c=d&255):d=a|(this.W&this.$?1:0)<<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<<e|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 md(a,b){var c=a;if(b){var d;(d=(b&this.se)%9)?(d=a<<d|(this.W&this.$?1:0)<<d-1|a>>9-d,c=d&255):d=a|(this.W&this.$?1:0)<<8;ed.call(this,d,256)}return c}
|
||||||
function nd(a,b){var c=a;if(b){var d;(d=(b&this.se)%17)?(d=a<<d|(this.W&this.$?1:0)<<d-1|a>>17-d,c=d&65535):d=a|(this.W&this.$?1:0)<<16;ed.call(this,d,65536)}return c}function od(a,b){var c=a;b&&(c=(b&this.se)%9,c=a>>c|(this.W&this.$?1:0)<<8-c|a<<9-c,ed.call(this,c,256),c&=255);return c}function pd(a,b){var c=a;b&&(c=(b&this.se)%17,c=a>>c|(this.W&this.$?1:0)<<16-c|a<<17-c,ed.call(this,c,65536),c&=65535);return c}
|
function nd(a,b){var c=a;if(b){var d;(d=(b&this.se)%17)?(d=a<<d|(this.W&this.$?1:0)<<d-1|a>>17-d,c=d&65535):d=a|(this.W&this.$?1:0)<<16;ed.call(this,d,65536)}return c}function od(a,b){var c=a;b&&(c=(b&this.se)%9,c=a>>c|(this.W&this.$?1:0)<<8-c|a<<9-c,ed.call(this,c,256),c&=255);return c}function pd(a,b){var c=a;b&&(c=(b&this.se)%17,c=a>>c|(this.W&this.$?1:0)<<16-c|a<<17-c,ed.call(this,c,65536),c&=65535);return c}
|
||||||
function qd(a,b){var c=a;b&&(c=8<b?this.W=this.fa=0:(this.W=this.fa=a<<b)&255,this.ga=0,this.$=256);return c}function rd(a,b){var c=a;b&&(c=16<b?this.W=this.fa=0:(this.W=this.fa=a<<b)&65535,this.ga=0,this.$=65536);return c}function sd(a,b){if(b){var c=8<b?0:a>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ga=a^this.W;this.$=256;a=this.W}return a&255}
|
function qd(a,b){var c=a;b&&(c=8<b?this.W=this.fa=0:(this.W=this.fa=a<<b)&255,this.ga=0,this.$=256);return c}function rd(a,b){var c=a;b&&(c=16<b?this.W=this.fa=0:(this.W=this.fa=a<<b)&65535,this.ga=0,this.$=65536);return c}function sd(a,b){if(b){var c=8<b?0:a>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ga=a^this.W;this.$=256;a=this.W}return a&255}
|
||||||
function td(a,b){if(b){var c=16<b?0:a>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ga=a^this.W;this.$=65536;a=this.W}return a&65535}function ud(a,b){if(b){8<b&&(b=9);var c=a<<24>>24>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ga=a^this.W;this.$=256;a=this.W}return a&255}function vd(a,b){if(b){16<b&&(b=17);var c=a<<16>>16>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ga=a^this.W;this.$=65536;a=this.W}return a&65535}
|
function td(a,b){if(b){var c=16<b?0:a>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ga=a^this.W;this.$=65536;a=this.W}return a&65535}function ud(a,b){if(b){8<b&&(b=9);var c=a<<24>>24>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|256:this.W&-257;this.ga=a^this.W;this.$=256;a=this.W}return a&255}function vd(a,b){if(b){16<b&&(b=17);var c=a<<16>>16>>b-1;this.W=this.fa=c>>1;this.W=c&1?this.W|65536:this.W&-65537;this.ga=a^this.W;this.$=65536;a=this.W}return a&65535}
|
||||||
function wd(){this.A-=0>this.da?2:this.nk;return 1}function xd(){var a=this.I&this.se;this.A-=(0>this.da?this.Wh:this.Vh)+(a<<this.Xh);return a}function yd(){var a=this.aa();this.A-=(0>this.da?this.Wh:this.Vh)+(a<<this.Xh);return a}function zd(){return null}function Ad(a){Eb.call(this,13,0);return a}function Yb(a){H.call(this);return a}function N(a){O.call(this);return a}
|
function wd(){this.A-=0>this.da?2:this.pk;return 1}function xd(){var a=this.I&this.se;this.A-=(0>this.da?this.Xh:this.Wh)+(a<<this.Yh);return a}function yd(){var a=this.aa();this.A-=(0>this.da?this.Xh:this.Wh)+(a<<this.Yh);return a}function zd(){return null}function Ad(a){Eb.call(this,13,0);return a}function Yb(a){H.call(this);return a}function N(a){O.call(this);return a}
|
||||||
var Bd=[Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc],Cd=[Xc,Yc,Zc,$c,ad,bd,cd,dd],Dd=[function(a,b){this.A-=0>this.za?this.Ib:this.gk;return b},Ad,Ad,Ad,Ad,Ad,Ad,Ad],Ed=[function(a,b){this.A-=0>this.za?this.Zj:this.Xj;return b},N,N,N,N,N,N,N],Fd=[fd,hd,md,od,qd,sd,N,ud],Gd=[gd,id,nd,pd,rd,td,N,vd],Id=[function(a,b){b=this.aa();this.W=this.fa=this.ga=a&b;this.$=256;this.A-=0>this.da?this.bi:this.ai;this.Y|=2;return a},N,function(a){this.A-=0>this.da?this.lf:this.kf;return a^255},function(a,b){b=0;this.ga=a^b;this.$=256;
|
var Bd=[Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc],Cd=[Xc,Yc,Zc,$c,ad,bd,cd,dd],Dd=[function(a,b){this.A-=0>this.za?this.Lb:this.ik;return b},Ad,Ad,Ad,Ad,Ad,Ad,Ad],Ed=[function(a,b){this.A-=0>this.za?this.ak:this.Zj;return b},N,N,N,N,N,N,N],Fd=[fd,hd,md,od,qd,sd,N,ud],Gd=[gd,id,nd,pd,rd,td,N,vd],Id=[function(a,b){b=this.aa();this.W=this.fa=this.ga=a&b;this.$=256;this.A-=0>this.da?this.ci:this.bi;this.Y|=2;return a},N,function(a){this.A-=0>this.da?this.lf:this.kf;return a^255},function(a,b){b=0;this.ga=a^b;this.$=256;
|
||||||
this.A-=0>this.da?this.lf:this.kf;return(this.W=this.fa=b-a)&255},function(a){this.G=this.fb=(this.W=(this.G&255)*a)&65535;this.ga=this.fa=this.W;this.$=256;this.G&65280?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.ck:this.bk;this.Y|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.fb=b&65535;this.W=this.ga=this.fa=b;this.$=256;127<b||-128>b?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.Ij:this.Hj;this.Y|=2;return a},function(a){if(!a)return Hd.call(this),
|
this.A-=0>this.da?this.lf:this.kf;return(this.W=this.fa=b-a)&255},function(a){this.G=this.gb=(this.W=(this.G&255)*a)&65535;this.ga=this.fa=this.W;this.$=256;this.G&65280?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.ek:this.dk;this.Y|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24);this.G=this.gb=b&65535;this.W=this.ga=this.fa=b;this.$=256;127<b||-128>b?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.Kj:this.Jj;this.Y|=2;return a},function(a){if(!a)return Hd.call(this),
|
||||||
a;var b=this.G/a;if(255<b)return Hd.call(this),a;this.fb=this.G=b&255|(this.G%a&255)<<8;this.fa=this.ga=this.W=b|256;this.$=256;this.A-=0>this.da?this.Aj:this.zj;this.Y|=2;return a},function(a){if(!a)return Hd.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return Hd.call(this),a;this.fb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.fa=this.ga=this.W=b|256;this.$=256;this.A-=0>this.da?this.Ej:this.Dj;this.Y|=2;return a}],Jd=[function(a,b){b=this.K();this.W=this.fa=this.ga=
|
a;var b=this.G/a;if(255<b)return Hd.call(this),a;this.gb=this.G=b&255|(this.G%a&255)<<8;this.fa=this.ga=this.W=b|256;this.$=256;this.A-=0>this.da?this.Cj:this.Bj;this.Y|=2;return a},function(a){if(!a)return Hd.call(this),a;var b=(this.G<<16>>16)/(a<<24>>24);if(b>b<<24>>24&65535)return Hd.call(this),a;this.gb=this.G=b&255|((this.G<<16>>16)%(a<<24>>24)&255)<<8;this.fa=this.ga=this.W=b|256;this.$=256;this.A-=0>this.da?this.Gj:this.Fj;this.Y|=2;return a}],Jd=[function(a,b){b=this.K();this.W=this.fa=this.ga=
|
||||||
a&b;this.$=65536;this.A-=0>this.da?this.bi:this.ai;this.Y|=2;return a},N,function(a){this.A-=0>this.da?this.lf:this.kf;return a^65535},function(a,b){b=0;this.ga=a^b;this.$=65536;this.A-=0>this.da?this.lf:this.kf;return(this.W=this.fa=b-a)&65535},function(a){this.fb=this.G=(this.W=this.G*a)&65535;this.pf=this.J=this.W>>16&65535;this.ga=this.fa=this.W;this.$=65536;this.J?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.ek:this.dk;this.Y|=2;return a},function(a){var b=(this.G<<16>>16)*
|
a&b;this.$=65536;this.A-=0>this.da?this.ci:this.bi;this.Y|=2;return a},N,function(a){this.A-=0>this.da?this.lf:this.kf;return a^65535},function(a,b){b=0;this.ga=a^b;this.$=65536;this.A-=0>this.da?this.lf:this.kf;return(this.W=this.fa=b-a)&65535},function(a){this.gb=this.G=(this.W=this.G*a)&65535;this.pf=this.J=this.W>>16&65535;this.ga=this.fa=this.W;this.$=65536;this.J?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.gk:this.fk;this.Y|=2;return a},function(a){var b=(this.G<<16>>16)*
|
||||||
(a<<16>>16);this.G=this.fb=b&65535;this.J=this.pf=b>>16&65535;this.W=this.ga=this.fa=b;this.$=65536;32767<b||-32768>b?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.Kj:this.Jj;this.Y|=2;return a},function(a,b){if(!a)return Hd.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return Hd.call(this),a;this.fb=this.G=c&65535;this.pf=this.J=b%a&65535;this.fa=this.ga=this.W=c|65536;this.$=65536;this.A-=0>this.da?this.Cj:this.Bj;this.Y|=2;return a},function(a,b){if(!a)return Hd.call(this),
|
(a<<16>>16);this.G=this.gb=b&65535;this.J=this.pf=b>>16&65535;this.W=this.ga=this.fa=b;this.$=65536;32767<b||-32768>b?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?this.Mj:this.Lj;this.Y|=2;return a},function(a,b){if(!a)return Hd.call(this),a;b=this.G+65536*this.J;var c=Math.floor(b/a);if(65536<=c)return Hd.call(this),a;this.gb=this.G=c&65535;this.pf=this.J=b%a&65535;this.fa=this.ga=this.W=c|65536;this.$=65536;this.A-=0>this.da?this.Ej:this.Dj;this.Y|=2;return a},function(a,b){if(!a)return Hd.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 Hd.call(this),a;this.fb=this.G=d&65535;this.pf=this.J=b%c&65535;this.fa=this.ga=this.W=d|65536;this.$=65536;this.A-=0>this.da?this.Gj:this.Fj;this.Y|=2;return a}],Xb=[function(a){this.ga=a;a=(this.fa=a+1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.jf:this.hf;return a},function(a){this.ga=a;a=(this.fa=a-1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.jf:this.hf;
|
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 Hd.call(this),a;this.gb=this.G=d&65535;this.pf=this.J=b%c&65535;this.fa=this.ga=this.W=d|65536;this.$=65536;this.A-=0>this.da?this.Ij:this.Hj;this.Y|=2;return a}],Xb=[function(a){this.ga=a;a=(this.fa=a+1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.jf:this.hf;return a},function(a){this.ga=a;a=(this.fa=a-1)&255;this.W=a|(this.W&this.$?1:0)<<8;this.$=256;this.A-=0>this.da?this.jf:this.hf;
|
||||||
return a},N,N,N,N,N,N],Zb=[function(a){this.ga=a;a=(this.fa=a+1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.jf:this.hf;return a},function(a){this.ga=a;a=(this.fa=a-1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.jf:this.hf;return a},function(a){M(this,this.qa);J(this,a);this.A-=0>this.da?this.yj:this.xj;this.Y|=2;return a},function(a){if(0>this.da)return N.call(this,a);M(this,this.Ba.sa);M(this,this.qa);dc(this,a,G(this,this.da+2));this.A-=
|
return a},N,N,N,N,N,N],Zb=[function(a){this.ga=a;a=(this.fa=a+1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.jf:this.hf;return a},function(a){this.ga=a;a=(this.fa=a-1)&65535;this.W=a|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=0>this.da?this.jf:this.hf;return a},function(a){M(this,this.qa);J(this,a);this.A-=0>this.da?this.Aj:this.zj;this.Y|=2;return a},function(a){if(0>this.da)return N.call(this,a);M(this,this.Ba.sa);M(this,this.qa);dc(this,a,G(this,this.da+2));this.A-=
|
||||||
this.vj;this.Y|=2;return a},function(a){J(this,a);this.A-=0>this.da?this.Tj:this.Sj;this.Y|=2;return a},function(a){if(0>this.da)return N.call(this,a);dc(this,a,G(this,this.da+2));this.A-=this.Qj;this.Y|=2;return a},function(a){var b=a;this.Y&512&&(a=a-2&65535,80286>this.Fa&&(b=a));M(this,b);this.A-=0>this.da?this.Rb:this.ik;this.Y|=2;return a},Ad],Kd=[fd,hd,md,od,qd,sd,N,ud],Ld=[gd,id,nd,pd,rd,td,N,vd];function Md(a,b){this.A-=0>this.za?0>this.da?this.ak:this.$j:this.Yj;return b}
|
this.xj;this.Y|=2;return a},function(a){J(this,a);this.A-=0>this.da?this.Vj:this.Uj;this.Y|=2;return a},function(a){if(0>this.da)return N.call(this,a);dc(this,a,G(this,this.da+2));this.A-=this.Sj;this.Y|=2;return a},function(a){var b=a;this.Y&512&&(a=a-2&65535,80286>this.Da&&(b=a));M(this,b);this.A-=0>this.da?this.Ub:this.kk;this.Y|=2;return a},Ad],Kd=[fd,hd,md,od,qd,sd,N,ud],Ld=[gd,id,nd,pd,rd,td,N,vd];function Md(a,b){this.A-=0>this.za?0>this.da?this.ck:this.bk:this.$j;return b}
|
||||||
function Nd(){return Md.call(this,0,this.fb)}function Od(a,b){this.W=this.fa=this.ga=a&b;this.$=256;this.A-=0>this.za?0>this.da?this.ci:this.nf:this.nf;this.Y|=2;return a}function Pd(a,b){this.W=this.fa=this.ga=a&b;this.$=65536;this.A-=0>this.za?0>this.da?this.ci:this.nf:this.nf;this.Y|=2;return a}function Qd(a,b){var c=(b<<16>>16)*(this.aa()<<24>>24);this.W=this.ga=this.fa=c;this.$=256;32767<c||-32768>c?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?21:24;return c&65535}
|
function Nd(){return Md.call(this,0,this.gb)}function Od(a,b){this.W=this.fa=this.ga=a&b;this.$=256;this.A-=0>this.za?0>this.da?this.di:this.nf:this.nf;this.Y|=2;return a}function Pd(a,b){this.W=this.fa=this.ga=a&b;this.$=65536;this.A-=0>this.za?0>this.da?this.di:this.nf:this.nf;this.Y|=2;return a}function Qd(a,b){var c=(b<<16>>16)*(this.aa()<<24>>24);this.W=this.ga=this.fa=c;this.$=256;32767<c||-32768>c?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?21:24;return c&65535}
|
||||||
function Rd(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.W=this.ga=this.fa=c;this.$=65536;32767<c||-32768>c?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?21:24;return c&65535}function Sd(a){return a}function Td(a){if(0>this.da)return O.call(this),a;this.A-=this.Uj;return this.da}function Ud(a,b){if(0>this.da)return O.call(this),a;rc(this,G(this,this.da+2));this.A-=this.Eh;return b}
|
function Rd(a,b){var c=(b<<16>>16)*(this.K()<<16>>16);this.W=this.ga=this.fa=c;this.$=65536;32767<c||-32768>c?(Ec(this),Ic(this)):(Ac(this),Dc(this));this.A-=0>this.da?21:24;return c&65535}function Sd(a){return a}function Td(a){if(0>this.da)return O.call(this),a;this.A-=this.Wj;return this.da}function Ud(a,b){if(0>this.da)return O.call(this),a;rc(this,G(this,this.da+2));this.A-=this.Fh;return b}
|
||||||
function Vd(a,b){if(0>this.da)return O.call(this),a;tc(this,G(this,this.da+2));this.A-=this.Eh;return b}function Wd(a){if(0>this.da)return H.call(this),a;var b=a<<16>>16,c=G(this,this.da)<<16>>16,d=G(this,this.da+2)<<16>>16;this.A-=this.rj;if(b<c||b>d)J(this,this.kg-this.Ba.Ya),Nc.call(this,5,null,0);this.Y|=2;return a}function Xd(a,b){this.A-=10+(0>this.da?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Gc(this),a;Cc(this);return a}
|
function Vd(a,b){if(0>this.da)return O.call(this),a;tc(this,G(this,this.da+2));this.A-=this.Fh;return b}function Wd(a){if(0>this.da)return H.call(this),a;var b=a<<16>>16,c=G(this,this.da)<<16>>16,d=G(this,this.da+2)<<16>>16;this.A-=this.tj;if(b<c||b>d)J(this,this.lg-this.Ba.Za),Nc.call(this,5,null,0);this.Y|=2;return a}function Xd(a,b){this.A-=10+(0>this.da?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Gc(this),a;Cc(this);return a}
|
||||||
function Yd(a,b){this.A-=14+(0>this.da?0:2);if(0<=this.lb.load(b,!0)&&this.lb.kc>=(this.Ba.sa&3)&&this.lb.kc>=(b&3))return Gc(this),this.lb.ac&65280;Cc(this);return a}function Zd(a,b){this.A-=14+(0>this.da?0:2);if(b&65528&&0<=this.lb.load(b,!0)&&(3072==(this.lb.ac&3072)||this.lb.kc>=(this.Ba.sa&3))&&this.lb.kc>=(b&3))return Gc(this),this.lb.Tc;Cc(this);return a}
|
function Yd(a,b){this.A-=14+(0>this.da?0:2);if(0<=this.ob.load(b,!0)&&this.ob.nc>=(this.Ba.sa&3)&&this.ob.nc>=(b&3))return Gc(this),this.ob.dc&65280;Cc(this);return a}function Zd(a,b){this.A-=14+(0>this.da?0:2);if(b&65528&&0<=this.ob.load(b,!0)&&(3072==(this.ob.dc&3072)||this.ob.nc>=(this.Ba.sa&3))&&this.ob.nc>=(b&3))return Gc(this),this.ob.Wc;Cc(this);return a}
|
||||||
function $d(a,b){if(0>this.da){switch(this.Gf&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.ei}else this.za=this.da,this.Q(a),this.A-=this.di;return b}
|
function $d(a,b){if(0>this.da){switch(this.Gf&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.fi}else this.za=this.da,this.Q(a),this.A-=this.ei;return b}
|
||||||
function ae(a,b){if(0>this.da){switch(this.Gf&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.ei}else this.za=this.da,this.R(a),this.A-=this.di;return b}function Nc(a,b,c){mc(this,a)&&(M(this,gc(this)),this.Da&=this.gc.Zf,M(this,this.Ba.sa),M(this,this.qa),null!=b&&M(this,b),dc(this,this.gc.ii,this.gc.sa),this.A-=this.Mj+c)}
|
function ae(a,b){if(0>this.da){switch(this.Gf&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.fi}else this.za=this.da,this.R(a),this.A-=this.ei;return b}function Nc(a,b,c){mc(this,a)&&(M(this,gc(this)),this.Ea&=this.jc.Zf,M(this,this.Ba.sa),M(this,this.qa),null!=b&&M(this,b),dc(this,this.jc.ji,this.jc.sa),this.A-=this.Oj+c)}
|
||||||
function Hd(){J(this,this.kg-this.Ba.Ya);Nc.call(this,0,null,2)}function Eb(a,b){this.Ea&&this.Ea.message("Fault 0x"+ba(a)+(null!=b?" (0x"+h(b,4)+")":"")+" on opcode 0x"+ba(Sa(this.la,this.Aa))+" at "+ca(this.qa,this.Ba.sa));80186<=this.Fa&&(J(this,this.kg-this.Ba.Ya),Nc.call(this,a,b,0))}function H(){Eb.call(this,6);kb(this)}function O(){J(this,this.kg-this.Ba.Ya);Ia(this,"Undefined opcode 0x"+ba(Sa(this.la,this.Aa))+" at "+ca(this.qa,this.Ba.sa));kb(this)}
|
function Hd(){J(this,this.lg-this.Ba.Za);Nc.call(this,0,null,2)}function Eb(a,b){this.Fa&&this.Fa.message("Fault 0x"+ba(a)+(null!=b?" (0x"+h(b,4)+")":"")+" on opcode 0x"+ba(Sa(this.la,this.Aa))+" at "+ca(this.qa,this.Ba.sa));80186<=this.Da&&(J(this,this.lg-this.Ba.Za),Nc.call(this,a,b,0))}function H(){Eb.call(this,6);kb(this)}function O(){J(this,this.lg-this.Ba.Za);Ia(this,"Undefined opcode 0x"+ba(Sa(this.la,this.Aa))+" at "+ca(this.qa,this.Ba.sa));kb(this)}
|
||||||
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 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 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}
|
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}
|
||||||
|
|
@ -360,262 +360,260 @@ 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.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))},
|
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))}],Dg=[function(){var a=this.aa();16>(a&56)&&(this.Y|=1);Bg[a].call(this,ic,zd)},function(){var a=this.aa();a&16||(this.Y|=1);Bg[a].call(this,Cg,zd)},function(){Q[this.aa()].call(this,Yd)},function(){Q[this.aa()].call(this,Zd)},O,O,O,O,O,O,O,H,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,
|
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))}],Dg=[function(){var a=this.aa();16>(a&56)&&(this.Y|=1);Bg[a].call(this,ic,zd)},function(){var a=this.aa();a&16||(this.Y|=1);Bg[a].call(this,Cg,zd)},function(){Q[this.aa()].call(this,Yd)},function(){Q[this.aa()].call(this,Zd)},O,O,O,O,O,O,O,H,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,
|
||||||
O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O],jc=[function(){this.A-=2+(0>this.da?0:1);return this.ve.sa},function(){this.A-=2+(0>this.da?0:1);return this.qg.sa},function(a){this.Y|=2;this.ve.load(a);this.A-=
|
O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O],jc=[function(){this.A-=2+(0>this.da?0:1);return this.ve.sa},function(){this.A-=2+(0>this.da?0:1);return this.rg.sa},function(a){this.Y|=2;this.ve.load(a);this.A-=
|
||||||
17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.qg.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.lb.load(a,!0)&&2048!=(this.lb.ac&2560)&&(3072==(this.lb.ac&3072)||this.lb.kc>=(this.Ba.sa&3)&&this.lb.kc>=(a&3)))return Gc(this),a;Cc(this);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.lb.load(a,!0)&&512==(this.lb.ac&2560)&&this.lb.kc>=(this.Ba.sa&3)&&this.lb.kc>=(a&3))return Gc(this),a;Cc(this);return a},N,N],
|
17+(0>this.da?0:2);return a},function(a){this.Y|=2;this.rg.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.ob.load(a,!0)&&2048!=(this.ob.dc&2560)&&(3072==(this.ob.dc&3072)||this.ob.nc>=(this.Ba.sa&3)&&this.ob.nc>=(a&3)))return Gc(this),a;Cc(this);return a},function(a){this.Y|=2;this.A-=14+(0>this.da?0:2);if(0<=this.ob.load(a,!0)&&512==(this.ob.dc&2560)&&this.ob.nc>=(this.Ba.sa&3)&&this.ob.nc>=(a&3))return Gc(this),a;Cc(this);return a},N,N],
|
||||||
kc=[Yb,Yb,Yb,Yb,Yb,Yb,N,N],ic=kc,Cg=[function(a){0>this.da?H.call(this):(Lc(this,this.da+2,this.Jc),Kc(this,this.da+4,this.Jc>>16),a=this.Ee-this.Jc,this.A-=11);return a},function(a){0>this.da?H.call(this):(Lc(this,this.da+2,this.Kc),Kc(this,this.da+4,this.Kc>>16),a=this.ge-this.Kc,this.A-=12);return a},function(a){0>this.da?H.call(this):(this.Jc=G(this,this.da+2)|Jc(this,this.da+4)<<16,this.Ee=this.Jc+a,this.Y|=2,this.A-=11);return a},function(a){0>this.da?H.call(this):(this.Kc=G(this,this.da+2)|
|
kc=[Yb,Yb,Yb,Yb,Yb,Yb,N,N],ic=kc,Cg=[function(a){0>this.da?H.call(this):(Lc(this,this.da+2,this.Mc),Kc(this,this.da+4,this.Mc>>16),a=this.Ee-this.Mc,this.A-=11);return a},function(a){0>this.da?H.call(this):(Lc(this,this.da+2,this.Nc),Kc(this,this.da+4,this.Nc>>16),a=this.ge-this.Nc,this.A-=12);return a},function(a){0>this.da?H.call(this):(this.Mc=G(this,this.da+2)|Jc(this,this.da+4)<<16,this.Ee=this.Mc+a,this.Y|=2,this.A-=11);return a},function(a){0>this.da?H.call(this):(this.Nc=G(this,this.da+2)|
|
||||||
Jc(this,this.da+4)<<16,this.ge=this.Kc+a,this.Y|=2,this.A-=12);return a},function(){this.A-=2+(0>this.da?0:1);return this.Zc},N,function(a){this.Zc=this.Zc&65520|a&-65521;this.A-=3+(0>this.da?0:3);this.Zc&1&&fc(this,!0);this.Y|=2;return a},N];function $b(){Dg[this.aa()].call(this)}function bc(){M(this,this.X);this.A-=this.Rb}function Hb(){var a=this.X;M(this,this.G);M(this,this.I);M(this,this.J);M(this,this.B);M(this,a);M(this,this.H);M(this,this.F);M(this,this.D);this.A-=this.hk}
|
Jc(this,this.da+4)<<16,this.ge=this.Nc+a,this.Y|=2,this.A-=12);return a},function(){this.A-=2+(0>this.da?0:1);return this.bd},N,function(a){this.bd=this.bd&65520|a&-65521;this.A-=3+(0>this.da?0:3);this.bd&1&&fc(this,!0);this.Y|=2;return a},N];function $b(){Dg[this.aa()].call(this)}function bc(){M(this,this.X);this.A-=this.Ub}function Hb(){var a=this.X;M(this,this.G);M(this,this.I);M(this,this.J);M(this,this.B);M(this,a);M(this,this.H);M(this,this.F);M(this,this.D);this.A-=this.jk}
|
||||||
function Ib(){this.D=this.ya();this.F=this.ya();this.H=this.ya();this.X+=2;this.B=this.ya();this.J=this.ya();this.I=this.ya();this.G=this.ya();this.A-=this.fk}function Jb(){Q[this.aa()].call(this,Wd)}function ac(){P[this.aa()].call(this,Xd)}function Kb(){M(this,this.K());this.A-=this.Rb}function Lb(){Q[this.aa()].call(this,Rd)}function Mb(){M(this,this.aa());this.A-=this.Rb}function Nb(){Q[this.aa()].call(this,Qd)}
|
function Ib(){this.D=this.ya();this.F=this.ya();this.H=this.ya();this.X+=2;this.B=this.ya();this.J=this.ya();this.I=this.ya();this.G=this.ya();this.A-=this.hk}function Jb(){Q[this.aa()].call(this,Wd)}function ac(){P[this.aa()].call(this,Xd)}function Kb(){M(this,this.K());this.A-=this.Ub}function Lb(){Q[this.aa()].call(this,Rd)}function Mb(){M(this,this.aa());this.A-=this.Ub}function Nb(){Q[this.aa()].call(this,Qd)}
|
||||||
function Ob(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Ya(this.la,this.J,this.Aa-b-1);Kc(this,this.$a.Fb(this.D,0),d);this.D=this.D+(this.Da&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}}
|
function Ob(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Ya(this.la,this.J,this.Aa-b-1);Kc(this,this.ab.Ib(this.D,0),d);this.D=this.D+(this.Ea&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}}
|
||||||
function Pb(){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.Aa-b-1,d=Ya(this.la,this.J,d)|Ya(this.la,this.J+1&65535,d)<<8;Lc(this,this.$a.Fb(this.D,1),d);this.D=this.D+(this.Da&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}}
|
function Pb(){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.Aa-b-1,d=Ya(this.la,this.J,d)|Ya(this.la,this.J+1&65535,d)<<8;Lc(this,this.ab.Ib(this.D,1),d);this.D=this.D+(this.Ea&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}}
|
||||||
function Qb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Jc(this,this.Tb.zc(this.F,0));this.F=this.F+(this.Da&1024?-1:1)&65535;this.A-=c;this.I-=b;$a(this.la,this.J,d,this.Aa-b-1);a&&(L(this,-2),this.Y|=256)}}
|
function Qb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=Jc(this,this.Wb.Dc(this.F,0));this.F=this.F+(this.Ea&1024?-1:1)&65535;this.A-=c;this.I-=b;$a(this.la,this.J,d,this.Aa-b-1);a&&(L(this,-2),this.Y|=256)}}
|
||||||
function Rb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=G(this,this.Tb.zc(this.F,1));this.F=this.F+(this.Da&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Aa-b-1;$a(this.la,this.J,d&255,b);$a(this.la,this.J+1&65535,d>>8,b);a&&(L(this,-2),this.Y|=256)}}function Eg(){var a=this.L();zc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Fg(){var a=this.L();zc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}
|
function Rb(){var a=1,b=0,c=5;this.pa&192&&(a=this.I,b=1,this.pa&256&&(c=4));if(a--){var d=G(this,this.Wb.Dc(this.F,1));this.F=this.F+(this.Ea&1024?-2:2)&65535;this.A-=c;this.I-=b;b=this.Aa-b-1;$a(this.la,this.J,d&255,b);$a(this.la,this.J+1&65535,d>>8,b);a&&(L(this,-2),this.Y|=256)}}function Eg(){var a=this.L();zc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Fg(){var a=this.L();zc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}
|
||||||
function Gg(){var a=this.L();uc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Hg(){var a=this.L();uc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}function Ig(){var a=this.L();xc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Jg(){var a=this.L();xc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}function Kg(){var a=this.L();uc(this)||xc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}
|
function Gg(){var a=this.L();uc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Hg(){var a=this.L();uc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}function Ig(){var a=this.L();xc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Jg(){var a=this.L();xc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}function Kg(){var a=this.L();uc(this)||xc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}
|
||||||
function Lg(){var a=this.L();uc(this)||xc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}function Mg(){var a=this.L();yc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Ng(){var a=this.L();yc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}function Og(){var a=this.L();vc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Pg(){var a=this.L();vc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}
|
function Lg(){var a=this.L();uc(this)||xc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}function Mg(){var a=this.L();yc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Ng(){var a=this.L();yc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}function Og(){var a=this.L();vc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Pg(){var a=this.L();vc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}
|
||||||
function Qg(){var a=this.L();!yc(this)!=!zc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Rg(){var a=this.L();!yc(this)==!zc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Sg(){var a=this.L();xc(this)||!yc(this)!=!zc(this)?(J(this,this.qa+a),this.A-=this.vb):this.A-=this.wb}function Tg(){var a=this.L();xc(this)||!yc(this)!=!zc(this)?this.A-=this.wb:(J(this,this.qa+a),this.A-=this.vb)}
|
function Qg(){var a=this.L();!yc(this)!=!zc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Rg(){var a=this.L();!yc(this)==!zc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Sg(){var a=this.L();xc(this)||!yc(this)!=!zc(this)?(J(this,this.qa+a),this.A-=this.yb):this.A-=this.zb}function Tg(){var a=this.L();xc(this)||!yc(this)!=!zc(this)?this.A-=this.zb:(J(this,this.qa+a),this.A-=this.yb)}
|
||||||
function Ug(){Ag[this.aa()].call(this,Bd,this.aa);this.A-=0>this.za?1:this.hg}function Sb(){Ag[this.aa()].call(this,Kd,yd)}function Tb(){Bg[this.aa()].call(this,Ld,yd)}function Vg(){var a=this.K();J(this,this.ya());this.X=this.X+a&65535;this.A-=this.mk}function Wg(){J(this,this.ya());this.A-=this.jk}
|
function Ug(){Ag[this.aa()].call(this,Bd,this.aa);this.A-=0>this.za?1:this.ig}function Sb(){Ag[this.aa()].call(this,Kd,yd)}function Tb(){Bg[this.aa()].call(this,Ld,yd)}function Vg(){var a=this.K();J(this,this.ya());this.X=this.X+a&65535;this.A-=this.ok}function Wg(){J(this,this.ya());this.A-=this.lk}
|
||||||
function Ub(){var a=this.K(),b=this.aa()&31;this.A-=11;M(this,this.H);var c=this.X;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.H=this.H-2&65535,M(this,G(this,this.Kb.zc(this.H,1)));M(this,c)}this.H=c;this.X=this.X-a&65535}function Vb(){this.X=this.H;this.H=this.ya();this.A-=5}function Xg(){var a=this.K();dc(this,this.ya(),this.ya());this.X=this.X+a&65535;this.Hg&&hc(this,this.Aa);this.A-=this.lk}function Yg(){dc(this,this.ya(),this.ya());this.A-=this.kk}
|
function Ub(){var a=this.K(),b=this.aa()&31;this.A-=11;M(this,this.H);var c=this.X;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.H=this.H-2&65535,M(this,G(this,this.Nb.Dc(this.H,1)));M(this,c)}this.H=c;this.X=this.X-a&65535}function Vb(){this.X=this.H;this.H=this.ya();this.A-=5}function Xg(){var a=this.K();dc(this,this.ya(),this.ya());this.X=this.X+a&65535;this.Ig&&hc(this,this.Aa);this.A-=this.nk}function Yg(){dc(this,this.ya(),this.ya());this.A-=this.mk}
|
||||||
function Zg(){Q[this.aa()].call(this,Sd);this.A-=8}function $g(){this.Y|=36;this.A-=this.kb}function Wb(){O.call(this)}
|
function Zg(){Q[this.aa()].call(this,Sd);this.A-=8}function $g(){this.Y|=36;this.A-=this.nb}function Wb(){O.call(this)}
|
||||||
var Gb=[function(){var a=this.aa();yg[a].call(this,Pc)},function(){P[this.aa()].call(this,Xc)},function(){zg[this.aa()].call(this,Pc)},function(){Q[this.aa()].call(this,Xc)},function(){this.G=this.G&-256|Pc.call(this,this.G&255,this.aa());this.A--},function(){this.G=Xc.call(this,this.G,this.K());this.A--},function(){M(this,this.$a.sa);this.A-=this.mf},function(){tc(this,this.ya());this.A-=this.Ib},function(){yg[this.aa()].call(this,Qc)},function(){P[this.aa()].call(this,Yc)},function(){zg[this.aa()].call(this,
|
var Gb=[function(){var a=this.aa();yg[a].call(this,Pc)},function(){P[this.aa()].call(this,Xc)},function(){zg[this.aa()].call(this,Pc)},function(){Q[this.aa()].call(this,Xc)},function(){this.G=this.G&-256|Pc.call(this,this.G&255,this.aa());this.A--},function(){this.G=Xc.call(this,this.G,this.K());this.A--},function(){M(this,this.ab.sa);this.A-=this.mf},function(){tc(this,this.ya());this.A-=this.Lb},function(){yg[this.aa()].call(this,Qc)},function(){P[this.aa()].call(this,Yc)},function(){zg[this.aa()].call(this,
|
||||||
Qc)},function(){Q[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(){M(this,this.Ba.sa);this.A-=this.mf},function(){nc(this,this.ya());this.A-=this.Ib},function(){yg[this.aa()].call(this,Rc)},function(){P[this.aa()].call(this,Zc)},function(){zg[this.aa()].call(this,Rc)},function(){Q[this.aa()].call(this,Zc)},function(){this.G=this.G&-256|Rc.call(this,this.G&255,this.aa());this.A--},
|
Qc)},function(){Q[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(){M(this,this.Ba.sa);this.A-=this.mf},function(){qc(this,this.ya());this.A-=this.Lb},function(){yg[this.aa()].call(this,Rc)},function(){P[this.aa()].call(this,Zc)},function(){zg[this.aa()].call(this,Rc)},function(){Q[this.aa()].call(this,Zc)},function(){this.G=this.G&-256|Rc.call(this,this.G&255,this.aa());this.A--},
|
||||||
function(){this.G=Zc.call(this,this.G,this.K());this.A--},function(){M(this,this.Kb.sa);this.A-=this.mf},function(){sc(this,this.ya());this.A-=this.Ib},function(){yg[this.aa()].call(this,Sc)},function(){P[this.aa()].call(this,$c)},function(){zg[this.aa()].call(this,Sc)},function(){Q[this.aa()].call(this,$c)},function(){this.G=this.G&-256|Sc.call(this,this.G&255,this.aa());this.A--},function(){this.G=$c.call(this,this.G,this.K());this.A--},function(){M(this,this.Tb.sa);this.A-=this.mf},function(){rc(this,
|
function(){this.G=Zc.call(this,this.G,this.K());this.A--},function(){M(this,this.Nb.sa);this.A-=this.mf},function(){sc(this,this.ya());this.A-=this.Lb},function(){yg[this.aa()].call(this,Sc)},function(){P[this.aa()].call(this,$c)},function(){zg[this.aa()].call(this,Sc)},function(){Q[this.aa()].call(this,$c)},function(){this.G=this.G&-256|Sc.call(this,this.G&255,this.aa());this.A--},function(){this.G=$c.call(this,this.G,this.K());this.A--},function(){M(this,this.Wb.sa);this.A-=this.mf},function(){rc(this,
|
||||||
this.ya());this.A-=this.Ib},function(){yg[this.aa()].call(this,Tc)},function(){P[this.aa()].call(this,ad)},function(){zg[this.aa()].call(this,Tc)},function(){Q[this.aa()].call(this,ad)},function(){this.G=this.G&-256|Tc.call(this,this.G&255,this.aa());this.A--},function(){this.G=ad.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.$a;this.A-=this.kb},function(){var a=this.G&255,b=wc(this),c=this.W&this.$;if(9<(a&15)||b)a+=6,b=!0;if(159<a||c)a+=96,c=!0;this.G=this.G&-256|
|
this.ya());this.A-=this.Lb},function(){yg[this.aa()].call(this,Tc)},function(){P[this.aa()].call(this,ad)},function(){zg[this.aa()].call(this,Tc)},function(){Q[this.aa()].call(this,ad)},function(){this.G=this.G&-256|Tc.call(this,this.G&255,this.aa());this.A--},function(){this.G=ad.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.ab;this.A-=this.nb},function(){var a=this.G&255,b=wc(this),c=this.W&this.$;if(9<(a&15)||b)a+=6,b=!0;if(159<a||c)a+=96,c=!0;this.G=this.G&-256|
|
||||||
(this.W=this.fa=a&255);this.$=65536;c&&(this.W|=this.$);b?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Uc)},function(){P[this.aa()].call(this,bd)},function(){zg[this.aa()].call(this,Uc)},function(){Q[this.aa()].call(this,bd)},function(){this.G=this.G&-256|Uc.call(this,this.G&255,this.aa());this.A--},function(){this.G=bd.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.Ba;this.A-=this.kb},function(){var a=this.G&255,b=wc(this),c=this.W&this.$;if(9<
|
(this.W=this.fa=a&255);this.$=65536;c&&(this.W|=this.$);b?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Uc)},function(){P[this.aa()].call(this,bd)},function(){zg[this.aa()].call(this,Uc)},function(){Q[this.aa()].call(this,bd)},function(){this.G=this.G&-256|Uc.call(this,this.G&255,this.aa());this.A--},function(){this.G=bd.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.Ba;this.A-=this.nb},function(){var a=this.G&255,b=wc(this),c=this.W&this.$;if(9<
|
||||||
(a&15)||b)a-=6,b=!0;if(159<a||c)a-=96,c=!0;this.G=this.G&-256|(this.W=this.fa=a&255);this.$=65536;c&&(this.W|=this.$);b?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Vc)},function(){P[this.aa()].call(this,cd)},function(){zg[this.aa()].call(this,Vc)},function(){Q[this.aa()].call(this,cd)},function(){this.G=this.G&-256|Vc.call(this,this.G&255,this.aa());this.A--},function(){this.G=cd.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.Kb;this.A-=this.kb},
|
(a&15)||b)a-=6,b=!0;if(159<a||c)a-=96,c=!0;this.G=this.G&-256|(this.W=this.fa=a&255);this.$=65536;c&&(this.W|=this.$);b?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Vc)},function(){P[this.aa()].call(this,cd)},function(){zg[this.aa()].call(this,Vc)},function(){Q[this.aa()].call(this,cd)},function(){this.G=this.G&-256|Vc.call(this,this.G&255,this.aa());this.A--},function(){this.G=cd.call(this,this.G,this.K());this.A--},function(){this.Y|=20;this.C=this.M=this.Nb;this.A-=this.nb},
|
||||||
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.W=a);this.$=65536;c&&(this.W|=this.$);d?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Wc)},function(){P[this.aa()].call(this,dd)},function(){zg[this.aa()].call(this,Wc)},function(){Q[this.aa()].call(this,dd)},function(){this.G=this.G&-256|Wc.call(this,this.G&255,this.aa());this.A--},function(){this.G=dd.call(this,this.G,this.K());this.A--},function(){this.Y|=
|
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.W=a);this.$=65536;c&&(this.W|=this.$);d?Fc(this):Bc(this);this.A-=this.Vd},function(){yg[this.aa()].call(this,Wc)},function(){P[this.aa()].call(this,dd)},function(){zg[this.aa()].call(this,Wc)},function(){Q[this.aa()].call(this,dd)},function(){this.G=this.G&-256|Wc.call(this,this.G&255,this.aa());this.A--},function(){this.G=dd.call(this,this.G,this.K());this.A--},function(){this.Y|=
|
||||||
20;this.C=this.M=this.Tb;this.A-=this.kb},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.W=a);this.$=65536;c&&(this.W|=this.$);d?Fc(this):Bc(this);this.A-=this.Vd},function(){this.ga=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.ga=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.ga=this.J;
|
20;this.C=this.M=this.Wb;this.A-=this.nb},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.W=a);this.$=65536;c&&(this.W|=this.$);d?Fc(this):Bc(this);this.A-=this.Vd},function(){this.ga=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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=this.F;this.F=(this.fa=this.F+
|
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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=this.J;this.J=(this.fa=this.J-1)&65535;this.W=this.J|
|
1)&65535;this.W=this.F|(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ga=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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=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.ga=this.F;this.F=(this.fa=this.F-1)&65535;this.W=this.F|(this.W&this.$?1:0)<<
|
(this.W&this.$?1:0)<<16;this.$=65536;this.A-=2},function(){this.ga=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.ga=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.ga=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.ga=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.ga=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(){M(this,this.G);this.A-=this.Rb},function(){M(this,this.I);this.A-=this.Rb},function(){M(this,this.J);this.A-=this.Rb},function(){M(this,this.B);this.A-=this.Rb},function(){M(this,this.X-2&65535);this.A-=this.Rb},function(){M(this,this.H);this.A-=this.Rb},function(){M(this,this.F);this.A-=this.Rb},function(){M(this,this.D);this.A-=this.Rb},function(){this.G=
|
16;this.$=65536;this.A-=2},function(){this.ga=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(){M(this,this.G);this.A-=this.Ub},function(){M(this,this.I);this.A-=this.Ub},function(){M(this,this.J);this.A-=this.Ub},function(){M(this,this.B);this.A-=this.Ub},function(){M(this,this.X-2&65535);this.A-=this.Ub},function(){M(this,this.H);this.A-=this.Ub},function(){M(this,this.F);this.A-=this.Ub},function(){M(this,this.D);this.A-=this.Ub},function(){this.G=
|
||||||
this.ya();this.A-=this.Ib},function(){this.I=this.ya();this.A-=this.Ib},function(){this.J=this.ya();this.A-=this.Ib},function(){this.B=this.ya();this.A-=this.Ib},function(){this.X=this.ya();this.A-=this.Ib},function(){this.H=this.ya();this.A-=this.Ib},function(){this.F=this.ya();this.A-=this.Ib},function(){this.D=this.ya();this.A-=this.Ib},Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Ug,function(){Bg[this.aa()].call(this,Cd,this.K);this.A-=0>this.za?
|
this.ya();this.A-=this.Lb},function(){this.I=this.ya();this.A-=this.Lb},function(){this.J=this.ya();this.A-=this.Lb},function(){this.B=this.ya();this.A-=this.Lb},function(){this.X=this.ya();this.A-=this.Lb},function(){this.H=this.ya();this.A-=this.Lb},function(){this.F=this.ya();this.A-=this.Lb},function(){this.D=this.ya();this.A-=this.Lb},Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Ug,function(){Bg[this.aa()].call(this,Cd,this.K);this.A-=0>this.za?
|
||||||
1:this.hg},Ug,function(){Bg[this.aa()].call(this,Cd,this.L);this.A-=0>this.za?1:this.hg},function(){yg[this.aa()].call(this,Od)},function(){P[this.aa()].call(this,Pd)},function(){zg[this.Gf=this.aa()].call(this,$d)},function(){Q[this.Gf=this.aa()].call(this,ae)},function(){this.Y|=1;yg[this.aa()].call(this,Md)},function(){this.Y|=1;P[this.aa()].call(this,Md)},function(){zg[this.aa()].call(this,Md)},function(){Q[this.aa()].call(this,Md)},function(){var a=this.aa();switch((a&56)>>3){case 0:this.fb=
|
1:this.ig},Ug,function(){Bg[this.aa()].call(this,Cd,this.L);this.A-=0>this.za?1:this.ig},function(){yg[this.aa()].call(this,Od)},function(){P[this.aa()].call(this,Pd)},function(){zg[this.Gf=this.aa()].call(this,$d)},function(){Q[this.Gf=this.aa()].call(this,ae)},function(){this.Y|=1;yg[this.aa()].call(this,Md)},function(){this.Y|=1;P[this.aa()].call(this,Md)},function(){zg[this.aa()].call(this,Md)},function(){Q[this.aa()].call(this,Md)},function(){var a=this.aa();switch((a&56)>>3){case 0:this.gb=
|
||||||
this.$a.sa;break;case 1:this.fb=this.Ba.sa;break;case 2:this.fb=this.Kb.sa;break;case 3:this.fb=this.Tb.sa;break;default:O.call(this);return}this.Y|=1;P[a].call(this,Nd)},function(){this.Y|=1;this.C=this.M=this.Bk;Q[this.aa()].call(this,Td)},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.Fa){H.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;
|
this.ab.sa;break;case 1:this.gb=this.Ba.sa;break;case 2:this.gb=this.Nb.sa;break;case 3:this.gb=this.Wb.sa;break;default:O.call(this);return}this.Y|=1;P[a].call(this,Nd)},function(){this.Y|=1;this.C=this.M=this.Dk;Q[this.aa()].call(this,Td)},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.Da){H.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}}Q[b].call(this,Md);switch(c){case 0:tc(this,this.G);this.G=a;break;case 1:nc(this,this.I);this.I=a;break;case 2:sc(this,this.J);this.J=a;break;case 3:rc(this,this.B);this.B=a;break;case 4:tc(this,this.X);this.X=a;break;case 5:nc(this,this.H);this.H=a;break;case 6:sc(this,this.F);this.F=a;break;case 7:rc(this,this.D),this.D=a}},function(){this.Y|=1;Bg[this.aa()].call(this,Dd,this.ya)},function(){this.A-=3},function(){var a=this.G;this.G=this.I;this.I=a;this.A-=3},function(){var a=
|
case 7:a=this.D}}Q[b].call(this,Md);switch(c){case 0:tc(this,this.G);this.G=a;break;case 1:qc(this,this.I);this.I=a;break;case 2:sc(this,this.J);this.J=a;break;case 3:rc(this,this.B);this.B=a;break;case 4:tc(this,this.X);this.X=a;break;case 5:qc(this,this.H);this.H=a;break;case 6:sc(this,this.F);this.F=a;break;case 7:rc(this,this.D),this.D=a}},function(){this.Y|=1;Bg[this.aa()].call(this,Dd,this.ya)},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.tj},function(){var a=this.K(),b=this.K();M(this,this.Ba.sa);M(this,this.qa);
|
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.vj},function(){var a=this.K(),b=this.K();M(this,this.Ba.sa);M(this,this.qa);
|
||||||
dc(this,a,b);this.A-=this.wj},function(){O.call(this)},function(){M(this,gc(this));this.A-=this.Rb},function(){ec(this,this.ya());this.A-=this.Ib},function(){var a=this.G>>8;a&1?Ec(this):Ac(this);a&4?vc(this)||(this.fa^=1):vc(this)&&(this.fa^=1);a&16?Fc(this):Bc(this);a&64?Gc(this):Cc(this);a&128?Hc(this):yc(this)&&(this.fa^=this.$>>1|this.$>>2,this.ga^=32896);this.A-=this.eb},function(){this.G=this.G&255|(gc(this)&213)<<8;this.A-=this.eb},function(){this.G=this.G&-256|this.S(this.C,this.K());this.A-=
|
dc(this,a,b);this.A-=this.yj},function(){O.call(this)},function(){M(this,gc(this));this.A-=this.Ub},function(){ec(this,this.ya());this.A-=this.Lb},function(){var a=this.G>>8;a&1?Ec(this):Ac(this);a&4?vc(this)||(this.fa^=1):vc(this)&&(this.fa^=1);a&16?Fc(this):Bc(this);a&64?Gc(this):Cc(this);a&128?Hc(this):yc(this)&&(this.fa^=this.$>>1|this.$>>2,this.ga^=32896);this.A-=this.fb},function(){this.G=this.G&255|(gc(this)&213)<<8;this.A-=this.fb},function(){this.G=this.G&-256|this.S(this.C,this.K());this.A-=
|
||||||
this.Lh},function(){this.G=this.T(this.C,this.K());this.A-=this.Lh},function(){var a=this.K(),b=this.G;Kc(this,this.C.Fb(a,0),b);this.A-=this.Mh},function(){var a=this.K(),b=this.G;Lc(this,this.C.Fb(a,1),b);this.A-=this.Mh},function(){var a=1,b=0,c=this.Nh;this.pa&192&&(a=this.I,b=1,c=this.Ph,this.pa&256||(this.A-=this.Oh));if(a--){var d=this.Da&1024?-1:1,e=this.S(this.C,this.F);Kc(this,this.$a.Fb(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(L(this,this.pa&16?-3:
|
this.Mh},function(){this.G=this.T(this.C,this.K());this.A-=this.Mh},function(){var a=this.K(),b=this.G;Kc(this,this.C.Ib(a,0),b);this.A-=this.Nh},function(){var a=this.K(),b=this.G;Lc(this,this.C.Ib(a,1),b);this.A-=this.Nh},function(){var a=1,b=0,c=this.Oh;this.pa&192&&(a=this.I,b=1,c=this.Qh,this.pa&256||(this.A-=this.Ph));if(a--){var d=this.Ea&1024?-1:1,e=this.S(this.C,this.F);Kc(this,this.ab.Ib(this.D,0),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(L(this,this.pa&16?-3:
|
||||||
-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Nh;this.pa&192&&(a=this.I,b=1,c=this.Ph,this.pa&256||(this.A-=this.Oh));if(a--){var d=this.Da&1024?-2:2,e=this.T(this.C,this.F);Lc(this,this.$a.Fb(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.xh;this.pa&192&&(a=this.I,b=1,c=this.zh,this.pa&256||(this.A-=this.yh));if(a--){var d=this.Da&1024?-1:1,e=this.S(this.C,this.F),f=this.N(this.$a,this.D);Wc.call(this,
|
-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Oh;this.pa&192&&(a=this.I,b=1,c=this.Qh,this.pa&256||(this.A-=this.Ph));if(a--){var d=this.Ea&1024?-2:2,e=this.T(this.C,this.F);Lc(this,this.ab.Ib(this.D,1),e);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c;this.I-=b;a&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.yh;this.pa&192&&(a=this.I,b=1,c=this.Ah,this.pa&256||(this.A-=this.zh));if(a--){var d=this.Ea&1024?-1:1,e=this.S(this.C,this.F),f=this.N(this.ab,this.D);Wc.call(this,
|
||||||
e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.Wa;this.I-=b;a&&xc(this)==(this.pa&64)&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.xh;this.pa&192&&(a=this.I,b=1,c=this.zh,this.pa&256||(this.A-=this.yh));if(a--){var d=this.Da&1024?-2:2,e=this.T(this.C,this.F),f=this.O(this.$a,this.D);dd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.Wa;this.I-=b;a&&xc(this)==(this.pa&64)&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){this.W=
|
e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.Xa;this.I-=b;a&&xc(this)==(this.pa&64)&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){var a=1,b=0,c=this.yh;this.pa&192&&(a=this.I,b=1,c=this.Ah,this.pa&256||(this.A-=this.zh));if(a--){var d=this.Ea&1024?-2:2,e=this.T(this.C,this.F),f=this.O(this.ab,this.D);dd.call(this,e,f);this.F=this.F+d&65535;this.D=this.D+d&65535;this.A-=c-this.Xa;this.I-=b;a&&xc(this)==(this.pa&64)&&(L(this,this.pa&16?-3:-2),this.Y|=256)}},function(){this.W=
|
||||||
this.fa=this.ga=this.G&255&this.aa();this.$=256;this.A-=this.Vd},function(){this.W=this.fa=this.ga=this.G&this.K();this.$=65536;this.A-=this.Vd},function(){var a=1,b=0,c=this.Yh;this.pa&192&&(a=this.I,b=1,c=this.$h,this.pa&256||(this.A-=this.Zh));if(a--){var d=this.G;Kc(this,this.$a.Fb(this.D,0),d);this.D=this.D+(this.Da&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Yh;this.pa&192&&(a=this.I,b=1,c=this.$h,this.pa&256||(this.A-=this.Zh));if(a--){var d=
|
this.fa=this.ga=this.G&255&this.aa();this.$=256;this.A-=this.Vd},function(){this.W=this.fa=this.ga=this.G&this.K();this.$=65536;this.A-=this.Vd},function(){var a=1,b=0,c=this.Zh;this.pa&192&&(a=this.I,b=1,c=this.ai,this.pa&256||(this.A-=this.$h));if(a--){var d=this.G;Kc(this,this.ab.Ib(this.D,0),d);this.D=this.D+(this.Ea&1024?-1:1)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Zh;this.pa&192&&(a=this.I,b=1,c=this.ai,this.pa&256||(this.A-=this.$h));if(a--){var d=
|
||||||
this.G;Lc(this,this.$a.Fb(this.D,1),d);this.D=this.D+(this.Da&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Fh;this.pa&192&&(a=this.I,b=1,c=this.Hh,this.pa&256||(this.A-=this.Gh));a--&&(this.G=this.G&-256|this.S(this.C,this.F),this.F=this.F+(this.Da&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(L(this,this.pa&16?-3:-2),this.Y|=256))},function(){var a=1,b=0,c=this.Fh;this.pa&192&&(a=this.I,b=1,c=this.Hh,this.pa&256||(this.A-=this.Gh));a--&&(this.G=this.T(this.C,
|
this.G;Lc(this,this.ab.Ib(this.D,1),d);this.D=this.D+(this.Ea&1024?-2:2)&65535;this.A-=c;this.I-=b;a&&(L(this,-2),this.Y|=256)}},function(){var a=1,b=0,c=this.Gh;this.pa&192&&(a=this.I,b=1,c=this.Ih,this.pa&256||(this.A-=this.Hh));a--&&(this.G=this.G&-256|this.S(this.C,this.F),this.F=this.F+(this.Ea&1024?-1:1)&65535,this.A-=c,this.I-=b,a&&(L(this,this.pa&16?-3:-2),this.Y|=256))},function(){var a=1,b=0,c=this.Gh;this.pa&192&&(a=this.I,b=1,c=this.Ih,this.pa&256||(this.A-=this.Hh));a--&&(this.G=this.T(this.C,
|
||||||
this.F),this.F=this.F+(this.Da&1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(L(this,this.pa&16?-3:-2),this.Y|=256))},function(){var a=1,b=0,c=this.Sh;this.pa&192&&(a=this.I,b=1,c=this.Uh,this.pa&256||(this.A-=this.Th));a--&&(Wc.call(this,this.G&255,this.N(this.$a,this.D)),this.D=this.D+(this.Da&1024?-1:1)&65535,this.A-=c-this.Wa,this.I-=b,a&&xc(this)==(this.pa&64)&&(L(this,-2),this.Y|=256))},function(){var a=1,b=0,c=this.Sh;this.pa&192&&(a=this.I,b=1,c=this.Uh,this.pa&256||(this.A-=this.Th));a--&&(dd.call(this,
|
this.F),this.F=this.F+(this.Ea&1024?-2:2)&65535,this.A-=c,this.I-=b,a&&(L(this,this.pa&16?-3:-2),this.Y|=256))},function(){var a=1,b=0,c=this.Th;this.pa&192&&(a=this.I,b=1,c=this.Vh,this.pa&256||(this.A-=this.Uh));a--&&(Wc.call(this,this.G&255,this.N(this.ab,this.D)),this.D=this.D+(this.Ea&1024?-1:1)&65535,this.A-=c-this.Xa,this.I-=b,a&&xc(this)==(this.pa&64)&&(L(this,-2),this.Y|=256))},function(){var a=1,b=0,c=this.Th;this.pa&192&&(a=this.I,b=1,c=this.Vh,this.pa&256||(this.A-=this.Uh));a--&&(dd.call(this,
|
||||||
this.G,this.O(this.$a,this.D)),this.D=this.D+(this.Da&1024?-2:2)&65535,this.A-=c-this.Wa,this.I-=b,a&&xc(this)==(this.pa&64)&&(L(this,-2),this.Y|=256))},function(){this.G=this.G&-256|this.aa();this.A-=this.eb},function(){this.I=this.I&-256|this.aa();this.A-=this.eb},function(){this.J=this.J&-256|this.aa();this.A-=this.eb},function(){this.B=this.B&-256|this.aa();this.A-=this.eb},function(){this.G=this.G&255|this.aa()<<8;this.A-=this.eb},function(){this.I=this.I&255|this.aa()<<8;this.A-=this.eb},function(){this.J=
|
this.G,this.O(this.ab,this.D)),this.D=this.D+(this.Ea&1024?-2:2)&65535,this.A-=c-this.Xa,this.I-=b,a&&xc(this)==(this.pa&64)&&(L(this,-2),this.Y|=256))},function(){this.G=this.G&-256|this.aa();this.A-=this.fb},function(){this.I=this.I&-256|this.aa();this.A-=this.fb},function(){this.J=this.J&-256|this.aa();this.A-=this.fb},function(){this.B=this.B&-256|this.aa();this.A-=this.fb},function(){this.G=this.G&255|this.aa()<<8;this.A-=this.fb},function(){this.I=this.I&255|this.aa()<<8;this.A-=this.fb},function(){this.J=
|
||||||
this.J&255|this.aa()<<8;this.A-=this.eb},function(){this.B=this.B&255|this.aa()<<8;this.A-=this.eb},function(){this.G=this.K();this.A-=this.eb},function(){this.I=this.K();this.A-=this.eb},function(){this.J=this.K();this.A-=this.eb},function(){this.B=this.K();this.A-=this.eb},function(){this.X=this.K();this.A-=this.eb},function(){this.H=this.K();this.A-=this.eb},function(){this.F=this.K();this.A-=this.eb},function(){this.D=this.K();this.A-=this.eb},Vg,Wg,Vg,Wg,function(){Q[this.aa()].call(this,Vd)},
|
this.J&255|this.aa()<<8;this.A-=this.fb},function(){this.B=this.B&255|this.aa()<<8;this.A-=this.fb},function(){this.G=this.K();this.A-=this.fb},function(){this.I=this.K();this.A-=this.fb},function(){this.J=this.K();this.A-=this.fb},function(){this.B=this.K();this.A-=this.fb},function(){this.X=this.K();this.A-=this.fb},function(){this.H=this.K();this.A-=this.fb},function(){this.F=this.K();this.A-=this.fb},function(){this.D=this.K();this.A-=this.fb},Vg,Wg,Vg,Wg,function(){Q[this.aa()].call(this,Vd)},
|
||||||
function(){Q[this.aa()].call(this,Ud)},function(){this.Y|=1;Ag[this.aa()].call(this,Ed,this.aa)},function(){this.Y|=1;Bg[this.aa()].call(this,Ed,this.K)},Xg,Yg,Xg,Yg,function(){Nc.call(this,3,null,this.Nj)},function(){var a=this.aa(),b;a:{b=this.Nk[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c][1].call(b[c][0],this.Aa)){b=!1;break a}b=!0}b?Nc.call(this,a,null,0):this.A--},function(){zc(this)?Nc.call(this,4,null,this.Oj):this.A-=this.Pj},function(){dc(this,this.ya(),this.ya());ec(this,this.ya());
|
function(){Q[this.aa()].call(this,Ud)},function(){this.Y|=1;Ag[this.aa()].call(this,Ed,this.aa)},function(){this.Y|=1;Bg[this.aa()].call(this,Ed,this.K)},Xg,Yg,Xg,Yg,function(){Nc.call(this,3,null,this.Pj)},function(){var a=this.aa(),b;a:{b=this.Lk[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c][1].call(b[c][0],this.Aa)){b=!1;break a}b=!0}b?Nc.call(this,a,null,0):this.A--},function(){zc(this)?Nc.call(this,4,null,this.Qj):this.A-=this.Rj},function(){dc(this,this.ya(),this.ya());ec(this,this.ya());
|
||||||
this.Hg&&hc(this,this.Aa);this.A-=this.Lj},function(){Ag[this.aa()].call(this,Fd,wd)},function(){Bg[this.aa()].call(this,Gd,wd)},function(){Ag[this.aa()].call(this,Fd,xd)},function(){Bg[this.aa()].call(this,Gd,xd)},function(){var a=this.aa(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.$=256;this.W=this.fa=b;this.A-=this.qj},function(){var a=this.aa();this.W=this.fa=this.G=(this.G>>8)*a+this.G&255;this.$=256;this.A-=this.pj},function(){this.G=this.G&-256|(uc(this)?255:0);this.A-=2},function(){this.G=
|
this.Ig&&hc(this,this.Aa);this.A-=this.Nj},function(){Ag[this.aa()].call(this,Fd,wd)},function(){Bg[this.aa()].call(this,Gd,wd)},function(){Ag[this.aa()].call(this,Fd,xd)},function(){Bg[this.aa()].call(this,Gd,xd)},function(){var a=this.aa(),b=this.G&255;this.G=(b/a&255)<<8|b%a;this.$=256;this.W=this.fa=b;this.A-=this.sj},function(){var a=this.aa();this.W=this.fa=this.G=(this.G>>8)*a+this.G&255;this.$=256;this.A-=this.rj},function(){this.G=this.G&-256|(uc(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.ok},Zg,Zg,Zg,Zg,Zg,Zg,Zg,Zg,function(){var a=this.L();(this.I=this.I-1&65535)&&this.W&this.$-1?(J(this,this.qa+a),this.A-=this.Wj):this.A-=this.Ih},function(){var a=this.L();!(this.I=this.I-1&65535)||this.W&this.$-1?this.A-=this.Kh:(J(this,this.qa+a),this.A-=this.Jh)},function(){var a=this.L();(this.I=this.I-1&65535)?(J(this,this.qa+a),this.A-=this.Vj):this.A-=this.Ih},function(){var a=this.L();this.I?this.A-=this.Kh:(J(this,this.qa+
|
this.G&-256|this.S(this.C,this.B+(this.G&255)&65535);this.A-=this.qk},Zg,Zg,Zg,Zg,Zg,Zg,Zg,Zg,function(){var a=this.L();(this.I=this.I-1&65535)&&this.W&this.$-1?(J(this,this.qa+a),this.A-=this.Yj):this.A-=this.Jh},function(){var a=this.L();!(this.I=this.I-1&65535)||this.W&this.$-1?this.A-=this.Lh:(J(this,this.qa+a),this.A-=this.Kh)},function(){var a=this.L();(this.I=this.I-1&65535)?(J(this,this.qa+a),this.A-=this.Xj):this.A-=this.Jh},function(){var a=this.L();this.I?this.A-=this.Lh:(J(this,this.qa+
|
||||||
a),this.A-=this.Jh)},function(){var a=this.aa();this.G=this.G&-256|Ya(this.la,a,this.Aa-2);this.A-=this.Ch},function(){var a=this.aa();this.G=Ya(this.la,a,this.Aa-1)|Ya(this.la,a+1&65535,this.Aa-2)<<8;this.A-=this.Ch},function(){var a=this.aa();$a(this.la,a,this.G&255,this.Aa-2);this.A-=this.Rh},function(){var a=this.aa();$a(this.la,a,this.G&255,this.Aa-2);$a(this.la,a+1&65535,this.G>>8,this.Aa-2);this.A-=this.Rh},function(){var a=this.K();M(this,this.qa);J(this,this.qa+a);this.A-=this.uj},function(){var a=
|
a),this.A-=this.Kh)},function(){var a=this.aa();this.G=this.G&-256|Ya(this.la,a,this.Aa-2);this.A-=this.Dh},function(){var a=this.aa();this.G=Ya(this.la,a,this.Aa-1)|Ya(this.la,a+1&65535,this.Aa-2)<<8;this.A-=this.Dh},function(){var a=this.aa();$a(this.la,a,this.G&255,this.Aa-2);this.A-=this.Sh},function(){var a=this.aa();$a(this.la,a,this.G&255,this.Aa-2);$a(this.la,a+1&65535,this.G>>8,this.Aa-2);this.A-=this.Sh},function(){var a=this.K();M(this,this.qa);J(this,this.qa+a);this.A-=this.wj},function(){var a=
|
||||||
this.K();J(this,this.qa+a);this.A-=this.Dh},function(){dc(this,this.K(),this.K());this.A-=this.Rj},function(){var a=this.L();J(this,this.qa+a);this.A-=this.Dh},function(){this.G=this.G&-256|Ya(this.la,this.J,this.Aa-1);this.A-=this.Bh},function(){this.G=Ya(this.la,this.J,this.Aa-1)|Ya(this.la,this.J+1&65535,this.Aa-1)<<8;this.A-=this.Bh},function(){$a(this.la,this.J,this.G&255,this.Aa-1);this.A-=this.Qh},function(){$a(this.la,this.J,this.G&255,this.Aa-1);$a(this.la,this.J+1&65535,this.G>>8,this.Aa-
|
this.K();J(this,this.qa+a);this.A-=this.Eh},function(){dc(this,this.K(),this.K());this.A-=this.Tj},function(){var a=this.L();J(this,this.qa+a);this.A-=this.Eh},function(){this.G=this.G&-256|Ya(this.la,this.J,this.Aa-1);this.A-=this.Ch},function(){this.G=Ya(this.la,this.J,this.Aa-1)|Ya(this.la,this.J+1&65535,this.Aa-1)<<8;this.A-=this.Ch},function(){$a(this.la,this.J,this.G&255,this.Aa-1);this.A-=this.Rh},function(){$a(this.la,this.J,this.G&255,this.Aa-1);$a(this.la,this.J+1&65535,this.G>>8,this.Aa-
|
||||||
1);this.A-=this.Qh},$g,$g,function(){this.Y|=132;this.A-=this.kb},function(){this.Y|=68;this.A-=this.kb},function(){this.Pa|=4;this.A-=2;this.Da&512||kb(this)},function(){uc(this)?Ac(this):Ec(this);this.A-=2},function(){this.fb=-1;Ag[this.aa()].call(this,Id,zd);0<=this.fb&&(this.G=this.fb)},function(){this.fb=-1;Bg[this.aa()].call(this,Jd,zd);0<=this.fb&&(this.G=this.fb,this.J=this.pf)},function(){this.W&=~this.$;this.A-=2},function(){this.W|=this.$;this.A-=2},function(){this.Da&=-513;this.A-=this.sj},
|
1);this.A-=this.Rh},$g,$g,function(){this.Y|=132;this.A-=this.nb},function(){this.Y|=68;this.A-=this.nb},function(){this.Qa|=4;this.A-=2;this.Ea&512||kb(this)},function(){uc(this)?Ac(this):Ec(this);this.A-=2},function(){this.gb=-1;Ag[this.aa()].call(this,Id,zd);0<=this.gb&&(this.G=this.gb)},function(){this.gb=-1;Bg[this.aa()].call(this,Jd,zd);0<=this.gb&&(this.G=this.gb,this.J=this.pf)},function(){this.W&=~this.$;this.A-=2},function(){this.W|=this.$;this.A-=2},function(){this.Ea&=-513;this.A-=this.uj},
|
||||||
function(){this.Da|=512;this.Y|=4;this.A-=2},function(){this.Da&=-1025;this.A-=2},function(){this.Da|=1024;this.A-=2},function(){Ag[this.aa()].call(this,Xb,zd)},function(){Bg[this.aa()].call(this,Zb,zd)}];
|
function(){this.Ea|=512;this.Y|=4;this.A-=2},function(){this.Ea&=-1025;this.A-=2},function(){this.Ea|=1024;this.A-=2},function(){Ag[this.aa()].call(this,Xb,zd)},function(){Bg[this.aa()].call(this,Zb,zd)}];
|
||||||
function R(a){v.call(this,"ChipSet",a,R);this.Fa=a.model;this.Fa=void 0!==this.Fa?parseInt(this.Fa,10):ah;this.Gc=bh(a.sw1,ch|dh.Jk);this.Bd=bh(a.sw2,0);this.Rl=this.Fa==ah?16:64;this.Le=this.Me=1;this.Fa>=eh&&(this.Le=this.Me=2);this.Tf=a.scaleTimers||!1;this.cn=a.rtcDate;this.$i=!1;a.sound&&window&&"webkitAudioContext"in window&&(this.Kg=new webkitAudioContext);this.Ka()}y(v,R);var ah=5150,eh=5170,fh={yi:1},ch=12,dh={mn:16,nn:32,Jk:48,Be:48,vg:4};fh.ONE=0;fh.tn=64;fh.sn=128;fh.pn=192;fh.Be=192;
|
function R(a){v.call(this,"ChipSet",a,R);this.Da=a.model;this.Da=void 0!==this.Da?parseInt(this.Da,10):ah;this.Jc=bh(a.sw1,ch|dh.Kk);this.Cd=bh(a.sw2,0);this.Rl=this.Da==ah?16:64;this.Le=this.Me=1;this.Da>=eh&&(this.Le=this.Me=2,this.pi={Ii:0,Cc:127});this.Tf=a.scaleTimers||!1;this.dn=a.rtcDate;this.cj=!1;a.sound&&window&&"webkitAudioContext"in window&&(this.Lg=new webkitAudioContext);this.Ka()}x(v,R);var ah=5150,eh=5170,fh={Ai:1},ch=12,dh={nn:16,on:32,Kk:48,Be:48,wg:4};fh.ONE=0;fh.un=64;fh.tn=128;
|
||||||
fh.vg=6;var gh={Lk:64,Mk:32,Cd:16,Kk:8,Ai:4,Ik:1},gh={Lk:64,Mk:32,Cd:16,Kk:8,Ai:4,Ik:1};g=R.prototype;
|
fh.qn=192;fh.Be=192;fh.wg=6;g=R.prototype;g.pb=function(a,b,c,d){switch(c){case "sw1":return this.oa[c]=d,gh(this,c,d,this.Jc,{0:this.Da==ah?"Bootable Floppy Drive":"Loop on POST",1:this.Da==ah?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Da==ah)return this.oa[c]=d,gh(this,c,d,this.Cd,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.oa[c]=d,!0}return!1};
|
||||||
g.mb=function(a,b,c,d){switch(c){case "sw1":return this.oa[c]=d,hh(this,c,d,this.Gc,{0:this.Fa==ah?"Bootable Floppy Drive":"Loop on POST",1:this.Fa==ah?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.Fa==ah)return this.oa[c]=d,hh(this,c,d,this.Bd,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.oa[c]=d,!0}return!1};
|
g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;this.Ca=a;this.Wa=D(a,"Keyboard");Xa(b,this,hh);Za(b,this,ih);this.Da<eh?(Xa(b,this,jh),Za(b,this,kh)):(Xa(b,this,lh),Za(b,this,mh));this.rk=Math.round(c.Zc/1193181)};g.Mb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Cb=function(a){return a&&this.save?this.save():!0};
|
||||||
g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;this.Ca=a;this.Va=D(a,"Keyboard");Xa(b,this,ih);Za(b,this,jh);this.Fa<eh?(Xa(b,this,kh),Za(b,this,lh)):(Xa(b,this,mh),Za(b,this,nh));this.pk=Math.round(c.Wc/1193181)};g.Jb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.zb=function(a){return a&&this.save?this.save():!0};
|
g.reset=function(){var a;this.zc=this.Jc;this.ae=this.Cd;nh(this);this.ua=Array(this.Le);for(a=0;a<this.Le;a++)oh(this,a);this.hb=Array(this.Me);ph(this,0,32);1<this.Me&&ph(this,1,160);this.Hg=void 0;this.Ab=Array(3);for(a=0;a<this.Ab.length;a++)qh(this,a);this.Ke=this.Fg=this.Gb=this.If=void 0;this.Hf=0;if(this.Da>=eh){this.Ta=16;this.Oc=0;this.ec=16;this.Df=0;this.Hd=160;512<=rh(this)&&(this.Hd|=16);3==sh(this)&&(this.Hd|=64);this.Dg=3;this.he=0;this.ma=Array(64);a=(a=this.dn)?new Date(a):new Date;
|
||||||
g.reset=function(){var a;this.wc=this.Gc;this.ae=this.Bd;oh(this);this.ua=Array(this.Le);for(a=0;a<this.Le;a++)ph(this,a);this.gb=Array(this.Me);qh(this,0,32);1<this.Me&&qh(this,1,160);this.Gg=void 0;this.xb=Array(3);for(a=0;a<this.xb.length;a++)rh(this,a);this.Ke=this.Eg=this.Db=this.If=void 0;this.Hf=0;if(this.Fa>=eh){this.Sa=16;this.Lc=0;this.bc=gh.Cd;this.Df=0;this.Hd=160;512<=sh(this)&&(this.Hd|=16);3==th(this)&&(this.Hd|=64);this.Cg=3;this.he=0;this.ma=Array(64);a=(a=this.cn)?new Date(a):new Date;
|
this.ma[0]=a.getSeconds();this.ma[1]=0;this.ma[2]=a.getMinutes();this.ma[3]=0;this.ma[4]=a.getHours();this.ma[5]=0;this.ma[6]=a.getDay()+1;this.ma[7]=a.getDate();this.ma[8]=a.getMonth()+1;this.ma[9]=a.getFullYear()%100;this.Ze=-1;this.ma[10]=38;this.ma[11]=2;this.ma[12]=0;this.ma[13]=128;for(a=14;46>a;a++)this.ma[a]=0;this.ma[20]=this.zc&(dh.Be|2|fh.Ai|fh.Be);this.ma[16]=th(this,0)<<4|th(this,1);a=rh(this);this.ma[21]=a&255;this.ma[22]=a>>8;a=0;for(var b=16;46>b;b++)a+=this.ma[b];this.ma[47]=a&255;
|
||||||
this.ma[0]=a.getSeconds();this.ma[1]=0;this.ma[2]=a.getMinutes();this.ma[3]=0;this.ma[4]=a.getHours();this.ma[5]=0;this.ma[6]=a.getDay()+1;this.ma[7]=a.getDate();this.ma[8]=a.getMonth()+1;this.ma[9]=a.getFullYear()%100;this.Ze=-1;this.ma[10]=38;this.ma[11]=2;this.ma[12]=0;this.ma[13]=128;for(a=14;46>a;a++)this.ma[a]=0;this.ma[20]=this.wc&(dh.Be|2|fh.yi|fh.Be);a=0;var b=uh(this);0<b&&(a|=32);1<b&&(a|=2);this.ma[16]=a;a=sh(this);this.ma[21]=a&255;this.ma[22]=a>>8;a=0;for(b=16;46>b;b++)a+=this.ma[b];
|
this.ma[46]=a>>8;this.Ki=0;this.Pb=Array(7)}};
|
||||||
this.ma[47]=a&255;this.ma[46]=a>>8;this.Ii=0;this.Mb=Array(7)}};
|
g.save=function(){var a=new I(this);a.set(0,[this.Jc,this.Cd,this.zc,this.ae]);for(var b=[],c=0;c<this.ua;c++){var d=[],e=this.ua[c];d[0]=e.Cc;d[1]=e.Eg;d[2]=e.Mi;d[3]=e.tb;for(var f=[],l=0;l<e.Ha.length;l++){var k=[],m=e.Ha[l];k[0]=m.Xc;k[1]=m.Fi;k[2]=m.ic;k[3]=m.qb;k[4]=m.Jb;k[5]=m.mode;k[6]=m.rc;k[8]=m.an;k[9]=m.bn;f[l]=k}d[4]=f;b[c]=d}a.set(1,[b]);b=[];for(c=0;c<this.hb.length;c++)d=[],e=this.hb[c],d[0]=e.ff,d[1]=e.Fd,d[2]=e.$c,d[3]=e.hd,d[4]=e.sb,d[5]=e.qc,d[6]=e.Id,d[7]=e.Je,b[c]=d;a.set(2,
|
||||||
g.save=function(){var a=new I(this);a.set(0,[this.Gc,this.Bd,this.wc,this.ae]);for(var b=[],c=0;c<this.ua;c++){var d=[],e=this.ua[c];d[0]=e.fd;d[1]=e.Dg;d[2]=e.Ki;d[3]=e.qb;for(var f=[],l=0;l<e.Ha.length;l++){var k=[],m=e.Ha[l];k[0]=m.Uc;k[1]=m.Ei;k[2]=m.fc;k[3]=m.nb;k[4]=m.Gb;k[5]=m.mode;k[6]=m.oc;k[8]=m.$m;k[9]=m.an;f[l]=k}d[4]=f;b[c]=d}a.set(1,[b]);b=[];for(c=0;c<this.gb.length;c++)d=[],e=this.gb[c],d[0]=e.ff,d[1]=e.Fd,d[2]=e.Xc,d[3]=e.dd,d[4]=e.pb,d[5]=e.nc,d[6]=e.Id,d[7]=e.Je,b[c]=d;a.set(2,
|
[b]);b=[];for(c=0;c<this.Ab.length;c++)d=[],e=this.Ab[c],d[0]=e.ic,d[1]=e.vc,d[2]=e.Jb,d[3]=e.Qe,d[4]=e.Pi,d[5]=e.mode,d[6]=e.qf,d[7]=e.md,d[8]=e.Qd,d[9]=e.Ec,d[10]=e.Ve,d[11]=e.ke,d[12]=e.yd,b[c]=d;a.set(3,[this.Hg,b]);a.set(4,[this.If,this.Gb,this.Fg,this.Ke,this.Hf]);this.Da>=eh&&(a.set(5,[this.Ta,this.Oc,this.ec,this.Df,this.Hd,this.Dg]),a.set(6,[this.he,this.ma,this.Ze]));return a.data()};
|
||||||
[b]);b=[];for(c=0;c<this.xb.length;c++)d=[],e=this.xb[c],d[0]=e.fc,d[1]=e.sc,d[2]=e.Gb,d[3]=e.Qe,d[4]=e.Mi,d[5]=e.mode,d[6]=e.qf,d[7]=e.jd,d[8]=e.Qd,d[9]=e.Ac,d[10]=e.Ve,d[11]=e.ke,d[12]=e.xd,b[c]=d;a.set(3,[this.Gg,b]);a.set(4,[this.If,this.Db,this.Eg,this.Ke,this.Hf]);this.Fa>=eh&&(a.set(5,[this.Sa,this.Lc,this.bc,this.Df,this.Hd,this.Cg]),a.set(6,[this.he,this.ma,this.Ze]));return a.data()};
|
g.restore=function(a){var b,c;b=a[0];this.Jc=b[0];this.Cd=b[1];this.zc=b[2];this.ae=b[3];b=a[1];this.ua=Array(this.Le);for(c=0;c<this.Le;c++)oh(this,c,1==b.length?b[0][c]:b);b=a[2];this.hb=Array(this.Me);for(c=0;c<this.Me;c++)ph(this,c,0===c?32:160,b[0][c]);b=a[3];this.Hg=b[0];this.Ab=Array(3);for(c=0;c<this.Ab.length;c++)qh(this,c,b[1][c]);b=a[4];this.If=b[0];this.Gb=b[1];this.Fg=b[2];this.Ke=b[3];this.Hf=b[4];if(b=a[5])this.Ta=b[0],this.Oc=b[1],this.ec=b[2],this.Df=b[3],this.Hd=b[4],this.Dg=b[5];
|
||||||
g.restore=function(a){var b,c;b=a[0];this.Gc=b[0];this.Bd=b[1];this.wc=b[2];this.ae=b[3];b=a[1];this.ua=Array(this.Le);for(c=0;c<this.Le;c++)ph(this,c,1==b.length?b[0][c]:b);b=a[2];this.gb=Array(this.Me);for(c=0;c<this.Me;c++)qh(this,c,0===c?32:160,b[0][c]);b=a[3];this.Gg=b[0];this.xb=Array(3);for(c=0;c<this.xb.length;c++)rh(this,c,b[1][c]);b=a[4];this.If=b[0];this.Db=b[1];this.Eg=b[2];this.Ke=b[3];this.Hf=b[4];if(b=a[5])this.Sa=b[0],this.Lc=b[1],this.bc=b[2],this.Df=b[3],this.Hd=b[4],this.Cg=b[5];
|
if(b=a[6])this.he=b[0],this.ma=b[1],this.Ze=b[2];return!0};function oh(a,b,c){a=a.ua[b]={};c&&5==c.length||(c=[0,void 0,void 0,0,[]]);a.Cc=c[0];a.Eg=c[1];a.Mi=c[2];a.tb=c[3];a.Yl=b<<2;a.Ha=Array(4);for(b=0;b<a.Ha.length;b++)uh(a,b,c[4][b])}function uh(a,b,c){var d=a.Ha[b]={};if(void 0===c||8!=c.length)c=[!0,[],[],[],[]];d.ea=a;d.hj=b;d.Xc=c[0];d.Fi=c[1];d.ic=c[2];d.qb=c[3];d.Jb=c[4];d.mode=c[5];d.rc=c[6];vh(d,c[8],c[9])}
|
||||||
if(b=a[6])this.he=b[0],this.ma=b[1],this.Ze=b[2];return!0};function ph(a,b,c){a=a.ua[b]={};c&&5==c.length||(c=[0,void 0,void 0,0,[]]);a.fd=c[0];a.Dg=c[1];a.Ki=c[2];a.qb=c[3];a.Yl=b<<2;a.Ha=Array(4);for(b=0;b<a.Ha.length;b++)vh(a,b,c[4][b])}function vh(a,b,c){var d=a.Ha[b]={};if(void 0===c||8!=c.length)c=[!0,[],[],[],[]];d.ea=a;d.ej=b;d.Uc=c[0];d.Ei=c[1];d.fc=c[2];d.nb=c[3];d.Gb=c[4];d.mode=c[5];d.oc=c[6];wh(d,c[8],c[9])}
|
function vh(a,b,c,d){"string"==typeof b&&(b=Da(b));b&&(a.Mf=null,a.an=b.id,a.bn=c,a.Lf=b,a.gh=b[c],a.kg=d)}function ph(a,b,c,d){a=a.hb[b]={};d&&8==d.length||(d=[0,[void 0,void 0,void 0,void 0]]);a.port=c;a.zn=b<<3;a.ff=d[0];a.Fd=d[1];a.$c=d[2];a.hd=d[3];a.sb=d[4];a.qc=d[5];a.Id=d[6];a.Je=d[7]}
|
||||||
function wh(a,b,c,d){"string"==typeof b&&(b=Da(b));b&&(a.Mf=null,a.$m=b.id,a.an=c,a.Lf=b,a.fh=b[c],a.jg=d)}function qh(a,b,c,d){a=a.gb[b]={};d&&8==d.length||(d=[0,[void 0,void 0,void 0,void 0]]);a.port=c;a.yn=b<<3;a.ff=d[0];a.Fd=d[1];a.Xc=d[2];a.dd=d[3];a.pb=d[4];a.nc=d[5];a.Id=d[6];a.Je=d[7]}
|
function qh(a,b,c){a=a.Ab[b]={};if(void 0===c||13!=c.length)c=[[],[],[],[]];a.ic=c[0];a.vc=c[1];a.Jb=c[2];a.Qe=c[3];a.Pi=c[4];a.mode=c[5];a.qf=c[6];a.md=c[7];a.Qd=c[8];a.Ec=c[9];a.Ve=c[10];a.ke=c[11];a.yd=c[12]}function rh(a,b){return((((b?a.Jc:a.zc)&12)>>2)+1)*a.Rl+32*((b?a.Cd:a.ae)&15)}function wh(a,b){var c=b?a.Jc:a.zc;return a.Da!=ah||c&fh.Ai?((c&fh.Be)>>fh.wg)+1:0}function th(a,b){return b<wh(a)?a.Da<eh?1:2:0}function sh(a,b){return((b?a.Jc:a.zc)&dh.Be)>>dh.wg}
|
||||||
function rh(a,b,c){a=a.xb[b]={};if(void 0===c||13!=c.length)c=[[],[],[],[]];a.fc=c[0];a.sc=c[1];a.Gb=c[2];a.Qe=c[3];a.Mi=c[4];a.mode=c[5];a.qf=c[6];a.jd=c[7];a.Qd=c[8];a.Ac=c[9];a.Ve=c[10];a.ke=c[11];a.xd=c[12]}function sh(a,b){return((((b?a.Gc:a.wc)&12)>>2)+1)*a.Rl+32*((b?a.Bd:a.ae)&15)}function uh(a,b){var c=b?a.Gc:a.wc;return a.Fa!=ah||c&fh.yi?((c&fh.Be)>>fh.vg)+1:0}function th(a,b){return((b?a.Gc:a.wc)&dh.Be)>>dh.vg}
|
function gh(a,b,c,d,e){for(var f="",l=1;8>=l;l++){var k="pcjs-bitCell";l||(k+=" pcjs-bitCellLeft");f+='<div id="'+(b+"-"+l)+'" class="'+k+'" data-value="0">'+l+"</div>\n"}c.innerHTML=f;b=B(c,"pcjs-bitCell");c=null;for(l=0;l<b.length;l++)void 0!==e&&void 0!==e[l]&&(c=e[l]),c&&b[l].setAttribute("title",c),xh(b[l],d&1<<l?!1:!0),b[l].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");xh(b,c);var d=b.getAttribute("id").split("-"),e=1<<parseInt(d[1],10)-1;switch(d[0]){case "sw1":a.Jc=
|
||||||
function hh(a,b,c,d,e){for(var f="",l=1;8>=l;l++){var k="pcjs-bitCell";l||(k+=" pcjs-bitCellLeft");f+='<div id="'+(b+"-"+l)+'" class="'+k+'" data-value="0">'+l+"</div>\n"}c.innerHTML=f;b=B(c,"pcjs-bitCell");c=null;for(l=0;l<b.length;l++)void 0!==e&&void 0!==e[l]&&(c=e[l]),c&&b[l].setAttribute("title",c),xh(b[l],d&1<<l?!1:!0),b[l].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");xh(b,c);var d=b.getAttribute("id").split("-"),e=1<<parseInt(d[1],10)-1;switch(d[0]){case "sw1":a.Gc=
|
a.Jc&~e|(c?0:e);break;case "sw2":a.Cd=a.Cd&~e|(c?0:e)}nh(a)}}(a,b[l])}function xh(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function nh(a){var b=a.oa.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(void 0!==b){var d;d=""+(rh(a,!0)+"Kb");d+=", "+c[sh(a,!0)]+" Monitor";d+=", "+wh(a,!0)+" Floppy Drives";if(void 0!==a.zc&&a.zc!=a.Jc||void 0!==a.ae&&a.ae!=a.Cd)d+=" (Reset required)";b.innerHTML=d}}
|
||||||
a.Gc&~e|(c?0:e);break;case "sw2":a.Bd=a.Bd&~e|(c?0:e)}oh(a)}}(a,b[l])}function xh(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function oh(a){var b=a.oa.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(void 0!==b){var d;d=""+(sh(a,!0)+"Kb");d+=", "+c[th(a,!0)]+" Monitor";d+=", "+uh(a,!0)+" Floppy Drives";if(void 0!==a.wc&&a.wc!=a.Gc||void 0!==a.ae&&a.ae!=a.Bd)d+=" (Reset required)";b.innerHTML=d}}
|
function yh(a,b,c){a=a.ua[b];c=a.Ha[c].qb[a.tb];a.tb^=1;return c}function zh(a,b,c,d){a=a.ua[b];c=a.Ha[c];c.qb[a.tb]=c.Fi[a.tb]=d;a.tb^=1}function Ah(a,b,c){a=a.ua[b];c=a.Ha[c].Jb[a.tb];a.tb^=1;return c}function Bh(a,b,c,d){a=a.ua[b];c=a.Ha[c];c.Jb[a.tb]=c.ic[a.tb]=d;a.tb^=1}function Ch(a,b){var c=a.ua[b],d=c.Cc|1;c.Cc&=-16;return d}function Dh(a,b,c){a=a.ua[b];b=c&3;a.Cc=a.Cc&~(16<<b)|(c&4)<<b+2;a.Mi=c}function Eh(a,b,c){b=a.ua[b];var d=c&3,e=b.Ha[d];e.Xc=c&4?!0:!1;e.Xc||Fh(a,b.Yl+d)}
|
||||||
function yh(a,b,c){a=a.ua[b];c=a.Ha[c].nb[a.qb];a.qb^=1;return c}function zh(a,b,c,d){a=a.ua[b];c=a.Ha[c];c.nb[a.qb]=c.Ei[a.qb]=d;a.qb^=1}function Ah(a,b,c){a=a.ua[b];c=a.Ha[c].Gb[a.qb];a.qb^=1;return c}function Bh(a,b,c,d){a=a.ua[b];c=a.Ha[c];c.Gb[a.qb]=c.fc[a.qb]=d;a.qb^=1}function Ch(a,b){var c=a.ua[b],d=c.fd|1;c.fd&=-16;return d}function Dh(a,b,c){a=a.ua[b];b=c&3;a.fd=a.fd&~(16<<b)|(c&4)<<b+2;a.Ki=c}function Eh(a,b,c){b=a.ua[b];var d=c&3,e=b.Ha[d];e.Uc=c&4?!0:!1;e.Uc||Fh(a,b.Yl+d)}
|
function Gh(a,b,c){return a.ua[b].Ha[c].rc}function Hh(a,b,c,d,e){vh(a.ua[b>>2].Ha[b&3],c,d,e)}function Fh(a,b,c){b=a.ua[b>>2].Ha[b&3];b.Lf&&b.gh&&b.kg?(c&&(b.Mf=c),b.Xc||Oc(a,b,!0)):c&&c(!0)}
|
||||||
function Gh(a,b,c){return a.ua[b].Ha[c].oc}function Hh(a,b,c,d,e){wh(a.ua[b>>2].Ha[b&3],c,d,e)}function Fh(a,b,c){b=a.ua[b>>2].Ha[b&3];b.Lf&&b.fh&&b.jg?(c&&(b.Mf=c),b.Uc||Oc(a,b,!0)):c&&c(!0)}
|
function Oc(a,b,c){c&&(b.count=b.Jb[1]<<8|b.Jb[0],b.Hk=b.mode&12,b.dj=b.Tc=!1);for(var d=!1;0<=b.count&&(c=b.rc<<16|b.qb[1]<<8|b.qb[0],4==b.Hk?(d=!0,function(c){b.gh.call(b.Lf,b.kg,-1,function(f,l){0>f&&(b.dj||(b.dj=!0),f=255);b.Xc||Ua(a.la,c,f);(d=l)&&setTimeout(function(){Ih(b)||Oc(a,b)},0)})}(c)):8==b.Hk?(c=Sa(a.la,c),0>b.gh.call(b.Lf,b.kg,c)&&(b.Tc=!0)):b.Tc=!0),!d&&!Ih(b););}
|
||||||
function Oc(a,b,c){c&&(b.count=b.Gb[1]<<8|b.Gb[0],b.Fk=b.mode&12,b.aj=b.Qc=!1);for(var d=!1;0<=b.count&&(c=b.oc<<16|b.nb[1]<<8|b.nb[0],4==b.Fk?(d=!0,function(c){b.fh.call(b.Lf,b.jg,-1,function(f,l){0>f&&(b.aj||(b.aj=!0),f=255);b.Uc||Ua(a.la,c,f);(d=l)&&setTimeout(function(){Ih(b)||Oc(a,b)},0)})}(c)):8==b.Fk?(c=Sa(a.la,c),0>b.fh.call(b.Lf,b.jg,c)&&(b.Qc=!0)):b.Qc=!0),!d&&!Ih(b););}
|
function Ih(a){if(!a.Tc&&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<a.qb[0]&&(a.qb[0]=0,a.qb[1]++,255<a.qb[1]&&(a.qb[1]=0))),!a.Xc))return!1;var b=a.ea;b.Cc=b.Cc&~(16<<a.hj)|1<<a.hj;a.mode&16||(a.Xc=!0,a.Lf=a.kg=null);a.Mf&&(a.Mf(!a.Tc),a.Mf=null);return!0}function Jh(a,b){var c=0,d=a.hb[b];if(void 0!==d.Je)switch(d.Je&3){case 2:c=d.sb;break;case 3:c=d.qc}return c}
|
||||||
function Ih(a){if(!a.Qc&&0<=--a.count&&(a.mode&32?(a.nb[0]--,0>a.nb[0]&&(a.nb[0]=255,a.nb[1]--,0>a.nb[1]&&(a.nb[1]=255))):(a.nb[0]++,255<a.nb[0]&&(a.nb[0]=0,a.nb[1]++,255<a.nb[1]&&(a.nb[1]=0))),!a.Uc))return!1;var b=a.ea;b.fd=b.fd&~(16<<a.ej)|1<<a.ej;a.mode&16||(a.Uc=!0,a.Lf=a.jg=null);a.Mf&&(a.Mf(!a.Qc),a.Mf=null);return!0}function Jh(a,b){var c=0,d=a.gb[b];if(void 0!==d.Je)switch(d.Je&3){case 2:c=d.pb;break;case 3:c=d.nc}return c}
|
function Kh(a,b,c){var d=a.hb[b];if(c&16)d.$c=0,d.Fd[d.$c++]=c,d.hd=0,d.Id=7,d.sb=d.qc=0,d.Je=10;else if(c&8)d.Je=c;else{var e=c&224;if(e&32){var f=0;if(96==(e&96))f=1<<(c&7);else for(c=d.Id+1;;){c&=7;e=1<<c;if(d.qc&e){f=e;break}if(c++==d.Id)break}d.qc&f&&(d.qc&=~f,Lh(a,b))}else 192==e&&(d.Id=c&7)}}function Mh(a,b,c){var d=a.hb[b];d.$c<d.Fd.length?(d.Fd[d.$c++]=c,2==d.$c&&d.Fd[0]&2&&d.$c++,3!=d.$c||d.Fd[0]&1||d.$c++):(d.hd=c,d=a.ja,d.Y|=4,Lh(a,b,b||253!=c?0:6))}
|
||||||
function Kh(a,b,c){var d=a.gb[b];if(c&16)d.Xc=0,d.Fd[d.Xc++]=c,d.dd=0,d.Id=7,d.pb=d.nc=0,d.Je=10;else if(c&8)d.Je=c;else{var e=c&224;if(e&32){var f=0;if(96==(e&96))f=1<<(c&7);else for(c=d.Id+1;;){c&=7;e=1<<c;if(d.nc&e){f=e;break}if(c++==d.Id)break}d.nc&f&&(d.nc&=~f,Lh(a,b))}else 192==e&&(d.Id=c&7)}}function Mh(a,b,c){var d=a.gb[b];d.Xc<d.Fd.length?(d.Fd[d.Xc++]=c,2==d.Xc&&d.Fd[0]&2&&d.Xc++,3!=d.Xc||d.Fd[0]&1||d.Xc++):(d.dd=c,d=a.ia,d.Y|=4,Lh(a,b,b||253!=c?0:6))}
|
function Lh(a,b,c){b=a.hb[b];var d=((b.qc|b.hd)^255)&b.sb;a=a.ja;a.ia&&(a.Qa=d?a.Qa|1:a.Qa&-2);d&&c&&(b.ff=c)}function Nh(a,b,c){var d=b>>3,e=a.hb[d];e.sb|=1<<(b&7);e.ff=c||0;1==d&&(a.hb[0].sb|=4);Lh(a,d)}function Sh(a,b){var c=b>>3,d=a.hb[c],e=1<<(b&7);d.sb&e&&(d.sb&=~e,1!=c||d.sb||(a.hb[0].sb&=-5),Lh(a,c))}
|
||||||
function Lh(a,b,c){b=a.gb[b];var d=((b.nc|b.dd)^255)&b.pb;a=a.ia;a.ja&&(a.Pa=d?a.Pa|1:a.Pa&-2);d&&c&&(b.ff=c)}function Nh(a,b,c){var d=b>>3,e=a.gb[d];e.pb|=1<<(b&7);e.ff=c||0;1==d&&(a.gb[0].pb|=4);Lh(a,d)}function Sh(a,b){var c=b>>3,d=a.gb[c],e=1<<(b&7);d.pb&e&&(d.pb&=~e,1!=c||d.pb||(a.gb[0].pb&=-5),Lh(a,c))}
|
function Mc(a,b){void 0===b&&(b=0);var c=-1,d=a.hb[b];if(d.ff)c=-2,d.ff--;else for(var e=d.sb&((d.qc|d.hd)^255),f=d.Id+1;;){var f=f&7,l=1<<f;if(e&l){c=b||2!=f?d.Fd[1]+f:Mc(a,1);0<=c&&(d.qc|=l,d.sb&=~l);break}if(f++==d.Id)break}return c}function Th(a,b){var c=a.Ab[b];c.md==c.Qd&&Uh(a,b);if(c.Ve)return c.Qe[c.md++];Vh(a,b);return c.Jb[c.md++]}
|
||||||
function Mc(a,b){void 0===b&&(b=0);var c=-1,d=a.gb[b];if(d.ff)c=-2,d.ff--;else for(var e=d.pb&((d.nc|d.dd)^255),f=d.Id+1;;){var f=f&7,l=1<<f;if(e&l){c=b||2!=f?d.Fd[1]+f:Mc(a,1);0<=c&&(d.nc|=l,d.pb&=~l);break}if(f++==d.Id)break}return c}function Th(a,b){var c=a.xb[b];c.jd==c.Qd&&Uh(a,b);if(c.Ve)return c.Qe[c.jd++];Vh(a,b);return c.Gb[c.jd++]}
|
function Wh(a,b,c){var d=a.Ab[b];d.md==d.Qd&&Uh(a,b);d.ic[d.md++]=c;if(d.md==d.Qd){d.ke&&0!=d.mode&&8!=d.mode||(d.Ve=!1,d.Jb[0]=d.vc[0]=d.ic[0],d.Jb[1]=d.vc[1]=d.ic[1],d.yd=pb(a.ja,a.Tf),d.ke=!0,d.Ec=0!=d.mode,0==b&&Sh(a,0));2==b&&qb(a);if(0==b){var e=Xh(a,0);2048<=e&&(a.ja.cg=Math.round(65536/e))}0==b&&0==d.mode&&16==d.qf&&(b=a.ja,b.kc&&(a=b.A-c*a.rk,b.A-=a,b.Yc-=a))}}g.Ql=function(){return null};
|
||||||
function Wh(a,b,c){var d=a.xb[b];d.jd==d.Qd&&Uh(a,b);d.fc[d.jd++]=c;if(d.jd==d.Qd){d.ke&&0!=d.mode&&8!=d.mode||(d.Ve=!1,d.Gb[0]=d.sc[0]=d.fc[0],d.Gb[1]=d.sc[1]=d.fc[1],d.xd=pb(a.ia,a.Tf),d.ke=!0,d.Ac=0!=d.mode,0==b&&Sh(a,0));2==b&&qb(a);if(0==b){var e=Xh(a,0);2048<=e&&(a.ia.cg=Math.round(65536/e))}0==b&&0==d.mode&&16==d.qf&&(b=a.ia,b.hc&&(a=b.A-c*a.pk,b.A-=a,b.Vc-=a))}}g.Ql=function(){return null};
|
g.Tm=function(a,b){this.Hg=b;var c=(b&192)>>6;if(3!=c){var d=b&1,e=b&14,f=b&48;if(f){var l=this.Ab[c];l.qf=f;l.mode=e;l.Pi=d;l.ic=[0,0];l.Jb=[0,0];l.Qe=[0,0];l.Ec=!1;l.Ve=!1;l.ke=!1;Uh(this,c);0==c&&Sh(this,0);2==c&&255==this.hb[0].hd&&77==this.Gb&&(c=this.Ab[0],c.vc[0]=c.ic[0],c.vc[1]=c.ic[1],c.yd=pb(this.ja,this.Tf))}else Vh(this,c),d=this.Ab[c],d.Qe[0]=d.Jb[0],d.Qe[1]=d.Jb[1],d.Ve=!0,Uh(this,c)}};function Xh(a,b){var c=a.Ab[b],d=c.ic[1]<<8|c.ic[0];d||(d=1==c.Qd?256:65536);return d}
|
||||||
g.Sm=function(a,b){this.Gg=b;var c=(b&192)>>6;if(3!=c){var d=b&1,e=b&14,f=b&48;if(f){var l=this.xb[c];l.qf=f;l.mode=e;l.Mi=d;l.fc=[0,0];l.Gb=[0,0];l.Qe=[0,0];l.Ac=!1;l.Ve=!1;l.ke=!1;Uh(this,c);0==c&&Sh(this,0);2==c&&255==this.gb[0].dd&&77==this.Db&&(c=this.xb[0],c.sc[0]=c.fc[0],c.sc[1]=c.fc[1],c.xd=pb(this.ia,this.Tf))}else Vh(this,c),d=this.xb[c],d.Qe[0]=d.Gb[0],d.Qe[1]=d.Gb[1],d.Ve=!0,Uh(this,c)}};function Xh(a,b){var c=a.xb[b],d=c.fc[1]<<8|c.fc[0];d||(d=1==c.Qd?256:65536);return d}
|
function Uh(a,b){var c=a.Ab[b];c.md=32==c.qf?1:0;c.Qd=48==c.qf?2:1}
|
||||||
function Uh(a,b){var c=a.xb[b];c.jd=32==c.qf?1:0;c.Qd=48==c.qf?2:1}
|
function Vh(a,b,c){var d=a.Ab[b];if(d.ke&&(2!=b||a.Gb&1)){var e=pb(a.ja,a.Tf),f=(e-d.yd)/a.rk|0;0>f&&(d.yd=e,f=0);var l=Xh(a,b),k=a.Ab[b],m=k.vc[1]<<8|k.vc[0];m||(m=1==k.Qd?256:65536);k=m-f;0==d.mode?(0>=k&&(k=0),k||(d.Ec=!0,d.ke=!1,b||Nh(a,0))):4==d.mode?(d.Ec=1!=k,0>=k&&(k=l+k,0>=k&&(k=l),d.vc[0]=k&255,d.vc[1]=k>>8,d.yd=e,!b&&d.Ec&&Nh(a,0))):6==d.mode&&(k-=f,0>=k&&(d.Ec=!d.Ec,k=l+k,0>=k&&(k=l),d.vc[0]=k&255,d.vc[1]=k>>8,d.yd=e,!b&&d.Ec&&Nh(a,0)));d.Jb[0]=k&255;d.Jb[1]=k>>8;c&&(a.yd=0)}return d}
|
||||||
function Vh(a,b,c){var d=a.xb[b];if(d.ke&&(2!=b||a.Db&1)){var e=pb(a.ia,a.Tf),f=(e-d.xd)/a.pk|0;0>f&&(d.xd=e,f=0);var l=Xh(a,b),k=a.xb[b],m=k.sc[1]<<8|k.sc[0];m||(m=1==k.Qd?256:65536);k=m-f;0==d.mode?(0>=k&&(k=0),k||(d.Ac=!0,d.ke=!1,b||Nh(a,0))):4==d.mode?(d.Ac=1!=k,0>=k&&(k=l+k,0>=k&&(k=l),d.sc[0]=k&255,d.sc[1]=k>>8,d.xd=e,!b&&d.Ac&&Nh(a,0))):6==d.mode&&(k-=f,0>=k&&(d.Ac=!d.Ac,k=l+k,0>=k&&(k=l),d.sc[0]=k&255,d.sc[1]=k>>8,d.xd=e,!b&&d.Ac&&Nh(a,0)));d.Gb[0]=k&255;d.Gb[1]=k>>8;c&&(a.xd=0)}return d}
|
function sb(a,b){for(var c=0;c<a.Ab.length;c++)Vh(a,c,b);if(a.Da>=eh){var c=0,d=a.ja.Zc,e=pb(a.ja,a.Tf);if(0<=a.Ze&&(c=e-a.Ze,Math.floor(c/d)&&60<=++a.ma[0]&&(a.ma[0]=0,60<=++a.ma[2]&&(a.ma[2]=0,24<=++a.ma[4])))){a.ma[4]=0;a.ma[6]=a.ma[6]%7+1;var f=a.ma[9],l=ja[a.ma[8]-1];28==l&&0===f%4&&(f%100||0===f%400)&&l++;++a.ma[7]>l&&(a.ma[7]=1,12<++a.ma[8]&&(a.ma[8]=1,a.ma[9]=(a.ma[9]+1)%100))}a.Ze=e-c%d}}g.Il=function(){var a=this.If;this.Ke&16&&(this.Gb&128?a=this.zc:this.Wa&&(a=Yh(this.Wa)));return a};
|
||||||
function sb(a,b){for(var c=0;c<a.xb.length;c++)Vh(a,c,b);if(a.Fa>=eh){var c=0,d=a.ia.Wc,e=pb(a.ia,a.Tf);if(0<=a.Ze&&(c=e-a.Ze,Math.floor(c/d)&&60<=++a.ma[0]&&(a.ma[0]=0,60<=++a.ma[2]&&(a.ma[2]=0,24<=++a.ma[4])))){a.ma[4]=0;a.ma[6]=a.ma[6]%7+1;var f=a.ma[9],l=ja[a.ma[8]-1];28==l&&0===f%4&&(f%100||0===f%400)&&l++;++a.ma[7]>l&&(a.ma[7]=1,12<++a.ma[8]&&(a.ma[8]=1,a.ma[9]=(a.ma[9]+1)%100))}a.Ze=e-c%d}}function Yh(a,b){var c=!!(b&2),d=!!(a.Db&2);a.Db=b;c!=d&&qb(a,c)}
|
g.Mm=function(a,b){this.If=b};g.Jl=function(){return this.Gb};g.Nm=function(a,b){Zh(this,b);if(this.Wa){var c=this.Wa,d=b&128?!1:!0,e=b&64?!0:!1;c.Wg!==e&&(c.Wg=c.aj=e);c.Yg!==d&&(c.Yg=d)&&(c.aj?($h(c),c.aj=!1):ai(c))}};function Zh(a,b){var c=!!(b&2),d=!!(a.Gb&2);a.Gb=b;c!=d&&qb(a,c)}g.Kl=function(){var a=0,a=this.Da==ah?this.Gb&4?a|this.ae&15:a|this.ae>>4&1:this.Gb&8?a|this.zc>>4:a|this.zc&15;this.Gb&1&&Vh(this,2).Ec&&(a=this.Gb&2?a|32:a|16);return a};g.Om=function(a,b){this.Fg=b};g.Ll=function(){return this.Ke};
|
||||||
g.Il=function(){var a=this.If;this.Ke&16&&(this.Db&128?a=this.wc:this.Va&&(a=Zh(this.Va)));return a};g.Lm=function(a,b){this.If=b};g.Jl=function(){return this.Db};g.Mm=function(a,b){Yh(this,b);if(this.Va){var c=this.Va,d=b&128?!1:!0,e=b&64?!0:!1;c.Vg!==e&&(c.Vg=c.Yi=e);c.Xg!==d&&(c.Xg=d)&&(c.Yi?($h(c),c.Yi=!1):ai(c))}};g.Kl=function(){var a=0,a=this.Fa==ah?this.Db&4?a|this.ae&15:a|this.ae>>4&1:this.Db&8?a|this.wc>>4:a|this.wc&15;this.Db&1&&Vh(this,2).Ac&&(a=this.Db&2?a|32:a|16);return a};
|
g.Pm=function(a,b){this.Ke=b};g.bl=function(){var a=this.Df;this.Ta&=-258;var b=this.Wa&&Yh(this.Wa,!0);b&&bi(this,b);return a};g.jm=function(a,b){if(this.Ta&8)switch(this.Oc){case 96:this.ec=b;this.Ta=this.Ta&-5|b&4;break;case 209:ci(this,b);break;default:if(this.ec&=-17,this.Wa){var c=-1;switch(b){case 255:c=250,$h(this.Wa)}bi(this,c)}}this.Oc=b;this.Ta&=-9};g.cl=function(){var a=this.Gb&-193;this.Gb^=16;return a};g.km=function(a,b){Zh(this,b)};
|
||||||
g.Nm=function(a,b){this.Eg=b};g.Ll=function(){return this.Ke};g.Om=function(a,b){this.Ke=b};g.dl=function(){var a=this.Df;this.Sa&=-258;var b=this.Va&&Zh(this.Va,!0);b&&bi(this,b);return a};g.jm=function(a,b){if(this.Sa&8)switch(this.Lc){case 96:this.bc=b;this.Sa=this.Sa&-5|b&gh.Ai;break;case 209:ci(this,b);break;default:if(this.bc&=~gh.Cd,this.Va){var c=-1;switch(b){case 255:c=250,$h(this.Va)}bi(this,c)}}this.Lc=b;this.Sa&=-9};g.el=function(){var a=this.Db&-193;this.Db^=16;return a};
|
g.dl=function(){var a=this.Ta&255;this.Ta&256&&(this.Ta|=1,this.Ta&=-257);return a};g.im=function(a,b){this.Oc=b;this.Ta|=8;var c=0;240<=this.Oc&&(c=this.Oc^15,this.Oc=240);switch(this.Oc){case 192:bi(this,this.Hd);break;case 173:this.ec|=16;break;case 174:this.ec&=-17;break;case 170:this.Wa&&ai(this.Wa,!0);this.ec|=16;bi(this,85);ci(this,3);break;case 224:bi(this,this.ec&16?0:1);break;case 240:c&1&&cc(this.ja)}};function bi(a,b){0<=b&&(a.Df=b,a.Ta&=-2,a.Ta|=256)}
|
||||||
g.km=function(a,b){Yh(this,b)};g.fl=function(){var a=this.Sa&255;this.Sa&256&&(this.Sa|=1,this.Sa&=-257);return a};g.im=function(a,b){this.Lc=b;this.Sa|=8;var c=0;240<=this.Lc&&(c=this.Lc^15,this.Lc=240);switch(this.Lc){case 192:bi(this,this.Hd);break;case 173:this.bc|=gh.Cd;break;case 174:this.bc&=~gh.Cd;break;case 170:this.Va&&ai(this.Va,!0);this.bc|=gh.Cd;bi(this,85);ci(this,3);break;case 224:bi(this,this.bc&gh.Cd?0:1);break;case 240:c&1&&cc(this.ia)}};
|
function ci(a,b){a.Dg=b;Na(a.la,!!(b&2));b&1||cc(a.ja)}g.jl=function(){return this.he};g.pm=function(a,b){this.he=b;this.Hf=b&128?0:128};g.kl=function(){var a=this.he&63;if(13>=a){var b=this.ma[a];if(10>a){var c=!1;4!=a&&5!=a||this.ma[11]&2||(b=12>b?b?b:12:(b-=12)?b+128:140,c=!0);this.ma[11]&4||(c&&128<b&&(b-=48),b=b%10|b/10<<4)}else 10==a&&(this.ma[a]^=128);a=b}else a=this.ma[a];return a};
|
||||||
function bi(a,b){0<=b&&(a.Df=b,a.Sa&=-2,a.Sa|=256)}function ci(a,b){a.Cg=b;Na(a.la,!!(b&2));b&1||cc(a.ia)}g.ll=function(){return this.he};g.pm=function(a,b){this.he=b;this.Hf=b&128?0:128};g.ml=function(){var a=this.he&63;if(13>=a){var b=this.ma[a];if(10>a){var c=!1;4!=a&&5!=a||this.ma[11]&2||(b=12>b?b?b:12:(b-=12)?b+128:140,c=!0);this.ma[11]&4||(c&&128<b&&(b-=48),b=b%10|b/10<<4)}else 10==a&&(this.ma[a]^=128);a=b}else a=this.ma[a];return a};
|
g.qm=function(a,b){var c=this.he&63,d=this.ma,e;if(13>=c){if(e=b,10>c){var f=!1;this.ma[11]&4||(e=10*(e>>4)+(e&15),f=!0);if(4==c||5==c)f&&12<e&&(e+=48),this.ma[11]&2||(12>=e?e=12==e?0:e:(e-=116,e=24==e?12:e))}}else e=b;d[c]=e};g.Gl=function(){return this.Ki};g.Jm=function(a,b){this.Ki=b};g.Lm=function(a,b){this.Hf=b};g.vl=function(){return this.pi.Ii};g.Cm=function(a,b){this.pi.Ii=b};g.wl=function(){return this.pi.Cc};
|
||||||
g.qm=function(a,b){var c=this.he&63,d=this.ma,e;if(13>=c){if(e=b,10>c){var f=!1;this.ma[11]&4||(e=10*(e>>4)+(e&15),f=!0);if(4==c||5==c)f&&12<e&&(e+=48),this.ma[11]&2||(12>=e?e=12==e?0:e:(e-=116,e=24==e?12:e))}}else e=b;d[c]=e};g.Gl=function(){return this.Ii};g.Im=function(a,b){this.Ii=b};g.Km=function(a,b){this.Hf=b};function bh(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}
|
function bh(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}function qb(a,b){if(a.Lg){void 0!==b?a.cj=b:b=a.cj&&a.ja&&a.ja.kc;var c=Math.round(1193181/Xh(a,2));if(20>c||2E4<c)b=!1;b?a.Ic?a.Ic.frequency.value=c:(a.Ic=a.Lg.createOscillator(),a.Ic.type=1,a.Ic.connect(a.Lg.destination),a.Ic.frequency.value=c,a.Ic.noteOn(0)):a.Ic&&(a.Ic.noteOff(0),a.Ic.disconnect(),delete a.Ic)}}
|
||||||
function qb(a,b){if(a.Kg){void 0!==b?a.$i=b:b=a.$i&&a.ia&&a.ia.hc;var c=Math.round(1193181/Xh(a,2));if(20>c||2E4<c)b=!1;b?a.Fc?a.Fc.frequency.value=c:(a.Fc=a.Kg.createOscillator(),a.Fc.type=1,a.Fc.connect(a.Kg.destination),a.Fc.frequency.value=c,a.Fc.noteOn(0)):a.Fc&&(a.Fc.noteOff(0),a.Fc.disconnect(),delete a.Fc)}}
|
var hh={0:function(){return yh(this,0,0)},1:function(){return Ah(this,0,0)},2:function(){return yh(this,0,1)},3:function(){return Ah(this,0,1)},4:function(){return yh(this,0,2)},5:function(){return Ah(this,0,2)},6:function(){return yh(this,0,3)},7:function(){return Ah(this,0,3)},8:function(){return Ch(this,0)},32:function(){return Jh(this,0)},33:function(){return this.hb[0].hd},64:function(){return Th(this,0)},65:function(){return Th(this,1)},66:function(){return Th(this,2)},67:R.prototype.Ql,129:function(){return Gh(this,
|
||||||
var ih={0:function(){return yh(this,0,0)},1:function(){return Ah(this,0,0)},2:function(){return yh(this,0,1)},3:function(){return Ah(this,0,1)},4:function(){return yh(this,0,2)},5:function(){return Ah(this,0,2)},6:function(){return yh(this,0,3)},7:function(){return Ah(this,0,3)},8:function(){return Ch(this,0)},32:function(){return Jh(this,0)},33:function(){return this.gb[0].dd},64:function(){return Th(this,0)},65:function(){return Th(this,1)},66:function(){return Th(this,2)},67:R.prototype.Ql,129:function(){return Gh(this,
|
0,2)},130:function(){return Gh(this,0,3)},131:function(){return Gh(this,0,1)},135:function(){return Gh(this,0,0)}},jh={96:R.prototype.Il,97:R.prototype.Jl,98:R.prototype.Kl,99:R.prototype.Ll},lh={96:R.prototype.bl,97:R.prototype.cl,100:R.prototype.dl,112:R.prototype.jl,113:R.prototype.kl,128:R.prototype.Gl,132:function(){return this.Pb[0]},133:function(){return this.Pb[1]},134:function(){return this.Pb[2]},136:function(){return this.Pb[3]},137:function(){return Gh(this,1,2)},138:function(){return Gh(this,
|
||||||
0,2)},130:function(){return Gh(this,0,3)},131:function(){return Gh(this,0,1)},135:function(){return Gh(this,0,0)}},kh={96:R.prototype.Il,97:R.prototype.Jl,98:R.prototype.Kl,99:R.prototype.Ll},mh={96:R.prototype.dl,97:R.prototype.el,100:R.prototype.fl,112:R.prototype.ll,113:R.prototype.ml,128:R.prototype.Gl,132:function(){return this.Mb[0]},133:function(){return this.Mb[1]},134:function(){return this.Mb[2]},136:function(){return this.Mb[3]},137:function(){return Gh(this,1,2)},138:function(){return Gh(this,
|
1,3)},139:function(){return Gh(this,1,1)},140:function(){return this.Pb[4]},141:function(){return this.Pb[5]},142:function(){return this.Pb[6]},143:function(){return Gh(this,1,0)},160:function(){return Jh(this,1)},161:function(){return this.hb[1].hd},192:function(){return yh(this,1,0)},194:function(){return Ah(this,1,0)},196:function(){return yh(this,1,1)},198:function(){return Ah(this,1,1)},200:function(){return yh(this,1,2)},202:function(){return Ah(this,1,2)},204:function(){return yh(this,1,3)},
|
||||||
1,3)},139:function(){return Gh(this,1,1)},140:function(){return this.Mb[4]},141:function(){return this.Mb[5]},142:function(){return this.Mb[6]},143:function(){return Gh(this,1,0)},160:function(){return Jh(this,1)},161:function(){return this.gb[1].dd},192:function(){return yh(this,1,0)},194:function(){return Ah(this,1,0)},196:function(){return yh(this,1,1)},198:function(){return Ah(this,1,1)},200:function(){return yh(this,1,2)},202:function(){return Ah(this,1,2)},204:function(){return yh(this,1,3)},
|
206:function(){return Ah(this,1,3)},208:function(){return Ch(this,1)},500:R.prototype.vl,503:R.prototype.wl},ih={0:function(a,b){zh(this,0,0,b)},1:function(a,b){Bh(this,0,0,b)},2:function(a,b){zh(this,0,1,b)},3:function(a,b){Bh(this,0,1,b)},4:function(a,b){zh(this,0,2,b)},5:function(a,b){Bh(this,0,2,b)},6:function(a,b){zh(this,0,3,b)},7:function(a,b){Bh(this,0,3,b)},8:function(a,b){this.ua[0].Eg=b},9:function(a,b){Dh(this,0,b)},10:function(a,b){Eh(this,0,b)},11:function(a,b){this.ua[0].Ha[b&3].mode=
|
||||||
206:function(){return Ah(this,1,3)},208:function(){return Ch(this,1)},503:function(){return 127}},jh={0:function(a,b){zh(this,0,0,b)},1:function(a,b){Bh(this,0,0,b)},2:function(a,b){zh(this,0,1,b)},3:function(a,b){Bh(this,0,1,b)},4:function(a,b){zh(this,0,2,b)},5:function(a,b){Bh(this,0,2,b)},6:function(a,b){zh(this,0,3,b)},7:function(a,b){Bh(this,0,3,b)},8:function(a,b){this.ua[0].Dg=b},9:function(a,b){Dh(this,0,b)},10:function(a,b){Eh(this,0,b)},11:function(a,b){this.ua[0].Ha[b&3].mode=b},12:function(){this.ua[0].qb=
|
b},12:function(){this.ua[0].tb=0},13:function(){for(var a=this.ua[0],b=0;b<a.Ha.length;b++)uh(a,b)},32:function(a,b){Kh(this,0,b)},33:function(a,b){Mh(this,0,b)},64:function(a,b){Wh(this,0,b)},65:function(a,b){Wh(this,1,b)},66:function(a,b){Wh(this,2,b)},67:R.prototype.Tm,129:function(a,b){this.ua[0].Ha[2].rc=b},130:function(a,b){this.ua[0].Ha[3].rc=b},131:function(a,b){this.ua[0].Ha[1].rc=b},135:function(a,b){this.ua[0].Ha[0].rc=b}},kh={96:R.prototype.Mm,97:R.prototype.Nm,98:R.prototype.Om,99:R.prototype.Pm,
|
||||||
0},13:function(){for(var a=this.ua[0],b=0;b<a.Ha.length;b++)vh(a,b)},32:function(a,b){Kh(this,0,b)},33:function(a,b){Mh(this,0,b)},64:function(a,b){Wh(this,0,b)},65:function(a,b){Wh(this,1,b)},66:function(a,b){Wh(this,2,b)},67:R.prototype.Sm,129:function(a,b){this.ua[0].Ha[2].oc=b},130:function(a,b){this.ua[0].Ha[3].oc=b},131:function(a,b){this.ua[0].Ha[1].oc=b},135:function(a,b){this.ua[0].Ha[0].oc=b}},lh={96:R.prototype.Lm,97:R.prototype.Mm,98:R.prototype.Nm,99:R.prototype.Om,160:R.prototype.Km},
|
160:R.prototype.Lm},mh={96:R.prototype.jm,97:R.prototype.km,100:R.prototype.im,112:R.prototype.pm,113:R.prototype.qm,128:R.prototype.Jm,132:function(a,b){this.Pb[0]=b},133:function(a,b){this.Pb[1]=b},134:function(a,b){this.Pb[2]=b},136:function(a,b){this.Pb[3]=b},137:function(a,b){this.ua[1].Ha[2].rc=b},138:function(a,b){this.ua[1].Ha[3].rc=b},139:function(a,b){this.ua[1].Ha[1].rc=b},140:function(a,b){this.Pb[4]=b},141:function(a,b){this.Pb[5]=b},142:function(a,b){this.Pb[6]=b},143:function(a,b){this.ua[1].Ha[0].rc=
|
||||||
nh={96:R.prototype.jm,97:R.prototype.km,100:R.prototype.im,112:R.prototype.pm,113:R.prototype.qm,128:R.prototype.Im,132:function(a,b){this.Mb[0]=b},133:function(a,b){this.Mb[1]=b},134:function(a,b){this.Mb[2]=b},136:function(a,b){this.Mb[3]=b},137:function(a,b){this.ua[1].Ha[2].oc=b},138:function(a,b){this.ua[1].Ha[3].oc=b},139:function(a,b){this.ua[1].Ha[1].oc=b},140:function(a,b){this.Mb[4]=b},141:function(a,b){this.Mb[5]=b},142:function(a,b){this.Mb[6]=b},143:function(a,b){this.ua[1].Ha[0].oc=
|
b},160:function(a,b){Kh(this,1,b)},161:function(a,b){Mh(this,1,b)},192:function(a,b){zh(this,1,0,b)},194:function(a,b){Bh(this,1,0,b)},196:function(a,b){zh(this,1,1,b)},198:function(a,b){Bh(this,1,1,b)},200:function(a,b){zh(this,1,2,b)},202:function(a,b){Bh(this,1,2,b)},204:function(a,b){zh(this,1,3,b)},206:function(a,b){Bh(this,1,3,b)},208:function(a,b){this.ua[1].Eg=b},210:function(a,b){Dh(this,1,b)},212:function(a,b){Eh(this,1,b)},214:function(a,b){this.ua[1].Ha[b&3].mode=b},216:function(){this.ua[1].tb=
|
||||||
b},160:function(a,b){Kh(this,1,b)},161:function(a,b){Mh(this,1,b)},192:function(a,b){zh(this,1,0,b)},194:function(a,b){Bh(this,1,0,b)},196:function(a,b){zh(this,1,1,b)},198:function(a,b){Bh(this,1,1,b)},200:function(a,b){zh(this,1,2,b)},202:function(a,b){Bh(this,1,2,b)},204:function(a,b){zh(this,1,3,b)},206:function(a,b){Bh(this,1,3,b)},208:function(a,b){this.ua[1].Dg=b},210:function(a,b){Dh(this,1,b)},212:function(a,b){Eh(this,1,b)},214:function(a,b){this.ua[1].Ha[b&3].mode=b},216:function(){this.ua[1].qb=
|
0},218:function(){for(var a=this.ua[1],b=0;b<a.Ha.length;b++)uh(a,b)},500:R.prototype.Cm};u(function(){for(var a=B(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new R(d);A(d,c);nh(d)}});
|
||||||
0},218:function(){for(var a=this.ua[1],b=0;b<a.Ha.length;b++)vh(a,b)}};u(function(){for(var a=B(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new R(d);A(d,c);oh(d)}});function di(a){v.call(this,"ROM",a,di);this.ab=null;this.Fi=a.addr;this.sg=a.size;this.Ok=a.alias;this.rf=a.file;this.fj=a.notify;if(this.rf){a=this.rf;var b=ea(this.rf);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.rf+"&format=bytes&decimal=true");p(a,!0,null,this,di.prototype.dm)}}y(v,di);
|
function di(a){v.call(this,"ROM",a,di);this.bb=null;this.Gi=a.addr;this.tg=a.size;this.Mk=a.alias;this.rf=a.file;this.ij=a.notify;if(this.rf){a=this.rf;var b=ea(this.rf);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.rf+"&format=bytes&decimal=true");p(a,!0,null,this,di.prototype.dm)}}x(v,di);di.prototype.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;ei(this)};di.prototype.Mb=function(){this.Bg&&(this.Fa&&this.Fa.wn(this.Gi,this.tg,this.Bg),delete this.Bg);return!0};di.prototype.Cb=function(){return!0};
|
||||||
di.prototype.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;ei(this)};di.prototype.Jb=function(){this.Ag&&(this.Ea&&this.Ea.vn(this.Fi,this.sg,this.Ag),delete this.Ag);return!0};di.prototype.zb=function(){return!0};
|
di.prototype.dm=function(a,b,c){if(c)C(this,"Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,f=d.data;if(e)this.bb=e;else if(f)for(this.bb=Array(4*f.length),c=b=0;b<f.length;b++)this.bb[c++]=f[b]&255,this.bb[c++]=f[b]>>8&255,this.bb[c++]=f[b]>>16&255,this.bb[c++]=f[b]>>24&255;else this.bb=d;this.Bg=d.symbols;if(!this.bb.length){this.error("Empty ROM: "+a);return}if(1==this.bb.length){this.error(this.bb[0]);return}}catch(l){C(this,
|
||||||
di.prototype.dm=function(a,b,c){if(c)C(this,"Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,f=d.data;if(e)this.ab=e;else if(f)for(this.ab=Array(4*f.length),c=b=0;b<f.length;b++)this.ab[c++]=f[b]&255,this.ab[c++]=f[b]>>8&255,this.ab[c++]=f[b]>>16&255,this.ab[c++]=f[b]>>24&255;else this.ab=d;this.Ag=d.symbols;if(!this.ab.length){this.error("Empty ROM: "+a);return}if(1==this.ab.length){this.error(this.ab[0]);return}}catch(l){C(this,
|
"ROM data error: "+l.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.bb=Array(a.length),d=0;d<a.length;d++)this.bb[d]=parseInt(a[d],16);ei(this)}};function ei(a){if(!Ha(a))if(!a.rf)a.Ka();else if(a.bb&&a.la){if(a.bb.length!=a.tg)Ia(a,"ROM size (0x"+h(a.bb.length)+") does not match specified size (0x"+h(a.tg)+")");else if(fi(a,a.Gi)&&fi(a,a.Mk)){if(a.ij){var b=Da(a.ij,a.id);b&&("ega"==b.Da&&gi(b,a.bb,[8752,12640],8),b.Ka())}delete a.bb}a.Ka()}}
|
||||||
"ROM data error: "+l.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.ab=Array(a.length),d=0;d<a.length;d++)this.ab[d]=parseInt(a[d],16);ei(this)}};function ei(a){if(!Ha(a))if(!a.rf)a.Ka();else if(a.ab&&a.la){if(a.ab.length!=a.sg)Ia(a,"ROM size (0x"+h(a.ab.length)+") does not match specified size (0x"+h(a.sg)+")");else if(fi(a,a.Fi)&&fi(a,a.Ok)){if(a.fj){var b=Da(a.fj,a.id);b&&("ega"==b.Fa&&gi(b,a.ab,[8752,12640],8),b.Ka())}delete a.ab}a.Ka()}}
|
function fi(a,b){if(null==b)return!0;if(Oa(a.la,b,a.tg,!0)){for(var c=0;c<a.bb.length;c++)Ua(a.la,b+c,a.bb[c]);return!0}return!1}u(function(){for(var a=B(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new di(d);A(d,c)}});function hi(a){v.call(this,"RAM",a,hi);this.Cg=a.addr;this.Bd=a.size;this.Vk=a.test;this.Sk=!!this.Bd;this.Of=!1}x(v,hi);hi.prototype.ac=function(a,b,c){this.la=b;this.ja=c;this.Ca=a;this.ia=D(a,"ChipSet");this.Ka()};
|
||||||
function fi(a,b){if(null==b)return!0;if(Oa(a.la,b,a.sg,!0)){for(var c=0;c<a.ab.length;c++)Ua(a.la,b+c,a.ab[c]);return!0}return!1}u(function(){for(var a=B(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new di(d);A(d,c)}});function hi(a){v.call(this,"RAM",a,hi);this.Bg=a.addr;this.Ad=a.size;this.Xk=a.test;this.Uk=!!this.Ad;this.Of=!1}y(v,hi);hi.prototype.Yb=function(a,b,c){this.la=b;this.ia=c;this.Ca=a;this.ja=D(a,"ChipSet");this.Ka()};
|
hi.prototype.Mb=function(a,b){b||this.reset();return!0};hi.prototype.Cb=function(){return!0};hi.prototype.reset=function(){if(!this.Cg&&!this.Sk&&this.ia){var a=1024*rh(this.ia);this.Bd&&a!=this.Bd&&(Ra(this.la,this.Cg,this.Bd),this.Of=!1);this.Bd=a}!this.Of&&this.Bd&&Oa(this.la,this.Cg,this.Bd)&&(this.Of=!0,this.status(Math.floor(this.Bd/1024)+"Kb"));this.Of?this.Vk||Va(this.la,1138,4660):this.error("No RAM allocated")};
|
||||||
hi.prototype.Jb=function(a,b){b||this.reset();return!0};hi.prototype.zb=function(){return!0};hi.prototype.reset=function(){if(!this.Bg&&!this.Uk&&this.ja){var a=1024*sh(this.ja);this.Ad&&a!=this.Ad&&(Qa(this.la,this.Bg,this.Ad),this.Of=!1);this.Ad=a}!this.Of&&this.Ad&&Oa(this.la,this.Bg,this.Ad)&&(this.Of=!0,this.status(Math.floor(this.Ad/1024)+"Kb"));this.Of?this.Xk||Va(this.la,1138,4660):this.error("No RAM allocated")};
|
u(function(){for(var a=B(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hi(d);A(d,c)}});function ii(a){v.call(this,"Keyboard",a,ii);this.Ag={};this.Wl=250;this.Xl=100;this.Ka()}x(v,ii);
|
||||||
u(function(){for(var a=B(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hi(d);A(d,c)}});function ii(a){v.call(this,"Keyboard",a,ii);this.zg={};this.Wl=250;this.Xl=100;this.Ka()}y(v,ii);
|
|
||||||
var ji={esc:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10,0:11,"-":12,"=":13,backspace:14,tab:15,q:16,w:17,e:18,r:19,t:20,y:21,u:22,i:23,o:24,p:25,"[":26,"]":27,enter:28,ctrl:29,a:30,s:31,d:32,f:33,g:34,h:35,j:36,k:37,l:38,";":39,squote:40,bquote:41,lshift:42,bslash:43,z:44,x:45,c:46,v:47,b:48,n:49,m:50,",":51,".":52,"/":53,rshift:54,prtsc:55,alt:56,space:57,"caps-lock":58,f1:59,f2:60,f3:61,f4:62,f5:63,f6:64,f7:65,f8:66,f9:67,f10:68,"num-lock":69,"scroll-lock":70,home:71,"up-arrow":72,"page-up":73,"num-minus":74,
|
var ji={esc:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10,0:11,"-":12,"=":13,backspace:14,tab:15,q:16,w:17,e:18,r:19,t:20,y:21,u:22,i:23,o:24,p:25,"[":26,"]":27,enter:28,ctrl:29,a:30,s:31,d:32,f:33,g:34,h:35,j:36,k:37,l:38,";":39,squote:40,bquote:41,lshift:42,bslash:43,z:44,x:45,c:46,v:47,b:48,n:49,m:50,",":51,".":52,"/":53,rshift:54,prtsc:55,alt:56,space:57,"caps-lock":58,f1:59,f2:60,f3:61,f4:62,f5:63,f6:64,f7:65,f8:66,f9:67,f10:68,"num-lock":69,"scroll-lock":70,home:71,"up-arrow":72,"page-up":73,"num-minus":74,
|
||||||
"left-arrow":75,center:76,"right-arrow":77,"num-plus":78,end:79,"down-arrow":80,"page-down":81,ins:82,del:83},ki={tab:9,esc:27,rshift:224,lshift:240,ctrl:241,alt:242,"caps-lock":244,f1:336,f2:337,f3:338,f4:339,f5:340,f6:341,f7:342,f8:343,f9:344,f10:345,"left-arrow":261,"up-arrow":262,"right-arrow":263,"down-arrow":264,"ctrl-c":3,"ctrl-break":254,"ctrl-alt-del":255},S=[];S[32]=57;S[49]=2;S[33]=61442;S[50]=3;S[64]=61443;S[51]=4;S[35]=61444;S[52]=5;S[36]=61445;S[53]=6;S[37]=61446;S[54]=7;S[94]=61447;
|
"left-arrow":75,center:76,"right-arrow":77,"num-plus":78,end:79,"down-arrow":80,"page-down":81,ins:82,del:83},ki={tab:9,esc:27,rshift:224,lshift:240,ctrl:241,alt:242,"caps-lock":244,f1:336,f2:337,f3:338,f4:339,f5:340,f6:341,f7:342,f8:343,f9:344,f10:345,"left-arrow":261,"up-arrow":262,"right-arrow":263,"down-arrow":264,"ctrl-c":3,"ctrl-break":254,"ctrl-alt-del":255},S=[];S[32]=57;S[49]=2;S[33]=61442;S[50]=3;S[64]=61443;S[51]=4;S[35]=61444;S[52]=5;S[36]=61445;S[53]=6;S[37]=61446;S[54]=7;S[94]=61447;
|
||||||
S[55]=8;S[38]=61448;S[56]=9;S[42]=61449;S[57]=10;S[40]=61450;S[48]=11;S[41]=61451;S[45]=12;S[95]=61452;S[61]=13;S[43]=61453;S[113]=16;S[81]=61456;S[119]=17;S[87]=61457;S[101]=18;S[69]=61458;S[114]=19;S[82]=61459;S[116]=20;S[84]=61460;S[121]=21;S[89]=61461;S[117]=22;S[85]=61462;S[105]=23;S[73]=61463;S[111]=24;S[79]=61464;S[112]=25;S[80]=61465;S[91]=26;S[123]=61466;S[93]=27;S[125]=61467;S[97]=30;S[65]=61470;S[115]=31;S[83]=61471;S[100]=32;S[68]=61472;S[102]=33;S[70]=61473;S[103]=34;S[71]=61474;
|
S[55]=8;S[38]=61448;S[56]=9;S[42]=61449;S[57]=10;S[40]=61450;S[48]=11;S[41]=61451;S[45]=12;S[95]=61452;S[61]=13;S[43]=61453;S[113]=16;S[81]=61456;S[119]=17;S[87]=61457;S[101]=18;S[69]=61458;S[114]=19;S[82]=61459;S[116]=20;S[84]=61460;S[121]=21;S[89]=61461;S[117]=22;S[85]=61462;S[105]=23;S[73]=61463;S[111]=24;S[79]=61464;S[112]=25;S[80]=61465;S[91]=26;S[123]=61466;S[93]=27;S[125]=61467;S[97]=30;S[65]=61470;S[115]=31;S[83]=61471;S[100]=32;S[68]=61472;S[102]=33;S[70]=61473;S[103]=34;S[71]=61474;
|
||||||
S[104]=35;S[72]=61475;S[106]=36;S[74]=61476;S[107]=37;S[75]=61477;S[108]=38;S[76]=61478;S[59]=39;S[58]=61479;S[39]=40;S[34]=61480;S[96]=41;S[126]=61481;S[92]=43;S[124]=61483;S[122]=44;S[90]=61484;S[120]=45;S[88]=61485;S[99]=46;S[67]=61486;S[118]=47;S[86]=61487;S[98]=48;S[66]=61488;S[110]=49;S[78]=61489;S[109]=50;S[77]=61490;S[44]=51;S[60]=61491;S[46]=52;S[62]=61492;S[47]=53;S[63]=61493;S[8]=14;S[9]=15;S[13]=28;S[27]=1;S[240]=42;S[224]=54;S[241]=29;S[242]=56;S[244]=58;S[336]=59;S[337]=60;S[338]=61;
|
S[104]=35;S[72]=61475;S[106]=36;S[74]=61476;S[107]=37;S[75]=61477;S[108]=38;S[76]=61478;S[59]=39;S[58]=61479;S[39]=40;S[34]=61480;S[96]=41;S[126]=61481;S[92]=43;S[124]=61483;S[122]=44;S[90]=61484;S[120]=45;S[88]=61485;S[99]=46;S[67]=61486;S[118]=47;S[86]=61487;S[98]=48;S[66]=61488;S[110]=49;S[78]=61489;S[109]=50;S[77]=61490;S[44]=51;S[60]=61491;S[46]=52;S[62]=61492;S[47]=53;S[63]=61493;S[8]=14;S[9]=15;S[13]=28;S[27]=1;S[240]=42;S[224]=54;S[241]=29;S[242]=56;S[244]=58;S[336]=59;S[337]=60;S[338]=61;
|
||||||
S[339]=62;S[340]=63;S[341]=64;S[342]=65;S[343]=66;S[344]=67;S[345]=68;S[261]=75;S[262]=72;S[263]=77;S[264]=80;S[254]=61766;S[255]=15921491;g=ii.prototype;
|
S[339]=62;S[340]=63;S[341]=64;S[342]=65;S[343]=66;S[344]=67;S[345]=68;S[261]=75;S[262]=72;S[263]=77;S[264]=80;S[254]=61766;S[255]=15921491;g=ii.prototype;
|
||||||
g.mb=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 li(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.va&32?e.va&=-33:b=e.va&12?!1:!mi(e,a);return b},d.onkeyup=function(a){return li(e,a,!1)},!0;default:if(void 0!==ki[c]&&"button"==b)return this.oa[a]=d,d.onclick=function(a,b,c){return function(){a.ia&&a.ia.we();return!mi(a,c)}}(this,c,ki[c]),!0;if(void 0!==ji[c])return this.oa[a]=
|
g.pb=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 li(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.va&32?e.va&=-33:b=e.va&12?!1:!mi(e,a);return b},d.onkeyup=function(a){return li(e,a,!1)},!0;default:if(void 0!==ki[c]&&"button"==b)return this.oa[a]=d,d.onclick=function(a,b,c){return function(){a.ja&&a.ja.we();return!mi(a,c)}}(this,c,ki[c]),!0;if(void 0!==ji[c])return this.oa[a]=
|
||||||
d,b=function(a,b,c){return function(){ni(a,c)}}(this,c,ji[c]),c=function(a,b,c){return function(){ni(a,c)}}(this,c,ji[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;this.Ca=a;this.ja=D(a,"ChipSet")};g.Ka=function(){this.Vk=(this.cl=na("iOS"))||na("Android");return v.prototype.Ka.call(this)};function $h(a){a.Xb=[170];a.ja&&Nh(a.ja,1,4)}
|
d,b=function(a,b,c){return function(){ni(a,c)}}(this,c,ji[c]),c=function(a,b,c){return function(){ni(a,c)}}(this,c,ji[c]|128),"ontouchstart"in window?(d.ontouchstart=b,d.ontouchend=c):(d.onmousedown=b,d.onmouseup=d.onmouseout=c),!0}return!1};g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;this.Ca=a;this.ia=D(a,"ChipSet")};g.Ka=function(){this.Tk=(this.al=na("iOS"))||na("Android");return v.prototype.Ka.call(this)};function $h(a){a.$b=[170];a.ia&&Nh(a.ia,1,4)}
|
||||||
function Zh(a,b){var c=0;a.Xb.length&&(c=a.Xb[0],b&&ai(a));return c}function ai(a,b){0<a.Xb.length&&(b?a.Xb=[]:(a.Xb.shift(),0<a.Xb.length&&a.ja&&Nh(a.ja,1)))}g.Jb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};g.zb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.pd();this.va=0;this.Xb=[];if(this.Hc)for(var a in this.Hc)null!==a.match(/^[0-9]+$/)||this.Hc[a]&&clearTimeout(this.Hc[a]);this.Hc=[];this.tk=this.Zd=0};
|
function Yh(a,b){var c=0;a.$b.length&&(c=a.$b[0],b&&ai(a));return c}function ai(a,b){0<a.$b.length&&(b?a.$b=[]:(a.$b.shift(),0<a.$b.length&&a.ia&&Nh(a.ia,1)))}g.Mb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};g.Cb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.rd();this.va=0;this.$b=[];if(this.Kc)for(var a in this.Kc)null!==a.match(/^[0-9]+$/)||this.Kc[a]&&clearTimeout(this.Kc[a]);this.Kc=[];this.vk=this.Zd=0};
|
||||||
g.save=function(){var a=new I(this);a.set(0,this.si());return a.data()};g.restore=function(a){return this.pd(a[0])};g.pd=function(a){var b=0;void 0===a&&(a=[]);this.Vg=a[b++];this.Xg=a[b];return!0};g.si=function(){var a=0,b=[];b[a++]=this.Vg;b[a]=this.Xg;return b};
|
g.save=function(){var a=new I(this);a.set(0,this.ui());return a.data()};g.restore=function(a){return this.rd(a[0])};g.rd=function(a){var b=0;void 0===a&&(a=[]);this.Wg=a[b++];this.Yg=a[b];return!0};g.ui=function(){var a=0,b=[];b[a++]=this.Wg;b[a]=this.Yg;return b};
|
||||||
function ni(a,b){var c=b&127,d=c==b;if(a.Xb)if(20>a.Xb.length){if(!(!d&&!a.zg[c]||d&&a.zg[c])){a.zg[c]=d;a.Xb.push(b);1==a.Xb.length&&a.ja&&Nh(a.ja,1);for(var e in ji)if(ji[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.Xb.length&&a.Xb.push(255)}function oi(a,b){var c=b?a.Xl:a.Wl;a.ia&&a.ia.Cc&&(c/=a.ia.Cc);return c}function pi(a,b){!a.Zd||void 0!==b&&b==a.Zd||(clearTimeout(a.Hc[a.Zd]),qi(a,a.Zd,!1))}
|
function ni(a,b){var c=b&127,d=c==b;if(a.$b)if(20>a.$b.length){if(!(!d&&!a.Ag[c]||d&&a.Ag[c])){a.Ag[c]=d;a.$b.push(b);1==a.$b.length&&a.ia&&Nh(a.ia,1);for(var e in ji)if(ji[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.$b.length&&a.$b.push(255)}function oi(a,b){var c=b?a.Xl:a.Wl;a.ja&&a.ja.Fc&&(c/=a.ja.Fc);return c}function pi(a,b){!a.Zd||void 0!==b&&b==a.Zd||(clearTimeout(a.Kc[a.Zd]),qi(a,a.Zd,!1))}
|
||||||
function li(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.tk=f);240==f+224?(a.va&=-2,c&&(a.va|=1),f+=224,e=!1):241==f+224?(a.va&=-5,c&&(a.va|=4),f+=224,e=!1):242==f+224?(a.va&=-9,c&&(a.va|=8),f+=224,e=!1):244==f+224?(a.va&=-17,c&&(a.va|=16),f+=224,d=mi(a,f)):91==f?(a.va&=-33,c&&(a.va|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&a.va&4&&(f=254),d=c?!mi(a,f):!1):void 0!==S[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.va&=-33,a.Vk||f!=a.tk||pi(a));void 0===d&&(d=!qi(a,f,c));return d}
|
function li(a,b,c){var d,e=!c,f=b.keyCode;c&&(a.vk=f);240==f+224?(a.va&=-2,c&&(a.va|=1),f+=224,e=!1):241==f+224?(a.va&=-5,c&&(a.va|=4),f+=224,e=!1):242==f+224?(a.va&=-9,c&&(a.va|=8),f+=224,e=!1):244==f+224?(a.va&=-17,c&&(a.va|=16),f+=224,d=mi(a,f)):91==f?(a.va&=-33,c&&(a.va|=32),e=!1,d=!0):9==f||27==f||8==f?(8==f&&a.va&4&&(f=254),d=c?!mi(a,f):!1):void 0!==S[f+224]?f+=224:b.altKey||b.ctrlKey?65<=f&&90>=f&&(f+=32):d=!0;e&&(a.va&=-33,a.Tk||f!=a.vk||pi(a));void 0===d&&(d=!qi(a,f,c));return d}
|
||||||
function mi(a,b,c){var d=!1;pi(a,b);qi(a,b,!0)&&(c?qi(a,b,!1):(c=!1,a.Hc[b]&&(clearTimeout(a.Hc[b]),c=!0),c=oi(a,c),a.Hc[a.Zd=b]=setTimeout(function(a){return function(){qi(a,b,!1)}}(a),c)),d=!0);return d}
|
function mi(a,b,c){var d=!1;pi(a,b);qi(a,b,!0)&&(c?qi(a,b,!1):(c=!1,a.Kc[b]&&(clearTimeout(a.Kc[b]),c=!0),c=oi(a,c),a.Kc[a.Zd=b]=setTimeout(function(a){return function(){qi(a,b,!1)}}(a),c)),d=!0);return d}
|
||||||
function qi(a,b,c){var d=!1;c||(a.Hc[b]=null,a.Zd==b&&(a.Zd=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.va&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.va&17||(d=42):224==f?a.va&18||(d=54):241==f?a.va&4||(d=29):242==f&&(a.va&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;c<b.length;c++)ni(a,b[c]);d=!0}return d}
|
function qi(a,b,c){var d=!1;c||(a.Kc[b]=null,a.Zd==b&&(a.Zd=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.va&12)&&(e=83);b=[];for(b.push(e&255|(c?0:128));e>>=8;){var d=0,f=e&255;240==f?a.va&17||(d=42):224==f?a.va&18||(d=54):241==f?a.va&4||(d=29):242==f&&(a.va&8||(d=56));d&&(c?b.unshift(d):b.push(d|128))}for(c=0;c<b.length;c++)ni(a,b[c]);d=!0}return d}
|
||||||
u(function(){for(var a=B(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ii(d);A(d,c)}});
|
u(function(){for(var a=B(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ii(d);A(d,c)}});
|
||||||
function U(a,b,c,d){v.call(this,"Video",a,U);this.Fa=a.model;this.qc=0;"ega"==this.Fa&&(this.zk=a.switches,this.qc=a.memory||0);this.Ec=a.mode;if(void 0===this.Ec||void 0===V[this.Ec])this.Ec=ri;this.gg=a.charCols;this.th=a.charRows;if(void 0===this.gg||void 0===this.th)this.gg=V[this.Ec][0],this.th=V[this.Ec][1];this.Nc=a.screenWidth;this.ld=a.screenHeight;this.Wk=a.scale;this.Tk=12<=Math.round(this.Nc/this.gg);this.Yk=a.touchScreen;this.jb=b;this.rc=c;this.Ek=d;this.Ra=this.Ub=0;this.bd=[];this.Ic=
|
function U(a,b,c,d){v.call(this,"Video",a,U);this.Da=a.model;this.tc=0;"ega"==this.Da&&(this.Bk=a.switches,this.tc=a.memory||0);this.Hc=a.mode;if(void 0===this.Hc||void 0===V[this.Hc])this.Hc=ri;this.gg=a.charCols;this.uh=a.charRows;if(void 0===this.gg||void 0===this.uh)this.gg=V[this.Hc][0],this.uh=V[this.Hc][1];this.Qc=a.screenWidth;this.od=a.screenHeight;this.Uk=a.scale;this.Rk=12<=Math.round(this.Qc/this.gg);this.Wk=a.touchScreen;this.lb=b;this.uc=c;this.Gk=d;this.Sa=this.Xb=0;this.ed=[];this.Lc=
|
||||||
Array(16);this.Yg=!1;var e=this;this.jb&&(this.jb.onfocus=function(){e.Yg=!0},this.jb.onblur=function(){e.Yg=!1});if(a=a.fontROM)"json"!=ea(a)&&(a=ka()+"/api/v1/dump?file="+a+"&format=bytes"),p(a,!0,null,this,this.em)}y(v,U);
|
Array(16);this.Zg=!1;var e=this;this.lb&&(this.lb.onfocus=function(){e.Zg=!0},this.lb.onblur=function(){e.Zg=!1});if(a=a.fontROM)"json"!=ea(a)&&(a=ka()+"/api/v1/dump?file="+a+"&format=bytes"),p(a,!0,null,this,this.em)}x(v,U);
|
||||||
var si={2:{vh:15700,uh:208,ki:85,li:96},3:{vh:18432,uh:364,ki:85,li:96},4:{vh:21850,uh:364,ki:85,li:96}},ti={6:[1,3,!0],7:[2,3,!0],8:[5,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[5,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},ri=7,V=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];V[ri]=[80,25,1,0,1];V[13]=[320,200,16];V[14]=[640,200,16];V[15]=[640,350,16];V[16]=[640,350,16];V[0]=V[1];V[2]=V[3];V[5]=V[4];var ui=Array(5);ui[0]=[0,0,0,255];ui[1]=[127,192,127,255];
|
var si={2:{wh:15700,vh:208,li:85,mi:96},3:{wh:18432,vh:364,li:85,mi:96},4:{wh:21850,vh:364,li:85,mi:96}},ti={6:[1,3,!0],7:[2,3,!0],8:[5,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[5,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},ri=7,V=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];V[ri]=[80,25,1,0,1];V[13]=[320,200,16];V[14]=[640,200,16];V[15]=[640,350,16];V[16]=[640,350,16];V[0]=V[1];V[2]=V[3];V[5]=V[4];var ui=Array(5);ui[0]=[0,0,0,255];ui[1]=[127,192,127,255];
|
||||||
ui[2]=[127,192,127,255];ui[3]=[127,255,127,255];ui[4]=[127,255,127,255];var vi=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],W=Array(16);W[0]=[0,0,0,255];W[1]=[0,0,170,255];W[2]=[0,170,0,255];W[3]=[0,170,170,255];W[4]=[170,0,0,255];W[5]=[170,0,170,255];W[6]=[170,85,0,255];W[7]=[170,170,170,255];W[8]=[85,85,85,255];W[9]=[85,85,255,255];W[10]=[85,255,85,255];W[11]=[85,255,255,255];W[12]=[255,85,85,255];W[13]=[255,85,255,255];W[14]=[255,255,85,255];W[15]=[255,255,255,255];
|
ui[2]=[127,192,127,255];ui[3]=[127,255,127,255];ui[4]=[127,255,127,255];var vi=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],W=Array(16);W[0]=[0,0,0,255];W[1]=[0,0,170,255];W[2]=[0,170,0,255];W[3]=[0,170,170,255];W[4]=[170,0,0,255];W[5]=[170,0,170,255];W[6]=[170,85,0,255];W[7]=[170,170,170,255];W[8]=[85,85,85,255];W[9]=[85,85,255,255];W[10]=[85,255,85,255];W[11]=[85,255,255,255];W[12]=[255,85,85,255];W[13]=[255,85,255,255];W[14]=[255,255,85,255];W[15]=[255,255,255,255];
|
||||||
var wi=[2,4,6],xi=[3,5,7],yi=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],zi=[0,255,65280,65535,16711680,16711935,16776960,16777215,4278190080,4278190335,4278255360,4278255615,4294901760,4294902015,4294967040,4294967295],X=[0];X[128]=1;X[32768]=2;X[32896]=3;X[8388608]=4;X[8388736]=5;X[8421376]=6;X[8421504]=7;X[2147483648]=8;X[2147483776]=9;X[2147516416]=10;X[2147516544]=11;X[2155872256]=12;X[2155872384]=13;X[2155905024]=14;X[2155905152]=15;
|
var wi=[2,4,6],xi=[3,5,7],yi=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],zi=[0,255,65280,65535,16711680,16711935,16776960,16777215,4278190080,4278190335,4278255360,4278255615,4294901760,4294902015,4294967040,4294967295],X=[0];X[128]=1;X[32768]=2;X[32896]=3;X[8388608]=4;X[8388736]=5;X[8421376]=6;X[8421504]=7;X[2147483648]=8;X[2147483776]=9;X[2147516416]=10;X[2147516544]=11;X[2155872256]=12;X[2155872384]=13;X[2155905024]=14;X[2155905152]=15;
|
||||||
function Ai(a,b,c,d){if(void 0!==b&&(!c||c.length)){var e=Bi[b],f=a.td||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(Ci)];this.Wf=b;this.Ra=e[2];this.Ub=e[3];this.qc=d||e[4];65536<=this.qc&&720896<=this.Ra&&(this.Ub=Math.min(this.qc>>2,32768));this.Pb=c[0];this.Zb=c[1];this.Oe=c[2];this.uf=c[3];this.ic=c[4]&255;this.Vf=c[4]>>8&255;this.Lb=c[5];this.nh=Ci;if(5==b){this.nh=Di;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.qc,Array(this.qc>>2),771,0,4294967295,
|
function Ai(a,b,c,d){if(void 0!==b&&(!c||c.length)){var e=Bi[b],f=a.ud||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(Ci)];this.Wf=b;this.Sa=e[2];this.Xb=e[3];this.tc=d||e[4];65536<=this.tc&&720896<=this.Sa&&(this.Xb=Math.min(this.tc>>2,32768));this.Sb=c[0];this.bc=c[1];this.Oe=c[2];this.uf=c[3];this.lc=c[4]&255;this.Vf=c[4]>>8&255;this.Ob=c[5];this.oh=Ci;if(5==b){this.oh=Di;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.tc,Array(this.tc>>2),771,0,4294967295,
|
||||||
0,4294967295,0,4294967295,0]);this.md=b[0];this.Td=b[1];this.Dd=b[2];this.ti=b[3];this.ag=b[4];this.dh=b[5];this.pe=b[6];this.Bf=b[7];this.gh=b[8];this.hh=b[9];this.oe=b[10];this.de=b[11];this.bb=b[12];d=this.qc>>2;if((this.Gd=b[14])&&this.Gd.length<d){for(var e=this.Gd,l=0,k=Array(d),m=0;m<e.length-1;){for(var n=e[m++],q=e[m++];n--;)k[l]=q,l+=2;l==d&&(l=1)}this.Gd=k}this.rg(b[15]);this.fi=b[16];this.Na=b[17];this.Dc=b[18];this.Qa=b[19];this.ig=b[20];this.wd=b[21];this.Wd=b[22];this.ph=b[23];this.qh=
|
0,4294967295,0,4294967295,0]);this.pd=b[0];this.Td=b[1];this.Dd=b[2];this.vi=b[3];this.ag=b[4];this.eh=b[5];this.pe=b[6];this.Bf=b[7];this.hh=b[8];this.ih=b[9];this.oe=b[10];this.de=b[11];this.cb=b[12];d=this.tc>>2;if((this.Gd=b[14])&&this.Gd.length<d){for(var e=this.Gd,l=0,k=Array(d),m=0;m<e.length-1;){for(var n=e[m++],q=e[m++];n--;)k[l]=q,l+=2;l==d&&(l=1)}this.Gd=k}this.sg(b[15]);this.gi=b[16];this.Oa=b[17];this.Gc=b[18];this.Ra=b[19];this.jg=b[20];this.xd=b[21];this.Wd=b[22];this.qh=b[23];this.rh=
|
||||||
b[24]}f=si[f]||si[3];this.rh=a.ia.Wc/f.vh|0;this.Zl=this.rh*f.ki/100|0;this.nj=this.rh*f.uh;this.am=this.nj*f.li/100|0;this.wh=null==c[7]?0:c[7]}}var Ci=18,Di=25;function Ei(a){return this.Yc(a)|this.Yc(a+1)<<8}function Fi(a,b){this.xc(a,b&255);this.xc(a+1,b>>8&255)}var Y=[,,function(a){a+=this.offset;return(this.ea.bb=this.ka[a])>>this.ea.fi&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.ka[b]>>8:this.ka[b])&255}];
|
b[24]}f=si[f]||si[3];this.sh=a.ja.Zc/f.wh|0;this.Zl=this.sh*f.li/100|0;this.qj=this.sh*f.vh;this.am=this.qj*f.mi/100|0;this.xh=null==c[7]?0:c[7]}}var Ci=18,Di=25;function Ei(a){return this.ad(a)|this.ad(a+1)<<8}function Fi(a,b){this.Ac(a,b&255);this.Ac(a+1,b>>8&255)}var Y=[,,function(a){a+=this.offset;return(this.ea.cb=this.ka[a])>>this.ea.gi&255},function(a){a+=this.offset;var b=a&-2;return(a&1?this.ka[b]>>8:this.ka[b])&255}];
|
||||||
Y[16]=function(a){a+=this.offset;a=this.ka[a];for(var b=this.ea.ph&this.ea.qh,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.ka[c]&~this.ea.Na|(b|b<<8|b<<16|b<<24)&this.ea.Na;d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[16]=function(a){a+=this.offset;a=this.ka[a];for(var b=this.ea.qh&this.ea.rh,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.ka[c]&~this.ea.Oa|(b|b<<8|b<<16|b<<24)&this.ea.Oa;d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
Y[1024]=function(a,b){var c=a+this.offset;b=b>>this.ea.Dc|b<<8-this.ea.Dc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.wd|this.ea.Wd;d=d&this.ea.Na|this.ka[c]&~this.ea.Na;d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[1024]=function(a,b){var c=a+this.offset;b=b>>this.ea.Gc|b<<8-this.ea.Gc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.xd|this.ea.Wd;d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa;d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
Y[1536]=function(a,b){var c=a+this.offset;b=b>>this.ea.Dc|b<<8-this.ea.Dc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.wd|this.ea.Wd;d&=this.ea.bb;d=d&this.ea.Na|this.ka[c]&~this.ea.Na;d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[1536]=function(a,b){var c=a+this.offset;b=b>>this.ea.Gc|b<<8-this.ea.Gc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.xd|this.ea.Wd;d&=this.ea.cb;d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa;d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
Y[2560]=function(a,b){var c=a+this.offset;b=b>>this.ea.Dc|b<<8-this.ea.Dc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.wd|this.ea.Wd;d|=this.ea.bb;d=d&this.ea.Na|this.ka[c]&~this.ea.Na;d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[2560]=function(a,b){var c=a+this.offset;b=b>>this.ea.Gc|b<<8-this.ea.Gc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.xd|this.ea.Wd;d|=this.ea.cb;d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa;d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
Y[3584]=function(a,b){var c=a+this.offset;b=b>>this.ea.Dc|b<<8-this.ea.Dc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.wd|this.ea.Wd;d^=this.ea.bb;d=d&this.ea.Na|this.ka[c]&~this.ea.Na;d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ea.Na&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.ka[d]&~c;c=c&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[d]!=c&&(this.ka[d]=c,this.La=!0)};
|
Y[3584]=function(a,b){var c=a+this.offset;b=b>>this.ea.Gc|b<<8-this.ea.Gc&255;var d;d=(b|b<<8|b<<16|b<<24)&this.ea.xd|this.ea.Wd;d^=this.ea.cb;d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa;d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[768]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.ea.Oa&(d==a?16711935:4278255360);c=(b|b<<8|b<<16|b<<24)&c|this.ka[d]&~c;c=c&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[d]!=c&&(this.ka[d]=c,this.La=!0)};
|
||||||
Y[4096]=function(a){a+=this.offset;var b=this.ka[a]&~this.ea.Na|this.ea.bb&this.ea.Na;this.ka[a]!=b&&(this.ka[a]=b,this.La=!0)};Y[8192]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d&this.ea.Na|this.ka[c]&~this.ea.Na,d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[24576]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d&this.ea.bb,d=d&this.ea.Na|this.ka[c]&~this.ea.Na,d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[4096]=function(a){a+=this.offset;var b=this.ka[a]&~this.ea.Oa|this.ea.cb&this.ea.Oa;this.ka[a]!=b&&(this.ka[a]=b,this.La=!0)};Y[8192]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa,d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[24576]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d&this.ea.cb,d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa,d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
Y[40960]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d|this.ea.bb,d=d&this.ea.Na|this.ka[c]&~this.ea.Na,d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[57344]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d^this.ea.bb,d=d&this.ea.Na|this.ka[c]&~this.ea.Na,d=d&this.ea.Qa|this.ea.bb&~this.ea.Qa;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
Y[40960]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d|this.ea.cb,d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa,d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};Y[57344]=function(a,b){var c=a+this.offset,d=zi[b&15],d=d^this.ea.cb,d=d&this.ea.Oa|this.ka[c]&~this.ea.Oa,d=d&this.ea.Ra|this.ea.cb&~this.ea.Ra;this.ka[c]!=d&&(this.ka[c]=d,this.La=!0)};
|
||||||
function Gi(a){var b=[];if(void 0!==a.Wf){b[0]=a.Pb;b[1]=a.Zb;b[2]=a.Oe;b[3]=a.uf;b[4]=a.ic|a.Vf<<8;b[5]=a.Lb;if(5==a.Wf){var c=[];c[0]=a.md;c[1]=a.Td;c[2]=a.Dd;c[3]=a.ti;c[4]=a.ag;c[5]=a.dh;c[6]=a.pe;c[7]=a.Bf;c[8]=a.gh;c[9]=a.hh;c[10]=a.oe;c[11]=a.de;c[12]=a.bb;c[13]=a.qc;var d;a:if(d=a.Gd){var e=0,f=[];if(void 0!==d[0])for(var l=0;2>l;l++)for(var k=l;k<d.length;){for(var m=d[k],n=k+2;n<d.length&&d[n]===m;)n+=2;f[e++]=n-k>>1;f[e++]=m;k=n}if(f.length<d.length){d=f;break a}}c[14]=d;c[15]=a.mh;c[16]=
|
function Gi(a){var b=[];if(void 0!==a.Wf){b[0]=a.Sb;b[1]=a.bc;b[2]=a.Oe;b[3]=a.uf;b[4]=a.lc|a.Vf<<8;b[5]=a.Ob;if(5==a.Wf){var c=[];c[0]=a.pd;c[1]=a.Td;c[2]=a.Dd;c[3]=a.vi;c[4]=a.ag;c[5]=a.eh;c[6]=a.pe;c[7]=a.Bf;c[8]=a.hh;c[9]=a.ih;c[10]=a.oe;c[11]=a.de;c[12]=a.cb;c[13]=a.tc;var d;a:if(d=a.Gd){var e=0,f=[];if(void 0!==d[0])for(var l=0;2>l;l++)for(var k=l;k<d.length;){for(var m=d[k],n=k+2;n<d.length&&d[n]===m;)n+=2;f[e++]=n-k>>1;f[e++]=m;k=n}if(f.length<d.length){d=f;break a}}c[14]=d;c[15]=a.nh;c[16]=
|
||||||
a.fi;c[17]=a.Na;c[18]=a.Dc;c[19]=a.Qa;c[20]=a.ig;c[21]=a.wd;c[22]=a.Wd;c[23]=a.ph;c[24]=a.qh;b[6]=c}b[7]=a.wh}return b}Ai.prototype.rg=function(a){if(null!=a&&a!=this.mh){var b=a&255,c=Y[b];c||b&1&&(c=Y[1]);var b=a&65280,d=Y[b];d||b&256&&(d=Y[256]);this.Ge||(this.Ge=[null,Ei,null,Fi]);this.Ge[0]=c;this.Ge[2]=d;this.mh=a}};var Bi=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];g=U.prototype;
|
a.gi;c[17]=a.Oa;c[18]=a.Gc;c[19]=a.Ra;c[20]=a.jg;c[21]=a.xd;c[22]=a.Wd;c[23]=a.qh;c[24]=a.rh;b[6]=c}b[7]=a.xh}return b}Ai.prototype.sg=function(a){if(null!=a&&a!=this.nh){var b=a&255,c=Y[b];c||b&1&&(c=Y[1]);var b=a&65280,d=Y[b];d||b&256&&(d=Y[256]);this.Ge||(this.Ge=[null,Ei,null,Fi]);this.Ge[0]=c;this.Ge[2]=d;this.nh=a}};var Bi=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];g=U.prototype;
|
||||||
g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;Xa(b,this,Hi);Za(b,this,Ii);"ega"==this.Fa&&(Xa(b,this,Ji),Za(b,this,Ki));(this.Va=D(a,"Keyboard"))&&this.jb&&this.Va.mb("input",this.Ek?"textarea":"canvas","kbd",this.Ek||this.jb);this.Ef=9;(this.ja=D(a,"ChipSet"))&&this.zk&&(this.Ef=bh(this.zk,this.Ef));this.Va&&this.Yk&&Li(this)};g.mb=function(a,b,c,d){var e=this;switch(c){case "refresh":return this.oa[c]=d,d.onclick=function(){gb(e,!0)},!0}return!1};g.we=function(){this.jb&&this.jb.focus()};
|
g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;Xa(b,this,Hi);Za(b,this,Ii);"ega"==this.Da&&(Xa(b,this,Ji),Za(b,this,Ki));(this.Wa=D(a,"Keyboard"))&&this.lb&&this.Wa.pb("input",this.Gk?"textarea":"canvas","kbd",this.Gk||this.lb);this.Ef=9;(this.ia=D(a,"ChipSet"))&&this.Bk&&(this.Ef=bh(this.Bk,this.Ef));this.Wa&&this.Wk&&Li(this)};g.pb=function(a,b,c,d){var e=this;switch(c){case "refresh":return this.oa[c]=d,d.onclick=function(){gb(e,!0)},!0}return!1};g.we=function(){this.lb&&this.lb.focus()};
|
||||||
function Li(a){var b=a.jb;b&&!a.Ug&&(b.addEventListener("touchstart",function(b){Mi(a,b)},!1),b.addEventListener("touchmove",function(b){Mi(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Ug=!0)}
|
function Li(a){var b=a.lb;b&&!a.Vg&&(b.addEventListener("touchstart",function(b){Mi(a,b)},!1),b.addEventListener("touchmove",function(b){Mi(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Vg=!0)}
|
||||||
function Mi(a,b){a.Yg&&b.preventDefault();var c=0,d=0,e=a.jb;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);c=a.Nc/a.jb.offsetWidth*(b.targetTouches[0].pageX-c)/(a.Nc/3)|0;d=a.ld/a.jb.offsetHeight*(b.targetTouches[0].pageY-d)/(a.ld/3)|0;1!=d?d?mi(a.Va,264,!0):mi(a.Va,262,!0):1!=c&&(c?mi(a.Va,263,!0):mi(a.Va,261,!0))}g.Jb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
function Mi(a,b){a.Zg&&b.preventDefault();var c=0,d=0,e=a.lb;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);c=a.Qc/a.lb.offsetWidth*(b.targetTouches[0].pageX-c)/(a.Qc/3)|0;d=a.od/a.lb.offsetHeight*(b.targetTouches[0].pageY-d)/(a.od/3)|0;1!=d?d?mi(a.Wa,264,!0):mi(a.Wa,262,!0):1!=c&&(c?mi(a.Wa,263,!0):mi(a.Wa,261,!0))}g.Mb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
g.zb=function(a){return a&&this.save?this.save():!0};
|
g.Cb=function(a){return a&&this.save?this.save():!0};
|
||||||
g.reset=function(){var a=!0,b=0;this.ja&&(b=th(this.ja));var c=!1;if(this.Fa)switch(this.Fa){case "ega":var c=!0,d=ti[this.Ef];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.td!==b&&(this.td=b,a=!0);this.xa=null;this.pc=this.Ig=new Ai(this,1);this.Eb=this.Kf=new Ai(this,3);c?(this.ha=new Ai(this,5,null,this.qc),Ni(this)):this.ha=new Ai;Oi(this);this.sd=null;this.Ec=3==b?ri:3;this.Nd=this.jc=-1;this.Md=0;Pi(this,this.Ec);if(this.xa.Ra&&a){a=this.xa.Ra+this.Jg;for(b=this.xa.Ra;b<a;b+=
|
g.reset=function(){var a=!0,b=0;this.ia&&(b=sh(this.ia));var c=!1;if(this.Da)switch(this.Da){case "ega":var c=!0,d=ti[this.Ef];d&&(b=d[0]);b||(b=4);break;case "mda":b=3;break;default:b=2}this.ud!==b&&(this.ud=b,a=!0);this.xa=null;this.sc=this.Jg=new Ai(this,1);this.Hb=this.Kf=new Ai(this,3);c?(this.ha=new Ai(this,5,null,this.tc),Ni(this)):this.ha=new Ai;Oi(this);this.td=null;this.Hc=3==b?ri:3;this.Nd=this.mc=-1;this.Md=0;Pi(this,this.Hc);if(this.xa.Sa&&a){a=this.xa.Sa+this.Kg;for(b=this.xa.Sa;b<a;b+=
|
||||||
2)d=Math.floor(65536*Math.random()),4==this.td?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),Va(this.la,b,c|d<<8);gb(this,!0)}};function Ni(a){a.ha.ag&1?(a.pc=a.Ig,a.Eb=a.ha):(a.pc=a.ha,a.Eb=a.Kf)}g.save=function(){var a=new I(this);a.set(0,Gi(this.Ig));a.set(1,Gi(this.Kf));a.set(2,[this.td,this.Ec,this.sd]);a.set(3,Gi(this.ha));return a.data()};
|
2)d=Math.floor(65536*Math.random()),4==this.ud?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8),Va(this.la,b,c|d<<8);gb(this,!0)}};function Ni(a){a.ha.ag&1?(a.sc=a.Jg,a.Hb=a.ha):(a.sc=a.ha,a.Hb=a.Kf)}g.save=function(){var a=new I(this);a.set(0,Gi(this.Jg));a.set(1,Gi(this.Kf));a.set(2,[this.ud,this.Hc,this.td]);a.set(3,Gi(this.ha));return a.data()};
|
||||||
g.restore=function(a){var b=a[2];this.td=b[0];this.Ec=b[1];this.sd=b[2];this.xa=null;this.pc=this.Ig=new Ai(this,1,a[0]);this.Eb=this.Kf=new Ai(this,3,a[1]);this.ha=new Ai(this,5,a[3],this.qc);this.ha.Pb&&Ni(this);Oi(this);if(!Qi(this))return!1;Ri(this);return!0};
|
g.restore=function(a){var b=a[2];this.ud=b[0];this.Hc=b[1];this.td=b[2];this.xa=null;this.sc=this.Jg=new Ai(this,1,a[0]);this.Hb=this.Kf=new Ai(this,3,a[1]);this.ha=new Ai(this,5,a[3],this.tc);this.ha.Sb&&Ni(this);Oi(this);if(!Qi(this))return!1;Ri(this);return!0};
|
||||||
g.em=function(a,b,c){if(c)C(this,"Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){this.error("Empty font ROM image: "+a);return}if(1==d.length){this.error(d[0]);return}if(8192==d.length)gi(this,d,[0,6144]);else{C(this,"Unrecognized font data length ("+d.length+")");return}}catch(e){C(this,"Font ROM data error: "+e.message);return}this.Ka()}};
|
g.em=function(a,b,c){if(c)C(this,"Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){this.error("Empty font ROM image: "+a);return}if(1==d.length){this.error(d[0]);return}if(8192==d.length)gi(this,d,[0,6144]);else{C(this,"Unrecognized font data length ("+d.length+")");return}}catch(e){C(this,"Font ROM data error: "+e.message);return}this.Ka()}};
|
||||||
function Si(a,b){if(1==b)return a.Ic[0]=W[0],a.Ic[1]=W[7],a.Ic;if(2==b){var c=a.xa.Oe;if(a.xa===a.ha){var d=a.ha.Dd[0],c=d&7;d&16&&(c|=8);18!=a.ha.Dd[1]&&(c|=32)}a.Ic[0]=W[c&15];c=c&32?xi:wi;for(d=0;d<c.length;d++)a.Ic[d+1]=W[c[d]];return a.Ic}if(a.Eb===a.Kf)return W;c=null!=a.ha.Dd[15]?a.ha.Dd:yi;for(d=0;d<a.Ic.length;d++){var e=c[d]||0;a.Ic[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.Ic}function gi(a,b,c,d){a.Cf=b;a.yg=c;a.Rd=d}
|
function Si(a,b){if(1==b)return a.Lc[0]=W[0],a.Lc[1]=W[7],a.Lc;if(2==b){var c=a.xa.Oe;if(a.xa===a.ha){var d=a.ha.Dd[0],c=d&7;d&16&&(c|=8);18!=a.ha.Dd[1]&&(c|=32)}a.Lc[0]=W[c&15];c=c&32?xi:wi;for(d=0;d<c.length;d++)a.Lc[d+1]=W[c[d]];return a.Lc}if(a.Hb===a.Kf)return W;c=null!=a.ha.Dd[15]?a.ha.Dd:yi;for(d=0;d<a.Lc.length;d++){var e=c[d]||0;a.Lc[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.Lc}function gi(a,b,c,d){a.Cf=b;a.zg=c;a.Rd=d}
|
||||||
function Oi(a){var b=!1;if(window&&a.Cf){var c=a.Rd?0:2048,d=a.Rd?a.Rd:9;Ti(a,1,a.yg[0],c,d,14,a.Cf,ui,vi)&&(b=!0);c=Si(a);d=a.Rd?a.Rd:8;Ti(a,3,a.yg[1],0,d,8,a.Cf,c)&&(b=!0);a.Rd&&Ti(a,5,a.yg[0],0,a.Rd,14,a.Cf,c)&&(b=!0)}return b}function Ti(a,b,c,d,e,f,l,k,m){var n=!1;Ui(a,b,c,d,e,f,l,k,m)&&(n=!0);a.Tk&&Ui(a,b<<1,c,d,e,f,l,k,m)&&(n=!0);return n}
|
function Oi(a){var b=!1;if(window&&a.Cf){var c=a.Rd?0:2048,d=a.Rd?a.Rd:9;Ti(a,1,a.zg[0],c,d,14,a.Cf,ui,vi)&&(b=!0);c=Si(a);d=a.Rd?a.Rd:8;Ti(a,3,a.zg[1],0,d,8,a.Cf,c)&&(b=!0);a.Rd&&Ti(a,5,a.zg[0],0,a.Rd,14,a.Cf,c)&&(b=!0)}return b}function Ti(a,b,c,d,e,f,l,k,m){var n=!1;Ui(a,b,c,d,e,f,l,k,m)&&(n=!0);a.Rk&&Ui(a,b<<1,c,d,e,f,l,k,m)&&(n=!0);return n}
|
||||||
function Ui(a,b,c,d,e,f,l,k,m){var n=!1,q=b&1?0:1,s=a.bd[b];s||(s={Nb:e<<q,Ob:f<<q,ce:Array(k.length),Ci:k.slice(),Ce:m,wg:Array(k.length)});for(m=0;m<k.length;m++){var r=k[m],x=s.ce[m]?s.Ci[m]:[];if(r[0]!==x[0]||r[1]!==x[1]||r[2]!==x[2]){var n=s,x=m,K=q,T=c,aa=d,eb=e,fb=f,oc=l,jd=[0,0,0,0],pc=window.document.createElement("canvas");pc.width=n.Nb<<4;pc.height=n.Ob<<4;for(var Oh=pc.getContext("2d"),sa=void 0,rb=void 0,Ra=void 0,qc=8>fb||!aa?fb:8,kd=Oh.createImageData(n.Nb,n.Ob),sa=0;256>sa;sa++){for(Ra=
|
function Ui(a,b,c,d,e,f,l,k,m){var n=!1,q=b&1?0:1,s=a.ed[b];s||(s={Qb:e<<q,Rb:f<<q,ce:Array(k.length),Di:k.slice(),Ce:m,xg:Array(k.length)});for(m=0;m<k.length;m++){var r=k[m],y=s.ce[m]?s.Di[m]:[];if(r[0]!==y[0]||r[1]!==y[1]||r[2]!==y[2]){var n=s,y=m,K=q,T=c,aa=d,db=e,eb=f,nc=l,jd=[0,0,0,0],oc=window.document.createElement("canvas");oc.width=n.Qb<<4;oc.height=n.Rb<<4;for(var Oh=oc.getContext("2d"),sa=void 0,rb=void 0,Qa=void 0,pc=8>eb||!aa?eb:8,kd=Oh.createImageData(n.Qb,n.Rb),sa=0;256>sa;sa++){for(Qa=
|
||||||
0;Ra<fb;Ra++)for(var Qj=n.Ce&&x&1&&Ra>=fb-2,Rj=oc[Ra<qc?T+sa*qc+Ra:aa+sa*qc+Ra-qc],ld=0;ld<=K;ld++)for(rb=0;rb<eb;rb++){var Ph=rb<<K,Qh=(Ra<<K)+ld,Rh=Qj||Rj&128>>(8<=rb&&176<=sa&&223>=sa?7:rb)?r:jd;Vi(kd,Ph,Qh,Rh);K&&Vi(kd,Ph+1,Qh,Rh)}Oh.putImageData(kd,(sa&15)*n.Nb,(sa>>4)*n.Ob)}n.ce[x]="#"+ba(r[0])+ba(r[1])+ba(r[2]);n.Ci[x]=r;n.wg[x]=pc;n=!0}}a.bd[b]=s;return n}function Wi(a){0<a.Md||0<=a.jc?0>a.Nd&&(a.Nd=0):a.Nd=-1}
|
0;Qa<eb;Qa++)for(var Qj=n.Ce&&y&1&&Qa>=eb-2,Rj=nc[Qa<pc?T+sa*pc+Qa:aa+sa*pc+Qa-pc],ld=0;ld<=K;ld++)for(rb=0;rb<db;rb++){var Ph=rb<<K,Qh=(Qa<<K)+ld,Rh=Qj||Rj&128>>(8<=rb&&176<=sa&&223>=sa?7:rb)?r:jd;Vi(kd,Ph,Qh,Rh);K&&Vi(kd,Ph+1,Qh,Rh)}Oh.putImageData(kd,(sa&15)*n.Qb,(sa>>4)*n.Rb)}n.ce[y]="#"+ba(r[0])+ba(r[1])+ba(r[2]);n.Di[y]=r;n.xg[y]=oc;n=!0}}a.ed[b]=s;return n}function Wi(a){0<a.Md||0<=a.mc?0>a.Nd&&(a.Nd=0):a.Nd=-1}
|
||||||
function Ri(a){if(a.tb){for(var b=10;15>=b;b++)if(null==a.xa.Lb[b])return;var c=a.xa.Lb[10],b=c&31,d=a.xa.Lb[11]&31,e=a.xa.Lb[9]&31,f=!1;a.xa===a.ha&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Xi(a);else{c=a.xa.Lb[15]+((a.xa.Lb[14]&63)<<8);a.jc!=c&&(Xi(a),a.jc=c);d=d-b+1;if(a.Gk!=b||a.Ri!=d)a.Gk=b,a.Ri=d;a.kd=e+1;Wi(a)}}}
|
function Ri(a){if(a.wb){for(var b=10;15>=b;b++)if(null==a.xa.Ob[b])return;var c=a.xa.Ob[10],b=c&31,d=a.xa.Ob[11]&31,e=a.xa.Ob[9]&31,f=!1;a.xa===a.ha&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Xi(a);else{c=a.xa.Ob[15]+((a.xa.Ob[14]&63)<<8);a.mc!=c&&(Xi(a),a.mc=c);d=d-b+1;if(a.Ik!=b||a.Ui!=d)a.Ik=b,a.Ui=d;a.nd=e+1;Wi(a)}}}
|
||||||
function Xi(a){if(0<=a.jc){if(void 0!==a.Bb){var b=a.Bb[a.jc];if(b&131072){var b=b&-131073,c=a.jc%a.cb,d=Math.floor(a.jc/a.cb);a.tb&&a.bd[a.tb]&&(a.je&&Yi(a,c,d,b,a.je),Yi(a,c,d,b));a.Bb[a.jc]=b}}a.jc=-1}}
|
function Xi(a){if(0<=a.mc){if(void 0!==a.Eb){var b=a.Eb[a.mc];if(b&131072){var b=b&-131073,c=a.mc%a.eb,d=Math.floor(a.mc/a.eb);a.wb&&a.ed[a.wb]&&(a.je&&Yi(a,c,d,b,a.je),Yi(a,c,d,b));a.Eb[a.mc]=b}}a.mc=-1}}
|
||||||
function Zi(a){var b;a=a.xa;var c=a.de[5];if(null!=c){b=2;var d=512,e=a.de[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.Dc=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.zd=function(a){var b=this.xa;null!=a&&b&&a!=b.mh&&(b.rg(a),this.la.rg(b.Ra,b.Ub,b.Ge))};
|
function Zi(a){var b;a=a.xa;var c=a.de[5];if(null!=c){b=2;var d=512,e=a.de[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.Gc=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.Ad=function(a){var b=this.xa;null!=a&&b&&a!=b.nh&&(b.sg(a),this.la.sg(b.Sa,b.Xb,b.Ge))};
|
||||||
function Qi(a,b){var c,d=a.sd,e=a.xa;if(e)if(1==e.Wf)d=ri;else if(5==e.Wf){var d=null,f=e.qc>>2,l=32768<f?32768:f,k=e.de[6];if(null!=k){switch(k&12){case 0:e.Ra=655360;e.Ub=f;d=255;break;case 4:e.Ra=655360;e.Ub=f;d=3==a.td?15:16;break;case 8:e.Ra=720896;e.Ub=l;d=ri;break;case 12:e.Ra=753664,e.Ub=l,d=3==a.td?2:3}c=e.Bf[1]&8;f=e.Lb[6]|(e.Lb[7]&1)<<8;255!=d&&(k&1?753664==e.Ra?d=c?7-d:6:350>f&&(d=c?13:14):c&&(d-=2));c=Zi(a)}}else e.Zb&8&&(e.Zb&2?(d=e.Zb&16?6:5,e.Zb&4||(d-=1)):(d=e.Zb&1?3:1,e.Zb&4&&(d-=
|
function Qi(a,b){var c,d=a.td,e=a.xa;if(e)if(1==e.Wf)d=ri;else if(5==e.Wf){var d=null,f=e.tc>>2,l=32768<f?32768:f,k=e.de[6];if(null!=k){switch(k&12){case 0:e.Sa=655360;e.Xb=f;d=255;break;case 4:e.Sa=655360;e.Xb=f;d=3==a.ud?15:16;break;case 8:e.Sa=720896;e.Xb=l;d=ri;break;case 12:e.Sa=753664,e.Xb=l,d=3==a.ud?2:3}c=e.Bf[1]&8;f=e.Ob[6]|(e.Ob[7]&1)<<8;255!=d&&(k&1?753664==e.Sa?d=c?7-d:6:350>f&&(d=c?13:14):c&&(d-=2));c=Zi(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.sd=null,null==d&&(d=a.Ec);if(!Pi(a,d,b))return!1;a.zd(c);return!0}
|
1)));else a.td=null,null==d&&(d=a.Hc);if(!Pi(a,d,b))return!1;a.Ad(c);return!0}
|
||||||
function Pi(a,b,c){if(null!=b&&(b!=a.sd||c)){a.Pk=0;a.sd=b;b=a.xa||(b==ri?a.pc:a.Eb);if(b!=a.xa||b.Ra!=a.Ra||b.Ub!=a.Ub){Xi(a);if(a.Ra){if(!Qa(a.la,a.Ra,a.Ub))return!1;a.xa&&(a.xa.Pb=!1)}a.xa=b;b.Pb=!0;a.Ra=b.Ra;a.Ub=b.Ub;if(!Oa(a.la,b.Ra,b.Ub,!1,b===a.ha?b:null))return!1}a.tb=0;a.cb=a.gg;a.Sb=a.th;a.oh=V[ri][2];b=0;var d=V[a.sd];d&&(a.cb=d[0],a.Sb=d[1],a.oh=d[2],b=d[3]||0,a.tb=d[4],4==a.td&&a.xa===a.ha&&3==a.tb&&(7==a.ha.Lb[9]?a.Sb=43:a.tb=5));a.kj=a.cb*a.Sb;a.dg=a.kj/a.oh;a.Jg=(a.dg<<1)+b;a.Pi=
|
function Pi(a,b,c){if(null!=b&&(b!=a.td||c)){a.Nk=0;a.td=b;b=a.xa||(b==ri?a.sc:a.Hb);if(b!=a.xa||b.Sa!=a.Sa||b.Xb!=a.Xb){Xi(a);if(a.Sa){if(!Ra(a.la,a.Sa,a.Xb))return!1;a.xa&&(a.xa.Sb=!1)}a.xa=b;b.Sb=!0;a.Sa=b.Sa;a.Xb=b.Xb;if(!Oa(a.la,b.Sa,b.Xb,!1,b===a.ha?b:null))return!1}a.wb=0;a.eb=a.gg;a.Vb=a.uh;a.ph=V[ri][2];b=0;var d=V[a.td];d&&(a.eb=d[0],a.Vb=d[1],a.ph=d[2],b=d[3]||0,a.wb=d[4],4==a.ud&&a.xa===a.ha&&3==a.wb&&(7==a.ha.Ob[9]?a.Vb=43:a.wb=5));a.nj=a.eb*a.Vb;a.dg=a.nj/a.ph;a.Kg=(a.dg<<1)+b;a.Si=
|
||||||
b?a.Jg+b>>1:0;13<=a.sd&&(a.dg<<=1);a.bd.length&&(a.Oc=Math.floor(a.Nc/a.cb),a.Pc=Math.floor(a.ld/a.Sb),a.tb?(b=a.bd[a.tb],d=a.bd[a.tb<<1],a.Wk&&80==a.cb?d&&a.Oc>=3*d.Nb>>2&&(a.tb<<=1,b=d):(d&&a.Oc>=d.Nb&&(a.tb<<=1,b=d),b&&(a.Oc=b.Nb,a.Pc=b.Ob)),a.Re=a.Se=0,b&&(a.Re=a.cb*b.Nb,a.Se=a.Sb*b.Ob)):(a.Oc=a.Pc=1,a.Re=a.cb,a.Se=a.Sb),a.Yf=a.rc.createImageData(a.Re,a.Se),a.ie=window.document.createElement("canvas"),a.ie.width=a.Re,a.ie.height=a.Se,a.je=a.ie.getContext("2d"),a.wi=a.xi=0,a.Lg=a.Nc,a.Mg=a.ld,
|
b?a.Kg+b>>1:0;13<=a.td&&(a.dg<<=1);a.ed.length&&(a.Rc=Math.floor(a.Qc/a.eb),a.Sc=Math.floor(a.od/a.Vb),a.wb?(b=a.ed[a.wb],d=a.ed[a.wb<<1],a.Uk&&80==a.eb?d&&a.Rc>=3*d.Qb>>2&&(a.wb<<=1,b=d):(d&&a.Rc>=d.Qb&&(a.wb<<=1,b=d),b&&(a.Rc=b.Qb,a.Sc=b.Rb)),a.Re=a.Se=0,b&&(a.Re=a.eb*b.Qb,a.Se=a.Vb*b.Rb)):(a.Rc=a.Sc=1,a.Re=a.eb,a.Se=a.Vb),a.Yf=a.uc.createImageData(a.Re,a.Se),a.ie=window.document.createElement("canvas"),a.ie.width=a.Re,a.ie.height=a.Se,a.je=a.ie.getContext("2d"),a.yi=a.zi=0,a.Mg=a.Qc,a.Ng=a.od,
|
||||||
b=a.Nc-a.cb*a.Oc,d=a.ld-a.Sb*a.Pc,0<b&&(a.wi=b>>1,a.Lg-=b),0<d&&(a.xi=d>>1,a.Mg-=d),b||d)&&(a.rc.fillStyle=a.jb.style.backgroundColor,a.rc.fillRect(0,0,a.Nc,a.ld));!1!==c?gb(a,!0):$i(a,!0)}return!0}function Vi(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 $i(a,b){var c;if(b){if(c=a.dg,void 0===a.Bb||a.Bb.length!=c)a.Bb=Array(c)}else{if(void 0===a.Bb)return;c=a.Bb.length}for(var d=0;d<c;d++)a.Bb[d]=-1;a.Md=-1}
|
b=a.Qc-a.eb*a.Rc,d=a.od-a.Vb*a.Sc,0<b&&(a.yi=b>>1,a.Mg-=b),0<d&&(a.zi=d>>1,a.Ng-=d),b||d)&&(a.uc.fillStyle=a.lb.style.backgroundColor,a.uc.fillRect(0,0,a.Qc,a.od));!1!==c?gb(a,!0):$i(a,!0)}return!0}function Vi(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 $i(a,b){var c;if(b){if(c=a.dg,void 0===a.Eb||a.Eb.length!=c)a.Eb=Array(c)}else{if(void 0===a.Eb)return;c=a.Eb.length}for(var d=0;d<c;d++)a.Eb[d]=-1;a.Md=-1}
|
||||||
function Yi(a,b,c,d,e){var f=d&255,l=d>>8;d=l&15;var k=a.bd[a.tb];k.Ce&&(d=k.Ce[d]);var m=l>>4&15;k.Ce&&(m=k.Ce[m]);e?(b*=k.Nb,c*=k.Ob,e.fillStyle=k.ce[m],e.fillRect(b,c,k.Nb,k.Ob)):(b=b*a.Oc+a.wi,c=c*a.Pc+a.xi,a.rc.fillStyle=k.ce[m],a.rc.fillRect(b,c,a.Oc,a.Pc));l&256&&(m=(f&15)*k.Nb,f=(f>>4)*k.Ob,e?e.drawImage(k.wg[d],m,f,k.Nb,k.Ob,b,c,k.Nb,k.Ob):a.rc.drawImage(k.wg[d],m,f,k.Nb,k.Ob,b,c,a.Oc,a.Pc));l&512&&(f=a.Gk,l=a.Ri,e?(a.kd&&a.kd!==k.Ob&&(f=Math.floor(f*k.Ob/a.kd),l=Math.floor(l*k.Ob/a.kd)),
|
function Yi(a,b,c,d,e){var f=d&255,l=d>>8;d=l&15;var k=a.ed[a.wb];k.Ce&&(d=k.Ce[d]);var m=l>>4&15;k.Ce&&(m=k.Ce[m]);e?(b*=k.Qb,c*=k.Rb,e.fillStyle=k.ce[m],e.fillRect(b,c,k.Qb,k.Rb)):(b=b*a.Rc+a.yi,c=c*a.Sc+a.zi,a.uc.fillStyle=k.ce[m],a.uc.fillRect(b,c,a.Rc,a.Sc));l&256&&(m=(f&15)*k.Qb,f=(f>>4)*k.Rb,e?e.drawImage(k.xg[d],m,f,k.Qb,k.Rb,b,c,k.Qb,k.Rb):a.uc.drawImage(k.xg[d],m,f,k.Qb,k.Rb,b,c,a.Rc,a.Sc));l&512&&(f=a.Ik,l=a.Ui,e?(a.nd&&a.nd!==k.Rb&&(f=Math.floor(f*k.Rb/a.nd),l=Math.floor(l*k.Rb/a.nd)),
|
||||||
e.fillStyle=k.ce[d],e.fillRect(b,c+f,k.Nb,l)):(a.kd&&a.kd!==a.Pc&&(f=Math.floor(f*a.Pc/a.kd),l=Math.floor(l*a.Pc/a.kd)),a.rc.fillStyle=k.ce[d],a.rc.fillRect(b,c+f,a.Oc,l)))}
|
e.fillStyle=k.ce[d],e.fillRect(b,c+f,k.Qb,l)):(a.nd&&a.nd!==a.Sc&&(f=Math.floor(f*a.Sc/a.nd),l=Math.floor(l*a.Sc/a.nd)),a.uc.fillStyle=k.ce[d],a.uc.fillRect(b,c+f,a.Rc,l)))}
|
||||||
function gb(a,b){if(a.rb){var c=!1;a.xa&&(a.xa===a.ha?a.ha.Td&32&&(c=!0):a.xa.Zb&8&&(c=!0));if(c||b){if(b)$i(a,!0);else if(void 0===a.Bb)return;var d=!1;!(b||++a.Pk&15)&&0<=a.Nd&&(a.Nd++,d=!0);var e=0,f=a.kj,c=a.xa.Ra,l=c+a.xa.Ub,k=(a.xa.Lb[12]<<8)+a.xa.Lb[13];a.tb&&(k<<=1);var c=c+k,m=a.Jg;c+m>l&&(m=l-c,0>m&&(m=0));l=c+m;if(k=!b){for(var k=a.la,n=!0,q=c>>k.yb;0<m&&q<k.wa.length;)k.wa[q].La&&(k.wa[q].La=n=!1,k.wa[q].Vi=!0),m-=k.dc,q++;k=n}if(k){if(!d)return;if(!a.Md){if(0>a.jc)return;e=a.jc;f=e+1}}if(a.tb){if(a.bd[a.tb]){d=
|
function gb(a,b){if(a.ub){var c=!1;a.xa&&(a.xa===a.ha?a.ha.Td&32&&(c=!0):a.xa.bc&8&&(c=!0));if(c||b){if(b)$i(a,!0);else if(void 0===a.Eb)return;var d=!1;!(b||++a.Nk&15)&&0<=a.Nd&&(a.Nd++,d=!0);var e=0,f=a.nj,c=a.xa.Sa,l=c+a.xa.Xb,k=(a.xa.Ob[12]<<8)+a.xa.Ob[13];a.wb&&(k<<=1);var c=c+k,m=a.Kg;c+m>l&&(m=l-c,0>m&&(m=0));l=c+m;if(k=!b){for(var k=a.la,n=!0,q=c>>k.Bb;0<m&&q<k.wa.length;)k.wa[q].La&&(k.wa[q].La=n=!1,k.wa[q].Yi=!0),m-=k.gc,q++;k=n}if(k){if(!d)return;if(!a.Md){if(0>a.mc)return;e=a.mc;f=e+1}}if(a.wb){if(a.ed[a.wb]){d=
|
||||||
0;k=a.Md=0;m=1048575;a.xa.Zb&32&&(k=32768,m&=~k,a.Nd&2||(m&=-65537));for(c+=e<<1;c<l&&e<f;)n=Ta(a.la,c),n|=65536,n&k&&(a.Md++,n&=m),e==a.jc&&(n|=a.Nd&1?131072:0),q=a.Bb[e],q!=n&&(Yi(a,e%a.cb,Math.floor(e/a.cb),n,a.je),a.Bb[e]=n,d++),c+=2,e++;d&&a.je&&a.rc.drawImage(a.ie,0,0,a.Re,a.Se,a.wi,a.xi,a.Lg,a.Mg);Wi(a)}}else if(a.Pi){for(var f=l,s,r,e=c,l=a.Md=0,d=a.oh,k=16==d?65536:196608,m=16==d?1:2,n=Si(a,m),x=q=0,K=a.cb,T=0,aa=a.Sb,eb=0;e<f;){s=Ta(a.la,e);r=a.Bb[l];if(r===s)q+=d;else{a.Bb[l]=s;s=s>>8|
|
0;k=a.Md=0;m=1048575;a.xa.bc&32&&(k=32768,m&=~k,a.Nd&2||(m&=-65537));for(c+=e<<1;c<l&&e<f;)n=Ta(a.la,c),n|=65536,n&k&&(a.Md++,n&=m),e==a.mc&&(n|=a.Nd&1?131072:0),q=a.Eb[e],q!=n&&(Yi(a,e%a.eb,Math.floor(e/a.eb),n,a.je),a.Eb[e]=n,d++),c+=2,e++;d&&a.je&&a.uc.drawImage(a.ie,0,0,a.Re,a.Se,a.yi,a.zi,a.Mg,a.Ng);Wi(a)}}else if(a.Si){for(var f=l,s,r,e=c,l=a.Md=0,d=a.ph,k=16==d?65536:196608,m=16==d?1:2,n=Si(a,m),y=q=0,K=a.eb,T=0,aa=a.Vb,db=0;e<f;){s=Ta(a.la,e);r=a.Eb[l];if(r===s)q+=d;else{a.Eb[l]=s;s=s>>8|
|
||||||
(s&255)<<8;r=k;var fb=16;q<K&&(K=q);for(var oc=0;oc<d;oc++){var jd=(s&(r>>=m))>>(fb-=m);Vi(a.Yf,q++,x,n[jd])}q>T&&(T=q);x<aa&&(aa=x);x>=eb&&(eb=x+1)}e+=2;l++;if(q>=a.cb){q=0;x+=2;if(x>a.Sb)break;x==a.Sb&&(x=1,e=c+a.Pi)}}K<a.cb&&(a.je.putImageData(a.Yf,0,0,K,aa,T-K,eb-aa),a.rc.drawImage(a.ie,0,0,a.cb,a.Sb,0,0,a.Nc,a.ld))}else{f=l;e=a.Md=0;l=Si(a);d=a.xa.Gd;m=k=0;n=a.cb;q=0;x=a.Sb;for(K=0;c<f;){T=c++-a.Ra;T=d[T];aa=a.Bb[e];if(aa===T)k+=8;else{a.Bb[e]=T;k<n&&(n=k);for(aa=0;8>aa;aa++)eb=X[T&2155905152],
|
(s&255)<<8;r=k;var eb=16;q<K&&(K=q);for(var nc=0;nc<d;nc++){var jd=(s&(r>>=m))>>(eb-=m);Vi(a.Yf,q++,y,n[jd])}q>T&&(T=q);y<aa&&(aa=y);y>=db&&(db=y+1)}e+=2;l++;if(q>=a.eb){q=0;y+=2;if(y>a.Vb)break;y==a.Vb&&(y=1,e=c+a.Si)}}K<a.eb&&(a.je.putImageData(a.Yf,0,0,K,aa,T-K,db-aa),a.uc.drawImage(a.ie,0,0,a.eb,a.Vb,0,0,a.Qc,a.od))}else{f=l;e=a.Md=0;l=Si(a);d=a.xa.Gd;m=k=0;n=a.eb;q=0;y=a.Vb;for(K=0;c<f;){T=c++-a.Sa;T=d[T];aa=a.Eb[e];if(aa===T)k+=8;else{a.Eb[e]=T;k<n&&(n=k);for(aa=0;8>aa;aa++)db=X[T&2155905152],
|
||||||
Vi(a.Yf,k++,m,l[eb]),T<<=1;k>q&&(q=k);m<x&&(x=m);m>=K&&(K=m+1)}e++;if(k>=a.cb&&(k=0,++m>a.Sb))break}n<a.cb&&(a.je.putImageData(a.Yf,0,0,n,x,q-n,K-x),a.rc.drawImage(a.ie,0,0,a.cb,a.Sb,0,0,a.Nc,a.ld))}}}}g.Dl=function(){return this.pc.ic};g.Gm=function(a,b){var c=this.pc;c.Vf=c.ic;c.ic=b&31};g.Cl=function(){return aj(this.pc)};g.Fm=function(a,b){bj(this,this.pc,b)};g.El=function(){return this.pc.Zb};g.Hm=function(a,b){this.pc.Zb=b;Qi(this,!1)};g.Fl=function(){return cj(this,this.pc)};
|
Vi(a.Yf,k++,m,l[db]),T<<=1;k>q&&(q=k);m<y&&(y=m);m>=K&&(K=m+1)}e++;if(k>=a.eb&&(k=0,++m>a.Vb))break}n<a.eb&&(a.je.putImageData(a.Yf,0,0,n,y,q-n,K-y),a.uc.drawImage(a.ie,0,0,a.eb,a.Vb,0,0,a.Qc,a.od))}}}}g.Dl=function(){return this.sc.lc};g.Hm=function(a,b){var c=this.sc;c.Vf=c.lc;c.lc=b&31};g.Cl=function(){return aj(this.sc)};g.Gm=function(a,b){bj(this,this.sc,b)};g.El=function(){return this.sc.bc};g.Im=function(a,b){this.sc.bc=b;Qi(this,!1)};g.Fl=function(){return cj(this,this.sc)};
|
||||||
g.rk=function(a,b){this.ha.dh=this.ha.dh&-4|b&3};g.gj=function(){var a=this.ha.md?this.ha.Dd[this.ha.Td&31]:this.ha.Td;this.ha.md=!this.ha.md;return a};g.qk=function(a,b){var c=this.ha.Td&32;if(this.ha.md){var d=this.ha.Td&31;if(16<=d||!c)this.ha.Dd[d]=b;this.ha.md=!1}else this.ha.Td=b,this.ha.md=!0,b&32&&!c&&Oi(this)&&gb(this,!0)};g.Pl=function(){var a=3-((this.ha.ag&12)>>2),a=this.ha.ti&-17|(this.Ef&1<<a)<<4-a;return this.ha.ti=a};g.Jm=function(a,b){this.ha.ag=b;Ni(this)};g.Ol=function(){return this.ha.pe};
|
g.tk=function(a,b){this.ha.eh=this.ha.eh&-4|b&3};g.jj=function(){var a=this.ha.pd?this.ha.Dd[this.ha.Td&31]:this.ha.Td;this.ha.pd=!this.ha.pd;return a};g.sk=function(a,b){var c=this.ha.Td&32;if(this.ha.pd){var d=this.ha.Td&31;if(16<=d||!c)this.ha.Dd[d]=b;this.ha.pd=!1}else this.ha.Td=b,this.ha.pd=!0,b&32&&!c&&Oi(this)&&gb(this,!0)};g.Pl=function(){var a=3-((this.ha.ag&12)>>2),a=this.ha.vi&-17|(this.Ef&1<<a)<<4-a;return this.ha.vi=a};g.Km=function(a,b){this.ha.ag=b;Ni(this)};g.Ol=function(){return this.ha.pe};
|
||||||
g.Qm=function(a,b){this.ha.pe=b};g.Nl=function(){return this.ha.Bf[this.ha.pe]};g.Pm=function(a,b){this.ha.Bf[this.ha.pe]=b;2==this.ha.pe&&(this.ha.Na=zi[b&15])};g.sl=function(){return this.ha.gh};g.wm=function(a,b){this.ha.gh=b};g.tl=function(){return this.ha.hh};g.xm=function(a,b){this.ha.hh=b};g.rl=function(){return this.ha.oe};g.vm=function(a,b){this.ha.oe=b};g.ql=function(){return this.ha.de[this.ha.oe]};
|
g.Rm=function(a,b){this.ha.pe=b};g.Nl=function(){return this.ha.Bf[this.ha.pe]};g.Qm=function(a,b){this.ha.Bf[this.ha.pe]=b;2==this.ha.pe&&(this.ha.Oa=zi[b&15])};g.ql=function(){return this.ha.hh};g.wm=function(a,b){this.ha.hh=b};g.rl=function(){return this.ha.ih};g.xm=function(a,b){this.ha.ih=b};g.pl=function(){return this.ha.oe};g.vm=function(a,b){this.ha.oe=b};g.ol=function(){return this.ha.de[this.ha.oe]};
|
||||||
g.um=function(a,b){this.ha.de[this.ha.oe]=b;switch(this.ha.oe){case 0:this.ha.ig=zi[b&15];this.ha.Wd=this.ha.ig&~this.ha.wd;break;case 1:this.ha.wd=~zi[b&15];this.ha.Wd=this.ha.ig&~this.ha.wd;break;case 2:this.ha.ph=zi[b&15]&2155905152;break;case 3:case 5:this.zd(Zi(this));break;case 4:this.ha.fi=(b&3)<<3;break;case 6:Qi(this,!1);break;case 7:this.ha.qh=zi[b&15^15]&2155905152;break;case 8:this.ha.Qa=b|b<<8|b<<16|b<<24}};g.il=function(){return this.Eb.ic};
|
g.um=function(a,b){this.ha.de[this.ha.oe]=b;switch(this.ha.oe){case 0:this.ha.jg=zi[b&15];this.ha.Wd=this.ha.jg&~this.ha.xd;break;case 1:this.ha.xd=~zi[b&15];this.ha.Wd=this.ha.jg&~this.ha.xd;break;case 2:this.ha.qh=zi[b&15]&2155905152;break;case 3:case 5:this.Ad(Zi(this));break;case 4:this.ha.gi=(b&3)<<3;break;case 6:Qi(this,!1);break;case 7:this.ha.rh=zi[b&15^15]&2155905152;break;case 8:this.ha.Ra=b|b<<8|b<<16|b<<24}};g.gl=function(){return this.Hb.lc};
|
||||||
g.nm=function(a,b){var c=this.Eb;c.Vf=c.ic;c.ic=b&31};g.hl=function(){return aj(this.Eb)};g.mm=function(a,b){bj(this,this.Eb,b)};g.jl=function(){return this.Eb.Zb};g.om=function(a,b){this.Eb.Zb=b;Qi(this,!1)};g.gl=function(){return this.Eb.Oe};g.lm=function(a,b){this.Eb.Oe!==b&&(this.Eb.Oe=b,$i(this,!1))};g.kl=function(){return cj(this,this.Eb)};function aj(a){var b;a.ic<a.nh&&(b=a.Lb[a.ic]);return b}function bj(a,b,c){b.ic<b.nh&&(b.Lb[b.ic]=c,9==b.ic&&8!=b.Vf&&Qi(a,!0),Ri(a))}
|
g.nm=function(a,b){var c=this.Hb;c.Vf=c.lc;c.lc=b&31};g.fl=function(){return aj(this.Hb)};g.mm=function(a,b){bj(this,this.Hb,b)};g.hl=function(){return this.Hb.bc};g.om=function(a,b){this.Hb.bc=b;Qi(this,!1)};g.el=function(){return this.Hb.Oe};g.lm=function(a,b){this.Hb.Oe!==b&&(this.Hb.Oe=b,$i(this,!1))};g.il=function(){return cj(this,this.Hb)};function aj(a){var b;a.lc<a.oh&&(b=a.Ob[a.lc]);return b}function bj(a,b,c){b.lc<b.oh&&(b.Ob[b.lc]=c,9==b.lc&&8!=b.Vf&&Qi(a,!0),Ri(a))}
|
||||||
function cj(a,b){var c=0,d=pb(a.ia),e=d-b.wh;0>e&&(e=0);e%b.rh>b.Zl&&(c|=1);e%=b.nj;e>b.am&&(c|=8);b.wh=d-e;b===a.ha?(c|=b.uf&48^48,b.md=!1):c=(b.uf^=9)|240;return b.uf=c}
|
function cj(a,b){var c=0,d=pb(a.ja),e=d-b.xh;0>e&&(e=0);e%b.sh>b.Zl&&(c|=1);e%=b.qj;e>b.am&&(c|=8);b.xh=d-e;b===a.ha?(c|=b.uf&48^48,b.pd=!1):c=(b.uf^=9)|240;return b.uf=c}
|
||||||
var Hi={948:U.prototype.Dl,949:U.prototype.Cl,952:U.prototype.El,954:U.prototype.Fl,980:U.prototype.il,981:U.prototype.hl,984:U.prototype.jl,985:U.prototype.gl,986:U.prototype.kl},Ii={948:U.prototype.Gm,949:U.prototype.Fm,952:U.prototype.Hm,980:U.prototype.nm,981:U.prototype.mm,984:U.prototype.om,985:U.prototype.lm},Ji={960:U.prototype.gj,961:U.prototype.gj,962:U.prototype.Pl,964:U.prototype.Ol,965:U.prototype.Nl,970:U.prototype.tl,972:U.prototype.sl,974:U.prototype.rl,975:U.prototype.ql},Ki={954:U.prototype.rk,
|
var Hi={948:U.prototype.Dl,949:U.prototype.Cl,952:U.prototype.El,954:U.prototype.Fl,980:U.prototype.gl,981:U.prototype.fl,984:U.prototype.hl,985:U.prototype.el,986:U.prototype.il},Ii={948:U.prototype.Hm,949:U.prototype.Gm,952:U.prototype.Im,980:U.prototype.nm,981:U.prototype.mm,984:U.prototype.om,985:U.prototype.lm},Ji={960:U.prototype.jj,961:U.prototype.jj,962:U.prototype.Pl,964:U.prototype.Ol,965:U.prototype.Nl,970:U.prototype.rl,972:U.prototype.ql,974:U.prototype.pl,975:U.prototype.ol},Ki={954:U.prototype.tk,
|
||||||
960:U.prototype.qk,961:U.prototype.qk,962:U.prototype.Jm,964:U.prototype.Qm,965:U.prototype.Pm,970:U.prototype.xm,972:U.prototype.wm,974:U.prototype.vm,975:U.prototype.um,986:U.prototype.rk};
|
960:U.prototype.sk,961:U.prototype.sk,962:U.prototype.Km,964:U.prototype.Rm,965:U.prototype.Qm,970:U.prototype.xm,972:U.prototype.wm,974:U.prototype.vm,975:U.prototype.um,986:U.prototype.tk};
|
||||||
u(function(){for(var a=B(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=z(c),e=window.document.createElement("canvas");if(void 0===e){c.innerHTML="<br/>Missing <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;
|
u(function(){for(var a=B(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=z(c),e=window.document.createElement("canvas");if(void 0===e){c.innerHTML="<br/>Missing <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 U(d,e,f);A(d,c)}});
|
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 U(d,e,f);A(d,c)}});
|
||||||
function Z(a){this.dj=a.adapter;switch(this.dj){case 1:this.mi=1016;this.gf=4;break;case 2:this.mi=760;this.gf=3;break;default:t("Unrecognized serial adapter #"+this.dj);return}this.hd=null;v.call(this,"SerialPort",a,Z);var b=a.binding,c;a=dj;b&&(void 0===c&&(c="Panel"),(c=Ea(c,this.id))&&(b=c.oa[b])&&this.mb(null,null,a,b))}y(v,Z);var dj="buffer";g=Z.prototype;g.Gi=function(a,b){return a==this.jh?(this.hj=b,this):null};
|
function Z(a){this.gj=a.adapter;switch(this.gj){case 1:this.ni=1016;this.gf=4;break;case 2:this.ni=760;this.gf=3;break;default:t("Unrecognized serial adapter #"+this.gj);return}this.ld=null;v.call(this,"SerialPort",a,Z);var b=a.binding,c;a=dj;b&&(void 0===c&&(c="Panel"),(c=Ea(c,this.id))&&(b=c.oa[b])&&this.pb(null,null,a,b))}x(v,Z);var dj="buffer";g=Z.prototype;g.Hi=function(a,b){return a==this.kh?(this.kj=b,this):null};
|
||||||
g.mb=function(a,b,c,d){var e=this;switch(c){case dj:return this.oa[c]=this.hd=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),ej(e,[b]))},d.onkeypress=function(a){a=a||window.event;ej(e,[a.which||a.keyCode])},!0}return!1};g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;this.ja=D(a,"ChipSet");Xa(b,this,fj,this.mi);Za(b,this,gj,this.mi);this.Ka()};
|
g.pb=function(a,b,c,d){var e=this;switch(c){case dj:return this.oa[c]=this.ld=d,d.onkeydown=function(a){a=a||window.event;var b=a.charCode||a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),ej(e,[b]))},d.onkeypress=function(a){a=a||window.event;ej(e,[a.which||a.keyCode])},!0}return!1};g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;this.ia=D(a,"ChipSet");Xa(b,this,fj,this.ni);Za(b,this,gj,this.ni);this.Ka()};
|
||||||
g.Jb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.zb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.pd()};g.save=function(){var a=new I(this),b=0,c=[];c[b++]=this.Fg;c[b++]=this.Li;c[b++]=this.be;c[b++]=this.Ff;c[b++]=this.cd;c[b++]=this.Jd;c[b++]=this.yc;c[b++]=this.cc;c[b++]=this.Ji;c[b]=this.De;a.set(0,c);return a.data()};g.restore=function(a){return this.pd(a[0])};
|
g.Mb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};g.Cb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.rd()};g.save=function(){var a=new I(this),b=0,c=[];c[b++]=this.Gg;c[b++]=this.Ni;c[b++]=this.be;c[b++]=this.Ff;c[b++]=this.gd;c[b++]=this.Jd;c[b++]=this.Bc;c[b++]=this.fc;c[b++]=this.Li;c[b]=this.De;a.set(0,c);return a.data()};g.restore=function(a){return this.rd(a[0])};
|
||||||
g.pd=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.Fg=a[b++];this.Li=a[b++];this.be=a[b++];this.Ff=a[b++];this.cd=a[b++];this.Jd=a[b++];this.yc=a[b++];this.cc=a[b++];this.Ji=a[b++];this.De=a[b];return!0};function ej(a,b){a.De=a.De.concat(b);hj(a)}function hj(a){0<a.De.length&&!(a.cc&1)&&(a.Fg=a.De.shift(),a.cc|=1);var b=-1;a.cc&1&&a.Ff&1&&(b=4);0<=b?(a.cd&=-8,a.cd|=b,a.ja&&a.gf&&Nh(a.ja,a.gf)):(a.cd|=1,a.ja&&a.gf&&Sh(a.ja,a.gf))}
|
g.rd=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.Gg=a[b++];this.Ni=a[b++];this.be=a[b++];this.Ff=a[b++];this.gd=a[b++];this.Jd=a[b++];this.Bc=a[b++];this.fc=a[b++];this.Li=a[b++];this.De=a[b];return!0};function ej(a,b){a.De=a.De.concat(b);hj(a)}function hj(a){0<a.De.length&&!(a.fc&1)&&(a.Gg=a.De.shift(),a.fc|=1);var b=-1;a.fc&1&&a.Ff&1&&(b=4);0<=b?(a.gd&=-8,a.gd|=b,a.ia&&a.gf&&Nh(a.ia,a.gf)):(a.gd|=1,a.ia&&a.gf&&Sh(a.ia,a.gf))}
|
||||||
g.Ml=function(){var a=this.Jd&128?this.be&255:this.Fg;this.cc&=-2;hj(this);return a};g.xl=function(){return this.Jd&128?this.be>>8:this.Ff};g.yl=function(){return this.cd};g.zl=function(){return this.Jd};g.Bl=function(){return this.yc};g.Al=function(){return this.cc};g.Hl=function(){return this.Ji};
|
g.Ml=function(){var a=this.Jd&128?this.be&255:this.Gg;this.fc&=-2;hj(this);return a};g.xl=function(){return this.Jd&128?this.be>>8:this.Ff};g.yl=function(){return this.gd};g.zl=function(){return this.Jd};g.Bl=function(){return this.Bc};g.Al=function(){return this.fc};g.Hl=function(){return this.Li};
|
||||||
g.Rm=function(a,b){if(this.Jd&128)this.be=this.be&-256|b;else{this.Li=b;this.cc&=-97;var c;this.hd?(13!=b&&(8==b?this.hd.value=this.hd.value.slice(0,-1):(this.hd.value+=String.fromCharCode(b),this.hd.scrollTop=this.hd.scrollHeight)),c=!0):c=!1;c&&(this.cc|=96)}};g.Cm=function(a,b){this.Jd&128?this.be=this.be&255|b<<8:this.Ff=b};g.Dm=function(a,b){this.Jd=b};
|
g.Sm=function(a,b){if(this.Jd&128)this.be=this.be&-256|b;else{this.Ni=b;this.fc&=-97;var c;this.ld?(13!=b&&(8==b?this.ld.value=this.ld.value.slice(0,-1):(this.ld.value+=String.fromCharCode(b),this.ld.scrollTop=this.ld.scrollHeight)),c=!0):c=!1;c&&(this.fc|=96)}};g.Dm=function(a,b){this.Jd&128?this.be=this.be&255|b<<8:this.Ff=b};g.Em=function(a,b){this.Jd=b};
|
||||||
g.Em=function(a,b){var c=this.yc;this.yc=b;if(this.hj&&(c^b)&3){var c=this.hj,d=this.yc,e=3==(d&3);if(e){if(!c.Pb){var f=!1;c.yc&2||(c.reset(),f=!0);c.yc&1||(f=!0);f&&ej(c.Pe,[77]);ij(c,c.jb);c.Pb=e}}else c.Pb&&(jj(c.jb),c.Pb=e);c.yc=d}};var fj={0:Z.prototype.Ml,1:Z.prototype.xl,2:Z.prototype.yl,3:Z.prototype.zl,4:Z.prototype.Bl,5:Z.prototype.Al,6:Z.prototype.Hl},gj={0:Z.prototype.Rm,1:Z.prototype.Cm,3:Z.prototype.Dm,4:Z.prototype.Em};
|
g.Fm=function(a,b){var c=this.Bc;this.Bc=b;if(this.kj&&(c^b)&3){var c=this.kj,d=this.Bc,e=3==(d&3);if(e){if(!c.Sb){var f=!1;c.Bc&2||(c.reset(),f=!0);c.Bc&1||(f=!0);f&&ej(c.Pe,[77]);ij(c,c.lb);c.Sb=e}}else c.Sb&&(jj(c.lb),c.Sb=e);c.Bc=d}};var fj={0:Z.prototype.Ml,1:Z.prototype.xl,2:Z.prototype.yl,3:Z.prototype.zl,4:Z.prototype.Bl,5:Z.prototype.Al,6:Z.prototype.Hl},gj={0:Z.prototype.Sm,1:Z.prototype.Dm,3:Z.prototype.Em,4:Z.prototype.Fm};
|
||||||
u(function(){for(var a=B(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Z(d);A(d,c)}});function kj(a){v.call(this,"Mouse",a,kj);if(this.ih=a.serial)this.oi="SerialPort";this.Pb=!1;this.Ka()}y(v,kj);g=kj.prototype;g.Yb=function(a,b,c,d){this.Ca=a;this.la=b;this.ia=c;this.Ea=d};
|
u(function(){for(var a=B(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new Z(d);A(d,c)}});function kj(a){v.call(this,"Mouse",a,kj);if(this.jh=a.serial)this.qi="SerialPort";this.Sb=!1;this.Ka()}x(v,kj);g=kj.prototype;g.ac=function(a,b,c,d){this.Ca=a;this.la=b;this.ja=c;this.Fa=d};
|
||||||
g.Jb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.oi&&!this.Pe){for(var c=null;(c=D(this.Ca,this.oi,c))&&(!c.Gi||!(this.Pe=c.Gi(this.ih,this))););if(this.Pe){if(c=D(this.Ca,"Video"))this.jb=c.jb}else t(this.id+": "+this.oi+" "+this.ih+" unavailable")}this.Pb?ij(this,this.jb):jj(this.jb)}return!0};g.zb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.pd()};g.save=function(){var a=new I(this);a.set(0,this.si());return a.data()};
|
g.Mb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.qi&&!this.Pe){for(var c=null;(c=D(this.Ca,this.qi,c))&&(!c.Hi||!(this.Pe=c.Hi(this.jh,this))););if(this.Pe){if(c=D(this.Ca,"Video"))this.lb=c.lb}else t(this.id+": "+this.qi+" "+this.jh+" unavailable")}this.Sb?ij(this,this.lb):jj(this.lb)}return!0};g.Cb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.rd()};g.save=function(){var a=new I(this);a.set(0,this.ui());return a.data()};
|
||||||
g.restore=function(a){return this.pd(a[0])};g.pd=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.Pb=a[b++];this.vf=a[b++];this.wf=a[b++];this.ze=a[b++];this.Ae=a[b++];this.Pf=a[b++];this.Qf=a[b++];this.yc=a[b];return!0};g.si=function(){var a=0,b=[];b[a++]=this.Pb;b[a++]=this.vf;b[a++]=this.wf;b[a++]=this.ze;b[a++]=this.Ae;b[a++]=this.Pf;b[a++]=this.Qf;b[a]=this.yc;return b};
|
g.restore=function(a){return this.rd(a[0])};g.rd=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.Sb=a[b++];this.vf=a[b++];this.wf=a[b++];this.ze=a[b++];this.Ae=a[b++];this.Pf=a[b++];this.Qf=a[b++];this.Bc=a[b];return!0};g.ui=function(){var a=0,b=[];b[a++]=this.Sb;b[a++]=this.vf;b[a++]=this.wf;b[a++]=this.ze;b[a++]=this.Ae;b[a++]=this.Pf;b[a++]=this.Qf;b[a]=this.Bc;return b};
|
||||||
function ij(a,b){b&&(a.Ug||(b.addEventListener("mousemove",function(b){if(a.Pb&&a.ia&&a.ia.hc){if(0>a.vf||0>a.wf)a.vf=b.clientX,a.wf=b.clientY;a.ze=b.clientX-a.vf;a.Ae=b.clientY-a.wf;(a.ze||a.Ae)&&lj(a);a.vf=b.clientX;a.wf=b.clientY}},!1),b.addEventListener("mousedown",function(b){mj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){mj(a,b.button,!1)},!1),a.Ug=!0),b.style.cursor="none")}function jj(a){a&&(a.style.cursor="auto")}
|
function ij(a,b){b&&(a.Vg||(b.addEventListener("mousemove",function(b){if(a.Sb&&a.ja&&a.ja.kc){if(0>a.vf||0>a.wf)a.vf=b.clientX,a.wf=b.clientY;a.ze=b.clientX-a.vf;a.Ae=b.clientY-a.wf;(a.ze||a.Ae)&&lj(a);a.vf=b.clientX;a.wf=b.clientY}},!1),b.addEventListener("mousedown",function(b){mj(a,b.button,!0)},!1),b.addEventListener("mouseup",function(b){mj(a,b.button,!1)},!1),a.Vg=!0),b.style.cursor="none")}function jj(a){a&&(a.style.cursor="auto")}
|
||||||
function mj(a,b,c){if(a.Pb&&a.ia&&a.ia.hc)switch(b){case 0:a.Pf!=c&&(a.Pf=c,lj(a));break;case 2:a.Qf!=c&&(a.Qf=c,lj(a))}}function lj(a){ej(a.Pe,[64|(a.Pf?32:0)|(a.Qf?16:0)|(a.Ae&192)>>4|(a.ze&192)>>6,a.ze&63,a.Ae&63]);a.ze=a.Ae=0}u(function(){for(var a=B(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new kj(d);A(d,c)}});
|
function mj(a,b,c){if(a.Sb&&a.ja&&a.ja.kc)switch(b){case 0:a.Pf!=c&&(a.Pf=c,lj(a));break;case 2:a.Qf!=c&&(a.Qf=c,lj(a))}}function lj(a){ej(a.Pe,[64|(a.Pf?32:0)|(a.Qf?16:0)|(a.Ae&192)>>4|(a.ze&192)>>6,a.ze&63,a.Ae&63]);a.ze=a.Ae=0}u(function(){for(var a=B(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new kj(d);A(d,c)}});
|
||||||
function nj(a,b,c){v.call(this,"Disk",{id:a.Xf+".disk"+oj++},nj);this.ea=a;this.Ca=a.Ca;this.Ea=a.Ea;this.Ti=b;this.mode=c;this.$c=b.name;this.rd=b.rd;this.vc=b.vc;this.vd=b.vd;this.Mc=b.Mc;this.le=b.le;this.$g=this.Rc=!1;this.create();this.Ed=[];this.yf=[];this.ad=null;this.jj=0;this.bh=!1;this.Ka()}var oj=0;y(v,nj);g=nj.prototype;g.Yb=function(a,b,c,d){this.Ea=d};g.Jb=function(a,b){b||this.$g&&!this.Rc&&this.load(this.$c,this.ue);return!0};
|
function nj(a,b,c){v.call(this,"Disk",{id:a.Xf+".disk"+oj++},nj);this.ea=a;this.Ca=a.Ca;this.Fa=a.Fa;this.Wi=b;this.mode=c;this.cd=b.name;this.oc=b.oc;this.yc=b.yc;this.wd=b.wd;this.Pc=b.Pc;this.le=b.le;this.ah=this.Uc=!1;this.create();this.Ed=[];this.yf=[];this.dd=null;this.mj=0;this.dh=!1;this.Ka()}var oj=0;x(v,nj);g=nj.prototype;g.ac=function(a,b,c,d){this.Fa=d};g.Mb=function(a,b){b||this.ah&&!this.Uc&&this.load(this.cd,this.ue);return!0};
|
||||||
g.zb=function(a,b){if(this.Rc){var c,d=0;if(this.bh&&!la("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=pj(this,!1);)if(d=c[0]){C(this,'Unable to save "'+this.$c+'" (error '+d+")");break}b&&this.Rc&&(c="action=close&volume="+this.ue,c+="&machine="+this.ea.ne(),c+="&user="+this.ea.nd(),p(ka()+"/api/v1/disk?"+c,!0),this.Rc=!1);d||C(this,this.$c+" saved")}return!0};
|
g.Cb=function(a,b){if(this.Uc){var c,d=0;if(this.dh&&!la("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=pj(this,!1);)if(d=c[0]){C(this,'Unable to save "'+this.cd+'" (error '+d+")");break}b&&this.Uc&&(c="action=close&volume="+this.ue,c+="&machine="+this.ea.ne(),c+="&user="+this.ea.qd(),p(ka()+"/api/v1/disk?"+c,!0),this.Uc=!1);d||C(this,this.cd+" saved")}return!0};
|
||||||
g.create=function(){this.Cb=[];if("preload"!=this.mode){for(var a=Array(this.rd),b=0;b<a.length;b++){for(var c=Array(this.vc),d=0;d<c.length;d++){for(var e=Array(this.vd),f=1;f<=e.length;f++)e[f-1]=qj(null,b,d,f,this.Mc,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.Cb=a}this.Nf=0};
|
g.create=function(){this.Fb=[];if("preload"!=this.mode){for(var a=Array(this.oc),b=0;b<a.length;b++){for(var c=Array(this.yc),d=0;d<c.length;d++){for(var e=Array(this.wd),f=1;f<=e.length;f++)e[f-1]=qj(null,b,d,f,this.Pc,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.Fb=a}this.Nf=0};
|
||||||
g.load=function(a,b,c){var d=b;this.$c=a;this.ue=b;this.bj=c;0>b.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.rd+":"+this.vc+":"+this.vd+":"+this.Mc,a+="&machine="+this.ea.ne(),a+="&user="+this.ea.nd(),d=ka()+"/api/v1/disk?"+a,this.$g=!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"):
|
g.load=function(a,b,c){var d=b;this.cd=a;this.ue=b;this.ej=c;0>b.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.oc+":"+this.yc+":"+this.wd+":"+this.Pc,a+="&machine="+this.ea.ne(),a+="&user="+this.ea.qd(),d=ka()+"/api/v1/disk?"+a,this.ah=!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.le?"":d)+"&format=json"));p(d,!0,null,this,this.bm,b)};
|
-1!==b.indexOf("/",b.length-1)&&(c="dir"),d=ka()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.le?"":d)+"&format=json"));p(d,!0,null,this,this.bm,b)};
|
||||||
g.bm=function(a,b,c,d){var e=null;this.me=!1;var f=0>c&&this.Ca&&!this.Ca.rb;if(this.$g)c?C(this,'Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Rc=!0,e=this);else if(c)C(this,'Unable to load disk "'+this.$c+'" (error '+c+")",f);else try{if(0<da(a,!0).toLowerCase().indexOf("-readonly"))this.me=!0;else{var l=b.indexOf("\n");0<l&&1024>l&&0<b.substring(0,l).indexOf("write-protected")&&(this.me=!0)}var k;k="<"==b.substr(0,1)?["Missing disk image: "+this.$c]:0>b.indexOf("0x")&&'["'!=
|
g.bm=function(a,b,c,d){var e=null;this.me=!1;var f=0>c&&this.Ca&&!this.Ca.ub;if(this.ah)c?C(this,'Unable to connect to disk "'+d+'" (error '+c+": "+b+")",f):(this.Uc=!0,e=this);else if(c)C(this,'Unable to load disk "'+this.cd+'" (error '+c+")",f);else try{if(0<da(a,!0).toLowerCase().indexOf("-readonly"))this.me=!0;else{var l=b.indexOf("\n");0<l&&1024>l&&0<b.substring(0,l).indexOf("write-protected")&&(this.me=!0)}var k;k="<"==b.substr(0,1)?["Missing disk image: "+this.cd]:0>b.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)this.error(k[0]);else{for(b=a=0;b<k.length;b++)for(c=0;c<k[b].length;c++)for(d=0;d<k[b][c].length;d++){var m=k[b][c][d],n=m.length;void 0===n&&(n=m.length=512);var n=n>>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,x=r.length;x<f;x++)r[x]=q;this.fill(m,r,0)}else s=[],q=m.pattern=q|q<<8|q<<16|q<<
|
b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(k.length)if(1==k.length)this.error(k[0]);else{for(b=a=0;b<k.length;b++)for(c=0;c<k[b].length;c++)for(d=0;d<k[b][c].length;d++){var m=k[b][c][d],n=m.length;void 0===n&&(n=m.length=512);var n=n>>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;y<f;y++)r[y]=q;this.fill(m,r,0)}else s=[],q=m.pattern=q|q<<8|q<<16|q<<
|
||||||
24,m.data=s;delete m.bytes}qj(m,b,c);for(f=0;f<s.length;f++)a=a+s[f]&4294967295}this.Cb=k;this.Nf=a;e=this}else this.error("Empty disk image: "+this.$c)}catch(K){this.error("Disk image error: "+K.message)}this.bj&&this.bj.call(this.ea,this.Ti,e,this.$c,this.ue)};function qj(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.al=b;a.bl=c;a.uc=a.ec=0;a.La=!1;return a}
|
24,m.data=s;delete m.bytes}qj(m,b,c);for(f=0;f<s.length;f++)a=a+s[f]&4294967295}this.Fb=k;this.Nf=a;e=this}else this.error("Empty disk image: "+this.cd)}catch(K){this.error("Disk image error: "+K.message)}this.ej&&this.ej.call(this.ea,this.Wi,e,this.cd,this.ue)};function qj(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Zk=b;a.$k=c;a.xc=a.hc=0;a.La=!1;return a}
|
||||||
g.cm=function(a,b,c,d){a=!1;if(!c){var e=d[0],f=d[1],l=d[2],k=d[3];a=d[4];b=JSON.parse(b);for(var m=0;k--;){var n=this.seek(e,f,l,!0);if(!n)break;this.fill(n,b,m);m+=n.length;l++}}(d=d[5])&&d(c,a)};function rj(a,b,c,d,e,f){if(a.Rc){var l;l="action=read&volume="+a.ue;l+="&chs="+a.rd+":"+a.vc+":"+a.vd+":"+a.Mc;l=l+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.ea.ne());l+="&user="+a.ea.nd();p(ka()+"/api/v1/disk?"+l,!0,null,a,a.cm,[b,c,d,e,!0,f])}else f&&f(-1,!1)}
|
g.cm=function(a,b,c,d){a=!1;if(!c){var e=d[0],f=d[1],l=d[2],k=d[3];a=d[4];b=JSON.parse(b);for(var m=0;k--;){var n=this.seek(e,f,l,!0);if(!n)break;this.fill(n,b,m);m+=n.length;l++}}(d=d[5])&&d(c,a)};function rj(a,b,c,d,e,f){if(a.Uc){var l;l="action=read&volume="+a.ue;l+="&chs="+a.oc+":"+a.yc+":"+a.wd+":"+a.Pc;l=l+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.ea.ne());l+="&user="+a.ea.qd();p(ka()+"/api/v1/disk?"+l,!0,null,a,a.cm,[b,c,d,e,!0,f])}else f&&f(-1,!1)}
|
||||||
function sj(a,b,c){b.La=!0;var d=a.Ed.indexOf(b);0<=d&&(a.Ed.splice(d,1),a.yf.splice(d,1));a.Ed.push(b);a.yf.push(ha());c&&tj(a)}function tj(a){if(a.Ed.length){var b=a.yf[0]+2E3;a.ad&&a.jj<b&&(clearTimeout(a.ad),a.ad=null);if(!a.ad){var c=ha(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.ad=setTimeout(function(){pj(a,!0)},b);a.jj=c+b}}else a.ad&&(clearTimeout(a.ad),a.ad=null)}
|
function sj(a,b,c){b.La=!0;var d=a.Ed.indexOf(b);0<=d&&(a.Ed.splice(d,1),a.yf.splice(d,1));a.Ed.push(b);a.yf.push(ha());c&&tj(a)}function tj(a){if(a.Ed.length){var b=a.yf[0]+2E3;a.dd&&a.mj<b&&(clearTimeout(a.dd),a.dd=null);if(!a.dd){var c=ha(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.dd=setTimeout(function(){pj(a,!0)},b);a.mj=c+b}}else a.dd&&(clearTimeout(a.dd),a.dd=null)}
|
||||||
function pj(a,b){b&&(a.ad=null);var c=a.Ed[0];if(c){for(var d=c.al,e=c.bl,c=c.sector,f=0,l=[],k=c-1;k<a.Cb[d][e].length;k++){var m=a.Cb[d][e][k];if(!m.La)break;var n=a.Ed.indexOf(m);a.Ed.splice(n,1);a.yf.splice(n,1);l=l.concat(uj(m));m.La=!1;f++}a.Rc?(k={},a.bh=!0,k.action="write",k.volume=a.ue,k.chs=a.rd+":"+a.vc+":"+a.vd+":"+a.Mc,k.addr=d+":"+e+":"+c+":"+f,k.machine=a.ea.ne(),k.user=a.ea.nd(),k.data=JSON.stringify(l),d=p(ka()+"/api/v1/disk",b,k,a,a.hm,[d,e,c,f,b])):d=!1;return b||d}return!1}
|
function pj(a,b){b&&(a.dd=null);var c=a.Ed[0];if(c){for(var d=c.Zk,e=c.$k,c=c.sector,f=0,l=[],k=c-1;k<a.Fb[d][e].length;k++){var m=a.Fb[d][e][k];if(!m.La)break;var n=a.Ed.indexOf(m);a.Ed.splice(n,1);a.yf.splice(n,1);l=l.concat(uj(m));m.La=!1;f++}a.Uc?(k={},a.dh=!0,k.action="write",k.volume=a.ue,k.chs=a.oc+":"+a.yc+":"+a.wd+":"+a.Pc,k.addr=d+":"+e+":"+c+":"+f,k.machine=a.ea.ne(),k.user=a.ea.qd(),k.data=JSON.stringify(l),d=p(ka()+"/api/v1/disk",b,k,a,a.hm,[d,e,c,f,b])):d=!1;return b||d}return!1}
|
||||||
g.hm=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],f=d[3];d=d[4];this.bh=!1;if(0<=a&&a<this.Cb.length&&0<=b&&b<this.Cb[a].length)for(e-=1;0<f--&&0<=e&&e<this.Cb[a][b].length;e++){var l=this.Cb[a][b][e];c?sj(this,l,!1):l.La||(l.uc=l.ec=0)}d&&tj(this)};
|
g.hm=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],f=d[3];d=d[4];this.dh=!1;if(0<=a&&a<this.Fb.length&&0<=b&&b<this.Fb[a].length)for(e-=1;0<f--&&0<=e&&e<this.Fb[a][b].length;e++){var l=this.Fb[a][b][e];c?sj(this,l,!1):l.La||(l.xc=l.hc=0)}d&&tj(this)};
|
||||||
g.seek=function(a,b,c,d,e){var f=null,l=this.Ti,k=this.Cb[a];if(k){var m=k[b];if(!m&&l.Ie&&b<l.vc)for(m=k[b]=Array(l.ed),k=0;k<m.length;k++)m[k]=qj(null,a,b,k+1,l.Qb,0);if(m){for(k=0;k<m.length;k++)if(m[k].sector==c){f=m[k];if(null===f.pattern)if(d)f.pattern=0;else if(e){for(d=1;++k<m.length;)null===m[k].pattern&&d++;rj(this,a,b,c,d,function(a,b){a&&(f=null);e(f,b)});return null}break}!f&&l.Ie&&9==l.Ta&&(f=m[k]=qj(null,a,b,l.Ta,l.Qb,0))}}e&&e(f,!1);return f};
|
g.seek=function(a,b,c,d,e){var f=null,l=this.Wi,k=this.Fb[a];if(k){var m=k[b];if(!m&&l.Ie&&b<l.yc)for(m=k[b]=Array(l.jd),k=0;k<m.length;k++)m[k]=qj(null,a,b,k+1,l.Tb,0);if(m){for(k=0;k<m.length;k++)if(m[k].sector==c){f=m[k];if(null===f.pattern)if(d)f.pattern=0;else if(e){for(d=1;++k<m.length;)null===m[k].pattern&&d++;rj(this,a,b,c,d,function(a,b){a&&(f=null);e(f,b)});return null}break}!f&&l.Ie&&9==l.Ua&&(f=m[k]=qj(null,a,b,l.Ua,l.Tb,0))}}e&&e(f,!1);return f};
|
||||||
g.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function uj(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var l=f<e.length?e[f]:a;c[d++]=l&255;c[d++]=l>>8&255;c[d++]=l>>16&255;c[d++]=l>>24&255}return c}function vj(a,b){var c=-1;if(b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
|
g.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function uj(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var l=f<e.length?e[f]:a;c[d++]=l&255;c[d++]=l>>8&255;c[d++]=l>>16&255;c[d++]=l>>24&255}return c}function vj(a,b){var c=-1;if(b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
|
||||||
g.write=function(a,b,c){if(this.me)return!1;if(b<a.length){if(c!=vj(a,b)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var l=d.length;l<=f;l++)d[l]=e;a.ec?f<a.uc?(a.ec+=a.uc-f,a.uc=f):f>=a.uc+a.ec&&(a.ec+=f-(a.uc+a.ec)+1):(a.uc=f,a.ec=1);d[f]=d[f]&~(255<<b)|c<<b;this.Rc&&sj(this,a,!0)}return!0}return null};
|
g.write=function(a,b,c){if(this.me)return!1;if(b<a.length){if(c!=vj(a,b)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var l=d.length;l<=f;l++)d[l]=e;a.hc?f<a.xc?(a.hc+=a.xc-f,a.xc=f):f>=a.xc+a.hc&&(a.hc+=f-(a.xc+a.hc)+1):(a.xc=f,a.hc=1);d[f]=d[f]&~(255<<b)|c<<b;this.Uc&&sj(this,a,!0)}return!0}return null};
|
||||||
g.save=function(){var a=0,b=[];b[a++]=[this.ue,this.Nf];if(!this.Rc&&!this.me)for(var c=this.Cb,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var l=c[d][e][f];if(l.ec){for(var k=[],m=0,n=l.uc,q=l.uc+l.ec;n<q;)k[m++]=l.data[n++];b[a++]=[d,e,f,l.uc,k]}}return b};
|
g.save=function(){var a=0,b=[];b[a++]=[this.ue,this.Nf];if(!this.Uc&&!this.me)for(var c=this.Fb,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var l=c[d][e][f];if(l.hc){for(var k=[],m=0,n=l.xc,q=l.xc+l.hc;n<q;)k[m++]=l.data[n++];b[a++]=[d,e,f,l.xc,k]}}return b};
|
||||||
g.restore=function(a){var b=0,c="unsupported restore format";if(this.Cb.length&&a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&e[1]!=this.Nf&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.Nf+")",b=-1);for(;d<a.length&&0<=b;){var f=0,l=a[d++],k=l[f++],m=l[f++],n=l[f++];if(k>=this.Cb.length||m>=this.Cb[k].length||n>=this.Cb[k][m].length){c="sector "+k+":"+m+":"+n+" out of range ("+b+" changes applied)";b=-1;break}if(this.me){c="unable to modify write-protected disk";b=-1;break}e=
|
g.restore=function(a){var b=0,c="unsupported restore format";if(this.Fb.length&&a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&e[1]!=this.Nf&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.Nf+")",b=-1);for(;d<a.length&&0<=b;){var f=0,l=a[d++],k=l[f++],m=l[f++],n=l[f++];if(k>=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.me){c="unable to modify write-protected disk";b=-1;break}e=
|
||||||
l[f++];f=l[f++];l=e+f.length;k=this.Cb[k][m][n];for(m=k.data.length;m<e;)k.data[m++]=k.pattern;m=0;k.uc=e;for(k.ec=f.length;e<l;)k.data[e++]=f[m++];b++}}0>b&&C(this,"unable to restore disk '"+this.$c+": "+c);return b};
|
l[f++];f=l[f++];l=e+f.length;k=this.Fb[k][m][n];for(m=k.data.length;m<e;)k.data[m++]=k.pattern;m=0;k.xc=e;for(k.hc=f.length;e<l;)k.data[e++]=f[m++];b++}}0>b&&C(this,"unable to restore disk '"+this.cd+": "+c);return b};
|
||||||
function wj(a){v.call(this,"FDC",a,wj);this.dmaRead=this.Ng;this.dmaWrite=this.Og;this.dmaFormat=this.Qk;this.Yd=null;if(a.autoMount&&(this.Yd=a.autoMount,"string"==typeof this.Yd))try{this.Yd=eval("("+a.autoMount+")")}catch(b){this.error("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Yd=null}this.Vb=[];this.Sc();this.He()||this.Ka()}y(v,wj);
|
function wj(a){v.call(this,"FDC",a,wj);this.dmaRead=this.Og;this.dmaWrite=this.Pg;this.dmaFormat=this.Ok;this.Yd=null;if(a.autoMount&&(this.Yd=a.autoMount,"string"==typeof this.Yd))try{this.Yd=eval("("+a.autoMount+")")}catch(b){this.error("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Yd=null}this.Yb=[];this.Vc();this.He()||this.Ka()}x(v,wj);
|
||||||
var xj={3:{gd:3,Pd:0,name:"SPECIFY"},4:{gd:2,Pd:1,name:"DRIVE_STATUS"},5:{gd:9,Pd:7,name:"WRITE_DATA"},6:{gd:9,Pd:7,name:"READ_DATA"},7:{gd:2,Pd:0,name:"RECALIBRATE"},8:{gd:1,Pd:2,name:"INT_STATUS"},13:{gd:6,Pd:7,name:"FORMAT"},15:{gd:3,Pd:0,name:"SEEK"}};g=wj.prototype;
|
var xj={3:{kd:3,Pd:0,name:"SPECIFY"},4:{kd:2,Pd:1,name:"DRIVE_STATUS"},5:{kd:9,Pd:7,name:"WRITE_DATA"},6:{kd:9,Pd:7,name:"READ_DATA"},7:{kd:2,Pd:0,name:"RECALIBRATE"},8:{kd:1,Pd:2,name:"INT_STATUS"},13:{kd:6,Pd:7,name:"FORMAT"},15:{kd:3,Pd:0,name:"SEEK"}};g=wj.prototype;
|
||||||
g.mb=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){a.error("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d='<a href="'+m+'" target="_blank">'+d+"</a>");
|
g.pb=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){a.error("FDC option error: "+(n.message||n))}d=m.desc;void 0===d&&(d="");m=m.href;void 0!==m&&(d='<a href="'+m+'" target="_blank">'+d+"</a>");
|
||||||
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)||yj(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&&b<a.ta.length)if(d=c.value){c=c.options[c.selectedIndex].text;if("?"==d){d=window.prompt("Enter the URL of a disk image to load.","");if(!d)return;c=da(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)||yj(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&&b<a.ta.length)if(d=c.value){c=c.options[c.selectedIndex].text;if("?"==d){d=window.prompt("Enter the URL of a disk image to load.","");if(!d)return;c=da(d);
|
||||||
Fa(a,"Attempting to load "+d+' as "'+c+'"')}for(;zj(a,b,c,d,!1)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var m=a,n=d,q=void 0,q=0;q<m.Vb.length;q++)if(m.Vb[q][1]==n){m.Vb.splice(q,1);break}Aj(a,b,!1,!0)}}else Aj(a,b);else C(a,"Nothing to load")}}(this),!0}return!1};g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;this.Ca=a;this.ja=D(a,"ChipSet");Xa(b,this,Bj);Za(b,this,Cj)};
|
Fa(a,"Attempting to load "+d+' as "'+c+'"')}for(;zj(a,b,c,d,!1)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var m=a,n=d,q=void 0,q=0;q<m.Yb.length;q++)if(m.Yb[q][1]==n){m.Yb.splice(q,1);break}Aj(a,b,!1,!0)}}else Aj(a,b);else C(a,"Nothing to load")}}(this),!0}return!1};g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;this.Ca=a;this.ia=D(a,"ChipSet");Xa(b,this,Bj);Za(b,this,Cj)};
|
||||||
g.Jb=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.Ca.ah){this.Vb=[];for(var c=0;c<this.ta.length;c++)Aj(this,c,!0);this.He(!0)}}else if(!this.restore(a))return!1;if(this.ja&&(this.oj=uh(this.ja),c=this.oa.listDrives)){for(;c.firstChild;)c.removeChild(c.firstChild);c.innerHTML="";for(var d=0;d<this.oj;d++){var e=window.document.createElement("option");e.value=d;e.innerHTML=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.oj&&(c.value="0",yj(this,0))}}return!0};
|
g.Mb=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.Ca.bh){this.Yb=[];for(var c=0;c<this.ta.length;c++)Aj(this,c,!0);this.He(!0)}}else if(!this.restore(a))return!1;if(this.ia){this.hg=wh(this.ia);for(c=0;c<this.hg;c++){var d=this.ta[c];d.Oi=th(this.ia,c);2==d.Oi&&(d.oc=80)}if(d=this.oa.listDrives){for(;d.firstChild;)d.removeChild(d.firstChild);d.innerHTML="";for(c=0;c<this.hg;c++){var e=window.document.createElement("option");e.value=c;e.innerHTML=String.fromCharCode(65+c)+":";d.appendChild(e)}0<
|
||||||
g.zb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.Sc()};g.save=function(){var a=new I(this);a.set(0,this.pi());return a.data()};g.restore=function(a){return this.Sc(a[0])};
|
this.hg&&(d.value="0",yj(this,0))}}}return!0};g.Cb=function(a){return a&&this.save?this.save():!0};g.reset=function(){this.Vc()};g.save=function(){var a=new I(this);a.set(0,this.ri());return a.data()};g.restore=function(a){return this.Vc(a[0])};
|
||||||
g.Sc=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.od=a[b++];this.Bc=a[b++];this.Ma=a[b++];this.Ab=a[b++];this.Za=a[b++];this.Oa=a[b++];this.te=a[b++];var d=a[b++],e=a[b++];null!=e&&(this.Vb=e);void 0===this.ta&&(this.ta=Array(4));for(e=0;e<this.ta.length;e++)void 0===this.ta[e]&&(this.ta[e]={}),this.kh(this.ta[e],e,d[e])||(c=!1);this.yd=a[b++]||0;this.uk=a[b]||0;return c};
|
g.Vc=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.mb=a[b++];b++;this.Ma=a[b++];this.Db=a[b++];this.$a=a[b++];this.Pa=a[b++];this.te=a[b++];var d=a[b++],e=a[b++];null!=e&&(this.Yb=e);void 0===this.ta&&(this.hg=0,this.ta=Array(4));for(e=0;e<this.ta.length;e++)void 0===this.ta[e]&&(this.ta[e]={}),this.lh(this.ta[e],e,d[e])||(c=!1);this.zd=a[b++]||0;this.wk=a[b]||0;return c};
|
||||||
g.pi=function(){var a=0,b=[];b[a++]=this.od;b[a++]=this.Bc;b[a++]=this.Ma;b[a++]=this.Ab;b[a++]=this.Za;b[a++]=this.Oa;b[a++]=this.te;b[a++]=this.ri();for(var c=a++,d=0;d<this.ta.length;d++){var e=this.ta[d];e.ra&&Dj(this,e.$d,e.ra)}b[c]=this.Vb;b[a++]=this.yd;b[a]=this.uk;return b};
|
g.ri=function(){var a=0,b=[];b[a++]=this.mb;b[a++]=0;b[a++]=this.Ma;b[a++]=this.Db;b[a++]=this.$a;b[a++]=this.Pa;b[a++]=this.te;b[a++]=this.ti();for(var c=a++,d=0;d<this.ta.length;d++){var e=this.ta[d];e.ra&&Dj(this,e.$d,e.ra)}b[c]=this.Yb;b[a++]=this.zd;b[a]=this.wk;return b};
|
||||||
g.kh=function(a,b,c){var d=0,e=!0;a.od=b;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",40,c[3],9,512,c[1]]);a.errorCode=c[d++];a.name=c[d][0];a.rd=c[d][1];a.vc=c[d][2];a.vd=c[d][3];a.Mc=c[d][4];a.le=c[d][5];d++;a.hb=c[d++];d++;a.mc=c[d++];a.Ta=c[d++];a.ed=c[d++];a.Qb=c[d++];a.sb=c[d++];a.Ja=null;a.ra||(a.$d="");var f=c[d++];f===Ej?(f=c[d++],c=c[d],zj(this,b,f,c,!0)?a.ra&&Fj(this,f,c,a.ra):this.Ka(!1)):void 0!==f&&a.ra&&0>a.ra.restore(f)&&(e=!1);e&&a.ra&&void 0!==a.sb&&
|
g.lh=function(a,b,c){var d=0,e=!0;a.mb=b;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",a.oc||40,c[3],9,512,c[1]]);a.Na=c[d++];a.name=c[d][0];a.oc=c[d][1];a.yc=c[d][2];a.wd=c[d][3];a.Pc=c[d][4];a.le=c[d][5];d++;a.Oi=1;a.jb=c[d++];a.fd=c[d++];a.ib=c[d++];a.fd=100<=a.fd?a.fd-100:a.fd-a.ib;a.Ua=c[d++];a.jd=c[d++];a.Tb=c[d++];a.vb=c[d++];a.Ja=null;a.ra||(a.$d="");var f=c[d++];f===Ej?(f=c[d++],c=c[d],zj(this,b,f,c,!0)?a.ra&&Fj(this,f,c,a.ra):this.Ka(!1)):void 0!==f&&a.ra&&
|
||||||
(a.Ja=a.ra.seek(a.mc,a.hb,a.Ta));return e};g.ri=function(){for(var a=0,b=[],c=0;c<this.ta.length;c++)b[a++]=this.qi(this.ta[c]);return b};g.qi=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=[a.name,a.rd,a.vc,a.vd,a.Mc,a.le];c[b++]=a.hb;c[b++]=-1;c[b++]=a.mc;c[b++]=a.Ta;c[b++]=a.ed;c[b++]=a.Qb;c[b++]=a.sb;c[b++]=Ej;c[b++]=a.yk;c[b]=a.$d;return c};
|
0>a.ra.restore(f)&&(e=!1);e&&a.ra&&void 0!==a.vb&&(a.Ja=a.ra.seek(a.ib,a.jb,a.Ua));return e};g.ti=function(){for(var a=0,b=[],c=0;c<this.ta.length;c++)b[a++]=this.si(this.ta[c]);return b};g.si=function(a){var b=0,c=[];c[b++]=a.Na;c[b++]=[a.name,a.oc,a.yc,a.wd,a.Pc,a.le];c[b++]=a.jb;c[b++]=a.fd+100;c[b++]=a.ib;c[b++]=a.Ua;c[b++]=a.jd;c[b++]=a.Tb;c[b++]=a.vb;c[b++]=Ej;c[b++]=a.Ak;c[b]=a.$d;return c};
|
||||||
g.He=function(a){a||(this.Ld=0);if(this.Yd)for(var b in this.Yd){var c=this.Yd[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.ta.length){!zj(this,d,c.name,c.path,!0)&&a&&this.Ka(!1);continue}}C(this,"Unrecognized auto-mount specification for drive "+b)}return!!this.Ld};function zj(a,b,c,d,e){var f=a.ta[b];if(d&&f.$d!=d){Aj(a,b,e,!0);if(f.tc)return C(a,"Drive "+b+" busy"),!0;f.tc=!0;e&&(f.Sd=!0,a.Ld++);(new nj(a,f,"preload")).load(c,d,a.Vl);return!1}return!0}
|
g.He=function(a){a||(this.Ld=0);if(this.Yd)for(var b in this.Yd){var c=this.Yd[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.ta.length){!zj(this,d,c.name,c.path,!0)&&a&&this.Ka(!1);continue}}C(this,"Unrecognized auto-mount specification for drive "+b)}return!!this.Ld};function zj(a,b,c,d,e){var f=a.ta[b];if(d&&f.$d!=d){Aj(a,b,e,!0);if(f.wc)return C(a,"Drive "+b+" busy"),!0;f.wc=!0;e&&(f.Sd=!0,a.Ld++);(new nj(a,f,"preload")).load(c,d,a.Vl);return!1}return!0}
|
||||||
g.Vl=function(a,b,c,d){a.tc=!1;if(a.ra=b)a.yk=c,a.$d=d,Fj(this,c,d,b),this.yd|=128,C(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(65+a.od),a.Sd);a.Sd&&(a.Sd=!1,--this.Ld||this.Ka());yj(this,a.od)};function yj(a,b){if(0<=b&&b<a.ta.length){var c=a.ta[b],d=a.oa.listDisks,e=a.oa.listDrives;if(d&&e&&(e=parseInt(e.value,10),!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c.$d){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}
|
g.Vl=function(a,b,c,d){a.wc=!1;if(a.ra=b)a.Ak=c,a.$d=d,Fj(this,c,d,b),this.zd|=128,C(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(65+a.mb),a.Sd);a.Sd&&(a.Sd=!1,--this.Ld||this.Ka());yj(this,a.mb)};function yj(a,b){if(0<=b&&b<a.ta.length){var c=a.ta[b],d=a.oa.listDisks,e=a.oa.listDrives;if(d&&e&&(e=parseInt(e.value,10),!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c.$d){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}
|
||||||
function Aj(a,b,c,d){var e=a.ta[b];e.ra&&(Dj(a,e.$d,e.ra),e.yk="",e.$d="",e.ra=null,a.yd|=128,d||C(a,"Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||yj(a,b))}function Fj(a,b,c,d){var e;for(e=0;e<a.Vb.length;e++)if(a.Vb[e][1]==c){d.restore(a.Vb[e][2]);return}a.Vb[e]=[b,c,[]]}function Dj(a,b,c){var d;for(d=0;d<a.Vb.length;d++)if(a.Vb[d][1]==b){a.Vb[d][2]=c.save();break}}g.tm=function(a,b){b&4?this.te&4||this.te&8&&this.ja&&Nh(this.ja,6):this.Sc();var c=b&3;b&16<<c&&(this.od=c);this.te=b};
|
function Aj(a,b,c,d){var e=a.ta[b];e.ra&&(Dj(a,e.$d,e.ra),e.Ak="",e.$d="",e.ra=null,a.zd|=128,d||C(a,"Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||yj(a,b))}function Fj(a,b,c,d){var e;for(e=0;e<a.Yb.length;e++)if(a.Yb[e][1]==c){d.restore(a.Yb[e][2]);return}a.Yb[e]=[b,c,[]]}function Dj(a,b,c){var d;for(d=0;d<a.Yb.length;d++)if(a.Yb[d][1]==b){a.Yb[d][2]=c.save();break}}g.tm=function(a,b){b&4?this.te&4||this.te&8&&this.ia&&Nh(this.ia,6):this.Vc();this.te=b};g.nl=function(){return this.Ma};
|
||||||
g.pl=function(){return this.Ma};g.nl=function(){var a=0;this.Za<this.Oa&&(a=this.Ab[this.Za]);this.te&8&&this.ja&&Sh(this.ja,6);++this.Za>=this.Oa&&(this.Ma&=-81,this.Za=this.Oa=0);return a};g.sm=function(a,b){this.Oa<this.Ab.length&&(this.Ab[this.Oa++]=b);var c=this.Ab[0]&31;void 0!==xj[c]&&this.Oa>=xj[c].gd&&this.Pg()};g.ol=function(){var a=this.yd;this.yd&=-129;return a};g.rm=function(a,b){this.uk=b};
|
g.ll=function(){var a=0;this.$a<this.Pa&&(a=this.Db[this.$a]);this.te&8&&this.ia&&Sh(this.ia,6);++this.$a>=this.Pa&&(this.Ma&=-81,this.$a=this.Pa=0);return a};g.sm=function(a,b){this.Pa<this.Db.length&&(this.Db[this.Pa++]=b);var c=this.Db[0]&31;void 0!==xj[c]&&this.Pa>=xj[c].kd&&this.Qg()};g.ml=function(){var a=this.zd;this.zd&=-129;return a};g.rm=function(a,b){this.wk=b};
|
||||||
g.Pg=function(){var a=!1;this.Za=0;var b,c=this.Ga()&31;switch(c){case 3:this.Ga("SRT");this.Ga("HLT");this.ib();break;case 4:b=this.Ga("US");this.Bc=b&=3;b=this.ta[b];this.ib();this.Xa(0,"ST3");break;case 5:case 6:b=this.Ga("US");a=b>>2&1;this.Bc=b&=3;b=this.ta[b];b.hb=a;b.mc=this.Ga("C");this.Ga("H");b.Ta=this.Ga("R");a=this.Ga("N");b.Qb=128<<a;b.ed=this.Ga("EOT");this.Ga("GPL");this.Ga("DTL");6==c?this.Qg(b):this.Rg(b);this.ib();Gj(this,b.errorCode);this.Xa((b.errorCode&65280)>>8,"ST1");this.Xa((b.errorCode&
|
g.Qg=function(){var a=!1;this.$a=0;var b,c,d;d=this.Ga()&31;switch(d){case 3:this.Ga("SRT");this.Ga("HLT");this.kb();break;case 4:c=this.Ga("DS");this.mb=c&3;b=this.ta[this.mb];this.kb();this.Ya((b.Na&4278190080)>>>24,"ST3");break;case 5:case 6:c=this.Ga("DS");this.mb=c&3;b=this.ta[this.mb];b.jb=c>>2&1;b.ib=this.Ga("C");this.Ga("H");b.Ua=this.Ga("R");a=this.Ga("N");b.Tb=128<<a;b.jd=this.Ga("EOT");this.Ga("GPL");this.Ga("DTL");6==d?this.Rg(b):this.Sg(b);this.kb();Gj(this,b);this.Ya((b.Na&65280)>>>
|
||||||
16711680)>>16,"ST2");this.Xa(b.mc,"C");this.Xa(b.hb,"H");this.Xa(b.Ta,"R");this.Xa(a,"N");a=!0;break;case 7:this.Bc=b=this.Ga("US")&3;b=this.ta[b];b.mc=0;b.errorCode=32;this.ib();a=!0;break;case 8:this.Bc=this.od;b=this.ta[this.Bc];this.ib();Gj(this,b.errorCode);this.Xa(b.mc,"PCN");break;case 13:b=this.Ga("US");a=b>>2&1;this.Bc=b&=3;b=this.ta[b];b.hb=a;a=this.Ga("N");b.Qb=128<<a;b.ed=this.Ga("SC");this.Ga("GPL");b.Hi=this.Ga("D");this.Si(b);this.ib();Gj(this,b.errorCode);this.Xa((b.errorCode&65280)>>
|
8,"ST1");this.Ya((b.Na&16711680)>>>16,"ST2");this.Ya(b.ib,"C");this.Ya(b.jb,"H");this.Ya(b.Ua,"R");this.Ya(a,"N");a=!0;break;case 7:c=this.Ga("DS");this.mb=c&3;b=this.ta[this.mb];b.ib=b.fd=0;b.Na=268435488;this.kb();a=!0;break;case 8:b=this.ta[this.mb];this.kb();Gj(this,b);this.Ya(b.ib,"PCN");break;case 13:c=this.Ga("DS");this.mb=c&3;b=this.ta[this.mb];b.jb=c>>2&1;a=this.Ga("N");b.Tb=128<<a;b.jd=this.Ga("SC");this.Ga("GPL");b.Ji=this.Ga("D");this.Vi(b);this.kb();Gj(this,b);this.Ya((b.Na&65280)>>>
|
||||||
8,"ST1");this.Xa((b.errorCode&16711680)>>16,"ST2");this.Xa(b.mc,"C");this.Xa(b.hb,"H");this.Xa(b.Ta,"R");this.Xa(a,"N");a=!0;break;case 15:b=this.Ga("US"),a=b>>2&1,this.Bc=b&=3,b=this.ta[b],b.hb=a,b.mc=this.Ga("NCN"),b.errorCode=32,this.ib(),a=!0}0<this.Oa&&(this.Ma|=80);this.te&8&&(!b||b.errorCode&8||!a||this.ja&&Nh(this.ja,6))};g.Ga=function(){var a=this.Ab[this.Za];this.Za++;return a};g.ib=function(){this.Za=this.Oa=0};g.Xa=function(a){this.Ab[this.Oa++]=a};
|
8,"ST1");this.Ya((b.Na&16711680)>>>16,"ST2");this.Ya(b.ib,"C");this.Ya(b.jb,"H");this.Ya(b.Ua,"R");this.Ya(a,"N");a=!0;break;case 15:c=this.Ga("DS"),this.mb=c&3,b=this.ta[this.mb],b.jb=c>>2&1,d=this.Ga("NCN"),b.ib+=d-b.fd,0>b.ib&&(b.ib=0),b.ib>=b.oc&&(b.ib=b.oc-1),b.fd=d,b.Na=32,0==b.ib&&(b.Na|=268435456),this.kb(),a=!0}0<this.Pa&&(this.Ma|=80);this.te&8&&(!b||b.Na&8||!a||this.ia&&Nh(this.ia,6))};g.Ga=function(){var a=this.Db[this.$a];this.$a++;return a};g.kb=function(){this.$a=this.Pa=0};
|
||||||
function Gj(a,b){a.Xa(a.Bc|a.ta[a.Bc].hb|b&255,"ST0")}g.Ng=function(a,b,c){void 0===b||0>b?this.Yc(a,c):c(-1,!1)};g.Og=function(a,b){return void 0!==b&&0<=b?this.xc(a,b):-1};g.Qk=function(a,b){return void 0!==b&&0<=b?this.vi(a,b):-1};g.Qg=function(a){a.errorCode=72;a.ra&&(a.Ja=null,a.errorCode=0,this.ja&&(Hh(this.ja,2,this,"dmaRead",a),Fh(this.ja,2)))};g.Rg=function(a){a.errorCode=72;a.ra&&(a.ra.me?a.errorCode=576:(a.Ja=null,a.errorCode=0,this.ja&&(Hh(this.ja,2,this,"dmaWrite",a),Fh(this.ja,2))))};
|
g.Ya=function(a){this.Db[this.Pa++]=a};function Gj(a,b){a.Ya(b.mb|b.jb|b.Na&255,"ST0")}g.Og=function(a,b,c){void 0===b||0>b?this.ad(a,c):c(-1,!1)};g.Pg=function(a,b){return void 0!==b&&0<=b?this.Ac(a,b):-1};g.Ok=function(a,b){return void 0!==b&&0<=b?this.xi(a,b):-1};g.Rg=function(a){a.Na=72;a.ra&&(a.Ja=null,a.Na=0,this.ia&&(Hh(this.ia,2,this,"dmaRead",a),Fh(this.ia,2)))};g.Sg=function(a){a.Na=72;a.ra&&(a.ra.me?a.Na=576:(a.Ja=null,a.Na=0,this.ia&&(Hh(this.ia,2,this,"dmaWrite",a),Fh(this.ia,2))))};
|
||||||
g.Si=function(a){a.errorCode=72;a.ra&&(a.Ja=null,a.errorCode=0,this.ja&&(a.Od=0,a.Wb=Array(4),a.Ie=!0,a.Ne=0,Hh(this.ja,2,this,"dmaFormat",a),Fh(this.ja,2),a.Ie=!1))};g.Yc=function(a,b){var c=-1;if(!a.errorCode&&a.ra){do{if(a.Ja&&0<=(c=vj(a.Ja,a.sb++)))break;a.Ja=a.ra.seek(a.mc,a.hb,a.Ta);if(!a.Ja){a.errorCode=1088;break}a.sb=0;a.Ta++}while(1)}b(c,!1)};
|
g.Vi=function(a){a.Na=72;a.ra&&(a.Ja=null,a.Na=0,this.ia&&(a.Od=0,a.Zb=Array(4),a.Ie=!0,a.Ne=0,Hh(this.ia,2,this,"dmaFormat",a),Fh(this.ia,2),a.Ie=!1))};g.ad=function(a,b){var c=-1;if(!a.Na&&a.ra){do{if(a.Ja&&0<=(c=vj(a.Ja,a.vb++)))break;a.Ja=a.ra.seek(a.ib,a.jb,a.Ua);if(!a.Ja){a.Na=1088;break}a.vb=0;a.Ua++}while(1)}b(c,!1)};g.Ac=function(a,b){if(a.Na||!a.ra)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.vb++,b))break;a.Ja=a.ra.seek(a.ib,a.jb,a.Ua);if(!a.Ja){a.Na=8256;b=-1;break}a.vb=0;a.Ua++}while(1);return b};
|
||||||
g.xc=function(a,b){if(a.errorCode||!a.ra)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.sb++,b))break;a.Ja=a.ra.seek(a.mc,a.hb,a.Ta);if(!a.Ja){a.errorCode=8256;b=-1;break}a.sb=0;a.Ta++}while(1);return b};g.vi=function(a,b){if(a.errorCode)return-1;a.Wb[a.Od++]=b;if(a.Od==a.Wb.length){a.mc=a.Wb[0];a.hb=a.Wb[1];a.Ta=a.Wb[2];a.Qb=128<<a.Wb[3];for(var c=a.Od=0;c<a.Qb;c++)if(0>this.xc(a,a.Hi))return-1;a.Ne++}a.Ne>=a.ed&&(b=-1);return b};
|
g.xi=function(a,b){if(a.Na)return-1;a.Zb[a.Od++]=b;if(a.Od==a.Zb.length){a.ib=a.Zb[0];a.jb=a.Zb[1];a.Ua=a.Zb[2];a.Tb=128<<a.Zb[3];for(var c=a.Od=0;c<a.Tb;c++)if(0>this.Ac(a,a.Ji))return-1;a.Ne++}a.Ne>=a.jd&&(b=-1);return b};var Bj={1012:wj.prototype.nl,1013:wj.prototype.ll,1015:wj.prototype.ml},Cj={1010:wj.prototype.tm,1013:wj.prototype.sm,1015:wj.prototype.rm};u(function(){for(var a=B(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new wj(d);A(d,c)}});
|
||||||
var Bj={1012:wj.prototype.pl,1013:wj.prototype.nl,1015:wj.prototype.ol},Cj={1010:wj.prototype.tm,1013:wj.prototype.sm,1015:wj.prototype.rm};u(function(){for(var a=B(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new wj(d);A(d,c)}});
|
function $(a){v.call(this,"HDC",a,$);this.dmaRead=this.Og;this.dmaWrite=this.Pg;this.dmaWriteBuffer=this.Pk;this.dmaWriteFormat=this.Qk;this.yg=[];if(a.drives)try{this.yg=eval("("+a.drives+")")}catch(b){this.error("HDC drive configuration error: "+b.message+" ("+a.drives+")")}}x(v,$);var Hj={0:[306,2,17,512],1:[375,8,17,512],2:[306,6,17,512],3:[306,4,17,512]};g=$.prototype;g.pb=function(){return!1};
|
||||||
function $(a){v.call(this,"HDC",a,$);this.dmaRead=this.Ng;this.dmaWrite=this.Og;this.dmaWriteBuffer=this.Rk;this.dmaWriteFormat=this.Sk;this.xg=[];if(a.drives)try{this.xg=eval("("+a.drives+")")}catch(b){this.error("HDC drive configuration error: "+b.message+" ("+a.drives+")")}}y(v,$);var Hj={0:[306,2,17,512],1:[375,8,17,512],2:[306,6,17,512],3:[306,4,17,512]};g=$.prototype;g.mb=function(){return!1};
|
g.ac=function(a,b,c,d){this.la=b;this.ja=c;this.Fa=d;this.Ca=a;this.ia=D(a,"ChipSet");Xa(b,this,Ij);Za(b,this,Jj);this.Vc();this.He()||this.Ka()};g.Mb=function(a,b){if(!b)if(!a||!this.restore)this.reset(),this.Ca.bh&&this.He(!0);else if(!this.restore(a))return!1;return!0};g.Cb=function(a){return a&&this.save?this.save():!0};g.ne=function(){return this.Ca?this.Ca.ne():""};g.qd=function(){return this.Ca?this.Ca.qd():""};g.reset=function(){this.Vc()};
|
||||||
g.Yb=function(a,b,c,d){this.la=b;this.ia=c;this.Ea=d;this.Ca=a;this.ja=D(a,"ChipSet");Xa(b,this,Ij);Za(b,this,Jj);this.Sc();this.He()||this.Ka()};g.Jb=function(a,b){if(!b)if(!a||!this.restore)this.reset(),this.Ca.ah&&this.He(!0);else if(!this.restore(a))return!1;return!0};g.zb=function(a){return a&&this.save?this.save():!0};g.ne=function(){return this.Ca?this.Ca.ne():""};g.nd=function(){return this.Ca?this.Ca.nd():""};g.reset=function(){this.Sc()};
|
g.save=function(){var a=new I(this);a.set(0,this.ri());return a.data()};g.restore=function(a){return this.Vc(a[0])};
|
||||||
g.save=function(){var a=new I(this);a.set(0,this.pi());return a.data()};g.restore=function(a){return this.Sc(a[0])};
|
g.Vc=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,Array(14),0,0]);this.og=a[b++];this.Ma=a[b++];this.Db=a[b++];this.$a=a[b++];this.Pa=a[b++];this.zk=a[b++];this.yk=a[b++];this.xk=a[b++];var d=a[b++];void 0!==d?this.We=d:void 0===this.We&&(this.We=-1);void 0===this.ta&&(this.ta=Array(this.yg.length));a=a[b];void 0===a&&(a=[]);for(b=0;b<this.ta.length;b++)void 0===this.ta[b]&&(this.ta[b]={}),d=this.ta[b],this.lh(b,d,this.yg[b],a[b])||(c=!1),1>=b&&(this.og|=(d.type&3)<<(1-b<<1));return c};
|
||||||
g.Sc=function(a){var b=0,c=!0;void 0===a&&(a=[0,0,Array(14),0,0]);this.ng=a[b++];this.Ma=a[b++];this.Ab=a[b++];this.Za=a[b++];this.Oa=a[b++];this.xk=a[b++];this.wk=a[b++];this.vk=a[b++];var d=a[b++];void 0!==d?this.We=d:void 0===this.We&&(this.We=-1);void 0===this.ta&&(this.ta=Array(this.xg.length));a=a[b];void 0===a&&(a=[]);for(b=0;b<this.ta.length;b++)void 0===this.ta[b]&&(this.ta[b]={}),d=this.ta[b],this.kh(b,d,this.xg[b],a[b])||(c=!1),1>=b&&(this.ng|=(d.type&3)<<(1-b<<1));return c};
|
g.ri=function(){var a=0,b=[];b[a++]=this.og;b[a++]=this.Ma;b[a++]=this.Db;b[a++]=this.$a;b[a++]=this.Pa;b[a++]=this.zk;b[a++]=this.yk;b[a++]=this.xk;b[a++]=this.We;b[a]=this.ti();return b};
|
||||||
g.pi=function(){var a=0,b=[];b[a++]=this.ng;b[a++]=this.Ma;b[a++]=this.Ab;b[a++]=this.Za;b[a++]=this.Oa;b[a++]=this.xk;b[a++]=this.wk;b[a++]=this.vk;b[a++]=this.We;b[a]=this.ri();return b};
|
g.lh=function(a,b,c,d){var e=0,f=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.mb=a;b.errorCode=d[e++];b.Ek=d[e++];b.le=d[e++];b.ee=d[e++];b.fe=d[e++];b.jb=d[e++];b.yc=d[e++];b.ye=d[e++];b.Ua=d[e++];b.jd=d[e++];b.Tb=d[e++];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.qd()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hj[b.type])b.type=3;c=Hj[b.type];b.wd=c[2];b.Pc=c[3];void 0===b.ra&&
|
||||||
g.kh=function(a,b,c,d){var e=0,f=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.od=a;b.errorCode=d[e++];b.Ck=d[e++];b.le=d[e++];b.ee=d[e++];b.fe=d[e++];b.hb=d[e++];b.vc=d[e++];b.ye=d[e++];b.Ta=d[e++];b.ed=d[e++];b.Qb=d[e++];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.nd()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Hj[b.type])b.type=3;c=Hj[b.type];b.vd=c[2];b.Mc=c[3];void 0===b.ra&&
|
(b.ra=null,C(this,"Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Kj(this,b);b.vb=d[e++];b.Ja=null;b.ra&&(a=d[e],void 0!==a&&0>b.ra.restore(a)&&(f=!1),f&&void 0!==b.vb&&(b.Ja=b.ra.seek(b.ye,b.jb,b.Ua+1)));return f};g.ti=function(){for(var a=0,b=[],c=0;c<this.ta.length;c++)b[a++]=this.si(this.ta[c]);return b};
|
||||||
(b.ra=null,C(this,"Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Kj(this,b);b.sb=d[e++];b.Ja=null;b.ra&&(a=d[e],void 0!==a&&0>b.ra.restore(a)&&(f=!1),f&&void 0!==b.sb&&(b.Ja=b.ra.seek(b.ye,b.hb,b.Ta+1)));return f};g.ri=function(){for(var a=0,b=[],c=0;c<this.ta.length;c++)b[a++]=this.qi(this.ta[c]);return b};
|
g.si=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Ek;c[b++]=a.le;c[b++]=a.ee;c[b++]=a.fe;c[b++]=a.jb;c[b++]=a.yc;c[b++]=a.ye;c[b++]=a.Ua;c[b++]=a.jd;c[b++]=a.Tb;c[b++]=a.vb;c[b]=a.ra?a.ra.save():null;return c};
|
||||||
g.qi=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Ck;c[b++]=a.le;c[b++]=a.ee;c[b++]=a.fe;c[b++]=a.hb;c[b++]=a.vc;c[b++]=a.ye;c[b++]=a.Ta;c[b++]=a.ed;c[b++]=a.Qb;c[b++]=a.sb;c[b]=a.ra?a.ra.save():null;return c};
|
function Kj(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.ee[2])?e=b.ee[0]<<8|b.ee[1]:c=b.type);null==c||d||(d=Hj[c][1],e=Hj[c][0]);d&&((c=Hj[b.type])&&e!=c[0]&&d!=c[1]&&C(a,"Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.oc=e,b.yc=d,null==b.ra&&(b.ra=new nj(a,b,b.mode)))}}
|
||||||
function Kj(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.ee[2])?e=b.ee[0]<<8|b.ee[1]:c=b.type);null==c||d||(d=Hj[c][1],e=Hj[c][0]);d&&((c=Hj[b.type])&&e!=c[0]&&d!=c[1]&&C(a,"Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.rd=e,b.vc=d,null==b.ra&&(b.ra=new nj(a,b,b.mode)))}}
|
g.He=function(a){a||(this.Ld=0);for(var b=0;b<this.ta.length;b++){var c=this.ta[b];if(c.name&&c.path){var d;d=c.name;var c=c.path,e=this.ta[b];e.wc?(C(this,"Drive "+b+" busy"),d=!0):(e.wc=!0,e.Sd=!0,this.Ld++,(e.ra||new nj(this,e,e.mode)).load(d,c,this.Ul),d=!1);!d&&a&&this.Ka(!1)}else a&&void 0!==c.type&&(c.ra=null,Kj(this,c,c.type))}return!!this.Ld};g.Ul=function(a,b,c){a.wc=!1;(a.ra=b)&&C(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.mb),a.Sd);a.Sd&&(a.Sd=!1,--this.Ld||this.Ka())};
|
||||||
g.He=function(a){a||(this.Ld=0);for(var b=0;b<this.ta.length;b++){var c=this.ta[b];if(c.name&&c.path){var d;d=c.name;var c=c.path,e=this.ta[b];e.tc?(C(this,"Drive "+b+" busy"),d=!0):(e.tc=!0,e.Sd=!0,this.Ld++,(e.ra||new nj(this,e,e.mode)).load(d,c,this.Ul),d=!1);!d&&a&&this.Ka(!1)}else a&&void 0!==c.type&&(c.ra=null,Kj(this,c,c.type))}return!!this.Ld};g.Ul=function(a,b,c){a.tc=!1;(a.ra=b)&&C(this,'Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.od),a.Sd);a.Sd&&(a.Sd=!1,--this.Ld||this.Ka())};
|
g.tl=function(){var a=0;this.$a<this.Pa&&(a=this.Db[this.$a]);this.ia&&Sh(this.ia,5);this.Ma&=-33;++this.$a>=this.Pa&&(this.$a=this.Pa=0,this.Ma&=-15);return a};g.ym=function(a,b){this.Pa<this.Db.length&&(this.Db[this.Pa++]=b);var c=12!=this.Db[0]?6:this.Db.length;6==this.Pa&&(this.Ma&=-2);this.Pa>=c&&(this.Ma|=2,this.Ma&=-2,this.Qg())};g.ul=function(){var a=this.Ma;this.$a<this.Pa&&(this.Ma|=1);return a};g.Bm=function(a,b){this.zk=b;this.ia&&Sh(this.ia,5);this.Vc()};g.sl=function(){return this.og};
|
||||||
g.vl=function(){var a=0;this.Za<this.Oa&&(a=this.Ab[this.Za]);this.ja&&Sh(this.ja,5);this.Ma&=-33;++this.Za>=this.Oa&&(this.Za=this.Oa=0,this.Ma&=-15);return a};g.ym=function(a,b){this.Oa<this.Ab.length&&(this.Ab[this.Oa++]=b);var c=12!=this.Ab[0]?6:this.Ab.length;6==this.Oa&&(this.Ma&=-2);this.Oa>=c&&(this.Ma|=2,this.Ma&=-2,this.Pg())};g.wl=function(){var a=this.Ma;this.Za<this.Oa&&(this.Ma|=1);return a};g.Bm=function(a,b){this.xk=b;this.ja&&Sh(this.ja,5);this.Sc()};g.ul=function(){return this.ng};
|
g.Am=function(a,b){this.yk=b;this.Ma=13};g.zm=function(a,b){this.xk=b};g.ki=function(){};
|
||||||
g.Am=function(a,b){this.wk=b;this.Ma=13};g.zm=function(a,b){this.vk=b};g.ji=function(){};
|
g.Qg=function(){var a=this;this.$a=0;var b=this.Ga(),c=this.Ga(),d=c&32,e=d>>5,f=c&31,l=this.Ga(),k=this.Ga(),m=l<<2&768|k,n=l&63,q=this.Ga(),s=this.Ga(),r=this.ta[e];r&&(r.ye=m,r.jb=f,r.Ua=n,r.Tb=q*r.Pc);switch(b){case 3:this.kb(r?r.errorCode:4);this.Ya(c);this.Ya(l);this.Ya(k);this.Ya(0|d);b=-1;break;case 12:for(c=0;0<=(b=this.Ga());)r&&c<r.ee.length&&(r.ee[c++]=b);r&&Kj(this,r);b=0;r||this.We!=e||(this.We=-1,b=2);this.kb(b|d);b=-1;break;case 224:case 228:this.kb(0|d),b=-1}if(0<=b)switch(void 0===
|
||||||
g.Pg=function(){var a=this;this.Za=0;var b=this.Ga(),c=this.Ga(),d=c&32,e=d>>5,f=c&31,l=this.Ga(),k=this.Ga(),m=l<<2&768|k,n=l&63,q=this.Ga(),s=this.Ga(),r=this.ta[e];r&&(r.ye=m,r.hb=f,r.Ta=n,r.Qb=q*r.Mc);switch(b){case 3:this.ib(r?r.errorCode:4);this.Xa(c);this.Xa(l);this.Xa(k);this.Xa(0|d);b=-1;break;case 12:for(c=0;0<=(b=this.Ga());)r&&c<r.ee.length&&(r.ee[c++]=b);r&&Kj(this,r);b=0;r||this.We!=e||(this.We=-1,b=2);this.ib(b|d);b=-1;break;case 224:case 228:this.ib(0|d),b=-1}if(0<=b)switch(void 0===
|
r?b=-1:(r.errorCode=0,r.Ek=0),b){case 0:this.kb(0|d);break;case 1:r.xn=s;this.kb(0|d);break;case 5:this.kb(0|d);break;case 8:this.Rg(r,function(b){a.kb(b|d)});break;case 10:this.Sg(r,function(b){a.kb(b|d)});break;case 15:Lj(this,r,function(b){a.kb(b|d)});break;default:this.kb(2|d)}};g.Ga=function(){var a=-1;this.$a<this.Pa&&(a=this.Db[this.$a++]);return a};g.kb=function(a){this.$a=this.Pa=0;void 0!==a&&this.Ya(a);this.ia&&Nh(this.ia,5);this.Ma|=32};g.Ya=function(a){this.Db[this.Pa++]=a};
|
||||||
r?b=-1:(r.errorCode=0,r.Ck=0),b){case 0:this.ib(0|d);break;case 1:r.wn=s;this.ib(0|d);break;case 5:this.ib(0|d);break;case 8:this.Qg(r,function(b){a.ib(b|d)});break;case 10:this.Rg(r,function(b){a.ib(b|d)});break;case 15:Lj(this,r,function(b){a.ib(b|d)});break;default:this.ib(2|d)}};g.Ga=function(){var a=-1;this.Za<this.Oa&&(a=this.Ab[this.Za++]);return a};g.ib=function(a){this.Za=this.Oa=0;void 0!==a&&this.Xa(a);this.ja&&Nh(this.ja,5);this.Ma|=32};g.Xa=function(a){this.Ab[this.Oa++]=a};
|
g.Og=function(a,b,c){void 0===b||0>b?this.ad(a,c):c(-1,!1)};g.Pg=function(a,b){return void 0!==b&&0<=b?this.Ac(a,b):-1};g.Pk=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.vb<a.fe.length?a.fe[a.vb++]=c:(a.errorCode=20,c=-1)):c=-1;return c};g.Qk=function(a,b){return void 0!==b&&0<=b?this.xi(a,b):-1};
|
||||||
g.Ng=function(a,b,c){void 0===b||0>b?this.Yc(a,c):c(-1,!1)};g.Og=function(a,b){return void 0!==b&&0<=b?this.xc(a,b):-1};g.Rk=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.sb<a.fe.length?a.fe[a.sb++]=c:(a.errorCode=20,c=-1)):c=-1;return c};g.Sk=function(a,b){return void 0!==b&&0<=b?this.vi(a,b):-1};
|
g.Rg=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ia)){a.errorCode=0;Hh(this.ia,3,this,"dmaRead",a);Fh(this.ia,3,function(c){c||0!=a.errorCode||(a.errorCode=4);b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};g.Sg=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ia)){a.errorCode=0;Hh(this.ia,3,this,"dmaWrite",a);Fh(this.ia,3,function(c){c||(0==a.errorCode&&(a.errorCode=4),20==a.errorCode&&(a.errorCode=0));b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
||||||
g.Qg=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ja)){a.errorCode=0;Hh(this.ja,3,this,"dmaRead",a);Fh(this.ja,3,function(c){c||0!=a.errorCode||(a.errorCode=4);b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};g.Rg=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ja)){a.errorCode=0;Hh(this.ja,3,this,"dmaWrite",a);Fh(this.ja,3,function(c){c||(0==a.errorCode&&(a.errorCode=4),20==a.errorCode&&(a.errorCode=0));b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
function Lj(a,b,c){b.errorCode=4;b.fe&&b.fe.length==b.Tb||(b.fe=Array(b.Tb));b.vb=0;a.ia?(b.errorCode=0,Hh(a.ia,3,a,"dmaWriteBuffer",b),Fh(a.ia,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}g.Vi=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ia)){a.Od=0;a.Zb=Array(4);a.Ie=!0;a.Ne=0;a.errorCode=0;Hh(this.ia,3,this,"dmaWriteFormat",a);Fh(this.ia,3,function(c){c||0!=a.errorCode||(a.errorCode=4);a.Ie=!1;b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
||||||
function Lj(a,b,c){b.errorCode=4;b.fe&&b.fe.length==b.Qb||(b.fe=Array(b.Qb));b.sb=0;a.ja?(b.errorCode=0,Hh(a.ja,3,a,"dmaWriteBuffer",b),Fh(a.ja,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}g.Si=function(a,b){a.errorCode=4;if(a.ra&&(a.Ja=null,this.ja)){a.Od=0;a.Wb=Array(4);a.Ie=!0;a.Ne=0;a.errorCode=0;Hh(this.ja,3,this,"dmaWriteFormat",a);Fh(this.ja,3,function(c){c||0!=a.errorCode||(a.errorCode=4);a.Ie=!1;b(a.errorCode?2:0)});return}b(a.errorCode?2:0)};
|
g.ad=function(a,b){var c=-1;if(a.errorCode)b(c,!1);else{if(a.Ja&&(c=vj(a.Ja,a.vb++),0<=c)){b(c,!1);return}a.ra.seek(a.ye,a.jb,a.Ua+1,!1,function(c,e){var f=-1;(a.Ja=c)?(a.vb=0,a.Ua++,f=vj(a.Ja,a.vb++)):a.errorCode=20;b(f,e)})}};g.Ac=function(a,b){if(a.errorCode)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.vb++,b))break;a.ra.seek(a.ye,a.jb,a.Ua+1,!0,function(b){a.Ja=b});if(!a.Ja){a.errorCode=20;b=-1;break}a.vb=0;a.Ua++}while(1);return b};
|
||||||
g.Yc=function(a,b){var c=-1;if(a.errorCode)b(c,!1);else{if(a.Ja&&(c=vj(a.Ja,a.sb++),0<=c)){b(c,!1);return}a.ra.seek(a.ye,a.hb,a.Ta+1,!1,function(c,e){var f=-1;(a.Ja=c)?(a.sb=0,a.Ta++,f=vj(a.Ja,a.sb++)):a.errorCode=20;b(f,e)})}};g.xc=function(a,b){if(a.errorCode)return-1;do{if(a.Ja&&a.ra.write(a.Ja,a.sb++,b))break;a.ra.seek(a.ye,a.hb,a.Ta+1,!0,function(b){a.Ja=b});if(!a.Ja){a.errorCode=20;b=-1;break}a.sb=0;a.Ta++}while(1);return b};
|
g.xi=function(a,b){if(a.errorCode)return-1;a.Zb[a.Od++]=b;if(a.Od==a.Zb.length){a.ye=a.Zb[0];a.jb=a.Zb[1];a.Ua=a.Zb[2];a.Tb=128<<a.Zb[3];for(var c=a.Od=0;c<a.Tb;c++)if(0>this.Ac(a,a.Ji))return-1;a.Ne++}a.Ne>=a.jd&&(b=-1);return b};var Ij={800:$.prototype.tl,801:$.prototype.ul,802:$.prototype.sl},Jj={800:$.prototype.ym,801:$.prototype.Bm,802:$.prototype.Am,803:$.prototype.zm,807:$.prototype.ki,811:$.prototype.ki,815:$.prototype.ki};
|
||||||
g.vi=function(a,b){if(a.errorCode)return-1;a.Wb[a.Od++]=b;if(a.Od==a.Wb.length){a.ye=a.Wb[0];a.hb=a.Wb[1];a.Ta=a.Wb[2];a.Qb=128<<a.Wb[3];for(var c=a.Od=0;c<a.Qb;c++)if(0>this.xc(a,a.Hi))return-1;a.Ne++}a.Ne>=a.ed&&(b=-1);return b};var Ij={800:$.prototype.vl,801:$.prototype.wl,802:$.prototype.ul},Jj={800:$.prototype.ym,801:$.prototype.Bm,802:$.prototype.Am,803:$.prototype.zm,807:$.prototype.ji,811:$.prototype.ji,815:$.prototype.ji};
|
u(function(){for(var a=B(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new $(d);A(d,c)}});function I(a,b,c){this.id=a.id;this.key=Mj(a,b,c);this.Fa=a.Fa;Nj(this,a.Um)}function Mj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
u(function(){for(var a=B(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new $(d);A(d,c)}});function I(a,b,c){this.id=a.id;this.key=Mj(a,b,c);this.Ea=a.Ea;Nj(this,a.Tm)}function Mj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
I.prototype={set:function(a,b){this[this.id][a]=b},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.$g=!0):this.$g?!0:window.localStorage&&(a=window.localStorage.getItem(this.key))?(this[this.id]=a,this.$g=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){t(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==
|
||||||
I.prototype={set:function(a,b){this[this.id][a]=b},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.Zg=!0):this.Zg?!0:window.localStorage&&(a=window.localStorage.getItem(this.key))?(this[this.id]=a,this.Zg=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){t(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==
|
typeof a?a:JSON.stringify(a)},clear:function(a){Nj(this);if(window.localStorage)for(var b=0;b<window.localStorage.length;){var c=window.localStorage.key(b++);c&&(a||c.substr(0,this.key.length)==this.key)&&(window.localStorage.removeItem(c),b=0)}}};function Nj(a,b){a[a.id]={};b&&a.set("parms",b);a.$g=!1}
|
||||||
typeof a?a:JSON.stringify(a)},clear:function(a){Nj(this);if(window.localStorage)for(var b=0;b<window.localStorage.length;){var c=window.localStorage.key(b++);c&&(a||c.substr(0,this.key.length)==this.key)&&(window.localStorage.removeItem(c),b=0)}}};function Nj(a,b){a[a.id]={};b&&a.set("parms",b);a.Zg=!1}
|
|
||||||
function Oj(a){var b=!0;if(window.localStorage){var c=JSON.stringify(a[a.id]);try{window.localStorage.setItem(a.key,c)}catch(d){t("Unable to store "+c.length+" bytes in browser local storage"),b=!1}}return b}
|
function Oj(a){var b=!0;if(window.localStorage){var c=JSON.stringify(a[a.id]);try{window.localStorage.setItem(a.key,c)}catch(d){t("Unable to store "+c.length+" bytes in browser local storage"),b=!1}}return b}
|
||||||
function Pj(a,b,c){v.call(this,"Computer",a,Pj);this.rb=!1;this.Ye=a.buswidth;this.$b=Sj;this.sf=null;this.Uf=!1;this.url=b?b.url:null;this.bn=(Math.random()+0.1).toString(36).substr(2,12);this.lc=Tj(this);if(this.ia=Ea("CPU",this.id)){this.Ea=Ea("Debugger",this.id);this.la=new Ma({id:this.Xf+".bus",buswidth:this.Ye},this.ia,this.Ea);b=Ca(this.id);for(var d=0;d<b.length;d++){var e=b[d];e.Yb&&e.Yb(this,this.la,this.ia,this.Ea)}b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.pg=d:this.$b=parseInt(d,
|
function Pj(a,b,c){v.call(this,"Computer",a,Pj);this.ub=!1;this.Ye=a.buswidth;this.cc=Sj;this.sf=null;this.Uf=!1;this.url=b?b.url:null;this.cn=(Math.random()+0.1).toString(36).substr(2,12);this.pc=Tj(this);if(this.ja=Ea("CPU",this.id)){this.Fa=Ea("Debugger",this.id);this.la=new Ma({id:this.Xf+".bus",buswidth:this.Ye},this.ja,this.Fa);b=Ca(this.id);for(var d=0;d<b.length;d++){var e=b[d];e.ac&&e.ac(this,this.la,this.ja,this.Fa)}b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.qg=d:this.cc=parseInt(d,
|
||||||
10));var f;if(a=va&&va.state||(f=!0,a.state))b=this.Ak=a,f||(this.Uf=!0,this.$b=Sj),this.$b&&(this.tg=new I(this,"1.15.3"),this.tg.load()?b=null:delete this.tg);!b&&this.$b&&(f=null,this.lc&&(f=ka()+"/api/v1/user?req=load&user="+this.lc+"&state="+Mj(this,"1.15.3")),b=f)&&(this.Uf=!0);b?p(b,!0,null,this,this.fm):this.Ka();c||Uj(this,this.lg)}else t("Unable to find CPU component")}y(v,Pj);var Ej=102,Sj=0;g=Pj.prototype;g.ne=function(){return this.bn};g.nd=function(){return this.lc?this.lc:""};
|
10));var f;if(a=va&&va.state||(f=!0,a.state))b=this.Ck=a,f||(this.Uf=!0,this.cc=Sj),this.cc&&(this.ug=new I(this,"1.15.3"),this.ug.load()?b=null:delete this.ug);!b&&this.cc&&(f=null,this.pc&&(f=ka()+"/api/v1/user?req=load&user="+this.pc+"&state="+Mj(this,"1.15.3")),b=f)&&(this.Uf=!0);b?p(b,!0,null,this,this.fm):this.Ka();c||Uj(this,this.mg)}else t("Unable to find CPU component")}x(v,Pj);var Ej=102,Sj=0;g=Pj.prototype;g.ne=function(){return this.cn};g.qd=function(){return this.pc?this.pc:""};
|
||||||
g.fm=function(a,b,c){c?(this.pg=null,this.Uf=!1,C(this,"Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):this.sf=b;this.Ka()};function Uj(a,b,c){for(var d=Ca(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ha(f)){Ha(f,function(){Uj(a,b,c)});return}}b.call(a,c)}
|
g.fm=function(a,b,c){c?(this.qg=null,this.Uf=!1,C(this,"Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):this.sf=b;this.Ka()};function Uj(a,b,c){for(var d=Ca(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ha(f)){Ha(f,function(){Uj(a,b,c)});return}}b.call(a,c)}
|
||||||
function Vj(a,b){var c=new I(a,"1.15.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(C(a,"Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
function Vj(a,b){var c=new I(a,"1.15.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(C(a,"Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||||
g.lg=function(a){void 0===a&&(a=this.sf?1:this.$b);var b=!1,c=!1;this.Zi=!1;var d=this.tg||new I(this,"1.15.3");if(-1==a)b=!0;else if(a>Sj){if(d.load(this.sf)){this.xe=new I(this,"1.15.3","failsafe");this.xe.load()&&(Wj(this,d),a=2);this.xe.set("timestamp",ia());Oj(this.xe);var e=this.$b&&!this.Uf;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?(C(this,"Error: "+l),"unable to verify user"==
|
g.mg=function(a){void 0===a&&(a=this.sf?1:this.cc);var b=!1,c=!1;this.bj=!1;var d=this.ug||new I(this,"1.15.3");if(-1==a)b=!0;else if(a>Sj){if(d.load(this.sf)){this.xe=new I(this,"1.15.3","failsafe");this.xe.load()&&(Wj(this,d),a=2);this.xe.set("timestamp",ia());Oj(this.xe);var e=this.cc&&!this.Uf;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?(C(this,"Error: "+l),"unable to verify user"==
|
||||||
l&&(ma(""),this.lc=null)):Fa(this,f+": "+l),Nj(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&Vj(this,c?d:null)}else 2==a&&d.clear()}else Vj(this);delete this.sf;delete this.tg}e=Ca(this.id);for(f=0;f<e.length;f++)l=e[f],l!==this&&l!=this.ia&&(c=Xj(this,l,d,b,c));b=[d,a,c];-1!=a?Uj(this,this.sk,b):this.sk(b)};
|
l&&(ma(""),this.pc=null)):Fa(this,f+": "+l),Nj(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&Vj(this,c?d:null)}else 2==a&&d.clear()}else Vj(this);delete this.sf;delete this.ug}e=Ca(this.id);for(f=0;f<e.length;f++)l=e[f],l!==this&&l!=this.ja&&(c=Xj(this,l,d,b,c));b=[d,a,c];-1!=a?Uj(this,this.uk,b):this.uk(b)};
|
||||||
function Xj(a,b,c,d,e){if(!b.rb){b.rb=!0;if(b.Jb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Jb(f,d)&&f&&(a.error("Unable to restore state for "+b.type),a.Ak&&!a.sf?(c.clear(),a.$b=Sj,window&&window.location.reload()):a.Zi=!0,b.Jb(null),e=!1)}if(!d&&b.Qi)for(a=b.Qi.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function Xj(a,b,c,d,e){if(!b.ub){b.ub=!0;if(b.Mb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Mb(f,d)&&f&&(a.error("Unable to restore state for "+b.type),a.Ck&&!a.sf?(c.clear(),a.cc=Sj,window&&window.location.reload()):a.bj=!0,b.Mb(null),e=!1)}if(!d&&b.Ti)for(a=b.Ti.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
g.sk=function(a){var b=a[0],c=0>a[1];a=a[2];this.rb=!0;this.Wi||(Fa(this,"PCjs v1.15.3\nCopyright \u00a9 2012-2014 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.Wi=!0);this.ia&&Xj(this,this.ia,b,c,a);this.Zi&&(Wj(this,b),b.clear());!c&&this.xe&&(this.xe.clear(),delete this.xe)};
|
g.uk=function(a){var b=a[0],c=0>a[1];a=a[2];this.ub=!0;this.Zi||(Fa(this,"PCjs v1.15.3\nCopyright \u00a9 2012-2014 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.Zi=!0);this.ja&&Xj(this,this.ja,b,c,a);this.bj&&(Wj(this,b),b.clear());!c&&this.xe&&(this.xe.clear(),delete this.xe)};
|
||||||
function Wj(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.nd(),d=b.toString(),e={app:"PCjs",ver:"1.15.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;p("http://www.pcjs.org/api/v1/report",!0,e)}}
|
function Wj(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.qd(),d=b.toString(),e={app:"PCjs",ver:"1.15.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;p("http://www.pcjs.org/api/v1/report",!0,e)}}
|
||||||
function Yj(a,b,c){var d,e="none",f=new I(a,"1.15.3"),l=new I(a,"1.15.3","validate"),k=ia();l.set("timestamp",k);f.set("timestamp",k);f.set("version","1.15.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.ia&&a.ia.zb&&(c&&kb(a.ia),d=a.ia.zb(b,c),"object"===typeof d&&f.set(a.ia.id,d),c&&(a.ia.rb=!1,!1===d&&(e=null)));for(var k=Ca(a.id),m=0;m<k.length;m++){var n=k[m];n.rb&&(n.zb&&(d=n.zb(b,c),"object"===typeof d&&f.set(n.id,d)),c&&(n.rb=!1,!1===
|
function Yj(a,b,c){var d,e="none",f=new I(a,"1.15.3"),l=new I(a,"1.15.3","validate"),k=ia();l.set("timestamp",k);f.set("timestamp",k);f.set("version","1.15.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.ja&&a.ja.Cb&&(c&&kb(a.ja),d=a.ja.Cb(b,c),"object"===typeof d&&f.set(a.ja.id,d),c&&(a.ja.ub=!1,!1===d&&(e=null)));for(var k=Ca(a.id),m=0;m<k.length;m++){var n=k[m];n.ub&&(n.Cb&&(d=n.Cb(b,c),"object"===typeof d&&f.set(n.id,d)),c&&(n.ub=!1,!1===
|
||||||
d&&(e=null)))}e&&(c?(k=d=!1,b?(a.lc&&Zj(a,a.lc,f.toString()),Oj(l)&&Oj(f)||(e=null,d=k=!0)):a.$b&&(d=!0,k=3==a.$b),d&&f.clear(k)):e=f.toString());c&&(a.rb=!1);return e}g.reset=function(){this.la&&this.la.reset&&this.la.reset();for(var a=Ca(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.la&&c.reset&&c.reset()}};g.start=function(a,b){for(var c=Ca(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
d&&(e=null)))}e&&(c?(k=d=!1,b?(a.pc&&Zj(a,a.pc,f.toString()),Oj(l)&&Oj(f)||(e=null,d=k=!0)):a.cc&&(d=!0,k=3==a.cc),d&&f.clear(k)):e=f.toString());c&&(a.ub=!1);return e}g.reset=function(){this.la&&this.la.reset&&this.la.reset();for(var a=Ca(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.la&&c.reset&&c.reset()}};g.start=function(a,b){for(var c=Ca(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||||
g.stop=function(a,b){for(var c=Ca(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};g.mb=function(a,b,c,d){var e=this;switch(c){case "save":return this.oa[c]=d,d.onclick=function(){var a=Tj(e,!0);if(a){var b=!(!e.$b||e.pg),c=Yj(e,b);b?Zj(e,a,c):C(e,"Resume disabled, machine state not saved")}},!0;case "reset":return this.oa[c]=d,d.onclick=function(){lb(e)},!0}return!1};
|
g.stop=function(a,b){for(var c=Ca(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};g.pb=function(a,b,c,d){var e=this;switch(c){case "save":return this.oa[c]=d,d.onclick=function(){var a=Tj(e,!0);if(a){var b=!(!e.cc||e.qg),c=Yj(e,b);b?Zj(e,a,c):C(e,"Resume disabled, machine state not saved")}},!0;case "reset":return this.oa[c]=d,d.onclick=function(){lb(e)},!0}return!1};
|
||||||
function Tj(a,b){var c=a.lc;if(!c){var d;window&&(d=window.localStorage.getItem("user"));c=d;void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email Jeff@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=ak(a,c))||C(a,"Your user ID has not been approved."))):b&&C(a,"Browser local storage is not available")}return c}
|
function Tj(a,b){var c=a.pc;if(!c){var d;window&&(d=window.localStorage.getItem("user"));c=d;void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email Jeff@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=ak(a,c))||C(a,"Your user ID has not been approved."))):b&&C(a,"Browser local storage is not available")}return c}
|
||||||
function ak(a,b){a.lc=null;var c=p(ka()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(ma(c.data),a.lc=c.data)}catch(e){t(e.message+" ("+d+")")}return a.lc}
|
function ak(a,b){a.pc=null;var c=p(ka()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(ma(c.data),a.pc=c.data)}catch(e){t(e.message+" ("+d+")")}return a.pc}
|
||||||
function Zj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Mj(a,"1.15.3");d.data=c;b=p(ka()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?C(a,"Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,C(a,c),ma(""),a.lc=null)}}
|
function Zj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Mj(a,"1.15.3");d.data=c;b=p(ka()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?C(a,"Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,C(a,c),ma(""),a.pc=null)}}
|
||||||
function lb(a){if(a.$b&&!a.pg){var b=1==a.$b||!la("Click OK to reset the PCjs machine state.\n(WARNING: All disk changes will be discarded)");Yj(a,b,!0);!b&&a.Ak?window&&window.location.reload():(b||(a.ah=!0),a.lg(Sj),a.ah=!1)}else a.reset(),a.ia&&jb(a.ia)}function D(a,b,c){a=Ca(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}
|
function lb(a){if(a.cc&&!a.qg){var b=1==a.cc||!la("Click OK to reset the PCjs machine state.\n(WARNING: All disk changes will be discarded)");Yj(a,b,!0);!b&&a.Ck?window&&window.location.reload():(b||(a.bh=!0),a.mg(Sj),a.bh=!1)}else a.reset(),a.ja&&jb(a.ja)}function D(a,b,c){a=Ca(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}
|
||||||
u(function(){for(var a=B(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=B(c,"pcjs","computer"),e=0;e<c.length;e++){var f=c[e],l=z(f),l=new Pj(l,d,!0);A(l,f);Uj(l,l.lg)}});oa.show.push(function(){for(var a=B(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ea("Computer",c.id))&&c.Wi&&!c.rb&&c.lg(-1)}});
|
u(function(){for(var a=B(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=B(c,"pcjs","computer"),e=0;e<c.length;e++){var f=c[e],l=z(f),l=new Pj(l,d,!0);A(l,f);Uj(l,l.mg)}});oa.show.push(function(){for(var a=B(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ea("Computer",c.id))&&c.Zi&&!c.ub&&c.mg(-1)}});
|
||||||
oa.exit.push(function(){for(var a=B(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ea("Computer",c.id))&&c.rb&&Yj(c,!(!c.$b||c.pg),!0)}});function bk(a,b,c,d){var e=p(a);if(e[0])throw Error(e[1]);return ck(e[1],a,b,c,d)}
|
oa.exit.push(function(){for(var a=B(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=Ea("Computer",c.id))&&c.ub&&Yj(c,!(!c.cc||c.qg),!0)}});function bk(a,b,c,d){var e=p(a);if(e[0])throw Error(e[1]);return ck(e[1],a,b,c,d)}
|
||||||
function ck(a,b,c,d,e){var f=null;if(a){if(e)for(var l=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g;f=l.exec(a);){var k=f[2],m=p(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);
|
function ck(a,b,c,d,e){var f=null;if(a){if(e)for(var l=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g;f=l.exec(a);){var k=f[2],m=p(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(/(<machine[^>]*\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(/<!DOCTYPE(.|[\r\n])*\]>\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: "+
|
}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(/(<machine[^>]*\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(/<!DOCTYPE(.|[\r\n])*\]>\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<a.length?a.substr(0,255)+"...":a));}return[a,f]}
|
(255<a.length?a.substr(0,255)+"...":a));}return[a,f]}
|
||||||
window.embedPC=function(a,b,c,d){var e=c,f=c="",l=null;try{if(l=window.document.getElementById(a)){e||(e="/versions/pcjs/1.15.3/components.xsl");var k="<"==b.substr(0,1)?ck(b,null,a,d,!1):bk(b,a,d,!0);c=k[0];var m=k[1];if(m){var k=bk(e),n=k[1];if(n)if(window.ActiveXObject||"ActiveXObject"in window){var q=m.transformNode(n);q?l.outerHTML=q:f="transformNodeToObject failed"}else if(window.document.implementation&&window.document.implementation.createDocument){var s=new XSLTProcessor;s.importStylesheet(n);
|
window.embedPC=function(a,b,c,d){var e=c,f=c="",l=null;try{if(l=window.document.getElementById(a)){e||(e="/versions/pcjs/1.15.3/components.xsl");var k="<"==b.substr(0,1)?ck(b,null,a,d,!1):bk(b,a,d,!0);c=k[0];var m=k[1];if(m){var k=bk(e),n=k[1];if(n)if(window.ActiveXObject||"ActiveXObject"in window){var q=m.transformNode(n);q?l.outerHTML=q:f="transformNodeToObject failed"}else if(window.document.implementation&&window.document.implementation.createDocument){var s=new XSLTProcessor;s.importStylesheet(n);
|
||||||
var r=s.transformToFragment(m,window.document);r?l.parentNode.replaceChild(r,l):f="transformToFragment failed"}else f="unable to transform XML: unsupported browser";else f="failed to load XSL file: "+e}else f="failed to load XML file: "+b}else f="failed to find machine element: "+a}catch(x){f=x.message}f&&l&&(a=B(l,"machine-warning"),a[0]&&(a[0].innerHTML="Error: "+ga(f)));return f||c};window.enableEvents=function(a){pa=a};window.sendEvent=function(a){oa[a]&&ra(oa[a])};})();//@ sourceMappingURL=/tmp/pcjs/1.15.3/pc.map
|
var r=s.transformToFragment(m,window.document);r?l.parentNode.replaceChild(r,l):f="transformToFragment failed"}else f="unable to transform XML: unsupported browser";else f="failed to load XSL file: "+e}else f="failed to load XML file: "+b}else f="failed to find machine element: "+a}catch(y){f=y.message}f&&l&&(a=B(l,"machine-warning"),a[0]&&(a[0].innerHTML="Error: "+ga(f)));return f||c};window.enableEvents=function(a){pa=a};window.sendEvent=function(a){oa[a]&&ra(oa[a])};})();//@ sourceMappingURL=/tmp/pcjs/1.15.3/pc.map
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue