Re: TTL 6502 Here I come
Posted: Sat Feb 03, 2018 10:03 pm
Ok, back to the matter at hand. As I mentioned, things were all set up for a C64 test. I was hopeful for a fist-time run, but no go! Nothing but a blank screen! Dieter sent me this amusing link to a "Commodore Diagnostician" chart confirming that a faulty 6510 IC would in fact cause a blank screen. Ah, good to know! 
After confirming that all the pins on the 6510 pinout header were hooked up correctly and working, it was time to have a closer look. The analyzer showed PHI2 working nicely and lots of activity when /RS went high. I could see the CPU trigger the RESET sequence, but there was nothing on the address lines that looked like a fetch of the RESET vector.
One thing I noted was the BE signal (AEC on the 6510) changing state more or less in phase with PHI2. This is as it should be on the C64 since the CPU shares the bus with the video (VIC) chip. The VIC chip drives AEC low in PHI1 and takes over the bus; then it drives AEC high again for PHI2 and relinquishes the bus to the 6510. That means only address values in Phi2 are from the CPU, but these still looked random at best.
After some head-scratching, the problem became apparent. The bus management scheme on the TTL CPU drives the internal address bus (ADL/ADH) only during PHI1 to avoid collisions during transitions. There are bus transceivers between the internal and external address bus which the BE signal enables. However, I replaced the 74AC245s which were performing that function with faster CBT parts as part of the nanosecond-hunt to 20MHz. That has worked fine to this point, with BE always held high, but now on the C64 there is nothing to drive the external bus in Phi2.
74CBT3245s are only FET switches and, unlike 74AC245s, they provide no drive at all when enabled in Phi2. They only end up connecting together an un-driven internal bus with a floating external one. There are bus hold ICs there, but I suspect those don't have enough oomph to charge the external bus by themselves. No wonder things looked strange on the analyzer.
So, the fix is to put those 74AC245s back (the footprints are compatible with the CBT parts, which is nice). Speed is not an issue when working with a C64, but earlier tests also showed that the critical path at high speeds is in fact R/W, not the address lines. It's likely that 74AC245s will do just fine in this role for keeps.
Now, having no spare 74AC245s on hand, I decided to make a quick patch to temporarily disable the bus-management scheme just to prove the point. That seemed to work, but unfortunately it's still a blank screen when power is applied.
Even so, it's progress. I can now see the address lines behaving properly and the CPU picks up the reset vector at $FCE2 correctly. It then jumps to and executes this code:
LDX #$FF
SEI
TXS
CLD
JSR $FD02
Now THAT looks better!
But, we still get a blank screen. Hmmm, this one 's gonna be tricky ...
After confirming that all the pins on the 6510 pinout header were hooked up correctly and working, it was time to have a closer look. The analyzer showed PHI2 working nicely and lots of activity when /RS went high. I could see the CPU trigger the RESET sequence, but there was nothing on the address lines that looked like a fetch of the RESET vector.
One thing I noted was the BE signal (AEC on the 6510) changing state more or less in phase with PHI2. This is as it should be on the C64 since the CPU shares the bus with the video (VIC) chip. The VIC chip drives AEC low in PHI1 and takes over the bus; then it drives AEC high again for PHI2 and relinquishes the bus to the 6510. That means only address values in Phi2 are from the CPU, but these still looked random at best.
After some head-scratching, the problem became apparent. The bus management scheme on the TTL CPU drives the internal address bus (ADL/ADH) only during PHI1 to avoid collisions during transitions. There are bus transceivers between the internal and external address bus which the BE signal enables. However, I replaced the 74AC245s which were performing that function with faster CBT parts as part of the nanosecond-hunt to 20MHz. That has worked fine to this point, with BE always held high, but now on the C64 there is nothing to drive the external bus in Phi2.
74CBT3245s are only FET switches and, unlike 74AC245s, they provide no drive at all when enabled in Phi2. They only end up connecting together an un-driven internal bus with a floating external one. There are bus hold ICs there, but I suspect those don't have enough oomph to charge the external bus by themselves. No wonder things looked strange on the analyzer.
So, the fix is to put those 74AC245s back (the footprints are compatible with the CBT parts, which is nice). Speed is not an issue when working with a C64, but earlier tests also showed that the critical path at high speeds is in fact R/W, not the address lines. It's likely that 74AC245s will do just fine in this role for keeps.
Now, having no spare 74AC245s on hand, I decided to make a quick patch to temporarily disable the bus-management scheme just to prove the point. That seemed to work, but unfortunately it's still a blank screen when power is applied.
Even so, it's progress. I can now see the address lines behaving properly and the CPU picks up the reset vector at $FCE2 correctly. It then jumps to and executes this code:
LDX #$FF
SEI
TXS
CLD
JSR $FD02
Now THAT looks better!
But, we still get a blank screen. Hmmm, this one 's gonna be tricky ...