Yep.  The effect is called shearing or tearing.  The way to get rid of 
shearing is to refresh the display on the vertical retrace - when the 
monitor's electron beam finished scanning a frame and returns to the top of 
the screen.  If you double-buffer, and tell the video card to switch buffers 
during the vertical retrace, there will be no shearing.

Unfortunately, IIRC, there is no reliable way to get vertical retrace 
information from the video card in X.  SDL can do this if you're running 
straight from the console, without X.  IIRC, AdvanceMAME running in SDL 
console mode can sync to vertical retrace and eliminate your problem.

So if you have nothing else to do, go bug the X.org developers and demand that 
they implement a way to sync with vertical retrace in the next version of X.

On Thursday 20 May 2004 11:20 pm, Lawrence Gold wrote:
> Meghazi Fabien wrote:
> > Hi all,
> >
> > I've got visual artefact with xmame when running games with scrollings.
> > It seems to be a double buffering problem. The problem appears using xv
> > but also with dga and sdl (it's even worst with dga and sdl than with xv)
> > I tried mame32 under windows and I experienced the same problem. This
> > kind of problem is more easy to see in shadow dancer by example (the
> > scene between levels : the panel scrolling from right to left then back
> > from left to right, you can easily see that the frame has been displayed,
> > but the first part is the next frame and it has not yet been drawed
> > completely so at the bottom of the picture you can see the previous
> > frame, this results as a splitting line that makes a pixel delay in
> > scrollings)
> > But when I activated the mame32 "triple buffering" option, the problem
> > disapeared !!
> > I don't find this option under xmame. Is there an equivalent or something
> > ? Is there a plan to include this option in xmame or is it impossible due
> > to X limitations ?
>
> I see the same thing here.  There used to be a double buffering option
> for the SDL target, but it's no longer available.  I'm not sure what the
> best solution would be -- either to add the equivalent of MAME32's
> triple buffering, or to somehow sync the drawing to the monitor's
> refresh.  (The first option sounds like it'd be less troublesome all
> around.)  I'll file your message in my xmame todo folder and make an
> attempt at a solution eventually.

Attachment: pgpYpI5g0t2MR.pgp
Description: signature

Reply via email to