Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Added two early versions of Sidekick, and a PCjs keyboard fix to allo…
Browse files Browse the repository at this point in the history
…w CTRL-ALT to activate it
  • Loading branch information
jeffpar committed Jan 29, 2018
1 parent cf183dc commit b239283
Show file tree
Hide file tree
Showing 19 changed files with 209 additions and 61 deletions.
2 changes: 2 additions & 0 deletions devices/pcx86/machine/5150/cga/256kb/debugger/machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
<control type="switches" label="SW2" binding="sw2" left="0px"/>
<control type="description" binding="swdesc" left="0px"/>
</chipset>
<serial id="com1" adapter="1" binding="print"/>
<parallel id="lpt1" adapter="2" binding="print"/>
</machine>
2 changes: 2 additions & 0 deletions disks/pcx86/compiled/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@
<disk path="/disks/pcx86/apps/other/wordstar/pcjr/WSPCJR100-DISK1.json">WordStar for PCjr (Disk 1)</disk>
<disk path="/disks/pcx86/apps/other/wordstar/pcjr/WSPCJR100-DISK2.json">WordStar for PCjr (Disk 2)</disk>
<disk path="/disks/pcx86/apps/other/wordstar/pcjr/WSPCJR100-DISK3.json">WordStar for PCjr (Disk 3)</disk>
<disk path="/disks/pcx86/tools/borland/sidekick/1.11c/SIDEKICK-111C.json">Sidekick 1.11C</disk>
<disk path="/disks/pcx86/tools/borland/sidekick/1.56/SIDEKICK-156.json">Sidekick 1.56</disk>
<disk path="/disks/pcx86/tools/borland/tpascal/3.00b/TURBO-PASCAL-300B.json">Borland Turbo Pascal 3.00B</disk>
<disk path="/disks/pcx86/tools/borland/tpascal/3.01a/TURBO-PASCAL-301A.json">Borland Turbo Pascal 3.01A</disk>
<disk path="/disks/pcx86/tools/ibm/bascom/1.00/BASCOM100-DISK1.json">IBM BASIC Compiler 1.00 (Disk 1)</disk>
Expand Down
2 changes: 2 additions & 0 deletions disks/pcx86/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<manifest ref="/disks/pcx86/apps/other/wordstar/3.30/manifest.xml"/>
<manifest ref="/disks/pcx86/apps/other/wordstar/4.00/manifest.xml"/>
<manifest ref="/disks/pcx86/apps/other/wordstar/pcjr/manifest.xml"/>
<manifest ref="/disks/pcx86/tools/borland/sidekick/1.11c/manifest.xml"/>
<manifest ref="/disks/pcx86/tools/borland/sidekick/1.56/manifest.xml"/>
<manifest ref="/disks/pcx86/tools/borland/tpascal/3.00b/manifest.xml"/>
<manifest ref="/disks/pcx86/tools/borland/tpascal/3.01a/manifest.xml"/>
<manifest ref="/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml"/>
Expand Down
2 changes: 1 addition & 1 deletion disks/pcx86/minix/1.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permalink: /disks/pcx86/minix/1.1/
---

MINIX 1.1
---
---------

The MINIX 1.1 Operating System was distributed on five 1.2M disk images:

Expand Down
4 changes: 2 additions & 2 deletions disks/pcx86/minix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ permalink: /disks/pcx86/minix/
---

MINIX Operating Systems
---
-----------------------

Information is available for the following versions of MINIX:
Information is available for the following versions of MINIX.

* [MINIX 1.1](1.1/)
2 changes: 1 addition & 1 deletion disks/pcx86/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /disks/pcx86/tools/
PC Tools
--------

Information is available for tools from these vendors:
Information is available for tools from these vendors.

* [Borland](borland/)
* [IBM](ibm/)
Expand Down
1 change: 1 addition & 0 deletions disks/pcx86/tools/borland/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ permalink: /disks/pcx86/tools/borland/
Borland Languages and Tools
---------------------------

* [Borland Sidekick](sidekick/)
* [Borland Turbo Pascal](tpascal/)
26 changes: 26 additions & 0 deletions disks/pcx86/tools/borland/sidekick/1.11c/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: page
title: Borland Sidekick 1.11
permalink: /disks/pcx86/tools/borland/sidekick/1.11c/
---

Borland Sidekick 1.11
---------------------

### Directory of Borland Sidekick 1.11C

Volume in drive A has no label
Directory of A:\

