diff --git a/source/Frame.cpp b/source/Frame.cpp index 3c1fb299..b3328c28 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -1295,7 +1295,8 @@ LRESULT CALLBACK FrameWndProc ( // TODO: Clean up code:FrameRefreshStatus(DRAW_TITLE) DrawStatusArea((HDC)0,DRAW_TITLE) DrawStatusArea( (HDC)0, DRAW_TITLE ); - VideoReinitialize(); + VideoReinitialize(false); + if (g_nAppMode != MODE_LOGO) { if (g_nAppMode == MODE_DEBUG) diff --git a/source/NTSC.cpp b/source/NTSC.cpp index e1373a33..ea3f70b2 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -2120,14 +2120,15 @@ void NTSC_VideoInit( uint8_t* pFramebuffer ) // wsVideoInit } //=========================================================================== -void NTSC_VideoReinitialize( DWORD cyclesThisFrame ) +void NTSC_VideoReinitialize( DWORD cyclesThisFrame, bool bInitVideoScannerAddress ) { _ASSERT(cyclesThisFrame < VIDEO_SCANNER_6502_CYCLES); if (cyclesThisFrame >= VIDEO_SCANNER_6502_CYCLES) cyclesThisFrame = 0; // error g_nVideoClockVert = (uint16_t) (cyclesThisFrame / VIDEO_SCANNER_MAX_HORZ); g_nVideoClockHorz = cyclesThisFrame % VIDEO_SCANNER_MAX_HORZ; - updateVideoScannerAddress(); // Pre-condition: g_nVideoClockVert + if (bInitVideoScannerAddress) // GH#611 + updateVideoScannerAddress(); // Pre-condition: g_nVideoClockVert } //=========================================================================== diff --git a/source/NTSC.h b/source/NTSC.h index d81f283b..23ce6dc2 100644 --- a/source/NTSC.h +++ b/source/NTSC.h @@ -11,7 +11,7 @@ extern void NTSC_VideoClockResync( const DWORD dwCyclesThisFrame ); extern uint16_t NTSC_VideoGetScannerAddress( const ULONG uExecutedCycles ); extern void NTSC_VideoInit( uint8_t *pFramebuffer ); - extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame ); + extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame, bool bInitVideoScannerAddress ); extern void NTSC_VideoInitAppleType(); extern void NTSC_VideoInitChroma(); extern void NTSC_VideoUpdateCycles( long cycles6502 ); diff --git a/source/Video.cpp b/source/Video.cpp index 96242e32..6185f131 100644 --- a/source/Video.cpp +++ b/source/Video.cpp @@ -625,9 +625,9 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe } //=========================================================================== -void VideoReinitialize () +void VideoReinitialize (bool bInitVideoScannerAddress /*= true*/) { - NTSC_VideoReinitialize( g_dwCyclesThisFrame ); + NTSC_VideoReinitialize( g_dwCyclesThisFrame, bInitVideoScannerAddress ); NTSC_VideoInitAppleType(); NTSC_SetVideoStyle(); NTSC_SetVideoTextMode( g_uVideoMode & VF_80COL ? 80 : 40 ); diff --git a/source/Video.h b/source/Video.h index 4c1d9ad0..69888c14 100644 --- a/source/Video.h +++ b/source/Video.h @@ -177,7 +177,7 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit = f void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame); void VideoRedrawScreen (void); void VideoRefreshScreen (uint32_t uRedrawWholeScreenVideoMode = 0, bool bRedrawWholeScreen = false); -void VideoReinitialize (); +void VideoReinitialize (bool bInitVideoScannerAddress = true); void VideoResetState (); enum VideoScanner_e {VS_FullAddr, VS_PartialAddrV, VS_PartialAddrH}; WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr = VS_FullAddr);