Code Monkey home page Code Monkey logo

pcjs.v1's Introduction

layout permalink machines
page
/
id type resume name config
ibm5150
pcx86
1
IBM PC (Model 5150) with Monochrome Display
/devices/pcx86/machine/5150/mda/64kb/machine.xml
id type config
demoC1P
c1p
/devices/c1p/machine/8kb/large/machine.xml

PCjs Machines

Welcome to PCjs, home of PCx86, the original IBM PC simulation that runs in your web browser. It is one of several JavaScript Machines in the PCjs Project, an open-source project that includes:

All PCjs machine simulations are written entirely in JavaScript. No Flash, Java or other plugins are required. Supported browsers include modern versions of Chrome, Safari, Firefox, Internet Explorer (v9.0 and up), Edge, and assorted mobile browsers.

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

The PCjs machine above uses PCx86 configured with an Intel 8088 running at 4.77Mhz, with 64Kb of RAM and an IBM Monochrome Display Adapter. The machine is also available with a Control Panel featuring the built-in PCx86 Debugger. For even greater control, build your own PC. The PCx86 Documentation will help you get started.

PCx86 has steadily evolved to support more classic x86-based machines, including the IBM PC XT, the 80286-based IBM PC AT, and the 80386-based COMPAQ DeskPro 386. PCx86 fully supports the original machine ROMs, video cards, etc, and all machines run at their original speeds.

The goals of the PCjs Project are to create fast, full-featured simulations of classic computer hardware, help people understand how these early machines worked, make it easy to experiment with different machine configurations, and provide a platform for running and analyzing old computer software.

Demos

Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows, OS/2, and other assorted software.

IBM PC AT w/EGA, OS/2 1.0 IBM PC running VisiCalc IBM PC running DONKEY.BAS IBM PC XT w/EGA, Windows 1.0 IBM PC XT w/CGA, Windows 1.01 IBM PC XT w/EGA, Windows 1.01 COMPAQ DeskPro 386, Windows/386 IBM PC AT w/EGA, Windows 3.0 IBM PC AT w/VGA, Windows 3.1 COMPAQ DeskPro 386, Windows 95 IBM PC w/MDA, CP/M-86 Microsoft Adventure (1981) IBM Multiplan (1982) Executive Suite (1982) Zork I (1982) Exploring the IBM PC (1983) Adventures in Math (1983) Microsoft Word (1984) Fantasy Land (1984) Rogue (1985)

There are many more PCx86 Demos, including an IBM PC with Dual Displays demonstrating early multi-monitor support, and multiple IBM PC XT machines running side-by-side with CGA Displays and EGA Displays.

C1Pjs

Below is the OSI Challenger C1P, another simulation in the PCjs Project. It simulates Ohio Scientific's 6502-based microcomputer, released in 1978. More details about this simulation and the original machine are available in the C1Pjs Documentation.

{% include machine.html id="demoC1P" %}

Developer Notes

The PCjs Repository on GitHub contains everything needed to run PCjs computer simulations. All the PCjs emulators run in any modern web browser, with or without a web server, and examples are provided for both local and remote operation.

The project includes:

The bundled web server is not strictly required. Any web server (Node, Apache, Nginx, etc) that can serve the necessary JavaScript files to your browser will work. However, instructions for doing that are beyond the scope of this introduction.

In fact, you can run PCjs simulations without a web server at all, using the "file:" protocol instead of "http:". However, most of the machine configurations require additional resource files (ROMs, disk images, etc), which are included in the project, but unless all the resource files are moved into a single directory (as they are in these Examples), your browser will probably be unable to load all of them, due to security restrictions. Using the bundled web server is the preferred solution.

The project includes a large selection of disk images, and a powerful DiskDump utility that runs on both the client and server, featuring a command-line interface (CLI) and web server API. Originally created to dump existing disk images as JSON, DiskDump has evolved into a full-featured disk image generator, capable of creating PC-compatible diskette and hard disk images from either lists or directories of files (including all subdirectories).

Installing PCjs with Node

