diff --git a/Visual Studio Projects/AltairZ80.vcproj b/Visual Studio Projects/AltairZ80.vcproj index 5fb8f139..79621617 100644 --- a/Visual Studio Projects/AltairZ80.vcproj +++ b/Visual Studio Projects/AltairZ80.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../AltairZ80/;./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="USE_SIM_IMD;NO_INLINE;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="NO_INLINE;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" KeepComments="false" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -125,7 +125,7 @@ OmitFramePointers="true" WholeProgramOptimization="true" AdditionalIncludeDirectories="../AltairZ80/;./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="USE_SIM_IMD;NO_INLINE;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="NO_INLINE;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/PDQ3.vcproj b/Visual Studio Projects/PDQ3.vcproj index c5cf1cea..36b7f57a 100644 --- a/Visual Studio Projects/PDQ3.vcproj +++ b/Visual Studio Projects/PDQ3.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="USE_SIM_IMD;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" KeepComments="false" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -125,7 +125,7 @@ OmitFramePointers="true" WholeProgramOptimization="true" AdditionalIncludeDirectories="./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="USE_SIM_IMD;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/Visual Studio Projects/SAGE.vcproj b/Visual Studio Projects/SAGE.vcproj index f61a11d8..5cf7d520 100644 --- a/Visual Studio Projects/SAGE.vcproj +++ b/Visual Studio Projects/SAGE.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="HAVE_INT64;USE_SIM_IMD;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="HAVE_INT64;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" KeepComments="false" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -127,7 +127,7 @@ OmitFramePointers="true" WholeProgramOptimization="true" AdditionalIncludeDirectories="./;../;../slirp;../slirp_glue;../slirp_glue/qemu;../slirp_glue/qemu/win32/include;../../windows-build/include;;../../windows-build/include/SDL2" - PreprocessorDefinitions="HAVE_INT64;USE_SIM_IMD;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" + PreprocessorDefinitions="HAVE_INT64;SIM_BUILD_TOOL=simh-Visual-Studio-Project;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCRE_H;PCRE_STATIC" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" diff --git a/descrip.mms b/descrip.mms index b7c00d6f..07d666ea 100644 --- a/descrip.mms +++ b/descrip.mms @@ -371,7 +371,7 @@ ALTAIRZ80_SOURCE2 = $(ALTAIRZ80_DIR)S100_DISK1A.C,$(ALTAIRZ80_DIR)S100_DISK2.C,\ $(ALTAIRZ80_DIR)M68KCPU.C,$(ALTAIRZ80_DIR)M68KDASM.C,\ $(ALTAIRZ80_DIR)M68KOPAC.C,$(ALTAIRZ80_DIR)M68KOPDM.C,\ $(ALTAIRZ80_DIR)M68KOPNZ.C,$(ALTAIRZ80_DIR)M68KOPS.C,$(ALTAIRZ80_DIR)M68KSIM.C -ALTAIRZ80_OPTIONS = /INCL=($(SIMH_DIR),$(ALTAIRZ80_DIR))/DEF=($(CC_DEFS),"USE_SIM_IMD=1") +ALTAIRZ80_OPTIONS = /INCL=($(SIMH_DIR),$(ALTAIRZ80_DIR))/DEF=($(CC_DEFS)) # # Data General Nova Simulator Definitions. diff --git a/makefile b/makefile index 0d539848..1d2c7a08 100644 --- a/makefile +++ b/makefile @@ -1762,7 +1762,7 @@ ALTAIRZ80 = ${ALTAIRZ80D}/altairz80_cpu.c ${ALTAIRZ80D}/altairz80_cpu_nommu.c \ ${ALTAIRZ80D}/m68kcpu.c ${ALTAIRZ80D}/m68kdasm.c ${ALTAIRZ80D}/m68kasm.c \ ${ALTAIRZ80D}/m68kopac.c ${ALTAIRZ80D}/m68kopdm.c \ ${ALTAIRZ80D}/m68kopnz.c ${ALTAIRZ80D}/m68kops.c ${ALTAIRZ80D}/m68ksim.c -ALTAIRZ80_OPT = -I ${ALTAIRZ80D} -DUSE_SIM_IMD +ALTAIRZ80_OPT = -I ${ALTAIRZ80D} GRID = ${SIMHD}/GRI @@ -2142,12 +2142,12 @@ SAGE = ${SAGED}/sage_cpu.c ${SAGED}/sage_sys.c ${SAGED}/sage_stddev.c \ ${SAGED}/m68k_cpu.c ${SAGED}/m68k_mem.c ${SAGED}/m68k_scp.c \ ${SAGED}/m68k_parse.tab.c ${SAGED}/m68k_sys.c \ ${SAGED}/i8251.c ${SAGED}/i8253.c ${SAGED}/i8255.c ${SAGED}/i8259.c ${SAGED}/i8272.c -SAGE_OPT = -I ${SAGED} -DHAVE_INT64 -DUSE_SIM_IMD +SAGE_OPT = -I ${SAGED} -DHAVE_INT64 PDQ3D = ${SIMHD}/PDQ-3 PDQ3 = ${PDQ3D}/pdq3_cpu.c ${PDQ3D}/pdq3_sys.c ${PDQ3D}/pdq3_stddev.c \ ${PDQ3D}/pdq3_mem.c ${PDQ3D}/pdq3_debug.c ${PDQ3D}/pdq3_fdc.c -PDQ3_OPT = -I ${PDQ3D} -DUSE_SIM_IMD +PDQ3_OPT = -I ${PDQ3D} # # Build everything (not the unsupported/incomplete or experimental simulators) diff --git a/sim_defs.h b/sim_defs.h index a97492e5..6beb2146 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -152,6 +152,10 @@ extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...); #define USE_REGEX 1 #endif +#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC) +#define __FUNCTION__ __FILE__ +#endif + #ifdef __cplusplus extern "C" { #endif @@ -592,6 +596,7 @@ struct UNIT { void *up8; /* device specific */ uint16 us9; /* device specific */ uint16 us10; /* device specific */ + uint32 disk_type; /* Disk specific info */ void *tmxr; /* TMXR linkage */ uint32 recsize; /* Tape specific info */ t_addr tape_eom; /* Tape specific info */ diff --git a/sim_imd.c b/sim_imd.c index 0710332e..9d045c31 100644 --- a/sim_imd.c +++ b/sim_imd.c @@ -41,15 +41,9 @@ Cylinder maps in the .IMD image file (AGN) */ -#if defined(USE_SIM_IMD) - #include "sim_defs.h" #include "sim_imd.h" -#if (defined (__MWERKS__) && defined (macintosh)) || defined(__DECC) -#define __FUNCTION__ __FILE__ -#endif - static t_stat commentParse(DISK_INFO *myDisk, uint8 comment[], uint32 buffLen); static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose); static t_stat diskFormat(DISK_INFO *myDisk); @@ -85,7 +79,7 @@ DISK_INFO *diskOpen(FILE *fileref, uint32 isVerbose) * After this function returns, the file pointer is placed after the comment and * the 0x1A "EOF" marker. * - * The comment parameter is optional, and if NULL, then the ocmment will not + * The comment parameter is optional, and if NULL, then the comment will not * be extracted from the IMD file, but the file position will still be advanced * to the end of the comment. */ @@ -788,5 +782,3 @@ t_stat assignDiskType(UNIT *uptr) { sim_fseeko(uptr->fileref, pos, SEEK_SET); return result; } - -#endif /* USE_SIM_IMD */ diff --git a/sim_imd.h b/sim_imd.h index d4142105..0b311bfc 100644 --- a/sim_imd.h +++ b/sim_imd.h @@ -39,10 +39,6 @@ #ifndef SIM_IMD_H_ #define SIM_IMD_H_ 0 -#if !defined(USE_SIM_IMD) -#error This simulator must be compiled with USE_SIM_IMD defined -#else - #include "sim_defs.h" typedef struct { @@ -137,6 +133,4 @@ extern t_stat trackWrite(DISK_INFO *myDisk, uint32 *flags); extern t_stat assignDiskType(UNIT *uptr); -#endif /* USE_SIM_IMD */ - #endif