From d14853e14a3f0a32712c53ff3ed699488d441a14 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 10 Jan 2012 20:14:09 -0800 Subject: [PATCH 01/14] Fixed build when using a libpcap from www.tcpdump.org --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index c82fe40e..2bc8acff 100644 --- a/makefile +++ b/makefile @@ -150,7 +150,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) # Look for package built from tcpdump.org sources with default install target LIBPATH += /usr/local/lib INCPATH += /usr/local/include - LIBEXTSAVE = $(LIBEXT) + LIBEXTSAVE := $(LIBEXT) LIBEXT = a ifneq (,$(call find_lib,pcap)) ifneq (,$(call find_include,pcap)) From 6079add9e78292d4df4ae3ee1421cdc6f687572f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 10 Jan 2012 20:18:12 -0800 Subject: [PATCH 02/14] make output of 'show show' command consistent with other help output (lowercase primary commands). --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 65ff2658..56122651 100644 --- a/scp.c +++ b/scp.c @@ -2168,7 +2168,7 @@ if (dptr->modifiers) { continue; if (any++) fprintf (st, ", %s", mptr->pstring); - else fprintf (st, "SHOW %s\t%s", sim_dname (dptr), mptr->pstring); + else fprintf (st, "sh{ow} %s\t%s", sim_dname (dptr), mptr->pstring); } } if (any) From 5263a9e9064995dbeb5ab2f4a5c21c1695ea692b Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 11 Jan 2012 10:58:00 -0800 Subject: [PATCH 03/14] Added a sanity check to validate the modify time of the simulator image being restored by the 'restore' command with respect to the modify times of any files which are attached during the restore operation. The logic here is based on the idea that a restore image contains the memory content for a running simulator, while the attached files contain the disk contents for that simulator. If the disk contents have changed since the memory image was created then the two data sets are likely out of sync and disk details cached in memory (i.e. file system information, storage allocation, etc.) will likely result in corrupted disk structures if they are used. The default behavior is to fail the restore operation if these inconsistencies are noticed. This sanity check can be overridden if the restore command is invoked with the '-F' switch: sim> restore -F simulator-state.file Also added logging of all erro messages produced during a restore operation to both stdout and a simulator log file if it is being used. --- Visual Studio Projects/ALTAIR.vcproj | 4 +- Visual Studio Projects/AltairZ80.vcproj | 4 +- Visual Studio Projects/BuildROMs.vcproj | 4 +- Visual Studio Projects/ECLIPSE.vcproj | 4 +- Visual Studio Projects/GRI.vcproj | 4 +- Visual Studio Projects/H316.vcproj | 4 +- Visual Studio Projects/HP2100.vcproj | 4 +- Visual Studio Projects/I1401.vcproj | 4 +- Visual Studio Projects/I1620.vcproj | 4 +- Visual Studio Projects/I7094.vcproj | 4 +- Visual Studio Projects/IBM1130.vcproj | 4 +- Visual Studio Projects/ID16.vcproj | 4 +- Visual Studio Projects/ID32.vcproj | 4 +- Visual Studio Projects/NOVA.vcproj | 4 +- Visual Studio Projects/PDP1.vcproj | 4 +- Visual Studio Projects/PDP10.vcproj | 4 +- Visual Studio Projects/PDP11.vcproj | 4 +- Visual Studio Projects/PDP15.vcproj | 4 +- Visual Studio Projects/PDP18B.vcproj | 4 +- Visual Studio Projects/PDP4.vcproj | 4 +- Visual Studio Projects/PDP7.vcproj | 4 +- Visual Studio Projects/PDP8.vcproj | 4 +- Visual Studio Projects/PDP9.vcproj | 4 +- Visual Studio Projects/S3.vcproj | 4 +- Visual Studio Projects/SDS.vcproj | 4 +- Visual Studio Projects/SWTP.vcproj | 4 +- Visual Studio Projects/VAX.vcproj | 4 +- Visual Studio Projects/VAX780.vcproj | 4 +- Visual Studio Projects/lgp.vcproj | 4 +- scp.c | 58 +++++++++++++++++++++++-- 30 files changed, 113 insertions(+), 61 deletions(-) diff --git a/Visual Studio Projects/ALTAIR.vcproj b/Visual Studio Projects/ALTAIR.vcproj index 59fa3bd7..32f0178e 100644 --- a/Visual Studio Projects/ALTAIR.vcproj +++ b/Visual Studio Projects/ALTAIR.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/AltairZ80.vcproj b/Visual Studio Projects/AltairZ80.vcproj index b5681a54..7f9224c6 100644 --- a/Visual Studio Projects/AltairZ80.vcproj +++ b/Visual Studio Projects/AltairZ80.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../AltairZ80/" - PreprocessorDefinitions="NO_INLINE;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../AltairZ80/" - PreprocessorDefinitions="NO_INLINE;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/BuildROMs.vcproj b/Visual Studio Projects/BuildROMs.vcproj index 349f0e0d..f66ef9f5 100644 --- a/Visual Studio Projects/BuildROMs.vcproj +++ b/Visual Studio Projects/BuildROMs.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/ECLIPSE.vcproj b/Visual Studio Projects/ECLIPSE.vcproj index d92daee7..ba3fe03d 100644 --- a/Visual Studio Projects/ECLIPSE.vcproj +++ b/Visual Studio Projects/ECLIPSE.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../NOVA/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../NOVA/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/GRI.vcproj b/Visual Studio Projects/GRI.vcproj index 811cd8aa..1cf70f12 100644 --- a/Visual Studio Projects/GRI.vcproj +++ b/Visual Studio Projects/GRI.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../GRI/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../GRI/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/H316.vcproj b/Visual Studio Projects/H316.vcproj index 226ea7a8..43ceea9b 100644 --- a/Visual Studio Projects/H316.vcproj +++ b/Visual Studio Projects/H316.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/HP2100.vcproj b/Visual Studio Projects/HP2100.vcproj index 052039da..eaf4fd1a 100644 --- a/Visual Studio Projects/HP2100.vcproj +++ b/Visual Studio Projects/HP2100.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../HP2100/" - PreprocessorDefinitions="HAVE_INT64;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="HAVE_INT64;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../HP2100/" - PreprocessorDefinitions="HAVE_INT64;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="HAVE_INT64;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/I1401.vcproj b/Visual Studio Projects/I1401.vcproj index d1f8f561..8d897993 100644 --- a/Visual Studio Projects/I1401.vcproj +++ b/Visual Studio Projects/I1401.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../I1401/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../I1401/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/I1620.vcproj b/Visual Studio Projects/I1620.vcproj index f24ac970..077b9e52 100644 --- a/Visual Studio Projects/I1620.vcproj +++ b/Visual Studio Projects/I1620.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../I1620/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../I1620/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/I7094.vcproj b/Visual Studio Projects/I7094.vcproj index c96b4579..423bf4b0 100644 --- a/Visual Studio Projects/I7094.vcproj +++ b/Visual Studio Projects/I7094.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS;USE_INT64" + PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS;USE_INT64" + PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/IBM1130.vcproj b/Visual Studio Projects/IBM1130.vcproj index cec64ded..1003e122 100644 --- a/Visual Studio Projects/IBM1130.vcproj +++ b/Visual Studio Projects/IBM1130.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../ibm1130/" - PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../ibm1130/" - PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/ID16.vcproj b/Visual Studio Projects/ID16.vcproj index 162a6fac..d9f4a116 100644 --- a/Visual Studio Projects/ID16.vcproj +++ b/Visual Studio Projects/ID16.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/ID32.vcproj b/Visual Studio Projects/ID32.vcproj index 237c2e7c..b25c1a51 100644 --- a/Visual Studio Projects/ID32.vcproj +++ b/Visual Studio Projects/ID32.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/NOVA.vcproj b/Visual Studio Projects/NOVA.vcproj index 22cb8bc2..e189a05d 100644 --- a/Visual Studio Projects/NOVA.vcproj +++ b/Visual Studio Projects/NOVA.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../NOVA/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../NOVA/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP1.vcproj b/Visual Studio Projects/PDP1.vcproj index 57431cb4..795ef22e 100644 --- a/Visual Studio Projects/PDP1.vcproj +++ b/Visual Studio Projects/PDP1.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../PDP1/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../PDP1/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP10.vcproj b/Visual Studio Projects/PDP10.vcproj index eff6841a..3f67e161 100644 --- a/Visual Studio Projects/PDP10.vcproj +++ b/Visual Studio Projects/PDP10.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../PDP10/;../PDP11/;../VAX/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;VM_PDP10;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" + PreprocessorDefinitions="USE_INT64;VM_PDP10;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -125,7 +125,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../PDP10/;../PDP11/;../VAX/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;VM_PDP10;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" + PreprocessorDefinitions="USE_INT64;VM_PDP10;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP11.vcproj b/Visual Studio Projects/PDP11.vcproj index 30e71620..279d5d65 100644 --- a/Visual Studio Projects/PDP11.vcproj +++ b/Visual Studio Projects/PDP11.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../PDP11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_SHARED;VM_PDP11;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" + PreprocessorDefinitions="USE_SHARED;VM_PDP11;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -125,7 +125,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../PDP11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_SHARED;VM_PDP11;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" + PreprocessorDefinitions="USE_SHARED;VM_PDP11;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP15.vcproj b/Visual Studio Projects/PDP15.vcproj index fb326065..c6329eed 100644 --- a/Visual Studio Projects/PDP15.vcproj +++ b/Visual Studio Projects/PDP15.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP15;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP15;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP15;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP15;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP18B.vcproj b/Visual Studio Projects/PDP18B.vcproj index 5d829a55..b45638e3 100644 --- a/Visual Studio Projects/PDP18B.vcproj +++ b/Visual Studio Projects/PDP18B.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP4.vcproj b/Visual Studio Projects/PDP4.vcproj index 3a5fa23d..51cd5d58 100644 --- a/Visual Studio Projects/PDP4.vcproj +++ b/Visual Studio Projects/PDP4.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP4;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP4;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP4;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP4;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP7.vcproj b/Visual Studio Projects/PDP7.vcproj index dce8d70e..406f59f6 100644 --- a/Visual Studio Projects/PDP7.vcproj +++ b/Visual Studio Projects/PDP7.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP7;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP7;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP7;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP7;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP8.vcproj b/Visual Studio Projects/PDP8.vcproj index 26335916..4b0da1b8 100644 --- a/Visual Studio Projects/PDP8.vcproj +++ b/Visual Studio Projects/PDP8.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../PDP8/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../PDP8/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDP9.vcproj b/Visual Studio Projects/PDP9.vcproj index 7bec5514..6e33e1f3 100644 --- a/Visual Studio Projects/PDP9.vcproj +++ b/Visual Studio Projects/PDP9.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP9;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP9;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../;../PDP18B/" - PreprocessorDefinitions="PDP9;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="PDP9;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/S3.vcproj b/Visual Studio Projects/S3.vcproj index fba7a787..87accecc 100644 --- a/Visual Studio Projects/S3.vcproj +++ b/Visual Studio Projects/S3.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../S3/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../S3/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/SDS.vcproj b/Visual Studio Projects/SDS.vcproj index d1c3ff9c..da48167f 100644 --- a/Visual Studio Projects/SDS.vcproj +++ b/Visual Studio Projects/SDS.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../SDS/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../SDS/" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/SWTP.vcproj b/Visual Studio Projects/SWTP.vcproj index ca490ae2..4bbaf463 100644 --- a/Visual Studio Projects/SWTP.vcproj +++ b/Visual Studio Projects/SWTP.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/VAX.vcproj b/Visual Studio Projects/VAX.vcproj index bfc0e91c..4ff80430 100644 --- a/Visual Studio Projects/VAX.vcproj +++ b/Visual Studio Projects/VAX.vcproj @@ -45,7 +45,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" + PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" KeepComments="false" MinimalRebuild="true" BasicRuntimeChecks="0" @@ -135,7 +135,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" + PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" KeepComments="false" StringPooling="true" RuntimeLibrary="0" diff --git a/Visual Studio Projects/VAX780.vcproj b/Visual Studio Projects/VAX780.vcproj index e0139d7a..c16c1f0a 100644 --- a/Visual Studio Projects/VAX780.vcproj +++ b/Visual Studio Projects/VAX780.vcproj @@ -45,7 +45,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_780;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" + PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_780;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" MinimalRebuild="true" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -134,7 +134,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;../../winpcap/Wpdpack/Include;"../../pthreads/Pre-built.2/include"" - PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_780;USE_SHARED;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" + PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_780;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_READER_THREAD;SIM_ASYNCH_IO" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/lgp.vcproj b/Visual Studio Projects/lgp.vcproj index cf6d7156..4e9745ea 100644 --- a/Visual Studio Projects/lgp.vcproj +++ b/Visual Studio Projects/lgp.vcproj @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -124,7 +124,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/scp.c b/scp.c index 56122651..2bc28be9 100644 --- a/scp.c +++ b/scp.c @@ -212,6 +212,7 @@ #include #include #include +#include #if defined(HAVE_DLOPEN) /* Dynamic Readline support */ #include @@ -2819,12 +2820,15 @@ t_bool v35, v32; DEVICE *dptr; UNIT *uptr; REG *rptr; +struct stat rstat; +t_bool force_restore = sim_switches & SWMASK ('F'); #define READ_S(xx) if (read_line ((xx), CBUFSIZE, rfile) == NULL) \ return SCPE_IOERR; #define READ_I(xx) if (sim_fread (&xx, sizeof (xx), 1, rfile) == 0) \ return SCPE_IOERR; +fstat (fileno (rfile), &rstat); READ_S (buf); /* [V2.5+] read version */ v35 = v32 = FALSE; if (strcmp (buf, save_vercur) == 0) /* version 3.5? */ @@ -2833,22 +2837,30 @@ else if (strcmp (buf, save_ver32) == 0) /* version 3.2? */ v32 = TRUE; else if (strcmp (buf, save_ver30) != 0) { /* version 3.0? */ printf ("Invalid file version: %s\n", buf); + if (sim_log) + fprintf (sim_log, "Invalid file version: %s\n", buf); return SCPE_INCOMP; } READ_S (buf); /* read sim name */ if (strcmp (buf, sim_name)) { /* name match? */ printf ("Wrong system type: %s\n", buf); + if (sim_log) + fprintf (sim_log, "Wrong system type: %s\n", buf); return SCPE_INCOMP; } if (v35) { /* [V3.5+] options */ READ_S (buf); /* integer size */ if (strcmp (buf, sim_si64) != 0) { printf ("Incompatible integer size, save file = %s\n", buf); + if (sim_log) + fprintf (sim_log, "Incompatible integer size, save file = %s\n", buf); return SCPE_INCOMP; } READ_S (buf); /* address size */ if (strcmp (buf, sim_sa64) != 0) { printf ("Incompatible address size, save file = %s\n", buf); + if (sim_log) + fprintf (sim_log, "Incompatible address size, save file = %s\n", buf); return SCPE_INCOMP; } READ_S (buf); /* Ethernet */ @@ -2866,6 +2878,8 @@ for ( ;; ) { /* device loop */ break; if ((dptr = find_dev (buf)) == NULL) { /* locate device */ printf ("Invalid device name: %s\n", buf); + if (sim_log) + fprintf (sim_log, "Invalid device name: %s\n", buf); return SCPE_INCOMP; } READ_S (buf); /* [V3.0+] logical name */ @@ -2886,6 +2900,8 @@ for ( ;; ) { /* device loop */ break; if ((uint32) unitno >= dptr->numunits) { /* too big? */ printf ("Invalid unit number: %s%d\n", sim_dname (dptr), unitno); + if (sim_log) + fprintf (sim_log, "Invalid unit number: %s%d\n", sim_dname (dptr), unitno); return SCPE_INCOMP; } READ_I (time); /* event time */ @@ -2936,6 +2952,8 @@ for ( ;; ) { /* device loop */ if (((uptr->flags & (UNIT_FIX + UNIT_ATTABLE)) != UNIT_FIX) || (dptr->deposit == NULL)) { printf ("Can't restore memory: %s%d\n", sim_dname (dptr), unitno); + if (sim_log) + fprintf (sim_log, "Can't restore memory: %s%d\n", sim_dname (dptr), unitno); return SCPE_INCOMP; } if (high != old_capac) { /* size change? */ @@ -2945,12 +2963,20 @@ for ( ;; ) { /* device loop */ (dptr->msize (uptr, (int32) high, NULL, NULL) != SCPE_OK))) { printf ("Can't change memory size: %s%d\n", sim_dname (dptr), unitno); + if (sim_log) + fprintf (sim_log, "Can't change memory size: %s%d\n", + sim_dname (dptr), unitno); return SCPE_INCOMP; } uptr->capac = high; /* new memory size */ printf ("Memory size changed: %s%d = ", sim_dname (dptr), unitno); fprint_capac (stdout, dptr, uptr); printf ("\n"); + if (sim_log) { + fprintf (sim_log, "Memory size changed: %s%d = ", sim_dname (dptr), unitno); + fprint_capac (sim_log, dptr, uptr); + fprintf (sim_log, "\n"); + } } sz = SZ_D (dptr); /* allocate buffer */ if ((mbuf = calloc (SRBSIZ, sz)) == NULL) @@ -2981,19 +3007,28 @@ for ( ;; ) { /* device loop */ READ_I (depth); /* [V2.10+] depth */ if ((rptr = find_reg (buf, NULL, dptr)) == NULL) { printf ("Invalid register name: %s %s\n", sim_dname (dptr), buf); + if (sim_log) + fprintf (sim_log, "Invalid register name: %s %s\n", sim_dname (dptr), buf); for (us = 0; us < depth; us++) { /* skip values */ READ_I (val); } continue; } - if (depth != rptr->depth) /* [V2.10+] mismatch? */ + if (depth != rptr->depth) { /* [V2.10+] mismatch? */ printf ("Register depth mismatch: %s %s, file = %d, sim = %d\n", sim_dname (dptr), buf, depth, rptr->depth); + if (sim_log) + fprintf (sim_log, "Register depth mismatch: %s %s, file = %d, sim = %d\n", + sim_dname (dptr), buf, depth, rptr->depth); + } mask = width_mask[rptr->width]; /* get mask */ for (us = 0; us < depth; us++) { /* loop thru values */ READ_I (val); /* read value */ - if (val > mask) /* value ok? */ + if (val > mask) { /* value ok? */ printf ("Invalid register value: %s %s\n", sim_dname (dptr), buf); + if (sim_log) + fprintf (sim_log, "Invalid register value: %s %s\n", sim_dname (dptr), buf); + } else if (us < rptr->depth) /* in range? */ put_rval (rptr, us, val); } @@ -3004,11 +3039,28 @@ for ( ;; ) { /* device loop */ may depend on the state of the device (in registers) to work correctly */ for (j=0, r = SCPE_OK; j rstat.st_mtime + 30) { + r = SCPE_INCOMP; + printf ("Error Attaching %s to %s - the restore state is %d seconds older than the attach file\n", sim_dname (dptr), attnames[j], (int)(fstat.st_mtime - rstat.st_mtime)); + printf ("restore with the -F switch to override this sanity check\n"); + if (sim_log) { + fprintf (sim_log, "Error Attaching %s to %s - the restore state is %d seconds older than the attach file\n", sim_dname (dptr), attnames[j], (int)(fstat.st_mtime - rstat.st_mtime)); + fprintf (sim_log, "restore with the -F switch to override this sanity check\n"); + } + continue; + } sim_switches = attswitches[j]; r = scp_attach_unit (dptr, attunits[j], attnames[j]);/* reattach unit */ - if (r != SCPE_OK) + if (r != SCPE_OK) { printf ("Error Attaching %s to %s\n", sim_dname (dptr), attnames[j]); + if (sim_log) + fprintf (sim_log, "Error Attaching %s to %s\n", sim_dname (dptr), attnames[j]); + } } free (attnames[j]); } From 3443839ba7e5f3ff39cd3e12158ce21c1314d174 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 13 Jan 2012 02:32:28 -0800 Subject: [PATCH 04/14] Fixed disk I/O which didn't work when Asynch I/O was dynamically disabled by scp command 'set noasync' --- sim_disk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sim_disk.c b/sim_disk.c index 2325aa19..c431601b 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -126,7 +126,7 @@ struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx; \ if ((!callback) || !ctx->asynch_io) #define AIO_CALL(op, _lba, _buf, _rsects, _sects, _callback) \ - if (1) { \ + if (ctx->asynch_io) { \ struct disk_context *ctx = \ (struct disk_context *)uptr->disk_ctx; \ \ @@ -146,7 +146,10 @@ if ((!callback) || !ctx->asynch_io) ctx->callback = _callback; \ pthread_cond_signal (&ctx->io_cond); \ pthread_mutex_unlock (&ctx->io_lock); \ - } + } \ + else \ + if (_callback) \ + (_callback) (uptr, r); #define DOP_DONE 0 /* close */ From 3172e743ee3ffab79a1f011a47e9c0c37aeda53d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 13 Jan 2012 10:51:26 -0800 Subject: [PATCH 05/14] Normalized the saved format of the optional VAX TODR persistent file so that it may be moved around from one platform to another along with other simulator state files (disk & tape images, save/restore files, etc.). --- VAX/vax_stddev.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/VAX/vax_stddev.c b/VAX/vax_stddev.c index 254f4080..af05fb8b 100644 --- a/VAX/vax_stddev.c +++ b/VAX/vax_stddev.c @@ -27,6 +27,10 @@ tto terminal output clk 100Hz and TODR clock + 13-Jan-12 MP Normalized the saved format of the TODR persistent + file so that it may be moved around from one platform + to another along with other simulator state files + (disk & tape images, save/restore files, etc.) 28-Sep-11 MP Generalized setting TODR for all OSes. Unbound the TODR value from the 100hz clock tick interrupt. TODR now behaves like the original @@ -49,9 +53,10 @@ (i.e. sim> attach TODR TOY_CLOCK). When operating in OS Agnostic mode, the TODR will initially start counting from 0 and be adjusted differently when an - OS specifically writes to the TODR. VMS will prompt - to set the time on each boot unless the SYSGEN - parameter TIMEPROMPTWAIT is set to 0. + OS specifically writes to the TODR. On the first OS + boot with an attached TODR VMS will prompt to set + the time unless the SYSGEN parameter TIMEPROMPTWAIT + is set to 0. 05-Jan-11 MP Added Asynch I/O support 17-Aug-08 RMS Resync TODR on any clock reset 18-Jun-07 RMS Added UNIT_IDLE flag to console input, clock @@ -96,6 +101,8 @@ int32 clk_tps = 100; /* ticks/second */ int32 todr_reg = 0; /* TODR register */ int32 todr_blow = 1; /* TODR battery low */ struct todr_battery_info { + char toy_gmtbase_a[16]; /* Platform independent Text format of toy_gmtbase */ + char toy_gmtbasemsec_a[16]; /* Platform independent Text format of toy_gmtbasemsec */ uint32 toy_gmtbase; /* GMT base of set value */ uint32 toy_gmtbasemsec; /* The milliseconds of the set value */ }; @@ -422,6 +429,8 @@ if (0 == todr_reg) /* clock running? */ #define TOY_MAX_SECS (0x40000000/25) clock_gettime(CLOCK_REALTIME, &now); /* get curr time */ +toy->toy_gmtbase = strtoul(toy->toy_gmtbase_a, NULL, 0); +toy->toy_gmtbasemsec = strtoul(toy->toy_gmtbasemsec_a, NULL, 0); base.tv_sec = toy->toy_gmtbase; base.tv_nsec = toy->toy_gmtbasemsec * 1000000; sim_timespec_diff (&val, &now, &base); @@ -446,8 +455,10 @@ if (-1 == clock_gettime(CLOCK_REALTIME, &now)) /* get curr time */ val.tv_sec = ((uint32)data) / 100; val.tv_nsec = (((uint32)data) % 100) * 10000000; sim_timespec_diff (&base, &now, &val); /* base = now - data */ -toy->toy_gmtbase = base.tv_sec; +toy->toy_gmtbase = (uint32)base.tv_sec; toy->toy_gmtbasemsec = base.tv_nsec/1000000; +sprintf(toy->toy_gmtbase_a, "0x%08X", toy->toy_gmtbase); +sprintf(toy->toy_gmtbasemsec_a, "0x%08X", toy->toy_gmtbasemsec); todr_reg = data; if (data) todr_blow = 0; From 6b6d7cccaca3a79073cb5a31722f328875fba3f4 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 13 Jan 2012 15:23:53 -0800 Subject: [PATCH 06/14] Refined description of Asynch I/O build support. --- Visual Studio Projects/0ReadMe_Projects.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Visual Studio Projects/0ReadMe_Projects.txt b/Visual Studio Projects/0ReadMe_Projects.txt index 19baa7c6..29aa367d 100644 --- a/Visual Studio Projects/0ReadMe_Projects.txt +++ b/Visual Studio Projects/0ReadMe_Projects.txt @@ -44,7 +44,15 @@ simulator. The default working directory for included project files is the "Visual Studio Projects" directory. -Only network devices are capable of using pthreads to enhance their -performance. Build the desire simulator with USE_READER_THREAD defined. The -relevant simulators which have network support are VAX, VAX780 and PDP11. +Network devices are capable of using pthreads to enhance their performance. +To realize these benefits, you must build the desire simulator with +USE_READER_THREAD defined. The relevant simulators which have network +support are VAX, VAX780 and PDP11. + +Additionally, simulators which contain devices which use the asynchronous +APIs in sim_disk.c and sim_tape.c can also achieve greater performance by +leveraging pthreads to perform blocking I/O in separate threads. Currently +the simulators which have such devices are VAX, VAX780 and PDP11. To +achieve these benefits the simulators must be built with SIM_ASYNCH_IO +defined. From d4c83e5f46e07619c2bbe7e975f05999d9da7832 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 13 Jan 2012 15:32:51 -0800 Subject: [PATCH 07/14] Make sure that the correct struct timespec definition (which the pthreads APIs will need) is known before we define our own. --- sim_timer.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sim_timer.h b/sim_timer.h index 56896f92..f628b2fd 100644 --- a/sim_timer.h +++ b/sim_timer.h @@ -31,21 +31,28 @@ #ifndef _SIM_TIMER_H_ #define _SIM_TIMER_H_ 0 +/* Pick up a struct timespec definition if it is available */ #include +#if defined(SIM_ASYNCH_IO) || defined(USE_READER_THREAD) +#include +#endif #if defined (__APPLE__) #define HAVE_STRUCT_TIMESPEC 1 /* OSX defined the structure but doesn't tell us */ #endif -#ifndef CLOCK_REALTIME +#if !defined(CLOCK_REALTIME) #define CLOCK_REALTIME 1 #define NEED_CLOCK_GETTIME 1 -#ifndef HAVE_STRUCT_TIMESPEC +#if !defined(HAVE_STRUCT_TIMESPEC) #define HAVE_STRUCT_TIMESPEC 1 +#if !defined(_TIMESPEC_DEFINED) +#define _TIMESPEC_DEFINED struct timespec { - long tv_sec; - long tv_nsec; + long tv_sec; + long tv_nsec; }; +#endif /* _TIMESPEC_DEFINED */ #endif /* HAVE_STRUCT_TIMESPEC */ int clock_gettime(int clock_id, struct timespec *tp); #endif From 01337fe114a5573d10f512481e892fbce5c94dca Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 14 Jan 2012 06:26:59 -0800 Subject: [PATCH 08/14] Fixed tape I/O which didn't work when Asynch I/O was dynamically disabled by scp command 'set noasync' --- sim_tape.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sim_tape.c b/sim_tape.c index a71aa54b..c6ee3cae 100644 --- a/sim_tape.c +++ b/sim_tape.c @@ -146,7 +146,7 @@ struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx; \ if ((!callback) || !ctx->asynch_io) #define AIO_CALL(op, _buf, _bc, _fc, _max, _vbc, _gaplen, _bpi, _obj, _callback)\ - if (1) { \ + if (ctx->asynch_io) { \ struct tape_context *ctx = \ (struct tape_context *)uptr->tape_ctx; \ \ @@ -167,7 +167,10 @@ if ((!callback) || !ctx->asynch_io) ctx->objupdate = _obj; \ ctx->callback = _callback; \ pthread_cond_signal (&ctx->io_cond); \ - } + } \ + else \ + if (_callback) \ + (_callback) (uptr, r); #define TOP_DONE 0 /* close */ #define TOP_RDRF 1 /* sim_tape_rdrecf_a */ #define TOP_RDRR 2 /* sim_tape_rdrecr_a */ From aa7c50eb38c05141fb761c8af5f2a828dc28651a Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 17 Jan 2012 04:09:34 -0800 Subject: [PATCH 09/14] Compiler cleanup for issues noticed during x64 compiles --- scp.c | 19 ++++++++++--------- sim_disk.c | 20 ++++++++++---------- sim_fio.c | 6 +++--- sim_sock.c | 6 +++--- sim_sock.h | 2 +- sim_tape.c | 7 ++++--- sim_tmxr.c | 10 +++++----- 7 files changed, 36 insertions(+), 34 deletions(-) diff --git a/scp.c b/scp.c index 2bc28be9..86a8680e 100644 --- a/scp.c +++ b/scp.c @@ -1826,7 +1826,7 @@ return SCPE_OK; t_stat show_unit (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag) { -int32 u = uptr - dptr->units; +int32 u = (int32)(uptr - dptr->units); if (flag > 1) fprintf (st, " %s%d", sim_dname (dptr), u); @@ -2460,7 +2460,7 @@ if (uptr->flags & UNIT_BUFABLE) { /* buffer? */ if (uptr->filebuf == NULL) /* no buffer? */ return attach_err (uptr, SCPE_MEM); /* error */ if (!sim_quiet) printf ("%s: buffering file in memory\n", sim_dname (dptr)); - uptr->hwmark = sim_fread (uptr->filebuf, /* read file */ + uptr->hwmark = (uint32)sim_fread (uptr->filebuf, /* read file */ SZ_D (dptr), cap, uptr->fileref); uptr->flags = uptr->flags | UNIT_BUF; /* set buffered */ } @@ -2985,7 +2985,7 @@ for ( ;; ) { /* device loop */ READ_I (blkcnt); /* block count */ if (blkcnt < 0) /* compressed? */ limit = -blkcnt; - else limit = sim_fread (mbuf, sz, blkcnt, rfile); + else limit = (int32)sim_fread (mbuf, sz, blkcnt, rfile); if (limit <= 0) /* invalid or err? */ return SCPE_IOERR; for (j = 0; j < limit; j++, k = k + (dptr->aincr)) { @@ -3766,7 +3766,7 @@ for (i = 0, j = addr; i < sim_emax; i++, j = j + dptr->aincr) { SZ_LOAD (sz, sim_eval[i], uptr->filebuf, loc); } else { - sim_fseek (uptr->fileref, sz * loc, SEEK_SET); + sim_fseek (uptr->fileref, (t_addr)(sz * loc), SEEK_SET); sim_fread (&sim_eval[i], sz, 1, uptr->fileref); if ((feof (uptr->fileref)) && !(uptr->flags & UNIT_FIX)) { @@ -3857,7 +3857,7 @@ for (i = 0, j = addr; i < count; i++, j = j + dptr->aincr) { uptr->hwmark = (uint32) loc + 1; } else { - sim_fseek (uptr->fileref, sz * loc, SEEK_SET); + sim_fseek (uptr->fileref, (t_addr)(sz * loc), SEEK_SET); sim_fwrite (&sim_eval[i], sz, 1, uptr->fileref); if (ferror (uptr->fileref)) { clearerr (uptr->fileref); @@ -4384,7 +4384,7 @@ REG *find_reg (char *cptr, char **optr, DEVICE *dptr) { char *tptr; REG *rptr; -uint32 slnt; +size_t slnt; if ((cptr == NULL) || (dptr == NULL) || (dptr->registers == NULL)) return NULL; @@ -4569,7 +4569,8 @@ return pptr; SCHTAB *get_search (char *cptr, int32 radix, SCHTAB *schptr) { -int32 c, logop, cmpop; +int32 c; +size_t logop, cmpop; t_value logval, cmpval; char *sptr, *tptr; const char logstr[] = "|&^", cmpstr[] = "=!><"; @@ -4599,11 +4600,11 @@ for (logop = cmpop = -1; c = *cptr++; ) { /* loop thru clauses */ else return NULL; } /* end for */ if (logop >= 0) { - schptr->logic = logop; + schptr->logic = (int32)logop; schptr->mask = logval; } if (cmpop >= 0) { - schptr->boolop = cmpop; + schptr->boolop = (int32)cmpop; schptr->comp = cmpval; } return schptr; diff --git a/sim_disk.c b/sim_disk.c index c431601b..2f852262 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -473,7 +473,7 @@ if (!err) { memset (&buf[i*ctx->xfer_element_size], 0, tbc-(i*ctx->xfer_element_size)); err = ferror (uptr->fileref); if ((!err) && (sectsread)) - *sectsread = (i*ctx->xfer_element_size+ctx->sector_size-1)/ctx->sector_size; + *sectsread = (t_seccnt)((i*ctx->xfer_element_size+ctx->sector_size-1)/ctx->sector_size); } return err; } @@ -587,7 +587,7 @@ if (!err) { i = sim_fwrite (buf, ctx->xfer_element_size, tbc/ctx->xfer_element_size, uptr->fileref); err = ferror (uptr->fileref); if ((!err) && (sectswritten)) - *sectswritten = (i*ctx->xfer_element_size+ctx->sector_size-1)/ctx->sector_size; + *sectswritten = (t_seccnt)((i*ctx->xfer_element_size+ctx->sector_size-1)/ctx->sector_size); } return err; } @@ -826,7 +826,7 @@ if (sim_switches & SWMASK ('C')) { /* create vhd disk & cop else { uint8 *copy_buf = malloc (1024*1024); t_lba lba; - t_seccnt sectors_per_buffer = (1024*1024)/sector_size; + t_seccnt sectors_per_buffer = (t_seccnt)((1024*1024)/sector_size); t_lba total_sectors = (t_lba)(uptr->capac/sector_size); t_seccnt sects = sectors_per_buffer; @@ -894,12 +894,12 @@ uptr->disk_ctx = ctx = (struct disk_context *)calloc(1, sizeof(struct disk_conte if ((uptr->filename == NULL) || (uptr->disk_ctx == NULL)) return _err_return (uptr, SCPE_MEM); strncpy (uptr->filename, cptr, CBUFSIZE); /* save name */ -ctx->sector_size = sector_size; /* save sector_size */ -ctx->xfer_element_size = xfer_element_size; /* save xfer_element_size */ +ctx->sector_size = (uint32)sector_size; /* save sector_size */ +ctx->xfer_element_size = (uint32)xfer_element_size; /* save xfer_element_size */ ctx->dptr = dptr; /* save DEVICE pointer */ ctx->dbit = dbit; /* save debug bit */ ctx->auto_format = auto_format; /* save that we auto selected format */ -ctx->storage_sector_size = sector_size; /* Default */ +ctx->storage_sector_size = (uint32)sector_size; /* Default */ if (sim_switches & SWMASK ('R')) { /* read only? */ if ((uptr->flags & UNIT_ROABLE) == 0) /* allowed? */ return _err_return (uptr, SCPE_NORO); /* no, error */ @@ -1470,7 +1470,7 @@ if (Removable) { return TRUE; } -static t_stat sim_os_disk_info_raw (FILE *Disk, size_t *sector_size, uint32 *removable) +static t_stat sim_os_disk_info_raw (FILE *Disk, uint32 *sector_size, uint32 *removable) { DWORD IoctlReturnSize; #ifndef __GNUC__ @@ -2822,7 +2822,7 @@ ExpandToFullPath (const char *szFileSpec, size_t BufferSize) { #ifdef _WIN32 -GetFullPathNameA (szFileSpec, BufferSize, szFullFileSpecBuffer, NULL); +GetFullPathNameA (szFileSpec, (DWORD)BufferSize, szFullFileSpecBuffer, NULL); #else strncpy (szFullFileSpecBuffer, szFileSpec, BufferSize); #endif @@ -2905,14 +2905,14 @@ hVHD->Dynamic.ParentLocatorEntries[6].PlatformDataOffset = NtoHll (LocatorPositi if (RelativeMatch) { memcpy (hVHD->Dynamic.ParentLocatorEntries[5].PlatformCode, "W2ru", 4); hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataSpace = NtoHl (BytesPerSector); - hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataLength = NtoHl (2*strlen(RelativeParentVHDPath)); + hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataLength = NtoHl ((uint32)(2*strlen(RelativeParentVHDPath))); hVHD->Dynamic.ParentLocatorEntries[5].Reserved = 0; hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector); ++LocatorsWritten; } memcpy (hVHD->Dynamic.ParentLocatorEntries[4].PlatformCode, "W2ku", 4); hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataSpace = NtoHl (BytesPerSector); -hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataLength = NtoHl (2*strlen(FullParentVHDPath)); +hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataLength = NtoHl ((uint32)(2*strlen(FullParentVHDPath))); hVHD->Dynamic.ParentLocatorEntries[4].Reserved = 0; hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector); ++LocatorsWritten; diff --git a/sim_fio.c b/sim_fio.c index 671e8f39..c80c8020 100644 --- a/sim_fio.c +++ b/sim_fio.c @@ -96,7 +96,7 @@ if (sim_end || (count == 0) || (size == sizeof (char))) return; for (j = 0, dptr = sptr = (unsigned char *) bptr; /* loop on items */ j < count; j++) { - for (k = size - 1; k >= (((int32) size + 1) / 2); k--) { + for (k = (int32)(size - 1); k >= (((int32) size + 1) / 2); k--) { by = *sptr; /* swap end-for-end */ *sptr++ = *(dptr + k); *(dptr + k) = by; @@ -130,7 +130,7 @@ if (sim_end || (size == sizeof (char))) { return; } for (j = 0; j < count; j++) { /* loop on items */ - for (k = size - 1; k >= 0; k--) + for (k = (int32)(size - 1); k >= 0; k--) *(dptr + k) = *sptr++; dptr = dptr + size; } @@ -153,7 +153,7 @@ if (lcnt) nbuf = nbuf + 1; else lcnt = nelem; total = 0; sptr = (unsigned char *) bptr; /* init input ptr */ -for (i = nbuf; i > 0; i--) { /* loop on buffers */ +for (i = (int32)nbuf; i > 0; i--) { /* loop on buffers */ c = (i == 1)? lcnt: nelem; sim_buf_copy_swapped (sim_flip, sptr, size, c); sptr = sptr + size * count; diff --git a/sim_sock.c b/sim_sock.c index 63c0f573..027f7f1d 100644 --- a/sim_sock.c +++ b/sim_sock.c @@ -90,7 +90,7 @@ void sim_close_sock (SOCKET sock, t_bool master) return; } -SOCKET sim_setnonblock (SOCKET sock) +int32 sim_setnonblock (SOCKET sock) { return SOCKET_ERROR; } @@ -289,7 +289,7 @@ return; } #if defined (_WIN32) /* Windows */ -SOCKET sim_setnonblock (SOCKET sock) +int32 sim_setnonblock (SOCKET sock) { unsigned long non_block = 1; @@ -297,7 +297,7 @@ return ioctlsocket (sock, FIONBIO, &non_block); /* set nonblocking */ } #elif defined (VMS) /* VMS */ -SOCKET sim_setnonblock (SOCKET sock) +int32 sim_setnonblock (SOCKET sock) { int non_block = 1; diff --git a/sim_sock.h b/sim_sock.h index 5d469519..d8531cbe 100644 --- a/sim_sock.h +++ b/sim_sock.h @@ -83,6 +83,6 @@ int32 sim_check_conn (SOCKET sock, t_bool rd); int32 sim_read_sock (SOCKET sock, char *buf, int32 nbytes); int32 sim_write_sock (SOCKET sock, char *msg, int32 nbytes); void sim_close_sock (SOCKET sock, t_bool master); -SOCKET sim_setnonblock (SOCKET sock); +int32 sim_setnonblock (SOCKET sock); #endif diff --git a/sim_tape.c b/sim_tape.c index c6ee3cae..fd7003fe 100644 --- a/sim_tape.c +++ b/sim_tape.c @@ -764,7 +764,7 @@ if (rbc > max) { /* rec out of range? */ uptr->pos = opos; return MTSE_INVRL; } -i = sim_fread (buf, sizeof (uint8), rbc, uptr->fileref);/* read record */ +i = (t_mtrlnt)sim_fread (buf, sizeof (uint8), rbc, uptr->fileref);/* read record */ if (ferror (uptr->fileref)) { /* error? */ MT_SET_PNU (uptr); uptr->pos = opos; @@ -823,7 +823,7 @@ if (st = sim_tape_rdlntr (uptr, &tbc)) /* read rec lnt */ *bc = rbc = MTR_L (tbc); /* strip error flag */ if (rbc > max) /* rec out of range? */ return MTSE_INVRL; -i = sim_fread (buf, sizeof (uint8), rbc, uptr->fileref);/* read record */ +i = (t_mtrlnt)sim_fread (buf, sizeof (uint8), rbc, uptr->fileref);/* read record */ if (ferror (uptr->fileref)) /* error? */ return sim_tape_ioerr (uptr); for ( ; i < rbc; i++) /* fill with 0's */ @@ -1765,7 +1765,8 @@ uint32 sim_tape_tpc_map (UNIT *uptr, t_addr *map) { t_addr tpos; t_tpclnt bc; -uint32 i, objc; +size_t i; +uint32 objc; if ((uptr == NULL) || (uptr->fileref == NULL)) return 0; diff --git a/sim_tmxr.c b/sim_tmxr.c index 1fc4b25f..4cb866de 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -212,14 +212,14 @@ if (newsock != INVALID_SOCKET) { /* got a live one? */ lp->cnms = sim_os_msec (); /* time of conn */ if (!mp->buffered) { lp->txbpi = 0; /* init buf pointers */ - lp->txbpr = lp->txbsz - strlen (msgbuf); + lp->txbpr = (int32)(lp->txbsz - strlen (msgbuf)); lp->rxcnt = lp->txcnt = lp->txdrp = 0; /* init counters */ } else if (lp->txcnt > lp->txbsz) lp->txbpr = (lp->txbpi + 1) % lp->txbsz; else - lp->txbpr = lp->txbsz - strlen (msgbuf); + lp->txbpr = (int32)(lp->txbsz - strlen (msgbuf)); lp->tsta = 0; /* init telnet state */ lp->xmte = 1; /* enable transmit */ lp->dstb = 0; /* default bin mode */ @@ -228,7 +228,7 @@ if (newsock != INVALID_SOCKET) { /* got a live one? */ tmxr_linemsg (lp, msgbuf); /* beginning of buffer */ lp->txbpi = psave; /* restore insertion pointer */ tmxr_poll_tx (mp); /* flush output */ - lp->txcnt -= strlen (msgbuf); /* adjust statistics */ + lp->txcnt -= (int32)strlen (msgbuf); /* adjust statistics */ return i; } } /* end if newsock */ @@ -752,7 +752,7 @@ return SCPE_NOFNC; void tmxr_msg (SOCKET sock, char *msg) { if (sock) - sim_write_sock (sock, msg, strlen (msg)); + sim_write_sock (sock, msg, (int32)strlen (msg)); return; } @@ -760,7 +760,7 @@ void tmxr_linemsg (TMLN *lp, char *msg) { int32 len; -for (len = strlen (msg); len > 0; --len) +for (len = (int32)strlen (msg); len > 0; --len) tmxr_putc_ln (lp, *msg++); return; } From 3e8b43b4c6b1ba0d30ebb0363efa52e49be13733 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 24 Jan 2012 10:02:13 -0800 Subject: [PATCH 10/14] Added description of all the required linux packages to perform a proper build --- 0readme_ethernet.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/0readme_ethernet.txt b/0readme_ethernet.txt index 225f5be0..fa1ea8b3 100644 --- a/0readme_ethernet.txt +++ b/0readme_ethernet.txt @@ -51,6 +51,8 @@ The following steps were performed to get a working SIMH vax simulator sharing a physical NIC and allowing Host<->SIMH vax communications: Linux (Ubuntu 10.04): + apt-get install make + apt-get install libpcap-dev apt-get install bridge-utils apt-get install uml-utilities From 7a558a4e63581a965232aa6f1099a6809bfe58c9 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 24 Jan 2012 10:12:26 -0800 Subject: [PATCH 11/14] Added support for Logical End of Tape (EOT) detection when required --- PDP11/pdp11_tq.c | 11 +++++++++-- sim_tape.c | 37 ++++++++++++++++++++++++++++--------- sim_tape.h | 8 ++++++-- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/PDP11/pdp11_tq.c b/PDP11/pdp11_tq.c index ce1d79f8..2fbf5ed9 100644 --- a/PDP11/pdp11_tq.c +++ b/PDP11/pdp11_tq.c @@ -25,6 +25,8 @@ tq TQK50 tape controller + 23-Jan-12 MP Added missing support for Logical EOT detection while + positioning. 05-Mar-11 MP Added missing state for proper save/restore 01-Mar-11 MP - Migrated complex physical tape activities to sim_tape - adopted use of asynch I/O interfaces from sim_tape @@ -1451,11 +1453,13 @@ switch (cmd) { /* case on command */ sim_tape_position_a (uptr, ((mdf & MD_RWD) ? MTPOS_M_REW : 0) | ((mdf & MD_REV) ? MTPOS_M_REV : 0) | - ((mdf & MD_OBC) ? MTPOS_M_OBJ : 0) , + ((mdf & MD_OBC) ? MTPOS_M_OBJ : 0) | + (((mdf & MD_DLE) && !(mdf & MD_REV)) ? MTPOS_M_DLE : 0), nrec, &res->skrec, ntmk, &res->sktmk, (uint32 *)&res->objupd, tq_io_complete); return SCPE_OK; } - if (res->io_status) + res->sts = tq_map_status (uptr, res->io_status); + if ((res->io_status != MTSE_OK) && (res->io_status != MTSE_BOT) && (res->io_status != MTSE_LEOT)) return tq_mot_err (uptr, 0); /* log, end */ sim_debug (DBG_REQ, &tq_dev, "Position Done: mdf=0x%04X, nrec=%d, ntmk=%d, skrec=%d, sktmk=%d, skobj=%d\n", mdf, nrec, ntmk, res->skrec, res->sktmk, res->objupd); @@ -1558,6 +1562,9 @@ switch (st) { case MTSE_WRP: uptr->flags = uptr->flags | UNIT_SXC; return ST_WPR; + + case MTSE_LEOT: + return ST_LED; } return ST_SUC; diff --git a/sim_tape.c b/sim_tape.c index fd7003fe..d66d584b 100644 --- a/sim_tape.c +++ b/sim_tape.c @@ -26,6 +26,7 @@ Ultimately, this will be a place to hide processing of various tape formats, as well as OS-specific direct hardware access. + 23-Jan-12 MP Added support for Logical EOT detection while positioning 05-Feb-11 MP Refactored to prepare for SIM_ASYNC_IO support Added higher level routines: sim_tape_wreomrw - erase remainder of tape & rewind @@ -251,7 +252,7 @@ struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx; ctx->io_status = sim_tape_spfilef (uptr, ctx->vbc, ctx->bc); break; case TOP_SFRF: - ctx->io_status = sim_tape_spfilebyrecf (uptr, ctx->vbc, ctx->bc, ctx->fc); + ctx->io_status = sim_tape_spfilebyrecf (uptr, ctx->vbc, ctx->bc, ctx->fc, ctx->max); break; case TOP_SPFR: ctx->io_status = sim_tape_spfiler (uptr, ctx->vbc, ctx->bc); @@ -1425,6 +1426,7 @@ return r; count = count of files to skip skipped = pointer to number of files actually skipped recsskipped = pointer to number of records skipped + check_leot = flag to detect and stop skip between two successive tape marks Outputs: status = operation status @@ -1438,14 +1440,23 @@ return r; data record error updated */ -t_stat sim_tape_spfilebyrecf (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped) +t_stat sim_tape_spfilebyrecf (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, t_bool check_leot) { struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx; t_stat st; +t_bool last_tapemark = FALSE; uint32 filerecsskipped; -sim_debug (ctx->dbit, ctx->dptr, "sim_tape_spfilebyrecf(unit=%d, count=%d)\n", uptr-ctx->dptr->units, count); +sim_debug (ctx->dbit, ctx->dptr, "sim_tape_spfilebyrecf(unit=%d, count=%d, check_leot=%d)\n", uptr-ctx->dptr->units, count, check_leot); +if (check_leot) { + t_mtrlnt rbc; + + st = sim_tape_rdlntr (uptr, &rbc); + last_tapemark = (MTSE_TMK == st); + if ((st == MTSE_OK) || (st == MTSE_TMK)) + sim_tape_rdlntf (uptr, &rbc); + } *skipped = 0; *recsskipped = 0; while (*skipped < count) { /* loopo */ @@ -1455,20 +1466,28 @@ while (*skipped < count) { /* loopo */ if (st != MTSE_OK) break; } - if (st == MTSE_TMK) + if (st == MTSE_TMK) { *skipped = *skipped + 1; /* # files skipped */ + if (check_leot && (filerecsskipped == 0) && last_tapemark) { + uint32 filefileskipped; + sim_tape_spfilebyrecr (uptr, 1, &filefileskipped, &filerecsskipped); + *skipped = *skipped - 1; /* adjust # files skipped */ + return MTSE_LEOT; + } + last_tapemark = TRUE; + } else return st; } return MTSE_OK; } -t_stat sim_tape_spfilebyrecf_a (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, TAPE_PCALLBACK callback) +t_stat sim_tape_spfilebyrecf_a (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, t_bool check_leot, TAPE_PCALLBACK callback) { t_stat r = MTSE_OK; AIO_CALLSETUP - r = sim_tape_spfilebyrecf (uptr, count, skipped, recsskipped); -AIO_CALL(TOP_SPFF, NULL, skipped, recsskipped, 0, count, 0, 0, NULL, callback); + r = sim_tape_spfilebyrecf (uptr, count, skipped, recsskipped, check_leot); +AIO_CALL(TOP_SFRF, NULL, skipped, recsskipped, check_leot, count, 0, 0, NULL, callback); return r; } @@ -1498,7 +1517,7 @@ uint32 totalrecsskipped; sim_debug (ctx->dbit, ctx->dptr, "sim_tape_spfilef(unit=%d, count=%d)\n", uptr-ctx->dptr->units, count); -return sim_tape_spfilebyrecf (uptr, count, skipped, &totalrecsskipped); +return sim_tape_spfilebyrecf (uptr, count, skipped, &totalrecsskipped, FALSE); } t_stat sim_tape_spfilef_a (UNIT *uptr, uint32 count, uint32 *skipped, TAPE_PCALLBACK callback) @@ -1664,7 +1683,7 @@ else { if (flags & MTPOS_M_REV) /* reverse? */ r = sim_tape_spfilebyrecr (uptr, files, filesskipped, &fileskiprecs); else - r = sim_tape_spfilebyrecf (uptr, files, filesskipped, &fileskiprecs); + r = sim_tape_spfilebyrecf (uptr, files, filesskipped, &fileskiprecs, (flags & MTPOS_M_DLE)); if (r != MTSE_OK) return r; if (flags & MTPOS_M_REV) /* reverse? */ diff --git a/sim_tape.h b/sim_tape.h index f851ff6e..3d9f785e 100644 --- a/sim_tape.h +++ b/sim_tape.h @@ -23,6 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. + 23-Jan-12 MP Added support for Logical EOT detection while positioning 05-Feb-11 MP Add Asynch I/O support 30-Aug-06 JDB Added erase gap support 14-Feb-06 RMS Added variable tape capacity @@ -99,6 +100,8 @@ typedef uint16 t_tpclnt; /* magtape rec lnt */ #define MTPOS_M_REV (1u << MTPOS_V_REV) /* Reverse Direction */ #define MTPOS_V_OBJ 1 #define MTPOS_M_OBJ (1u << MTPOS_V_OBJ) /* Objects vs Records/Files */ +#define MTPOS_V_DLE 4 +#define MTPOS_M_DLE (1u << MTPOS_V_DLE) /* Detect LEOT */ /* Return status codes */ @@ -112,6 +115,7 @@ typedef uint16 t_tpclnt; /* magtape rec lnt */ #define MTSE_EOM 7 /* end of medium */ #define MTSE_RECE 8 /* error in record */ #define MTSE_WRP 9 /* write protected */ +#define MTSE_LEOT 10 /* Logical End Of Tape */ typedef void (*TAPE_PCALLBACK)(UNIT *unit, t_stat status); @@ -140,8 +144,8 @@ t_stat sim_tape_sprecsf (UNIT *uptr, uint32 count, uint32 *skipped); t_stat sim_tape_sprecsf_a (UNIT *uptr, uint32 count, uint32 *skipped, TAPE_PCALLBACK callback); t_stat sim_tape_spfilef (UNIT *uptr, uint32 count, uint32 *skipped); t_stat sim_tape_spfilef_a (UNIT *uptr, uint32 count, uint32 *skipped, TAPE_PCALLBACK callback); -t_stat sim_tape_spfilebyrecf (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped); -t_stat sim_tape_spfilebyrecf_a (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, TAPE_PCALLBACK callback); +t_stat sim_tape_spfilebyrecf (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, t_bool check_leot); +t_stat sim_tape_spfilebyrecf_a (UNIT *uptr, uint32 count, uint32 *skipped, uint32 *recsskipped, t_bool check_leot, TAPE_PCALLBACK callback); t_stat sim_tape_sprecr (UNIT *uptr, t_mtrlnt *bc); t_stat sim_tape_sprecr_a (UNIT *uptr, t_mtrlnt *bc, TAPE_PCALLBACK callback); t_stat sim_tape_sprecsr (UNIT *uptr, uint32 count, uint32 *skipped); From 94e1975539d2c50f8cb5cb5da6c616bcedb3b13c Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 24 Jan 2012 13:45:27 -0800 Subject: [PATCH 12/14] Avoid compiler warnings when time_t is 64 bits. --- VAX/vax780_stddev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VAX/vax780_stddev.c b/VAX/vax780_stddev.c index 2288b481..3a3016fe 100644 --- a/VAX/vax780_stddev.c +++ b/VAX/vax780_stddev.c @@ -761,7 +761,7 @@ if (-1 == clock_gettime(CLOCK_REALTIME, &now)) /* get curr time */ val.tv_sec = ((uint32)data) / 100; val.tv_nsec = (((uint32)data) % 100) * 10000000; sim_timespec_diff (&base, &now, &val); /* base = now - data */ -toy->toy_gmtbase = base.tv_sec; +toy->toy_gmtbase = (uint32)base.tv_sec; toy->toy_gmtbasemsec = base.tv_nsec/1000000; } From 214b1b60478c8e042228bd88f4de868ad1767220 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 24 Jan 2012 19:55:04 -0800 Subject: [PATCH 13/14] Fix Linux build to support Debian Squeeze by a non-root user --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 2bc8acff..790b90ba 100644 --- a/makefile +++ b/makefile @@ -44,7 +44,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) LIBEXT = dylib else ifeq (Linux,$(shell uname)) - LIBPATH := $(sort $(foreach lib,$(shell ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) + LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib)))) LIBEXT = so else ifeq (SunOS,$(shell uname)) From d69060304574f695aaf3550df8165290f6035f39 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 27 Jan 2012 05:00:46 -0800 Subject: [PATCH 14/14] Updated Windows Network build (in makefile and Visual Studio Projects) to reference WinPcap and pthreads in a consistent parallel directory to the simulator source (i.e. ../windows-build/...). Updated Ethernet Documentation (in 0readme_ethernet.txt and sim_ether.c) to describe the proper build mechanics on both Windows and *nix platforms. --- 0readme_ethernet.txt | 76 ++++++++++++++------- Visual Studio Projects/0ReadMe_Projects.txt | 38 +++-------- Visual Studio Projects/ALTAIR.vcproj | 4 +- Visual Studio Projects/AltairZ80.vcproj | 4 +- Visual Studio Projects/BuildROMs.vcproj | 4 +- Visual Studio Projects/ECLIPSE.vcproj | 4 +- Visual Studio Projects/GRI.vcproj | 4 +- Visual Studio Projects/H316.vcproj | 4 +- Visual Studio Projects/HP2100.vcproj | 4 +- Visual Studio Projects/I1401.vcproj | 4 +- Visual Studio Projects/I1620.vcproj | 4 +- Visual Studio Projects/I7094.vcproj | 4 +- Visual Studio Projects/IBM1130.vcproj | 4 +- Visual Studio Projects/ID16.vcproj | 4 +- Visual Studio Projects/ID32.vcproj | 4 +- Visual Studio Projects/NOVA.vcproj | 4 +- Visual Studio Projects/PDP1.vcproj | 4 +- Visual Studio Projects/PDP10.vcproj | 20 +++--- Visual Studio Projects/PDP11.vcproj | 40 ++++++++--- Visual Studio Projects/PDP15.vcproj | 4 +- Visual Studio Projects/PDP18B.vcproj | 4 +- Visual Studio Projects/PDP4.vcproj | 4 +- Visual Studio Projects/PDP7.vcproj | 4 +- Visual Studio Projects/PDP8.vcproj | 4 +- Visual Studio Projects/PDP9.vcproj | 4 +- Visual Studio Projects/S3.vcproj | 4 +- Visual Studio Projects/SDS.vcproj | 4 +- Visual Studio Projects/SWTP.vcproj | 4 +- Visual Studio Projects/VAX.vcproj | 44 ++++++++---- Visual Studio Projects/VAX780.vcproj | 40 ++++++++--- Visual Studio Projects/lgp.vcproj | 4 +- build_mingw.bat | 6 ++ build_mingw_ether.bat | 3 +- makefile | 12 ++-- sim_ether.c | 21 +++--- 35 files changed, 238 insertions(+), 162 deletions(-) diff --git a/0readme_ethernet.txt b/0readme_ethernet.txt index fa1ea8b3..6916cfac 100644 --- a/0readme_ethernet.txt +++ b/0readme_ethernet.txt @@ -157,6 +157,7 @@ Note 3: Simulators running using VDE networking can run without root privilege. Linux (Ubuntu 10.04): + apt-get install make apt-get install libvdeplug-dev apt-get install vde2 @@ -183,28 +184,43 @@ Windows notes: Building on Windows: - Building with MinGW can use the provided makefile following the instructions - below. Alternatively, you can use the free Visual C++ Express 2008 or 2010 - interactive development environments. Read the file - ".\Visual Studio Projects\0ReadMe_Projects.txt" for details. + You should be able to build with any of the free compiler environments + available on the Windows platform. If you want to use the Visual C++ + Express 2008 or 2010 interactive development environments, read the file + ".\Visual Studio Projects\0ReadMe_Projects.txt" for details about the + required dependencies. Alternatively, you can build simh with networking + support using the MinGW GCC compiler environment. Both the Visual C++ + and MinGW build environments require WinPcap and Posix packages being + available. These should be located in a directory structure parallel to + the current simulator source directory. - 1. Install WinPCAP 4.x runtime and the WinPCAP Developer's kit. + For Example, the directory structure should look like: - 2. Put the required .h files (bittypes,devioctl,ip6_misc,pcap,pcap-stdinc - packet32,ntddndis).h from the WinPCAP 4.x developer's kit in the - compiler's include file path + .../simh/simhv38-2-rc1/VAX/vax_cpu.c + .../simh/simhv38-2-rc1/scp.c + .../simh/simhv38-2-rc1/Visual Studio Projects/simh.sln + .../simh/simhv38-2-rc1/Visual Studio Projects/VAX.vcproj + .../simh/simhv38-2-rc1/BIN/Nt/Win32-Release/vax.exe + .../simh/windows-build/pthreads/pthread.h + .../simh/windows-build/winpcap/WpdPack/Include/pcap.h - 3. Put the required .lib files (packet,wpcap).lib from the WinPCAP 4.x - developer's kit in the linker's library path + The contents of the windows-build directory can be downloaded from: - 4. If you're using Borland C++, use COFF2OMF to convert the .lib files into - a format that can be used by the compiler. + https://github.com/downloads/markpizz/simh/windows-build.zip - 5. Define USE_NETWORK. The current windows network built binaries will - run on any system. regardless of whether or not WinPcap is installed, - and will provide Network functionality when WinPcap is available. - 6. Build it! + There are Windows batch files provided to initiate compiles using the MinGW + compiler tool chain. These batch files are located in the same directory + as this file and are called: build_mingw.bat, build_mingw_ether.bat, and + build_mingw_noasync.bat. These batch files each presume that the MinGW + toolchain is either in the current path or, if not that it is located at + C:\MinGW\bin. These batch files merely invoke the MinGW make (GNU make) + passing some specific arguments along with the optional arguments the batch + file is invoked with. + + The current windows network built binaries will run on any system without + regard to whether or not WinPcap is installed, and will provide + Network functionality when WinPcap is available. ------------------------------------------------------------------------------- @@ -256,18 +272,26 @@ Building on Linux, {Free|Net|Open}BSD, OS/X, Un*x: Linux : search for your variant on http://rpmfind.net OS/X : Apple Developer's site? - NOTE: These repositories for older versions of these platforms + NOTE: The repositories for older versions of these platforms don't contain a version of libpcap greater than 0.8.1. - However, most(all) recent releases of *nix environments ship - with sufficiently recent versions of libpcap either automatically - installed or available for installation as part of the - distribution. + However, most(all) recent releases of *nix environments + ship with sufficiently recent versions of libpcap either + automatically installed or available for installation as + part of the distribution. + The OS provided libpcap-dev components will be prefereable + to a package built from www.tcpdump.org sources. This is + due to the fact that various OS supplied packages will + depend on the OS supplied libpcap. The improper build or + install of the www.tcpdump.org source package can conflict + with the OS provided one and break the OS provided + applications (i.e. tcpdump and/or wireshark) as well as + not working correctly for use by simh. - 2. If you install the vendor supplied libpcap-dev package and it provides - a /usr/lib/libpcap.a file, then the existing makefile will automatically - use the vendor supplied library without any additional arguments. - If you have downloaded and built the libpcap from tcpdump.org, then - you can use it during a build by typing 'make USE_NETWORK=1' + 2. If you install the vendor supplied libpcap-dev package then the simh + makefile will automatically use the vendor supplied library without any + additional arguments. If you have downloaded and built libpcap from + www.tcpdump.org, then you can force its use during a build by typing + 'make USE_NETWORK=1' 3. Build it! diff --git a/Visual Studio Projects/0ReadMe_Projects.txt b/Visual Studio Projects/0ReadMe_Projects.txt index 29aa367d..8b90b547 100644 --- a/Visual Studio Projects/0ReadMe_Projects.txt +++ b/Visual Studio Projects/0ReadMe_Projects.txt @@ -4,8 +4,10 @@ Visual Studio Express 2010) it populates a directory tree under the BIN directory of the Simh distribution for temporary build files and produces resulting executables in the BIN/NT/Win32-Debug or BIN/NT/Win32-Release directories (depending on whether you target a Debug or Release build). -It expects that a winpcap developer pack zip file is expanded in a directory -parallel to the simh directory. + +The Visual Studio Projects expect that a winpcap developer pack and the +Posix threads for windows package are available in a directory parallel +to the simh directory. For Example, the directory structure should look like: @@ -14,34 +16,12 @@ For Example, the directory structure should look like: .../simh/simhv38-2-rc1/Visual Studio Projects/simh.sln .../simh/simhv38-2-rc1/Visual Studio Projects/VAX.vcproj .../simh/simhv38-2-rc1/BIN/Nt/Win32-Release/vax.exe - .../simh/winpcap/WpdPack/Include/pcap.h + .../simh/windows-build/pthreads/pthread.h + .../simh/windows-build/winpcap/WpdPack/Include/pcap.h +The contents of the windows-build directory can be downloaded from: -The winpcap developer pack can be found at: - http://www.winpcap.org/devel.htm - -The latest version of the WinPcap developer's pack is Version 4.1.2 - -Some features can be enabled if the pthreads API is available and contained -also in a parallel place in the directory structure. - - - .../simh/pthreads/Pre-built.2/include/include/pthreads.h - - -To install pthreads API, create the directory: - - .../simh/pthreads/ - -download the file: - ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.exe -to that directory and execute it. Click on the Extract button. -Once installed, When running a simulator with pthreads support enabled, you -will need a copy of the DLL file (simh\pthreads\Pre-built.2\lib\pthreadVC2.dll) -to exist in either the %windir%\System32 directory (or %windir%\SysWOW64 on -x64 Windows environments) or your working directory while running a simh -simulator. The default working directory for included project files is the -"Visual Studio Projects" directory. + https://github.com/downloads/markpizz/simh/windows-build.zip Network devices are capable of using pthreads to enhance their performance. @@ -56,3 +36,5 @@ the simulators which have such devices are VAX, VAX780 and PDP11. To achieve these benefits the simulators must be built with SIM_ASYNCH_IO defined. +The project files in this directory build these simulators with support for +both network and asynchronous I/O. diff --git a/Visual Studio Projects/ALTAIR.vcproj b/Visual Studio Projects/ALTAIR.vcproj index 32f0178e..50953c79 100644 --- a/Visual Studio Projects/ALTAIR.vcproj +++ b/Visual Studio Projects/ALTAIR.vcproj @@ -22,7 +22,7 @@ IntermediateDirectory="..\BIN\NT\Project\simh\ALTAIR\$(PlatformName)-$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" + CharacterSet="0" > + + + + + + + + diff --git a/Visual Studio Projects/PDP15.vcproj b/Visual Studio Projects/PDP15.vcproj index c6329eed..8241c99f 100644 --- a/Visual Studio Projects/PDP15.vcproj +++ b/Visual Studio Projects/PDP15.vcproj @@ -22,7 +22,7 @@ IntermediateDirectory="..\BIN\NT\Project\simh\PDP15\$(PlatformName)-$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" + CharacterSet="0" > + + + + + + + + diff --git a/Visual Studio Projects/VAX780.vcproj b/Visual Studio Projects/VAX780.vcproj index c16c1f0a..e81699e3 100644 --- a/Visual Studio Projects/VAX780.vcproj +++ b/Visual Studio Projects/VAX780.vcproj @@ -22,7 +22,7 @@ IntermediateDirectory="..\BIN\NT\Project\simh\VAX780\$(PlatformName)-$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" + CharacterSet="0" > + + + + + + + + diff --git a/Visual Studio Projects/lgp.vcproj b/Visual Studio Projects/lgp.vcproj index 4e9745ea..67701a97 100644 --- a/Visual Studio Projects/lgp.vcproj +++ b/Visual Studio Projects/lgp.vcproj @@ -22,7 +22,7 @@ IntermediateDirectory="..\BIN\NT\Project\simh\lgp\$(PlatformName)-$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" + CharacterSet="0" >