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!
prurigro
Snes9x White Belt
Posts: 9
Joined: Wed Mar 05, 2008 9:39 pm

Post by prurigro »

sounds good

on state save with HQ4 :

Code: Select all

Starting sound
    --> (OSS : /dev/dsp)...OK
Map_LoROMMap
[New Thread 0xb4971b90 (LWP 13180)]
[New Thread 0xb4170b90 (LWP 13181)]

---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb61f4720 (LWP 13174)]
0x0829e916 in HQ4X_16 ()
(gdb) backtrace
#0  0x0829e916 in HQ4X_16 ()
#1  0x00005012 in ?? ()
#2  0x00005012 in ?? ()
#3  0x00000003 in ?? ()
#4  0xb7a46240 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0xbfe9d668 in ?? ()
#6  0xb79eab9a in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
on state load with HQ4 :

Code: Select all

Starting sound
    --> (OSS : /dev/dsp)...OK
Map_SuperFXLoROMMap
[New Thread 0xb4a9fb90 (LWP 13206)]
[New Thread 0xb429eb90 (LWP 13207)]
[Thread 0xb4a9fb90 (LWP 13206) exited]
[New Thread 0xb4a9fb90 (LWP 13208)]
[Thread 0xb4a9fb90 (LWP 13208) exited]
Map_LoROMMap
[New Thread 0xb4a9fb90 (LWP 13209)]
absent: SA1(50); next: 'SHO:734213:'
absent: SP7(65596); next: 'SHO:734213:'
absent: RTC(24); next: 'SHO:734213:'
absent: BSX(147); next: 'SHO:734213:'
absent: MOV(4); next: 'SHO:734213:'
absent: DSP(1450); next: 'SHO:734213:'
absent: CX4(8192); next: 'SHO:734213:'
absent: IPU(0); next: 'SHO:734213:'
absent: GFX(0); next: 'SHO:734213:'

---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6303720 (LWP 13199)]
0x0829e916 in HQ4X_16 ()
(gdb) backtrace
#0  0x0829e916 in HQ4X_16 ()
#1  0x00005012 in ?? ()
#2  0x00005012 in ?? ()
#3  0x00000003 in ?? ()
#4  0xb7b55240 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0xbf9ac178 in ?? ()
#6  0xb7af9b9a in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
kafox
Snes9x White Belt
Posts: 1
Joined: Sat Sep 06, 2008 8:24 pm

Post by kafox »

Just wanted to say thanks to the author BearOso. I think this is way better than regular snes9x. I know I tried both zsnes and snes9x rather recently and it was clear that zsnes was way better. But, now that I'm running 64-bit, zsnes won't compile, it uses 32-bit specific assembler and is not likely to be ported. This is what made me try your patched version snes9x-gtk, and it is very impressive, even better than zsnes I think.

So, that's pretty much it, I'd like to report that it works great on 64-bit machine. I'd also recommend you get a serious project/site host like sourceforge. I've seen way to many threads being opened in forums like this, without a homepage or project page and after a while they disappear as if they never existed, can't find the files anymore, the project has died. At least if you have a project page, if you choose to resign as the maintainer, someone else may choose to step up and keep things up-to-date.

Thanks again, keep up the good work !
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

prurigro wrote:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6303720 (LWP 13199)]
0x0829e916 in HQ4X_16 ()
(gdb) backtrace
#0  0x0829e916 in HQ4X_16 ()
#1  0x00005012 in ?? ()
#2  0x00005012 in ?? ()
#3  0x00000003 in ?? ()
#4  0xb7b55240 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0xbf9ac178 in ?? ()
#6  0xb7af9b9a in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
This looks very weird. Did you compile with --with-debug? It would help if I had the steps you used to reproduce this, and a copy of your ~/.snes9x/snes9x.xml file.

From my view, this looks like a build/ABI issue, as there are only 3 frames between frame #4 (probably g_main_loop_run), and HQ4X_16, when there should never be fewer than 4. If you're also still running Force Hires, then HQ4X_16 shouldn't be called.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

kafox wrote: So, that's pretty much it, I'd like to report that it works great on 64-bit machine. I'd also recommend you get a serious project/site host like sourceforge. I've seen way to many threads being opened in forums like this, without a homepage or project page and after a while they disappear as if they never existed, can't find the files anymore, the project has died. At least if you have a project page, if you choose to resign as the maintainer, someone else may choose to step up and keep things up-to-date.
I am planning to put it into a public source repository eventually. I hope to have translation support within the next couple of releases, and a version control system will make it easier for any potential translators to help.
1985a
Snes9x White Belt
Posts: 3
Joined: Sun Aug 31, 2008 3:07 pm

Error

Post by 1985a »

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb61266e0 (LWP 13233)]
0x0822cc76 in S9xDoHDMA ()
Current language: auto; currently asm
(gdb) bt
#0 0x0822cc76 in S9xDoHDMA ()
#1 0xb7447824 in ?? () from /usr/lib/libSDL-1.2.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: Error

Post by BearOso »

1985a wrote:Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb61266e0 (LWP 13233)]
0x0822cc76 in S9xDoHDMA ()
Current language: auto; currently asm
(gdb) bt
#0 0x0822cc76 in S9xDoHDMA ()
#1 0xb7447824 in ?? () from /usr/lib/libSDL-1.2.so.0
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Your problem looks like http://www.snes9x.com/phpbb2/viewtopic.php?t=3726.

There's a patch to fix this in gocha's Snes9x-1.51+ improvement if you're feeling ambitious. You can probably turn off HDMA in Preferences->Emulation to get around it.
FallenWizard
Snes9x White Belt
Posts: 1
Joined: Fri Oct 10, 2008 7:55 pm

Post by FallenWizard »

I get a compile error if joystick is disabled in the configure script.

Here's a patch to fix it:

Code: Select all

diff -ur snes9x-1.51-src/gtk/gtk_s9x.cpp snes9x-1.51-src/gtk/gtk_s9x.cpp
--- snes9x-1.51-src/gtk/gtk_s9x.cpp	2008-08-08 01:17:31.000000000 +0200
+++ snes9x-1.51-src/gtk/gtk_s9x.cpp	2008-10-10 21:39:15.000000000 +0200
@@ -277,8 +277,9 @@
         needs_fullscreening = 1;
     }
 
+#ifdef USE_JOYSTICK
     gui_config->flush_joysticks ();
-
+#endif
     gtk_main ();
 
     return 0;
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 53

Post by BearOso »

FallenWizard wrote:I get a compile error if joystick is disabled in the configure script.

Here's a patch to fix it:
Thanks for the info. This is fixed in version 53, which is now posted.

Note: Anyone using the ubuntu gutsy ppa repository will need to switch to the hardy repository for automatic updates.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 54

Post by BearOso »

Another small version bump.
uncholowapo
Snes9x White Belt
Posts: 7
Joined: Thu Oct 16, 2008 1:05 am

Post by uncholowapo »

I have made an rpm for Fedora 9 of the latest version 1.51-54. Here is the link to the tarball to the rpm and src rpm.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

I don't know why, but the sound is pretty crackly for me now. :( This only happens with Snes9x so far. The terminal output seems rather fine, but I'll post it just in case:

ruti@ruti-desktop:~$ /media/sda5/Apps/snes9x-1.51/snes9x-gtk
Initializing sound...
--> (OSS : /dev/dsp)...OK
Using ROM Final Fantasy V.smc in /media/sda5/Roms/SNES/Final Fantasy V.zip
Map_HiROMMap
absent: SA1(50); next: 'SHO:734213:'
absent: SP7(65596); next: 'SHO:734213:'
absent: RTC(24); next: 'SHO:734213:'
absent: BSX(147); next: 'SHO:734213:'
absent: MOV(4); next: 'SHO:734213:'
absent: DSP(1450); next: 'SHO:734213:'
absent: CX4(8192); next: 'SHO:734213:'
absent: IPU(0); next: 'SHO:734213:'
absent: GFX(0); next: 'SHO:734213:'
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 55

Post by BearOso »

deniseweird wrote:I don't know why, but the sound is pretty crackly for me now. :( This only happens with Snes9x so far. The terminal output seems rather fine, but I'll post it just in case:

