SkillAgentSearch skills...

Pcjs.v1

PCjs Machines 1.0 (archived)

Install / Use

/learn @jeffpar/Pcjs.v1

README


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

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" %}

<!--BEGIN:EXCLUDE-->

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

View on GitHub
GitHub Stars474
CategoryDevelopment
Updated13d ago
Forks89

Languages

JavaScript

Security Score

100/100

Audited on Mar 15, 2026

No findings