APPARATUS FOR EXTENDING WINDOWS USING Z BUFFER MEMORYThis invention relates to logic circuitry and, more particularly, to logic circuitry which may be utilized to increase the number of windows whioh may be displayed by a computer system.
History of the Prior ArtOne common interface used for computer operation utilizes multiple windows displayed on a cathode-ray tube to represent individual computer applications. In a system using windows, more than one program at a time is placed in a portion of memory available for instant call. The text and graphics output of each such program is made to appear in a window, a particular set of defined boundaries on the screen. Usually, the computer operator is operating a single one of these programs but may switch (often by a single keystroke) to another program in another window to work with that program, to call data from that program, to place data in that program, or for any number of other reasons.
Each window may overlap other windows with the "front window" constituting the current active work file. The user may add or delete information from the current window, add new items to the window, refile the window in another location, and, generally, perform any other operations on the grogram in the window as he might were there no other windows.
Windowing systems have been found to be quite useful for advanced computer operations. For example, a skilled computer operator finds windowing systems to be quite useful for providing rapid shifting bdtween different programs and documents. In a system which does not use windowing, the operator usually has to close one program before he may call up a new program in order to work with the new program. This takes a substantia: amour,. of time. Moreover, a primary reason for switching between programs is to transfer data and graphic  images between programs. A system which does not utilize windowing does not usually allow the easy transfer of information between programs.
It was, among other things, to make the operation of computers more rapid and to facilitate the transfer of data between documents and programs that windowing system were devised.
For complicated tasks, it is often desirable to have running at the same time any number of windows, each with its different individual program or document, just as one might have many individual documents on one's desk for use in completing a particular task However, most windowing systems are incapable of providing more than a limited number of windows which may be accessea at one time. Consequently, such systems still require, although to a lesser degree, that the operator switch between programs by closing one program before opening another where more than sixteen programs or documents are involved.
it is, therefore, an object of the present invention to provide a computer system which includes logic circuitry defining a windowing system which allows the selection of an essentially unlimited number of windows.
It is another object of this invention to provide a computer system capable of handling a hrge number of programs or documents at one time.
An additional object of the present invention is to provide logic circuitry for a computer system which may be selectively utilized for increasing the number of windows available at one time.
SUMMARY OF THE INVENTIONThese and other objects of the invention are accomplished in a computer system which includes a display memory for storing information to be presented on an output display, a window identification memory for storing information regarding window position on an output display, a window identification register for storing window identification numbers indicative of the window in which a particular piece of data is to appear, a window identification comparator for determining if a number in the window identification register is equal to a window identification number at a particular pixel in the window identification register, a Z buffer memory for storing information indicative of the depth of information to appear on an output display, a Z buffer register for storing information indicative of the depth of each piece of information, a Z buffer comparator for determining whether the informative in the Z buffer register is at a depth equal to or less than the depth of the information stored in the Z buffer memory, a window extension register for storing a window number greater than is capable of storage in the window identification register, a control register for causing the storage of window identification numbers in the Z buffer memory, a window extension comparator for comparing numbers stored in the window extension register with numbers stored in the Z buffer memory, and write enable circuitry responsive to the window identification comparator, the Z buffer comparator, and the window extension comparator for causing information to be written to the window identification memory, the Z buffer memory, and the display memory.
These and other features and advantages of the present invention will become apparent to those skilled in the art upon reading the following detailed description in conjunction with the several figures of the drawing.
In the DrawingsFigure 1 is a block diagram illustrative of an arrangement for provide a plurality of windows disclosed in a copending patent application.
Figure 2 is a block diagram illustrating an arrangement in accordance with the invention for increasing the number of windows available for display at the output of a computer system.
Figure 3 is a pictorial illustration of the areas mapped out by storage of window numbers in the window identification memory where a window extension system is utilized in accordance with the present invention.
Figure 4 is a pictorial illustration of the areas mapped out by storage of window numbers in the Z buffer memory where a window extension system is utilized in accordance with the present invention.
Figure 5 is a truth table which may be utilized in understanding the operation of the circuitry of Figure 2.
Figure 6 is a diagram illustrating the bit size of the windows and depth indications which may be stored together in the Z buffer memory in one specific embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTIONReferring now to Figure 1 there is shown a windowing system for use in a computer system such as that illustrated in the copending patent application referred to above assigned to the assignee of the present patent application.
Figure 1 illustrates a window identification output system 10 which is utilized to provide output signals to a cathode ray tube (CRT) 12 which displays the different windows.
To produce an output on a computer output display, the screen full of images or text is represented in a block of memory known as a "bitmap". In its simplest form, each picture element (pixel) on the screen must be represented by a memory bit. For example, if the display screen has 1024 by 1024 pixels, then slightly more than one million bits of memory are necessary to represent each screen. In order to produce a color output, it is usual to have a number of bits of memory for each pixel of the display memory. In a preferred embodiment, each display memory may include twenty-four bits of storage for storing color information at each pixel. This is referred to as a 24 bit RGB color value.To store these 24 bit RGB color values, the system 10 includes a pair of double-buffered display memories 14 and 16, each of which includes a full bitmapped memory and are referred to as memories A and B. The system 10 also includes a window identification (WID) register 18 which in a preferred embodiment stores four bits of information and a window identification (WlD) memory 20 which in the preferred embodiment comprises a full screen bitmapped memory which also stores four bits of information for each pixel.
A window identification (WID) comparator 22 receives output signals from the WID register 18 and the WID memory 20. The system 10 also includes a multiplexor 24, the cathode ray tube 12, write enable logic 26 for selectively enabling the writing of information to each of the display memories A and B and the window identification memory 20,, and a control register 28 for controlling the operation of the system 10.
In operation, windows are first selected-by values provided from a central processing unit (CPU). These values include both a pixel address and a window identification number for each pixel to be included within the window. The window identification number is written to each corresponding pixel lying within the boundaries of the particular window in the window identification memory.
When a first window is written to the window identification memory, each memory position within that window carries the window identification number for that window. When a next window which lies in front of the first window is written to the window identification memory, the portions of the second window which overlay the first are written on top of the overlapped memory position of the first and, therefore, automatically cover and clip the first. After all of the windows desired have been stored in the window identification memory, the window identification memory has stored indications as shown in the display of the CRT in Figure 1.For example, the first window to be defined in the window identification memory is shown as window 0 on the CRT, the second window (which overlays the first) as window 1, and the third window (which is in the foreground) as window 2.
When it is desired to write information to the display memory for particular windows, the information is written into the selected display memory A or B from the CPU through the data bus. The information includes a pixel address, an RGB color value as discussed above, and a window identification number. The window identification number is stored in the window identification register 18 and compared to the window identification number previously stored for that pixel in the window identification memory 20. If the window identification number stored in the window identification memory 20 is the same as that in the window identification register 18, the comparator circuit 22 causes the write enable logic 26 to allow the RGB information to be written to the addressed pixel of the selected display memory A or B.If the comparator circuitry 22 determines that the window identification number is not the same as the number stored for that pixel in the window identification memory 20, then the RGB information is not  stored in the display memory. Consequently, only at those addresses of the selected display memory which are within each particular window to which the information is addressed will signals for that window be written. The signal written to the display memory is ultimately transferred from the particular display memory via a multiplexor controlled by the control register 28 to the cathode ray tube 12 shown in Figure 1.
Because it utilizes only four bits for storage of the window identification number, the system 10 illustrated in Figure 1 is capable of storing information related only to sixteen windows, the total of unique binary numbers which may be represented in four bits. Obviously such a system cannot be utilized to provide more than sixteen windows at one time without modification. Moreover, it is even more obvious that the provision of a significantly larger number of available windows would render computer systems much more useful in many situations.
The copending patent application referred to above also discloses an arrangement for incorporating three dimensional output displays on the system output device. The system incorporates apparatus for storing informationindicative of the depth of each pixel to be provided as output for a particular display on the cathode ray tube. The particular system adds a Z buffer memory which stores Z or depth information values and a Z buffer comparator circuit which compares Z buffer values stored in the Z buffer memory to new Z values for each particular pixel. The Z buffer comparator looks at the old Z value at thatpixel position in the Z buffer memory and compares it to the new Z value.If the Zbuffer comparison shows that the new Z number is less than or equal to that which is stored in memory, then the new pixel is in a position at the same plane orin front of the pixel previously written; and the write enable logic is activated towrite the information regarding that pixel to the appropriate display memory andthe Z buffer memory.
An arrangement has now been devised for utilizing the Z buffer memoryconfiguration as an extension of the window identification memory to allow anessentially unlimited number of windows to be utilized at one time so that  switching between different programs and documents may be greatly enhanced and the time to accomplish the switching greatly reduced.
The normal Z buffer memory is a full screen display memory which, like the display memories and the window memory previously discussed, stores at each position representing each pixel an indication of the particular position that pixel is to take along the Z-axis. In the preferred embodiment of this invention, the Z buffer memory stores twenty-four bits for each pixel. It will be appreciated that this size of memory can store individual numbers which total substantially greater than the sixteen unique numbers which can be stored in the window identification memory. It will also be appreciated that any particular program or document may not be operating in the three-dimensional domain and, consequently, for that operation the Z buffer memory circuitry will be unused.
The arrangement illustrated in Figure 2 may be utilized to exploit the unused Z buffer memory circuitry for expanding the range of windows which may be used with the system. Figure 2 illustrates a system 40 which includes the display memories 14 and 16, the WID memory 20, the WID register 18, the WID comparison circuitry 22, the control register 28, and the write enable circuitry 26 which were used in the system 10 referred to above in Figure 1. The system 20 also includes a Z buffer memory 42 and a Z buffer comparision circuit 44.
In operation the circuitry of system 40 functions as follows. The follpwing discussion presumes that both the window identification 20 and the Z buffer functions have been enabled and either display memory A or B has been selected by the CPU through setting of appropriate bits in the control register 28.
The system 40 operates to first determine whether data are within a particular window and then to determine whether the data to be stored for that window lie in front of data already stored for that window. The first step in any operation is to store the window identification values of the windows to be utilized in the window identification memory. This is accomplished by writing to the window identification memory 20 values from the CPU which define the area of each of the windows to be utilized.
When it is desired to write a particular pixel to a display memory after the windows to be utilized have been defined, the CPU provides the pixel address and color values along with the Z (depth) value. In the window identification comparator circuitry 22, the window number of that data is compared with the window identification number stored in the window identification memory 20 and if they are equal (that is, the information at that pixel is in that window), then an enable signal is transferred to the write enable logic 26.
Presuming that the window comparison has provided an enable signal, it is necessary to make a Z buffer comparison in order to determine whether the present pixel is in front of any pixel already stored. The Z buffer comparison circuitry 44 compares the Z value furnished by the CPU with the Z value previously stored in the Z buffer memory 42 for that pixel. If the Z value furnished by the CPU is equal to or less than that stored in the Z buffer memory 42, then the new signal is in the same plane or in front of the data representing the pixel presently stored, and a signal is provided to cause the write enable logic 26 to write the Z value to the Z buffer memory 42, and the color RGB value to the selected display memory 14 or 16.
In situations in which the Z buffer memory 42 is not used because the information in a particular program is not three dimensional, the Z buffer memory 42 may be utilized to extend the number of windows which may be utilized in the system. This is accomplished by the CPU writing an appropriate value to the control register 28 which indicates that a window number extension is desired.
This causes the control register 28 to enable the Z buffer memory 42 for use as a memory for extending the number of available windows. In such a case, the unused memory available in the Z buffer memory 42 is utilized to store window numbers instead. Since the preferred Z buffer memory 42 includes 24 bits of storage at each pixel, substantially larger numbers of windows may be stored.
In order to allow the Z buffer memory 42 to function as a window memory, a window identification extension comparator 46 and a window identification extension register 48 are added to the system 20. These function in a manner  similar to the WID register 18 and the WID comparator 22 to compare the window number stored in the Z buffer memory with the extended window number of the incoming value to determine whether the incoming value is in the window to be written. If the incoming and the stored window number are equal, then the value is wriiten to the display memory. If the values do not compare, then the pixel is not in that window and is not written to the display memory. This arrangement allows very large window numbers to be stored and a consequently large number of windows to be available without increasing the size of the, window memory 20.
In a preferred embodiment of the arrangement, whenever it is desired to increase the number of windows beyond the normal number which may be stored in the window identification memory 20, the CPU writes an appropriate value into the control register 28 indicating that windows are to be provided beyond the number which the window identification memory 20 is capable of handling.
Thereafter, window identification values are represented by the contents of theWID memory 20 and the Z buffer memory 42, and the WID extension register 48.
Each window identification value includes twenty-eight bits of information and is used for defining the regions occupied by the extended windows in both the window identification memory 20 and the Z buffer memory 42. Each such value includes four bits of information for storage in the window identification memory 20 and twenty-four bits of information for storage in the Z buffer memory 42. The portion of the value stored in the region defined for that window in the window identification memory 20 defines the region as a zero numbered window while the twenty-four bit portion of the signal stored in the Z buffer indicates in the same region the actual window number. In this manner, the areas with a four bit WID value of 0 are mapped by the system as those designated for the extended window numbers.
Thereafter, when it is desired to write to a window carrying an extended number, the information includes with it twenty-eight bits for defining the window number. In order to determine whether the is to be written to the display memory,  the twenty-eight bit extended window identification number for the pixel (with the four MSB's and zeroes is sent to the WID extension register. The window number in the WID extension register 48 is compared by the WID extension comparator 46 with the number stored in the WID memory 20 and the Z buffer memory 42 for the particular pixel. If the WID memory 20 indicates that a zero is stored for that pixel and the Z buffer number is equal to the remainder of the extended window number in the WID extension register 48, then the information is written to selected display memory.In this manner the Z buffer memory 42 is utilized to extend the number of windows which may be used with the system to an extremely large number.
Figure 3 illustrates the areas mapped by storage of window numbers in the window identification memory 20 where such a window extension system is utilized. Those areas indicated with zeroes are areas for which extended window numbers are stored in the Z buffer memory 42. Figure 4 illustrates the areas mapped for the extended windows in the Z buffer memory 42. It should be noted that windows having window numbers 634, 653, and 712 fall in precisely the areas defined for zero windows in the window identification memory.
An extension of the system 40 utilizes a window extension mask 50. This circuitry receives information from the CPU indicating the amount of the Z buffer memory 42 which is to be used for the windows extension memory so that the remaining portion of the Z buffer memory 42 may be used for depth information.
The window extension mask 50 is a register which controls the comparator 46 by determining which bits of the twenty-eight available should be used in the WID extension comparator 46. The complement of this mask, or the remaining bits of the total twenty-eight, defines the bits to use for the Z buffer comparator 44. For example, it may be desirable to have some number of windows greater than sixteen but less than the total which can be stored in twenty-four bits. The window extension mask 50 may be utilized to select eight, twelve, sixteen, or twenty bits, for example, of the Z buffer memory 42 for use as extended window memory.For example, since eight bits of memory will store window numbers  sufficient for two hundred and fifty-six windows, the window extension mask 50may be utilized to select eight bits from each pixel of the Z buffer memory 42 forwindow extension numbers leaving the remaining sixteen bits for the storage of depth information.
Figure 6 illustrates various options which might be utilized using thewindow extension mask 50 in the system of Figure 2. In the first option, nowindow number extension is used. In the second, eight bits are used for thewindow number extension and sixteen remain for the depth indication storage. Inthe third example, sixteen bits are used for the window number extension whileeight bits remain for depth indications. In the last example, all of the bits are used to store depth information.
Figure 5 is a truth table illustrating the signals which may be present in the system 40 shown in Figure 2 and the responses of the system 40 to thosesignals. The first column indicates the signal provided by the CPU to the control register. In the first row, this signal is a zero indicating no window extension is desired; in this case, if the numbers in the window identification memory 20 and the window comparator 22 are not equal, then regardless of the result of the window extension comparison and the Z buffer comparison, nothing will be written to the selected display memory and the Z buffer memory 42.In the next two rows of the table where the zero signal indicates no window number extension but the WID comparator 22 indicates that the window indicated by the incoming pixel is equal to the window number stored at the position, the Z buffer memory 42 and the display memory 20 are written in accordance with the results determined by the Z buffer comparator 44.
In the next three rows of the table of Figure 5, the control register 28 receives a signal indicating that the window number is to be extended. In such a situation, the results provided by the window identification comparator 22 have no effect on the information to be written. If the window extension comparison shows unequal window numbers, then nothing is written to the Z buffer memory 42 and the display memory 20. If the window extension comparison shows that  the window number of the incoming signal and that stored in the WID memory 20and the Z buffer memory 42 are equal, then the result of the Z buffer comparisondetermines what is written. If the Z buffer comparison shows the Z buffer memory to hold the window extension number of the incoming signal, then the informationIs written to the display memory. If the numbers are different, the information signal is not written to the display memory.
Although the present invention has been described in terms of a preferred embodiment, it will be appreciated that various modifications and alterations might be made by those skilled in the art without departing from the spirit and scope of the invention. The invention should therefore be measured in terms of the claims which follow.