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 Sep 7, 2023
2 parents e1aa757 + ca860c7 commit 513b700
Show file tree
Hide file tree
Showing 14 changed files with 375 additions and 98 deletions.
9 changes: 3 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,10 @@
"request": "launch",
"program": "${workspaceFolder}/tools/pc/pc.js",
"args": [
"ver",
"--sys=pcdos:3.0",
"--drive=pcjs",
"--target=1M",
"--halt"
"--sys=compaq",
"--ver=3.10e"
],
"cwd": "${workspaceFolder}/tools/pc/disks/test",
"cwd": "${workspaceFolder}/tools/pc/disks/empty",
"stopOnEntry": false,
"console": "integratedTerminal",
"outFiles": [
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@
"discontiguous",
"DISHRQ",
"diskapi",
"DISKCOMP",
"DISKCOPY",
"DISKDATA",
"diskdump",
Expand Down
51 changes: 38 additions & 13 deletions machines/pcx86/diskettes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,12 +1246,6 @@
"@diskette": "COMPAQ-DOS110B.json",
"@photo": "jpg",
"@format": "PC320K"
},
{
"@title": "COMPAQ MS-DOS 1.10 Rev E",
"@diskette": "COMPAQ-DOS110E.json",
"@photo": "jpg",
"@format": "PC320K"
}
],
"@documents": [
Expand Down Expand Up @@ -1359,19 +1353,34 @@
"@bootable": true,
"@media": [
{
"@title": "COMPAQ MS-DOS 3.10 (Disk 1)",
"@diskette": "COMPAQ-DOS310-DISK1.json",
"@title": "COMPAQ MS-DOS 3.10 (1985 1.2M)",
"@diskette": "COMPAQ-DOS310-PERSONAL.json",
"@format": "PC1200K"
},
{
"@title": "COMPAQ MS-DOS 3.10 (1985-09 Disk 1)",
"@diskette": "COMPAQ-DOS310-19850930-DISK1.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ MS-DOS 3.10 (Disk 2)",
"@diskette": "COMPAQ-DOS310-DISK2.json",
"@title": "COMPAQ MS-DOS 3.10 (1985-09 Disk 2)",
"@diskette": "COMPAQ-DOS310-19850930-DISK2.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ MS-DOS 3.10 (12-17-85)",
"@diskette": "COMPAQ-DOS310-PERSONAL.json",
"@format": "PC1200K"
"@title": "COMPAQ MS-DOS 3.10 (1986-03 Disk 1)",
"@diskette": "COMPAQ-DOS310-19860327-DISK1.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ MS-DOS 3.10 (1986-10 Disk 1)",
"@diskette": "COMPAQ-DOS310-19861031-DISK1.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ MS-DOS 3.10 (1986-10 Disk 2)",
"@diskette": "COMPAQ-DOS310-19861031-DISK2.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ PC DOS 3.20 Support",
Expand All @@ -1380,6 +1389,22 @@
}
]
},
"3.20": {
"@title": "COMPAQ MS-DOS 3.20",
"@bootable": true,
"@media": [
{
"@title": "COMPAQ MS-DOS 3.20A (Disk 1)",
"@diskette": "COMPAQ-DOS320A-DISK1.json",
"@format": "PC360K"
},
{
"@title": "COMPAQ MS-DOS 3.20A (Disk 2)",
"@diskette": "COMPAQ-DOS320A-DISK2.json",
"@format": "PC360K"
}
]
},
"3.31": {
"@title": "COMPAQ MS-DOS 3.31",
"@bootable": true,
Expand Down
47 changes: 29 additions & 18 deletions machines/pcx86/modules/v3/diskinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ import { DRIVE_CTRLS, DRIVE_TYPES } from "./driveinfo.js";
* @property {number} typeFAT
* @property {number} clusterSize
* @property {number} rootEntries
* @property {number} hiddenSectors
* @property {number} verDOS
* @property {boolean} trimFAT
* @property {boolean} partitioned
Expand Down Expand Up @@ -1494,9 +1495,14 @@ export default class DiskInfo {

if (driveInfo.partitioned) {
bMediaID = 0xF8;
cHiddenSectors = 1; // our hard disk images are always partitioned and always reserve a diagnostic cylinder
cHiddenSectors = 1 + (driveInfo.hiddenSectors || 0);
cDiagnosticSectors = cHeads * cSectorsPerTrack;
}

if (cTotalSectors <= cHiddenSectors + cDiagnosticSectors) {
this.printf(Device.MESSAGE.DISK + Device.MESSAGE.ERROR, "insufficient sectors (%d total, %d unusable)\n", cTotalSectors, cHiddenSectors + cDiagnosticSectors);
return false;
}
cTotalSectors -= cHiddenSectors + cDiagnosticSectors;

cbSector = driveInfo.cbSector || cbSector;
Expand Down Expand Up @@ -1554,23 +1560,21 @@ export default class DiskInfo {
cSectorsPerCluster = 4;
} else if (cTotalSectors <= 32680) { // 0x7FA8 (16Mb)
cSectorsPerCluster = 8;
} else {
if (driveInfo.verDOS >= 3.0) {
typeFAT = 16;
if (cTotalSectors <= 262144) { // 0x40000 (128Mb)
cSectorsPerCluster = 4;
} else if (cSectorsPerCluster <= 524288) { // 0x80000 (256Mb)
cSectorsPerCluster = 8;
} else if (cSectorsPerCluster <= 1048576) { // 0x100000 (512Mb)
cSectorsPerCluster = 16;
} else if (cSectorsPerCluster <= 2097152) { // 0x200000 (1Gb)
cSectorsPerCluster = 32;
} else /* if (cSectorsPerCluster <= 4194304) */ { // 0x400000 (2Gb)
cSectorsPerCluster = 64;
}
} else if (driveInfo.verDOS >= 3.0) {
typeFAT = 16;
if (cTotalSectors <= 262144) {
cSectorsPerCluster = 4; // 0x40000 (128Mb)
}else if (cTotalSectors <= 524288) {
cSectorsPerCluster = 8; // 0x80000 (256Mb)
} else if (cTotalSectors <= 1048576) {
cSectorsPerCluster = 16; // 0x100000 (512Mb)
} else if (cTotalSectors <= 2097152) {
cSectorsPerCluster = 32; // 0x200000 (1Gb)
} else {
cSectorsPerCluster = 16;
cSectorsPerCluster = 64; // 0x400000 (2Gb)
}
} else {
cSectorsPerCluster = 16;
}
}
if (!driveInfo.rootEntries) {
Expand Down Expand Up @@ -1608,6 +1612,7 @@ export default class DiskInfo {
minClusters = (typeFAT == 12)? 0 : DiskInfo.FAT12.MAX_CLUSTERS + 1;
maxClusters = (typeFAT == 12)? DiskInfo.FAT12.MAX_CLUSTERS : DiskInfo.FAT16.MAX_CLUSTERS;
grossClusters = Math.floor(cTotalSectors / cSectorsPerCluster);

/*
* We start with the basic estimate of sectors per FAT that DOS 2.x used for FAT12.
*/
Expand Down Expand Up @@ -1641,6 +1646,7 @@ export default class DiskInfo {
let divisor = cSectorsPerCluster * 256 + cFATs;
cFATSectors = Math.ceil((cTotalSectors - cReservedSectors - cRootSectors) / divisor);
}

/*
* This next bit is an experiment, because it turns out a disk with 10948 total sectors (162:4:17)
* and 4K clusters only needs 4 sectors per FAT, not 5. And yes, that drive geometry actually has
Expand Down Expand Up @@ -1754,7 +1760,7 @@ export default class DiskInfo {
*/
let cFileSectors = 0;
if (aFileData[0]) {
let maxAdjustments = driveInfo.trimFAT? 0 : cSectorsPerTrack;
let maxAdjustments = driveInfo.hiddenSectors? 0 : cSectorsPerTrack;
cFileSectors = Math.ceil(aFileData[0].size / cbSector);
while (maxAdjustments--) {
let cInitSectors = cHiddenSectors + cReservedSectors + cFATs * cFATSectors + cRootSectors;
Expand Down Expand Up @@ -1896,8 +1902,13 @@ export default class DiskInfo {
return false;
}

if (cbTotal > cbAvail) {
this.printf(Device.MESSAGE.DISK + Device.MESSAGE.ERROR, "file(s) too large (%d bytes total, %d bytes available)\n", cbTotal, cbAvail);
return false;
}

let abSector, offDisk = 0;
let cbDisk = cTotalSectors * cbSector;
let cbDisk = (cTotalSectors + cHiddenSectors) * cbSector;

/*
* If the disk is actually a partition on a larger drive, calculate how much larger the drive data
Expand Down
5 changes: 2 additions & 3 deletions software/pcx86/sys/dos/compaq/1.10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Released in 1983 by COMPAQ Computer Corp, this version of MS-DOS reports itself
The COMPAQ Personal Computer DOS
Version 1.10


(C) Copyright COMPAQ Computer Corp. 1982
(C) Copyright Microsoft 1981, 82

Expand Down Expand Up @@ -374,9 +373,9 @@ mounting it), mount the image as `/Volumes/Untitled`, and then copy the contents
open archive/COMPAQ-DOS110B.img
cp -pr /Volumes/Untitled Disk

{% include gallery/documents.html %}
### COMPAQ MS-DOS 1.10 Rev E

### Directory of COMPAQ MS-DOS 1.10 Rev E
I also had a disk labeled "COMPAQ Personal Computer DOS Version 1.10 Rev E", but the entire disk was identical to [Version 1.11](../1.11/), so either the label was a misprint or (more likely) whoever owned the disk before me overwrote it with version 1.11. So I have removed the "1.10 Rev E" disk image from the PCjs library until a genuine copy turns up.

Volume in drive A has no label
Directory of A:\
Expand Down
4 changes: 1 addition & 3 deletions software/pcx86/sys/dos/compaq/1.11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Released in 1983 by COMPAQ Computer Corp, this version of MS-DOS reports itself
The COMPAQ Personal Computer DOS
Version 1.11


(C) Copyright COMPAQ Computer Corp. 1982
(C) Copyright Microsoft 1981, 82

Expand Down Expand Up @@ -110,5 +109,4 @@ The boot sector of the COMPAQ MS-DOS 1.11 disk image contains the following byte
000001e0 00 00 00 00 00 00 00 e7 01 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

It is identical to the [COMPAQ MS-DOS 1.10 Boot Sector](../1.10/#compaq-ms-dos-110-boot-sector),
so refer to that page for more information.
It is identical to the [COMPAQ MS-DOS 1.10 Boot Sector](../1.10/#compaq-ms-dos-110-boot-sector), so refer to that page for more information.
6 changes: 2 additions & 4 deletions software/pcx86/sys/dos/compaq/1.12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Released in 1983 by COMPAQ Computer Corp, this version of MS-DOS reports itself
(C) Copyright COMPAQ Computer Corp. 1982, 83
(C) Copyright Microsoft 1981, 82

To learn more about this double-sided 320Kb diskette, see the
[Directory Listing](#directory-of-compaq-ms-dos-112) and [Boot Sector](#compaq-ms-dos-112-boot-sector) below.
To learn more about this double-sided 320Kb diskette, see the [Directory Listing](#directory-of-compaq-ms-dos-112) and [Boot Sector](#compaq-ms-dos-112-boot-sector) below.

{% include machine.html id="ibm5150-compaq112" %}

Expand Down Expand Up @@ -101,5 +100,4 @@ The boot sector of the COMPAQ MS-DOS 1.12 disk image contains the following byte
000001e0 00 00 00 00 00 00 00 e7 01 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

It is identical to the [COMPAQ MS-DOS 1.10 Boot Sector](../1.10/#compaq-ms-dos-110-boot-sector),
so refer to that page for more information.
It is identical to the [COMPAQ MS-DOS 1.10 Boot Sector](../1.10/#compaq-ms-dos-110-boot-sector), so refer to that page for more information.
42 changes: 40 additions & 2 deletions software/pcx86/sys/dos/compaq/2.11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Released in 1984 by COMPAQ Computer Corp, this early version of MS-DOS displays
(C) Copyright COMPAQ Computer Corp. 1982, 83, 84
(C) Copyright Microsoft 1981, 82, 83

A directory listing of the diskette is provided [below](#directory-of-compaq-ms-dos-211).
We also have copies of the original [COMPAQ MS-DOS Version 2 Documentation](#documents).
A directory listing of the diskette is provided [below](#directory-of-compaq-ms-dos-211). We also have copies of the original [COMPAQ MS-DOS Version 2 Documentation](#documents).

{% include machine.html id="ibm5160-compaq211" %}

Expand Down Expand Up @@ -75,6 +74,45 @@ We also have copies of the original [COMPAQ MS-DOS Version 2 Documentation](#doc
39 file(s) 335452 bytes
7168 bytes free

### COMPAQ MS-DOS 2.11 Boot Sector

Unlike COMPAQ's 1.x releases, which used system files `IOSYS.COM` and `MSDOS.COM`, COMPAQ switched to IBM's naming convention: `IBMBIO.COM` and `IBMDOS.COM`. However, COMPAQ opted to use an OEM signature of `CCC 2.1` instead of `IBM 2.0`.

The boot sector of the COMPAQ MS-DOS 2.11 disk image contains the following bytes:

00000000 eb 35 90 43 43 43 20 20 32 2e 31 00 02 02 01 00 |.5.CCC 2.1.....|
00000010 02 70 00 d0 02 fd 02 00 09 00 02 00 00 00 df 02 |.p..............|
00000020 25 02 09 2a ff 50 f6 00 02 00 00 00 00 00 00 00 |%..*.P..........|
00000030 00 be 8c 01 e9 15 01 c4 5c 08 33 ed b8 c0 07 8e |........\.3.....|
00000040 d8 0a d2 79 12 89 1e 29 00 8c 06 2b 00 88 16 2d |...y...)...+...-|
00000050 00 c7 06 2f 00 02 00 8e c5 8e d5 bc 00 7c fc bf |.../.........|..|
00000060 78 00 b8 1e 00 ab 8c d8 ab a1 16 00 d1 e0 40 01 |x.............@.|
00000070 06 29 00 11 2e 2b 00 e8 67 00 bb 00 05 53 b0 01 |.)...+..g....S..|
00000080 e8 94 00 5f be 76 01 b9 0b 00 f3 a6 75 a3 83 c7 |..._.v......u...|
00000090 15 b1 0b f3 a6 75 9a a1 11 00 b1 04 d3 e8 01 06 |.....u..........|
000000a0 29 00 11 2e 2b 00 ff 36 29 00 c4 1e 72 01 e8 30 |)...+..6)...r..0|
000000b0 00 00 06 2e 00 e8 5f 00 01 06 29 00 11 2e 2b 00 |......_...)...+.|
000000c0 80 3e 2e 00 11 72 e7 cd 11 d1 e0 d1 e0 80 e4 03 |.>...r..........|
000000d0 b9 02 00 74 04 fe c4 8a cc a1 2f 00 5b ff 2e 72 |...t....../.[..r|
000000e0 01 a1 18 00 f6 26 1a 00 91 a1 29 00 8b 16 2b 00 |.....&....)...+.|
000000f0 f7 f1 92 8b 0e 18 00 f6 f1 fe c4 86 cc d0 ce d0 |................|
00000100 ce 0a ce 8a ea 8a f0 8a 16 2d 00 51 80 e1 3f 2a |.........-.Q..?*|
00000110 e1 fe c4 8a c4 59 c3 98 96 56 bf 05 00 b8 01 02 |.....Y...V......|
00000120 cd 13 72 0a 80 c7 02 fe c1 4e 75 f1 58 c3 80 fc |..r......Nu.X...|
00000130 11 75 0f 1e b8 00 c8 8e d8 81 3e ea 1f 43 4f 1f |.u........>..CO.|
00000140 74 e2 33 c0 cd 13 4f 75 d4 be d6 01 e8 1d 00 be |t.3...Ou........|
00000150 ac 01 e8 17 00 33 c0 cd 16 26 c7 06 72 04 34 12 |.....3...&..r.4.|
00000160 ea 00 00 ff ff b4 0e bb 07 00 cd 10 ac 3c 24 75 |.............<$u|
00000170 f4 c3 00 00 70 00 49 42 4d 42 49 4f 20 20 43 4f |....p.IBMBIO CO|
00000180 4d 49 42 4d 44 4f 53 20 20 43 4f 4d 0a 0d 4e 6f |MIBMDOS COM..No|
00000190 6e 2d 53 79 73 74 65 6d 20 64 69 73 6b 20 6f 72 |n-System disk or|
000001a0 20 64 69 73 6b 20 65 72 72 6f 72 24 0a 0d 52 65 | disk error$..Re|
000001b0 70 6c 61 63 65 20 61 6e 64 20 73 74 72 69 6b 65 |place and strike|
000001c0 20 61 6e 79 20 6b 65 79 20 77 68 65 6e 20 72 65 | any key when re|
000001d0 61 64 79 0a 0d 24 0a 0d 44 69 73 6b 20 62 6f 6f |ady..$..Disk boo|
000001e0 74 20 66 61 69 6c 75 72 65 24 43 6f 70 72 2e 20 |t failure$Copr. |
000001f0 43 4f 4d 50 41 51 20 31 39 38 33 2c 38 34 55 aa |COMPAQ 1983,84U.|

<!-- Documentation -->

{% include gallery/documents.html %}
3 changes: 1 addition & 2 deletions software/pcx86/sys/dos/compaq/2.12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Released in 1984 by COMPAQ Computer Corp, this early version of MS-DOS displays
(C) Copyright COMPAQ Computer Corp. 1982, 83, 84
(C) Copyright Microsoft 1981, 82, 83

A directory listing of the diskette is provided [below](#directory-of-compaq-ms-dos-212).
We also have copies of the original [COMPAQ MS-DOS Version 2 Documentation](#documents).
A directory listing of the diskette is provided [below](#directory-of-compaq-ms-dos-212). We also have copies of the original [COMPAQ MS-DOS Version 2 Documentation](#documents).

{% include machine.html id="ibm5160-compaq212" %}

Expand Down
3 changes: 1 addition & 2 deletions software/pcx86/sys/dos/compaq/3.00/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Released in 1985 by COMPAQ Computer Corp, this version of MS-DOS displays the fo
(C) Copyright COMPAQ Computer Corp. 1982, 1983, 1984, 1985
(C) Copyright Microsoft Corp. 1981, 1982, 1983, 1984, 1985

[Directory Listings](#directory-of-compaq-ms-dos-300-disk-1) of the distribution diskettes are provided below.
Thanks (again) to the [OS/2 Museum](http://www.os2museum.com/) for sharing these disks with us.
[Directory Listings](#directory-of-compaq-ms-dos-300-disk-1) of the distribution diskettes are provided below. Thanks (again) to the [OS/2 Museum](http://www.os2museum.com/) for sharing these disks with us.

{% include machine.html id="ibm5170-compaq300" %}

Expand Down
Loading

0 comments on commit 513b700

Please sign in to comment.