Not sure if the 6502 does exactly this, but a useful way to think about it is that a page crossing is marked by the carry being
different than the MSB of the branch-offset. IOW, if the branch-offset is positive (i.e. MSB=0), then a HIGH carry indicates an page crossing, whereas if the branch-offset is negative (i.e. MSB=1), then a LOW carry indicates a page crossing. To then adjust the high byte, you can add the carry + a sign-extension of the branch-offset (i.e. $FF for MSB = 1 and $00 MSB=0) which effectively either adds or subtracts 1 as appropriate. Like this:
Code:
PCL := PCL + BranchOffset
If (C.OUT XOR BranchOffset.7)
PCH := PCH + C.OUT + SignExtend(BranchOffset)
In the Visual6502 listing BigEd provided:
Line 5: alua $70 (BranchOffset) + alub $f5 (PCL) = $65 -> PCL, (alucout=1 XOR alua.bit7=0) = 1, so page crossed!
Line 6: alua $12 (PCH) + alub $00 (SignExtend(BranchOffset)) + carry (1) = $13 -> PCH
Line 7: pc = $1365