Read/write breakpoints should work on IOPAGE addresses now, and the Debugger's disassembler now has a Bus interface it can use to get symbolic information about known IOPAGE addresses

This commit is contained in:
Jeff Parsons 2016-12-05 13:39:25 -08:00 committed by Jeff Parsons
commit dba6d1cfae
4 changed files with 473 additions and 400 deletions

View file

@ -235,6 +235,10 @@ BusPDP11.IOController = {
var bus = this.controller;
var afn = bus.aIOHandlers[off];
if (DEBUGGER && this.dbg) {
this.dbg.checkMemoryRead(addr, 1);
}
/*
* Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want
* our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location).
@ -295,6 +299,10 @@ BusPDP11.IOController = {
var bus = this.controller;
var afn = bus.aIOHandlers[off];
if (DEBUGGER && this.dbg) {
this.dbg.checkMemoryWrite(addr, 1);
}
/*
* Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want
* our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location).
@ -373,6 +381,10 @@ BusPDP11.IOController = {
var bus = this.controller;
var afn = bus.aIOHandlers[off];
if (DEBUGGER && this.dbg) {
this.dbg.checkMemoryRead(addr, 2);
}
/*
* Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want
* our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location).
@ -414,6 +426,10 @@ BusPDP11.IOController = {
var bus = this.controller;
var afn = bus.aIOHandlers[off];
if (DEBUGGER && this.dbg) {
this.dbg.checkMemoryWrite(addr, 2);
}
/*
* Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want
* our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location).
@ -467,11 +483,14 @@ BusPDP11.prototype.initMemory = function()
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
this.aBusBlocks[iBlock] = this.aMemBlocks[iBlock] = block;
}
/*
* NOTE: Don't confuse the Bus addrIOPage with the CPU's addrIOPage; ours is fixed,
* based on the machine's Bus width, whereas the CPU's varies according to the MMU setting.
*/
this.addrIOPage = this.addrTotal - BusPDP11.IOPAGE_LENGTH;
this.addMemory(this.addrIOPage, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
var addrIOPage = this.addrTotal - BusPDP11.IOPAGE_LENGTH;
this.addMemory(addrIOPage, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
this.iBlockIOPageBus = (addrIOPage & this.nBusMask) >>> this.nBlockShift;
this.iBlockIOPageBus = (this.addrIOPage & this.nBusMask) >>> this.nBlockShift;
this.iBlockIOPageMem = this.iBlockIOPageBus;
this.nIOPageRange = 0;
@ -1298,6 +1317,26 @@ BusPDP11.prototype.addIOTable = function(component, table, offReg)
return true;
};
/**
* getAddrInfo(addr)
*
* Determine if the physical address is a known IOPAGE address, and return information about it (ie, the name).
*
* @this {BusPDP11}
* @param {number} addr (physical)
* @return {string|null}
*/
BusPDP11.prototype.getAddrInfo = function(addr)
{
var sName = null;
if (addr >= this.addrIOPage) {
var off = addr & BusPDP11.IOPAGE_MASK;
var afn = this.aIOHandlers[off];
if (afn) sName = afn[BusPDP11.IOHANDLER.NAME];
}
return sName;
};
/**
* addResetHandler(fnReset)
*