I mentioned that the -noxv problem is fixed in my current tree, and that 
he should try -yuv to fix his Xv colors problem.

Any comments on the DGA changes?

----- Forwarded message from ?ric Brunet <[EMAIL PROTECTED]> -----

Date: Wed, 2 Oct 2002 13:34:46 +0200
From: ?ric Brunet <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Three problems with xmame-0.61.1-pre7
User-Agent: Mutt/1.3.25i
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
X-Spam-Status: No, hits=-5.9 required=5.0
        tests=PATCH_UNIFIED_DIFF,SPAM_PHRASE_01_02,USER_AGENT,
              USER_AGENT_MUTT
        version=2.41
X-Spam-Level: 

Hi,

I have tested xmame-0.61.1-pr7 on i386/linux, with an xfree86 4.2.0 and
XFree86 4.2.99 with an i830MG card.

I have encountered a couple of problems...

DGA is not working
==================

My XFree is configured in 24 bits, and xmame -x11 1 doesn't work properly out
of the box: the colors are all scrambled. In order to get it working, I had to
revert some logic in src/unix/video-drivers/xf86_dga2.c. Here is my patch:
-----------------------------------------------------------------------------
--- xmame-0.61.1-pr7/src/unix/video-drivers/xf86_dga2.c.orig    Mon Sep 30 21:12:03 
2002
+++ xmame-0.61.1-pr7/src/unix/video-drivers/xf86_dga2.c Mon Sep 30 21:21:18 2002
@@ -362,11 +362,13 @@
        xf86ctx.base_addr = xf86ctx.device->data;
        xf86ctx.vidmode_changed = TRUE;
 
-       if (bitmap_depth == 32)
+       if (bitmap_depth != 32)
                depth = xf86ctx.device->mode.bitsPerPixel;
        else
                depth = xf86ctx.device->mode.depth;
 
+       fprintf(stderr_file,"Debug: bitmap_depth = %d   mode.bitsPerPixel = %d   
+mode.depth = 
+%d\n",bitmap_depth,xf86ctx.device->mode.bitsPerPixel,xf86ctx.device->mode.depth);
+
        fprintf(stderr_file,"VidMode Switching To Mode: %d x %d\n",
                xf86ctx.device->mode.viewportWidth,
                xf86ctx.device->mode.viewportHeight);
-----------------------------------------------------------------------------
When I run xmame -x11 1, here are the messages I get (with patch applied)
--------------------------------------------------------------------------
....
XDGA: info: found 3 modes:
OSD: Info: Ideal mode for this game = 425x240
Debug: bitmap_depth = 16   mode.bitsPerPixel = 32   mode.depth = 24
VidMode Switching To Mode: 640 x 480
XF86-DGA2 running at: 32bpp
Using 16bpp video mode
....
---------------------------------------------------------------------------
Extracts of xdpyinfo:
-----------------------------------------------------------------------------
....
screen #0:
  dimensions:    1024x768 pixels (347x260 millimeters)
  resolution:    75x75 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x2c
  depth of root window:    24 planes
....
-------------------------------------------------------------------------

Please note that I had this same problem with xmame-0.58.3 and
xmame-0.60.1 If I configure my XServer in 16 bits it works fine
unpatched. I cannot configure my XServer in 32 bits (not supported by
hardware)

Xv not working
==============

In the XFree86 cvs appeared xvideo support for my video card. When I try
xmame, the window appears, I can rescale it, but the colors are wrong. On the
intro screen, (which is supposed to be white text on black), the text is black
with a little bit of purple and the background is green. I have this behaviour
in 2'bpp and 16bpp.

Please note that Xv support in XFree is good enough to watch DVDs with ogle, so the 
problem lies probably with xmame.

Here is the output of xmame (in 24 bpp)
--------------------------------------------------------------------------
Using a Visual with a depth of 24bpp.
MIT-SHM & XV Extensions Available. trying to use... 
Can't find a suitable RGB format - trying YUY2 instead... Success.
Using Xv & Shared Memory Features to speed up
Actual bits per pixel = 32... Ok
Using 16bpp video mode
---------------------------------------------------------------------------
Here is the output of xvinfo:
-----------------------------------------------------------------------------
X-Video Extension version 2.2
screen #0
  Adaptor #0: "I830/I845G Video Overlay"
    number of ports: 1
    port base: 60
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x22
      depth 24, visualID 0x23
      depth 24, visualID 0x24
      depth 24, visualID 0x25
      depth 24, visualID 0x26
      depth 24, visualID 0x27
      depth 24, visualID 0x28
      depth 24, visualID 0x29
    number of attributes: 3
      "XV_COLORKEY" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66046)
      "XV_BRIGHTNESS" (range -128 to 127)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range 0 to 255)
              client settable attribute
              client gettable attribute (current value is 64)
    maximum XvImage size: 1440 x 1080
    Number of image formats: 4
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x59565955 (UYVY)
        guid: 55595659-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
--------------------------------------------------------------------

I have tried to force xmame to use YV12 instead of YUY2 by editing x11_window.c
It worked, colors were much better, nearly perfect. Perhaps bright reds and
bright greens are a little bit blurry. I don't know if it expected or not.

Option -noxv is not working
===========================

If I try that while Xv is available, I get something like
---------------------------------------------------------------
Using a Visual with a depth of 24bpp.
MIT-SHM Extension Available. trying to use... Success.
Using Shared Memory Features to speed up
Actual bits per pixel = 32... Ok
Using 16bpp video mode
info: setting fragsize to 1024, numfrags to 5
info: fragsize = 1024, numfrags = 8
warning: obtained fragsize/numfrags differs too much from requested
   you may wish to adjust the bufsize setting in your xmamerc file, or try
   timer-based audio by adding -timer to your command line
info: audiodevice /dev/dsp set to 16bit linear stereo 22050Hz
info: sysdep_dsp: using oss plugin
info: sysdep_mixer: using oss plugin
X Error of failed request:  XvBadPort
  Major opcode of failed request:  141 (XVideo)
  Minor opcode of failed request:  4 ()
  Serial number of failed request:  31
  Current serial number in output stream:  33
----------------------------------------------------------------------

If you need more information, or if you want me to try something, don't
hesitate to ring me.

Regards,
                ?ric Brunet

----- End forwarded message -----

_______________________________________________
Xmame mailing list
[EMAIL PROTECTED]
http://toybox.twisted.org.uk/mailman/listinfo/xmame

Reply via email to