On Jan 5, 2013, at 4:32 AM, Rob Jarratt wrote:
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE]
On Behalf Of Paul_Koning at Dell.com
...
3. The first thing RSTS does to the DMC after resetting it is to set RUN
and
ROMI in SEL0, with a magic value in SEL6. What that does (according to
the
driver comments) is to put the DMC microcontroller in a state where it
executes the opcode in SEL6 every clock tick. That instruction is a "move
line
status register to BSEL3". The RSTS/E driver uses this to test for DSR;
it
takes no further startup action until DSR has been set for 2 seconds. So
I
added code to pdp11_dmc.c to handle this magic (it simply sets the DSR bit
unconditionally if it sees ROMI and the magic opcode value). With that,
RSTS/E will complete the device startup.
As I have only tested this with VMS I have not seen the VMS driver do this
so the emulation doesn't do it. It sounds like this could be a good way for
the OS to know that the other end is up and so it can start doing a Master
Clear and sending messages. This might help with the other problem you
mention below. It might be good to change the code to set the status of DSR
according to whether the TCP connection is open. What does the RSTS driver
do once it has seen the DSR set for 2 seconds, does it just clear the ROM
INPUT bit? Can you send me your code?
Here's the first step:
MOV R0,R3 ;RESTORE DEVICE CSR POINTER
BIS #MCLR,(R3) ;MASTER CLEAR THE DMC11 AND TURN DTR ON.
MOV #DSPDSR,SEL6(R3) ;SET INSTRUCTION TO MOVE DSR TO BSEL3
MOVB #DMCRUN,BSEL1(R3) ;HAVE DMC EXECUTE SEL6 EVERY 300 NSEC
definitions:
DMCRUN = 202 ;WHEN MOVED TO BSEL1 THE DMC EXECUTES THE
;INSTRUCTION IN SEL6 EVERY 300 NSEC.
DSPDSR = 021263 ;MOVE LINE UNIT STATUS TO BSEL3
; OUT IBUS, MODEM CSR, BSEL3
By the way, the background for this can be found in the KMC-11 manual.
Next, once DSR has been seen on for 2 seconds, it does another master clear, then the Base In operation.
Since Master Clear needs to drop the connection, I don't think that tying DSR to the connection being alive will work. It does seem like an obvious thing to do, but that second master clear suggests it isn't the way to go.
4. Now I see a "circuit up" message from DECnet, but that is followed by
some combination of "circuit down, listener timeout" and "circuit down,
unexpected packet type". After staring at packet traces ("set dmc0
debug=data") for a while, the reason is obvious: when one side of the
connection is started and the other is not yet started, one side sends a
packet and the other side discards that. You can't do that. DDCMP is a
connection oriented protocol: if you discard a packet that's a protocol
violation, and DECnet will absolutely positively get bent out of shape
because it assumes the DDCMP implementation will not do such a thing.
What has to be done is that a transmit remains pending if the other end is
not able to receive it. That can happen because there is no connection,
or
because the other end hasn't turned its DMC on yet, or it's on but it
currently
doesn't have receive buffers.
The code should already do this. It will not try to send a buffer if there
isn't an open socket to the other side. See the dmc_get_transmit_socket()
routine. It may not be perfect but that is the best I can think of when
there isn't a single permanent cable between the two sides. On VMS this
seems to work without any circuit down messages.
Ok, but then why did I see a "Discarding received data while controller is not running" message? That's the problem, I believe.
paul
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE]
On Behalf Of Paul_Koning at Dell.com
Sent: 05 January 2013 01:32
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] DMC11 in next simh version... looks nice, and
question
about TOPS-10
Following up on my own note...
On Jan 4, 2013, at 5:14 PM, <Paul_Koning at Dell.com>
<Paul_Koning at Dell.com> wrote:
...
4. Now I see a "circuit up" message from DECnet, but that is followed by
some combination of "circuit down, listener timeout" and "circuit down,
unexpected packet type". After staring at packet traces ("set dmc0
debug=data") for a while, the reason is obvious: when one side of the
connection is started and the other is not yet started, one side sends a
packet and the other side discards that. You can't do that. DDCMP is a
connection oriented protocol: if you discard a packet that's a protocol
violation, and DECnet will absolutely positively get bent out of shape
because it assumes the DDCMP implementation will not do such a thing.
What has to be done is that a transmit remains pending if the other end
is
not able to receive it. That can happen because there is no connection,
or
because the other end hasn't turned its DMC on yet, or it's on but it
currently
doesn't have receive buffers. Similarly, master clear then RUN (DMC
restart) needs to synchronize with the other end, to simulate the effect
of
the DDCMP initialization sequence.
More precisely, the answer depends on whether you want to be strictly
compliant with the DDCMP spec, or "compliant enough".
DDCMP guarantees the following:
1. Nothing sent prior to the most recent DDCMP restart will be received
after
that restart.
2. If packet n is received, packets 0..n-1 (counting from the most recent
restart) have also been received 3. Packet boundaries are preserved
(packet
boundaries are significant) 4. If a transmit n completes, that means that
packet was delivered to a buffer on the receiving node.
It turns out that only properties 1, 2, and 3 are required for DECnet
Phase III
and beyond; that's because the routing layer is a datagram service so the
layers above can't draw any conclusions from transmits completing. It's
possible that DECnet Phase II requires property 4; I'm not sure and I
don't
really know how to answer that question since I haven't seen copies of the
Phase II specs online.
So... properties 1 and 2 could be obtained in the SIMH implementation by
implementing a DDCMP restart (master clear and reinitialization) as a
connection reset and re-connect.
That should be fairly easy to do.
Then property 2 amounts to sending to the
socket and holding pending anything that's not accepted, and on the
receiving end reading from the socket when there is a buffer available to
deliver the data into. That should be pretty easy to do.
I think the code already does this.
Finally, in the DMC a buffer corresponds one to one with a DDCMP packet
(its implementation of property 3). That's required -- all DECnet
protocols
are packet oriented and packet boundaries are meaningful. There are no
byte stream protocols in DECnet -- TCP is the only protocol among all the
networking protocols I know of that made that horrible design error. So
it's
not a matter of making a few diagnostics work as the comments in
pdp11_dmc.c say; each transmit buffer is a single DDCMP packet, and must
be delivered exactly to one receive buffer. If you transmit an oversized
message, that's an error: the DMR manual on Bitsavers says that in such a
case, you get a Control Out with bit 4 set in SEL6 ("message too long")
and
at that point the DMC has already halted (DDCMP is stopped).
The code already does this. Each buffer is sent with a length prefix. The
code at the other end reads the length prefix so that the received buffer
only ever contains exactly what was in the transmit buffer. However, if the
message is too long I actually set the LOST DATA bit instead - see calls to
dmc_set_lost_data().
Regards
Rob
paul
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE]
On Behalf Of Paul_Koning at Dell.com
Sent: 04 January 2013 22:15
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] DMC11 in next simh version... looks nice, and
question
about TOPS-10
On Jan 2, 2013, at 4:33 PM, Jordi Guillaumes i Pons wrote:
Hello,
The upcoming SIMH version (4.0) comes with a virtual DMC11. It has been
merged to the head branch in the git repository, so I have been playing
with
it a little bit. The simh team has done an aswesome work again, so kudos
for Bob, Mark and all the others... It seems the DMCx are supported in
pdp10, pdp11 and the VAXen.
I grabbed the current code (from git) to try this on RSTS/E.
Some results:
1. The stock build does not work at all (on my Mac). It never gets a boot
prompt. In fact, the simulator is utterly wedged: it doesn't respond to
control/E or SIGTERM. I have to "kill -9" it to make it go away. GDB
shows
that it's sitting on some semaphore wait.
2. If I build with NOASYNCH=1, the pdp11 simulation works. Now on to the
DMC emulation...
3. The first thing RSTS does to the DMC after resetting it is to set RUN
and
ROMI in SEL0, with a magic value in SEL6. What that does (according to
the
driver comments) is to put the DMC microcontroller in a state where it
executes the opcode in SEL6 every clock tick. That instruction is a "move
line
status register to BSEL3". The RSTS/E driver uses this to test for DSR;
it
takes no further startup action until DSR has been set for 2 seconds. So
I
added code to pdp11_dmc.c to handle this magic (it simply sets the DSR bit
unconditionally if it sees ROMI and the magic opcode value). With that,
RSTS/E will complete the device startup.
As I have only tested this with VMS I have not seen the VMS driver do this
so the emulation doesn't do it. It sounds like this could be a good way for
the OS to know that the other end is up and so it can start doing a Master
Clear and sending messages. This might help with the other problem you
mention below. It might be good to change the code to set the status of DSR
according to whether the TCP connection is open. What does the RSTS driver
do once it has seen the DSR set for 2 seconds, does it just clear the ROM
INPUT bit? Can you send me your code?
4. Now I see a "circuit up" message from DECnet, but that is followed by
some combination of "circuit down, listener timeout" and "circuit down,
unexpected packet type". After staring at packet traces ("set dmc0
debug=data") for a while, the reason is obvious: when one side of the
connection is started and the other is not yet started, one side sends a
packet and the other side discards that. You can't do that. DDCMP is a
connection oriented protocol: if you discard a packet that's a protocol
violation, and DECnet will absolutely positively get bent out of shape
because it assumes the DDCMP implementation will not do such a thing.
What has to be done is that a transmit remains pending if the other end is
not able to receive it. That can happen because there is no connection,
or
because the other end hasn't turned its DMC on yet, or it's on but it
currently
doesn't have receive buffers.
The code should already do this. It will not try to send a buffer if there
isn't an open socket to the other side. See the dmc_get_transmit_socket()
routine. It may not be perfect but that is the best I can think of when
there isn't a single permanent cable between the two sides. On VMS this
seems to work without any circuit down messages.
Similarly, master clear then RUN (DMC
restart) needs to synchronize with the other end, to simulate the effect
of
the DDCMP initialization sequence.
As you know, there is no DDCMP under the covers. It would be nice to add it,
but is presumably a fairly significant effort. You seem to suggest that some
other kind of synchronisation could be done with the other end in the
absence of DDCMP, I am not sure what exactly you are suggesting here, can
you explain?
Regards
Rob
I'll take a look at how hard this would be to fix. It'll probably take a
fair
amount of work...
paul
It had support for ethernet too: 10 Mb/s media only IIRC.
DECnet got started and replaced the physical address of the NIC with the AA-00-04-00-xx-xx DECnet address
The user had no control over the latter. That was introduced later when Windows 2000 was released.
-----Original Message-----
From: Cory Smelosky <b4 at gewt.net>
Sender: owner-hecnet at Update.UU.SE
Date: Fri, 4 Jan 2013 20:13:19
To: <hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SE
Subject: Re: [HECnet] NetWare and DECnet
On 4 Jan 2013, at 20:10, hvlems at zonnet.nl wrote:
IIRC DECnet for Netware was a separately sold item of the Pathworks product suite. It was DECnet for pc's running Netware, as basic Pathworks was DECnet for PC-DOS and MS-DOS pc's or DECnet for the Macintosh.
It brought DECnet connectivity to PC's running Netware; it had support for 4 and 16 Mb/s tokenring adapters. Tokenring puts bits in a different order on the wire so AA-00 addresses became 55-00 addresses.
Hans
Ahhh. Did it support non-tokenring as well? Was it a loadable module a user could define manually as a binding on the NIC?
------Origineel bericht------
Van: Cory Smelosky
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: [HECnet] NetWare and DECnet
Verzonden: 5 januari 2013 01:49
Hi!
As I've already gotten a bunch of my NT systems on HECnet, I thought i'd try a new beast: old NetWare.
Following up on my own note...
On Jan 4, 2013, at 5:14 PM, <Paul_Koning at Dell.com>
<Paul_Koning at Dell.com> wrote:
...
4. Now I see a "circuit up" message from DECnet, but that is followed by some combination of "circuit down, listener timeout" and "circuit down, unexpected packet type". After staring at packet traces ("set dmc0 debug=data") for a while, the reason is obvious: when one side of the connection is started and the other is not yet started, one side sends a packet and the other side discards that. You can't do that. DDCMP is a connection oriented protocol: if you discard a packet that's a protocol violation, and DECnet will absolutely positively get bent out of shape because it assumes the DDCMP implementation will not do such a thing.
What has to be done is that a transmit remains pending if the other end is not able to receive it. That can happen because there is no connection, or because the other end hasn't turned its DMC on yet, or it's on but it currently doesn't have receive buffers. Similarly, master clear then RUN (DMC restart) needs to synchronize with the other end, to simulate the effect of the DDCMP initialization sequence.
More precisely, the answer depends on whether you want to be strictly compliant with the DDCMP spec, or "compliant enough".
DDCMP guarantees the following:
1. Nothing sent prior to the most recent DDCMP restart will be received after that restart.
2. If packet n is received, packets 0..n-1 (counting from the most recent restart) have also been received
3. Packet boundaries are preserved (packet boundaries are significant)
4. If a transmit n completes, that means that packet was delivered to a buffer on the receiving node.
It turns out that only properties 1, 2, and 3 are required for DECnet Phase III and beyond; that's because the routing layer is a datagram service so the layers above can't draw any conclusions from transmits completing. It's possible that DECnet Phase II requires property 4; I'm not sure and I don't really know how to answer that question since I haven't seen copies of the Phase II specs online.
So... properties 1 and 2 could be obtained in the SIMH implementation by implementing a DDCMP restart (master clear and reinitialization) as a connection reset and re-connect. Then property 2 amounts to sending to the socket and holding pending anything that's not accepted, and on the receiving end reading from the socket when there is a buffer available to deliver the data into. That should be pretty easy to do.
Finally, in the DMC a buffer corresponds one to one with a DDCMP packet (its implementation of property 3). That's required -- all DECnet protocols are packet oriented and packet boundaries are meaningful. There are no byte stream protocols in DECnet -- TCP is the only protocol among all the networking protocols I know of that made that horrible design error. So it's not a matter of making a few diagnostics work as the comments in pdp11_dmc.c say; each transmit buffer is a single DDCMP packet, and must be delivered exactly to one receive buffer. If you transmit an oversized message, that's an error: the DMR manual on Bitsavers says that in such a case, you get a Control Out with bit 4 set in SEL6 ("message too long") and at that point the DMC has already halted (DDCMP is stopped).
paul
On 4 Jan 2013, at 20:10, hvlems at zonnet.nl wrote:
IIRC DECnet for Netware was a separately sold item of the Pathworks product suite. It was DECnet for pc's running Netware, as basic Pathworks was DECnet for PC-DOS and MS-DOS pc's or DECnet for the Macintosh.
It brought DECnet connectivity to PC's running Netware; it had support for 4 and 16 Mb/s tokenring adapters. Tokenring puts bits in a different order on the wire so AA-00 addresses became 55-00 addresses.
Hans
Ahhh. Did it support non-tokenring as well? Was it a loadable module a user could define manually as a binding on the NIC?
------Origineel bericht------
Van: Cory Smelosky
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: [HECnet] NetWare and DECnet
Verzonden: 5 januari 2013 01:49
Hi!
As I've already gotten a bunch of my NT systems on HECnet, I thought i'd try a new beast: old NetWare.
IIRC DECnet for Netware was a separately sold item of the Pathworks product suite. It was DECnet for pc's running Netware, as basic Pathworks was DECnet for PC-DOS and MS-DOS pc's or DECnet for the Macintosh.
It brought DECnet connectivity to PC's running Netware; it had support for 4 and 16 Mb/s tokenring adapters. Tokenring puts bits in a different order on the wire so AA-00 addresses became 55-00 addresses.
Hans
------Origineel bericht------
Van: Cory Smelosky
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: [HECnet] NetWare and DECnet
Verzonden: 5 januari 2013 01:49
Hi!
As I've already gotten a bunch of my NT systems on HECnet, I thought i'd try a new beast: old NetWare.
Al 04/01/13 18:02, En/na Mark Benson ha escrit:
On 4 Jan 2013, at 00:10, Jordi Guillaumes i Pons wrote:
Rasp-pi + simh + RSX + a little bit of electronics = nice light show ;)
http://ancientbits.blogspot.com.es/2013/01/let-there-be-blinkenlight.html
I need the details of this, I have wanted to do this for an age!
I have been searching the net for almost a year looking for nice looking switches and panel mount lights to build a proper front panel.
I
If you can publish the info it'd be great :D
Well, I'm not so ambitious :) I just want some blinking lights. Right now I have basically the "data" lights functionality. The "address" and the knobs are simh registers. I'm still working on it so I can peek at any register or address; I made that video with a very basic functionality (the LEDS are fixed on R0, since I know R0 is used for the idle loop light chasers...).
The electronics part is quite easy. The base is this arduino tutorial:
http://arduino.cc/en/Tutorial/ShiftOut
Replacing the arduino for a Rasp-pi is not hard to do. You need the wiringPi library:
https://projects.drogon.net/raspberry-pi/wiringpi/
Or you can use an Arduino instead of the Raspberry to control the LEDs (I'm working on that now).
As for the software, there are two things to do: first, to control the LEDs. That is easy. Then you have to interface it into simh, and that is a little bit more difficult, even more if you haven't touched the simh code before (that is my case). I wanted to do it so it would be easy to merge with the simh head, so I have not touched the pdp11_cpu.c code. I have created a "device" and I simulate a timeout on it, so I can update the lights. Adjusting the timeout period I can regulate the sampling rate. Perhaps there is a better way to do it, but at this moment I still don't know about it.
This is getting quite off-topic, so perhaps we should continue this conversation off-list. Anyway, I plan to upload the code to github as soon as it has the minimum presence so I don't get ashamed by it :-P
Regarding the switches and knobs (the "input" part of the console), sincerely I have no idea about how to do it :)
On Jan 2, 2013, at 4:33 PM, Jordi Guillaumes i Pons wrote:
Hello,
The upcoming SIMH version (4.0) comes with a virtual DMC11. It has been merged to the head branch in the git repository, so I have been playing with it a little bit. The simh team has done an aswesome work again, so kudos for Bob, Mark and all the others... It seems the DMCx are supported in pdp10, pdp11 and the VAXen.
I grabbed the current code (from git) to try this on RSTS/E.
Some results:
1. The stock build does not work at all (on my Mac). It never gets a boot prompt. In fact, the simulator is utterly wedged: it doesn't respond to control/E or SIGTERM. I have to "kill -9" it to make it go away. GDB shows that it's sitting on some semaphore wait.
2. If I build with NOASYNCH=1, the pdp11 simulation works. Now on to the DMC emulation...
3. The first thing RSTS does to the DMC after resetting it is to set RUN and ROMI in SEL0, with a magic value in SEL6. What that does (according to the driver comments) is to put the DMC microcontroller in a state where it executes the opcode in SEL6 every clock tick. That instruction is a "move line status register to BSEL3". The RSTS/E driver uses this to test for DSR; it takes no further startup action until DSR has been set for 2 seconds. So I added code to pdp11_dmc.c to handle this magic (it simply sets the DSR bit unconditionally if it sees ROMI and the magic opcode value). With that, RSTS/E will complete the device startup.
4. Now I see a "circuit up" message from DECnet, but that is followed by some combination of "circuit down, listener timeout" and "circuit down, unexpected packet type". After staring at packet traces ("set dmc0 debug=data") for a while, the reason is obvious: when one side of the connection is started and the other is not yet started, one side sends a packet and the other side discards that. You can't do that. DDCMP is a connection oriented protocol: if you discard a packet that's a protocol violation, and DECnet will absolutely positively get bent out of shape because it assumes the DDCMP implementation will not do such a thing.
What has to be done is that a transmit remains pending if the other end is not able to receive it. That can happen because there is no connection, or because the other end hasn't turned its DMC on yet, or it's on but it currently doesn't have receive buffers. Similarly, master clear then RUN (DMC restart) needs to synchronize with the other end, to simulate the effect of the DDCMP initialization sequence.
I'll take a look at how hard this would be to fix. It'll probably take a fair amount of work...
paul