Dumped another Compaq DeskPro 386 ROM (from a 386/25 motherboard)
This commit is contained in:
parent
fcb7c32909
commit
edb72deaf7
6 changed files with 2588 additions and 6 deletions
|
|
@ -174,7 +174,10 @@ FileDump.CLI = function()
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!cMergesPending) file.convertToFile(sOutputFile, fOverwrite);
|
||||
if (!cMergesPending) {
|
||||
if (argv['checksum']) console.log("checksum: " + file.getChecksum());
|
||||
file.convertToFile(sOutputFile, fOverwrite);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -346,6 +349,22 @@ FileDump.prototype.getData = function()
|
|||
return this.buf;
|
||||
};
|
||||
|
||||
/**
|
||||
* getChecksum()
|
||||
*
|
||||
* @this {FileDump}
|
||||
* @return {number|null}
|
||||
*/
|
||||
FileDump.prototype.getChecksum = function()
|
||||
{
|
||||
if (!this.buf) return null;
|
||||
var b = 0;
|
||||
for (var i = 0; i < this.buf.length; i++) {
|
||||
b += this.buf.readUInt8(i);
|
||||
}
|
||||
return b & 0xff;
|
||||
};
|
||||
|
||||
/**
|
||||
* dumpLine(nIndent, sLine, sComment)
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue