BEQ branches if the zero flag is set. ADC sets the zero flag if the result of the addition is 0x00. So this code will branch only if your accumulator ends up being 0 otherwise you will RTS.
I'm still not 100% on what you're doing.
That's perfect. Basically I'm preventing the message code from restarting. Every message begins with both letterpos and linepos at 0. The message code recalls information from before the checksum, and the RTS will return to the message code currently in progress.
The message dialog is handled accordingly:
Even LetterPos
Odd LetterPos
Even LetterPos+LinePos
Odd LetterPos+LinePos
This is what LetterPos is doing:
0,2,4,6,8,A,C,E,10,12,14,16,18,1A,1C,1E
1,3,5,7,9,B,D,F,11,13,15,17,19,1B,1D,1F
0,2,4,6,8,A,C,E,10,12,14,16,18,1A,1C,1E
1,3,5,7,9,B,D,F,11,13,15,17,19,1B,1D,1F
This is what LinePos is doing:
0
0
2 ; Always increments of 2. Otherwise, it's only half a LinePos.
2
4 ; End Message
0F:F601:AD 16 02 LDA LetterPos = #$00 ; Load LetterPos
0F:F604:6D 17 02 ADC LinePos = #$02 ; + LinePos
0F:F607:F0 01 BEQ $F60A ; Start message routine if new message
0F:F609:60 RTS ; Otherwise, return to message routine
0F:F60A:EE 16 02 INC LetterPos = #$00
0F:F60D:EE 16 02 INC LetterPos = #$00 ; LetterPos+2
0F:F610:20 6E F5 JSR SwitchToBank10 ; Check if letter is special character, print Letter and play sound
0F:F613:AD 16 02 LDA LetterPos = #$00 ; LetterPos to A
0F:F616:C9 1F CMP #$1F ; Is LetterPos >= 1F? (16 characters per line)
0F:F618:90 F0 BCC $F60A ; If not, go back to F60A and print another letter.
0F:F61A:AC 16 02 LDY LetterPos = #$00 ; LetterPos to Y
0F:F61D:C0 1F CPY #$1F ; Is LetterPos >= 1F? (16 characters per line)
0F:F61F:B0 06 BCS $F627 ; If so, go to F627, LetterPos-15
0F:F621:C8 INY
0F:F622:C8 INY ; If not, LetterPos+2
0F:F623:C0 1F CPY #$1F ; Until >= 1F
0F:F625:90 FA BCC $F621
0F:F627:98 TYA ; LetterPos to A
0F:F628:E9 1F SBC #$1F ; A-15 to alternate odd/even
0F:F62A:
16 02 STA LetterPos = #$00 ; A to LetterPos
0F:F62D:D0 E1 BNE $F610 ; Print this letter if LetterPos is odd
0F:F62F:EE 17 02 INC LinePos = #$02
0F:F632:EE 17 02 INC LinePos = #$02 ; Otherwise, add LinePos+2
0F:F635:AD 17 02 LDA LinePos = #$02 ; LinePos to A
0F:F638:C9 04 CMP #$04 ; Is LinePos >= 04? (4 lines per window)
0F:F63A:90 CD BCC $F609 ; If not... go to RTS?
0F:F63C:4C 10 F6 JMP $F610 ; Print this letter
0F:F63F:4C 85 F6 JMP $F685 ; ??I don't remember??
0F:F642:A9 00 LDA #$00 ; 0 to A
0F:F644:
13 02 STA MessageID = #$00 ; End message
0F:F647:60 RTS ; End of routine
Unfortunately, the game has other plans:
f ; LetterPos gets stuck
offence does not ; If LetterPos is even, it's not stuck anymore
. ; LetterPos gets stuck again