tweak handling of B&W for GEOS. Not perfect on a scaled display.

This commit is contained in:
Jorj Bauer 2021-01-11 12:32:42 -05:00
parent b6cd790fa9
commit 766e04a820
2 changed files with 11 additions and 4 deletions

View File

@ -216,10 +216,13 @@ inline void AppleDisplay::Draw14DoubleHiresPixelsAt(uint16_t addr)
drawApplePixel(bitTrain & 0x0F, col+xoff+1,row);
} else {
// Perfect color, B&W, monochrome. Draw an exact version of the pixels, and let
// the physical display figure out if they need to be reduced to B&W or not.
// the physical display figure out if they need to be reduced to B&W or not
// (for the most part - the m_blackAndWhite piece here allows full-res displays
// to give the crispest resolution.)
uint8_t color = bitTrain & 0x0F;
if (g_displayType == m_blackAndWhite) { color = c_white; }
g_display->cachePixel((col*2)+(xoff*2), row,
((bitTrain & 0x01) ? color : c_black));

View File

@ -345,10 +345,14 @@ void TeensyDisplay::cachePixel(uint16_t x, uint16_t y, uint8_t color)
// with a color between the two.
#if 1
// This is straight blending, R/G/B average
// This is straight blending, R/G/B average, except in B&W mode
uint16_t origColor = dmaBuffer[y+VOFFSET][(x>>1)+HOFFSET];
uint16_t newColor = loresPixelColors[color];
cacheDoubleWidePixel(x>>1, y, blendColors(origColor, newColor));
if (g_displayType == m_blackAndWhite) {
cacheDoubleWidePixel(x>>1, y, (origColor && newColor) ? 0xFFFF : 0x0000);
} else {
cacheDoubleWidePixel(x>>1, y, blendColors(origColor, newColor));
}
#endif
#if 0