Shop OBEX P1 Docs P2 Docs Learn Events
Waitvid? — Parallax Forums

Waitvid?

rjo__rjo__ Posts: 2,114
edited 2013-12-18 16:07 in Propeller 2
The following is from Prop2_Docs 11/27. My specific question is about: %0110 = CLU8_RGB16 - 4 8-bit offsets in S lookup 5:6:5 pixel words in AUX
what does this mean? Let's say I have filled the AUX with a series of words, where each word corresponds to rgb in 5:6:5 format… what do I do with S?

Thanks

Rich

The D operand of WAITVID has four fields:

%AAAAAAAA_MMMM_PPPPPPP_CCCCCCCCCCCCC

%AAAAAAAA = AUX base address for pixel lookup (0..255)
%MMMM = pixel mode (0..15), elaborated below
%PPPPPPP = number of dot clocks per pixel (1..127, 0 acts as 128)
%CCCCCCCCCCCCC = number of dot clocks in WAITVID (1..8191, 0 acts as 8192)


The D operand's %MMMM field determines which pixel mode will be used for the WAITVID and
what the S operand will be used for:

%0000 = LIT_RGBS32 - S is used as a literal 8:8:8:8 bit R:G:B:SYNC pixel. This is
the only mode which can generate sync signals. In this mode,
only the %CCCCCCCCCCCCC bits of D are used, so all other bits
can be 0.

%0001 = CLU1_RGB24 - 32 1-bit offsets in S lookup 8:8:8 pixel longs in AUX
%0010 = CLU2_RGB24 - 16 2-bit offsets in S lookup 8:8:8 pixel longs in AUX
%0011 = CLU4_RGB24 - 8 4-bit offsets in S lookup 8:8:8 pixel longs in AUX
%0100 = CLU8_RGB24 - 4 8-bit offsets in S lookup 8:8:8 pixel longs in AUX
%0101 = CLU8_RGB15 - 4 8-bit offsets in S lookup 5:5:5 pixel words in AUX
%0110 = CLU8_RGB16 - 4 8-bit offsets in S lookup 5:6:5 pixel words in AUX

The CLUx modes use the 1/2/4/8-bit fields of S, lowest field
first, as offsets for looking up pixels in AUX, starting at
%AAAAAAAA. Upon completion of each pixel, the next higher
bit field is used, with the highest field repeating.

For CLU1_RGB24..CLU8_RGB24, the 1/2/4/8-bit fields are used
as long offsets into AUX, yielding 8:8:8 pixel data from AUX
data bits 23..0.

For CLU8_RGB15 and CLU8_RGB16, bits 7..1 of each 8-bit field
are used as the long offset into AUX, while bit 0 selects the
low or high word containing the 5:5:5 (LSB-justified) or
5:6:5 pixel data.

Comments

  • Roy ElthamRoy Eltham Posts: 2,996
    edited 2013-12-18 14:43
    S will be four 8 bit fields, each one being an offset into AUX for one of the words you put in there that hold a 5:6:5 color which will be used to drive the video color.

    So bits 0..7 are one offset, bits 8..15 are another offset, etc.
  • rjo__rjo__ Posts: 2,114
    edited 2013-12-18 15:04
    Thanks Roy,

    If I knew what I was doing… I wouldn't be asking, AND my question would make more sense:)

    Let's say I have 512 rgb5:6:5 word values all lined up in the AUX. And I have set D appropriately. I use 1 clock per pixel and 512 clocks per waitvid, what do I do with S?

    Rich
  • cgraceycgracey Posts: 14,133
    edited 2013-12-18 15:32
    rjo__ wrote: »
    Thanks Roy,

    If I knew what I was doing… I wouldn't be asking, AND my question would make more sense:)

    Let's say I have 512 rgb5:6:5 word values all lined up in the AUX. And I have set D appropriately. I use 1 clock per pixel and 512 clocks per waitvid, what do I do with S?

    Rich


    You would want to use one of the streaming modes, instead of a color lookup mode. I believe you would want mode %1110.
  • rjo__rjo__ Posts: 2,114
    edited 2013-12-18 15:47
    In which case S is #0…. i hope:)
  • cgraceycgracey Posts: 14,133
    edited 2013-12-18 15:52
    rjo__ wrote: »
    In which case S is #0…. i hope:)


    I'm not sure. I'm not at my desk, so I don't have the info in front of me.
  • ozpropdevozpropdev Posts: 2,791
    edited 2013-12-18 16:06
    Rich,

    S = 0 should be fine. :)
        %1110 = STR16_RGB16   - 16-bit 5:6:5 pixels are streamed from AUX starting at %AAAAAAAA
                                plus S[7..0], with S[31] selecting the starting word.
    
    
  • rjo__rjo__ Posts: 2,114
    edited 2013-12-18 16:07
    Thanks guys.

    Rich
Sign In or Register to comment.