Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 180

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Palette Entry and Color Format
The palette entries are very simple. Each tile in the tile map character is actual 2-bytes (as discussed above). The low
byte is the character which is a direct index into the character bitmaps and the 2
index into the palettes. Thus, a palette entry of 0 means use palette 0, a 1 means use palette 1 and so forth. Each palette
consists of 4 colors. Each color encoded as a single byte (which I will discuss the encoding in a moment). Currently the
driver has 16 palettes allocated, nothing special, just made up colors, black, white, blue, basic colors kind of thing. You
will want to define your own palettes and your own colors as you define your bitmaps, art, and level designs for your
games. Below is a peek at the palette definition in the driver:
' palettes extracted from file "c64_font_04_8b.bmp" using palette color map 1
' only palette index 0,1 are used right now for character font, palette index 0 makes characters normal
' palette index 1 makes them look inverse video
_tile_palette_map
c64_font_04__palette_map
As you can see, the palettes are defined at the label _tile_pallete_map and each entry is s a LONG. The register you
access the palettes from in the global register interface is called tile_palettes_base_ptr_parm. You can read or write this
pointer and thus modify palette entries. Now, let’s talk about the format of each color.
The color format is always the same, the 32-bits of each palette entry represent 4 possible colors that are "indexed" by the
2-bit pixel data, the colors are encoded as a single byte each in the following way:
---------------------------------------------------------------------------------------------------------
|31
---------------------------------------------------------------------------------------------------------
|
|< --------------------------------------32 bits / 4 bytes -------------------------------------------->|
Where each color byte is encoded as follows:
Composite Video Color Byte Format
----------------------------
|P3 P2 P1 P0 | M | L2 L1 L0|
----------------------------
The color byte is used to represent everything you do with Propeller video, for example; sync, black, color burst, and
active video. By setting different bits you can create "colors" that represent these signals. For example, Table 22.1 below
shows how to create black, sync, color burst, shades of gray, and colors with any intensity.
7
6
^
|
|
|
|
|
|________________________________ Color phase shift for color burst signal (0-15),
5
COLOR 3
4
LONG $07_07_0C_02 ' palette index 0
LONG $07_0C_07_02 ' palette index 1
LONG $07_0C_07_02 ' palette index 2
LONG $07_0C_07_02 ' palette index 3
LONG $07_0C_07_02 ' palette index 4
LONG $07_0C_07_02 ' palette index 5
LONG $07_0C_07_02 ' palette index 6
LONG $07_0C_07_02 ' palette index 7
LONG $07_0C_07_02 ' palette index 8
LONG $07_0C_07_02 ' palette index 9
LONG $07_0C_07_02 ' palette index 10
LONG $07_0C_07_02 ' palette index 11
LONG $07_0C_07_02 ' palette index 12
LONG $07_0C_07_02 ' palette index 13
LONG $07_0C_07_02 ' palette index 14
LONG $07_0C_07_02 ' palette index 15
3
^
|
|
|______________________ Modulation Enable (0 disable chroma color modulation,
2
LONG
^
|________________ Luma (0-7)
1
24|23
0
LONG
COLOR 2
1 enable chroma color burst modulation)
this selects 1 of 16 phase shifts which represent
16 colors equally spaced around the color wheel for
NTSC/PAL modes.
16|15
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
COLOR 1
nd
byte is the color attribute which is an
8|7
COLOR 0
0|
|
180

Related parts for Chameleon-PIC