Commit graph

109 commits

Author SHA1 Message Date
Mark Pizzolato
4a41021be9 TAPE: Various fixes and additions
- Cleanup Compiler warnings
- Validate FIXED binary data as a multiple of the record size
- Add file classification tests
2020-10-19 17:25:17 -07:00
Larry Baker
117157e088 TAPE: Cleanup and various fixes
- Use tape->block_size uniformly for FIXED record length/block size
- Change tape_classify_file_contents() so the max_record_size for text
  files does not include the line endings (fixes FIXED -B 80 failure when
  reading 80- character card-images, fixes invalid ANSI HDR2 Record
  Length for ANSI-VMS, ANSI-RSX11, and ANSI-VAR -B 512 when
  reading 508-character lines)
- Distinguish RMS Record Size from ANSI Record Length: RMS Record
  Size does not include the ANSI 'D' Record Format Record Control Word
  (RCW); ANSI Record Length does
- Verify the ANSI Record Length is legal for text files
- Verify that the ANSI -B block size is large enough
- Write ANSI Record Length in HDR2 label, write RMS Record Size in
  HDR3 label; whether they are the same or not depends on the ANSI
  Record Format
- Pad ANSI short binary records with zeros (ANSI 'F' records must
  all be the HDR2 Record Length)
2020-10-19 17:19:48 -07:00
Larry Baker
d8004ccaf6 TAPE: Cleanup, minor bug fixes and robustness additions
- Minimum -B is 14 (shorter records on mag tapes are considered noise)
- Maximum -B is 65535 (DEC tape controllers have a 16-bit byte count register)
- Remove redundant setting of TAR default record size
- Notify the user when the -E option is being ignored
- Use the UNIT_RO format flag to set the SIMH ReadOnly attach option
- Use three tape marks to mark the end of a volume for RT-11 and RSTS
  (ANSI and DOS11 formats); the third tape mark is harmless on RSX-11
  and VMS, which only write two
- TAR -B must be a multiple of 512 (tar specifies the mag tape block size
  in number of 512-byte records)
- The TAR file must exist
- Use a conditional test with the "is a MEMORY_TAPE image" invariant in
  sim_tape.h to select the correct tape unit attach failure message
- Always print a tape attach summary message, like SIMH does for disks;
  simplify and fix some of the other messages there
- Remove unnecessary memset()'s in dos11_copy_ascii_file()
- Fix a 16-bit integer overflow in the DOS label date calculation
2020-09-22 12:35:34 -07:00
Larry Baker
6f207b22a5 TAPE: Minor cleanup and comments here and there. 2020-08-24 18:45:08 -07:00
Larry Baker
67c3ba1e6a TAPE: Clean up library test file removal 2020-08-20 17:35:03 -07:00
Mark Pizzolato
d92aaef9b0 TAPE: Avoid potential uninitialized variable reference 2020-08-16 06:41:33 -07:00
Larry Baker
4041894b67 TAPE: Fix potential crash in library unit tests
Improper declaration of state variables referenced in setjmp/longjmp.
2020-08-15 16:21:02 -07:00
Larry Baker
c062c7589d TAPE: Enhanced file type detection performance and cleaned up stylistic details 2020-06-14 14:10:55 -07:00
Mark Pizzolato
b9297e185f TAPE: Fix ANSI EOF1 to correctly indicate the block count
- when the file ends on a block boundary, the block count was
  off by one.
- always use the max_record_size in ANSI labels independent of
  the ansi-type.
