Fixed old, longstanding, and surprisingly bad bug in cleanMemory() for all machine implementations
This commit is contained in:
parent
2027929148
commit
ec438be5c9
24 changed files with 145 additions and 128 deletions
|
|
@ -359,4 +359,3 @@ From the file `FF_HIST`:
|
|||
Irvine, CA, USA
|
||||
|
||||
- End Of File -
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -264,12 +264,14 @@ Bus.prototype.cleanMemory = function(addr, size)
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
||||
if (this.aMemBlocks[iBlock].fDirty) {
|
||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
|
|
@ -296,12 +296,14 @@ class Bus8080 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
||||
if (this.aMemBlocks[iBlock].fDirty) {
|
||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
|
|
@ -345,12 +345,14 @@ class Bus extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
||||
if (this.aMemBlocks[iBlock].fDirty) {
|
||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
|
|
@ -327,12 +327,14 @@ class BusPDP10 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||
if (this.aBusBlocks[iBlock].fDirty) {
|
||||
this.aBusBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aBusBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
|
|
@ -475,12 +475,14 @@ class BusPDP11 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||
if (this.aBusBlocks[iBlock].fDirty) {
|
||||
this.aBusBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aBusBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4565,12 +4565,14 @@ class Bus8080 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
||||
if (this.aMemBlocks[iBlock].fDirty) {
|
||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -8593,12 +8593,14 @@ class Bus extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aMemBlocks.length) {
|
||||
if (this.aMemBlocks[iBlock].fDirty) {
|
||||
this.aMemBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aMemBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -5762,12 +5762,14 @@ class BusPDP10 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||
if (this.aBusBlocks[iBlock].fDirty) {
|
||||
this.aBusBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aBusBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -6943,12 +6943,14 @@ class BusPDP11 extends Component {
|
|||
{
|
||||
var fClean = true;
|
||||
var iBlock = addr >>> this.nBlockShift;
|
||||
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
|
||||
while (size > 0 && iBlock < this.aBusBlocks.length) {
|
||||
if (this.aBusBlocks[iBlock].fDirty) {
|
||||
this.aBusBlocks[iBlock].fDirty = fClean = false;
|
||||
this.aBusBlocks[iBlock].fDirtyEver = true;
|
||||
}
|
||||
size -= this.nBlockSize;
|
||||
size -= sizeBlock;
|
||||
sizeBlock = this.nBlockSize;
|
||||
iBlock++;
|
||||
}
|
||||
return fClean;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue