Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86
This commit is contained in:
parent
7c3aab2a7e
commit
288f28055d
1519 changed files with 16242 additions and 6939 deletions
|
|
@ -9,7 +9,7 @@ permalink: /modules/pc8080/
|
|||
|
||||
Overview
|
||||
---
|
||||
PC8080 is our 8080-based machine emulation module. The code is derived from [PCjs](/modules/pcjs/).
|
||||
PC8080 is our 8080-based machine emulation module. The code is derived from [PCx86](/modules/pcx86/).
|
||||
|
||||
It is still a work-in-progress. See the list of available [PC8080 Machines](/devices/pc8080/machine/), including
|
||||
[Space Invaders (1978)](/devices/pc8080/machine/invaders/).
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ Bus.prototype.checkPortInputNotify = function(port, size, addrIP)
|
|||
* @param {number} end address
|
||||
*
|
||||
Bus.prototype.removePortInputNotify = function(start, end)
|
||||
{
|
||||
{
|
||||
for (var port = start; port < end; port++) {
|
||||
if (this.aPortInputNotify[port]) {
|
||||
delete this.aPortInputNotify[port];
|
||||
|
|
@ -1036,7 +1036,7 @@ Bus.prototype.checkPortOutputNotify = function(port, size, data, addrIP)
|
|||
* @param {number} end address
|
||||
*
|
||||
Bus.prototype.removePortOutputNotify = function(start, end)
|
||||
{
|
||||
{
|
||||
for (var port = start; port < end; port++) {
|
||||
if (this.aPortOutputNotify[port]) {
|
||||
delete this.aPortOutputNotify[port];
|
||||
|
|
|
|||
|
|
@ -551,12 +551,12 @@ ChipSet.aPortOutput = {
|
|||
*/
|
||||
ChipSet.init = function()
|
||||
{
|
||||
var aeChipSet = Component.getElementsByClass(document, PCJSCLASS, "chipset");
|
||||
var aeChipSet = Component.getElementsByClass(document, APPCLASS, "chipset");
|
||||
for (var iChip = 0; iChip < aeChipSet.length; iChip++) {
|
||||
var eChipSet = aeChipSet[iChip];
|
||||
var parmsChipSet = Component.getComponentParms(eChipSet);
|
||||
var chipset = new ChipSet(parmsChipSet);
|
||||
Component.bindComponentControls(chipset, eChipSet, PCJSCLASS);
|
||||
Component.bindComponentControls(chipset, eChipSet, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1505,14 +1505,14 @@ Computer.init = function()
|
|||
*/
|
||||
if (!COMPILED && XMLVERSION) Computer.APPVERSION = XMLVERSION;
|
||||
|
||||
var aeMachines = Component.getElementsByClass(document, PCJSCLASS + "-machine");
|
||||
var aeMachines = Component.getElementsByClass(document, APPCLASS + "-machine");
|
||||
|
||||
for (var iMachine = 0; iMachine < aeMachines.length; iMachine++) {
|
||||
|
||||
var eMachine = aeMachines[iMachine];
|
||||
var parmsMachine = Component.getComponentParms(eMachine);
|
||||
|
||||
var aeComputers = Component.getElementsByClass(eMachine, PCJSCLASS, "computer");
|
||||
var aeComputers = Component.getElementsByClass(eMachine, APPCLASS, "computer");
|
||||
|
||||
for (var iComputer = 0; iComputer < aeComputers.length; iComputer++) {
|
||||
|
||||
|
|
@ -1534,7 +1534,7 @@ Computer.init = function()
|
|||
* but "reset" now provides a way to force the machine to start from scratch again, so "erase"
|
||||
* may be redundant now.
|
||||
*/
|
||||
Component.bindComponentControls(computer, eComputer, PCJSCLASS);
|
||||
Component.bindComponentControls(computer, eComputer, APPCLASS);
|
||||
|
||||
/*
|
||||
* Power on the computer, giving every component the opportunity to reset or restore itself.
|
||||
|
|
@ -1555,7 +1555,7 @@ Computer.init = function()
|
|||
*/
|
||||
Computer.show = function()
|
||||
{
|
||||
var aeComputers = Component.getElementsByClass(document, PCJSCLASS, "computer");
|
||||
var aeComputers = Component.getElementsByClass(document, APPCLASS, "computer");
|
||||
for (var iComputer = 0; iComputer < aeComputers.length; iComputer++) {
|
||||
var eComputer = aeComputers[iComputer];
|
||||
var parmsComputer = Component.getComponentParms(eComputer);
|
||||
|
|
@ -1604,7 +1604,7 @@ Computer.show = function()
|
|||
*/
|
||||
Computer.exit = function()
|
||||
{
|
||||
var aeComputers = Component.getElementsByClass(document, PCJSCLASS, "computer");
|
||||
var aeComputers = Component.getElementsByClass(document, APPCLASS, "computer");
|
||||
for (var iComputer = 0; iComputer < aeComputers.length; iComputer++) {
|
||||
var eComputer = aeComputers[iComputer];
|
||||
var parmsComputer = Component.getComponentParms(eComputer);
|
||||
|
|
|
|||
|
|
@ -1153,12 +1153,12 @@ CPUState.prototype.stepCPU = function(nMinCycles)
|
|||
*/
|
||||
CPUState.init = function()
|
||||
{
|
||||
var aeCPUs = Component.getElementsByClass(document, PCJSCLASS, "cpu");
|
||||
var aeCPUs = Component.getElementsByClass(document, APPCLASS, "cpu");
|
||||
for (var iCPU = 0; iCPU < aeCPUs.length; iCPU++) {
|
||||
var eCPU = aeCPUs[iCPU];
|
||||
var parmsCPU = Component.getComponentParms(eCPU);
|
||||
var cpu = new CPUState(parmsCPU);
|
||||
Component.bindComponentControls(cpu, eCPU, PCJSCLASS);
|
||||
Component.bindComponentControls(cpu, eCPU, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4776,12 +4776,12 @@ if (DEBUGGER) {
|
|||
*/
|
||||
Debugger.init = function()
|
||||
{
|
||||
var aeDbg = Component.getElementsByClass(document, PCJSCLASS, "debugger");
|
||||
var aeDbg = Component.getElementsByClass(document, APPCLASS, "debugger");
|
||||
for (var iDbg = 0; iDbg < aeDbg.length; iDbg++) {
|
||||
var eDbg = aeDbg[iDbg];
|
||||
var parmsDbg = Component.getComponentParms(eDbg);
|
||||
var dbg = new Debugger(parmsDbg);
|
||||
Component.bindComponentControls(dbg, eDbg, PCJSCLASS);
|
||||
Component.bindComponentControls(dbg, eDbg, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,12 @@
|
|||
/**
|
||||
* @define {string}
|
||||
*/
|
||||
var PCJSCLASS = "pc8080"; // this @define is the default application class (formerly APPCLASS) to use
|
||||
var APPCLASS = "pc8080"; // this @define is the default application class (eg, "pcx86", "c1pjs")
|
||||
|
||||
/**
|
||||
* @define {string}
|
||||
*/
|
||||
var APPNAME = "PC8080"; // this @define is the default application name (eg, "PCx86", "C1Pjs")
|
||||
|
||||
/**
|
||||
* @define {boolean}
|
||||
|
|
@ -71,7 +76,8 @@ var BYTEARRAYS = false;
|
|||
var TYPEDARRAYS = (typeof ArrayBuffer !== 'undefined');
|
||||
|
||||
if (NODE) {
|
||||
global.PCJSCLASS = PCJSCLASS;
|
||||
global.APPCLASS = APPCLASS;
|
||||
global.APPNAME = APPNAME;
|
||||
global.DEBUGGER = DEBUGGER;
|
||||
global.BYTEARRAYS = BYTEARRAYS;
|
||||
global.TYPEDARRAYS = TYPEDARRAYS;
|
||||
|
|
|
|||
|
|
@ -453,12 +453,12 @@ Keyboard.prototype.onSoftKeyDown = function(sSoftCode, fDown)
|
|||
*/
|
||||
Keyboard.init = function()
|
||||
{
|
||||
var aeKbd = Component.getElementsByClass(document, PCJSCLASS, "keyboard");
|
||||
var aeKbd = Component.getElementsByClass(document, APPCLASS, "keyboard");
|
||||
for (var iKbd = 0; iKbd < aeKbd.length; iKbd++) {
|
||||
var eKbd = aeKbd[iKbd];
|
||||
var parmsKbd = Component.getComponentParms(eKbd);
|
||||
var kbd = new Keyboard(parmsKbd);
|
||||
Component.bindComponentControls(kbd, eKbd, PCJSCLASS);
|
||||
Component.bindComponentControls(kbd, eKbd, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ Panel.prototype.updateStatus = function(fForce)
|
|||
Panel.init = function()
|
||||
{
|
||||
var fReady = false;
|
||||
var aePanels = Component.getElementsByClass(document, PCJSCLASS, "panel");
|
||||
var aePanels = Component.getElementsByClass(document, APPCLASS, "panel");
|
||||
for (var iPanel=0; iPanel < aePanels.length; iPanel++) {
|
||||
var ePanel = aePanels[iPanel];
|
||||
var parmsPanel = Component.getComponentParms(ePanel);
|
||||
|
|
@ -172,7 +172,7 @@ Panel.init = function()
|
|||
fReady = true;
|
||||
panel = new Panel(parmsPanel);
|
||||
}
|
||||
Component.bindComponentControls(panel, ePanel, PCJSCLASS);
|
||||
Component.bindComponentControls(panel, ePanel, APPCLASS);
|
||||
if (fReady) panel.setReady();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -180,12 +180,12 @@ RAM.prototype.restore = function(data)
|
|||
*/
|
||||
RAM.init = function()
|
||||
{
|
||||
var aeRAM = Component.getElementsByClass(document, PCJSCLASS, "ram");
|
||||
var aeRAM = Component.getElementsByClass(document, APPCLASS, "ram");
|
||||
for (var iRAM = 0; iRAM < aeRAM.length; iRAM++) {
|
||||
var eRAM = aeRAM[iRAM];
|
||||
var parmsRAM = Component.getComponentParms(eRAM);
|
||||
var ram = new RAM(parmsRAM);
|
||||
Component.bindComponentControls(ram, eRAM, PCJSCLASS);
|
||||
Component.bindComponentControls(ram, eRAM, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -505,12 +505,12 @@ ROM.prototype.cloneROM = function(addr)
|
|||
*/
|
||||
ROM.init = function()
|
||||
{
|
||||
var aeROM = Component.getElementsByClass(document, PCJSCLASS, "rom");
|
||||
var aeROM = Component.getElementsByClass(document, APPCLASS, "rom");
|
||||
for (var iROM = 0; iROM < aeROM.length; iROM++) {
|
||||
var eROM = aeROM[iROM];
|
||||
var parmsROM = Component.getComponentParms(eROM);
|
||||
var rom = new ROM(parmsROM);
|
||||
Component.bindComponentControls(rom, eROM, PCJSCLASS);
|
||||
Component.bindComponentControls(rom, eROM, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ Video.prototype.updateScreen = function(n)
|
|||
*/
|
||||
Video.init = function()
|
||||
{
|
||||
var aeVideo = Component.getElementsByClass(document, PCJSCLASS, "video");
|
||||
var aeVideo = Component.getElementsByClass(document, APPCLASS, "video");
|
||||
for (var iVideo = 0; iVideo < aeVideo.length; iVideo++) {
|
||||
var eVideo = aeVideo[iVideo];
|
||||
var parmsVideo = Component.getComponentParms(eVideo);
|
||||
|
|
@ -717,7 +717,7 @@ Video.init = function()
|
|||
* Bind any video-specific controls (eg, the Refresh button). There are no essential controls, however;
|
||||
* even the "Refresh" button is just a diagnostic tool, to ensure that the screen contents are up-to-date.
|
||||
*/
|
||||
Component.bindComponentControls(video, eVideo, PCJSCLASS);
|
||||
Component.bindComponentControls(video, eVideo, APPCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue