GTK/X11 Port (aka Linux/UNIX GUI)

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Scudreloaded
Snes9x White Belt
Posts: 3
Joined: Fri Mar 13, 2009 5:18 am

okay...

Post by Scudreloaded »

guess ill have to be the Guineae pig on this one.
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

So I got rev 69 and did:

Code: Select all

./configure --with-opengl --with-gtk --with-joystick --with-debugger
sudo apt-get install build-dep snes9x
sudo apt-get install zlibg1-dev
sudo apt-get install zlibgl-dev
(neither of which exist)
and I am STILL getting "no rule to make unix/unix.o". :x I tried --with-x as well.
There is a libgl-dev (as opposed to zlibg1-dev), but it has no installation candidate.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

I shoot in the dark, but have you tried sudo apt-get update just before?
Furthermore, the package you're looking for is named zlib1g-dev, not zlibg1-dev ;)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

WhyDoIHaveToRegister wrote:So I got rev 69 and did:

Code: Select all

./configure --with-opengl --with-gtk --with-joystick --with-debugger
sudo apt-get install build-dep snes9x
sudo apt-get install zlibg1-dev
sudo apt-get install zlibgl-dev
(neither of which exist)
and I am STILL getting "no rule to make unix/unix.o". :x I tried --with-x as well.
There is a libgl-dev (as opposed to zlibg1-dev), but it has no installation candidate.
You need to do the configure and make process in the gtk subdirectory. It's a separate configure script now.
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

OK, now I get this error:

Code: Select all

snes9x_gtk-debug.o: In function `S9xDoDebug':
debug.cpp:(.text+0x41f8): undefined reference to `S9xTextMode'
debug.cpp:(.text+0x4280): undefined reference to `S9xGraphicsMode'
collect2: ld returned 1 exit status
make[1]: *** [snes9x-gtk] Error 1
The GTK configure script doesn't recognize --with-x. I also added --with-netplay (why not?), but I doubt that's causing this problem.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

WhyDoIHaveToRegister wrote:OK, now I get this error:

Code: Select all

snes9x_gtk-debug.o: In function `S9xDoDebug':
debug.cpp:(.text+0x41f8): undefined reference to `S9xTextMode'
debug.cpp:(.text+0x4280): undefined reference to `S9xGraphicsMode'
collect2: ld returned 1 exit status
make[1]: *** [snes9x-gtk] Error 1
The GTK configure script doesn't recognize --with-x. I also added --with-netplay (why not?), but I doubt that's causing this problem.
You're trying to mangle together two different build configurations. You need to 'make clean'.
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

Still the same error.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

WhyDoIHaveToRegister wrote:Still the same error.
Start over by removing the directory and extracting again. Make sure to do everything with the gtk sub-directory as the current working directory.

In the future, to avoid confusion, I'll remove the original build scripts from the full tarball, since they won't work with the other ports missing anyway.
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

No good...
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

I've committed a fix to SVN to fix your last error, so it can compile with --with-debugger. Is there a particular reason you're trying to use the flag (rom hacking, etc.)? There's currently no way to actually access the Snes9x debugger in this port.
ps3bodega
Snes9x White Belt
Posts: 2
Joined: Sun Mar 22, 2009 2:44 pm

snes9x-gtk 1.51-69

Post by ps3bodega »

Hi -- I have been building snes9x-gtk RPM packages for YDL / PS3 since around version 27 or so.

Since updating from 67 to 69 there seems to be a problem ... I didn't notice it at first, but about every second or so games will "jerk" or freeze up. I'm seeing it in multiple games (tried Super Mario World and Donkey Kong Country) with the same result.

Going back to 67 I don't see the problem.

I haven't changed my configure options between the two builds -- normally I use:

./configure --prefix=/usr --with-gtk --without-opengl --without-assembler --with-joystick --with-netplay --without-xrandr

Some version info for the 69 build:

Code: Select all

[bill@localhost ~]$ ldd /usr/bin/snes9x-gtk
        linux-vdso32.so.1 =>  (0x00100000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00f50000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00670000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x0f690000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x0f660000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x0f640000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x0eef0000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0x0f300000)
        libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x0f240000)
        libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0x0fb80000)
        libdl.so.2 => /lib/libdl.so.2 (0x0fe10000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x0ebf0000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x0fc00000)
        libglade-2.0.so.0 => /usr/lib/libglade-2.0.so.0 (0x0fac0000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x0ef90000)
        libz.so.1 => /usr/lib/libz.so.1 (0x0fcc0000)
        libm.so.6 => /lib/libm.so.6 (0x0fd30000)
        libportaudio.so.2 => /usr/lib/libportaudio.so.2 (0x0f780000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0fcf0000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0f3c0000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x003e0000)
        libXv.so.1 => /usr/lib/libXv.so.1 (0x0f1f0000)
        libXtst.so.6 => /usr/lib/libXtst.so.6 (0x007b0000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00530000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x003b0000)
        libc.so.6 => /lib/libc.so.6 (0x0fe40000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x0f8e0000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x0fa90000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0f7f0000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x0f7d0000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x0f580000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x0f210000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x0f600000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x0f5e0000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x0f620000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x0f2b0000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0f840000)
        librt.so.1 => /lib/librt.so.1 (0x0fc90000)
        /lib/ld.so.1 (0x0ffc0000)
        libasound.so.2 => /lib/libasound.so.2 (0xf7ec1000)
        libjack.so.0 => /usr/lib/libjack.so.0 (0x0fc60000)
        libesd.so.0 => /usr/lib/libesd.so.0 (0x00390000)
        libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x002d0000)
        libaudio.so.2 => /usr/lib/libaudio.so.2 (0x001b0000)
        libXt.so.6 => /usr/lib/libXt.so.6 (0x00ac0000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x0fb60000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0fb40000)
        libexpat.so.0 => /lib/libexpat.so.0 (0x0fa50000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x0ea30000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x0ecc0000)
