scroll to StartOfFrame (F017) and click just to the left of it, this sets the breakpoint which is denoted by the red dot (see photo below)

hit ` again to exit the debugger

if your code gets to F017 then Stella will automatically go back into the debugger. It doesn't. To figure out why you'll need to single step through your code in the debugger - to single step hit the Step button in the top-right corner. To help you narrow it down, set a breakpoint at ShowPathern2 (F048) and start your single stepping from there.

I also notice another problem - look at your source for the one time set up and compare it with what you see in Stella's disassembly - specifically lda PATTERN1. The # for immediate mode instruction belongs with the LDA/LDX/LDY instruction, not with the constant defined at the top.

Ok that was REALLY helpful. Using that technique, I realised that I was falling through my subroutines rather than jumping strait to Overscan once I had reached the 192 lines. This meant that I was adding a few additional scan lines. Thanks for pointing me in the right direction and thanks for the additional hint on the way I was attempting to address the play field pattern values. That has cleared up something else that was confusing me.

Now I have it stable I would like to understand how to make it scroll again in a controlled way.

If you could help me understand how to approach the scrolling I would really appreciate it.

I've not attempted a vertically scrolling game before, so I'm not sure of the best way to approach it. One thing that may be useful is head over to MiniDig and check out the source code for River Raid.