Dumped another Compaq DeskPro 386 ROM (from a 386/25 motherboard)

This commit is contained in:
Jeff Parsons 2015-04-26 21:00:03 -07:00 committed by jeffpar
commit edb72deaf7
6 changed files with 2588 additions and 6 deletions

View file

@ -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)
*

View file

@ -44,7 +44,7 @@ var fConsole = false;
var fDebug = false;
var args = proc.getArgs();
var argv = args.argv;
var sCmdPrev = null;
var sCmdPrev = "";
if (argv['console'] !== undefined) fConsole = argv['console'];
if (argv['debug'] !== undefined) fDebug = argv['debug'];
@ -57,8 +57,8 @@ try {
}
/*
* We will build an array of components whose names will match the component names used
* in a JSON machine definition file; eg:
* We will build an array of components whose names will match the component names
* used in a JSON machine definition file; eg:
*
* [
* {name: "panel",
@ -359,6 +359,7 @@ if (argv['cmd'] !== undefined) {
for (var i = 0; i < aCmds.length; i++) {
doCommand(aCmds[i]);
}
sCmdPrev = "";
}
repl.start({