[bill@localhost ~]$ file /usr/bin/snes9x-gtk 
/usr/bin/snes9x-gtk: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
This is on a PS3 running YDL 6.1. The RPM is here:
http://pleasantfiction.ipower.com/ps3li ... 6.bdg.html

And some forum posts with others describing the problem:
http://pleasantfiction.ipower.com/bodeg ... ?f=6&t=301

The problem only shows up when using a joystick -- not when the controls are set up on the keyboard. I've tried with both the Sixaxis and a Logitech Cordless Rumblepad 2 with the same result.

Any ideas?

Thanks,

billb
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: snes9x-gtk 1.51-69

Post by BearOso »

ps3bodega wrote:Hi -- I have been building snes9x-gtk RPM packages for YDL / PS3 since around version 27 or so.

Since updating from 67 to 69 there seems to be a problem ... I didn't notice it at first, but about every second or so games will "jerk" or freeze up. I'm seeing it in multiple games (tried Super Mario World and Donkey Kong Country) with the same result.
Yeah, I noticed the same problem. It's related to the screensaver disabling code. There's been a fix in SVN for several days. I'll release a new version momentarily.

*edit* Version 70 is posted. If this doesn't fix the issue, let me know.
ps3bodega
Snes9x White Belt
Posts: 2
Joined: Sun Mar 22, 2009 2:44 pm

Post by ps3bodega »

Perfect -- that took care of it.

Thanks!
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

Yes, that finally got it. :D I was planning to use the debugger for ROM hacking. At least if I can compile it I can try to add in an interface to a remote debugger.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: snes9x-gtk 1.51-69

Post by BearOso »

byuu wrote:
BearOso wrote:Yeah, I noticed the same problem. It's related to the screensaver disabling code. There's been a fix in SVN for several days. I'll release a new version momentarily.
Ah, sorry for the trouble that caused. There must be something else in my GTK+ codebase, as I've never had a problem with X-Video + XTestFakeKeyEvent. Anyway, not a huge deal. If I recall the only thing XResetScreenSaver didn't work with was the retro xscreensaver package, which nobody should be using anymore anyway.
It's not your fault. I was tweaking things because XSync was forcing my XVideo driver to buffer swap early. The version I went back to is the XTestFakeKeyEvent lines without the XSyncs. I still see key-up, key-down events without them, and there's no big skips (these didn't happen with your code) or very small vsync hiccups with XVideo (these did).

XResetScreenSaver seems to work with gnome-screensaver and kde3's screensaver at the least. Unfortunately, gnome-power-manager ignores it and blanks the monitor. They're supposed to standardize on a org.freedesktop.ScreenSaver dbus interface eventually, but gss/gpm doesn't provide it yet. So the best fix is still the fake key events.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Re: snes9x-gtk 1.51-69

Post by Screwtape »

BearOso wrote:XResetScreenSaver seems to work with gnome-screensaver and kde3's screensaver at the least. Unfortunately, gnome-power-manager ignores it and blanks the monitor. They're supposed to standardize on a org.freedesktop.ScreenSaver dbus interface eventually, but gss/gpm doesn't provide it yet. So the best fix is still the fake key events.
Does the xdg-screensaver tool do the right thing?
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: snes9x-gtk 1.51-69

Post by BearOso »

Screwtape wrote: Does the xdg-screensaver tool do the right thing?
It doesn't have support for KDE 4. I'm also not sure about GTK keeping the top-level window id the same. It's also another dependency. I don't really feel inclined to try yet another method, either. :) All the desktop environment developers seem to think rolling their own screensavers is a good idea, then expect people to support every screensaver API under the sun. I had a good laugh reading this line from the XScreenSaver FAQ:
How do I prevent xscreensaver from blanking the screen when I'm watching movies on my computer?

... You should ask the author of the movie-playing software you are using to add explicit support for xscreensaver to their program.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Re: snes9x-gtk 1.51-69

Post by Screwtape »

BearOso wrote:
Screwtape wrote: Does the xdg-screensaver tool do the right thing?
It doesn't have support for KDE 4.
Ah, apparently that's bug 17537. The bug mentions that KDE 4 support has been applied to CVS but it's anybody's guess when a new version might be released. *sigh*
BearOso wrote: I'm also not sure about GTK keeping the top-level window id the same.
...huh? Window IDs are handed out by the X server, not by GTK+ as long as the top-level window is around (mapped or unmapped, maximized, minimized or shaded) it will have the same window ID. Of course, once the top-level window closes it won't have the same window ID, but at that point you don't care whether the screensaver comes on or not. :)
It's also another dependency. I don't really feel inclined to try yet another method, either. :)
Fair enough. I would expect it to be present on every modern Linux distro though - at least in Ubuntu, it's Recommended by ubuntu-desktop, kubuntu-desktop, xubuntu-desktop, ubuntustudio-desktop, ubuntu-mobile and most importantly lsb-desktop ("a standard core system that third-party applications written for Linux can depend upon."), which is also responsible for including GTK+ and Qt. :)

That said, if it doesn't actually *work*, there's not much point.
All the desktop environment developers seem to think rolling their own screensavers is a good idea, then expect people to support every screensaver API under the sun.
Well, that's kind of the point of xdg-screensaver, of course. It's a pity it seems so abandoned. :(
Post Reply