Removed all obsolete @suppress directives

This commit is contained in:
Jeff Parsons 2014-10-30 16:36:23 -07:00 • committed by jeffpar
commit 426fd0ff40
60 changed files with 6221 additions and 340 deletions

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs Computer component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs 6502 CPU component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs Debugger component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-21
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -1517,7 +1516,6 @@ if (DEBUGGER) {
* @this {C1PDebugger}
* @param {string|undefined} [sAddr]
* @return {number|undefined}
* @suppress {checkTypes}
*/
C1PDebugger.prototype.getUserAddr = function(sAddr)
{

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs DiskController component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Aug-09
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs Keyboard component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-20
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs Panel component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-19
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs RAM component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs ROM component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs SerialPort component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jul-01
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file implements the C1Pjs Video component
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file tests raw floating point access using typed arrays.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2014-Aug-20
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview This file generates PCjs 8086 mode-byte decoders.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-08
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Bus component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-04
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs ChipSet component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-14
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -952,14 +951,13 @@ ChipSet.prototype.initBus = function(cmp, bus, cpu, dbg)
if (DEBUGGER) {
if (dbg) {
var chipset = this;
dbg.messageInit(ChipSet);
dbg.messageDump(ChipSet.MESSAGE_PIC, function onDumpPIC() {
dbg.messageDump(Debugger.MESSAGE_PIC, function onDumpPIC() {
chipset.dumpPIC();
});
dbg.messageDump(ChipSet.MESSAGE_TIMER, function onDumpTimer() {
dbg.messageDump(Debugger.MESSAGE_TIMER, function onDumpTimer() {
chipset.dumpTimer();
});
dbg.messageDump(ChipSet.MESSAGE_CMOS, function onDumpCMOS() {
dbg.messageDump(Debugger.MESSAGE_CMOS, function onDumpCMOS() {
chipset.dumpCMOS();
});
}
@ -2098,7 +2096,7 @@ ChipSet.prototype.inDMAChannelAddr = function(iDMAC, iChannel, port, addrFrom)
var channel = controller.aChannels[iChannel];
var b = channel.addrCurrent[controller.bIndex];
controller.bIndex ^= 0x1;
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".ADDR[" + controller.bIndex + "]", ChipSet.MESSAGE_DMA, b);
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".ADDR[" + controller.bIndex + "]", Debugger.MESSAGE_DMA, b);
return b;
};
@ -2115,7 +2113,7 @@ ChipSet.prototype.inDMAChannelAddr = function(iDMAC, iChannel, port, addrFrom)
ChipSet.prototype.outDMAChannelAddr = function outDMAChannelAddr(iDMAC, iChannel, port, bOut, addrFrom)
{
var controller = this.aDMACs[iDMAC];
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".ADDR[" + controller.bIndex + "]", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".ADDR[" + controller.bIndex + "]", Debugger.MESSAGE_DMA);
var channel = controller.aChannels[iChannel];
channel.addrCurrent[controller.bIndex] = channel.addrInit[controller.bIndex] = bOut;
controller.bIndex ^= 0x1;
@ -2137,7 +2135,7 @@ ChipSet.prototype.inDMAChannelCount = function(iDMAC, iChannel, port, addrFrom)
var channel = controller.aChannels[iChannel];
var b = channel.countCurrent[controller.bIndex];
controller.bIndex ^= 0x1;
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".COUNT[" + controller.bIndex + "]", ChipSet.MESSAGE_DMA, b);
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".COUNT[" + controller.bIndex + "]", Debugger.MESSAGE_DMA, b);
return b;
};
@ -2154,7 +2152,7 @@ ChipSet.prototype.inDMAChannelCount = function(iDMAC, iChannel, port, addrFrom)
ChipSet.prototype.outDMAChannelCount = function(iDMAC, iChannel, port, bOut, addrFrom)
{
var controller = this.aDMACs[iDMAC];
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".COUNT[" + controller.bIndex + "]", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".COUNT[" + controller.bIndex + "]", Debugger.MESSAGE_DMA);
var channel = controller.aChannels[iChannel];
channel.countCurrent[controller.bIndex] = channel.countInit[controller.bIndex] = bOut;
controller.bIndex ^= 0x1;
@ -2195,7 +2193,7 @@ ChipSet.prototype.inDMAStatus = function(iDMAC, port, addrFrom)
var controller = this.aDMACs[iDMAC];
var b = controller.bStatus | 0x1;
controller.bStatus &= ~0xf;
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".STATUS", ChipSet.MESSAGE_DMA, b);
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".STATUS", Debugger.MESSAGE_DMA, b);
return b;
};
@ -2210,7 +2208,7 @@ ChipSet.prototype.inDMAStatus = function(iDMAC, port, addrFrom)
*/
ChipSet.prototype.outDMACmd = function(iDMAC, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CMD", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CMD", Debugger.MESSAGE_DMA);
this.aDMACs[iDMAC].bCmd = bOut;
};
@ -2236,7 +2234,7 @@ ChipSet.prototype.outDMACmd = function(iDMAC, port, bOut, addrFrom)
ChipSet.prototype.outDMAReq = function(iDMAC, port, bOut, addrFrom)
{
var controller = this.aDMACs[iDMAC];
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".REQ", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".REQ", Debugger.MESSAGE_DMA);
/*
* Bits 0-1 contain the channel number
*/
@ -2261,7 +2259,7 @@ ChipSet.prototype.outDMAReq = function(iDMAC, port, bOut, addrFrom)
ChipSet.prototype.outDMAMask = function(iDMAC, port, bOut, addrFrom)
{
var controller = this.aDMACs[iDMAC];
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".MASK", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".MASK", Debugger.MESSAGE_DMA);
var iChannel = bOut & ChipSet.DMA_MASK.CHANNEL;
var channel = controller.aChannels[iChannel];
channel.masked = (bOut & ChipSet.DMA_MASK.CHANNEL_SET? true : false);
@ -2279,7 +2277,7 @@ ChipSet.prototype.outDMAMask = function(iDMAC, port, bOut, addrFrom)
*/
ChipSet.prototype.outDMAMode = function(iDMAC, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".MODE", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".MODE", Debugger.MESSAGE_DMA);
var iChannel = bOut & ChipSet.DMA_MODE.CHANNEL;
this.aDMACs[iDMAC].aChannels[iChannel].mode = bOut;
};
@ -2298,7 +2296,7 @@ ChipSet.prototype.outDMAMode = function(iDMAC, port, bOut, addrFrom)
*/
ChipSet.prototype.outDMAIndex = function(iDMAC, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".INDEX", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".INDEX", Debugger.MESSAGE_DMA);
this.aDMACs[iDMAC].bIndex = 0;
};
@ -2313,7 +2311,7 @@ ChipSet.prototype.outDMAIndex = function(iDMAC, port, bOut, addrFrom)
*/
ChipSet.prototype.outDMAClear = function(iDMAC, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CLEAR", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CLEAR", Debugger.MESSAGE_DMA);
/*
* The value written to this port doesn't matter; any write triggers a "master clear" operation
*/
@ -2336,7 +2334,7 @@ ChipSet.prototype.outDMAClear = function(iDMAC, port, bOut, addrFrom)
ChipSet.prototype.inDMAPageReg = function(iDMAC, iChannel, port, addrFrom)
{
var bIn = this.aDMACs[iDMAC].aChannels[iChannel].bPage;
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".PAGE", ChipSet.MESSAGE_DMA, bIn);
this.messagePort(port, null, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".PAGE", Debugger.MESSAGE_DMA, bIn);
return bIn;
};
@ -2352,7 +2350,7 @@ ChipSet.prototype.inDMAPageReg = function(iDMAC, iChannel, port, addrFrom)
*/
ChipSet.prototype.outDMAPageReg = function(iDMAC, iChannel, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".PAGE", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA" + iDMAC + ".CHANNEL" + iChannel + ".PAGE", Debugger.MESSAGE_DMA);
this.aDMACs[iDMAC].aChannels[iChannel].bPage = bOut;
};
@ -2368,7 +2366,7 @@ ChipSet.prototype.outDMAPageReg = function(iDMAC, iChannel, port, bOut, addrFrom
ChipSet.prototype.inDMAPageSpare = function(iSpare, port, addrFrom)
{
var bIn = this.abDMAPageSpare[iSpare];
this.messagePort(port, null, addrFrom, "DMA.SPARE" + iSpare + ".PAGE", ChipSet.MESSAGE_DMA, bIn);
this.messagePort(port, null, addrFrom, "DMA.SPARE" + iSpare + ".PAGE", Debugger.MESSAGE_DMA, bIn);
return bIn;
};
@ -2383,7 +2381,7 @@ ChipSet.prototype.inDMAPageSpare = function(iSpare, port, addrFrom)
*/
ChipSet.prototype.outDMAPageSpare = function(iSpare, port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "DMA.SPARE" + iSpare + ".PAGE", ChipSet.MESSAGE_DMA);
this.messagePort(port, bOut, addrFrom, "DMA.SPARE" + iSpare + ".PAGE", Debugger.MESSAGE_DMA);
this.abDMAPageSpare[iSpare] = bOut;
};
@ -2451,7 +2449,7 @@ ChipSet.prototype.requestDMA = function(iDMAChannel, done)
var channel = controller.aChannels[iChannel];
if (!channel.component || !channel.fnTransfer || !channel.obj) {
if (DEBUG) this.messageDebugger("requestDMA(" + iDMAChannel + "): not connected to a component", ChipSet.MESSAGE_DMA);
if (DEBUG) this.messageDebugger("requestDMA(" + iDMAChannel + "): not connected to a component", Debugger.MESSAGE_DMA);
if (done) done(true);
return;
}
@ -2466,7 +2464,7 @@ ChipSet.prototype.requestDMA = function(iDMAChannel, done)
if (done) channel.done = done;
if (channel.masked) {
if (DEBUG) this.messageDebugger("requestDMA(" + iDMAChannel + "): channel masked, request queued", ChipSet.MESSAGE_DMA);
if (DEBUG) this.messageDebugger("requestDMA(" + iDMAChannel + "): channel masked, request queued", Debugger.MESSAGE_DMA);
return;
}
@ -2517,7 +2515,7 @@ ChipSet.prototype.advanceDMA = function(channel, fInit)
var addr = (channel.bPage << 16) | (channel.addrCurrent[1] << 8) | channel.addrCurrent[0];
if (DEBUG && DEBUGGER && channel.sAddrDebug === null) {
channel.sAddrDebug = str.toHex(addr >> 4, 4) + ":" + str.toHex(addr & 0xf, 4);
if (this.dbg && this.dbg.messageEnabled(ChipSet.MESSAGE_DMA | (iDMAChannel == ChipSet.DMA_FDC? ChipSet.MESSAGE_FDC : (iDMAChannel == ChipSet.DMA_HDC? ChipSet.MESSAGE_HDC : ChipSet.MESSAGE_LOG))) && channel.xfer != ChipSet.DMA_MODE.XFER_WRITE) {
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_DMA | (iDMAChannel == ChipSet.DMA_FDC? Debugger.MESSAGE_FDC : (iDMAChannel == ChipSet.DMA_HDC? Debugger.MESSAGE_HDC : Debugger.MESSAGE_LOG))) && channel.xfer != ChipSet.DMA_MODE.XFER_WRITE) {
this.dbg.message("advanceDMA(" + iDMAChannel + ") transferring " + channel.cbDebug + " bytes from " + channel.sAddrDebug);
this.dbg.doDump("db", channel.sAddrDebug, "l" + Math.floor((channel.cbDebug + 15) / 16));
}
@ -2528,7 +2526,7 @@ ChipSet.prototype.advanceDMA = function(channel, fInit)
channel.fnTransfer.call(channel.component, channel.obj, -1, function onTransferDMA(b, fAsync) {
if (b < 0) {
if (!channel.fWarning) {
if (DEBUG) obj.messageDebugger("advanceDMA(" + iDMAChannel + ") ran out of data, assuming 0xff", ChipSet.MESSAGE_DMA);
if (DEBUG) obj.messageDebugger("advanceDMA(" + iDMAChannel + ") ran out of data, assuming 0xff", Debugger.MESSAGE_DMA);
channel.fWarning = true;
}
/*
@ -2575,7 +2573,7 @@ ChipSet.prototype.advanceDMA = function(channel, fInit)
}
}
else {
if (DEBUG) this.messageDebugger("advanceDMA(" + iDMAChannel + ") unsupported xfer mode: " + str.toHexWord(channel.xfer), ChipSet.MESSAGE_DMA);
if (DEBUG) this.messageDebugger("advanceDMA(" + iDMAChannel + ") unsupported xfer mode: " + str.toHexWord(channel.xfer), Debugger.MESSAGE_DMA);
channel.fError = true;
}
}
@ -2627,7 +2625,7 @@ ChipSet.prototype.updateDMA = function(channel)
channel.component = channel.obj = null;
}
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(ChipSet.MESSAGE_DMA | (iDMAChannel == ChipSet.DMA_FDC? ChipSet.MESSAGE_FDC : (iDMAChannel == ChipSet.DMA_HDC? ChipSet.MESSAGE_HDC : ChipSet.MESSAGE_LOG))) && channel.xfer == ChipSet.DMA_MODE.XFER_WRITE && channel.sAddrDebug) {
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_DMA | (iDMAChannel == ChipSet.DMA_FDC? Debugger.MESSAGE_FDC : (iDMAChannel == ChipSet.DMA_HDC? Debugger.MESSAGE_HDC : Debugger.MESSAGE_LOG))) && channel.xfer == ChipSet.DMA_MODE.XFER_WRITE && channel.sAddrDebug) {
this.dbg.message("updateDMA(" + iDMAChannel + ") transferred " + channel.cbDebug + " bytes to " + channel.sAddrDebug);
this.dbg.doDump("db", channel.sAddrDebug, "l" + Math.floor((channel.cbDebug + 15) / 16));
}
@ -2669,7 +2667,7 @@ ChipSet.prototype.inPICLo = function(iPIC, addrFrom)
break;
}
}
this.messagePort(pic.port, null, addrFrom, "PIC" + iPIC, ChipSet.MESSAGE_PIC, b);
this.messagePort(pic.port, null, addrFrom, "PIC" + iPIC, Debugger.MESSAGE_PIC, b);
return b;
};
@ -2684,7 +2682,7 @@ ChipSet.prototype.inPICLo = function(iPIC, addrFrom)
ChipSet.prototype.outPICLo = function(iPIC, bOut, addrFrom)
{
var pic = this.aPICs[iPIC];
this.messagePort(pic.port, bOut, addrFrom, "PIC" + iPIC, ChipSet.MESSAGE_PIC);
this.messagePort(pic.port, bOut, addrFrom, "PIC" + iPIC, Debugger.MESSAGE_PIC);
if (bOut & ChipSet.PIC_LO.ICW1) {
/*
* This must be an ICW1...
@ -2766,11 +2764,11 @@ ChipSet.prototype.outPICLo = function(iPIC, bOut, addrFrom)
}
var nIRQ = (nIRL == null? undefined : pic.nIRQBase + nIRL);
if (pic.bISR & bIREnd) {
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): IRQ " + nIRQ + " going out of service", ChipSet.MESSAGE_PIC, nIRQ);
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): IRQ " + nIRQ + " going out of service", Debugger.MESSAGE_PIC, nIRQ);
pic.bISR &= ~bIREnd;
this.checkIRR(iPIC);
} else {
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unexpected EOI command, IRQ " + nIRQ + " not in service", ChipSet.MESSAGE_PIC);
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unexpected EOI command, IRQ " + nIRQ + " not in service", Debugger.MESSAGE_PIC);
}
/*
* TODO: Support EOI commands with automatic rotation (eg, ChipSet.PIC_LO.OCW2_EOI_ROT and ChipSet.PIC_LO.OCW2_EOI_ROTSPEC)
@ -2786,7 +2784,7 @@ ChipSet.prototype.outPICLo = function(iPIC, bOut, addrFrom)
/*
* TODO: Remaining commands to support: ChipSet.PIC_LO.OCW2_SET_ROTAUTO and ChipSet.PIC_LO.OCW2_CLR_ROTAUTO
*/
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unsupported OCW2 command: " + str.toHexByte(bOut), ChipSet.MESSAGE_PIC);
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unsupported OCW2 command: " + str.toHexByte(bOut), Debugger.MESSAGE_PIC);
}
} else {
/*
@ -2796,7 +2794,7 @@ ChipSet.prototype.outPICLo = function(iPIC, bOut, addrFrom)
* that's unfortunate, because I don't support them yet.
*/
if (bOut & (ChipSet.PIC_LO.OCW3_POLL_CMD | ChipSet.PIC_LO.OCW3_SMM_CMD)) {
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unsupported OCW3 command: " + str.toHexByte(bOut), ChipSet.MESSAGE_PIC);
if (DEBUG) this.messageDebugger("outPIC" + iPIC + "(" + str.toHexByte(pic.port) + "): unsupported OCW3 command: " + str.toHexByte(bOut), Debugger.MESSAGE_PIC);
}
pic.bOCW3 = bOut;
}
@ -2814,7 +2812,7 @@ ChipSet.prototype.inPICHi = function(iPIC, addrFrom)
{
var pic = this.aPICs[iPIC];
var b = pic.bIMR;
this.messagePort(pic.port+1, null, addrFrom, "PIC" + iPIC, ChipSet.MESSAGE_PIC, b);
this.messagePort(pic.port+1, null, addrFrom, "PIC" + iPIC, Debugger.MESSAGE_PIC, b);
return b;
};
@ -2829,7 +2827,7 @@ ChipSet.prototype.inPICHi = function(iPIC, addrFrom)
ChipSet.prototype.outPICHi = function(iPIC, bOut, addrFrom)
{
var pic = this.aPICs[iPIC];
this.messagePort(pic.port+1, bOut, addrFrom, "PIC" + iPIC, ChipSet.MESSAGE_PIC);
this.messagePort(pic.port+1, bOut, addrFrom, "PIC" + iPIC, Debugger.MESSAGE_PIC);
if (pic.nICW < pic.aICW.length) {
pic.aICW[pic.nICW++] = bOut;
if (pic.nICW == 2 && (pic.aICW[0] & ChipSet.PIC_LO.ICW1_SNGL))
@ -2887,7 +2885,7 @@ ChipSet.prototype.setIRR = function(nIRQ, nDelay)
var nIRL = nIRQ & 0x7;
var pic = this.aPICs[iPIC];
pic.bIRR |= 1 << nIRL;
if (DEBUG) this.messageDebugger("setIRR(" + nIRQ + ")", ChipSet.MESSAGE_PIC, nIRQ);
if (DEBUG) this.messageDebugger("setIRR(" + nIRQ + ")", Debugger.MESSAGE_PIC, nIRQ);
pic.nDelay = nDelay || 0;
/*
* When any slave IRR goes high, I'm assuming that the master's slave IRR line should go high as well
@ -2910,7 +2908,7 @@ ChipSet.prototype.clearIRR = function(nIRQ)
var bIRR = (1 << nIRL);
if (pic.bIRR & bIRR) {
pic.bIRR &= ~bIRR;
if (DEBUG) this.messageDebugger("clearIRR(" + nIRQ + ")", ChipSet.MESSAGE_PIC, nIRQ);
if (DEBUG) this.messageDebugger("clearIRR(" + nIRQ + ")", Debugger.MESSAGE_PIC, nIRQ);
/*
* When all slave IRRs go low, I'm assuming that the master's slave IRR line should go low as well
*/
@ -3006,7 +3004,7 @@ ChipSet.prototype.getIRRVector = function(iPIC)
}
var nIRQ = pic.nIRQBase + nIRL;
if (DEBUG) this.messageDebugger("getIRRVector(): IRQ " + nIRQ + " going into service", ChipSet.MESSAGE_PIC, nIRQ);
if (DEBUG) this.messageDebugger("getIRRVector(): IRQ " + nIRQ + " going into service", Debugger.MESSAGE_PIC, nIRQ);
if (MAXDEBUG && DEBUGGER) {
this.acInterrupts[nIRQ]++;
}
@ -3040,7 +3038,7 @@ ChipSet.prototype.inTimer = function(iTimer, addrFrom)
}
this.updateTimer(iTimer);
b = timer.countCurrent[timer.countIndex++];
this.messagePort(ChipSet.TIMER0.PORT + iTimer, null, addrFrom, "TIMER" + iTimer, ChipSet.MESSAGE_TIMER, b);
this.messagePort(ChipSet.TIMER0.PORT + iTimer, null, addrFrom, "TIMER" + iTimer, Debugger.MESSAGE_TIMER, b);
return b;
};
@ -3054,7 +3052,7 @@ ChipSet.prototype.inTimer = function(iTimer, addrFrom)
*/
ChipSet.prototype.outTimer = function(iTimer, bOut, addrFrom)
{
this.messagePort(ChipSet.TIMER0.PORT + iTimer, bOut, addrFrom, "TIMER" + iTimer, ChipSet.MESSAGE_TIMER);
this.messagePort(ChipSet.TIMER0.PORT + iTimer, bOut, addrFrom, "TIMER" + iTimer, Debugger.MESSAGE_TIMER);
var timer = this.aTimers[iTimer];
if (timer.countIndex == timer.countBytes) this.resetTimerIndex(iTimer);
@ -3137,8 +3135,8 @@ ChipSet.prototype.outTimer = function(iTimer, bOut, addrFrom)
*/
ChipSet.prototype.inTimerCtrl = function(port, addrFrom)
{
this.messagePort(port, null, addrFrom, "TIMER_CTRL", ChipSet.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("TIMER_CTRL: Read-Back command not supported (yet)", ChipSet.MESSAGE_TIMER);
this.messagePort(port, null, addrFrom, "TIMER_CTRL", Debugger.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("TIMER_CTRL: Read-Back command not supported (yet)", Debugger.MESSAGE_TIMER);
return null;
};
@ -3152,14 +3150,14 @@ ChipSet.prototype.inTimerCtrl = function(port, addrFrom)
*/
ChipSet.prototype.outTimerCtrl = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "TIMER_CTRL", ChipSet.MESSAGE_TIMER);
this.messagePort(port, bOut, addrFrom, "TIMER_CTRL", Debugger.MESSAGE_TIMER);
this.bTimerCtrl = bOut;
/*
* Extract the SC (Select Counter) bits
*/
var iTimer = (bOut & ChipSet.TIMER_CTRL.SC) >> 6;
if (iTimer == 0x3) {
if (DEBUG) this.messageDebugger("TIMER_CTRL: Read-Back command not supported (yet)", ChipSet.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("TIMER_CTRL: Read-Back command not supported (yet)", Debugger.MESSAGE_TIMER);
return;
}
/*
@ -3210,7 +3208,7 @@ ChipSet.prototype.outTimerCtrl = function(port, bOut, addrFrom)
timer.countStart[0] = timer.countInit[0];
timer.countStart[1] = timer.countInit[1];
timer.nStartCycles = this.cpu.getCycles(this.fScaleTimers);
if (DEBUG) this.messageDebugger("TIMER0 count reset @" + timer.nStartCycles + " cycles", ChipSet.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("TIMER0 count reset @" + timer.nStartCycles + " cycles", Debugger.MESSAGE_TIMER);
}
}
}
@ -3396,7 +3394,7 @@ ChipSet.prototype.updateTimer = function(iTimer, fCycleReset)
var ticks = ((nCycles - timer.nStartCycles) / this.nTicksDivisor) | 0;
if (ticks < 0) {
if (DEBUG) this.messageDebugger("updateTimer(" + iTimer + "): negative tick count (" + ticks + ")", ChipSet.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("updateTimer(" + iTimer + "): negative tick count (" + ticks + ")", Debugger.MESSAGE_TIMER);
timer.nStartCycles = nCycles;
ticks = 0;
}
@ -3414,7 +3412,7 @@ ChipSet.prototype.updateTimer = function(iTimer, fCycleReset)
*/
if (timer.mode == ChipSet.TIMER_CTRL.MODE0) {
if (count <= 0) count = 0;
if (DEBUG) this.messageDebugger("updateTimer(" + iTimer + "): MODE0 timer count=" + count, ChipSet.MESSAGE_TIMER);
if (DEBUG) this.messageDebugger("updateTimer(" + iTimer + "): MODE0 timer count=" + count, Debugger.MESSAGE_TIMER);
if (!count) {
timer.fOUT = true;
timer.fCounting = false;
@ -3447,7 +3445,7 @@ ChipSet.prototype.updateTimer = function(iTimer, fCycleReset)
if (count <= 0) {
count = countInit + count;
if (count <= 0) {
// this.messageDebugger("updateTimer(" + iTimer + "): underflow=" + count, ChipSet.MESSAGE_TIMER);
// this.messageDebugger("updateTimer(" + iTimer + "): underflow=" + count, Debugger.MESSAGE_TIMER);
count = countInit;
}
timer.countStart[0] = count & 0xff;
@ -3477,7 +3475,7 @@ ChipSet.prototype.updateTimer = function(iTimer, fCycleReset)
timer.fOUT = !timer.fOUT;
count = countInit + count;
if (count <= 0) {
// this.messageDebugger("updateTimer(" + iTimer + "): underflow=" + count, ChipSet.MESSAGE_TIMER);
// this.messageDebugger("updateTimer(" + iTimer + "): underflow=" + count, Debugger.MESSAGE_TIMER);
count = countInit;
}
if (MAXDEBUG && DEBUGGER && !iTimer) {
@ -3497,7 +3495,7 @@ ChipSet.prototype.updateTimer = function(iTimer, fCycleReset)
}
}
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(ChipSet.MESSAGE_TIMER)) {
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_TIMER)) {
this.log("TIMER" + iTimer + " count: " + count + ", ticks: " + ticks + ", fired: " + (fFired? "true" : "false"));
}
@ -3541,7 +3539,7 @@ ChipSet.prototype.inPPIA = function(port, addrFrom)
b = this.kbd.readScanCode();
}
}
this.messagePort(port, null, addrFrom, "PPI_A", ChipSet.MESSAGE_CHIPSET, b);
this.messagePort(port, null, addrFrom, "PPI_A", Debugger.MESSAGE_CHIPSET, b);
return b;
};
@ -3555,7 +3553,7 @@ ChipSet.prototype.inPPIA = function(port, addrFrom)
*/
ChipSet.prototype.outPPIA = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "PPI_A", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "PPI_A", Debugger.MESSAGE_CHIPSET);
this.bPPIA = bOut;
};
@ -3570,7 +3568,7 @@ ChipSet.prototype.outPPIA = function(port, bOut, addrFrom)
ChipSet.prototype.inPPIB = function(port, addrFrom)
{
var b = this.bPPIB;
this.messagePort(port, null, addrFrom, "PPI_B", ChipSet.MESSAGE_CHIPSET, b);
this.messagePort(port, null, addrFrom, "PPI_B", Debugger.MESSAGE_CHIPSET, b);
return b;
};
@ -3584,7 +3582,7 @@ ChipSet.prototype.inPPIB = function(port, addrFrom)
*/
ChipSet.prototype.outPPIB = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "PPI_B", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "PPI_B", Debugger.MESSAGE_CHIPSET);
this.updatePPIB(bOut);
if (this.kbd) this.kbd.setEnable((bOut & ChipSet.PPI_B.CLEAR_KBD)? false : true, (bOut & ChipSet.PPI_B.CLK_KBD)? true : false);
};
@ -3661,7 +3659,7 @@ ChipSet.prototype.inPPIC = function(port, addrFrom)
* The ROM BIOS polls this port incessantly during its memory tests, checking for memory parity errors
* (which of course we never report), so we further restrict these port messages to MESSAGE_MEM.
*/
this.messagePort(port, null, addrFrom, "PPI_C", ChipSet.MESSAGE_CHIPSET | ChipSet.MESSAGE_MEM, b);
this.messagePort(port, null, addrFrom, "PPI_C", Debugger.MESSAGE_CHIPSET | Debugger.MESSAGE_MEM, b);
return b;
};
@ -3675,7 +3673,7 @@ ChipSet.prototype.inPPIC = function(port, addrFrom)
*/
ChipSet.prototype.outPPIC = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "PPI_C", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "PPI_C", Debugger.MESSAGE_CHIPSET);
this.bPPIC = bOut;
};
@ -3690,7 +3688,7 @@ ChipSet.prototype.outPPIC = function(port, bOut, addrFrom)
ChipSet.prototype.inPPICtrl = function(port, addrFrom)
{
var b = this.bPPICtrl;
this.messagePort(port, null, addrFrom, "PPI_CTRL", ChipSet.MESSAGE_CHIPSET, b);
this.messagePort(port, null, addrFrom, "PPI_CTRL", Debugger.MESSAGE_CHIPSET, b);
return b;
};
@ -3704,7 +3702,7 @@ ChipSet.prototype.inPPICtrl = function(port, addrFrom)
*/
ChipSet.prototype.outPPICtrl = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "PPI_CTRL", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "PPI_CTRL", Debugger.MESSAGE_CHIPSET);
this.bPPICtrl = bOut;
};
@ -3719,7 +3717,7 @@ ChipSet.prototype.outPPICtrl = function(port, bOut, addrFrom)
ChipSet.prototype.in8042OutBuff = function(port, addrFrom)
{
var b = this.b8042OutBuff;
this.messagePort(port, null, addrFrom, "8042_OUTBUFF", ChipSet.MESSAGE_8042, b);
this.messagePort(port, null, addrFrom, "8042_OUTBUFF", Debugger.MESSAGE_8042, b);
this.b8042Status &= ~(ChipSet.KBC.STATUS.OUTBUFF_FULL | ChipSet.KBC.STATUS.OUTBUFF_DELAY);
var bNext = this.kbd && this.kbd.readScanCode(true);
if (bNext) this.set8042OutBuff(bNext);
@ -3740,7 +3738,7 @@ ChipSet.prototype.in8042OutBuff = function(port, addrFrom)
*/
ChipSet.prototype.out8042InBuffData = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "8042_INBUF.DATA", ChipSet.MESSAGE_8042);
this.messagePort(port, bOut, addrFrom, "8042_INBUF.DATA", Debugger.MESSAGE_8042);
if (this.b8042Status & ChipSet.KBC.STATUS.CMD_FLAG) {
switch (this.b8042InBuff) {
@ -3866,7 +3864,7 @@ ChipSet.prototype.in8042RWReg = function(port, addrFrom)
* Thanks to the WAITF function, this has become a very "busy" port, so let's not generate messages
* unless both MESSAGE_8042 *and* MESSAGE_LOG are set.
*/
this.messagePort(port, null, addrFrom, "8042_RWREG", ChipSet.MESSAGE_8042 | ChipSet.MESSAGE_LOG, b);
this.messagePort(port, null, addrFrom, "8042_RWREG", Debugger.MESSAGE_8042 | Debugger.MESSAGE_LOG, b);
return b;
};
@ -3880,7 +3878,7 @@ ChipSet.prototype.in8042RWReg = function(port, addrFrom)
*/
ChipSet.prototype.out8042RWReg = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "8042_RWREG", ChipSet.MESSAGE_8042);
this.messagePort(port, bOut, addrFrom, "8042_RWREG", Debugger.MESSAGE_8042);
this.updatePPIB(bOut);
};
@ -3894,7 +3892,7 @@ ChipSet.prototype.out8042RWReg = function(port, bOut, addrFrom)
*/
ChipSet.prototype.in8042Status = function(port, addrFrom)
{
this.messagePort(port, null, addrFrom, "8042_STATUS", ChipSet.MESSAGE_8042, this.b8042Status);
this.messagePort(port, null, addrFrom, "8042_STATUS", Debugger.MESSAGE_8042, this.b8042Status);
var b = this.b8042Status & 0xff;
/*
* There's code in the 5170 BIOS (F000:03BF) that writes an 8042 command (0xAA), waits for
@ -3932,7 +3930,7 @@ ChipSet.prototype.in8042Status = function(port, addrFrom)
*/
ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "8042_INBUFF.CMD", ChipSet.MESSAGE_8042);
this.messagePort(port, bOut, addrFrom, "8042_INBUFF.CMD", Debugger.MESSAGE_8042);
Component.assert(!(this.b8042Status & ChipSet.KBC.STATUS.INBUFF_FULL));
this.b8042InBuff = bOut;
@ -3961,7 +3959,7 @@ ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
case ChipSet.KBC.CMD.DISABLE_KBD: // 0xAD
this.set8042CmdData(this.b8042CmdData | ChipSet.KBC.DATA.CMD.NO_CLOCK);
if (DEBUG) this.messageDebugger("keyboard disabled", ChipSet.MESSAGE_KBD);
if (DEBUG) this.messageDebugger("keyboard disabled", Debugger.MESSAGE_KBD);
/*
* NOTE: The MODEL_5170 BIOS calls "KBD_RESET" (F000:17D2) while the keyboard interface is disabled,
* yet we must still deliver the Keyboard's CMDRES.BATSUCCESS response code? Seems like an odd thing for
@ -3971,13 +3969,13 @@ ChipSet.prototype.out8042InBuffCmd = function(port, bOut, addrFrom)
case ChipSet.KBC.CMD.ENABLE_KBD: // 0xAE
this.set8042CmdData(this.b8042CmdData & ~ChipSet.KBC.DATA.CMD.NO_CLOCK);
if (DEBUG) this.messageDebugger("keyboard re-enabled", ChipSet.MESSAGE_KBD);
if (DEBUG) this.messageDebugger("keyboard re-enabled", Debugger.MESSAGE_KBD);
break;
case ChipSet.KBC.CMD.SELF_TEST: // 0xAA
if (this.kbd) this.kbd.shiftScanCode(true);
this.set8042CmdData(this.b8042CmdData | ChipSet.KBC.DATA.CMD.NO_CLOCK);
if (DEBUG) this.messageDebugger("keyboard disabled on reset", ChipSet.MESSAGE_KBD);
if (DEBUG) this.messageDebugger("keyboard disabled on reset", Debugger.MESSAGE_KBD);
this.set8042OutBuff(ChipSet.KBC.DATA.SELF_TEST.OK);
this.set8042OutPort(ChipSet.KBC.OUTPORT.NO_RESET | ChipSet.KBC.OUTPORT.A20_ON);
break;
@ -4088,7 +4086,7 @@ ChipSet.prototype.set8042OutPort = function(b)
*/
ChipSet.prototype.inCMOSAddr = function(port, addrFrom)
{
this.messagePort(port, null, addrFrom, "CMOS_ADDR", ChipSet.MESSAGE_CMOS, this.bCMOSAddr);
this.messagePort(port, null, addrFrom, "CMOS_ADDR", Debugger.MESSAGE_CMOS, this.bCMOSAddr);
return this.bCMOSAddr;
};
@ -4102,7 +4100,7 @@ ChipSet.prototype.inCMOSAddr = function(port, addrFrom)
*/
ChipSet.prototype.outCMOSAddr = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "CMOS_ADDR", ChipSet.MESSAGE_CMOS);
this.messagePort(port, bOut, addrFrom, "CMOS_ADDR", Debugger.MESSAGE_CMOS);
this.bCMOSAddr = bOut;
this.bNMI = (bOut & ChipSet.CMOS.ADDR.NMI_DISABLE)? ChipSet.NMI.DISABLE : ChipSet.NMI.ENABLE;
};
@ -4119,7 +4117,7 @@ ChipSet.prototype.inCMOSData = function(port, addrFrom)
{
var bAddr = this.bCMOSAddr & ChipSet.CMOS.ADDR.MASK;
var bIn = (bAddr <= ChipSet.CMOS.ADDR.RTC_STATUSD? this.getRTCByte(bAddr) : this.abCMOSData[bAddr]);
this.messagePort(port, null, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CMOS, bIn);
this.messagePort(port, null, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", Debugger.MESSAGE_CMOS, bIn);
return bIn;
};
@ -4134,7 +4132,7 @@ ChipSet.prototype.inCMOSData = function(port, addrFrom)
ChipSet.prototype.outCMOSData = function(port, bOut, addrFrom)
{
var bAddr = this.bCMOSAddr & ChipSet.CMOS.ADDR.MASK;
this.messagePort(port, bOut, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", ChipSet.MESSAGE_CMOS);
this.messagePort(port, bOut, addrFrom, "CMOS_DATA[" + str.toHexByte(bAddr) + "]", Debugger.MESSAGE_CMOS);
this.abCMOSData[bAddr] = (bAddr <= ChipSet.CMOS.ADDR.RTC_STATUSD? this.setRTCByte(bAddr, bOut) : bOut);
};
@ -4148,7 +4146,7 @@ ChipSet.prototype.outCMOSData = function(port, bOut, addrFrom)
*/
ChipSet.prototype.inMFGData = function(port, addrFrom)
{
this.messagePort(port, null, addrFrom, "MFG_DATA", ChipSet.MESSAGE_CHIPSET, this.bMFGData);
this.messagePort(port, null, addrFrom, "MFG_DATA", Debugger.MESSAGE_CHIPSET, this.bMFGData);
return this.bMFGData;
};
@ -4162,7 +4160,7 @@ ChipSet.prototype.inMFGData = function(port, addrFrom)
*/
ChipSet.prototype.outMFGData = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "MFG_DATA", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "MFG_DATA", Debugger.MESSAGE_CHIPSET);
this.bMFGData = bOut;
};
@ -4178,7 +4176,7 @@ ChipSet.prototype.outMFGData = function(port, bOut, addrFrom)
*/
ChipSet.prototype.outNMI = function(port, bOut, addrFrom)
{
this.messagePort(port, bOut, addrFrom, "NMI", ChipSet.MESSAGE_CHIPSET);
this.messagePort(port, bOut, addrFrom, "NMI", Debugger.MESSAGE_CHIPSET);
this.bNMI = bOut;
};
@ -4206,7 +4204,7 @@ ChipSet.prototype.intBIOSRTC = function(addr)
{
if (DEBUGGER) {
var AH = this.cpu.regAX >> 8;
if (this.dbg && this.dbg.messageEnabled(ChipSet.MESSAGE_RTC)) {
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_RTC)) {
this.dbg.messageInt(ChipSet.BIOS.INT_RTC, addr);
this.cpu.addIntReturn(addr, function(chipset, nCycles) {
return function onBIOSRTCReturn(nLevel) {
@ -4272,13 +4270,13 @@ ChipSet.prototype.setSpeaker = function(fOn)
if (fOn) {
if (this.sourceAudio) {
this.sourceAudio['frequency']['value'] = freq;
this.messageDebugger("speaker set to " + freq + "hz", ChipSet.MESSAGE_SPEAKER);
this.messageDebugger("speaker set to " + freq + "hz", Debugger.MESSAGE_SPEAKER);
} else {
this.sourceAudio = this.contextAudio['createOscillator']();
this.sourceAudio['type'] = 1; // 0: sine wave, 1: square wave, 2: sawtooth wave, 3: triangle wave
this.sourceAudio['connect'](this.contextAudio['destination']);
this.sourceAudio['frequency']['value'] = freq;
this.messageDebugger("speaker on at " + freq + "hz", ChipSet.MESSAGE_SPEAKER);
this.messageDebugger("speaker on at " + freq + "hz", Debugger.MESSAGE_SPEAKER);
this.sourceAudio['noteOn'](0); // aka start()
}
} else {
@ -4286,11 +4284,11 @@ ChipSet.prototype.setSpeaker = function(fOn)
this.sourceAudio['noteOff'](0); // aka stop()
this.sourceAudio['disconnect'](); // QUESTION: is this automatic following a stop(), since this particular source cannot be started again?
delete this.sourceAudio; // QUESTION: ditto?
this.messageDebugger("speaker off at " + freq + "hz", ChipSet.MESSAGE_SPEAKER);
this.messageDebugger("speaker off at " + freq + "hz", Debugger.MESSAGE_SPEAKER);
}
}
} else if (fOn) {
this.messageDebugger("BEEP", ChipSet.MESSAGE_SPEAKER);
this.messageDebugger("BEEP", Debugger.MESSAGE_SPEAKER);
}
};
@ -4310,9 +4308,9 @@ ChipSet.prototype.setSpeaker = function(fOn)
ChipSet.prototype.messageDebugger = function(sMessage, bitsMessage, nIRQ)
{
if (DEBUGGER && this.dbg) {
if (bitsMessage == null) bitsMessage = ChipSet.MESSAGE_CHIPSET;
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE_CHIPSET;
if (nIRQ !== undefined) {
bitsMessage |= (nIRQ == ChipSet.IRQ.TIMER0? ChipSet.MESSAGE_TIMER : (nIRQ == ChipSet.IRQ.KBD? ChipSet.MESSAGE_KBD : (nIRQ == ChipSet.IRQ.FDC? ChipSet.MESSAGE_FDC : 0)));
bitsMessage |= (nIRQ == ChipSet.IRQ.TIMER0? Debugger.MESSAGE_TIMER : (nIRQ == ChipSet.IRQ.KBD? Debugger.MESSAGE_KBD : (nIRQ == ChipSet.IRQ.FDC? Debugger.MESSAGE_FDC : 0)));
}
if (this.dbg.messageEnabled(bitsMessage)) this.dbg.message(sMessage);
}
@ -4337,7 +4335,7 @@ ChipSet.prototype.messageDebugger = function(sMessage, bitsMessage, nIRQ)
ChipSet.prototype.messagePort = function(port, bOut, addrFrom, name, bitsMessage, bIn)
{
if (DEBUGGER && this.dbg) {
if (bitsMessage == null) bitsMessage = ChipSet.MESSAGE_CHIPSET;
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE_CHIPSET;
this.dbg.messagePort(this, port, bOut, addrFrom, name, bitsMessage, bIn);
}
};

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Computer component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -1186,7 +1185,7 @@ Computer.prototype.getComponentByType = function(sType, componentPrev)
Computer.prototype.messageDebugger = function(sMessage, fForce)
{
if (DEBUGGER && this.dbg) {
if (fForce || this.dbg.messageEnabled(this.dbg.MESSAGE_CMP)) this.dbg.message(sMessage);
if (fForce || this.dbg.messageEnabled(Debugger.MESSAGE_CMP)) this.dbg.message(sMessage);
}
};

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs CPU component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-04
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -914,7 +913,7 @@ CPU.prototype.calcRemainingTime = function()
*/
this.nRecalcCycles += this.nCyclesThisRun;
if (DEBUG && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_LOG) && msRemainsThisRun) {
if (DEBUG && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_LOG) && msRemainsThisRun) {
this.dbg.message("at " + this.msEndThisRun + "ms, calcRemainingTime returned " + msRemainsThisRun + "ms to sleep");
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Debugger component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-21
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -59,7 +58,7 @@ if (DEBUGGER) {
* commands: string containing zero or more commands, separated by ';'
*
* messages: string containing zero or more message categories to enable;
* multiple categories must be separated by '|' or ';'. Parsed by messageInit().
* multiple categories must be separated by '|' or ';'. Parsed by initMessages().
*
* The Debugger component is an optional component that implements a variety of user
* commands for controlling the CPU, dumping and editing memory, etc.
@ -142,7 +141,7 @@ function Debugger(parmsDbg)
/*
* Initialize Debugger message support
*/
this.messageInit(this, parmsDbg['messages'], true);
this.initMessages(parmsDbg['messages']);
/*
* This object is filled in by updateRegValues() whenever we need a fresh snapshot.
@ -170,6 +169,31 @@ function Debugger(parmsDbg)
} // endif DEBUGGER
}
Debugger.MESSAGE_MEM = 0x00000001;
Debugger.MESSAGE_PORT = 0x00000002;
Debugger.MESSAGE_DMA = 0x00000004;
Debugger.MESSAGE_PIC = 0x00000008;
Debugger.MESSAGE_TIMER = 0x00000010;
Debugger.MESSAGE_CMOS = 0x00000020;
Debugger.MESSAGE_RTC = 0x00000040;
Debugger.MESSAGE_8042 = 0x00000080;
Debugger.MESSAGE_CHIPSET = 0x00000100;
Debugger.MESSAGE_KBD = 0x00000200;
Debugger.MESSAGE_VIDEO = 0x00000400;
Debugger.MESSAGE_FDC = 0x00000800;
Debugger.MESSAGE_HDC = 0x00001000;
Debugger.MESSAGE_DISK = 0x00002000;
Debugger.MESSAGE_SERIAL = 0x00004000;
Debugger.MESSAGE_SPEAKER = 0x00008000;
Debugger.MESSAGE_STATE = 0x00010000;
Debugger.MESSAGE_MOUSE = 0x00020000;
Debugger.MESSAGE_CMP = 0x00040000;
Debugger.MESSAGE_CPU = 0x00080000;
Debugger.MESSAGE_DOS = 0x00100000;
Debugger.MESSAGE_INT = 0x00200000;
Debugger.MESSAGE_LOG = 0x01000000;
Debugger.MESSAGE_HALT = 0x10000000;
if (DEBUGGER) {
Component.subclass(Component, Debugger);
@ -414,34 +438,6 @@ if (DEBUGGER) {
Debugger.TYPE_286 = (Debugger.CPU_286 << 14);
Debugger.TYPE_386 = (Debugger.CPU_386 << 14);
/**
* @class Debugger
* @property {Object} MESSAGES
* @property {number} MESSAGE_MEM
* @property {number} MESSAGE_PORT
* @property {number} MESSAGE_DMA
* @property {number} MESSAGE_PIC
* @property {number} MESSAGE_TIMER
* @property {number} MESSAGE_CMOS
* @property {number} MESSAGE_RTC
* @property {number} MESSAGE_8042
* @property {number} MESSAGE_CHIPSET
* @property {number} MESSAGE_KBD
* @property {number} MESSAGE_VIDEO
* @property {number} MESSAGE_FDC
* @property {number} MESSAGE_HDC
* @property {number} MESSAGE_DISK
* @property {number} MESSAGE_SERIAL
* @property {number} MESSAGE_SPEAKER
* @property {number} MESSAGE_STATE
* @property {number} MESSAGE_MOUSE
* @property {number} MESSAGE_CMP
* @property {number} MESSAGE_CPU
* @property {number} MESSAGE_DOS
* @property {number} MESSAGE_INT
* @property {number} MESSAGE_LOG
*/
/*
* Message categories supported by the messageEnabled() function and other assorted message
* functions. Each category has a corresponding bit value that can be combined (ie, OR'ed) as
@ -452,46 +448,39 @@ if (DEBUGGER) {
* m port off
* ...
*
* Every caller of messageInit() receives all the MESSAGE_* properties as bit values; for example,
* after ChipSet calls messageInit(ChipSet), ChipSet.MESSAGE_MEM will be 0x0001, and so on.
*
* We also call messageInit() on behalf the current Debugger instance so that other components have
* the option of accessing the properties indirectly (eg, this.dbg.MESSAGE_MEM), since the Debugger
* component is not a required component.
*
* NOTE: The order of these categories can be rearranged, alphabetized, etc, as desired; just be
* aware that changing the bit values could break saved Debugger states (not a huge concern, just
* something to be aware of).
*/
Debugger.MESSAGES = {
MESSAGE_MEM: {BIT: 0x00000001, OP: "mem"},
MESSAGE_PORT: {BIT: 0x00000002, OP: "port"},
MESSAGE_DMA: {BIT: 0x00000004, OP: "dma"},
MESSAGE_PIC: {BIT: 0x00000008, OP: "pic"},
MESSAGE_TIMER: {BIT: 0x00000010, OP: "timer"},
MESSAGE_CMOS: {BIT: 0x00000020, OP: "cmos"},
MESSAGE_RTC: {BIT: 0x00000040, OP: "rtc"},
MESSAGE_8042: {BIT: 0x00000080, OP: "8042"},
MESSAGE_CHIPSET:{BIT: 0x00000100, OP: "chipset"}, // ie, anything else in ChipSet besides DMA, PIC, TIMER, CMOS, RTC and 8042
MESSAGE_KBD: {BIT: 0x00000200, OP: "keyboard"},
MESSAGE_VIDEO: {BIT: 0x00000400, OP: "video"},
MESSAGE_FDC: {BIT: 0x00000800, OP: "fdc"},
MESSAGE_HDC: {BIT: 0x00001000, OP: "hdc"},
MESSAGE_DISK: {BIT: 0x00002000, OP: "disk"},
MESSAGE_SERIAL: {BIT: 0x00004000, OP: "serial"},
MESSAGE_SPEAKER:{BIT: 0x00008000, OP: "speaker"},
MESSAGE_STATE: {BIT: 0x00010000, OP: "state"},
MESSAGE_MOUSE: {BIT: 0x00020000, OP: "mouse"},
MESSAGE_CMP: {BIT: 0x00040000, OP: "computer"},
MESSAGE_CPU: {BIT: 0x00080000, OP: "cpu"},
MESSAGE_DOS: {BIT: 0x00100000, OP: "dos"},
MESSAGE_INT: {BIT: 0x00200000, OP: "int"},
MESSAGE_LOG: {BIT: 0x01000000, OP: "log"},
"mem": Debugger.MESSAGE_MEM,
"port": Debugger.MESSAGE_PORT,
"dma": Debugger.MESSAGE_DMA,
"pic": Debugger.MESSAGE_PIC,
"timer": Debugger.MESSAGE_TIMER,
"cmos": Debugger.MESSAGE_CMOS,
"rtc": Debugger.MESSAGE_RTC,
"8042": Debugger.MESSAGE_8042,
"chipset": Debugger.MESSAGE_CHIPSET, // ie, anything else in ChipSet besides DMA, PIC, TIMER, CMOS, RTC and 8042
"keyboard": Debugger.MESSAGE_KBD,
"video": Debugger.MESSAGE_VIDEO,
"fdc": Debugger.MESSAGE_FDC,
"hdc": Debugger.MESSAGE_HDC,
"disk": Debugger.MESSAGE_DISK,
"serial": Debugger.MESSAGE_SERIAL,
"speaker": Debugger.MESSAGE_SPEAKER,
"state": Debugger.MESSAGE_STATE,
"mouse": Debugger.MESSAGE_MOUSE,
"computer": Debugger.MESSAGE_CMP,
"cpu": Debugger.MESSAGE_CPU,
"dos": Debugger.MESSAGE_DOS,
"int": Debugger.MESSAGE_INT,
"log": Debugger.MESSAGE_LOG,
/*
* Now we turn to message actions rather than message types; for example, setting "halt"
* on or off doesn't enable "halt" messages, but rather halts the CPU on any above message.
*/
MESSAGE_HALT: {BIT: 0x10000000, OP: "halt"}
"halt": Debugger.MESSAGE_HALT
};
/*
@ -1288,27 +1277,24 @@ if (DEBUGGER) {
};
/**
* messageInit(o, sEnable, fDebugger)
* initMessages(sEnable)
*
* @this {Debugger}
* @param {Object} o
* @param {string} [sEnable] contains zero or more message categories to enable, separated by '|' or ';'
* @param {boolean} [fDebugger] is true to perform Debugger-specific initialization (eg, array of dumpers)
* @param {string|undefined} sEnable contains zero or more message categories to enable, separated by '|' or ';'
*/
Debugger.prototype.messageInit = function(o, sEnable, fDebugger)
Debugger.prototype.initMessages = function(sEnable)
{
if (fDebugger) this.afnDumpers = [];
var bitsEnable = 0;
this.afnDumpers = [];
this.bitsMessageEnabled = 0;
var aEnable = this.parseCommand(sEnable);
if (aEnable.length) {
for (var m in Debugger.MESSAGES) {
o[m] = Debugger.MESSAGES[m].BIT;
if (aEnable.indexOf(Debugger.MESSAGES[m].OP) >= 0) {
bitsEnable |= Debugger.MESSAGES[m].BIT;
this.println(Debugger.MESSAGES[m].OP + " messages enabled");
if (aEnable.indexOf(m) >= 0) {
this.bitsMessageEnabled |= Debugger.MESSAGES[m];
this.println(m + " messages enabled");
}
}
}
if (this.bitsMessageEnabled === undefined) this.bitsMessageEnabled = 0;
this.bitsMessageEnabled |= bitsEnable;
};
/**
@ -1322,7 +1308,7 @@ if (DEBUGGER) {
Debugger.prototype.messageDump = function(bitMessage, fnDumper)
{
for (var m in Debugger.MESSAGES) {
if (bitMessage == Debugger.MESSAGES[m].BIT) {
if (bitMessage == Debugger.MESSAGES[m]) {
this.afnDumpers[m] = fnDumper;
return true;
}
@ -1435,7 +1421,7 @@ if (DEBUGGER) {
Debugger.prototype.messageMem = function(component, addr, fWrite, addrFrom, name, bitsMessage)
{
if (!bitsMessage) bitsMessage = 0;
bitsMessage |= Debugger.MESSAGES.MESSAGE_MEM.BIT;
bitsMessage |= Debugger.MESSAGES_MEM;
if (addrFrom == null || (this.bitsMessageEnabled & bitsMessage) == bitsMessage) {
var b = this.bus.getByteDirect(addr);
this.message(component.idComponent + "." + (fWrite? "setByte" : "getByte") + "(0x" + str.toHexAddr(addr) + ")" + (addrFrom != null? (" at " + str.toHexAddr(addrFrom)) : "") + ": " + (name? (name + "=") : "") + str.toHexByte(b));
@ -1458,7 +1444,7 @@ if (DEBUGGER) {
Debugger.prototype.messagePort = function(component, port, bOut, addrFrom, name, bitsMessage, bIn)
{
if (!bitsMessage) bitsMessage = 0;
bitsMessage |= Debugger.MESSAGES.MESSAGE_PORT.BIT;
bitsMessage |= Debugger.MESSAGE_PORT;
if (addrFrom == null || (this.bitsMessageEnabled & bitsMessage) == bitsMessage) {
var segFrom = null;
if (addrFrom != null) {
@ -1480,7 +1466,7 @@ if (DEBUGGER) {
this.println(sMessage); // + " (" + this.cpu.getCycles() + " cycles)"
if (this.cpu) {
if (this.bitsMessageEnabled & Debugger.MESSAGES.MESSAGE_HALT.BIT) {
if (this.bitsMessageEnabled & Debugger.MESSAGE_HALT) {
this.cpu.haltCPU();
}
/*
@ -1556,7 +1542,7 @@ if (DEBUGGER) {
*/
Debugger.prototype.intDOSCall = function(addr)
{
if (this.messageEnabled(this.MESSAGE_DOS | this.MESSAGE_INT)) this.messageInt(Debugger.INT_DOS, addr);
if (this.messageEnabled(Debugger.MESSAGE_DOS | Debugger.MESSAGE_INT)) this.messageInt(Debugger.INT_DOS, addr);
return true;
};
@ -1932,7 +1918,7 @@ if (DEBUGGER) {
*/
Debugger.prototype.checksEnabled = function(fBreak)
{
return ((DEBUG && !fBreak)? true : (this.aBreakExec.length > 1 || this.messageEnabled(this.MESSAGE_INT) /* || this.aBreakRead.length > 1 || this.aBreakWrite.length > 1 */));
return ((DEBUG && !fBreak)? true : (this.aBreakExec.length > 1 || this.messageEnabled(Debugger.MESSAGE_INT) /* || this.aBreakRead.length > 1 || this.aBreakWrite.length > 1 */));
};
/**
@ -2917,7 +2903,6 @@ if (DEBUGGER) {
* @param {string|undefined} sValue
* @param {string} [sName] is the name of the value, if any
* @return {number|undefined} numeric value, or undefined if sValue is either undefined or invalid
* @suppress {checkTypes}
*/
Debugger.prototype.parseValue = function(sValue, sName)
{
@ -3421,7 +3406,7 @@ if (DEBUGGER) {
for (m in Debugger.MESSAGES) {
if (this.afnDumpers[m]) {
if (sDumpers.length) sDumpers += ",";
sDumpers = sDumpers + Debugger.MESSAGES[m].OP;
sDumpers = sDumpers + m;
}
}
sDumpers += ",state";
@ -3441,7 +3426,7 @@ if (DEBUGGER) {
return;
}
for (m in Debugger.MESSAGES) {
if (sAddr == Debugger.MESSAGES[m].OP) {
if (sAddr == m) {
var fnDumper = this.afnDumpers[m];
if (fnDumper) {
fnDumper(sLen);
@ -3923,8 +3908,8 @@ if (DEBUGGER) {
sCategory = null;
} else {
for (m in Debugger.MESSAGES) {
if (sCategory == Debugger.MESSAGES[m].OP) {
bitsMessage = Debugger.MESSAGES[m].BIT;
if (sCategory == m) {
bitsMessage = Debugger.MESSAGES[m];
fCriteria = !!(this.bitsMessageEnabled & bitsMessage);
break;
}
@ -3952,13 +3937,13 @@ if (DEBUGGER) {
var n = 0;
var sCategories = "";
for (m in Debugger.MESSAGES) {
if (!sCategory || sCategory == Debugger.MESSAGES[m].OP) {
var bitMessage = Debugger.MESSAGES[m].BIT;
if (!sCategory || sCategory == m) {
var bitMessage = Debugger.MESSAGES[m];
var fEnabled = !!(this.bitsMessageEnabled & bitMessage);
if (fCriteria !== null && fCriteria != fEnabled) continue;
if (sCategories) sCategories += ",";
if (!(++n % 10)) sCategories += "\n\t"; // jshint ignore:line
sCategories += Debugger.MESSAGES[m].OP;
sCategories += m;
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements disk image support for both FDC and HDC.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Nov-26
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -685,7 +684,7 @@ Disk.prototype.doneLoad = function(sDiskFile, sDiskData, nErrorCode, sDiskPath)
* conversion to a forward-compatible 'data' array.
*/
else {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_DISK)) {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_DISK)) {
var sCylinders = aDiskData.length + " track" + (aDiskData.length > 1 ? "s" : "");
var nHeads = aDiskData[0].length;
var sHeads = nHeads + " head" + (nHeads > 1 ? "s" : "");
@ -1528,7 +1527,7 @@ Disk.prototype.restore = function(deltas)
Disk.prototype.messageDebugger = function(sMessage)
{
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_DISK)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_DISK)) {
this.dbg.message(sMessage);
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Floppy Drive Controller (FDC) component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Aug-09
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -561,7 +560,6 @@ FDC.prototype.initBus = function(cmp, bus, cpu, dbg)
bus.addPortInputTable(this, FDC.aPortInput);
bus.addPortOutputTable(this, FDC.aPortOutput);
if (DEBUGGER) {
if (dbg) dbg.messageInit(FDC);
cpu.addIntNotify(FDC.BIOS.INT_DISKETTE, this, this.intBIOSDiskette);
}
@ -1879,7 +1877,7 @@ FDC.prototype.popCmd = function(name)
{
Component.assert((!this.regDataIndex || name !== undefined) && this.regDataIndex < this.regDataTotal);
var bCmd = this.regDataArray[this.regDataIndex];
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(FDC.MESSAGE_FDC)) {
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_FDC)) {
var bCmdMasked = bCmd & FDC.REG_DATA.CMD.MASK;
if (!name && !this.regDataIndex && FDC.aCmdInfo[bCmdMasked]) name = FDC.aCmdInfo[bCmdMasked].name;
this.dbg.message("FDC.CMD[" + (name || this.regDataIndex) + "]: 0x" + str.toHexByte(bCmd));
@ -1933,7 +1931,7 @@ FDC.prototype.beginResult = function()
*/
FDC.prototype.pushResult = function(bResult, name)
{
if (DEBUG) this.messageDebugger("FDC.RES[" + (name || this.regDataTotal) + "]: 0x" + str.toHexByte(bResult), FDC.MESSAGE_FDC);
if (DEBUG) this.messageDebugger("FDC.RES[" + (name || this.regDataTotal) + "]: 0x" + str.toHexByte(bResult), Debugger.MESSAGE_FDC);
this.regDataArray[this.regDataTotal++] = bResult;
};
@ -2321,7 +2319,7 @@ FDC.prototype.intBIOSDiskette = function(addr)
{
if (DEBUGGER) {
var DL = this.cpu.regDX & 0xff;
if (this.dbg && this.dbg.messageEnabled(FDC.MESSAGE_FDC | FDC.MESSAGE_INT) && DL < 0x80) {
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_FDC | Debugger.MESSAGE_INT) && DL < 0x80) {
this.dbg.messageInt(FDC.BIOS.INT_DISKETTE, addr);
this.cpu.addIntReturn(addr, function(fdc, nCycles) {
return function onBIOSDisketteReturn(nLevel) {
@ -2345,7 +2343,7 @@ FDC.prototype.intBIOSDiskette = function(addr)
FDC.prototype.messageDebugger = function(sMessage, bitsMessage)
{
if (DEBUGGER && this.dbg) {
if (bitsMessage == null) bitsMessage = FDC.MESSAGE_FDC;
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE_FDC;
if (this.dbg.messageEnabled(bitsMessage)) this.dbg.message(sMessage);
}
};
@ -2364,7 +2362,7 @@ FDC.prototype.messageDebugger = function(sMessage, bitsMessage)
*/
FDC.prototype.messagePort = function(port, bOut, addrFrom, name, bIn)
{
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, FDC.MESSAGE_FDC, bIn);
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE_FDC, bIn);
};
/*

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Hard Drive Controller (HDC) component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Nov-26
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -536,7 +535,6 @@ HDC.prototype.initBus = function(cmp, bus, cpu, dbg)
bus.addPortOutputTable(this, this.fATC? HDC.aATCPortOutput : HDC.aXTCPortOutput);
if (DEBUGGER) {
if (dbg) dbg.messageInit(HDC);
cpu.addIntNotify(HDC.BIOS.INT_DISK, this, this.intBIOSDisk);
cpu.addIntNotify(HDC.BIOS.INT_DISKETTE, this, this.intBIOSDiskette);
}
@ -1795,7 +1793,7 @@ HDC.prototype.doATCommand = function()
this.drive = drive;
}
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(bCmd) + "): " + HDC.aATCCommands[bCmd], HDC.MESSAGE_PORT | HDC.MESSAGE_HDC);
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(bCmd) + "): " + HDC.aATCCommands[bCmd], Debugger.MESSAGE_PORT | Debugger.MESSAGE_HDC);
switch (bCmd & HDC.ATC.COMMAND.MASK) {
@ -1881,7 +1879,7 @@ HDC.prototype.doATCommand = function()
default:
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(this.regCommand) + "): " + (bCmd < 0? ("invalid drive (" + iDrive + ")") : "unsupported operation"));
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(HDC.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
break;
}
@ -2050,7 +2048,7 @@ HDC.prototype.doXTCommand = function()
default:
if (DEBUG) this.messageDebugger("HDC.doXTCommand(" + str.toHexByte(bCmdOrig) + "): " + (bCmd < 0? ("invalid drive (" + iDrive + ")") : "unsupported operation"));
this.beginResult(HDC.XTC.DATA.STATUS_ERROR | bDrive);
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(HDC.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
break;
}
}
@ -2068,7 +2066,7 @@ HDC.prototype.popCmd = function()
var bCmdIndex = this.regDataIndex;
if (bCmdIndex < this.regDataTotal) {
bCmd = this.regDataArray[this.regDataIndex++];
if (DEBUG) this.messageDebugger("HDC.CMD[" + bCmdIndex + "]: 0x" + str.toHexByte(bCmd) + (!bCmdIndex && HDC.aXTCCommands[bCmd]? (" (" + HDC.aXTCCommands[bCmd] + ")") : ""), (bCmdIndex > 0? HDC.MESSAGE_PORT : 0) | HDC.MESSAGE_HDC);
if (DEBUG) this.messageDebugger("HDC.CMD[" + bCmdIndex + "]: 0x" + str.toHexByte(bCmd) + (!bCmdIndex && HDC.aXTCCommands[bCmd]? (" (" + HDC.aXTCCommands[bCmd] + ")") : ""), (bCmdIndex > 0? Debugger.MESSAGE_PORT : 0) | Debugger.MESSAGE_HDC);
}
return bCmd;
};
@ -2104,7 +2102,7 @@ HDC.prototype.beginResult = function(bResult)
*/
HDC.prototype.pushResult = function(bResult)
{
if (DEBUG) this.messageDebugger("HDC.RES[" + this.regDataTotal + "]: 0x" + str.toHexByte(bResult), (this.regDataTotal > 0? HDC.MESSAGE_PORT : 0) | HDC.MESSAGE_HDC);
if (DEBUG) this.messageDebugger("HDC.RES[" + this.regDataTotal + "]: 0x" + str.toHexByte(bResult), (this.regDataTotal > 0? Debugger.MESSAGE_PORT : 0) | Debugger.MESSAGE_HDC);
this.regDataArray[this.regDataTotal++] = bResult;
};
@ -2634,7 +2632,7 @@ HDC.prototype.intBIOSDisk = function(addr)
var DL = this.cpu.regDX & 0xff;
if (!AH && DL > 0x80) this.iDriveAllowFail = DL - 0x80;
if (DEBUGGER) {
if (this.dbg && this.dbg.messageEnabled(HDC.MESSAGE_HDC | HDC.MESSAGE_INT) && DL >= 0x80) {
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC | Debugger.MESSAGE_INT) && DL >= 0x80) {
this.dbg.messageInt(HDC.BIOS.INT_DISK, addr);
this.cpu.addIntReturn(addr, function (hdc, nCycles) {
return function onBIOSDiskReturn(nLevel) {
@ -2697,7 +2695,7 @@ HDC.prototype.intBIOSDiskette = function(addr)
HDC.prototype.messageDebugger = function(sMessage, bitsMessage)
{
if (DEBUGGER && this.dbg) {
if (bitsMessage == null) bitsMessage = HDC.MESSAGE_HDC;
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE_HDC;
if (this.dbg.messageEnabled(bitsMessage)) this.dbg.message(sMessage);
}
};
@ -2716,7 +2714,7 @@ HDC.prototype.messageDebugger = function(sMessage, bitsMessage)
*/
HDC.prototype.messagePort = function(port, bOut, addrFrom, name, bIn)
{
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, HDC.MESSAGE_HDC, bIn);
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE_HDC, bIn);
};
/*

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Keyboard component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-20
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -1361,7 +1360,7 @@ Keyboard.prototype.keyEventSimulate = function(charCode, fDown, simCode)
Keyboard.prototype.messageDebugger = function(sMessage, fPort)
{
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_KBD | (fPort ? this.dbg.MESSAGE_PORT : 0))) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_KBD | (fPort ? Debugger.MESSAGE_PORT : 0))) {
this.dbg.message(sMessage);
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs "physical" Memory component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-04
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -167,7 +166,7 @@ Memory.prototype = {
* @return {number}
*/
readNone: function(off) {
if (DEBUGGER && this.dbg.messageEnabled(this.dbg.MESSAGE_MEM) && !off) {
if (DEBUGGER && this.dbg.messageEnabled(Debugger.MESSAGE_MEM) && !off) {
this.dbg.message("attempt to read invalid block %" + str.toHex(this.addr) + " from " + str.toHexAddr(this.cpu.regIP, this.cpu.segCS.sel));
}
return 0;
@ -180,7 +179,7 @@ Memory.prototype = {
* @param {number} v (could be either a byte or word value, since we use the same handler for both kinds of accesses)
*/
writeNone: function(off, v) {
if (DEBUGGER && this.dbg.messageEnabled(this.dbg.MESSAGE_MEM) && !off) {
if (DEBUGGER && this.dbg.messageEnabled(Debugger.MESSAGE_MEM) && !off) {
this.dbg.message("attempt to write 0x" + str.toHexWord(v) + " to invalid block %" + str.toHex(this.addr) + " from " + str.toHexAddr(this.cpu.regIP, this.cpu.segCS.sel));
}
},

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Mouse component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jul-01
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -173,9 +172,6 @@ Mouse.prototype.initBus = function(cmp, bus, cpu, dbg) {
this.bus = bus;
this.cpu = cpu;
this.dbg = dbg;
if (DEBUGGER && dbg) {
dbg.messageInit(Mouse);
}
};
/**
@ -556,7 +552,7 @@ Mouse.prototype.notifyMCR = function(bMCR) {
*/
Mouse.prototype.messageDebugger = function(sMessage) {
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_MOUSE)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_MOUSE)) {
this.dbg.message(sMessage);
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Panel component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-19
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs RAM component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs ROM component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs SerialPort component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jul-01
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -337,9 +336,6 @@ SerialPort.prototype.initBus = function(cmp, bus, cpu, dbg) {
this.cpu = cpu;
this.dbg = dbg;
this.chipset = cmp.getComponentByType("ChipSet");
if (DEBUGGER && dbg) {
dbg.messageInit(SerialPort);
}
bus.addPortInputTable(this, SerialPort.aPortInput, this.portBase);
bus.addPortOutputTable(this, SerialPort.aPortOutput, this.portBase);
this.setReady();
@ -721,7 +717,7 @@ SerialPort.prototype.echoByte = function(b) {
*/
SerialPort.prototype.messageDebugger = function(sMessage) {
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_SERIAL)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_SERIAL)) {
this.dbg.message(sMessage);
}
}
@ -741,7 +737,7 @@ SerialPort.prototype.messageDebugger = function(sMessage) {
*/
SerialPort.prototype.messagePort = function(port, bOut, addrFrom, name, bIn) {
if (DEBUGGER && this.dbg) {
this.dbg.messagePort(this, port, bOut, addrFrom, name, this.dbg.MESSAGE_SERIAL, bIn);
this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE_SERIAL, bIn);
}
};

View file

@ -381,7 +381,7 @@ State.prototype = {
*/
messageDebugger: function(sMessage) {
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_STATE)) this.dbg.message(sMessage);
if (this.dbg.messageEnabled(Debugger.MESSAGE_STATE)) this.dbg.message(sMessage);
}
}
};

View file

@ -2,7 +2,6 @@
* @fileoverview Implements the PCjs Video component.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Jun-15
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -1955,9 +1954,8 @@ Video.prototype.initBus = function(cmp, bus, cpu, dbg)
if (DEBUGGER && dbg) {
var video = this;
dbg.messageInit(Video);
this.cpu.addIntNotify(Video.BIOS.INT_VIDEO, this, this.intBIOSVideo);
dbg.messageDump(Video.MESSAGE_VIDEO, function onDumpVideo(sParm) {
dbg.messageDump(Debugger.MESSAGE_VIDEO, function onDumpVideo(sParm) {
video.dumpVideo(sParm);
});
}
@ -1990,7 +1988,7 @@ Video.prototype.initBus = function(cmp, bus, cpu, dbg)
Video.prototype.intBIOSVideo = function(addr)
{
if (DEBUGGER) {
if (this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_INT)) {
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_VIDEO | Debugger.MESSAGE_INT)) {
this.dbg.messageInt(Video.BIOS.INT_VIDEO, addr);
this.cpu.addIntReturn(addr, function (video, nCycles) {
return function onBIOSVideoReturn(nLevel) {
@ -3743,7 +3741,7 @@ Video.prototype.updateChar = function(col, row, data, context)
this.contextScreen.fillRect(xDst, yDst, this.cxScreenCell, this.cyScreenCell);
}
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_LOG)) {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_VIDEO | Debugger.MESSAGE_LOG)) {
this.log("updateCharBgnd(" + col + "," + row + "," + bChar + "): filled " + xDst + "," + yDst);
}
@ -3754,7 +3752,7 @@ Video.prototype.updateChar = function(col, row, data, context)
var xSrcFgnd = (bChar & 0xf) * font.cxCell;
var ySrcFgnd = (bChar >> 4) * font.cyCell;
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_LOG)) {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_VIDEO | Debugger.MESSAGE_LOG)) {
this.log("updateCharFgnd(" + col + "," + row + "," + bChar + "): draw from " + xSrcFgnd + "," + ySrcFgnd + " (" + font.cxCell + "," + font.cyCell + ") to " + xDst + "," + yDst);
}
@ -4927,7 +4925,7 @@ Video.prototype.dumpVideo = function(sParm)
Video.prototype.messageDebugger = function(sMessage, fForce)
{
if (DEBUGGER && this.dbg) {
if (fForce || this.dbg.messageEnabled(Video.MESSAGE_VIDEO)) {
if (fForce || this.dbg.messageEnabled(Debugger.MESSAGE_VIDEO)) {
this.dbg.message(sMessage);
}
}
@ -4948,7 +4946,7 @@ Video.prototype.messageDebugger = function(sMessage, fForce)
Video.prototype.messagePort = function(port, bOut, addrFrom, name, bIn)
{
if (DEBUGGER && this.dbg) {
this.dbg.messagePort(this, port, bOut, addrFrom, name, Video.MESSAGE_VIDEO, bIn);
this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE_VIDEO, bIn);
}
};

View file

@ -2,7 +2,6 @@
* @fileoverview Defines PCjs x86 constants.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 8086/8088 CPU logic.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -925,7 +924,7 @@ X86CPU.prototype.checkIntNotify = function(nInt)
* Enabling MESSAGE_INT messages is one of the criteria that's also included in fDebugCheck, so for maximum
* speed, we check fDebugCheck first.
*/
if (this.dbg.messageEnabled(this.dbg.MESSAGE_INT)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_INT)) {
this.dbg.messageInt(nInt, this.regEIP);
this.addIntReturn(this.regEIP, function(cpu, nCycles) {
return function onIntReturn(nLevel) {
@ -2472,7 +2471,7 @@ X86CPU.prototype.stepCPU = function(nMinCycles)
* One exception I make here is when you've asked the Debugger to display PIC messages, the idea being that
* if you're watching the PIC that closely, then you want to hardware interrupts to occur regardless.
*/
if (!nMinCycles && this.dbg && !this.dbg.messageEnabled(this.dbg.MESSAGE_PIC)) this.opFlags |= X86.OPFLAG.NOINTR;
if (!nMinCycles && this.dbg && !this.dbg.messageEnabled(Debugger.MESSAGE_PIC)) this.opFlags |= X86.OPFLAG.NOINTR;
do {
var opPrefixes = this.opFlags & X86.OPFLAG.PREFIXES;
@ -2579,7 +2578,7 @@ X86CPU.prototype.stepCPU = function(nMinCycles)
X86CPU.prototype.messageDebugger = function(sMessage)
{
if (DEBUGGER && this.dbg) {
if (this.dbg.messageEnabled(this.dbg.MESSAGE_MEM)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_MEM)) {
this.dbg.message(sMessage);
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 8086 group opcode helpers.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 8086 opcode helpers.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -447,7 +446,7 @@ var X86Help = {
/*
* NOTE: By using Debugger.message(), we have the option of setting "m halt on" and halting on messages like this.
*/
if (this.dbg.messageEnabled(this.dbg.MESSAGE_CPU)) {
if (this.dbg.messageEnabled(Debugger.MESSAGE_CPU)) {
this.dbg.message("Fault 0x" + str.toHexByte(nFault) + (nError != null? " (0x" + str.toHexWord(nError) + ")" : "") + " on opcode 0x" + str.toHexByte(this.bus.getByteDirect(this.regEIP)) + " at " + str.toHexAddr(this.regIP, this.segCS.sel));
}
}

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 8086 mode-byte decoding.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 0x0F two-byte opcodes
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs 8086 opcode decoding.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Sep-05
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview Implements PCjs X86 Segment objects
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2014-Sep-10
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>

View file

@ -2,7 +2,6 @@
* @fileoverview C1Pjs and PCjs embedding functionality.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* @suppress {missingProperties}
* Created 2012-Aug-28
*
* Copyright © 2012-2014 Jeff Parsons <Jeff@pcjs.org>
@ -140,10 +139,10 @@ function parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done
* browsers do that, that's not helpful.
*
* The best I can do at this stage (assuming web.loadResource() didn't drop any error information on the floor)
* is verify that the requested resource "looks like" valid XML (in other words, it begins with a "<").
* is verify that the requested resource "looks like" valid XML (in other words, it begins with a '<').
*/
var xmlDoc = null;
if (sXML.indexOf("<") === 0) {
if (sXML.charAt(0) == '<') {
try {
if (window.ActiveXObject || "ActiveXObject" in window) { // second test is required for IE11 on Windows 8.1
/*
@ -154,7 +153,7 @@ function parseXML(sXML, sXMLFile, idMachine, sStateFile, fResolve, display, done
}
xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(sXML);
xmlDoc['loadXML'](sXML);
} else {
xmlDoc = (new window.DOMParser()).parseFromString(sXML, "text/xml");
}
@ -390,7 +389,7 @@ function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile
displayError("failed to load XML file: " + sXMLFile);
}
};
if (sXMLFile.substr(0, 1) != "<") {
if (sXMLFile.charAt(0) != '<') {
loadXML(sXMLFile, idElement, sStateFile, true, displayMessage, loadXSL);
} else {
parseXML(sXMLFile, null, idElement, sStateFile, false, displayMessage, loadXSL);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,257 @@
@CHARSET "UTF-8";
/**
@author Jeff Parsons (@jeffpar)
@website http://www.pcjs.org/
@created 2013-05-05
@modified 2014-02-23
@license http://www.gnu.org/licenses/gpl.html
*/
body {
margin: 0;
background: #1d1d1d;
}
h1, h2 {
margin-top: 0;
color: #cccccc;
}
h1, h2, h3, h4 {
word-wrap: break-word;
}
h4 a {
color: #cccccc !important;
}
p {
line-height: 1.5em;
}
a img {
vertical-align: bottom;
}
pre, code {
color: #000000;
background-color: #cccccc;
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-size: 12px;
}
pre {
margin: 1em 2em;
padding: 1em;
border-radius: 5px;
overflow: auto;
}
code {
padding: 1px;
}
pre a, code a {
color: #006400 !important;
}
.common {
width: 100%;
margin: 0 auto;
color: #cccccc;
}
.common a {
color: #7fc07f;
text-decoration: none;
}
.common hr {
border-color: #808080;
}
.common a:hover {
text-decoration: underline;
}
.common, .machine {
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-size: 15px;
}
.machine {
margin: 15px;
overflow: hidden;
}
.c1pjs {
overflow: visible;
}
.machine-placeholder {
text-align: center;
font-weight: bold;
}
.common-top {
background: #1d1d1d;
font-size: small;
}
.common-top-left {
float: left;
width: 60%;
}
.common-top-left ul {
line-height: 1.5em;
list-style-type: none;
margin: 0;
padding: 1em 1em 1em 9px;
overflow: hidden;
}
.common-top-left ul li {
display: block;
float: left;
}
.common-top-left ul li a {
border-right: 1px solid #6f6f6f;
padding: 2px 6px 2px 6px;
}
.common-top-left ul li:last-child a {
border-right: none;
}
.common-top-right {
float: right;
width: 40%;
}
.common-top-right p {
float: right;
margin: 0;
padding: 1em;
}
.common-middle {
clear: both;
padding: 1px 1em 1px 1em;
background: #303030;
}
.common-sidebar {
float: left;
font-size: small;
width: 140px;
padding-bottom: 20px;
overflow: hidden;
word-wrap: break-word;
}
.common-list {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list li {
padding-bottom: 7px;
}
.common-list-data {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list-data li {
line-height: 1.5em;
}
.common-list-data-items, .common-list-data-subitems {
font-size: x-small;
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.common-list-data-items li, .common-list-data-subitems li {
padding-bottom: 0;
}
.common-main {
margin-left: 150px;
}
.common-image-gallery {
margin: 0 auto;
text-align: center;
}
.common-image-gallery:after {
content: '';
display: block;
}
.common-image-frame {
display: inline-block;
margin: 8px;
text-align: center;
}
.common-image-link {
padding: 5px;
border: 1px solid black;
border-radius: 5px;
background-color: #FAEBD7;
}
.common-image-label {
font-size: x-small;
}
.common-bottom {
clear: both;
padding-top: 1em;
}
.common-bottom:after {
content: '';
display: block;
clear: both;
}
.common-reference {
float: left;
font-size: x-small;
}
.common-reference a {
text-decoration: none;
}
.common-copyright {
float: right;
font-size: x-small;
}
.common-copyright a {
text-decoration: none;
}
.md-list {
}
.md-list li {
line-height: 1.5em;
margin-bottom: 1em;
}
.md-list li p {
padding-left: 2em;
}
.md-list-compact {
}
.md-list-compact li {
margin-bottom: 0;
}
.md-list-none {
list-style-type: none;
padding-left: 2em;
}
.md-list-none li {
margin-bottom: 0;
}
@media screen and (max-width: 900px) {
.common-sidebar {
width: 100%;
}
.common-list {
padding-left: 0;
}
.common-list-data {
padding-left: 0;
}
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
width: 130px;
float: left;
overflow: hidden;
vertical-align: top;
padding-right: 1em;
margin-top: 0;
}
.common-list-data-subitems {
display: none;
}
.common-main {
clear: both;
margin-left: 0;
padding-left: 0;
padding-right: 0;
}
.md-list-none {
padding-left: 1em;
}
}

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="commonStyles">
<meta charset="utf-8"/>
<link rel="shortcut icon" href="/versions/images/current/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/versions/c1pjs/1.15.8/common.css"/>
</xsl:template>
<xsl:template name="commonTop">
<div class="common-top">
<div class="common-top-left">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/apps/pc/">Apps</a></li>
<li><a href="/disks/pc/">Disks</a></li>
<li><a href="/configs/">Machines</a></li>
<li><a href="/docs/">Docs</a></li>
<li><a href="/pubs/">Pubs</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/docs/about/">About</a></li>
</ul>
</div>
<div class="common-top-right">
<p>Powered by <a href="http://nodejs.org" target="_blank">Node.js</a> and <a href="http://aws.amazon.com/about-aws/whats-new/2013/03/11/announcing-aws-elastic-beanstalk-for-node-js/" target="_blank">AWS</a></p>
</div>
</div>
</xsl:template>
<xsl:template name="commonBottom">
<div class="common-bottom">
<p class="common-reference"></p>
<p class="common-copyright">
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> website © 2012-2014 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
<span class="common-copyright">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
</p>
</div>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,101 @@
@CHARSET "UTF-8";
*:not(input,textarea) {
-webkit-user-select: none;
}
.c1pjs-embed {
}
.c1pjs-embed:after {
clear:both;
}
.c1pjs-name {
clear: both;
font-weight: bold;
padding-bottom: 4px;
}
.c1pjs-canvas {
width: 100%;
height: auto;
}
.c1pjs-container {
color: #000000;
position: relative;
}
.c1pjs-label {
font-size: small;
line-height: 19px;
vertical-align: middle;
float: left;
font-family: "Lucida Console", monospace;
}
.c1pjs-control textarea {
font-family: Monaco, monospace;
font-size: x-small;
}
.c1pjs-flag {
font-family: "Lucida Console", monospace;
font-size: small;
text-align: center;
line-height: 19px;
vertical-align: middle;
}
.c1pjs-register {
font-family: "Lucida Console", monospace;
font-size: small;
text-align: center;
line-height: 19px;
vertical-align: middle;
border: 1px solid black;
}
.c1pjs-switches {
float: left;
}
.c1pjs-bitBucket {
float: left;
width: 19px;
height: 38px;
}
.c1pjs-bitCell {
float: left;
width: 19px;
height: 19px;
margin-right: -1px;
margin-bottom: -1px;
border: 1px solid black;
text-align: center;
line-height: 19px;
}
.c1pjs-bitCellLeft {
border-left: 1px solid black;
}
.c1pjs-bitLabel {
font-size: xx-small;
text-align: center;
}
.c1pjs-description, .c1pjs-status {
font-size: small;
line-height: 2em;
}
.c1pjs-key {
border: 1px solid black;
font-size: x-small;
text-align: center;
position: absolute;
height: 34px;
line-height: 34px;
}
.c1pjs-reference {
float: left;
font-size: x-small;
}
.c1pjs-reference a {
text-decoration: none;
}
.c1pjs-copyright {
float: right;
font-size: x-small;
}
.c1pjs-copyright a {
text-decoration: none;
}

View file

@ -0,0 +1,563 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2013-01-29" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="rootDir" select="''"/>
<xsl:param name="generator" select="'client'"/>
<xsl:variable name="MACHINECLASS">c1p</xsl:variable>
<xsl:variable name="APPCLASS">c1pjs</xsl:variable>
<xsl:variable name="APPVERSION">1.15.8</xsl:variable>
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
<xsl:template name="componentStyles">
<link rel="stylesheet" type="text/css" href="/versions/{$APPCLASS}/{$APPVERSION}/components.css"/>
</xsl:template>
<xsl:template name="componentScripts">
<xsl:param name="component"/>
<script type="text/javascript" src="/versions/{$APPCLASS}/{$APPVERSION}/{$component}.js"></script>
</xsl:template>
<xsl:template name="componentIncludes">
<xsl:param name="component"/>
<xsl:call-template name="componentScripts"><xsl:with-param name="component" select="$component"/></xsl:call-template>
</xsl:template>
<xsl:template match="machine[@ref]">
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/machine"><xsl:with-param name="machine" select="@id"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="machine[not(@ref)]">
<xsl:param name="machine"><xsl:value-of select="@id"/></xsl:param>
<div id="{$machine}" class="machine {@class}js">
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="component" select="'machine'"/>
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template match="component[@ref]">
<xsl:param name="machine"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/component"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="component[not(@ref)]">
<xsl:param name="machine"/>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class" select="@class"/>
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="component">
<xsl:param name="machine" select="''"/>
<xsl:param name="component" select="name(.)"/>
<xsl:param name="class" select="''"/>
<xsl:param name="parms" select="''"/>
<xsl:param name="url" select="''"/>
<xsl:variable name="id">
<xsl:choose>
<xsl:when test="$component = 'machine'"><xsl:value-of select="$machine"/>.machine</xsl:when>
<xsl:when test="$machine != ''"><xsl:value-of select="$machine"/><xsl:if test="@id">.<xsl:value-of select="@id"/></xsl:if></xsl:when>
<xsl:when test="@id"><xsl:value-of select="@id"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="name">
<xsl:choose>
<xsl:when test="name"><xsl:value-of select="name"/></xsl:when>
<xsl:when test="@name"><xsl:value-of select="@name"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="border">
<xsl:choose>
<xsl:when test="@border = '1'">border:1px solid black;border-radius:10px;</xsl:when>
<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="left">
<xsl:choose>
<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="top">
<xsl:choose>
<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="width">
<xsl:choose>
<xsl:when test="@width">
<xsl:choose>
<xsl:when test="$left != '' or $top != ''">width:<xsl:value-of select="@width"/>;</xsl:when>
<xsl:otherwise>width:auto;max-width:<xsl:value-of select="@width"/>;</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="height">
<xsl:choose>
<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="padding">
<xsl:choose>
<xsl:when test="@padding">padding:<xsl:value-of select="@padding"/>;</xsl:when>
<xsl:otherwise>
<xsl:if test="@padtop">padding-top:<xsl:value-of select="@padtop"/>;</xsl:if>
<xsl:if test="@padright">padding-right:<xsl:value-of select="@padright"/>;</xsl:if>
<xsl:if test="@padbottom">padding-bottom:<xsl:value-of select="@padbottom"/>;</xsl:if>
<xsl:if test="@padleft">padding-left:<xsl:value-of select="@padleft"/>;</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="pos">
<xsl:choose>
<xsl:when test="@pos = 'left'">float:left;</xsl:when>
<xsl:when test="@pos = 'right'">float:right;</xsl:when>
<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
<xsl:when test="@pos">position:<xsl:value-of select="@pos"/>;</xsl:when>
<xsl:when test="$left != '' or $top != ''">position:absolute;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="style">
<xsl:if test="$component = 'machine'">overflow:auto;width:100%;</xsl:if>
<xsl:if test="@style"><xsl:value-of select="@style"/></xsl:if>
</xsl:variable>
<xsl:variable name="componentClass">
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
</xsl:variable>
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}">
<xsl:if test="$component = 'machine'">
<xsl:apply-templates select="name" mode="machine"/>
</xsl:if>
<xsl:if test="$component != 'machine'">
<xsl:apply-templates select="name" mode="component"/>
</xsl:if>
<div class="{$APPCLASS}-container" style="{$border}{$style}">
<xsl:if test="$class != '' and $component != 'machine'">
<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$parms}"></div>
</xsl:if>
<xsl:if test="control">
<div class="{$APPCLASS}-controls">
<xsl:apply-templates select="control" mode="component"/>
</div>
</xsl:if>
<xsl:apply-templates><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</div>
<xsl:if test="$component = 'machine'">
<xsl:choose>
<xsl:when test="$url != ''"><div class="{$APPCLASS}-reference">[<a href="{$url}">XML</a>]</div></xsl:when>
<xsl:otherwise/>
</xsl:choose>
<div class="{$APPCLASS}-copyright">
<a href="http://{$SITEHOST}/{$APPCLASS}" target="_blank">C1Pjs</a> v<xsl:value-of select="$APPVERSION"/> © 2012-2014 by <a href="http://twitter.com/jeffpar" target="_blank">@jeffpar</a>
</div>
<div style="clear:both"></div>
</xsl:if>
</div>
</xsl:template>
<xsl:template match="name" mode="machine">
<xsl:variable name="pos">
<xsl:choose>
<xsl:when test="@pos = 'center'">text-align:center;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<h2 style="{$pos}"><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="name" mode="component">
<div class="{$APPCLASS}-name"><xsl:apply-templates/></div>
</xsl:template>
<xsl:template match="control" mode="component">
<xsl:variable name="type">
type:'<xsl:value-of select="@type"/>'
</xsl:variable>
<xsl:variable name="binding">
binding:'<xsl:value-of select="@binding"/>'
</xsl:variable>
<xsl:variable name="border">
<xsl:choose>
<xsl:when test="@border = '1'">border:1px solid black;</xsl:when>
<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="width">
<xsl:choose>
<xsl:when test="@width">width:<xsl:value-of select="@width"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="height">
<xsl:choose>
<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="left">
<xsl:choose>
<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="top">
<xsl:choose>
<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="pos">
<xsl:choose>
<xsl:when test="$left != '' or $top != ''">position:absolute;</xsl:when>
<xsl:when test="@pos = 'left'">float:left;</xsl:when>
<xsl:when test="@pos = 'right'">float:right;</xsl:when>
<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
<xsl:when test="@pos"><xsl:value-of select="@pos"/>;</xsl:when>
<xsl:otherwise><xsl:if test="$left = ''">float:left;</xsl:if></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="style">
<xsl:choose>
<xsl:when test="@style"><xsl:value-of select="@style"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<div class="{$APPCLASS}-control" style="{$pos}{$left}{$top}">
<xsl:variable name="fontsize">
<xsl:choose>
<xsl:when test="@size = 'large'">font-size:<xsl:value-of select="@size"/>;</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="subclass">
<xsl:if test="@label"><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-label</xsl:text></xsl:if>
</xsl:variable>
<xsl:variable name="labelwidth">
<xsl:if test="@labelwidth">width:<xsl:value-of select="@labelwidth"/>;</xsl:if>
</xsl:variable>
<xsl:variable name="labelstyle">
<xsl:if test="@labelstyle"><xsl:value-of select="@labelstyle"/></xsl:if>
</xsl:variable>
<xsl:if test="@label">
<xsl:if test="not(@labelpos) or @labelpos = 'left'">
<div class="{$APPCLASS}-label" style="{$labelwidth}{$labelstyle}"><xsl:value-of select="@label"/></div>
</xsl:if>
</xsl:if>
<xsl:choose>
<xsl:when test="@type = 'button'">
<button class="{$APPCLASS}-{@class}" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
</xsl:when>
<xsl:when test="@type = 'list'">
<select class="{$APPCLASS}-{@class}" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
<xsl:apply-templates select="item" mode="component"/>
</select>
</xsl:when>
<xsl:when test="@type = 'text'">
<input class="{$APPCLASS}-{@class}" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="" autocapitalize="off" autocorrect="off"/>
</xsl:when>
<xsl:when test="@type = 'submit'">
<input class="{$APPCLASS}-{@class}" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
</xsl:when>
<xsl:when test="@type = 'textarea'">
<textarea class="{$APPCLASS}-{@class}" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"></textarea>
</xsl:when>
<xsl:when test="@type = 'heading'">
<div><xsl:value-of select="."/></div>
</xsl:when>
<xsl:when test="@type = 'separator'">
<hr/>
</xsl:when>
<xsl:when test="not(@type)">
<div style="clear:both"></div><br/>
</xsl:when>
<xsl:otherwise>
<div class="{$APPCLASS}-{@class}{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@label">
<xsl:if test="@labelpos = 'right'">
<div class="{$APPCLASS}-label" style="{$labelwidth}{$labelstyle}"><xsl:value-of select="@label"/></div>
</xsl:if>
<div style="clear:both"></div>
</xsl:if>
</div>
</xsl:template>
<xsl:template match="item" mode="component">
<option value="{@ref}"><xsl:value-of select="."/></option>
</xsl:template>
<xsl:template match="name">
</xsl:template>
<xsl:template match="control">
</xsl:template>
<xsl:template match="cpu[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/cpu"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="cpu[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="autoStart">
<xsl:choose>
<xsl:when test="@autostart"><xsl:value-of select="@autostart"/></xsl:when>
<xsl:otherwise>null</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class" select="'cpu'"/>
<xsl:with-param name="parms">,autoStart:<xsl:value-of select="$autoStart"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="keyboard[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/keyboard"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="keyboard[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="model">
<xsl:choose>
<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
<xsl:otherwise>600</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">keyboard</xsl:with-param>
<xsl:with-param name="parms">,model:<xsl:value-of select="$model"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="serial[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/serial"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="serial[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="demo">
<xsl:choose>
<xsl:when test="@demo"><xsl:value-of select="@demo"/></xsl:when>
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">serial</xsl:with-param>
<xsl:with-param name="parms">,demo:<xsl:value-of select="$demo"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="disk[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/disk"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="disk[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">disk</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="rom[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/rom"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="rom[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="size">
<xsl:choose>
<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="image">
<xsl:choose>
<xsl:when test="@image"><xsl:value-of select="@image"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">rom</xsl:with-param>
<xsl:with-param name="parms">,size:<xsl:value-of select="$size"/>,image:'<xsl:value-of select="$image"/>'</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="ram[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/ram"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="ram[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="size">
<xsl:choose>
<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">ram</xsl:with-param>
<xsl:with-param name="parms">,size:<xsl:value-of select="$size"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="video[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/video"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="video[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="model">
<xsl:choose>
<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
<xsl:otherwise>600</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="screenWidth">
<xsl:choose>
<xsl:when test="@screenwidth"><xsl:value-of select="@screenwidth"/></xsl:when>
<xsl:otherwise>256</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="screenHeight">
<xsl:choose>
<xsl:when test="@screenheight"><xsl:value-of select="@screenheight"/></xsl:when>
<xsl:otherwise>224</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="charCols">
<xsl:choose>
<xsl:when test="@cols"><xsl:value-of select="@cols"/></xsl:when>
<xsl:otherwise>32</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="charRows">
<xsl:choose>
<xsl:when test="@rows"><xsl:value-of select="@rows"/></xsl:when>
<xsl:otherwise>32</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="charWidth">
<xsl:choose>
<xsl:when test="@charwidth"><xsl:value-of select="@charwidth"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="charHeight">
<xsl:choose>
<xsl:when test="@charheight"><xsl:value-of select="@charheight"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="charSet">
<xsl:choose>
<xsl:when test="@charset"><xsl:value-of select="@charset"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:variable name="screenColor">
<xsl:choose>
<xsl:when test="@screencolor"><xsl:value-of select="@screencolor"/></xsl:when>
<xsl:otherwise>black</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">video</xsl:with-param>
<xsl:with-param name="parms">,model:<xsl:value-of select="$model"/>,screenWidth:<xsl:value-of select="$screenWidth"/>,screenHeight:<xsl:value-of select="$screenHeight"/>,charCols:<xsl:value-of select="$charCols"/>,charRows:<xsl:value-of select="$charRows"/>,charWidth:<xsl:value-of select="$charWidth"/>,charHeight:<xsl:value-of select="$charHeight"/>,charSet:'<xsl:value-of select="$charSet"/>',screenColor:'<xsl:value-of select="$screenColor"/>'</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="debugger[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/debugger"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="debugger[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">debugger</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="panel[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/panel"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="panel[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">panel</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="computer[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/computer"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="computer[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="modules">
[<xsl:for-each select="module">
{<xsl:call-template name="module"/>}
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>]
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">computer</xsl:with-param>
<xsl:with-param name="parms">,modules:<xsl:value-of select="$modules"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="module">
type:'<xsl:value-of select="@type"/>',refID:'<xsl:value-of select="@refid"/>'<xsl:if test="@start">,start:<xsl:value-of select="@start"/>,end:<xsl:value-of select="@end"/></xsl:if>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,162 @@
@CHARSET "UTF-8";
.page {
margin: 2% 2%;
padding: 2% 2%;
min-width: 30em;
overflow: auto;
font-size: large;
font-family: Helvetica, Arial, sans-serif;
background: #303030;
color: #ccc;
}
.page-header {
}
.page-header-title {
text-align: center;
}
.page a {
color: #7fc07f;
text-decoration: none;
}
a.footlink, a.paralink {
text-decoration: none;
}
a.footlink:link, a.paralink:link {
color: blue;
}
a.footlink:visited, a.paralink:visited {
color: blue;
}
.galleryitem {
float: left;
width: 200px;
}
.item {
float: left;
width: 2em;
text-indent: 1em;
}
.list {
margin-left: 3em;
text-indent: 0;
text-align: justify;
}
ul {
list-style: none;
}
div.pnumber {
float: left;
width: 2em;
text-indent: 1em;
}
div.pitem {
margin-left: 10em;
}
p.indent, .justified p {
text-indent: 2em;
text-align: justify;
line-height: 1.5em;
}
p.noindent {
text-indent: 0;
text-align: justify;
}
p.center, .center {
text-align: center;
}
li.para {
margin-top: 1em;
margin-bottom: 1em;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
blockquote.tag {
font-size: small;
font-family: Monaco, Fixed, monospace;
margin-top: 0;
margin-bottom: 0;
}
.blockquote {
padding-left: 1em;
text-indent: 0;
text-align: justify;
}
.italics {
font-style: italic;
}
.medium {
font-size: medium;
}
.small {
font-size: x-small;
}
.smallcaps {
font-variant: small-caps;
}
.strike {
text-decoration: line-through;
}
.summation, .bracelist {
display: inline-block;
position: relative;
vertical-align: middle;
text-align: center;
margin-bottom: 0.5ex;
text-indent: 0;
}
.bracelist-symbol {
font-size: 3em;
vertical-align: -40%;
}
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
display: block;
font-size: 75%;
text-align: center;
}
.summation .summation-upper {
margin-bottom: 0;
margin-left: 0.8ex;
font-style: italic;
}
.summation .summation-lower{
margin-bottom: -0.6ex;
font-style: italic;
}
.summation .summation-symbol {
font-size: 2em;
}
p sup {
vertical-align: baseline;
position: relative;
bottom: .5em;
font-size: small;
}
p sub {
vertical-align: baseline;
position: relative;
bottom: -.5em;
font-size: small;
}
.footnote {
font-size: medium;
text-indent: 1em;
text-align: justify;
margin-top: .5em;
}
.image-right {
float: right;
margin-left: 1em;
margin-top: 1em;
margin-bottom: 1em;
}
.image-caption {
font-size: small;
text-align: center;
}

View file

@ -0,0 +1,450 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="documentStyles">
<link rel="stylesheet" type="text/css" href="/versions/c1pjs/1.15.8/document.css"/>
</xsl:template>
<xsl:template match="title">
<h1><xsl:apply-templates/></h1>
</xsl:template>
<xsl:template name="p">
<xsl:if test="@id">
<a name="{@id}"></a>
</xsl:if>
<xsl:choose>
<xsl:when test="not(@class)">
<p><xsl:apply-templates/></p>
</xsl:when>
<xsl:otherwise>
<p class="{@class}"><xsl:apply-templates/></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="p">
<xsl:call-template name="p"/>
</xsl:template>
<xsl:template match="br">
<br/>
</xsl:template>
<xsl:template match="p[@number]">
<div class="pnumber">
<xsl:choose>
<xsl:when test="not(@number) or @number = ''">&nbsp;</xsl:when>
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
</xsl:choose>
</div>
<div class="pitem">
<xsl:call-template name="p"/>
</div>
</xsl:template>
<xsl:template match="span">
<xsl:choose>
<xsl:when test="not(@class)">
<span><xsl:apply-templates/></span>
</xsl:when>
<xsl:when test="@class = 'italics'">
<em><xsl:apply-templates/></em>
</xsl:when>
<xsl:otherwise>
<span class="{@class}"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="h2">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="h3">
<h3><xsl:apply-templates/></h3>
</xsl:template>
<xsl:template match="h4">
<h4><xsl:apply-templates/></h4>
</xsl:template>
<xsl:template match="h5">
<h5><xsl:apply-templates/></h5>
</xsl:template>
<xsl:template match="h6">
<h6><xsl:apply-templates/></h6>
</xsl:template>
<xsl:template match="em">
<em><xsl:apply-templates/></em>
</xsl:template>
<xsl:template match="strong">
<strong><xsl:apply-templates/></strong>
</xsl:template>
<xsl:template match="a">
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="ol">
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
</xsl:template>
<xsl:template match="ul">
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
</xsl:template>
<xsl:template match="li">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="img">
<div><img src="{@src}" alt="image"/></div>
</xsl:template>
<xsl:template match="pre">
<pre><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match="figure">
<xsl:choose>
<xsl:when test="@pos">
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:when>
<xsl:otherwise>
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="sub">
<sub><xsl:apply-templates/></sub>
</xsl:template>
<xsl:template match="sup">
<sup><xsl:apply-templates/></sup>
</xsl:template>
<xsl:template match="lt">&lt;</xsl:template>
<xsl:template match="gt">&gt;</xsl:template>
<xsl:template match="ne">&ne;</xsl:template>
<xsl:template match="le">&le;</xsl:template>
<xsl:template match="ge">&ge;</xsl:template>
<xsl:template match="times">&times;</xsl:template>
<xsl:template match="dot">&sdot;</xsl:template>
<xsl:template match="divide">&divide;</xsl:template>
<xsl:template match="sigma">&sigma;</xsl:template>
<xsl:template match="summation">
<span class="summation">
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
<span class="summation-symbol">&sum;</span>
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
</span>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="bracelist">
<span class="bracelist-symbol">&lbrace;</span>
<span class="bracelist">
<xsl:for-each select="item">
<span class="bracelist-item"><xsl:apply-templates/></span>
</xsl:for-each>
</span>
</xsl:template>
<xsl:template match="footlink">
<xsl:variable name="docID" select="/document/@id"/>
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
</xsl:template>
<xsl:template match="footnote">
<xsl:variable name="docID" select="/document/@id"/>
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template name="authors">
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
</xsl:template>
<xsl:template name="formatDate">
<xsl:param name="date"/>
<xsl:param name="format">MDY</xsl:param>
<xsl:variable name="year">
<xsl:value-of select="substring-before($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon-day">
<xsl:value-of select="substring-after($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon">
<xsl:value-of select="substring-before($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="full-day">
<xsl:value-of select="substring-after($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="day">
<xsl:choose>
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$mon = '01'">January </xsl:when>
<xsl:when test="$mon = '02'">February </xsl:when>
<xsl:when test="$mon = '03'">March </xsl:when>
<xsl:when test="$mon = '04'">April </xsl:when>
<xsl:when test="$mon = '05'">May </xsl:when>
<xsl:when test="$mon = '06'">June </xsl:when>
<xsl:when test="$mon = '07'">July </xsl:when>
<xsl:when test="$mon = '08'">August </xsl:when>
<xsl:when test="$mon = '09'">September </xsl:when>
<xsl:when test="$mon = '10'">October </xsl:when>
<xsl:when test="$mon = '11'">November </xsl:when>
<xsl:when test="$mon = '12'">December </xsl:when>
<xsl:when test="$mon = '00'"/> </xsl:choose>
<xsl:if test="$day != '0' and $format = 'MDY'">
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="$year"/>
</xsl:template>
<xsl:template match="gallery">
<h2><xsl:value-of select="description"/></h2>
<div class="gallery">
<xsl:apply-templates select="item" mode="gallery"/>
</div>
<div style="clear:both;"></div>
</xsl:template>
<xsl:template match="item" mode="gallery">
<div class="galleryitem">
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
</div>
</xsl:template>
<xsl:template match="list[@type = 'timeline']">
<xsl:if test="not(description)">
<h2>Timeline</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="timeline"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="timeline">
<xsl:if test="@ref">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="not(@ref)">
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
<blockquote>
<xsl:value-of select="."/>
</blockquote>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'people']">
<xsl:if test="not(description)">
<h2>People</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="people"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="people">
<h3><xsl:value-of select="name"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'documents']">
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
<ul>
<xsl:apply-templates select="item" mode="document"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="document">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="document">
<xsl:param name="itemRef"/>
<li>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
</li>
</xsl:template>
<xsl:template match="document" mode="withDate">
<xsl:param name="itemRef"/>
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
<blockquote>
<p>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
</p>
</blockquote>
</xsl:template>
<xsl:template name="documentSummary">
<xsl:param name="itemRef"/>
<xsl:param name="multiLine">false</xsl:param>
<xsl:choose>
<xsl:when test="content|include">
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
<xsl:if test="@ref">
<span class="small">
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="copy">
<span class="small">
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
</span>
</xsl:if>
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
<xsl:if test="source">
<span class="small">
<br/>
<xsl:text>[Source: </xsl:text>
<xsl:if test="site">
<a href="{site/@url}"><xsl:value-of select="site"/></a>
</xsl:if>
<xsl:if test="not(site)">
<a href="{source/@url}"><xsl:value-of select="source"/></a>
</xsl:if>
<xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'resources']">
<xsl:if test="not(description)">
<h2>Resources</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="resources"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="resources">
<h3><xsl:value-of select="description"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'links']">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="item" mode="links"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="links">
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
</xsl:template>
<xsl:template match="list[not(@type)]">
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item|tag" mode="outer"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="outer">
<xsl:if test="description">
<h3><xsl:value-of select="description"/></h3>
</xsl:if>
<xsl:apply-templates select="list|item|tag" mode="inner"/>
</xsl:template>
<xsl:template match="list" mode="inner">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template name="innerlist">
<xsl:if test="description">
<xsl:value-of select="description"/>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="inner">
<xsl:choose>
<xsl:when test="@ref">
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
</xsl:when>
<xsl:when test="description">
<li><xsl:call-template name="innerlist"/></li>
</xsl:when>
<xsl:otherwise>
<li><xsl:apply-templates/></li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="para" mode="inner">
<li class="para"><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="tag" mode="outer">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template match="tag" mode="inner">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template name="tag">
<blockquote class="tag">
<xsl:text>&lt;</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
<xsl:choose>
<xsl:when test="tag"><xsl:text>&gt;</xsl:text><xsl:apply-templates mode="inner"/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:when test="normalize-space(.) != ''"><xsl:text>&gt;</xsl:text><xsl:value-of select="."/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>/&gt;</xsl:text></xsl:otherwise>
</xsl:choose>
</blockquote>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/c1pjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/c1pjs/1.15.8/components.xsl"/>
<xsl:template match="/machine">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<p></p>
<div id="{@id}" class="machine {@class}js">
<xsl:call-template name="component">
<xsl:with-param name="machine" select="@id"/>
<xsl:with-param name="component" select="'machine'"/>
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
</xsl:call-template>
</div>
</div>
<xsl:call-template name="commonBottom"/>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="@class"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/c1pjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/c1pjs/1.15.8/components.xsl"/>
<xsl:template match="/manifest[@type = 'document']">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Document Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Documents'"/>
<xsl:with-param name="node" select="document"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<p><xsl:value-of select="desc"/></p>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Software Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Type'"/>
<xsl:with-param name="node" select="type"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Category'"/>
<xsl:with-param name="node" select="category"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Created'"/>
<xsl:with-param name="node" select="creationDate"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Creators'"/>
<xsl:with-param name="node" select="creator"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
<xsl:with-param name="node" select="releaseDate"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Company'"/>
<xsl:with-param name="node" select="company"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Authors'"/>
<xsl:with-param name="node" select="author"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Contributors'"/>
<xsl:with-param name="node" select="contributor"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Publisher'"/>
<xsl:with-param name="node" select="publisher"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'License'"/>
<xsl:with-param name="node" select="license"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Disks'"/>
<xsl:with-param name="node" select="disk"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<xsl:for-each select="machine[not(@type) or @type = 'default']">
<xsl:call-template name="machine">
<xsl:with-param name="href" select="@href"/>
<xsl:with-param name="state" select="@state"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
</xsl:if>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
<xsl:template name="listItem">
<xsl:param name="label"/>
<xsl:param name="node"/>
<xsl:param name="default">Unknown</xsl:param>
<xsl:if test="$node != '' or $default != ''">
<li><xsl:value-of select="$label"/>
<ul class="common-list-data-items">
<xsl:for-each select="$node">
<xsl:variable name="desc">
<xsl:choose>
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<li title="{$desc}">
<xsl:variable name="value">
<xsl:choose>
<xsl:when test="name">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:when test="normalize-space(./text()) != ''">
<xsl:value-of select="normalize-space(./text())"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$default"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="href">
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="$href != ''">
<a href="{$href}"><xsl:value-of select="$value"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="page">
<ul class="common-list-data-subitems">
<xsl:for-each select="page">
<li>
<xsl:if test="@href">
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="."/>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</li>
</xsl:for-each>
<xsl:if test="not($node)">
<xsl:if test="@href">
<a href="{@href}"><xsl:value-of select="$default"/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="$default"/>
</xsl:if>
</xsl:if>
</ul>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/c1pjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/c1pjs/1.15.8/document.xsl"/>
<xsl:include href="/versions/c1pjs/1.15.8/components.xsl"/>
<xsl:template match="/outline">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="documentStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<div class="page justified">
<xsl:apply-templates/>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,257 @@
@CHARSET "UTF-8";
/**
@author Jeff Parsons (@jeffpar)
@website http://www.pcjs.org/
@created 2013-05-05
@modified 2014-02-23
@license http://www.gnu.org/licenses/gpl.html
*/
body {
margin: 0;
background: #1d1d1d;
}
h1, h2 {
margin-top: 0;
color: #cccccc;
}
h1, h2, h3, h4 {
word-wrap: break-word;
}
h4 a {
color: #cccccc !important;
}
p {
line-height: 1.5em;
}
a img {
vertical-align: bottom;
}
pre, code {
color: #000000;
background-color: #cccccc;
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-size: 12px;
}
pre {
margin: 1em 2em;
padding: 1em;
border-radius: 5px;
overflow: auto;
}
code {
padding: 1px;
}
pre a, code a {
color: #006400 !important;
}
.common {
width: 100%;
margin: 0 auto;
color: #cccccc;
}
.common a {
color: #7fc07f;
text-decoration: none;
}
.common hr {
border-color: #808080;
}
.common a:hover {
text-decoration: underline;
}
.common, .machine {
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-size: 15px;
}
.machine {
margin: 15px;
overflow: hidden;
}
.c1pjs {
overflow: visible;
}
.machine-placeholder {
text-align: center;
font-weight: bold;
}
.common-top {
background: #1d1d1d;
font-size: small;
}
.common-top-left {
float: left;
width: 60%;
}
.common-top-left ul {
line-height: 1.5em;
list-style-type: none;
margin: 0;
padding: 1em 1em 1em 9px;
overflow: hidden;
}
.common-top-left ul li {
display: block;
float: left;
}
.common-top-left ul li a {
border-right: 1px solid #6f6f6f;
padding: 2px 6px 2px 6px;
}
.common-top-left ul li:last-child a {
border-right: none;
}
.common-top-right {
float: right;
width: 40%;
}
.common-top-right p {
float: right;
margin: 0;
padding: 1em;
}
.common-middle {
clear: both;
padding: 1px 1em 1px 1em;
background: #303030;
}
.common-sidebar {
float: left;
font-size: small;
width: 140px;
padding-bottom: 20px;
overflow: hidden;
word-wrap: break-word;
}
.common-list {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list li {
padding-bottom: 7px;
}
.common-list-data {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list-data li {
line-height: 1.5em;
}
.common-list-data-items, .common-list-data-subitems {
font-size: x-small;
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.common-list-data-items li, .common-list-data-subitems li {
padding-bottom: 0;
}
.common-main {
margin-left: 150px;
}
.common-image-gallery {
margin: 0 auto;
text-align: center;
}
.common-image-gallery:after {
content: '';
display: block;
}
.common-image-frame {
display: inline-block;
margin: 8px;
text-align: center;
}
.common-image-link {
padding: 5px;
border: 1px solid black;
border-radius: 5px;
background-color: #FAEBD7;
}
.common-image-label {
font-size: x-small;
}
.common-bottom {
clear: both;
padding-top: 1em;
}
.common-bottom:after {
content: '';
display: block;
clear: both;
}
.common-reference {
float: left;
font-size: x-small;
}
.common-reference a {
text-decoration: none;
}
.common-copyright {
float: right;
font-size: x-small;
}
.common-copyright a {
text-decoration: none;
}
.md-list {
}
.md-list li {
line-height: 1.5em;
margin-bottom: 1em;
}
.md-list li p {
padding-left: 2em;
}
.md-list-compact {
}
.md-list-compact li {
margin-bottom: 0;
}
.md-list-none {
list-style-type: none;
padding-left: 2em;
}
.md-list-none li {
margin-bottom: 0;
}
@media screen and (max-width: 900px) {
.common-sidebar {
width: 100%;
}
.common-list {
padding-left: 0;
}
.common-list-data {
padding-left: 0;
}
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
width: 130px;
float: left;
overflow: hidden;
vertical-align: top;
padding-right: 1em;
margin-top: 0;
}
.common-list-data-subitems {
display: none;
}
.common-main {
clear: both;
margin-left: 0;
padding-left: 0;
padding-right: 0;
}
.md-list-none {
padding-left: 1em;
}
}

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="commonStyles">
<meta charset="utf-8"/>
<link rel="shortcut icon" href="/versions/images/current/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/versions/pcjs/1.15.8/common.css"/>
</xsl:template>
<xsl:template name="commonTop">
<div class="common-top">
<div class="common-top-left">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/apps/pc/">Apps</a></li>
<li><a href="/disks/pc/">Disks</a></li>
<li><a href="/configs/">Machines</a></li>
<li><a href="/docs/">Docs</a></li>
<li><a href="/pubs/">Pubs</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/docs/about/">About</a></li>
</ul>
</div>
<div class="common-top-right">
<p>Powered by <a href="http://nodejs.org" target="_blank">Node.js</a> and <a href="http://aws.amazon.com/about-aws/whats-new/2013/03/11/announcing-aws-elastic-beanstalk-for-node-js/" target="_blank">AWS</a></p>
</div>
</div>
</xsl:template>
<xsl:template name="commonBottom">
<div class="common-bottom">
<p class="common-reference"></p>
<p class="common-copyright">
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> website © 2012-2014 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
<span class="common-copyright">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
</p>
</div>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,110 @@
@CHARSET "UTF-8";
*:not(input,textarea) {
-webkit-user-select: none;
}
.pcjs-embed {
}
.pcjs-embed:after {
clear:both;
}
.pcjs-name {
clear: both;
font-weight: bold;
padding-bottom: 4px;
}
.pcjs-canvas {
width: 100%;
height: auto;
}
.pcjs-container {
color: #000000;
position: relative;
}
.pcjs-label {
font-size: small;
line-height: 19px;
vertical-align: middle;
float: left;
font-family: "Lucida Console", monospace;
}
.pcjs-control textarea {
font-family: Monaco, monospace;
font-size: x-small;
}
.pcjs-flag {
font-family: "Lucida Console", monospace;
font-size: small;
text-align: center;
line-height: 19px;
vertical-align: middle;
}
.pcjs-register {
font-family: "Lucida Console", monospace;
font-size: small;
text-align: center;
line-height: 19px;
vertical-align: middle;
border: 1px solid black;
}
.pcjs-switches {
float: left;
}
.pcjs-bitBucket {
float: left;
width: 19px;
height: 38px;
}
.pcjs-bitCell {
float: left;
width: 19px;
height: 19px;
margin-right: -1px;
margin-bottom: -1px;
border: 1px solid black;
text-align: center;
line-height: 19px;
}
.pcjs-bitCellLeft {
border-left: 1px solid black;
}
.pcjs-bitLabel {
font-size: xx-small;
text-align: center;
}
.pcjs-description, .pcjs-status {
font-size: x-small;
line-height: 2em;
}
.pcjs-key {
border: 1px solid black;
font-size: x-small;
text-align: center;
position: absolute;
height: 34px;
line-height: 34px;
}
.pcjs-reference {
float: left;
font-size: x-small;
}
.pcjs-reference a {
text-decoration: none;
}
.pcjs-copyright {
float: right;
font-size: x-small;
}
.pcjs-copyright a {
text-decoration: none;
}
@media screen and (max-width: 900px) {
.pcjs-textarea {
width: 100% !important;
}
.pcjs-registers {
width: 100% !important;
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,162 @@
@CHARSET "UTF-8";
.page {
margin: 2% 2%;
padding: 2% 2%;
min-width: 30em;
overflow: auto;
font-size: large;
font-family: Helvetica, Arial, sans-serif;
background: #303030;
color: #ccc;
}
.page-header {
}
.page-header-title {
text-align: center;
}
.page a {
color: #7fc07f;
text-decoration: none;
}
a.footlink, a.paralink {
text-decoration: none;
}
a.footlink:link, a.paralink:link {
color: blue;
}
a.footlink:visited, a.paralink:visited {
color: blue;
}
.galleryitem {
float: left;
width: 200px;
}
.item {
float: left;
width: 2em;
text-indent: 1em;
}
.list {
margin-left: 3em;
text-indent: 0;
text-align: justify;
}
ul {
list-style: none;
}
div.pnumber {
float: left;
width: 2em;
text-indent: 1em;
}
div.pitem {
margin-left: 10em;
}
p.indent, .justified p {
text-indent: 2em;
text-align: justify;
line-height: 1.5em;
}
p.noindent {
text-indent: 0;
text-align: justify;
}
p.center, .center {
text-align: center;
}
li.para {
margin-top: 1em;
margin-bottom: 1em;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
blockquote.tag {
font-size: small;
font-family: Monaco, Fixed, monospace;
margin-top: 0;
margin-bottom: 0;
}
.blockquote {
padding-left: 1em;
text-indent: 0;
text-align: justify;
}
.italics {
font-style: italic;
}
.medium {
font-size: medium;
}
.small {
font-size: x-small;
}
.smallcaps {
font-variant: small-caps;
}
.strike {
text-decoration: line-through;
}
.summation, .bracelist {
display: inline-block;
position: relative;
vertical-align: middle;
text-align: center;
margin-bottom: 0.5ex;
text-indent: 0;
}
.bracelist-symbol {
font-size: 3em;
vertical-align: -40%;
}
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
display: block;
font-size: 75%;
text-align: center;
}
.summation .summation-upper {
margin-bottom: 0;
margin-left: 0.8ex;
font-style: italic;
}
.summation .summation-lower{
margin-bottom: -0.6ex;
font-style: italic;
}
.summation .summation-symbol {
font-size: 2em;
}
p sup {
vertical-align: baseline;
position: relative;
bottom: .5em;
font-size: small;
}
p sub {
vertical-align: baseline;
position: relative;
bottom: -.5em;
font-size: small;
}
.footnote {
font-size: medium;
text-indent: 1em;
text-align: justify;
margin-top: .5em;
}
.image-right {
float: right;
margin-left: 1em;
margin-top: 1em;
margin-bottom: 1em;
}
.image-caption {
font-size: small;
text-align: center;
}

View file

@ -0,0 +1,450 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="documentStyles">
<link rel="stylesheet" type="text/css" href="/versions/pcjs/1.15.8/document.css"/>
</xsl:template>
<xsl:template match="title">
<h1><xsl:apply-templates/></h1>
</xsl:template>
<xsl:template name="p">
<xsl:if test="@id">
<a name="{@id}"></a>
</xsl:if>
<xsl:choose>
<xsl:when test="not(@class)">
<p><xsl:apply-templates/></p>
</xsl:when>
<xsl:otherwise>
<p class="{@class}"><xsl:apply-templates/></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="p">
<xsl:call-template name="p"/>
</xsl:template>
<xsl:template match="br">
<br/>
</xsl:template>
<xsl:template match="p[@number]">
<div class="pnumber">
<xsl:choose>
<xsl:when test="not(@number) or @number = ''">&nbsp;</xsl:when>
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
</xsl:choose>
</div>
<div class="pitem">
<xsl:call-template name="p"/>
</div>
</xsl:template>
<xsl:template match="span">
<xsl:choose>
<xsl:when test="not(@class)">
<span><xsl:apply-templates/></span>
</xsl:when>
<xsl:when test="@class = 'italics'">
<em><xsl:apply-templates/></em>
</xsl:when>
<xsl:otherwise>
<span class="{@class}"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="h2">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="h3">
<h3><xsl:apply-templates/></h3>
</xsl:template>
<xsl:template match="h4">
<h4><xsl:apply-templates/></h4>
</xsl:template>
<xsl:template match="h5">
<h5><xsl:apply-templates/></h5>
</xsl:template>
<xsl:template match="h6">
<h6><xsl:apply-templates/></h6>
</xsl:template>
<xsl:template match="em">
<em><xsl:apply-templates/></em>
</xsl:template>
<xsl:template match="strong">
<strong><xsl:apply-templates/></strong>
</xsl:template>
<xsl:template match="a">
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="ol">
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
</xsl:template>
<xsl:template match="ul">
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
</xsl:template>
<xsl:template match="li">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="img">
<div><img src="{@src}" alt="image"/></div>
</xsl:template>
<xsl:template match="pre">
<pre><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match="figure">
<xsl:choose>
<xsl:when test="@pos">
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:when>
<xsl:otherwise>
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="sub">
<sub><xsl:apply-templates/></sub>
</xsl:template>
<xsl:template match="sup">
<sup><xsl:apply-templates/></sup>
</xsl:template>
<xsl:template match="lt">&lt;</xsl:template>
<xsl:template match="gt">&gt;</xsl:template>
<xsl:template match="ne">&ne;</xsl:template>
<xsl:template match="le">&le;</xsl:template>
<xsl:template match="ge">&ge;</xsl:template>
<xsl:template match="times">&times;</xsl:template>
<xsl:template match="dot">&sdot;</xsl:template>
<xsl:template match="divide">&divide;</xsl:template>
<xsl:template match="sigma">&sigma;</xsl:template>
<xsl:template match="summation">
<span class="summation">
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
<span class="summation-symbol">&sum;</span>
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
</span>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="bracelist">
<span class="bracelist-symbol">&lbrace;</span>
<span class="bracelist">
<xsl:for-each select="item">
<span class="bracelist-item"><xsl:apply-templates/></span>
</xsl:for-each>
</span>
</xsl:template>
<xsl:template match="footlink">
<xsl:variable name="docID" select="/document/@id"/>
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
</xsl:template>
<xsl:template match="footnote">
<xsl:variable name="docID" select="/document/@id"/>
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template name="authors">
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
</xsl:template>
<xsl:template name="formatDate">
<xsl:param name="date"/>
<xsl:param name="format">MDY</xsl:param>
<xsl:variable name="year">
<xsl:value-of select="substring-before($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon-day">
<xsl:value-of select="substring-after($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon">
<xsl:value-of select="substring-before($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="full-day">
<xsl:value-of select="substring-after($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="day">
<xsl:choose>
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$mon = '01'">January </xsl:when>
<xsl:when test="$mon = '02'">February </xsl:when>
<xsl:when test="$mon = '03'">March </xsl:when>
<xsl:when test="$mon = '04'">April </xsl:when>
<xsl:when test="$mon = '05'">May </xsl:when>
<xsl:when test="$mon = '06'">June </xsl:when>
<xsl:when test="$mon = '07'">July </xsl:when>
<xsl:when test="$mon = '08'">August </xsl:when>
<xsl:when test="$mon = '09'">September </xsl:when>
<xsl:when test="$mon = '10'">October </xsl:when>
<xsl:when test="$mon = '11'">November </xsl:when>
<xsl:when test="$mon = '12'">December </xsl:when>
<xsl:when test="$mon = '00'"/> </xsl:choose>
<xsl:if test="$day != '0' and $format = 'MDY'">
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="$year"/>
</xsl:template>
<xsl:template match="gallery">
<h2><xsl:value-of select="description"/></h2>
<div class="gallery">
<xsl:apply-templates select="item" mode="gallery"/>
</div>
<div style="clear:both;"></div>
</xsl:template>
<xsl:template match="item" mode="gallery">
<div class="galleryitem">
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
</div>
</xsl:template>
<xsl:template match="list[@type = 'timeline']">
<xsl:if test="not(description)">
<h2>Timeline</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="timeline"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="timeline">
<xsl:if test="@ref">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="not(@ref)">
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
<blockquote>
<xsl:value-of select="."/>
</blockquote>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'people']">
<xsl:if test="not(description)">
<h2>People</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="people"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="people">
<h3><xsl:value-of select="name"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'documents']">
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
<ul>
<xsl:apply-templates select="item" mode="document"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="document">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="document">
<xsl:param name="itemRef"/>
<li>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
</li>
</xsl:template>
<xsl:template match="document" mode="withDate">
<xsl:param name="itemRef"/>
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
<blockquote>
<p>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
</p>
</blockquote>
</xsl:template>
<xsl:template name="documentSummary">
<xsl:param name="itemRef"/>
<xsl:param name="multiLine">false</xsl:param>
<xsl:choose>
<xsl:when test="content|include">
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
<xsl:if test="@ref">
<span class="small">
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="copy">
<span class="small">
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
</span>
</xsl:if>
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
<xsl:if test="source">
<span class="small">
<br/>
<xsl:text>[Source: </xsl:text>
<xsl:if test="site">
<a href="{site/@url}"><xsl:value-of select="site"/></a>
</xsl:if>
<xsl:if test="not(site)">
<a href="{source/@url}"><xsl:value-of select="source"/></a>
</xsl:if>
<xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'resources']">
<xsl:if test="not(description)">
<h2>Resources</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="resources"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="resources">
<h3><xsl:value-of select="description"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'links']">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="item" mode="links"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="links">
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
</xsl:template>
<xsl:template match="list[not(@type)]">
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item|tag" mode="outer"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="outer">
<xsl:if test="description">
<h3><xsl:value-of select="description"/></h3>
</xsl:if>
<xsl:apply-templates select="list|item|tag" mode="inner"/>
</xsl:template>
<xsl:template match="list" mode="inner">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template name="innerlist">
<xsl:if test="description">
<xsl:value-of select="description"/>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="inner">
<xsl:choose>
<xsl:when test="@ref">
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
</xsl:when>
<xsl:when test="description">
<li><xsl:call-template name="innerlist"/></li>
</xsl:when>
<xsl:otherwise>
<li><xsl:apply-templates/></li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="para" mode="inner">
<li class="para"><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="tag" mode="outer">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template match="tag" mode="inner">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template name="tag">
<blockquote class="tag">
<xsl:text>&lt;</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
<xsl:choose>
<xsl:when test="tag"><xsl:text>&gt;</xsl:text><xsl:apply-templates mode="inner"/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:when test="normalize-space(.) != ''"><xsl:text>&gt;</xsl:text><xsl:value-of select="."/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>/&gt;</xsl:text></xsl:otherwise>
</xsl:choose>
</blockquote>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/pcjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/pcjs/1.15.8/components.xsl"/>
<xsl:template match="/machine">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<p></p>
<div id="{@id}" class="machine {@class}js">
<xsl:call-template name="component">
<xsl:with-param name="machine" select="@id"/>
<xsl:with-param name="component" select="'machine'"/>
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
</xsl:call-template>
</div>
</div>
<xsl:call-template name="commonBottom"/>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="@class"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/pcjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/pcjs/1.15.8/components.xsl"/>
<xsl:template match="/manifest[@type = 'document']">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Document Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Documents'"/>
<xsl:with-param name="node" select="document"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<p><xsl:value-of select="desc"/></p>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Software Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Type'"/>
<xsl:with-param name="node" select="type"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Category'"/>
<xsl:with-param name="node" select="category"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Created'"/>
<xsl:with-param name="node" select="creationDate"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Creators'"/>
<xsl:with-param name="node" select="creator"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
<xsl:with-param name="node" select="releaseDate"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Company'"/>
<xsl:with-param name="node" select="company"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Authors'"/>
<xsl:with-param name="node" select="author"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Contributors'"/>
<xsl:with-param name="node" select="contributor"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Publisher'"/>
<xsl:with-param name="node" select="publisher"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'License'"/>
<xsl:with-param name="node" select="license"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Disks'"/>
<xsl:with-param name="node" select="disk"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<xsl:for-each select="machine[not(@type) or @type = 'default']">
<xsl:call-template name="machine">
<xsl:with-param name="href" select="@href"/>
<xsl:with-param name="state" select="@state"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
</xsl:if>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
<xsl:template name="listItem">
<xsl:param name="label"/>
<xsl:param name="node"/>
<xsl:param name="default">Unknown</xsl:param>
<xsl:if test="$node != '' or $default != ''">
<li><xsl:value-of select="$label"/>
<ul class="common-list-data-items">
<xsl:for-each select="$node">
<xsl:variable name="desc">
<xsl:choose>
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<li title="{$desc}">
<xsl:variable name="value">
<xsl:choose>
<xsl:when test="name">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:when test="normalize-space(./text()) != ''">
<xsl:value-of select="normalize-space(./text())"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$default"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="href">
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="$href != ''">
<a href="{$href}"><xsl:value-of select="$value"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="page">
<ul class="common-list-data-subitems">
<xsl:for-each select="page">
<li>
<xsl:if test="@href">
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="."/>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</li>
</xsl:for-each>
<xsl:if test="not($node)">
<xsl:if test="@href">
<a href="{@href}"><xsl:value-of select="$default"/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="$default"/>
</xsl:if>
</xsl:if>
</ul>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="/versions/pcjs/1.15.8/common.xsl"/>
<xsl:include href="/versions/pcjs/1.15.8/document.xsl"/>
<xsl:include href="/versions/pcjs/1.15.8/components.xsl"/>
<xsl:template match="/outline">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="documentStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<div class="page justified">
<xsl:apply-templates/>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because one or more lines are too long

638
versions/pcjs/1.15.8/pc.js Normal file

File diff suppressed because one or more lines are too long