Pac-Man (Midway) core: ghosts one pixel too low?

User avatar
Tackemon
Posts: 23
Joined: Mon Jul 19, 2021 5:03 am
Has thanked: 3 times
Been thanked: 3 times

Pac-Man (Midway) core: ghosts one pixel too low?

Unread post by Tackemon »

As an exercise, I'm attempting to recreate the original Pac-Man in the Unity game engine. I got to the point where I wanted things to line up with the exact pixel positions of the original. Not exactly that hard when you only have 224 x 288 pixels to deal with.

At first I had been taking reference screenshots using the Pac-Man core on the MiSTer and was a little surprised to see that the gap between ghosts and maze were two pixels above and zero below. I had simply centered mine originally, so I adjusted my sprites to match, since I figured MiSTer was probably accurate. A bit silly either way I realize. :)

Later it was more convenient to take reference screenshots using MAME and a ROM. With that, the ghosts are centered vertically. That seems to be the case on YouTube videos and photos from the real arcade machine.

I know, "literally unplayable" right?

Obviously this is a minor issue, but I was curious if this is one of those rare cases where a MiSTer core isn't 100% accurate?
User avatar
macro
Core Developer
Posts: 139
Joined: Sun May 24, 2020 4:12 pm
Been thanked: 171 times

Re: Pac-Man (Midway) core: ghosts one pixel too low?

Unread post by macro »

From the mame source code ...

Pengo & Pac Man are almost identical, the only differences being the
extra gfx bank in Pengo, and the need to compensate for an hardware
sprite positioning "bug" in Pac Man.

and

/* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */
/* one pixel to the left to get a more correct placement */

never looked into the schematics enough to see why this should be so, but mame just allows for it!
Did I do something useful?

buy me a coffee
User avatar
Tackemon
Posts: 23
Joined: Mon Jul 19, 2021 5:03 am
Has thanked: 3 times
Been thanked: 3 times

Re: Pac-Man (Midway) core: ghosts one pixel too low?

Unread post by Tackemon »

Hmm, that's interesting. I wonder if that has anything to do with it.

I'll probably just go back to the centered version and call it good, lol.

What interesting too is if you want to reproduce the ghost AI behavior, in the real game there's a bug where in the "up" direction (in chase mode), the ghosts that use the predicted player position incorrectly use up and to the left of where the player is heading. So I may try to reproduce the behavior of that bug just for fun. :)
Post Reply