Skip to content
This repository has been archived by the owner. It is now read-only.

@jeffpar jeffpar released this Jan 11, 2019 · 327 commits to master since this release

This release fixes an autoType problem that crept into at least one PCjs demo (eg, "Turbo Pascal vs. QuickPascal").

The problem: when a PCjs web page is generated by GitHub Pages (which in turn uses Jekyll, which in turn uses the Liquid template language), the page template must perform some simple transformations on the values of properties like autoType, such as converting "\t" (a traditional tab character) to "\\t", so that by the time the string reaches the key injection code inside PCx86, the tab character is still properly escaped. It also attempts to do the same for backslashes as well, converting "\" to "\\\\". Unfortunately, if you wanted to follow a backslash with a "t", those same simplistic Liquid transformations would misinterpret the combination as "\t".

My solution: rather than continue to fight with the Liquid template language on this (a potentially losing battle), I decided to add another "softkey" to PCx86: $bslash. So the rule of thumb is this: use $bslash to inject a normal backslash, and use actual backslashes only when specifying one of the following special characters: \r (return), \t (tab), or \x (for hex codes). \n is allowed, too, but it's nothing more than an alias for \r, since PC keyboards don't have an actual linefeed key. In fact, it might be best to avoid backslashes whenever possible, since PCx86 also supports "softkeys" $tab and $enter.

A number of other improvements have crept into PCjs since the last formal release:

That's all for now. Happy New Year!

Assets 2

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

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%).

Assets 2

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

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.

Assets 2

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

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.

Assets 2

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

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.

Assets 2

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

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
Assets 2

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

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

See this blog post for details.

Assets 2

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

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.

Assets 2

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

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:$date\r$time\rbasic%20b:music\r

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:{A:{name:"PC-DOS%201.00"}}&autoType=$date\rbasic%20music\r

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.

Assets 2

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

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.

Assets 2
You can’t perform that action at this time.