Index: head/emulators/simh/Makefile =================================================================== --- head/emulators/simh/Makefile (revision 451982) +++ head/emulators/simh/Makefile (revision 451983) @@ -1,62 +1,64 @@ # Created by: jraynard # $FreeBSD$ PORTNAME= simh PORTVERSION= 3.9.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MASTER_SITES= http://simh.trailing-edge.com/sources/:src \ http://www.ml1.org.uk/distfiles/:pdf \ http://www.ancientgeek.org.uk/distfiles/:pdf DISTNAME= ${PORTNAME}v${PORTVERSION:R:S/.//}-${PORTVERSION:E} DISTFILES= ${PORTNAME}v${PORTVERSION:R:S/.//}-${PORTVERSION:E}.zip:src \ ${PORTNAME}_docpdf.zip:pdf MAINTAINER= bob@eager.cx COMMENT= Emulates classic DEC, HP, GRI, IBM, Altair, SDS, Honeywell, and others LICENSE= BSD3CLAUSE BROKEN_powerpc64= fails to compile: cc1: error: unrecognized command line option "-Wno-logical-op-parentheses" NO_WRKSUBDIR= yes USES= gmake dos2unix zip DOS2UNIX_GLOB= *.c *.h *.txt *.mak *.ini makefile -CFLAGS+= -Wno-format-extra-args -Wno-comment -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses +CFLAGS+= -Wno-format-extra-args -Wno-comment -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-shift-negative-value MAKE_ENV= GCC="${CC}" CFLAGS_O="${CFLAGS}" USE_NETWORK=1 MAKEFILE= makefile SUB_FILES= pkg-message simh.1 READMES= 0readme_${PORTVERSION:R:S/.//}.txt 0readme_ethernet.txt PORTDOCS= ${READMES} pdf/* OPTIONS_DEFINE= DOCS pre-patch: @${MKDIR} ${WRKSRC}/BIN post-patch: @${REINPLACE_CMD} -e \ '/shell ldconfig/s|^|#| ; \ /-O2/s| = | ?= |' ${WRKSRC}/makefile @${REINPLACE_CMD} -e \ 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/VAX/vax_sysdev.c post-build: -# eclipse conflicts with java/eclipse, install it as simh-eclipse +# eclipse, gri and nova conflict with other ports, prefix with simh- @${MV} ${WRKSRC}/BIN/eclipse ${WRKSRC}/BIN/simh-eclipse + @${MV} ${WRKSRC}/BIN/gri ${WRKSRC}/BIN/simh-gri + @${MV} ${WRKSRC}/BIN/nova ${WRKSRC}/BIN/simh-nova do-install: ${INSTALL_PROGRAM} ${WRKSRC}/BIN/* ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/VAX/ka655x.bin ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKDIR}/simh.1 ${STAGEDIR}${MANPREFIX}/man/man1 do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}/pdf (cd ${WRKSRC} && ${INSTALL_DATA} ${READMES} ${STAGEDIR}${DOCSDIR}) (cd ${WRKSRC} && ${COPYTREE_SHARE} pdf ${STAGEDIR}${DOCSDIR}) .include Index: head/emulators/simh/distinfo =================================================================== --- head/emulators/simh/distinfo (revision 451982) +++ head/emulators/simh/distinfo (revision 451983) @@ -1,5 +1,5 @@ -TIMESTAMP = 1490544722 +TIMESTAMP = 1507755254 SHA256 (simhv39-0.zip) = e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b SIZE (simhv39-0.zip) = 3103657 SHA256 (simh_docpdf.zip) = dff83e9a55f5e8bc2364489d6cc2a6731c60237acf37f4c46f080914896f8a0c SIZE (simh_docpdf.zip) = 2282195 Index: head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c =================================================================== --- head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c (nonexistent) +++ head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c (revision 451983) @@ -0,0 +1,20 @@ +--- AltairZ80/i86_prim_ops.c.orig 2017-10-12 22:55:55 UTC ++++ AltairZ80/i86_prim_ops.c +@@ -1488,7 +1488,7 @@ void div_byte(PC_ENV *m, uint8 s) + } + div = dvd / dvs; + mod = dvd % dvs; +- if (abs(div) > 0xff) ++ if (div > 0xff) + { + i86_intr_raise(m,0); + return; +@@ -1514,7 +1514,7 @@ void div_word(PC_ENV *m, uint16 s) + div = dvd / dvs; + mod = dvd % dvs; + /* printf("dvd=%x dvs=%x -> div=%x mod=%x\n",dvd, dvs,div, mod);*/ +- if (abs(div) > 0xffff) ++ if (div > 0xffff) + { + i86_intr_raise(m,0); + return; Property changes on: head/emulators/simh/files/patch-AltairZ80_i86__prim__ops.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/emulators/simh/files/patch-HP2100_hp2100__pif.c =================================================================== --- head/emulators/simh/files/patch-HP2100_hp2100__pif.c (nonexistent) +++ head/emulators/simh/files/patch-HP2100_hp2100__pif.c (revision 451983) @@ -0,0 +1,11 @@ +--- HP2100/hp2100_pif.c.orig 2017-10-12 22:55:55 UTC ++++ HP2100/hp2100_pif.c +@@ -306,7 +306,7 @@ while (working_set) { + + else { /* DOS PIF */ + setPRL (dibptr->select_code, !(pif.control | pif.flag)); +- setIRQ (dibptr->select_code, !pif.control & pif.flag & pif.flagbuf); ++ setIRQ (dibptr->select_code, (!pif.control) & pif.flag & pif.flagbuf); + } + + if (DEBUG_PRS (pif_dev)) Property changes on: head/emulators/simh/files/patch-HP2100_hp2100__pif.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/emulators/simh/files/patch-HP2100_hp__disclib.c =================================================================== --- head/emulators/simh/files/patch-HP2100_hp__disclib.c (revision 451982) +++ head/emulators/simh/files/patch-HP2100_hp__disclib.c (revision 451983) @@ -1,69 +1,78 @@ ---- HP2100/hp_disclib.c.orig 2016-12-01 22:43:42 UTC +--- HP2100/hp_disclib.c.orig 2017-10-12 22:55:55 UTC +++ HP2100/hp_disclib.c @@ -761,8 +761,8 @@ else { uptr = units + unit_limit; /* and we use the indicated unit */ } -if (props->unit_check && !uptr /* if the unit number is checked and is invalid */ - || props->seek_wait && (drive_status (uptr) & DL_S2STOPS)) { /* or if we're waiting for an offline drive */ +if ((props->unit_check && !uptr) /* if the unit number is checked and is invalid */ + || (props->seek_wait && (drive_status (uptr) & DL_S2STOPS))) {/* or if we're waiting for an offline drive */ dl_end_command (cvptr, status_2_error); /* then the command ends with a Status-2 error */ uptr = NULL; /* prevent the command from starting */ } @@ -1563,7 +1563,7 @@ t_stat dl_load_unload (CVPTR cvptr, UNIT if ((uptr->flags & UNIT_ATT) == 0) /* the unit must be attached to [un]load */ return SCPE_UNATT; /* return "Unit not attached" if not */ -else if (!(sim_switches & SIM_SW_REST)) /* modify the flags only if not restoring */ +else if (!(sim_switches & SIM_SW_REST)) { /* modify the flags only if not restoring */ if (load) { /* are we loading the heads? */ uptr->flags = uptr->flags & ~UNIT_UNLOAD; /* clear the unload flag */ uptr->STAT = DL_S2FS; /* and set First Status */ @@ -1576,7 +1576,7 @@ else if (!(sim_switches & SIM_SW_REST)) uptr->flags = uptr->flags | UNIT_UNLOAD; /* set the unload flag */ uptr->STAT = DL_S2ATN; /* and Attention status */ } - + } return SCPE_OK; } @@ -1897,7 +1897,7 @@ static void start_write (CVPTR cvptr, UN const t_bool verify = (CNTLR_OPCODE) uptr->OP == write; /* only Write verifies the sector address */ if ((uptr->flags & UNIT_WPROT) /* is the unit write protected, */ - || !verify && !(uptr->flags & UNIT_FMT)) /* or is formatting required but not enabled? */ + || (!verify && !(uptr->flags & UNIT_FMT))) /* or is formatting required but not enabled? */ dl_end_command (cvptr, status_2_error); /* terminate the write with an error */ else if (position_sector (cvptr, uptr, verify)) { /* writing is permitted; position the sector */ @@ -2041,11 +2041,12 @@ if (cvptr->eoc == SET) (CNTLR_OPCODE) uptr->OP, /* with the current operation */ (CNTLR_PHASE) uptr->PHASE); /* and phase unchanged */ - if (uptr->STAT & DL_S2SC) /* did a seek check occur? */ + if (uptr->STAT & DL_S2SC) { /* did a seek check occur? */ if (cvptr->type == ICD) /* is this ICD controller? */ dl_end_command (cvptr, end_of_cylinder); /* report it as an End of Cylinder error */ else /* it is a MAC controller */ dl_end_command (cvptr, status_2_error); /* report it as a Status-2 error */ + } } else /* the file mask does not permit an auto-seek */ +@@ -2195,7 +2196,7 @@ if (target_cylinder >= drive_props [mode + } + + else { /* the cylinder value is OK */ +- delta = abs (uptr->CYL - target_cylinder); /* calculate the relative movement */ ++ delta = abs (uptr->CYL - (int32) target_cylinder); /* calculate the relative movement */ + uptr->CYL = target_cylinder; /* and move the positioner */ + + if ((cvptr->head >= drive_props [model].heads) /* if the head */ @@ -2291,12 +2292,13 @@ return; static void set_timer (CVPTR cvptr, FLIP_FLOP action) { -if (cvptr->type == MAC) /* is this a MAC controller? */ +if (cvptr->type == MAC) { /* is this a MAC controller? */ if (action == SET) /* should we start the timer? */ sim_activate_abs (cvptr->aux + timer, /* activate the auxiliary unit */ cvptr->wait_time); else /* we stop the timer */ sim_cancel (cvptr->aux + timer); /* by canceling the unit */ +} return; } Index: head/emulators/simh/files/pkg-message.in =================================================================== --- head/emulators/simh/files/pkg-message.in (revision 451982) +++ head/emulators/simh/files/pkg-message.in (revision 451983) @@ -1,9 +1,18 @@ ********************************************************************* -The 'eclipse' emulator has been renamed to 'simh-eclipse'. +Note that the executable files for some simulators have been renamed +to remove conflicts with other ports. In such cases, the name is now +prefixed with 'simh'. Affected simulators are: + + eclipse becomes simh-eclipse + gri becomes simh-gri + nova becomes simh-nova + +Users may wish to create a symbolic link to these, or an alias, +if they want to use the old names. The file needed by the VAX emulator is located in: %%DATADIR%% ********************************************************************* Index: head/emulators/simh/pkg-plist =================================================================== --- head/emulators/simh/pkg-plist (revision 451982) +++ head/emulators/simh/pkg-plist (revision 451983) @@ -1,30 +1,30 @@ bin/altair bin/altairz80 -bin/gri bin/h316 bin/hp2100 bin/i1401 bin/i1620 bin/i7094 bin/ibm1130 bin/id16 bin/id32 bin/lgp -bin/nova bin/pdp1 bin/pdp10 bin/pdp11 bin/pdp15 bin/pdp4 bin/pdp7 bin/pdp8 bin/pdp9 bin/s3 bin/sds bin/simh-eclipse +bin/simh-gri +bin/simh-nova bin/swtp6800mp-a bin/swtp6800mp-a2 bin/vax bin/vax780 man/man1/simh.1.gz %%DATADIR%%/ka655x.bin