1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-23 05:52:09 +00:00
Commit Graph

4690 Commits

Author SHA1 Message Date
Richard
df41794057 CMAKE: Conditionally add value of CPACK_BUILD_CONFIG to package name
This is an undocumented variable that will hold the build configuration,
e.g. Debug, Release, etc., used to create a package with CPack.  It is
only set if you provide an explicit configuration argument to CPack.
2026-05-06 16:01:14 -04:00
B. Scott Michel
774a74ffa4 MAKEFILE: Move PCRE2 library path search earlier
Don't put "-L" linker options after the "-l" library. Move the search
for libpcre2-8 before "-lpcre2-8" is added to OS_LDFLAGS.
2026-05-03 14:28:36 -04:00
B. Scott Michel
24cd66782e Makfile: PCRE2 default
Remove the USE_PCRE2 makefile variable so that the makefile's
configuration searches for PCRE2 and falls back to PCRE if not found.
2026-05-03 14:28:36 -04:00
B. Scott Michel
59c55062f0 SCP: PCRE2 support.
Add PCRE2 support as an alternative to the original PCRE. PCRE2 is
actively maintained and has a cleaner API than its predecessor.

- Use a function interface around regular expressions to isolate and
  reduce the preprocessor #if/#endif forest. Abide by a single function
  declaration/implementation approach, vs. multiple function
  implentations within an #if/#endif forest.

- Clean up the code so that work isn't recreated or duplicated, such as
  compiling regexps.

Platform notes:

- cmake: PCRE2 is the default RegEx support. To revert to PCRE, add
  "-DPREFER_PCRE" to the cmake configuration command line.

- makefile: PCRE remains the default RegEx support out of respect for
  tradition (cue Chaim Topol singing "Tradition".) Enable PCRE2 by
  defining "USE_PCRE2=<some value>" from the make command line or shell
  environment.

- Visual Studio Projects: Untouched. Externally built libraries provide
  regular expression support residing in a specific place in the file
  system, which is outside the control of SIMH proper.

sim_defs.h:

- Change EXPECT::size from int32 to size_t for increased
  cross-platform/64-bit compatibility (i.e., array indices and offsets
  should be size_t, where practicable.)

- Add typedefs for EXPECT regex support independence: sim_regex_t,
  sim_re_capture_t.

- Add regular expression context to EXPTAB that maintains state when
  processing the captured matches, making the function interface clean.
  Tracks intermediate state while processing captured matches.
2026-05-03 14:28:36 -04:00
Dan Cross
0e985346b1 FreeBSD: link against libpcap
On FreeBSD, one must actually link against libpcap
(or give the path to a shared object at link
time).  That is, it is not a header-only library
on that platform.

Account for this by adding a new boolean variable
in `platform-quirks.cmake`: `NEED_PCAP_LIBRARY`,
which defaults to false.  Condition pcap library
discovery and link argument modifications on that
variable in `FindPCAP.cmake` and `dep-link.cmake`.
2026-05-03 14:19:02 -04:00
Sergey Svishchev
a095973738 PDP11: Changes for Terak 8510/a simulator:
Allow standard TTY devices (TTI and TTO) to be disabled -- Terak
video board replaces them.
2026-05-03 14:07:19 -04:00
Mark Pizzolato
3b3d0fd872 SCP: Add a -F option to SET <dev> DISABLE command to force detach and cancel 2026-05-03 14:06:33 -04:00
Peter Schorn
31612d6d31 AltairZ80: Improved choice of boot ROM 2026-05-03 14:04:13 -04:00
Howard M. Harte
9e1cb6102d AltairZ80: wd179x: Better support for 5.25-inch floppies. 2026-05-03 13:59:52 -04:00
Sergey Svishchev
144bcf8df0 Expand tabs. 2026-05-03 13:50:18 -04:00
Sergey Svishchev
c985bf2027 VIDEO: handle error conditions and uninitialized displays when taking a screenshot. 2026-05-03 13:50:18 -04:00
Ricardo Bánffy
3862a8cd99 Use SDL2 instead of SDL 2026-05-03 13:48:50 -04:00
Ricardo Bánffy
366a79a845 Fix missing "}" 2026-05-03 13:48:50 -04:00
Ricardo Bánffy
26c1c98071 Adds support for DNF-based Linux distributions. 2026-05-03 13:48:50 -04:00
Lars Brinkhoff
5ce7d86a7b Visual Studio Projects: remove .user files.
They are personal user settings not appropriate for general
distribution.  The toplevel .gitigore has a rule to ignore *.user as
well as most things under the Visual Studio Projects.
2026-05-02 16:43:51 -04:00
Raphael Hoefler
586bbc694f Fix bug in bool typedef related to slirp_glue 2026-05-02 16:40:21 -04:00
Raphael Hoefler
b7a1656f5c Fix bug in bool typedef related to slirp_glue 2026-05-02 16:40:21 -04:00
Teodor
d4320b36c9 fix: wrong capitalization in soap and is .ini scripts 2026-05-02 16:37:50 -04:00
B. Scott Michel
0f9ecd1d55 CI/CD: Update Github runners
- macos-13: Deprecated and gone.

