Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Howto setup Linux with waitvsync and nothrottle options using KMS + Radeons  (Read 4652 times)

0 Members and 1 Guest are viewing this topic.

bitbytebit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Update: Now a liveCD .iso is available in 32 and 64 bit versions to do all this automatically

I have gotten the waitvsync option to work under Linux with Radeon cards, specifically with the R6xx/R7xx GPU's (should work with older ones too, not sure if it works with newer ones because I don't have one).

This requires a process of basically getting the newest Linux-2.6 tree from the Linux GIT and compiling a fresh new X Windows from GIT, including Mesa3d and libdrm.  Fortunately I've gotten that process mostly automated and have a good install instructions file to help people achieve this.  It also involves using my switchres program and special lrmc modeline generator too, you will need the whole setup for the Vertical Refresh to be setup right for each game.  I have a patch to xrandr to do the proper modeline switching, a patch to the Linux kernel to allow lower dotclocks than 12Mhz, and some other detailed things that need to be done for this to work right.  It's definitely brand new, they just got support for this into the kernel that works within the last few weeks.  Also there's module options to the drm stuff that allow it to work without some flaws that you see if trying this in the newest Ubuntu (which is the closest to this of any of the distributions, but there's flaws there in the default install).  I used a basic Gentoo base directory and setup without installing much else besides the core system .tgz file, have the few packages I installed listed to help X windows to compile completely and run SDL, directFB and MAME.  With all this, depending on your arcade monitor capabilities, you can get near perfect resolution and refresh rates with the mame following the roms refresh rate (using throttle=0 and waitvsync=1).  

http://arcade.groovy.org
« Last Edit: December 01, 2010, 04:24:41 pm by bitbytebit »
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

bitbytebit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Here's a new patch for the xserver which is simple, yet basically doesn't add the default modelines it usually does if the EDID doesn't exist for your monitor (which mostly would be an arcade monitor).

Code: [Select]
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b2daec7..ff5ca2c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1633,6 +1633,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
            xf86ForEachDetailedBlock(edid_monitor,
                                     handle_detailed_monrec,
                                     &p);
+       } else {
+           xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                  "No EDID on output %s\n", output->name);
+           add_default_modes = FALSE;
        }

        if (xf86GetOptValFreq (output->options, OPTION_MIN_CLOCK,
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

bitbytebit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
I've now gotten it to where you no longer need any patches for X Windows, still need the newest GIT version but only necessary to patch the Linux kernel 2.6.37-rc1 or above.  The patch for the kernel now allows arcade modelines output to the framebuffer console and removes any extra modelines from X Windows besides your modeline you want for the default X Windows setup.  The xrandr program is used, unpatched, to set the modeline used for each mame game upon runtime dynamically.  With the newest Linux kernel patched and X Windows on Radeon cards this is quite nice and you can get exact refresh rates and no tearing using the waitvsync option with nothrottle. 
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

bitbytebit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
I've got ubuntu 10.10 kernel packages up on the sourceforge site for testing, 32 and 64 bit versions, that have the arcade monitor patches applied to allow display on the console and X Windows usage of Radeon (and possibly Nvidia cards) with arcade resolutions.  They need testing, give me feedback on if they work or what needs fixing with them.
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization