From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr335433pbc.2.1327548078277; Wed, 25 Jan 2012 19:21:18 -0800 (PST) Path: lh20ni224641pbb.0!nntp.google.com!news2.google.com!news1.google.com!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Wed, 25 Jan 2012 22:21:10 -0500 From: "Jerome H. Fine" Organization: Just Sufficient User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT References: <4f12e49d$0$295$14726298@news.sunsite.dk> In-Reply-To: Message-ID: <4f20c6ac$0$285$14726298@news.sunsite.dk> NNTP-Posting-Host: 206.248.171.217 X-Trace: news.sunsite.dk DXC=W9R^hmQ;mZ8@g6i]76MRQ6YSB=nbEKnk;^Bn]WibRO6?PPfk^U[HX;?N1>V8bAJTI>3eOPKWXlde4Qa4_jgFW[9?^;[fN_L9UB>?DnJl7^Pb6? X-Complaints-To: staff@sunsite.dk Content-Type: multipart/alternative; boundary="------------030309080201040505070408" This is a multi-part message in MIME format. --------------030309080201040505070408 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit >Johnny Billquist wrote: > I'm not entirely sure what your question is, Jerome... > But I'll make some comments anyway. Very much appreciated. I was away for a week. I am catching up now. > On 2012-01-15 15:37, Jerome H. Fine wrote: > >> I have an interesting hardware question. >> >> I have been looking at the results for the program RESORC.SAV in RT-11 >> with respect the MFPT instruction. When the J11 chip is used, the value >> is 5 and the Maintenance Register at 177750 seems to determine what the >> rest of the actual hardware supports. > > Correct. > >> I thought it would also be helpful for the user to know if an >> emulator is being >> used, either software or hardware, or if perhaps some other 3rd party >> hardware >> CPU. I would probably target the various 3rd party boards as far as >> hardware >> is concerned (such as QED and Mentec). For software emulators, I would >> suggest that only the high end PDP-11 processors be supported (the DEC >> CPUs which support the MFPT instruction) in order to keep things simple, >> at least initially. > > If an emulator wants to truly emulate a specific CPU, then you cannot > just go and change the behavior of the emulator, since you will break > the basic idea behind it. > As far as different implementations goes, what is the difference > between an emulator and a "real" CPU? Both are running code to > implement the PDP-11 architecture. It's just that if the emulator is > running on an x86 (for example), the microcode happens to be identical > to x86 assembler, whilst the J11 (for example) have a microcode CPU > which we don't know much about, but it still executes the microcode > instructions... I actually agree with you. The only reason that I mention the MFPT instruction is that RT-11 ignores the high order byte and I thought that I would ask if RSX-11 also ignores the high order byte, along perhaps with RSTS/E. >> An incomplete list of software emulators is: >> SIMH >> Ersatz-11 >> >> An incomplete list of hardware boards is: >> QED - more than 1? >> Mentec - at least 3 >> and I can remember at least 2 others, but not the company names. > > You have Strobe Data, which I'm sure you'll remember now that I > mention them. Yes. I seem to remember they were first. Do you classify them as a hardware or software emulator? If my hazy memory is correct, Strobe Data initially used the J11 chip on a board that plugged into an ISA slot on a DOS machine. Later, the J11 chips were very difficult to obtain, so Strobe Data managed to do something else. When I first saw the emulation actually running RT-11, I was very surprised. Does anyone know how many boards and the names that QED and Mentec produced. Also, does the name Nissho ring a bell? I think they were a Unibus hardware emulator or were they just high speed memory? >> Right now the Logical Co. has a combined emulator called a >> PDQ-1000 board which actually plugs into a Qbus which takes >> only 4 slots, but includes CPU, memory and many controllers. > > Yes... And...? The reason that I specifically mention the PDQ-1000 is that while it seems like a hardware emulator (since the final result is a Qbus board), inside the hardware is actually a software emulator. >> Thus far, the high order byte of the MFPT instruction always seems >> to be zero and is currently ignored by the RESORC.SAV program. >> Under SIMH and Ersatz-11, it would be trivial to use the high order >> byte of the MFPT instruction to signify which software emulator is >> being used. > > Right, except then they wouldn't truthfully emulate a J11. > > And basing your design on how one application in RT-11 works seems > like an extremely bad idea. I had my doubts as well, so I do agree with you. But if no one else uses the high order byte of MFPT, then it might be possible to set a standard. >> Can anyone who has a DEC (or non-DEC) PDP-11 system easily >> available determine the actual value returned by the MFPT instruction? >> As far as I know: >> >> MFPT Value Hardware >> 1 PDP-11/44 >> 3 PDP-11/24 (should be 2) >> 3 PDP-11/23 >> 4 SBC-11/21 >> 5 All J11 chips including 11/73, 11/83, 11/93 > > That is all the values that MFPT can return. (Or rather - all the > values that were returned by any CPUs designed by DEC.) Understood. It would have been "nice" if DEC had supported a more open concept, but since probably at least 50% (maybe over 90%) of the emulators in use are SIMH and Ersatz-11, it is probably not all that important any more. >> I assume that it would be extremely difficult, probably not worth the >> effort, to modify the high order byte of the MFPT instruction at this >> point for the 3rd party PDP-11 CPU boards, such as from Mentec. > > Some Mentec boards use a J11. You can guess what they return. For the > other boards, they also seem to pretend to be J11 CPUs, which is a bit > sad, but that can't be helped. And of course, the result is that they reported a particular DEC CPU as being used. What were the names of all of the Mentec boards and their primary difference from each other? >> Can anyone comment on this assumption? Might there be another >> way for hardware to the tell a user which 3rd party board is being >> used as a PDP-11? > > Please differ between which *board* is being used, as opposed to which > CPU. MFPT will only tell you which CPU is used, not which board. Yes, you are correct. Even DEC used the J11 chip on many different boards. I have the impression that it would no longer be either useful or reasonable to attempt to identify any Mentec or QED boards at this point. >> The other possibility is to use the Maintenance Register at 177750, >> although I suspect that there might not be any more bit available. > > That register is specifically designed to tell you which board you > have, as opposed to MFPT, which tells which CPU. > And yes, there are bits left. > In the mainenance register, you have 4 bits allocated to system type. > (Note, not CPU type, system type.) > 0 - 11/73 > 1 - J11-A (M11, N11) > 2 - KDJ11-B (11/73, 11/83) > 3 - KXJ11 (11/73) > 4 - 11/53 > 5 - 11/93 > > This I collected from the system identification code in RSX. The 0 is > not explicitly stated to be an 11/73, rather, the code checks for the > values 1-5, and if none of those, it assumes it is an 11/73. I very > much doubt any DEC boards ever used any codes above 5, although you > can have up to 15. > > The CPU identification code in RSX is very useful to read on how to > identify what kind of system it is. > > Essentially, it goes like this: > 1) Check if the SYSID registers exist > 1.1) If yes, this is an 11/70 or 11/74. > 1.2) Check if high bit of PDR is usable. > 1.3) If yes, this is an 11/74. If no, this is an 11/70 > 2) Try MFPT > 2.1) If it worked, we have a basic idea of system > 2.2) 1 - 11/44 > 2.3) 3 - Possibly 11/23B or 11/24 > 2.3.1) Read maintenance register > 2.3.2.1) If that succeded - check if bits 4-7 > 2.3.2.2) If 4-7 = 0 it is an XT system. Treat as unknown system. > 2.3.3) Try writing to SWR > 2.3.3.1) If that fails - system is an 11/23B > 2.3.3.2) If that succeeds - system is an 11/24 > 2.4) 5 - J11 Based machine > 2.4.1) Read maintenance register, look at bits 4-7 > 2.4.1.1) If that fails - unknown machine > 2.4.1.2) 4 - 11/53 > 2.4.1.3) 3 - KXJ11 based 11/73 > 2.4.1.4) 1 - Real J11-A? > 2.4.1.4.1) Check if writing to kernel PDR7 change state of W bit of > register to written. > 2.4.1.4.1.1) If yes, we have an M11 > 2.4.1.4.2) Try MED instruction > 2.4.1.4.2.1) If it works, we have an N11 > 2.4.1.4.3) Unknown type of CPU > 2.4.1.5) 2 - KDJ11-B type. (11/83, 11/84) > 2.4.1.6) 5 - KDJ11-E-type. (11/93, 11/94) (Codenamed Thunderbird > apparently) > 2.4.1.7) All others are called 11/73 (But the code will actually store > model as 11/9x) > 3) If MFPT fails, M+ states that system must be 11/60, 11/34, 11/45, > LSI-11, 11/04, 11/05, 11/10, 11/15, 11/20 or 11/40. > 3.1) Check 11/60 MED instruction > 3.1.1) If that works, it is an 11/60 > 3.2) Check 11/34 MFPS instruction > 3.2.1) If that works, it is an 11/34 > 3.3) Check 11/45 PIRQ register > 3.3.1) If that exist, it is an 11/45 > 3.4) Of the rest, RSX-11M-PLUS only works on the 11/40 > > Also, for the machines which both have Qbus and Unibus variants, the > code then goes on to check if the machine have a Unibus map, and if > so, changes it to the Unibus version of the CPU. > > All with the reservation that I might have missed something, written > something down wrong in my transcribing the code into the rules above, > and that this is obviously not enough to actually implement it, since > the details for some of these steps are rather intricate in actual > execution. > > Anyway. If you have something that intends to implement a J11, it > should do the same thing a J11 does, which means MFPT should return 5. > Anything else is bad. > The maintenance register is a possible place to put something else in, > if you just want to identify your actual system differently, but once > more, if you really want to emulate an existing system, you cannot > touch that register either. > > If you want some "foolproof" way of detecting that you are inside an > emulated machine, I'd say that adding a new instruction from the > unused opcodes is probably a better idea. I wouldn't expect anything > to actually try using an undefined opcode anyway, so no existing code > should be hurt by it. And your "new" code will also work on real > machines, in that you will instead get a trap if you try that instruction. Your suggestion to use an instruction code which is presently illegal is actually almost trivial in Ersatz-11. John Wilson explicitly supports adding code for new instructions. Well, I guess it is not exactly trivial, but I could probably write and test the code for the required DLL in less than a week. I imagine the same would apply to SIMH. it would be useful if there could be an agreement on a standard!!!!!!!!!!!!! Other emulators or 3rd party hardware implementations which are no longer supported by their original manufacturers would be much more difficult, if not impossible, at this point. What about RUST? Could that support a new instruction as well? Jerome Fine --------------030309080201040505070408 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit >Johnny Billquist wrote:
I'm not entirely sure what your question is, Jerome...
But I'll make some comments anyway.
Very much appreciated.  I was away for a week.  I am catching up now.
On 2012-01-15 15:37, Jerome H. Fine wrote:
I have an interesting hardware question.

I have been looking at the results for the program RESORC.SAV in RT-11
with respect the MFPT instruction. When the J11 chip is used, the value
is 5 and the Maintenance Register at 177750 seems to determine what the
rest of the actual hardware supports.
Correct.
I thought it would also be helpful for the user to know if an emulator is being
used, either software or hardware, or if perhaps some other 3rd party hardware
CPU. I would probably target the various 3rd party boards as far as hardware
is concerned (such as QED and Mentec). For software emulators, I would
suggest that only the high end PDP-11 processors be supported (the DEC
CPUs which support the MFPT instruction) in order to keep things simple,
at least initially.
If an emulator wants to truly emulate a specific CPU, then you cannot just go and change the behavior of the emulator, since you will break the basic idea behind it.
As far as different implementations goes, what is the difference between an emulator and a "real" CPU? Both are running code to implement the PDP-11 architecture. It's just that if the emulator is running on an x86 (for example), the microcode happens to be identical to x86 assembler, whilst the J11 (for example) have a microcode CPU which we don't know much about, but it still executes the microcode instructions...
I actually agree with you.  The only reason that I mention the
MFPT instruction is that RT-11 ignores the high order byte
and I thought that I would ask if RSX-11 also ignores the
high order byte, along perhaps with RSTS/E.
An incomplete list of software emulators is:
SIMH
Ersatz-11

