[bug]deal with disassembly of unknown opcodes

This commit is contained in:
BigEd 2010-11-27 12:37:14 +00:00
parent fbf0830d15
commit e6d3c62057
1 changed files with 10 additions and 2 deletions

View File

@ -328,9 +328,9 @@ function busToString(busname){
if(busname=='State')
return listActiveTCStates();
if(busname=='Execute')
return dis6502[readBits('ir',8)].replace(/ /,' ');
return dis6502toHTML(readBits('ir',8));
if(busname=='Fetch')
return isNodeHigh(nodenames['sync'])?dis6502[readDataBus()].replace(/ /,' '):'';
return isNodeHigh(nodenames['sync'])?dis6502toHTML(readDataBus()):"";
if(busname=='plaOutputs')
// PLA outputs are mostly ^op- but some have a prefix too
// - we'll allow the x and xx prefix but ignore the #
@ -622,6 +622,14 @@ function adler32(x){
return (0x100000000+(b<<16)+a).toString(16).slice(-8);
}
// sanitised opcode for HTML output
function dis6502toHTML(byte){
var opcode=dis6502[byte];
if(typeof opcode == "undefined")
return "unknown"
return opcode.replace(/ /,'&nbsp;');
}
// opcode lookup for 6502 - not quite a disassembly
// javascript derived from Debugger.java by Achim Breidenbach
var dis6502={