Commit graph

4246 commits

Author SHA1 Message Date
Tony Nicholson
e1ce9f4f70 sim_imd: Check for EOF when reading IMD track headers
The recent change to check that the IMD file track header record is 5
bytes introduced a problem with the end-of-file triggering an open file
error - instead of the previous behaviour where the number of bytes in
the track header was ignored and end-of-file was checked.

I noticed this after fetching and compiling the latest simh altairz80 - it
was refusing to my mount floppy disk IMD image files (which I had made
from 8-inch floppies back in 2006).

```
maxi:s100 tony$ altairz80 cpm3bk.ini

Altair 8800 (Z80) simulator V4.0-0 Current        simh git commit id: d3f1ee09
Console escape is CTRL-\
I8272: IMD disk corrupt.
/Users/tony/s100/cpm3bk.ini-58> att disk1a0 /Users/tony/s100/C3BKSIMH.IMD
File open error
```

Looking at the commit history, I saw the change by Howard Harte to
sim_imd.c to "Resolve CID 1502448, 1502460" - presumably to fix the
call to sim_fread() that was not checking the returned result.
Howard's "fix" broke the parsing of the IMD file sector headers by
not checking for an end-of-file condition (at the end of file it
would read 0 bytes and this was now treated as a fatal error - whereas
the old code had a check for end-of-file after the call to sim_fread()).

This commit now detects end-of-file correctly, as well as verifying
the track header is 5 bytes.
2022-05-01 08:01:18 +10:00
Mark Pizzolato
d3f1ee0998 CONSOLE: Set console input WAIT time to reflect console speed 2022-04-05 08:37:03 -07:00
Mark Pizzolato
b8015349e2 DISK: Add progress indications for ZAP -Z 2022-04-01 12:37:11 -07:00
Mark Pizzolato
a15c6407bd SCSI: Add clean SCSI command debugging support 2022-03-25 17:32:57 -07:00
Mark Pizzolato
6cac5c9eae DISK: Force Read Only for all ISO container attach operations
ISO files and real CDs exist which don't have ISO 9660 file structure.
These do contain ODS2 file systems since they were produced before
ISO 9660 was standardized and certainly before OS support for ISO
9660 was added.  As such, any file named .iso or .ISO will always be
attached read-only since CDs are never naturally writable devices.
2022-03-25 16:25:28 -07:00
Richard Cornwell
406c6af944 KA10: Fixed FE printer support on Tops 20. 2022-03-25 19:16:56 -04:00
Richard Cornwell
4b5386ea75 KA10: Fixed running of OPR on Tops10 and Tops 20. 2022-03-25 19:16:35 -04:00
Mark Pizzolato
61877a5c77 PDP11, VAX: Add RF73 and RF35 disk type to RQ, correct various model numbers 2022-03-22 21:25:16 -07:00
Paul Koning
44bdb8a9d6 DISK: Fix off by one error in reporting RSTS file structure info
Updates the previous commit to do it better, by not changing
the return value of get_rsts_filesystem_size -- it still returns
the size, at least our best guess of it (for RSTS it's not possible
to get it correct in every case, but it will be correct for
most scenarios).
2022-03-21 17:08:36 -04:00
Paul Koning
efb83fa831 DISK: Fix off by one error in reporting RSTS file structure info
This fixes issue #1106 -- the last sector number reported was
off by one (sector past the last free sector).
2022-03-21 13:43:30 -04:00
Bob Armstrong
eac94b4bdb H316: update IMP 00readme.txt to match current code 2022-03-20 16:39:03 -07:00
Mark Pizzolato
e0700d3b7c DISK: Add support for ISO 9660 file system detection
Any attach of an ISO 9660 file system is done Read Only since that
file system is logically non-writable.

Related to #1094
2022-03-19 17:18:54 -07:00
Howard M. Harte
3b06ed7ec9 sim_imd: Resolve CID 1502448, 1502460. 2022-03-19 08:47:32 -07:00
Mark Pizzolato
f0760cc5cb TX0: Silence Coverity issues
Coverity is confusing routines by the same name from different simulators.
Making these routines static should solve the problem.

Also fix un-checked status complaint.
2022-03-18 16:47:33 -07:00
Mark Pizzolato
cb4d6cfc29 FIO: Properly bound byte swap activity when reading on big endian hosts 2022-03-18 12:09:17 -07:00
Leo Broukhis
203ca72356 BESM6: Fixed a compilation warning and a Coverity defect. 2022-03-18 07:53:24 -07:00
Seth Morabito
6afef3fabf 3b2: Fix Coverity issues 2022-03-17 16:04:43 -07:00
Mark Pizzolato
becceeb889 ETHER: Assure there's enough space to fetch the system GUID on Windows 2022-03-17 12:17:40 -07:00
Mark Pizzolato
aa637f58c0 DISK: Properly support attach time disk copy to a larger container 2022-03-17 07:28:11 -07:00
Leo Broukhis
36cd4668e7 BESM6: A Coverity fix, TTY enhancements.
One of the two parallel interface consoles (TTY26) works in the Videoton-340 mode;
disconnecting a remote TTY session works like powering the terminal down.
After reconnecting, it is necessary to type "HYC" blindly to re-initialize the line.
Added TMXR line reordering.
2022-03-16 19:52:51 -07:00
Mark Pizzolato
8d2e6849b6 I7094: Remove irrelevant buffer address checks
These checks were remnants of prior code which dynamically allocated buffers.
2022-03-16 19:18:22 -07:00
Mark Pizzolato
50f80f61cf PDP11: Only compute vector ilvl when it will be used (Coverity) 2022-03-16 14:44:20 -07:00
Bill Beech
efa04e4e31 SWTP: Fix Coverity found more missing arguments in M6800 2022-03-16 14:41:34 -07:00
Bob Armstrong
2a63d939d3 H316: Coverity update - remove dead code; fix formatting 2022-03-16 10:56:21 -07:00
Richard Cornwell
3d3675edbc KA10: Clean up coverity error. 2022-03-15 21:30:55 -04:00
Bill Beech
af6665be05 SWTP: Fix Coverity found missing argument in M6800 2022-03-15 15:44:13 -07:00
SpareTimeGizmos
b779bfc1cd H316: Fix missing initialization and remove dead code found by Coverity 2022-03-15 08:35:47 -07:00
Mark Pizzolato
d03f1b67a2 PDP11: Only compute vector ibit when it will be used (Coverity) 2022-03-15 08:19:25 -07:00
Mark Pizzolato
b6201898ee I1620: Fix typo in recent Coverity change 2022-03-15 07:48:20 -07:00
Mark Pizzolato
d02e91c797 I1401, I1620, I7094: Address Coverity issues in card reader devices 2022-03-15 07:25:34 -07:00
Howard M. Harte
86f65093bc AltairZ80: s100_hdc1001: Resolve CID 1515006. 2022-03-14 22:43:56 -07:00
Mark Pizzolato
e88221b362 I7094: Avoid Coverity identified potential error 2022-03-14 15:54:02 -07:00
Mark Pizzolato
61c1af846f TAPE: export sim_tape_error_text 2022-03-14 15:28:39 -07:00
Peter Schorn
8f3a2057e1 AltairZ80: Fix Coverity identified issues in s100_jd2d.c 2022-03-14 14:55:50 +01:00
Mark Pizzolato
b2dd269d7a SCP: Expand sprint_val target buffers with one extra byte 2022-03-13 20:08:54 -07:00
Mark Pizzolato
ee545a4828 SCP: Assure that all formatted numbers have sufficient buffer space 2022-03-13 13:23:05 -07:00
Mark Pizzolato
6c16052184 SIGMA: Avoid Coverity mag tape warning 2022-03-13 12:40:16 -07:00
Roberto Sancho Villa
b9cdcd1099 I650: Fix Coverity identified issues 2022-03-13 11:47:08 -07:00
Mark Pizzolato
8c325db1ab Various Magtape Devices: Handle Coverity report of tape error status cases
Coverity flagged one magtape simulator for having fewer case breakouts
than the range of MTSE_x errors, after they were expanded for
MTSE_LEOT (listed as "V4 compatibility") and MTSE_RUNAWAY (for
Dave Bryan's implementation of erase and erase gap).

According to Dave, it turns out that MTSE_RUNAWAY can only be
returned if the magtape simulator supports and implements a density
specification and the ERASE function. The simulators Bob Supnik wrote
don't meet that criteria, so the expanded errors can't be returned.

Simply add a "default" case to the map logic returning SCPE_IERR for
unexpected cases.
2022-03-13 11:23:11 -07:00
Mark Pizzolato
4fa0eaad99 ETHER: Correct reversed supported version check for Npcap 2022-03-12 14:28:24 -08:00
Richard Cornwell
b566ea356f KA10: Cleanup some extended addressing issues with KL10B.
Clean up coverity errors.
2022-03-12 15:48:49 -05:00
Seth Morabito
c117a0bd06 3b2: Fix Coverity issues 2022-03-12 11:38:07 -08:00
Mark Pizzolato
56688be951 SWTP6800: Fix Coverity issue 2022-03-12 07:58:04 -08:00
Leo Broukhis
8ae7d4fbcd BESM6: Coverity fixes, added disk type display for SHOW MDn. 2022-03-11 19:49:28 -08:00
Mark Pizzolato
070e0b3f22 PDP10: Fix LP DEVICE attach logic remove redundant code done by SCP 2022-03-11 16:25:08 -08:00
Mark Pizzolato
bfa200f2ed IBM1130: Fix Coverity identified issue 2022-03-11 13:29:26 -08:00
Mark Pizzolato
5465707d77 PDP11, VAX: Fix Coverity issues in XQ and XU devices 2022-03-11 12:34:59 -08:00
Lars Brinkhoff
96ac1c4ba0 IMLAC: Fix wrong instruction mask for decoding. 2022-03-11 09:27:07 +01:00
Lars Brinkhoff
5efb47dca5 TT2500: Fix unintended switch case fallthrough. 2022-03-11 09:18:38 +01:00
Mark Pizzolato
c035be465c PDP11: Fix Coverity identified issue in debug format statement 2022-03-10 17:08:15 -08:00