Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical sync incorrect with PAL. #35

Open
GoogleCodeExporter opened this issue Feb 27, 2016 · 7 comments
Open

Vertical sync incorrect with PAL. #35

GoogleCodeExporter opened this issue Feb 27, 2016 · 7 comments

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

What steps will reproduce the problem?
1. Wire according to schematic
2. Connect to sync-sensitive PAL+NTSC monitor/TV
3. Load DemoPAL from 1-beta

What is the expected output? What do you see instead?
Expecting a stable demo, instead get a rolling display where vertical sync does 
not lock on. In my case, the monitor detects the signal as NTSC, and fails to 
sync, since TVOut tries to do PAL :)

What version of the product are you using? On what operating system?
TVOutBeta1 from 2010-12-03. Hardware is ATMega328p running at 16MHz.

Please provide any additional information below.
In TVOut/spec/video_properties.h (line 60), _PAL_LINE_STOP_VSYNC is defined to 
7. Seeing that the corresponding define for NTSC is 3, I assumed (did not look 
closely at source) that this corresponded to the sync-width in #-of-lines. NTSC 
should be 3, but PAL should be 2.5. By replacing the 7 for 2, I was able to get 
a proper vsync lock. I have not tried this fix with other monitors (yet).

To fix:
Find _PAL_LINE_STOP_VSYNC, replace 7 with 2.



Original issue reported on code.google.com by jon.lang...@gmail.com on 15 May 2011 at 4:05

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

i also had this issue with the TVOutBeta1... [ i couldn't get the earlier 
versions to sync at all ]

i can confirm that employing jon's fix detailed above corrected the issue for 
me.

Original comment by i...@ushtey.com on 18 Jan 2012 at 10:52

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

The vertical sync is messed up regardless of NTSC or PAL, I have made some 
improvements to NTSC but i haven't tried with PAL yet.  Don't expect anything 
to soon however...


Original comment by mdmetzle@gmail.com on 25 Jun 2012 at 1:36

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

I have fixed the v-Sync-problem in the video_gen.cpp on line 98

original: 
void vsync_line() {
    if (display.scanLine >= display.lines_frame) {
        OCR1A = _CYCLES_VIRT_SYNC;
        display.scanLine = 0;
Fixed:
void vsync_line() {
    if (display.scanLine >= display.lines_frame) {
        OCR1A = _CYCLES_VIRT_SYNC;
        display.scanLine = -1; 

Original comment by lerrypag...@gmail.com on 26 Nov 2013 at 1:38

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

Hello! I had the same problem. arduino nano 328p (Chinese copy) and ebay rear 
camera display. Vertical sync was not working and the image was scrolling down. 
I changed this and it works! 2 days to go. The right TV, the image function 
properly, but here little 4, 3 inch, it will not begin operating 

"
I have fixed the v-sync problem in the video_gen.cpp line 98 

original: 
void vsync_line () {
if (display.scanLine> = display.lines_frame) {
OCR1A = _CYCLES_VIRT_SYNC; 
display.scanLine = 0; 
Fixed: 
void vsync_line () {
if (display.scanLine> = display.lines_frame) {
OCR1A = _CYCLES_VIRT_SYNC; 
display.scanLine = -1; 
"

Original comment by Jonne.Ta...@gmail.com on 25 Feb 2014 at 7:23

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

and yes. I had a PAL signal.

Original comment by Jonne.Ta...@gmail.com on 25 Feb 2014 at 7:24

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Feb 27, 2016

Works like a charm.

Original comment by philkazi...@gmail.com on 2 Aug 2014 at 11:21

@PanchoRP

This comment has been minimized.

Copy link

@PanchoRP PanchoRP commented Jun 14, 2017

I'd tried this:
Find _PAL_LINE_STOP_VSYNC, replace 7 with 2
and this:
v-Sync-problem in the video_gen.cpp on line 98
No one fix the problem.
In the 12" LCD still have the rolling efect and it detects the signal as NTSC, not PAL. ¿any idea of how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.