Fixed Node rendering of PC8080 pages (all one of them)

This commit is contained in:
Jeff Parsons 2016-04-21 09:50:03 -07:00
commit f324b62493
5 changed files with 89 additions and 43 deletions

View file

@ -1,20 +1,32 @@
--- ---
layout: page layout: page
title: Space Invaders (Prototype) title: Space Invaders (Under Construction)
permalink: /devices/pc8080/machine/invaders/ permalink: /devices/pc8080/machine/invaders/
sitemap: false
machines: machines:
- type: pc8080 - type: pc8080
id: invaders 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" %} {% include machine.html id="invaders" %}
Development Notes Space Invaders Hardware Notes
--- ---
From [emutalk.net](http://www.emutalk.net/threads/38177-Space-Invaders): From [emutalk.net](http://www.emutalk.net/threads/38177-Space-Invaders):

View file

@ -11,7 +11,7 @@
<ram id="ram" addr="0x2000" size="0x2000"/> <ram id="ram" addr="0x2000" size="0x2000"/>
<video id="video" screenWidth="224" screenHeight="256" aspect="1.33" rotate="90" addr="0x2400" width="40%" pos="left" padding="8px"> <video id="video" screenWidth="224" screenHeight="256" aspect="1.33" rotate="90" addr="0x2400" width="40%" pos="left" padding="8px">
<menu> <menu>
<title>224x256 Screen</title> <title>224x256 Screen (Rotated)</title>
</menu> </menu>
</video> </video>
<panel ref="/devices/pc8080/panel/default.xml"/> <panel ref="/devices/pc8080/panel/default.xml"/>

View file

@ -1881,19 +1881,18 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile); asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile);
this.addFilesToHTML(asFiles, sScriptEmbed); 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, * 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 * 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. * affecting the original array.
*/ */
if ((asFiles = aMachineFiles[sClass].slice())) { asFiles = asFiles.slice();
var i;
/* /*
* We need to find the shared "defines.js" source file, because we may need to follow it * We need to find the shared "defines.js" source file, because we may need to follow it
* with "nodebug.js" and/or "private.js". * with "nodebug.js" and/or "private.js".
*/ */
for (i = 0; i < asFiles.length; i++) { for (var i = 0; i < asFiles.length; i++) {
if (asFiles[i].indexOf("shared/lib/defines.js") >= 0) { if (asFiles[i].indexOf("shared/lib/defines.js") >= 0) {
if (fPrivate) { if (fPrivate) {
asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "private.js")); asFiles.splice(i + 1, 0, asFiles[i].replace("defines.js", "private.js"));
@ -1934,7 +1933,6 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
} }
} }
} }
}
if (done) done(); if (done) done();
}; };

View file

@ -1157,7 +1157,8 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : ""); sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : "");
sMachineParms = machine['parms'] || ""; sMachineParms = machine['parms'] || "";
sReplacement = machine['name'] || "Embedded PC"; 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); sBlock = sBlock.replace(aMatch[0], sReplacement);
reIncludes.lastIndex = 0; // reset lastIndex, since we just modified the string that reIncludes is iterating over reIncludes.lastIndex = 0; // reset lastIndex, since we just modified the string that reIncludes is iterating over

35
modules/pc8080/README.md Normal file
View file

@ -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)