Tidied up some status messages

This commit is contained in:
Jeff Parsons 2017-01-25 14:18:19 -08:00 • committed by Jeff Parsons
commit 94fd473b0a
13 changed files with 53 additions and 54 deletions

View file

@ -268,14 +268,12 @@ class ROMPDP11 extends Component {
*/
addROM(addr)
{
this.status(this.sizeROM + "-byte ROM at " + Str.toOct(addr));
if (addr >= BusPDP11.IOPAGE_16BIT && addr < BusPDP11.IOPAGE_16BIT + BusPDP11.IOPAGE_LENGTH) {
/*
* This code has been added as a work-around to effectively allow us to install small ROMs into portions
* of the IOPAGE address space, by installing I/O handlers for the entire range that return the corresponding
* bytes of the current ROM image on reads, and ignore any writes (which I'm only assuming is how a typical
* ROM "device" deals with writes; if we remove the write handler, then writes will fault).
* ROM "device" deals with writes; we could remove the write handler, but then writes would fault).
*
* TODO: It would be more efficient if we parsed ROM data as words rather than bytes, and then installed
* only word handlers instead of only byte handlers. It was done this way purely for historical reasons (ie,
@ -286,6 +284,7 @@ class ROMPDP11 extends Component {
[addr]: [ROMPDP11.prototype.readROMByte, ROMPDP11.prototype.writeROMByte, null, null, null, this.sizeROM >> 1]
};
if (this.bus.addIOTable(this, IOTable)) {
this.status("Added " + this.sizeROM + "-byte ROM at " + Str.toOct(addr));
this.fRetainROM = true;
return true;
}