From da2f969a82d4f9d39bf0217aae45c4f39690440d Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 20 Jun 2018 11:27:58 +0200 Subject: [PATCH] KA10: Call display_init from reset. If any other display function being called before display_init, the default Type 30 display will be used which is no good for the KA10. --- PDP10/ka10_dpy.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/PDP10/ka10_dpy.c b/PDP10/ka10_dpy.c index 67c5f5c..b3900f4 100644 --- a/PDP10/ka10_dpy.c +++ b/PDP10/ka10_dpy.c @@ -151,6 +151,7 @@ extern uint64 SW; /* switch register */ t_stat dpy_devio(uint32 dev, uint64 *data); t_stat dpy_svc (UNIT *uptr); +t_stat dpy_reset (DEVICE *dptr); const char *dpy_description (DEVICE *dptr); DIB dpy_dib[] = { @@ -165,7 +166,7 @@ UNIT dpy_unit[] = { DEVICE dpy_dev = { "DPY", dpy_unit, NULL, NULL, NUM_DEVS_DPY, 0, 0, 0, 0, 0, - NULL, NULL, NULL, + NULL, NULL, dpy_reset, NULL, NULL, NULL, &dpy_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, NULL, NULL, NULL, NULL, NULL, NULL, &dpy_description @@ -291,6 +292,18 @@ t_stat dpy_svc (UNIT *uptr) return SCPE_OK; } +/* Reset routine */ + +t_stat dpy_reset (DEVICE *dptr) +{ + if (!(dptr->flags & DEV_DIS)) { + display_reset(); + ty340_reset(); + } + sim_cancel (&dpy_unit[0]); /* deactivate unit */ + return SCPE_OK; +} + /**************** * callbacks from type340.c */