[comp.sys.atari.st.tech] Atari graphics

cshera@uta.fi (Heikki Rasim{ki) (05/30/91)

	Hello !

	I recently read some books of Atari ST internals by Abacus
        and found some odd things I hope someone can explain to me.

        1) set color representation, opcode 14 trap #2
           Intensity of red, green and blue can have values from 0 to 1000.
           What is done to this information ? I know it somehow ends up to
           video shifter registers where intensity can range from 0 to 7.

        2) open workstation, opcode 1 trap #2
           intin(0) Device identification, given on loading Device Driver
           contrl(6) Device identifier
           What these two parametres should be ? I suppose this is a GDOS
           function to load a device driver from GIOS. It is said that it won't
           work because of missing device drivers. Can I make one and put it
           into GIOS ( how ) ?

        3) previous function returns among other things  screen resolution and
           number of colours available. How these two things are handled in Atari ?
           How electronic beam inside tv or monitor knows that this time it
           is supposed to plot 640 times per line insted of 320 it did last month
           or to draw twice as many lines per screen as it did last time ?
           
           With my stumbling english I think I learned that colours are produced
           by MMU and SHIFTER together. In most odd way I think. Is it usual
           among computers to have they video-RAM fullfilled with colour indexes
           instead of their RGB-values ? If so, what's wrong with latter case ?
           It wouldn't need any video shifter registers to limit colours to 16.

           
        Any help aprpriapro... eh, valuated high.
        Thank you in advance, curiosity is killing me.


        Heikki Rasim{ki
        cshera@uta.fi
                      

bjoern@drdhh.hanse.de (Bjoern Kriews) (06/04/91)

cshera@uta.fi (Heikki Rasim{ki) writes:
>	Hello !
>        1) set color representation, opcode 14 trap #2
>           Intensity of red, green and blue can have values from 0 to 1000.
>           What is done to this information ? I know it somehow ends up to
>           video shifter registers where intensity can range from 0 to 7.

The 0-1000 range is used in VDI to support other devices which have more
colors. They are simply mapped to a 0-7 range.

>        2) open workstation, opcode 1 trap #2
>           intin(0) Device identification, given on loading Device Driver
>           contrl(6) Device identifier
>           What these two parametres should be ? I suppose this is a GDOS
>           function to load a device driver from GIOS. It is said that it won't
>           work because of missing device drivers. Can I make one and put it
>           into GIOS ( how ) ?

You need GDOS in your AUTO-folder (i.e. distributed with Gemini).
Then you can use this call to load one of the .sys files by a number
givwen in your assign.sys file which is read by gdos.
GDOS will then load your driver (i.e. EPSONFX.SYS) and use it for
VDI calls you perform on the handle given by v_opnwk.

Writing device drivers is a bit more of work, you have to write the complete
VDI functionality. You may hook in a basic module distributed by atari to
developers (devdvr kit) but that library is AWFULLY slow.

If you want more information on device drivers, I could translate a german
version of a text I one wrote for somebody.

>        3) previous function returns among other things  screen resolution and
>           number of colours available. How these two things are handled in Atari ?
>           How electronic beam inside tv or monitor knows that this time it
>           is supposed to plot 640 times per line insted of 320 it did last month
>           or to draw twice as many lines per screen as it did last time ?

Has nothing to do with your monitor. $ff8260 (shifter) determines what kind
of video-beam control is generated.

>           With my stumbling english I think I learned that colours are produced
>           by MMU and SHIFTER together. In most odd way I think. Is it usual
>           among computers to have they video-RAM fullfilled with colour indexes
>           instead of their RGB-values ? If so, what's wrong with latter case ?
>           It wouldn't need any video shifter registers to limit colours to 16.

MMU has nothing to do with colors. Screen memory indexes the color regs in
the shifter.

>        Any help aprpriapro... eh, valuated high.
>        Thank you in advance, curiosity is killing me.

OK, here you are .-)

Greetings, Bjoern

---
bjoern@drdhh.hanse.de = Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / FRG
"gaaga mahwe Bjoern urgl ufzae Turbo-C bnub"     (J. Willamowius)