The following instructions were originally written for OS X. However, users of other operating systems should have no problem following along. There are some prerequisites:

  • Node with NPM (download an installation package for your OS from nodejs.org)
  • Git (included with OS X Developer Tools; separate download required for Windows)

Some additional (optional) tools are also recommended:

  • Python (included with OS X; separate download required for Windows)
  • GitHub (useful for getting Git set up on Windows; also available for OS X)

Once you have the prerequisites, open a command-line window, cd to the directory where you'd like to install PCjs, and type the following commands:

git clone --recurse-submodules https://github.com/jeffpar/pcjs.git
cd pcjs
npm install --production
node server.js

Now open a web browser and go to http://localhost:8088/. You're done!

At the time of this writing, the recommended version of Node was 10.14.2.

Also, server.js was originally written using Express 3.x. Since then, Express 4.x has been released, but server.js has not been updated; the npm install command above should ensure that Express 3.x is installed locally.

Installing PCjs with Jekyll

PCjs can also be used with Jekyll and the Ruby WEBrick web server, now that a jekyll branch has been created to work with GitHub Pages. This is how the project is currently set up at pcjs.org.

This isn't going to be a Jekyll "How To" guide, because that would unnecessarily repeat all the information available at GitHub Pages. But we'll summarize the basic steps, which replace the npm and node steps above.

To install Jekyll for use with PCjs:

  1. Install Ruby (on OS X, it should already be installed)
  2. Install Bundler (on OS X, run sudo gem install bundler)
  3. Checkout the jekyll branch, since only that branch contains all the Jekyll-related files
  4. Create a Gemfile containing gem 'github-pages' (this is already checked in)
  5. Run bundle install (GitHub Pages alternatively suggests: bundle exec jekyll build --safe)
  6. Run bundle exec jekyll serve to start the web server

Now open a web browser and go to http://localhost:4000/. You're done!

Some useful Jekyll server options include:

bundle exec jekyll serve --host=0.0.0.0 --config _config.yml,_developer.yml

The --host option makes it possible to access the web server from other devices on your local network; for example, you may want to run PCjs on your iPhone, iPad, or other wireless device. And by adding _developer.yml, you can override the Jekyll configuration defaults in _config.yml. Using development (non-production) settings in _developer.yml is analogous to running the Node web server with certain development options; see Debugging PCjs.

GitHub Pages says you can run jekyll serve instead of bundle exec jekyll serve, but with the addition of more gems to Gemfile (eg, "jekyll-sitemap"), running jekyll serve may trigger dependency errors on some systems. bundle exec jekyll serve should always work.

Don't see any YML files in the root of your project? You probably forgot to switch to the jekyll branch:

git checkout jekyll

Last but not least, run bundle update periodically to keep Jekyll up-to-date.

Building PCjs

Unlike a typical project, where you have to build or configure or make something, PCjs is "ready to run". That's because both the compiled and uncompiled versions of the PCjs emulation modules are checked into the project, making deployment to a web server easier.

However, in order to build and test PCjs modifications, you'll want to use Gulp and the Gulp tasks defined by gulpfile.js. If you already ran npm install --production as described above, then you should re-run it without the --production option:

npm install

to get all the development dependencies, including Gulp 4.x.

You'll probably also want to install the command-line interface to Gulp. You can install that locally as well, but it's recommended you install it globally with -g; OS X users may also need to preface this command with sudo:

npm install gulp-cli -g

Now you can run gulp anywhere within the PCjs project to build an updated version. If no command-line arguments are specified, gulp runs the "default" task defined by the project's gulpfile.js; that task runs Google's Closure Compiler if any of the target files (eg, pcx86.js in the versions directory) are out-of date.

Using the JavaScript-based Closure Compiler

The latest gulpfile.js now compiles all PCjs machine modules using Google's JavaScript-based Closure Compiler.

Running gulp should build a complete set of "compiled" machine scripts in the versions directory. Individual machines can be compiled as well (eg, gulp compile/pcx86).

Using PCjs

From The Browser

