Content originally posted in LPCWare by dunno.. on Wed Jul 15 02:16:56 MST 2015
are you using interrupts?
do you disable interrupts on the run, or even change isr handlers in the vic on the fly?
->
i had the same problem as you, it looked like a restart, but in fact, it was only a spurious interrupt with jump to the default handler, which is simply starting to execute at line0..
read the datasheet, search for spurious interrupts, make sure VICDefVectAddr is provided with an actual handler that acks the int and returns..
also make sure to guard your changes to the vic on the fly by disabling global interrupts, these accesses are not interruptsave, either.
to track this one down, do some debug prints or breakpoint in the VICDefVectAddr handler.