Commit graph

3120 commits

Author SHA1 Message Date
Mark Pizzolato
aa82b57d10 TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with
   precisely correct delays aligned with the calibrated clock once
   per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
   with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
   the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
   that are shorter than the currently shortest scheduled event
2016-12-26 12:42:25 -08:00
Mark Pizzolato
257738a4e0 PDP11, all VAX: Extend debug options to track timing activities 2016-12-24 09:52:05 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
875926c271 CONSOLE: Add connection debugging option and debugging descriptions 2016-12-24 09:40:05 -08:00
David Gesswein
5ced037b4b PDP8: Add device codes for TTIX & TTOX devices to show command output 2016-12-19 04:55:43 -08:00
Mark Pizzolato
36276a79e1 SCP: Add device descriptions to internal devices visible in SHOW FEATURE -I 2016-12-18 13:33:11 -08:00
Mark Pizzolato
65cfd2a63d PDP11, PDP10: Add pseudo internal device to KDP for receive units
This allows the device to be identified when the event queue is examined
with SHOW QUEUE for KDP devices.
2016-12-18 13:31:44 -08:00
Mark Pizzolato
7964e2b72d PDP8: Fix SHOW TTIX SUMMARY
It was defined in lowercase and has now been made upper case for consistency.
The code which performs the match also has been change to do a case
insensitive compare.
2016-12-17 13:38:22 -08:00
Mark Pizzolato
372231dd3a VAX8600, VAX750: Pass correct delay to TTI device sim_clock_coschedule 2016-12-17 11:51:05 -08:00
Mark Pizzolato
48e0b47d51 SCP: Add a way to see the enabled SCP internal devices SHOW DEV -I 2016-12-17 10:35:56 -08:00
Mark Pizzolato
7dd1f0b89e SCP: Complete support for automatic detection of WRU (^E) for all simulators
commit ef6528bf32 added support for automatic WRU detection for simulators
that don't have a console port, but it was never documented and the addition of
that support potentially interfered with SAVE/RESTORE behavior.

The console connection state is now automatically saved and restored.
2016-12-17 03:50:10 -08:00
Mark Pizzolato
43dc5fdcba FRONTPANEL: Fixed description language 2016-12-17 03:44:45 -08:00
Peter Schorn
a2d900e62b AltairZ80: Implemented proper memory refresh register R semantics 2016-12-17 12:24:12 +01:00
Mark Pizzolato
76103cf760 VAX730, VAX750, VAX8600: Update Interval Timer and TODR to align with VAX780 2016-12-16 18:32:26 -08:00
Bob Supnik
5fc4744d8a PDP8: Added LS8E decode (6660) for WPS8 and PKSTF
As discussed in #353
2016-12-16 14:54:23 -08:00
Mark Pizzolato
740a506bcb TIMER: Add additional statistic info for SHOW CLOCKS
Also:
- Avoid potential divide by zero when stopping a running calibrated clock.
- Quickly reflect newly calibrated clock info in additional timers that may be running
2016-12-16 12:34:17 -08:00
Mark Pizzolato
5cf9e9ab86 VAX780: Removed pseudo ticks from TODR device
Removing pseudo ticking of the TODR improves simulator behavior
when idling.  As previously implement, the timing of the TODR and TMR
ticks weren't aligned and and idle simulator would have to wake up to
service both tick activities.

The real hardware has a TODR which changes every 10ms to reflect changes
to wall clock time.  This is already completely achieved by referencing the
host system time whenever the TODR register is referenced.  No need for
to simulate pseudo ticking.

The real interval timer hardware generates ticks a the rate specifically
programmed in the interval timer device registers.  The common cases
programmed the ticks at 10 ms intervals (100Hz), but real operating systems
exist which programmed ticks at 16667 usecs (60Hz).
2016-12-16 10:39:49 -08:00
David Gesswein
9c32c97d38 PDP8: Printing from wps-8
As discussed in #353
2016-12-16 10:03:40 -08:00
Mark Pizzolato
ae52f4c331 TIMER: Add correct sim_activate_time functionality for all timer cases.
Also:
- allow a timer to dynamically stop itself (by calling sim_rtcn_calb
   with tps=0), and then to start the internal timer to provide a calibration
   baseline if necessary.
- Fix coschedule interval computation when the queue is empty.
- Properly select the correct timer for coscheduling without a specific tmr
- Properly adjust the coschedule queue's next time value when entries are
   canceled.
- Cleaned up throttling to behave well with all potential throttling rates and
   to make visible what is happening when boundaries are reached.
2016-12-15 09:57:34 -08:00
Mark Pizzolato
7022f0c1b2 VAX: Fix interval timer to properly synchronize with calibrated clock ticks 2016-12-14 09:30:44 -08:00
Mark Pizzolato
76d5c34d85 DOC: Add argument substitution and %DATE_MONTH% 2016-12-12 14:12:41 -08:00
Mark Pizzolato
e776a37e08 TMXR: Fix tmxr_clock_coschedule() to properly convert to ticks 2016-12-12 12:50:49 -08:00
Mark Pizzolato
eea394422e VAX, VAX750, VAX780, VAX8600: Properly coschedule console input with TMXR_MULT
The timer specific coscheduling routines take ticks as the delay argument
2016-12-12 01:53:49 -08:00
Mark Pizzolato
180b03107e TMXR: Properly accept ticks rather than instructions in coschedule APIs 2016-12-12 01:51:18 -08:00
Mark Pizzolato
7db2dc10de TIMER: Fix coschedule dispatch logic and internal timer cleanup
Additionally, calls to sim_activate_after with delay values that exceed
twice the tick size of the calibrated clock are now coscheduled with
the calibrated clock.
2016-12-12 01:50:09 -08:00
Mark Pizzolato
1c4b6644c1 PDP10: Change idling to generically use sim_idle() everywhere 2016-12-10 12:01:19 -08:00
Mark Pizzolato
5d8553e24c TIMER: Enabled catchup clock ticks
Historically, hosts which have a tick size slower than the tick a simulator
wants to implement can't idle effectively and keep good time.

This change allows simulators which call sim_rtcn_tick_ack() to provide
useful idling behavior while still keeping the passage of wall clock time
to time in the simulator accurate.
2016-12-10 11:59:49 -08:00
Mark Pizzolato
1c3c50fd26 VAX, VAX780, VAX750, VAX8600: Make TODR state file endian independent
When the TODR device (CLK) is attached to a state file, it operates in OS
agnostic mode.  This file can now be ported between hosts with different
endianness and work consistently to track the time of year.

Additionally, the VAX and VAX750 TODR values now properly don't
progress when they have zero values (or when they overflow back to zero).
2016-12-09 18:01:21 -08:00
Mark Pizzolato
c393675b5b REMOTE_CONSOLE: Allow user selectable command output buffer size
The output of remote console commands gets truncated at the configured
buffer size.  The default has been raised from 1400 to 8192.
Common remote console usage is from the same host as the simulator and
as such localhost TCP traffic is delivered in chunks at least 8192 so no extra
packets will be involved in transporting the potential extra data and no
transmission delays on the send() call.
The minumum size is now 1400 (which was the prior default).
2016-12-08 11:27:07 -08:00
Mark Pizzolato
a7593385aa VAX: Fixed Interval timer simplification
Reading the interval timer register while the timer is running needed
to be reflect usecs
2016-12-08 05:32:08 -08:00
Mark Pizzolato
19250950c5 TIMER: Change internal THROTTLE device name to avoid SET THROTTLE collision 2016-12-07 16:17:40 -08:00
Mark Pizzolato
c420925a75 DOC: Corrected description of log behavior and made help and doc consistent 2016-12-07 05:46:29 -08:00
Mark Pizzolato
0a7996d9e3 TIMER: Fix statistics for Internal Timer and operation with multiple timers 2016-12-06 15:49:13 -08:00
Mark Pizzolato
63a16c4ed4 VAX: Simplify Interval Timer implementation
Use actual microsecond references, with the value synchronized to the CLK
device and all delays scaled to the calibrated instruction execution rate.
2016-12-06 13:36:01 -08:00
Bill Beech
23f187d887 makefile: remove experimental ibmpc and ibmpcxt simulators from 'make all' 2016-12-06 12:56:46 -07:00
Mark Pizzolato
b378072c95 makefile: remove misspelled experimental simulator name imbpc 2016-12-06 10:03:32 -08:00
Mark Pizzolato
0d5c86d0a9 makefile: Remove imds-225 from 'make all' - still experimental
Fix #359
2016-12-06 09:06:22 -08:00
Mark Pizzolato
cf14061c64 Visual Studio Projects: Clean up builds with Visual Studio 2015 2016-12-05 15:47:52 -08:00
Mark Pizzolato
eb333a845e TIMER: Fixed calibration idle skip percent logic
Also:
 - Added more statistics
 - Made sleep measurements more precise
 - Correct idle sleep decision logic without regard to host tick size
 - Fix calibration setup/teardown when host tick size is large (>10ms)
 - Generalized large host tick test capability (MS_MIN_GRANULARITY)
 - Fixed Windows sim_os_msec() to always use timeGetTime()
 - Fixed coschedule routines (that don't mentoin a tmr) to default to
    timer 0 and fallback to the internal timer otherwise.
 - Removed dependency on sizeof(tv_sec) in timespec structure for MinGW
2016-12-05 15:32:29 -08:00
Mark Pizzolato
7498f183d2 VAX: Added debug options for SYSD device (TMR, TODR, CNF) 2016-12-05 14:57:35 -08:00
Bill Beech
c24a6a28b2 ISYS8024, ISYS8030: Add initial new simulators 2016-12-05 13:04:01 -07:00
Bill Beech
2947c39ffe ISYS8010, ISYS8020: Latest update 2016-12-05 12:54:15 -07:00
Mark Pizzolato
0ef87fac53 DOC: Clarified SET DEBUG, SET LOG and SET CONSOLE LOG documentation and help 2016-12-05 06:03:41 -08:00
Mark Pizzolato
0a0bad9139 PDP11: TC11 - Revised to model TCCM correctly
As reported by Josh Dersch in #358

   Read hardware notes:

   - While the TCCM error bit is a real flop, it is supposed to reflect
     the OR of the TCST error bits at all time, so it is updated on read.
   - A read of TCDT while the function is RALL clears DONE.

Write hardware notes:

   - The TC11 behaves much more like a traditional DECtape controller
     than a typical PDP11 peripheral. In particular, execution is
     initiated/controlled by any write to TCCM, rather than setting
     the GO (DO) bit. Unless the function is STOP or STOP ALL, writing
     TCCM will put the selected tape in motion.
   - Writing GO (DO) clears DONE (READY) and the error flops in TCST.
   - Writing a 0 to ERROR clears the error flops in TCST. Because it
     is write 0 to clear (later controllers used write 1 to clear),
     the simulator has to know whether ERROR is actually written.
   - STOP ALL ignores select errors. Every other function is rejected
     if there is a select error.
   - An illegal operation (setting ILO) will stop the selected tape.
   - A write of TCDT while the function is RALL, WALL, or WTMK clears
     DONE (READY). RALL should not be included, but it saved a gate
     not to prevent it.
   - Because DONE (READY) may not be clear when an operation completes
     and DONE (READY) is set, the DT_SETDONE must test for DONE (READY)
     not being already set.
2016-12-04 11:09:55 -08:00
Mark Pizzolato
9a69fa8b49 DISK: Remove $ from all variable names for clean compiles on all gcc versions 2016-12-02 15:05:53 -08:00
Mark Pizzolato
b98ece819b DISK: Extended and corrected autosize logic for disk attach.
Previously only the actual size of the container file was used when
attaching a disk.  This was correct only when the size of the container
file actually aligned with the simulated disk drive.  disks created with
sim_disk_attach automatically write to the last sector of a simulated
disk file when the disk is created.  Therefore, auto sizing worked correctly
for any disk created with sim_disk_attach.

Disk images created with simh prior to 4.X would only write to the
portions of the disk drive when the simulated system writes data.  These
disk images would only be properly sized if the simulated operation of
the disk had actually written to the last block of the disk.  Auto sizing of
these disks would usually size the resulting disk incorrectly and strange
behaviors might occur when using such an incorrectly auto sized disk.

Fixes #357
2016-11-29 18:53:52 -08:00
Mark Pizzolato
60fb70128c TIMER: Add additional calibration skip while idling counter statistic 2016-11-28 17:40:24 -08:00
Mark Pizzolato
165c37acee DISK: Add -U attach option, to fix VHD differencing inconsistencies
-O allows overriding for testing purposes.
-U allows overridden checks to update and fix the inconsistencies

As discussed in #352
2016-11-28 03:35:01 -08:00
Mark Pizzolato
f8147fca84 PDP10: Fix typo in sim_rtcn_tick_ack setup 2016-11-27 15:42:58 -08:00
Mark Pizzolato
8b73304322 PDP10: Add recording of clock tick acknowledgments. 2016-11-27 12:58:08 -08:00