An incomplete list of hardware boards is:
QED - more than 1?
Mentec - at least 3
and I can remember at least 2 others, but not the company names.
You have Strobe Data, which I'm sure you'll remember now that I mention them.
Yes.  I seem to remember they were first.  Do you classify them as
a hardware or software emulator?  If my hazy memory is correct,
Strobe Data initially used the J11 chip on a board that plugged
into an ISA slot on a DOS machine.  Later, the J11 chips were
very difficult to obtain, so Strobe Data managed to do something
else.

When I first saw the emulation actually running RT-11, I was very
surprised.

Does anyone know how many boards and the names that
QED and Mentec produced.  Also, does the name Nissho
ring a bell?  I think they were a Unibus hardware emulator
or were they just high speed memory?
Right now the Logical Co. has a combined emulator called a
PDQ-1000 board which actually plugs into a Qbus which takes
only 4 slots, but includes CPU, memory and many controllers.
Yes... And...?
The reason that I specifically mention the PDQ-1000 is that while
it seems like a hardware emulator (since the final result is a Qbus
board), inside the hardware is actually a software emulator.
Thus far, the high order byte of the MFPT instruction always seems
to be zero and is currently ignored by the RESORC.SAV program.
Under SIMH and Ersatz-11, it would be trivial to use the high order
byte of the MFPT instruction to signify which software emulator is
being used.
Right, except then they wouldn't truthfully emulate a J11.

