Hi Tony,
thanks for the thorough description. Youve multiplied my knowledge by a
factor of at least 10.
Sounds like I have a 2T2 with PNX.
This soft microcoding thing is amazing. Do I understand that you have been
writing new microcode?
The Raster Op machine sounds a lot like the blitter in Amiga. I think the
early PARC machines had something similar? But this must predate them both?
Cheers.
On Thu, 25 Oct 2001 10:41, Tony Duell wrote:
   Anyone out
there own an ICL Perq? 
 No, I don't have 'an' ICL PERQ. I've got 4 of them :-)
  Ive got one in storage, working last time I
looked. Seem to be
 interesting beasts, a small mini with a very early Unix (Release 3),
 bitmapped display, 'puck' pointing device and a primitive graphical
 interface. Possibly one of the first bitmapped display Unixes? 
 I belive that PNX (PERQ Unix) was the first Unix to have graphics
 operations in the kernel.
  Anyone have more info or history? 
 The first thing to do is to determine exactly what you have. There are 3
 different cabinet designs, and various internal variations :
 PERQ 1 : The easiest way to recognise this series is that it has an 8"
 floppy drive mounted horizonatally on the front. On the bottom of the
 keyboard there's the 3 digit DDS display which shows error codes, etc.
 Inside the box there's a Shugart SA4000-series 14" hard disk, either 12M
 or (more commonly) 24M. 3 main circuit boards -- CPU, Memory (often
 1Mbytes, although 2Mbytes is possible) (and video display), CIO (Just
 about all the input/output circuitry, including a Z80 for low speed I/O).
 2 option slots for the CPU option board (never produced AFAIK), and the
 Optional I/O card (Ethernet, PERQlink, Laser printer controller). The
 monitor is a VMI portrait unit
 There are 2 versions of this machine : PERQ 1, with 4K of writeable
 control store on the CPU board and PERQ 1a with 16K WCS and some extra
 microinstructions.
 PERQ 2 : This machine has an 8" floppy drive mounted vertically on the
 front, and has the DDS on the main box, next to the power switch. It uses
 the same CPU as the PERQ 1a. The memory boards are similar, but some are
 modified to drive a landscape monitor. The I/O board was redesigned, and
 now includes an ethernet interface and more memory on the Z80 I/O
 processor (which can now run user-downloaded programs). Same 2 option
 slots, and the same Optional I/O cards work in the PERQ 2s (yes, you can
 have 2 ethernet interfaces on the same machine).
 There are 3 known versions :
 PERQ 2 T1 : KME Portrait monitor (normally), 8" Micropolis hard disk
 mounted vertically at the back of the machine. Normally 1M RAM
 PERQ 2T2. Normally Moniterm Landscape monitor (although a PERQ systems
 Portrait monitor is claimed to ezist). 5.25" ST506-interfaced hard disk.
 2Mbyte machines are common.
 PERQ 2T4. VERY rare. It's similar to a PERQ 2T2 (5.25" drive), but the
 CPU is redeisgned to be a 24 bit unit. This allowed more memory to be
 fitted (up to 16M words == 32Mbytes), although only 4Mbyte machines are
 known. Changes to all 3 boards (CPU to make it 24 bit, memory to make it
 4M, EIO to make the DMA controller 24 bit). Same option cards, etc.
 PERQ 3a (AKA PERQ AGW330). This is an ICL design (nothing really to do
 with PERQ systems), and uses a 68020 CPU rather than the wonderful
 soft-microcoded board in the older PERQs. IMHO it's a PERQ in name only
 (which is why the 1's and 2's are called 'classic PERQs') although the
 graphics processor does allow user microcode (it's a pair of AMD29116s).
 Looks like a deep tower PC, with a vertically mounted 5.25" floppy drive
 on the front, and a 4 digit hexadecimal DDS display next to it.
 The CPU in the classic PERQ is interesting. Most of them are 20 bit CPUs
 (!) using 5 74S181 ALUs. The full 20 bits are used for calculating
 addresses, but as the memory is only 16 bits wide, for much of the time
 only 16 bits are used. There are 256 20-bit wide general purpose
 registers. The microcode is loaded from disk[1] when the machine is
 powered up, so the machine can run any reasonable instruction set.
 There's 4K or 16K of control store controlled by an 2910 sequencer,
 possibly extended by 2 bits (for the 16K models) -- the '2 bit kludge' :-)
 [1] Yes, OK, it can also load from the PERQlink 16 bit parallel interface.
 16K models also have a few extra featurs, including an 'index' register
 to select one of the 256 general-purpose registers (this is the only CPU
 I've programmed where you can do a trick like that at the microcode
 level), MULSTEP and DIVSTEP logic (to speed up multiplication and
 division), and so on.
 There is also a graphics processor, used to update screen bitmaps. This is
 part of the main CPU, and uses the latter to address words of said
 bitmaps in main memory. The actually graphics processor hardware combines
 2 words (one from the source bitmap, one from the destination), taking
 account of the fact that the boundary of the region to be updated may not
 be a word boundary, and that the 2 bitmaps need not be bit-aligned.
 Oh, what the heck...
 Title : Raster Operations
 Original : Clementine
 Group : Traditional (?)
 Introduction: One of the best kept mysteries of the PERQ workstation CPU
 board is the operation of the 'Raster Op' machine - a circuit designed to
 combine two bitmaps and produce a result - obviously a useful function on a
 window-driven machine. Anyway, the following compuer filksong should at
 least partly remedy that. It's a virtually 100% accurate description of the
 graphics pipeline circuits and how the 2 bitmaps flow through them
 Song:
 In the wierd  PERQ CPU board
 Released in seventy-nine
 Live some digital logic circuits
 Graphics bitmaps to combine
 Chorus:
   Raster Ops Now! Raster Ops Now!
   Through the shift and to combine
   Watch the screen image updating
   Through the raster op pipeline
 The fifo is loaded straight from memory.
 That's the first stage of our line.
 Clocked in by the controlling logic
 Quadwords loaded all the time.
 Source data flows out of the fifo
 To the shifter which shall align
 The edges of updated regions
 To make them easy to combine.
 But each word of the destination
 With 2 source words may combine
 So the last word out of the fifo
 is latched in the semi-pipeline
 Take thirty-one bits of the source words
 From the last stage of the line
 The shifter shall select just sixteen
 To feed on and thus combine
 The destination words from memory
 Through a single stage pipeline
 That's all that's needed before they enter
 Proms and thus with source combine
 The Proms take source and destination
 A new bitmap to combine
 Edges of the updated region
 The mask word shall now define
 There is one more D-type register
 The last stage of our pipeline
 To send the data back to memory
 Two clocks later - just in time (oooops Tine :-))
 The source and destination bit fields
 The shift value shall define
 Subtracted by a control PROM
 Thus the 2 bitmaps align
 The width of the updated region
 With the dest we now combine
 This determines the edge positions
 And the mask we can devine
 A pair of small finite state machines
 Shall ensure this runs to time
 Control signals thus generating
 For the raster op pipeline
 As regards software, there are 3 common OSes :
 POS, which was the first (PERQ or Pascal OS). It's single-user, and uses
 a much modified Pascal as the system language. The POS microcode
 implements a modified P-code instruction set (with graphics operations,
 etc).
 PNX is PERQ Unix. Loosely System 3 IIRC. It has some kind of windowing
 system.
 Accent is a predecessor of Mach (and comes from CMU IIRC). Multitasking,
 and supposed to be quite reasonable to use.
 BUT, I use POS most of the time. Reason : It doesn't get in the way if I
 want to modify the microcode (something which can only be done at the
 'bare metal' level). Since that's one of the main reasons for using a
 PERQ (if I want a unix box I've got plenty of others), I stick to POS.
 -tony 
 
--
Mike McCauley                               mikem(a)open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   
http://www.open.com.au
Phone +61 3 9598-0985                       Fax   +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc
on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X