diff --git a/AppleWinExpress2017.vcxproj b/AppleWinExpress2017.vcxproj
index 67520468..b5764e34 100644
--- a/AppleWinExpress2017.vcxproj
+++ b/AppleWinExpress2017.vcxproj
@@ -62,6 +62,7 @@
+
@@ -96,6 +97,7 @@
+
@@ -138,6 +140,7 @@
+
@@ -184,6 +187,7 @@
Create
Create
+
NotUsing
diff --git a/AppleWinExpress2017.vcxproj.filters b/AppleWinExpress2017.vcxproj.filters
index d215c377..2c67ba18 100644
--- a/AppleWinExpress2017.vcxproj.filters
+++ b/AppleWinExpress2017.vcxproj.filters
@@ -199,6 +199,12 @@
Source Files\Emulator
+
+ Source Files\Emulator
+
+
+ Source Files\Emulator
+
@@ -483,6 +489,12 @@
Source Files\Emulator
+
+ Source Files\Emulator
+
+
+ Source Files\Emulator
+
diff --git a/AppleWinExpress2019.vcxproj b/AppleWinExpress2019.vcxproj
index d078c268..6a7e917f 100644
--- a/AppleWinExpress2019.vcxproj
+++ b/AppleWinExpress2019.vcxproj
@@ -62,6 +62,7 @@
+
@@ -139,6 +140,7 @@
+
diff --git a/AppleWinExpress2019.vcxproj.filters b/AppleWinExpress2019.vcxproj.filters
index 8dc47688..ba7db783 100644
--- a/AppleWinExpress2019.vcxproj.filters
+++ b/AppleWinExpress2019.vcxproj.filters
@@ -202,6 +202,9 @@
Source Files\Emulator
+
+ Source Files\Emulator
+
@@ -489,6 +492,9 @@
Source Files\Emulator
+
+ Source Files\Emulator
+
diff --git a/source/DirectInput.cpp b/source/DirectInput.cpp
new file mode 100644
index 00000000..f026e87e
--- /dev/null
+++ b/source/DirectInput.cpp
@@ -0,0 +1,257 @@
+/*
+AppleWin : An Apple //e emulator for Windows
+
+Copyright (C) 1994-1996, Michael O'Brien
+Copyright (C) 1999-2001, Oliver Schmidt
+Copyright (C) 2002-2005, Tom Charlesworth
+Copyright (C) 2006-2010, Tom Charlesworth, Michael Pohoreski
+
+AppleWin is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+AppleWin is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with AppleWin; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+/* Description: Disk Image
+ *
+ * Author: Various
+ */
+
+#include "StdAfx.h"
+
+//=============================================================================
+// DirectInput interface
+//=============================================================================
+
+//#define STRICT
+#define DIRECTINPUT_VERSION 0x0800
+
+#include "SoundCore.h" // SAFE_RELEASE()
+#include "Log.h"
+#include "DirectInput.h"
+#include "Common.h"
+#include
+
+extern bool g_bDisableDirectInput; // currently in AppleWin.h
+
+namespace DIMouse
+{
+
+ static LPDIRECTINPUT8 g_pDI = NULL;
+ static LPDIRECTINPUTDEVICE8 g_pMouse = NULL;
+ #define SAMPLE_BUFFER_SIZE 16 // arbitrary number of buffer elements
+
+ static UINT_PTR g_TimerIDEvent = 0;
+
+ //-----------------------------------------------------------------------------
+ // Name: OnCreateDevice()
+ // Desc: Sets up the mouse device using the flags from the dialog.
+ //-----------------------------------------------------------------------------
+ HRESULT DirectInputInit( HWND hDlg )
+ {
+ LogFileOutput("DirectInputInit: g_bDisableDirectInput=%d\n", g_bDisableDirectInput);
+ if (g_bDisableDirectInput)
+ return S_OK;
+
+#ifdef NO_DIRECT_X
+
+ return E_FAIL;
+
+#else // NO_DIRECT_X
+
+ HRESULT hr;
+ BOOL bExclusive;
+ BOOL bForeground;
+ BOOL bImmediate;
+ DWORD dwCoopFlags;
+
+ DirectInputUninit(hDlg);
+ LogFileOutput("DirectInputInit: DirectInputUninit()\n");
+
+ // Determine where the buffer would like to be allocated
+ bExclusive = FALSE;
+ bForeground = FALSE; // Otherwise get DIERR_OTHERAPPHASPRIO (== E_ACCESSDENIED) on Acquire()
+ bImmediate = TRUE;
+
+ if( bExclusive )
+ dwCoopFlags = DISCL_EXCLUSIVE;
+ else
+ dwCoopFlags = DISCL_NONEXCLUSIVE;
+
+ if( bForeground )
+ dwCoopFlags |= DISCL_FOREGROUND;
+ else
+ dwCoopFlags |= DISCL_BACKGROUND;
+
+ // Create a DInput object
+ hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&g_pDI, NULL );
+ LogFileOutput("DirectInputInit: DirectInput8Create(), hr=0x%08X\n", hr);
+ if (FAILED(hr))
+ return hr;
+
+ // Obtain an interface to the system mouse device.
+ hr = g_pDI->CreateDevice( GUID_SysMouse, &g_pMouse, NULL );
+ LogFileOutput("DirectInputInit: CreateDevice(), hr=0x%08X\n", hr);
+ if (FAILED(hr))
+ return hr;
+
+ // Set the data format to "mouse format" - a predefined data format
+ //
+ // A data format specifies which controls on a device we
+ // are interested in, and how they should be reported.
+ //
+ // This tells DirectInput that we will be passing a
+ // DIMOUSESTATE2 structure to IDirectInputDevice::GetDeviceState.
+ hr = g_pMouse->SetDataFormat( &c_dfDIMouse2 );
+ LogFileOutput("DirectInputInit: SetDataFormat(), hr=0x%08X\n", hr);
+ if (FAILED(hr))
+ return hr;
+
+ // Set the cooperativity level to let DirectInput know how
+ // this device should interact with the system and with other
+ // DirectInput applications.
+ hr = g_pMouse->SetCooperativeLevel( hDlg, dwCoopFlags );
+ LogFileOutput("DirectInputInit: SetCooperativeLevel(), hr=0x%08X\n", hr);
+ if( hr == DIERR_UNSUPPORTED && !bForeground && bExclusive )
+ {
+ DirectInputUninit(hDlg);
+ LogFileOutput("DirectInputInit: DirectInputUninit()n");
+ //MessageBox( hDlg, _T("SetCooperativeLevel() returned DIERR_UNSUPPORTED.\n")
+ // _T("For security reasons, background exclusive mouse\n")
+ // _T("access is not allowed."),
+ // _T("Mouse"), MB_OK );
+ return S_OK;
+ }
+
+ if( FAILED(hr) )
+ return hr;
+
+ if( !bImmediate )
+ {
+ // IMPORTANT STEP TO USE BUFFERED DEVICE DATA!
+ //
+ // DirectInput uses unbuffered I/O (buffer size = 0) by default.
+ // If you want to read buffered data, you need to set a nonzero
+ // buffer size.
+ //
+ // Set the buffer size to SAMPLE_BUFFER_SIZE (defined above) elements.
+ //
+ // The buffer size is a DWORD property associated with the device.
+ DIPROPDWORD dipdw;
+ dipdw.diph.dwSize = sizeof(DIPROPDWORD);
+ dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dipdw.diph.dwObj = 0;
+ dipdw.diph.dwHow = DIPH_DEVICE;
+ dipdw.dwData = SAMPLE_BUFFER_SIZE; // Arbitary buffer size
+
+ hr = g_pMouse->SetProperty( DIPROP_BUFFERSIZE, &dipdw.diph );
+ LogFileOutput("DirectInputInit: SetProperty(), hr=0x%08X\n", hr);
+ if (FAILED(hr))
+ return hr;
+ }
+
+ // Acquire the newly created device
+ hr = g_pMouse->Acquire();
+ LogFileOutput("DirectInputInit: Acquire(), hr=0x%08X\n", hr);
+ if (FAILED(hr))
+ return hr;
+
+ // Setup timer to read mouse position
+ _ASSERT(g_TimerIDEvent == 0);
+ g_TimerIDEvent = SetTimer(hDlg, IDEVENT_TIMER_MOUSE, 8, NULL); // 120Hz timer
+ LogFileOutput("DirectInputInit: SetTimer(), id=0x%08X\n", g_TimerIDEvent);
+ if (g_TimerIDEvent == 0)
+ return E_FAIL;
+
+ return S_OK;
+
+#endif // NO_DIRECT_X
+ }
+
+ //-----------------------------------------------------------------------------
+ // Name: FreeDirectInput()
+ // Desc: Initialize the DirectInput variables.
+ //-----------------------------------------------------------------------------
+ void DirectInputUninit( HWND hDlg )
+ {
+ LogFileOutput("DirectInputUninit\n");
+
+ // Unacquire the device one last time just in case
+ // the app tried to exit while the device is still acquired.
+ if( g_pMouse )
+ {
+ HRESULT hr = g_pMouse->Unacquire();
+ LogFileOutput("DirectInputUninit: Unacquire(), hr=0x%08X\n", hr);
+ }
+
+ // Release any DirectInput objects.
+ SAFE_RELEASE( g_pMouse );
+ SAFE_RELEASE( g_pDI );
+
+ if (g_TimerIDEvent)
+ {
+ BOOL bRes = KillTimer(hDlg, g_TimerIDEvent);
+ LogFileOutput("DirectInputUninit: KillTimer(), res=%d\n", bRes ? 1 : 0);
+ g_TimerIDEvent = 0;
+ }
+ }
+
+ //-----------------------------------------------------------------------------
+ // Name: ReadImmediateData()
+ // Desc: Read the input device's state when in immediate mode and display it.
+ //-----------------------------------------------------------------------------
+ HRESULT ReadImmediateData( long* pX, long* pY )
+ {
+ HRESULT hr;
+ DIMOUSESTATE2 dims2; // DirectInput mouse state structure
+
+ if (pX) *pX = 0;
+ if (pY) *pY = 0;
+
+ if( NULL == g_pMouse )
+ return S_OK;
+
+ // Get the input's device state, and put the state in dims
+ ZeroMemory( &dims2, sizeof(dims2) );
+ hr = g_pMouse->GetDeviceState( sizeof(DIMOUSESTATE2), &dims2 );
+ if( FAILED(hr) )
+ {
+ // DirectInput may be telling us that the input stream has been
+ // interrupted. We aren't tracking any state between polls, so
+ // we don't have any special reset that needs to be done.
+ // We just re-acquire and try again.
+
+ // If input is lost then acquire and keep trying
+ hr = g_pMouse->Acquire();
+ while( hr == DIERR_INPUTLOST )
+ hr = g_pMouse->Acquire();
+
+ // Update the dialog text
+ if( hr == DIERR_OTHERAPPHASPRIO ||
+ hr == DIERR_NOTACQUIRED )
+ {
+ //SetDlgItemText( hDlg, IDC_DATA, TEXT("Unacquired") );
+ }
+
+ // hr may be DIERR_OTHERAPPHASPRIO or other errors. This
+ // may occur when the app is minimized or in the process of
+ // switching, so just try again later
+ return S_OK;
+ }
+
+ if (pX) *pX = dims2.lX;
+ if (pY) *pY = dims2.lY;
+
+ return S_OK;
+ }
+
+}; // namespace DIMouse
diff --git a/source/DirectInput.h b/source/DirectInput.h
new file mode 100644
index 00000000..0af19e7d
--- /dev/null
+++ b/source/DirectInput.h
@@ -0,0 +1,9 @@
+#pragma once
+
+
+namespace DIMouse
+{
+ HRESULT DirectInputInit( HWND hDlg );
+ void DirectInputUninit( HWND hDlg );
+ HRESULT ReadImmediateData( long* pX=NULL, long* pY=NULL );
+};
diff --git a/source/Disk.cpp b/source/Disk.cpp
index 11e1dfd8..762a42c4 100644
--- a/source/Disk.cpp
+++ b/source/Disk.cpp
@@ -1190,7 +1190,7 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain
drive.m_headWindow <<= 1;
drive.m_headWindow |= (n & floppy.m_bitMask) ? 1 : 0;
BYTE outputBit = (drive.m_headWindow & 0xf) ? (drive.m_headWindow >> 1) & 1
- : (rand() < ((RAND_MAX * 3) / 10)) ? 1 : 0; // ~30% chance of a 1 bit (Ref: WOZ-2.0)
+ : (rand() < RAND_THRESHOLD(3, 10)) ? 1 : 0; // ~30% chance of a 1 bit (Ref: WOZ-2.0)
IncBitStream(floppy);
diff --git a/source/DiskImage.h b/source/DiskImage.h
index c7b69449..3390527e 100644
--- a/source/DiskImage.h
+++ b/source/DiskImage.h
@@ -25,6 +25,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "DiskDefs.h"
+#ifdef _MSC_VER
+
+#define RAND_THRESHOLD(num, den) ((RAND_MAX * num) / den)
+
+#else
+
+// RAND_MAX is a massive number which overflows when (* num) is applied above
+#define RAND_THRESHOLD(num, den) ((RAND_MAX / den) * num)
+
+#endif
+
+
#define TRACK_DENIBBLIZED_SIZE (16 * 256) // #Sectors x Sector-size
#define TRACKS_STANDARD 35
diff --git a/source/DiskImageHelper.cpp b/source/DiskImageHelper.cpp
index 4ca82301..6d6bcfde 100644
--- a/source/DiskImageHelper.cpp
+++ b/source/DiskImageHelper.cpp
@@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "DiskImage.h"
#include "DiskImageHelper.h"
#include "Log.h"
+#include "Card.h"
#include "Memory.h"
ImageInfo::ImageInfo()
@@ -1089,7 +1090,7 @@ public:
BYTE n = 0;
for (UINT j = 0; j < 8; j++)
{
- if (rand() < ((RAND_MAX * 3) / 10)) // ~30% of buffer are 1 bits
+ if (rand() < RAND_THRESHOLD(3, 10)) // ~30% of buffer are 1 bits
n |= 1 << j;
}
m_pWOZEmptyTrack[i] = n;
diff --git a/source/Frame.cpp b/source/Frame.cpp
index 63db9a73..ae300ad9 100644
--- a/source/Frame.cpp
+++ b/source/Frame.cpp
@@ -41,6 +41,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
+#include "DirectInput.h"
#include "NTSC.h"
#include "ParallelPrinter.h"
#include "Pravets.h"
diff --git a/source/Memory.cpp b/source/Memory.cpp
index d0e46f08..64e9a8f2 100644
--- a/source/Memory.cpp
+++ b/source/Memory.cpp
@@ -43,6 +43,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
+#include "Video.h"
#include "NTSC.h"
#include "NoSlotClock.h"
#include "ParallelPrinter.h"
@@ -51,7 +52,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "SerialComms.h"
#include "Speaker.h"
#include "Tape.h"
-#include "Video.h"
#include "RGBMonitor.h"
#include "z80emu.h"
diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp
index f8587d4e..c5f9b330 100644
--- a/source/Mockingboard.cpp
+++ b/source/Mockingboard.cpp
@@ -2403,7 +2403,7 @@ bool MB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
for(UINT i=0; i
-
-extern bool g_bDisableDirectInput; // currently in AppleWin.h
-
-namespace DIMouse
-{
-
- static LPDIRECTINPUT8 g_pDI = NULL;
- static LPDIRECTINPUTDEVICE8 g_pMouse = NULL;
- #define SAMPLE_BUFFER_SIZE 16 // arbitrary number of buffer elements
-
- static UINT_PTR g_TimerIDEvent = 0;
-
- //-----------------------------------------------------------------------------
- // Name: OnCreateDevice()
- // Desc: Sets up the mouse device using the flags from the dialog.
- //-----------------------------------------------------------------------------
- HRESULT DirectInputInit( HWND hDlg )
- {
- LogFileOutput("DirectInputInit: g_bDisableDirectInput=%d\n", g_bDisableDirectInput);
- if (g_bDisableDirectInput)
- return S_OK;
-
-#ifdef NO_DIRECT_X
-
- return E_FAIL;
-
-#else // NO_DIRECT_X
-
- HRESULT hr;
- BOOL bExclusive;
- BOOL bForeground;
- BOOL bImmediate;
- DWORD dwCoopFlags;
-
- DirectInputUninit(hDlg);
- LogFileOutput("DirectInputInit: DirectInputUninit()\n");
-
- // Determine where the buffer would like to be allocated
- bExclusive = FALSE;
- bForeground = FALSE; // Otherwise get DIERR_OTHERAPPHASPRIO (== E_ACCESSDENIED) on Acquire()
- bImmediate = TRUE;
-
- if( bExclusive )
- dwCoopFlags = DISCL_EXCLUSIVE;
- else
- dwCoopFlags = DISCL_NONEXCLUSIVE;
-
- if( bForeground )
- dwCoopFlags |= DISCL_FOREGROUND;
- else
- dwCoopFlags |= DISCL_BACKGROUND;
-
- // Create a DInput object
- hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&g_pDI, NULL );
- LogFileOutput("DirectInputInit: DirectInput8Create(), hr=0x%08X\n", hr);
- if (FAILED(hr))
- return hr;
-
- // Obtain an interface to the system mouse device.
- hr = g_pDI->CreateDevice( GUID_SysMouse, &g_pMouse, NULL );
- LogFileOutput("DirectInputInit: CreateDevice(), hr=0x%08X\n", hr);
- if (FAILED(hr))
- return hr;
-
- // Set the data format to "mouse format" - a predefined data format
- //
- // A data format specifies which controls on a device we
- // are interested in, and how they should be reported.
- //
- // This tells DirectInput that we will be passing a
- // DIMOUSESTATE2 structure to IDirectInputDevice::GetDeviceState.
- hr = g_pMouse->SetDataFormat( &c_dfDIMouse2 );
- LogFileOutput("DirectInputInit: SetDataFormat(), hr=0x%08X\n", hr);
- if (FAILED(hr))
- return hr;
-
- // Set the cooperativity level to let DirectInput know how
- // this device should interact with the system and with other
- // DirectInput applications.
- hr = g_pMouse->SetCooperativeLevel( hDlg, dwCoopFlags );
- LogFileOutput("DirectInputInit: SetCooperativeLevel(), hr=0x%08X\n", hr);
- if( hr == DIERR_UNSUPPORTED && !bForeground && bExclusive )
- {
- DirectInputUninit(hDlg);
- LogFileOutput("DirectInputInit: DirectInputUninit()n");
- //MessageBox( hDlg, _T("SetCooperativeLevel() returned DIERR_UNSUPPORTED.\n")
- // _T("For security reasons, background exclusive mouse\n")
- // _T("access is not allowed."),
- // _T("Mouse"), MB_OK );
- return S_OK;
- }
-
- if( FAILED(hr) )
- return hr;
-
- if( !bImmediate )
- {
- // IMPORTANT STEP TO USE BUFFERED DEVICE DATA!
- //
- // DirectInput uses unbuffered I/O (buffer size = 0) by default.
- // If you want to read buffered data, you need to set a nonzero
- // buffer size.
- //
- // Set the buffer size to SAMPLE_BUFFER_SIZE (defined above) elements.
- //
- // The buffer size is a DWORD property associated with the device.
- DIPROPDWORD dipdw;
- dipdw.diph.dwSize = sizeof(DIPROPDWORD);
- dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
- dipdw.diph.dwObj = 0;
- dipdw.diph.dwHow = DIPH_DEVICE;
- dipdw.dwData = SAMPLE_BUFFER_SIZE; // Arbitary buffer size
-
- hr = g_pMouse->SetProperty( DIPROP_BUFFERSIZE, &dipdw.diph );
- LogFileOutput("DirectInputInit: SetProperty(), hr=0x%08X\n", hr);
- if (FAILED(hr))
- return hr;
- }
-
- // Acquire the newly created device
- hr = g_pMouse->Acquire();
- LogFileOutput("DirectInputInit: Acquire(), hr=0x%08X\n", hr);
- if (FAILED(hr))
- return hr;
-
- // Setup timer to read mouse position
- _ASSERT(g_TimerIDEvent == 0);
- g_TimerIDEvent = SetTimer(hDlg, IDEVENT_TIMER_MOUSE, 8, NULL); // 120Hz timer
- LogFileOutput("DirectInputInit: SetTimer(), id=0x%08X\n", g_TimerIDEvent);
- if (g_TimerIDEvent == 0)
- return E_FAIL;
-
- return S_OK;
-
-#endif // NO_DIRECT_X
- }
-
- //-----------------------------------------------------------------------------
- // Name: FreeDirectInput()
- // Desc: Initialize the DirectInput variables.
- //-----------------------------------------------------------------------------
- void DirectInputUninit( HWND hDlg )
- {
- LogFileOutput("DirectInputUninit\n");
-
- // Unacquire the device one last time just in case
- // the app tried to exit while the device is still acquired.
- if( g_pMouse )
- {
- HRESULT hr = g_pMouse->Unacquire();
- LogFileOutput("DirectInputUninit: Unacquire(), hr=0x%08X\n", hr);
- }
-
- // Release any DirectInput objects.
- SAFE_RELEASE( g_pMouse );
- SAFE_RELEASE( g_pDI );
-
- if (g_TimerIDEvent)
- {
- BOOL bRes = KillTimer(hDlg, g_TimerIDEvent);
- LogFileOutput("DirectInputUninit: KillTimer(), res=%d\n", bRes ? 1 : 0);
- g_TimerIDEvent = 0;
- }
- }
-
- //-----------------------------------------------------------------------------
- // Name: ReadImmediateData()
- // Desc: Read the input device's state when in immediate mode and display it.
- //-----------------------------------------------------------------------------
- HRESULT ReadImmediateData( long* pX, long* pY )
- {
- HRESULT hr;
- DIMOUSESTATE2 dims2; // DirectInput mouse state structure
-
- if (pX) *pX = 0;
- if (pY) *pY = 0;
-
- if( NULL == g_pMouse )
- return S_OK;
-
- // Get the input's device state, and put the state in dims
- ZeroMemory( &dims2, sizeof(dims2) );
- hr = g_pMouse->GetDeviceState( sizeof(DIMOUSESTATE2), &dims2 );
- if( FAILED(hr) )
- {
- // DirectInput may be telling us that the input stream has been
- // interrupted. We aren't tracking any state between polls, so
- // we don't have any special reset that needs to be done.
- // We just re-acquire and try again.
-
- // If input is lost then acquire and keep trying
- hr = g_pMouse->Acquire();
- while( hr == DIERR_INPUTLOST )
- hr = g_pMouse->Acquire();
-
- // Update the dialog text
- if( hr == DIERR_OTHERAPPHASPRIO ||
- hr == DIERR_NOTACQUIRED )
- {
- //SetDlgItemText( hDlg, IDC_DATA, TEXT("Unacquired") );
- }
-
- // hr may be DIERR_OTHERAPPHASPRIO or other errors. This
- // may occur when the app is minimized or in the process of
- // switching, so just try again later
- return S_OK;
- }
-
- if (pX) *pX = dims2.lX;
- if (pY) *pY = dims2.lY;
-
- return S_OK;
- }
-
-}; // namespace DIMouse
diff --git a/source/MouseInterface.h b/source/MouseInterface.h
index 1b97aaf3..4dc122de 100644
--- a/source/MouseInterface.h
+++ b/source/MouseInterface.h
@@ -107,10 +107,3 @@ protected:
SyncEvent m_syncEvent;
};
-
-namespace DIMouse
-{
- HRESULT DirectInputInit( HWND hDlg );
- void DirectInputUninit( HWND hDlg );
- HRESULT ReadImmediateData( long* pX=NULL, long* pY=NULL );
-};
\ No newline at end of file
diff --git a/source/NTSC.cpp b/source/NTSC.cpp
index 42e751ab..b3342859 100644
--- a/source/NTSC.cpp
+++ b/source/NTSC.cpp
@@ -2179,8 +2179,8 @@ _mono:
}
//===========================================================================
-void GenerateVideoTables( void );
-void GenerateBaseColors(baseColors_t pBaseNtscColors);
+static void GenerateVideoTables( void );
+static void GenerateBaseColors(baseColors_t pBaseNtscColors);
void NTSC_Destroy(void)
{
diff --git a/source/RGBMonitor.cpp b/source/RGBMonitor.cpp
index 318be56f..69044c68 100644
--- a/source/RGBMonitor.cpp
+++ b/source/RGBMonitor.cpp
@@ -5,6 +5,7 @@
#include "Frame.h"
#include "Memory.h" // MemGetMainPtr() MemGetAuxPtr()
#include "Video.h"
+#include "Card.h"
#include "RGBMonitor.h"
#include "YamlHelper.h"
diff --git a/test/TestCPU6502/TestCPU6502-vs2017.vcxproj b/test/TestCPU6502/TestCPU6502-vs2017.vcxproj
index ae366cbd..79f57501 100644
--- a/test/TestCPU6502/TestCPU6502-vs2017.vcxproj
+++ b/test/TestCPU6502/TestCPU6502-vs2017.vcxproj
@@ -11,6 +11,7 @@
+
diff --git a/test/TestCPU6502/TestCPU6502-vs2017.vcxproj.filters b/test/TestCPU6502/TestCPU6502-vs2017.vcxproj.filters
index 81896f42..cf1e4e54 100644
--- a/test/TestCPU6502/TestCPU6502-vs2017.vcxproj.filters
+++ b/test/TestCPU6502/TestCPU6502-vs2017.vcxproj.filters
@@ -13,6 +13,9 @@
Source Files
+
+ Source Files
+