diff --git a/.gitignore b/.gitignore index 39790485aa..6eba22b57b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,7 @@ c64/ ecp/ projects/ private/ +restricted/ src/ tmp/ +unlisted/ diff --git a/Gruntfile.js b/Gruntfile.js index 2747f6bdfc..60593204e6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -108,7 +108,7 @@ module.exports = function(grunt) { * "<%= pkg.name %>" * * which would be fine for most of my needs, but some of the information I need - * from the package.json is not in string form (eg, pcJSFiles, which is an array of + * from the package.json is not in string form (eg, pcX86Files, which is an array of * file names). So I create a "pkg" variable first, which allows me to do both. */ @@ -117,14 +117,14 @@ module.exports = function(grunt) { * @property {string} name * @property {string} version * @property {Array.} c1pJSFiles - * @property {Array.} pcJSFiles + * @property {Array.} pcX86Files * @property {Array.} pc8080Files * @property {Array.} closureCompilerExterns */ var pkg = grunt.file.readJSON("package.json"); var tmpC1Pjs = "./tmp/c1pjs/" + pkg.version + "/c1p.js"; - var tmpPCjs = "./tmp/pcjs/" + pkg.version + "/pc.js"; + var tmpPCx86 = "./tmp/pcx86/" + pkg.version + "/pcx86.js"; var tmpPC8080 = "./tmp/pc8080/" + pkg.version + "/pc8080.js"; grunt.initConfig({ @@ -153,18 +153,18 @@ module.exports = function(grunt) { src: pkg.c1pJSFiles, dest: "./versions/c1pjs/" + pkg.version + "/c1p-dbg.js" }, - "pc.js": { - src: pkg.pcJSFiles, - dest: "./versions/pcjs/" + pkg.version + "/pc.js", + "pcx86.js": { + src: pkg.pcX86Files, + dest: "./versions/pcx86/" + pkg.version + "/pcx86.js", options: { process: function(src, filepath) { return (path.basename(filepath) == "debugger.js"? "" : src); } } }, - "pc-dbg.js": { - src: pkg.pcJSFiles, - dest: "./versions/pcjs/" + pkg.version + "/pc-dbg.js" + "pcx86-dbg.js": { + src: pkg.pcX86Files, + dest: "./versions/pcx86/" + pkg.version + "/pcx86-dbg.js" }, "pc8080.js": { src: pkg.pc8080Files, @@ -190,9 +190,9 @@ module.exports = function(grunt) { } } }, - "tmp-pcjs": { - src: pkg.pcJSFiles, - dest: tmpPCjs, + "tmp-pcx86": { + src: pkg.pcX86Files, + dest: tmpPCx86, options: { banner: '"use strict";\n\n', process: function(src, filepath) { @@ -225,9 +225,9 @@ module.exports = function(grunt) { src: pkg.c1pJSFiles, dest: tmpC1Pjs }, - "pc.js": { - src: pkg.pcJSFiles, - dest: tmpPCjs + "pcx86.js": { + src: pkg.pcX86Files, + dest: tmpPCx86 }, "pc8080.js": { src: pkg.pc8080Files, @@ -290,7 +290,7 @@ module.exports = function(grunt) { */ TEMPcompilerOpts: { // create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p.map", - define: ["\"APPNAME='C1Pjs'\"", "\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", + define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"], // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p.map\"" output_wrapper: "\"(function(){%output%})();\"" @@ -302,7 +302,7 @@ module.exports = function(grunt) { "c1p-dbg.js": { TEMPcompilerOpts: { // create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p-dbg.map", - define: ["\"APPNAME='C1Pjs'\"", "\"APPVERSION='" + pkg.version + "'\"", + define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"], // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" @@ -311,37 +311,37 @@ module.exports = function(grunt) { src: tmpC1Pjs, dest: "./versions/c1pjs/" + pkg.version + "/c1p-dbg.js" }, - "pc.js": { + "pcx86.js": { TEMPcompilerOpts: { - // create_source_map: "./tmp/pcjs/" + pkg.version + "/pc.map", - define: ["\"APPNAME='PCjs'\"", "\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", + // create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86.map", + define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcjs/" + pkg.version + "/pc.map\"" + // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86.map\"" output_wrapper: "\"(function(){%output%})();\"" }, - // src: pkg.pcJSFiles, - src: tmpPCjs, - dest: "./versions/pcjs/" + pkg.version + "/pc.js" + // src: pkg.pcX86Files, + src: tmpPCx86, + dest: "./versions/pcx86/" + pkg.version + "/pcx86.js" }, - "pc-dbg.js": { + "pcx86-dbg.js": { /* * Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit. */ TEMPcompilerOpts: { - // create_source_map: "./tmp/pcjs/" + pkg.version + "/pc-dbg.map", - define: ["\"APPNAME='PCjs'\"", "\"APPVERSION='" + pkg.version + "'\"", + // create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86-dbg.map", + define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcjs/" + pkg.version + "/pc-dbg.map\"" + // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" }, - // src: pkg.pcJSFiles, - src: tmpPCjs, - dest: "./versions/pcjs/" + pkg.version + "/pc-dbg.js" + // src: pkg.pcX86Files, + src: tmpPCx86, + dest: "./versions/pcx86/" + pkg.version + "/pcx86-dbg.js" }, "pc8080.js": { TEMPcompilerOpts: { // create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080.map", - define: ["\"APPNAME='PC8080'\"", "\"APPVERSION='" + pkg.version + "'\"", + define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"], // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080.map\"" output_wrapper: "\"(function(){%output%})();\"" @@ -356,7 +356,7 @@ module.exports = function(grunt) { */ TEMPcompilerOpts: { // create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080-dbg.map", - define: ["\"APPNAME='PC8080'\"", "\"APPVERSION='" + pkg.version + "'\"", + define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"], // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" @@ -402,19 +402,19 @@ module.exports = function(grunt) { } } }, - "pcjs": { + "pcx86": { files: [ { cwd: "modules/shared/templates/", src: ["common.css", "common.xsl", "components.*", "document.css", "document.xsl", "machine.xsl", "manifest.xsl", "outline.xsl"], - dest: "versions/pcjs/<%= pkg.version %>/", + dest: "versions/pcx86/<%= pkg.version %>/", expand: true } ], options: { process: function(content, srcPath) { var s = content.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); - s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/pcjs/' + pkg.version + '/$1"'); + s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/pcx86/' + pkg.version + '/$1"'); s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } @@ -443,9 +443,9 @@ module.exports = function(grunt) { "examples": { files: [ { - cwd: "versions/pcjs/<%= pkg.version %>/", - src: ["pc.js", "pc-dbg.js", "components.css", "components.xsl"], - dest: "docs/pcjs/examples/", + cwd: "versions/pcx86/<%= pkg.version %>/", + src: ["pcx86.js", "pcx86-dbg.js", "components.css", "components.xsl"], + dest: "docs/pcx86/examples/", expand: true } ], @@ -520,14 +520,14 @@ module.exports = function(grunt) { args: [] }, "zip-examples": { - options: {cwd: "docs/pcjs/examples"}, + options: {cwd: "docs/pcx86/examples"}, cmd: "./zip.sh", args: ["v" + pkg.version + ".zip"] } }, replace: { "fix-source-maps": { - src: ["./tmp/c1pjs/" + pkg.version + "/c1p*.map", "./tmp/pcjs/" + pkg.version + "/pc*.map"], + src: ["./tmp/c1pjs/" + pkg.version + "/c1p*.map", "./tmp/pcx86/" + pkg.version + "/pc*.map"], overwrite: true, replacements: [ { @@ -560,13 +560,13 @@ module.exports = function(grunt) { grunt.loadTasks("modules/grunts/prepjs/tasks"); - grunt.registerTask("preCompiler", grunt.option("rebuild")? ["concat:tmp-c1pjs", "concat:tmp-pcjs", "concat:tmp-pc8080"] : ["newer:concat:tmp-c1pjs", "newer:concat:tmp-pcjs", "newer:concat:tmp-pc8080"]); + grunt.registerTask("preCompiler", grunt.option("rebuild")? ["concat:tmp-c1pjs", "concat:tmp-pcx86", "concat:tmp-pc8080"] : ["newer:concat:tmp-c1pjs", "newer:concat:tmp-pcx86", "newer:concat:tmp-pc8080"]); grunt.registerTask("compile", ["preCompiler", "closureCompiler", "replace:fix-source-maps"]); grunt.registerTask('nocompile', function(target) { if (!target) { - grunt.task.run(["concat:c1p.js", "concat:c1p-dbg.js", "concat:pc.js", "concat:pc-dbg.js"]); + grunt.task.run(["concat:c1p.js", "concat:c1p-dbg.js", "concat:pcx86.js", "concat:pcx86-dbg.js"]); } else { grunt.task.run("concat:" + target); } diff --git a/README.md b/README.md index 32b46c1f31..da1a491e87 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,31 @@ -PCjs: The Virtual IBM PC +PCjs Machines === -Welcome to [PCjs](/docs/about/pcjs/), the first IBM PC simulation to run in your web browser without any plugins. -It was added to the [JavaScript Machines](/docs/about/) project in Fall 2012, and it is now part of the -[PCjs Project](https://github.com/jeffpar/pcjs) on GitHub. +Welcome to PCjs, home of [PCx86](/docs/pcx86/), the original IBM PC simulation written entirely JavaScript. It is +one of several JavaScript Machines in the [PCjs Project](https://github.com/jeffpar/pcjs), an open-source project that +includes: -The project includes the following web-based emulators: +* [PCx86](/docs/pcx86/), an x86-based IBM PC and PC-compatible emulator +* [PC8080](/modules/pc8080/), a 8080-based machine emulator (e.g., [Space Invaders](/devices/pc8080/machine/invaders/)) +* [C1Pjs](/docs/c1pjs/), a 6502-based emulation of the Ohio Scientific [Challenger 1P](/devices/c1p/) -* [PCjs](/docs/pcjs/), an x86-based IBM PC and PC-compatible emulator -* [PC8080](/modules/pc8080/), a 8080-based generic machine emulator -* [C1Pjs](/docs/c1pjs/), a 6502-based Ohio Scientific Challenger 1P emulator - -PCjs first simulated the 4.77Mhz 8088-based IBM PC, and has steadily evolved to support more classic x86 machines, -including the IBM PC XT, the 80286-based IBM PC AT, and the 80386-based COMPAQ DeskPro 386. PCjs fully supports -the original machine ROMs, video cards, etc, and all machines run at their original speeds. - -All the simulations are written entirely in [JavaScript](/modules/). No Flash, Java or other plugins are required. -Supported browsers include modern versions of Chrome, Safari, Firefox, Internet Explorer (v9.0 and up), Edge, +All PCjs computer simulations are written entirely in [JavaScript](/modules/). 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. -[Embedded IBM PC](/devices/pc/machine/5150/mda/64kb/ "PCjs:ibm5150") +[Embedded IBM PC](/devices/pcx86/machine/5150/mda/64kb/ "PCx86:ibm5150") + +The [JavaScript Machine](/devices/pcx86/machine/5150/mda/64kb/) above uses [PCx86](/docs/pcx86/) configured with an Intel +8088 running at 4.77Mhz, with 64Kb of RAM and an IBM Monochrome Display Adapter. For more control, there are also +[Control Panel](/devices/pcx86/machine/5150/mda/64kb/debugger/) and [Soft Keyboard](/devices/pcx86/machine/5150/mda/64kb/softkbd/) +configurations, featuring the built-in PCx86 Debugger. For even greater control, build your own PC. The +[PCx86 Documentation](/docs/pcx86/) will help you get started. -The [simulation](/devices/pc/machine/5150/mda/64kb/) above features an Intel 8088 running at 4.77Mhz, -with 64Kb of RAM and an IBM Monochrome Display Adapter. For more control, there are also -[Control Panel](/devices/pc/machine/5150/mda/64kb/debugger/) and [Soft Keyboard](/devices/pc/machine/5150/mda/64kb/softkbd/) -configurations, featuring the built-in PCjs Debugger. For even greater control, build your own PC. The -[PCjs Documentation](/docs/pcjs/) 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 [JavaScript Machines](/docs/about/) project are to create fast, full-featured simulations of classic +The goals of the [PCjs Project](/docs/about/) 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. @@ -35,27 +33,27 @@ Demos --- Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows, OS/2, and other assorted software. -![IBM PC running VisiCalc](/apps/pc/1981/visicalc/thumbnail.jpg "link:/apps/pc/1981/visicalc/:200:120") -![IBM PC running DONKEY.BAS](/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg "link:/devices/pc/machine/5150/cga/64kb/donkey/:200:120") -![IBM PC AT w/EGA, OS/2 1.0](/disks/pc/os2/ibm/1.0/thumbnail.jpg "link:/disks/pc/os2/ibm/1.0/:200:120") -![IBM PC XT w/CGA, Windows 1.01](/devices/pc/machine/5160/cga/256kb/win101/thumbnail.jpg "link:/devices/pc/machine/5160/cga/256kb/win101/:200:120") -![IBM PC XT w/EGA, Windows 1.01](/disks/pc/windows/1.01/thumbnail.jpg "link:/disks/pc/windows/1.01/:200:120") -![COMPAQ DeskPro 386, Windows/386](/disks/pc/windows/2.0x/thumbnail.jpg "link:/disks/pc/windows/2.0x/:200:120") -![IBM PC AT w/EGA, Windows 3.00](/disks/pc/windows/3.00/thumbnail.jpg "link:/disks/pc/windows/3.00/:200:120") -![IBM PC AT w/VGA, Windows 3.10](/disks/pc/windows/3.10/thumbnail.jpg "link:/disks/pc/windows/3.10/:200:120") -![COMPAQ DeskPro 386, Windows 95](/disks/pc/windows/win95/4.00.950/thumbnail.jpg "link:/disks/pc/windows/win95/4.00.950/:200:120") -![IBM PC w/MDA, CP/M-86](/disks/pc/cpm/1.1b/thumbnail.jpg "link:/disks/pc/cpm/1.1b/:200:120") -![IBM PC w/MDA, Microsoft Adventure](/disks/pc/games/microsoft/adventure/thumbnail.jpg "link:/disks/pc/games/microsoft/adventure/:200:120") -![IBM PC w/CGA, Zork I](/disks/pc/games/infocom/zork1/thumbnail.jpg "link:/disks/pc/games/infocom/zork1/:200:120") - -There are many more [PCjs Demos](/devices/pc/machine/#ready-to-run-app-demos), including an -[IBM PC with Dual Displays](/devices/pc/machine/5150/dual/64kb/) demonstrating early multi-monitor support, -and multiple IBM PC XT machines running side-by-side with [CGA Displays](/devices/pc/machine/5160/cga/256kb/array/) -and [EGA Displays](/devices/pc/machine/5160/ega/640kb/array/). +![IBM PC running VisiCalc](/apps/pcx86/1981/visicalc/thumbnail.jpg "link:/apps/pcx86/1981/visicalc/:200:120") +![IBM PC running DONKEY.BAS](/devices/pcx86/machine/5150/cga/64kb/donkey/thumbnail.jpg "link:/devices/pcx86/machine/5150/cga/64kb/donkey/:200:120") +![IBM PC AT w/EGA, OS/2 1.0](/disks/pcx86/os2/ibm/1.0/thumbnail.jpg "link:/disks/pcx86/os2/ibm/1.0/:200:120") +![IBM PC XT w/CGA, Windows 1.01](/devices/pcx86/machine/5160/cga/256kb/win101/thumbnail.jpg "link:/devices/pcx86/machine/5160/cga/256kb/win101/:200:120") +![IBM PC XT w/EGA, Windows 1.01](/disks/pcx86/windows/1.01/thumbnail.jpg "link:/disks/pcx86/windows/1.01/:200:120") +![COMPAQ DeskPro 386, Windows/386](/disks/pcx86/windows/2.0x/thumbnail.jpg "link:/disks/pcx86/windows/2.0x/:200:120") +![IBM PC AT w/EGA, Windows 3.00](/disks/pcx86/windows/3.00/thumbnail.jpg "link:/disks/pcx86/windows/3.00/:200:120") +![IBM PC AT w/VGA, Windows 3.10](/disks/pcx86/windows/3.10/thumbnail.jpg "link:/disks/pcx86/windows/3.10/:200:120") +![COMPAQ DeskPro 386, Windows 95](/disks/pcx86/windows/win95/4.00.950/thumbnail.jpg "link:/disks/pcx86/windows/win95/4.00.950/:200:120") +![IBM PC w/MDA, CP/M-86](/disks/pcx86/cpm/1.1b/thumbnail.jpg "link:/disks/pcx86/cpm/1.1b/:200:120") +![IBM PC w/MDA, Microsoft Adventure](/disks/pcx86/games/microsoft/adventure/thumbnail.jpg "link:/disks/pcx86/games/microsoft/adventure/:200:120") +![IBM PC w/CGA, Zork I](/disks/pcx86/games/infocom/zork1/thumbnail.jpg "link:/disks/pcx86/games/infocom/zork1/:200:120") + +There are many more [PCx86 Demos](/devices/pcx86/machine/#ready-to-run-app-demos), including an +[IBM PC with Dual Displays](/devices/pcx86/machine/5150/dual/64kb/) demonstrating early multi-monitor support, +and multiple IBM PC XT machines running side-by-side with [CGA Displays](/devices/pcx86/machine/5160/cga/256kb/array/) +and [EGA Displays](/devices/pcx86/machine/5160/ega/640kb/array/). C1Pjs --- -Below is the [OSI Challenger C1P](/docs/c1pjs/), another simulation in the JavaScript Machines project. +Below is the [OSI Challenger C1P](/docs/c1pjs/), 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](/docs/c1pjs/). @@ -69,8 +67,8 @@ Developer Notes --- The [PCjs repository](https://github.com/jeffpar/pcjs) on GitHub contains everything needed to run PCjs -computer simulations. The [PCjs](/docs/pcjs/) and [C1Pjs](/docs/c1pjs/) emulators run in any modern web browser, -with or without a web server, and examples are provided for both [local](/docs/pcjs/examples/) and +computer simulations. The [PCx86](/docs/pcx86/) and [C1Pjs](/docs/c1pjs/) emulators run in any modern web browser, +with or without a web server, and examples are provided for both [local](/docs/pcx86/examples/) and [remote](http://www.pcjs.org/) operation. The project includes: @@ -78,8 +76,8 @@ The project includes: - A simple Node-based web server ([server.js](server.js)) - Custom Node modules used by the web server ([HTMLOut](modules/htmlout/), [MarkOut](modules/markout/), [DiskDump](modules/diskdump/), [FileDump](modules/filedump/)) - A variety of IBM PC and C1P configuration and resource files (see [/apps](apps/), [/devices](devices/) and [/disks](disks/)) -- The [PCjs](modules/pcjs/lib/) and [C1Pjs](modules/c1pjs/lib/) client applications, both "compiled" and uncompiled -- A smattering of [PCjs](docs/pcjs/) and [C1Pjs](docs/c1pjs/) documentation, along with [blog posts](blog/), related [publications](pubs/) and more +- The [PCx86](modules/pcjs/lib/) and [C1Pjs](modules/c1pjs/lib/) client applications, both "compiled" and uncompiled +- A smattering of [PCx86](docs/pcx86/) and [C1Pjs](docs/c1pjs/) documentation, along with [blog posts](blog/), related [publications](pubs/) 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. @@ -87,7 +85,7 @@ JavaScript files to your browser will work. However, instructions for doing tha 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 -[Demos](/docs/pcjs/examples/)), your browser will probably be unable to load all of them, due to security restrictions. +[Demos](/docs/pcx86/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](modules/diskdump/) utility that @@ -180,8 +178,8 @@ OS X users may also need to preface this command with `sudo`: Now you can run `grunt` anywhere within the PCjs project to build an updated version. If no command-line arguments are specified, `grunt` runs the "default" task defined by [Gruntfile.js](Gruntfile.js); that task runs Google's -[Closure Compiler](https://developers.google.com/closure/compiler/) if any of the target files (eg, pc.js or pc-dbg.js -in the [/versions](versions/) directory) are out-of date. +[Closure Compiler](https://developers.google.com/closure/compiler/) if any of the target files (eg, pcx86.js or +pcx86-dbg.js in the [/versions](versions/) directory) are out-of date. To ensure consistent compilation results, a copy of the Closure Compiler has been checked into the [/bin](bin/) folder. This version of Closure Compiler, in turn, requires Java v7 or later. Use the following @@ -234,10 +232,10 @@ pcjs.org home page ([index.md](index.md)): layout: page permalink: / machines: - - type: pc + - type: pcx86 id: ibm5150 name: "IBM PC (Model 5150) with Monochrome Display" - config: /devices/pc/machine/5150/mda/64kb/machine.xml + config: /devices/pcx86/machine/5150/mda/64kb/machine.xml - type: c1p id: demoC1P config: /devices/c1p/machine/8kb/large/machine.xml @@ -254,43 +252,43 @@ For more information on all the machine options supported in a Markdown file, se ### From The Command-Line -The PCjs client app can also be run from the command-line mode using Node, making it possible to script the application, +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/pcjs/bin - node pcjs + cd modules/pcx86/bin + node pcx86 -The [pcjs](modules/pcjs/bin/pcjs) script in [modules/pcjs/bin](modules/pcjs/bin) loads -all the PCjs browser scripts listed in the root [package.json](/package.json) and then starts a Node REPL +The [pcx86](modules/pcx86/bin/pcx86) script in [modules/pcx86/bin](modules/pcx86/bin) loads +all the PCx86 browser scripts listed in the root [package.json](/package.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 PCjs Debugger component. If no Debugger component has been created yet, or if the Debugger didn't recognize +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](modules/pcjs/bin/ibm5150.json) is provided in the *bin* directory, which is a "JSON-ified" version -of the [machine.xml](devices/pc/machine/5150/mda/64kb/machine.xml) displayed on the [pcjs.org](http://www.pcjs.org/) +[ibm5150.json](modules/pcx86/bin/ibm5150.json) is provided in the *bin* directory, which is a "JSON-ified" version +of the [machine.xml](devices/pcx86/machine/5150/mda/64kb/machine.xml) displayed on the [pcjs.org](http://www.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 pcjs --cmd="load ibm5150.json" + 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 PCjs 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 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 PCjs is run from the command-line, there is no XML, HTML, or DIVs involved; this is basically a "headless" version -of PCjs, so there is no simple way to view a machine's video display or interact with its keyboard, mouse, etc. -You have to use Debugger commands to dump the machine's video buffer. +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 on the client supports *only* XML machine configuration files, whereas PCjs on the server -supports *only* JSON machine configuration files. +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. @@ -327,7 +325,7 @@ A complete list of command-line options can be found in [server.js](server.js). ### Client Components -A special command parameter ("gort") can be appended to the URL to request uncompiled client source files, making PCjs +A special command parameter ("gort") can be appended to the URL to request uncompiled client source files, making PCx86 and C1Pjs much easier to debug, albeit much slower: http://localhost:8088/?gort=debug @@ -335,7 +333,7 @@ and C1Pjs much easier to debug, albeit much slower: 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 PCjs, use: +Conversely, if the server is in debug mode but you want to test a compiled version of PCx86, use: http://localhost:8088/?gort=release @@ -373,7 +371,7 @@ To start developing features for a new version of PCjs, here are the recommended 1. Change the version number in the root [package.json](package.json) and [_config.yml](_config.yml) 2. Run the "grunt promote" task to bump the version in all the machine XML files 3. Make changes -4. Run "grunt" to build new versions of the apps (eg, "/versions/pcjs/1.x.x/pc.js") +4. Run "grunt" 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](http://www.pcjs.org/blog/2014/09/30/). @@ -403,7 +401,7 @@ manually or with the Grunt "clean" task: License --- -The [PCjs Project](https://github.com/jeffpar/pcjs) is now an open source project on [GitHub](http://github.com/). +The [PCjs Project](https://github.com/jeffpar/pcjs) is now an open-source project on [GitHub](http://github.com/). All published portions are free for redistribution and/or modification under the terms of the [GNU General Public License](/LICENSE) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. @@ -419,8 +417,8 @@ See [LICENSE](/LICENSE) for details. More Information --- -Learn more about the [JavaScript Machines](/docs/about/) Project and [PCjs](/docs/about/pcjs/). To -create your own PCjs machines, see the [Documentation](/docs/pcjs/) for details. +Learn more about the [PCjs Project](/docs/about/) and [PCx86](/docs/about/pcx86/). To +create your own PCx86 machines, see the [PCx86 Documentation](/docs/pcx86/) for details. If you have questions or run into any problems, feel free to [tweet](http://twitter.com/jeffpar) or [email](mailto:Jeff@pcjs.org). diff --git a/_config.yml b/_config.yml index e20d5469e0..57944ce9a8 100644 --- a/_config.yml +++ b/_config.yml @@ -1,13 +1,12 @@ # Site settings -title: "PCjs: The Virtual IBM PC" +title: "PCjs Machines" email: Jeff@pcjs.org description: > - PCjs: The Original IBM PC in a Browser. - Classic computer simulations in JavaScript. + PCjs: Home of the original IBM PC emulator in a browser. + Classic computer simulations in JavaScript, including the IBM PC and other x86-based machines, 6502-based + machines such as the Ohio Scientific Challenger 1P, and 8080-based machines such as Space Invaders. Includes an archive of historical PC software and publications. - Additional computer simulations in JavaScript include the 6502-based Ohio Scientific Challenger 1P and 8080-based - machines, including arcade machines such as Space Invaders. baseurl: "" # "/pcjs" when using http://jeffpar.github.io or "" when using http://www.pcjs.org url: "http://www.pcjs.org" # "http://jeffpar.github.io" or "http://www.pcjs.org" twitter_username: jeffpar @@ -33,52 +32,9 @@ gems: pcjs: domain: pcjs.org # whereas site.url is used for linking purposes, site.pcjs.domain is used for display purposes - version: 1.22.1 # IMPORTANT: keep pcjs.version in sync with package.json:version - compiled: true # by default, the compiled pcjs.version scripts will be used (eg, pc.js or pc-dbg.js) - pc_scripts: # if pcjs.compiled is false, the following scripts will be included instead, in the order listed - - /modules/shared/lib/defines.js - - /modules/shared/lib/nodebug.js - - /modules/shared/lib/diskapi.js - - /modules/shared/lib/dumpapi.js - - /modules/shared/lib/reportapi.js - - /modules/shared/lib/userapi.js - - /modules/shared/lib/strlib.js - - /modules/shared/lib/usrlib.js - - /modules/shared/lib/weblib.js - - /modules/shared/lib/component.js - - /modules/pcjs/lib/defines.js - - /modules/pcjs/lib/x86.js - - /modules/pcjs/lib/interrupts.js - - /modules/pcjs/lib/messages.js - - /modules/pcjs/lib/panel.js - - /modules/pcjs/lib/bus.js - - /modules/pcjs/lib/memory.js - - /modules/pcjs/lib/cpu.js - - /modules/pcjs/lib/x86seg.js - - /modules/pcjs/lib/x86cpu.js - - /modules/pcjs/lib/x86fpu.js - - /modules/pcjs/lib/x86func.js - - /modules/pcjs/lib/x86help.js - - /modules/pcjs/lib/x86mods.js - - /modules/pcjs/lib/x86ops.js - - /modules/pcjs/lib/x86op0f.js - - /modules/pcjs/lib/chipset.js - - /modules/pcjs/lib/rom.js - - /modules/pcjs/lib/ram.js - - /modules/pcjs/lib/keyboard.js - - /modules/pcjs/lib/video.js - - /modules/pcjs/lib/parallelport.js - - /modules/pcjs/lib/serialport.js - - /modules/pcjs/lib/mouse.js - - /modules/pcjs/lib/disk.js - - /modules/pcjs/lib/fdc.js - - /modules/pcjs/lib/hdc.js - - /modules/pcjs/lib/debugger.js - - /modules/pcjs/lib/state.js - - /modules/pcjs/lib/computer.js - - /modules/shared/lib/embed.js - - /modules/shared/lib/save.js - c1p_scripts: + version: 1.23.0 # IMPORTANT: keep pcjs.version in sync with package.json:version + compiled: true # by default, the compiled pcjs.version scripts will be used (eg, pcx86.js or pcx86-dbg.js) + c1p_scripts: # if pcjs.compiled is false, the following scripts will be included instead, in the order listed - /modules/shared/lib/defines.js - /modules/shared/lib/nodebug.js - /modules/shared/lib/dumpapi.js @@ -99,6 +55,49 @@ pcjs: - /modules/c1pjs/lib/debugger.js - /modules/c1pjs/lib/computer.js - /modules/shared/lib/embed.js + pcx86_scripts: + - /modules/shared/lib/defines.js + - /modules/shared/lib/nodebug.js + - /modules/shared/lib/diskapi.js + - /modules/shared/lib/dumpapi.js + - /modules/shared/lib/reportapi.js + - /modules/shared/lib/userapi.js + - /modules/shared/lib/strlib.js + - /modules/shared/lib/usrlib.js + - /modules/shared/lib/weblib.js + - /modules/shared/lib/component.js + - /modules/pcx86/lib/defines.js + - /modules/pcx86/lib/x86.js + - /modules/pcx86/lib/interrupts.js + - /modules/pcx86/lib/messages.js + - /modules/pcx86/lib/panel.js + - /modules/pcx86/lib/bus.js + - /modules/pcx86/lib/memory.js + - /modules/pcx86/lib/cpu.js + - /modules/pcx86/lib/x86seg.js + - /modules/pcx86/lib/x86cpu.js + - /modules/pcx86/lib/x86fpu.js + - /modules/pcx86/lib/x86func.js + - /modules/pcx86/lib/x86help.js + - /modules/pcx86/lib/x86mods.js + - /modules/pcx86/lib/x86ops.js + - /modules/pcx86/lib/x86op0f.js + - /modules/pcx86/lib/chipset.js + - /modules/pcx86/lib/rom.js + - /modules/pcx86/lib/ram.js + - /modules/pcx86/lib/keyboard.js + - /modules/pcx86/lib/video.js + - /modules/pcx86/lib/parallelport.js + - /modules/pcx86/lib/serialport.js + - /modules/pcx86/lib/mouse.js + - /modules/pcx86/lib/disk.js + - /modules/pcx86/lib/fdc.js + - /modules/pcx86/lib/hdc.js + - /modules/pcx86/lib/debugger.js + - /modules/pcx86/lib/state.js + - /modules/pcx86/lib/computer.js + - /modules/shared/lib/embed.js + - /modules/shared/lib/save.js pc8080_scripts: - /modules/shared/lib/defines.js - /modules/shared/lib/dumpapi.js diff --git a/_includes/machine-engines.html b/_includes/machine-engines.html index 957fccc6ee..f35dc82903 100644 --- a/_includes/machine-engines.html +++ b/_includes/machine-engines.html @@ -5,7 +5,7 @@ 'id' (eg, "ibm5150") 'name' (eg, "IBM PC (Model 5150) with Monochrome Display") - 'type' (eg. "c1p", "pc", "pc8080") + 'type' (eg, "c1p", "pcx86", "pc8080") 'debugger' (default is false) 'config' (default is "machine.xml") 'template' (default is "machine.xsl") @@ -34,17 +34,23 @@ {% endcomment %} {% for machine in page.machines %} {% capture machine_type %}{{ machine.type | remove:"-dbg" }}{% endcapture %} - {% if machine_type != "pc" and machine_type != "c1p" %} - {% capture machine_app %}{{ machine_type }}{% endcapture %} - {% else %} - {% capture machine_app %}{{ machine_type }}js{% endcapture %} + {% if machine_type != "c1p" %} + {% capture machine_app %}{{ machine_type }}{% endcapture %} + {% else %} + {% capture machine_app %}{{ machine_type }}js{% endcapture %} {% endif %} {% if machine.debugger %} {% capture machine_file %}{{ machine_type }}-dbg{% endcapture %} + {% assign machine_debugger = true %} {% else %} {% capture machine_file %}{{ machine.type }}{% endcapture %} + {% if machine.type != machine_type %} + {% assign machine_debugger = true %} + {% else %} + {% assign machine_debugger = false %} + {% endif %} {% endif %} - {% capture machine_embed %}embed{{ machine_type | upcase }}{% endcapture %} + {% capture machine_embed %}embed{{ machine_type | upcase | replace:"X86","x86" }}{% endcapture %} {% if machine.automount != nil %} {% if machine.automount == "" %} {% assign machine_autoMount = "{}" %} @@ -103,7 +109,7 @@ {% endif %} {% else %} {% if machine_type == "c1p" %}{% assign array_scripts = site.pcjs.c1p_scripts %}{% endif %} - {% if machine_type == "pc" %}{% assign array_scripts = site.pcjs.pc_scripts %}{% endif %} + {% if machine_type == "pcx86" %}{% assign array_scripts = site.pcjs.pcx86_scripts %}{% endif %} {% if machine_type == "pc8080" %}{% assign array_scripts = site.pcjs.pc8080_scripts %}{% endif %} {% for script in array_scripts %} {% if script != "/modules/shared/lib/nodebug.js" or machine.debug != true %} @@ -116,7 +122,7 @@ {% endif %} {% endif %} {% if script contains "js/lib/defines.js" %} - {% if machine.debugger != true %} + {% if machine_debugger != true %} {{ machine_script | replace:"defines.js","nodebugger.js" }} {% endif %} {% endif %} diff --git a/_includes/machine-styles.html b/_includes/machine-styles.html index 9c16c60986..1f5ba10e06 100644 --- a/_includes/machine-styles.html +++ b/_includes/machine-styles.html @@ -1,12 +1,12 @@ {% for machine in page.machines %} {% capture machine_type %}{{ machine.type | remove:"-dbg" }}{% endcapture %} - {% if machine_type != "pc" and machine_type != "c1p" %} + {% if machine_type != "c1p" %} {% capture machine_app %}{{ machine_type }}{% endcapture %} {% else %} {% capture machine_app %}{{ machine_type }}js{% endcapture %} {% endif %} {% unless site.pcjs.compiled == true and machine.uncompiled != true %} - {% if machine_app != "c1pjs" %} + {% if machine_type != "c1p" %} {% capture machine_style %}{{ site.baseurl }}/modules/shared/templates/components.css{% endcapture %} {% else %} {% capture machine_style %}{{ site.baseurl }}/modules/{{ machine_app }}/templates/components.css{% endcapture %} diff --git a/_posts/2013-11-20-a-blog-thats-not-a-blog.md b/_posts/2013-11-20-a-blog-thats-not-a-blog.md index c9ecd7ee31..ac6a736773 100644 --- a/_posts/2013-11-20-a-blog-thats-not-a-blog.md +++ b/_posts/2013-11-20-a-blog-thats-not-a-blog.md @@ -26,7 +26,7 @@ syntax, which is more than sufficient to handle all the site's **README.md** fil have used a third-party Markdown library, but this was more educational, and it was easy to add extra features, like the ability to embed JavaScript machines with a single Markdown-style link; eg: - [IBM PC](/devices/pc/machine/5150/mda/64kb/ "PCjs:ibm5150") + [IBM PC](/devices/pcx86/machine/5150/mda/64kb/ "PCjs:ibm5150") The script takes care of the rest, adding the appropriate stylesheets and PCjs scripts automatically. @@ -34,7 +34,7 @@ I had more grandiose plans, including a command-line prompt written in JavaScrip navigate the site exactly as you would an IBM PC hard drive from a "DOS prompt", and I may try something like that later, but don't hold your breath. -I've tried to improve the organization of all the [Machine Configuration Files](/devices/pc/machine/) as well. +I've tried to improve the organization of all the [Machine Configuration Files](/devices/pcx86/machine/) as well. The variety of configurations was getting out of hand. It's a bit tidier now, but there's still room for improvement. diff --git a/_posts/2014-03-30-running-on-azure.md b/_posts/2014-03-30-running-on-azure.md index 4080b0c64c..02521f5ec1 100644 --- a/_posts/2014-03-30-running-on-azure.md +++ b/_posts/2014-03-30-running-on-azure.md @@ -21,7 +21,7 @@ while I can understand some whitespace inconsistencies across web servers, I wou on the server to modify file contents. I finally confirmed that the files were indeed modified on the server, by using Azure's FTP browser. For example, -[us83-buttons-minimal.xml](/devices/pc/keyboard/us83-buttons-minimal.xml) is currently 622 bytes locally, but on the +[us83-buttons-minimal.xml](/devices/pcx86/keyboard/us83-buttons-minimal.xml) is currently 622 bytes locally, but on the Azure server, the reported size is 632 bytes -- one extra CR for each of the file's 10 lines. After a little more digging, I [learned something new](http://git-scm.com/book/ch7-1.html#Formatting-and-Whitespace) about **Git**: it has a setting called `core.autocrlf` which, for me on OS X, defaults to `input` (meaning "convert CR/LF to LF on commit diff --git a/_posts/2014-04-12-whats-new-in-1.13.0.md b/_posts/2014-04-12-whats-new-in-1.13.0.md index 85c20c9014..811ca40115 100644 --- a/_posts/2014-04-12-whats-new-in-1.13.0.md +++ b/_posts/2014-04-12-whats-new-in-1.13.0.md @@ -11,7 +11,7 @@ are simple XML files that describe a piece of software (an application, an opera link to a PCjs machine configuration capable of running the software, along with a "ready-to-run" machine state file. Conversely, a PCjs machine XML file can refer back to the manifest, to obtain a list of disk images. -Here are some [demos](/apps/pc/) of "ready-to-run" apps on [PCjs](/docs/about/pcjs/). +Here are some [Demos](/apps/pc/) of "ready-to-run" apps on [PCjs](/docs/about/). There have been lots of server-side changes recently, including API improvements that make it easy (well, *easier*) to dynamically create diskette images from a list of files, or even an entire folder (including all subfolders), diff --git a/_posts/2014-04-14-node-express-safari.md b/_posts/2014-04-14-node-express-safari.md index 6a901db3dd..d9f395245c 100644 --- a/_posts/2014-04-14-node-express-safari.md +++ b/_posts/2014-04-14-node-express-safari.md @@ -13,7 +13,7 @@ Don't believe me? Just ask [Google](https://www.google.com/#q=node+express+safa stylesheets. And occasionally Safari -- and ONLY Safari -- will render those XML files as blank pages. For example, here's the -[machine.xml](/devices/pc/machine/5150/mda/64kb/machine.xml) file that's also embedded on the +[machine.xml](/devices/pcx86/machine/5150/mda/64kb/machine.xml) file that's also embedded on the [{{ site.pcjs.domain }}]({{ site.url }}/) home page. When Safari fetched that XML file from an Apache web server (what I used before switching to Node), diff --git a/_posts/2014-06-26-more-under-the-hood-changes.md b/_posts/2014-06-26-more-under-the-hood-changes.md index 09fd6deae3..e6d718aa90 100644 --- a/_posts/2014-06-26-more-under-the-hood-changes.md +++ b/_posts/2014-06-26-more-under-the-hood-changes.md @@ -10,7 +10,7 @@ v1.13.7 of PCjs contains a few minor improvements, mostly in terms of rendering efficiently. The rest of the changes to the website involved beefing up support for both "software manifests" and "document manifests." -To that end, there's a new [/pubs/](/pubs/) directory for old documents, and [/disks/pc/](/disks/pc/) contains +To that end, there's a new [/pubs/](/pubs/) directory for old documents, and [/disks/pcx86/](/disks/pcx86/) contains more disk images, with more on the way. I have a TON of old diskette images, and it has taken more time to organize them and create manifests than I would like. diff --git a/_posts/2014-07-30-ega-support.md b/_posts/2014-07-30-ega-support.md index 0018303f47..2425209e2a 100644 --- a/_posts/2014-07-30-ega-support.md +++ b/_posts/2014-07-30-ega-support.md @@ -7,14 +7,16 @@ permalink: /blog/2014/07/30/ --- PCjs v1.14.0 now includes basic EGA support. It emulates the EGA hardware well enough to pass the IBM EGA BIOS -diagnostics and run [Windows 1.01](/devices/pc/machine/5160/ega/640kb/win101/) in color. Check out our -[Windows 1.01 "Server Array"](/devices/pc/machine/5160/ega/640kb/array/) demo. +diagnostics and run [Windows 1.01](/devices/pcx86/machine/5160/ega/640kb/win101/) in color. Check out our +[Windows 1.01 "Server Array"](/devices/pcx86/machine/5160/ega/640kb/array/) demo. [Windows 1.01 "Server Array" Demo](/blog/images/win101-array-demo.jpg) EGA support is added to a **machine.xml** file using two XML elements; eg: -