Shop OBEX P1 Docs P2 Docs Learn Events
P1 Video scaling — Parallax Forums

P1 Video scaling

pic18f2550pic18f2550 Posts: 392
edited 2024-02-05 16:33 in PASM/Spin (P1)

Hello,
I would like to modify this driver a little.
The resolution in the memory is 256x192.
The resolution on the monitor is 512x384.
To double the lines is no problem but how do I get the pixel 2x in a row?
Halving the pixel clock is not possible with 35MHz.
Does anyone have a tip?

Comments

  • AribaAriba Posts: 2,678
    edited 2024-01-22 20:37

    To half the pixelrate, try to change:

                            movi    frqa,#(pr / 5) << 3     'set pixel rate                                      
    

    into

                            movi    frqa,#(pr / 5) << 2     'set pixel rate                                      
    

    or set the PLL to x2 instead of x4

    Andy

    Edit: You also need to set the pixel based constants like hp, vp, hf, hs, hb to half the value.

  • Wuerfel_21Wuerfel_21 Posts: 4,311
    edited 2024-01-22 23:00

    Far simpler, no need to change the main video clock, just double up the VSCL value used for the visible area. See documentation for that register.

  • pic18f2550pic18f2550 Posts: 392
    edited 2024-01-26 16:38

    vscl_pixel long 1 << 12 + 32 '1 pixel per clock and 32 pixels per set
    ----->
    vscl_pixel long 2 << 12 + 32 '2 pixelclock per pixel and 32 pixels per set

    With the correct description, I now also understand this.

    '  xtiles = hp / 32              '{Pixelbreite}
      xtiles = hp / 64              '{Pixelbreite}
    
    
  • @pic18f2550 said:

    vscl_pixel long 1 << 12 + 32 '1 pixel per clock and 32 pixels per set
    ----->
    vscl_pixel long 2 << 12 + 32 '2 pixelclock per pixel and 32 pixels per set

    You actually need to double the 32, too. That indicates the number of video clocks per WAITVID tile. So by setting 2 << 12 + 32, you only actually get the first 16 pixels.

  • Ok.
    I couldn't recognise this connection in the translated texts.

    Thank you.

    vscl_pixel long 2 << 12 + 64 '2 pixelclock per pixel and 32 pixels per set

Sign In or Register to comment.