https://www.gamasutra.com/view/featu...ier.php?page=3
This documents PacMan in excruciating detail. A friend of mine used it to implement a full PacMan in BASIC and it's a stunningly realistic simulation of the arcade.
The first two pages are just historical information - game mechanics starts at the URL above.