JssimUserHelp

From VisualChips

(Difference between revisions)
Jump to: navigation, search
(placeholder sections for advanced mode)
(Help for advanced mode: adding examples for each URL parameter)
Line 54: Line 54:
==== Busses and signals of interest ====
==== Busses and signals of interest ====
-
==== URL interface =====
+
==== URL interface ====
 +
There's a variety of parameters which can be passed on the URL, to make it easy to share examples and discoveries as direct links into the simulator. In all cases these are passed like this:
 +
  [http://www.visual6502.org/JSSim/expert.html?panx=239.4&pany=352.7&zoom=10.7&steps=10 http://www.visual6502.org/JSSim?name1=value1&name2=value2]
 +
 
 +
; positioning the graphics window
 +
: [http://www.visual6502.org/JSSim/expert.html?panx=240&pany=350&zoom=10 panx=240&pany=350&zoom=10]
 +
 
 +
; select a larger canvas for improved graphical detail (uses more RAM)
 +
: [http://www.visual6502.org/JSSim/expert.html?panx=240&pany=350&zoom=10&canvas=2000 canvas=2000]
 +
 
 +
; suppress the simulation, for faster startup of a purely graphical session
 +
: [http://www.visual6502.org/JSSim/expert.html?panx=480&pany=100&zoom=6&nosim=t nosim=true]
 +
 
 +
; suppressing graphics (same as the Hide Chip Layout button)
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f graphics=false]
 +
 
 +
; running for a fixed number of clock phases
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&steps=10 steps=10]
 +
 
 +
; see more groups of interesting signals in the tabulation
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&steps=10&loglevel=4 loglevel=4]
 +
 
 +
; add specific signals to the tabulation
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&steps=10&logmore=Execute,State,plaOutputs logmore=Execute,State,plaOutputs]
 +
 
 +
; set the fastforward step count (for benchmarking, or interactive programs)
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&steps=10&headlesssteps=250 headlesssteps=250]
 +
 
 +
; load a test program, or patch memory contents
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&loglevel=2&steps=50&a=0000&d=a2d0de2143de34236cff20eaea a=0000&d=a2d0de2143]
 +
 
 +
; adjust the reset vector
 +
: [http://www.visual6502.org/JSSim/expert.html?graphics=f&steps=10&r=0002 z]
 +
 
 +
; set up some input pin transitions (reset, IRQ, NMI)
 +
: [http://www.visual6502.org/JSSim/expert.html?
 +
graphics=f&loglevel=2&a=0000&d=a2559ae8e8e8&logmore=res,plaOutputs,DPControl&reset0=12&reset1=13&steps=40 reset0=12&reset1=13]
 +
: [http://visual6502.org/JSSim/expert.html?graphics=f&loglevel=2&steps=50&a=fffa&d=2000&a=0020&d=e840&r=0010&nmi0=4&nmi1=8&logmore=nmi nmi0=4&nmi1=8]
 +
: [http://visual6502.org/JSSim/expert.html?graphics=f&loglevel=2&steps=50&a=0011&d=58&a=fffe&d=2000&a=0020&d=e840&r=0010&irq0=3&irq1=20&logmore=irq irq0=3&irq1=20]
 +
 
 +
; check every signal value against a golden checksum (for checking simulator code changes)
 +
: [http://visual6502.org/JSSim/expert.html?graphics=f&loglevel=-1&steps=99&checksum=0fa98aab steps=99&checksum=0fa98aab]
 +
 
 +
The final reference on the URL capabilities can be [https://github.com/trebonian/visual6502/blob/master/expertWires.js#LC134 found in the source].

Revision as of 12:45, 27 November 2010

The Visual6502 javascript simulator has two entry pages:

You might also be using a pre-released version of the simulator. As this help is on our wiki, there's only one help page for all versions.

Contents

Help for simple mode

In simple mode, you see the chip graphics on the left, the control buttons and chip status at top right, and the memory table below that. There's a link to the advanced page, and the overall layout is fixed: there are no draggable bars between the sections.

Graphics help

You can pan and zoom the chip graphics using

  • '>' on the keyboard to zoom in
  • '<' on the keyboard to zoom out
  • click and drag to pan

Click in the graphics area to highlight any shape on the chip: all the connected shapes will be highlighted and the name of the node, if any, will be displayed in the chip status area at top right.

For example, if you click on the square shape at top left of the chip, you'll see text like

node: 1297 nmi

which tells you that this is the NMI pad - in a real chip, it would be connected to the NMI pin of the package with a gold wire.

The node number is useful only as a unique reference number. If you're interested in the workings of the simulator you'll read the source files and see these numbers used to label all the polygons and transistors which are electrically connected and which therefore are at the same voltage - and therefore represent the same logical signal.

Running the program

Towards the top right you see a set of buttons:

  • run (or stop) - start the simulation, run for as long as you like, then stop it.
  • reset
  • back
  • forward

As the simulation runs you can see the yellow box in the memory area (bottom right) indicating which memory location is being read or written. You may also see the contents of memory changing: perhaps the location just to the right of {{{0040:}}} will count up.

Modifying the program

You can't presently modify the program in the simple page: you need the Advanced page for that.

Help for advanced mode

In advanced mode, there's an additional area at bottom right which can tabulate the state of the machine, and any signals of interest, phase by phase or instruction by instruction. There's also a console for programs which perform I/O: it's possible to interact with a BASIC interpreter for example.

The layout in advanced mode has a couple of draggable boundaries so you can adjust according to what you're doing.

The chip graphics area has some additional controls, and can be hidden altogether.

Finally, in expert mode you can control the simulator and the graphics using additional URL parameters.

Graphics help

Running the program

Modifying the program

Tracing machine state

Busses and signals of interest

URL interface

There's a variety of parameters which can be passed on the URL, to make it easy to share examples and discoveries as direct links into the simulator. In all cases these are passed like this:

 http://www.visual6502.org/JSSim?name1=value1&name2=value2
positioning the graphics window
panx=240&pany=350&zoom=10
select a larger canvas for improved graphical detail (uses more RAM)
canvas=2000
suppress the simulation, for faster startup of a purely graphical session
nosim=true
suppressing graphics (same as the Hide Chip Layout button)
graphics=false
running for a fixed number of clock phases
steps=10
see more groups of interesting signals in the tabulation
loglevel=4
add specific signals to the tabulation
logmore=Execute,State,plaOutputs
set the fastforward step count (for benchmarking, or interactive programs)
headlesssteps=250
load a test program, or patch memory contents
a=0000&d=a2d0de2143
adjust the reset vector
z
set up some input pin transitions (reset, IRQ, NMI)
[http://www.visual6502.org/JSSim/expert.html?

graphics=f&loglevel=2&a=0000&d=a2559ae8e8e8&logmore=res,plaOutputs,DPControl&reset0=12&reset1=13&steps=40 reset0=12&reset1=13]

nmi0=4&nmi1=8
irq0=3&irq1=20
check every signal value against a golden checksum (for checking simulator code changes)
steps=99&checksum=0fa98aab

The final reference on the URL capabilities can be found in the source.

Personal tools