Better vax cpu boot handling; from form@pdp11.org.ru

fgsch@ ok
This commit is contained in:
grange 2003-09-23 06:57:37 +00:00
parent e04ad54e3c
commit c7aa655543
2 changed files with 31 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.41 2003/09/22 19:20:16 pvalchev Exp $
# $OpenBSD: Makefile,v 1.42 2003/09/23 06:57:37 grange Exp $
# $NetBSD: Makefile,v 1.2 1998/08/23 20:48:03 frueauf Exp $
COMMENT= "PDP, IBM 1401, Nova and other CPUs simulator"
@ -21,7 +21,8 @@ WRKDIST= ${WRKDIR}
UNZIP= unzip -a -o
COPTS= -DUSE_SOCKLEN_T
COPTS= -DUSE_SOCKLEN_T \
-DPATH_KA655_BIN=\"${PREFIX}/lib/simh/vax/ka655.bin\"
MAKE_FILE= makefile
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-VAX_vax_cpu_c,v 1.3 2003/09/23 06:57:38 grange Exp $
--- VAX/vax_cpu.c.orig 2003-05-17 13:19:42.000000000 +0700
+++ VAX/vax_cpu.c 2003-08-26 12:36:08.000000000 +0700
@@ -140,6 +140,10 @@
#include "vax_defs.h"
+#ifndef PATH_KA655_BIN
+#define PATH_KA655_BIN "ka655.bin"
+#endif
+
#define OP_MEM -1
#define UNIT_V_CONH (UNIT_V_UF + 0) /* halt to console */
#define UNIT_V_MSIZE (UNIT_V_UF + 1) /* dummy */
@@ -2348,10 +2352,10 @@ conpc = 0;
conpsl = PSL_IS | PSL_IPL1F | CON_PWRUP;
if (rom == NULL) return SCPE_IERR;
if (*rom == 0) { /* no boot? */
- printf ("Loading boot code from ka655.bin\n");
+ printf ("Loading boot code from %s\n", PATH_KA655_BIN);
if (sim_log) fprintf (sim_log,
- "Loading boot code from ka655.bin\n");
- r = load_cmd (0, "-R ka655.bin");
+ "Loading boot code from %s\n", PATH_KA655_BIN);
+ r = load_cmd (0, "-R " PATH_KA655_BIN);
if (r != SCPE_OK) return r; }
return SCPE_OK;
}