I missed a trick there - it's also very worthwhile to refer to Balazs' giant schematic, for example at
http://www.downloads.reactivemicro.com/ ... ematic.pdfI looked for a simple worked example of tracing the workings of the random logic, and SB/X is simple. In the visual6502 you'll find this signal is called dpc3_SBX - because it's the 3rd datapath control signal from the left. In Balazs' schematic you'll find the signal is called R1x4 at the point of driving to the datapath, and 1x4 at the points of annotating the 8 transistors in the X register which control the writing of X from SB.
We can see from Balazs' schematic that the 8 pass gates which write to the 8 bits of X from the 8 bits of SB are driven by this one wire SB/X, and that wire is driven by a superbuffer. The wire is precharged with not-cp1, the superbuffer is driven by a pair of inverters, and their input is a latch clocked by cp2. The clock transistor for that latch is in the middle of this area:
http://www.visual6502.org/JSSim/expert. ... &zoom=10.4and I've highlighted the two wires fore and aft.
If we now track North we find the gate which drives that signal - as Balazs found, it's a 3 input NOR, in the middle here:
http://www.visual6502.org/JSSim/expert. ... &zoom=10.0Balazs named the three inputs 16,17,18 corresponding to those three columns of the decode PLA. He even labels them:
16: TAX, TSX, LDX #, zero, abs, zero,Y ,abs,Y
17: DEX
18: INX, NOP
In visual6502 we find these three are called
node: 985 op-T0-ldx/tax/tsx
node: 786 op-T+-dex
node: 1664 op-T+-inx
(Most names in visual6502 are from Segher's analysis, or Balazs' names, or names from the block diagram.)
We could in principle read off the pull-downs in the decode PLA to see which instructions and which T-states we expect these signals to be decoding.
Many of the visual6502 signals are not even named, but they do have unique node numbers. So dpc3_SBX is node 1186. You can find this out by clicking on it, and you can find the signal by highlighting it:
http://www.visual6502.org/JSSim/expert. ... d=dpc3_SBXActually more convenient is to check the sources where nodes are named, for example:
https://github.com/trebonian/visual6502 ... es.js#L871It might be more convenient to load up two of the visual6502 source files in your editor. We can get them from the main website, or view them in github. In github we can link to individual lines, so let's do that.
Let's find the transistors which drive dpc3_SBX, and the transistors which drive those, and work backwards.
If we look for 1186 in
https://raw.githubusercontent.com/trebo ... segdefs.jswe find a '-' rather than a '+' - this means the node has no simple pullup to Vdd and therefore it's not the output of a simple logic gate. In fact it's the output of a superbuffer circuit, which has a faster pullup than a normal gate.
We can find the individual transistors in the transdefs file by looking for 1186 as a node number - we find 10 transistors, 8 are the pass gates which perform the write to X, one is the pullup and the other is the pulldown of the superbuffer. Here are those last two:
https://github.com/trebonian/visual6502 ... s.js#L2635['t2633', 1247, 1186, 558, [1952, 1972, 4378, 4563],[186, 186, 15, 3, 3003] ],
['t2643', 625, 657, 1186, [1975, 1998, 4601, 4625],[23, 23, 24, 1, 571] ],
Here's one of the pass gates:
https://github.com/trebonian/visual6502 ... s.js#L1340['t1338', 1186, 98, 1150, [2048, 2077, 3599, 3619],[29, 29, 20, 1, 564] ],
The thing to recognise here is that the first terminal, the gate, is the signal we want. Also that there are 8 transistors with this node as gate, which correspond to the 8 bits of X.
OK, I've slightly lost the plot now, so I'll post this - ask me to clarify or expand if you like!