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

Re: Color fringe hires behavior



REM this code is self-documenting so this comment probably won't
explain what the code actually does :)

> is there an emulator that has reproduced the color fringe behavior perfectly/correctly?

I've haven't seen an emulator that does the fringes behavior
"perfectly/correctly" yet.  (Catakig, AppleWin, KEGS, Bernie.)


I think that Michael J. Mahon answered the question pretty well.
Here's my take:

In DHGR, you've already got half pixels, so ignore color and think in
monochrome. Each pixel gets doubled in size, so each 7-bit HGR byte
becomes two 7-bit DHGR bytes.  Each HGR bit becomes two DHGR bits.
And, two of those DHGR bits straddle between the two DHGR 7-bit bytes.

If the HGR byte is shifted (hi-bit set) obviously you need to shift the
two DHGR 7-bit bytes one bit (or half a HGR pixel.)  One DHGR pixel
(half of the doubled pixel, or one bit) on the right edge gets shifted
out.  Save the shifted out value.  A DHGR pixel on the left edge gets
shifted in.  The value of the shifted in DHGR pixel is the value that
you saved if you previously shifted 2 DHGR 7-bit bytes.

And, there's more to explain about this concerning those half-pixel
artifacts at the left edge of the screen.  Sather talks about those in
quite some detail.

Yeah, I can see now how some pseudo code or a flow chart _might_ help
with "explaining" this.  But, coding in English can be a good place to
start.

I never thought this before but filling the HGR screen with the pattern
of 7F FF (or FF 7F) may produce colored vertical lines.  I wish I had
my real Apple II to test some of this out on.