mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
Fix broken MIXED mode, fix Debugger view output, change main loop to call VideoRefresh()
This commit is contained in:
parent
1087f738d5
commit
75c5cc8151
@ -230,7 +230,9 @@ void ContinueExecution(void)
|
||||
if (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();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
DWORD extbench = 0;
|
||||
bool g_bDebuggerViewingAppleOutput = false;
|
||||
int g_bDebuggerViewingAppleOutput = false; // NOTE: alias for bVideoModeFlags!
|
||||
|
||||
bool g_bIgnoreNextKey = false;
|
||||
|
||||
@ -6096,9 +6096,12 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#if _DEBUG
|
||||
if(!bVideoModeFlags)
|
||||
MessageBoxA( NULL, "bVideoModeFlags = ZERO !?", "Information", MB_OK );
|
||||
#endif
|
||||
g_bDebuggerViewingAppleOutput = bVideoModeFlags;
|
||||
VideoRefreshScreen( bVideoModeFlags );
|
||||
g_bDebuggerViewingAppleOutput = true;
|
||||
return UPDATE_NOTHING; // intentional
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
extern int g_aDisasmTargets[ MAX_DISPLAY_LINES ];
|
||||
|
||||
// Display
|
||||
extern bool g_bDebuggerViewingAppleOutput;
|
||||
extern int g_bDebuggerViewingAppleOutput;
|
||||
|
||||
// Font
|
||||
extern int g_nFontHeight;
|
||||
|
@ -565,6 +565,7 @@ static void DrawFrameWindow ()
|
||||
else
|
||||
// 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)
|
||||
//VideoRefreshScreen(0);
|
||||
VideoRedrawScreen();
|
||||
|
||||
// DD Full-Screen Palette: BUGFIX: needs to come _after_ all drawing...
|
||||
@ -1173,8 +1174,8 @@ LRESULT CALLBACK FrameWndProc (
|
||||
VideoReinitialize();
|
||||
if ((g_nAppMode != MODE_LOGO) || ((g_nAppMode == MODE_DEBUG) && (g_bDebuggerViewingAppleOutput)))
|
||||
{
|
||||
VideoRedrawScreen();
|
||||
g_bDebuggerViewingAppleOutput = true;
|
||||
//VideoRedrawScreen();
|
||||
VideoRefreshScreen( g_bDebuggerViewingAppleOutput );
|
||||
}
|
||||
|
||||
Config_Save_Video();
|
||||
|
@ -1196,7 +1196,8 @@ void VideoRealizePalette(HDC dc)
|
||||
void VideoRedrawScreen ()
|
||||
{
|
||||
g_VideoForceFullRedraw = 1;
|
||||
VideoRefreshScreen( g_uVideoMode );
|
||||
|
||||
VideoRefreshScreen( g_uVideoMode ); //g_uVideoMode );
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -1246,8 +1247,11 @@ void VideoRefreshScreen ( int bVideoModeFlags )
|
||||
DebugRefresh(0);
|
||||
#endif
|
||||
|
||||
NTSC_SetVideoMode( bVideoModeFlags );
|
||||
g_pNTSC_FuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
if( bVideoModeFlags )
|
||||
{
|
||||
NTSC_SetVideoMode( bVideoModeFlags );
|
||||
g_pNTSC_FuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
}
|
||||
|
||||
// NTSC_BEGIN: wsVideoRefresh()
|
||||
LPBYTE pDstFrameBufferBits = 0;
|
||||
@ -1256,8 +1260,14 @@ void VideoRefreshScreen ( int bVideoModeFlags )
|
||||
|
||||
if (hFrameDC)
|
||||
{
|
||||
// StretchBlt(hFrameDC,0,0,VIEWPORTCX,VIEWPORTCY,g_hDeviceDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,SRCCOPY);
|
||||
StretchBlt(hFrameDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,g_hDeviceDC,0,0,FRAMEBUFFER_W,FRAMEBUFFER_H,SRCCOPY);
|
||||
StretchBlt(
|
||||
hFrameDC,
|
||||
0,0,
|
||||
FRAMEBUFFER_W,FRAMEBUFFER_H,
|
||||
g_hDeviceDC,
|
||||
0,0,
|
||||
FRAMEBUFFER_W,FRAMEBUFFER_H,
|
||||
SRCCOPY );
|
||||
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"
|
||||
//
|
||||
// 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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user