2010-09-18 16:56:48 +00:00
<!DOCTYPE html>
< head >
2010-09-18 23:59:41 +00:00
< title > Visual 6502 in JavaScript< / title >
2010-09-18 16:56:48 +00:00
< 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 >
2010-09-20 12:37:15 +00:00
< script type = "text/javascript" >
function handleOnload() {
2010-09-22 20:38:52 +00:00
/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);
}
2010-09-20 12:37:15 +00:00
}
< / script >
2010-09-18 16:56:48 +00:00
< / head >
2010-09-20 12:37:15 +00:00
< body onload = "handleOnload();" >
2010-10-01 14:51:17 +00:00
< div id = "basicModeText1" >
2010-09-18 17:46:24 +00:00
< br / >
2010-09-18 23:59:41 +00:00
< span id = "title" > < a href = "http://visual6502.org" > The Visual 6502< / a > < / span >
< br / >
2010-10-01 14:51:17 +00:00
< / div >
< span id = "plain" >
2010-09-18 23:59:41 +00:00
< 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 > & nbsp
2010-10-01 14:51:17 +00:00
< div id = "basicModeText2" >
2010-09-18 23:59:41 +00:00
< br / > < br / >
2010-09-20 12:37:15 +00:00
This simulator uses HTML5 features only found on the latest versions of browsers and needs
lots of RAM. If you have trouble, please < a href = "browsertrouble.html" > check compatibility.< / a >
2010-09-18 17:46:24 +00:00
< br / >
2010-09-20 12:37:15 +00:00
< span id = "browsertrouble" > < / span >
2010-09-18 17:46:24 +00:00
< br / >
Hit '>' to zoom in, '< ' to zoom out
< br / >
2010-09-24 14:20:14 +00:00
Left-click and drag to scroll around
2010-09-18 17:46:24 +00:00
< br / >
Enter your own program into the array of RAM
< br / >
2010-10-01 14:51:17 +00:00
< br / >
< / div >
2010-09-18 17:46:24 +00:00
< / span >
2010-09-18 16:56:48 +00:00
< div class = "frame" id = "frame" >
2010-09-20 12:37:15 +00:00
< div class = "chip" id = "chip" >
2010-10-01 13:02:03 +00:00
< span id = "waiting" > Please wait while graphics is initialising...< / span >
2010-09-18 16:56:48 +00:00
< 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 >
2010-10-01 11:29:22 +00:00
< div class = "nochip" id = "nochip" style = "display:none" >
< form >
2010-10-01 14:51:17 +00:00
< input type = "button" value = "Show chip layout" onclick = "updateChipLayoutVisibility(true)" / >
2010-10-01 11:29:22 +00:00
< / form >
< / div >
2010-09-18 16:56:48 +00:00
< div class = "buttons" >
2010-09-18 17:46:24 +00:00
< div style = "position:relative; float:left;" >
2010-10-01 11:29:22 +00:00
< 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 >
2010-09-18 17:46:24 +00:00
< / div >
< div style = "float:left;" >
2010-09-27 17:25:14 +00:00
< 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 >
2010-10-01 11:29:22 +00:00
< span > Expert:
< input type = "checkbox" id = "expertModeCheckbox" name = "0" onchange = "updateExpertMode(this.checked)" / >
2010-09-27 17:25:14 +00:00
< / span >
2010-09-18 17:46:24 +00:00
< / div >
2010-09-18 16:56:48 +00:00
< / div >
< p class = "status" id = "status" > x: 0< br > y: 0< / p >
< table class = "memtable" id = "memtable" > < / table >
< / div >
2010-10-01 11:29:22 +00:00
< div id = "layoutControlPanel" style = "display:none" >
2010-09-27 17:25:14 +00:00
< form id = "updateShow" > Show:
< input type = "checkbox" name = "1" id = "updateShow1" onchange = "updateShow(this.name,this.checked)" / > (diffusion)
2010-09-18 23:59:41 +00:00
< 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)
2010-09-27 17:25:14 +00:00
< 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 >
2010-10-01 14:51:17 +00:00
< input type = "button" value = "Hide Chip Layout" onclick = "updateChipLayoutVisibility(false)" / >
2010-09-27 17:25:14 +00:00
< input type = "button" value = "Clear Highlighting" onclick = "clearHighlight()" / >
2010-10-01 16:56:14 +00:00
< span style = "border:thin solid;padding:2px;border-color:gray" >
Animate during simulation:
< input type = "checkbox" id = "animateModeCheckbox" onchange = "updateChipLayoutAnimation(this.checked)"
/>< / span >
< a href = "" style = "padding:2px;" id = "linkHere" > Link to this location< / a >
2010-10-01 16:10:33 +00:00
< / form >
2010-10-01 11:29:22 +00:00
< / div >
< div id = "expertControlPanel" style = "display:none" >
< form >
< input type = "button" value = "Trace more" onclick = "updateLoglevel(++loglevel)" / >
< input type = "button" value = "Trace less" onclick = "updateLoglevel(--loglevel)" / >
2010-09-27 17:25:14 +00:00
< / form >
< br / >
< table class = "logstream" id = "logstream" > < / table >
2010-09-25 21:32:29 +00:00
< / div >
2010-09-18 17:46:24 +00:00
< br / >
2010-09-22 11:34:14 +00:00
Source code is available on GitHub: < a href = "http://github.com/trebonian/visual6502" > http://github.com/trebonian/visual6502< / a >
< br / >
2010-09-18 17:46:24 +00:00
In addition to this JavaScript project, see our < a href = "../python6502.html" > Python-based simulator< / a > which may be easier to customize, verify, and apply to the study of long programs.< br / >
< br / >
2010-09-22 11:34:14 +00:00
< br / >
< script type = "text/javascript" > < ! - -
google_ad_client = "pub-9008420149077488";
/* 728x90, created 9/22/10 */
google_ad_slot = "4303982675";
google_ad_width = 728;
google_ad_height = 90;
//-->
< / script >
< script type = "text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
< / script >
2010-09-18 16:56:48 +00:00
< / body >
< / html >