Commit graph

982 commits

Author SHA1 Message Date
Mark Pizzolato
00b77c8533 TMXR: Packet, Loopback and Half-Duplex enhancements
- Added halfduplex mode for network connections and corrected modem signal DSR to reflect connection status (vs original attach status), and DCD follows DSR (except in halfduplex mode where it follows CTS).

- Enhance tmxr_set_get_modem_bits to also return the modem DTR and RTS state.

- Separate RTS from DTR when manipulating modem state bits

- Minor fixes to loopback functionality after direct testing with the first loopback client device (DMC11).

- Fix clearing of break input buffer now that input buffers are dynamically allocated

- Changed Modem bit logic to have CTS reflect RTS as expected by devices which may expect this.

- Changed receive buffers to be dynamically allocated and the same size as transmit buffers when transmit buffers are non-default sized.

- Added TMXR line attach in loopback mode.  Fixed loopback buffer management

- Added loopback support to TMXR lines

- Added functioning connect poll capability to revised DMC

- Added connection destination display to connection status even when a connection has not yet been established.

- Added extended packet sending and receiving semantics to TMXR allowing for an optional frame byte to exist between length prefixed data packets
2013-11-20 12:18:02 -08:00
Mark Pizzolato
2e85e74699 SCP: Various cleanups.
- Avoid assignments of void * values.  Cast all memory allocation return values to appropriate types.
- Add output to sim_log where missing in various places.
- Fixed issue with lost file positions after a restore for devices which leverage the UNIT_SEQ flag.
2013-11-20 09:13:27 -08:00
Mark Pizzolato
3519c6c74b PDP11: Added support for PC values to be displayed in debug output.
This required a simulator specific implementation since the PDP11 PC register isn't stored in a normal memory location.  It is loaded from a temporary location upon simulator instruction execution startup (and saved to that location when instuction execution stops).  In order to reference the PC value while executing instructions (for debug output), this extended access model is required.
2013-11-17 08:55:29 -08:00
Mark Pizzolato
864f0e0d37 SCP: Show device options can be more flexibly formatted and optionally not display anything. 2013-11-16 18:14:09 -08:00
Mark Pizzolato
f3626690b7 PDP11: XQ Device is now bootable on a Qbus PDP11 simulator. The ROM based Citizenship tests now pass.
Separate boot ROMs are available for each of the DEQNA, DELQA and DELQA-T devices being simulated.
DEQNA-Lock mode has been added to the DELQA and DELQA-T simulations.
2013-11-16 18:13:09 -08:00
Mark Pizzolato
600d6f5962 SCP: Added a mechanism to allow debugging output to display PC values for simulators which don't have a simple register which contains the PC value. 2013-11-14 10:41:49 -08:00
Mark Pizzolato
949aa30bef ETHER: Fix bpf filter generation to not generate an invalid filter if only multicast addresses were provided 2013-11-14 10:39:17 -08:00
Mark Pizzolato
f59d86d7c0 VAX: Fix for unaligned longword access to Qbus space from Matt Burke for issue #88
When the conversational boot is waiting for input it uses a BLBC instruction to read the DUART status register and test the RXR bit. This generates an unaligned longword read in Qbus I/O space (Yuk!). I realised that the code to read unaligned data in vax_mmu is broken. It attempts to read the aligned longwords that the data spans, but there was no code to convert the unaligned pa passed in to it's aligned form, thus the wrong bytes are returned and the BLBC never sees the RXR bit.
2013-11-10 13:04:28 -08:00
Mark Pizzolato
24b64b517b PDP11: Added missing pdp11_rk boot setup from Bob Supnik 2013-11-10 09:19:01 -08:00
Mark Pizzolato
b57201b88b QVSS/VIDEO: Fix for mouse tracking on Ultrix from Mike Burke for issue #88 2013-11-08 17:15:02 -08:00
Mark Pizzolato
30cd103a14 VIDEO: When using libSDL2, make sure we use the key scan code to index the vid_key_state array. Also, make sure we stick to getting bare key events instead of TextInput events. 2013-11-07 14:04:36 -08:00
Mark Pizzolato
593c7f45c2 QVSS: Changed prior VSYNC fix to only interrupt quickly immediately after interrupts are enabled to avoid idling issues with the prior fix. From Matt Burke
Also fixed Qbus memory reference issues to properly generate a machine check if the QVSS device is disabled and the frame buffer is referenced.
2013-11-07 08:05:52 -08:00
Mark Pizzolato
304ad39a2b VAX: Avoid potential VAX simulator hangs when code may poll for console input without being interrupted 2013-11-07 08:02:00 -08:00
Mark Pizzolato
5bce9da97c QVSS: Fix to get the VSYNC interrupts to be more reasonable. Addresses Issue #88. From Mike Burke
The vertical sync interrupt generated in vc_svc() was too slow for Ultrix. The driver enables interrupts and then calls DELAY(20000), which I guess is 20ms. This translates to about 10000 simulated instructions, but tmxr_poll works out at ~75000 instructions.  I've added a new unit to simulate just the vsync interrupts activating every 8000 instructions.

This approach will completely disable the ability to idle while the QVSS device is enabled.
2013-11-06 17:00:36 -08:00
Mark Pizzolato
b4b274c446 More compiler warnings 2013-11-05 16:55:30 -08:00
Mark Pizzolato
fdb33ce135 Compiler warning cleanup 2013-11-05 16:42:17 -08:00
Mark Pizzolato
b85af46402 SCP: Fixed 'rest of line' argument substitution %* 2013-11-05 10:35:37 -08:00
Mark Pizzolato
f5cfa392d7 SCP: Allow bare % not followed by a digit or a alpha character to be kept while substituting arguments and environment variables in simulator commands. 2013-11-05 10:06:46 -08:00
Mark Pizzolato
32b8f06362 PDP11/VAX: Properly display the device interrupt BR level for Qbus and Unibus devices in SHOW IOSPACE output 2013-11-04 12:55:08 -08:00
Mark Pizzolato
65edda68ad SERIAL: For writes to serial ports, accept both EAGAIN and EWOULDBLOCK as non-error conditions for all *nix hosts 2013-11-04 12:15:26 -08:00
Mark Pizzolato
53690b3a15 VStudio: Avoid generating debug information for Visual Studio Release builds 2013-11-04 12:11:21 -08:00
Mark Pizzolato
43f85d1f3a SCP/TMXR: Fix to socket writes to return 0 bytes written as an expected condition when the output socket is full (EAGAIN or EWOULDBLOCK). 2013-11-04 05:21:58 -08:00
Mark Pizzolato
796cbd2796 Merge branch 'master' of github.com:simh/simh 2013-11-03 13:10:16 -08:00
Mark Pizzolato
6f4e718fda PDP8: Refinement to prior fix for issue #86. Avoid data loss if prior character hasn't been read yet when a poll event happens. 2013-11-03 13:08:17 -08:00
Mark Pizzolato
f0d41f15d7 PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik)
Here's a PDP11 SIMH bug as old as the simulator itself: the reset_cpu routine sets the PS to 340 (interrupts disabled). This causes some versions of Lunar Lander not to work. In fact, the initial state of the PS is not architecturally standardized:

      04: cleared (from schematics)
      05: cleared (from manual)
      20: cleared (from schematics)
      34: cleared (from schematics), set to 340 on boot?
      40: cleared (from schematics)
      44: cleared on init, set to 340 on boot (from schematics, manual)
      45: cleared (from schematics)
      60: cleared (from schematics)
      70: cleared (from schematics)
      T11: set to 340 (from spec)
      LSI11, F11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, mode 3 undefined)
      J11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, 340 on jump to  custom PROM)

The story seems to be this. All non-VLSI PDP11s used TTL chips to implement the PS, either discrete flip-flops, or 4b registers, or both.
Starting with the first system, the 11/20, they were wired clear on the processor INIT signal (power-up or front panel START switch), so that all internal state started as 0. This worked fine, because START also reset the Unibus and cleared all interrupt enables. So even though the processor was as IPL = 0, no interrupts were possible. Then along came the LSI11...

The LSI11 implemented a line-time clock with NO INTERRUPT DISABLE. Thus, if IPL was left at 0 and a bootstrap routine from a slow device was started (e.g., a floppy drive), the clock would tick, and an interrupt would occur, before the bootstrap routine finished. Because no vectors were set up, the processor would crash. So the LSI11 started the practice, carried over to all later PDP11 VLSI chips, of setting the PS to 340 before jumping to a boot ROM.

The T11 did this in all modes of startup, because its only startup behavior was to jump to a "boot" routine. It did not have a console of any kind.

