Commit graph

3501 commits

Author SHA1 Message Date
Mark Pizzolato
6912ad167e Fixed tmxr Buffering functionality broken in the Serial merge from Dave 2012-04-20 17:58:21 -07:00
Mark Pizzolato
1fb1756b65 Added sim_serial to all simulator Visual Studio Projects 2012-04-20 05:26:11 -07:00
Mark Pizzolato
bc36e9dde5 Adds serial port support to the multiplexer library.
It also modifies the HP 2100 and PDP11 multiplexers to add serial support as demonstrations of the capability that, one day, might be extended to all simulators.  I have tested the HP support, but I relied on Holger Veit to test the DEC stuff, so I can't guarantee that it works.  I also relied on Holger to test under Linux, so the same caveat applies.

    The changes needed in the device simulators are relatively small.  For example, if you look at the patches for "hp2100_baci.c", you'll note that most of them are documentation changes.  The only things of note are:

 - an expansion of the TMXR initializer

 - additional code in the "attach" routine to try attaching a serial port
   if attaching a socket fails

 - additional code in the "detach" routine for the same reasons

The HP MPX device (hp2100_mpx.c) needs a tiny bit of additional support from the ATTACH and DETACH commands.  Specifically, SCP was modified to set a flag ("sim_unit_ref") to indicate whether ATTACH MPX or ATTACH MPX0 was done, i.e., to differentiate between a device and a unit attach (recall that SCP treats these as both referring to unit 0).  This is needed because the socket attaches (logically) to the device, whereas a serial port attaches to a line.  Without this flag, the attach routine cannot differentiate between ATTACH MPX and ATTACH MPX0, as the distinction is lost by the time the VM's attach routine is called.  This support isn't needed for the HP MUX device because the socket attaches to a different device than the lines do.

    MPX also requires a bit more work due to the capability to mix serial and Telnet lines on the same multiplexer (BACI is a single-line terminal device).

    The attached PDF contains revisions to the "Writing a Simulator for the SIMH System" publication that documents the additions and changes to the multiplexer library for serial port support.  User documentation for serial port support currently exists only in the initial comments in "sim_tmxr.c"; I will add the appropriate text to the "SIMH User's Guide" if we decide to add this to the release version.