- checkout, upload-artifact: Github action script version changes.

- windows-latest (aka windows-2025): Leave future TODO notes in
  cmake-builds.yml. It's pointless to build on windows-2025 since there
  is no newer Visual Studio version than VS 2022 and doing so will
  produce the exact same package outputs.
2026-05-02 16:36:52 -04:00
J. David Bryan
4747b2747e SOCK: Fix buffer overreach when simplifying IPv4-mapped IPv6 addresses 2026-05-02 16:35:21 -04:00
tkbits
06ee4e845d Add missing package to dependency checker for arch linux
I added the missing dependency sdl2_ttf for arch linux in the dependency checker as after using the checker I still needed to manually install that to compile.
2026-05-02 16:29:33 -04:00
tkbits
e2d706cbd0 Tell cmake to use c99 to fix build with GCC 15
GCC 15 uses c23 instead of c17 by default. Apparently c23 is not backwards compatible to older C standards... This prevented me from easily compuling simh so I added a setting to tell cmake to use c99 fixing the compiling errors.

Fixes #490
2026-05-02 16:29:33 -04:00
Richard
84b3694980 Add braces around SYS_DEV.val array initializers
This eliminates thousands of lines of warnings from gcc on linux
2026-05-02 16:28:19 -04:00
Richard
ed3bb00d20 Use SDL2_ttf-static as a last chance 2026-05-02 16:25:49 -04:00
Richard Thomson
f934885d9c Handle macOS target triplet (#538)
* Add diagnostic information when determiing the triplet fails in vcpkg-setup.cmake

* Set vcpkg target triplet for macOS
2026-05-02 16:24:08 -04:00
Richard
2a141592fa Correct count in sim_fwrite
Fixes #539
2026-05-02 16:21:56 -04:00
Mark Pizzolato
45f1ce7aea SCP: Fix output produced when EXAMINE an array register
This problem was a latent bug introduced when summarized array register
output was added back in 2013 or 2018.

This fixes the problem reported in https://github.com/open-simh/simh/issues/499
2026-04-30 10:39:29 -04:00
Richard Cornwell
7741eb2bb0 KA10: Removed stray tabs. 2026-04-30 10:38:52 -04:00
Richard Cornwell
003bf88077 SCP: Clean up comments on sim_card.[ch] on format of card decks. 2026-04-30 10:38:52 -04:00
Tony Lawrence
8563ad07df PDP-11: RP-11: Fixing device register read / write consistency
1. Making sure that only expected values appear on the bus when
   registers are read by CPU;
2. Fix order of I/O cancellation in case of disk detachment with
   pending I/O;
3. Fix WLOA bug and make protection consistent with documentation;
4. Added more comments.
2026-04-30 10:38:12 -04:00
Patrick Linstruth
f5a6fd869c AltairZ80: Corrects bug in ICOM floppy device
A hobbyist found an original FDOS for 8" drives (FD360, FD3712) that
has turned up a bug in both the FDC+ and AltairZ80 implementation of
the FD3712.

In the FDC+, the data pointer into the 128 byte write "shift register"
is reset upon receipt of a CLEAR command. The real hardware never
resets the shift register, so software should not adjust the pointer
either. AltairZ80 may need the same adjustment.
2026-04-30 10:37:43 -04:00
Lars Brinkhoff
ead27b6d9b PDP18b: Add Type 34 display. 2026-04-30 10:36:30 -04:00
Richard
9deb11417e Rename variable to avoid conflict with Winsock type 2026-04-30 10:36:09 -04:00
Lars Brinkhoff
7994e0a7ce H316: Fix IMP host port 3 and 4 device addresses.
IMP host port 3 should be device 50, and port 4 is 51.  This was
reversed.
2026-04-13 16:20:31 -04:00
Mark Pizzolato
4d38373206 LINC: Add Visual Studio project files. 2025-10-23 16:10:50 +02:00
Lars Brinkhoff
035519f6c1 LINC: Fix test 31 and 35 on the diagnostics tape.
Block 45 held damaged data, and block 51 was identical to block 52.
2025-10-23 16:10:50 +02:00
Lars Brinkhoff
d049ac9918 LINC: Diagnostics for classic LINC.
These are tests for the classic LINC, including the features new in
1965: 2048 words of memory, a Z register, an overflow flag, and an
interrupt facility.
2025-10-23 16:10:44 +02:00
Lars Brinkhoff
d4eb628d83 LINC: Test for teletype output. 2025-10-23 09:17:20 +02:00
Lars Brinkhoff
fd3a79ebb5 LINC: New emulator for the classic LINC.
This emulates the classic LINC.  The design was settled in 1965,
increasing memory to 2048 words, and adding a Z register, an overflow
flag, and an interrupt facility.
2025-10-23 09:17:15 +02:00
Lars Brinkhoff
1740ac10fa VIDEO: Accept the ISO "left backslash" key.
Adds support for the ISO/European "left backslash" or "less than" key.
It's found between left shift and Z.
2025-10-11 19:52:05 +02:00
Sergey Svishchev
6e9324e09f PDP11: Changes for Terak 8510/a simulator:
Accept devices mapped at IOPAGEBASE -- text buffer/character generator
memory on video board starts at 160000.

Clear invalid PSW bits in trap handler -- system acceptance test writes
PSW 113705 to vector 34 (TRAP instruction).
2025-09-10 15:24:49 -04:00
Richard Cornwell
042b635ce3 KA10: Update PI Panel to properly display the MI register. 2025-09-10 13:38:46 -04:00
Richard Cornwell
aa05b9baea KA10: Update DD and TYM drivers to remove compile warning. 2025-09-10 13:37:59 -04:00
Paul Koning
c064bb6676 Revert vmnet support, PR #443
This reverts commits 361ef76d through 6fd146ae.
2025-08-27 15:52:55 -04:00
B. Scott Michel
c20b391eea ETH_MAC indirection erratum
Pervasive misuse of "ETH_MAC *" (a pointer to an ETH_MAC, aka a 6
element unsigned char array) when a simple "ETH_MAC" is correct.  The
best example of this was eth_mac_fmt() in sim_ether.c with the following
prototype:

    t_stat eth_mac_fmt (ETH_MAC* const mac, char* strmac)

The first parameter is a pointer to an array of 6 unsigned characters,
whereas it really just wants to be a pointer to the first element of the
array:

    t_stat eth_mac_scan (const ETH_MAC mac, char* strmac)

The "ETH_MAC *" indirection error also results in subtle memcpy() and
memcmp() issues, e.g.:

    void network_func(DEVICE *dev, ETH_MAC *mac)
    {
      ETH_MAC other_mac;

      /* ...code... */

      /* memcpy() bug: */
      memcpy(other_mac, mac, sizeof(ETH_MAC));

      /* or worse: */
      memcpy(mac, other_mac, sizeof(ETH_MAC));
    }

eth_copy_mac() and eth_mac_cmp() replace calls to memcpy() and memcmp()
that copy or compare Ethernet MAC addresses. These are type-enforcing
functions, i.e., the parameters are ETH_MAC-s, to avoid the subtle
memcpy() and memcmp() bugs.

This fix solves at least one Heisenbug in _eth_close() while free()-ing
write request buffers (and possibly other Heisenbugs.)
2025-08-17 16:02:56 -04:00
ken rector
73e5df3928 sigma: implement attention interrupt to sigma)mt.c 2025-08-17 15:33:25 -04:00
B. Scott Michel
7adffe5794 Github CI/CD updates
- Nuke and reinstall HomeBrew for macOS builds. Gets around the whole
  problem of stale links and conflicting packages installed in the GitHub
  macOS images.

- macOS 12 and Ubuntu 20.04 officially deprecated. Ubuntu 20.04 will be
  removed from GitHub's runner images on 01 APR 2025.

- .travis/deps.sh: Add mingw32 as a dependency target, enable MinGW64
  32-bit builds.

- Work around LTO bug on Ubuntu and macOS compilers, where LTO appears
  to miscalculate the number of bytes stored when using the default byte
  swapping 'for' loop. This is a workaround that uses compiler swapping
  intrinsics for well known sizes that appeases LTO. The alternative is
  to wait for a compiler fix, which is infeasible.
2025-08-17 15:32:19 -04:00
Calvin Buckley
6fd146ae66 Keep track of generated vmnet MAC addr
The vmnet interface created for a simh instance has its own MAC address.
It doesn't seem too useful to for simh itself (you can just use whatever
MAC address and send/receive frames with that), but it does make
referencing it in other places (i.e. SHOW ETHERNET vs. ifconfig) easier.

The generated MAC address is provided at interface creation time; while
we could look it up earlier like with pcap, this seems more efficient.
2025-08-17 15:25:22 -04:00
Calvin Buckley
a0df08ad95 Initial pass at documenting vmnet usage 2025-08-17 15:25:22 -04:00
Calvin Buckley
d440d35560 vmnet.framework with legacy makefiles
I have not put as many checks as the CMake version has. Those may get
unwieldy.
2025-08-17 15:25:22 -04:00