mirror of
https://github.com/trebonian/visual6502.git
synced 2025-04-16 21:37:00 +00:00
[bug]deal with disassembly of unknown opcodes
This commit is contained in:
parent
fbf0830d15
commit
e6d3c62057
12
macros.js
12
macros.js
@ -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(/ /,' ');
|
||||
}
|
||||
|
||||
// opcode lookup for 6502 - not quite a disassembly
|
||||
// javascript derived from Debugger.java by Achim Breidenbach
|
||||
var dis6502={
|
||||
|
Loading…
x
Reference in New Issue
Block a user