@jeffpar jeffpar released this May 29, 2018 · 39 commits to master since this release

Assets 2

This release fixes issue #66 and includes a change to 8088-based configurations that should make those machines slightly more cycle-accurate. In particular, Central Point Software’s PCTOOLS should now report that an 8088-based machine running at 4.77Mhz is running at “100%” of an IBM PC (previously it reported 140%).

@jeffpar jeffpar released this May 19, 2018 · 76 commits to master since this release

Assets 2

This release includes lots of small changes from April and May 2018:

This release also includes @mihailik's fix for #62 by Making use of Blob and URL.

@jeffpar jeffpar released this Apr 2, 2018 · 374 commits to master since this release

Assets 2

This release contains two important changes to how memory for the IBM Monochrome and Color Graphics adapters is managed:

  1. The MDA and CGA frame buffers are now implemented with a custom Memory controller, making them consistent with how the EGA and VGA frame buffers are managed, and more importantly, eliminating the need for the default memory controller to perform dirty block tracking (because the only component that needed that feature was the Video component, which can handle that itself now).

  2. The 4K MDA and 16K CGA frame buffers are aliased multiple times in their respective 32K address ranges, mimicking the actual hardware's address decoding. This resolves a compatibility issue with IBM's original "Exploring the IBM Personal Computer" software, which attempted to clear the screen with a broken INT 10h Scroll Up call and still managed to clear the screen anyway, because the addresses being used were aliased to the frame buffer.

The second change now requires the Bus component to use a 4K block size for all machines, irrespective of the machine's bus width, since any machine can be configured with an MDA card, and that card requires 4K block aliasing. That, in turn, affected machines with saved states that had previously been using a larger block size. The Bus restoreMemory() function now has code to detect that situation and convert the saved blocks before restoring them.

@jeffpar jeffpar released this Mar 26, 2018 · 417 commits to master since this release

Assets 2

Quite a few changes and additions since the last release:

  • Added some new flavors of Unix (eg, IBM XENIX)
  • Fixed some Video issues exposed by XENIX and its use of non-standard frame buffer addresses
  • Made lots of hardware cursor fixes (see the PCjs blog for details)
  • 83 and 84-key "soft keyboard" improvements (use the Keys button on any machine to activate)
  • Moved all disk images to separate repositories, now integrated as submodules
  • Created a new TestMonitor component for SerialPort-based testing
  • Improved autoType support, as demonstrated in the Turbo Pascal vs. QuickPascal blog post
  • Improved Alt key handling to minimize the risk of Alt getting "stuck" inside a machine
  • Fixed a broken DAC initialization test, so Windows 3.x should now display correct colors on a VGA

There should have been some intermediate releases before this one, but I doubt anyone really cares. Enjoy this "Spring Roll-up" release.

@jeffpar jeffpar released this Feb 4, 2018 · 726 commits to master since this release

Assets 2

I haven't been tagging releases as often as I should. Consider this a "roll-up" release which:

  • Fixed an HSFLOP VxD bug in Windows 95 by delaying FDC interrupts
  • Fixed CAPS-LOCK management for Windows-based browsers
  • Disabled speaker clicking on COMPAQ machines (it was annoying and intermittent)
  • Added support for CTRL-ALT-PLUS and CTRL-ALT-MINUS (special COMPAQ keys)
  • Delayed ALT notifications until at least one other key is pressed
  • Fixed a Parallel Port bug that locked up DOS when CTRL-P was pressed
  • Improved 8042 keyboard support for WIndows 95 (resolves dropped/hung keys)
  • Added support for mounting disk images via third-party URL (CORS permitting)
  • Archived a few more disks (eg, CP/M-86 1.0, QEMM-386)
  • Archived a "new" early COMPAQ DeskPro 386 ROM, now used by the COMPAQ EGA configurations

@jeffpar jeffpar released this Nov 30, 2017 · 983 commits to master since this release

Assets 2

Building on the PCjs TI-57 Emulator, the TI-55 Programmable Calculator can now be emulated as well.

See this blog post for details.

@jeffpar jeffpar released this Nov 11, 2017 · 1040 commits to master since this release

Assets 2

The new TI-57 Programmable Calculator emulator is the latest addition to the PCjs Machines collection. It emulates a TMS-1500 chip at the register level, and uses an original TI-57 ROM, providing about as perfect a simulation as you can get.

Even though it's my smallest JavaScript-based emulator to date, it's still packed with goodies:

  • Faithful speed and LED simulation
  • Built-in disassembler and "mini-debugger"
  • Works on desktop and mobile devices
  • Saves and restores state automatically

Since it saves your calculator's state whenever the web page is closed, and restores that state when the page is reopened, you shouldn't lose your work. However, just like a real calculator, if you turn it off and on again (using the Power button), then everything will be reset.

The "mini-debugger" is connected to the Diagnostics window, so you can type commands there as well. As the "?" command will tell you, available commands include:

b[c]        	break on condition c
bl          	list break conditions
g [addr]    	run (to addr)
h           	halt
r[a]        	dump (all) registers
t [n]           step (n instructions)
u [addr] [n]    disassemble (at addr)

Clicking the Halt button is equivalent to the "h" command, the Run button is equivalent to "g", and the Step button is equivalent to "t". The Reset button has no equivalent; it's just a shortcut for cycling the Power button. If you use the "t" command to step through a large number of instructions, the Step button becomes a Stop button, allowing you to terminate the step operation.

In addition to supporting touch and mouse events, keyboard shortcuts are supported, too. The set
of shortcuts is configurable, based on the button map passed to the emulator. The default map looks like this:

"map": [
    ["2nd",  "inv",  "lnx",  "\\b",  "clr"],
    ["lrn",  "xchg", "sq",   "sqrt", "rcp"],
    ["sst",  "sto",  "rcl",  "sum",  "exp"],
    ["bst",  "ee",   "(",    ")",    "/"],
    ["gto",  "7",    "8",    "9",    "*"],
    ["sbr",  "4",    "5",    "6",    "-"],
    ["rst",  "1",    "2",    "3",    "+"],
    ["r/s",  "0",    ".",    "+/-",  "=|\\r"]

Any button that corresponds to a single character can be triggered by typing that character (eg, "+" for the Add button). Escape sequences are allowed, too; for example, \\b represents Backspace, which will trigger the CE button. Buttons can have multiple mappings, too; for example, the Equals button can be triggered by typing either "=" or the Enter key.

The LED display is configurable as well. The default JSON properties for the LED Device look like this:

"display": {
    "class": "LED",
    "type": 3,
    "cols": 12,
    "rows": 1,
    "color": "red",
    "bindings": {
        "container": "displayTI57"

So if you prefer green or blue digits, change the color property. A backgroundColor property is supported, too, but if it's omitted, a transparent background is used.

All properties listed in a configuration’s overrides array may be overridden with a URL parameter. Currently, that includes:

  • cyclesPerSecond (default speed is 650000)
  • color (default LED color is red)
  • backgroundColor (default LED background color is none, for a transparent background)

So, for example, this URL loads the TI-57 with green LEDs.

Since this emulator is still "hot off the press", don't be surprised if there are still a few lingering bugs. If you run into any, or you have a browser or device where it doesn't work as expected, send me a note. If your web browser is "old" though, please try a newer browser first.

@jeffpar jeffpar released this Sep 26, 2017 · 1216 commits to master since this release

Assets 2

Any PCx86 machine on the PCjs website can now have keys injected into it, via the URL.

For example, this machine:


can be launched with a custom autoType parameter, like so:


There is an automatic delay of 150ms between every injected key. If you need a longer delay between certain keys, insert one or more of \xF1 through \xFF into the key sequence to establish a new delay of 100 to 1500ms, respectively. Insert \xF0 to revert back to the default delay.

In addition to control characters like \r for Return and \t for Tab, autoType also supports two special tokens:

  • $date (replaced with the current DOS-compatible date)
  • $time (replaced with the current DOS-compatible time)

A machine can also be launched with different startup diskette(s), using a custom autoMount parameter:


Diskettes can be specified by either their name or path attribute, as long as the specified value matches one of the entries in the PCjs IBM PC Disk Library.

UPDATE: The March 2018 Release changed the way autoType delays are specified. Use $1 through $9 instead of \xF1 through \xF9, and $0 to revert to the default delay.

@jeffpar jeffpar released this Aug 17, 2017 · 1277 commits to master since this release

Assets 2

The "Save Machine" feature available to all PCx86 machines was broken a while ago by the addition of source map information at the end of the compiled PCx86 scripts. That feature should be fixed now.

NOTE: The feature works best with Firefox or Safari, because for large machines, Chrome will quietly fail the operation with a "Network error" message.

@jeffpar jeffpar released this Aug 8, 2017 · 1304 commits to master since this release

Assets 2

PC8080 and PDPjs already included a set of timer services to make it easier for those machines to simulate hardware features like serial port baud rate, so it seemed like a good time to port those services to PCx86 as well. I haven't updated the PCx86 ChipSet or SerialPort components yet, but the new services are already being used to:

  • Perform Control Panel updates twice per second
  • Perform Video Display updates 60 times per second
  • Yield control from the CPU 30 times per second (for browser responsiveness)

The key services are:

  • addTimer(id, callback, ms)
  • setTimer(iTimer, ms)

Using the timer index from a previous addTimer() call, setTimer() sets that timer to fire after the specified number of milliseconds. This is preferred over JavaScript's setTimeout(), because all our timers are effectively paused when the CPU is paused (eg, when the Debugger halts execution). Moreover, setTimeout() handlers only run after runCPU() yields, which is far too granular for some components (eg, when the SerialPort tries to simulate interrupts at 9600 baud).

Also included in this release:

  • Added support for 8086/8088 64K wrap-around (eg, pushes, pops, instruction fetches, etc)
  • Added scaleMouse property to control browser-to-machine mouse coordinate scaling
  • Ported PDPjs script support to PCx86 to enable powerful x86 machine demo scripts

To see the new scripting support in action, take a look at the demo machine for TopView 1.01. The README.md defines several scripts at the top of the page:

  startKbd: |
    wait Keyboard DOS;
    type Keyboard "$date\r$time\rB:\rTV\r";
  startMouse: |
    wait Keyboard DOS;
    type Keyboard "$date\r$time\r";
    wait Keyboard;
    sleep 1000;
    select FDC listDrives "A:";
    select FDC listDisks "MS Mouse 5.00 (System)";
    loadDisk FDC;
    wait FDC;
    type Keyboard "MOUSE\r";
    sleep 5000;
    type Keyboard "B:\rTV\r";

The machine is currently currently configured to use the "startKbd" script:

  - id: ibm5160
    type: pcx86
    config: /devices/pcx86/machine/5160/cga/640kb/machine.xml
        path: /disks/pcx86/dos/ibm/2.00/PCDOS200-DISK1.json
        path: /disks/pcx86/apps/ibm/topview/1.01/TOPVIEW101-PROGRAM.json
    autoScript: startKbd