Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpar committed Aug 18, 2023
2 parents dfa7612 + 164e1d0 commit b95364d
Show file tree
Hide file tree
Showing 22 changed files with 1,759 additions and 438 deletions.
127 changes: 108 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,9 @@
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"ibm5170",
"disks/MSDOS320B",
"--fat=16",
"--verbose",
"--halt",
"dir"
"chkdsk c:,quit"
],
"cwd": "${workspaceFolder}/tools/pc",
"cwd": "${workspaceFolder}/tools/pc/disks/MSDOS330",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
Expand Down Expand Up @@ -558,10 +553,54 @@
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"ibm5170",
"--capacity=20",
"--drivetype=6",
"--verbose",
"disks/MSDOS320",
"MBR",
"dir"
],
"cwd": "${workspaceFolder}/tools/pc/disks/MSDOS330/SRC",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
"${workspaceFolder}/none/**/*.js"
],
"presentation": {
"hidden": false,
"group": "machines",
"order": 15
}
},
{
"name": "pc.js ibm5170 --drivesize=27 dir",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"ibm5170",
"--driveclass=pcjs",
"--drivesize=27",
"disks/msdos330",
"dir"
],
"cwd": "${workspaceFolder}/tools/pc",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
"${workspaceFolder}/none/**/*.js"
],
"presentation": {
"hidden": false,
"group": "machines",
"order": 15
}
},
{
"name": "pc.js ibm5170 --drivetype=200:4:17 dir",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"ibm5170",
"--drivetype=200:4:17",
"disks/msdos330",
"dir"
],
"cwd": "${workspaceFolder}/tools/pc",
Expand Down Expand Up @@ -661,13 +700,15 @@
}
},
{
"name": "pc.js pdp11 machine.xml",
"name": "pc.js dir --system=compaq --version=3.31",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"--start=/machines/dec/pdp11/1170/panel/debugger/machine.xml",
"--debug"
"--system=compaq",
"--version=3.31",
"disks/MSDOS320",
"dir"
],
"cwd": "${workspaceFolder}/tools/pc",
"stopOnEntry": false,
Expand Down Expand Up @@ -705,14 +746,14 @@
}
},
{
"name": "pc.js dir --system=pcdos --version=2.00 --capacity=20mb",
"name": "pc.js dir --system=pcdos --version=2.00 --drivesize=20mb",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"--system=pcdos",
"--version=2.00",
"--capacity=20mb",
"--drivesize=20mb",
"disks/MSDOS320",
"dir"
],
Expand Down Expand Up @@ -752,14 +793,14 @@
}
},
{
"name": "pc.js dir --system=pcdos --version=3.10 --capacity=20mb",
"name": "pc.js dir --system=pcdos --version=3.10 --drivesize=20mb",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"--system=pcdos",
"--version=3.10",
"--capacity=20mb",
"--drivesize=20mb",
"ibm5170",
"disks/MSDOS320",
"dir *.*",
Expand Down Expand Up @@ -798,6 +839,50 @@
"order": 15
}
},
{
"name": "pc.js dir --drivetype=80:2:18 --system=compaq --version=3.31",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"dir",
"--drivetype=80:2:18",
"--system=compaq",
"--version=3.31"
],
"cwd": "${workspaceFolder}/tools/pc/disks/MSDOS330/SRC/MBR",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
"${workspaceFolder}/none/**/*.js"
],
"presentation": {
"hidden": false,
"group": "machines",
"order": 15
}
},
{
"name": "pc.js pdp11 machine.xml",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"--start=/machines/dec/pdp11/1170/panel/debugger/machine.xml",
"--debug"
],
"cwd": "${workspaceFolder}/tools/pc",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
"${workspaceFolder}/none/**/*.js"
],
"presentation": {
"hidden": false,
"group": "machines",
"order": 15
}
},
{
"name": "101 Monochrome Mazes (1983)",
"type": "chrome",
Expand Down Expand Up @@ -1388,8 +1473,12 @@
"request": "launch",
"program": "${workspaceFolder}/tools/diskimage/diskimage.js",
"args": [
"MBR/",
"mbr.img",
"--overwrite",
"--drivetype=40:2:5:1024"
],
"cwd": "${workspaceFolder}/tools/diskimage",
"cwd": "${workspaceFolder}/tools/pc/disks/MSDOS330/SRC",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
Expand Down
16 changes: 15 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"editor.rulers": [127],
"editor.tabSize": 8,
"editor.insertSpaces": false,
"[asm][masm][plaintext]": {
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
}
},
"[javascript]": {
"editor.insertSpaces": true,
"editor.tabSize": 4,
Expand Down Expand Up @@ -192,6 +199,7 @@
"bootfile",
"BOOTHEAD",
"BOOTMON",
"BOOTSEG",
"borland",
"BPB's",
"BPBs",
Expand Down Expand Up @@ -562,6 +570,7 @@
"EPROM",
"eqeqeq",
"ERRCODE",
"errnz",
"ERRREC",
"ESDI",
"ESPUOZDI",
Expand Down Expand Up @@ -1034,6 +1043,7 @@
"Mayes",
"mbhd",
"MBIT",
"MBR's",
"mbsize",
"Mbytes",
"MCGA",
Expand Down Expand Up @@ -1314,6 +1324,7 @@
"PPIB",
"PPIC",
"pppnnn",
"precomp",
"precompensation",
"PREFETCH",
"preinstall",
Expand Down Expand Up @@ -1370,6 +1381,7 @@
"QUICKPASCAL",
"quux",
"Raikes",
"Ralf",
"RALT",
"ramdisk",
"RAMFS",
Expand Down Expand Up @@ -1403,6 +1415,7 @@
"Reimagining",
"reinitializer",
"reinitializing",
"RELOC",
"RELSEG",
"remappings",
"REMOVESEGS",
Expand Down Expand Up @@ -1607,6 +1620,7 @@
"STRL",
"strlib",
"STRONGENC",
"struc",
"struct",
"suba",
"SUBAX",
Expand Down Expand Up @@ -1880,5 +1894,5 @@
"zzznnn"
],
"task.allowAutomaticTasks": "on",
"explorer.sortOrder": "type"
"explorer.sortOrder": "type",
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ This collection of files also includes a Microsoft C Compiler, so we can try com
SIEVE EXE 14662 7-15-23 9:50a
8 File(s) 6053888 bytes free

