More DIP switch consolidation
This commit is contained in:
parent
cb96688e04
commit
75f9d1c1d2
1 changed files with 15 additions and 6 deletions
|
|
@ -787,6 +787,7 @@ ChipSet.SWITCH_TYPE = {
|
||||||
ChipSet.DIPSW = [{},{}];
|
ChipSet.DIPSW = [{},{}];
|
||||||
ChipSet.DIPSW[0][ChipSet.MODEL_5150] = {};
|
ChipSet.DIPSW[0][ChipSet.MODEL_5150] = {};
|
||||||
ChipSet.DIPSW[1][ChipSet.MODEL_5150] = {};
|
ChipSet.DIPSW[1][ChipSet.MODEL_5150] = {};
|
||||||
|
|
||||||
ChipSet.DIPSW[0][ChipSet.MODEL_5150][ChipSet.SWITCH_TYPE.FLOPNUM] = {
|
ChipSet.DIPSW[0][ChipSet.MODEL_5150][ChipSet.SWITCH_TYPE.FLOPNUM] = {
|
||||||
MASK: 0xC0,
|
MASK: 0xC0,
|
||||||
VALUES: {
|
VALUES: {
|
||||||
|
|
@ -1398,9 +1399,7 @@ ChipSet.prototype.reset = function(fHard)
|
||||||
* the user is only allowed to tweak the initial values, which require a reset to take effect.
|
* the user is only allowed to tweak the initial values, which require a reset to take effect.
|
||||||
*/
|
*/
|
||||||
var i;
|
var i;
|
||||||
this.updateDIPSwitchControls(0, ChipSet.CONTROLS.SW1);
|
this.updateDIPSwitches();
|
||||||
this.updateDIPSwitchControls(1, ChipSet.CONTROLS.SW2);
|
|
||||||
this.updateDIPSwitchDescriptions();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DMA (Direct Memory Access) Controller initialization
|
* DMA (Direct Memory Access) Controller initialization
|
||||||
|
|
@ -2070,9 +2069,7 @@ ChipSet.prototype.restore = function(data)
|
||||||
this.aDIPSwitches[0][1] = a[2];
|
this.aDIPSwitches[0][1] = a[2];
|
||||||
this.aDIPSwitches[1][1] = a[3] & 0x0F; // we do honor SW2[5] now, but it was erroneously set on some machines
|
this.aDIPSwitches[1][1] = a[3] & 0x0F; // we do honor SW2[5] now, but it was erroneously set on some machines
|
||||||
}
|
}
|
||||||
this.updateDIPSwitchControls(0, ChipSet.CONTROLS.SW1);
|
this.updateDIPSwitches();
|
||||||
this.updateDIPSwitchControls(1, ChipSet.CONTROLS.SW2);
|
|
||||||
this.updateDIPSwitchDescriptions();
|
|
||||||
|
|
||||||
a = data[1];
|
a = data[1];
|
||||||
for (i = 0; i < this.cDMACs; i++) {
|
for (i = 0; i < this.cDMACs; i++) {
|
||||||
|
|
@ -2712,6 +2709,18 @@ ChipSet.prototype.toggleDIPSwitchControl = function(control)
|
||||||
this.updateDIPSwitchDescriptions();
|
this.updateDIPSwitchDescriptions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* updateDIPSwitches()
|
||||||
|
*
|
||||||
|
* @this {ChipSet}
|
||||||
|
*/
|
||||||
|
ChipSet.prototype.updateDIPSwitches = function()
|
||||||
|
{
|
||||||
|
this.updateDIPSwitchControls(0, ChipSet.CONTROLS.SW1);
|
||||||
|
this.updateDIPSwitchControls(1, ChipSet.CONTROLS.SW2);
|
||||||
|
this.updateDIPSwitchDescriptions();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updateDIPSwitchControls(iDIP, sBinding, fInit)
|
* updateDIPSwitchControls(iDIP, sBinding, fInit)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue