Merge remote-tracking branch 'origin/uthernet'
This commit is contained in:
commit
4683883c2b
12 changed files with 89 additions and 82 deletions
|
@ -426,7 +426,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfe.cpp"
|
||||
RelativePath=".\source\Tfe\tfe.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
|
@ -446,11 +446,11 @@
|
|||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfe.h"
|
||||
RelativePath=".\source\Tfe\tfe.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfearch.cpp"
|
||||
RelativePath=".\source\Tfe\tfearch.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
|
@ -470,11 +470,11 @@
|
|||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfearch.h"
|
||||
RelativePath=".\source\Tfe\tfearch.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfesupp.cpp"
|
||||
RelativePath=".\source\Tfe\tfesupp.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
|
@ -494,7 +494,7 @@
|
|||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\Tfe\Tfesupp.h"
|
||||
RelativePath=".\source\Tfe\tfesupp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
|
@ -114,9 +114,9 @@
|
|||
<ClInclude Include="source\Tfe\Ip6_misc.h" />
|
||||
<ClInclude Include="source\Tfe\Pcap-stdinc.h" />
|
||||
<ClInclude Include="source\Tfe\Pcap.h" />
|
||||
<ClInclude Include="source\Tfe\Tfe.h" />
|
||||
<ClInclude Include="source\Tfe\Tfearch.h" />
|
||||
<ClInclude Include="source\Tfe\Tfesupp.h" />
|
||||
<ClInclude Include="source\Tfe\tfe.h" />
|
||||
<ClInclude Include="source\Tfe\tfearch.h" />
|
||||
<ClInclude Include="source\Tfe\tfesupp.h" />
|
||||
<ClInclude Include="source\Tfe\Uilib.h" />
|
||||
<ClInclude Include="source\Utilities.h" />
|
||||
<ClInclude Include="source\Video.h" />
|
||||
|
@ -207,7 +207,7 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="source\SynchronousEventManager.cpp" />
|
||||
<ClCompile Include="source\Tape.cpp" />
|
||||
<ClCompile Include="source\Tfe\Tfe.cpp">
|
||||
<ClCompile Include="source\Tfe\tfe.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug v141_xp|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
|
||||
|
@ -215,7 +215,7 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release v141_xp|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Tfearch.cpp">
|
||||
<ClCompile Include="source\Tfe\tfearch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug v141_xp|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
|
||||
|
@ -223,7 +223,7 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release v141_xp|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Tfesupp.cpp">
|
||||
<ClCompile Include="source\Tfe\tfesupp.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug v141_xp|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
|
||||
|
|
|
@ -142,13 +142,13 @@
|
|||
<ClCompile Include="source\Tape.cpp">
|
||||
<Filter>Source Files\Emulator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Tfe.cpp">
|
||||
<ClCompile Include="source\Tfe\tfe.cpp">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Tfearch.cpp">
|
||||
<ClCompile Include="source\Tfe\tfearch.cpp">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Tfesupp.cpp">
|
||||
<ClCompile Include="source\Tfe\tfesupp.cpp">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Tfe\Uilib.cpp">
|
||||
|
@ -426,13 +426,13 @@
|
|||
<ClInclude Include="source\Tape.h">
|
||||
<Filter>Source Files\Emulator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Tfe\Tfe.h">
|
||||
<ClInclude Include="source\Tfe\tfe.h">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Tfe\Tfearch.h">
|
||||
<ClInclude Include="source\Tfe\tfearch.h">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Tfe\Tfesupp.h">
|
||||
<ClInclude Include="source\Tfe\tfesupp.h">
|
||||
<Filter>Source Files\Uthernet</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Tfe\Uilib.h">
|
||||
|
|
|
@ -28,8 +28,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include "../Common.h"
|
||||
#include "../Registry.h"
|
||||
#include "../resource/resource.h"
|
||||
#include "../Tfe/Tfe.h"
|
||||
#include "../Tfe/Tfesupp.h"
|
||||
#include "../Tfe/tfe.h"
|
||||
#include "../Tfe/tfesupp.h"
|
||||
|
||||
CPageConfigTfe* CPageConfigTfe::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
|
|
|
@ -392,8 +392,8 @@ void tfe_debug_output_pp( void )
|
|||
/* ------------------------------------------------------------------------- */
|
||||
/* initialization and deinitialization functions */
|
||||
|
||||
BYTE __stdcall TfeIoCxxx (WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
|
||||
BYTE __stdcall TfeIo (WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
|
||||
static BYTE __stdcall TfeIoCxxx (WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
|
||||
static BYTE __stdcall TfeIo (WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
|
||||
|
||||
void tfe_reset(void)
|
||||
{
|
|
@ -34,12 +34,22 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <StdAfx.h> // this is necessary in linux, but in MSVC windows.h MUST come after winsock2.h (from pcap.h above)
|
||||
#include "tfe.h"
|
||||
#include "tfearch.h"
|
||||
#include "tfesupp.h"
|
||||
#include "../Log.h"
|
||||
|
||||
|
||||
/** #define TFE_DEBUG_ARCH 1 **/
|
||||
/** #define TFE_DEBUG_PKTDUMP 1 **/
|
||||
|
||||
/* #define TFE_DEBUG_FRAMES - might be defined in TFE.H! */
|
||||
|
||||
#define TFE_DEBUG_WARN 1 /* this should not be deactivated */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
typedef pcap_t *(*pcap_open_live_t)(const char *, int, int, int, char *);
|
||||
typedef int (*pcap_dispatch_t)(pcap_t *, int, pcap_handler, u_char *);
|
||||
typedef int (*pcap_setnonblock_t)(pcap_t *, int, char *);
|
||||
|
@ -49,13 +59,6 @@ typedef void (*pcap_freealldevs_t)(pcap_if_t *);
|
|||
typedef int (*pcap_sendpacket_t)(pcap_t *p, u_char *buf, int size);
|
||||
typedef const char *(*pcap_lib_version_t)(void);
|
||||
|
||||
/** #define TFE_DEBUG_ARCH 1 **/
|
||||
/** #define TFE_DEBUG_PKTDUMP 1 **/
|
||||
|
||||
/* #define TFE_DEBUG_FRAMES - might be defined in TFE.H! */
|
||||
|
||||
#define TFE_DEBUG_WARN 1 /* this should not be deactivated */
|
||||
|
||||
static pcap_open_live_t p_pcap_open_live;
|
||||
static pcap_dispatch_t p_pcap_dispatch;
|
||||
static pcap_setnonblock_t p_pcap_setnonblock;
|
||||
|
@ -67,46 +70,6 @@ static pcap_lib_version_t p_pcap_lib_version;
|
|||
|
||||
static HINSTANCE pcap_library = NULL;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* variables needed */
|
||||
|
||||
|
||||
//static log_t g_fh = g_fh;
|
||||
|
||||
|
||||
static pcap_if_t *TfePcapNextDev = NULL;
|
||||
static pcap_if_t *TfePcapAlldevs = NULL;
|
||||
static pcap_t *TfePcapFP = NULL;
|
||||
|
||||
static char TfePcapErrbuf[PCAP_ERRBUF_SIZE];
|
||||
|
||||
#ifdef TFE_DEBUG_PKTDUMP
|
||||
|
||||
static
|
||||
void debug_output( const char *text, BYTE *what, int count )
|
||||
{
|
||||
char buffer[256];
|
||||
char *p = buffer;
|
||||
char *pbuffer1 = what;
|
||||
int len1 = count;
|
||||
int i;
|
||||
|
||||
sprintf(buffer, "\n%s: length = %u\n", text, len1);
|
||||
OutputDebugString(buffer);
|
||||
do {
|
||||
p = buffer;
|
||||
for (i=0; (i<8) && len1>0; len1--, i++) {
|
||||
sprintf( p, "%02x ", (unsigned int)(unsigned char)*pbuffer1++);
|
||||
p += 3;
|
||||
}
|
||||
*(p-1) = '\n'; *p = 0;
|
||||
OutputDebugString(buffer);
|
||||
} while (len1>0);
|
||||
}
|
||||
#endif // #ifdef TFE_DEBUG_PKTDUMP
|
||||
|
||||
|
||||
static
|
||||
void TfePcapFreeLibrary(void)
|
||||
{
|
||||
|
@ -171,7 +134,62 @@ BOOL TfePcapLoadLibrary(void)
|
|||
|
||||
#undef GET_PROC_ADDRESS_AND_TEST
|
||||
|
||||
#else
|
||||
|
||||
// libpcap is a standard package, just link to it
|
||||
#define p_pcap_open_live pcap_open_live
|
||||
#define p_pcap_dispatch pcap_dispatch
|
||||
#define p_pcap_setnonblock pcap_setnonblock
|
||||
#define p_pcap_findalldevs pcap_findalldevs
|
||||
#define p_pcap_freealldevs pcap_freealldevs
|
||||
#define p_pcap_sendpacket pcap_sendpacket
|
||||
#define p_pcap_datalink pcap_datalink
|
||||
#define p_pcap_lib_version pcap_lib_version
|
||||
|
||||
static BOOL TfePcapLoadLibrary(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* variables needed */
|
||||
|
||||
|
||||
//static log_t g_fh = g_fh;
|
||||
|
||||
|
||||
static pcap_if_t *TfePcapNextDev = NULL;
|
||||
static pcap_if_t *TfePcapAlldevs = NULL;
|
||||
static pcap_t *TfePcapFP = NULL;
|
||||
|
||||
static char TfePcapErrbuf[PCAP_ERRBUF_SIZE];
|
||||
|
||||
#ifdef TFE_DEBUG_PKTDUMP
|
||||
|
||||
static
|
||||
void debug_output( const char *text, BYTE *what, int count )
|
||||
{
|
||||
char buffer[256];
|
||||
char *p = buffer;
|
||||
char *pbuffer1 = what;
|
||||
int len1 = count;
|
||||
int i;
|
||||
|
||||
sprintf(buffer, "\n%s: length = %u\n", text, len1);
|
||||
OutputDebugString(buffer);
|
||||
do {
|
||||
p = buffer;
|
||||
for (i=0; (i<8) && len1>0; len1--, i++) {
|
||||
sprintf( p, "%02x ", (unsigned int)(unsigned char)*pbuffer1++);
|
||||
p += 3;
|
||||
}
|
||||
*(p-1) = '\n'; *p = 0;
|
||||
OutputDebugString(buffer);
|
||||
} while (len1>0);
|
||||
}
|
||||
#endif // #ifdef TFE_DEBUG_PKTDUMP
|
||||
|
||||
static
|
||||
void TfePcapCloseAdapter(void)
|
|
@ -33,19 +33,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <tchar.h>
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
|
||||
#include "tfesupp.h"
|
||||
|
||||
|
||||
// Lib Stuff
|
||||
/* #define LIB_DEBUG*/
|
|
@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include "SoundCore.h"
|
||||
|
||||
#include "Configuration/IPropertySheet.h"
|
||||
#include "Tfe/Tfe.h"
|
||||
#include "Tfe/tfe.h"
|
||||
|
||||
#ifdef USE_SPEECH_API
|
||||
#include "Speech.h"
|
||||
|
|
|
@ -52,7 +52,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
#include "Configuration/About.h"
|
||||
#include "Configuration/PropertySheet.h"
|
||||
#include "Tfe/Tfe.h"
|
||||
#include "Tfe/tfe.h"
|
||||
|
||||
//=================================================
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue