More build option groundwork

This commit is contained in:
Jeff Parsons 2016-02-10 17:52:50 -08:00
commit 7913ef2a0a
7 changed files with 111 additions and 35 deletions

View file

@ -1134,7 +1134,7 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
reIncludes.lastIndex = 0; // reset lastIndex, since we just modified the string that reIncludes is iterating over
}
sBlock = sBlock.replace(/\{%\s*include\s+build\.html\s+id=(["'])(.*?)\1\s*%}/g, '<div id=$1$2$1></div>');
sBlock = sBlock.replace(/\{%\s*include\s+build\.html\s+id=(["'])(.*?)\1\s*%}/g, '<div class="pcbuild" id=$1$2$1></div>');
/*
* Start looking for Markdown-style machine links now...

View file

@ -36,6 +36,76 @@
* This file provides all the UI options for building a functional PCjs PC.
*/
var typeAddress = {
type: "address"
};
var typeBoolean = {
type: "boolean"
};
var typeNumber = {
type: "number"
};
var typePath = {
type: "string"
};
var typeString = {
type: "string"
};
var machineTypes = {
'5150': "IBM PC (Model 5150)",
'5160': "IBM PC XT (Model 5160)",
'5170': "IBM PC AT (Model 5170)",
'deskpro386': "COMPAQ DeskPro 386"
};
var aMachineElements = {
'machine': {
choices: machineTypes
},
'name': {
desc: "Machine Description"
},
'computer': {
desc: "General Computer Features",
'buswidth': {
type: typeNumber,
values: [20, 24, 32]
},
'resume': {
type: typeNumber,
value: [0, 1, 2],
descs: ["Resume Disabled", "Resume Enabled", "Resume with Prompt"]
}
},
'ram': {
desc: "Read-Write Memory (Conventional or Extended)",
'addr': {
type: typeAddress
},
'size': {
type: typeNumber
}
},
'rom': {
desc: "Read-Only Memory",
'addr': {
type: typeAddress
},
'size': {
type: typeNumber
},
'file': {
type: typePath
}
}
};
/**
* buildPC(idElement)
*

View file

@ -104,14 +104,20 @@ if (NODE) {
*
* The parmsMachine object, if provided, may contain any of:
*
* url: the location of the machine XML file
*
* autoMount: if set, this should override any 'autoMount' property in the FDC's
* parmsFDC object.
*
* autoPower: if set, this should override any 'autoPower' property in the Computer's
* parmsComputer object.
*
* messages: if set, this should override any 'messages' property in the Debugger's
* parmsDbg object.
*
* state: if set, this should override any 'state' property in the Computer's
* parmsComputer object.
*
* url: the location of the machine XML file
*
* If a predefined state is supplied AND it's successfully loaded, then resume behavior
* defaults to '1' (ie, resume enabled without prompting).
*