Pcjs.v1
PCjs Machines 1.0 (archived)
Install / Use
/learn @jeffpar/Pcjs.v1README
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:
- PCx86, an x86-based emulator of the IBM PC and PC-compatibles
- PC8080, an 8080 machine emulator (see Space Invaders and the VT100 Terminal)
- C1Pjs, an emulation of the 6502-based Ohio Scientific Challenger 1P
- PDPjs, a set of machine emulation modules supporting the DEC PDP-10 and PDP-11
- PCjs Devices, for simple machines like the TI-57 Calculator, the Game of Life, and Lite-Brite
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.
![]()
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:
- A simple Node-based web server (server.js)
- Custom Node modules used by the web server (HTMLOut, MarkOut, DiskDump, FileDump)
- A variety of IBM PC and C1P configuration and resource files (see /apps, /devices and /disks)
- The PCx86, PC8080, and C1Pjs client applications, along with "compiled" versions
- A smattering of PCx86 and C1Pjs documentation, along with blog posts, related publications and more
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
