From defe5f07d99eb9f3b2f60a1b0264f71e4b18cfed Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 16 Sep 2014 11:29:19 -0700 Subject: [PATCH] AltairZ80: Promote sim_imd.c to a top level simh library to be used as needed by various simulators --- Visual Studio Projects/AltairZ80.vcproj | 51 ++++++++++++------------- descrip.mms | 4 +- makefile | 6 +-- AltairZ80/sim_imd.c => sim_imd.c | 1 + AltairZ80/sim_imd.h => sim_imd.h | 0 5 files changed, 30 insertions(+), 32 deletions(-) rename AltairZ80/sim_imd.c => sim_imd.c (97%) rename AltairZ80/sim_imd.h => sim_imd.h (100%) diff --git a/Visual Studio Projects/AltairZ80.vcproj b/Visual Studio Projects/AltairZ80.vcproj index 139e11090..92a5dfbfc 100644 --- a/Visual Studio Projects/AltairZ80.vcproj +++ b/Visual Studio Projects/AltairZ80.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="./;../;../AltairZ80/" - PreprocessorDefinitions="NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID" + PreprocessorDefinitions="USE_SIM_IMD;NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -121,7 +121,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="./;../;../AltairZ80/" - PreprocessorDefinitions="NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID" + PreprocessorDefinitions="USE_SIM_IMD;NO_INLINE;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -202,78 +202,71 @@ > - - - - - - - + + diff --git a/descrip.mms b/descrip.mms index 5b68013b6..03b0a085f 100644 --- a/descrip.mms +++ b/descrip.mms @@ -327,14 +327,14 @@ ALTAIRZ80_SOURCE2 = $(ALTAIRZ80_DIR)S100_DISK1A.C,$(ALTAIRZ80_DIR)S100_DISK2.C,\ $(ALTAIRZ80_DIR)S100_FIF.C,$(ALTAIRZ80_DIR)S100_MDRIVEH.C,\ $(ALTAIRZ80_DIR)S100_MDSAD.C,$(ALTAIRZ80_DIR)S100_SELCHAN.C,\ $(ALTAIRZ80_DIR)S100_SS1.C,$(ALTAIRZ80_DIR)S100_64FDC.C,\ - $(ALTAIRZ80_DIR)S100_SCP300F.C,$(ALTAIRZ80_DIR)SIM_IMD.C,\ + $(ALTAIRZ80_DIR)S100_SCP300F.C,$(SIMH_DIR)SIM_IMD.C,\ $(ALTAIRZ80_DIR)WD179X.C,$(ALTAIRZ80_DIR)S100_DISK3.C,\ $(ALTAIRZ80_DIR)S100_ADCS6.C,$(ALTAIRZ80_DIR)S100_HDC1001.C,\ $(ALTAIRZ80_DIR)S100_IF3.C,$(ALTAIRZ80_DIR)ALTAIRZ80_MHDSK.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)) +ALTAIRZ80_OPTIONS = /INCL=($(SIMH_DIR),$(ALTAIRZ80_DIR))/DEF=($(CC_DEFS),"USE_SIM_IMD=1") # # Data General Nova Simulator Definitions. diff --git a/makefile b/makefile index aeb4a321a..12135e16c 100644 --- a/makefile +++ b/makefile @@ -768,7 +768,7 @@ LDFLAGS := $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O) BIN = BIN/ SIM = scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c \ sim_tmxr.c sim_ether.c sim_tape.c sim_disk.c sim_serial.c \ - sim_video.c + sim_video.c sim_imd.c DISPLAYD = display ifeq ($(WIN32),) @@ -1057,13 +1057,13 @@ ALTAIRZ80 = ${ALTAIRZ80D}/altairz80_cpu.c ${ALTAIRZ80D}/altairz80_cpu_nommu.c \ ${ALTAIRZ80D}/s100_fif.c ${ALTAIRZ80D}/s100_mdriveh.c \ ${ALTAIRZ80D}/s100_mdsad.c ${ALTAIRZ80D}/s100_selchan.c \ ${ALTAIRZ80D}/s100_ss1.c ${ALTAIRZ80D}/s100_64fdc.c \ - ${ALTAIRZ80D}/s100_scp300f.c ${ALTAIRZ80D}/sim_imd.c \ + ${ALTAIRZ80D}/s100_scp300f.c \ ${ALTAIRZ80D}/wd179x.c ${ALTAIRZ80D}/s100_hdc1001.c \ ${ALTAIRZ80D}/s100_if3.c ${ALTAIRZ80D}/s100_adcs6.c \ ${ALTAIRZ80D}/m68kcpu.c ${ALTAIRZ80D}/m68kdasm.c \ ${ALTAIRZ80D}/m68kopac.c ${ALTAIRZ80D}/m68kopdm.c \ ${ALTAIRZ80D}/m68kopnz.c ${ALTAIRZ80D}/m68kops.c ${ALTAIRZ80D}/m68ksim.c -ALTAIRZ80_OPT = -I ${ALTAIRZ80D} +ALTAIRZ80_OPT = -I ${ALTAIRZ80D} -DUSE_SIM_IMD GRID = GRI diff --git a/AltairZ80/sim_imd.c b/sim_imd.c similarity index 97% rename from AltairZ80/sim_imd.c rename to sim_imd.c index b44d149ea..71a8c9199 100644 --- a/AltairZ80/sim_imd.c +++ b/sim_imd.c @@ -301,6 +301,7 @@ static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose) sim_debug(myDisk->debugmask, myDisk->device, "Processed %d sectors\n", TotalSectorCount); for(i=0;intracks;i++) { + uint8 j; sim_debug(myDisk->verbosedebugmask, myDisk->device, "Track %02d: ", i); for(j=0;jverbosedebugmask, myDisk->device, "0x%06x ", myDisk->track[i][0].sectorOffsetMap[j]); diff --git a/AltairZ80/sim_imd.h b/sim_imd.h similarity index 100% rename from AltairZ80/sim_imd.h rename to sim_imd.h