1
0
mirror of https://github.com/mist64/perfect6502.git synced 2024-06-08 12:29:28 +00:00

removed js - no longer needed for debugging

This commit is contained in:
Michael Steil 2010-09-26 03:53:22 +00:00
parent edffe73bc1
commit 5e4983ccd5
18 changed files with 0 additions and 6196 deletions

View File

@ -1,10 +0,0 @@
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.
Note the various licenses and Copyright associated with each file.
Enjoy!
- The Visual 6502 Team

View File

@ -1,33 +0,0 @@
<!DOCTYPE html>
<head>
<title>Visual 6502 in JavaScript</title>
<style type="text/css">@import "wires.css";</style>
</head>
<body>
<span id="title"><a href="http://visual6502.org">The Visual 6502</a></span>
<span id="plain">
<br />
<span id="title">Browser Trouble?</span>
<br />
<a href="http://www.visual6502.org/faq.html">FAQ</a>&nbsp;
<a href="http://blog.visual6502.org">Blog</a>&nbsp;
<a href="http://www.visual6502.org/links.html">Links</a>&nbsp
<p>
Our chip simulator makes heavy use of the latest version of HTML5 drawing technology.
<p>
It will only run on recent browsers and on a computer with sufficient memory (we recommend at least 2Gbytes.)
<p>
We've tested it on Chrome, Firefox, Safari and Opera. Unfortunately Internet Explorer isn't yet capable of running the graphics.
<p>
If you're using one of the above browsers and having trouble, please restart the browser.
<p>
If you have a problem report or you're able to help us with compatilibity, please get in touch - our contact details are on the main page.
<p>
In the meantime, here's a picture of what you're missing:
<p>
<a href="http://visual6502.org"><img src="images/jssim2.png" style="border:10px"></a>
</span>
</body>
</html>

View File

