Author |
Message |
Kalms
Member |
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 |
fuck it mean it will be hard to have interlaced picture, norm will want to kill me:)
|
dodke
Member |
hmmh, i guess this means we have to start using 16.16 fixed point for timing :)
|
z5_
Member |
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 |
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 |
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 |
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 |
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?
|