From c7aa655543f2dc165de33a6099879e3082584923 Mon Sep 17 00:00:00 2001 From: grange Date: Tue, 23 Sep 2003 06:57:37 +0000 Subject: [PATCH] Better vax cpu boot handling; from form@pdp11.org.ru fgsch@ ok --- emulators/simh/Makefile | 5 ++-- emulators/simh/patches/patch-VAX_vax_cpu_c | 28 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 emulators/simh/patches/patch-VAX_vax_cpu_c diff --git a/emulators/simh/Makefile b/emulators/simh/Makefile index 04ca472b606..7aa177a52ab 100644 --- a/emulators/simh/Makefile +++ b/emulators/simh/Makefile @@ -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" diff --git a/emulators/simh/patches/patch-VAX_vax_cpu_c b/emulators/simh/patches/patch-VAX_vax_cpu_c new file mode 100644 index 00000000000..75fa96805a6 --- /dev/null +++ b/emulators/simh/patches/patch-VAX_vax_cpu_c @@ -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; + }