Shop OBEX P1 Docs P2 Docs Learn Events
BLNPIX D,{#} S and SETPIV {#}D Syntax Qestion — Parallax Forums

BLNPIX D,{#} S and SETPIV {#}D Syntax Qestion

BLNPIX D,{#}S
Alpha-blend bytes of S into bytes of D, using SETPIV value.

SETPIV {#}D
Set BLNPIX/MIXPIX blend factor to D[7:0].

Comments

  • Is there a definition of PIX (ie) Pixel set up so many pixels with a colour matrix) there appears to be some missing background information that should be included with these instructions
    Is there a defintion of PIV. Any information pointing me to where I can fin more info would be apreciated.
    Regards and Thanks
    Bob (WRD)

  • evanhevanh Posts: 15,192

    Never used them myself. But I'm gonna guess these were carried over from the Prop2-Hot. There'll probably be some details buried 8+ years back.

  • evanhevanh Posts: 15,192
    edited 2021-09-17 15:53

    The silicon doc, PIXEL OPERATIONS section, says this:

    SETPIV D/# 'set blend factor V[7:0] to D/#[7:0]
    SETPIX D/# 'set MIXPIX mode M[5:0] to D/#[5:0]

    And below that there's a few equations showing the mixing ops.

  • AribaAriba Posts: 2,682
    edited 2021-09-17 16:52

    BLNPIX blends from one color to another, according to the SETPIV value (0=color in S, $FF=color in D, other values = something in between).
    Colors must have 8 bits for Red, Green, Blue and Alpha (if used).

    It calculates in fact a linear interpolation separatly for every byte in a long in one instruction. So it can be used also for other applications, like four 8bit audio samples.

    SETPIX defines the mode of MIXPIX, which allows mixing and blending of the 4 bytes in many different modes.
    With SETPIX %011_010, MIXPIX has the same behaviour as BLNPIX for example.

    Andy

  • Ariba\Evanh
    I have gone through Parallax notes and made some background information but I am getting in over my head not understanding the streamer. I have been able to get the sample programs
    for VGA running but having difficulty going through programs . So I think what I should do is let these pixel commands go until Iater. Thanks for commenting. I have attached notes I have made regarding Pixel HDMI\DVI . My intent is to try to link this information to the Pixel commands .
    Regards
    Bob (WRD)

  • evanhevanh Posts: 15,192

    Oh, yeah, not many ppl here will have the full range of knowledge to fully explain all things pixels in the prop2. It's a very open ended design that can be repurposed. Certainly more than I'm equipped to whimsically explain.

Sign In or Register to comment.