1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

127 Commits

Author SHA1 Message Date
Peter Schorn
c7df248f09 SIMH: Fix spelling errors in comments and strings 2024-07-16 12:04:53 -10:00
Mark Pizzolato
f4f302982e TAPE: Fix potential buffer overflow when staging an in memory ANSI tape image 2023-12-04 10:57:52 -10:00
Mark Pizzolato
65d0ae2a44 SCP: Properly write debug output for commands run at the sim> prompt
- Without regard to whether the circular buffer data is otherwise in
   use while instructions are executing.
- When a circular debug buffer is in use, avoid writing out the contents
  with the periodic open file flushes and only do so on returns to the
  sim> prompt and when debug is closed
2023-11-12 12:49:07 -10:00
Mark Pizzolato
444cf9d215 TAPE: Cleanup faulty logic in sim_tape_detach
Some code paths, depending on tape type, didn't properly close the
open file.
2023-06-20 11:38:15 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- Add common system includes used in may places which are allowed
  and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
  for use only by SCP library routines into sim_scp_private.h.
2023-03-04 17:51:49 -10:00
Mark Pizzolato
2c7f44d9f7 TAPE: Add support for reading partial fixed sized records.
Partial reading is needed to properly read common archive images found
on bitsavers and elsewhere which were made from QIC devices which must
read multiples of 512 bytes at a time.
2022-11-07 10:46:15 -10:00
Mark Pizzolato
107813b11b SCP: Change sim_abort to SIM_SCP_ABORT macro.
SIM_SCP_ABORT is ONLY for use in scp support libraries
2022-07-30 11:18:08 -10:00
Mark Pizzolato
bc98e1c609 SCP: Be sure to flush output files when aborting.
Emit a last gasp message prior to flushing files before aborting.
2022-07-17 13:01:25 -10:00
Mark Pizzolato
61c1af846f TAPE: export sim_tape_error_text 2022-03-14 15:28:39 -07:00
Mark Pizzolato
0116987fc7 TAPE: Added additional switch descriptions for attach time help 2022-02-12 20:11:28 -08:00
Mark Pizzolato
a4054f33b8 SCP: Add command argument passed into library unit test routines 2022-02-07 04:21:16 -08:00
Mark Pizzolato
ca4a63929a TAPE: Add more advanced test cases and fixes various ANSI cases
Mostly from Larry Baker
2021-09-30 21:02:43 -07:00
Larry Baker
df851ebf1a TAPE: Add useful verbose output during ANSI tape testing 2021-09-28 14:36:28 -07:00
Mark Pizzolato
fc0ce0f5fb TAPE: Avoid redundant records when creating ANSI binary fixed tape files
As reported by Larry Baker
2021-09-28 14:29:38 -07:00
Mark Pizzolato
7bb96070f1 TAPE: Fix test logic to properly detach tested unit
As reported by Larry Baker
2021-09-27 21:39:58 -07:00
Mark Pizzolato
feec1da242 DISK, TAPE: Add optional library specific DEVICE context structure
- add disk and tape library initialization routines
- cleanup snprintf arguments
- truncate disk container trailing zero sectors when zapping
2021-09-20 12:28:11 -07:00
Mark Pizzolato
09db504f65 TAPE: Avoid XCode false positive analysis warning 2021-08-23 12:09:43 -07:00
Mark Pizzolato
f95b20e1f3 SCP: Cleanup potential compiler warnings 2021-08-13 09:09:53 -07:00
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