The PCjs Node web server is little more than a file/directory browser for the PCjs project, plus a collection of APIs.

If a URL corresponds to a PCjs project folder and no "index.html" exists in that folder, the Node web server loads an HTML template (common.html) and generates an "index.html" for that folder.

The contents of the "index.html" will vary depending on the contents of the folder; for example, if the folder contains a README.md, then that Markdown file is converted to HTML and embedded in the "index.html". Similarly, if the folder contains a machine XML file, that is embedded as well.

To work well with both the Node and Jekyll web servers, all Markdown files containing one or more embedded machines should contain a Jekyll "Front Matter" header that describes the machines. For example, here's the header from the pcjs.org home page (index.md):

---
layout: page
permalink: /
machines:
  - id: ibm5150
    type: pcx86
    resume: 1
    name: "IBM PC (Model 5150) with Monochrome Display"
    config: /devices/pcx86/machine/5150/mda/64kb/machine.xml
  - id: demoC1P
    type: c1p
    config: /devices/c1p/machine/8kb/large/machine.xml
---

Then the following lines are inserted at the points where the machines should appear:

{% include machine.html id="ibm5150" %}
...
{% include machine.html id="demoC1P" %}

For more information on all the machine options supported in a Markdown file, see the project's Jekyll include file machine-engines.html.

From The Command-Line

The PCx86 client app can also be run from the command-line mode using Node, making it possible to script the application, run a series of automated tests, etc:

cd modules/pcx86/bin
node pcx86

The pcx86 script in modules/pcx86/bin loads all the PCx86 browser scripts listed in machines.json and then starts a Node REPL ("read-eval-print loop"). The REPL handles a few special commands (eg, "load", "quit") and passes anything else to the PCx86 Debugger component. If no Debugger component has been created yet, or if the Debugger didn't recognize the command, then it's passed on to eval(), like a good little REPL.

Use the "load" command to load a JSON machine configuration file. A sample ibm5150.json is provided in the bin directory, which is a "JSON-ified" version of the machine.xml displayed on the pcjs.org home page.

The command-line loader creates all the JSON-defined machine components in the same order that the browser creates XML-defined components. You can also issue the "load" command directly from the command-line:

node pcx86 --cmd="load ibm5150.json"

In fact, any number of "--cmd" arguments can be included on the command-line. A batch file syntax will eventually be added, too.

When a PCjs machine runs in a browser, an XML machine configuration file is transformed into HTML with a set of DIVs for each component: an "object" DIV whose data-value attribute provides the initialization parameters for the corresponding component, along with a set of optional "control" DIVs that the component can bind to (eg, a Run button, or a visual representation of DIP switches, or whatever).

When a PCjs machine is run from the command-line, there is no XML, HTML, or DIVs involved; this is basically a "headless" version of the machine, so there is no simple way to view its video display or interact with its keyboard, mouse, etc. You have to use Debugger commands to dump the machine's video buffer.

Since I was not inclined to add XML support to my Node environment, this has created some divergence between client and server operation: PCjs machines on the client supports only XML machine configuration files, whereas PCjs machines on the server supports only JSON machine configuration files.

I haven't decided whether I'll add support for JSON configuration files to the client, or add some XML-to-JSON conversion to the server, or both.

Debugging PCjs

NOTE: The following information assumes you're running Node as your local web server, not Jekyll. You can certainly debug PCjs while running Jekyll (ideally with --config _config.yml,_developer.yml), using http://localhost:4000/ and your favorite web browser's Developer Tools, but none of the special server or client features discussed below will be available.

Server Components

To help test/debug changes to PCjs server components (eg, DiskDump, HTMLOut), you can start the server with some additional options; eg:

node server.js --logging --console --debug

The --logging option will create a node.log that records all the HTTP requests, --debug will generate additional debug-only messages (which will also be logged if --logging is enabled), and --console will replicate any messages to your console as well.

If you want server.js to use a different port (the default is 8088), set PORT in your environment before starting the server:

export PORT=80

or add --port to your command-line:

