trebonian / visual6502 Goto Github PK
View Code? Open in Web Editor NEWTransistor level 6502 Hardware Simulation in Javascript
Home Page: www.visual6502.org
Transistor level 6502 Hardware Simulation in Javascript
Home Page: www.visual6502.org
I am planning to plot this with my HP pen plotter, and I'd like to plot each layer of silicon separately. The svg branch appears to have the only SVG file with all the layers separated. Unfortunately, it is missing at least one trace, clock phase 1.
Create a common export/import format in something like XML to be easily imported from or exported to other implementations of the simulator in C or Python or ...
if run in nosim mode, we skip chip reset, and do it at time of first running. But the first simulated phase writes a 00 to 0000 which in the case of our normal test program is wrong. In fact, tcstate is all zeroes, so the chip reset hasn't quite done what we need. Looks likely that the problem is in the run/stop buttons: an explicit reset avoids the problem.
/* nodenames.js */
var input_pins = [
'res',
'db0',
'db1',
'db3',
'db2',
'db5',
'db4',
'db7',
'db6',
'so',
'clk0',
'rdy',
'nmi',
'irq',
];
input_clock_pin = (nodenames['clk0']);
input_pins = (input_pins.map((function (e){return (nodenames[e]);})));
/* expertWires.js */
function isInputPin(nn)
{
return ((input_pins != undefined)
&& (arrayContains(input_pins, nn)));
}
function handleClick(e)
{
/* line 519 */
if ((e.altKey)
&& (isInputPin(w)))
{
if (w == input_clock_pin)
{
stepForward();
return;
}
toggleNode(w);
refresh();
return;
}
}
/* chipsim.js */
function toggleNode(nn)
{
var node;
node = nodes[nn];
node.pullup = !(node.pullup);
node.pulldown = !(node.pulldown);
recalcNodeList([nn]);
}
Design a UI to allow only the elements of the circuit that illustrate a particular problem to be highlighted and/or visible
As noted by Trent in this thread
http://forum.6502.org/viewtopic.php?p=60140#p60140
the two control signals
"ADL/ABL": 639, // load ABL latches from ADL bus
"ADH/ABH": 821, // load ABH latches from ADH bus
are not seen when tracing the pseudo-bus DPControl.
We can fix this in a compatible way by adding aliases with indices of -1 and -2 which is consistent with the location of their drivers (just above the datapath.)
"dpc-1_ADL/ABL": 639,// alias for DPControl pseudo-bus
"dpc-2_ADH/ABH": 821,// alias for DPControl pseudo-bus
We also need a tweak to the regular expression which builds the DPControl pseudo-bus:
- return listActiveSignals('^dpc[0-9]+_');
+ return listActiveSignals('^dpc[-]?[0-9]+_');
have a function to run until a 'sync' cycle, perhaps one to run until a 'write', or run until the address bus, databus or perhaps some registers have specific values
step one would be stepUntilSync()
we believe iOS allows canvas only up to 1000x1000 - we should be able to detect this platform and offer a low resolution chip layout view.
Our normal canvas is now 2000x2000
It uses 3rd party GPL Code so I assume GPL. But it is not actually officially stated.
The website didn't mention it either or it was confusing.
Thanks for your time.
~Chris
In transdefs.js
, each row has six fields. To the best of my understanding (I'm not an expert), this is what they do.
This field always contains five numbers. What are they?
This question is relevant. I'm basically asking the one thing that didn't get answered there.
Here are my best guesses:
Looks like skilldrick changed URL.
Visual 6502 Is currently linking to (in the advanced page) : https://skilldrick.github.com/easy6502/#first-program
Should be : https://skilldrick.github.io/easy6502/#first-program
I discovered that while panning the simulation, the mouse can (and frequently) be unclicked-outside of the canvas which does not register. I fixed this in my AY-3-8500 varient with the following code in expertWires.js/wires.js
function mouseLeave(e)
{
chipsurround.onmousemove = undefined;
chipsurround.onmouseup = undefined;
}
//Add this
chipsurround.onmouseout = function(e){mouseLeave(e);};
//To the end of setupChipLayoutGraphics()
if we can do it without spaghettifying the code, we should skip resetting the 6502 if we don't need to highlight the chip, for faster startup. Much faster, on a slow browser.
please apply this fix
http://github.com/BigEd/visual6502/commit/f439d8fc8d02b5a6cb6b0b5985ea356cc33ca6d1
to the experimenter's beta version.
you can see the problem using
http://visual6502.org/stage/JSSim/index.html?graphics=false&expert=true&steps=30&loglevel=3&a=0020&d=ea202143&a=4321&d=60&r=0020
whereby tcstate is always reported as 4 or 5 because the bits are being summed instead of concatenated.
should accept some query strings such as
?A=0000&D=a9002010004c02000000000000000000e888e64038690260&R=0000
where A, D pairs will initialise memory, and R will set the reset vector
if no query strings found, load the usual program
this allows us to drive the simulator from other tools and sites such as 6502 emulators
should be possible to detect alphabetic keys anyway: perhaps venerable hjkl from vi. Or qa for up/down and sd for left right, since we already have zx for zoom in/out. We can have all of the above - they are disjoint. (Not sure how to detect cursor keys)
http://www.visual6502.org/JSSim/expert.html?graphics=false&steps=22&a=0&d=a9698d11d0ad11d0ea
asm:
LDA #$69
STA $D011
LDA $D011
NOP
After execution (cycle 10) a
must be 69, but it's 0
Presently the UI layout, especially in expert mode, expects the browser window height to be 1024 or thereabouts.
Also the code and css contains some fixed numbers to cause the elements
For extra flexibility, at the cost of moving above bare metal css, we could allow those panes to be resized and repositioned interactively. We'd need to pick a library and use it with care.
Alternatively, we could offer from 1 to 3 fixed layouts on different pages, at the cost of maintaining several html and css files.
One cannot write anymore custom test programs for the visual6502. I'm using this to teach children the processor architecture.
only allowing the simulation to free run updates the image
when single stepping , the image is not updated to show the data paths
seen reported on a forum:
Firefox on 64-bit Ubuntu works on step by step but doesn't seem to animate on continuous run.
Visual6502.org no longer has a valid SSL certificate and is not secure.
Hello, Is Possible To Add Button For Export The Current Integrated Circuit To LogicEmu?
Copy The Circuit For LogicEmu, Or Directly Open To LogicEmu
should re-test this.
I quickly tried changing the bindings to z and x, but no joy - perhaps the keyboard events are not reaching the javascript.
Be able to save the entire current state of the sim (including complete signal/memory states) in a server for other users to retrieve later on
can only highlight a single signal- should allow shift-click to add to the set, and ctrl-click to toggle membership of the highlighted set
should also update status display to show the names of all the highlighted signals
also status display should show the logic value
Be able to add comments, highlighted boxes that are stored in the signal state for each cycle, and would be redrawn if navigating to that cycle. If saving is implemented - these would be stored as well
It looks from the tabulation and the chip that a timed input such as an interrupt is applied one phase later than it actually is.
See discussion at http://forum.6502.org/viewtopic.php?p=26422#p26422
Probably we can preserve the behaviour of existing published URLs by arranging that only the display is fixed.
probably a table, like the memory table, initially just the same fields as the status line.
should be similar to the output optionally sent to console.log
will use other tickets for enhancements to that baseline
Wasn't sure how to contact you - I'm sorry if this is a poor choice of channel.
Anyway, I wrote an introduction to circuit interpretation (for the nesdev community) at http://wiki.nesdev.com/w/index.php/Visual_circuit_tutorial , aimed at people without much low-level electronics experience. Perhaps you'd be interested in linking it.
Corrections would be very much appreciated too (it has already been vetted a bit in http://forums.nesdev.com/viewtopic.php?f=9&t=10119).
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.