Commit graph

4596 commits

Author SHA1 Message Date
Olaf Seibert
86ffe4bec2 sim_disk.c: only free filebuf if it was allocated here too.
PDP11/pdp11_rq.c re-uses ->filebuf as a sector buffer (under the #defined
name rqxb) and allocates it as such. If an RQ disk is detached and
another attached, this buffer would be lost and the pointer reset to
NULL. sim_disk.c would only allocate the buffer if UNIT_BUFABLE is set,
which means to buffer the whole disk. Since this rightly isn't set on RQ
disks, the pointer would remain NULL and segfaults would ensue.  See
open-simh issue 274.
add comment about safe re-use of filebuf
2023-07-16 16:38:19 -04:00
B. Scott Michel
1e371e7c98 Memory sanitizer fixes
Fixes suggested by running the Clang memory santizer on the Github CI/CD
pipeline:

- sim_exp_check: Use calloc() to allocate and initialize the PCRE
  captured string offset vector. Also check the offsets to ensure they
  are captured substrings:

  -- If a substring wasn't captured, the offset pair is { -1, -1 }.
     (Of course, this would never happen in SIMH. :-)

  -- Remove the corresponding "_EXPECT_MATCH_GROUP_{pat}" variable
     from the environment when its substring isn't captured.  unsetenv()
     is locally implemented in scp.c, which sets the environment
     variable to an empty string; it isn't actually removed.

  Failure occurs in multiple tests.

- _sim_debug_write_flush: Ensure that debug_line_buf_last's underlying
  buffer is initialized when realloc-ed. (i650 failure.)

- vid_version: Initialize local variables "compiled" and "running". MSan
  claims that these aren't initialized. Reading the SDL  source, the
  patch level might not be initialized on some platforms. (multiple
  sim_video tests.)

NOTE: Do not attempt to run interactive memory-santized simulators on
Linux platforms where ncurses <= 6.2+20201114-2. MSan detects
uninitialized variables within ncurses; newer versions of ncurses fix
them.
2023-07-16 16:35:58 -04:00
B. Scott Michel
30b74dbd73 appveyor.yml build, dep lib version number updates
- Give appveyor.yml some much needed attention. Specifically, work
  around the CMake build termination when the issuing the "CMake is too
  old to produce packages" warning message. There's something funky with
  how Appveyor's runtime interacts with PowerShell and
  warning/diagnostic output ends up terminating builds unexpectedly.
  Appveyor's technical support says to write the CI/CD script using the
  old DOS CMD interpreter, not PowerShell.

- Cut down the number of builds. Older Visual Studio VM images are still
  in the appveyor.yml matrix, just commented out.

- dep-locate.cmake: Update dependency library version numbers to reflect
  recent releases for libpng16, SDL and SDL_ttf. This affects the XP
  "legacy" CMake builds on Github CI/CD, Appveyor's VS 2017 and earlier
  VM images that build the minimal SIMH dependency library support
  (i.e., environments where vcpkg is known not to work.)
2023-07-15 17:20:26 -04:00
Howard M. Harte
f8a9f9bbe7 AltairZ80: m68k: Avoid buffer overflow detected by gcc 9.4.0. 2023-07-15 17:20:05 -04:00
Tony Lawrence
f3e2c45d23 MAKEFILE: cleanup junk characters from 2c89387 2023-07-15 17:12:58 -04:00
Anton Kochkov
9d4045c802 Add Coverity Scan CI job 2023-07-15 17:12:23 -04:00
Peter Schorn
4c1aee0887 AltairZ80: Correct spelling, formatting and years 2023-06-30 14:31:06 +02:00
B. Scott Michel
09f67aa06c v141_xp: VS Installer whack-a-mole tournament
VS installer's startup is not instantaneous and there's some lag in the
CI/CD pipeline. Adjust strategy to wait for startup (20 seconds max) to
make the script more robust. (Doesn't seem to get triggered, but that
doesn't mean it won't happen in the future.)

