Hey guys.
I'm hoping that a picture paints a thousand words and that this will pretty much tell you what you need to know.
Attachment:
IMG_4893.JPG [ 1.19 MiB | Viewed 10549 times ]
What is absent here (because I had to move the rig to a different location, in order the photograph it) is the power and ϕ0 IN hook-ups.
Here, you can see what the ϕ0 IN signal looks like. It's up to TTL logic levels well inside of 50ns (sorry, I've got the scope set at 100ns per division; opps), the peek voltage is 5V and it's a nice clean signal.
Attachment:
IMG_4895.JPG [ 1.26 MiB | Viewed 10549 times ]
What else can I tell you? I suppose, if something is not clear, you'll ask me and I can post back. Given time, I'll better understand what you guys need, without you having to ask.
These are medium resolution pictures, as I didn't want to burden the servers with high res, but I think that they should be good enough for you to be able to see enough detail, without a circuit schematic, which would take me hours to prepare, given that I like to have things as good as I can get them, and I've never prepared a schematic before.
If you'd like to see some snippets of the code that's running on the Pico, here is what is most relevant...
This is how I've arranged for the Pico to represent 'memory':
Code:
MEMORY = {
"FFFF": "00", # IRQ_B (high)
"FFFE": "00", # IRQ_B (low)
"FFFD": "06", # RES_B (high)
"FFFC": "00", # RES_B (low)
"FFFB": "06", # NMI_B (high)
"FFFA": "00", # NMI_B (low)
"0617": "00",
"0616": "00",
"0615": "00",
"0614": "00",
"0613": "00",
"0612": "00",
"0611": "80",
"0610": "05",
"060F": "4c", # jmp $8005
"060E": "60",
"060D": "00",
"060C": "8d", # sta $6000
"060B": "aa",
"060A": "a9", # lda #$aa
"0609": "60",
"0608": "00",
"0607": "8d", # sta $6000
"0606": "55",
"0605": "a9", # lda #$55
"0604": "60",
"0603": "02",
"0602": "8d", # sta $6002
"0601": "ff",
"0600": "a9", # lda #$ff
"01FF": "00", # top of 'the stack'
"01FE": "00",
"01FD": "00",
"01FC": "00",
"01FB": "00",
"01FA": "00",
"01F9": "00",
"01F8": "00",
"01F7": "00",
"01F6": "00",
"01F5": "00",
"01F4": "00",
"01F3": "00",
"01F2": "00",
"01F1": "00",
"01F0": "00",
...
"010F": "00",
"010E": "00",
"010D": "00",
"010C": "00",
"010B": "00",
"010A": "00",
"0109": "00",
"0108": "00",
"0107": "00",
"0106": "00",
"0105": "00",
"0104": "00",
"0103": "00",
"0102": "00",
"0101": "00",
"0100": "00", # bottom of 'the stack'
}
That array is accessed with:
Code:
data = MEMORY.get(addr, "EA") # if the memory location is not defined, use 'NOP'
... where
addr is the hex value that is read from the address bus. You should be able to see, from the comment, that if an address is not in that array, then
data == #$00EA.Interestingly, while I was contemplating how best to help you guys, to help me, I left my rig running, and I saw that the data write LED (which is the LED on the Pico, as I have this set up: I ran short of GPIO pins, so simply coded the R/W signal to the on-board LED) switching state. Unfortunately, the capture data was lost, but I now have the rig running once again, with the same set up, so I'll let the PC register get up to where I know it was, and post back what I saw.
Tbc...
---
Okay, so something must have been different (but I can't think what) as the R/W signal is now steady. I then remembered that I saw that the address bus was no high than #$00FF (is that the top of what is called 'Zero Page'?) and arranged for that situation to happen, once again. Success! This is what I was seeing, before...
Code:
...
T-State: 250 ..............................
ADDR BUS OUT: 0000|0000|1111|1111 :: 0x00FF
DATA BUS R: 1110|1010 :: 0xEA
T-State: 251 ..............................
ADDR BUS OUT: 0000|0000|1111|1111 :: 0x00FF
DATA BUS R: 1110|1010 :: 0xEA
T-State: 252 ..............................
ADDR BUS OUT: 0000|0001|0000|0000 :: 0x0100
DATA BUS R: 0000|0000 :: 0x00
T-State: 253 ..............................
ADDR BUS OUT: 0000|0001|0000|0000 :: 0x0100
DATA BUS R: 0000|0000 :: 0x00
T-State: 254 ..............................
ADDR BUS OUT: 0000|0001|0000|0001 :: 0x0101
DATA BUS R: 0000|0000 :: 0x00
T-State: 255 ..............................
ADDR BUS OUT: 0000|0001|1111|1101 :: 0x01FD
DATA BUS W: 0000|0000 :: 0x00
T-State: 256 ..............................
ADDR BUS OUT: 0000|0001|1111|1100 :: 0x01FC
DATA BUS W: 0000|0001 :: 0x01
T-State: 257 ..............................
ADDR BUS OUT: 0000|0001|1111|1011 :: 0x01FB
DATA BUS W: 0000|0010 :: 0x02
T-State: 258 ..............................
ADDR BUS OUT: 1111|1111|1111|1110 :: 0xFFFE
DATA BUS R: 0000|0000 :: 0x00
T-State: 259 ..............................
ADDR BUS OUT: 1111|1111|1111|1111 :: 0xFFFF
DATA BUS R: 0000|0000 :: 0x00
T-State: 260 ..............................
ADDR BUS OUT: 0000|0000|0000|0000 :: 0x0000
DATA BUS R: 1110|1010 :: 0xEA
T-State: 261 ..............................
ADDR BUS OUT: 0000|0000|0000|0001 :: 0x0001
DATA BUS R: 1110|1010 :: 0xEA
T-State: 262 ..............................
ADDR BUS OUT: 0000|0000|0000|0001 :: 0x0001
DATA BUS R: 1110|1010 :: 0xEA
...
So, at T-State 255 to 257, we see a data write of 00, 01, 02
The next time the program counter reaches #$00FF, it's slightly different:
Code:
...
T-State: 769 ..............................
ADDR BUS OUT: 0000|0000|1111|1111 :: 0x00FF
DATA BUS R: 1110|1010 :: 0xEA
T-State: 770 ..............................
ADDR BUS OUT: 0000|0000|1111|1111 :: 0x00FF
DATA BUS R: 1110|1010 :: 0xEA
T-State: 771 ..............................
ADDR BUS OUT: 0000|0001|0000|0000 :: 0x0100
DATA BUS R: 0000|0000 :: 0x00
T-State: 772 ..............................
ADDR BUS OUT: 0000|0001|0000|0000 :: 0x0100
DATA BUS R: 0000|0000 :: 0x00
T-State: 773 ..............................
ADDR BUS OUT: 0000|0001|0000|0001 :: 0x0101
DATA BUS R: 0000|0000 :: 0x00
T-State: 774 ..............................
ADDR BUS OUT: 0000|0001|1111|1010 :: 0x01FA
DATA BUS W: 0000|0000 :: 0x00
T-State: 775 ..............................
ADDR BUS OUT: 0000|0001|1111|1001 :: 0x01F9
DATA BUS W: 0000|0001 :: 0x01
T-State: 776 ..............................
ADDR BUS OUT: 0000|0001|1111|1000 :: 0x01F8
DATA BUS W: 0010|0010 :: 0x22
T-State: 777 ..............................
ADDR BUS OUT: 1111|1111|1111|1110 :: 0xFFFE
DATA BUS R: 0000|0000 :: 0x00
T-State: 778 ..............................
ADDR BUS OUT: 1111|1111|1111|1111 :: 0xFFFF
DATA BUS R: 0000|0000 :: 0x00
T-State: 779 ..............................
ADDR BUS OUT: 0000|0000|0000|0000 :: 0x0000
DATA BUS R: 1110|1010 :: 0xEA
T-State: 780 ..............................
ADDR BUS OUT: 0000|0000|0000|0001 :: 0x0001
DATA BUS R: 1110|1010 :: 0xEA
T-State: 781 ..............................
ADDR BUS OUT: 0000|0000|0000|0001 :: 0x0001
DATA BUS R: 1110|1010 :: 0xEA
T-State: 782 ..............................
ADDR BUS OUT: 0000|0000|0000|0010 :: 0x0002
DATA BUS R: 1110|1010 :: 0xEA
...
... 00, 01, 22
From then on, each time the program counter reaches #$00FF, it's the same as the above: first 00, 01, 02 then 00, 01, 22 and each time, a little lower on the 'stack', so that what has gone before, would not be overwritten.
Now, as you'll see from the coding, I've learned that the 'stack' is from #$0100 to #$01FF (please correct me, if that is not true) and as such, what I think I'm seeing here, is that the 6502 is trying to place those three values onto the 'stack'.
As is, my code (that is to say, my monitor code) is not responding to any data write requests; it's simply monitoring them, but I can (and I plan to) change that, if it becomes worth while.
The point here, is that now I know for sure, that my app is reading the the data bus and not simply echoing what it wrote to the data bus on it last operation: it didn't write anything to the data bus (#$00 aside, which is always there, in the absence of anything else) during this, what I would call, an idle stage.
What do you think?
Again, guys, I can't thank you enough for your help here and I'd like to assure you that I'm not simply wasting your time here; I'm serious about this build. I may be a little unconventional, but I'd like to think, that in the end, I'll have a project that others can learn something from, even if that that 'something', is "
Don't do what I've done.".
~ Rob (alias Marvin)
p.s: I'm still confused about why I didn't see the contents of the 'A' register, before, but maybe you guys can throw some much needed light on that, now that you have something more with which to work.
Thank you very much.