mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-21 21:29:16 +00:00
Fix slow reset loop
This commit is contained in:
parent
d5300567d6
commit
b9cbe765b2
@ -55,7 +55,7 @@ function initChip(){
|
|||||||
recalcNodeList(allNodes());
|
recalcNodeList(allNodes());
|
||||||
for(var i=0;i<8;i++){setHigh('clk0'), setLow('clk0');}
|
for(var i=0;i<8;i++){setHigh('clk0'), setLow('clk0');}
|
||||||
setHigh('res');
|
setHigh('res');
|
||||||
for(var i=0;i<14;i++){step();}
|
for(var i=0;i<18;i++){resetStep();}
|
||||||
refresh();
|
refresh();
|
||||||
cycle = 0;
|
cycle = 0;
|
||||||
trace = Array();
|
trace = Array();
|
||||||
@ -76,6 +76,13 @@ function halfStep(){
|
|||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetStep(){
|
||||||
|
var clk = isNodeHigh(nodenames['clk0']);
|
||||||
|
if (clk) {setLow('clk0'); handleBusRead(); }
|
||||||
|
else {setHigh('clk0'); handleBusWrite();}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function handleBusRead(){
|
function handleBusRead(){
|
||||||
if(isNodeHigh(nodenames['rw'])) writeDataBus(mRead(readAddressBus()));
|
if(isNodeHigh(nodenames['rw'])) writeDataBus(mRead(readAddressBus()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user