VGA Overlay / Picture in Picture
Tubular
Posts: 4,717
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!
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!
Comments
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
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.