Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!jato!hanauma.jpl.nasa.gov!hyc From: hyc@hanauma.jpl.nasa.gov (Howard Chu) Newsgroups: comp.sys.atari.st Subject: Re: Graphics on the STE - v. generally speaking... Message-ID: <1991Apr3.223921.16258@jato.jpl.nasa.gov> Date: 3 Apr 91 22:39:21 GMT References: <1245@exua.exeter.ac.uk> <1991Apr3.004047.511@jato.jpl.nasa.gov> <1991Apr3.055519.2322@ns.network.com> Sender: news@jato.jpl.nasa.gov Organization: SAR Systems Development and Processing, JPL Lines: 88 Nntp-Posting-Host: hanauma.jpl.nasa.gov In article <1991Apr3.055519.2322@ns.network.com> logajan@ns.network.com (John Logajan) writes: >hyc@hanauma.jpl.nasa.gov (Howard Chu) writes: >>Well, it's fairly simple to display a full 256-color GIF image, if that's >>what you mean. I have code doing this in my port of Fractint 12. Using >>frame-swapping to (almost) double the number of bits per pixel just about >>squares the number of colors to choose from, and also squares the number >>of colors displayable at once. >I take it by frame swapping that you build two (or more) logical screens >and alternate between them every vertical retrace -- so as to layer >intensities on top of one another. Thus your eye and the persistence >of the phosphors become the brightness integrators. A duty cycle kind >of thing. Let's see per color you have one frame-pixel full on and >one frame-pixel in one of 8 possible levels. Or one at level 6 and >the other in 7 possible levels, etc .. 8+7+6+5+4+3+2+1=36 levels per >color, or 46,656 possible colors to choose from. Hm. I don't quite follow this description. Ok, assume one frame-pixel full-on or full-off, =[0,7] (or [0,15] on the STe). Given equal display time per frame (two frames) this extends the ST palette to an effective 12 bits, or 4096 colors. (Or extends the STe from 4096 to 32768.) Pretty effective, and also surprisingly tolerable. I think this is what the Colorburst 3000 program did. But, this is somewhat wasteful, because this only uses 8 of the 16 available palette registers in the alternate frame. (3 colors, full on or full off, 2**3=8.) > >Hmm, but you still only have 16 pallette cells to choose from per >scan line, and you can only add them and not multiply them. Giving you >32 colors per scan line (or scan zone in Spectrum 512 mode) max. Well, as I mentioned above, you're not realizing the full potential with the scheme you just outlined. Anyway, there are two alternatives, and I've used both in Fractint. First, and most obvious - unbalance the duty cycle. Use two alternating frames, but display one twice as often as the other. This immediately makes all your pixel bits in one frame "more significant" than the other frame. This gives you color levels of 0-7 on one frame, and 0-2-4-6-8-10-12-14 on the other. You now have 22 effective levels per color, or 10648 colors on an ST. (STe - 46 levels, 97336 total colors.) But I think that's a little extreme, it's also really just adding least-significant-bits, so all you're really doing is gaining finer steps between color levels. Oh, for the original poster, this means 22 and 46 gray-levels on ST and STe, respectively, on a color monitor. Now, as to adding and not multiplying colors... Consider these two palette definitions... (Let's use octal, for readability, eh?) Palette 0: {000, 001, 002, 003, 004, 005, 006, 007, 020, 021, 022, 023, 024, 025, 026, 027} Palette 1: {000, 100, 200, 300, 400, 500, 600, 700, 050, 150, 250, 350, 450, 550, 650, 750} By inspection you should be able to satisfy yourself that using these two palettes on two evenly alternating frames, you will be able to use 8 bits per pixel and get 256 unique colors. Your maximum intensity is reduced to half of what it used to be, but the brightness control will fix that. }-) I crippled the green driver arbitrarily, you could decrease the red or blue resolution to suit your taste. This is what you get on a PC with VGA, 3 bits for one color, 3 bits for another, and 2 bits for the last. I don't recall what the 2-bit color on VGA is. At any rate, it covers the full spectrum; there are no color gaps or missing or overemphasized colors in this scheme. [For med-rez, 16 colors, I used {000, 007, 020, 027}, {000, 700, 050, 750}. Note that now two colors are 1-bit each, and one color is 2-bits.] I posted a small archive several months ago (cbox.arc) that demonstrated this setup when I first got Fractint running. It draws 16 horizontal bands on one screen and 16 vertical on another, then just toggles in the two palettes on vertical blank. If you don't have this demo, you can write it yourself based on the description I gave. It will take me at least a week to get to my stuff if I have to repost it, as I no longer have an accessible online copy and I still haven't settled into a place yet, so my STuff is still in storage. > >My guess would be that flicker and pseudo-shadow movements would be >quite severe. So how does it really look? Try it and see, eh? }-) The color scheme I chose above gives the entire 256 color palette of the PC w/VGA. Try other setups.... > >-- >- John Logajan @ Network Systems; 7600 Boone Ave; Brooklyn Park, MN 55428 >- logajan@ns.network.com, 612-424-4888, Fax 612-424-2853 -- -- Howard Chu @ Jet Propulsion Laboratory, Pasadena, CA Disclaimer: How would I know, I just got here!