SK COM 36318 1-26-85 12:19a
SKN COM 30968 1-26-85 12:19a
SKC COM 26286 1-26-85 12:19a
SKM COM 16401 1-26-85 12:19a
SKINST COM 44971 7-23-84 4:53p
SKINST MSG 3456 7-12-84 2:03p
READ ME! 2275 10-30-84 2:48p
DIAL DOC 980 10-17-84 11:25a
PHONE DIR 1156 9-02-84 4:59a
CHIP APP 589 1-04-85 10:43a
SK HLP 43520 10-09-84 4:21p
11 File(s) 149504 bytes free
25 changes: 25 additions & 0 deletions disks/pcx86/tools/borland/sidekick/1.11c/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pcx86/1.50.3/manifest.xsl"?>
<manifest type="software">
<title>Sidekick</title>
<version>1.11C</version>
<type>Utility</type>
<category>TSR</category>
<company>Borland</company>
<releaseDate>1984</releaseDate>
<serialNumber>258608</serialNumber>
<disk id="disk01" size="368640" chs="40:2:9" img="archive/SIDEKICK-111C.img" href="/disks/pcx86/tools/borland/sidekick/1.11c/SIDEKICK-111C.json" md5="c84070e57f48a60052688140f2092813" md5json="52e60644d7cd824a69003ee38b4d5f02">
<link href="https://winworldpc.com/product/sidekick/1x" name="Borland Sidekick 1.11c (5.25)" file="disk1.img">WinWorld</link>
<file size="589" time="1985-01-04 10:43:00" attr="0x20">CHIP.APP</file>
<file size="980" time="1984-10-17 11:25:36" attr="0x20">DIAL.DOC</file>
<file size="1156" time="1984-09-02 04:59:24" attr="0x20">PHONE.DIR</file>
<file size="2275" time="1984-10-30 14:48:22" attr="0x20">READ.ME!</file>
<file size="36318" time="1985-01-26 00:19:06" attr="0x20">SK.COM</file>
<file size="43520" time="1984-10-09 16:21:08" attr="0x20">SK.HLP</file>
<file size="26286" time="1985-01-26 00:19:08" attr="0x20">SKC.COM</file>
<file size="44971" time="1984-07-23 16:53:06" attr="0x20">SKINST.COM</file>
<file size="3456" time="1984-07-12 14:03:34" attr="0x20">SKINST.MSG</file>
<file size="16401" time="1985-01-26 00:19:08" attr="0x20">SKM.COM</file>
<file size="30968" time="1985-01-26 00:19:08" attr="0x20">SKN.COM</file>
</disk>
</manifest>
26 changes: 26 additions & 0 deletions disks/pcx86/tools/borland/sidekick/1.56/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: page
title: Borland Sidekick 1.56
permalink: /disks/pcx86/tools/borland/sidekick/1.56/
---

Borland Sidekick 1.56
---------------------

### Directory of Borland Sidekick 1.56

Volume in drive A is SIDEKICK156
Directory of A:\

README COM 16074 8-02-85 10:27a
SK COM 39515 8-06-85 1:57p
SKN COM 34009 8-06-85 1:57p
SKC COM 28049 8-06-85 1:57p
SKM COM 17642 8-06-85 1:57p
SK HLP 53632 8-02-85 12:40p
SKINST COM 54574 6-25-85 7:49p
SKINST MSG 4224 6-14-85 4:19p
NOTES 1647 9-02-84 4:58a
PHONE DIR 1358 5-03-85 2:01p
READ-ME SK 12928 8-14-85 11:10a
11 File(s) 92160 bytes free
25 changes: 25 additions & 0 deletions disks/pcx86/tools/borland/sidekick/1.56/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pcx86/1.50.3/manifest.xsl"?>
<manifest type="software">
<title>Sidekick</title>
<version>1.56</version>
<type>Utility</type>
<category>TSR</category>
<company>Borland</company>
<releaseDate>1985</releaseDate>
<serialNumber></serialNumber>
<disk id="disk01" size="368640" chs="40:2:9" img="archive/SIDEKICK-156.img" href="/disks/pcx86/tools/borland/sidekick/1.56/SIDEKICK-156.json" md5="65fcdb3d37fdb7baddb3c181e6724566" md5json="ba17c21c56d5f28bb556a03091599d18">
<link href="https://winworldpc.com/product/sidekick/1x" name="Borland Sidekick 1.56 (5.25)" file="Disk01.img">WinWorld</link>
<file size="1647" time="1984-09-02 04:58:32" attr="0x20">NOTES</file>
<file size="1358" time="1985-05-03 14:01:46" attr="0x20">PHONE.DIR</file>
<file size="12928" time="1985-08-14 11:10:08" attr="0x20">READ-ME.SK</file>
<file size="16074" time="1985-08-02 10:27:04" attr="0x20">README.COM</file>
<file size="39515" time="1985-08-06 13:57:18" attr="0x20">SK.COM</file>
<file size="53632" time="1985-08-02 12:40:32" attr="0x20">SK.HLP</file>
<file size="28049" time="1985-08-06 13:57:18" attr="0x20">SKC.COM</file>
<file size="54574" time="1985-06-25 19:49:04" attr="0x20">SKINST.COM</file>
<file size="4224" time="1985-06-14 16:19:18" attr="0x20">SKINST.MSG</file>
<file size="17642" time="1985-08-06 13:57:18" attr="0x20">SKM.COM</file>
<file size="34009" time="1985-08-06 13:57:18" attr="0x20">SKN.COM</file>
</disk>
</manifest>
11 changes: 11 additions & 0 deletions disks/pcx86/tools/borland/sidekick/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: page
title: Borland Sidekick
permalink: /disks/pcx86/tools/borland/sidekick/
---

