home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_03
/
JAG_DOX.ZIP
/
jag_col.txt
< prev
next >
Wrap
Text File
|
1996-01-28
|
6KB
|
173 lines
# -------------------------------------------------------------------
# VIDEO AND COLOR (c) Copyright 1995 KKP & Nat!
# -------------------------------------------------------------------
# These are some of the results/guesses that Klaus and I Nat! found
# out about the Jaguar with a few helpful hints by other people,
# who'd prefer to remain anonymous.
#
# Since we are not under NDA or anything from
# Atari we feel free to give this to you for educational purposes
# only.
#
# Please note, that this is not official documentation from Atari
# or derived work thereof (both of us have never seen the Atari docs)
# and Atari isn't connected with this in any way.
#
# Please use this informationphile as a starting point for your own
# exploration and not as a reference. If you find anything innacurate,
# missing, needing more explanation etc. by all means please write
# to us:
# nat@zumdick.rhein-main.de
# or
# kkp@gamma.dou.dk
#
# If you could do us a small favor, don't use this information for
# those lame flamewars on r.g.v.a or the mailing list.
#
# HTML soon ?
# -------------------------------------------------------------------
# $Id: jag_col.txt,v 1.7 1996/01/28 20:51:32 nat Exp $
# -------------------------------------------------------------------
# Note: This is definetely the weakest doc so far. High bull content!
# --------------------------------------------------------------------
1 Quest For Color
The Jaguar has a great number of color modes that all can be mixed on
screen at any time thanks for the Object processor.
There are 3 major color modes called CRY (chroma-intensity), TC (TrueColor)
and Palette.
1.1 Palette Color Image (1,2,4,8 bits/pixel)
[ Nat! I think the following is only valid for TrueColor Videomode.
If the videmode is 16bit RGB or CrY, then the pallete entries
are also Cry/RGB 16 bit words (and indexed that way)
]
Objects using Palette colors can have 1, 2, 4 or 8 bits per pixel.
There are 256 entrys in the Clut (0xF00400). Each color in the Clut is
defined by the 4 byte structure:
+-------+-------+-------+-------+
| Green | Red | nc | Blue |
+-------+-------+-------+-------+
The actual color displayed on the screen depends on a lot of things, f.e.
the O_INDEX value in the Object Processor.
In 8 bits/Pixel the pixel value is used directly as a index into the Clut.
In 1, 2 and 4 bits/pixel modes the Clut-Index for the displayed color is
calculated as Clut-Index = 2*O_INDEX + Pixel-Value.
1.2 CrY Color Image (16 bit/pixel)
Objects using CrY colors always uses 16 bits per pixel. Each pixel is
defined by this 2 byte structure:
+-------^-------+-------^-------+
| Chroma | Y |
+---------------+---------------+
The Chroma and Y channel are 8 bits each. Y has nothing to do with
Yellow, but is the Luminence of the color choosen by Chroma!
The Color on the screen are calculated by the formular:
color-Trans[ Cr ]
color = ----------------- * Y, Color = {Red, Green, Blue}
255
1.3.1 True Color Image (16 bits/pixel)
The other 16 bit/pixel mode uses a normal packed RGB format like
on the Falcon and some VGA cards to get 5 bit worth of Red and Blue
and 6 bits worth of Green information. The format used is
+-------^-+-----^---+---^-------+
| Red | Blue | Green |
+---------+---------+-----------+
15......11 10......6 5..........0
To convert use something along the lines of:
; Input:
; d5.5 : red
; d6.6 : green
; d7.5 : blue
; Output
; d0.16 : packed TrueColor pixel
shiftcolor:
move.w d5,d0 ; d0 = red, now have [0]-[0]-[0]-[red]
asl #5,d0 ; shift red up, now have [0]-[0]-[red]-[0]
or.w d7,d0 ; add in blue, now have [0]-[0]-[red]-[blue]
asl #6,d0 ; shift red & blue up, now have [0]-[red]-[blue]-[0]
or.w d6,d0 ; add in green, now have [0]-[red]-[blue]-[green]
rts
1.3.2 True Color Image (24/32 bits/pixel)
Objects using the TrueColor model always uses 4 bytes per pixel???? Each
pixel is defined by the structure:
+-------+-------+-------+-------+
| Green | Red | nc | Blue |
+-------+-------+-------+-------+
1.5 Default Colors
move.w #$0000,BG ;default background color (16 bit RGB or CRY color)
move.l #$00000000,BORD1 ;default border color (green,red,unused,blue)
1.4 Video Modes
The VMODE register can switch between some modes of operation in
the Graphics chip.
It is possible to switch between 24 bit RGB values and 16 bit CrY
in the Clut.
It is possible to switch between 16 bit RGB mode and 16 bit CrY mode.
If VMODE is set to CrY mode, then a 16 bit/pixel object is
interpreted as a CrY Object otherwise as a 16 bit/pixel RGB Object.
bit 0 VIDEN enable time base generator
1,2 mode line-buffer mode
0 16-bit CRY
1 24-bit rgb
2 16-bit direct "each 32 bit entry is put in two-16bit words
which are output to red and green on alt
phases of video clock...
it is assumed further processing will occur
outside the chip..." (spooky possums!)
3 16-bit RGB
bit 3 Genlock
bit 4 Incen (more genlock stuff..)
bit 5 BINC (more genlock)
bit 6 CSYNC composite sync(genlock?)
bit 7 BGEN clears the line buffer to the colour in the background reg
(only has effect in CRP and RGB16..)
bit 8 VarMOd LSB of colour in line buffer set = CRY
LSB of colour in line buffer clear = RGB16..
9..11 Pwidth "pixelwidth in video clock cycles"-1
"the display width should be set to an integer multiple
of the pixel width here"
Use: 6C1 for 320x200 overscan 16bit Crymode
2C1 for 640x200 overscan 16bit Crymode