In graphics systems, the graphic display information is contained in a graphics memory at specific locations in the memory. This information is then mapped to the video screen in a one-for-one format. To save time and for convenience, the representations on the screen follow each other sequentially, and the same sequential order is used in memory to store the data for each pixel of information on the screen.
However, problems arise in that video memories have square characteristics with a fixed number of points in the matrix. A video screen, on the other hand, has a number of points called pixels, with each pixel having a number of bits which must be presented to that pixel. Since it is desired to use the same physical memory for many different screen sizes, it is customary to create the memory having a size at least large enough to directly map the largest number of pixels that would be encountered in any one screen. In order to accomplish this goal and not burden the processor with vast numbers of calculations, there must be some easy mathematical coordination between the memory location and the screen location for any data bit. The importance of such ease of calculations can be appreciated when it is realized that in a typical video graphics system each eight bit pixel must be sent to the screen every 12.7 ns. A typical screen would have a pixel array of 1280 by 1024. The display is refreshed 60 times a second. Time spent in processing address information on a per pixel basis then becomes critically important.
There are two basic ways to address a pixel in memory. The first of these is the X-Y coordinate method, which seems to be the natural way to think of memory locations. The second method would be to use a linear or vector address giving location data starting from an arbitrary 00 point. Using this system, the processor must calculate the actual position of each pixel.
Problems arise in the calculations, however, unless special steps are taken to organize the data in the memory exactly as it is presented on the screen. Assume for a moment that the memory is 2,000 columns wide, but the number of necessary screen locations would only take up perhaps 1,500 columns. Visualizing this then, one part of the memory would be vacant. This "extra" memory space is hard to use for any other purpose, and thus effectively, wasted.
In an attempt to achieve full utilization of the memory, two problems must be solved. One is that there must be a method of removing the information from the ends of the lines of memory and wrapping the end around to the next line of memory. One method of shifting information to a screen is contained in co-pending application entitled "Graphics Display Split Serial Register System", Ser. No. 07/387,569, now abandoned, filed concurrently herewith, which application is herein incorporated by reference.
The second problem is the restriction that the pixel size must be a power of 2. This restriction stems from the fact that the processor must be able to easily calculate the address of the first pixel in each next row of pixels. The distance between pixel rows is called the pitch. If memory is to be utilized fully, the addresses must be consecutive with the first address in a screen row being the next binary numerical memory address after the address in the preceding row. Since the number of bits per pixel plus the pitch of the screen must be first multiplied and then added together to translate from an X-Y address to a linear address, it follows that any such calculations, because of their great numbers, must be quickly performed. Thus, it is always desired to reduce such calculations to a simple data shift. This can be accomplished when it is realized that the data is binary and thus multiplication by a power of 2 simply requires a one position bit shift, for each such power.
Based upon the need for quick mathematical operations, a restraint is placed on the number of pixels in a row and this restraint limits the number of pixels to powers of 2.
Accordingly, a need exists in the art for a system which allows for the utilization of pixels of any size without adding to the processing time for data translation.
A need also exists in the art for an arrangement which allows the pixel size to be any number and which allows for the packing and shifting of the bits into consecutive memory space so as to conserve memory capacity.