ruti@ruti-desktop:~$ /media/sda5/Apps/snes9x-1.51/snes9x-gtk
Initializing sound...
--> (OSS : /dev/dsp)...OK
Using ROM Final Fantasy V.smc in /media/sda5/Roms/SNES/Final Fantasy V.zip
Map_HiROMMap
absent: SA1(50); next: 'SHO:734213:'
absent: SP7(65596); next: 'SHO:734213:'
absent: RTC(24); next: 'SHO:734213:'
absent: BSX(147); next: 'SHO:734213:'
absent: MOV(4); next: 'SHO:734213:'
absent: DSP(1450); next: 'SHO:734213:'
absent: CX4(8192); next: 'SHO:734213:'
absent: IPU(0); next: 'SHO:734213:'
absent: GFX(0); next: 'SHO:734213:'
Are you saying you can go back to an older version and the sound problem disappears?

As far as I remember, nothing has changed in the sound code for the last several versions except for some defaults, and if you had a previous config file, these settings would be left alone. If you've erased your old configuration, however, you'll want to turn back on Master volume control and Volume envelope height reading to maintain parity with old save states.

If an older version still works, let me know. I'd like to fix any regressions, if possible.

*edit* Update:
I ran some tests myself, and I noticed that, on my system, high CPU usage from external apps seem to cause static more than it used to. This might be the effect of some newer kernel threading changes affecting the audio thread priority.

I've posted a new version (55) that allows more finely-granulated changes to the sound buffers. Setting the buffer to 32ms, instead of the aggressive and infeasible 16ms it was before seems to fix the problem for me. Let me know if this helps.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

Well, if I remember correctly, it didn't happen just because I switched to a new version. And trying to set the buffer higher like you said fixed it, thanks. It wasn't Really Snes9x's fault then it seems. I really hate Linux sometimes :(
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

It seems your PPA for Ubuntu doesn't support Intrepid yet. Just wanted to point it out in case you missed it.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 56

Post by BearOso »

I've posted a new version that has a small feature and a bug fix. The next version will have a different, more standard autotooled building process to facilitate internationalization. So, I thought I should get these changes out before introducing new potential compilation problems.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 57

Post by BearOso »

A new version is posted. This one uses the different build system I mentioned before. There are bound to be problems with this, so don't be afraid to point out any problems if it's not working.

In addition, this system supports translations through intltool. There are no translations included at the moment, but if anyone's interested in providing one, the process can be found in the "translating" section of the first post.
blubby
Snes9x White Belt
Posts: 27
Joined: Tue Jul 04, 2006 9:13 pm

Post by blubby »

Hey BearOso,

Just so you know, I just updated the version of your gtk port to 57-2 and I think there is a small bug in the installed files.

I got the following files installed under "/usr/usr/..."

...bin/snes9x-gtk
...pixmaps/snes9x.svg
...share/applications/snes9x.desktop

So the install script install all of them under /usr/usr...

Just so you know !
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

blubby wrote:Hey BearOso,

Just so you know, I just updated the version of your gtk port to 57-2 and I think there is a small bug in the installed files.

I got the following files installed under "/usr/usr/..."

...bin/snes9x-gtk
...pixmaps/snes9x.svg
...share/applications/snes9x.desktop

So the install script install all of them under /usr/usr...

Just so you know !
Thanks for the info. This should be fixed in the 57-3 packages.
blubby
Snes9x White Belt
Posts: 27
Joined: Tue Jul 04, 2006 9:13 pm

Post by blubby »

BearOso wrote:
blubby wrote:Hey BearOso,

Just so you know, I just updated the version of your gtk port to 57-2 and I think there is a small bug in the installed files.

I got the following files installed under "/usr/usr/..."

...bin/snes9x-gtk
...pixmaps/snes9x.svg
...share/applications/snes9x.desktop

So the install script install all of them under /usr/usr...

Just so you know !
Thanks for the info. This should be fixed in the 57-3 packages.
Awesome, thanks for your great job on this port !
strangeryf
Snes9x White Belt
Posts: 3
Joined: Wed Nov 12, 2008 1:41 pm

Re: GTK/X11 Port (aka Linux/UNIX GUI)

Post by strangeryf »

Hi BearOso,

I downloaded the Nov. 11 2008 build, and successfully built it in my Kubuntu 8.10 amd64 PC. Thanks a lot for your great work!! It's much more convenient than snes9express.

I followed the instruction "./configure --with-opengl" and "make". In addition to the dependencies you listed, I had to install "intltool" and "libxv-dev". At the end of building, I have to manually add -lXv to get the snes9x-gtk binary. Guess this may only apply to Kubuntu 8.10. The configure file is too difficult for me to decode, but I did find the lines to check libxv, so I am wondering why the automake failed to add -lxv in the final linking.
Post Reply