BigEd wrote:
Will be interesting to hear about your single-stepping adventure. If you can run the machine slow enough and investigate enough signals, it surely can't keep too many secrets from you.
Precisely what I am thinking.
As we know, the 65C816 goes through an interrupt-like sequence when RESETB is asserted. By the time the '816 has loaded the start address of the reset handler from $00FFFC-$00FFFD eight clock cycles will have elapsed. So it should be possible to see if the CPLD is doing the correct setups during that time, which would be to map 8K of ROM at
$00E000-$00FFFF. I should be able to determine if the ROM is coming in by seeing if its
/CS is asserted at the 7th Ø2 low pulse. If so, ROM's
/OE should be asserted at the 7th Ø2 high pulse and
D0-D7 should have the LSB of the start of the reset handler (conveniently
$00).
On the next Ø2 low, ROM should again be selected, and when the clock goes high, I should again see the ROM's
/OE asserted and
D0-D7 should be
%11100000 (
$E0), the MSB of the start address of the reset handler. If that is happening I can dismiss a problem with glue logic for the time being and look at other possibilities.
On the other hand, if I see
/CS and
/OE being asserted when they should be but wrong values on the data bus then I know that while ROM is being selected, its output is coming from the wrong place and my startup code is not where it belongs in the ROM. I can also read the address bus to verify that at cycles 7 and 8, the reset vector address is present on
A0-A15. Doing so will be a bit tedious with a logic probe but will help in sorting out the trouble.
To do all this I will burn a ROM whose reset code will consist of
NOP followed by
STP. These single byte instructions are easy to discern with a logic probe.
STP will halt the MPU so it doesn't launch into never-never land if I hit the cycle push button once too often.
All other ROM bytes will be
$FF, which I should never see on the data bus.