Eaten ghosts are not transparent
Once a ghost is eaten, it returns to home but instead of being fully transparent, the ghosts wear a "black" suit, covering any tiles over as they pass (most noticeably the dots).
There are a couple of ways of fixing this.
The obvious one is to check for ARGB 0XFF000000 in the gfx_decode_color_palette function around line 2806 or to check for r+g+b==0 around line 2798 and set to 0x0 if true.
Happy to submit a PR for this, depending upon which approach you wish to take.
Damn you are picky 😆 I think I use the same trick as the original game, because I haven't found separate 'eyes' in the sprite ROM. But it might be that the arcade hardware renders 'black' as transparent.
I'm a bit confused, because this code block at the end of palette initialization sets every first slot in an 8-color-block to transparent... and I would assume that the eyes are using such a color palette slot for the 'ghost coat'.
PS: I mean this code block: https://github.com/floooh/pacman.c/blob/cc56af95a551baf495fea03a9e7064d3b53fd967/pacman.c#L2802-L2805
Maybe I have a bug or wrong assumption there? (would need to cross-check with the emulator - assuming that I don't have the same bug there: https://github.com/floooh/chips/blob/master/systems/namco.h)
PS: maybe the color code for the eyes is wrong here (?) https://github.com/floooh/pacman.c/blob/cc56af95a551baf495fea03a9e7064d3b53fd967/pacman.c#L236
...but I'd need to dig into the code base again to understand how the color decoding worked...
Damn you are picky 😆
Have to confess, this is only due to having travelled the same road as you and written pacman from the dossier (also my fault for being a massive nerd!)
I think I use the same trick as the original game, because I haven't found separate 'eyes' in the sprite ROM. But it might be that the arcade hardware renders 'black' as transparent.
You are correct. The "eyes" graphic is indeed a regular ghost in a "black" suit. The Colour prom in namco hardware causes all black to be transparent regardless of palette position. This being the case I suspect the correct way is to set all RGB000 to transparent and not just the primary indexes.
I'm a bit confused, because this code block at the end of palette initialization sets every first slot in an 8-color-block to transparent... and I would assume that the eyes are using such a color palette slot for the 'ghost coat'.
You are correct - the sprites all use a 4 colour palette group and not individual colours (not sure what i'm trying to say here!)
Maybe I have a bug or wrong assumption there? (would need to cross-check with the emulator - assuming that I don't have the same bug there: https://github.com/floooh/chips/blob/master/systems/namco.h)
I think I tested your emulator and checked and that did not suffer the same fate (linked from another issue)
Once things aren't quite as chaotic here I plan to submit some further PRs to help with other "accuracy" improvements but rather than just posting problems I prefer to post issues + solutions rather than just poke holes as that is not fair and not nice :)