Jump to content

2

reducing flicker in Pac-Man - Stella


11 replies to this topic

#1 maiki OFFLINE  

maiki

    Moonsweeper

  • 415 posts

Posted Tue Jun 12, 2012 10:56 PM

Why is it not possible to turn off the flicker of the ghosts by changing the phosphor blend? It would make the game far more attractive (for masses)...

#2 Andrew Davie OFFLINE  

Andrew Davie

    Stargunner

  • 1,413 posts
  • Location:Tasmania

Posted Wed Jun 13, 2012 1:33 AM

... because PacMan is a Model T.  If you put a souped up engine in a Model T, chrome everywhere, and remove all the other faults of the original.... then it's not a Model T anymore.
PacMan is what it is.  It flickers... badly. Making it more appealing to the masses by modifying an emulator so it gives an unrealistic experience is entirely missing the point.
Cheers
A

#3 Phredreeke OFFLINE  

Phredreeke

    Chopper Commander

  • 157 posts

Posted Wed Jun 13, 2012 2:00 AM

Flicker is unavoidable for Pac-man on 2600. If you want less flicker you could play Ms. Pac-man, which only flickers when needed

(FYI, Pac-man shows each ghost only 1 out of 4 frames, so if you wanted to show "all at once" you'd have to blend 4 frames together...)

#4 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,782 posts
  • Location:The land of Gorch

Posted Wed Jun 13, 2012 3:55 AM

Once again, the problem in this game is NOT the flicker (15hz was not uncommon among early-80's 2600 games), but the background-to-sprite color difference.  Try using black for the background.
It should be mentioned that the 2600 port of Defender flickers at an even worse rate (and differs from the arcade original as much as Pac-Man does), yet received far less complaints.

#5 stephena OFFLINE  

stephena

    River Patroller

  • 2,382 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Wed Jun 13, 2012 3:58 AM

View PostPhredreeke, on Wed Jun 13, 2012 2:00 AM, said:

(FYI, Pac-man shows each ghost only 1 out of 4 frames, so if you wanted to show "all at once" you'd have to blend 4 frames together...)

Yes, this is the main issue.  The 'phosphor' mode in Stella is somewhat limited in that (a) it only mixes the past two frames, and (b) it isn't an entirely accurate representation of a real TV anyway.  Basically, Stella phosphor mode is optimized for what's called '30Hz flicker', where the objects alternate every other screen.  Pac-man (for the ghosts at least) uses 15Hz flicker (or alternate every 4 frames).

Besides, on every CRT TV and monitor I've tried, there is still some flicker even in 30Hz mode.  I'll be trying to more accurately emulate this in future versions of Stella, because the current implementation is very idealized (in that there's no flicker at all).

EDIT:  I forgot to add that phosphor mode in Stella is currently enabled per-ROM, which doesn't really make sense realistically.  You turn it on for ROMs that use 30Hz flicker (or the output flickers too much), and you turn if off for those that don't need it (or the output 'smears').  This alone should show that the implementation isn't ideal.  It should be a function of the TV, not the ROM.  When you play a game with flicker on a real TV, the TV doesn't know what ROM you're using!

#6 maiki OFFLINE  

maiki

    Moonsweeper

  • 415 posts

Posted Wed Jun 13, 2012 4:03 AM

And what would happen if you blended 4 frames together?

Edited by maiki, Wed Jun 13, 2012 4:04 AM.


#7 stephena OFFLINE  

stephena

    River Patroller

  • 2,382 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Wed Jun 13, 2012 4:11 AM

Smearing, I suspect, whereby parts of the screen that are being updated faster than the ghosts have 4 frames blended together.  IOW, you'd see a superimposition of 4 frames at once.

But in any event, this is leading even further from accurate emulation of output.  The current phosphor approach isn't sufficient for accurate output; adding more frames will only make it worse.  Pac-man flickers because of the way it was programmed (and limitations of the platform).  An emulator should accurately emulate that, even if it isn't aesthetically pleasing.

#8 maiki OFFLINE  

maiki

    Moonsweeper

  • 415 posts

Posted Wed Jun 13, 2012 4:24 AM

Yes, accuracy is the main goal. On the other hand I find it practical when emulators can offer additional features. Such as NES emulator that can disable sprite flicker overflow is very handy for many NES games I think.

Cosmic Swarm is a good example when Stella outputs non-flickering picture whereas on real system those bugs flicker. I always use the non flicker option when I play it on Stella. But Pac Man is different. So there would have to be some crazy specific tweak to disable the flicker of the ghosts... I think

Edited by maiki, Wed Jun 13, 2012 4:25 AM.


#9 Phredreeke OFFLINE  

Phredreeke

    Chopper Commander

  • 157 posts

Posted Wed Jun 13, 2012 9:31 AM

View Poststephena, on Wed Jun 13, 2012 3:58 AM, said:

Yes, this is the main issue.  The 'phosphor' mode in Stella is somewhat limited in that (a) it only mixes the past two frames, and (b) it isn't an entirely accurate representation of a real TV anyway.  Basically, Stella phosphor mode is optimized for what's called '30Hz flicker', where the objects alternate every other screen.  Pac-man (for the ghosts at least) uses 15Hz flicker (or alternate every 4 frames).

Besides, on every CRT TV and monitor I've tried, there is still some flicker even in 30Hz mode.  I'll be trying to more accurately emulate this in future versions of Stella, because the current implementation is very idealized (in that there's no flicker at all).

I would suggest adjusting mixing depending on the intensity of the previous frame, so there's more blending going from bright to dark than dark to bright.

#10 NE146 OFFLINE  

NE146

    Dumbass Atari Fan

  • 12,977 posts
  • Location:Seattle, WA

Posted Wed Jun 13, 2012 9:41 AM

View PostNukey Shay, on Wed Jun 13, 2012 3:55 AM, said:

  Try using black for the background.

Nukey do you have a quicky hack of 2600 Pacman available with just the background changed?

#11 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 22,641 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Jun 13, 2012 9:46 AM

View PostNE146, on Wed Jun 13, 2012 9:41 AM, said:

View PostNukey Shay, on Wed Jun 13, 2012 3:55 AM, said:

  Try using black for the background.

Nukey do you have a quicky hack of 2600 Pacman available with just the background changed?

Here's one:

http://www.atariage....d/#entry2533513

(The flicker doesn't seem to get less annoying with a black background.)

#12 stephena OFFLINE  

stephena

    River Patroller

  • 2,382 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Wed Jun 13, 2012 10:08 AM

View PostPhredreeke, on Wed Jun 13, 2012 9:31 AM, said:

View Poststephena, on Wed Jun 13, 2012 3:58 AM, said:

Yes, this is the main issue.  The 'phosphor' mode in Stella is somewhat limited in that (a) it only mixes the past two frames, and (b) it isn't an entirely accurate representation of a real TV anyway.  Basically, Stella phosphor mode is optimized for what's called '30Hz flicker', where the objects alternate every other screen.  Pac-man (for the ghosts at least) uses 15Hz flicker (or alternate every 4 frames).

Besides, on every CRT TV and monitor I've tried, there is still some flicker even in 30Hz mode.  I'll be trying to more accurately emulate this in future versions of Stella, because the current implementation is very idealized (in that there's no flicker at all).

I would suggest adjusting mixing depending on the intensity of the previous frame, so there's more blending going from bright to dark than dark to bright.

Yep, in the final analysis, this is probably what's needed.  Each 'pixel' needs to be adjusted differently based on its brightness.  For anyone who followed the Stella 3.7 beta testing thread (where Blargg filtering was being tested), you'll recall that I did have a partial implementation of blending such that the output was very accurate.  There was still some slight flicker comparable to a real TV, but not enough to be annoying.  And it was adjustable too, so that it varied from completely off (no blending/frames alternated completely) to completely on (no flicker at all, since one frame completely drew over the other).  Problem was, I couldn't get it to work with the Blargg TV effects, so in the interests of time I released it as-is.

I hope to revisit this at some point and improve the TV filters a bit more ...




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users