Commit graph

55 commits

Author SHA1 Message Date
Peter Schorn
0f6bcb9682 SIMH: Fix spelling errors in comments and strings 2024-07-11 12:29:53 +02:00
Clem Cole
afc5313e16 SERIAL: Find more serial port names on Unix, remove unused ioctl code 2022-01-12 12:25:43 -08:00
Howard M. Harte
d8d324ded6 serial: Support COM ports > COM9 on Windows
COM ports greater than COM9 on Windows can only be opened using
the DOS device UNC path \\.\.

Prefix the filename passed to CreateFile() with this prefix to
address this issue.
2021-12-17 15:06:41 -08:00
Mark Pizzolato
a66f7efee1 SERIAL: Clean up display of open serial ports
As mentioned in #782
2019-12-16 05:28:01 -08:00
Mark Pizzolato
7c1c04d9a9 SCP: Clear Coverity identified warnings 2019-11-14 21:38:45 -08:00
Mark Pizzolato
ef1805b233 SERIAL: Correct inverted error sense of Windows modem status API (Dave Bryan) 2019-04-16 17:09:32 -07:00
Mark Pizzolato
c7b0928b33 SCP: Avoid potential buffer overruns by using strlcpy() and strlcat() 2019-03-08 12:31:01 -08:00
Mark Pizzolato
914d79c980 SERIAL: Avoid potential SEGFAULT when scandir() fails on Linux 2018-05-08 22:48:12 -07:00
Mark Pizzolato
81bcd6d319 CONSOLE/SERIAL: Properly rate limit output to console port
When the console is connected to a serial port or telnet sessions enable
speed setting, the bits being output are now paced a the desired speed.
Multi-line mux I/O is also correctly rate limited on all lines.

This should address the problems described in #545
2018-04-06 04:12:38 -07:00
Mark Pizzolato
dcf746a72a SERIAL: Add advice message when no serial ports are found in SHOW SERIAL 2018-04-01 12:37:48 -07:00
Mark Pizzolato
3f7f92682d TMXR, SERIAL: Properly set serial port speed on attach. 2018-03-20 20:52:26 -07:00
Mark Pizzolato
7200825da1 SERIAL: Make sure to properly initialize break status on serial reads 2018-03-02 19:41:42 -08:00
Mark Pizzolato
daf8382cf2 TMXR: Properly announce attach connection on serial lines when -V option is set 2017-10-30 18:24:19 -07:00
Mark Pizzolato
cb21246f6e SERIAL, MUX: General fix for Windows Platform physical serial port output
Avoid Windows specific serial I/O behaviors which might not always have
hardware state reported to user level code.  The TMXR layer code already
paces mux output so that reasonable behavior is observed.
2017-10-28 09:28:39 -07:00
Mark Pizzolato
2c6c8f4ef8 SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms 2017-05-07 19:19:55 -07:00
Mark Pizzolato
75a2ced795 SERIAL: Fix potential buffer overrun. (COVERITY) 2017-03-10 11:55:29 -08:00
Mark Pizzolato
6a90ed44c7 VMS_BUILD: Fix build on OpenVMS/VAX host
As discussed in #394
2017-02-08 21:18:02 -08:00
Mark Pizzolato
c3496e4aa6 TMXR: Reworked output to physical Serial ports for VMS and Windows hosts
The goal being to have output to physical serial ports complete without host
OS level buffering so that what is transmitted via the serial port has correct
timing with respect to I/O completion status within a simulator.

Linux, OS X, and various other *nix host platforms still need work here.
2016-07-14 13:53:41 -07:00
Mark Pizzolato
4065f47f8c SCP: Add sim_strncasecmp for platforms which may not have strncasecmp
Consolidated the existing two previously implementations which existed in
sim_serial and sim_ether.
2016-07-12 09:23:46 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
9d2079df68 SERIAL: Fix extra probes to start at 0. 2016-02-01 06:54:55 -08:00
Mark Pizzolato
de72cba08b SERIAL: Add probes for common serial port names on NetBSD.
Fixes #273
2016-01-31 11:55:41 -08:00
Mark Pizzolato
d8f2647f93 SCP: general const cleanups and const change to sim_vm_parse_addr. 2016-01-24 08:27:08 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
2e85e74699 SCP: Various cleanups.
- Avoid assignments of void * values.  Cast all memory allocation return values to appropriate types.
- Add output to sim_log where missing in various places.
- Fixed issue with lost file positions after a restore for devices which leverage the UNIT_SEQ flag.
2013-11-20 09:13:27 -08:00
Mark Pizzolato
65edda68ad SERIAL: For writes to serial ports, accept both EAGAIN and EWOULDBLOCK as non-error conditions for all *nix hosts 2013-11-04 12:15:26 -08:00
Mark Pizzolato
651780c481 Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
Mark Pizzolato
d964df4eea Compiler suggested cleanups 2013-05-09 14:02:48 -07:00
Mark Pizzolato
eb1452913f Force return of SCPE_OPENERR when the same serial port is opened more than once. 2013-04-07 15:28:02 -07:00
Mark Pizzolato
01ee219f01 Fixed some HP-UX serial I/O functionality from Mikulas Patocka
We need to set buffer to 1 character and turn off the timeout.
Otherwise, HP-UX buffers 4 characters before making them available
to read().
2013-03-22 10:28:09 -07:00
Mark Pizzolato
a262dd9c14 Compiler indicated cleanups 2013-03-19 01:11:22 -07:00
Mark Pizzolato
7756cb8cd4 Added HP-UX Serial port detection (for SHOW SERIAL) from Mikulas Patocka 2013-03-18 05:53:39 -07:00
Mark Pizzolato
de483074e6 Cleanup for build on VMS 2013-03-16 11:44:34 -07:00
Mark Pizzolato
4ff56d6c15 Changed all internal #ifdef's which were conditional on __linux to be conditional on either __linux or __linux__. Some platforms (PPC) don't define __linux when gcc is invoked with -std=c99. 2013-02-20 21:57:02 -08:00
Mark Pizzolato
e3207c2009 Compiler suggested cleanups 2013-01-23 05:07:44 -08:00
Mark Pizzolato
674e56b376 Fixed compile issues on some Linux platforms 2013-01-03 08:01:43 -08:00
Mark Pizzolato
9356b0cb1e Changed Linux serial port enumeration to leverage kernel provided device information in /sys/class/tty 2013-01-02 15:15:01 -08:00
Mark Pizzolato
af93ca96c3 Added /dev/ttyAMAn devices as possible serial port lines on *nix systems.
Fixed reset disconnect logic for serial lines
2012-12-26 10:51:19 -08:00
Mark Pizzolato
3346f4a32c Fix build on VMS (IA64) 2012-12-19 12:45:03 -08:00
Mark Pizzolato
0450a9b430 Compiler suggested cleanup 2012-12-15 07:56:42 -08:00
Mark Pizzolato
c046a29cba Fix reference to sim_deb 2012-12-14 15:53:59 -08:00
Mark Pizzolato
883ad6bf5c Fixed sim_write_serial to return 0 when the non blocking write fails with the expected errno of EAGAIN 2012-12-14 03:27:18 -08:00
Mark Pizzolato
b466bdc9c6 Compiler warning cleanup 2012-12-13 13:41:57 -08:00
Mark Pizzolato
c6c66487ac Compiler suggested cleanups 2012-11-30 13:22:15 -08:00
Mark Pizzolato
388e13eb3a sim_serial.c Fixed VMS serial code after testing. 2012-10-22 14:58:56 -07:00
Mark Pizzolato
3311f4d581 sim_serial.c Added initial serial support for VMS hosts 2012-10-22 09:07:45 -07:00
Mark Pizzolato
757969ef40 Fixed bugs found during testing by Mark Benson
sim_serial.c

    - Fixed error message printing when retry is merely needed

sim_tmxr.c
     - Fixed parsing to properly recognize a listen port argument of "nnn;notelnet".
     - Fixed buffer wrap output condition.
2012-10-20 07:46:29 -07:00