2020-05-26 09:47:10 -07:00
Mark Pizzolato
4443789fd0 TAPE: Cleanup wording in comments 2020-05-16 03:20:43 -07:00
John Forecast
f8a369e6d4 TAPE: Add DOS11 tape support for dynamic tape containing local files 2020-04-02 10:20:47 -07:00
Mark Pizzolato
519ef27def DISK, TAPE: Remove compiler and Coverity warnings 2019-11-24 10:55:25 -08:00
Mark Pizzolato
190baf897c TAPE: Rework tape image error processing to avoid potential TOCTOU (Coverity) 2019-11-17 12:09:19 -08:00
Mark Pizzolato
318b0e32bb TAPE: Report file access errors when attaching in-memory ANSI tapes 2019-11-16 00:39:01 -08:00
Mark Pizzolato
7c1c04d9a9 SCP: Clear Coverity identified warnings 2019-11-14 21:38:45 -08:00
Mark Pizzolato
aff3346eae TAPE: Correct wording in status message 2019-10-16 13:43:08 -07:00
Mark Pizzolato
fac5bc96fb TAPE: Tolerate SIMH format tape images that contain gaps during validation.
- Add gap data to tape tests

As discussed in #756
2019-10-16 00:25:51 -07:00
Mark Pizzolato
2840e3b67f SCP: Fix Coverity identified issues/noise 2019-07-15 00:04:40 -07:00
Mark Pizzolato
81472b5807 TAPE: Add an explicit ANSI-VAR format to generically present text files 2019-07-01 08:11:46 -07:00
Mark Pizzolato
6908c1e46c TAPE: Add support for FIXED record size unlabeled tape of binary and text files 2019-07-01 08:11:20 -07:00
Mark Pizzolato
e49617cd0c TAPE: Add ability to copy a tape to a SIMH format tape image
This is an implicit tape conversion tool from any supported format to
SIMH format.
2019-07-01 08:10:36 -07:00
Mark Pizzolato
47bac1f665 TAPE: Fix edge cases for AWS format tapes and default TAR block size
- Add more AWS test cases
- Add better position validation when scanning a tape image
- Properly clear SIGINT flag for interrupt during a tape attach
2019-06-29 07:39:23 -07:00
Mark Pizzolato
09bbcb29d2 TAPE: Fix P7B reverse read logic for large records
The earlier optimization to address P7B reverse read performance
didn't properly back up under some circumstances.

As potentially reported in #707
2019-06-08 13:52:27 -07:00
Mark Pizzolato
a24119aff7 TAPE: Fix RSTS file date (preserving Y2K bug) and form feed is text 2019-05-14 20:38:46 -07:00
Mark Pizzolato
db26349bd7 TAPE: Add system specific ANSI tape formats VMS, RSX, RSTS and RT11
These formats are named ANSI-VMS, ANSI-RSX11, ANSI-RSTS and ANSI-RT11
2019-05-14 01:04:18 -07:00
Mark Pizzolato
52a31597ec TAPE: Add ANSIFILES tape format 2019-05-07 05:26:20 -07:00
Mark Pizzolato
0c39921fb7 TAPE: Full speed performance of tape image validation scan
- Force the detection point of a tape structure error to be the logical EOM
  on the tape.
- Enable SIGINT abort of a possibly long running validation scan
- Add -L detail record structure option at ATTACH time
- Add extra garbage at end of generated test data files
2019-04-16 18:20:25 -07:00
Mark Pizzolato
0d894613f9 TAPE: Improve attach time tape scan performance 2019-04-11 21:01:10 -07:00
Mark Pizzolato
9dbc800e58 TAPE: Make sure that all tape record lengths are properly typed.
- Add Tape Format help options that include recently added format types to
  MTAB entries.
2019-04-10 14:26:20 -07:00
Mark Pizzolato
f12bc70470 TAPE: Add support for TAR tape format 2019-04-06 02:00:53 -07:00
Mark Pizzolato
436f1dbbbe TAPE: Reworked reverse read of P7B tapes to avoid seeking on every byte
- Added string density support for MTAB generation
2019-04-05 00:00:24 -07:00
Mark Pizzolato
e6490223eb TAPE: Fix P7B record length return when encountering a tape mark 2019-04-02 09:26:34 -07:00
Mark Pizzolato
2ba50a3f70 TAPE: Fix potential Coverity complaints 2019-04-01 15:06:25 -07:00
Mark Pizzolato
de829e52e9 TAPE: Fix incorrect comparison typo. 2019-03-31 09:35:52 -07:00
Mark Pizzolato
98f6aae31a TAPE: Make ATTACH time validation check more robust
- Different systems used tape marks in different ways that are now
  tolerated (multiple successive ones located on different parts of
  the tape, etc.)
