Only adjust the timing with a light gun with the TPS unplugged. When the TPS is plugged in the ECU constantly makes changes to the timing to get the car to idle correctly. That is why it goes wonky when the TPS is plugged in.
You really only need to unplug the TPS sensor to change the timing value. Everything in the FSM is to ensure the engine is operating correctly, at a good temp, with no major malfunctions in the engine components. I have done this on a dyno. Just unplug the TPS, makes the change, and plug the TPS back in.
What ECU are you using, what octane fuel are you using?