Programmer's Guide toOrbit, the ROS Adapter, and the Dover Printerby Bob Sproullrevised by Dan SwinehartApril 14, 1978This report presents the Orbit, ROS adapter and Dover printer hardware from theprogrammer's point of view. It is intended to contain "all you need to know" to writeprinting programs using the gear. In addition to information about control of the hardware,it gives various techniques and tricks that were either planned or discovered. This document is for Xerox internal use onlyThis document is for Xerox internal use onlyXEROXPALO ALTO RESEARCH CENTER3333 Coyote Hill Road / Palo Alto / California 94304 Vp T- Qqr P K`q 9Ls#, 7D 5!; 4TN .t&r,&h,)W u)` r)` xq4p >Rh.]Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer1IntroductionThe hardware described in this report is intended for printing pages consisting primarily oftext and lines on raster-scanned printing devices. There are two main tasks that thiscollection of hardware performs: (1) image generation, in which a binary representation of avideo signal is prepared at high speed, and (2) transmission of that video signal to a rasteroutput scanner (ROS).Although the hardware can be adapted for other uses, the report takes the view that thefollowing configuration is being used:Alto II. We begin with an Alto II computer, with which the reader is assumed to befamiliar (see the "Alto Hardware Manual"). We add:Orbit, a four-card hardware device that plugs into the Alto II. The Alto II requires aspecially-wired backpanel to accommodate the Orbit cards (some Alto II's aremanufactured with this backpanel already arranged). Orbit provides facilities forimage generation: the resulting raster image can be returned to the Alto memory orcan be forwarded via a "9-wire standard ROS interface" to:TTL ROS adapter, a two-board hardware module responsible for orderly communicationamong the Orbit, ROS optics head and printing engine. This is usually mounted in,and connected to:The Dover printer, a Xerox 7000 copier with a specially-designed laser-scannedimaging head on it. Properly controlled, this engine delivers 1 page/second (paperspeed is 10 inches per second). A modification is possible (the "extended Doverprinter") that slows the transport speed to 5 inches/second and page delivery to 1page/2 seconds.There are numerous variations on this basic arrangement. Because the Alto II/Orbit paircommunicates with the adapter using a standard interface, it is capable of operating withother adapters and printing engines that conform to the standard. Also, the TTL ROS adaptercan be used to control other printing engines. For example, a common alternative is:The Sequoia printer, a Xerox 3100 copier with a ROS head on it. It delivers 1 page/3seconds (paper speed is 3.46 inches/second).The basic idea of the entire arrangement is that a program in the Alto II can operate all thesedevices to cause pages to emerge from a printer. The remainder of this document will by andlarge assume that we are operating the standard Dover printer (10 inches/second). The basicideas will remain the same when operating other printers, but many of the timing details willchange.For the purposes of discussion, we will assume that the printer scans the page in landscapemode (mode=8, in the Press terminology). Scan-lines run from bottom to top of the page(when the page is held in the normal portrait orientation); the first scan-line is at the left-hand side of the page. Orbit does not "know" that the video signal it is generating will beused to scan in landscape or in portrait mode, but we need to stick to one convention for thepurposes of exposition.The Orbit, ROS adapter and Dover printer system is quite tightly integrated; consequently,explication of the system is somewhat difficult. The reader is urged to bear with us, to skipsections that become obscure, and to read the document several times before abandoning allhope! For a first reading, the following sections are recommended:Section 1, through 1.4fp!qpHE gbr g^p> g]mF g[$sp' gZc's p! gXqp gU$3 gT-&]QM]O|3]LPL ]J( $]IFC]GA]F<(qp]Cqpqp%&]Aqp>]@]<N];U@]90]8KD ]6 g38 g2< g00qp g/ Q]+(qp"]*Z, g'.J g%'4 g$$": g"E g! gQs gip9 g;$ g_F g:# gU g) qp*" g0. g)1 gC   g I?\gProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer2Section 2, through 2.4Section 3PeopleNumerous individuals and groups have contributed to the Dover program: the design andfabrication of Orbit, the ROS adapter and the Dover printer and ROS. This document is only acondensation of their designs and ideas. The overall Dover Program was managed by JohnEllenby. The Dover Printer was designed by Gary Starkweather, Gary Swager, Tibor Fisli, EdWakida and Bobby Nishimura with contributions on producibility from Abbey Silverstoneand on mechanical and industrial design from members of EOD/SPG and others on theprogram team. The ROS adapter was designed by Ron Rider, Ken Pier and Ron Freeman.Orbit grew out of a suggestion by Butler Lampson, and was designed by Severo Ornstein, JimLeung and Bob Sproull. The standard microcode and test software were devised by BobSproull. In the closing months of the program, Gary Swager played a key role in coordinatingthe system integration of the Dover printer electronics, electro-optics, and the 7000 base.Dover ROS equipment is manufactured under the direction of Tibor Fisli and the DoverSystem is manufactured and integrated by SPG under the direction of Doug Stewart who alsosupervised the design and engineering contributions of SPG. Bob Sproull and Dan Swinehartproduced the Spruce software that provides printing service using Orbit devices.Numerous organizations cooperated very effectively on the Dover project. The peoplementioned above came from PARC/CSL, PARC/OSL, PARC/SSL, SDD/SD, and EOD/SPG. Theproject was feasible in part because flexible funding was provided by the PARC Office of theCenter Director.fp!qpHEb` g[s gXp3" gW7qpqp gUC gT-R gRC gQ#'qp gOqp= gN1) gLP gKM gIU gHqp7 gF(qp- gD6qp gCvP g@J2" g>q&pqp g=@9qp g; g;t@,Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer31. OrbitOrbit's main chore is that of image generation: it is designed to merge rasters at very highspeed. Normally, Orbit merges raster definitions of individual character shapes into a verylarge raster that describes an entire page of text.By a raster we mean a rectangular region of a raster-scanned image, in this case an array of1-bit values. A raster is characterized by its width and height (see Figure 1-1). Althoughthere are many ways that the data bits within a raster might be represented, we shall beinterested in only the simplest: we record a stream of bits, generated by scanning the raster ina prescribed (conventional) manner. We shall assume that rasters are scanned from bottom totop, and then from left to right. Figure 1-1 shows a tiny raster, the bit stream that resultsfrom scanning it, and the blocking of that bit stream into 16-bit words suitable for recordingin Alto memory.If we were to generate a raster representation of an entire page, and save it in memory, wewould be overwhelmed by its size. A page 8.5 by 11 inches scanned at 350 bits/inch requires11.5 * 106 bits, or some 710,000 words of Alto memory! Therefore, we are forced to generatethe page raster incrementally, using smaller buffers. If we wish to avoid a full-page buffer,we must of course generate the scan-lines of the raster in the same order as the ROS deviceaccepts them.The unit of buffering in Orbit is the band, a group of 16 consecutive scan-lines. We willwant to generate band images in the same order that the ROS accepts the scan-lines thatcomprise the bands. In the case of Dover, which scans in landscape mode, we will generatefirst the band corresponding to the left-most 16 scan-lines on the page, then the next band tothe right, etc. Orbit's task is to prepare the raster describing each band faster than the ROSyanks band rasters away in order to print them!Orbit contains two buffers, each of which holds one band; the buffers are labeled A and B.While one buffer is being used to prepare an image (the image buffer), the other, whichcontains an already-prepared image, is being sent to the ROS (the output buffer). After theROS is finished accepting the band raster, the roles of the two buffers are switched. Eachbuffer contains 16 scan-lines; each scan-line is 4096 bits long (see Figure 1-2). We can thusthink of a band buffer as a two-dimensional array of bits, in which the x dimension (0through 15) indexes scan-lines, and the y dimension (0 through 4095) indexes bits within ascan-line. If the total height of the raster on the page is less than 4096 bits, the upper regionof the band should be used (that is, the region with larger y addresses). The reason for thiswill appear below.1.1 Image generationOrbit excels at merging rasters represented as bit streams in the Alto memory into the imageband buffer. Figure 1-3 illustrates one case: a character is represented by a raster in memory,characterized by its height and width. It is to be merged into the band by placing its lowerleft corner at location (x,y) in the band. This is effected as follows:1. Alto microcode passes to the Orbit hardware the four parameters x, y, height andwidth.2. Alto microcode starts passing to Orbit the successive 16-bit words representing thebit stream for the source raster. Orbit takes each word, positions it on the properscan-line, and at the proper vertical position, and merges the 16 bits into the rasteralready saved in the band. Each time Orbit finishes work on a scan-line, it incrementsthe x position to move to a new scan-line, and decrements a width counter that countsremaining scan-lines in the source raster. fp!qpHE(Aat g^psps p g]&U g[3 gXusp; gVspsp gUk@ gS-s p gRa#9 gP!= gOWG gM gJC gI!)3 gGVGqGVpR gEs p/ gDL3qp gB g?&sp $ g>3qp g<Z g; -1 g9Wq g8p/ g4sp7 g3Q)sp g1&qpsp g0Gqp> g.@ g-== sp g+(sp ' g*3-)s g(p sp! g') g#s g p@s gLpH gspsp gBsp,] g$ qp- g_ gN g W gHs g p%) g {!| g 4@ZProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer51.2 Reading a bufferWhile the image band buffer is being prepared with an image, the output band is being readout, either to the ROS adapter or back into Alto memory. The read-out mechanisms aresimilar, and require some explication. The basic read-out operation cycles through all 16scan-lines (x=0 to 15), and delivers information from each scan-line beginning with y=FA*16,and ending with y=4095 (FA, which denotes "first address," is a number in the range 0 to 255that can be set by the Alto). After the last bit (4095) of the last scan-line (x=15) has beenread out, Orbit will "switch the buffers" (i.e., interchange the role of buffer A and buffer B).The next bit to be read out will come from the other buffer.The FA mechanism has a minor effect on the way images should be generated. If the receiverof the video (usually the printer) is instructed to place the first bit of each scan-line at thebottom of the page, the next slightly above it, and so forth, then the relation between verticalposition on the page (yp) and address of the bit in Orbit's buffer (y) is: y = yp + (FA*16).Consequently, the number (FA*16) must be added to each desired page position (yp, measuredin bits) to determine the proper y address to provide to Orbit. (Note: This addition can beeasily excluded from the inner loop by making modifications to y incrementally, spacingappropriately for each character encountered.) The act of reading a buffer also writes zeroes into it: this is an economical mechanism forclearing a buffer. The normal practice, therefore, is to read a buffer thoroughly simply inorder to clear it. After the buffer is read, a "buffer switch" happens, and the cleared bufferbecomes the image band buffer.The most common use of Orbit is to drive a ROS printer. In this case, FA is simply set so thatthe upper portion of the buffer which is used corresponds to the desired image height for theentire page. In order to clear both Orbit buffers initially, we arrange two dummy bands ofimage information that will lie off the actual page image (i.e., to the left of the page, onDover). Thus the first two buffers read, which may contain garbage left behind fromprevious operations and from lack of refreshing, will not be visible on the page. When usedto drive a ROS (which requires FA to be a multiple of 4 in order to communicate video datasucessfully to the ROS adapter), Orbit can deliver video data at a rate of 23 MBits/sec.The other common use of Orbit is to take advantage of its fast image-generating capability,but to return a completed band to the Alto memory. Details of this operation are given insection 1.8.1.3 Communicating with the ROS adapterOrbit also provides functions for controlling the ROS adapter and its associated printer. Twocompletely independent mechanisms are used for sending control information and for readingROS (and adapter) status. Orbit will accept 16-bit commands from the Alto and forward themto the adapter. It is also constantly reading the status line returning from the adapter, and iscapable of reporting 256 bits of status generated by the adapter.1.4 Orbit Programming -- the common casesThe next several sections of this guide describe the operation of Orbit undertaken with the"standard microcode," and then the regimen for writing microcode if you so desire. Thissection describes those elements of Orbit that must be understood to operate the hardwareusing either the standard microcode or specially-written code.The control of Orbit is accomplished with one Alto microtask (task 1, next to lowest priority),and an associated collection of microcode that executes within that task. Remember that theAlto must be "bootstrapped" after loading the microcode into the RAM in order to initiate task1's program counter to point to the proper RAM routine. (For more information aboutfp!qpHE gbs g^p sp1sp g]mqp* g[ N gZc sp7spqp gXspqpB gWYMsp gUQ gTO< gQ#qp K gOC gN` gLsp,spspspqp gKqp2sp gI!sp / gH-sp gF/ gCTI gA R g@JL g> sp g;+qpqp g:> g8< g7  sp9 g5O g4Q g2{ qpqp9 g0qp" g-> g,EQ g* g'sus g$hp-qp) g"N g!^qpB gQ gTA g(s) gp[ gwK gA gm> gA Q gC g 7Aqp g qp%J g k@\Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer6microcoding and bootstrapping, see the Alto Hardware Manual.)The record of activity of the Orbit task is quite complicated. The task is initially inactive: theAlto program must initiate Orbit activity by issuing StartIO(4), which signals the Orbithardware to activate its task. During the active period, the details of the microcode functionssent from the Alto to Orbit will govern exactly when the Orbit task is run. However, at thetermination of a sequence of commands the microcode usually instructs Orbit to return to theinitial, inactive, state. (This last is simply a convention; the "standard microcode" normallyuses this convention, but has an exception as well.)Standard microcodeThe remainder of this section describes simple use of 6 functions of the standard Orbitmicrocode. (The standard microcode includes many additional functions for debugging andfor more exotic uses of Orbit. These are taken up in subsequent sections.) The standardmicrocode was written to accomodate most Orbit chores, including normal printing tasks andhardware diagnosis. The microcode source files can be found on [IVY]SpruceMc.Dm.When the Orbit microcode is activated, it figures out what to do by reading a control table.To execute a command, a pointer to the control table (which must begin at an even address) isplaced in location 720b, and StartIO(4) is executed. When execution of the command iscomplete, the Orbit task stores 0 in location 720b, an event that can be detected by the Altoprogram. Note that during execution of an Orbit command, the Alto emulator programcontinues to run--the Orbit task and the main program are asynchronous. To allow Orbitmaximum access to the Alto microprocessor, it is advisable to curtail activities of othermicrotasks while printing is in progress. The display should certainly be turned off; stoppingdisk or Ethernet activity is less beneficial.The control table is 11 words long, and has conventional names for each word:DirectiveArgument1Argument2nBandsMinus1FAwordLoTableFontTableNewCharPointerResultOrbitStatusResultCurrentCopyThe Directive is a small integer that indexes the various operations that can be performed bythe microcode; each operation is given a name of the form Programxx. When a commandterminates, the control table entry OrbitStatusResult is loaded with the inclusive "or" of Orbithardware status (OrbitStatus, bits 8-15) and microcode status (FirmwareStatus, bits 0-4),described below. If an operation returns a result, it is usually stored in the Result entry of thecontrol table.ProgramControl (directive=0). Argument1 is passed to Orbit as a control word. In thesimple situation we are considering here, this function is used only to reset the Orbithardware entirely (Argument1=1).ProgramXY (directive=3) and ProgramInk (directive=7). In the simple situation we areconsidering, it is necessary to set the INK memory to contain all 1's so that all characterswill appear black on a white background. This can be achieved during initialization witha simple loop that uses ProgramXY to set x, and ProgramInk to set the 16 correspondingbits of the INK memory:fp!qpHE gb= g^#@ g]m@ g[B gZc> gXN gWY%: gU4 gRs gO|pA gM? gLr2' gJ@ gIh6q p gF<6s gDp Q gC2'/ gA$9 g@(= g>9 g=S g;6) g:- g6M3270/- -qp,#*) '&$ g!^spP g:rp gT#= gr p= gJ!B g r p27crpr p(qp1 YT rpspr p O qp g @^aProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer7for i=0 to 15 do beginExecute ProgramXY with Argument1=i * 4096 (i.e., i in leftmost 4 bits)Execute ProgramInk with Argument1=-1endProgramROSCommand (directive=9). This operation sends Argument1 (16 bits) to Orbit tobe forwarded to the adapter as a command. Adapter commands are discussed further insection 2.ProgramROSStatus (directive=14). This operation reads an entire word (16 bits) of ROSstatus. If we view the 256 status bits as lying in 16 16-bit words, numbered 0 to 15, thenthis function stores in Result the current value of status word n, where Argument1 = n *1024.ProgramGeneratePage (directive=12). This function is the only complicated one, and isresponsible for image-generation and printing of an entire page. The details are presentedbelow.The page-generation functionThe ProgramGeneratePage function is the main "workhorse," and contains the necessaryfacilities to keep a printer running at high speed. It depends on a data structure fordescribing the placement of characters on the page and for encoding the rasters that are to beprinted for each character (the font). Building this data structure will require a pass over theeach page before it is printed (more on this later). Figure 1-4 summarizes these datastructures, which are explained in the following paragraphs.Fonts. The microcode believes that there is only one font, but it may contain an enormousnumber of characters (up to 215 if you can figure out where to find memory for them!). Eachcharacter in the font is represented by a contiguous block of memory words, formated asfollows:Word 0:-Height (in bits) of the character. Heights of 1 to 4095 are legal.Word 1:Width-1 (in scan-lines). Widths of 1 to 4096 are legal.Word 2-n:Bit stream for the encoding of the character rasterWord 0 must lie on an even memory address. The sample character given in Figure 1-1would therefore be represented as:Word 0:-4Word 1:4Word 2:103126bWord 3:100000bTo verify that you understand this encoding, you should be able to compute n (answer:i(Height*Width)/16j+1).The font is indexed with a table: if the pointer to the base of the table is denoted byFontTableX, then the contents of memory location FontTableX+cc points to Word 0 of thecharacter representation for character with code cc.Band Lists. The most interesting piece of data structure is the band list, an encoding ofwhere instances of various characters should appear on the printed page. This list is dividedinto segments, one for each band. Each segment gives information about the characters thatbegin in the corresponding band; Orbit microcode will handle the details associated withcontinuing the characters into subsequent bands if necessary.fp!qpHEb`rp5_r p]Zcrvrp9 X;WY T-rvrpCqRp=Q#@spspOLrrp-JEIh gFQ g<@ g;w< g8Ksp9 g67 q6p$ g4= g3v10l<1.01-bsp0 g*X!3 g("1%1$D1"1!: g07sp gwpwp gD g0 sp gu1sp gIs psp gO g?5& gsp8 g 5= g ?[aProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer8A band list segment is a table of entries of one of four kinds:1. Character. A character to be placed on the page is described by a two-word entry:Word 0[0]This bit must be 1.Word 0[1-15]Character code. This number is used to index the font table to finda pointer to the character encoding for the character to be printed.Word 1[0-3]XOffset. This gives the scan-line, within the band, at which theleft-most edge of the character raster should appear.Word 1[4-15]Y. This entry gives the y address at which the bottom edge of thecharacter raster should appear.2. Rule. A rule to be placed on the page is described by a four-word entry:Word 0This word must equal 1.Word 1[0-3]XOffset. This gives the scan-line, within the band, at which the leftedge of the rule should appear.Word 1[4-15]Y. This entry gives the y address of the bottom edge of the rule.Word 2-Height. This entry gives the negative of the number of bits highthe rule should be. Heights of 1 to 4095 are legal.Word 3Width-1. This gives the width, in scan-lines, of the rule. Widths of1 to 4096 are legal.3. Jump. This entry provides a conditional method for obeying or ignoring selected band listentries, to implement the "only on copy" feature in Press format files (see further discussionsbelow.)Word 0This word must equal 4+(Copy*32), where Copy is the copy numberin which the following entries are to be printed. A jump will occur,omitting these entries, if Word 0 is not equal to the CurrentCopyfield in the control table. A version of this command must appear inevery band in which information conditioned on this copy numberoccurs. Copy must be a positive integer less than 1024.Word 1Jump distance. This must be equal to the size, in words, of theentries to be omitted when the inequality holds.4. End-of-Band. After the last entry for the band, a two-word terminator is placed. Bothwords should be 0.A complete band list, consisting of a contiguous sequence of band list segments (one for eachband), describes an entire page. In the discussion below, we shall assume that the band list fora page is pointed to by the pointer BandListPointer; the band list must begin at an evenaddress.In most cases, constructing the band list from a document description will require an initialpass over the document description. One of the functions of this pass will be to map fontdescriptions and character codes into the one-dimensional font representation used in thestructures above (i.e., a single 15-bit character code). Another function of this pass is toperform a sort: it will be necessary to process characters as they are extracted from adocument description, determine the x and y positions of the lower left corner of thecharacter raster by consulting a font description, and build a 2-word character entry. Theseentries will then need to be sorted by band number (a bucket sort is particularly reasonablefor this task) in order to re-assemble the character entries into band list segments.Left Over Table. The Orbit microcode will normally need access to a region of memory thatcan be used to save left-over information needed to resume image generation of charactersthat extend beyond one band. The discussion below assumes that the pointer LoTablePointerfp!qpHE gb? g^ H]\]Z 6YI4]W7 5U5]S  sp(R gNL]L]J 8IF]G4 sp ]E"- C4]A3 @ g<J g;U$.:C2,;U& g9]7;6914s p3/: 180%7].$,0 g)b%5 g' g$T g#,3. g!G g " g] gqQ gY ggJ g spI g]$spsp* g%8 gS P gU g sp5 g S g D g Q?]Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer9points to such a table; the table must start on an even address. The left-over table can bereset to the empty state by setting the first word to 0. Each left-over character in the tablerequires 4 words. Further understanding of the format of the left-over table is not essentialto operate ProgramGeneratePage, but may be helpful for debugging (see Section 1.10).Arguments. This function performs image-generation chores for a number of bands, and inaddition forwards the image to the ROS adapter for printing by turning on SLOTTAKE. Thearguments in the Orbit control table are:Argument1 = Pointer to adapter command table (must be even; see below)Argument2 = Timeout count, in units of 2 ms.nBandsMinus1 = number of bands to generate, minus 1FAword = FA*256 (i.e., FA must be in the left byte)LoTable = LoTablePointer (left-over pointer, must be even)FontTable = FontTableX+100000b (pointer to font table, offset by 100000b)NewCharPointer = BandListPointer-1 (BandListPointer must be even)CurrentCopy = 4 + (current copy number)*32The function will attempt to generate images for the specified number of bands; of course theband list pointed to by NewCharPointer+1 must contain an adequate number of band listsegments. The value in the nBandsMinus1 entry will be decremented at the end of each band,allowing the emulator to track Orbit's progress. The timeout count is used whenever Orbit iswaiting for the ROS adapter to finish reading the output buffer: if the timeout is exceeded, themicrocode completes early (as if nBandsMinus1 were so small that it did not include the nextband) and sets the firmware status bit TIMEOUTmc (bit 1) in the OrbitStatus word of thecontrol table. The most common reason for timeout is the failure of page sync to arrive:these issues cannot be fully discussed until the operation of the adapter is described in somedetail in section 3.After the last band is generated, the ProgramGeneratePage function completes (i.e., setslocation 720b to zero), even though the ROS adapter has probably not finished taking imagedata. In fact, the adapter can continue to request and receive data ad infinitum, but the datawill eventually become all zero (recall that reading an output buffer zeroes it, and since themicrocode is no longer invoking image-generation functions, no new image data are beingadded to the Orbit buffers). This is a convenient way to finish out the printing of a pagewith white borders. To halt the taking of image data, Orbit can be reset. After Orbit is reset,the ROS adapter will simply repeat the most recent video data it received correctly.The adapter command table (pointed to by Argument1) is used to encode commands thatshould be sent to the ROS adapter during the generation of a page. Such a mechanism isnecessary because the Alto program would not otherwise be able to signal the printer deviceduring the page generation (because the OrbitROSCommand can be issued only by the Alto taskassigned to Orbit, which is occupied with page generation). The table must begin on an evenaddress, and contains two-word entries in the following format:Word 0[0-3]AdapterCommandCodeWord 0[4-12]whenBandMinus1. This entry gives the band number before whichthe corresponding command will be executed. The first band isnumbered nBandMinus1, then nBandMinus1-1, etc. down to 0.Word 1AdapterArgumentThe table will be processed in the order given, i.e., the whenBandMinus1 entries should bearranged in decreasing order. An appropriate termination entry is Word 0=177777b, whichspecifies an unreasonably large value for whenBandMinus1. There are presently threeAdapterCommandCodes defined:fp!qpHE gbE g`>! g_M g] rp6 gZcs pI gX#qp qp gWY)TOFR,QE3Oqpqp qpN;:LIK1AI* gFE gDL gCv[ gAG g@lqpsp g>I g=b'qp" g;Q g:XI g8 g5rp g4"(qp" g2(s p g1L g/W g.> g,N g+qpM g'; g&Sqpsp. g$F g#I'rvrp$ g!J g ??] ] #b0 9] g5% g9 g { !4 g | g ?\[vProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer100. Send AdapterArgument to the adapter as a command (i.e., OrbitROSCommand _AdapterArgument).1. Read 4 bits of adapter status; the four bits are numbered 4n to 4n+3, whereAdapterArgument=n*256 (n is in the left byte). The resulting status is read and storedin bits 12-15 of the memory word that previously held AdapterArgument. (The exactoperations are: OrbitControl _ AdapterArgument; AdapterArgument _ OrbitStatus.)3. Wait for AdapterArgument/3 microseconds in a tight loop. This command isprovided in case it is absolutely essential that two adapter commands be issued beforethe same band. In this case, we must wait 60 microseconds between issuing adaptercommands to assure proper communications with adapter.If Jump codes appear in the band list, the CurrentCopy entry must be maintained. This wordmust contain an encoding, as shown, of the number of times, plus one, that the currentdocument has been printed during the current run; that is, the number of the current copy.When page generation has terminated, the Result word in the control table will contain thevalue that nBandsMinus1 had when word 8, bit 3 of adapter status was last on during imagegeneration; this word will contain the original nBandsMinus1, plus one, if the bit never comeson. This very special feature assists with detecting an important but elusive timing signal inthe Dover printer (see the description of Count-H in the Dover section.)Managing the data structuresDuring the generation of a page, the three data structures (font, band list and left over table)must of course be resident in memory. In order to keep a ROS running at high speed, the fontand band list structures for each page must be present in memory at the moment it isnecessary to begin generating the image for the corresponding page. To do this requires abuffering strategy that is willing to read information for page i from a disk while page i-1 isbeing imaged. (The left over table is reasonably small, and can of course be re-used forsubsequent pages. Consequently, we shall omit further mention of it.)There are basically three methods of buffering (see Figure 1-5):Method 1. Font and band list structures for each page are generated on the disk, andread into one of two memory buffers. While page i-1 is being imaged, the structuresfor page i are being read. (This scheme is not a particularly attractive alternative,because the complexity of a page is severely restricted by the amount of availablememory.)Method 2. One font data structure will suffice for all the pages to be printed, and cantherefore remain resident in memory. The band lists are put in two buffers: whilepage i-1 is being imaged, the band lists for page i are being read. This scheme is therecommended scheme whenever the page complexities allow the font and two band listbuffers to fit in memory. The advantage of this scheme is that it permits printers torun at high speed, without pauses between pages.Method 3. All of memory is used for one font structure and one band list. After pagei-1 is imaged, it is necessary to read the font and band structures for page i beforeimaging may start for that page. If used with high-speed printers, it may be necessaryto stop the printer while page i is read in, because otherwise there would beinsufficient time to complete disk activity before imaging activity would need tobegin. This scheme does have the advantage that maximally complex pages can beprinted, by allocating all of memory to the structures necessary for that page.fp!qpG]b)rvrp]`]]m>spsp][spsp,]Zc E]Xr pr p]U<]T-F]R5]Q#6 gMC gLr1% gJE gG$6 gF<%4 gDG gC2 Q gA*sp g>s g;Up*spsp g99qp g8K9 g6 N g5A@spsp g3J g27F g/ @]+6]*Z1sp"](spK]'P#/]%]" J]!))]spsp$]$.]B]0];]Usp9sp]W]K  sp-]2]AO]O gu?YwProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer11Note that hybrid schemes may be used as well: methods 2 and 3 may be mixed, although itmay be necessary to stop the printer as the method is being switched (for the same reason itmay be necessary to stop the printer between pages using method 3). Planning the bufferingand font makeup is one of the less pleasant tasks of the initial pass over the document thatbuilds band lists!The remainder of section 1 presents details that are not essential to mostprinting applications. Read on only if you are (1) hardy, (2) desirous of writingmicrocode, (3) desirous of writing Orbit test programs, or (4) need to know howto use Orbit for non-real-time image generation help.fp!qpG gbA g`;! g_M g]+1 g\ SUr2SS}3SQ-"SPs5 gP,?[Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer121.5 Orbit Hardware FunctionsThere are various kinds of transfers of information between the Alto microprocessor andOrbit; each can transfer up to 16 bits of information. Although the transfers are actuallyaccomplished with microcode functions interpreted by Orbit, the functions themselves areused by higher-level language programmers as well. The list below gives each transfer a name(of the form Orbitxx); the description assumes a 16-bit value is transferred (refer to Figure1-6 for a tabular summary of this information):Functions for status and controlOrbitControl. This function transfers 16 bits of control information to Orbit. The fieldsof this value are as follows:FieldBitsFunctionauxControl0-7This 8-bit field has two different interpretations, depending onthe setting of the WHICH field (q.v.).ESS8This bit must be 1 to enable changing the SLOTTAKE setting (q.v.).SLOTTAKE9This bit setting, enabled by ESS above, controls the output bufferlogic. Normally (SLOTTAKE=0), Orbit will not honor video datarequests coming from the adapter. As soon as SLOTTAKE is set to1, however, output data will be passed to the adapter when itdemands it.clrBEHIND11This bit clears the BEHIND indicator (see below).setGOAWAY12This bit controls microcode wakeups, and should normally be 0.(See section on microcoding for more information.)WHICH13This bit controls the use to which the 8-bit auxControl field isput. If WHICH=0, auxControl is interpreted as an address (range0 to 63) into the adapter status memory: when OrbitStatus is nextinterrogated, 4 status bits (with numbers 4*auxControl to4*auxControl+3) will be reported. If WHICH=1, auxControl isused to set FA.CLRFRESH14This bit controls refresh logic, and should normally be 0. (Seesection on microcoding for more information.)RESET15This bit, if 1, will reset Orbit entirely. A reset performs at leastthe following functions: FA_0, SLOTTAKE_0, band buffer A isassigned to the image buffer, the status and control dialogueswith the adapter are reset.OrbitStatus. This function reads 16 bits of status information from Orbit into the Alto.The starred status bits below (*) are generated by firmware only in some situations. Thenotation a_OrbitStatus denotes the hardware status-reading function, and does not includethe firmware status bits. The notation a_OrbitStatus+FirmwareStatus denotes the fullstatus report. The status fields are:FieldBitsFunctionIACSmc0*This bit is 1 if Orbit is "in a character segment," i.e., if Orbitneeds more OrbitFontData transfers in order to complete image-generation for the current character. (This bit is not actuallyreported by Orbit to the Alto in this way, but is inserted by the"standard microcode.")TIMEOUTmc1*(This bit is not actually reported by Orbit to the Alto, but isinserted by the "standard microcode." See the description ofProgramGeneratePage, above).fp!qpG gbr g^p'0 g]m@ g[= gZc2+ gX sp&rp gWY/ gT-rQs p<O|LP``J ``3 kI#qp G{q`p`qpEq`p`qpkDNqp$kBqp kAD=k? >q`p`qpk:29Bq`p`+k7qp2k68&s pk4N!Ok3.qpk1 qp0q`p`7k.|-,q`p`.k+Oqpqp k)rp k(E%s pH#C" s p 7 *s p&`1qp`#k s p k' 2k:kuqp`8k&kksp z g$?XProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer13unstableROSmc2*(This bit is not actually reported by Orbit to the Alto, but isinserted by the "standard microcode." See the description ofProgramROSStatus, above).earlyPageAbortmc3*(This bit is not actually reported by Orbit to the Alto, but isinserted by the "standard microcode.") If, at the end of a band,the adapter has stopped accepting video information, and if theBEHIND bit (below) is set, ProgramGeneratePage terminates early(as if it had timed out), with this bit set.badBandEntrymc4*(This bit is not actually reported by Orbit to the Alto, but isinserted by the "standard microcode.") The ProgramGeneratePagemicrocode has encountered a non-character band entry that doesnot specify a valid operation. It has stored additional diagnosticinformation in fixed memory locations. This condition shouldonly arise in instances of severe hardware or software faults.Consult the Orbit microcode listings for further information.badROS8This bit is true if an error of some sort has been detected on theadapter status-reporting line. The adapter status cannot betrusted. The condition will be reset after the first properly-formatted status burst is received from the adapter.INCON9This bit announces the current band buffer assignments. If it is0, buffer A is the image buffer, and buffer B is the outputbuffer. Watching this bit for changes is the proper way to detect"buffer switches."stableROS10This bit is true if a status burst is not currently arriving from theadapter. If you insist on reading some adapter status that mustbe from the same burst, you can check this bit before and after aread.BEHIND11This bit is set when Orbit "gets behind." This will happen if thebuffers switch (due to output requests) before the Alto microcodehas finished sending the next band of image-generationinformation to Orbit (finishing is signaled to Orbit by settingGOAWAY).ROSStatus12-15This field gives 4 bits of status reported by the adapter. See thedescription of WHICH, above.Functions for controlling image-generationThere are a number of functions for controlling image generation. There is a reasonablystandard sequence of operations for transferring source rasters into Orbit. The first threefunctions (OrbitHeight, OrbitXY, and OrbitDBCWidthSet) are used to pass to Orbit the fourparameters that describe a source raster and its position in the band. The last of these(OrbitDBCWidthSet) sets a flag IACS ("in a character segment") that indicates Orbit isexpecting source raster data. Then the OrbitFontData function is used to send words ofsource raster information to Orbit. After the character is finished (or we run into the edge ofthe band at x=15), the two functions OrbitDBCWidthRead and OrbitDeltaWC are used toextract from the Orbit hardware the necessary parameters to compose a "left over" entry sothat image generation for this character can be resumed in the next band.OrbitHeight. This command sends to Orbit a 12-bit field (value[4-15]) which isinterpreted as the two's complement of the height of the source raster, in bits.OrbitXY. This command sets x_value[0-3] and y_value[4-15]. It is therefore used to setthe starting scan-line within the band (x) and the vertical position of the bottom of thecopy of the source raster (y).OrbitDBCWidthSet. This function has three purposes: First, value[0-3] is used to tellOrbit which bit (0 to 15) of the first word of raster data is the first bit to be examinedfp!qpGbqp`8k`&k_stsp]l`8k[AkZb4 kXqpspkWX,U `8kT+*skRp#kQ!!!kO+kN$kL(Jqp`;kIe # kG 2kF[4Dqp`;kC.rprkAp&k@$>|qp`rpk<6 k;r1k98Eqp`3k62k5;no"k3+k21qp0qp``-k/qp g+r* g(pM g''K g% s pspsp g$< g"sp qp3 g!(s p g] g rpsps p gC gIs prpNrp-"sprprp rprp$!rp0rp sprp g: g ?\Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer14(i.e., it will play the role of SOURCEBIT for the setting of BAND[x,y], where x and y wereset with OrbitXY). Second, value[4-15] is interpreted as the width of the source raster,minus 1. Third, executing this function initializes a mess of logic relating to transferringa source raster to Orbit and sets IACS ("in a character segment"). After the function isexecuted, it is wise to issue only OrbitFontData functions until the image-generation forthis character terminates (i.e, IACS becomes 0). Warning: IACS is cleared by StartIO(4);consequently it is not possible to "single step" Orbit's character generation.OrbitFontData. This function is used to send 16-bit raster data words to Orbit, usually ina very tight loop. The loop is exited when IACS becomes 0, that is, when the Orbithardware counts the width counter down to zero, or when the x counter overflows (i.e.,when it would count up from 15 to 16).OrbitDBCWidthRead. This function returns from Orbit to the Alto a 16-bit value thatcorresponds to the value set with OrbitDBCWidthSet, but after the image-generation forthis character (in this band) has completed. Thus, value[0-3] tells which bit should bethe first to be examined when image-generation resumes in the next band. Also, value[4-15] contains the remaining width (minus 1) of the character. If value[4-15]=7777b, thereis no remaining width, because the width counter counted down to zero (i.e., the sourceraster was exhausted).OrbitDeltaWC. This function returns from Orbit to the Alto the count of the number offull 16-bit words of OrbitFontData that were used during the image-generation for thischaracter (the counter is initialized to 0 when OrbitDBCWidthSet is issued). This allowsthe Alto program to compute the memory address in the source raster where generationshould resume in the next band. (Note: This function is needed because it is too time-consuming to derive the count by calculation. If you really understand Orbit, you will beable to verify that DeltaWC=(Height*SL+DBC)/16, where DBC is the 4-bit value passedto Orbit with OrbitDBCWidthSet, and SL is [if x+Width < 16 then Width else 16-x].)Functions for communicating with the adapterReading adapter status is accomplished with the OrbitControl and OrbitStatus functions (firstset the status memory address, then read 4 status bits). Commands are sent to the adapterwith:OrbitROSCommand. This function sends a 16-bit command to the ROS. Another ROScommand should not be issued until 60 microseconds have elapsed, to allow time forproper transmission of the command to the ROS.Miscellaneous functionsOrbitOutputData. This function reads 16 bits of output data from Orbit into the Alto.The sequencing of words of data is described below.OrbitInk. This function sets 16 bits of INK memory: INK[x,0] through INK[x,15], where xhas been previously set with OrbitXY.1.6 Standard microcode -- complete descriptionThe standard microcode was introduced in section 1.4; the description of bootstrapping and ofthe control table apply here as well. Here we give a complete list of the functions itimplements:ProgramControl (directive=0). Argument1 is passed to Orbit as a control word:OrbitControl _ Argument1.fp!qpGbqpqprprprp`sp rp8_rp=]"qp3\  s p)Zqpqp YNUs p.TO,qp R0sp=@L;V:6F897,spup g4r, g0p+s ps p g/O*0 g-*stsp/qp q)pI'*qp g$hr!0, the inner loopcontains TASK microprocessor functions; if LoTable<0, no TASKs are included (this is toaid in hardware debugging).fp!qpGbsp=`sp]ms p5 s [p/rpZcW7spBspU Rsp(qp Qsp Msp(LPs p I$s pO-PGs p4Fs pD(Ais p)sp?  sp"=@4sp :stspCq8p s ps p,7 $75rprp 4qp42{@ g/Or g,#pF g* I g)qp+ g'= g&; g$2) g# gM gT(sp gsp( gJQ1Rsp gspA g+. g/, g"' g sp# g&r vr gp4 g {1+ g r p g q7 sp  g *?]Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer17number in the directive. In this case, when the function terminates, the image buffer willcontinue to be refreshed. Enabling the idling activity in no way alters the invocation of thenext Programxx function.1.8 Reading a buffer into the AltoOrbit has provisions for reading the output buffer back into Alto memory rather thanshipping it to the ROS adapter. This is useful for for image-generation that is so complicatedit cannot keep pace with the printing device: the buffers can be returned to the Alto, andbuffered again on a big disk. A second pass is used to transmit the disk buffers (via Orbit) tothe ROS. The read-back is also vital for debugging Orbit.Basically, the function OrbitOutputData reads 16 bits from the output buffer into the Alto.The standard microcode interfaces ProgramOutputData and ProgramReadBlock are providedto give access to this function.The programmer needs to be aware of two tricky details concerning readout:1. There is a 16-bit buffer (ROB) that sits between the addressing mechanism described above and theoutside world (the taker of data: the Alto or the ROS adapter). As a result, immediately after thebuffers "switch," the ROB contains the last 16-bits of data from the previous buffer (x=15, y=4080through y=4095). The usual convention is to read out this one last word. This leaves the first word ofthe new buffer in ROB.2. The output band buffer will not be refreshed because no readout is in progress. Because the buffer isimplemented with dynamic MOS RAM's, the lack of refreshing will cause errors in the data to appearbeginning about 2 ms. after the buffer switch. This data "rotting" happens rather slowly, but isnonetheless irksome. To avoid trouble, reading the output buffer should begin within the alotted 2 ms.after the buffer switch. As soon as reading begins, the reading itself serves to refresh the memory.The scheme is as follows: (1) The Alto reads the output band buffer entirely (buffer A, say),thereby clearing it and also causing the buffers to switch; (2) Now the Alto invokes image-generation to fill the buffer (A) with an image; (3) The Alto reads the output buffer (B) asquickly as possible, simply to cause the buffers to switch; (4) The Alto reads the output buffer(A) and saves the image. Note that step 4 can also serve the same role as step 1. We couldleave FA set to some fixed value throughout these steps, but this will cause step (3) to requiremore time than necessary. Some detailed analysis shows how to avoid this:The setting of FA provided by the Alto is examined only when Orbit reads out the last 16 bits of ascan-line, and must prepare to begin reading the next scan-line. If you wish to control FA carefully, youmust anticipate the moments at which Orbit will load its address register from FA. The most commoncase in which careful synchronization is needed is when you wish to induce a buffer switch withminimum effort.Let us describe the handling of FA for the 4-step example above. Define FAimage to be the FA thatcorresponds to the image you wish to read. First, we need to get "in sync:"set Orbit's FA _ FAimageuntil buffers switch do [ read a word from the output band buffer ]read a final word from the output band buffer (because of ROB)This sequence guarantees FA has been set to FAimage, and that we are ready to begin reading a buffer.Step 1 (or step 4) becomes:read (256-FAimage)*16-2 words from the output band bufferset Orbit's FA _ 255read the last two words from the output band bufferStep 3 then becomes:read (256-255)*16-2 words from the output band bufferset Orbit's FA _ FAimageread the last two words from the output band bufferfp!qpG gbE g`#; g_sp g[r" gXp%rp gW7qp7 gU= gT-@ gRqp3 gO| sp4 gM spsp gLr]IiqJ]F&>]EG?$]D ;wqwq]Bwq+w q]A]>wqwq:]=nL]<1K]:g]9M g6gpD g43( g3]= g1$< g0SV g.qp0( g-IJ]*@q@wq ])O]'c]& R]%L]"g9)]!*L''sC'6>]M]'9''3]'5' Z' 3 g @\kProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer181.9 MicrocodingThis section presents some additional information on microcoding the Orbit. It refersgenerously to preceding sections, in which the basic data transfers (Orbitxx functions) havebeen described. The reader should be familiar with Alto microcode (see the Alto HardwareManual), and may wish to refer to the Orbit functional description. The serious reader isurged to retain a copy of the standard microcode at his/her elbow as an example of howthings can be done.Assignment of functions. Each of the Orbitxx functions described above is assigned a value ofthe Alto F1 or F2 fields: Orbit decodes these fields to decide what to do. Definitions at thebeginning of OrbitMc.Mu establish some conventional names for these functions. Theassignment is as follows:OrbitControlF2=15bOrbitStatusF1=17b *OrbitHeightF2=12b *OrbitXYF2=11bOrbitDBCWidthSetF2=10bOrbitFontDataF2=13bOrbitDBCWidthReadF1=15bOrbitDeltaWCF1=14bOrbitROSCommandF2=16bOrbitOutputDataF1=16bOrbitInkF2=14bOrbitBlock (see below)F1=3The starred items (*) may cause microcode branches. OrbitStatus sets NEXT[7] if IACS is noton, i.e., if Orbit is not in a character segment. OrbitHeight sets NEXT[7] if the refresh timerhas expired, i.e. if the image buffer needs refreshing.Whenever one of the microcode functions (Orbitxx) is executed, the Alto clock may not stopduring its execution. The microcoder must arrange the microcode so that, for example,memory waits do not occur on cycles in which Orbitxx functions are executed. The standardmicrocode has comments (//// in the comment field) whenever instructions have beeninserted to observe this timing restriction.Wakeups. Orbit is controlled by a single Alto microtask (task number 1, next lowest priorityto the emulator). Consequently, the Orbit hardware must generate a "wakeup signal" to governthe execution of microinstructions in the Orbit task: the wakeup should be generated when theOrbit hardware requires service of some sort.The wakeup condition is very simply expressed in hardware, but deserves a more discursivetreatment here. There are a number of considerations:1. The RUN flip-flop. We want Orbit's wakeups to be filtered by a single RUNcondition, that says whether Orbit is idle or is expected to be doing things. Wheneverthe Alto is reset (bootstrapped), the RUN condition is turned off. The emulatorprogram may execute StartIO(4) to turn the RUN condition on (note that StartIO issimply the name of a software function that executes the emulator SIO function). TheRUN condition is turned off by the execution of the OrbitBlock function by the Orbittask itself.2. Executing miscellaneous functions (e.g., OrbitROSCommand). We would like theOrbit task to be normally active (i.e., requesting wakeup) so that various utilityfunctions can be accomplished. When the function terminates, we can alwaysdeactivate the Orbit task with OrbitBlock.fp!qpG gbr g^p< g]mEsp g[B gZcP gXG gWY gT-rp sp3 gRqpqp1 gQ#N gO]Lrs &qp]Js &qp]Ihs &qp]Gs&qp]F^s&qp]Ds &qp]CTs&qp]As &qp]@Jsts&qp]>s&qp]=@s&qp];s p &qp g8s pqpqpr g7 ps pqp g57 g2Y)sp g0I g/O-sp g-R g,E, g)rpM g'C g&)4 g$- g!^-, g6]qp'q](p9]&qp ]+qp]Bqp]qp)s p r ] ]cp,stsp ]9] YD] s p g ?\}Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer193. Performing image generation. Again, we would like the Orbit task to be normallyactive, so that parameters and source raster data words can be shipped to Orbit at highspeed. However, if Orbit's FIFO that contains font data words (shipped withOrbitFontData) becomes full, the Orbit task should be temporarily suspended until theFIFO entries are processed by Orbit and there is once again room. When imagegeneration for a character segment terminates (IACS becomes 0), we want to get serviceno matter what the FIFO contains.4. Waiting for the ROS to take a buffer. After image generation for a band iscomplete, Orbit usually needs to "wait" until the ROS has emptied the other (output)buffer. During this period, the Orbit task should not be requesting wakeups, so thatthe Alto microprocessor may be devoted to other tasks. To achieve this "dormant"state, the Orbit task sets the setGOAWAY bit in the control word: this tells Orbit to "goaway" until a buffer switch occurs. The buffer switch will turn off GOAWAY, andconsequently allow wakeups again.5. Refreshing the image buffer periodically. If the image buffer memory is to be keptvalid, it must be periodically refreshed. Consequently, we need to have a provision forwaking up Orbit for refreshing even when Orbit is dormant (waiting for a bufferswitch, as in (4) above). For this purpose, there is a REFRESH condition that indicatesrefreshing is needed: it is set every 2 ms. (approximately), and may be cleared by theCLRFRESH bit in the control word. Even though GOAWAY has been set, Orbit will beawakened when the REFRESH condition becomes true.Let us summarize the conditions on which wakeups depend and give the wakeup conditionitself:RUNSet by StartIO(4)Cleared by executing OrbitBlockIACSSet by executing OrbitDBCWidthSetCleared when the character is finished (i.e., the width counter becomes 0 or the x counter overflows)Also cleared by executing StartIO(4) or by reseting OrbitREFRESHSet every 2 ms. by a timerCleared by the CLRFRESH bit in OrbitControlGOAWAYSet by the setGOAWAY bit in OrbitControlCleared by a buffer switch or by an Orbit resetOrbit will request a wakeup if:RUN and { [ (FIFO has room) or IACS=0 ] and [ REFRESH=1 or GOAWAY=0 ] }Refreshing. There is a standard ritual for refreshing the image buffer. Although thetechnique can be discerned from the addressing mechanism, we shall present it here forconvenience. The basic idea is to cycle all the memories by generating a "character" of theright sort, but to leave the memory contents unaltered by using font data words that are zero.The suggested technique is (see the standard microcode for an instance of this technique):OrbitXY _ 0OrbitHeight _ 6000b(character is 1024. bits high)OrbitDBCWidthSet _ 0(character is 1 scan-line wide)until IACS=0 do OrbitFontData _ 0fp!qpG]bD]`;]_qp ]]s p> ]\ qp,]Z-qp#]Yqp ]Uqp8]TO2qp ]RP]QE/"]O"qp-]N;; qp]L!]I-)]HT]F<]D .qp]Cv7]Aqp'qp]@lqp g=@0% g;]8q`p`7 s ]4Hq`ps`2p7`1> rp`/9],q`p`+rqps ](q`p qps `'+p/ g#+]qp]zqp qp]qpqp gr pE gpF gI gf6( gF]sp] \s p" ] sp" ] Rqps p N g @]xProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer201.10 Algorithm for ProgramGenerateBand and ProgramGeneratePageThe algorithm for the two central functions is best understood by consulting the text for thestandard microcode. This section is simply a condensation of some of the informationcontained in comments in that file. In the description below, notation of the form a_b!cmeans that memory location b+c is read, and the 16 bits are transferred to destination a.The microcode consists of three subroutines (DOBAND, TFRCHR, and REFRESH), and a maindriver for the functions. DOBAND is responsible for sequencing through a band, callingTFRCHR (transfer a character to Orbit) for each character, and calling REFRESH every 2 ms.The driver for ProgramGenerateBand simply calls DOBAND and returns. The driver forProgramGeneratePage is somewhat more complicated:OrbitControl _ 300b (turn on SLOTTAKE)OrbitControl _ FAword + 4 (WHICH, plus the FA setting)bandResult _ nBandsMinus1+1Main loop. First execute any pending adapter command entries.while nBandsMinus1 > 0 do beginwhile (Argument1!0-nBandsMinus1) and 7777b = 0 do begina_(Argument1!0 and 30000b)b_Argument1!1Argument1 _ Argument1+2if a = 0 then OrbitROSCommand _ b elseif a = 10000b then beginOrbitControl _ bArgument1!-1 _ OrbitStatusend elseif a = 30000b then wait b/3 microsecondsendNow call the DOBAND subroutine to compose the image for this band.call DOBANDOrbitControl _ 10b (set GOAWAY)if AdapterStatus.SendVideo = 0 and OrbitStatus.BEHIND = 1 thenreturn from ProgramGeneratePage with earlyPageAbortmc bit setif AdapterStatus.(word 8, bit 3) = 1 then bandResult _ nBandsMinus1a _ Argument2until bands switch do beginwait until refreshing needed or bands switchif a < 0 then return from ProgramGeneratePage with TIMEOUTmc bit setcall REFRESHa _ a-1endnBandsMinus1 _ nBandsMinus1-1endResult _ bandResultreturnThe DOBAND subroutine is responsible for sequencing through the band lists and leftovers:DOBAND:LORP_LoTable-1LOWP_LoTable-1(LOWP is the write pointer for new leftovers)First, process the left-over list remaining from last time. Each entry is four words long, containing the height, theXY setting (with X=0), the remaining width and the memory address of the first source raster word to send toOrbit. Note that the height and XY information is also saved in registers (HEIGHT, XY) so that TFRCHR canbuild a new left-over list:while LORP!1 = 0 do beginif refreshing needed then call REFRESHOrbitHeight _ HEIGHT _ LORP!1OrbitXY _ XY _ LORP!2OrbitDBCWidthSet _ LORP!3FONTADR _ LORP!4call TFRCHRLORP _ LORP+4endfp!qpG gbrvrv g^p P g]m< g[J gZc/* gX -q pqp gVqp6 gUqp+qp gS|spqp gQsp1Nt q1Mt q*1Lt gI>1HG7'FC'E 'C'B tq'AO@t q>t =q'<[(; g8B7g 6*t q4tqtq'3 tq2st q216 /'.,'-tq',B '+)1(1'N1&1$ g!pqp D gq' 1 - g ;; gN gZ gU1&t qatq $tq  m 1 0 , g @]:SProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer21Now go through the new character list (band list) for this band, and decode the entries. Character entries arelooked up in the font index; rule parameters are simply passed on to Orbit. (Note that the "refreshing needed" testis a part of OrbitHeight, and is consequently done in a slightly different place in the actual microcode.)while true do beginif refreshing needed then call REFRESHa _ NewCharPointer!1XY _ NewCharPointer!2NewCharPointer _ NewCharPointer+2if a < 0 then beginOrbitXY _ XYFONTADR _ FontTable!aOrbitHeight _ HEIGHT _ FONTADR!0OrbitDBCWidthSet _ FONTADR!1FONTADR _ FONTADR+2end else case a% of begincase 1: beginOrbitXY _ XYFONTADR _ 0OrbitHeight _ HEIGHT _ NewCharPointer!1OrbitDBCWidthSet _ NewCharPointer!2NewCharPointer _ NewCharPointer+2endcase 4: beginNewCharPointer_NewCharPonter+XY;repeat the loopendcase 0: exit the loopall other cases: return from ProgramGeneratePage with badBandEntrymc bit setendcall TFRCHRendLOWP!1 _ 0The TFRCHR subroutine transfers a character to Orbit. If the character does not exhaust itswidth in this band, a left-over entry is made. The variable FONTADR usually contains theaddress of a source font word, but if it is zero, we are transferring a "rule" to Orbit.TFRCHR:if FONTADR=0 then beginuntil IACS=0 do OrbitFont _ -1FONTADR _ - OrbitDeltaWCend else beginp _ FONTADRuntil IACS=0 do beginOrbitFont _ p!0p _ p+1endendNow check to see if the charcter requires a left-over (width=7777b):p _ OrbitDBCWidthRead and 7777bif p = 7777b then beginLOWP!1 _ HEIGHTLOWP!2 _ XY and 7777b (this sets X_0, but preserves Y)LOWP!3 _ OrbitDBCWidthReadLOWP!4 _ FONTADR + OrbitDeltaWCLOWP _ LOWP+4endAnd finally, the REFRESH subroutine performs the refreshing chore:REFRESH: OrbitXY _ 0OrbitHeight _ 6000bOrbitDBCWidthSet _ 0until IACS=0 do OrbitFont _ 0fp!qpG gbAqY ga,G g_ t q=1^]M&\ZY!XY'Wtq'U'Tt q'Setq 'R(P'O NqtqM4 Kt qJtqI}q!H@'G EDCL'B'@tq?>X 1=1: g7pqp!1 g6 0qp g4%3 g1q'0Itq/ t 1-q , +U'*tq'('1&a g#\` g<H g9O g8&S g6> g5? g3= g2A g0$qp# g/& g+upL g*W3& g(9qp g%u p: g$!S g"qp9 g!5, gD g U g+2 gqp)]qN]:+]E#]i]: gp :qp g /qp& g ,qp( g @]MProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer23generating raster data. (4) When SendVideo becomes true as the first page frame passes underthe beam, the adapter will begin requesting raster data from the EIP, and continue to do so asneeded to control the beam modulation. Now one of two things can happen: (5a) SendVideofalls, signaling the end of the page frame. The adapter will cease requesting data from the EIP.Or (5b) the EIP refuses to honor a data request from the adapter, in which case the adapterwill simply repeat the last data it received until SendVideo goes false. (6) To print the nextpage, the EIP returns to step (2), and may also need to contract with the printing engine tokeep feeding paper. The reason for step 2 now becomes clear: without step 2, situation 5bmight cause video for the next page to appear at the trailing end of the current page, becauseSendVideo is still on.Scan-line timing. An even more intricate timing problem is posed by the scanning beam: wemust carefully synchronize the video signal generated by serializing the raster data comingfrom the EIP so that it appears at the proper position along the scan-line. This involves twoissues: (a) determining how to divide the scan-line into units that will correspond to eachvideo bit, and (b) determining the absolute time at which video bits should be passed to thebeam modulator.A servo system and two detectors are used to solve this problem. The scanning beam passesfirst over a "start-of-scan" (SOS) detector, then over the page image frame, and then over an"end-of-scan" (EOS) detector. This sequence is repeated very fast: soon after EOS is generatedfor one scan-line, SOS for the next scan line occurs. The adapter divides the time between SOSand EOS into equal intervals (the exact number of intervals is a parameter set by the EIP): eachone will correspond to one bit of video information. So now we have divided the scan-lineinto "bits."The EIP generally produces raster data only for the portions of scan-lines that correspond toregions of activity on the page: the adapter is expected to supply "white" margins above andbelow this active region. Consequently, the adapter will need to know how the video datasupplied by the EIP should be placed within the scan-line. The adapter implements a "bottommargin" by a counter that is started at SOS with a value specified by the EIP, and counted as"white margin" bits are sent to the modulator. When the count becomes 0, video data fromthe EIP is sent to the modulator, and continues to be sent until an "end of scan-line"indication arrives with data from the EIP. Thereafter, the adapter supplies "white margin" bitsthat will correspond to the "top margin."Note: The number of bits of raster data provided by the EIP for each scan-line must be amultiple of 64. (With Orbit, this means that FA must be a multiple of 4.)The servo that synchronizes scan-lines requires SOS and EOS pulses to arrive. Consequently, the adaptercontrol must arrange that the laser beam is "on" as it passes over the detectors, or a pulse will be missed.When the servo is operating in equilibrium, the adapter ensures that the beam will be on for thedetectors by anticipating where the beam is. However, in order to get the servo going initially, the beammust be completely on for a short while. This is accomplished by turning the beam on wheneverPrintMode is true but SendVideo is not, i.e., in the inter-page gaps and while the engine is cycling up.This has the added virtue of "writing down" the photoreceptor in unused areas, thus preventing tonerdumping.Motor speed. The speed of the motor that drives the scanning polygon is carefully controlledby a frequency synthesizer. The adapter provides the basic timing signal to which theelectronics locks the polygon motor.2.2 ParametersAll of these timing and synchronizing features are governed by parameters that can be set bythe EIP. Some of the parameters can be related by physical observations. The next fewparagraphs are intended to provide enough information to permit calculation of theparameters!fp!qpG gbK g` 4qp g_A g]8%qp g\ qp4 gZ T gY qp'( gW{B gU=! gTq gQEup'" gO= gN;qp@ gLC gK1upB gI gFN gDqp/ gCvqpZ g=b g:6qp L g88$ g7,J g5qp- g4"qpqp g2Y g1qp+$ g/%qp7 g.) g*8qp g)].qp]&TqM]%=/]#H]"?+]!`U] #d]='] gYu p)) g(. gO$ g#u gp> grqp B g %N& g h  g !@[Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer24Let us first define some parameters of the output image:SThe number of scan-lines per inch on the pageBThe number of bits per inch along the scan-lineNow define some parameters of the ROS and printing engine (see section 3 for the valuesapplicable to the Dover printer):pPaper speed, measured in inches per secondfNumber of facets on the polygonrNumber of polygon motor clock pulses/polygon revolutiondDuty cycle (i.e., SOS-EOS time/SOS-SOS time)hEffective distance between SOS and EOS detectors,measured at the paper surface.From these we will need to calculate the relevant adapter parameters (ranges are given inparentheses):MotorSpeed (0 to 4095)MotorScale (0 to 7)BitClock (0 to 4095)BitScale (0 to 7)LineSyncDelay (0 to 4095)PageSyncDelay (0 to 4095)VideoGate (0 to 4095 -- T version only)We need to define two parameters that differ on the different adapter versions.. The first isbcMax, the maximum frequency of the bit clock. The other is crystalClock, the frequency ofan internal adapter timing oscillator.M versionT versionbcMax90 * 10630 * 106crystalClock25 * 10612.5 * 106Define a function Scale(x)=2x.Now we can calculate the scanning motor speed in revolutions per second:MotorRPS = crystalClock * Scale(MotorScale) / ( r * (4096-MotorSpeed) * 28)Consequently, we can get the number of scan-lines per inch:S = f * MotorRPS / pThese two equations allow us to determine MotorSpeed and MotorScale settings from thedesired value of S.The scan-line control is somewhat more complicated. The basic servo is controlled by therelation:B = 4 * (4096-BitClock) / hThe peak bandwidth required from the adapter (and consequently from the EIP as well) is:BitRate = f * MotorRPS * B * h / dfp!qpG gb8]^uSp-]]muSp/ gZA"qp gX!]UuSp*]T uSp]RuSp7]QuSpqpqp]O|uSpqpqp SM gJ(1 gIF ]F]D]C]A]@]>]<qp g9V g8K'4 g6&3qp)qp]12\q)1p2\q]0p 0q)0p0q g,p-e, g)H]&qp(up' q&p g#T;] (upupqpu gpL gwup gKG g]upu gnp1qp ] B upu g ?[1Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer25bits per second. (If Orbit is driving the adapter, it can deliver at most 23 * 106 video bits persecond.)An important side condition governs the setting of BitScale so that the bit clock servooperates in a reasonable range:1/2 < 27 * BitRate / (bcMax * Scale(BitScale)) < 1The remaining parameters are more easily calculated. LineSyncDelay is simply (4096-n/4),where n is the number of bits of white margin to leave at the bottom of the page (after theSOS detector). PageSyncDelay is (4096-n/i), where n is the number of scan-lines to pass upafter receiving PageSync from the engine before starting SendVideo, and i is 1 for Dover IIadapters, 4 for older ones. And VideoGate is (4096-n/4), where n is the number of scan-linesto pass up after SendVideo starts before stopping SendVideo (on the M adapter, VideoGate isnot provided, and the falling of SendVideo is controlled by the printing engine). 2.3 Adapter commandsControl of the adapter, ROS and printer is accomplished with 16-bit commands. The high-order 4 bits of the command give a command code; the remaining 12 bits are used as anargument to the command. The command codes are:0Buffer reset.1Set scales.BitScale _ command[4-6]MotorScale _ command[7-9]ExtendVideo _ command[10] (T version only)TestPageSync' _ command[12] (should normally be =1)CommandLocal _ command[13]CommandBeamOn _ command[14]TestMode _ command[15]2Set bit clock register.BitClock _ command[4-15]3Set motor speed register.MotorSpeed _ command[4-15]4Set line sync delay register.LineSyncDelay _ command[4-15]5Set page sync delay register.PageSyncDelay _ command[4-15]6External command 1 (forwarded to printing engine)ExternalCommand1 _ command[4-15] (a register is set)7External command 2 (M version only) ExternalCommand2 _ command[4-15] (a register is set)Set video gate (T version only) VideoGate _ command[4-15]10b-17bSpare2.4 Adapter statusfp!qpG gaRbAqap g`/ g]; g[~]XRvpXqXRp'vp gU&(,up gSupC gRqp upupup' gP(up gO%up up gM :qp gLR gHu gEpqp 1 gD+u p& gB0]?zS ]]*4SS(]%SS$ ]!SS]S1S4]Sqp Ss6Sqp Si]_> g 3u g ?[Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer26The adapter constantly reports 256 status bits to the EIP. These bits are normally viewed asconsisting of 16 16-bit words. The first 8 words of status are reasonably independent of thekind of adapter (T or M) or the exact kind of printer attached to the adapter:WordBitsFunction0Special status from the ROS0SendVideo (sometimes called DelayedPageSync)1PrintMode2Local3BeamEnable4StatusBeamOn5StatusPowerEnable (M version only)1Command register0-15A copy of the command most recently received by the adapter2Bit clock0VideoPolarity (the setting of a switch)1-3BitScale (register set with command code 1)4-15BitClock (register set with command code 2)3Motor speed0SelectLeadEdge (the setting of a switch)1-3MotorScale (register set with command code 1)4-15MotorSpeed (register set with command code 3)4Line sync delay0Switch3 (the setting of a switch)2ExtendVideo (register set with command code 1 -- T version only)3TestPageSync' (register set with command code 1)4-15LineSyncDelay (register set with command code 4)5Page sync delay0Switch4 (the setting of a switch)1CommandLocal (register set with command code 1)2CommandBeamOn (register set with command code 1)3TestMode (register set with command code 1)4-15PageSyncDelay (register set with command code 5)6External command 10LineNoise1CompareError2BufferUnderflow3PacketsOK4-12ExternalCommand1 (register set with command code 6)70-3LineCount4-15ExternalCommand2 (register set with command code 7; M version only)4-15VideoGate (register set with command code 7; T version only)The remaining 8 words of status are normally used for external (engine) status of variouskinds. The TTL adapter organizes these words as follows:WordBitsFunction80-15Special status bits 0-15 (see Dover section for interpretation)fp!qpG gb6qp$ g`V g_qpqp7 g[]S gXSq]WYpS,]US]TOS]RS ]QES ]OSqp gLS]K1S; gH'S]FS']ES+]CS+ g@S ]? S(]=S-];S- g8S]7pS!]5S1qp ]4fS0]2S0 g/S].RS!],S/]+HS0])S+](>S0 g%4S]#S]"*S ] S] S]S3 g] S]S4qp ]S-qp gJ gQ qp* %]S ]S?& ?]6=Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer2790-15Special status bits 16-31 (see Dover section for interpretation)100-15ID (16 bits). This identifies the engine type.110-15Serial number (16 bits). This specifies the serial number of the engine.12-150-15Additional engine-dependent values, used by some printers (not Dover).2.5 Additional adapter featuresThere are a number of additional adapter features, chiefly for providing various kinds ofdiagnostic and debugging help.The ExtendVideo flag (T version only) can be used to override the action of the VideoGatecounter. Once SendVideo comes on, it will stay on until ExtendVideo is turned off and thenthe VideoGate counter reaches zero.There are two variations of "local" operation for checking out the printing engine. Themachine may be switched to Local by a switch on the engine (and reported as a status bit), ormay be set into this mode by setting CommandLocal. In the first case, the adapter extractscommands from a PROM that are intended to start paper motion and printing. Two switches(Switch3 and Switch4) govern the selection of one of four local command sequences that isextracted from the PROM. In both local cases, the adapter will generate "graph paper" videosignals governed by the video gate counter (VideoGate) and the line sync delay register(LineSyncDelay). In order to see graph paper cover the page, VideoGate and LineSyncDelaymust be set in such a way that they are counting as the beam passes all spots on the page.To aid debugging the adapter itself, the TestMode bit may be set. This permits the crucialprinter and ROS timing signals to be generated in the adapter rather than in the engine. IfTestMode is set, PageSync is taken from the complement of the control bit TestPageSync', andline sync (analogous to start-of-scan) is generated by the motor control circuitry: on the Madapter, it will be on for (15/16) * (4096-MotorSpeed) / crystalClock seconds and off for(1/16) * (4096-MotorSpeed) / crystalClock seconds; on the T adapter, it will be a signal onfor 4 * (4096-MotorSpeed) / crystalClock seconds and off for the same amount of time. The"on" portions of these signals simulate scan-lines of the corresponding durations.The BeamEnable status bit means that the doors to the ROS housing and/or printing engineare closed, and the interlocks have engaged.To force the laser beam on, and consequently to allow the servos to settle down, eitherCommandBeamOn or StatusBeamOn may be set. CommandBeamOn may be set by the EIP,and StatusBeamOn can be set with a switch in the ROS housing (M adapter).There are four switches on the adapter module that can be used to alter the operation slightly.The VideoPolarity switch will invert the sense of the binary signal sent to the beammodulator. SelectLeadEdge is a switch that selects either leading or trailing edges of the SOSand EOS signals for careful timing purposes (different ROS boxes operate differently).Adapter errors. The adapter keeps track of various kinds of errors that may occur during itsoperation, and reports some status bits. If the adapter detects errors on the line that deliverscommands to the adapter, it sets LineNoise or CompareError and ignores the command. Ifthe EIP fails to provide video data fast enough, the adapter sets BufferUnderflow (thiscondition is reset by the Buffer reset command). The PacketsOK condition is set by theBuffer reset command, and cleared whenever an improperly-formatted video data packet isreceived from the EIP.fp!qpG b]S@ `]S/ _]SI ]]SF gZcu gW7p2' gU gRqpB gQ*)upu gO|p# gLPS gJF gIFB gG qpD gF<1( gDqp5 gC2G gA-, g@(Z g<$7 g;w qp. g9 !u p& g8m[q g6pI g5c2qp g3? g2YR g/-1qp g-, g*|8 g(.qp g'r1qp qp g$FE g"5 g!<=q gpqp0qp gup7 g@! g? gqp? gw5" g-* gmqp &?TsProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer283. The Dover PrinterThe Dover printer is a Xerox 7000 copier, modified to substitute a ROS module for the opticsand to incorporate an engine controller that permits the printing operations to be controlledadequately by the adapter. This section describes the standard Dover engine, which operates ata paper speed of 10 inches/second. Dover can be "extended" in an experimental setting to runat 5 inches/second. The timing for the extended Dover is very different than the timingdescribed here.3.1 Engine ParametersSeveral engine parameters were mentioned in the adapter section. The values for Dover are:p10 inches/secondf32 facet polygonr24 clocks/revolutiond.90 scan-line duty cycleh12.5 inchesTypical settings in the T adapter for S=B=350 bits/inch are:BitRate=17 * 106MotorRPS=109.38MotorSpeed=1707MotorScale=7BitClock=3002BitScale=7LineSyncDelay=4046 (3008 for entire line for graph paper)PageSyncDelay=3971 (3596 on Dover II)VideoGate=33523.2 Engine timingThe engine timing for Dover is somewhat intricate, as there is a substantial "pipeline" effectin the paper path. The philosophy used in designing the engine control electronics has beento make them simple, and to require the EIP program controlling the engine responsible forsorting out most of the timing details.There is only one signal used to instruct the Dover engine: a PrintRequest signal that isgenerated by a 0-to-1 transition of the low order bit of ExternalCommand1. Thus twosuccessive adapter commands (first 60001b, and then 60000b) are normally used to cause thePrintRequest signal. The PrintRequest signal is used by Dover to feed sheets; be warned,however, that initiating and terminating a printing sequence are both a bit tricky, and requirecareful thinking (more on this below).Dover generates only one timing signal of interest: CS-5, which is transmitted to the adapteras the PageSync signal. All timing information relevant for paper-path motion is derivedfrom this signal. For purposes of discussion, it is helpful to "number" each of the CS-5pulses generated by the engine, starting with CS-5(0), the first to be generated as the machinecycles up.We shall describe the operation of Dover by describing the various sequences involved: (a) acold start assuming the motor is presently off (PrintMode is off); (b) the "inner loop," inwhich paper is happily flowing through the engine, and page after page is being printed; (c)the runout shut-down sequence; and (d) the malfunction shut-down sequence.fp!qpG#'ar g^pCqp g]&up g[S gZ] gX'up gW gSu gPpV]MuSp]L uSp]JuSp]HuSp]GzuSp gDNqp upup]A"Aq]?p]>]< ]; ]9 ]89]6%]4 g1u g.pW g-\ g+(qp. g*' g&A g%b? g#; g"XE g K gN& g"] g= gC g(7 g g(4 g]; g N gSJ g ?Y1Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer29Inner loop. We shall begin by describing the inner loop, as it is the simplest sequence.Refer to Figure 3-1 for an illustration of the timing. Let us assume that CS-5(n) hasjust occurred. Approximately 250 ms. later, the adapter should begin sending video tothe ROS that will correspond to the leading edge (left-hand edge) of the paper. Thistime will vary a little from machine to machine, and can be controlled with the helpof the PageSyncDelay register in the adapter. Imaging the page persists for about 850ms. Approximately 896 ms. after CS-5(n), the Count-H status signal is generated andpersists until the next CS-5 (Emperically, Count-H is on for only about 20ms. in olderadapters; it is much wider in Dover II adapters. Special provisions in the standardmicrocode provide help in detecting this signal reliably.) This signal indicates thatpaper was successfully fed to hold the image for the page that is being imaged on thedrum. If Count-H does not appear at the proper time, it is likely that somemalfunction has, or is about to, occur. Within 990 ms. after CS-5(n), it is necessary toissue a new PrintRequest (i.e., to send the adapter a "set External Command 1"command) if another sheet is to be fed (i.e., if you desire to keep printing at highspeed).Cold start. In order to initiate printing, the EIP issues a PrintRequest (again, by issuingthe "set External Command 1" command to the adapter). PrintMode should come on,verifying that power has been applied to the main motor. About 250 ms. after theprint request, CS-5(0) is generated. This first CS-5 identifies a machine cycle that willnot result in an output page: if you were to interpret CS-5(0) in the fashion describedabove for the inner loop, the first image you delivered would not be blessed with asheet of paper to receive it. However, if you issue a second PrintRequest within 990ms. of CS-5(0), the machine will cycle again, and generate CS-5(1). This CS-5 does infact correspond to a sheet of paper -- now you may enter the inner loop.A convenient way to think of the cold start sequence is to start the inner loop withCS-5(0), with two additional features on the first page imaged: (1) it will not betransferred to paper, and should therefore be "white" (in order to insure the bit clockservo is running properly), and (2) the Count-H signal will not be generated, becauseno sheet of paper was actually fed.Runout shut-down. Dover begins shut-down whenever it fails to receive aPrintRequest in time (i.e., within 990 ms. of a CS-5). The machine must continue tooperate for some time, however, in order to allow the last sheet of paper to be fusedand transported to the output hopper. There will be 7 gratutitous CS-5 pulsesgenerated after the last CS-5 that was produced by a PrintRequest. At the end of thissequence, PrintMode is turned off, indicating that paper path motion has stopped. Inorder to re-start the machine, a cold-start sequence is required.If you wish to resume printing before the 7th CS-5 has passed, you may resumeissuing PrintRequests, just as if you were in the inner loop (i.e., the first CS-5 afteryour PrintRequest will be blessed with a corresponding sheet of paper).Malfunction shut-down. When a malfunction is detected, the Dover printer shutsdown immediately, and does not wait for paper to be transported out of the machine.An appropriate malfunction status bit will be turned on (see next section), and themachine will halt (PrintMode goes away; no more CS-5's will happen). After anoperator has corrected the problem, the machine must be restarted with the cold-startsequence.fp!qpG]bu p<]`<]_ H]]qpA ]\ '-]Z9]Y:]W{P]US]Tq#2]RN]QgF]O'2]N]+#]LL]KS]H'u pqp)]F')]EQ]CI]Bup)+]@#0]? 4!]=6up ];H]8 H]7NC]59]4DB]2#]/uFp7].6], J]+B ])4"]'=]&uA]#I ?]!1'] ?G]up%]J] 9]N]4!]z\]3; RnProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer303.3 Engine status indicationsDover may report up to 32 bits of status to the EIP via the adapter. Most of these bits areunused. The table below gives the name of each status bit and a short description of itspurpose. The various malfunction indications are followed by a quoted string in italics; this isthe recommended operator message for the condition (adherence to standard messagessimplifies the job of the trouble-shooter).WordBitSignal83Count-H. This signal is raised if a sheet has been successfully fed to receive the image for thepage being imaged. Count-H comes on 896 ms. after CS-5 and persists until the next CS-5.85PTDisorder. This signal is active when the paper tray is not in the up position or when the papertray cover is open. It persists until the condition is corrected. This is the "or" of (not LS4) and(not LS24&LS31). "Paper tray open."88* LS4. This signal is active when there is adequate paper in the paper tray. A zero value will alsoassert PTDisorder.810LS27. This signal is active when progress from the A transport to the register stop module is notnormal. It persists until the paper is cleared. "Jam--paper feed."811* LaserOn. This signal is active when the laser power supply is on, and the beam is available foruse. "Laser is off." (Applies when the status bit is not present.)812* LS22. Malfunction Reset. Left as an exercise to the reader.813ReadyTemp. This signal is active when the fuser temperature is above 285 degrees F. Thiscorresponds to the minimum temperature needed to fuse the toner to the paper. "Fuser not warm."(Applies when the status bit is not present.)814LostPower. This signal is active when machine power is turned off when PrintMode was active (i.e.,the main drive motor was energized). It persists until the paper is cleared. "Lost engine power."815* ModeCont. This signal is active if the machine is set to run in its "extended", or half-speed,configuration.91PhotoCellOut. This signal is active when a sheet of paper has not been knocked off the drumduring machine operation. It persists until the paper is cleared. "Jam--paper on drum."92PreSeq. This signal is active if a malfunction occurs before the first page is imaged (i.e., during thepower-up sequence). "Jam--startup sequence."94* LS9. Two pieces of paper were fed. "Jam--two sheets fed."95ACMonitor. This signal is active when the machine is powered up. It is possible to haveReadyTemp-H active even though the ACMonitor-H is not. "Engine not powered up." (Applieswhen status bit is not present.)96LS38. This signal is active when a sheet of paper is jammed on the fuser roll. "Jam--paper onfuser roll."98* LS1. B Transport Jam. "Jam--B Transport."99Malfunction. This is a general-purpose signal that is the "or" of all the possible error indicationsgiven above (PTDisorder, LS27, LS22, LostPower, PhotoCellOut, PreSeq, LS38, LS1, LS3).910LS3. This signal is active when a sheet is not knocked off the drum and PhotoCellOut-H does notcatch it. It persists until the paper is cleared. "Jam--paper on drum."913* LS24&LS31. Paper tray is up and sensing bar is in place. Normally active. A zero value will alsoassert PT-Disorder.* Meaningful for Dover II adapters only.fp!qpG gbu g^pD g]m/* g[F gZc2 gX+ gUqB gS~B"?@RA,- gOB+7@ND@Mpw gKqBN@I gGB/3@F$1w gCqB%<@Blwq!wq g@B= g=B@@<=w@;Dqwq g8Bc@7 Aw g5YqBP@4 g1BB@0Dw g.1qBc@,w g*qB&w g(FqBQ@' 8wq@%wq g#uB((w @"8 gqBw gqB6/@)pqpq pqpq gBH@q4w gqB02@ g( g?V{Programmer's Guide to Orbit, the ROS Adapter, and the Dover Printer314. PerformanceThis section gives preliminary results on the performance of Orbit in actual printing runs.The basic test is to place as many characters of a given size on a page as possible before Orbit"gets behind." Orbit will get behind when the demands of composing video for a complexpage exceed the speed capacities of the Alto and Orbit.For these tests, Orbit is attached to a Dover printer running at 10 inches per second, 350 scan-lines per inch, 350 bits per inch. The Alto II driving Orbit is perfectly standard--the "disk" ituses is a Diablo Model 31. The fonts used are all versions of Helvetica, scan-converted fromspline representations. The tests reported here use the "standard" Orbit microcode, and do notresort to trickery of any kind. Orbit is flexible enough to do quite a bit more than is reportedhere.Bandwidth CapacityCharacterNominalWith diskWithout diskpoint sizechars/pagePortrait:6>11632*>11632*>11632*88748>1026011137105460>75607980123618>6300<6365142622>45034731Landscape:6>14000*>14000*>14000*88576>11008<11124105508>82148724<9030123735>5058>6516142652>4900>5035Explanation. The nominal number of characters per page is the number of characters of thegiven size that fit comfortably (without squeezing or overprinting) on a page. These numberscompare reasonably well with typical pages printed on EARS. The third and fourth columnsgive Orbit's measured capacity. The third column is measured with disk activity present (theassumption is that while printing a page of a given complexity, you must be reading from thedisk into another buffer a description of the next page, so that printing at the given capacitycan continue uninterrupted). The fourth column is measured with disk activity absent. Notethat absence of disk activity increases capacity only slightly. (Starred items exceeded charactersort size in my test program.)Storage capacityCharacterFont storagepoint sizein words/characterPortrait:624.3839.81059.11283.714111.Landscape:623.9839.41058.61282.914111.fp!qpG%}ar g^pL g]mO g[ I gZc7 gW~P gUb gTt] gR"= gQjU gO gMs]Iq#,]H  ]F@]E#,]C#,]B#,]AL#,]@#,]= ] g.H(4 g,_ g+>@ g)': g(4 g%s]!q# ] #]H] #]#]#]T#]#] ]`#]##]#]#]l# gI@XwProgrammer's Guide to Orbit, the ROS Adapter, and the Dover Printer32The table above gives storage requirements for a single character, including the necessaryindex table. Note that with Orbit, it is straightforward to economize on font storage byincluding only those individual characters known to be used on the page.Storage requirements for a "page description" (i.e., information about which characters are toappear where) are:2 words/character +4 words/rule (horizontal and vertical lines) +st/8where st is the total number of scan-lines on the (active) part of the page.Rule of thumbThere is a model (the details of which I will avoid stating here) that can be used to estimatethe numbers given above. Let r be the resolution of the ROS in bits/inch. Let s be the point-size of characters. Let p be 1.0 for fixed-pitch fonts and .6 for proportionally-spaced fonts.Let t be the total imaging time in seconds (.85 for Dover).The number of font storage words per character is roughly 3 + 7.2*10-6 p (rs)2. Themaximum capacity of Orbit in characters per page is roughly 2.1*106 t/(2.1*10-5 p (rs)2 +2.3*10-2 p rs - 6).5. MiscellaneousA pattern generator for gray (shaded) areas. A simple algorithm will generate acceptable graypatches on most printers. The scheme, devised by Mike Wilmer, is used to compute an 8-by-8bit pattern that can be replicated laterally to produce the shade (the INK memory can helpwith this). If you want a darkness D, where 0 corresponds to white, and 63 to black, a bit ofthe pattern should be 1 (black) if D is greater than the entry in the following 8-by-8 table:44 39 31 17 09 25 37 5220 26 33 41 49 35 28 1200 10 50 57 61 46 22 0206 18 42 58 62 54 14 0408 24 36 53 45 38 30 1648 34 29 13 21 27 32 4060 47 23 03 01 11 51 5662 55 15 05 07 19 43 59 ReferencesSevero Ornstein, "Orbit General Description," PARC/CSL Memo.Orbit Logic DrawingsOrbit Standard Microcode, saved on OrbitMc.Mu"ROS Adapter Functional Description," saved on RosAdFuncDesc.Ears.MECL version logic drawings saved on RosAdFiles.dm.fp!qpG gbL g`9 g_H g[@ gZc>WY>U.>TO gQEL gNs gJp;# gIhupqp up gGupE gF^up6 gC2;CqC2pupupCqC2p gAg)AqAgpupAqAgpupupAqAgp g?@)q?pup$:r g7p6( g6Q g4Gqp g3 up9 g1#up9S.]S,S+SS)S(IS&S%?S#'?r gp.qp g6 g#qp gB gqp/ g?TQBandhrqw><(x,y)>4096 bits)Y (0 to 4095;X (0 to 15; 16 scan-lines)>qRaster bit stream:1 0 0 0 (padded with zeroes)1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0Last scan-lineFirst scan-linerrHeightqrWidth<>1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 0Figure 1-1: Source raster and encodingFigure 1-2: Band bufferFigure 1-3: Copying a source rasterRaster bit stream, packed into 16-bit words:qEach scan-lineis scanned inthis direction$:#%$5 2 $,sG,s+G0WHG,s#GBA$9A$9d$k $ yk k|U$VA$rH$H$H$H$ H$ VH$ H$ 9H$ H$ H$ H$ H$ rH$H$VH$H$ pF>^@(Y(%\_%:|TVT%Z&$%W$]\ $W$$)pR)|R_)K*:NX$]*:T$pJQ3tJt%:Jt#J9$zJ9$$N9$N9$O-9$O9O9O-9N9N9"sPJ9"sP9"sQf9"sQ9 :Q9 :Qf9 :P9 :PJ9PJ9P9Qf9Q9T-9S9S9R9"sR9"sS9"sS9"sT-9 :Vf9 :U9 :UJ9 :T9&N$$N$"sN$ :N$N$N$M $P& @$R_ $T @$V $pE 'rt9&9 ) # pB,Lf$ |SpT R_ PITwFigure 1-5: Alternative memory-management schemesFigure 1-4: Page generation data structurescode (6)10000110010101101000------------4 (Width-1)-4 (-Height)>Font character (A)Font TableqrCharacterBand List1612201400The band list shows a single character (code=6, x=12, y=2014),FFFFBBBBBiiiiii-1i-1i-1123>Another font characterfollowed by an end-of-band indicator. Memory addresses increase upward. t 212+pH_8PG8OGIOG +8XG8T-G8QG8V$9;T9;W :G : +G)dG :&G3&G<dG3 +G3G VG V +G:dG V&G V%$ :%$ :$3$r$r"$t%3$#l6t"O #3#6tkp#VA%:7 8V]$]t2$2728JtGIAG +8AG8AG7pBB+B ]$9;B 7lH 9BLWHICH (if 0, auxControl set status address;Figure 1-6: Orbit functionsbadROS (error in adapter status)stableROS (no arriving adapter status)BEHIND (buffers switched before GOAWAY)ROS status (addressed by OrbitControl)if 1, auxControl sets FA)ESS (enables setting SLOTTAKE)SLOTTAKE (routes output data to ROS)clrBEHIND (clears BEHIND indicator)CLRFRESH (clears refresh indicator)RESETOrbitControlF2=15boutOrbitStatusF1=17binOrbitHeightF2=12boutOrbitXYF2=11boutOrbitDBCWidthSetF2=10boutOrbitFontDataF2=13boutOrbitDBCWidthReadF1=15binOrbitDeltaWCF1=14binOrbitROSCommandF2=16boutOrbitOutputDataF1=16binOrbitInkF2=14boutOrbitBlockF1=3--Ink dataData from Orbit output buffer16-bit command for ROS adapterNo. of full words processedDelta BC(Width-1) remaining16-bit word from source raster dataDelta BC(Width-1) for characterXY (of lowest edge)-HeightauxControlsetGOAWAY(signals end of image generation)INCONunstableROSmcTIMEOUTmcIACSmcearlyPageAbortmcbadBandEntrymc+WR_+stO+Wp5{ +W9&+W<%'+W>^&6 $< 9$<$r$>$$?$9AI$9sAI$9:AI$9AI$9AI$9C_#$A&$]A&#$(AI$9,sP&+WGB+WI{$+WK#+WT#+WVG$G$J $J-$LB 9$Lf$ V N{ $ N$ #R$#S$%:U&$%:UJ$r'sW_U$'sW$9a$_ $_$] _ $ a$a$_ $_ $(_$9a$ _k9_k9_k99_$9 r_$9 _$9_$9V_$9_$9_$9:_$9s_$9!_$9$_$9&W_$9.A#$(,,$9, #$, $]-Z =ZFZ-BB =BBFBB-0z =0zF0z--%=-%F-%-)=)F)-&z =&zF&z-#%=#%F#%- =F-z=zFz-$=$F$-=F-y =yFy/^$]/^#$(/$91#$[#$(Y$9Y#$Y$]*#$(($9(#$($]%^$]%^#$(%$9'#$$A#$(",$9"#$"$]$]#$($9 #$#$($9]#$]$]$]#$(+$9A#$#$($9#$$]A  9 $9A ",$9"r" %# ($9)A)A ,,$9V,V, /$9/Y$9Y$9:Y$9sY$9Y$9!Y$9$Y$9&WY$9Z& +WM*!^.k:^.k^.k ^.k9^.k(^.ki.$9AI$9 rAI$9 AI$9 AI$9 <$r <U$ :{$V8B$6,$ 6 $+W79 7 5{AI$9V8e$ :$?$9>$8B$V:{r$?$?$6,$8e$<%>^V=f$V:$L[ of scan-lines.and then counting VideoGate before terminating SendVideo. All counting is done in termsSendVideo is generated in the adapter by counting PageSyncDelay after CS-5 arrives,>Scanning beam Figure 2-1: Conceptual model of the imaging processFigure 3-1: Dover printer timingooEnd of scan detectorStart of scan detector><896 ms.<850 ms.><1000 ms.>CS-5(n)Image for page nPage sync delayVideo gateDover IIDover II  X S:KsLBU$rLBJ$VtFm33 ]pN]]5z\N{ \<8GP:G0QC$ $0QC $9Qf$ 0[C$<[C$DQf$ <QC $<QC$ $QC$ $QC $"sQf$ [C$r[C$VQf$ rQC $rQC$ $%:[C$.Qf$ %:QC $%:QC$ $-%+$$+$y/: $$DX/:9$?W+$DX+$ys; (0z^9_J9_9J9J-9I9V2.e+z <($=($>;($?W($@t($A($B(H$B',$B%$ %$ ',$ (H$ :($($($($($($!Vx'OB'OFII{ HELVETICA HELVETICA HELVETICA  HELVETICA  HELVETICALOGO TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN TIMESROMANMATH  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMANMATH  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN TIMESROMAN MATH  TIMESROMAN HELVETICA  HELVETICA  HELVETICA  HELVETICA  HELVETICA HELVETICA HELVETICA HELVETICA HELVETICA  HELVETICA  HELVETICA  HELVETICA GATES  : d l% c/ 8@ rI S ]`Oh q qz g b W U  d 9_c'''ide-0.press orbitguide-1.press orbitguid(c'''PRESSEDIT.RUN orbitguide.press _ orbitguW\' PRESSEDIT.RUNguide-0.press orbitguide-1.vW' PRESSEDIT.RUN.sil; pressedit orbitguide.WKj/"& orbitguide.press SwinehartCreated with Pressedit