crash@pro-colony.UUCP (John Stephen III) (02/16/88)
The GS, in it's 320 X 200 mode, is capable, without fancy programming, of displaying 256 colors on the screen at one time (this is because the GS has 16 "palettes", each with 16 programmable colors - 16 * 16 = 256). The only limitation on this is that each line can only use 1 palette meaning that each line has a limit of 16 colors (most programs, to make programming simpler, use the same palette for all 200 lines, thus they have a limit of 16 colors for the entire screen). It is possible to have up to 3200 colors on the screen at one time however. A program can have the GS generate an interrupt right before it draws any line on the screen (each line has one of these "interrupt flags" so each line can be made to generate an interrupt). By generating an interrupt for all 200 lines a program can change every lines palette "on-the-fly" which would, in effect, give each line its own palette (and 200 lines with 1 palette each and 16 colors per palette = 3200 colors on the screen, but each line can still only have 16 colors). The disadvantage is that the program will run slower (because the CPU is constantly being interrupted to update the palettes) and things that disable interrupts (such as disk accesses and entering the control panel) would cause the screen to 'tear' or distort the colors. I am not familiar with the programs written by John Brooks that Roby Shermane mentioned in his question but this is probably the technique he is using.