node server.js --logging --console --debug --port=80

A complete list of command-line options can be found in server.js.

Client Components

A special command parameter ("gort") can be appended to the URL to request uncompiled client source files, making the PCjs emulators much easier to debug, albeit much slower:

http://localhost:8088/?gort=debug

The "gort=debug" command is unnecessary if the server is started with --debug; the server always serves uncompiled files when running in debug mode.

Conversely, if the server is in debug mode but you want to test a compiled version of PCx86, use:

http://localhost:8088/?gort=release

and the server will serve compiled JavaScript files, regardless whether the server is running in debug mode or release mode.

Another useful gort command is "gort=nodebug", which is like "gort=debug" in that it serves uncompiled files, but it also sets the client-side DEBUG variable to false, disabling all debug-only runtime checks in the client and allowing the simulation to run much faster (although not as fast as compiled code):

http://localhost:8088/?gort=nodebug

Regrettably, the gort command "Klaatu barada nikto" is not yet recognized. Fortunately, there are no (known) situations where PCjs could run amok and destroy the planet.

Other parameters that can be passed via the URL:

  • aspect: a numeric value >= 0.3 and <= 3.33 modifies the default aspect ratio of a machine's screen on the specified page; e.g.:

      http://localhost:8088/?aspect=2.0
    
  • autoMount: overrides the machine's diskette autoMount settings; eg:

      http://localhost:8088/?autoMount={A:{name:"PC DOS 1.10"}}
    
  • autoStart: "true" allows all machines to start normally, "false" prevents all machines from starting, and "no" prevents all machines from starting unless they have no Run button; e.g.:

      http://localhost:8088/?autoStart=false
    
  • drives: overrides the machine's hard drive settings; e.g.:

      http://localhost:8088/?drives=[{name:"10Mb Hard Disk",type:3,path:"/disks-demo/pcx86/drives/10mb/PCDOS200-WIN101-EGA.json"}]
    
  • autoType: a string of keys to inject into the machine after booting; e.g.:

      http://localhost:8088/?autoType=02-28-2018\r12:00\r
    
  • mobile: "true" or "false" to override PCjs' mobile browser detection, which affects things like soft keyboard layout; e.g.:

      http://localhost:8088/?mobile=true&softKeys=true
    
  • resume: a numeric value (0-3) overrides a machine's resume setting; e.g.:

      http://localhost:8088/?resume=0
    
  • softKeys: "true" to enable the machine's "soft keyboard" (if included); e.g.:

      http://localhost:8088/?softKeys=true
    

More information about the resume attribute is available in the documentation.

Updating PCjs

Developing

To start developing features for a new version of PCjs, here are the recommended steps:

  1. Update the version numbers in package.json and machines.json
  2. Run the "gulp version" task to bump the version in all the machine XML files
  3. Make changes
  4. Run "gulp" to build new versions of the apps (eg, "/versions/pcx86/1.x.x/pcx86.js")

You might also want to check out the blog post on PCjs Coding Conventions.

You may also want to skip step #2 until you're ready to start testing the new version. Depending on the nature of your changes, it may be better to manually edit the version number in only a few machine XML files for testing, leaving the rest of the XML files pointing to the previous version. Run "gulp version" when the new version is much closer to being released.

Testing

In the course of testing PCjs, there may be stale "index.html" files that prevent you from seeing application updates, changes to README.md files, etc. So before running Node, you may want to "touch" the default HTML template:

touch modules/shared/templates/common.html

The HTMLOut module compares the timestamp of that template file to the timestamp of any "index.html" and will regenerate the latter if it's out-of-date.

There's a TODO to expand that check to include the timestamp of any local README.md file, but there are many other factors that can contribute to stale "index.html" files, so usually the safest thing to do is "touch" the common.html template, or delete all existing "index.html" files, either manually or with the modules/htmlout/bin/delete_indexes.sh script.

License

The PCjs Project is now an open-source project on GitHub. All published portions are free for redistribution and/or modification under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

You are required to include the following links and copyright notice:

PCjs © 2012-2020 by Jeff Parsons

