Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86
This commit is contained in:
parent
7c3aab2a7e
commit
288f28055d
1519 changed files with 16242 additions and 6939 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @fileoverview The Component class used by C1Pjs and PCjs.
|
||||
* @fileoverview The Component class used by C1Pjs and PCx86.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-May-14
|
||||
|
|
|
|||
|
|
@ -32,11 +32,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @define {string}
|
||||
*/
|
||||
var APPNAME = ""; // this @define is overridden by the Closure Compiler with either "PCjs" or "C1Pjs"
|
||||
|
||||
/**
|
||||
* @define {string}
|
||||
*/
|
||||
|
|
@ -79,7 +74,6 @@ if (typeof module !== 'undefined') {
|
|||
|
||||
if (NODE) {
|
||||
global.window = false; // provides an alternative "if (typeof window === 'undefined')" (ie, "if (window) ...")
|
||||
global.APPNAME = APPNAME;
|
||||
global.APPVERSION = APPVERSION;
|
||||
global.XMLVERSION = XMLVERSION;
|
||||
global.SITEHOST = SITEHOST;
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms)
|
|||
* *something* will have happened.
|
||||
*
|
||||
* Note that it is the HTMLOut module (in processMachines()) that ultimately decides which scripts to
|
||||
* include and then generates the embedPC() and/or embedC1P() calls.
|
||||
* include and then generates the embedXXX() call.
|
||||
*/
|
||||
var aeWarning = (eMachine && Component.getElementsByClass(eMachine, "machine-warning"));
|
||||
eWarning = (aeWarning && aeWarning[0]) || eMachine;
|
||||
|
|
@ -401,7 +401,7 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms)
|
|||
head.appendChild(style);
|
||||
}
|
||||
|
||||
var sAppClass = sName.toLowerCase(); // eg, "pcjs" or "c1pjs"
|
||||
var sAppClass = sName.toLowerCase(); // eg, "pcx86" or "c1pjs"
|
||||
if (!sXSLFile) {
|
||||
/*
|
||||
* Now that PCjs is an open-source project, we can make the following test more flexible,
|
||||
|
|
@ -535,7 +535,7 @@ function embedC1P(idMachine, sXMLFile, sXSLFile)
|
|||
}
|
||||
|
||||
/**
|
||||
* embedPC(idMachine, sXMLFile, sXSLFile, sParms)
|
||||
* embedPCx86(idMachine, sXMLFile, sXSLFile, sParms)
|
||||
*
|
||||
* @param {string} idMachine
|
||||
* @param {string} sXMLFile
|
||||
|
|
@ -543,10 +543,10 @@ function embedC1P(idMachine, sXMLFile, sXSLFile)
|
|||
* @param {string} [sParms]
|
||||
* @return {boolean} true if successful, false if error
|
||||
*/
|
||||
function embedPC(idMachine, sXMLFile, sXSLFile, sParms)
|
||||
function embedPCx86(idMachine, sXMLFile, sXSLFile, sParms)
|
||||
{
|
||||
if (fAsync) web.enablePageEvents(false);
|
||||
return embedMachine("PCjs", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
|
||||
return embedMachine("PCx86", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -569,7 +569,7 @@ function embedPC8080(idMachine, sXMLFile, sXSLFile, sParms)
|
|||
* by adding them as (named) properties of a global object.
|
||||
*/
|
||||
if (APPNAME == "C1Pjs") window['embedC1P'] = embedC1P;
|
||||
if (APPNAME == "PCjs") window['embedPC'] = embedPC;
|
||||
if (APPNAME == "PCx86") window['embedPCx86'] = embedPCx86;
|
||||
if (APPNAME == "PC8080") window['embedPC8080'] = embedPC8080;
|
||||
|
||||
window['enableEvents'] = web.enablePageEvents;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ panel) on a web page.
|
|||
|
||||
[*machine.xsl*](machine.xsl) is an XML stylesheet that takes things a step further and transforms a machine XML
|
||||
into a stand-alone HTML document, which also includes all necessary compiled scripts (eg, c1p.js, c1p-dbg.js,
|
||||
pc.js or pc-dbg.js). Most machine XML files explicitly link to this stylesheet, so that simply loading the XML
|
||||
pcx86.js or pcx86-dbg.js). Most machine XML files explicitly link to this stylesheet, so that simply loading the XML
|
||||
file in your web browser creates a working virtual machine.
|
||||
|
||||
[*manifest.xsl*](manifest.xsl) is an XML stylesheet that renders a software manifest XML file into a standalone
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template name="machine">
|
||||
<xsl:param name="href">/devices/pc/machine/5150/mda/64kb/machine.xml</xsl:param>
|
||||
<xsl:param name="href" select="''"/>
|
||||
<xsl:param name="state" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="$href"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/machine">
|
||||
|
|
@ -509,7 +509,7 @@
|
|||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!-- TODO: Think about incorporating the optional "desc" tag into the disk description (see /disks/pc/tools/microsoft/c/4.00/manifest.xml) -->
|
||||
<!-- TODO: Think about incorporating the optional "desc" tag into the disk description (see /disks/pcx86/tools/microsoft/c/4.00/manifest.xml) -->
|
||||
<xsl:if test="@href">
|
||||
<option value="{@href}" data-value="{{{$link}}}"><xsl:value-of select="$name"/></option>
|
||||
</xsl:if>
|
||||
|
|
|
|||
Loading…
Reference in a new issue