Add the the following command line flags:

    --force: Forces VS instance termination, if any are running.
        (Unclear impact. Paranoia.)

    --norestart: Delay reboot, if reboot needed. (Probable reason why
        (Most likely reason why installs were incomplete.)

    --installWhileDownloading: Self-explanitory. (Unclear impact.)

"Get-VSSetupInstance/Select-VSSetupInstance" will report a VS
instance ID if successful, e.g.:

    DEBUG: Get-VSSetupInstance/Select-VSSetupInstance
    InstanceId          : 8d19910a
    DisplayName         : Visual Studio Enterprise 2022
    InstallationVersion : 17.6.33815.320
    InstallationPath    : C:\Program Files\Microsoft Visual Studio\2022\Enterprise
    InstallDate         : 6/20/2023 9:38:11 PM

Useful output in the GH CI/CD log for future debugging.
2023-06-26 09:57:40 -07:00
Tony Lawrence
a653bbfcec PDP11: RP11-C (RP02/03) disk implementation 2023-06-25 23:57:28 -04:00
Tony Lawrence
5b22fcf4c9 PDP11: RK11: Complete fix for WC as implemented in V3 + other fixes 2023-06-24 13:34:38 -04:00
ken rector
fcaf741d19 sigma: Correct DP Sense Length error(Bob Supnik) 2023-06-24 13:34:06 -04:00
Mark Pizzolato
d901d676c4 Visual Studio Projects: Force build to update to the latest windows-build 2023-06-22 04:49:57 -10:00
Howard M. Harte
3acc69fbd2 AltairZ80: IBC MCC: Clean up HDC. 2023-06-18 16:12:30 -07:00
Bill Lewis
a7dc7567c5 Update README-CMake.md 2023-06-18 13:12:34 -04:00
B. Scott Michel
d06160871f v141_xp toolkit. again. and again. and...
Rethink how the Windows XP toolkit installs because the Chocolatey
installer(s) changed and broke the SIMH CI/CD build. Revert to a
previous strategy that updates the GH Windows runner image in-place with
Microsoft's vswhere and vs_installer tools.

There's some Grey Magic in how this is done, with some adapted
PowerShell code from the Chocolately PS scripts. The upshot is that
vs_installer spawns a subprocess to do the actual install, but there's
now way to get vs_installer to actually wait for that subprocess to
complete. So, the script has to look for the installer subprocesses and
poll-wait for them to finish.
2023-06-18 13:11:31 -04:00
Mark Pizzolato
b982fc9997 TIMER: Properly report clock calibration inconsistency 2023-06-18 13:10:47 -04:00
Seth Morabito
96de0748d4 SCP: Don't malloc ep->match_pattern twice 2023-06-18 13:09:00 -04:00
Tony Lawrence
2c8938711c MAKEFILE: Move CYGWIN library search out of VIDEO section; sync compiler flags with MSVC 2023-06-18 13:08:03 -04:00
Seth Morabito
76da2c0da8 3B2: Properly NULL-terminate IU mod arrays 2023-06-18 13:03:51 -04:00
Amberelle Mason
ea5bcf97b3 Fix TODR example command
This pull request changes:
(i.e. sim> attach CLK TOY_CLOCK)
to be:
(i.e. sim> attach TODR TOY_CLOCK)
in vax780_doc.doc

References:
https://github.com/simh/simh/issues/37#issuecomment-14667981
markpizz commented on Mar 9, 2013
"I'll fix"
2023-05-30 15:50:13 -04:00
Mark Pizzolato
8b6c0b60c9 SAGE: Remove irrelevant platform #ifdefs and redundant includes 2023-05-27 14:57:46 -04:00
Paul Koning
d329907306 VAX: Add missing vax_uw.c to Windows build.
This fixes the other set of build control files overlooked in
the earlier commit for this issue.
2023-05-23 19:30:27 -04:00
Peter Schorn
b0a496446f AltairZ80: Code cleanup and simplifications 2023-05-23 21:44:47 +02:00
Paul Koning
3985447826 VAX: Add missing vax_uw.c to Windows build. 2023-05-18 16:55:15 -04:00
Anders Magnusson
5cda68abce ND100: MMS-1 support (Memory Management 1) + other fixes for Nord-100.
Can now boot the last test programs from floppy, and runs INSTRUCTION-C
and PAGING-C without errors.
2023-05-18 16:53:06 -04:00
Paul Koning
ec48dcb2e1 Common:
Remove extraneous content from README.md.
Remove unused files sim_inttypes.h and sim_printf_fmts.h
2023-05-18 12:46:01 -04:00
B. Scott Michel
8b14bb69be
CMake build infrastructure II (#53)
* CMake build infrastructure

The squashed commit that builds and packages releases for the SIMH
simulator suite with CMake, version 3.14 or newer.

See README-CMake.md for documentation.
2023-05-17 20:18:42 -04:00
Lars Brinkhoff
793149d1bd VIDEO: Include png.h before sim_defs.h.
Older versions of the PNG library header file want to include setjmp.h
and complain if it's already included.
2023-05-11 17:46:40 +02:00
Lars Brinkhoff
783ee136d7 VIDEO: Check whether SDL_WINDOW_RESIZABLE is present.
SDL versions older than 2.0.5 doesn't have this symbol or the
SDL_SetWindowResizable function.
2023-05-11 17:46:40 +02:00
Lars Brinkhoff
021413a2d7 IMLAC: Add breakpoints for memory reads and writes. 2023-05-10 09:24:56 -04:00
Bob Supnik
1ea82bd127 sigma: add wait code to WAIT instruction 2023-05-09 23:09:05 -07:00
ken rector
609d46e801 sigma_rad:fix wp test in sense and write op 2023-05-09 11:27:44 -04:00
Mark Pizzolato
49eccc768a SCP: Include all simh supported system includes in sim_defs.h
Only SCP libraries should be including additional OS specific include
files since they cover both:
   1) Are responsible for platform specific details integrated into simh
       support
and
   2) Implement extended functionality optimally considering the proper
       behaviors to cooperate with the simh event system and existing
       capabilities.

