1
0
mirror of https://github.com/simh/simh.git synced 2026-01-13 15:27:14 +00:00

4612 Commits

Author SHA1 Message Date
Mark Pizzolato
42598b541a 3b2: Fix for clock drift when idling
When the 3B2 simulator was set to allow idling, there was significant
clock drift related to the primary timer unit. It turns out that the
simulator was using `AIO_SET_INTERRUPT_LATENCY` and `sim_rtcn_tick_ack`
incorrectly. They are not needed with the structure of system timers in
the 3B2 architecture.
2023-01-18 11:58:24 -10:00
Patrick Linstruth
c146c9a447 AltairZ80: Adds -H switch to LOAD command for loading Intel hex files 2023-01-18 11:55:51 -10:00
Mark Pizzolato
3d23b5b3c6 SEL32: Run tests with SET CLOCK NOCALIBRATE for stable host independent results 2023-01-18 11:52:48 -10:00
Mark Pizzolato
1baed4f7d4 PDP11: Properly set DC, DL and DLCJ unit relationships to TMXR structures
Fix problem reported on DC device by Alan Kirby
2023-01-18 01:54:37 -10:00
Mark Pizzolato
c9647f9869 Visual Studio Projects: Add HAVE_LIBEDIT to projects that somehow missed this before 2023-01-17 03:31:04 -10:00
Mark Pizzolato
5699bb9f59 frontpaneltest: Add simulator startup sleep option to allow debugger attach 2023-01-16 18:15:05 -10:00
Mark Pizzolato
78ebb4fe84 CONSOLE: Add appropriate unit names to remote console units based on roles 2023-01-16 18:11:14 -10:00
Mark Pizzolato
e741e64b0e TIMER: Add debug output for unexpected timer state 2023-01-16 18:10:16 -10:00
Mark Pizzolato
d8e986bd65 FRONTPANEL: Fix mutex sequencing in sim_panel_set_display_callback_interval()
- Allow NULL switches argument in sim_panel_mount()
- Add thread names to help identify threads while debugging
- Make mutexes PTHREAD_MUTEX_ERRORCHECK while debugging
2023-01-16 17:05:19 -10:00
Mark Pizzolato
3edcea7de0 SCP: Be sure to close (implicitly flushing) debug output on abort() 2023-01-16 16:57:14 -10:00
Mark Pizzolato
a1172690a0 FIO: Avoid potential buffer overrun while formatting file modify time
Silence over aggressive compiler warning.
2023-01-16 16:56:26 -10:00
Mark Pizzolato
88c6f7847f ETHER: Avoid errant stderr output while determining NIC MAC address
Also add grep -E as an alternate output filter
2023-01-16 16:50:30 -10:00
Mark Pizzolato
7bfe28957e SDS: Optimize frontpanel register access and add clock precalibration setup 2023-01-12 08:55:16 -10:00
Mark Pizzolato
c23351ae07 FRONTPANEL: Avoid deadlocks in error path logic when shutting down 2023-01-12 08:51:31 -10:00
Mark Pizzolato
3907d9d56a Visual Studio Projects: Avoid file in use during parallel builds 2023-01-09 20:58:00 -10:00
Mark Pizzolato
ac8e5d23b8 README: Update current features
Revise windows-build dependency version
2023-01-09 15:45:08 -10:00
Mark Pizzolato
7a4ded8380 FRONTPANEL: Avoid potential deadlock when shutting down a panel application 2023-01-09 15:43:25 -10:00
Mark Pizzolato
2e2270ccc7 SCP: Reasonably format output after EOF return from read_line_p 2023-01-07 08:07:06 -10:00
Mark Pizzolato
4bbc3dfd1c TIMER: Add SET CLOCK NOCALIBRATE mode
NOCALIBRATE mode allows all activity of a simulator run to occur with
precisely consistent event timing.  In this mode, every clock tick takes
precisely the same number of instructions/cycles.  Likewise, the polling
activities for MUX or other poll oriented devices occurs after precisely
the same number of instructions/cycles executed.  As a consequence of
this mode, no effort to align simulated clock ticks (and simulated access
to wall clock time) is made.

This mode might be useful for running diagnostics which expect a
particular relationship between perceived wall clock and instruction
times.  It might also be useful for running test scripts which may want
to compare output of previous executions to to current execution or
to compare execution on arbitrarily different host computers.

In NOCALIBRATE mode, the operator gets to specify the pseudo
execution rate along with the base wall clock time that access to
pseudo wall clock accesses returns.
2023-01-06 09:49:31 -10:00
Mark Pizzolato
f79b03f2b7 SCP: Provide a pseudo environment variable SIM_RUNLIMIT_REMAINING
This is available for simh scripts which may want to display the
runlimit information via:
  sim> echo %SIM_RUNLIMIT_REMAINING%
2023-01-06 09:36:47 -10:00
Mark Pizzolato
41ab668e97 SCP: Leverage default radix choices when parsing command inputs
strtotv was extended long ago to allow radix prefixes (0x, 0X, 0b, 0B
and 0) for input when 0 was specified as the parsing radix.  The uses
from calls to get_uint() need to specify a 0 radix to leverage this
which wasn't done at that time.
2023-01-05 17:32:32 -10:00
Mark Pizzolato
700ac6719d SCP: Assure only 5 UNIT fields can be initialized beyond the UDATA macro
The simh v3 UNIT structure only provided UNIT fields wait, u3, u4, u5 and u6
available for static initialization beyond what is provided by the UDATA
macro.  This change assures that here as well.

If a simulator developer needs to initialize UNIT fields beyond what is
available here and via the UDATA macro, then explicit code usually in
the DEVICE reset routine should be used to initialize those fields.

Fix the CDC1700 simulator which statically initialized additional UNIT fields.
2023-01-05 15:09:55 -10:00
Mark Pizzolato
52cfa2bba8 makefile: Add support for operating with the gameoftrees (got) source control
got leverages git under the covers with a different file layout.  Changes merely
allow detection of proper git commit-id.
2023-01-02 15:18:19 -10:00
Bob Supnik
9319f6027e PDP11: Fix EXAMINE and DEPOSIT of floating point 2 argument instructions
In https:://github.com/open-simh/simh PR number 154 nickd4 that 2 argument
floating point instructions were displayed with the wrong argument order.

This change fixes BOTH the instruction display and the input activities for
these floating point instructions.
2022-12-31 09:07:40 -10:00
Mark Pizzolato
135e69c4a1 SCP: Add SET CONSOLE TELNET=CONNECT to open a window running telnet to console 2022-12-30 21:34:07 -10:00
Mark Pizzolato
ca79faf508 FRONTPANEL: Document best performance option for REGister content query
Notes:    There are two categories of REGisters in simulators:
           1) Many simulators contain every interesting simh REGisters
              in single variables and use those variables directly
              throughout the simulator as needed by the system being
              simulated.
           2) Some simulators have some of their REGisters in a single
              variable, but during instruction execution, the actual
              contents of that REGister is split into possibly multiple
              pieces which are assembled into the single variable when
              the simulator stops instruction execution and split apart
              again when simulation starts executing instructions again.
              An example of this case is the PSL on the VAX simulator.
              In the VAX architecture, the PSL register contains the
              condition code information which is a field in the PSL.
              For efficiency sake, while sim_instr() is executing
              instructions, the condition code is stored a separate
              variable CC.  Whenever sim_instr() exits, the pieces
              that comprise this register are put together into the
              PSL variable.  This allows the PSL register to be examined
              and/or deposited to directly from SCP as needed. The PDP11
              simulator handles its PSW in a similar way breaking it
              into pieces during sim_instr() execution and reassembling
              it upon exit.

              Therefore, if every REGister that an application that
              uses the sim_frontpanel register APIs is always stored
              in single variables (case 1 above), then front panel
              access to registers can be most efficient if, at
              initialization time, the simulator calls the
              sim_set_stable_registers_state() API.
              Having called this API allows the internals of the
              frontpanel access activities to be significantly more
              efficient.
2022-12-30 16:07:12 -10:00
Mark Pizzolato
5f98bdcce6 SCP: Document in HELP and sim_doc HELP SET DEBUG -B 2022-12-28 21:17:39 -10:00
Mark Pizzolato
5ba0ef0c67 FrontPanelTest: Cleanup test setup and build dependencies
- Test simulator is always VAX and always in the same directory as
  FrontPanelTest
- makefile and Projects will always build the dependent simulator
2022-12-28 11:10:59 -10:00
Mark Pizzolato
b0cdb3e831 frontpanel: Fix remote console event queuing when in HALT state
- Update sim_frontpanel API version to 13
- Correct event queuing when halted avoids sim_time running backwards
2022-12-28 10:58:08 -10:00
Ken Rector
2dd8ededd3 SDS: Added C register implementation for various devices 2021-06-08 01:55:07 -07:00
Mark Pizzolato
4975fbe59c SCP: Document all simulator defined environment variables in help and sim_doc 2022-12-22 09:49:10 -10:00
Mark Pizzolato
c127dc99c2 SCP: Cleanup OS version reported info in SHOW VERSION output 2022-12-22 09:47:28 -10:00
Mark Pizzolato
5330643403 SCP: Improve details of errors reported parsing breakpoint commands 2022-12-22 09:41:16 -10:00
Mark Pizzolato
6f1538de9c TMXR: Be sure to flush pending output data when enabling logging on a line 2022-12-20 16:26:48 -10:00
Mark Pizzolato
47582da35f makefile: Cleanup make version check and parameter passing after updates 2022-12-20 16:00:24 -10:00
Mark Pizzolato
c1dd65a5bf VAX simulators: Revise build test diagnostics
- Run Floating Instruction diagnostics for 2 passes - these have
  been observed to fail on the VAX730
- Increase allowed run limit
- When diagnostics fail, emit the diagnostic session output if
  diagnostics were not being run in verbose mode.
2022-12-19 12:26:47 -10:00
Mark Pizzolato
31c6c5ce02 SEL32: Disable idle while tests are run
This avoids errant elapsed instruction counts when host system is busy
and clock calibration is inconsistent.
2022-12-19 12:18:26 -10:00
Mark Pizzolato
e133994924 TMXR: Emit pending line buffered output to log when line logging is enabled 2022-12-19 12:14:52 -10:00
Mark Pizzolato
84b621026e SCP: Always define SIM_BIN_NAME even when no directory found in binary path 2022-12-19 10:25:42 -10:00
Mark Pizzolato
7e78f2fce1 makefile: Reliably rebuild scp.c when git commit id changes 2022-12-18 17:39:38 -10:00
Mark Pizzolato
adeba9f7a4 README: Update current status and setup instructions 2022-12-13 16:39:56 -10:00
Howard M. Harte
0e43feee8c AltairZ80: ADC Super-Six: add Z80-CTC support with extended UDATA in reset.
The only allowed macro to initialize UNIT structures is the UDATA macro.

Setting additional UNIT data structure items should be set through explicit
initialization code in the DEVICE reset routine.
2022-12-13 16:38:34 -10:00
Mark Pizzolato
def174a5fe makefile: Assure that only BUILD_SEPARATE=1 will cause separate compiles
- BUILD_SEPARATE may be either defined and exported from the
  environment or via the make command line.
- Add a command line (or environment variable) option QUIET=1 to
  suppress full compile and link commands and only output a summary
  of what is happening.
- Update dependency list to include gmake where needed.
2022-12-13 16:37:34 -10:00
Ken Rector
d6fad5d975 sigma: Invalid address must set a TDV-visible error flag on DP Device 2022-12-12 09:27:51 -10:00
Patrick Linstruth
b86c5360a9 AltairZ80: PMMI device DTR/RTS default changes and support for sockets 2022-11-19 10:03:24 -08:00
Patrick Linstruth
1af13f228b AltairZ80: Add support for Morrow Micro Decision
Moved MMD and MMDM devices under Morrow Devices comment.
2022-11-19 17:10:12 -08:00
Patrick Linstruth
78ac5b0803 AltairZ80: Add "MEM" and "REG" simulator-specific commands
sim> mem df00
DF00 C3 5C E2 C3 58 E2 7F 00 43 6F 70 79 72 69 67 68 .\..X...Copyrigh
DF10 74 20 31 39 37 39 20 28 63 29 20 62 79 20 44 69 t 1979 (c) by Di
DF20 67 69 74 61 6C 20 52 65 73 65 61 72 63 68 20 20 gital Research
DF30 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00     ............
DF40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
DF50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
DF60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....s...ub...m..
DF70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..I..tT...e.....
DF80 00 00 00 00 00 00 00 00 08 DF 00 00 5F 0E 02 C3 d....4...l.._0.r
DF90 05 00 C5 CD 8C DF C1 C9 3E 0D CD 92 DF 3E 0A C3 .d..M...>....>..
DFA0 92 DF 3E 20 C3 92 DF C5 CD 98 DF E1 7E B7 C8 23 ..> ..a.....~..#
DFB0 E5 CD 8C DF E1 C3 AC DF 0E 0D C3 05 00 5F 0E 0E ...r........._..
DFC0 C3 05 00 CD 05 00 32 EE E6 3C C9 0E 0F C3 C3 DF ...K..2..<..'.s.
DFD0 AF 32 ED E6 11 CD E6 C3 CB DF 0E 10 C3 C3 DF 0E .2...a...p.P....
DFE0 11 C3 C3 DF 0E 12 C3 C3 DF 11 CD E6 C3 DF DF 0E ...r...0..v.....
DFF0 13 C3 05 00 CD 05 00 B7 C9 0E 14 C3 F4 DF 11 CD .....a.l........

sim> reg
C0Z1M0E1I1 A=02 B=007F D=DF06 H=EA0E S=EA37 P=FA6B ANI 01h
sim> set on
sim> on error reg
sim> s

Step expired, PC: 0FA6D (JZ 0FA69h)
C0Z1M0E1I1 A=00 B=007F D=DF06 H=EA0E S=EA37 P=FA6D JZ 0FA69h
sim> s

Step expired, PC: 0FA69 (IN 10h)
C0Z1M0E1I1 A=00 B=007F D=DF06 H=EA0E S=EA37 P=FA69 IN 10h
sim> s

Step expired, PC: 0FA6B (ANI 01h)
C0Z1M0E1I1 A=02 B=007F D=DF06 H=EA0E S=EA37 P=FA6B ANI 01h
2022-11-22 05:05:39 -08:00
Bob Supnik
7e39e112da PDP11: Fix bug in FUIV operation
Problem reported by James Fehlinger
2022-12-11 09:45:12 -10:00
Mark Pizzolato
921a2bbc4c Revert "AltairZ80: ADC Super-Six: add Z80-CTC support."
This reverts commit c21d8c870929db07631945b636dff2b7cf3d7eb0.
2022-12-08 18:52:00 -10:00
Mark Pizzolato
55c446fa0f DISK: Properly re-establish disk context reference after metadata update 2022-12-08 18:23:19 -10:00