mirror of
https://github.com/trebonian/visual6502.git
synced 2025-04-17 12:46:24 +00:00
add clock trigger mechanism and URL interface for reset pin
This commit is contained in:
parent
e885646e5e
commit
758d53bf5b
@ -181,6 +181,12 @@ function setupParams(){
|
||||
userResetLow=parseInt(value,16)%256;
|
||||
userResetHigh=(parseInt(value,16)>>8)%256;
|
||||
} else
|
||||
// setup input pin events, breakpoints, watchpoints
|
||||
if(name=="reset0" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setLow('res');";
|
||||
} else if(name=="reset1" && parseInt(value)!=NaN){
|
||||
clockTriggers[value]="setHigh('res');";
|
||||
} else
|
||||
// run a test program, and optionally check against a golden checksum
|
||||
if(name=="steps" && parseInt(value)!=NaN){
|
||||
userSteps=parseInt(value);
|
||||
|
@ -201,9 +201,13 @@ function step(){
|
||||
chipStatus();
|
||||
}
|
||||
|
||||
// triggers for breakpoints, watchpoints, input pin events
|
||||
clockTriggers={};
|
||||
|
||||
// simulate a single clock phase with no update to graphics or trace
|
||||
function halfStep(){
|
||||
var clk = isNodeHigh(nodenames['clk0']);
|
||||
eval(clockTriggers[cycle]); // usually undefined, no measurable performance loss
|
||||
if (clk) {setLow('clk0'); handleBusRead(); }
|
||||
else {setHigh('clk0'); handleBusWrite();}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user