Shop OBEX P1 Docs P2 Docs Learn Events
Understanding P2 streamer — Parallax Forums

Understanding P2 streamer

mov x,#480 'set visible lines
line call #hsync 'do horizontal sync
xcont m_rf,#0 'visible line
djnz x,#line 'another line?

m_rf long $7F080000+640 'visible rlong 8bpp lut


Above is code from the VGA 640x480 8bpp example

I have used the P1 to do VGA in the past, however, I am having a hard time understanding the code listed above. I know the xcont instruction
uses the streamer to output @ the DACs. How does the m_rf setup the streamer and how does the program know the address for the bitmap pixels?

Comments

  • RaymanRayman Posts: 13,883
    Look in the steamer section of the docs to see how m_rf works... There are several streamer modes and this selects the rflong 8bpp lut mode.

    There's a rdfast command before the xcont that tells it where to read from...
  • evanhevanh Posts: 15,187
    Rayman wrote: »
    There's a rdfast command before the xcont that tells it where to read from...
    Yes, to access hubRAM, the streamer makes use of the cog's hubRAM FIFO. Same FIFO that hubexec and RFxxxx/WFxxxx instructions use. So don't try to do both at once.

    Also, SETCMOD and its associated instructions defines how the streamer data gets formatted for output.

Sign In or Register to comment.