Shop OBEX P1 Docs P2 Docs Learn Events
VGA Overlay / Picture in Picture — Parallax Forums

VGA Overlay / Picture in Picture

TubularTubular Posts: 4,717
edited 2011-08-05 15:58 in Propeller 1
I am trying (ultimately!) to paste the prop's vga output in the bottom right corner of a VGA monitor, overlaying the existing signal from the PC to the VGA monitor. I am aiming for an effect similar to what "Picture in Picture PIP" TVs do.

To do this, I am using a vga splitter cable to add the prop in the middle of the usual PC -> VGA monitor connection. So its PC -> Prop -> VGA monitor. The prop's video output needs to listen passively for the H and V sync pulses, wait a period of time (for horizontal offset), then quickly plaster its own pixels on top of the signal coming from the PC.

I am not relying on a monitor with PIP, but rather overlaying the PIP on a standard VGA monitor using the video capabilities of the prop.

The prop is able to 'tug' the R, G, B analog lines higher or lower, by outputting a high or low logic level via its 240 and 470 ohm series resistors. Due to the prop resistors, black output from the prop effectively 'dims' the PC signal, creating a nice alpha channel blending effect. After each scanline the prop pins are put into input mode.

So whats the benefit?
* It will be possible to view the prop output in the corner of the screen while coding in the prop tool or BST.
* The memory limits of the prop mean its well suited to a small, inlaid display, resolution wise. Ie on a large screen you have noticeable fat pixels, but on when shrunk to PIP size it will look smooth.
* It might allow neat 'notification' programs, which pop up on screen when something happens, then fade away completely (warning message, or "you have mail" etc)

Bear with me, this will take a little while as I'm still learning Pasm. Tonights test was just to check sync issues and how dim / bright the overlaps can make the VGA display. So far I'm just working with vertical bars synched to the H sync pulse. Sorry about the rotated photo. Its too late here to bother correcting!
1024 x 768 - 124K
1024 x 768 - 129K
1024 x 768 - 98K

Comments

  • KyeKye Posts: 2,200
    edited 2011-08-05 08:27
    That's totatly possible. Getting in sync with the monitor will difficult however as the pixel clock is in the 100 MHZ range.
  • TubularTubular Posts: 4,717
    edited 2011-08-05 14:20
    Hi Kye,

    There is no need to get in sync with the pixel clock, just sync to the H sync pulses. Because we're overlaying onto analog signals it doesn't really matter if the props pixels are 1, 2, or 3.16 dotclocks wide

    There is a small phase variability from line to line due to the clock difference between the monitor dotclock and prop, and this shows up as a 'soft edge'. No enough to stop us, though.

    Might need to pick your brain a bit (or a lot!) when I try and graft your VGA64 driver onto this, Kye.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-05 14:39
    If you wanted to, you might be able eliminate even the "soft edge" by driving the Propeller system clock from a frequency synthesizer that's phase-locked to the horizontal sync. This may require that HSYNC run continuously and/or maintain phase through the vertical blanking interval, though, which I'm not sure is the case.

    -Phil
  • TubularTubular Posts: 4,717
    edited 2011-08-05 15:28
    Yeah, good idea Phil.

    I think the H sync does keep going through blanking interval, as (old stlye) monitors would also need something to lock on to, and that would make it much easier.

    But I'm not 100% sure either. Time to 'scope a few more sources.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-08-05 15:58
    Interesting concept.
Sign In or Register to comment.