diff --git a/.editorconfig b/.editorconfig index 0c0dd7fa1..54208b256 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ indent_style = tab indent_size = 8 trim_trailing_whitespace = true -[my_modules/**.js] +[modules/**.js] indent_style = space indent_size = 4 trim_trailing_whitespace = true diff --git a/Gruntfile.js b/Gruntfile.js index 859fee074..4b9860fbc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -77,7 +77,7 @@ * I added the "prepjs" task to perform the same constant inlining that my old PHP script "inline.php" * used to do as part of the old "jsmachines.net" build process. Unfortunately, Grunt appears to be * a real memory hog, and so "prepjs" had to be disabled until I could resolve that issue (see my notes - * in "my_modules/grunts/prepjs/tasks/prepjs.js" for details). + * in "modules/grunts/prepjs/tasks/prepjs.js" for details). * * With the current version of the Closure Compiler, I don't see any measurable performance benefit * to doing my own inlining, but I still wanted to port the code, partly in case I discover some benefit @@ -312,7 +312,7 @@ module.exports = function(grunt) { "c1pxsl": { files: [ { - cwd: "./my_modules/shared/templates/", + cwd: "./modules/shared/templates/", src: ["common.css", "common.xsl", "document.css", "document.xsl", "machine.xsl", "manifest.xsl", "outline.xsl"], dest: "versions/c1pjs/<%= pkg.version %>/", expand: true @@ -330,7 +330,7 @@ module.exports = function(grunt) { "pcxsl": { files: [ { - cwd: "./my_modules/shared/templates/", + cwd: "./modules/shared/templates/", src: ["common.css", "common.xsl", "document.css", "document.xsl", "machine.xsl", "manifest.xsl", "outline.xsl"], dest: "versions/pcjs/<%= pkg.version %>/", expand: true @@ -348,7 +348,7 @@ module.exports = function(grunt) { "c1pjs": { files: [ { - cwd: "./my_modules/c1pjs-client/templates/", + cwd: "./modules/c1pjs/templates/", src: ["components.*"], dest: "versions/c1pjs/<%= pkg.version %>/", expand: true @@ -365,7 +365,7 @@ module.exports = function(grunt) { "pcjs": { files: [ { - cwd: "./my_modules/pcjs-client/templates/", + cwd: "./modules/pcjs/templates/", src: ["components.*"], dest: "versions/pcjs/<%= pkg.version %>/", expand: true @@ -398,7 +398,7 @@ module.exports = function(grunt) { run: { "delete-indexes": { options: {cwd: "."}, - cmd: "./my_modules/htmlout/bin/delete_indexes.sh", + cmd: "./modules/htmlout/bin/delete_indexes.sh", args: [] }, "zipify-demos": { @@ -438,8 +438,8 @@ module.exports = function(grunt) { grunt.loadNpmTasks("grunt-run"); grunt.loadNpmTasks("grunt-text-replace"); - grunt.loadTasks("my_modules/grunts/manifester/tasks"); - grunt.loadTasks("my_modules/grunts/prepjs/tasks"); + grunt.loadTasks("modules/grunts/manifester/tasks"); + grunt.loadTasks("modules/grunts/prepjs/tasks"); grunt.registerTask("preCompiler", grunt.option("rebuild")? ["concat:tmp-c1pjs", "concat:tmp-pcjs"] : ["newer:concat:tmp-c1pjs", "newer:concat:tmp-pcjs"]); diff --git a/README.md b/README.md index 3e1f979a8..3dafc5533 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,9 @@ operation. The project includes: - A simple Node-based web server ([server.js](server.js)) -- Custom Node modules used by the web server ([HTMLOut](my_modules/htmlout/), [MarkOut](my_modules/markout/), [DiskDump](my_modules/diskdump/), [FileDump](my_modules/filedump/)) +- 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](my_modules/pcjs-client/lib/) and [C1Pjs](my_modules/c1pjs-client/lib/) client applications, both "compiled" and uncompiled +- 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 bundled web server is not strictly required. Any web server (Node, Apache, Nginx, etc) that can serve the necessary @@ -77,7 +77,7 @@ included in the project, but unless all the resource files are moved into a sing [Demos](/docs/pcjs/demos/)), 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](my_modules/diskdump/) utility that +The project includes a large selection of disk images, and a powerful [DiskDump](modules/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). @@ -189,7 +189,7 @@ Using PCjs The PCjs 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 server loads an HTML -template ([common.html](my_modules/shared/templates/common.html)) and generates an "index.html" for that folder. +template ([common.html](modules/shared/templates/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 file is converted to HTML and embedded in the "index.html". Similarly, if the folder @@ -200,16 +200,16 @@ contains a machine XML file, that is embedded as well. The PCjs 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 my_modules/pcjs-client/bin + cd modules/pcjs/bin node pcjs -The [pcjs](my_modules/pcjs-client/bin/pcjs) script in [my_modules/pcjs-client/bin](my_modules/pcjs-client/bin) loads +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 ("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 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 [machine.json](my_modules/pcjs-client/bin/machine.json) +Use the "load" command to load a JSON machine configuration file. A sample [machine.json](modules/pcjs/bin/machine.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](/) home page. @@ -242,7 +242,7 @@ Debugging PCjs ### Server Components -To help test/debug changes to PCjs server components (eg, [DiskDump](my_modules/diskdump/), [HTMLOut](my_modules/htmlout/)), +To help test/debug changes to PCjs server components (eg, [DiskDump](modules/diskdump/), [HTMLOut](modules/htmlout/)), you can start the server with some additional options; eg: node server.js --logging --console --debug @@ -320,14 +320,14 @@ closer to being released. 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 my_modules/shared/templates/common.html + touch modules/shared/templates/common.html -The [HTMLOut](my_modules/htmlout/) module compares the timestamp of that template file to the timestamp of any +The [HTMLOut](modules/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](my_modules/shared/templates/common.html) template, or delete all existing "index.html" files, either +[common.html](modules/shared/templates/common.html) template, or delete all existing "index.html" files, either manually or with the Grunt "clean" task: grunt clean diff --git a/bin/README.md b/bin/README.md index c83093279..fc8080cfb 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,12 +1,12 @@ Build Tools --- This is where all the server-side PHP code used to reside. I've since deleted that code from the project, -because it's all been ported to JavaScript as a collection of [Node Modules](/my_modules/); e.g.: +because it's all been ported to JavaScript as a collection of [Node Modules](/modules/); e.g.: -- [HTMLOut](/my_modules/htmlout/) -- [MarkOut](/my_modules/markout/) -- [DiskDump](/my_modules/diskdump/) -- [FileDump](/my_modules/filedump/) +- [HTMLOut](/modules/htmlout/) +- [MarkOut](/modules/markout/) +- [DiskDump](/modules/diskdump/) +- [FileDump](/modules/filedump/) All that remains here is the version of Google's Closure Compiler (and its associated [README](README)) used to build the client-side JavaScript files -- not because I have any attachment to this particular version, but because diff --git a/blog/2014/09/30/README.md b/blog/2014/09/30/README.md index 91bb17efe..075864342 100644 --- a/blog/2014/09/30/README.md +++ b/blog/2014/09/30/README.md @@ -83,7 +83,7 @@ define class constants. While we're talking about constants, it's important to be aware of constants that are not scoped to any particular component. -In [/my_modules/shared/lib/defines.js](/my_modules/shared/lib/defines.js), **DEBUG** is set to **TRUE**, +In [/modules/shared/lib/defines.js](/modules/shared/lib/defines.js), **DEBUG** is set to **TRUE**, enabling all debug-only code by default. It is also declared as a *@define* so that the Closure Compiler can override it, setting it to **FALSE** and disabling debug-only code. @@ -101,8 +101,8 @@ However, calls to debug-only instance methods seem to be more problematic, so al if (DEBUG) this.log('load("' + sFileURL + '")'); -There are a number of other important shared constants in [/my_modules/shared/lib/defines.js](/my_modules/shared/lib/defines.js) -and PCjs-specific constants in [/my_modules/pcjs-client/lib/defines.js](/my_modules/pcjs-client/lib/defines.js); refer +There are a number of other important shared constants in [/modules/shared/lib/defines.js](/modules/shared/lib/defines.js) +and PCjs-specific constants in [/modules/pcjs/lib/defines.js](/modules/pcjs/lib/defines.js); refer to those files for more information. ### Braces and Parentheses diff --git a/blog/2014/10/17/README.md b/blog/2014/10/17/README.md index 9c320c604..e085c9456 100644 --- a/blog/2014/10/17/README.md +++ b/blog/2014/10/17/README.md @@ -5,12 +5,12 @@ The [IBM PC AT "Rev 3"](/devices/pc/machine/5170/ega/1152kb/rev3/) machine confi v1.15.5 of PCjs now, which includes the following fixes: + The BIOS expects memory refresh to occur roughly every 16us, which I've resolved by tying the state -of the refresh bit in port 0x61 to bit 6 of the CPU cycle count (see *in8042RWReg()* in [chipset.js](/my_modules/pcjs-client/lib/chipset.js)); +of the refresh bit in port 0x61 to bit 6 of the CPU cycle count (see *in8042RWReg()* in [chipset.js](/modules/pcjs/lib/chipset.js)); the original AT BIOS was satisfied with a refresh bit that merely alternated, whereas the new AT BIOS is much more particular about the rate at which that bit changes, since many hard-coded delay-loops have now been replaced with code that waits for a specific number of refresh cycles. + The 8042 Keyboard Controller emulation needed a few more tweaks, mainly with respect to what happens -when the keyboard's "clock" line is toggled (see *set8042CmdData()* in [chipset.js](/my_modules/pcjs-client/lib/chipset.js)). +when the keyboard's "clock" line is toggled (see *set8042CmdData()* in [chipset.js](/modules/pcjs/lib/chipset.js)). + The Floppy Disk Controller needed to add support for the "READ ID" command, in order for the BIOS "double-stepping" test to work (double-stepping is required on an 80-track drive when attempting to read a 40-track diskette). @@ -23,7 +23,7 @@ with a BIOS that's almost 30 years old. after installing a second hard drive. So, when the CMOS reports only one hard drive installed, the BIOS probes for a second hard drive anyway, and it does so by simply writing the drive number to the ATC's "DRVHD" register and then immediately reading the "STATUS" register, without issuing any intervening command. -It was an easy fix to *outATCDrvHd()* in [hdc.js](/my_modules/pcjs-client/lib/hdc.js), but I was surprised +It was an easy fix to *outATCDrvHd()* in [hdc.js](/modules/pcjs/lib/hdc.js), but I was surprised to discover that the ATC had this behavior, and now I'm wondering how many other I/O operations require immediate "STATUS" register updates. diff --git a/devices/c1p/machine/8kb/large/debugger/local.html b/devices/c1p/machine/8kb/large/debugger/local.html index ac4e45e6c..6a81aabd1 100644 --- a/devices/c1p/machine/8kb/large/debugger/local.html +++ b/devices/c1p/machine/8kb/large/debugger/local.html @@ -6,8 +6,8 @@ - - + +
@@ -52,26 +52,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +