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!
jetfire4
Snes9x White Belt
Posts: 6
Joined: Sat Jan 05, 2008 2:20 am

got through configure but now make won't work

Post by jetfire4 »

I tried "export GTK_CFLAGS=/usr/lib/pkgconfig" and "export GTK_LIBS=/usr/lib/pkgconfig" which is the directory as best as I can tell where the gtk configuration is located and it made it through the configure process, but now the make won't work and gives me the "error 1". I'll have to keep trying.
jetfire4
Snes9x White Belt
Posts: 6
Joined: Sat Jan 05, 2008 2:20 am

Nevermind, got it to work again

Post by jetfire4 »

I'm a dumbass, I haven't installed this for such a long time I forgot the command was PKG_CONFIG_PATH=/usr/local/lib/pkgconfig not PKG_CONFIG=/usr/local/lib. It complies now. Can the moderator please just delete these posts from today.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: Nevermind, got it to work again

Post by BearOso »

jetfire4 wrote:I'm a dumbass, I haven't installed this for such a long time I forgot the command was PKG_CONFIG_PATH=/usr/local/lib/pkgconfig not PKG_CONFIG=/usr/local/lib. It complies now. Can the moderator please just delete these posts from today.
To the contrary, this is a common problem with pkg-config, whether with this program or another. Your experiences will prove a help to others with the same problems.

Since you're not the only one with this issue, I've added some secondary information to the configure step in the first post to hopefully aid those having trouble.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Bear0so, I am not sure what problems I was having previously. I walked away from it for a few days and this has been the last thing on my list.

I came back to it and started back from square one, and now I am having the same problem as Jetfire4.

I ran the following command;

Code: Select all

PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" ./configure --with-gtk --with-opengl

Like Jetfire4, I got the following;
No package 'gtk+-2.0' found
No package 'gthread-2.0' found
No package 'gobject-2.0' found
No package 'libglade-2.0' found
No package 'libxml-2.0' found
No package 'portaudio-2.0' found

It is unclear to me what Jetfire4 did to solve this... I am not comprehending this for whatever reason.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

stevejesus wrote:Bear0so, I am not sure what problems I was having previously. I walked away from it for a few days and this has been the last thing on my list.

I came back to it and started back from square one, and now I am having the same problem as Jetfire4.

I ran the following command;

Code: Select all

PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" ./configure --with-gtk --with-opengl

Like Jetfire4, I got the following;
No package 'gtk+-2.0' found
No package 'gthread-2.0' found
No package 'gobject-2.0' found
No package 'libglade-2.0' found
No package 'libxml-2.0' found
No package 'portaudio-2.0' found

It is unclear to me what Jetfire4 did to solve this... I am not comprehending this for whatever reason.
This means at least one of the packages it says it can't find wasn't there, not all of them.

On Ubuntu, you shouldn't need the extra pkg-config line. But you need to make sure you have the libgtk2.0-dev, and portaudio19-dev packages installed. These two should pull in the rest of the dependencies. If it doesn't, the following should suffice:

Code: Select all

 # apt-get install libgtk2.0-dev portaudio19-dev libxml2-dev libglib2.0-dev libsdl1.2-dev
After that, configure should pass all the checks.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Great! Worked just fine. However, while running it does exhibit some strange behaviors.
1) When I "mouse-over" the window below the menu controls, the app crashes. This only occurs when I first start the app, and doesn't seem to be an issue after I have loaded a rom file. So, when I start the app, I have to mouse-around above the window and access the menu controls from above.

Strange.

2) I have a fairly powerful machine, and built this ware from your patch and snes9x's source to suit it. When I full screen with bilinear filter on, It slows down to 60-75% normal speed. However, when I maximize the window, attaining nearly the same resolution it doesn't slow down very much at all.

It's interesting though that when the speed of the emulation slows, it does so quite gracefully. The sound keeps pace slowly and in perfect sync with the graphics.

Lastly, do you suppose you might write an install script for this?

Thanks for all your help and excellent work on this front-end thus far.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

stevejesus wrote:Great! Worked just fine. However, while running it does exhibit some strange behaviors.
1) When I "mouse-over" the window below the menu controls, the app crashes. This only occurs when I first start the app, and doesn't seem to be an issue after I have loaded a rom file. So, when I start the app, I have to mouse-around above the window and access the menu controls from above.

Strange.
I've never experienced this before, but I have an idea of the cause. I'll definitely look into it.
2) I have a fairly powerful machine, and built this ware from your patch and snes9x's source to suit it. When I full screen with bilinear filter on, It slows down to 60-75% normal speed. However, when I maximize the window, attaining nearly the same resolution it doesn't slow down very much at all.
This is definitely strange. OpenGL scaling should be free with accelerated drivers. Fullscreen mode is really only resizing the window to fit the screen. If you're changing the resolution, it might have to do with the vertical refresh rate. Can you tell me what kind of graphics card you're using and which drivers you have installed?
It's interesting though that when the speed of the emulation slows, it does so quite gracefully. The sound keeps pace slowly and in perfect sync with the graphics.
By default, this port uses a fixed frame skip of 0 to avoid stuttering. You can reset auto-framerate in the emulation tab of preferences, and things will run regular speed excepting the graphics.
Lastly, do you suppose you might write an install script for this?
I have plans for an make install target and menu errata, but no distribution packages. Unfortunately, there are way too many OSs and distributions to build for.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

BearOso wrote:
Lastly, do you suppose you might write an install script for this?
I have plans for an make install target and menu errata, but no distribution packages. Unfortunately, there are way too many OSs and distributions to build for.
If you can get this GTK+ interface adopted as the standard Unix port of snes9x (and the Windows and Mac ports have their own standard GUIs, so I don't see why Unix shouldn't have one), it should get automatically bundled into Debian (and hence Ubuntu) the next time Snes9x releases a new version.

Otherwise, you can probably find some Debian developer who'd be willing to package it separately.

