Alive
News Team Current issue History Online Support Download Forum @Pouet

01 - 02 - SE - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 - 13 - 14

Alive 6
[ Back to Main ]


2.) 4096 Colours
----------------
Registers:

  Palette Register:                                 ST     STE
    $FFFF8240  0 0 0 0 x X X X x X X X x X X X       X     x+X
    $FFFF8242  0 0 0 0 x X X X x X X X x X X X ...
    ...
    $FFFF825E  0 0 0 0 x X X X x X X X x X X X    (16 in total)
                       ---_--- ---_--- ---_---
                         red    green    blue

    These 16 registers serve exactly the same purpose as in the
    ST. The only difference is that each Nibble for Red, Green
    or Blue consists of 4 bits instead of 3 on the ST.

This time, Atari did good work (almost). So what are the pitfalls:

? I tried to program a fade and it works in general, but flashes
  during the fade, why ?
! For compatibility reasons, each nibble encoding the Red, Green or
  Blue values is not ordered "8 4 2 1", meaning the least significant
  bit represents the value "1" while the most significant one
  represents the value "8" - This would make the STE rather
  incompatible with the ST and only display dark colours.
  The sequence of Bits is "0 3 2 1" encoding the values
  "1 8 4 2". Therefore to fade from black to white, the sequence
  of colours would be $000, $888, $111, $999, $222, $AAA, ...

? My program sets the palette correctly on the STE in lowres
  (320x200 16 colours). Will it also work on the TT in TT midres
  (640x480 16 colours) ?
! Yes, it will. Even though the TT uses its own palette registers,
  256 in total, it can "mask in" a set of 16 colours in the ST
  palette registers, which are of course at the same address as
  on your STE. Meaning: Whatever values you write in the ST
  palette registers on the TT, in TT midres, they will be used.
  Your program will even work correctly in TT Low (320 x 480
  256 colours), if the TT Shiftmode register is set accordingly.

? So it does work on the TT alright. But i have a Falcon and not
  a TT. Now what ?
! The Falcon can be switched to "ST compatible mode". This is not
  a 100% term since it does not - in contrast to the TT - mean
  either 320x200, 640x200 or 640x400 pixels in 16,4 or 2 colours
  but only means that the ST palette registers are being used,
  hence this flag can only be used when displaying 16, 4 or 2
  colours. If you do not set this flag, the Falcon will NOT
  - in contrast to the TT - read the ST palette registers.
  This change has been necessary since the Falcon has 18 bits
  per colour in bitplane mode while the TT only has 12, just
  like the STE has. The Falcon RGB format for a palette mode
  is: 00RRRRRR 00000000 00GGGGGG 00BBBBBB (VGA compatible).


[ Back to Main ]
[ Onto next Chapter ]

Alive 6