Discussion:
SIMH: function and editing keys
(too old to reply)
j***@mdfs.net
2020-06-10 23:43:20 UTC
Permalink
Is there a way to tell SIMH to pass function and editing keys
on to the emulated PDP11 (I'm running Unix and RT11)? I've gone
through the manuals and if it's there I can't find anything.

With Ersatz11 it passes on the cursor keys and I get the
expected <esc>[A <esc>[B <esc>[C <esc>[D for the cursor
keys - though nothing for function keys.

jgh
Bob Eager
2020-06-11 08:05:36 UTC
Permalink
Is there a way to tell SIMH to pass function and editing keys on to the
emulated PDP11 (I'm running Unix and RT11)? I've gone through the
manuals and if it's there I can't find anything.
With Ersatz11 it passes on the cursor keys and I get the expected
<esc>[A <esc>[B <esc>[C <esc>[D for the cursor keys - though nothing for
function keys.
I've not had that problem (well, I did, but not now). It seems to pass on
everything - I have xterm set up to do 'the right thing'.

(this is with VMS, but EDT works fine which is quite a good test)
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
Dennis Boone
2020-06-11 14:54:46 UTC
Permalink
Post by j***@mdfs.net
Is there a way to tell SIMH to pass function and editing keys
on to the emulated PDP11 (I'm running Unix and RT11)? I've gone
through the manuals and if it's there I can't find anything.
Sounds like your console is set to 7P, or maybe 7B if your
terminal emulator is using CSI instead of esc-[ or similar.
Try setting it to 8B:

SET TTI 8B

for example.

De
Grant Taylor
2020-06-11 15:39:03 UTC
Permalink
This post might be inappropriate. Click to display it.
j***@mdfs.net
2020-06-11 16:03:34 UTC
Permalink
Post by Grant Taylor
Is there a chance that jgh's terminal / emulator is using something
other than Esc-[ as the CSI?
I either use the WinXP, or Win7 console or AnsiCon, and other code
running in them correctly receives <esc>[blah for function/edit
keys. I thought it mught be the 7B/7P/8B setting but as mentioned
earlier, that wouldn't stop 27, 91, etc. getting through.

jgh
Dennis Boone
2020-06-12 02:22:31 UTC
Permalink
Post by j***@mdfs.net
I either use the WinXP, or Win7 console or AnsiCon, and other code
running in them correctly receives <esc>[blah for function/edit
keys. I thought it mught be the 7B/7P/8B setting but as mentioned
earlier, that wouldn't stop 27, 91, etc. getting through.
7P would stop the escape, because it's not printable. 7B would block a
0x9b type CSI.

But the real proof is to just set the line to 8B and try it.

De
j***@mdfs.net
2020-06-13 15:12:47 UTC
Permalink
Post by Dennis Boone
7P would stop the escape, because it's not printable. 7B would block a
0x9b type CSI.
But the real proof is to just set the line to 8B and try it.
I've tried all three, with no success. SET TTI 8B however had some odd
effects, the output text has lots of accented characters in it. From
looking at a few it looks like the PDP11 is writing to the console
sending 7-bit characters with the parity in bit 7. The console receives
those 8-bit characters and happily displays them as 8-bit characters -
including CHR$128-CHR$255 when bit 7 is set.

As an aside, I've got E11 to send function and editing keypressed as
it has a DEFINE KEYPRESS command, which I used to build a list of
keypress strings. I've attached it at the end for posterity if anybody
else is looking for the same information.

However, I prefer to get this working with SIMH as SIMH allows me to
specify what console program to use, E11 uses it's own internal
console which is rather limited. I start up SIMH with AnsiCon which
gives a large ANSI implementation.

Another issue that is coming up (which I'm sure I knew the answer to
back in the 1980s) is that ANSI keypress sequences are:
"<esc>[blah blah terminator" - function/editing key
"<esc>" *nothing* - Escape key or Ctrl-[

But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
wait if there is nothing there, so that I can do something like:

read(stdin,&c,1);
if (c != 27) return c;
if (nothingpending(stdin)) return c;
while (thing) {
read(stdin,&nextc,1);
...

What magic do I need to implement nothingpending(stdin) ? The
equivalent of DOS/Window's kbhit(). I had thought the natual
method would be reading fstat(stdin), maybe expecting 'size'
to change, but nothing changes except the timestamps.

jgh




----8<----
Keypress definitions for E11 to specify DEC VT character sequences
for function and editing keys. Add these to your appropriate *.ini
file used to start up E11.
----8<----
define keypress 2 = number '2"'
define keypress ` = number "'@"
define keypress ' = number "#~"

define keypress F1 = if shift then chr$(27)+"[11;2~" else if ctrl then CHR$(27)+"[11;5~" else chr$(27)+"[11~" endif endif
define keypress F2 = if shift then chr$(27)+"[12;2~" else if ctrl then CHR$(27)+"[12;5~" else chr$(27)+"[12~" endif endif
define keypress F3 = if shift then chr$(27)+"[13;2~" else if ctrl then CHR$(27)+"[13;5~" else chr$(27)+"[13~" endif endif
define keypress F4 = if shift then chr$(27)+"[14;2~" else if ctrl then CHR$(27)+"[14;5~" else chr$(27)+"[14~" endif endif
define keypress F5 = if shift then chr$(27)+"[15;2~" else if ctrl then CHR$(27)+"[15;5~" else chr$(27)+"[15~" endif endif
define keypress F6 = if shift then chr$(27)+"[17;2~" else if ctrl then CHR$(27)+"[17;5~" else chr$(27)+"[17~" endif endif
define keypress F7 = if shift then chr$(27)+"[18;2~" else if ctrl then CHR$(27)+"[18;5~" else chr$(27)+"[18~" endif endif
define keypress F8 = if shift then chr$(27)+"[19;2~" else if ctrl then CHR$(27)+"[19;5~" else chr$(27)+"[19~" endif endif
define keypress F9 = if shift then chr$(27)+"[20;2~" else if ctrl then CHR$(27)+"[20;5~" else chr$(27)+"[20~" endif endif
define keypress F10 = if shift then chr$(27)+"[21;2~" else if ctrl then CHR$(27)+"[21;5~" else chr$(27)+"[21~" endif endif
define keypress F11 = if shift then chr$(27)+"[23;2~" else if ctrl then CHR$(27)+"[23;5~" else chr$(27)+"[23~" endif endif
define keypress F12 = if shift then chr$(27)+"[24;2~" else if ctrl then CHR$(27)+"[24;5~" else chr$(27)+"[24~" endif endif

define keypress HOME = if shift then chr$(27)+"[1;2~" else if ctrl then CHR$(27)+"[1;5~" else chr$(27)+"[1~" endif endif
define keypress INS = if shift then chr$(27)+"[2;2~" else if ctrl then CHR$(27)+"[2;5~" else chr$(27)+"[2~" endif endif
define keypress DEL = if shift then chr$(27)+"[3;2~" else if ctrl then CHR$(27)+"[3;5~" else chr$(27)+"[3~" endif endif
define keypress END = if shift then chr$(27)+"[4;2~" else if ctrl then CHR$(27)+"[4;5~" else chr$(27)+"[4~" endif endif
define keypress PGUP = if shift then chr$(27)+"[5;2~" else if ctrl then CHR$(27)+"[5;5~" else chr$(27)+"[5~" endif endif
define keypress PGDN = if shift then chr$(27)+"[6;2~" else if ctrl then CHR$(27)+"[6;5~" else chr$(27)+"[6~" endif endif
----8<----
r***@gmail.com
2020-06-13 16:22:02 UTC
Permalink
Post by j***@mdfs.net
But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
select

https://netbsd.gw.com/cgi-bin/man-cgi?select+2+NetBSD-current
--
roger ivie
***@gmail.com
Dennis Boone
2020-06-13 18:41:54 UTC
Permalink
Post by j***@mdfs.net
I've tried all three, with no success. SET TTI 8B however had some odd
effects, the output text has lots of accented characters in it. From
looking at a few it looks like the PDP11 is writing to the console
sending 7-bit characters with the parity in bit 7. The console receives
those 8-bit characters and happily displays them as 8-bit characters -
including CHR$128-CHR$255 when bit 7 is set.
Ah, if only some of them are from the upper moby, then the -11 is
running even or odd parity, and your terminal is effectively doing space
parity. At that point, the -11 might ignore the escape due to a parity
error.

De
Dennis Boone
2020-06-13 18:50:49 UTC
Permalink
Post by j***@mdfs.net
Another issue that is coming up (which I'm sure I knew the answer to
"<esc>[blah blah terminator" - function/editing key
"<esc>" *nothing* - Escape key or Ctrl-[
That's timing sensitive. Network delays used to screw this up fairly
often, but a plain timing solution can still be vulnerable to the
problem.

Also, not all ANSI sequences are esc-[-something.
Post by j***@mdfs.net
But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
You probably need to set the file descriptor non-blocking, and do a
zero timeout read. If you get zero characters back, there weren't
any available. Or use select().

De
j***@mdfs.net
2020-06-16 22:56:05 UTC
Permalink
Post by Dennis Boone
Also, not all ANSI sequences are esc-[-something.
True, it took me a long time to put together this list:
http://mdfs.net/Docs/Comp/Comms/ANSIKeys

Almost all searches for ANSI sequences give *output* sequences,
it was quite a task tracking down *input* sequences.

jgh
r***@gmail.com
2020-06-19 05:26:57 UTC
Permalink
Post by j***@mdfs.net
Almost all searches for ANSI sequences give *output* sequences,
it was quite a task tracking down *input* sequences.
i've never found it hard to find input sequences. see, for example,
page 20 of this document: https://vt100.net/dec/ek-vt240-hr-002.pdf
(pdf reader says it's page 24).
--
roger ivie
***@gmail.com
j***@mdfs.net
2020-06-23 04:03:41 UTC
Permalink
I've never found it hard to find input sequences. see, for example,
page 20 of this document: https://vt100.net/dec/ek-vt240-hr-002.pdf
(pdf reader says it's page 24).
Once you work out what search terms to use, yes you can find it. But
until I started uploading documents, searching for "ANSI sequences"
or "ANSI escape sequences" or "escape sequences", including "keyboard",
"keypress", etc or not would give you hundreds of matches to *output*
sequences not input sequences.

It was about four years ago when I spent a big chunk of time trawlling
documents, tracking down the information, and collating it. I'm still
tweeking my list every now and then. At the back of my mind it
rewriting the Wikipedia article to replace the "not an exhaustive list"
examples with something more comprehensive.

jgh
Andy Valencia
2020-06-14 04:41:33 UTC
Permalink
Post by r***@gmail.com
Post by j***@mdfs.net
But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
select
Or in many UNIX-likes:
int nbyte, res, sockfd;
...
res = ioctl(sockfd, FIONREAD, &nbyte);

You'll need a header file:

#include <sys/ioctl.h>

might suffice, YMMV.

Andy Valencia
Home page: https://www.vsta.org/andy/
To contact me: https://www.vsta.org/contact/andy.html
Scott Lurndal
2020-06-16 15:19:00 UTC
Permalink
Post by j***@mdfs.net
Post by Dennis Boone
7P would stop the escape, because it's not printable. 7B would block a
0x9b type CSI.
But the real proof is to just set the line to 8B and try it.
I've tried all three, with no success. SET TTI 8B however had some odd
effects, the output text has lots of accented characters in it. From
looking at a few it looks like the PDP11 is writing to the console
sending 7-bit characters with the parity in bit 7. The console receives
those 8-bit characters and happily displays them as 8-bit characters -
including CHR$128-CHR$255 when bit 7 is set.
As an aside, I've got E11 to send function and editing keypressed as
it has a DEFINE KEYPRESS command, which I used to build a list of
keypress strings. I've attached it at the end for posterity if anybody
else is looking for the same information.
However, I prefer to get this working with SIMH as SIMH allows me to
specify what console program to use, E11 uses it's own internal
console which is rather limited. I start up SIMH with AnsiCon which
gives a large ANSI implementation.
Another issue that is coming up (which I'm sure I knew the answer to
"<esc>[blah blah terminator" - function/editing key
"<esc>" *nothing* - Escape key or Ctrl-[
But.... how in Unix do I test that there is *nothing* waiting on
standard input? read() waits for input. I need a call that doesn't
You can set the O_NONBLOCK attribute, in which case the read
system call will return EOF when there is nothing pending.

You can use 'poll' or 'select' to test the file descriptor for
pending input events.
Dennis Boone
2020-06-12 02:18:37 UTC
Permalink
Post by Grant Taylor
I /thought/ Control Sequence Indicator (CSI) /was/ <Escape>-<[>. Or at
least that's what it defaulted to.
Best I can tell from the standards stuff I've read, 0x9b was really
expected to be the primary CSI. Esc-[ was the fallback for systems
where the path wasn't 8-bit or whatever.

De
j***@mdfs.net
2020-06-23 07:12:53 UTC
Permalink
Post by j***@mdfs.net
Is there a way to tell SIMH to pass function and editing keys
on to the emulated PDP11 (I'm running Unix and RT11)? I've gone
through the manuals and if it's there I can't find anything.
I think I've discovered that it's impossible.

I ended up going to the SIMH source code. In the console I/O
code, in the Windows code is:

if (rec.EventType == KEY_EVENT) {
if (rec.Event.KeyEvent.bKeyDown) {
if (0 == rec.Event.KeyEvent.uChar.UnicodeChar) { /* Special Character/Keys? */
if (rec.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) /* Pause/Break Key */
c = sim_brk_char | SCPE_BREAK;
else
if (rec.Event.KeyEvent.wVirtualKeyCode == '2') /* ^@ */
c = 0; /* return NUL */
} else
c = rec.Event.KeyEvent.uChar.AsciiChar;
}
}

If I've read that correctly, it's saying:
..if specialkey then
....if specialkey=PAUSE then do something
..else
....get ascii code
..endif

So, if a special key is pressed, and it's not PAUSE,
then *nothing* *happens*. Which is why two weeks of
fiddling around has resulted in special keys giving
nothing to the code running inside the emulator.

jgh
Bob Eager
2020-06-23 07:40:29 UTC
Permalink
Post by j***@mdfs.net
Is there a way to tell SIMH to pass function and editing keys on to the
emulated PDP11 (I'm running Unix and RT11)? I've gone through the
manuals and if it's there I can't find anything.
I think I've discovered that it's impossible.
I ended up going to the SIMH source code. In the console I/O code, in
if (rec.EventType == KEY_EVENT) {
if (rec.Event.KeyEvent.bKeyDown) {
if (0 == rec.Event.KeyEvent.uChar.UnicodeChar) { /* Special Character/Keys? */
if (rec.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) /* Pause/Break Key */
c = sim_brk_char | SCPE_BREAK;
else
c = 0; /* return NUL */
} else
c = rec.Event.KeyEvent.uChar.AsciiChar;
}
}
..if specialkey then ....if specialkey=PAUSE then do something ..else
....get ascii code ..endif
So, if a special key is pressed, and it's not PAUSE,
then *nothing* *happens*. Which is why two weeks of fiddling around has
resulted in special keys giving nothing to the code running inside the
emulator.
However, if you use a DZ line (for example) you can get it all OK. I have
xterm set up and can use EDT, etc. with no trouble.

That may be the easiest solution.
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-23 21:26:49 UTC
Permalink
Post by Bob Eager
However, if you use a DZ line (for example) you can get it all OK. I have
xterm set up and can use EDT, etc. with no trouble.
That may be the easiest solution.
It would be if I could get it to work.

I have puTTY installed, and I've spent two hours fruitlessly
trying to get SIMH and puTTY to talk to each other. :(

jgh
Bob Eager
2020-06-24 08:07:42 UTC
Permalink
Post by j***@mdfs.net
Post by Bob Eager
However, if you use a DZ line (for example) you can get it all OK. I
have xterm set up and can use EDT, etc. with no trouble.
That may be the easiest solution.
It would be if I could get it to work.
I have puTTY installed, and I've spent two hours fruitlessly trying to
get SIMH and puTTY to talk to each other. :(
I just tried it. DZ line on port 5555 on SIMH.

All I did for Putty was set the hostname, the port (5555) and connection
type Telnet. Straight in.

Or are you referring to the function key problem?
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-24 10:12:20 UTC
Permalink
Post by Bob Eager
Post by j***@mdfs.net
I have puTTY installed, and I've spent two hours fruitlessly trying to
get SIMH and puTTY to talk to each other. :(
I just tried it. DZ line on port 5555 on SIMH.
All I did for Putty was set the hostname, the port (5555) and connection
type Telnet. Straight in.
Or are you referring to the function key problem?
I haven't even got that far. Still trying to get SIMH to use
something other than its internal Console for console I/O.

I have a batch file thus:
start C:\Apps\Internet\puTTY\puTTY -telnet localhost
start ..\Unix\pdp11 ..\RT11\rt11.ini

and a rt11.ini file thus:
set console telnet=23
set console pchar=37777777777
set cpu 11/45
set rl0 RL02
attach rl0 ..\RT11\rtv53_rl.dsk
boot rl0

I can't see where I'm going wrong. SIMH starts up, displays
Waiting for console telnet connection...

puTTY starts up, and displays
Network error: connection refused

Eventually SIMH says:
Console telnet connection timed out

I've tried various combinations of set console telnet... and
various combinations of putty -telnet.... and haven't hit on
the magic combination.

jgh
Bob Eager
2020-06-24 11:00:51 UTC
Permalink
set console telnet=23 set console pchar=37777777777 set cpu 11/45 set
rl0 RL02 attach rl0 ..\RT11\rtv53_rl.dsk boot rl0
I can't see where I'm going wrong. SIMH starts up, displays Waiting for
console telnet connection...
Use a port other than 23; I used 8023 (something else was using 23 on
this machine!)

That worked fine for me. It may be that the Windows firewall is blocking
low numbered ports (I'm using FreeBSD so don't have that problem).
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-24 13:44:37 UTC
Permalink
Post by Bob Eager
That worked fine for me. It may be that the Windows firewall is blocking
low numbered ports (I'm using FreeBSD so don't have that problem).
I've changed both ports to 8023. I've added SIMH and puTTY to Windows
Firewall's exception list. I've added port 8023 to the exception list.
I've even turned the firewall off completely. No joy. :(

jgh
Scott Lurndal
2020-06-24 15:17:45 UTC
Permalink
Post by j***@mdfs.net
Post by Bob Eager
That worked fine for me. It may be that the Windows firewall is blocking
low numbered ports (I'm using FreeBSD so don't have that problem).
I've changed both ports to 8023. I've added SIMH and puTTY to Windows
Firewall's exception list. I've added port 8023 to the exception list.
I've even turned the firewall off completely. No joy. :(
Does windows no longer include a telnet client?
David Wade
2020-06-25 09:46:07 UTC
Permalink
This post might be inappropriate. Click to display it.
Bob Eager
2020-06-25 10:52:58 UTC
Permalink
Post by David Wade
Post by Scott Lurndal
Post by j***@mdfs.net
Post by Bob Eager
That worked fine for me. It may be that the Windows firewall is
blocking low numbered ports (I'm using FreeBSD so don't have that
problem).
I've changed both ports to 8023. I've added SIMH and puTTY to Windows
Firewall's exception list. I've added port 8023 to the exception list.
I've even turned the firewall off completely. No joy. :(
Does windows no longer include a telnet client?
Its no longer installed by default because it sends passwords in plain
text. It can be added from control panel, programs and features, turn
windows features on or off...
But should be no need, since Putty works fine in telnet mode.
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-26 08:13:54 UTC
Permalink
Instead of failing to get to sleep, I tried getting puTTY to talk
to Ersatz11 instead. Another failure. :(

jgh
Bob Eager
2020-06-26 08:17:43 UTC
Permalink
Instead of failing to get to sleep, I tried getting puTTY to talk to
Ersatz11 instead. Another failure. :(
I'm wondering about your putty setup now. Can you describe the settings
you are using?
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-27 01:09:45 UTC
Permalink
Post by Bob Eager
I'm wondering about your putty setup now. Can you describe the settings
you are using?
rt11.bat containing:
----8<----
start C:\Apps\Internet\puTTY\puTTY -telnet localhost:8023
start ..\Unix\pdp11 ..\RT11\rt11.ini
----8<----

I've tried:
start C:\Apps\Internet\puTTY\puTTY -telnet localhost 8023
start C:\Apps\Internet\puTTY\puTTY telnet://localhost:8023/
start C:\Apps\Internet\puTTY\puTTY -telnet -P 8023 localhost
start C:\Apps\Internet\puTTY\puTTY -P 8023 localhost

Or starting up manually with:
Session:
hostname localhost
port 23
connection telnet
Connection:
telnet: OLD_ENVIRON BSD
Negotiation: Active (also tried Passive)

I've tried replacing localhost with 127.0.0.1 at both ends.

Using PuTTY Release 0.70

Windows Firewall exceptions includes puTTY, SIMH and Ersatz11.

jgh
Bob Eager
2020-06-27 08:59:27 UTC
Permalink
Post by j***@mdfs.net
Post by Bob Eager
I'm wondering about your putty setup now. Can you describe the settings
you are using?
----8<----
start C:\Apps\Internet\puTTY\puTTY -telnet localhost:8023 start
..\Unix\pdp11 ..\RT11\rt11.ini ----8<----
start C:\Apps\Internet\puTTY\puTTY -telnet localhost 8023 start
C:\Apps\Internet\puTTY\puTTY telnet://localhost:8023/ start
C:\Apps\Internet\puTTY\puTTY -telnet -P 8023 localhost start
C:\Apps\Internet\puTTY\puTTY -P 8023 localhost
hostname localhost port 23 connection telnet
telnet: OLD_ENVIRON BSD
Negotiation: Active (also tried Passive)
Presumably you did actually replace the 23 with 8023 here?
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
j***@mdfs.net
2020-06-27 19:18:40 UTC
Permalink
Post by Bob Eager
Post by j***@mdfs.net
hostname localhost port 23 connection telnet
Presumably you did actually replace the 23 with 8023 here?
Do'h Yes I did. :)

When I have the chance I may have the opportunity to see if I
can get it working on my neighbour's system. I just have to
wait for another "help, my PC won't work" call. ;)

jgh
j***@mdfs.net
2020-07-11 22:33:44 UTC
Permalink
After posting a query on the SIMH github, I got a link to recently
built binaries.

A couple of months ago I downloaded the latest version, checking it
today it was 3.9. Today I found there was a v4.000 20-Jun-2020 update,
I downloaded that and it works just as everybody describes it should do.

I now have another problem, in that the latency of characters from the
keyboard via the telnet connection is such that my code can no longer
tell the difference between <esc> <nochar> and <esc> <char> ;)

But at least I now do have a connection between a console that has both
colour and function keys, so can get further work done. Unfortunately
I have a job interview on Monday so I'm in danger of coming out of
Lockdown and having less time to do coding. ;)

jgh
Jonathan Harston
2023-07-19 22:24:02 UTC
Permalink
After three years of frustration trying to remember what I'd done to
get this to work once, I finally managed to get puTTY and SIMH to work
together. The entire problem was that NOWHERE did anybody say YOU
******* NEED TO ******* TURN THE ******* FIREWALL OFF! It's no good
saying "do A,B,C, that works for me" without also saying "oh by the
way, you also need to do F,G,H,I,J,K,L,M to get it to work, you have
to GUESS that bit".

The error 'Network error: connection refused" does not mean "you
haven't configured things properly", it means AN EXTERNAL PROGRAM IS
ACTIVELY BLOCKING THE CONNECTION. KILL THAT EXTERNAL PROGRAM!

Anyway, so that other people don't spend three years tearing their
hair out, I'm posting here what I did to get things to work.

Run puTTY.
In the configuration, set the Terminal and Window settings to taste
In Session, set:
Host name: localhost
Port: 8023
Connection: telnet
Saved sessions: simh
Save
Then select Open and allow the connection to fail, then quit puTTY.

I start SIMH with a batch file that references an INI file:
unix7.bat:
cd /d %0\..
start pdp11 unix7.ini

unix7.ini:
set console telnet=localhost:8023
set console pchar=37777777777
set cpu 11/45
set rl0 rl02
attach rl0 unix_v7_rl.dsk
!start C:\Apps\Internet\puTTY\putty.exe -load simh
boot rl0

Now TURN OFF YOUR FIREWALL!!!!!!!

Running unix7.bat should start SIMH, start puTTY, and connect the two.
This also works for my unix6, unixbsd and rt11 launchers, mounting the
relevant images and booting the relevant disks. The important bit is
to run puTTY from the INI file. If you run it from the batch file
it times out before SIMH has managed to get started, and running it
manually you never managed to click in all the right places in time.

I also never managed to get the -telnet command line option to work,
so created a session and used that. The additional advantage to using
a session is that I can set all my terminal and keyboard preferences
for that particular session.

There should be a way to configure your firewall to create an exception
for puTTY and SIMH, but at the moment I haven't managed to find the
way to do that here with Avast. So, at the moment, I turn Avast off, launch
SIMH/puTTY, then turn it back on again. It only needs to be off for the
initial connection.
John
2023-07-19 22:36:22 UTC
Permalink
Post by Jonathan Harston
After three years of frustration trying to remember what I'd done to
get this to work once, I finally managed to get puTTY and SIMH to work
together. The entire problem was that NOWHERE did anybody say YOU
******* NEED TO ******* TURN THE ******* FIREWALL OFF! It's no good
saying "do A,B,C, that works for me" without also saying "oh by the
way, you also need to do F,G,H,I,J,K,L,M to get it to work, you have
to GUESS that bit".
The error 'Network error: connection refused" does not mean "you
haven't configured things properly", it means AN EXTERNAL PROGRAM IS
ACTIVELY BLOCKING THE CONNECTION. KILL THAT EXTERNAL PROGRAM!
Anyway, so that other people don't spend three years tearing their
hair out, I'm posting here what I did to get things to work.
I think once you get to the point of "my firewall was disallowing
connections to localhost and I didn't think to google what 'connection
refused' means for 3 years" you're starting to get beyond the list of
things that might reasonably be covered in SIMH documentation. Besides
that, "turn the firewall off" isn't the correct response, "fix your
crappy firewall" is.

Maybe this is a sore point for me because in my day job customers
constantly say "Your product is broken" when what's *actually* broken is
their network, or their firewall, or their storage array, or a million
other things which aren't our responsibility but *become* our
responsibility because people are intellectually lazy. You're right,
we're *not* indexing the logs from your webserver any more, because your
webserver has been down for 3 days and you didn't notice!
Post by Jonathan Harston
There should be a way to configure your firewall to create an exception
for puTTY and SIMH, but at the moment I haven't managed to find the
way to do that here with Avast. So, at the moment, I turn Avast off, launch
SIMH/puTTY, then turn it back on again. It only needs to be off for the
initial connection.
Hasn't Windows shipped a passable firewall built-in since XP SP2?


john

Scott Lurndal
2020-06-24 15:17:00 UTC
Permalink
Post by Bob Eager
set console telnet=23 set console pchar=37777777777 set cpu 11/45 set
rl0 RL02 attach rl0 ..\RT11\rtv53_rl.dsk boot rl0
I can't see where I'm going wrong. SIMH starts up, displays Waiting for
console telnet connection...
Use a port other than 23; I used 8023 (something else was using 23 on
this machine!)
That worked fine for me. It may be that the Windows firewall is blocking
low numbered ports (I'm using FreeBSD so don't have that problem).
Only privileged processes can listen on ports less than 1024. As you
say, choose a port number greater than or equal to 1024.
Loading...