mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-29 08:30:04 +00:00
Debug logging: add log message for time from boot until first key read (for AZTEC.DSK).
+ Remove an unused var.
This commit is contained in:
parent
f2316604ad
commit
31ba57b7c7
@ -111,6 +111,38 @@ CSpeech g_Speech;
|
||||
|
||||
//===========================================================================
|
||||
|
||||
static DWORD dwLogKeyReadTickStart;
|
||||
static bool bLogKeyReadDone = false;
|
||||
|
||||
void LogFileTimeUntilFirstKeyReadReset(void)
|
||||
{
|
||||
if (!g_fh)
|
||||
return;
|
||||
|
||||
dwLogKeyReadTickStart = GetTickCount();
|
||||
|
||||
bLogKeyReadDone = false;
|
||||
}
|
||||
|
||||
// Log the time from emulation restart/reboot until the first key read: BIT $C000
|
||||
// . NB. AZTEC.DSK does prior LDY $C000 reads, but the BIT $C000 is at the "Press any key" message
|
||||
void LogFileTimeUntilFirstKeyRead(void)
|
||||
{
|
||||
if (!g_fh || bLogKeyReadDone)
|
||||
return;
|
||||
|
||||
if (mem[regs.pc-3] != 0x2C) // bit $c0000
|
||||
return;
|
||||
|
||||
DWORD dwTime = GetTickCount() - dwLogKeyReadTickStart;
|
||||
|
||||
LogFileOutput("Time from emulation reboot until first $C000 access: %d msec\n", dwTime);
|
||||
|
||||
bLogKeyReadDone = true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
eApple2Type GetApple2Type(void)
|
||||
{
|
||||
return g_Apple2Type;
|
||||
@ -1152,6 +1184,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
||||
|
||||
// ENTER THE MAIN MESSAGE LOOP
|
||||
LogFileOutput("Main: EnterMessageLoop()\n");
|
||||
LogFileTimeUntilFirstKeyReadReset();
|
||||
EnterMessageLoop();
|
||||
LogFileOutput("Main: LeaveMessageLoop()\n");
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
#include "SaveState_Structs_common.h"
|
||||
#include "Common.h"
|
||||
|
||||
void LogFileTimeUntilFirstKeyReadReset(void);
|
||||
void LogFileTimeUntilFirstKeyRead(void);
|
||||
|
||||
void SetCurrentCLK6502();
|
||||
bool SetCurrentImageDir(const char* pszImageDir);
|
||||
void SetCharsetType(void);
|
||||
|
@ -2061,6 +2061,7 @@ void ResetMachineState ()
|
||||
#endif
|
||||
|
||||
SoundCore_SetFade(FADE_NONE);
|
||||
LogFileTimeUntilFirstKeyReadReset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -418,6 +418,8 @@ static char ClipboardCurrChar(bool bIncPtr)
|
||||
|
||||
BYTE __stdcall KeybReadData (WORD, WORD, BYTE, BYTE, ULONG)
|
||||
{
|
||||
LogFileTimeUntilFirstKeyRead();
|
||||
|
||||
if(g_bPasteFromClipboard)
|
||||
ClipboardInit();
|
||||
|
||||
|
@ -242,7 +242,6 @@ static HPALETTE g_hPalette;
|
||||
|
||||
static HBITMAP g_hSourceBitmap;
|
||||
static LPBYTE g_pSourcePixels;
|
||||
static LPBITMAPINFO g_pSourceHeader;
|
||||
const int MAX_SOURCE_Y = 512;
|
||||
static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
|
||||
static LPBYTE g_pTextBank1; // Aux
|
||||
@ -920,10 +919,8 @@ void VideoDestroy () {
|
||||
|
||||
// DESTROY BUFFERS
|
||||
VirtualFree(g_pFramebufferinfo,0,MEM_RELEASE);
|
||||
VirtualFree(g_pSourceHeader ,0,MEM_RELEASE);
|
||||
VirtualFree(vidlastmem ,0,MEM_RELEASE);
|
||||
g_pFramebufferinfo = NULL;
|
||||
g_pSourceHeader = NULL;
|
||||
vidlastmem = NULL;
|
||||
|
||||
// DESTROY FRAME BUFFER
|
||||
|
Loading…
Reference in New Issue
Block a user