Updates for DHGR MIX and B&W modes (#631):

. Relax the video-mode precondition to just checking VF_MIXED
. In DHGR B&W mode, then HGR screen is also B&W
. For '50% scan lines', don't blend in NTSC B&W mode (as this was inconsistent with the RGB colour rendering), and DHGR MIX mode would look odd!
This commit is contained in:
tomcw 2019-04-06 13:44:52 +01:00
parent 7c95c0f6c4
commit ec36eae817
2 changed files with 23 additions and 5 deletions

View File

@ -659,8 +659,8 @@ inline void updateFramebufferMonitorSingleScanline( uint16_t signal, bgra_t *pTa
/* */ uint32_t *pLine0Address = getScanlineThis0Address();
/* */ uint32_t *pLine1Address = getScanlineNext1Address();
const uint32_t color0 = getScanlineColor( signal, pTable );
const uint32_t color1 = ((color0 & 0x00fcfcfc) >> 2); // 25% Blend (original)
// const uint32_t color1 = ((color0 & 0x00fefefe) >> 1); // 50% Blend -- looks OK most of the time; Archon looks poor
const uint32_t color1 = 0; // Remove blending for consistent DHGR MIX mode (GH#631)
// const uint32_t color1 = ((color0 & 0x00fcfcfc) >> 2); // 25% Blend (original)
/* */ *pLine1Address = color1 | ALPHA32_MASK;
/* */ *pLine0Address = color0;
@ -1591,8 +1591,24 @@ static void updateScreenSingleHires40Simplified (long cycles6502)
else if (g_nVideoClockHorz >= VIDEO_SCANNER_HORZ_START)
{
uint16_t addr = getVideoScannerAddressHGR();
UpdateHiResCell(g_nVideoClockHorz-VIDEO_SCANNER_HORZ_START, g_nVideoClockVert, addr, g_pVideoAddress);
g_pVideoAddress += 14;
if (!RGB_Is560Mode())
{
UpdateHiResCell(g_nVideoClockHorz-VIDEO_SCANNER_HORZ_START, g_nVideoClockVert, addr, g_pVideoAddress);
g_pVideoAddress += 14;
}
else // Color Burst is off - duplicate code from updateScreenSingleHires40() (GH#631)
{
uint8_t *pMain = MemGetMainPtr(addr);
uint8_t m = pMain[0];
uint16_t bits = g_aPixelDoubleMaskHGR[m & 0x7F]; // Optimization: hgrbits second 128 entries are mirror of first 128
if (m & 0x80)
bits = (bits << 1) | g_nLastColumnPixelNTSC;
updatePixels( bits );
if (g_nVideoClockHorz == (VIDEO_SCANNER_MAX_HORZ-1))
g_nLastColumnPixelNTSC = 0;
}
}
}
updateVideoScannerHorzEOLSimple();

View File

@ -752,7 +752,9 @@ void RGB_SetVideoMode(WORD address)
// . Video7 manual: set 80STORE, but "King's Quest 1"(*) will re-enable RGB card's MIX mode with only VF_TEXT & VF_HIRES set!
// . "Extended 80-Column Text/AppleColor Card" manual: TEXT off($C050), MIXED off($C052), HIRES on($C057)
// . (*) "King's Quest 1" - see routine at 0x5FD7 (trigger by pressing TAB twice)
if ((g_uVideoMode & (VF_MIXED|VF_HIRES)) != (VF_HIRES))
// . Apple II desktop sets DHGR B&W mode with HIRES off! (GH#631)
// Maybe there is no video-mode precondition?
if (g_uVideoMode & VF_MIXED)
{
g_rgbMode = 0;
g_rgbPrevAN3Addr = 0;