mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-08-15 18:27:29 +00:00
Fix broken MIXED mode, fix Debugger view output, change main loop to call VideoRefresh()
This commit is contained in:
@@ -230,7 +230,9 @@ void ContinueExecution(void)
|
|||||||
if (g_dwCyclesThisFrame >= dwClksPerFrame)
|
if (g_dwCyclesThisFrame >= dwClksPerFrame)
|
||||||
{
|
{
|
||||||
g_dwCyclesThisFrame -= dwClksPerFrame;
|
g_dwCyclesThisFrame -= dwClksPerFrame;
|
||||||
VideoEndOfVideoFrame(); // NTSC currently requires this ... need to investigate why
|
|
||||||
|
// VideoEndOfVideoFrame(); // NTSC_TODO: is this still required? updates flash: if ((SW_TEXT || SW_MIXED) ) g_bTextFlashFlag = true
|
||||||
|
VideoRefreshScreen(0); // Just copy the output of our Apple framebuffer to the system Back Buffer
|
||||||
MB_EndOfVideoFrame();
|
MB_EndOfVideoFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -310,7 +310,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
bool g_bTraceHeader = false; // semaphore, flag header to be printed
|
bool g_bTraceHeader = false; // semaphore, flag header to be printed
|
||||||
|
|
||||||
DWORD extbench = 0;
|
DWORD extbench = 0;
|
||||||
bool g_bDebuggerViewingAppleOutput = false;
|
int g_bDebuggerViewingAppleOutput = false; // NOTE: alias for bVideoModeFlags!
|
||||||
|
|
||||||
bool g_bIgnoreNextKey = false;
|
bool g_bIgnoreNextKey = false;
|
||||||
|
|
||||||
@@ -6096,9 +6096,12 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if _DEBUG
|
||||||
|
if(!bVideoModeFlags)
|
||||||
|
MessageBoxA( NULL, "bVideoModeFlags = ZERO !?", "Information", MB_OK );
|
||||||
|
#endif
|
||||||
|
g_bDebuggerViewingAppleOutput = bVideoModeFlags;
|
||||||
VideoRefreshScreen( bVideoModeFlags );
|
VideoRefreshScreen( bVideoModeFlags );
|
||||||
g_bDebuggerViewingAppleOutput = true;
|
|
||||||
return UPDATE_NOTHING; // intentional
|
return UPDATE_NOTHING; // intentional
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -105,7 +105,7 @@
|
|||||||
extern int g_aDisasmTargets[ MAX_DISPLAY_LINES ];
|
extern int g_aDisasmTargets[ MAX_DISPLAY_LINES ];
|
||||||
|
|
||||||
// Display
|
// Display
|
||||||
extern bool g_bDebuggerViewingAppleOutput;
|
extern int g_bDebuggerViewingAppleOutput;
|
||||||
|
|
||||||
// Font
|
// Font
|
||||||
extern int g_nFontHeight;
|
extern int g_nFontHeight;
|
||||||
|
@@ -565,6 +565,7 @@ static void DrawFrameWindow ()
|
|||||||
else
|
else
|
||||||
// Win7: In fullscreen mode with 1 redraw, the the screen doesn't get redraw.
|
// Win7: In fullscreen mode with 1 redraw, the the screen doesn't get redraw.
|
||||||
//VideoRedrawScreen(g_bIsFullScreen ? 2 : 1); // TC: 22/06/2014: Why 2 redraws in full-screen mode (32-bit only)? (8-bit doesn't need this nor does Win8, just Win7 or older OS's)
|
//VideoRedrawScreen(g_bIsFullScreen ? 2 : 1); // TC: 22/06/2014: Why 2 redraws in full-screen mode (32-bit only)? (8-bit doesn't need this nor does Win8, just Win7 or older OS's)
|
||||||
|
//VideoRefreshScreen(0);
|
||||||
VideoRedrawScreen();
|
VideoRedrawScreen();
|
||||||
|
|
||||||
// DD Full-Screen Palette: BUGFIX: needs to come _after_ all drawing...
|
// DD Full-Screen Palette: BUGFIX: needs to come _after_ all drawing...
|
||||||
@@ -1173,8 +1174,8 @@ LRESULT CALLBACK FrameWndProc (
|
|||||||
VideoReinitialize();
|
VideoReinitialize();
|
||||||
if ((g_nAppMode != MODE_LOGO) || ((g_nAppMode == MODE_DEBUG) && (g_bDebuggerViewingAppleOutput)))
|
if ((g_nAppMode != MODE_LOGO) || ((g_nAppMode == MODE_DEBUG) && (g_bDebuggerViewingAppleOutput)))
|
||||||
{
|
{
|
||||||
VideoRedrawScreen();
|
//VideoRedrawScreen();
|
||||||
g_bDebuggerViewingAppleOutput = true;
|
VideoRefreshScreen( g_bDebuggerViewingAppleOutput );
|
||||||
}
|
}
|
||||||
|
|
||||||
Config_Save_Video();
|
Config_Save_Video();
|
||||||
|
@@ -1196,7 +1196,8 @@ void VideoRealizePalette(HDC dc)
|
|||||||
void VideoRedrawScreen ()
|
void VideoRedrawScreen ()
|
||||||
{
|
{
|
||||||
g_VideoForceFullRedraw = 1;
|
g_VideoForceFullRedraw = 1;
|
||||||
VideoRefreshScreen( g_uVideoMode );
|
|
||||||
|
VideoRefreshScreen( g_uVideoMode ); //g_uVideoMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@@ -1246,8 +1247,11 @@ void VideoRefreshScreen ( int bVideoModeFlags )
|
|||||||
DebugRefresh(0);
|
DebugRefresh(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NTSC_SetVideoMode( bVideoModeFlags );
|
if( bVideoModeFlags )
|
||||||
g_pNTSC_FuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
{
|
||||||
|
NTSC_SetVideoMode( bVideoModeFlags );
|
||||||
|
g_pNTSC_FuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||||
|
}
|
||||||
|
|
||||||
// NTSC_BEGIN: wsVideoRefresh()
|
// NTSC_BEGIN: wsVideoRefresh()
|
||||||
LPBYTE pDstFrameBufferBits = 0;
|
LPBYTE pDstFrameBufferBits = 0;
|
||||||
@@ -1256,8 +1260,14 @@ void VideoRefreshScreen ( int bVideoModeFlags )
|
|||||||
|
|
||||||
if (hFrameDC)
|
if (hFrameDC)
|
||||||
{
|
{
|
||||||
// StretchBlt(hFrameDC,0,0,VIEWPORTCX,VIEWPORTCY,g_hDeviceDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,SRCCOPY);
|
StretchBlt(
|
||||||
StretchBlt(hFrameDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,g_hDeviceDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,SRCCOPY);
|
hFrameDC,
|
||||||
|
0,0,
|
||||||
|
FRAMEBUFFER_W,FRAMEBUFFER_H,
|
||||||
|
g_hDeviceDC,
|
||||||
|
0,0,
|
||||||
|
FRAMEBUFFER_W,FRAMEBUFFER_H,
|
||||||
|
SRCCOPY );
|
||||||
GdiFlush();
|
GdiFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1335,7 +1345,7 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||||||
// NB. Deferring the update by just setting /g_VideoForceFullRedraw/ is not an option, since this doesn't provide "flip-immediate"
|
// NB. Deferring the update by just setting /g_VideoForceFullRedraw/ is not an option, since this doesn't provide "flip-immediate"
|
||||||
//
|
//
|
||||||
// Ultimately this isn't the correct solution, and proper cycle-accurate video rendering should be done, but this is a much bigger job!
|
// Ultimately this isn't the correct solution, and proper cycle-accurate video rendering should be done, but this is a much bigger job!
|
||||||
//
|
// TODO: Is MemReadFloatingBus() still accurate now that we have proper per cycle video rendering??
|
||||||
|
|
||||||
if (!g_bVideoUpdatedThisFrame)
|
if (!g_bVideoUpdatedThisFrame)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user