http://home.comcast.net/~jpittman2/pacman/pacmandossier.html
was the best guide I found, its brilliantly in depth and covers more behaviour than I ever realised, like how the pacman turns corners. Pity I only found it after I mostly finished it.