And basing your design on how one application in RT-11 works seems like an extremely bad idea.
I had my doubts as well, so I do agree with you.  But if no one else
uses the high order byte of MFPT, then it might be possible to
set a standard.
Can anyone who has a DEC (or non-DEC) PDP-11 system easily
available determine the actual value returned by the MFPT instruction?
As far as I know:

MFPT Value Hardware
1 PDP-11/44
3 PDP-11/24 (should be 2)
3 PDP-11/23
4 SBC-11/21
5 All J11 chips including 11/73, 11/83, 11/93
That is all the values that MFPT can return. (Or rather - all the values that were returned by any CPUs designed by DEC.)
Understood.  It would have been "nice" if DEC had supported
a more open concept, but since probably at least 50% (maybe
over 90%) of the emulators in use are SIMH and Ersatz-11,
it is probably not all that important any more.
I assume that it would be extremely difficult, probably not worth the
effort, to modify the high order byte of the MFPT instruction at this
point for the 3rd party PDP-11 CPU boards, such as from Mentec.
Some Mentec boards use a J11. You can guess what they return. For the other boards, they also seem to pretend to be J11 CPUs, which is a bit sad, but that can't be helped.
And of course, the result is that they reported a particular DEC
CPU as being used.  What were the names of all of the Mentec
boards and their primary difference from each other?
Can anyone comment on this assumption? Might there be another
way for hardware to the tell a user which 3rd party board is being
used as a PDP-11?
Please differ between which *board* is being used, as opposed to which CPU. MFPT will only tell you which CPU is used, not which board.
Yes, you are correct.  Even DEC used the J11 chip
on many different boards.

I have the impression that it would no longer be either
useful or reasonable to attempt to identify any Mentec
or QED boards at this point.
The other possibility is to use the Maintenance Register at 177750,
although I suspect that there might not be any more bit available.
That register is specifically designed to tell you which board you have, as opposed to MFPT, which tells which CPU.
And yes, there are bits left.
In the mainenance register, you have 4 bits allocated to system type.
(Note, not CPU type, system type.)
0 - 11/73
1 - J11-A (M11, N11)
2 - KDJ11-B (11/73, 11/83)
3 - KXJ11 (11/73)
4 - 11/53
5 - 11/93

