New frame sync maths