[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple IIgs Color Dither Problem



Tony Kavadias wrote:
On 2009-09-19 23:02:34 +1000, Immortal Nephi <Immortal_Nephi@hotmail.com> said:

What do you mean "dithering algorithms used by Apple IIgs emulators
are too simplistic"?  KEGS probably does not have dithering algorithm
to hide vertical strip.  There has to be another way.  Like I said
color dithering translation table may be needed to prevent from
showing dithering on the screen.


I use an emulator called Sweet 16, which is a Mac OS X "version" of an older emulator called Bernie ][ The Rescue for Mac OS 8 and higher. While I could argue that this is the best Apple IIGS emulator ever written for the Macintosh to date, there are some shortcomings... one of them is its "AppleColor RGB Monitor
mode".

What this does is combine the colours of even-odd adjacent pixels for pixels that
are not black nor white in order to come up with a way to display cleaner
640-resolution graphics.

However, in my opinion, I find that while the algorithm does the job in killing
the vertical stripes of adjacent colours on 640 displays, it does so by
killing the accuracy (fidelity) of the picture, particularly since while black
and white even-odd pixel pairs are not blended to make grey, other colours
do not get the same treatment, so if there was a picture that relied on coloured
edges to define a picture, those edges would be distorted by the software
dithering process.

This inconsistent behavior is a characteristic of all _ad hoc_ blending
methods.

However, to make a "smarter" dithering algorithm would mean to be able to
identify where to blend colours and where not to, and this would require a
degree of artificial intelligence to do the job... something I'd rather not
apply anyway (I disable "AppleColor RGB Monitor mode" and just put up with
the vertical stripes!).

Actually, no AI is needed to blend _everything_ as the Applecolor RGB
monitor would have done it.  This means accepting softer text if you are
also viewing color graphics.  (An emulator should provide multiple types
of emulated monitors, so you can have your sharp text when you want it.)

Where things get tricky--and I mean arbitrary--is in applying blending
selectively in an attempt to get the best of both worlds (sharp text
_and_ smooth color gradations).

Digital filtering solves this problem, but it can be computationally
expensive.  So a more practical approach would be to "precompute" the
desired filter response and then use a short history of pixels (shift
register) as an index into a "response table" to generate each pixel.

The table size needed is usually much less than the cache size of modern
processors, so there need be little performance impact to provide a
faithful emulation of older displays.

-michael

NadaNet and AppleCrate II: parallel computing for Apple II computers!
Home page: http://home.comcast.net/~mjmahon

"The wastebasket is our most important design
tool--and it's seriously underused."