Previous Thread
Next Thread
Print Thread
Resolution switching not working #47805 01/30/09 10:37 PM
Joined: Jan 2009
Posts: 14
C
Coadey Offline OP
Member
OP Offline
Member
C
Joined: Jan 2009
Posts: 14
Hi guys,

I just compiled sdlmame 0.129.1 (svn Jan 30 / Rev 4207) on SDL 1.3 (svn Jan 30 / Rev 4415) on a minimal Debian Lenny (Xserver 7.3, RandR 1.2) with an ArcadeVGA 2 (Radeon HD2400/RV610).

I'm using the sdl13/soft video driver on X, not framebuffer, and OpenGL/GLX/DRI acceleration is not available for this card. I'm using the latest "radeon" X driver available from git at freedesktop.org.

Everything works great and the speed is phenomenal, but I'm trying to get my resolutions right, as this will be going into a JAMMA cab with a standard-res (Wells-Gardner K7400) arcade monitor.

As it stands, using -switchres has no effect:

If -switchres is specified alone, the video is stretched to the size of the X screen. No resolution switching.

If -switchres and -resolution are specified, the same behavior happens (resolution is ignored).

If -window is given, the video is stretched to whatever -resolution is specified.

Here is my xrandr -q output (not the final resolutions I want to use, just a test set of modelines):

Screen 0: minimum 320 x 200, current 1280 x 768, maximum 1280 x 1280
VGA-0 connected 1280x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1280x800 60.0
1280x768 60.0*
1024x768 60.0
800x600 60.3
800x600@49i 26.2
640x480 59.9
640x480@62i 31.2
512x512@58i 29.2
512x488@61i 30.7
632x264@56 56.6
640x240@62 62.3
512x288@51 53.2
512x240@62 62.3
384x288@51 54.0
448x240@62 62.3
400x256@58 58.5
352x288@51 52.3
392x240@62 62.3
352x264@56 56.7
352x256@58 58.6
368x240@62 62.2
320x256@58 58.6
336x240@62 62.3
320x240@62 62.3
304x240@62 62.4
296x240@62 62.3
288x240@62 62.3
256x264@56 56.7
256x256@58 58.4
256x240@62 62.2
240x240@62 62.4

I can switch resolutions just fine using "xrandr --output VGA-0 --mode", but mame doesn't even seem to try (goes right to rendering).

Here is the output of a verbose mame session:

Available videodrivers: x11 dummy
Current Videodriver: x11
Display #0
Desktop Mode: 1280x768-24@0
Fullscreen Mode: 0x0-0@0
Current Display Mode: 1280x768-24@0
Renderdrivers:
x11 (0x0)
opengl (0x0)
software (0x0)
Available audio drivers:
alsa
dsp
dma
disk
dummy
Build version: 0.129.1 (Jan 30 2009)
Build architecure: SDLMAME_ARCH=-march=pentium-m -msse3 DISTRO=generic
Build defines: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 LSB_FIRST=1 NDEBUG=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=1300 USE_OPENGL=1 USE_DISPATCH_GL=1
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=2 __VERSION__="4.3.2"
Compiler defines B: __unix__=1 __i386__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Adding monitor screen0 (1280 x 768)
Using SDL multi-window soft driver (SDL 1.3+)
window: using renderer software
renderer: flag SDL_RENDERER_PRESENTFLIP2
Keyboard: Start initialization
Input: Adding Kbd #1: Keyboard #1
Keyboard: Registered Keyboard #1
Keyboard: End initialization
Mouse: Start initialization
Input: Adding Mouse #1: Configured Mouse
Mouse: Registered Configured Mouse
Input: Adding Mouse #2: Configured Mouse
Mouse: Registered Configured Mouse
Mouse: End initialization
Joystick: Start initialization
Joystick: End initialization
Audio initialized - driver: alsa, frequency: 48000, channels: 2, samples: 1024
sdl_create_buffers: creating stream buffer of 57344 bytes
ouput: opened output notifier file /tmp/sdlmame_out

Any tips would be appreciated. Thanks!

Last edited by Coadey; 01/30/09 10:42 PM.
Re: Resolution switching not working [Re: Coadey] #47806 01/31/09 12:41 AM
Joined: Feb 2007
Posts: 505
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 505
Switching video modes is currently disabled in SDL1.3 svn

Re: Resolution switching not working [Re: couriersud] #47814 01/31/09 06:17 PM
Joined: Jan 2009
Posts: 14
C
Coadey Offline OP
Member
OP Offline
Member
C
Joined: Jan 2009
Posts: 14
Thanks Courier! Should I try using SDL_VIDEO_X11_XRANDR instead, just call xrandr before/after each game, or revert back to a previous SDL 1.3? (Also thank you for all the work you've put into this!)

Re: Resolution switching not working [Re: Coadey] #47823 01/31/09 11:09 PM
Joined: Feb 2007
Posts: 505
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 505
You may try commenting out the "#undef SDL_VIDEO_X11_XRANDR" in SDL_x11modes.c

That's what I did, no guarantees given at all, of course

Re: Resolution switching not working [Re: couriersud] #47845 02/02/09 04:26 PM
Joined: Jan 2009
Posts: 14
C
Coadey Offline OP
Member
OP Offline
Member
C
Joined: Jan 2009
Posts: 14
That works; sdlmame now clearly sees the resolution list, picks the best fit and switches to it.

A caveat seems to be that the resolution isn't changed back on exit? (it's left at whatever resolution was switched to).

Re: Resolution switching not working [Re: Coadey] #47850 02/02/09 06:24 PM
Joined: Feb 2007
Posts: 505
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 505
Try uncommenting the other two "#undef" as well. If this does not fix it, we know why it is not enabled in the first place :-)

Re: Resolution switching not working [Re: couriersud] #47853 02/02/09 07:26 PM
Joined: Jan 2009
Posts: 14
C
Coadey Offline OP
Member
OP Offline
Member
C
Joined: Jan 2009
Posts: 14
Ah no change after recompiling with the SDL_VIDEO_DRIVER_X11_XINERAMA and SDL_VIDEO_DRIVER_X11_VIDMODE undefs commented. Thanks anyway though, I don't have the nerve to try RandR 1.3 again to see if that helps either, so I'll try to come up with some other workaround. smile


Moderated by  R. Belmont 

Who's Online Now
2 registered members (AJR, Pernod), 66 guests, and 1 spider.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,791
Posts115,714
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3