Borland Sidekick
----------------

* [Borland Sidekick 1.11C](1.11c/)
* [Borland Sidekick 1.56](1.56/)
2 changes: 1 addition & 1 deletion disks/pcx86/tools/other/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /disks/pcx86/tools/other/
Other PC Tools
--------------

Information is available for these additional tools:
Information is available for these additional PC tools.

* [DoubleDOS](doubledos/)
* [Enhanced DEBUG](enhdebug/)
Expand Down
2 changes: 1 addition & 1 deletion disks/pcx86/tools/other/doubledos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ permalink: /disks/pcx86/tools/other/doubledos/
DoubleDOS
---------

PCjs has archived the following versions of DoubleDOS:
PCjs has archived the following versions of DoubleDOS.

* [DoubleDOS 2.0V](2.0v/)
2 changes: 1 addition & 1 deletion disks/pcx86/tools/other/qemm386/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /disks/pcx86/tools/other/qemm386/
QEMM-386
--------

PCjs has archived the following versions of QEMM-386:
PCjs has archived the following versions of QEMM-386.

* [QEMM-386 v4.10](4.10/)
* [QEMM-386 v4.23](4.23/)
Expand Down
42 changes: 28 additions & 14 deletions modules/pcx86/lib/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,16 @@ class Keyboard extends Component {
this.setModel(parmsKbd['model']);

this.fMobile = Web.isMobile();
this.fMSIE = Web.isUserAgent("MSIE");
this.printMessage("mobile keyboard support: " + (this.fMobile? "true" : "false"));

/*
* This flag (formerly fMSIE, for all versions of Microsoft Internet Explorer, up to and including v11)
* has been expanded to include the Microsoft Edge browser, because while Microsoft did eliminate lots of
* incompatibilities with other browsers in Edge, the one that this component actually cares about (ie,
* whether the "lock" keys generate UP and DOWN events on every press, like IE historically did, or only
* DOWN on "lock" and UP on "unlock", like other browsers do) has been preserved by Edge.
*/
this.fMSIEorEdge = Web.isUserAgent("MSIE") || Web.isUserAgent("Edge");

/*
* This is count of the number of "soft keyboard" keys present. At the moment, its only
Expand Down Expand Up @@ -1219,7 +1227,7 @@ class Keyboard extends Component {
else if (!fDown) {
/*
* In current webkit browsers, pressing and then releasing both left and right shift keys together
* (or both alt keys, or both cmd/windows keys, or presumably both ctrl keys) results in 4 events, as
* (or both ALT keys, or both CMD/Windows keys, or presumably both CTRL keys) results in 4 events, as
* you would expect, but 3 of the 4 are "down" events; only the last of the 4 is an "up" event.
*
* Perhaps this is a browser accessibility feature (ie, deliberately suppressing the "up" event
Expand Down Expand Up @@ -1255,6 +1263,7 @@ class Keyboard extends Component {
* @this {Keyboard}
* @param {number} simCode
* @param {boolean} [fPress]
* @return {boolean} true if added, false if not (eg, not recognized, already added, etc)
*/
addActiveKey(simCode, fPress)
{
Expand All @@ -1264,13 +1273,13 @@ class Keyboard extends Component {
if (!COMPILED && this.messageEnabled(Messages.KBD | Messages.KEY)) {
this.printMessage("addActiveKey(" + simCode + "," + (fPress? "press" : "down") + "): unrecognized", true);
}
return;
return false;
}

/*
* Ignore all active keys if the CPU is not running.
*/
if (!this.cpu || !this.cpu.isRunning()) return;
if (!this.cpu || !this.cpu.isRunning()) return false;

/*
* If this simCode is in the KEYSTATE table, then stop all repeating.
Expand Down Expand Up @@ -1303,7 +1312,7 @@ class Keyboard extends Component {
this.printMessage("addActiveKey(" + simCode + "," + (fPress? "press" : "down") + "): " + (i < 0? "already active" : (i == this.aKeysActive.length? "adding" : "updating")), true);
}

if (i < 0) return;
if (i < 0) return false;

if (i == this.aKeysActive.length) {
key = {simCode}; // create a new Key object
Expand All @@ -1320,6 +1329,7 @@ class Keyboard extends Component {
key.nRepeat = (fPress? -1: (Keyboard.KEYSTATES[simCode]? 0 : 1));

this.updateActiveKey(key);
return true;
}

/**
Expand Down Expand Up @@ -1585,16 +1595,16 @@ class Keyboard extends Component {

if (keyCode == Keys.KEYCODE.CAPS_LOCK || keyCode == Keys.KEYCODE.NUM_LOCK || keyCode == Keys.KEYCODE.SCROLL_LOCK) {
/*
* FYI, "lock" keys generate a "down" event ONLY when getting locked and an "up" event ONLY
* FYI, "lock" keys generate a DOWN event ONLY when getting locked and an UP event ONLY
* when getting unlocked--which is a little odd, since the key did go UP and DOWN each time.
*
* We must treat each event like a "down", and also as a "press", so that addActiveKey() will
* automatically generate both the "make" and "break".
*
* Of course, there have to be exceptions, most notably MSIE, which sends both "up" and down"
* on every press, so there's no need for trickery.
* Of course, there have to be exceptions, most notably both Microsoft Internet Explorer and Edge,
* which send both UP and DOWN events on every press, so there's no need for trickery.
*/
if (!this.fMSIE) {
if (!this.fMSIEorEdge) {
fDown = fPress = true;
}
}
Expand All @@ -1606,15 +1616,19 @@ class Keyboard extends Component {
* for the ALT key, but not an UP event, leaving our machine with the impression that the ALT key
* is still down, which the user user has no easy way to detect OR correct.
*
* We still record the ALT state in bitsState as best we can, and clear it whenever we lose focus
* So we still record the ALT state in bitsState as best we can, and clear it whenever we lose focus
* in onFocusChange(), but we no longer pass through DOWN events to our machine. Instead, we now
* check bitsState prior to simulating any other key, and if the ALT bit is set, we simulate an
* active ALT key first; you'll find that check at the end of both onKeyChange() and onKeyPress().
*
* However, one exception to this hack is the "Sidekick" exception: if the CTRL key is also down,
* we'll still simulate ALT immediately, for those users who press CTRL and then ALT to pop up Sidekick
* (as opposed to pressing ALT and then CTRL, which should also work, regardless).
*
* NOTE: Even though this is a hack specifically for Windows, I'm doing it across the board, for all
* platforms and browsers, for consistency.
*/
if (keyCode == Keys.KEYCODE.ALT) {
if (keyCode == Keys.KEYCODE.ALT && !(this.bitsState & Keyboard.STATE.CTRL)) {
fIgnore = fDown; // if an ALT key went down, then set fIgnore as well
}

Expand All @@ -1640,14 +1654,14 @@ class Keyboard extends Component {
* leaving the current page.
*
* Regarding TAB: If I don't consume TAB on the "down" event, then that's all I'll see, because the browser
* act on it by giving focus to the next control.
* acts on it by giving focus to the next control.
*
* Regarding ESC: This key generates "down" and "up" events (LOTS of "down" events for that matter), but no
* "press" event.
*/

/*
* HACK for simulating CTRL_BREAK using CTRL_DEL (Mac) or CTRL_BS (Windows)
* HACK for simulating CTRL-BREAK using CTRL-DEL (Mac) or CTRL-BS (Windows)
*/
if (keyCode == Keys.KEYCODE.BS && (this.bitsState & (Keyboard.STATE.CTRL|Keyboard.STATE.ALT)) == Keyboard.STATE.CTRL) {
simCode = Keyboard.SIMCODE.CTRL_BREAK;
Expand Down Expand Up @@ -1864,7 +1878,7 @@ class Keyboard extends Component {
fSimulated = true;
}

if (!COMPILED && this.messageEnabled(Messages.KEY)) {
if (!COMPILED && this.messageEnabled(Messages.KBD | Messages.KEY)) {
this.printMessage("keySimulate(" + simCode + "," + (fDown? "down" : "up") + "): " + (fSimulated? "true" : "false"), true);
}

Expand Down
Loading

0 comments on commit b239283

Please sign in to comment.