mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-04 02:30:53 +00:00
Full-speed: new VideoGetVblBarEx() required when called from main loop
This commit is contained in:
parent
8aff6addff
commit
97e73c632d
@ -357,7 +357,7 @@ static void ContinueExecution(void)
|
||||
//
|
||||
|
||||
const UINT dwClksPerFrame = NTSC_GetCyclesPerFrame();
|
||||
if (g_dwCyclesThisFrame >= dwClksPerFrame && !VideoGetVblBar(g_dwCyclesThisFrame))
|
||||
if (g_dwCyclesThisFrame >= dwClksPerFrame && !VideoGetVblBarEx(g_dwCyclesThisFrame))
|
||||
{
|
||||
g_dwCyclesThisFrame -= dwClksPerFrame;
|
||||
|
||||
|
@ -873,12 +873,24 @@ WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr /*= V
|
||||
|
||||
//===========================================================================
|
||||
|
||||
// Called when *outside* of CpuExecute()
|
||||
bool VideoGetVblBarEx(const DWORD dwCyclesThisFrame)
|
||||
{
|
||||
if (g_bFullSpeed)
|
||||
{
|
||||
// Ensure that NTSC video-scanner gets updated during full-speed, so video screen can be redrawn during Apple II VBL
|
||||
NTSC_VideoClockResync(dwCyclesThisFrame);
|
||||
}
|
||||
|
||||
return g_nVideoClockVert < kVDisplayableScanLines;
|
||||
}
|
||||
|
||||
// Called when *inside* CpuExecute()
|
||||
bool VideoGetVblBar(const DWORD uExecutedCycles)
|
||||
{
|
||||
if (g_bFullSpeed)
|
||||
{
|
||||
// Ensure that NTSC video-scanner gets updated during full-speed:
|
||||
// so that video-dependent Apple II code doesn't hang & video screen can be redraw during VBL
|
||||
// Ensure that NTSC video-scanner gets updated during full-speed, so video-dependent Apple II code doesn't hang
|
||||
NTSC_VideoClockResync(CpuGetCyclesThisVideoFrame(uExecutedCycles));
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,7 @@ 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);
|
||||
bool VideoGetVblBarEx(const DWORD dwCyclesThisFrame);
|
||||
bool VideoGetVblBar(const DWORD uExecutedCycles);
|
||||
|
||||
bool VideoGetSW80COL(void);
|
||||
|
Loading…
Reference in New Issue
Block a user