Simulator code can optionally include any of these system include files:
  <stddef.h>, <stdlib.h>, <stdio.h>, <stdarg.h>, <string.h>, <errno.h>.
  <limits.h>, <ctype.h>, <math.h>, <setjmp.h>

Such inclusion will be redundant with what is already provided here
by sim_defs.h.  Simulator code should include SCP provided include files:
  "scp.h", "sim_card.h", "sim_console.h", "sim_disk.h", "sim_ether.h",
  "sim_fio.h", "sim_imd.h", "sim_scsi.h", "sim_serial.h", "sim_tape.h",
  "sim_timer.h", "sim_tmxr.h", "sim_video.h"
depending on the specific needs of the device being simulated.
2023-05-09 11:26:27 -04:00
Howard M. Harte
2c6ad66acd AltairZ80: IBC: Fix MCC hard disk command mask. 2023-05-09 11:23:38 -04:00
Howard M. Harte
d2b663ec94 AltairZ80: IBC: Fix line endings. 2023-05-09 11:23:38 -04:00
Lars Brinkhoff
af9c7b5ebc VAX: M7452 Unibus window module for VAXstation 100. 2023-05-04 13:28:11 +02:00
Peter Schorn
1aa76cca6e AltairZ80: Additional checks for stop_cpu condition 2023-04-26 10:19:23 -04:00
Howard M. Harte
044ba02847 AltairZ80: Add IBC computers to .vcxproj. 2023-04-25 21:00:09 -07:00
Howard M. Harte
0184492d81 AltairZ80: Add IBC computers to VS2008 project. 2023-04-25 21:00:09 -07:00
Howard M. Harte
15d2b89573 AltairZ80: Add IBC Super Cadet / Middi Cadet support. 2023-04-25 21:00:06 -07:00
Peter Schorn
f0b782b33a ND100: Added void in function declarations, removed unused function ffs 2023-04-17 11:03:09 -04:00
Seth Morabito
ae7ca950f2 3B2: Fix for diagnostics timer hang
Under certain circumstances, the timer resolution in the Version 3
could become coarse enough that very short timer intervals would lead
to an infinite loop of bus errors when running timer firmware
diagnostics.
2023-04-13 05:56:35 +02:00
Seth Morabito
7be9f2f3e8 3B2: LPT Device; MMU and SCSI fixes
This change adds support for printing to an attached text file via the
Centronics port of a simulated PORTS feature card. A new device named
"LPT" has been added. See "help lpt" for documentation.

Additionally, there has been a fix to a bug in the SCSI tape boot
implementation and a very minor bug fix to the Rev 3 MMU.
2023-04-09 12:36:15 -07:00
Peter Schorn
e4ad37eccc SCP: Fix possible memory corruption issue 2023-04-07 09:17:46 +02:00
Mark Pizzolato
374e3b8e71 SCP: Change declaration of get_yn() to have boolean argument and return value
- Fix improper get_yn() use in test library logic

Reported by Peter Schorn
2023-04-06 13:00:52 -10:00
ken rector
c654c20c49 sigma: MT: AIO must mask unit number before calling TDV status. 2023-04-05 16:32:23 -04:00
Peter Schorn
8b1b5eaeb7 AltairZ80: Add void when missing in function declaration 2023-04-05 16:28:15 +02:00
Peter Schorn
cc23adf6fd AltairZ80: Remove MetroWerks support for Macintosh OS 9 2023-04-05 16:15:41 +02:00
Mark Pizzolato
75e79a4da8 ND100: Fix CLK device setup and calibration
Original logic mixed up parameters and calibrated for 20000 ticks
per second rather than 50.
2023-04-03 10:24:53 -04:00
Patrick Linstruth
0bc7f09edf AltairZ80 VDM1: Corrects SCP error and video aspect ratio
Corrects video window aspect ratio
Corrects 'd -m c mov m,b' SCP error
Changes default dirty flag from FALSE to TRUE
2023-04-03 09:58:56 -04:00