For Fedora users, I believe Dribble has most of the emulator packages, so (assuming there's some Google Code or Sourceforge central repository) add a request to their requests page and see what happens.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Bear0so, I am not with my lappy right now, so I couldn't tell you which version of Nvidias drivers I am using, but they are the latest that are provided in the Gutsy repos.
Performance overall seems great. I am able to watch HD Video with Compiz enabled and such. Its a GeForce 6100 Go. My machine is a Turion X2 @ 1.8ghz per core.

Anyway, I am hoping that you can get an install script together because it would make it VERY easy for me to package this for AMD64 in Gutsy. I noticed that you only have a binary package for i386. So, as soon as you get that rolling, I'll start making packages as you make new releases.

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

Post by BearOso »

I've put up a new version. This should address the crashing with mouse-motion. I added an install target to make. Things should now go smoothly with the typical unix "./configure; make; make install" routine.
stevejesus wrote:Bear0so, I am not with my lappy right now, so I couldn't tell you which version of Nvidias drivers I am using, but they are the latest that are provided in the Gutsy repos.
Performance overall seems great. I am able to watch HD Video with Compiz enabled and such. Its a GeForce 6100 Go. My machine is a Turion X2 @ 1.8ghz per core.
Compiz can be a severe detriment to performance on nvidia and ati drivers. They still don't seem to fare well with opengl-on-opengl scenarios, so if you're only using compiz, that could be what's causing it. On the other hand, a common problem is that the drivers aren't installed correctly. Could you post the output from

Code: Select all

 $ glxinfo | grep -i "vendor" 
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Well, I am still not at my laptop, but I am pretty confident that it has nothing to do with the drivers. I mentioned above that I can play 720p video fullscreen (slightly less resolution than my display) with compiz running.

As for the Opengl on top on Opengl, all I can do is compare performance to ZSNES. With ZSNES I can run full screen and full speed with OpenGL, Bilinear filtering and the HQ2X filter just fine. Ofcourse the sound is choppy, but I am just blaming SDL on that.

Now, in Snes9x (/w your interface) I did some experimenting thying to get the best performance. Opengl works just fine, but if bilinear filtering is enabled... then it becomes VERY slow in full screen.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Ok, I compiled v.15. I tried to make a .deb binary package for AMD64 with checkinstall, but it says,

Code: Select all

========================= Installation results ===========================
make: *** No rule to make target `install'.  Stop.

****  Installation failed. Aborting package creation.
I looked back in the directory, becuase I was assuming that it was there when I went to build. I don't see it in there. Did you forget to put it in?
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

disregard the last post. that was my error.

checkinstall failed to build the package, here is the contents of the logfile.

Code: Select all

dpkg-deb - error: (upstream) version (`src') doesn't contain any digits
dpkg-deb: 1 errors in control file
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

stevejesus wrote:Well, I am still not at my laptop, but I am pretty confident that it has nothing to do with the drivers. I mentioned above that I can play 720p video fullscreen (slightly less resolution than my display) with compiz running.

As for the Opengl on top on Opengl, all I can do is compare performance to ZSNES. With ZSNES I can run full screen and full speed with OpenGL, Bilinear filtering and the HQ2X filter just fine. Ofcourse the sound is choppy, but I am just blaming SDL on that.

Now, in Snes9x (/w your interface) I did some experimenting thying to get the best performance. Opengl works just fine, but if bilinear filtering is enabled... then it becomes VERY slow in full screen.
Well, ZSNES does change the screen size in full-screen mode, so that probably helps a lot. You can mess with the screen size using Change Fullscreen Resolution in this one. If you haven't yet, you should also try the Pixel-Buffer Objects option in the OpenGL tab and try both pixel formats, as that can greatly improve upload speed.

I test this occasionally on an Athlon Thunderbird 1200mhz with only a GeForce 3, and your hardware is more than capable of handling what you're throwing at it. I honestly can't think of a reason why hardware bilinear filtering would affect performance so much.
Ok, I compiled v.15. I tried to make a .deb binary package for AMD64 with checkinstall, but it says,

Code: Select all

========================= Installation results ===========================
make: *** No rule to make target `install'.  Stop.

****  Installation failed. Aborting package creation.
I looked back in the directory, becuase I was assuming that it was there when I went to build. I don't see it in there. Did you forget to put it in?
There isn't a check or checkinstall target in 15. Snes9x's build system doesn't use automake, so all targets have to be put in manually. I've been reluctant to use a separate build system for the GTK port, but I might end up doing so eventually. I'll get a new version up soon with some new targets to clear this up.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Disabled automatic use of texture rectangle extension in OpenGL.
So what does this do exactly?
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

stevejesus wrote: So what does this do exactly?
This restores some texturing performance at the cost of a negligible increase in upload speed and slightly reduced vram usage. It was a micro-optimization that wasn't necessarily working. I doubt the change will be very noticeable, however.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

Getting this again, still trying to build packages. Any ideas?
========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.

**** Installation failed. Aborting package creation.
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

opps, copied from the wrong spot. It is doing this again...
dpkg-deb - error: (upstream) version (`src') doesn't contain any digits
dpkg-deb: 1 errors in control file
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

stevejesus wrote:opps, copied from the wrong spot. It is doing this again...
dpkg-deb - error: (upstream) version (`src') doesn't contain any digits
dpkg-deb: 1 errors in control file
What are you using to build the package? It looks like something is confusing the src suffix on the directory name for a revision number. You could probably get away with just renaming the directory from snes9x-1.51-src to snes9x-1.51
User avatar
stevejesus
Snes9x White Belt
Posts: 24
Joined: Fri Feb 08, 2008 2:56 pm
Location: Indianapolis IN

Post by stevejesus »

I have been using check install. I'll give that rename a shot.
Post Reply