mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-09 20:34:50 +00:00
Fix the discontinuous whole screen redraw bug in full-speed mode (#405)
This commit is contained in:
parent
d9669fa45b
commit
d11f0a222d
@ -1470,8 +1470,6 @@ void NTSC_SetVideoTextMode( int cols )
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
void NTSC_SetVideoMode( uint32_t uVideoModeFlags )
|
void NTSC_SetVideoMode( uint32_t uVideoModeFlags )
|
||||||
{
|
{
|
||||||
int h = g_nVideoClockHorz;
|
|
||||||
|
|
||||||
g_nVideoMixed = uVideoModeFlags & VF_MIXED;
|
g_nVideoMixed = uVideoModeFlags & VF_MIXED;
|
||||||
g_nVideoCharSet = VideoGetSWAltCharSet() ? 1 : 0;
|
g_nVideoCharSet = VideoGetSWAltCharSet() ? 1 : 0;
|
||||||
|
|
||||||
@ -1781,8 +1779,17 @@ void NTSC_VideoRedrawWholeScreen( void )
|
|||||||
const uint16_t currVideoClockHorz = g_nVideoClockHorz;
|
const uint16_t currVideoClockHorz = g_nVideoClockHorz;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// (GH#405) For full-speed: whole screen updates will occur periodically
|
||||||
|
// . The V/H pos will have been recalc'ed, so won't be continuous from previous (whole screen) update
|
||||||
|
// . So the redraw must start at H-pos=0 & with the usual reinit for the start of a new line
|
||||||
|
const uint16_t horz = g_nVideoClockHorz;
|
||||||
|
g_nVideoClockHorz = 0;
|
||||||
|
updateVideoScannerAddress();
|
||||||
|
|
||||||
VideoUpdateCycles(VIDEO_SCANNER_6502_CYCLES);
|
VideoUpdateCycles(VIDEO_SCANNER_6502_CYCLES);
|
||||||
|
|
||||||
|
VideoUpdateCycles(horz); // Finally update to get to correct H-pos
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
_ASSERT(currVideoClockVert == g_nVideoClockVert);
|
_ASSERT(currVideoClockVert == g_nVideoClockVert);
|
||||||
_ASSERT(currVideoClockHorz == g_nVideoClockHorz);
|
_ASSERT(currVideoClockHorz == g_nVideoClockHorz);
|
||||||
|
@ -983,21 +983,15 @@ void VideoDisplayLogo ()
|
|||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
// AZTEC.DSK: From boot to 'Press any key' (Release build)
|
|
||||||
// . 66s always update every frame
|
|
||||||
// . 15s only update if any video memory (main/aux, text/hgr, pages1&2) has changed
|
|
||||||
// . 10s only update if HIRES changes (17s for Debug build)
|
|
||||||
// . ~9s no update during full-speed (but IBIZA.DSK doesn't show anything!)
|
|
||||||
|
|
||||||
void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=false*/)
|
void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=false*/)
|
||||||
{
|
{
|
||||||
static DWORD dwFullSpeedStartTime = 0;
|
static DWORD dwFullSpeedStartTime = 0;
|
||||||
static bool bValid = false;
|
// static bool bValid = false;
|
||||||
|
|
||||||
if (bInit)
|
if (bInit)
|
||||||
{
|
{
|
||||||
// Just entered full-speed mode
|
// Just entered full-speed mode
|
||||||
bValid = false;
|
// bValid = false;
|
||||||
dwFullSpeedStartTime = GetTickCount();
|
dwFullSpeedStartTime = GetTickCount();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1010,6 +1004,7 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=fal
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if 0
|
||||||
static BYTE text_main[1024*2] = {0}; // page1 & 2
|
static BYTE text_main[1024*2] = {0}; // page1 & 2
|
||||||
static BYTE text_aux[1024*2] = {0}; // page1 & 2
|
static BYTE text_aux[1024*2] = {0}; // page1 & 2
|
||||||
static BYTE hgr_main[8192*2] = {0}; // page1 & 2
|
static BYTE hgr_main[8192*2] = {0}; // page1 & 2
|
||||||
@ -1047,6 +1042,9 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=fal
|
|||||||
memcpy(hgr_aux, MemGetAuxPtr(0x2000), sizeof(hgr_aux));
|
memcpy(hgr_aux, MemGetAuxPtr(0x2000), sizeof(hgr_aux));
|
||||||
|
|
||||||
bValid = true;
|
bValid = true;
|
||||||
|
#else
|
||||||
|
VideoRedrawScreenAfterFullSpeed(dwCyclesThisFrame);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user