Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!mcsun!unido!ira.uka.de!fauern!faui43.informatik.uni-erlangen.de!lsmichae From: lsmichae@informatik.uni-erlangen.de (Lars Michael (AKBP WS 1990)) Newsgroups: comp.sys.atari.st Subject: Re: Spectrum 512 Keywords: spectrum, picture format Message-ID: <1991Jan29.113557.14106@informatik.uni-erlangen.de> Date: 29 Jan 91 11:35:57 GMT References: <4722@ruuinf.cs.ruu.nl> Organization: University of Erlangen, Germany Lines: 63 avgroeni@cs.ruu.nl (Annius Groenink) writes: > Is there someone who can give me some information about >the way Spectrum pictures are showed? I know the file format, >but that's not enough to write my GIF-Spectrum 4096 converter. >I'd like to know what exactly is done with the 3 palettes >that go with each line. > > Annius Groenink Let`s have a lot a the umcompressed format: .SPU 80 Words Scan line 0 is unused (color set to black) 15920 Words 199 Scanlines 9552 Words 199 * 3 * 16 Colors ------------------------- 25552 Words = 51104 Bytes Now we one scanline and the according 3 Palettes (16 Colors each): Color 0 of Palette 0 is the border color and set to black. Color 0 of Palette 1 is set to black. Color 0 of Palette 2 is set to black. Color 15 of Palette 0 is set to black. Color 15 of Palette 1 is set to black. Color 15 of Palette 2 is set to black. The other colors (0 < c < 15) are useable from left_border to right_border (inclusive): (All values are x-koordinates of the lowrez screen.) left_border right_border Palette 0: Color c = 2*n+1 (odd): 0 10*c - 6 Color c = 2*n (even): 0 10*c - 1 Palette 1: Color c = 2*n+1 (odd): 10*c - 5 10*c + 160 - 6 Color c = 2*n (even): 10*c 10*c + 160 - 1 Palette 2: Color c = 2*n+1 (odd): 10*c + 160 - 6 319 Color c = 2*n (even): 10*c + 160 319 E.g. Point number 147 in the scan line has color 5. From which palette does it come from? c = 5 (odd) Palette 0 Palette 1 Palette 2 0 .. 10*5-6 = 44 45 .. 204 205 .. 319 => This is a color from palette 1. BTW I would be interested in your gif shower. Please post it when ready. "May the Schwartz be with you!" Lars