- Always validate beginning and end of record length indicators to avoid
  moving into invalidly structured tape data
2019-03-30 09:27:02 -07:00
Mark Pizzolato
e56b5f05e7 TAPE: Add support for AWS format tape images
Also added extended tape unit test code
2019-03-26 14:06:57 -07:00
Mark Pizzolato
690b896cb4 TAPE: Fix Coverity identified issues 2019-03-20 01:45:16 -07:00
Mark Pizzolato
a006c67bc9 TAPE: Update the tape device help to describe -V ATTACH option 2019-03-19 22:05:54 -07:00
Mark Pizzolato
f09e9c290a TAPE: Add tests and Coverity cleanups 2019-03-19 10:24:28 -07:00
Mark Pizzolato
75d18d4db0 SCP: Removed redundant SCPE_NOTATT which duplicates SCPE_UNATT 2019-02-01 16:07:12 -08:00
Mark Pizzolato
3cca0cf90b SCP: Cleanup MinGW compile warnings 2019-01-21 02:36:42 -08:00
Mark Pizzolato
0daa80e03d SCP: Add support for library unit test routines 2018-08-26 18:15:30 -07:00
Mark Pizzolato
6070692581 SCP: Add unit to AIO_VALIDATE context message 2018-08-08 11:51:54 -07:00
Mark Pizzolato
28e4311039 SCP: Extended debugging to allow for unit specific debug for disk and tape 2018-04-07 21:38:26 -07:00
Mark Pizzolato
3d1f092573 SCP: Provide command context for messages emitted during ATTACH and DETACH
Context and non error messages will be suppressed in quiet mode or when -Q
switch is explicitly supplied on command line
2017-10-22 08:33:21 -07:00
Mark Pizzolato
c470d1e5e2 SCP: Allow the presence of DEVICE DEBTAB array to imply the DEV_DEBUG flag 2017-06-07 18:56:06 -07:00
Mark Pizzolato
8baac06f7f TAPE: Fix potential race (Coverity) 2017-06-03 08:56:51 -07:00
Mark Pizzolato
fae6a18835 TAPE: Update tape gap support (Dave Bryan)
With this update, the erase gap operation has been split out of
"sim_tape_wrgap" into a separate, internal "tape_erase_fwd" routine that
is called from "sim_tape_wrgap" as well as from the new "sim_tape_errecf"
routine.  There's a corresponding internal "tape_erase_rev" that's called
from the new "sim_tape_errecr" routine.

I've shimmed "sim_tape_rdlntf" and "sim_tape_rdlntr" to move the tape
context and debug stuff out of the routines that I'm maintaining.  This
will allow me to replace those functions in their entirety with the
corresponding functions in my development sources for future updates.
It also allows me to keep Bob's version in sync.  As my routines are static
and only called once from the shims, compilers should optimize away
the function calls and instead inline the code, so there'd be no extra call
overhead.

I'd also like to keep "tape_erase_fwd" and "tape_erase_rev" untouched for
the same reason.  If you wish to add debug calls to "sim_tape_errecf" and
"sim_tape_errecr", that's fine.
2017-06-02 00:54:13 -07:00
Mark Pizzolato
2d1b969cb7 TAPE: Stub extended gap behaviors to avoid link time errors. 2017-03-20 23:05:47 -07:00
Mark Pizzolato
5135f137ea TAPE: Fix Coverity potential NULL pointer dereference 2017-03-15 21:01:37 -07:00