mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-23 00:30:17 +00:00
VBlank tweaks:
. Removed NTSC_VideoVbl(), since it's not accurate during full-speed. (Nothing was using it) . Renamed VideoGetVbl() to VideoGetVblBar() . Correctly pass Vbl (not VblBar) to Mouse's SetVBlank()
This commit is contained in:
parent
002af587d4
commit
8447a22942
@ -444,7 +444,7 @@ static __forceinline void CheckInterruptSources(ULONG uExecutedCycles)
|
||||
if (g_nIrqCheckTimeout < 0)
|
||||
{
|
||||
MB_UpdateCycles(uExecutedCycles);
|
||||
sg_Mouse.SetVBlank(VideoGetVbl(uExecutedCycles));
|
||||
sg_Mouse.SetVBlank( !VideoGetVblBar(uExecutedCycles) );
|
||||
g_nIrqCheckTimeout = IRQ_CHECK_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
@ -1751,10 +1751,12 @@ void NTSC_VideoInitChroma()
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
bool NTSC_VideoIsVbl ()
|
||||
{
|
||||
return (g_nVideoClockVert >= VIDEO_SCANNER_Y_DISPLAY) && (g_nVideoClockVert < VIDEO_SCANNER_MAX_VERT);
|
||||
}
|
||||
|
||||
// NB. NTSC video-scanner doesn't get updated during full-speed, so video-dependent code can hang
|
||||
//bool NTSC_VideoIsVbl ()
|
||||
//{
|
||||
// return (g_nVideoClockVert >= VIDEO_SCANNER_Y_DISPLAY) && (g_nVideoClockVert < VIDEO_SCANNER_MAX_VERT);
|
||||
//}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame );
|
||||
extern void NTSC_VideoInitAppleType();
|
||||
extern void NTSC_VideoInitChroma();
|
||||
extern bool NTSC_VideoIsVbl();
|
||||
extern void NTSC_VideoUpdateCycles( long cycles6502 );
|
||||
extern void NTSC_VideoRedrawWholeScreen( void );
|
||||
extern bool NTSC_GetColorBurst( void );
|
||||
|
@ -883,10 +883,10 @@ BYTE VideoCheckMode (WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles)
|
||||
|
||||
BYTE VideoCheckVbl ( ULONG uExecutedCycles )
|
||||
{
|
||||
bool bVblBar = VideoGetVbl(uExecutedCycles);
|
||||
bool bVblBar = VideoGetVblBar(uExecutedCycles);
|
||||
// NTSC: It is tempting to replace with
|
||||
// bool bVblBar = NTSC_VideoIsVbl();
|
||||
// But this breaks "ANSI STORY" intro center fade
|
||||
// bool bVblBar = !NTSC_VideoIsVbl();
|
||||
// But during full-speed, the NTSC video-scanner is not updated, so video-dependent code can hang
|
||||
|
||||
BYTE r = KeybGetKeycode();
|
||||
return (r & ~0x80) | (bVblBar ? 0x80 : 0);
|
||||
@ -1550,7 +1550,7 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
|
||||
//===========================================================================
|
||||
|
||||
// Derived from VideoGetScannerAddress()
|
||||
bool VideoGetVbl(const DWORD uExecutedCycles)
|
||||
bool VideoGetVblBar(const DWORD uExecutedCycles)
|
||||
{
|
||||
// get video scanner position
|
||||
//
|
||||
|
@ -176,7 +176,7 @@ void VideoRefreshScreen (uint32_t uRedrawWholeScreenVideoMode = 0, bool bRedr
|
||||
void VideoReinitialize ();
|
||||
void VideoResetState ();
|
||||
WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles);
|
||||
bool VideoGetVbl(DWORD uExecutedCycles);
|
||||
bool VideoGetVblBar(DWORD uExecutedCycles);
|
||||
|
||||
bool VideoGetSW80COL(void);
|
||||
bool VideoGetSWDHIRES(void);
|
||||
|
Loading…
Reference in New Issue
Block a user