FALCON COLOR REGISTERS I've edited the original text somewhat to make the lines readable. In article <3g0l53$5d@m1.cs.man.ac.uk>, Anthony Jacques wrote: > >Hi, I am in the process of writing an extension for STOS for the Falcon. >I have various bits up and running, but am having trouble with the 256 >colour palette. My problem is, where are the palette entries stored? You should not access the hardware directly if there is another way. The XBIOS palette handling is something I think Atari should have spent at least _some_ time thinking about. Not only did they spell the original call wrong at first, but there are now _three_ different calls! On the ST you have Setpalette (originally Setpallete) TT EsetPalette Falcon VsetRGB It's not difficult to write your own routine to convert and use the correct call (email if you want C source), but it's embarrassing that it should be necessary. Anyway, on the Falcon you should use XBIOS 93 as follows: (The xbios call format can differ between compilers and languages, but hopefully you have something very much like it. It's simply supposed to stack its arguments and call the XBIOS.) #define VsetRGB(a,b,c) xbios(93,a,b,c) VsetRGB(start, n, map); Where 'start' is the index of the first colour you want to change (16 bit), 'n' is the number of colours to change (16 bit) and 'map' is a pointer to the new colourmap array of longs (32 bit) 0x00RRGGBB. To get the old palette values, use XBIOS 94 (VgetRGB) in the same way. >Oh, and because it's STOS, I cannot use the VDI to set it... If anyone knows how to convert between the VDIs colour indices and the physical ones, I'd very much like to hear about it. (I wonder if the programmer responsible for all this was a secret agent for that other company... ;-) -- Chalmers University | Why are these | e-mail : d8klojo@dtek.chalmers.se of Technology | .signatures | Address: Johan Klockars | so hard to do | Foreningsgatan 32/408 Gothenburg, Sweden | well? | 411 27 Gothenburg, SWEDEN