I don't think there's any magic. I think it cuts into the framerate to make the game feel more responsive, then if the delay is too high the game feels like its running at 15fps, and characters are just warping around.
Still isnt good enough, framerate isnt the right one. The sounds goes to slow down to speed up and some other issue. Back then it didnt have audio, worst framerate, bad resolution and graphics partially emulated