A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / PAL refresh rate

 

Author Message
Kalms
Member
#1 - Posted: 30 Mar 2009 00:56
Reply Quote
I did some calculations using Blueberry's measurements in the "My Amiga 4k synth" thread, and got these figures for PAL refresh rates:

non-interlaced: 49.9204...hz (313 lines per field)
interlaced: 50.0003...hz (312 or 313 lines per field, alternating)

So. uh. If non-interlaced refresh runs at 49.92hz but your code thinks that vsync interrupts should occur exactly 50 times per second... and there is no explicit synchronization between audio and video...? Perhaps the video output will lag behind the soundtrack after a while?

So that's why we've been having trouble with audio/video synchronization all these years. Syncing with the assumption that vblank runs at 49.92hz suddenly solves all those issues for us!

Argh.

Thanks Blueberry. :)
_Jamie_
Member
#2 - Posted: 30 Mar 2009 20:07
Reply Quote
fuck it mean it will be hard to have interlaced picture, norm will want to kill me:)
dodke
Member
#3 - Posted: 30 Mar 2009 20:21
Reply Quote
hmmh, i guess this means we have to start using 16.16 fixed point for timing :)
z5_
Member
#4 - Posted: 30 Mar 2009 21:36
Reply Quote
I think it's a trick from Kalms to disorientate the competition just before Breakpoint... very cunning

Seriously though, wasn't the only real thrustworthy fact about timing the certainity that vsync interrupt was 50 times / second and on all setups? Or am i missing something? How is vsync behaving on winuae btw (curious because i still haven't solved my timing problem)?
Kalms
Member
#5 - Posted: 31 Mar 2009 09:10
Reply Quote
z5: The vsync interrupt is triggered at a specific point during the display of a frame. If the frame takes less than 0.02s to display, you get >50 interrupts per second; if the frame takes more, you get <50 interrupts per second. It so happens that there's a different number of buscycles involved in displaying a non-interlaced and a non-interlaced screen; the time between each vsync interrupt will vary accordingly.

Jamie: you can just fudge the timing, that's what we're going to do anyway :)
winden
Member
#6 - Posted: 14 Apr 2009 23:33
Reply Quote
If you always turn on interlace but don't actually switch bitplane pointers depending on the field, you don't need to calculate the extra resolution but can still enjoy the "better" timing ;)
Kalms
Member
#7 - Posted: 15 Apr 2009 00:56
Reply Quote
winden: ... uh, and thereby having the "non-interlaced" image bobbing up and down by half a scanline? or am I missing something here?
winden
Member
#8 - Posted: 15 Apr 2009 19:35
Reply Quote
Turning on interlace without doing the per-field switching gives a faint flicker (from memory last time I used a CRT) on a static workbench screen.

If you still have a intuition-compliant effect shell around, you can try it yourself by running the "lacer" workbench tool and then starting your effect.

I guess that we never noticed that sort of timing discrepancy between screen and music because of the popularity of driving the image from the mod-pattern number and the mod players from the lvl3 interrupt, right?

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0