RFC 186
Network graphics loader
Network Working Group ยท J. Michener ยท MCG Request for Comments: 186 ยท NIC: 7130 Date: 12 July 1971 Category/Status: not stated in this document Obsoletes / Updates: neither is listed
A Network Graphics Loader ๐
MOTIVATION ๐
okay so this facility lets remote users on the ARPA network grab graphics output from programs they write for the Evans and Sutherland Line Drawing System Model 1 (LDS-1) sitting at the DMCG computer ๐ฅ๏ธ and users at that computer can also do graphics on their ARDS and IMLAC consoles. main character energy ๐
INTRODUCTION โจ
The Graphics Loader on the Project MAC Dynamic Modeling/Computer Graphics PDP-10 is for use with the E&S LDS-1 display. Display programs can be shipped to it and run over and over. The output, which would normally show up at the PDP-10 installation, gets sent back to the originating site in digital form ๐ฆ
Corrections and changes to display programs can be sent too, so the bulk of the program only has to go over once. Any data or parameters that change can be sent whenever they change ๐ธ
The originating site can ask for any part of its program or data to be sent back from the Graphics Loader. This is so good for debugging, because you can catch a display program that's accidentally modifying itself ๐
To keep the Graphics Loader simple, we assume the display program takes up a contiguous block of core starting at location 1000 octal (aka it's been assembled absolutely), its first executable instruction is in that same spot, and when one frame is complete, it jumps to location 777 octal ๐ง
The E&S LDS-1 can write the coordinates of the endpoints of line segments into memory, the ones that would be visible to someone sitting at the LDS-1 display device. A register called the Writer Address Register (WAR) points to the area of memory that holds these coordinates. There are a few submodes for output to memory, but the one we care about most is "Scaled Coordinates to Memory" mode. In that mode, each "visible" line segment stores two words of coordinate data, and the WAR goes up by one for every word stored โจ
For each execution of the display program, the Graphics Loader sets the proper output mode (which suppresses output to the cathode ray tube at the DGSD machine), initializes the WAR before execution, and saves the final WAR value after execution. So it's super easy for the Loader to send the user only the "visible output" of the display program ๐
DESCRIPTION OF REQUESTS FROM THE REMOTE USER PROGRAM ๐
Requests come in the form of 36 bit words. The first word of a request is split into two 18 bit fields. The left half holds a number identifying which of six operations is being requested. The right half is either a mode or gets ignored, depending on the operation. (If the left half isn't a valid operation number, an error message is sent and the next word is treated as the start of a new request. not it being a fresh start ๐ญ)
Depending on the operation and the mode, one word of argument data may or may not be read. This word is also treated as two 18 bit halves, and how those halves get read depends on the operation. When we describe individual operations, the left half is called A1 and the right half is called A2 (standing for Arguments 1 and 2) ๐
Error checking of the arguments happens next. If there's an error condition, error information gets sent to the user program at the originating site, and the Graphics Loader gets ready for the next command. If there's no error, an acknowledging message is sent unless the Suppress Acknowledgement mode prevails. For certain requests, the operation actually gets performed before the acknowledgement goes out ๐ซถ
For operations that move display program information (either to or from the Graphics Loader), that transfer happens next, after the argument error checking and after an acknowledge message has been sent.
Once all that's done, the Graphics Loader reads the next command. periodt ๐
SPECIFICATIONS ๐ฅ
0. Valid operations ๐
The valid operations are currently:
SETUP indicated by an operation number of 1
EXECUTE indicated by an operation number of 2
TRANSMIT indicated by an operation number of 3
UPDATE indicated by an operation number of 4
FLUSH connection indicated by an operation number of 5
MODESET indicated by an operation number of 6
An invalid operation number is an error condition (condition number 0). iykyk ๐
1. The SETUP request. ๐ฆ
The mode field of the first word is ignored. SETUP requires an argument word. The arguments A1 and A2 are both treated like lengths, so both must be non-negative numbers. If they aren't, error condition 2 is recognized ๐ธ
1A. ๐ง
If A1 is strictly positive, then this request describes a whole new display program, and any previous display program from this user is to be forgotten. In this case, A1 is the total length of the display program, excluding the area that the Write Address Register (WAR) will address. A2 is the length of the area the WAR addresses. As such, A2 must be at least twice the greatest possible number of visible line segments to be displayed. (If the LDS-1 programmer feels sure of themselves, they may set up their own "WAR area" and set their own "Output To Memory" modes. They wouldn't need to use the A2 parameter at all. the confidence is everything ๐ )
An acknowledge message is sent (unless suppressed; see MODESET). Then the display program is read, which consists of (A1) words.
1B. ๐
If A1 is zero, then this request is for a change in the length of the area the WAR addresses. A2 contains the new length. A2 may be larger or smaller than the current length of the area. If no previous 1A type of SETUP request has been processed, error condition 1 is recognized. Otherwise an acknowledge message is sent (unless suppressed, see MODESET).
(This request would typically be used if an initial estimate on the number of words required were too low. Error condition 5, described under EXECUTE, may indicate a low estimate. ๐)
2. The EXECUTE request. ๐
The EXECUTE request doesn't take a parameter word, but the mode field is used to specify the number of times the "EXECUTE action" is performed. (This "action" is described in detail in the next part. Briefly, it's a single execution of the display program.) If the mode field is zero or negative, then one EXECUTE action is performed. Whenever an error comes up during a multiple EXECUTE, the iteration stops immediately. This way, the status of the display program after the error isn't destroyed, and no flood of error messages is ever sent, only a single one โจ
The EXECUTE action is as follows:
If no previous SETUP request has been processed, error condition number 1 will be recognized.
An attempt is made to seize the E&S LSD-1 display processor. (If a previous EXECUTE has succeeded in seizing it, then this will also succeed. If some other user of the DMCG machine has control of the display processor, this will fail and error condition 4 will be recognized.) ๐ฅ
The display program is now executed. The environment at the beginning of execution of the display program is given in Appendix 1.
If a previous execute failed in a way indicating a programming error in the display program (error conditions 6, 7 and 8), then a SETUP or an UPDATE request must be executed before another request will be processed.
(If no SETUP or UPDATE is given before another EXECUTE, then error condition 3 is recognized.)
If the LDS-1 runs for two seconds without causing an interrupt or jumping to the "finish" location (the word before the origin of the display program), then it's assumed the program is running away. The LDS-1 is stopped, and error condition 6 is recognized. (A SETUP or an UPDATE is required before another EXECUTE is permitted.) ๐
If the LDS-1 stops because too many output words are stored (i.e., if the WCR becomes positive or zero), error condition 5 is recognized. The number of output words made available to the user is as specified by A2 of the most recent SETUP request.
If the LDS stops in any manner other than either those described above or by jumping to the word before the origin (the "finish" location), then error condition 7 is recognized. (A SETUP or an UPDATE is required before another EXECUTE is permitted.) ๐ญ
If the LDS-1 stops by jumping to the finish location, then the value of the WAR at that time determines how much output in the "WAR area" the user may access ๐ฆ
If the WAR has been altered so that it contains an address smaller than its initial value, then the effective value of the WAR is its initial value. If the WAR contains a value greater than the address of the end of the area for output, then a WCR stop error is imitated (the effective value of the WAR is the maximum allowed by SETUP, and error condition 5 is recognized). The situation in which no error is recognized will be called a "normal stop" ๐
Summary for Normal Stop:
Origin |
----->+-----------------+ |
| | |
| Display Program | - <--If WAR here, it is set to here._
| | | |
+-----------------+ _| |
|
<-------------------------------------+
_
+-----------------+ |
| | |
| WAR output area | - <--If WAR here, it is left alone.
| | |
+-----------------+ _|
_ <-----------------------------------+
| |
| |
- <--If WAR here, it is set to here,+
| and error condition 5 is
| recognized.
|
If no error condition is recognized for an EXECUTE request, an acknowledge message is sent (unless suppressed; see MODE SET). The effective value of the WAR is saved for later use in determining how much output the display program generated, but it's only saved for normal stops and WRC positive stops. โจ
After a normal stop, if Auto-TRANSMIT mode is set (see MODESET, below), then a TRANSMIT request is simulated (using the arguments specified in the MODESET request that initiated Auto-TRANSMIT mode). Otherwise, the next request is begun. ๐
3. The TRANSMIT Request โจ
okay so TRANSMIT takes one argument word and decodes the mode field ๐ , except in special cases (obviously ๐). Normally A1 tells you how many words of display program and/or output (in the WAR area) get sent ๐ฆ, possibly after data format conversion as the mode field says. A2 is the starting address of the block of data that gets (converted and) sent ๐ฆ.
3A. Special Case ๐
If A2 is zero, the mode and A1 are ignored, periodt ๐. An acknowledge message gets sent (unless it's suppressed), then a length word containing 1 goes out (36 bits: left half word equals 1, right halfword equals zero), and then a word with the origin address for display programs. That address should always be 1000 (octal) ๐ธ. It might have to change though, which is why this mechanism exists: so the user can find out what its value is ๐ง.
3B. The Normal Case ๐
The normal case is when A2 is non-zero.
If there has never been a SETUP request, error condition 1 is recognized ๐ญ. If the mode field is non-zero or 1, or if A1 is negative, or A2 is less than the origin (but not zero), or A1 + A2 is greater than the current "effective value of the WAR" (more on that in a sec ๐), then error condition 2 is recognized ๐ .
The "effective value of WAR" always points to the word beyond the last word of output from the LDS-1 ๐ฏ. Before the first EXECUTE request, it points to the word after the end of the display program, which means zero words have been output ๐ซถ. EXECUTE requests change this value in different ways (depending on error conditions and so on), as described earlier. The effective WAR value also gets updated for SETUP requests, which can change the size of the WAR area (type 1.B), and for UPDATE requests, which can increase the size of the display program so that the whole WAR area gets shifted โจ.
If the parameters are correct, an acknowledge message is sent (unless suppressed; see MODESET) ๐ฆ.
If A1, the number of words to be reformatted (possibly) and sent, is zero, the block of words to be processed starts at A2 and ends with the last word before the effective WAR value ๐. So the number of words to be processed is "the effective WAR value minus A2" ๐งฎ.
If the mode field of the first word of the request is zero, no reformatting happens: an exact copy of the core image gets transmitted ๐ธ. If it's a one, the block of words to be processed is assumed to contain the coordinates of end points for a sequence of line segments ๐. The odd-numbered words (counting starts at one, not zero!) are assumed to be set-point data, and the even-numbered words are assumed to be draw-to data ๐. (This matches LDS-1 "Scaled Coordinate to Memory" mode as long as no dots are displayed!! ๐) The line segments get recoded into ARDS format: five seven-bit ASCII characters per word, with the rightmost bit of each 36-bit word unspecified ๐. The last word may contain null ASCII characters (all zero) to fill out the word ๐งธ.
The first word transmitted (after the acknowledge message, if there is one) has a left half of 3 and a right half of 0 (for an exact core image) or 1 (for ARDS format) ๐.
The next word has a left half equal to the number of words that follow, and a right half of 0. For ARDS format, that's the number of words after reformatting, of course ๐
.
Unless zero words are to be transmitted, the next words are the data request ๐ฌ.
Note that the following sequence of requests could be used to simply convert line data (in the correct format) to ARDS format ๐ช:
(The notation "A,,B" stands for a 36-bit word whose left half has the value "A" and whose right half has the value "B".)
Establish network connection
SETUP,,0 ; start
2n,,0 ; data representing "n" line
; segments follow
+----------------+ _
| | |
| | - 2n coordinate pairs
| | _|
+----------------+
TRANSMIT,,2 ; request ARDS transmission
0,,1000 ; convert and transmit the
; whole "program"
FLUSH,,0 ; signoff
4. The UPDATE request โจ
The UPDATE request lets part of the display program get altered, and also lets the end of the display get extended (to include more data, maybe) ๐ ๏ธ. The mode field of the first word of the request says how many times the EXECUTE-action gets performed if the UPDATE request succeeds ๐. It takes an argument word similar to TRANSMIT's (so A1 is a length and A2 is an address) ๐งฉ.
If no SETUP request has been executed before, error condition 1 is recognized ๐ญ.
If A1 is negative, or if A2 is less than the origin of the display program, error condition 2 is recognized ๐.
If A1 + A2 is greater than the end of the display program, the length of the display program is increased to equal "A1 + A2 - origin" ๐. The WAR area stays the same length as before, and its contents get shifted to their new locations ๐. The "effective WAR value" (see TRANSMIT) goes up by the amount the display program length increased ๐.
An acknowledge message is sent (unless suppressed) if no error condition is recognized (and if no problem with core size limitation comes up) ๐. Also, the flag that gets set by severe error conditions during EXECUTE requests is cleared by successful UPDATE requests ๐งน.
The next "A1" words are read and stored in consecutive locations, starting at location "A2" ๐ฅ. If A1 is zero, no words are read ๐ซง.
If the mode field of the first word of the UPDATE request is positive, it's taken as an iteration count for a multiple EXECUTE request ๐. Otherwise, the next request gets read from the Network ๐ก.
5. The FLUSH request. ๐
The FLUSH request takes no arguments and ignores the mode field of the first word of the request ๐. No acknowledge message is sent ๐ค. The network connection gets broken and the process destroys itself ๐ฅ.
6. The MODESET request ๐๏ธ
The mode field of the first request word gets decoded first ๐. If it's zero or less, or if it's greater than (currently) 6, error condition 2 is recognized ๐ค.
6A. Mode 1 ๐
If the mode field is 1, acknowledge messages and ASCII error messages are not to be suppressed ๐ฃ.
6B. Mode 2 ๐คซ
If the mode field is 2, acknowledge messages and ASCII error messages are to be suppressed ๐.
6C. Mode 3 ๐ช
If the mode field is 3, you exit from Auto TRANSMIT mode (see 6D) ๐โโ๏ธ.
6D. Mode 4 or 5 ๐ค
If the mode field is 4 or 5, then whenever an EXECUTE has a normal stop, a TRANSMIT request gets performed automatically โก.
The mode field for that transmit is to be 4 less than the mode field for this MODESET request ๐งฎ. One (more) word is read from the network ๐ฉ. It contains the arguments for the TRANSMIT ๐. (That is, the word is saved and used when the TRANSMIT operation is performed. The values of the arguments get checked at that time, not during the MODESET request โฐ.)
EXAMPLE ๐ฌ
Okay, picture this ๐๏ธ: a display routine calculates and saves a different 3-dimensional transformation matrix each time it runs (say, to make an object look like it's spinning ๐). The user of the routine would typically want to set up the matrices and then "let 'er rip" with ten or twenty (or more) executions ๐ฅ. Here's how that goes:
SETUP,,0
+-->length,,2000 ; length of display pgm
| - ; large output area
| | -----
| | -----
+--> -----
| program
| -----
| -----
-
MODESET,,5 ; auto transmit in ARDS mode
0,,1000+length ; arguments for transmit
; meaning "current contents
; of output area"
EXQ,,10 ; execute 10 times, sending
; the data each time
UPDATE,,20 ; update, then execute 20 times
8,,address of matrix ; arguments for update, to
- ; change a matrix
|
8 words - new matrix
|
_
etc.
The output from the Graphics Loader for this example would look like this ๐ผ๏ธ:
ACKNOWLEDGE setup,setup :(See description of ACKN
; for format in word)
ACKNOWLEDGE modeset,modeset
ACKNOWLEDGE transmit, exq
output,,1 ; output in ARDS mode
leng1,,0
_
|
- data
|_
ACKNOWLEDGE transmit,exq
output,,1
leng2,,0
_
|
- data
|_
. (in total, there are 10 sets of output.)
.
.
ACKNOWLEDGE update,update
ACKNOWLEDGE transmit, update
output,,1
leng11,,0
-
|
- data
|
-
.
. (in total, there are 20 sets of output.)
.
ACKNOWLEDGE MESSAGES ๐
These messages are each a single 36-bit word ๐ฆ. They can be suppressed dynamically by the MODESET request ๐๏ธ. The left half of the 36-bit word says it's an acknowledge message by containing a 1 ๐โโ๏ธ. The right half gets split into two 9-bit fields (quarters) ๐ฐ. The right 9-bit field (within the right half word) holds the opcode field of the last request the user sent ๐จ. So if an UPDATE request came in last, this field is a 4 ๐ข.
The left 9-bit field (within the right half word) holds the number of the action actually being performed ๐ฌ. This only differs from the opcode of the last request received when you're in Auto TRANSMIT mode, or when a positive mode field shows up in an UPDATE request (which is an EXECUTE count) ๐.
Here are the possible pairs of these fields ๐. Heads up: Auto TRANSMIT mode sends only one acknowledge message, which says both that the display program ran successfully and that the TRANSMIT parameters are correct โ .
Currently Most Recent Comments:
Executing: Request
Received:
SETUP SETUP ; Sent before data words are read.
EXQ EXQ ; Never sent in Auto-Transmit mode.
TRANSMIT EXQ ; Only sent in Auto-Transmit mode.
TRANSMIT TRANSMIT
EXQ UPDATE ; Never sent in Auto-Transmit mode.
TRANSMIT UPDATE ; Only sent in Auto-Transmit mode.
UPDATE UPDATE ; Sent before data words are read.
MODESET MODESET ; When setting up Auto-Transmit mode,
; this is sent before the argument
; word for TRANSMIT is read.
ok that's the whole vibe for this part bestie ๐๐
Note 1) bestie, a MODESET request that suppresses acknowledge messages is never acknowledged ๐, and one that permits acknowledge messages is always acknowledged โจ. no cap, that's consistency and it's giving ๐
Note 2) requests that read data words (certain SETUP, UPDATE and MODESET requests) send acknowledge messages (unless suppressed) before they read the data words ๐ฆ. so the acknowledgement always goes out first, and the reading comes after ๐
ERROR MESSAGES ๐
okay so these messages contain one or more words ๐ธ. if acknowledge messages are suppressed, then only one word gets sent. (the assumption was made that brevity would also be wanted for error messages if it's wanted for normal output. iykyk ๐)
the first word (or the only word) has a left half of 2, which is how you know it's an error message ๐จ. the right half holds the number of the error condition that was recognized. the numbers are summarized below ๐.
if the long form of the error message is being used, extra words get sent too ๐ง. the first of those is a count word with a positive count of the remaining words in the left half and zero in the right half. the words after the count word each hold five 7-bit ASCII characters (the last word may end in null characters) and together they spell out a descriptive error message. here's the lineup:
Error Condition Number Error Message
0 UNRECOGNIZED OPERATION CODE
1 PREVIOUS SETUP REQUIRED
2 INVALID MODE OR OPERAND FIELD
3 PREVIOUS EXECUTE FAILED
4 DISPLAY PROCESSOR OCCUPIED
5 OUTPUT AREA OVERRUN
6 DISPLAY ERROR: TWO SECOND TIME OUT
7 DISPLAY ERROR: IMPROPER DISPLAY STOP
8 DISPLAY ERROR: MEMORY PROTECTION VIOLATION
OUTPUT FROM TRANSMIT ๐บ
this output is made of three parts, bestie ๐ซถ. first there's an identifying word with a left half of 3, and the right half holds 0 for image mode or 1 for ARDS mode ๐. next comes a count word, where the left half tells you how many words follow it and the right half is zero โญ. after that you get zero or more data words, in whatever data format the first word indicated ๐.
Appendix 1 ๐ง
the environment at the start of the user's display program's execution looks like this:
This LDS-1 is in program mode.
RAR/ Origin of user's program.
WAR/ First word of a block of core at least as long
as requested via SETUP operations. This block
immediately follows the last word of the display
program.
PC/ Origin of user's program.
SP/ Address of first word beyond the end of a 200
(octal) word area of combined data sink and
control register stack.
P1/ Unspecified.
P2/ Unspecified.
DSP/ First word of a 200 (octal) word area of
combined data sink and control register stack.
UR/ Unspecified.
RCR/ Unspecified.
WCR/ Minus one plus the negative of the length of the
"WAR area" as specified in the most recent
SETUP request.
DIR/ Stop on WCR positive.
Do not stop on Hit.
Matrix Multiplier inactive.
"Overlap" permitted.
Two dimensional mode.
Do not "Do Twice".
RSR/ Unspecified.
SR/ 0, except for bits not under program control
like the stylus "Z" coordinate bits.
NEXT/ Unspecified.
SAVELB/ -3777,,-3777
SAVERT/ 3777,,3777
VIEWLB/ -3777,,-3777
VIEWRT/ 3777,,3777
WINDLB/ -3777,,-3777
WINDRT/ 3777,,3777
INSTLB/ -3777,,-3777
INSTRT/ 3777,,3777
NAME/ Unspecified.
CDIR/ Scaled Coordinates to Memory
Curve mode inactive.
Minimum effort inactive.
Solid, not dashed lines.
Self mode inactive.
HITANG/ Unspecified.
SELINT/ Unspecified.
Matrix Multiplier/ Unspecified.
Origin of program -1/ (Should be jumped to when the
display program is finished.)
[This RFC was put into machine readable form for entry]
[into the online RFC archives by Lorrie Shiota, 10/01]
๐ฆ where this page comes from
- ietf: rfc186 1971-07
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms