mirror of
https://github.com/trebonian/visual6502.git
synced 2025-07-07 22:23:50 +00:00
Compare commits
85 Commits
Author | SHA1 | Date | |
---|---|---|---|
1cb58a1cab | |||
1f78e25b3a | |||
4364604b96 | |||
d5f0604427 | |||
2147762ee4 | |||
651d8a44c5 | |||
51d6bb216b | |||
3b7fbe4385 | |||
f3cffeeed6 | |||
a2a4bc65c5 | |||
815e972d14 | |||
9f4f922e16 | |||
27bec1bfe5 | |||
976fe7e430 | |||
72ac2caf74 | |||
741e035eb4 | |||
dd2241d3de | |||
c0809ba34e | |||
df33b88c56 | |||
7d90b33187 | |||
34244661cb | |||
ce74c3f5d3 | |||
cb03b9741a | |||
7b95b5e345 | |||
de265ecdb8 | |||
e81c9fbe0f | |||
c300e6ad01 | |||
79d0c4c445 | |||
a2d35d54ca | |||
e20eb08b91 | |||
8487a7a9e1 | |||
6c138a4f6b | |||
658d40646c | |||
67e15e68c1 | |||
a316831100 | |||
acd7b0310e | |||
9331be20fe | |||
e6d42eb1aa | |||
8ae5c087f6 | |||
c6dd03ba17 | |||
fca2eb5cb6 | |||
b5c1759f32 | |||
6ceae74e4a | |||
94b306bace | |||
9308b26c42 | |||
335cb06832 | |||
d9440fa160 | |||
10ba01cf12 | |||
e8b964a24f | |||
bbfcf77134 | |||
73f21ffc47 | |||
4e2c84dabc | |||
ca7124b176 | |||
b0710a4cda | |||
baac06bdc3 | |||
9bb8caa025 | |||
b98010206e | |||
7049cef9b7 | |||
9d23382644 | |||
8f5f50d197 | |||
1d21f5ae8b | |||
15b25491b9 | |||
6033109dc6 | |||
0e41f0a9a9 | |||
cb29fb4fad | |||
c02d181d5c | |||
51d0e99389 | |||
d11cf44ae9 | |||
2e69d3a7c3 | |||
f098566335 | |||
e25ac6243c | |||
94e22becb4 | |||
a56ee40bd8 | |||
2ace0e8bad | |||
8f2e296ef6 | |||
ee2fa1befd | |||
7c50999c9e | |||
abf6daef7d | |||
3bf9ae1fac | |||
c4af64f5e8 | |||
82daddcfe4 | |||
50ecadaa00 | |||
8a2342d83c | |||
60b4ecab22 | |||
9ff6ae027e |
182
3rdparty/jquery.cookie.js
vendored
182
3rdparty/jquery.cookie.js
vendored
@ -1,92 +1,92 @@
|
||||
/**
|
||||
* Cookie plugin
|
||||
*
|
||||
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a cookie with the given name and value and other optional parameters.
|
||||
*
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Set the value of a cookie.
|
||||
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
|
||||
* @desc Create a cookie with all available options.
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Create a session cookie.
|
||||
* @example $.cookie('the_cookie', null);
|
||||
* @desc Delete a cookie by passing null as value.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @param String value The value of the cookie.
|
||||
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
||||
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
||||
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
||||
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
||||
* when the the browser exits.
|
||||
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
||||
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
||||
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
||||
* require a secure protocol (like HTTPS).
|
||||
* @type undefined
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the value of a cookie with the given name.
|
||||
*
|
||||
* @example $.cookie('the_cookie');
|
||||
* @desc Get the value of a cookie.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @return The value of the cookie.
|
||||
* @type String
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
jQuery.cookie = function(name, value, options) {
|
||||
if (typeof value != 'undefined') { // name and value given, set cookie
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
var path = options.path ? '; path=' + options.path : '';
|
||||
var domain = options.domain ? '; domain=' + options.domain : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else { // only name given, get cookie
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
/**
|
||||
* Cookie plugin
|
||||
*
|
||||
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a cookie with the given name and value and other optional parameters.
|
||||
*
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Set the value of a cookie.
|
||||
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
|
||||
* @desc Create a cookie with all available options.
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Create a session cookie.
|
||||
* @example $.cookie('the_cookie', null);
|
||||
* @desc Delete a cookie by passing null as value.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @param String value The value of the cookie.
|
||||
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
||||
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
||||
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
||||
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
||||
* when the the browser exits.
|
||||
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
||||
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
||||
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
||||
* require a secure protocol (like HTTPS).
|
||||
* @type undefined
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the value of a cookie with the given name.
|
||||
*
|
||||
* @example $.cookie('the_cookie');
|
||||
* @desc Get the value of a cookie.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @return The value of the cookie.
|
||||
* @type String
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
jQuery.cookie = function(name, value, options) {
|
||||
if (typeof value != 'undefined') { // name and value given, set cookie
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
var path = options.path ? '; path=' + options.path : '';
|
||||
var domain = options.domain ? '; domain=' + options.domain : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else { // only name given, get cookie
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
};
|
4
README
4
README
@ -1,9 +1,11 @@
|
||||
This is the javascript simulator from the visual5602.org project:
|
||||
This is the JavaScript simulator from the visual5602.org project:
|
||||
www.visual6502.org/JSSim
|
||||
|
||||
It includes a general purpose transistor-level simulator, layout browser,
|
||||
and the data from a 6502 revD chip.
|
||||
|
||||
It also includes a similar simulator for the 6800 chip.
|
||||
|
||||
Note the various licenses and Copyright associated with each file.
|
||||
|
||||
Enjoy!
|
||||
|
1222
chip-6800/nodenames.js
Normal file
1222
chip-6800/nodenames.js
Normal file
File diff suppressed because it is too large
Load Diff
9818
chip-6800/segdefs.js
Normal file
9818
chip-6800/segdefs.js
Normal file
File diff suppressed because one or more lines are too long
486
chip-6800/support.js
Normal file
486
chip-6800/support.js
Normal file
@ -0,0 +1,486 @@
|
||||
// chip-specific support functions
|
||||
//
|
||||
// may override function definitions made previously
|
||||
|
||||
chipname='6800';
|
||||
|
||||
grChipSize=7000;
|
||||
|
||||
ngnd = nodenames['gnd'];
|
||||
npwr = nodenames['vcc'];
|
||||
|
||||
nodenamereset = 'reset';
|
||||
|
||||
presetLogLists=[
|
||||
['cycle',],
|
||||
['ab','db','rw','vma','Fetch','pc','acca','accb','ix','sp','p'],
|
||||
['ir','sync','Execute','State'], // instruction fetch and execution control
|
||||
['dbi','dbo','tmp','sum','inc'], // internal register-sized state
|
||||
['idb','abh','abl','ablx'], // internal datapath busses
|
||||
['irq','nmi',nodenamereset,'tsc','dbe','halt','ba'], // other pins
|
||||
];
|
||||
|
||||
function setupTransistors(){
|
||||
for(i in transdefs){
|
||||
var tdef = transdefs[i];
|
||||
var name = tdef[0];
|
||||
var gate = tdef[1];
|
||||
var c1 = tdef[2];
|
||||
var c2 = tdef[3];
|
||||
var bb = tdef[4];
|
||||
if(tdef[6])
|
||||
// just ignore all the 'weak' transistors for now
|
||||
continue;
|
||||
if(c1==ngnd) {c1=c2;c2=ngnd;}
|
||||
if(c1==npwr) {c1=c2;c2=npwr;}
|
||||
var trans = {name: name, on: false, gate: gate, c1: c1, c2: c2, bb: bb};
|
||||
nodes[gate].gates.push(trans);
|
||||
nodes[c1].c1c2s.push(trans);
|
||||
nodes[c2].c1c2s.push(trans);
|
||||
transistors[name] = trans;
|
||||
}
|
||||
}
|
||||
|
||||
// simulate a single clock phase with no update to graphics or trace
|
||||
function halfStep(){
|
||||
var clk = isNodeHigh(nodenames['phi2']);
|
||||
eval(clockTriggers[cycle]);
|
||||
if (clk) {setLow('phi2'); setLow('dbe'); setHigh('phi1'); handleBusRead(); }
|
||||
else {setHigh('phi1'); setLow('phi1'); setHigh('phi2'); setHigh('dbe'); handleBusWrite();}
|
||||
}
|
||||
|
||||
function goUntilSyncOrWrite(){
|
||||
halfStep();
|
||||
cycle++;
|
||||
while(
|
||||
!isNodeHigh(nodenames['phi2']) ||
|
||||
( !isNodeHigh(nodenames['sync']) && isNodeHigh(nodenames['rw']) )
|
||||
) {
|
||||
halfStep();
|
||||
cycle++;
|
||||
}
|
||||
chipStatus();
|
||||
}
|
||||
|
||||
function initChip(){
|
||||
var start = now();
|
||||
for(var nn in nodes) {
|
||||
nodes[nn].state = false;
|
||||
nodes[nn].float = true;
|
||||
}
|
||||
|
||||
nodes[ngnd].state = false;
|
||||
nodes[ngnd].float = false;
|
||||
nodes[npwr].state = true;
|
||||
nodes[npwr].float = false;
|
||||
for(var tn in transistors) transistors[tn].on = false;
|
||||
setLow(nodenamereset);
|
||||
setHigh('phi1'); setLow('phi2'); setLow('dbe');
|
||||
setHigh('dbe'); setLow('tsc'); setHigh('halt');
|
||||
setHigh('irq'); setHigh('nmi');
|
||||
recalcNodeList(allNodes());
|
||||
for(var i=0;i<8;i++){
|
||||
setLow('phi1');
|
||||
setHigh('phi2'); setHigh('dbe');
|
||||
setLow('phi2'); setLow('dbe');
|
||||
setHigh('phi1');
|
||||
}
|
||||
setHigh(nodenamereset);
|
||||
for(var i=0;i<6;i++){halfStep();} // avoid updating graphics and trace buffer before user code
|
||||
refresh();
|
||||
cycle = 0;
|
||||
trace = Array();
|
||||
if(typeof expertMode != "undefined")
|
||||
updateLogList();
|
||||
chipStatus();
|
||||
if(ctrace)console.log('initChip done after', now()-start);
|
||||
}
|
||||
|
||||
function handleBusRead(){
|
||||
if(isNodeHigh(nodenames['rw'])){
|
||||
var a = readAddressBus();
|
||||
var d = eval(readTriggers[a]);
|
||||
if(d == undefined)
|
||||
d = mRead(readAddressBus());
|
||||
if(isNodeHigh(nodenames['sync']))
|
||||
eval(fetchTriggers[d]);
|
||||
writeDataBus(d);
|
||||
}
|
||||
}
|
||||
|
||||
function readAccA(){return readBits('acca', 8);}
|
||||
function readAccB(){return readBits('accb', 8);}
|
||||
function readIX(){return (readBits('ixh', 8)<<8) + readBits('ixl', 8);}
|
||||
function readSP(){return (readBits('sph', 8)<<8) + readBits('spl', 8);}
|
||||
function readPstring(){
|
||||
var result;
|
||||
result = '‑' + // non-breaking hyphen
|
||||
'‑' + // non-breaking hyphen
|
||||
(isNodeHigh(nodenames['flagh'])?'H':'h') +
|
||||
(isNodeHigh(nodenames['flagi'])?'I':'i') +
|
||||
(isNodeHigh(nodenames['flagn'])?'N':'n') +
|
||||
(isNodeHigh(nodenames['flagz'])?'Z':'z') +
|
||||
(isNodeHigh(nodenames['flagv'])?'V':'v') +
|
||||
(isNodeHigh(nodenames['flagc'])?'C':'c');
|
||||
return result;
|
||||
}
|
||||
|
||||
// The 6800 state control is something like a branching shift register
|
||||
// ... but not quite like that
|
||||
TCStates=[
|
||||
"Ts", "Tf",
|
||||
"Tx0", "Tx1", "Tx2",
|
||||
"Ta0", "Ta1", "Ta2",
|
||||
"Td0_0",
|
||||
"#Te0", "Te1_0",
|
||||
"Tg0", "Tg1", "Tg2", "Tg3", "Tg4", "Tg5", "Tg6", "Tg7", "Tg8",
|
||||
"Tr3", "Tr4", "Tr5", "Tr6", "Tr7", "Tr8",
|
||||
];
|
||||
|
||||
function listActiveTCStates() {
|
||||
var s=[];
|
||||
for(var i=0;i<TCStates.length;i++){
|
||||
var t=TCStates[i];
|
||||
// remove a leading hash, but invert the signal
|
||||
// in any case, remove any trailing suffix
|
||||
if(t[0]=="#"){
|
||||
if(!isNodeHigh(nodenames[t])) s.push(t.slice(1,4));
|
||||
} else {
|
||||
if(isNodeHigh(nodenames[t])) s.push(t.slice(0,3));
|
||||
}
|
||||
}
|
||||
return s.join("+");
|
||||
}
|
||||
|
||||
function busToString(busname){
|
||||
// takes a signal name or prefix
|
||||
// returns an appropriate string representation
|
||||
// some 'signal names' are CPU-specific aliases to user-friendly string output
|
||||
if(busname=='cycle')
|
||||
return cycle>>1;
|
||||
if(busname=='pc')
|
||||
return busToHex('pch') + busToHex('pcl');
|
||||
if(busname=='sp')
|
||||
return busToHex('sph') + busToHex('spl');
|
||||
if(busname=='ix')
|
||||
return busToHex('ixh') + busToHex('ixl');
|
||||
if(busname=='inc')
|
||||
return busToHex('inch') + busToHex('incl');
|
||||
if(busname=='p')
|
||||
return readPstring();
|
||||
if(busname=='State')
|
||||
return listActiveTCStates();
|
||||
if(busname=='Execute')
|
||||
return disassemblytoHTML(readBits('ir',8));
|
||||
if(busname=='Fetch')
|
||||
return isNodeHigh(nodenames['sync'])?disassemblytoHTML(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 #
|
||||
return listActiveSignals('^([x]?x-)?op-');
|
||||
if(busname=='DPControl')
|
||||
return listActiveSignals('^dpc[0-9]+_');
|
||||
if(busname[0]=="-"){
|
||||
// invert the value of the bus for display
|
||||
var value=busToHex(busname.slice(1))
|
||||
if(typeof value != "undefined")
|
||||
return value.replace(/./g,function(x){return (15-parseInt(x,16)).toString(16)});
|
||||
else
|
||||
return undefined;;
|
||||
} else {
|
||||
return busToHex(busname);
|
||||
}
|
||||
}
|
||||
|
||||
function chipStatus(){
|
||||
var ab = readAddressBus();
|
||||
var machine1 =
|
||||
' halfcyc:' + cycle +
|
||||
' phi0:' + readBit('phi2') +
|
||||
' AB:' + hexWord(ab) +
|
||||
' D:' + hexByte(readDataBus()) +
|
||||
' RnW:' + readBit('rw') +
|
||||
' VMA:' + readBit('vma');
|
||||
var machine2 =
|
||||
' PC:' + hexWord(readPC()) +
|
||||
' A:' + hexByte(readAccA()) +
|
||||
' B:' + hexByte(readAccB()) +
|
||||
' IX:' + hexWord(readIX()) +
|
||||
' SP:' + hexWord(readSP()) +
|
||||
' ' + readPstring();
|
||||
var machine3 =
|
||||
'Hz: ' + estimatedHz().toFixed(1);
|
||||
if(typeof expertMode != "undefined") {
|
||||
machine3 += ' Exec: ' + busToString('Execute'); // no T-state info for 6800 yet
|
||||
if(isNodeHigh(nodenames['sync']))
|
||||
machine3 += ' (Fetch: ' + busToString('Fetch') + ')';
|
||||
if(goldenChecksum != undefined)
|
||||
machine3 += " Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
|
||||
}
|
||||
|
||||
setStatus(machine1, machine2, machine3);
|
||||
if (logThese.length>1) {
|
||||
updateLogbox(logThese);
|
||||
}
|
||||
selectCell(ab);
|
||||
}
|
||||
|
||||
// javascript derived from http://segher.ircgeeks.net/6800/OPS
|
||||
var disassembly={
|
||||
0x00: "!",
|
||||
0x01: "nop",
|
||||
0x02: "!",
|
||||
0x03: "!",
|
||||
0x04: "!",
|
||||
0x05: "!",
|
||||
0x06: "tap",
|
||||
0x07: "tpa",
|
||||
0x10: "sba",
|
||||
0x11: "cba",
|
||||
0x12: "!",
|
||||
0x13: "!",
|
||||
0x14: "!nba",
|
||||
0x15: "!",
|
||||
0x16: "tab",
|
||||
0x17: "tba",
|
||||
0x20: "bra N",
|
||||
0x21: "!",
|
||||
0x22: "bhi N",
|
||||
0x23: "bls N",
|
||||
0x24: "bcc N",
|
||||
0x25: "bcs N",
|
||||
0x26: "bne N",
|
||||
0x27: "beq N",
|
||||
0x30: "tsx",
|
||||
0x31: "ins",
|
||||
0x32: "pul a",
|
||||
0x33: "pul b",
|
||||
0x34: "des",
|
||||
0x35: "txs",
|
||||
0x36: "psh a",
|
||||
0x37: "psh b",
|
||||
0x40: "neg a",
|
||||
0x41: "!",
|
||||
0x42: "!",
|
||||
0x43: "com a",
|
||||
0x44: "lsr a",
|
||||
0x45: "!",
|
||||
0x46: "ror a",
|
||||
0x47: "asr a",
|
||||
0x50: "neg b",
|
||||
0x51: "!",
|
||||
0x52: "!",
|
||||
0x53: "com b",
|
||||
0x54: "lsr b",
|
||||
0x55: "!",
|
||||
0x56: "ror b",
|
||||
0x57: "asr b",
|
||||
0x60: "neg Nx",
|
||||
0x61: "!",
|
||||
0x62: "!",
|
||||
0x63: "com Nx",
|
||||
0x64: "lsr Nx",
|
||||
0x65: "!",
|
||||
0x66: "ror Nx",
|
||||
0x67: "asr Nx",
|
||||
0x70: "neg NN",
|
||||
0x71: "!",
|
||||
0x72: "!",
|
||||
0x73: "com NN",
|
||||
0x74: "lsr NN",
|
||||
0x75: "!",
|
||||
0x76: "ror NN",
|
||||
0x77: "asr NN",
|
||||
0x80: "sub a #",
|
||||
0x81: "cmp a #",
|
||||
0x82: "sbc a #",
|
||||
0x83: "!",
|
||||
0x84: "and a #",
|
||||
0x85: "bit a #",
|
||||
0x86: "lda a #",
|
||||
0x87: "!",
|
||||
0x90: "sub a N",
|
||||
0x91: "cmp a N",
|
||||
0x92: "sbc a N",
|
||||
0x93: "!",
|
||||
0x94: "and a N",
|
||||
0x95: "bit a N",
|
||||
0x96: "lda a N",
|
||||
0x97: "sta a N",
|
||||
0xa0: "sub a Nx",
|
||||
0xa1: "cmp a Nx",
|
||||
0xa2: "sbc a Nx",
|
||||
0xa3: "!",
|
||||
0xa4: "and a Nx",
|
||||
0xa5: "bit a Nx",
|
||||
0xa6: "lda a Nx",
|
||||
0xa7: "sta a Nx",
|
||||
0xb0: "sub a NN",
|
||||
0xb1: "cmp a NN",
|
||||
0xb2: "sbc a NN",
|
||||
0xb3: "!",
|
||||
0xb4: "and a NN",
|
||||
0xb5: "bit a NN",
|
||||
0xb6: "lda a NN",
|
||||
0xb7: "sta a NN",
|
||||
0xc0: "sub b #",
|
||||
0xc1: "cmp b #",
|
||||
0xc2: "sbc b #",
|
||||
0xc3: "!",
|
||||
0xc4: "and b #",
|
||||
0xc5: "bit b #",
|
||||
0xc6: "lda b #",
|
||||
0xc7: "!",
|
||||
0xd0: "sub b N",
|
||||
0xd1: "cmp b N",
|
||||
0xd2: "sbc b N",
|
||||
0xd3: "!",
|
||||
0xd4: "and b N",
|
||||
0xd5: "bit b N",
|
||||
0xd6: "lda b N",
|
||||
0xd7: "sta b N",
|
||||
0xe0: "sub b Nx",
|
||||
0xe1: "cmp b Nx",
|
||||
0xe2: "sbc b Nx",
|
||||
0xe3: "!",
|
||||
0xe4: "and b Nx",
|
||||
0xe5: "bit b Nx",
|
||||
0xe6: "lda b Nx",
|
||||
0xe7: "sta b Nx",
|
||||
0xf0: "sub b NN",
|
||||
0xf1: "cmp b NN",
|
||||
0xf2: "sbc b NN",
|
||||
0xf3: "!",
|
||||
0xf4: "and b NN",
|
||||
0xf5: "bit b NN",
|
||||
0xf6: "lda b NN",
|
||||
0xf7: "sta b NN",
|
||||
0x08: "inx",
|
||||
0x09: "dex",
|
||||
0x0a: "clv",
|
||||
0x0b: "sev",
|
||||
0x0c: "clc",
|
||||
0x0d: "sec",
|
||||
0x0e: "cli",
|
||||
0x0f: "sei",
|
||||
0x18: "!",
|
||||
0x19: "daa",
|
||||
0x1a: "!",
|
||||
0x1b: "aba",
|
||||
0x1c: "!",
|
||||
0x1d: "!",
|
||||
0x1e: "!",
|
||||
0x1f: "!",
|
||||
0x28: "bvc N",
|
||||
0x29: "bvs N",
|
||||
0x2a: "bpl N",
|
||||
0x2b: "bmi N",
|
||||
0x2c: "bge N",
|
||||
0x2d: "blt N",
|
||||
0x2e: "bgt N",
|
||||
0x2f: "ble N",
|
||||
0x38: "!",
|
||||
0x39: "rts",
|
||||
0x3a: "!",
|
||||
0x3b: "rti",
|
||||
0x3c: "!",
|
||||
0x3d: "!",
|
||||
0x3e: "wai",
|
||||
0x3f: "swi",
|
||||
0x48: "asl a",
|
||||
0x49: "rol a",
|
||||
0x4a: "dec a",
|
||||
0x4b: "!",
|
||||
0x4c: "inc a",
|
||||
0x4d: "tst a",
|
||||
0x4e: "!",
|
||||
0x4f: "clr a",
|
||||
0x58: "asl b",
|
||||
0x59: "rol b",
|
||||
0x5a: "dec b",
|
||||
0x5b: "!",
|
||||
0x5c: "inc b",
|
||||
0x5d: "tst b",
|
||||
0x5e: "!",
|
||||
0x5f: "clr b",
|
||||
0x68: "asl Nx",
|
||||
0x69: "rol Nx",
|
||||
0x6a: "dec Nx",
|
||||
0x6b: "!",
|
||||
0x6c: "inc Nx",
|
||||
0x6d: "tst Nx",
|
||||
0x6e: "jmp Nx",
|
||||
0x6f: "clr Nx",
|
||||
0x78: "asl NN",
|
||||
0x79: "rol NN",
|
||||
0x7a: "dec NN",
|
||||
0x7b: "!",
|
||||
0x7c: "inc NN",
|
||||
0x7d: "tst NN",
|
||||
0x7e: "jmp NN",
|
||||
0x7f: "clr NN",
|
||||
0x88: "eor a #",
|
||||
0x89: "adc a #",
|
||||
0x8a: "ora a #",
|
||||
0x8b: "add a #",
|
||||
0x8c: "cpx ##",
|
||||
0x8d: "bsr N",
|
||||
0x8e: "lds ##",
|
||||
0x8f: "!",
|
||||
0x98: "eor a N",
|
||||
0x99: "adc a N",
|
||||
0x9a: "ora a N",
|
||||
0x9b: "add a N",
|
||||
0x9c: "cpx N",
|
||||
0x9d: "!hcf",
|
||||
0x9e: "lds N",
|
||||
0x9f: "sts N",
|
||||
0xa8: "eor a Nx",
|
||||
0xa9: "adc a Nx",
|
||||
0xaa: "ora a Nx",
|
||||
0xab: "add a Nx",
|
||||
0xac: "cpx Nx",
|
||||
0xad: "jsr Nx",
|
||||
0xae: "lds Nx",
|
||||
0xaf: "sts Nx",
|
||||
0xb8: "eor a NN",
|
||||
0xb9: "adc a NN",
|
||||
0xba: "ora a NN",
|
||||
0xbb: "add a NN",
|
||||
0xbc: "cpx NN",
|
||||
0xbd: "jsr NN",
|
||||
0xbe: "lds NN",
|
||||
0xbf: "sts NN",
|
||||
0xc8: "eor b #",
|
||||
0xc9: "adc b #",
|
||||
0xca: "ora b #",
|
||||
0xcb: "add b #",
|
||||
0xcc: "!",
|
||||
0xcd: "!",
|
||||
0xce: "ldx ##",
|
||||
0xcf: "!",
|
||||
0xd8: "eor b N",
|
||||
0xd9: "adc b N",
|
||||
0xda: "ora b N",
|
||||
0xdb: "add b N",
|
||||
0xdc: "!",
|
||||
0xdd: "!hcf",
|
||||
0xde: "ldx N",
|
||||
0xdf: "stx N",
|
||||
0xe8: "eor b Nx",
|
||||
0xe9: "adc b Nx",
|
||||
0xea: "ora b Nx",
|
||||
0xeb: "add b Nx",
|
||||
0xec: "!",
|
||||
0xed: "!",
|
||||
0xee: "ldx Nx",
|
||||
0xef: "stx Nx",
|
||||
0xf8: "eor b NN",
|
||||
0xf9: "adc b NN",
|
||||
0xfa: "ora b NN",
|
||||
0xfb: "add b NN",
|
||||
0xfc: "!",
|
||||
0xfd: "!",
|
||||
0xfe: "ldx NN",
|
||||
0xff: "stx NN",
|
||||
};
|
31
chip-6800/testprogram.js
Normal file
31
chip-6800/testprogram.js
Normal file
@ -0,0 +1,31 @@
|
||||
// This file testprogram.js can be substituted by one of several tests
|
||||
testprogramAddress=0x0000;
|
||||
|
||||
// we want to auto-clear the console if any output is sent by the program
|
||||
var consoleboxStream="";
|
||||
|
||||
// demonstrate write hook
|
||||
writeTriggers[0x8000]="consoleboxStream += String.fromCharCode(d);"+
|
||||
"consolebox.innerHTML = consoleboxStream;";
|
||||
|
||||
// demonstrate read hook (not used by this test program)
|
||||
readTriggers[0x8004]="((consolegetc==undefined)?0:0xff)"; // return zero until we have a char
|
||||
readTriggers[0x8000]="var c=consolegetc; consolegetc=undefined; (c)";
|
||||
|
||||
// for opcodes, see http://www.textfiles.com/programming/CARDS/6800
|
||||
|
||||
testprogram = [
|
||||
0xce, 0x43, 0x21, // LDX #4321
|
||||
0x35, // TXS
|
||||
0xce, 0x80, 0x00, // LDX #8000
|
||||
0xc6, 0x40, // LDAB #$40
|
||||
0xbd, 0x00, 0x10, // JSR $0010
|
||||
0x7e, 0x00, 0x09, // JMP $0009
|
||||
0x01, // NOP
|
||||
0x4a, // DECA
|
||||
0xe7, 0x00, // STAB 0, X
|
||||
0x7c, 0x00, 0x0f, // INC $0F
|
||||
0x0d, // SEC
|
||||
0xc9, 0x02, // ADCB #$02
|
||||
0x39, // RTS
|
||||
]
|
4017
chip-6800/transdefs.js
Executable file
4017
chip-6800/transdefs.js
Executable file
File diff suppressed because it is too large
Load Diff
10
chipsim.js
10
chipsim.js
@ -143,7 +143,15 @@ function saveString(name, str){
|
||||
|
||||
function allNodes(){
|
||||
var res = new Array();
|
||||
for(var i in nodes) if((i!=npwr)&&(i!=ngnd)) res.push(i);
|
||||
var ii = 0;
|
||||
for(var i in nodes) {
|
||||
// Don't feed numeric strings to recalcNodeList(). Numeric
|
||||
// strings can cause a (data dependent) duplicate node number
|
||||
// hiccup when accumulating a node group's list, ie:
|
||||
// group => [ "49", 483, 49 ]
|
||||
ii = Number( i );
|
||||
if((ii!=npwr)&&(ii!=ngnd)) res.push(ii);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
153
expert-6800.html
Normal file
153
expert-6800.html
Normal file
@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<title>Visual 6800 in JavaScript</title>
|
||||
<style type="text/css">@import "expert.css";</style>
|
||||
<script src="chip-6800/segdefs.js"></script>
|
||||
<script src="chip-6800/transdefs.js"></script>
|
||||
<script src="chip-6800/nodenames.js"></script>
|
||||
<script src="wires.js"></script>
|
||||
<script src="expertWires.js"></script>
|
||||
<script src="chipsim.js"></script>
|
||||
<script src="memtable.js"></script>
|
||||
<script src="macros.js"></script>
|
||||
<script src="chip-6800/support.js"></script>
|
||||
<script src="chip-6800/testprogram.js"></script>
|
||||
<script src="3rdparty/jquery-1.3.2.min.js"></script>
|
||||
<script src="3rdparty/jquery.cookie.js"></script>
|
||||
<script src="3rdparty/splitter.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function handleOnload() {
|
||||
/MSIE (\d+\.\d+);/.test(navigator.appVersion);
|
||||
IEVersion=Number(RegExp.$1);
|
||||
if((navigator.appName == 'Microsoft Internet Explorer') && (IEVersion<9)){
|
||||
document.getElementById('browsertrouble').innerHTML=
|
||||
'<p>Sorry, '+navigator.appName+' not supported - showing you a picture instead!</p>';
|
||||
document.getElementById('frame').innerHTML='<a href="browsertrouble.html"><img src="images/jssim2.png" style="border:10px"></a>';
|
||||
}else{
|
||||
setTimeout(setup,200);
|
||||
}
|
||||
};
|
||||
|
||||
// initialise splitter (built on jquery)
|
||||
$().ready(function(){
|
||||
$("#frame").splitter({
|
||||
type: "v",
|
||||
outline: true,
|
||||
minLeft: 20,
|
||||
sizeLeft: 810,
|
||||
resizeToWidth: true,
|
||||
anchorToWindow: true,
|
||||
});
|
||||
$("#rightcolumn").splitter({
|
||||
type: "h",
|
||||
outline: true,
|
||||
sizeBottom: 180,
|
||||
minTop: 100,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="handleOnload();">
|
||||
<span id="plain">
|
||||
<a href="http://www.visual6502.org/faq.html">FAQ</a>
|
||||
<a href="http://blog.visual6502.org">Blog</a>
|
||||
<a href="http://www.visual6502.org/links.html">Links</a>
|
||||
<a href="http://github.com/trebonian/visual6502">Source</a>
|
||||
<a href="http://www.textfiles.com/programming/CARDS/6800">6800 instruction card</a>
|
||||
<a href="http://www.sbprojects.com/sbasm/6800.htm#model">programming model</a>
|
||||
</span>
|
||||
<div class="frame" id="frame">
|
||||
<div class="leftcolumn" id="leftcolumn">
|
||||
<div id="chipsurround" tabindex="1">
|
||||
<div class="chip" id="chip">
|
||||
<span id="waiting">Please wait, graphics initialising...</span>
|
||||
<canvas class="chip" id="chipbg"></canvas>
|
||||
<canvas class="chip" id="overlay"></canvas>
|
||||
<canvas class="chip" id="hilite"></canvas>
|
||||
<canvas class="chip" id="hitbuffer"></canvas>
|
||||
</div>
|
||||
</div> <!-- chipsurround -->
|
||||
<div class="nochip" id="nochip">
|
||||
<form>
|
||||
<input type="button" value="Show chip layout" onclick="updateChipLayoutVisibility(true)" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="layoutControlPanel">
|
||||
Use 'z' or '>' to zoom in, 'x' or '<' to zoom out, click to probe signals and drag to pan.
|
||||
<form id="updateShow"> Show:
|
||||
<input type="checkbox" name="1" id="updateShow1" onchange="updateShow(this.name,this.checked)" />(diffusion)
|
||||
<input type="checkbox" name="3" id="updateShow3" onchange="updateShow(this.name,this.checked)" />(grounded diffusion)
|
||||
<input type="checkbox" name="4" id="updateShow4" onchange="updateShow(this.name,this.checked)" />(powered diffusion)
|
||||
<input type="checkbox" name="5" id="updateShow5" onchange="updateShow(this.name,this.checked)" />(polysilicon)
|
||||
<input type="checkbox" name="0" id="updateShow0" onchange="updateShow(this.name,this.checked)" />(metal)
|
||||
<input type="checkbox" name="2" id="updateShow2" onchange="updateShow(this.name,this.checked)" />(protection)
|
||||
</form>
|
||||
<form action="javascript:hiliteNodeList();">
|
||||
<input type="button" value="Find:" onclick="hiliteNodeList();" />
|
||||
<input type="text" id="HighlightThese" name="HighlightThese" value="" />
|
||||
<input type="button" value="Clear Highlighting" onclick="clearHighlight();" />
|
||||
<span class="animatebox">
|
||||
Animate during simulation:
|
||||
<input type="checkbox" id="animateModeCheckbox" onchange="updateChipLayoutAnimation(this.checked)"
|
||||
/></span>
|
||||
</form>
|
||||
<form>
|
||||
<input type="button" value="Hide Chip Layout" onclick="updateChipLayoutVisibility(false)" />
|
||||
<a href="" id="linkHere" >Link to this location</a>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- closing leftcolumn -->
|
||||
<div class="rightcolumn" id="rightcolumn">
|
||||
<div id="righttopdiv">
|
||||
<div class = "buttons">
|
||||
<div class="twobuttons">
|
||||
<a href ="javascript:stopChip()" id="stop"><img class="navstop" src="images/stop.png" title="stop"></a>
|
||||
<a href ="javascript:runChip()" id="start"><img class="navplay" src="images/play.png" title="run"></a>
|
||||
</div>
|
||||
<div class="morebuttons">
|
||||
<a href ="javascript:resetChip()"><img class="navbutton" src="images/up.png" title="reset"></a>
|
||||
<a href ="javascript:stepBack()"><img class="navbutton" src="images/prev.png" title="back"></a>
|
||||
<a href ="javascript:stepForward()"><img class="navbutton" src="images/next.png" title="forward"></a>
|
||||
<a href ="javascript:goUntilSyncOrWrite()"><img class="navbutton" src="images/singlestep.png" title="step"></a>
|
||||
<a href ="javascript:goFor()"><img class="navbutton" src="images/fastforward.png" title="fastforward"></a>
|
||||
</div>
|
||||
<div style="float:right;">
|
||||
<a href="http://visual6502.org/wiki/index.php?title=JssimUserHelp" target="_blank">User Guide</a>
|
||||
|
||||
</div>
|
||||
</div> <!-- buttons -->
|
||||
<div class="status" id="status"><p>x: 0<br>y: 0</p>
|
||||
</div> <!-- status -->
|
||||
|
||||
<div id="memtablediv">
|
||||
<table class="memtable" id="memtable" tabindex="2"></table>
|
||||
</div>
|
||||
</div> <!-- righttopdiv -->
|
||||
|
||||
<div id="tracingdiv">
|
||||
<textarea id="consolebox">
|
||||
click here and type if your program handles input
|
||||
</textarea>
|
||||
<div id="expertControlPanel" tabindex="3">
|
||||
<form action="javascript:updateLogList()">
|
||||
<input type="button" value="Trace more" onclick="updateLoglevel(++loglevel)" />
|
||||
<input type="button" value="Trace less" onclick="updateLoglevel(--loglevel)" />
|
||||
<input type="button" value="Trace these too:" onclick="updateLogList()" />
|
||||
<input type="text" id="LogThese" name="LogThese" value="" />
|
||||
<input type="button" value="Log Up/Down" onclick="updateLogDirection();" />
|
||||
<input type="button" value="Clear Log" onclick="updateLoglevel(loglevel)" />
|
||||
</form>
|
||||
<br />
|
||||
</div>
|
||||
<div id="logstreamscroller">
|
||||
<table class="logstream" id="logstream"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- closing rightcolumn -->
|
||||
</div> <!-- closing 'frame' div -->
|
||||
</body>
|
||||
</html>
|
14866
expert-allinone.js
Normal file
14866
expert-allinone.js
Normal file
File diff suppressed because one or more lines are too long
18
expert.html
18
expert.html
@ -56,7 +56,7 @@ $().ready(function(){
|
||||
<a href="http://blog.visual6502.org">Blog</a>
|
||||
<a href="http://www.visual6502.org/links.html">Links</a>
|
||||
<a href="http://github.com/trebonian/visual6502">Source</a>
|
||||
<a href="http://www.6502asm.com/">6502asm assembler</a>
|
||||
<a href="http://skilldrick.github.com/easy6502/#first-program">easy6502 assembler</a>
|
||||
<a href="http://www.e-tradition.net/bytes/6502/disassembler.html">e-tradition disassembler</a>
|
||||
</span>
|
||||
<div class="frame" id="frame">
|
||||
@ -76,21 +76,21 @@ $().ready(function(){
|
||||
</form>
|
||||
</div>
|
||||
<div id="layoutControlPanel">
|
||||
Use 'z' or '>' to zoom in, 'x' or '<' to zoom out, click to probe signals and drag to pan.
|
||||
Use 'z' or '>' to zoom in, 'x' or '<' to zoom out, click to probe signals and drag to pan.
|
||||
<form id="updateShow"> Show:
|
||||
<input type="checkbox" name="1" id="updateShow1" onchange="updateShow(this.name,this.checked)" />(diffusion)
|
||||
<input type="checkbox" name="3" id="updateShow3" onchange="updateShow(this.name,this.checked)" />(grounded diffusion)
|
||||
<input type="checkbox" name="4" id="updateShow4" onchange="updateShow(this.name,this.checked)" />(powered diffusion)
|
||||
<input type="checkbox" name="5" id="updateShow5" onchange="updateShow(this.name,this.checked)" />(polysilicon)
|
||||
<input type="checkbox" name="0" id="updateShow0" onchange="updateShow(this.name,this.checked)" />(metal)
|
||||
<input type="checkbox" name="2" id="updateShow2" onchange="updateShow(this.name,this.checked)" />(protection)
|
||||
<input type="checkbox" name="1" id="updateShow1" onchange="updateShow(this.name,this.checked)" /><label for="updateShow1">(diffusion)</label>
|
||||
<input type="checkbox" name="3" id="updateShow3" onchange="updateShow(this.name,this.checked)" /><label for="updateShow3">(grounded diffusion)</label>
|
||||
<input type="checkbox" name="4" id="updateShow4" onchange="updateShow(this.name,this.checked)" /><label for="updateShow4">(powered diffusion)</label>
|
||||
<input type="checkbox" name="5" id="updateShow5" onchange="updateShow(this.name,this.checked)" /><label for="updateShow5">(polysilicon)</label>
|
||||
<input type="checkbox" name="0" id="updateShow0" onchange="updateShow(this.name,this.checked)" /><label for="updateShow0">(metal)</label>
|
||||
<input type="checkbox" name="2" id="updateShow2" onchange="updateShow(this.name,this.checked)" /><label for="updateShow2">(protection)</label>
|
||||
</form>
|
||||
<form action="javascript:hiliteNodeList();">
|
||||
<input type="button" value="Find:" onclick="hiliteNodeList();" />
|
||||
<input type="text" id="HighlightThese" name="HighlightThese" value="" />
|
||||
<input type="button" value="Clear Highlighting" onclick="clearHighlight();" />
|
||||
<span class="animatebox">
|
||||
Animate during simulation:
|
||||
<label for="animateModeCheckbox">Animate during simulation:</label>
|
||||
<input type="checkbox" id="animateModeCheckbox" onchange="updateChipLayoutAnimation(this.checked)"
|
||||
/></span>
|
||||
</form>
|
||||
|
@ -96,7 +96,7 @@ function setup_part3(){
|
||||
// which saves a lot of memory and allows us to run on small systems
|
||||
updateChipLayoutVisibility(true);
|
||||
}
|
||||
setStatus('resetting 6502...');
|
||||
setStatus('resetting ' + chipname + '...');
|
||||
setTimeout(setup_part4, 0);
|
||||
}
|
||||
|
||||
@ -195,17 +195,25 @@ function setupParams(){
|
||||
} else
|
||||
// setup input pin events, breakpoints, watchpoints
|
||||
if(name=="reset0" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setLow('res');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setLow(nodenamereset);"].join("");
|
||||
} else if(name=="reset1" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setHigh('res');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setHigh(nodenamereset);"].join("");
|
||||
} else if(name=="irq0" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setLow('irq');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setLow('irq');"].join("");
|
||||
} else if(name=="irq1" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setHigh('irq');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setHigh('irq');"].join("");
|
||||
} else if(name=="nmi0" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setLow('nmi');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setLow('nmi');"].join("");
|
||||
} else if(name=="nmi1" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setHigh('nmi');";
|
||||
clockTriggers[value]=[clockTriggers[value],"setHigh('nmi');"].join("");
|
||||
} else if(name=="rdy0" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]=[clockTriggers[value],"setLow('rdy');"].join("");
|
||||
} else if(name=="rdy1" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]=[clockTriggers[value],"setHigh('rdy');"].join("");
|
||||
} else if(name=="time" && parseInt(value)!=NaN){
|
||||
eventTime=value;
|
||||
} else if(name=="databus" && parseInt(value)!=NaN){
|
||||
clockTriggers[eventTime]=[clockTriggers[eventTime],"writeDataBus(0x"+value+");"].join("");
|
||||
} else
|
||||
// run a test program, and optionally check against a golden checksum
|
||||
if(name=="steps" && parseInt(value)!=NaN){
|
||||
|
14
index.html
14
index.html
@ -66,7 +66,7 @@ Keyboard controls: 'z' to zoom in, 'x' to zoom out, 'n' to step the simulation.
|
||||
<br />
|
||||
Mouse controls: Left-click and drag to scroll around (when you're zoomed in.)
|
||||
<br />
|
||||
More information in the <a href="http://visual6502.org/wiki/index.php?title=JssimUserHelp">User Guide<a>.
|
||||
More information in the <a href="http://visual6502.org/wiki/index.php?title=JssimUserHelp">User Guide</a>.
|
||||
<br />
|
||||
<br />
|
||||
</span>
|
||||
@ -79,13 +79,13 @@ More information in the <a href="http://visual6502.org/wiki/index.php?title=Jssi
|
||||
</div>
|
||||
<div class = "buttons">
|
||||
<div style="position:relative; float:left;">
|
||||
<a href ="javascript:stopChip()"id="stop"><img class="navstop" src="images/stop.png"></a>
|
||||
<a href ="javascript:runChip()" id="start"><img class="navplay" src="images/play.png"></a>
|
||||
<a href ="javascript:stopChip()" id="stop"><img class="navstop" src="images/stop.png" title="stop"></a>
|
||||
<a href ="javascript:runChip()" id="start"><img class="navplay" src="images/play.png" title="start"></a>
|
||||
</div>
|
||||
<div style="float:left;">
|
||||
<a href ="javascript:resetChip()"><img class="navbutton" src="images/up.png"></a>
|
||||
<a href ="javascript:stepBack()"><img class="navbutton" src="images/prev.png"></a>
|
||||
<a href ="javascript:stepForward()"><img class="navbutton" src="images/next.png"></a>
|
||||
<a href ="javascript:resetChip()"><img class="navbutton" src="images/up.png" title="reset"></a>
|
||||
<a href ="javascript:stepBack()"><img class="navbutton" src="images/prev.png" title="back"></a>
|
||||
<a href ="javascript:stepForward()"><img class="navbutton" src="images/next.png" title="step"></a>
|
||||
</div>
|
||||
<div style="float:right; margin-left:20px;">... or try <a href="expert.html">Advanced</a></div>
|
||||
</div>
|
||||
@ -97,7 +97,7 @@ More information in the <a href="http://visual6502.org/wiki/index.php?title=Jssi
|
||||
<br />
|
||||
<br />
|
||||
Source code is available on <a href="http://github.com/trebonian/visual6502">github visual6502</a>.
|
||||
Use the online <a href="http://www.6502asm.com/">emulator and assembler</a> from 6502asm.com
|
||||
Use the online <a href="http://skilldrick.github.com/easy6502/#first-program">emulator and assembler</a> from the easy6502 tutorial
|
||||
and <a href="http://www.e-tradition.net/bytes/6502/disassembler.html">disassembler</a> from e-tradition.net
|
||||
<br />
|
||||
For in-depth 6502 investigation and some more advanced features, try our <a href="expert.html">Advanced</a> page.
|
||||
|
@ -89,6 +89,6 @@ table.memtable {
|
||||
}
|
||||
|
||||
#title {
|
||||
font-size:30px;
|
||||
font-size:30px;
|
||||
font-weight:bold;
|
||||
}
|
29
macros.js
29
macros.js
@ -26,6 +26,8 @@ var trace = Array();
|
||||
var logstream = Array();
|
||||
var running = false;
|
||||
var logThese=[];
|
||||
var chipname='6502';
|
||||
var nodenamereset='res';
|
||||
var presetLogLists=[
|
||||
['cycle'],
|
||||
['ab','db','rw','Fetch','pc','a','x','y','s','p'],
|
||||
@ -35,7 +37,7 @@ var presetLogLists=[
|
||||
['alucin','alua','alub','alucout','aluvout','dasb'],
|
||||
['plaOutputs','DPControl'],
|
||||
['idb','dor'],
|
||||
['irq','nmi','res'],
|
||||
['irq','nmi',nodenamereset],
|
||||
];
|
||||
|
||||
function loadProgram(){
|
||||
@ -147,13 +149,13 @@ function initChip(){
|
||||
nodes[npwr].state = true;
|
||||
nodes[npwr].float = false;
|
||||
for(var tn in transistors) transistors[tn].on = false;
|
||||
setLow('res');
|
||||
setLow(nodenamereset);
|
||||
setLow('clk0');
|
||||
setHigh('rdy'); setLow('so');
|
||||
setHigh('irq'); setHigh('nmi');
|
||||
recalcNodeList(allNodes());
|
||||
for(var i=0;i<8;i++){setHigh('clk0'), setLow('clk0');}
|
||||
setHigh('res');
|
||||
setHigh(nodenamereset);
|
||||
for(var i=0;i<18;i++){halfStep();} // avoid updating graphics and trace buffer before user code
|
||||
refresh();
|
||||
cycle = 0;
|
||||
@ -224,9 +226,10 @@ fetchTriggers={};
|
||||
// simulate a single clock phase with no update to graphics or trace
|
||||
function halfStep(){
|
||||
var clk = isNodeHigh(nodenames['clk0']);
|
||||
eval(clockTriggers[cycle]);
|
||||
if (clk) {setLow('clk0'); handleBusRead(); }
|
||||
else {setHigh('clk0'); handleBusWrite();}
|
||||
eval(clockTriggers[cycle+1]); // pre-apply next tick's inputs now, so the updates are displayed
|
||||
|
||||
}
|
||||
|
||||
function handleBusRead(){
|
||||
@ -328,9 +331,9 @@ function busToString(busname){
|
||||
if(busname=='State')
|
||||
return listActiveTCStates();
|
||||
if(busname=='Execute')
|
||||
return dis6502toHTML(readBits('ir',8));
|
||||
return disassemblytoHTML(readBits('ir',8));
|
||||
if(busname=='Fetch')
|
||||
return isNodeHigh(nodenames['sync'])?dis6502toHTML(readDataBus()):"";
|
||||
return isNodeHigh(nodenames['sync'])?disassemblytoHTML(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 #
|
||||
@ -424,7 +427,7 @@ function stopChip(){
|
||||
|
||||
function resetChip(){
|
||||
stopChip();
|
||||
setStatus('resetting 6502...');
|
||||
setStatus('resetting ' + chipname + '...');
|
||||
setTimeout(initChip,0);
|
||||
}
|
||||
|
||||
@ -469,7 +472,7 @@ function chipStatus(){
|
||||
machine3 += " Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
|
||||
}
|
||||
setStatus(machine1, machine2, machine3);
|
||||
if (loglevel>0) {
|
||||
if (logThese.length>1) {
|
||||
updateLogbox(logThese);
|
||||
}
|
||||
selectCell(ab);
|
||||
@ -507,6 +510,8 @@ function goForN(n){
|
||||
return;
|
||||
}
|
||||
running = false;
|
||||
var start = document.getElementById('start');
|
||||
var stop = document.getElementById('stop');
|
||||
start.style.visibility = 'visible';
|
||||
stop.style.visibility = 'hidden';
|
||||
}
|
||||
@ -623,8 +628,8 @@ function adler32(x){
|
||||
}
|
||||
|
||||
// sanitised opcode for HTML output
|
||||
function dis6502toHTML(byte){
|
||||
var opcode=dis6502[byte];
|
||||
function disassemblytoHTML(byte){
|
||||
var opcode=disassembly[byte];
|
||||
if(typeof opcode == "undefined")
|
||||
return "unknown"
|
||||
return opcode.replace(/ /,' ');
|
||||
@ -632,7 +637,7 @@ function dis6502toHTML(byte){
|
||||
|
||||
// opcode lookup for 6502 - not quite a disassembly
|
||||
// javascript derived from Debugger.java by Achim Breidenbach
|
||||
var dis6502={
|
||||
var disassembly={
|
||||
0x00:"BRK",
|
||||
0x01:"ORA (zp,X)",
|
||||
0x05:"ORA zp",
|
||||
@ -694,7 +699,7 @@ var dis6502={
|
||||
0x68:"PLA",
|
||||
0x69:"ADC #",
|
||||
0x6A:"ROR ",
|
||||
0x6C:"JMP zp",
|
||||
0x6C:"JMP (Abs)",
|
||||
0x6D:"ADC Abs",
|
||||
0x6E:"ROR Abs",
|
||||
0x70:"BVS ",
|
||||
|
215
nodenames.js
215
nodenames.js
@ -82,7 +82,7 @@ x4: 85,
|
||||
x5: 589,
|
||||
x6: 448,
|
||||
x7: 777,
|
||||
pcl0: 1139, // machine state: program counter low (first storage node)
|
||||
pcl0: 1139, // machine state: program counter low (first storage node output)
|
||||
pcl1: 1022,
|
||||
pcl2: 655,
|
||||
pcl3: 1359,
|
||||
@ -90,14 +90,30 @@ pcl4: 900,
|
||||
pcl5: 622,
|
||||
pcl6: 377,
|
||||
pcl7: 1611,
|
||||
pclp0: 1227, // machine state: program counter low (pre-incremented?, second storage node)
|
||||
pclp1: 1102,
|
||||
pclp2: 1079,
|
||||
pclp3: 868,
|
||||
pclp4: 39,
|
||||
pclp5: 1326,
|
||||
pclp6: 731,
|
||||
pclp7: 536,
|
||||
pclp0: 488, // machine state: program counter low (pre-incremented?, second storage node)
|
||||
pclp1: 976,
|
||||
pclp2: 481,
|
||||
pclp3: 723,
|
||||
pclp4: 208,
|
||||
pclp5: 72,
|
||||
pclp6: 1458,
|
||||
pclp7: 1647,
|
||||
"#pclp0": 1227, // machine state: program counter low (pre-incremented?, inverse second storage node)
|
||||
"~pclp0": 1227, // automatic alias replacing hash with tilde
|
||||
"#pclp1": 1102,
|
||||
"~pclp1": 1102, // automatic alias replacing hash with tilde
|
||||
"#pclp2": 1079,
|
||||
"~pclp2": 1079, // automatic alias replacing hash with tilde
|
||||
"#pclp3": 868,
|
||||
"~pclp3": 868, // automatic alias replacing hash with tilde
|
||||
"#pclp4": 39,
|
||||
"~pclp4": 39, // automatic alias replacing hash with tilde
|
||||
"#pclp5": 1326,
|
||||
"~pclp5": 1326, // automatic alias replacing hash with tilde
|
||||
"#pclp6": 731,
|
||||
"~pclp6": 731, // automatic alias replacing hash with tilde
|
||||
"#pclp7": 536,
|
||||
"~pclp7": 536, // automatic alias replacing hash with tilde
|
||||
pch0: 1670, // machine state: program counter high (first storage node)
|
||||
pch1: 292,
|
||||
pch2: 502,
|
||||
@ -106,14 +122,30 @@ pch4: 948,
|
||||
pch5: 49,
|
||||
pch6: 1551,
|
||||
pch7: 205,
|
||||
pchp0: 780, // machine state: program counter high (pre-incremented?, second storage node)
|
||||
pchp1: 113,
|
||||
pchp2: 114,
|
||||
pchp3: 124,
|
||||
pchp4: 820,
|
||||
pchp5: 33,
|
||||
pchp6: 751,
|
||||
pchp7: 535,
|
||||
pchp0: 1722, // machine state: program counter high (pre-incremented?, second storage node output)
|
||||
pchp1: 209,
|
||||
pchp2: 1496,
|
||||
pchp3: 141,
|
||||
pchp4: 27,
|
||||
pchp5: 1301,
|
||||
pchp6: 652,
|
||||
pchp7: 1206,
|
||||
"#pchp0": 780, // machine state: program counter high (pre-incremented?, inverse second storage node)
|
||||
"~pchp0": 780, // automatic alias replacing hash with tilde
|
||||
"#pchp1": 113,
|
||||
"~pchp1": 113, // automatic alias replacing hash with tilde
|
||||
"#pchp2": 114,
|
||||
"~pchp2": 114, // automatic alias replacing hash with tilde
|
||||
"#pchp3": 124,
|
||||
"~pchp3": 124, // automatic alias replacing hash with tilde
|
||||
"#pchp4": 820,
|
||||
"~pchp4": 820, // automatic alias replacing hash with tilde
|
||||
"#pchp5": 33,
|
||||
"~pchp5": 33, // automatic alias replacing hash with tilde
|
||||
"#pchp6": 751,
|
||||
"~pchp6": 751, // automatic alias replacing hash with tilde
|
||||
"#pchp7": 535,
|
||||
"~pchp7": 535, // automatic alias replacing hash with tilde
|
||||
// machine state: status register (not the storage nodes)
|
||||
p0: 32, // C bit of status register (storage node)
|
||||
p1: 627, // Z bit of status register (storage node)
|
||||
@ -158,9 +190,11 @@ notir4: 26,
|
||||
notir5: 1394,
|
||||
notir6: 895,
|
||||
notir7: 1320,
|
||||
irline3: 996, // internal signal: PLA input - ir0 AND ir1
|
||||
irline3: 996, // internal signal: PLA input - ir0 OR ir1
|
||||
clock1: 1536, // internal state: timing control aka #T0
|
||||
clock1: 1536, // automatic alias replacing hash with tilde
|
||||
clock2: 156, // internal state: timing control aka #T+
|
||||
clock2: 156, // automatic alias replacing hash with tilde
|
||||
t2: 971, // internal state: timing control
|
||||
t3: 1567,
|
||||
t4: 690,
|
||||
@ -214,6 +248,7 @@ sb5: 166,
|
||||
sb6: 1336,
|
||||
sb7: 1001,
|
||||
notalu0: 394, // datapath state: alu output storage node (inverse) aka #ADD0
|
||||
notalu0: 394, // automatic alias replacing hash with tilde
|
||||
notalu1: 697,
|
||||
notalu2: 276,
|
||||
notalu3: 495,
|
||||
@ -301,7 +336,9 @@ pd7: 1690,
|
||||
"PD-xxx010x1": 302,
|
||||
"PD-n-0xx0xx0x": 125,
|
||||
"#TWOCYCLE": 851,
|
||||
"~TWOCYCLE": 851, // automatic alias replacing hash with tilde
|
||||
"#TWOCYCLE.phi1": 792,
|
||||
"~TWOCYCLE.phi1": 792, // automatic alias replacing hash with tilde
|
||||
"ONEBYTE": 778,
|
||||
|
||||
abl0: 1096, // internal bus: address bus low latched data out (inverse of inverted storage node)
|
||||
@ -311,15 +348,23 @@ abl3: 1250,
|
||||
abl4: 1232,
|
||||
abl5: 234,
|
||||
abl6: 178,
|
||||
abl7: 178,
|
||||
abl7: 567,
|
||||
"#ABL0": 153, // internal state: address bus low latched data out (storage node, inverted)
|
||||
"~ABL0": 153, // automatic alias replacing hash with tilde
|
||||
"#ABL1": 107,
|
||||
"~ABL1": 107, // automatic alias replacing hash with tilde
|
||||
"#ABL2": 707,
|
||||
"~ABL2": 707, // automatic alias replacing hash with tilde
|
||||
"#ABL3": 825,
|
||||
"~ABL3": 825, // automatic alias replacing hash with tilde
|
||||
"#ABL4": 364,
|
||||
"~ABL4": 364, // automatic alias replacing hash with tilde
|
||||
"#ABL5": 1513,
|
||||
"~ABL5": 1513, // automatic alias replacing hash with tilde
|
||||
"#ABL6": 1307,
|
||||
"~ABL6": 1307, // automatic alias replacing hash with tilde
|
||||
"#ABL7": 28,
|
||||
"~ABL7": 28, // automatic alias replacing hash with tilde
|
||||
abh0: 1429, // internal bus: address bus high latched data out (inverse of inverted storage node)
|
||||
abh1: 713,
|
||||
abh2: 287,
|
||||
@ -329,28 +374,41 @@ abh5: 775,
|
||||
abh6: 997,
|
||||
abh7: 489,
|
||||
"#ABH0": 1062, // internal state: address bus high latched data out (storage node, inverted)
|
||||
"~ABH0": 1062, // automatic alias replacing hash with tilde
|
||||
"#ABH1": 907,
|
||||
"~ABH1": 907, // automatic alias replacing hash with tilde
|
||||
"#ABH2": 768,
|
||||
"~ABH2": 768, // automatic alias replacing hash with tilde
|
||||
"#ABH3": 92,
|
||||
"~ABH3": 92, // automatic alias replacing hash with tilde
|
||||
"#ABH4": 668,
|
||||
"~ABH4": 668, // automatic alias replacing hash with tilde
|
||||
"#ABH5": 1128,
|
||||
"~ABH5": 1128, // automatic alias replacing hash with tilde
|
||||
"#ABH6": 289,
|
||||
"~ABH6": 289, // automatic alias replacing hash with tilde
|
||||
"#ABH7": 429,
|
||||
"~ABH7": 429, // automatic alias replacing hash with tilde
|
||||
|
||||
notRdy0: 248, // internal signal: global pipeline control
|
||||
"branch-back": 626, // distinguish forward from backward branches
|
||||
"branch-forward.phi1": 1110, // distinguish forward from backward branches
|
||||
"branch-back.phi1": 771, // distinguish forward from backward branches in IPC logic
|
||||
notRdy0: 248, // internal signal: global pipeline control
|
||||
"notRdy0.phi1": 1272, // delayed pipeline control
|
||||
"notRdy0.delay": 770, // global pipeline control latched by phi1 and then phi2
|
||||
"#notRdy0.delay": 559, // global pipeline control latched by phi1 and then phi2 (storage node)
|
||||
"~notRdy0.delay": 559, // automatic alias replacing hash with tilde
|
||||
Reset0: 67, // internal signal: retimed reset from pin
|
||||
C1x5Reset: 926, // retimed and pipelined reset in progress
|
||||
notRnWprepad: 187, // internal signal: to pad, yet to be inverted and retimed
|
||||
RnWstretched: 353, // internal signal: control datapad output drivers, aka TRISTATE
|
||||
"#DBE": 1035, // internal signal: formerly from DBE pad (6501)
|
||||
"~DBE": 1035, // automatic alias replacing hash with tilde
|
||||
cp1: 710, // internal signal: clock phase 1
|
||||
cclk: 943, // unbonded pad: internal non-overlappying phi2
|
||||
fetch: 879, // internal signal
|
||||
clearIR: 1077, // internal signal
|
||||
D1x1: 827, // internal signal: interrupt handler related
|
||||
H1x1: 1042, // internal signal: drive status byte onto databus
|
||||
"brk-done": 1382, // internal signal: interrupt handler related
|
||||
INTG: 1350, // internal signal: interrupt handler related
|
||||
|
||||
// internal signal: pla outputs block 1 (west/left edge of die)
|
||||
// often 130 pla outputs are mentioned - we have 131 here
|
||||
@ -500,45 +558,75 @@ INTG: 1350, // internal signal: interrupt handler related
|
||||
"x-op-push/pull":1050, // pla121 // feeds into pla130 (no normal pla output)
|
||||
"op-T0-cld/sed":1419, // pla122
|
||||
"#op-branch-bit6":840, // pla123 // IR bit6 used only to detect branch type
|
||||
"~op-branch-bit6":840, // automatic alias replacing hash with tilde
|
||||
"op-T3-mem-abs":607, // pla124
|
||||
"op-T2-mem-zp":219, // pla125
|
||||
"op-T5-mem-ind-idx":1385, // pla126
|
||||
"op-T4-mem-abs-idx":281, // pla127
|
||||
"#op-branch-bit7":1174, // pla128 // IR bit7 used only to detect branch type
|
||||
"~op-branch-bit7":1174, // automatic alias replacing hash with tilde
|
||||
"op-clv":1164, // pla129
|
||||
"op-implied":1006, // pla130 // has extra pulldowns: pla121 and ir0
|
||||
|
||||
// internal signals: derived from pla outputs
|
||||
"#op-branch-done": 1048,
|
||||
"~op-branch-done": 1048, // automatic alias replacing hash with tilde
|
||||
"#op-T3-branch": 1708,
|
||||
"~op-T3-branch": 1708, // automatic alias replacing hash with tilde
|
||||
"op-ANDS": 1228,
|
||||
"op-EORS": 1689,
|
||||
"op-ORS": 522,
|
||||
"op-SUMS": 1196,
|
||||
"op-SRS": 934,
|
||||
"#op-store": 925,
|
||||
"~op-store": 925, // automatic alias replacing hash with tilde
|
||||
"#WR": 1352,
|
||||
"~WR": 1352, // automatic alias replacing hash with tilde
|
||||
"op-rmw": 434,
|
||||
"short-circuit-idx-add": 1185,
|
||||
"short-circuit-branch-add": 430,
|
||||
"#op-set-C": 252,
|
||||
"~op-set-C": 252, // automatic alias replacing hash with tilde
|
||||
|
||||
// internal signals: control signals
|
||||
nnT2BR: 967, // doubly inverted
|
||||
BRtaken: 1544, // aka #TAKEN
|
||||
BRtaken: 1544, // automatic alias replacing hash with tilde
|
||||
|
||||
// interrupt and vector related
|
||||
// internal signals and state: interrupt and vector related
|
||||
// segher says:
|
||||
// "P" are the latched external signals.
|
||||
// "G" are the signals that actually trigger the interrupt.
|
||||
// "NMIL" is to do the edge detection -- it's pretty much just a delayed NMIG.
|
||||
// INTG is IRQ and NMI taken together.
|
||||
IRQP: 675,
|
||||
"#IRQP": 888,
|
||||
"~IRQP": 888, // automatic alias replacing hash with tilde
|
||||
NMIP: 1032,
|
||||
"#NMIP": 297,
|
||||
"~NMIP": 297, // automatic alias replacing hash with tilde
|
||||
"#NMIG": 264,
|
||||
"~NMIG": 264, // automatic alias replacing hash with tilde
|
||||
NMIL: 1374,
|
||||
RESP: 67,
|
||||
RESG: 926,
|
||||
VEC0: 1465,
|
||||
VEC1: 1481,
|
||||
"#VEC": 1134,
|
||||
"~VEC": 1134, // automatic alias replacing hash with tilde
|
||||
D1x1: 827, // internal signal: interrupt handler related
|
||||
"brk-done": 1382, // internal signal: interrupt handler related
|
||||
INTG: 1350, // internal signal: interrupt handler related
|
||||
|
||||
// internal state: misc pipeline state clocked by cclk (phi2)
|
||||
"pipe#VEC": 1431, // latched #VEC
|
||||
"pipe~VEC": 1431, // automatic alias replacing hash with tilde
|
||||
"pipeT-SYNC": 537,
|
||||
pipeT2out: 40,
|
||||
pipeT3out: 706,
|
||||
pipeT4out: 1373,
|
||||
pipeT5out: 940,
|
||||
pipeBRtaken: 832,
|
||||
pipeIPCrelated: 832,
|
||||
pipeUNK01: 1530,
|
||||
pipeUNK02: 974,
|
||||
pipeUNK03: 1436,
|
||||
@ -577,11 +665,13 @@ pipeUNK35: 1713,
|
||||
pipeUNK36: 729,
|
||||
pipeUNK37: 197,
|
||||
"pipe#WR.phi2": 1131,
|
||||
"pipe~WR.phi2": 1131, // automatic alias replacing hash with tilde
|
||||
pipeUNK39: 151,
|
||||
pipeUNK40: 456,
|
||||
pipeUNK41: 1438,
|
||||
pipeUNK42: 1104,
|
||||
"pipe#T0": 554, // aka #T0.phi2
|
||||
"pipe~T0": 554, // automatic alias replacing hash with tilde
|
||||
|
||||
// internal state: vector address pulldown control
|
||||
pipeVectorA0: 357,
|
||||
@ -628,53 +718,91 @@ DC34: 1372, // lower nibble decimal carry
|
||||
DC78: 333, // carry for decimal mode
|
||||
"DC78.phi2": 164,
|
||||
"#C01": 1506,
|
||||
"~C01": 1506, // automatic alias replacing hash with tilde
|
||||
"#C12": 1122,
|
||||
"~C12": 1122, // automatic alias replacing hash with tilde
|
||||
"#C23": 1003,
|
||||
"~C23": 1003, // automatic alias replacing hash with tilde
|
||||
"#C34": 1425,
|
||||
"~C34": 1425, // automatic alias replacing hash with tilde
|
||||
"#C45": 1571,
|
||||
"~C45": 1571, // automatic alias replacing hash with tilde
|
||||
"#C56": 427,
|
||||
"~C56": 427, // automatic alias replacing hash with tilde
|
||||
"#C67": 592,
|
||||
"~C67": 592, // automatic alias replacing hash with tilde
|
||||
"#C78": 1327,
|
||||
"~C78": 1327, // automatic alias replacing hash with tilde
|
||||
"DA-C01": 623,
|
||||
"DA-AB2": 216,
|
||||
"DA-AxB2": 516,
|
||||
"DA-C45": 1144,
|
||||
"#DA-ADD1": 901,
|
||||
"~DA-ADD1": 901, // automatic alias replacing hash with tilde
|
||||
"#DA-ADD2": 699,
|
||||
"~DA-ADD2": 699, // automatic alias replacing hash with tilde
|
||||
|
||||
// misc alu internals
|
||||
"#(AxBxC)0": 371,
|
||||
"~(AxBxC)0": 371, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)1": 965,
|
||||
"~(AxBxC)1": 965, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)2": 22,
|
||||
"~(AxBxC)2": 22, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)3": 274,
|
||||
"~(AxBxC)3": 274, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)4": 651,
|
||||
"~(AxBxC)4": 651, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)5": 486,
|
||||
"~(AxBxC)5": 486, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)6": 1197,
|
||||
"~(AxBxC)6": 1197, // automatic alias replacing hash with tilde
|
||||
"#(AxBxC)7": 532,
|
||||
"~(AxBxC)7": 532, // automatic alias replacing hash with tilde
|
||||
AxB1: 425,
|
||||
AxB3: 640,
|
||||
AxB5: 1220,
|
||||
AxB7: 1241,
|
||||
"#(AxB)0": 1525,
|
||||
"~(AxB)0": 1525, // automatic alias replacing hash with tilde
|
||||
"#(AxB)2": 701,
|
||||
"~(AxB)2": 701, // automatic alias replacing hash with tilde
|
||||
"#(AxB)4": 308,
|
||||
"~(AxB)4": 308, // automatic alias replacing hash with tilde
|
||||
"#(AxB)6": 1459,
|
||||
"~(AxB)6": 1459, // automatic alias replacing hash with tilde
|
||||
"(AxB)0.#C0in": 555,
|
||||
"(AxB)0.~C0in": 555, // automatic alias replacing hash with tilde
|
||||
"(AxB)2.#C12": 193,
|
||||
"(AxB)2.~C12": 193, // automatic alias replacing hash with tilde
|
||||
"(AxB)4.#C34": 65,
|
||||
"(AxB)4.~C34": 65, // automatic alias replacing hash with tilde
|
||||
"(AxB)6.#C56": 174,
|
||||
"(AxB)6.~C56": 174, // automatic alias replacing hash with tilde
|
||||
"#(AxB1).C01": 295,
|
||||
"~(AxB1).C01": 295, // automatic alias replacing hash with tilde
|
||||
"#(AxB3).C23": 860,
|
||||
"~(AxB3).C23": 860, // automatic alias replacing hash with tilde
|
||||
"#(AxB5).C45": 817,
|
||||
"~(AxB5).C45": 817, // automatic alias replacing hash with tilde
|
||||
"#(AxB7).C67": 1217,
|
||||
"~(AxB7).C67": 1217, // automatic alias replacing hash with tilde
|
||||
"#A.B0": 1628,
|
||||
"~A.B0": 1628, // automatic alias replacing hash with tilde
|
||||
"#A.B1": 841,
|
||||
"~A.B1": 841, // automatic alias replacing hash with tilde
|
||||
"#A.B2": 681,
|
||||
"~A.B2": 681, // automatic alias replacing hash with tilde
|
||||
"#A.B3": 350,
|
||||
"~A.B3": 350, // automatic alias replacing hash with tilde
|
||||
"#A.B4": 1063,
|
||||
"~A.B4": 1063, // automatic alias replacing hash with tilde
|
||||
"#A.B5": 477,
|
||||
"~A.B5": 477, // automatic alias replacing hash with tilde
|
||||
"#A.B6": 336,
|
||||
"~A.B6": 336, // automatic alias replacing hash with tilde
|
||||
"#A.B7": 1318,
|
||||
"~A.B7": 1318, // automatic alias replacing hash with tilde
|
||||
"A+B0": 693,
|
||||
"A+B1": 1021,
|
||||
"A+B2": 110,
|
||||
@ -684,29 +812,53 @@ AxB7: 1241,
|
||||
"A+B6": 803,
|
||||
"A+B7": 117,
|
||||
"#(A+B)0": 143,
|
||||
"~(A+B)0": 143, // automatic alias replacing hash with tilde
|
||||
"#(A+B)1": 155,
|
||||
"~(A+B)1": 155, // automatic alias replacing hash with tilde
|
||||
"#(A+B)2": 1691,
|
||||
"~(A+B)2": 1691, // automatic alias replacing hash with tilde
|
||||
"#(A+B)3": 649,
|
||||
"~(A+B)3": 649, // automatic alias replacing hash with tilde
|
||||
"#(A+B)4": 404,
|
||||
"~(A+B)4": 404, // automatic alias replacing hash with tilde
|
||||
"#(A+B)5": 1632,
|
||||
"~(A+B)5": 1632, // automatic alias replacing hash with tilde
|
||||
"#(A+B)6": 1084,
|
||||
"~(A+B)6": 1084, // automatic alias replacing hash with tilde
|
||||
"#(A+B)7": 1398,
|
||||
"~(A+B)7": 1398, // automatic alias replacing hash with tilde
|
||||
"#(AxB)0": 1525,
|
||||
"~(AxB)0": 1525, // automatic alias replacing hash with tilde
|
||||
"#(AxB)2": 701,
|
||||
"~(AxB)2": 701, // automatic alias replacing hash with tilde
|
||||
"#(AxB)4": 308,
|
||||
"~(AxB)4": 308, // automatic alias replacing hash with tilde
|
||||
"#(AxB)6": 1459,
|
||||
"~(AxB)6": 1459, // automatic alias replacing hash with tilde
|
||||
"#(AxB)1": 953,
|
||||
"~(AxB)1": 953, // automatic alias replacing hash with tilde
|
||||
"#(AxB)3": 884,
|
||||
"~(AxB)3": 884, // automatic alias replacing hash with tilde
|
||||
"#(AxB)5": 1469,
|
||||
"~(AxB)5": 1469, // automatic alias replacing hash with tilde
|
||||
"#(AxB)7": 177,
|
||||
"~(AxB)7": 177, // automatic alias replacing hash with tilde
|
||||
"#aluresult0": 957, // alu result latch input
|
||||
"~aluresult0": 957, // automatic alias replacing hash with tilde
|
||||
"#aluresult1": 250,
|
||||
"~aluresult1": 250, // automatic alias replacing hash with tilde
|
||||
"#aluresult2": 740,
|
||||
"~aluresult2": 740, // automatic alias replacing hash with tilde
|
||||
"#aluresult3": 1071,
|
||||
"~aluresult3": 1071, // automatic alias replacing hash with tilde
|
||||
"#aluresult4": 296,
|
||||
"~aluresult4": 296, // automatic alias replacing hash with tilde
|
||||
"#aluresult5": 277,
|
||||
"~aluresult5": 277, // automatic alias replacing hash with tilde
|
||||
"#aluresult6": 722,
|
||||
"~aluresult6": 722, // automatic alias replacing hash with tilde
|
||||
"#aluresult7": 304,
|
||||
"~aluresult7": 304, // automatic alias replacing hash with tilde
|
||||
|
||||
// internal signals: datapath control signals
|
||||
|
||||
@ -735,6 +887,7 @@ dpc17_SUMS: 921, // alu op: a plus b (?)
|
||||
alucin: 910, // alu carry in
|
||||
notalucin: 1165,
|
||||
"dpc18_#DAA": 1201, // decimal related (inverted)
|
||||
"dpc18_~DAA": 1201, // automatic alias replacing hash with tilde
|
||||
dpc19_ADDSB7: 214, // alu to sb bit 7 only
|
||||
|
||||
dpc20_ADDSB06: 129, // alu to sb bits 6-0 only
|
||||
@ -742,14 +895,21 @@ dpc21_ADDADL: 1015, // alu to adl
|
||||
alurawcout: 808, // alu raw carry out (no decimal adjust)
|
||||
notalucout: 412, // alu carry out (inverted)
|
||||
alucout: 1146, // alu carry out (latched by phi2)
|
||||
"#alucout": 206,
|
||||
"~alucout": 206, // automatic alias replacing hash with tilde
|
||||
"##alucout": 465,
|
||||
"~~alucout": 465, // automatic alias replacing hash with tilde
|
||||
notaluvout: 1308, // alu overflow out
|
||||
aluvout: 938, // alu overflow out (latched by phi2)
|
||||
|
||||
"#DBZ": 1268, // internal signal: not (databus is zero)
|
||||
"~DBZ": 1268, // automatic alias replacing hash with tilde
|
||||
DBZ: 744, // internal signal: databus is zero
|
||||
DBNeg: 1200, // internal signal: databus is negative (top bit of db) aka P-#DB7in
|
||||
DBNeg: 1200, // automatic alias replacing hash with tilde
|
||||
|
||||
"dpc22_#DSA": 725, // decimal related/SBC only (inverted)
|
||||
"dpc22_~DSA": 725, // automatic alias replacing hash with tilde
|
||||
dpc23_SBAC: 534, // (optionalls decimal-adjusted) sb to acc
|
||||
dpc24_ACSB: 1698, // acc to sb
|
||||
dpc25_SBDB: 1060, // sb pass-connects to idb (bi-directionally)
|
||||
@ -763,8 +923,9 @@ dpc31_PCHPCH: 741, // load pch from pch incremented
|
||||
dpc32_PCHADH: 1235, // drive adh from pch incremented
|
||||
dpc33_PCHDB: 247, // drive idb from pch incremented
|
||||
dpc34_PCLC: 1704, // pch carry in and pcl FF detect?
|
||||
dpc35_PCHC: 1334, // pcl 0x?F detect - half-carry
|
||||
dpc36_IPC: 379, // pcl carry in
|
||||
dpc35_PCHC: 1334, // pch 0x?F detect - half-carry
|
||||
"dpc36_#IPC": 379, // pcl carry in (inverted)
|
||||
"dpc36_~IPC": 379, // automatic alias replacing hash with tilde
|
||||
dpc37_PCLDB: 283, // drive idb from pcl incremented
|
||||
dpc38_PCLADL: 438, // drive adl from pcl incremented
|
||||
dpc39_PCLPCL: 898, // load pcl from pcl incremented
|
||||
|
7024
transdefs.js
7024
transdefs.js
File diff suppressed because it is too large
Load Diff
3
wires.js
3
wires.js
@ -29,6 +29,7 @@ var ngnd = nodenames['vss'];
|
||||
var npwr = nodenames['vcc'];
|
||||
|
||||
var chipLayoutIsVisible = true; // only modified in expert mode
|
||||
var hilited = [];
|
||||
|
||||
function setupNodes(){
|
||||
for(var i in segdefs){
|
||||
@ -140,6 +141,7 @@ function refresh(){
|
||||
for(i in nodes){
|
||||
if(isNodeHigh(i)) overlayNode(nodes[i].segs);
|
||||
}
|
||||
hiliteNode(hilited);
|
||||
}
|
||||
|
||||
function overlayNode(w){
|
||||
@ -156,6 +158,7 @@ function hiliteNode(n){
|
||||
var ctx = hilite.getContext('2d');
|
||||
ctx.clearRect(0,0,grCanvasSize,grCanvasSize);
|
||||
if(n==-1) return;
|
||||
hilited = n;
|
||||
|
||||
for(var i in n){
|
||||
if(typeof n[i] != "number") {
|
||||
|
Reference in New Issue
Block a user