diff --git a/HP2100/hp2100_bugfixes.txt b/HP2100/hp2100_bugfixes.txt index 4902bd00..040e3b58 100644 --- a/HP2100/hp2100_bugfixes.txt +++ b/HP2100/hp2100_bugfixes.txt @@ -1,6 +1,6 @@ HP 2100 SIMULATOR BUG FIX WRITEUPS ================================== - Last update: 2012-12-17 + Last update: 2012-12-28 1. PROBLEM: Booting from magnetic tape reports "HALT instruction, P: 77756 @@ -6350,3 +6350,44 @@ called for a non-VMA program. STATUS: Fixed in version 4.0-0. + + + +249. PROBLEM: RESTORing a previously SAVEd session fails if the 12792C + multiplexer is attached. + + VERSION: 3.9-0 + + OBSERVATION: If the MPX device has a listening port attached when a + session is saved, attempting to restore that session results in a "Unit not + attachable" error. + + CAUSE: The MPX attach routine only allows attachment to unit 0, i.e., + ATTACH MPX , but the actual attachment is made to the Telnet poll + unit (unit 9). As SAVE finds the port attached to unit 9, RESTORE attempts + to reattach it to unit 9. + + RESOLUTION: Modify "mpx_attach" (hp2100_mpx.c) to allow attachment to unit + 9 only during a RESTORE. + + STATUS: Fixed in version 4.0-0. + + + +250. PROBLEM: DEASSIGNing the TBG device generates a debug warning. + + VERSION: 3.9-0 + + OBSERVATION: When running the simulator under a debugger, entering the + command DEASSIGN TBG prints "warning: Invalid Address specified to + RtlFreeHeap." + + CAUSE: The TBG logical name is specified statically in the DEVICE + structure, but "deassign_device" calls "free" on the pointer. The + developer's manual does not state that the logical name must be dynamically + allocated, but deassigning assumes that it was. + + RESOLUTION: Modify "clk_reset" (hp2100_stddev.c) to allocate the logical + name during a power-on reset. + + STATUS: Fixed in version 4.0-0. diff --git a/HP2100/hp2100_mpx.c b/HP2100/hp2100_mpx.c index 3c0a0180..c21b40ec 100644 --- a/HP2100/hp2100_mpx.c +++ b/HP2100/hp2100_mpx.c @@ -25,6 +25,7 @@ MPX 12792C 8-channel multiplexer card + 28-Dec-12 JDB Allow direct attach to the poll unit only when restoring 10-Feb-12 JDB Deprecated DEVNO in favor of SC Removed DEV_NET to allow restoration of listening port 28-Mar-11 JDB Tidied up signal handling @@ -2058,6 +2059,9 @@ return SCPE_OK; unit is not allowed, so we first enable the unit, then attach it, then disable it again. Attachment is reported by the "mpx_status" routine below. + A direct attach to the poll unit is only allowed when restoring a previously + saved session. + The Telnet poll service routine is synchronized with the other input polling devices in the simulator to facilitate idling. */ @@ -2066,16 +2070,17 @@ t_stat mpx_attach (UNIT *uptr, char *cptr) { t_stat status = SCPE_OK; -if (uptr != mpx_unit) /* not unit 0? */ - return SCPE_NOATT; /* can't attach */ +if (uptr != mpx_unit /* not unit 0? */ + && (uptr != &mpx_poll || !(sim_switches & SIM_SW_REST))) /* and not restoring the poll unit? */ + return SCPE_NOATT; /* can't attach */ -mpx_poll.flags = mpx_poll.flags & ~UNIT_DIS; /* enable unit */ -status = tmxr_attach (&mpx_desc, &mpx_poll, cptr); /* attach to socket */ -mpx_poll.flags = mpx_poll.flags | UNIT_DIS; /* disable unit */ +mpx_poll.flags = mpx_poll.flags & ~UNIT_DIS; /* enable unit */ +status = tmxr_attach (&mpx_desc, &mpx_poll, cptr); /* attach to socket */ +mpx_poll.flags = mpx_poll.flags | UNIT_DIS; /* disable unit */ if (status == SCPE_OK) { - mpx_poll.wait = POLL_FIRST; /* set up poll */ - sim_activate (&mpx_poll, mpx_poll.wait); /* start poll immediately */ + mpx_poll.wait = POLL_FIRST; /* set up poll */ + sim_activate (&mpx_poll, mpx_poll.wait); /* start poll immediately */ } return status; } diff --git a/HP2100/hp2100_stddev.c b/HP2100/hp2100_stddev.c index 856d1a5a..217c1a89 100644 --- a/HP2100/hp2100_stddev.c +++ b/HP2100/hp2100_stddev.c @@ -26,8 +26,9 @@ PTR 12597A-002 paper tape reader interface PTP 12597A-005 paper tape punch interface TTY 12531C buffered teleprinter interface - CLK 12539C time base generator + TBG 12539C time base generator + 28-Dec-12 JDB Allocate the TBG logical name during power-on reset 18-Dec-12 MP Now calls sim_activate_time to get remaining poll time 09-May-12 JDB Separated assignments from conditional expressions 12-Feb-12 JDB Add TBG as a logical name for the CLK device @@ -98,7 +99,7 @@ idle time. The console poll is guaranteed to run, as the TTY device cannot be disabled. - The clock (time base generator) autocalibrates. If the CLK is set to a ten + The clock (time base generator) autocalibrates. If the TBG is set to a ten millisecond period (e.g., as under RTE), it is synchronized to the console poll. Otherwise (e.g., as under DOS or TSB, which use 100 millisecond periods), it runs asynchronously. If the specified clock frequency is below @@ -393,7 +394,7 @@ DEVICE clk_dev = { NULL, NULL, &clk_reset, NULL, NULL, NULL, &clk_dib, DEV_DISABLE, - 0, NULL, NULL, "TBG" + 0, NULL, NULL, NULL }; @@ -1191,6 +1192,9 @@ if (sim_switches & SWMASK ('P')) { /* initialization reset? clk_error = 0; /* clear error */ clk_select = 0; /* clear select */ clk_ctr = 0; /* clear counter */ + + if (clk_dev.lname == NULL) /* logical name unassigned? */ + clk_dev.lname = strdup ("TBG"); /* allocate and initialize the name */ } IOPRESET (&clk_dib); /* PRESET device (does not use PON) */