10 Commits
V0.7 ... V0.7.2

5 changed files with 3674 additions and 3605 deletions

View File

@ -73,6 +73,34 @@ ir7: 1277,
// internal control signals // internal control signals
sync: 1528, // aka #decode_0 sync: 1528, // aka #decode_0
// timing state signals
Ts: 1309,
Ta0: 879,
Td0_0: 981,
"#Te0": 868,
"Te0.2": 866,
Tg0: 12,
Tx0: 850,
Ta1: 838,
Te1_0: 735,
Tg1: 772,
Tx1: 851,
Ta2: 844,
Tg2: 832,
Tx2: 860,
Tg3: 835,
Tr3: 823,
Tg4: 696,
Tr4: 825,
Tg5: 914,
Tr5: 828,
Tg6: 911,
Tr6: 894,
Tr7: 694,
Tg7: 1081,
Tg8: 891,
Tr8: 697,
// many other internal busses registers and signals // many other internal busses registers and signals
abh0: 267, abh0: 267,
abh1: 258, abh1: 258,

View File

@ -12,12 +12,12 @@ npwr = nodenames['vcc'];
nodenamereset = 'reset'; nodenamereset = 'reset';
presetLogLists=[ presetLogLists=[
['cycle','phi1','phi2'], ['cycle',],
['ab','db','rw','vma','Fetch','pc','acca','accb','ix','sp','p'], ['ab','db','rw','vma','Fetch','pc','acca','accb','ix','sp','p'],
['ir','sync','Execute'], // instruction fetch and execution control ['ir','sync','Execute','State'], // instruction fetch and execution control
['dbi','dbo','tmp'], // internal state ['dbi','dbo','tmp'], // internal register-sized state
['idb','abh','abl','ablx'], // internal busses ['idb','abh','abl','ablx'], // internal busses
['irq','nmi',nodenamereset,'tsc','dbe','halt','ba'], // other pins ['irq','nmi',nodenamereset,'tsc','dbe','halt','ba'], // other pins
]; ];
function setupTransistors(){ function setupTransistors(){
@ -86,7 +86,7 @@ function initChip(){
setHigh('phi1'); setHigh('phi1');
} }
setHigh(nodenamereset); setHigh(nodenamereset);
for(var i=0;i<18;i++){halfStep();} // avoid updating graphics and trace buffer before user code for(var i=0;i<6;i++){halfStep();} // avoid updating graphics and trace buffer before user code
refresh(); refresh();
cycle = 0; cycle = 0;
trace = Array(); trace = Array();
@ -125,6 +125,33 @@ function readPstring(){
return result; return result;
} }
// The 6800 state control is something like a branching shift register
// ... but not quite like that
TCStates=[
"Ts",
"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){ function busToString(busname){
// takes a signal name or prefix // takes a signal name or prefix
// returns an appropriate string representation // returns an appropriate string representation
@ -190,7 +217,7 @@ function chipStatus(){
} }
setStatus(machine1, machine2, machine3); setStatus(machine1, machine2, machine3);
if (loglevel>0) { if (logThese.length>1) {
updateLogbox(logThese); updateLogbox(logThese);
} }
selectCell(ab); selectCell(ab);

View File

@ -7,19 +7,19 @@ var consoleboxStream="";
// for opcodes, see ftp://ftp.comlab.ox.ac.uk/pub/Cards/txt/6800.txt // for opcodes, see ftp://ftp.comlab.ox.ac.uk/pub/Cards/txt/6800.txt
testprogram = [ testprogram = [
0x01, // NOP
0x01, // NOP
0x01, // NOP
0xce, 0x43, 0x21, // LDX #4321 0xce, 0x43, 0x21, // LDX #4321
0x35, // TXS 0x35, // TXS
0xc6, 0x00, // LDAA #$00 0xc6, 0xfb, // LDAB #$FB
0xbd, 0x00, 0x10, // JSR $0010 0xbd, 0x00, 0x10, // JSR $0010
0x7e, 0x00, 0x02, // JMP $0002 0x7e, 0x00, 0x04, // JMP $0004
0x01, // NOP
0x01, // NOP
0x01, // NOP
0x01, // NOP 0x01, // NOP
0x08, // INX 0x08, // INX
0x5a, // DECB 0x4a, // DECA
0x7c, 0x00, 0x0f, // INC $0F 0x7c, 0x00, 0x0f, // INC $0F
0x0d, // SEC 0x0d, // SEC
0xc9, 0x02, // ADCA #$02 0xc9, 0x02, // ADCB #$02
0x39, // RTS 0x39, // RTS
] ]

File diff suppressed because it is too large Load Diff

View File

@ -471,7 +471,7 @@ function chipStatus(){
machine3 += " Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match"); machine3 += " Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
} }
setStatus(machine1, machine2, machine3); setStatus(machine1, machine2, machine3);
if (loglevel>0) { if (logThese.length>1) {
updateLogbox(logThese); updateLogbox(logThese);
} }
selectCell(ab); selectCell(ab);
@ -509,6 +509,8 @@ function goForN(n){
return; return;
} }
running = false; running = false;
var start = document.getElementById('start');
var stop = document.getElementById('stop');
start.style.visibility = 'visible'; start.style.visibility = 'visible';
stop.style.visibility = 'hidden'; stop.style.visibility = 'hidden';
} }