diff --git a/README.md b/README.md index a314215a5..9e0e152de 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ machine configurations, and provide a platform for running and analyzing old com Demos --- -Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1.01, and assorted non-DOS software. +Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows, OS/2, and other assorted software. ![IBM PC running VisiCalc](/apps/pc/1981/visicalc/thumbnail.jpg "link:/apps/pc/1981/visicalc/:200:120") ![IBM PC running DONKEY.BAS](/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg "link:/devices/pc/machine/5150/cga/64kb/donkey/:200:120") @@ -46,9 +46,9 @@ Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1 ![IBM PC w/CGA, Zork I](/disks/pc/games/infocom/zork1/thumbnail.jpg "link:/disks/pc/games/infocom/zork1/:200:120") Check out the rest of the PCjs [Application](/apps/pc/), [Disk](/disks/pc/), and [Machine](/devices/pc/machine/) -demos, including an [IBM PC Dual Display System](/devices/pc/machine/5150/dual/64kb/) demo of multiple monitor support, -and "Server Array" demos of multiple [IBM PC XT](/devices/pc/machine/5160/cga/256kb/array/) and -[Windows 1.01](/devices/pc/machine/5160/ega/640kb/array/) machines running side-by-side. +demos, including an [IBM PC with Dual Displays](/devices/pc/machine/5150/dual/64kb/) demonstrating early multi-monitor +support, and multiple IBM PC XT machines running side-by-side with [CGA Displays](/devices/pc/machine/5160/cga/256kb/array/) +and [EGA Displays](/devices/pc/machine/5160/ega/640kb/array/). C1Pjs --- diff --git a/devices/pc/machine/5150/README.md b/devices/pc/machine/5150/README.md index 4c108f74e..5d34e5b25 100644 --- a/devices/pc/machine/5150/README.md +++ b/devices/pc/machine/5150/README.md @@ -11,6 +11,6 @@ IBM PC Machines (Model 5150) All our Model 5150 configurations of the IBM PC are located here, including: -* [IBM PC with Color Display](/devices/pc/machine/5150/cga/) -* [IBM PC with Dual Display](/devices/pc/machine/5150/dual/64kb/) * [IBM PC with Monochrome Display](/devices/pc/machine/5150/mda/) +* [IBM PC with Color Display](/devices/pc/machine/5150/cga/) +* [IBM PC with Dual Displays (Monochrome and Color)](/devices/pc/machine/5150/dual/64kb/) diff --git a/devices/pc/machine/5150/dual/64kb/machine.md b/devices/pc/machine/5150/dual/64kb/machine.md index 4fe94a8c9..40b4c1a56 100644 --- a/devices/pc/machine/5150/dual/64kb/machine.md +++ b/devices/pc/machine/5150/dual/64kb/machine.md @@ -1,6 +1,6 @@ --- layout: page -title: "IBM PC (Model 5150, 64Kb) with Dual Display" +title: "IBM PC (Model 5150, 64Kb) with Dual Displays" permalink: /devices/pc/machine/5150/dual/64kb/ machines: - type: pc diff --git a/devices/pc/machine/5150/dual/64kb/machine.xml b/devices/pc/machine/5150/dual/64kb/machine.xml index 41a35403c..3bce831b6 100644 --- a/devices/pc/machine/5150/dual/64kb/machine.xml +++ b/devices/pc/machine/5150/dual/64kb/machine.xml @@ -1,7 +1,7 @@ - IBM PC (Model 5150) with Dual Display + IBM PC (Model 5150) with Dual Displays diff --git a/devices/pc/machine/5160/README.md b/devices/pc/machine/5160/README.md index dda19f60a..e67c2f71c 100644 --- a/devices/pc/machine/5160/README.md +++ b/devices/pc/machine/5160/README.md @@ -9,6 +9,6 @@ IBM PC XT Machines (Model 5160) All our Model 5160, aka IBM PC XT, configurations are located here, including: +* [IBM PC XT with Monochrome Display](/devices/pc/machine/5160/mda/) * [IBM PC XT with Color Display](/devices/pc/machine/5160/cga/) * [IBM PC XT with Enhanced Color Display](/devices/pc/machine/5160/ega/) -* [IBM PC XT with Monochrome Display](/devices/pc/machine/5160/mda/) diff --git a/devices/pc/machine/5160/cga/256kb/array/README.md b/devices/pc/machine/5160/cga/256kb/array/README.md index cf546b398..a832a5e62 100644 --- a/devices/pc/machine/5160/cga/256kb/array/README.md +++ b/devices/pc/machine/5160/cga/256kb/array/README.md @@ -9,7 +9,7 @@ machines: id: ibm5160b --- -IBM PC XT CGA Machine Array +IBM PC XT Machine Array with CGA Displays --- ### Demonstration of Multiple IBM PCs on a Single Web Page diff --git a/devices/pc/machine/5160/cga/256kb/win101/machine.xml b/devices/pc/machine/5160/cga/256kb/win101/machine.xml index cb84dbdf1..d10008149 100644 --- a/devices/pc/machine/5160/cga/256kb/win101/machine.xml +++ b/devices/pc/machine/5160/cga/256kb/win101/machine.xml @@ -1,7 +1,7 @@ - IBM PC XT (Model 5160) running Windows v1.01 + IBM PC XT (Model 5160) running Windows 1.01 diff --git a/devices/pc/machine/5160/cga/256kb/win101/softkbd/machine.xml b/devices/pc/machine/5160/cga/256kb/win101/softkbd/machine.xml index 62e2288e6..09c203e68 100644 --- a/devices/pc/machine/5160/cga/256kb/win101/softkbd/machine.xml +++ b/devices/pc/machine/5160/cga/256kb/win101/softkbd/machine.xml @@ -1,7 +1,7 @@ - IBM PC XT (Model 5160), CGA, 256K, WIN101 + IBM PC XT (Model 5160), CGA, 256K, Windows 1.01 diff --git a/devices/pc/machine/5160/ega/640kb/array/README.md b/devices/pc/machine/5160/ega/640kb/array/README.md index 9516dd7b4..2d1fb6e9b 100644 --- a/devices/pc/machine/5160/ega/640kb/array/README.md +++ b/devices/pc/machine/5160/ega/640kb/array/README.md @@ -13,7 +13,7 @@ machines: id: ibm5160d --- -IBM PC XT EGA Machine Array +IBM PC XT Machine Array with EGA Displays --- ### Demonstration of Multiple IBM PCs on a Single Web Page diff --git a/devices/pc/machine/README.md b/devices/pc/machine/README.md index 1d7946f9d..0b96d927d 100644 --- a/devices/pc/machine/README.md +++ b/devices/pc/machine/README.md @@ -60,20 +60,16 @@ state, while others include a hard disk with preinstalled software. However, most simply boot an early version of DOS, and the hard disk, if any, will generally be unformatted. From there, you can load another disk image -### Model 5150 Machine Configurations +### [Model 5150 Machine Configurations](/devices/pc/machine/5150/) -Our pre-built [Model 5150](/devices/pc/machine/5150/) machines include: - -* [IBM PC (64Kb) with Color Display](/devices/pc/machine/5150/cga/64kb/donkey/) ([Debugger](/devices/pc/machine/5150/cga/64kb/donkey/debugger/)) -* [IBM PC (64Kb) with Color Display and Soft Keyboard](/devices/pc/machine/5150/cga/64kb/softkbd/) -* [IBM PC (64Kb) with Dual Display](/devices/pc/machine/5150/dual/64kb/) * [IBM PC (64Kb) with Monochrome Display](/devices/pc/machine/5150/mda/64kb/) ([Debugger](/devices/pc/machine/5150/mda/64kb/debugger/)) * [IBM PC (64Kb) with Monochrome Display and Soft Keyboard (Debugger)](/devices/pc/machine/5150/mda/64kb/softkbd/) +* [IBM PC (64Kb) with Color Display](/devices/pc/machine/5150/cga/64kb/donkey/) ([Debugger](/devices/pc/machine/5150/cga/64kb/donkey/debugger/)) +* [IBM PC (64Kb) with Color Display and Soft Keyboard](/devices/pc/machine/5150/cga/64kb/softkbd/) * [IBM PC (384Kb) with Color Display and Soft Keyboard (Debugger)](/devices/pc/machine/5150/cga/384kb/softkbd/) +* [IBM PC (64Kb) with Dual Displays (Monochrome and Color)](/devices/pc/machine/5150/dual/64kb/) -### Model 5160 Machine Configurations - -Our pre-built [Model 5160](/devices/pc/machine/5160/) machines include: +### [Model 5160 Machine Configurations](/devices/pc/machine/5160/) * [IBM PC XT (64Kb, 10Mb Drive) with Monochrome Display](/devices/pc/machine/5160/mda/64kb/softkbd/) * [IBM PC XT (256Kb, 10Mb Drive) with Monochrome Display](/devices/pc/machine/5160/mda/256kb/) ([Debugger](/devices/pc/machine/5160/mda/256kb/debugger/)) diff --git a/disks/pc/windows/3.00/README.md b/disks/pc/windows/3.00/README.md index f1e8e580e..d981a3238 100644 --- a/disks/pc/windows/3.00/README.md +++ b/disks/pc/windows/3.00/README.md @@ -13,7 +13,7 @@ machines: Microsoft Windows 3.00 --- -The PCjs machine below is running Microsoft Windows 3.00 on an IBM PC AT with PC-DOS 3.20. +The PCjs machine below starts Microsoft Windows 3.00, using an IBM PC AT running PC-DOS 3.20. {% include machine.html id="ibm5170-win300" %} diff --git a/disks/pc/windows/3.10/README.md b/disks/pc/windows/3.10/README.md index a3bdbba1f..210836e3c 100644 --- a/disks/pc/windows/3.10/README.md +++ b/disks/pc/windows/3.10/README.md @@ -4,7 +4,7 @@ title: Microsoft Windows 3.10 permalink: /disks/pc/windows/3.10/ machines: - type: pc - id: ibm5170-pcdos330 + id: ibm5170-win310 config: /devices/pc/machine/5170/vga/2048kb/machine.xml drives: '[{name:"20Mb Hard Disk",type:2,path:"/disks/pc/fixed/20mb/PCDOS330-WIN310.json"}]' autoMount: '' @@ -13,9 +13,9 @@ machines: Microsoft Windows 3.10 --- -The PCjs machine below is running Microsoft Windows 3.10 on an IBM PC AT with PC-DOS 3.30. +The PCjs machine below starts Microsoft Windows 3.10, using an IBM PC AT running PC-DOS 3.30. -{% include machine.html id="ibm5170-pcdos330" %} +{% include machine.html id="ibm5170-win310" %} Directory listings of the seven 1.2Mb distribution diskettes are provided below. diff --git a/index.md b/index.md index 7d135bbfb..7bf5ff721 100644 --- a/index.md +++ b/index.md @@ -40,7 +40,7 @@ machine configurations, and provide a platform for running and analyzing old com Demos --- -Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1.01, and assorted non-DOS software. +Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows, OS/2, and other assorted software. {% include screenshot.html src="/apps/pc/1981/visicalc/thumbnail.jpg" width="200" height="120" title="IBM PC running VisiCalc" link="/apps/pc/1981/visicalc/" %} {% include screenshot.html src="/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg" width="200" height="120" title="IBM PC running DONKEY.BAS" link="/devices/pc/machine/5150/cga/64kb/donkey/" %} @@ -56,9 +56,9 @@ Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1 {% include screenshot.html src="/disks/pc/games/infocom/zork1/thumbnail.jpg" width="200" height="120" title="IBM PC w/CGA, Zork I" link="/disks/pc/games/infocom/zork1/" %} Check out the rest of the PCjs [Application](/apps/pc/), [Disk](/disks/pc/), and [Machine](/devices/pc/machine/) -demos, including an [IBM PC Dual Display System](/devices/pc/machine/5150/dual/64kb/) demo of multiple monitor support, -and "Server Array" demos of multiple [IBM PC XT](/devices/pc/machine/5160/cga/256kb/array/) and -[Windows 1.01](/devices/pc/machine/5160/ega/640kb/array/) machines running side-by-side. +demos, including an [IBM PC with Dual Displays](/devices/pc/machine/5150/dual/64kb/) demonstrating early multi-monitor +support, and multiple IBM PC XT machines running side-by-side with [CGA Displays](/devices/pc/machine/5160/cga/256kb/array/) +and [EGA Displays](/devices/pc/machine/5160/ega/640kb/array/). C1Pjs --- diff --git a/modules/pcjs/lib/x86mods.js b/modules/pcjs/lib/x86mods.js index 6921a646f..53aa8356a 100644 --- a/modules/pcjs/lib/x86mods.js +++ b/modules/pcjs/lib/x86mods.js @@ -33,9 +33,31 @@ "use strict"; if (NODE) { + var str = require("../../shared/lib/strlib"); var X86 = require("./x86"); } +/* + * Before 80386 support was added to PCjs, the approach to decoding ModRegRM bytes (which I usually + * just call ModRM bytes) used one generated function per ModRM value. This was optimal for 16-bit processors, + * because the functions were small, and it was maximally efficient, turning the entire ModRM decoding operation + * into one table lookup and function call. + * + * However, that approach didn't scale well for 32-bit processors, which had extended ModRM capabilities in both + * the addressing mode dimension and the operand size dimension. So I've rewritten ModRM decoding as 18 functions. + * The first 9 are for 16-bit addressing modes, and the second 9 are for 32-bit addressing modes. Within each + * group of 9, there are 3 for 8-bit operands, 3 for 16-bit operands, and 3 for 32-bit operands. And each group of 3 + * contains functions for register-source, memory-source, and group-source. + * + * Each of the 18 functions must do additional work to examine the ModRM bits, which makes decoding slightly slower, + * but it's not really noticeable, and the speed difference didn't justify the additional generated code. So one much + * smaller file (x86mods.js) replaces a host of older files (x86modb.js, x86modw.js, x86modb16.js, x86modw16.js, + * x86modb32.js, x86modw32.js, and x86modsib.js). + * + * You can dig up the older files from the repository if you're curious, or you can run /modules/pcjs/bin/x86gen.js to + * get a sense of what they contained (x86gen.js created most of the code, but it still had to be massaged afterward). + */ + /** * modRegByte16(fn) * diff --git a/modules/pcjs/lib/x86ops.js b/modules/pcjs/lib/x86ops.js index 08ecb61fa..a7b079738 100644 --- a/modules/pcjs/lib/x86ops.js +++ b/modules/pcjs/lib/x86ops.js @@ -543,10 +543,6 @@ X86.opANDAX = function() */ X86.opES = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segES; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -651,10 +647,6 @@ X86.opSUBAX = function() */ X86.opCS = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segCS; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -759,10 +751,6 @@ X86.opXORAX = function() */ X86.opSS = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segSS; // QUESTION: Is there a case where segStack would not already be segSS? (eg, multiple segment overrides?) this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -864,10 +852,6 @@ X86.opCMPAX = function() */ X86.opDS = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segDS; // QUESTION: Is there a case where segData would not already be segDS? (eg, multiple segment overrides?) this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -1484,10 +1468,6 @@ X86.opARPL = function() */ X86.opFS = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segFS; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -1500,10 +1480,6 @@ X86.opFS = function() */ X86.opGS = function() { - /* - * NOTE: The fact that we're setting NOINTR along with SEG is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.SEG | X86.OPFLAG.NOINTR; this.segData = this.segStack = this.segGS; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; @@ -2149,14 +2125,14 @@ X86.opXCHGrb = function() * To be clear, a single assignment like this will fail: * * opModRegByteF2: function(fn) -{ + * { * this.regEDX = (this.regEDX & 0xff) | (fn.call(this, this.regEDX >> 8, this.regEDX & 0xff) << 8); * } * * which is why all affected decoders now use separate assignments; eg: * * opModRegByteF2: function(fn) -{ + * { * var b = fn.call(this, this.regEDX >> 8, this.regEDX & 0xff); * this.regEDX = (this.regEDX & 0xff) | (b << 8); * } @@ -4162,10 +4138,6 @@ X86.opOUTDXw = function() */ X86.opLOCK = function() { - /* - * NOTE: The fact that we're setting NOINTR along with LOCK is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.LOCK | X86.OPFLAG.NOINTR; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; }; @@ -4193,10 +4165,6 @@ X86.opINT1 = function() */ X86.opREPNZ = function() { - /* - * NOTE: The fact that we're setting NOINTR along with REPNZ is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.REPNZ | X86.OPFLAG.NOINTR; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; }; @@ -4208,10 +4176,6 @@ X86.opREPNZ = function() */ X86.opREPZ = function() { - /* - * NOTE: The fact that we're setting NOINTR along with REPZ is really just for documentation purposes; - * the way stepCPU() is written, the presence of any prefix bypasses normal interrupt processing anyway. - */ this.opFlags |= X86.OPFLAG.REPZ | X86.OPFLAG.NOINTR; this.nStepCycles -= this.cycleCounts.nOpCyclesPrefix; }; diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index 2a19a8789..f5be562c1 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -198,6 +198,13 @@ web.getResource = function(sURL, dataPost, fAsync, done) return [sResource, nErrorCode]; } + if (DEBUG) { + /* + * The larger resources that we put on archive.pcjs.org should also be available locally... + */ + sURL = sURL.replace("http://archive.pcjs.org", ""); + } + if (NODE) { /* * We don't even need to load Component, because we can't use any of the code below