2012-04-19 19:18:15 -07:00
Mark Pizzolato
5f505ccadf Fixing many compiler identified nits. 2012-04-18 09:48:04 -07:00
Mark Pizzolato
3836306446 Revised prior OSX specific makefile fix to avoid a grep error message 2012-04-18 09:09:40 -07:00
Mark Pizzolato
127c8042c1 pdp11_xq: Forced the use of clk_cosched when idling is enabled
pdp11_xu: Separated clock based activities from packet reception by creating a separate XU unit for this purpose
2012-04-17 13:40:09 -07:00
Mark Pizzolato
f206facbd0 Merge branch 'master' of github.com:markpizz/simh 2012-04-17 08:46:33 -07:00
Mark Pizzolato
2873be2d7a Fixed makefile to work for various different gcc versions on OSX (from Craig Berry) 2012-04-17 08:45:52 -07:00
Mark Pizzolato
dfcd818762 Added O_DSYNC semantics to the RAW file open() call for *nix platforms. This makes *nix RAW I/O behavior consistent with windows RAW I/O. 2012-04-16 04:58:28 -07:00
Mark Pizzolato
eb60957366 Fixed VAX idle for NetBSD and OpenBSD support. 2012-04-12 18:45:57 -07:00
Mark Pizzolato
190993b5f4 Fixed possible NULL pointer dereference. (from Sergey Oboguev) 2012-04-12 14:48:26 -07:00
Mark Pizzolato
c6c9e0c3ac Fixed arguments to sprintf when constructing the expansion of %*. Found by Maurizio De Tommaso. 2012-04-12 12:18:23 -07:00
Mark Pizzolato
79d0e25848 Fixed printf of error messages which had parameters in the wrong order (found by Maurizio De Tommaso) 2012-04-12 12:11:01 -07:00
Mark Pizzolato
330839888d Removed redundant {sim_name}.rc initialization file. 2012-04-12 09:59:32 -07:00
Mark Pizzolato
04098f6007 Fixed VAX idle support for newer versions of NetBSD and OpenBSD to not trigger idling when IPL is changed from the system Boot ROM. 2012-04-12 09:52:55 -07:00
Mark Pizzolato
fc8856805d Added a default initializing file simh.rc to the files automatically loaded when a simulator starts
Fixed ASSERT command to require a condition operator (from Dave Bryan)
2012-04-11 19:26:27 -07:00
Mark Pizzolato
c1663795f1 Added VAX idle support for newer versions of NetBSD and OpenBSD guests if they use IPL 1 as the idle trigger 2012-04-11 19:24:42 -07:00
Mark Pizzolato
95a1cb71df Added a generic non simulator specific startup include file (simh.rc) to be processed.
Corrected the ON INHERIT behavior to not allow nested procedures to change the ON INHERITance state.
2012-04-11 10:46:43 -07:00
Mark Pizzolato
542c15844c Added display of the OS sleep resolution which is now displayed as an explanation if idling is unavailable. 2012-04-11 07:32:06 -07:00
Mark Pizzolato
33567b474d Sanity check when detaching a undetached unit. fro Dave Bryan. 2012-04-10 08:09:48 -07:00
Mark Pizzolato
fd702e407b Made automatic startup file be named {sim_name}.rc (i.e. hp2100.rc or vax.rc, etc.) 2012-04-10 07:02:49 -07:00
Mark Pizzolato
1cb4eb7960 Fixed Asynch I/O issues which may leave pending asynch I/O in limbo when device resets happen (found by Sergey Oboguev) 2012-04-10 05:43:59 -07:00
Mark Pizzolato
a339dae651 Extensive Control Flow Enhancements:
Added Message Suppression flag for status values, including providing a -Q option to the RETURN command to return with a message suppressed status
Added Do command file default extension of .sim (from Dave Bryan)
Added -O option to DO command file invocation which causes the caller's ON state and actions to be inherited in the newly called DO command file
Added Command Line expansion to include a %* which expands to the whole set of arguments (%1 ... %9)
Relaxed Command Line argument substitution (delimited by %'s) which cause environment variable lookups to first lookup the literal name provided and if that fails, lookup the name upcased.
Added a SIM_VERIFY special Command Line expansion variable which expands to "-V" when command echoing is active
Added a SIM_MESSAGE special Command Line expansion variable which expands to "-Q" when error message display is suppressed
Added Command Aliasing, which causes the initial token on a command line to be looked up in the environment variable table, and if it exists to substitute the expansion for the initial token.
Changed environment variable defining (with SET ENV variable=value) to always upcase the variable name.
Added SHIFT command which shifts the numbered argument variables %1 ... %9 to the left by one (%1 becomes what was %2, etc.)
Added CALL command which will call a routine (label) in the currently executing command file
Added SET VERIFY and SET NOVERIFY commands which enable or disable DO command echoing
Added SET MESSAGE and SET NOMESSAGE commands which globally enable or disable the display of status messages when commands (or Do Commands) return with unsuccessful status
Added SET ON INHERIT and SET ON NOINHERIT to globally enable inheritance of ON state and actions when DO commands are invoked
Added PROCEED and IGNORE commands which are do nothing but return success.  These can be used in specific ON actions to possibly ignore particular return status values
Added DO command file line number to error messages which are displayed while processing DO command files
Expanded the DO command nesting level to 20 to potentially allow for more nesting due to the extensive use of CALL commands are used
2012-04-10 05:38:12 -07:00
Mark Pizzolato
40deb20ccd HP2100 update from Dave Bryan 2012-04-04 12:31:43 -07:00
Mark Pizzolato
a14a1ab5cd Added missing synchronization when dispatching asynchronous calls. From Sergey Oboguev 2012-04-04 11:08:56 -07:00
Mark Pizzolato
ab3af3062d - Changed asynch queue insertion and removal to use a lock free algorithm based only on InterlockedCompareExchangePointer. We can now use this lock free approach on IA64 host systems as well.
- Removed flawed logic which assumed that sim_interval was meaningful when referenced by an asynchronous thread.
- Adjust the event_time of events removed from the asynch queue to account for the average time spent on the queue before the event was noticed by the instruction execution thread.
- Added a sim_activate_notbefore function which specifies an rtime which is the earliest time the event should fire.
- Changed the 'wakeup from idle' logic to force an immediate asynch queue check if the wakeup was not due to a timeout (i.e. it was due to an asynch queue insertion).
- Fixed the descrip.mms to build asynchronous support on AXP and IA64 VMS with kernel threads enabled
2012-04-04 11:05:24 -07:00
Mark Pizzolato
7ac3557524 Fixed bug under Asynch I/O where I/O completion did not delay the appropriate time before passing back device status to a simulator. Found by Sergey Oboguev. 2012-04-02 14:05:12 -07:00
Mark Pizzolato
6e6fdd02ae Fixed VMS Build of DEBUG simulators 2012-03-31 14:43:59 -07:00
Mark Pizzolato
4a78242c6f Cleaner GCC options detection on older GCC versions on varioous platforms
Added missing host NIC MAC address determination for VMS hosts
2012-03-30 10:58:01 -07:00
Mark Pizzolato
9449c1fc3f Restored announcing GCC version and build options lost in manual merge from v3.9-0-rc2 2012-03-29 09:12:08 -07:00
Mark Pizzolato
38bbdd2de9 Added VH to the VAX780 build (makefile and descrip.mms) 2012-03-29 04:05:39 -07:00
Mark Pizzolato
7e68046c59 Added VH to VAX780 Visual Studio Project 2012-03-26 12:17:30 -07:00
Mark Pizzolato
7ea8831c7b Added do command default file extension for file being opened of '.sim' 2012-03-26 12:17:07 -07:00
Mark Pizzolato
0dd5185099 Added VH device to the VAX780 2012-03-26 11:53:06 -07:00
Mark Pizzolato
8cc2ef03c7 Fixed regression in handling (ignoring) error conditions while processing simple do file. 2012-03-26 04:59:46 -07:00
Mark Pizzolato
027c921cfc More robust and correct readline support and fix to VMS build for HP2100 2012-03-25 15:55:36 -07:00
Mark Pizzolato
c205070554 Fix makefile for better GCC version determination and optimization enabling on more platforms 2012-03-25 07:36:37 -07:00
Mark Pizzolato
6e813b8364 Merge with v3.9-0-rc2 first pass 2012-03-24 19:46:37 -07:00
Mark Pizzolato
6d11b3bd25 Updated HP2100 from Dave Bryan 2012-03-24 12:52:22 -07:00
Mark Pizzolato
8255ba9379 Fixed typo in prior correction 2012-03-23 15:57:26 -07:00
Mark Pizzolato
7d07c49e3f Credit Matt Burke for PCAP-VMS revisions 2012-03-23 13:06:37 -07:00
Mark Pizzolato
380625e404 Fixed vax build issue when building on a vax. 2012-03-23 13:05:36 -07:00
Mark Pizzolato
3cc10c3f71 Fixed vax build issue when building on a vax. 2012-03-23 12:40:20 -07:00
Mark Pizzolato
7c51414228 Fixed sim_debug macro implementation to allow for the case when a sim_debug invocation is used as a single expression following an if condition. Found by Michael Bloom 2012-03-23 12:39:42 -07:00
Mark Pizzolato
5863e1bc38 HP2100 Update from Dave Bryan 2012-03-23 11:11:07 -07:00
Mark Pizzolato
e0fbfa6abf Fix memory leaks in attach error paths. 2012-03-22 16:14:30 -07:00
Mark Pizzolato
2fcb0aad62 Made VMS build more robust and the failure case when VMS-PCAP is missing provide guidance. 2012-03-22 14:37:01 -07:00
Mark Pizzolato
0270d0ea0d Cleanup based on reports from Michael Bloom 2012-03-22 12:20:00 -07:00
Mark Pizzolato
3049f16af2 Compiler detected unsigned bug 2012-03-21 14:46:34 -07:00
Mark Pizzolato
5284f8f1e6 VMS Build cleanup 2012-03-21 14:45:59 -07:00