I don't know about that sync thing and it freezes ZX Spin emulating a 48. For simiplicity, just replace with a halt sync: ;ld a,r ; padding instruction ;in a,(c) ;cp e ;jp nz,sync halt and for the illegal instruction problems: Edge_Loop: push bc ; preserve B for loop ld c,(hl) ; B = ypos1 C = xpos1 ...