diff --git a/devices/pc8080/machine/invaders/README.md b/devices/pc8080/machine/invaders/README.md index 4b949ad4d..06e0f9c79 100644 --- a/devices/pc8080/machine/invaders/README.md +++ b/devices/pc8080/machine/invaders/README.md @@ -1,20 +1,32 @@ --- layout: page -title: Space Invaders (Prototype) +title: Space Invaders (Under Construction) permalink: /devices/pc8080/machine/invaders/ +sitemap: false machines: - type: pc8080 id: invaders + debugger: true --- -Space Invaders (Prototype) +Space Invaders (Under Construction) --- -This is a work-in-progress, with [Development Notes](#development-notes) below. +This is the first test of [PC8080](/modules/pc8080/), a new 8080-based machine emulator being added to the +PCjs Project. It's a work-in-progress, so there's not much to look at yet. + +The idea is to make [PC8080](/modules/pc8080/) sufficiently configurable so that it will work with a variety of +8080-based systems, including those with memory-mapped video displays (like Space Invaders), as well as simpler +terminal-based systems, like the CP/M-based systems of old. + +In fact, as soon as Space Invaders is working, my next adaptation will be a DEC VT-100 terminal emulator, which is +itself is an 8080-based machine. + +Assorted [Space Invaders Hardware Notes](#space-invaders-hardware-notes) are collected below. {% include machine.html id="invaders" %} -Development Notes +Space Invaders Hardware Notes --- From [emutalk.net](http://www.emutalk.net/threads/38177-Space-Invaders): diff --git a/devices/pc8080/machine/invaders/machine.xml b/devices/pc8080/machine/invaders/machine.xml index f568b2cdc..644ec6d31 100644 --- a/devices/pc8080/machine/invaders/machine.xml +++ b/devices/pc8080/machine/invaders/machine.xml @@ -11,7 +11,7 @@ diff --git a/modules/htmlout/lib/htmlout.js b/modules/htmlout/lib/htmlout.js index 3283afd46..421ed9c72 100644 --- a/modules/htmlout/lib/htmlout.js +++ b/modules/htmlout/lib/htmlout.js @@ -1881,57 +1881,55 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done) asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile); this.addFilesToHTML(asFiles, sScriptEmbed); } - else { + else if (asFiles = aMachineFiles[sClass]) { /* * SIDEBAR: Why the "slice()"? It's a handy way to create a copy of the array, and we need a copy, * because if it turns out we need to "cut out" some of the files below (using splice), we don't want that * affecting the original array. */ - if ((asFiles = aMachineFiles[sClass].slice())) { - var i; + asFiles = asFiles.slice(); + /* + * We need to find the shared "defines.js" source file, because we may need to follow it + * with "nodebug.js" and/or "private.js". + */ + for (var i = 0; i < asFiles.length; i++) { + if (asFiles[i].indexOf("shared/lib/defines.js") >= 0) { + if (fPrivate) { + asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "private.js")); + } + if (fNoDebug) { + asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "nodebug.js")); + } + break; + } + } + if (!fDebugger) { /* - * We need to find the shared "defines.js" source file, because we may need to follow it - * with "nodebug.js" and/or "private.js". + * Step 1: We need to find the client's "defines.js" source file, and follow it with "nodebugger.js". */ for (i = 0; i < asFiles.length; i++) { - if (asFiles[i].indexOf("shared/lib/defines.js") >= 0) { - if (fPrivate) { - asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "private.js")); - } - if (fNoDebug) { - asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "nodebug.js")); - } + if (asFiles[i].indexOf("js/lib/defines.js") >= 0) { + asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "nodebugger.js")); break; } } - if (!fDebugger) { - /* - * Step 1: We need to find the client's "defines.js" source file, and follow it with "nodebugger.js". - */ - for (i = 0; i < asFiles.length; i++) { - if (asFiles[i].indexOf("js/lib/defines.js") >= 0) { - asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "nodebugger.js")); - break; - } - } - /* - * Step 2: If there's a "debugger.js" source file in the list of uncompiled files, we need to remove - * it, which we do by using the Array splice() method, removing the 1 matching element from the array. - */ - for (i = 0; i < asFiles.length; i++) { - if (asFiles[i].indexOf("/debugger.js") >= 0) { - asFiles.splice(i, 1); - break; - } + /* + * Step 2: If there's a "debugger.js" source file in the list of uncompiled files, we need to remove + * it, which we do by using the Array splice() method, removing the 1 matching element from the array. + */ + for (i = 0; i < asFiles.length; i++) { + if (asFiles[i].indexOf("/debugger.js") >= 0) { + asFiles.splice(i, 1); + break; } } + } + this.addFilesToHTML(asFiles, sScriptEmbed); + if (buildOptions.id) { + asFiles = []; + asFiles.push("/modules/build/lib/build.js"); + sScriptEmbed = ''; this.addFilesToHTML(asFiles, sScriptEmbed); - if (buildOptions.id) { - asFiles = []; - asFiles.push("/modules/build/lib/build.js"); - sScriptEmbed = ''; - this.addFilesToHTML(asFiles, sScriptEmbed); - } } } } diff --git a/modules/markout/lib/markout.js b/modules/markout/lib/markout.js index a56e718d9..647a9d037 100644 --- a/modules/markout/lib/markout.js +++ b/modules/markout/lib/markout.js @@ -1157,7 +1157,8 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock) sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : ""); sMachineParms = machine['parms'] || ""; sReplacement = machine['name'] || "Embedded PC"; - sReplacement = "[" + sReplacement + "](" + sMachineXMLFile + ' "' + sMachine + 'js!' + sMachineID + '!' + sMachineXSLFile + '!!' + sMachineOptions + '!' + sMachineParms + '")'; + if (sMachine == "pc" || sMachine == "c1p") sMachine += "js"; + sReplacement = "[" + sReplacement + "](" + sMachineXMLFile + ' "' + sMachine + '!' + sMachineID + '!' + sMachineXSLFile + '!!' + sMachineOptions + '!' + sMachineParms + '")'; } sBlock = sBlock.replace(aMatch[0], sReplacement); reIncludes.lastIndex = 0; // reset lastIndex, since we just modified the string that reIncludes is iterating over diff --git a/modules/pc8080/README.md b/modules/pc8080/README.md new file mode 100644 index 000000000..aad8c7275 --- /dev/null +++ b/modules/pc8080/README.md @@ -0,0 +1,35 @@ +--- +layout: page +title: 8080 Machine Emulation Module (PC8080) +permalink: /modules/pc8080/ +--- + +8080 Machine Emulation Module (PC8080) +=== + +Overview +--- +PC8080 is an 8080-based Machine Emulation Module. The code is derived from [PCjs](/modules/pcjs/), +the IBM PC Emulation Module. + +It is still a work-in-progress, so it likely contains code that will be removed from the finished version. + +PC8080 is currently comprised of the following non-shared components, as listed in [package.json](../../package.json) +(see the *pc8080Files* property): + +* [defines.js](/modules/pc8080/lib/defines.js) +* [cpudef.js](/modules/pc8080/lib/cpudef.js) +* [messages.js](/modules/pc8080/lib/messages.js) +* [panel.js](/modules/pc8080/lib/panel.js) +* [bus.js](/modules/pc8080/lib/bus.js) +* [memory.js](/modules/pc8080/lib/memory.js) +* [cpu.js](/modules/pc8080/lib/cpu.js) +* [cpusim.js](/modules/pc8080/lib/cpusim.js) +* [cpuops.js](/modules/pc8080/lib/cpuops.js) +* [rom.js](/modules/pc8080/lib/rom.js) +* [ram.js](/modules/pc8080/lib/ram.js) +* [keyboard.js](/modules/pc8080/lib/keyboard.js) +* [video.js](/modules/pc8080/lib/video.js) +* [debugger.js](/modules/pc8080/lib/debugger.js) +* [state.js](/modules/pc8080/lib/state.js) +* [computer.js](/modules/pc8080/lib/computer.js)