in every copy or modified version of this work, and to display that notice on every web page or computer that it runs on.

See LICENSE for details.

More Information

Learn more about the PCjs Project and PCx86. To create your own PCx86 machines, see the PCx86 Documentation for details. If you have questions or run into any problems, feel free to tweet or email.

pcjs.v1's People

Contributors

jeffpar avatar kotenok2000 avatar mihailik avatar octocontrabass avatar smuehlst avatar stuartpb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcjs.v1's Issues

Audio missing

Whenever I start a newer version of windows (like 3.1, 95) it does not play the windows startup sound. It only plays beeps when I start a computer or have an alert. Do these machines have audio cards or not? If not, please add some. If they do, please fix this problem. I hope you can add this feature. Thanks!

Allow hosting web page to handle requests, instead of going XHR

For embedded scenarios, offline or file: protocol it would be cool to be able to intercept external requests for all the disks, manifests, devices and stuff and serve them from wherever the hosting page sees fit.

Currently I do it by wrapping the main pc.js script in a 'module'-like closure and feeding in window/XMLHttpRequest substitutes. Essentially a polyfill hack.

Would be much easier to support it natively.

For example, before constructing XMLHttpRequest check if embedPC.onfetch is a function and if so -- call it to get the response from there.

I'll try to play with it and if all goes well, will submit a pull request.

Feature: Add more hot keys and machines with soft keyboards and fix android keyboard

If I use a touch device with a virtual keyboard, I am unable to access keys like tab, ctrl, alt, and more. My favourite machine is the IBM PC AT. I like halting it at the start then mounting the MS-DOS 5.0 disk to install it. Then, there is the dos shell. I need the tab key and F10 key to operate the dos shell. Can you maybe have more machines with a soft keyboard or extra hot keys? Thanks. Also, on most android devices, I am unable to access the virtual keyboard on the device. No new characters appear on the screen. Fix that please, or else I will not be able to use the machine when I'm on my Samsung Galaxy Note 4.

XMLHttpRequest.send() doesn't return if server is dead

In Computer.verifyUserID(), an API request is performed with a call to web.loadResource(), which performs the aforementioned send(). If I deliberately kill the server while the client app is still running and then try to call verifyUserID() -- by clicking on the "Save" button on a resumable machine -- it silently fails.

How do I catch/detect this problem and report a sensible error?

FileDump needs a "map" option (both API and command-line)

Consider adding a FileDump "map" option that allows the user to supply a MAP filename (via a "map" API parameter or a "--map" command-line option), which in turn triggers a call to loadMap(). Note that loadMap() will need to be a bit more general and use a worker function that calls either net.getFile() or fs.readFile(), similar to what FileDump's loadFile() function already does.

PC-DOS 7.00 "SETUP" fails

The "PC-DOS 7.00 (Boot Disk)" checked into the project boots and runs fine (well, except for RAMDRIVE, which requires LOADALL support, but that's coming soon).

And the "PC-DOS 7.00 (SETUP Disk 1)" boots fine, too. However, when the SETUP process tries to read "PC-DOS 7.00 (SETUP Disk 2)", things go south. The root of the problem is that disks 2 through 5 are XDF disks. I tried changing the DiskDump module to mimic the XDF "large sector" format (see --xdf), but that didn't help.

I later learned that VirtualBox is able to work by simply renaming the XDF disk images with ".IMG" extensions, which implies that PC-DOS "SETUP" can also read disks that are formatted "normally" with 80 tracks and 23 sectors/tracks.

So I've regenerated all the above XDF disk images without --xdf, so that they're formatted "normally". However, "SETUP" still crashes. So either my hypothesis is wrong, or there's a bug in the emulator waiting to be squashed.

PDP-10

Hello,

Which PDP-10 software are you planning to run?

I see there's a KA10 CPU in progress, but the latest version of TOPS-10 and TOPS-20 would run better on a KL10. ITS will probably run on a KA10, but requires some special modification to a stock machine.

PCjs runs on IE8 despite the lack of canvas support

I've updated the Video component to check for the presence of a getContext() method on the <canvas> element it creates, because IE8 successfully creates the element but fails on the first getContext() call. I had tested that <canvas> detection code in the past, but those tests must have only been with IE6 or IE7.

This new change will eliminate "unexpected exception" popups in PCjs v1.17.6 when attempting to initialize the Video component on IE8; however, the PCjs machine will start running, even though there's no way to see the output.

That's the expected behavior when running PCjs in "headless" mode (ie, from the command-line), but not-so-expected when running in a browser.

So, for machines with no canvas context (and no Debugger attached), perhaps the Video component should not mark itself ready; that will prevent the machine from starting.

Expose API for taking/loading snapshots of VM

Is there a way to dump memory, CPU and IO device state down to some JSON/XML mixture, then restart from that?

Similar how in the modern full-blown VM solutions you can make a snapshot and restart from it.

Given that the amount of RAM/disk in use is practically tiny, such a snapshot for pc.js can simply dump the whole state as is, rather than use deltas as in the big-gun warfare behemots.

pcjs.org isn't updated

You've gone through a release increments and a blog post without updating the site. Your latest blog post on video quirks and integer overflow doesn't come up there.

I wonder if it's a bug in auto-deploy scripts somewhere?

20MB HDD isn't working

Every tried OS on any machine returns error when trying to check, format or use HDD, for example MS-DOS returns "Invalid drive specification" error with "c:" or "format c:", Minix boot disk returns "Disk errors. Cannot read partition table." with option "h", etc.

Documentation on how to create an empty disk image from sources

Hello!
First: this is an absolutely fabulous piece of software!

Anyhow I was not able to find any documentation on how to create a new disk image from files I have lying around. I found information that I could convert images from the web to pcjs-json format, but not which formats would be acceptable to be pulled in via this way. Also not how to create a new image to be then pulled in.

Could you help me on this matter please? Did I oversee things or are they just not present yet?

PDP-11/70 doesn't increment the address as data is Deposited

Hi there,

I understand your pdp-11 emulator hasn't received as much focus as some of the other machines, but it seems, currently, as though the address doesn't increment as you Deposit data.

I'm new to PDP-11's so this might be wrong, however, the PDP-11/40 (and 70) js emulator you started from seems to work this way. I also remember reading mention of it in the PDP-11 manual earlier today.

Just a heads up!

Thanks,
James

Boot files for each DOS version you have images for?

Hi Jeff,
I'm working on a little side project for dosemu2 which adds some testing for basic boot success of Dosemu. Since DOS images are not generally available in one place on the web except your pcjs site, I've been (ab?)using the /api feature to convert your .json back to .img to seed my tests. I see your blog post about bandwidth problems and hope I've not caused you any problems. It seems that json->img interface is no longer available on pcjs.org, and to be honest it seemed a little unfair for me to grab them in this way. What I'm looking for is a way for a developer who wants to test Dosemu to get the three boot files (ibmbio.com, ibmsys.com, command.com etc) for each OS you have. Would it be possible for you to provide the images in binary format alongside the json ones in the repo?

Thanks, Andrew

Is there any reason for excluding 80486?

I noticed pcjs can handle a 386 processor. For me, 486s are much closer to 386s than Pentiums: no MMX for instance. So, is there any reason not to be able to emulate a 486SX/DX?

Function keys on Windows

A quick run through all of F1-F12 function keys on a Windows system running IE 9 (the oldest version of IE that supports PCjs) suggests that F1, F11 and F12 all need preventDefault() treatment -- or whatever the equivalent operation is (if any) that will allow PCjs to intercept those and any other keys that IE likes to reserve to itself.

Host's mouse stops working properly on high DPI screens

When the mouse is captured by the virtual machine, when the host machine has high DPI (in my case 200%) the relative mouse movements are calculated improperly, causing the cursor to wander to the top-left and making it hard to move the mouse right or down.

The mechanism is as follows: Every time the mouse moves, it's deviation from center is recorded, then the mouse is moved back to the center. however, in my case when I move the mouse right or down a pixel (on my screen) it records 0.5 logical pixels, which rounds down to 0. When I move the mouse smoothly with a low enough velocity that all movements are 0.5 pixels, the VM mouse doesn't move at all. Conversely, when I move the mouse left or up 0.5 pixels, it moves at double the speed in the VM.

386 SS has wrong behavior after reset

When the 386 is reset, the SS register has a value of 0 but SS behaves as if its base is nonzero. On a real 386, SS.base is set to 0 after reset. (...As far as I know. It does point to RAM, but I haven't verified exactly where.) Actually, upon further investigation, I think the issue is actually that SS is a 32-bit segment after reset, because stack operations are updating ESP instead of SP.

The code that tripped this bug reset the CPU using the keyboard controller, like below. I haven't tested what happens if the CPU is reset any other way.

MOV AL, 0xFE
OUT 0x64, AL

I found the bug while I was using this machine in Firefox on Windows.

Let me know if you need anything else.

CAPS-LOCK still an issue on Windows (Chrome)

I added a work-around for CAPS-LOCK handling in Internet Explorer, but the same work-around is apparently needed in Chrome for Windows.

Chrome for Mac behaves similar to Safari (CAPS-LOCK generates only a "down" event when locking, and only an "up" event when unlocking), but Chrome for Windows appears to be behave similar to MSIE (it generates both "down" and "up" events on both lock and unlock).

Unable to Play 'Space Invaders'

I am having an issue with PC8080. To interact with the machine, I must click on the machine window. However, when I do so the display output of the emulator simply disappears. If I click off of it, it does not reappear. When I refresh the page the game will reappear for a brief moment while the page reloads. I'm not sure if this is an issue with PCjs or my browser, but I feel it should be looked into.

The "clean" Grunt task doesn't work on Windows

The "clean" task, which deletes all the index.html files created by the bundled web server, uses a Bash script and *nix commands that don't work out of the box on Windows.

Workaround: don't run "grunt clean" from the command-line on Windows.

P.S. A similar issue exists for the "zipify-demo" task, which uses a Bash script and "zip" command-line utility that doesn't exist by default on Windows. Again, not super-critical.

Checkout and integrate Gitter.im

Hello,

I found Gitter.im (http://gitter.im) to be very usefull. It is a richtext (as in Markdown) and GitHub plus various other tools integrated chat service that provides a chat with a permanent archive for a repository that is available for free.

Could you please have a look at it and maybe integrate it to your repo?

Support JSON machine definition files

I want to help with migrating XML to JSON. Would you like that?

My suggestion is that if the machine file is JSON (heuristic check maybe?), then parsing and transformation is implemented by a separate logic.

Specifically, XSL transformation would be converted from a set of instructions written using XSLT language into a set of JavaScript statements.

The premise is to make it work, test — and then convert all XML files into JSON and obsolete the XML support.

For me it would be a good opportunity to get used to the complex parts of the code. The long goal for me is to improve the embedding. Right now I embed pcjs by proxying and polyfilling window, XMLHttpRequest, LocalStorage and a bunch of hackery around it. It sort of works, I can properly embed the whole of PCJS in one file — but it's very kludgy.

So this could be my first step to make embedding work.

Many thanks!

Feature: floppy activity LED and track display

How about a simple LED-style box next to the floppy and optionally a textbox which shows at what track the drive is? This would make waiting for the OS/2 installation a bit more fun :)

Create boot disks for DOS versions >= 5

Consider providing bootable disk images for DOS 5 and later with the core DOS programs, since starting with DOS 5 there was a setup program and most of the files were compressed.

Give a machine focus when it starts running

Giving a machine (or more specifically, the canvas the representing the machine's display) focus when it starts running would relieve us from having to click/tap on the machine's display before it can start processing input.

Tiny386BSD floppy doesn't boot

I traced the cause to PIC_LO.OCW3_POLL_CMD in modules/pcx86/lib/chipset.js. Polling is not yet a supported OCW3 command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.