C:\TOOLS\C4DEMO>return
C:\TOOLS\C4DEMO>quit
$

That last command, `return`, runs a special program that `pc.js` automatically includes with the machine, to gracefully return to your own operating system.
That last command, `quit`, runs a special program that `pc.js` automatically includes with the machine, to gracefully return to your own operating system.

And, if you take a peek inside the folder that corresponds to `C:\TOOLS\C4DEMO`, you'll see that all the files created by the Microsoft C Compiler, such as `DEMO.EXE` and `SIEVE.EXE` have been preserved:

Expand Down Expand Up @@ -456,7 +456,7 @@ At this point, `pc.js` shows you all the *other* disks (if any) with the same ex
LU EXE 22528 3-25-84 1:48a
40 File(s) 16384 bytes free

Any files you're interested in can be copied to the machine's C: drive, and when you type `return`, those files should be automatically transferred to your current directory.
Any files you're interested in can be copied to the machine's C: drive, and when you type `quit`, those files should be automatically transferred to your current directory.

### More To Come

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ This runs a hidden `VI.COM` DOS program that silently shuts down the `pc.js` vir

You can add or remove programs from the `apps` section, and the next time you run `pc.js`, it will automatically create matching hidden `.COM` files in the root of the virtual hard disk. Make sure you stick to app names that are 8 characters or less; you can use the `exec` property to map a short filename to a longer or different local filename (see the `edit` example).