Accordingly, it appears that the cpu_reset routine needs to set the PS based on the processor model. Further, all boot routines need to set the PS to 0 or 340 based on the processor model. (It's probably safe for boot routines just to set the PS to 340, but it's not technically
accurate.)
2013-10-27 05:30:13 -07:00
Mark Pizzolato
be46bac750 PDP8/PDP11/VAX: Support high speed character input on console and other multiplexer ports instead of limiting input data rate to 1 character per clock tick. 2013-10-23 07:50:39 -07:00
Mark Pizzolato
c8ae76cb65 PDP8: Fix to allow character read rate to exceed the clock tick rate. Solves issue #86 2013-10-19 11:41:17 -07:00
Mark Pizzolato
db964d126c SCP/TMXR: Fix crashing bug when a multiplexer line has logging enabled before a mux attach, 2013-10-17 07:04:04 -07:00
Mark Pizzolato
1e3586ec91 DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
Mark Pizzolato
026dd98d83 Merge latest from Bob Supnik 2013-10-12 13:33:01 -07:00
Mark Pizzolato
86e2e6bd42 PDP8: Avoid delaying the initial check for connecctions to mux port after attach. Fix for #85 2013-10-12 10:07:25 -07:00
Mark Pizzolato
abfae3ca88 H316: Revised standard device implementation from Bob Supnik.
Fixes several bugs described several months ago on the simh list about how the hardware really works, most notably the "dummy" cycle created by an OCP '1 (switch to output mode). In addition, it fixes other problems (OCP '0 and OCP '1 are unconditional) and adds a "busy"
state on character input, like the real hardware.
2013-10-11 09:16:28 -07:00
Mark Pizzolato
de6838756b MAKEFILE: Added makefile support for MinGW builds using libSDL2. 2013-10-02 10:23:34 -07:00
Mark Pizzolato
63e05c77be PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
Mark Pizzolato
5feb20d054 VSTUDIO: Fix SDL2 library name for Microvax I debug build 2013-10-02 06:24:20 -07:00
Mark Pizzolato
f76d46662f Merge pull request #83 from BillHeaton/master
PDP10/11: Fix build warnings on OS/X
2013-10-02 05:45:50 -07:00
Mark Pizzolato
3a5f090a82 SCP/VIDEO: Makefile cleanup for OSX build with libSDL2 2013-10-01 16:56:21 -07:00
Mark Pizzolato
6b45d9b2ad SCP/VIDEO: Added support for libSDL2 video capabilities. Changed existing video layer to carry pixels as 32bpp vs 8bpp for more natural behaviors in libSDL2. 2013-10-01 15:55:10 -07:00
Bill Heaton
839db8e1fd PDP10: Use system style of include 2013-10-01 13:09:36 -07:00
Bill Heaton
99b4730dc0 Fix build warning on OS/X
PDP11/pdp11_io_lib.c: In function 'show_iospace':
PDP11/pdp11_io_lib.c:363: warning: too few arguments for format

PDP10/pdp10_lp20.c: In function 'lp20_set_vfu_type':
PDP10/pdp10_lp20.c:1038: warning: implicit declaration of function
'toupper'
PDP10/pdp10_lp20.c:1121: warning: implicit declaration of function
'isspace'
2013-09-30 12:10:11 -07:00
Mark Pizzolato
351d748b4a VIDEO: Move all SDL graphics activities to the background video thread 2013-09-26 12:38:17 -07:00
Mark Pizzolato
610b7b5789 VIDEO: Moved SDL initialization and cleanup from event thread to the primary thread.
This allows for any errors to be caught more easily and seems to be required on some platforms (OSX).
2013-09-26 09:50:29 -07:00
Mark Pizzolato
8617a58c8f VAX/QVSS: Added debugging support to sim_video 2013-09-25 16:41:40 -07:00
Mark Pizzolato
ab028c0a37 SCP: Fix SET DEBUG switch interpretation 2013-09-25 16:41:05 -07:00
Mark Pizzolato
daed1e576f VAX/QVSS: Proper linking on OSX 2013-09-25 16:39:51 -07:00
Mark Pizzolato
721a16f7e9 PDP8: Fix LOAD command ignores field change immediately after leader. (#73). From Bob Supnik and David Gesswein. 2013-09-18 11:13:39 -07:00
Mark Pizzolato
6d8565dc94 PDP8: Fix Boot doesn't work if IB or saved_DF are previously set wrong (#72). From Bob Supnik
All bootstraps now pass this test case:

d pc 77777
boot <device>
2013-09-18 11:11:10 -07:00
Mark Pizzolato
735c589d07 SCP: Allow ;notelnet option to be specified on the console telnet command as discussed in issue #76 2013-09-18 08:03:31 -07:00
Mark Pizzolato
7b4d2073fe SCP: Added display of all enabled devices which have debugging enabled to the SHOW DEBUG command output. 2013-09-15 17:18:14 -07:00
Mark Pizzolato
c9844951f7 PDP11/VAX: Make sure that semi-unique drive serial numbers have a zero msb to avoid issues in some operating systems. 2013-09-10 16:27:00 -07:00