@ -1,168 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var ctrace = false;
var loglevel = 3;
function recalcNodeList(list){
// console.log("recalcNodeList list=" + list);
var n = list[0];
var recalclist = new Array();
for(var j=0;j<100;j++){ // loop limiter
if(list.length==0) return;
// console.log("recalcNodeList iteration=" + j + ", list=" + list);
if(ctrace) console.log(j, list);
for(var i in list) recalcNode(list[i], recalclist);
list = recalclist;
recalclist = new Array();
}
if(ctrace) console.log(n,'looping...');
}
function recalcNode(node, recalclist){
console.log("recalcNode node=" + node + ", recalclist=" + recalclist);
if(node==ngnd) return;
if(node==npwr) return;
var group = getNodeGroup(node);
var newv = getNodeValue(group);
if(ctrace) console.log('recalc', node, group);
for(var i in group){
var n = nodes[group[i]];
if(n.state!=newv && ctrace) console.log(group[i], n.state, newv);
n.state = newv;
for(var t in n.gates) recalcTransistor(n.gates[t], recalclist);
}
}
function recalcTransistor(tn, recalclist){
console.log("recalcTransistor tn=" + tn +", recalclist=" + recalclist);
var t = transistors[tn];
if(isNodeHigh(t.gate)) turnTransistorOn(t, recalclist);
else turnTransistorOff(t, recalclist);
}
function turnTransistorOn(t, recalclist){
if(t.on) return;
if(ctrace) console.log(t.name, 'on', t.gate, t.c1, t.c2);
t.on = true;
addRecalcNode(t.c1, recalclist);
addRecalcNode(t.c2, recalclist);
}
function turnTransistorOff(t, recalclist){
if(!t.on) return;
if(ctrace) console.log(t.name, 'off', t.gate, t.c1, t.c2);
t.on = false;
floatnode(t.c1);
floatnode(t.c2);
addRecalcNode(t.c1, recalclist);
addRecalcNode(t.c2, recalclist);
}
function floatnode(nn){
if(nn==ngnd) return;
if(nn==npwr) return;
var n = nodes[nn];
if(n.state=='gnd') n.state = 'fl';
if(n.state=='pd') n.state = 'fl';
if(n.state=='vcc') n.state = 'fh';
if(n.state=='pu') n.state = 'fh';
if(ctrace) console.log('floating', nn, 'to', n.state);
}
function addRecalcNode(nn, recalclist){
if(nn==ngnd) return;
if(nn==npwr) return;
if(arrayContains(recalclist, nn)) return;
recalclist.push(nn);
}
function getNodeGroup(i){
var group = new Array();
addNodeToGroup(i, group);
return group;
}
function addNodeToGroup(i, group){
// console.log("addNodeToGroup " + i + ", group=", group);
if(arrayContains(group, i)) return;
group.push(i);
if(i==ngnd) return;
if(i==npwr) return;
for(var t in nodes[i].c1c2s) addNodeTransistor(i, nodes[i].c1c2s[t], group);
}
function addNodeTransistor(node, t, group){
// console.log("addNodeTransistor n=" + node + ", t=" + t + ", group=" + group);
var tr = transistors[t];
if(!tr.on) return;
var other;
if(tr.c1==node) other=tr.c2;
if(tr.c2==node) other=tr.c1;
addNodeToGroup(other, group);
}
function getNodeValue(group){
if(arrayContains(group, ngnd)) return 'gnd';
if(arrayContains(group, npwr)) return 'vcc';
var flstate;
for(var i in group){
var nn = group[i];
var n = nodes[nn];
if(n.pullup) return 'pu';
if(n.pulldown) return 'pd';
if((n.state=='fl')&&(flstate==undefined)) flstate = 'fl';
if(n.state=='fh') flstate = 'fh';
}
if(flstate==undefined && ctrace) console.log(group);
return flstate;
}
function isNodeHigh(nn){
// console.log("isNodeHigh nn=" + nn + " state=" + nodes[nn].state);
// console.log("isNodeHigh nn=" + nn + " res=" + arrayContains(['vcc','pu','fh'], nodes[nn].state));
return arrayContains(['vcc','pu','fh'], nodes[nn].state);
}
function allNodes(){
var res = new Array();
for(var i in nodes) if((i!=npwr)&&(i!=ngnd)) res.push(i);
return res;
}
function setHigh(name){
var nn = nodenames[name];
nodes[nn].pullup = true;
nodes[nn].pulldown = false;
recalcNodeList([nn]);
}
function setLow(name){
var nn = nodenames[name];
nodes[nn].pullup = false;
nodes[nn].pulldown = true;
recalcNodeList([nn]);
}
function arrayContains(arr, el){return arr.indexOf(el)!=-1;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

View File

@ -1,28 +0,0 @@
<head>
<title>Visual 6502 in JavaScript</title>
<style type="text/css">@import "wires.css";</style>
<script src="segdefs.js"></script>
<script src="transdefs.js"></script>
<script src="nodenames.js"></script>
<script src="wires.js"></script>
<script src="chipsim.js"></script>
<script src="memtable.js"></script>
<script src="macros.js"></script>
</head>
<body onload="setTimeout(setup,200);">
<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>
</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>
</div>
</div>
<p class="status" id="status">x: 0<br>y: 0</p>
<table class="memtable" id="memtable"></table>
</body>
</html>

View File

@ -1,245 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var memory = Array();
var code = [0xa9, 0x00, 0x20, 0x10, 0x00, 0x4c, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe8, 0x88, 0xe6, 0x40, 0x38, 0x69, 0x02, 0x60];
var cycle = 0;
var running = false;
function go(n){
for(var i=0;i<code.length;i++){
mWrite(i, code[i]);
setCellValue(i, code[i]);
}
mWrite(0xfffc, 0x00);
mWrite(0xfffd, 0x00);
steps();
}
function steps(){
if(running) {
step();
setTimeout(steps, 0); // schedule the next poll
}
}
function initChip(){
for(var nn in nodes) nodes[nn].state = 'fl';
nodes[ngnd].state = 'gnd';
nodes[npwr].state = 'vcc';
for(var tn in transistors) transistors[tn].on = false;
setLow('res');
setLow('clk0');
setHigh('rdy'); setLow('so');
setHigh('irq'); setHigh('nmi');
recalcNodeList(allNodes());
var string = '';
for (var i in nodes) {
string += ' '+nodes[i].pullup;
}
console.log(string);
string = '';
for (var i in transistors) {
string += ' '+transistors[i].on;
}
console.log(string);
for(var i=0;i<8;i++){setHigh('clk0'), setLow('clk0');}
setHigh('res');
for(var i=0;i<18;i++){halfStep();}
cycle = 0;
chipStatus();
}
function step(){
halfStep();
cycle++;
chipStatus();
}
function halfStep(){
var clk = isNodeHigh(nodenames['clk0']);
if (clk) {setLow('clk0'); handleBusRead(); }
else {setHigh('clk0'); handleBusWrite();}
}
function handleBusRead(){
if(isNodeHigh(nodenames['rw'])) writeDataBus(mRead(readAddressBus()));
}
function handleBusWrite(){
if(!isNodeHigh(nodenames['rw'])){
var a = readAddressBus();
var d = readDataBus();
mWrite(a,d);
if(a<0x200) setCellValue(a,d);
}
}
function readAddressBus(){return readBits('ab', 16);}
function readDataBus(){return readBits('db', 8);}
function readA(){return readBits('a', 8);}
function readY(){return readBits('y', 8);}
function readX(){return readBits('x', 8);}
function readP(){return readBits('p', 8);}
function readPstring(){
var result;
result = (isNodeHigh(nodenames['p7'])?'N':'n') +
(isNodeHigh(nodenames['p6'])?'V':'v') +
'-' +
(isNodeHigh(nodenames['p3'])?'B':'b') +
(isNodeHigh(nodenames['p3'])?'D':'d') +
(isNodeHigh(nodenames['p2'])?'I':'i') +
(isNodeHigh(nodenames['p1'])?'Z':'z') +
(isNodeHigh(nodenames['p0'])?'C':'c');
return result;
}
function readSP(){return readBits('s', 8);}
function readPC(){return (readBits('pch', 8)<<8) + readBits('pcl', 8);}
function readPCL(){return readBits('pcl', 8);}
function readPCH(){return readBits('pch', 8);}
function readBit(name){
return isNodeHigh(nodenames[name])?1:0;
}
function readBits(name, n){
var res = 0;
for(var i=0;i<n;i++){
var nn = nodenames[name+i];
res+=((isNodeHigh(nn))?1:0)<<i;
}
return res;
}
function writeDataBus(x){
var recalcs = Array();
for(var i=0;i<8;i++){
var nn = nodenames['db'+i];
var n = nodes[nn];
if((x%2)==0) {n.pulldown=true; n.pullup=false;}
else {n.pulldown=false; n.pullup=true;}
recalcs.push(nn);
x>>=1;
}
recalcNodeList(recalcs);
}
function mRead(a){
if(memory[a]==undefined) return 0;
else return memory[a];
}
function mWrite(a, d){memory[a]=d;}
function clkNodes(){
var res = Array();
res.push(943);
for(var i in nodes[943].gates){
var t = transistors[nodes[943].gates[i]];
if(t.c1==npwr) res.push(t.c2);
if(t.c2==npwr) res.push(t.c1);
}
hiliteNode(res);
}
function runChip(){
var start = document.getElementById('start');
var stop = document.getElementById('stop');
start.style.visibility = 'hidden';
stop.style.visibility = 'visible';
running = true;
steps();
}
function stopChip(){
var start = document.getElementById('start');
var stop = document.getElementById('stop');
start.style.visibility = 'visible';
stop.style.visibility = 'hidden';
running = false;
}
function resetChip(){
stopChip();
setStatus('resetting 6502...');
setTimeout(initChip,0);
}
function stepForward(){
stopChip();
step();
}
function chipStatus(){
var ab = readAddressBus();
var machine1 =
' halfcyc:' + cycle +
' phi0:' + readBit('clk0') +
' AB:' + hexWord(ab) +
' D:' + hexByte(readDataBus()) +
' RnW:' + readBit('rw');
var machine2 =
' PC:' + hexWord(readPC()) +
' A:' + hexByte(readA()) +
' X:' + hexByte(readX()) +
' Y:' + hexByte(readY()) +
' SP:' + hexByte(readSP()) +
' ' + readPstring();
var machine3 =
' Sync:' + readBit('sync')
' IRQ:' + readBit('irq') +
' NMI:' + readBit('nmi');
var machine4 =
' IR:' + hexByte(255 - readBits('notir', 8)) +
' idl:' + hexByte(255 - readBits('idl', 8)) +
' alu:' + hexByte(255 - readBits('alu', 8)) +
' TCstate:' + readBit('clock1') + readBit('clock2') +
readBit('t2') + readBit('t3') + readBit('t4') + readBit('t5');
var machine5 =
' notRdy0:' + readBit('notRdy0') +
' fetch:' + readBit('fetch') +
' clearIR:' + readBit('clearIR') +
' D1x1:' + readBit('D1x1');
setStatus(machine1 + "<br>" + machine2);
if (loglevel>2 && ctrace) {
console.log(machine1 + " " + machine2 + " " + machine3 + " " + machine4 + " " + machine5);
}
selectCell(ab);
}
function getMem(){
var res = Array();
for(var i=0;i<0x200;i++) res.push(mRead(i));
return res;
}
function setMem(arr){
for(var i=0;i<0x200;i++){mWrite(i, arr[i]); setCellValue(i, arr[i]);}
}
function hexWord(n){return (0x10000+n).toString(16).substring(1)}
function hexByte(n){return (0x100+n).toString(16).substring(1)}

View File

@ -1,89 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var table;
var selected;
function setupTable(){
table = document.getElementById('memtable');
for(var r=0;r<32;r++){
var row = document.createElement('tr');
table.appendChild(row);
var col = document.createElement('td');
col.appendChild(document.createTextNode(hexWord(r*16)+':'));
col.onmousedown = unselectCell;
row.appendChild(col);
for(var c=0;c<16;c++){
col = document.createElement('td');
col.addr = r*16+c;
col.val = 0;
col.onmousedown = function(e){handleCellClick(e);};
col.appendChild(document.createTextNode('00'));
row.appendChild(col);
}
}
}
function handleCellClick(e){
var c = e.target;
selectCell(c.addr);
}
function cellKeydown(e){
var c = e.keyCode;
if(c==13) unselectCell();
else if(c==32) selectCell((selected+1)%0x200);
else if(c==8) selectCell((selected+0x1ff)%0x200);
else if((c>=48)&&(c<58)) setCellValue(selected, getCellValue(selected)*16+c-48);
else if((c>=65)&&(c<71)) setCellValue(selected, getCellValue(selected)*16+c-55);
mWrite(selected, getCellValue(selected));
}
function setCellValue(n, val){
val%=256;
cellEl(n).val=val;
cellEl(n).innerHTML=hexByte(val);
}
function getCellValue(n){return cellEl(n).val;}
function selectCell(n){
unselectCell();
if(n>=0x200) return;
cellEl(n).style.background = '#ff8';
selected = n;
window.onkeydown = function(e){cellKeydown(e);};
}
function unselectCell(){
if(selected==undefined) return;
cellEl(selected).style.background = '#fff';
selected = undefined;
window.onkeydown = undefined;
}
function cellEl(n){
var r = n>>4;
var c = n%16;
var e = table.children[r].children[c+1];
return e;
}

View File

@ -1,209 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var nodenames ={
db1: 82,
db0: 1005,
db3: 650,
db2: 945,
db5: 175,
db4: 1393,
db7: 1349,
db6: 1591,
idl0: 116,
idl1: 576,
idl2: 1485,
idl3: 1284,
idl4: 1516,
idl5: 498,
idl6: 1537,
idl7: 529,
a1: 1234,
ab1: 451,
ab2: 1340,
a2: 978,
s2: 81,
a5: 858,
a4: 727,
a7: 1653,
a6: 1136,
so: 1672,
sync: 539,
vcc: 657,
clk1out: 1163,
p2: 1421,
p3: 439,
p0: 687,
p1: 1444,
p6: 77,
p7: 1370,
p4: 1119,
p5: 0,
pcl3: 1359,
pcl2: 655,
pcl1: 1022,
pcl0: 1139,
pcl7: 1611,
pcl6: 377,
pcl5: 622,
pcl4: 900,
clk0: 1171,
s3: 1532,
res: 159,
s1: 183,
s0: 1403,
s7: 1435,
s6: 1212,
s5: 1098,
s4: 1702,
nots0: 418,
nots1: 1064,
nots2: 752,
nots3: 828,
nots4: 1603,
nots5: 601,
nots6: 1029,
nots7: 181,
rw: 1156,
x2: 1,
x3: 1648,
x0: 1216,
x1: 98,
x6: 448,
x7: 777,
x4: 85,
x5: 589,
rdy: 89,
clk2out: 421,
nmi: 1297,
ab12: 1237,
ab13: 349,
ab10: 1443,
ab11: 399,
ab14: 672,
ab15: 195,
ab0: 268,
a0: 737,
a3: 162,
ab3: 211,
ab4: 435,
ab5: 736,
ab6: 887,
ab7: 1493,
ab8: 230,
ab9: 148,
pch7: 205,
pch6: 1551,
pch5: 49,
pch4: 948,
pch3: 584,
pch2: 502,
pch1: 292,
pch0: 1670,
irq: 103,
vss: 558,
y1: 1148,
y0: 64,
y3: 305,
y2: 573,
y5: 615,
y4: 989,
y7: 843,
y6: 115,
cclk: 943, // aka cp2
clock1: 156,
clock2: 1536,
notir7: 1320,
notir6: 895, // OK
notir5: 1394, // OK
notir4: 26,
notir3: 1125,
notir2: 1182,
notir1: 702,
notir0: 194,
t2: 971,
t3: 1567,
t4: 690,
t5: 909,
cp1: 710,
fetch: 879,
clearIR: 1077,
D1x1: 827,
notRdy0: 248,
alu0: 394,
alu1: 697,
alu2: 276,
alu3: 495,
alu4: 1490,
alu5: 893,
alu6: 68,
alu7: 1123,
adl0: 413,
adl1: 1282,
adl2: 1242,
adl3: 684,
adl4: 1437,
adl5: 1630,
adl6: 121,
adl7: 1299,
adh0: 407,
adh1: 52,
adh2: 1651,
adh3: 315,
adh4: 1160,
adh5: 483,
adh6: 13,
adh7: 1539,
sb0: 54,
sb1: 1150,
sb2: 1287,
sb3: 1188,
sb4: 1405,
sb5: 166,
sb6: 1336,
sb7: 1001,
idb0: 1108,
idb1: 991,
idb2: 1473,
idb3: 1302,
idb4: 892,
idb5: 1503,
idb6: 833,
idb7: 493,
dor0: 222,
dor1: 527,
dor2: 1288,
dor3: 823,
dor4: 873,
dor5: 1266,
dor6: 1418,
dor7: 158,
pd0: 758,
pd1: 361,
pd2: 955,
pd3: 894,
pd4: 369,
pd5: 829,
pd6: 1669,
pd7: 1690,
h1x1: 1042, // drive status byte onto databus
}

View File

@ -1,18 +0,0 @@
<?php
$filename = $_REQUEST['name'];
file_put_contents($filename, file_get_contents("php://input"));
function file_put_contents($filename, $data) {
$f = @fopen($filename, 'w');
if ($f) {
$bytes = fwrite($f, $data);
fclose($f);
return $bytes;
}
return false;
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
body {
background: white;
color: black;
/* font-family: cursive;*/
font-family :Verdana, Arial, Helvetica, Sans-Serif;
font-size: 12px;
}
img.navbutton{
border: 0px;
}
img.navplay{
position: relative;
margin-right: 5px;
border: 0px;
}
img.navstop{
position: absolute;
border: 0px;
}
#title {
font-size:30px;
font-weight:bold;
}

View File

@ -1,86 +0,0 @@
/*
Copyright (c) 2010 Brian Silverman, Barry Silverman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var statbox;
var nodes = new Array();
var transistors = {};
var ngnd = nodenames['vss'];
var npwr = nodenames['vcc'];
/////////////////////////
//
// Drawing Setup
//
/////////////////////////
// try to present a meaningful page before starting expensive work
function setup(){
statbox = document.getElementById('status');
setupNodes();
setupTransistors();
setupTable();
initChip();
document.getElementById('stop').style.visibility = 'hidden';
go();
}
function setup_part2(){
}
function setupNodes(){
var w = 0;
for(var i in segdefs){
nodes[w++] = {pullup: segdefs[i],
state: 'fl', gates: new Array(), c1c2s: new Array()};
}
}
function setupTransistors(){
for(i in transdefs){
var tdef = transdefs[i];
var gate = tdef[0];
var c1 = tdef[1];
var c2 = tdef[2];
var trans = {name: i, on: false, gate: gate, c1: c1, c2: c2};
nodes[gate].gates.push(i);
nodes[c1].c1c2s.push(i);
nodes[c2].c1c2s.push(i);
transistors[i] = trans;
}
}
/////////////////////////
//
// Etc.
//
/////////////////////////
function setStatus(){
var res = '';
for(var i=0;i<arguments.length;i++) res=res+arguments[i]+' ';
statbox.innerHTML = res;
}
function now(){return new Date().getTime();}