mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-13 02:29:40 +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();
|
const UINT dwClksPerFrame = NTSC_GetCyclesPerFrame();
|
||||||
if (g_dwCyclesThisFrame >= dwClksPerFrame && !VideoGetVblBar(g_dwCyclesThisFrame))
|
if (g_dwCyclesThisFrame >= dwClksPerFrame && !VideoGetVblBarEx(g_dwCyclesThisFrame))
|
||||||
{
|
{
|
||||||
g_dwCyclesThisFrame -= dwClksPerFrame;
|
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)
|
bool VideoGetVblBar(const DWORD uExecutedCycles)
|
||||||
{
|
{
|
||||||
if (g_bFullSpeed)
|
if (g_bFullSpeed)
|
||||||
{
|
{
|
||||||
// Ensure that NTSC video-scanner gets updated during full-speed:
|
// Ensure that NTSC video-scanner gets updated during full-speed, so video-dependent Apple II code doesn't hang
|
||||||
// so that video-dependent Apple II code doesn't hang & video screen can be redraw during VBL
|
|
||||||
NTSC_VideoClockResync(CpuGetCyclesThisVideoFrame(uExecutedCycles));
|
NTSC_VideoClockResync(CpuGetCyclesThisVideoFrame(uExecutedCycles));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,6 +188,7 @@ void VideoReinitialize (bool bInitVideoScannerAddress = true);
|
||||||
void VideoResetState ();
|
void VideoResetState ();
|
||||||
enum VideoScanner_e {VS_FullAddr, VS_PartialAddrV, VS_PartialAddrH};
|
enum VideoScanner_e {VS_FullAddr, VS_PartialAddrV, VS_PartialAddrH};
|
||||||
WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr = VS_FullAddr);
|
WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr = VS_FullAddr);
|
||||||
|
bool VideoGetVblBarEx(const DWORD dwCyclesThisFrame);
|
||||||
bool VideoGetVblBar(const DWORD uExecutedCycles);
|
bool VideoGetVblBar(const DWORD uExecutedCycles);
|
||||||
|
|
||||||
bool VideoGetSW80COL(void);
|
bool VideoGetSW80COL(void);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user