Aside from the commands listed in the `apps` section, two other programs are always included on the virtual hard disk: `LOAD.COM`, which makes it easy to load PCjs diskette images into drive A: or B:, and `RETURN.COM`, which shuts down the machine and returns to your local prompt (alternatively, you can press `CTRL-D` and type `quit`).
Aside from the commands listed in the `apps` section, two other programs are always included on the virtual hard disk: `LOAD.COM`, which makes it easy to load PCjs diskette images into drive A: or B:, and `QUIT.COM`, which shuts down the machine and returns to your local prompt (alternatively, you can press `CTRL-D` and type `quit`).

See [Loading Diskettes Into Machines](/tools/pc/#loading-diskettes-into-machines) for more information and examples of the `LOAD` command (the internal `LOAD` command operates the same as the external `LOAD.COM` program).

Expand Down Expand Up @@ -129,7 +129,7 @@ To change those defaults, you can either edit `pc.json` or pass command-line ove

This changes the default machine from a `compaq386` to an `ibm5170`, sets the drive size to 20Mb, forces the default FAT size to 12-bit (which would otherwise be 16-bit for a 20Mb disk), and allows up to 2048 local files to be included in the disk image.

You can also use `--drivectrl` and `--drivetype` for even more control of the virtual hard disk image, but make sure the values you specify are valid for the machine being used. By default, `pc.js` loads a [compaq386](/tools/pc/compaq386.json) machine, which also uses a saved machine state (`state386.json`) that bypasses the system startup tests and floppy drive checks, so that it can start booting from the virtual hard disk immediately. But the COMPAQ DeskPro 386 has a drive type table in ROM that differs significantly from the drive types defined by the IBM PC AT, so if you're using an AT-specific drive type (eg, `--drivetype=6`), then you should also specify an IBM 5170 machine configuration. An [ibm5170.xml](/tools/pc/ibm5170.xml) file is included in the `pc.js` folder to make this easier:
You can also use `--driveclass` and `--drivetype` for even more control of the virtual hard disk image, but make sure the values you specify are valid for the machine being used. By default, `pc.js` loads a [compaq386](/tools/pc/compaq386.json) machine, which also uses a saved machine state (`state386.json`) that bypasses the system startup tests and floppy drive checks, so that it can start booting from the virtual hard disk immediately. But the COMPAQ DeskPro 386 has a drive type table in ROM that differs significantly from the drive types defined by the IBM PC AT, so if you're using an AT-specific drive type (eg, `--drivetype=6`), then you should also specify an IBM 5170 machine configuration. An [ibm5170.xml](/tools/pc/ibm5170.xml) file is included in the `pc.js` folder to make this easier:

$ pc.js ibm5170 --drivetype=6 MSDOS330-C400 dir

Expand Down
1 change: 1 addition & 0 deletions machines/pcx86/modules/v2/cpux86.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,7 @@ export default class CPUx86 extends CPULib {
*/
addIntNotify(nInt, fn)
{
this.assert(nInt >= 0 && nInt < 256);
if (this.aIntNotify[nInt] === undefined) {
this.aIntNotify[nInt] = [];
}
Expand Down
2 changes: 1 addition & 1 deletion machines/pcx86/modules/v2/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -5752,7 +5752,7 @@ export default class DebuggerX86 extends DbgLib {

let fUnknown, fValid = true;
let sRegMatch = sReg.toUpperCase();
if (sRegMatch.charAt(0) == 'E' && this.cchReg <= 4) {
if (sRegMatch[0] == 'E' && sRegMatch[1] != 'S' && this.cchReg <= 4) {
sRegMatch = null;
}
switch (sRegMatch) {
Expand Down
2 changes: 1 addition & 1 deletion machines/pcx86/modules/v2/defines.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const APPNAME = "PCx86"; // this @define is the default applicati
*
* @define {boolean}
*/
var BACKTRACK = DEBUG && DEBUGGER;
var BACKTRACK = /* DEBUG && DEBUGGER */ false;

/**
* BUGS_8086 enables support for known 8086 bugs. It's turned off by default, because 1) it adds overhead, and
Expand Down
Loading

0 comments on commit b95364d

Please sign in to comment.