This I collected from the system identification code in RSX. The 0 is not explicitly stated to be an 11/73, rather, the code checks for the values 1-5, and if none of those, it assumes it is an 11/73. I very much doubt any DEC boards ever used any codes above 5, although you can have up to 15.

The CPU identification code in RSX is very useful to read on how to identify what kind of system it is.

Essentially, it goes like this:
1) Check if the SYSID registers exist
1.1) If yes, this is an 11/70 or 11/74.
1.2) Check if high bit of PDR is usable.
1.3) If yes, this is an 11/74. If no, this is an 11/70
2) Try MFPT
2.1) If it worked, we have a basic idea of system
2.2) 1 - 11/44
2.3) 3 - Possibly 11/23B or 11/24
2.3.1) Read maintenance register
2.3.2.1) If that succeded - check if bits 4-7
2.3.2.2) If 4-7 = 0 it is an XT system. Treat as unknown system.
2.3.3) Try writing to SWR
2.3.3.1) If that fails - system is an 11/23B
2.3.3.2) If that succeeds - system is an 11/24
2.4) 5 - J11 Based machine
2.4.1) Read maintenance register, look at bits 4-7
2.4.1.1) If that fails - unknown machine
2.4.1.2) 4 - 11/53
2.4.1.3) 3 - KXJ11 based 11/73
2.4.1.4) 1 - Real J11-A?
2.4.1.4.1) Check if writing to kernel PDR7 change state of W bit of register to written.
2.4.1.4.1.1) If yes, we have an M11
2.4.1.4.2) Try MED instruction
2.4.1.4.2.1) If it works, we have an N11
2.4.1.4.3) Unknown type of CPU
2.4.1.5) 2 - KDJ11-B type. (11/83, 11/84)
2.4.1.6) 5 - KDJ11-E-type. (11/93, 11/94) (Codenamed Thunderbird apparently)
2.4.1.7) All others are called 11/73 (But the code will actually store model as 11/9x)
3) If MFPT fails, M+ states that system must be 11/60, 11/34, 11/45, LSI-11, 11/04, 11/05, 11/10, 11/15, 11/20 or 11/40.
3.1) Check 11/60 MED instruction
3.1.1) If that works, it is an 11/60
3.2) Check 11/34 MFPS instruction
3.2.1) If that works, it is an 11/34
3.3) Check 11/45 PIRQ register
3.3.1) If that exist, it is an 11/45
3.4) Of the rest, RSX-11M-PLUS only works on the 11/40

Also, for the machines which both have Qbus and Unibus variants, the code then goes on to check if the machine have a Unibus map, and if so, changes it to the Unibus version of the CPU.

All with the reservation that I might have missed something, written something down wrong in my transcribing the code into the rules above, and that this is obviously not enough to actually implement it, since the details for some of these steps are rather intricate in actual execution.

Anyway. If you have something that intends to implement a J11, it should do the same thing a J11 does, which means MFPT should return 5. Anything else is bad.
The maintenance register is a possible place to put something else in, if you just want to identify your actual system differently, but once more, if you really want to emulate an existing system, you cannot touch that register either.

If you want some "foolproof" way of detecting that you are inside an emulated machine, I'd say that adding a new instruction from the unused opcodes is probably a better idea. I wouldn't expect anything to actually try using an undefined opcode anyway, so no existing code should be hurt by it. And your "new" code will also work on real machines, in that you will instead get a trap if you try that instruction.
Your suggestion to use an instruction code which is presently
illegal is actually almost trivial in Ersatz-11.  John Wilson explicitly
supports adding code for new instructions.  Well, I guess it
is not exactly trivial, but I could probably write and test the
code for the required DLL in less than a week.

I imagine the same would apply to SIMH.  it would be useful
if there could be an agreement on a standard!!!!!!!!!!!!!

Other emulators or 3rd party hardware implementations which
are no longer supported by their original manufacturers would be
much more difficult, if not impossible, at this point.

What about RUST?  Could that support a new instruction as well?

Jerome Fine
--------------030309080201040505070408--