PDP-10 / its

Incompatible Timesharing System
Other
860 stars 83 forks source link

340 display support #644

Closed larsbrinkhoff closed 5 years ago

larsbrinkhoff commented 6 years ago

Notes for helping @philbudne adding 340 display support to the KA10 simulator, for use with ITS.

ITS applications that are checked and working:

larsbrinkhoff commented 6 years ago

Any SUDS experts around? I'm guessing I should start D, but how to load a file and view it?

I'll check the manual, but that seems to be a major project in itself.

larsbrinkhoff commented 6 years ago

I'm kind of giving up on SUDS, at least for now. Maybe @ams will take it from here.

larsbrinkhoff commented 6 years ago

Checking what FED does. It reads a font file, does some processing, and calls .DSTART. Then ITS promply crashes. It reliably ends up in TTYST2+4 which is 0, hence the BUGHALT. TTYST2 is a table with data, so ITS has no business jumping there.

Before the crash the font briefly flashes by on the display, so it seems like the display list should be ok. At least most of it.

larsbrinkhoff commented 6 years ago

FED:
ITS handles a 340 interupt and jumps to SRECYC. It goes through everything in the handler and returns through LPTBRK. Eventually we find ourselves at UEXIT, whish is trying to restore the PC to user mode value 310000,,001125. Proceeding from there, we get a crash. 1125 isn't the .DSTART in FED.

larsbrinkhoff commented 6 years ago

Here's the latest info on FED:
https://github.com/rcornwell/sims/issues/60

larsbrinkhoff commented 6 years ago

I assembled MAGDMP with support for 340, but when I tried to run it, it just hung. It didn't even print "MAGDMP".

larsbrinkhoff commented 6 years ago

Rich has merged the 340 CONI fix, so I'm preparing a pull request to update the KA10 simulator and ITS for using the display.

larsbrinkhoff commented 6 years ago

PEEK makes use of the light pen.

larsbrinkhoff commented 6 years ago

Loading a drawing in SUDS:

*:dec draw;d /meta
*^C I

I'll check how to have it displayed later.

larsbrinkhoff commented 6 years ago

AIM-240A says 11SIM can display three PDP-11 consoles and one simulator information view simultaneously on the 340.

TheFausap commented 6 years ago

Is it possible to use Emacs with 340 display ?

larsbrinkhoff commented 6 years ago

At this point, no. The 340 can display text, but it's not a text terminal and it doesn't have a keyboard. There could be a terminal emulator which displayed on the 340. And there was; one that emulated a Datapoint (#778). But we don't have any such program today. It probably wouldn't be too hard to make one though. Maybe a suitable project for a beginner MIDAS programmer?

TheFausap commented 6 years ago

Oh, I'd like to write some MIDAS code, but I don't know how to find the proper documentation about 340 and some introductory text about MIDAS (I tried to find something on bitsavers with no luck). :-)

larsbrinkhoff commented 6 years ago

If you really like to give it a try, we can provide you with all necessary documentation. ITS already comes with almost everything. Except for 340 programming, you won't need to go to Bitsavers. For starters, read these:

There are some more links to ITS documentation here: https://github.com/PDP-10/its/tree/master/doc

larsbrinkhoff commented 6 years ago

I'd like there to be a complete set of introductory .md files in the doc directory. If there's some basic operation you want to do and it's not covered there, let me know and I'll try to add it. Or point to the full documentation.

larsbrinkhoff commented 6 years ago

Tested 11SIM with 340 display. It works. Run :pdp45 and then at the ! prompt, type ;a ngdis.

Maybe Dazzle Dart will run in 11SIM.

larsbrinkhoff commented 6 years ago

Checked new programs:

larsbrinkhoff commented 6 years ago

Also tried to assemble 11LOGO to run in 11SIM with 340 display, but without success.

atsampson commented 6 years ago

A couple of mentions of early TECO on the 340.

Mark Crispin in news:Pine.OSX.4.64.0512181715300.9510@pangtzu.panda.com wrote:

The ultimate source of TOPS-10 TECO was the reimplementation of Dan Murphy's PDP-1 TECO on the PDP-6 at the MIT AI Lab; that is, a very early version of ITS TECO. That program most definitely had display support, and was always used on the 340(?) display. [...] It was a mystery to the original authors of TECO that anyone would ever consider TECO usable without a display.

Christopher Stacy in news:uk7fqcl67.fsf@dtpq.com wrote:

The people who ported TECO to the PDP-6 were the same (other) people who hacked on the PDP-1 version of TECO. The port was done over a weekend by Greenblatt, Nelson, and Holloway, but I don't think Murphy was there. Those are the same people who did things like add support for ASCII to TECO on the PDP-1, and who later, along with a bunch of others, added most of the features to TECO on the PDP-6. I think they are also the same hackers who brought you "340 Display Mode", evolving the program beyond its paper-tape origins into a visual editor. They are also the same people who were writing ITS.

larsbrinkhoff commented 6 years ago

As per #655, we should have a TECO with 340 support. I have examined it, but not done any tests.

larsbrinkhoff commented 6 years ago

Some progress towards timesharing 340 use. It turns out ITS is doing some clever tricks when it comes to handling the interrupts.

First, there's this interesting code to handle 340 data interrupts.

LOC PI0LOC+2*DISCHN                                                             
        JSR DIGNOR      ;340 DISPLAY BLKO GETS PATCHED IN HERE                  
        CONO PI,4000+200_<-SDCHN>       ;HACK HACK

As the comment says, the JSR DIGNOR will be replaced with a BLKO. The trick here is when the BLKO pointer runs out. In this case, the processor will execute the CONO instruction, which is a request for an interrupt on the special display interrupt channel SDCHN. Now, according to DEC manuals, an IO instruction here is disallowed.

Second, here's the code to handle the SDCHN interrupt. It's shared with the LPT device and some others.

LOC PI0LOC+2*LPTCHN
        JSR LPTBRK      ;LPT,DISPLAY,PTP,PTR,OTHER PROCESSOR
IFN 340P,       JSR DRECYC      ;HACK HACK

Note in particular the second instruction, JSR DRECYC. Normally, an interrupt on this channel would execute JSR LPTBRK and never return back to the second instruction.

It appears that a programmed interrupt request during a PI cycle is special. This isn't documented by DEC, and was most likely not intended to be used like this. What happens is that the CONO PI instruction is executed with PI OV active, and it remains active so JSR DRECYC is executed.

See how the comment ;HACK HACK marks both the start and the destination of this trick.

larsbrinkhoff commented 6 years ago

@philbudne wrote:

Is there a way to break into Exec DDT from T/S?

It's a bit late, but I finally have an answer for this.

If you toggle the console "Data Switch 0" to a 1, ITS will take notice and leave you in DDT. In the simulator, you do this with dep sw 400000000000. You can $P to restart ITS.

philbudne commented 6 years ago

Thanks!

I wonder if there was a way on MC (or did the KL-UDGE include switches as well as lights?)

larsbrinkhoff commented 6 years ago

The code for this is shortly below CKLTIC in ITS. The console switches are only checked on a KA10. For KL10, it does something with DTE20 so I guess that's on the 11/40 front end. For KS10, something is done with the front end SH command (or deposit to location 30).

larsbrinkhoff commented 5 years ago

@TheFausap wrote:

Is it possible to use Emacs with 340 display ?

Now it is, by using the program 340D. See #778. There is no keyboard input from the 340 window yet.

larsbrinkhoff commented 5 years ago

The older NTSDDT N77H works with the 340, see #794.

philbudne commented 5 years ago

neat!

larsbrinkhoff commented 5 years ago

The 340 works quite well now, so I think we can close this.

larsbrinkhoff commented 5 years ago

A 340 slave display, according to Greenblatt. 340slave Source: https://archive.org/details/AIfilms/80-cube.mp4

larsbrinkhoff commented 5 years ago

TECO 335 displays on the 340.

larsbrinkhoff commented 5 years ago

The binary file .; @ TECO also works on the 340. I learned you have to type ^D to enable the display.

It doesn't like lowercase characters.

larsbrinkhoff commented 5 years ago

From AI memo 238, "ITS Status Report", page 34:

The prime display facility on the ITS system is a DEC 340 display with extended character generator character set. This display is placed near a hardwired system teletype terminal and also drives two slave monitor displays, a DEC 343 and a Hewlett-Packard 1300A.