If you turnTurn your square one fourth turn to the left and project it down.
To give some details: consider a simple random walk $Y$ on $\mathbb{Z}$ that is constrained to go left when yours goes up, then the projectionand to go right when yours goes right. When your walk is on the boundary, then draw randomly independently the direction of $x$-axis becomes$Y$. Since $Y$ is a usualsimple random walk, all the results you can dream of are available. The only issue is that the two walks decorelate as soon as yours hit the boundary, but this is no problem for your question on the diagonal. Indeed, if $\sqrt{2}\mathbb{Z}$$Z$ is the walk that is equal to $Y$ for steps $\leq n$, and equals the diagonal projectsprojection of $Y$ to $0$. All$[-n+k,n-k]$ at steps $n+k$, then up to a $\sqrt{2}$ factor $Z$ is the answers you need are therefore encoded inprojection on the $1$-dimensionalsecond diagonal of your random walk, and it hits $0$ at time $t$ (meaning that your walk hits the diagonal at that time) if and only if $Y$ does.