Merge from mstephens branch. Incorporates modifications to support building under Visual Studio 2010.

This commit is contained in:
Mike Stephens 2010-10-12 02:43:33 +00:00
parent d6f4fb2865
commit 632f67aea9
21 changed files with 6729 additions and 12 deletions

2957
src/16inst_c.h Normal file

File diff suppressed because it is too large Load Diff

2957
src/8inst_c.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,13 @@
extern "C" {
#endif
#ifdef _MSC_VER
#include <WinSock2.h>
typedef unsigned int u_int;
typedef unsigned char u_char;
typedef unsigned short u_short;
#endif
/* BSD style release date */
#define BPF_RELEASE 199606

View File

@ -38,7 +38,12 @@
#define lib_pcap_h
#include <sys/types.h>
#if defined _MSC_VER
# include <time.h>
#else
#include <sys/time.h>
#endif
/* RGJ Changed it to "bpf.h" for AppleWin */
#include "bpf.h"

View File

@ -41,6 +41,7 @@
#include <string.h>
#include "..\..\defc.h"
#include "../../tfe/protos_tfe.h"
typedef pcap_t *(*pcap_open_live_t)(const char *, int, int, int, char *);
@ -413,7 +414,7 @@ typedef struct TFE_PCAP_INTERNAL_tag {
static
void TfePcapPacketHandler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
TFE_PCAP_INTERNAL *pinternal = (void*)param;
TFE_PCAP_INTERNAL *pinternal = (TFE_PCAP_INTERNAL*)param;
/* determine the count of bytes which has been returned,
* but make sure not to overrun the buffer
@ -440,7 +441,7 @@ int tfe_arch_receive_frame(TFE_PCAP_INTERNAL *pinternal)
int ret = -1;
/* check if there is something to receive */
if ((*p_pcap_dispatch)(TfePcapFP, 1, TfePcapPacketHandler, (void*)pinternal)!=0) {
if ((*p_pcap_dispatch)(TfePcapFP, 1, (pcap_handler)TfePcapPacketHandler, (u_char*)pinternal)!=0) {
/* Something has been received */
ret = pinternal->len;
}

View File

@ -34,6 +34,7 @@
#endif
#if defined _MSC_VER
#include <direct.h>
#define snprintf _snprintf
typedef unsigned int mode_t;
#endif

29
src/gsport.sln Normal file
View File

@ -0,0 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsport", "gsport.vcxproj", "{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}"
ProjectSection(ProjectDependencies) = postProject
{E810477A-E004-4308-A58A-21393213EF89} = {E810477A-E004-4308-A58A-21393213EF89}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tfe", "tfe\tfe.vcxproj", "{E810477A-E004-4308-A58A-21393213EF89}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}.Debug|Win32.ActiveCfg = Debug|Win32
{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}.Debug|Win32.Build.0 = Debug|Win32
{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}.Release|Win32.ActiveCfg = Release|Win32
{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}.Release|Win32.Build.0 = Release|Win32
{E810477A-E004-4308-A58A-21393213EF89}.Debug|Win32.ActiveCfg = Debug|Win32
{E810477A-E004-4308-A58A-21393213EF89}.Debug|Win32.Build.0 = Debug|Win32
{E810477A-E004-4308-A58A-21393213EF89}.Release|Win32.ActiveCfg = Release|Win32
{E810477A-E004-4308-A58A-21393213EF89}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

144
src/gsport.vcxproj Normal file
View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0B4E527A-DB50-4B5F-9B08-303ABAF7356A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>gsport</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GSPORT_LITTLE_ENDIAN;HAVE_TFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsCpp</CompileAs>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<ErrorReporting>Prompt</ErrorReporting>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Winmm.lib;Ws2_32.lib;$(SolutionDir)$(Configuration)\tfe.lib;%(AdditionalDependencies)</AdditionalDependencies>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="16inst_c.h" />
<ClInclude Include="8inst_c.h" />
<ClInclude Include="adb.h" />
<ClInclude Include="config.h" />
<ClInclude Include="defc.h" />
<ClInclude Include="defcomm.h" />
<ClInclude Include="defs.h" />
<ClInclude Include="defs_instr.h" />
<ClInclude Include="disas.h" />
<ClInclude Include="gsportfont.h" />
<ClInclude Include="instable.h" />
<ClInclude Include="iwm.h" />
<ClInclude Include="iwm_35_525.h" />
<ClInclude Include="op_routs.h" />
<ClInclude Include="printer.h" />
<ClInclude Include="printer_charmaps.h" />
<ClInclude Include="prodos.h" />
<ClInclude Include="prodos_protos.h" />
<ClInclude Include="protos.h" />
<ClInclude Include="protos_engine_c.h" />
<ClInclude Include="protos_macdriver.h" />
<ClInclude Include="protos_macsnd_driver.h" />
<ClInclude Include="protos_windriver.h" />
<ClInclude Include="protos_xdriver.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="scc.h" />
<ClInclude Include="size_c.h" />
<ClInclude Include="size_tab.h" />
<ClInclude Include="sound.h" />
<ClInclude Include="superhires.h" />
<ClInclude Include="support.h" />
<ClInclude Include="tfe\protos_tfe.h" />
<ClInclude Include="winresource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="adb.c" />
<ClCompile Include="clock.c" />
<ClCompile Include="compile_time.c" />
<ClCompile Include="config.c" />
<ClCompile Include="dis.c" />
<ClCompile Include="engine_c.c" />
<ClCompile Include="iwm.c" />
<ClCompile Include="joystick_driver.c" />
<ClCompile Include="moremem.c" />
<ClCompile Include="paddles.c" />
<ClCompile Include="scc.c" />
<ClCompile Include="scc_socket_driver.c" />
<ClCompile Include="scc_windriver.c" />
<ClCompile Include="sim65816.c" />
<ClCompile Include="smartport.c" />
<ClCompile Include="sound.c" />
<ClCompile Include="sound_driver.c" />
<ClCompile Include="video.c" />
<ClCompile Include="win32snd_driver.c" />
<ClCompile Include="win_console.c" />
<ClCompile Include="win_generic.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

183
src/gsport.vcxproj.filters Normal file
View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="16inst_c.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="8inst_c.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="adb.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="defc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="defcomm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="defs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="defs_instr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="disas.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="gsportfont.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="instable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="iwm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="iwm_35_525.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="op_routs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="printer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="printer_charmaps.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="prodos.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="prodos_protos.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos_engine_c.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos_macdriver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos_macsnd_driver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos_windriver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="protos_xdriver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="scc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="size_c.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="size_tab.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sound.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="superhires.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="support.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="winresource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="tfe\protos_tfe.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="adb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="clock.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="compile_time.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dis.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="engine_c.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="iwm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="joystick_driver.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="moremem.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="paddles.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scc_socket_driver.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scc_windriver.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sim65816.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="smartport.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sound.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sound_driver.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="win32snd_driver.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="win_console.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="win_generic.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -20,15 +20,16 @@
*/
#include "defc.h"
#include <sys/time.h>
#ifdef __linux__
# include <linux/joystick.h>
# include <sys/time.h>
#endif
#ifdef _WIN32
# include <windows.h>
# include <mmsystem.h>
# include <time.h>
#endif
extern int g_joystick_native_type1; /* in paddles.c */

View File

@ -25,7 +25,7 @@
#include "tfe/protos_tfe.h"
#endif
extern char g_gsport_version_str[];
extern char const g_gsport_version_str[];
extern byte *g_memory_ptr;
extern byte *g_dummy_memory1_ptr;

View File

@ -291,7 +291,7 @@ scc_regen_clocks(int port)
pos = 0;
baud_entries = sizeof(g_baud_table)/sizeof(g_baud_table[0]);
for(i = 0; i < baud_entries; i++) {
diff = abs(g_baud_table[i] - baud);
diff = abs((int)(g_baud_table[i] - baud));
if(diff < max_diff) {
pos = i;
max_diff = diff;

View File

@ -357,7 +357,7 @@ scc_accept_socket(int port, double dcycs)
return; /* just give up */
}
if(scc_ptr->rdwrfd == -1) {
rdwrfd = accept(scc_ptr->sockfd, scc_ptr->host_handle,
rdwrfd = accept(scc_ptr->sockfd, (struct sockaddr*)scc_ptr->host_handle,
&(scc_ptr->host_aux1));
if(rdwrfd < 0) {
return;

View File

@ -136,7 +136,7 @@ char* g_printer_font_script = "script.ttf";
char* g_printer_font_ocra = "ocra.ttf";
int g_config_iwm_vbl_count = 0;
const char g_gsport_version_str[] = "0.1";
extern const char g_gsport_version_str[] = "0.1";
int g_pause=0; // OG Added pause
#define START_DCYCS (0.0)

274
src/size_c.h Normal file
View File

@ -0,0 +1,274 @@
/************************************************************************/
/* KEGS: Apple //gs Emulator */
/* Copyright 2002 by Kent Dickey */
/* */
/* This code is covered by the GNU GPL */
/* */
/* The KEGS web page is kegs.sourceforge.net */
/* You may contact the author at: kadickey@alumni.princeton.edu */
/************************************************************************/
#ifdef INCLUDE_RCSID_S
.stringz "@(#)$KmKId: size_tab.h,v 1.13 2002-11-19 03:10:38-05 kadickey Exp $"
#else
0x1, /* 00 */ /* brk */
0x1, /* 01 */ /* ORA (Dloc,X) */
0x1, /* 02 */ /* COP */
0x1, /* 03 */ /* ORA Disp8,S */
0x1, /* 04 */ /* TSB Dloc */
0x1, /* 05 */ /* ORA Dloc */
0x1, /* 06 */ /* ASL Dloc */
0x1, /* 07 */ /* ORA [Dloc] */
0x0, /* 08 */ /* PHP */
0x4, /* 09 */ /* ORA #imm */
0x0, /* 0a */ /* ASL a */
0x0, /* 0b */ /* PHD */
0x2, /* 0c */ /* TSB abs */
0x2, /* 0d */ /* ORA abs */
0x2, /* 0e */ /* ASL abs */
0x3, /* 0f */ /* ORA long */
0x1, /* 10 */ /* BPL disp8 */
0x1, /* 11 */ /* ORA (),y */
0x1, /* 12 */ /* ORA () */
0x1, /* 13 */ /* ORA (disp8,s),y */
0x1, /* 14 */ /* TRB Dloc */
0x1, /* 15 */ /* ORA Dloc,x */
0x1, /* 16 */ /* ASL Dloc,x */
0x1, /* 17 */ /* ORA [],y */
0x0, /* 18 */ /* clc */
0x2, /* 19 */ /* ORA abs,y */
0x0, /* 1a */ /* INC a */
0x0, /* 1b */ /* TCS */
0x2, /* 1c */ /* TRB Abs */
0x2, /* 1d */ /* ORA Abs,X */
0x2, /* 1e */ /* ASL abs,x */
0x3, /* 1f */ /* ORA Long,x */
0x2, /* 20 */ /* JSR abs */
0x1, /* 21 */ /* AND (Dloc,X) */
0x3, /* 22 */ /* JSL Abslong */
0x1, /* 23 */ /* AND Disp8,S */
0x1, /* 24 */ /* BIT Dloc */
0x1, /* 25 */ /* AND Dloc */
0x1, /* 26 */ /* ROL Dloc */
0x1, /* 27 */ /* AND [Dloc] */
0x0, /* 28 */ /* PLP */
0x4, /* 29 */ /* AND #imm */
0x0, /* 2a */ /* ROL a */
0x0, /* 2b */ /* PLD */
0x2, /* 2c */ /* BIT abs */
0x2, /* 2d */ /* AND abs */
0x2, /* 2e */ /* ROL abs */
0x3, /* 2f */ /* AND long */
0x1, /* 30 */ /* BMI disp8 */
0x1, /* 31 */ /* AND (),y */
0x1, /* 32 */ /* AND () */
0x1, /* 33 */ /* AND (disp8,s),y */
0x1, /* 34 */ /* BIT Dloc,X */
0x1, /* 35 */ /* AND Dloc,x */
0x1, /* 36 */ /* ROL Dloc,x */
0x1, /* 37 */ /* AND [],y */
0x0, /* 38 */ /* SEC */
0x2, /* 39 */ /* AND abs,y */
0x0, /* 3a */ /* DEC a */
0x0, /* 3b */ /* TSC */
0x2, /* 3c */ /* BIT Abs,X */
0x2, /* 3d */ /* AND Abs,X */
0x2, /* 3e */ /* ROL abs,x */
0x3, /* 3f */ /* AND Long,x */
0x0, /* 40 */ /* RTI */
0x1, /* 41 */ /* EOR (Dloc,X) */
0x1, /* 42 */ /* WDM */
0x1, /* 43 */ /* EOR Disp8,S */
0x2, /* 44 */ /* MVP I,J */
0x1, /* 45 */ /* EOR Dloc */
0x1, /* 46 */ /* LSR Dloc */
0x1, /* 47 */ /* EOR [Dloc] */
0x0, /* 48 */ /* PHA */
0x4, /* 49 */ /* EOR #imm */
0x0, /* 4a */ /* LSR a */
0x0, /* 4b */ /* PHK */
0x2, /* 4c */ /* JMP abs */
0x2, /* 4d */ /* EOR abs */
0x2, /* 4e */ /* LSR abs */
0x3, /* 4f */ /* EOR long */
0x1, /* 50 */ /* BVC disp8 */
0x1, /* 51 */ /* EOR (),y */
0x1, /* 52 */ /* EOR () */
0x1, /* 53 */ /* EOR (disp8,s),y */
0x2, /* 54 */ /* MVN I,J */
0x1, /* 55 */ /* EOR Dloc,x */
0x1, /* 56 */ /* LSR Dloc,x */
0x1, /* 57 */ /* EOR [],y */
0x0, /* 58 */ /* CLI */
0x2, /* 59 */ /* EOR abs,y */
0x0, /* 5a */ /* PHY */
0x0, /* 5b */ /* TCD */
0x3, /* 5c */ /* JMP Long */
0x2, /* 5d */ /* EOR Abs,X */
0x2, /* 5e */ /* LSR abs,x */
0x3, /* 5f */ /* EOR Long,x */
0x0, /* 60 */ /* RTS */
0x1, /* 61 */ /* ADC (Dloc,X) */
0x2, /* 62 */ /* PER DISP16 */
0x1, /* 63 */ /* ADC Disp8,S */
0x1, /* 64 */ /* STZ Dloc */
0x1, /* 65 */ /* ADC Dloc */
0x1, /* 66 */ /* ROR Dloc */
0x1, /* 67 */ /* ADC [Dloc] */
0x0, /* 68 */ /* PLA */
0x4, /* 69 */ /* ADC #imm */
0x0, /* 6a */ /* ROR a */
0x0, /* 6b */ /* RTL */
0x2, /* 6c */ /* JMP (abs) */
0x2, /* 6d */ /* ADC abs */
0x2, /* 6e */ /* ROR abs */
0x3, /* 6f */ /* ADC long */
0x1, /* 70 */ /* BVS disp8 */
0x1, /* 71 */ /* ADC (),y */
0x1, /* 72 */ /* ADC () */
0x1, /* 73 */ /* ADC (disp8,s),y */
0x1, /* 74 */ /* STZ Dloc,X */
0x1, /* 75 */ /* ADC Dloc,x */
0x1, /* 76 */ /* ROR Dloc,x */
0x1, /* 77 */ /* ADC [],y */
0x0, /* 78 */ /* SEI */
0x2, /* 79 */ /* ADC abs,y */
0x0, /* 7a */ /* PLY */
0x0, /* 7b */ /* TDC */
0x2, /* 7c */ /* JMP (abs,x) */
0x2, /* 7d */ /* ADC Abs,X */
0x2, /* 7e */ /* ROR abs,x */
0x3, /* 7f */ /* ADC Long,x */
0x1, /* 80 */ /* BRA Disp8 */
0x1, /* 81 */ /* STA (Dloc,X) */
0x2, /* 82 */ /* BRL DISP16 */
0x1, /* 83 */ /* STA Disp8,S */
0x1, /* 84 */ /* STY Dloc */
0x1, /* 85 */ /* STA Dloc */
0x1, /* 86 */ /* STX Dloc */
0x1, /* 87 */ /* STA [Dloc] */
0x0, /* 88 */ /* DEY */
0x4, /* 89 */ /* BIT #imm */
0x0, /* 8a */ /* TXA */
0x0, /* 8b */ /* PHB */
0x2, /* 8c */ /* STY abs */
0x2, /* 8d */ /* STA abs */
0x2, /* 8e */ /* STX abs */
0x3, /* 8f */ /* STA long */
0x1, /* 90 */ /* BCC disp8 */
0x1, /* 91 */ /* STA (),y */
0x1, /* 92 */ /* STA () */
0x1, /* 93 */ /* STA (disp8,s),y */
0x1, /* 94 */ /* STY Dloc,X */
0x1, /* 95 */ /* STA Dloc,x */
0x1, /* 96 */ /* STX Dloc,y */
0x1, /* 97 */ /* STA [],y */
0x0, /* 98 */ /* TYA */
0x2, /* 99 */ /* STA abs,y */
0x0, /* 9a */ /* TXS */
0x0, /* 9b */ /* TXY */
0x2, /* 9c */ /* STX abs */
0x2, /* 9d */ /* STA Abs,X */
0x2, /* 9e */ /* STZ abs,x */
0x3, /* 9f */ /* STA Long,x */
0x5, /* a0 */ /* LDY #imm */
0x1, /* a1 */ /* LDA (Dloc,X) */
0x5, /* a2 */ /* LDX #imm */
0x1, /* a3 */ /* LDA Disp8,S */
0x1, /* a4 */ /* LDY Dloc */
0x1, /* a5 */ /* LDA Dloc */
0x1, /* a6 */ /* LDX Dloc */
0x1, /* a7 */ /* LDA [Dloc] */
0x0, /* a8 */ /* TAY */
0x4, /* a9 */ /* LDA #imm */
0x0, /* aa */ /* TAX */
0x0, /* ab */ /* PLB */
0x2, /* ac */ /* LDY abs */
0x2, /* ad */ /* LDA abs */
0x2, /* ae */ /* LDX abs */
0x3, /* af */ /* LDA long */
0x1, /* b0 */ /* BCS disp8 */
0x1, /* b1 */ /* LDA (),y */
0x1, /* b2 */ /* LDA () */
0x1, /* b3 */ /* LDA (disp8,s),y */
0x1, /* b4 */ /* LDY Dloc,X */
0x1, /* b5 */ /* LDA Dloc,x */
0x1, /* b6 */ /* LDX Dloc,y */
0x1, /* b7 */ /* LDA [],y */
0x0, /* b8 */ /* CLV */
0x2, /* b9 */ /* LDA abs,y */
0x0, /* ba */ /* TSX */
0x0, /* bb */ /* TYX */
0x2, /* bc */ /* LDY abs,x */
0x2, /* bd */ /* LDA Abs,X */
0x2, /* be */ /* LDX abs,y */
0x3, /* bf */ /* LDA Long,x */
0x5, /* c0 */ /* CPY #Imm */
0x1, /* c1 */ /* CMP (Dloc,X) */
0x1, /* c2 */ /* REP #8bit */
0x1, /* c3 */ /* CMP Disp8,S */
0x1, /* c4 */ /* CPY Dloc */
0x1, /* c5 */ /* CMP Dloc */
0x1, /* c6 */ /* DEC Dloc */
0x1, /* c7 */ /* CMP [Dloc] */
0x0, /* c8 */ /* INY */
0x4, /* c9 */ /* CMP #imm */
0x0, /* ca */ /* DEX */
0x0, /* cb */ /* WAI */
0x2, /* cc */ /* CPY abs */
0x2, /* cd */ /* CMP abs */
0x2, /* ce */ /* DEC abs */
0x3, /* cf */ /* CMP long */
0x1, /* d0 */ /* BNE disp8 */
0x1, /* d1 */ /* CMP (),y */
0x1, /* d2 */ /* CMP () */
0x1, /* d3 */ /* CMP (disp8,s),y */
0x1, /* d4 */ /* PEI Dloc */
0x1, /* d5 */ /* CMP Dloc,x */
0x1, /* d6 */ /* DEC Dloc,x */
0x1, /* d7 */ /* CMP [],y */
0x0, /* d8 */ /* CLD */
0x2, /* d9 */ /* CMP abs,y */
0x0, /* da */ /* PHX */
0x0, /* db */ /* STP */
0x2, /* dc */ /* JML (Abs) */
0x2, /* dd */ /* CMP Abs,X */
0x2, /* de */ /* DEC abs,x */
0x3, /* df */ /* CMP Long,x */
0x5, /* e0 */ /* CPX #Imm */
0x1, /* e1 */ /* SBC (Dloc,X) */
0x1, /* e2 */ /* SEP #8bit */
0x1, /* e3 */ /* SBC Disp8,S */
0x1, /* e4 */ /* CPX Dloc */
0x1, /* e5 */ /* SBC Dloc */
0x1, /* e6 */ /* INC Dloc */
0x1, /* e7 */ /* SBC [Dloc] */
0x0, /* e8 */ /* INX */
0x4, /* e9 */ /* SBC #imm */
0x0, /* ea */ /* NOP */
0x0, /* eb */ /* XBA */
0x2, /* ec */ /* CPX abs */
0x2, /* ed */ /* SBC abs */
0x2, /* ee */ /* INC abs */
0x3, /* ef */ /* SBC long */
0x1, /* f0 */ /* BEQ disp8 */
0x1, /* f1 */ /* SBC (),y */
0x1, /* f2 */ /* SBC () */
0x1, /* f3 */ /* SBC (disp8,s),y */
0x2, /* f4 */ /* PEA Imm */
0x1, /* f5 */ /* SBC Dloc,x */
0x1, /* f6 */ /* INC Dloc,x */
0x1, /* f7 */ /* SBC [],y */
0x0, /* f8 */ /* SED */
0x2, /* f9 */ /* SBC abs,y */
0x0, /* fa */ /* PLX */
0x0, /* fb */ /* XCE */
0x2, /* fc */ /* JSR (Abs,x) */
0x2, /* fd */ /* SBC Abs,X */
0x2, /* fe */ /* INC abs,x */
0x3, /* ff */ /* SBC Long,x */
#endif

View File

@ -27,7 +27,7 @@ extern int g_rom_version;
extern int g_io_amt;
extern int g_highest_smartport_unit;
int g_cycs_in_io_read = 0;
word32 g_cycs_in_io_read = 0;
extern Engine_reg engine;

View File

@ -20,7 +20,10 @@
*/
/*tfe.c*/
int tfe_enabled;
#ifndef _PROTOS_TFE_H
#define _PROTOS_TFE_H
extern int tfe_enabled;
void tfe_init(void);
int tfe_resources_init(void);
@ -93,3 +96,5 @@ int tfe_should_accept(unsigned char *buffer, int length, int *phashed, int *phas
int tfe_arch_enumadapter_open(void);
int tfe_arch_enumadapter(char **ppname, char **ppdescription);
int tfe_arch_enumadapter_close(void);
#endif

View File

@ -479,7 +479,7 @@ int tfe_activate_i(void)
#endif
/* allocate memory for visible IO register */
tfe = lib_malloc( TFE_COUNT_IO_REGISTER );
tfe = (byte *)lib_malloc( TFE_COUNT_IO_REGISTER );
if (tfe==NULL)
{
#ifdef TFE_DEBUG_INIT
@ -490,7 +490,7 @@ int tfe_activate_i(void)
}
/* allocate memory for PacketPage register */
tfe_packetpage = lib_malloc( MAX_PACKETPAGE_ARRAY );
tfe_packetpage = (byte *)lib_malloc( MAX_PACKETPAGE_ARRAY );
if (tfe_packetpage==NULL)
{
#ifdef TFE_DEBUG_INIT

99
src/tfe/tfe.vcxproj Normal file
View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E810477A-E004-4308-A58A-21393213EF89}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>tfe</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TFE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TFE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\arch\win32\bittypes.h" />
<ClInclude Include="..\arch\win32\bpf.h" />
<ClInclude Include="..\arch\win32\dirent-win32.h" />
<ClInclude Include="..\arch\win32\ip6_misc.h" />
<ClInclude Include="..\arch\win32\pcap-stdinc.h" />
<ClInclude Include="..\arch\win32\pcap.h" />
<ClInclude Include="tfesupp.h" />
<ClInclude Include="types.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\arch\win32\tfearch.c" />
<ClCompile Include="tfe.c" />
<ClCompile Include="tfesupp.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="tfesupp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\bittypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\bpf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\dirent-win32.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\ip6_misc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\pcap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\arch\win32\pcap-stdinc.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="tfe.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tfesupp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\arch\win32\tfearch.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -471,7 +471,7 @@ LPTSTR lpszFile;
numDraggedFiles = DragQueryFile((HDROP)wParam, 0xFFFFFFFF, NULL, 0);
for (i = 0; i < numDraggedFiles; i++) {
szFilename = DragQueryFile((HDROP)wParam, i, NULL, 0);
lpszFile = malloc(szFilename + 1);
lpszFile = (LPTSTR)malloc(szFilename + 1);
szFilename = DragQueryFile((HDROP)wParam, i, lpszFile, szFilename + 1);
cfg_inspect_maybe_insert_file(lpszFile);
free(lpszFile);