BigEd wrote:
(Thanks for the thread discipline!)
First a note on terminology: NOP generator usually means running a system with no RAM or ROM, and the databus tied to a constant value such as EA or A9. Then you can check the waveforms - or even just the frequency - on SYNC and the address bus. Each bit of the address bus should toggle at half the rate of the previous bit, as the CPU races through the whole of memory in sequence. A NOP will advance by one every two cycles, whereas A9 or similar will advance every cycle.
But you're beyond that: you are now running with a RAM, or a ROM, and aiming to write a very short program to gain confidence. Getting the reset vector to point to some code, and making that code a tight loop, is a good idea. If you can read off the SYNC frequency that will (probably) tell you if you landed in the loop, and almost all the address bits will be static so you can read off where it was you landed.
I'll probably do this, just to prepare myself for toggling the emulation mode LED I added a write from-to function to my eeprom writer, and filled the whole thing (minus reset/IRQ vectors) with EA. I then set the reset vector to point to 4000, and put CLC then XCE, then at FFE1 I put JMP, and FFE2 is 02 and FFE3 is C0, so it should jump over the CLC XCE, (I still need to add XCE right before this, so it will swap C and E every time it hits the end). I did some math, and it should toggle about 62.5 times per second at 2Mhz, which is going to look like a dim LED, so I'll probably figure out something to count runs and only toggle it every 100 runs or so.
You are right though, I need to start with a tight loop, I'm getting ahead of myself with excitement now that I can write whatever I want to the eeprom. For this, I'll have it jump to 4000, and then put EA, 4C, 00, C0, which should make it a tight loop running EA, I probably don't even need EA in there honestly. For a second test, I could add CLC XCE in that loop, so I can see the emulation mode LED turn off.
As a note, you're talking about the SYNC pin, which I believe was replaced on the 65c816 with....VPA and VDA I think, right?