[oe-commits] Denis 'GNUtoo' Carikli : xmame: switch to x11 backend( to improve scaling performance on xv-enabled devices)

git version control git at git.openembedded.org
Tue Nov 30 16:19:39 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: c13b5440e97979129b4efcb2c45624328e7b0d07
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c13b5440e97979129b4efcb2c45624328e7b0d07

Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Sat Nov 27 17:59:45 2010 +0100

xmame: switch to x11 backend(to improve scaling performance on xv-enabled devices)

On nokia900 the sound has issues and CPU usage is 100% with the SDL backend
  when scalling the game to fullscreen
Using XV and MIT-SHM seem to improve performances:

With SDL:
  SDL found mode:800x480x16
  SDL found mode:800x480x16
  SDL: Using a mode with a resolution of: 800x480x16
  Initialized no effect: bitmap depth = 16, color format = RGB 565
  info: audiodevice (null) set to 16bit linear stereo 44100Hz
  info: sysdep_dsp: using sdl plugin
  info: dsp: using timer-based audio
  Average FPS: 16.623416 (988 frames)

With X11,XV,MIT-SHM:
  MIT-SHM & XV Extensions Available. trying to use.
  Can't find a suitable RGB format - trying YUY2 instead.
  XInput: Initialization...
  Initialized no effect: bitmap depth = 16, color format = YUY2
  Clearing YUY2
  Using Xv & Shared Memory Features to speed up
  info: set to 16bit linear stereo 44100Hz
  info: sysdep_dsp: using alsa plugin
  info: sysdep_mixer: using alsa plugin
  Average FPS: 23.254317 (828 frames)

The nokia900 has an omap SOC, that means that it can uses omapfb,
  which support xv, so using XV improve the performances in the case
  of the nokia900

And in the case where XV is not available
(XV disabled for testing purposes, still on nokia900):
  XInput: Initialization...
  MIT-SHM Extension Available. trying to use... Success.
  Using Shared Memory Features to speed up
  Initialized no effect: bitmap depth = 16, color format = RGB 565
  info: set to 16bit linear stereo 44100Hz
  info: sysdep_dsp: using alsa plugin
  info: sysdep_mixer: using alsa plugin
  Average FPS: 18.793345 (1267 frames)

Which is a bit faster than SDL.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>

---

 recipes/xmame/xmame_0.100.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes/xmame/xmame_0.100.bb b/recipes/xmame/xmame_0.100.bb
index cd326a2..2c47d95 100644
--- a/recipes/xmame/xmame_0.100.bb
+++ b/recipes/xmame/xmame_0.100.bb
@@ -7,7 +7,7 @@ DEPENDS = "expat virtual/libsdl libsdl-mixer"
 SRC_URI = "http://x.mame.net/download/historic/xmame-${PV}.tar.bz2 file://tiny.mak"
 S = "${WORKDIR}/xmame-${PV}"
 
-PR = "r1"
+PR = "r2"
 
 inherit flow-lossage siteinfo
 
@@ -15,7 +15,7 @@ ENDIANESS = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DLSB_FIRST', '-D
 
 do_compile() {
     test -z "${TINY}" && oe_runmake TARGET="mame" CC="${BUILD_CC}" maketree xmame.obj/cpu/m68000/m68kmake
-    oe_runmake TARGET="mame" JOY_SDL=1 SOUND_SDL=1 DISPLAY_METHOD=SDL                                      \
+    oe_runmake TARGET="mame" SOUND_ALSA=1 DISPLAY_METHOD=x11 X11_MITSHM=1 X11_XV=1 XINPUT_DEVICES=1      \
                CC="${CC}" CXX="${CXX}" CFLAGS="-I. -Isrc -Isrc/include -Isrc/unix ${CFLAGS} ${ENDIANESS}"  \
                CXXFLAGS="${CXXFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}"                                      \
                RANLIB="${RANLIB}" MY_CPU="${TARGET_ARCH}" ARCH="${TARGET_OS}"                              \
@@ -24,7 +24,7 @@ do_compile() {
 
 do_install() {
 	install -d ${D}${bindir}
-	install -m 0755 xmame.SDL ${D}${bindir}
+	install -m 0755 xmame.x11 ${D}${bindir}
 }
 
 SRC_URI[md5sum] = "c289797531d540853c835a2bb9fad8bc"





More information about the Openembedded-commits mailing list