Clean up the CPU/ChipSet interface, and get the PC8080 Video component ready to actually do something
This commit is contained in:
parent
ac3dc76285
commit
8c5ab8d73b
19 changed files with 1210 additions and 993 deletions
|
|
@ -81,7 +81,7 @@ function ChipSet(parmsChipSet)
|
|||
Component.notice("Unrecognized ChipSet model: " + model);
|
||||
}
|
||||
|
||||
this.model = model && ChipSet.MODELS[model] || ChipSet.MODEL_5150_OTHER;
|
||||
this.model = ChipSet.MODELS[model] || ChipSet.MODEL_5150_OTHER;
|
||||
|
||||
var bSwitches;
|
||||
this.aDIPSwitches = [];
|
||||
|
|
@ -2126,6 +2126,36 @@ ChipSet.prototype.restore = function(data)
|
|||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* start()
|
||||
*
|
||||
* Notification from the CPU that it's starting.
|
||||
*
|
||||
* @this {ChipSet}
|
||||
*/
|
||||
ChipSet.prototype.start = function()
|
||||
{
|
||||
/*
|
||||
* Currently, all we do with this notification is allow the speaker to make noise.
|
||||
*/
|
||||
this.setSpeaker();
|
||||
};
|
||||
|
||||
/**
|
||||
* stop()
|
||||
*
|
||||
* Notification from the CPU that it's stopping.
|
||||
*
|
||||
* @this {ChipSet}
|
||||
*/
|
||||
ChipSet.prototype.stop = function()
|
||||
{
|
||||
/*
|
||||
* Currently, all we do with this notification is prevent the speaker from making noise.
|
||||
*/
|
||||
this.setSpeaker();
|
||||
};
|
||||
|
||||
ChipSet.aDMAControllerInit = [0, null, null, 0, new Array(4), 0];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1052,7 +1052,7 @@ CPU.prototype.startCPU = function(fUpdateFocus)
|
|||
if (this.cmp) this.cmp.start(this.aCounts.msStartRun, this.getCycles());
|
||||
this.flags.fRunning = true;
|
||||
this.flags.fStarting = true;
|
||||
if (this.chipset) this.chipset.setSpeaker();
|
||||
if (this.chipset) this.chipset.start();
|
||||
var controlRun = this.bindings["run"];
|
||||
if (controlRun) controlRun.textContent = "Halt";
|
||||
if (this.cmp) {
|
||||
|
|
@ -1096,7 +1096,7 @@ CPU.prototype.stopCPU = function(fComplete)
|
|||
this.nRunCycles = 0;
|
||||
if (this.flags.fRunning) {
|
||||
this.flags.fRunning = false;
|
||||
if (this.chipset) this.chipset.setSpeaker();
|
||||
if (this.chipset) this.chipset.stop();
|
||||
var controlRun = this.bindings["run"];
|
||||
if (controlRun) controlRun.textContent = "Run";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,18 +52,17 @@ if (NODE) {
|
|||
*
|
||||
* model: model (eg, "mda" for Monochrome Display Adapter)
|
||||
* mode: initial video mode (default is null, which selects a mode based on model)
|
||||
* memory: amount of installed memory (ignored for MDA/CGA)
|
||||
* screenWidth: width of the screen canvas, in pixels
|
||||
* screenHeight: height of the screen canvas, in pixels
|
||||
* screenColor: background color of the screen canvas (default is black)
|
||||
* scale: true for font scaling, false (default) to center the display on the screen
|
||||
* charCols: number of character columns
|
||||
* charRows: number of character rows
|
||||
* fontROM: path to .rom file (or a JSON representation) containing the character set
|
||||
* screenColor: background color of the screen canvas (default is black)
|
||||
* touchScreen: string specifying desired touch-screen support (default is none)
|
||||
* autoLock: true to (attempt to) auto-lock the mouse to the canvas (default is false)
|
||||
*
|
||||
* An EGA may specify the following additional properties:
|
||||
* An EGA/VGA may specify the following additional properties:
|
||||
*
|
||||
* switches: string representing EGA switches (see "SW1-SW4" documentation below)
|
||||
* memory: the size of the EGA's on-board memory (overrides EGA's Video.cardSpecs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue