AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
=>     R4 =     reason code:
           1     read palette
           2     set palette
           3     set first flash state
           4     set second flash state
           5     set default palette
           6     blank screen
           7     read palette entries
           8     write palette entries
           9     set gamma correction tables
     Other registers dependent on call

This vector is called whenever the palette is read or written. Set R4 = 0 to claim the call, and prevent RISC OS from performing the default action. It is used to indirect VDU 19OS_Word 12OS_ReadPaletteColourTrans_ReadPalette and ColourTrans_WritePalettePRM 1-105 suggests that there may be other calls it indirects.

See PRM 1, page 84.
Read Palette
=>     R0 =     logical colour
     R1 =     type of colour (16,17,18,24,25)
     R4 =     1 (reason code)
<=     R2 =     1st flash colour (&BBGGRRxx) - device colour
     R3 =     2nd flash colour (&BBGGRRxx) - device colour
     R4 =     0 if operation complete
Set Palette
=>     R0 =     logical colour
     R1 =     type of colour (16,17,18,24,25)
     R2 =     1st flash colour (&BBGGRRxx) - device colour
     R3 =     2nd flash colour (&BBGGRRxx) - device colour
     R4 =     2 (reason code)
<=     R4 =     0 if operation complete
Set Flash state
=>     R4 =     3 (set first flash state)
           4 (set second flash state)
<=     R4 =     0 if operation complete
Set default palette
=>     R4 =     5 (reason code)
<=     R4 =     0 if operation complete
Blank screen
=>     R0 =     0 to unblank, 1 to blank
     R4 =     6 (reason code)

This call is used by the ScreenBlanker module to blank and unblank the screen.
Read palette entries
=>     R0 =     pointer to word aligned list of logical colours (words) or 0
     R1 =     type and number of colours
           bits 0-23     =     number of entries to read     
           bits 24-31     =     type of colour (16,17,18,24,25)     
     R2 =     pointer to buffer for first flash colour (&BBGGRRxx)
     R3 =     pointer to buffer for second flash colour (&BBGGRRxx)
     R4 =     7 (reason code)
Write palette entries
=>     R0 =     pointer to word aligned list of logical colours (words) or 0
     R1 =     type and number of colours
           bits 0-23     =     number of entries to read     
           bits 24-31     =     type of colour (16,17,18,24,25)     
     R2 =     pointer to list of device colours
     R4 =     8 (reason code)
Set gamma correction
=>     R0 =     pointer to table for red
     R1 =     pointer to table for green
     R2 =     pointer to table for blue
     R4 =     9 (reason code)

This call sets the gamma correction tables. Each table is a word aligned array of 256 bytes giving the gamma corrected value when indexed by the normal colour value.

[sh-index] Back to list of manuals