DerTrueForce wrote:
So I tried a "primitive" loader (256 bytes always, with fixed target address), and it didn't work. I also tried a program that copies a bit of code in ROM, over to RAM, and then runs it. That also didn't work. I've tested the RAM(using the minipro) and according to that, it's fine.
Sad to read this. But can you explain more detailed what happens and appears not working?
DerTrueForce wrote:
One odd thing was that I had it echoing what it received as it copied, and that worked for a while, but it eventually stopped working, and it never successfully ran the payload.
My first thought reading this was: stack pointer. This means, somehow your code produces more pushes than pulls and finally your losing your way back.
DerTrueForce wrote:
I've been thinking about making a proper debugger to see precisely what's going on in there. A few shift registers, an Arduino, and a logging terminal will produce a nice trace, and will allow me to single-cycle the subject.
I'll need to be able to afford the shift registers, though, which could take a while.
I once use a 6522 timer (T2 as a single shot one) to fire an IRQ (in my case an NMI) just
during the first instruction after RTI. I triggered the counter with the correct value, restore all regs, do the RTI and then the CPU fetches the next instruction. But one clock after that fetch the NMI was triggered and forces the CPU to finish this instruction and branch to the NMI service routine. This way I circumvent the need for auxiliary hardware to do single stepping.
Arne