#21 Re-implement PAL Video Module

closed-accepted
None
5
2010-06-06
2010-05-26
Paul S
No

Currently the PAL Video Module is disabled (commented out), one reason is the internal methods it used are not supported in current code. I have recoded this so that it works. (Once submitted/provided, I would like to have someone check that I have done this in a way that makes sense).

Also I need to check that I'm not consuming too much CPU in the way I've done the mod.

I would also like comments on the actual use of IN1 and IN2 inputs to read the PAL signal.

I have used these signals as SYNC and LUMINANCE. In a true PAL composite signal, these are superimposed such that : (not using actual values, but example values)
sync is 0
no sync black is 0.3 (say)

no sync white is 1.0

I think that in the very least the two pins should be labelled SYNC and LUME, or possibly move to the composite one input (analog) method.

Retaining two pins, SYNC and LUME, makes it easier from a wiring point of view as the resistors required do not need to be implemented on the virtual breadboard. (And it then simply makes the change as simple as a rename of pins for clarity)

The proposed change involves the following:

* Recode where necessary the module to use the new methods
* Rename in1 and in2 to be SYNC and LUME
* SYNC is basically either ON or OFF (low means SYNC)
* LUME then becomes an analog light level with 0=black 5v=white - anywhere inbetween a shade of grey (proportional)
* Include a simple PAL test program to examples

In my example I've only used LUME either on (white) or off (black).

Opened as a tracker artifact (I hope I'm doing the right thing), will attach svn diffs shortly.

Paul S.

Discussion

  • Paul S

    Paul S - 2010-05-26

    Initial draft recoded PAL Video module and test program screenshot

     
  • Paul S

    Paul S - 2010-05-26

    local changes: cd modules ; svn diff output

     
  • Paul S

    Paul S - 2010-05-26

    attached file with svn diff of the modules directory (all changes in there)

     
  • Paul S

    Paul S - 2010-05-26

    simple (early version) PAL video PIC program (HEX)

     
  • Paul S

    Paul S - 2010-05-26

    simple PAL video PIC program gpsim control file

     
  • Paul S

    Paul S - 2010-05-26

    Added a simple (early version) of a PIC program that outputs (two pin) PAL video.
    place both in a directory and run with :
    $ gpsim -c paltv-stim.stc

    You'll note:
    (1) it runs really slowly (about 1/60th of realtime)
    (2) input on the left is stimulated automatically, and the other stays fixed (not stimulated)

     
  • Roy Rankin

    Roy Rankin - 2010-05-27

    patch committed to SVN, but should be add back into documentation.

     
  • Roy Rankin

    Roy Rankin - 2010-05-27
    • assigned_to: nobody --> roy_r_rankin
     
  • Paul S

    Paul S - 2010-05-30

    Changes to speed up render (100-fold)

     
  • Paul S

    Paul S - 2010-05-30

    With the above changes in the trunk:
    I've added another svn diff on top of that (see attached) to speed up the render (suggested by Ralf F):
    Rather than replot every pixel, only those that change are rewritten to the image.
    As the speed increase is out-of-sight, I've also increased the x resolution to double, to make it similar to the appropriate ratio.
    I can now get near realtime display of the example I'm using. Only downside would be if there are actual problems in the video signal, it will leave a persistent image (although that is probably not a bad thing).

    Thanks Ralf!

     
  • Nobody/Anonymous

    I commited a variant that should at least clear any old image data from the pixmap.
    I've tested it with the video projects i could find. Hopefully it works for you too.

     
  • Roy Rankin

    Roy Rankin - 2010-06-06
    • status: open --> closed-accepted
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks