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!
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

TiZ wrote: No, I do not switch while the program's running. I can switch while using jstest without any complications; the axes are still there, but not used.

I start said programs with analog mode already on, hit any direction on the d-pad, and the program segfaults.
The linux kernel joystick API is just an I/O protocol, so jstest can handle basically anything without problems.

If you can or already compile yourself, you can help fix the problem by generating a stack trace. Instructions are here: http://snes9x.com/phpbb2/viewtopic.php?t=3703&start=37. This will identify if the problem is in SDL or if there's something I need to fix here.
TiZ
Snes9x White Belt
Posts: 4
Joined: Fri Aug 28, 2009 8:11 pm

Post by TiZ »

Your instructions aren't working to create debug symbols. When I run gdb snes9x-gtk, it says that there are no debug symbols found.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

MMM

Post by inukaze »

Hi man, excelent JOB for Snes9x , i dont like the version without GTK i thinks is horrible xD

Well i had download and installed Snes9x-gtk

Im trying to compile Snes9x-gtk , with Cygwin or MinGW under Windows XP SP2 , but i cant :(

Someone can compile it , i wanna the version with GTK i dont like the actual version of Snes9x 1.51 for Windows with MFC GUI , i wanna the GTK GUI :=)

Well another thing is , the Chat for NetPlay , someone can add this function ?

Well in this moment im making an translation from French file .po , to es_VE.po (Spanish Venezuela) to add it :=) when i finish i post it :=)

Well byebye
TiZ
Snes9x White Belt
Posts: 4
Joined: Fri Aug 28, 2009 8:11 pm

Post by TiZ »

Arch Linux's makepkg utility was stripping the debug symbols out, even after I enabled them. I turned off that config option, and now you have your backtrace:

Code: Select all

trent:~$ gdb snes9x-gtk
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/snes9x-gtk 
[Thread debugging using libthread_db enabled]
[New Thread 0xb62b86f0 (LWP 30584)]
SDL sound driver initializing...
[New Thread 0xb3ef8b70 (LWP 30591)]
    --> (Frequency: 32000hz, Latency: 32ms)...OK

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb62b86f0 (LWP 30584)]
0xb760071d in EV_HandleEvents () from /usr/lib/libSDL-1.2.so.0
(gdb) bt
#0  0xb760071d in EV_HandleEvents () from /usr/lib/libSDL-1.2.so.0
#1  0xb7600cdd in SDL_SYS_JoystickUpdate () from /usr/lib/libSDL-1.2.so.0
#2  0xb75d95f0 in SDL_JoystickUpdate () from /usr/lib/libSDL-1.2.so.0
#3  0xb75ae4de in SDL_PumpEvents () from /usr/lib/libSDL-1.2.so.0
#4  0xb75ae9f7 in SDL_PollEvent () from /usr/lib/libSDL-1.2.so.0
#5  0x080cbb88 in JoyDevice::poll_events (this=0x9c4cda0) at src/gtk_control.cpp:335
#6  0x080cbbe6 in JoyDevice::get_event (this=0x9c4cda0, event=0xbf90cdf0)
    at src/gtk_control.cpp:640
#7  0x080cbd10 in S9xProcessEvents (block=1 '\001') at src/gtk_control.cpp:314
#8  0x080d4322 in S9xPauseFunc (data=0x0) at src/gtk_s9x.cpp:244
#9  0xb782044c in g_timeout_dispatch () from /usr/lib/libglib-2.0.so.0
#10 0xb781fd98 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0xb78233e0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#12 0xb782384f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0xb7cc9729 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x080d4a76 in main (argc=1, argv=0xbf90d194) at src/gtk_s9x.cpp:118
(gdb) quit
The program is running.  Exit anyway? (y or n) y
I didn't even load a rom. I just started snes9x-gtk, hit left on the d-pad, and it crashed.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Translation Spanish

Post by inukaze »

HI There, man i try to compile the SOURCE , with my file of Spanish Translation

you can Download from :
http://www.megaupload.com/?d=RO6PK96V

I dont know, why when i compile the SOURCE , the Source dont make my file called "es_VE.po" to "es_VE.gmo" but the file fr_FR.po yes, someone can explainme what i should do to use my own translation plz ?

Well i cant transtale the Text of
Options > Preferences

In the Window Called "Settings of Snes9x"
In The Tab "Emulation"

I cant translate the next Texts :

"Window Behavior"
"The ESC Key should :
a ) Toggle The Menu Bar
b ) Exit Fullscreen mode
c ) Quit Snes9x "

That texts not are in the ".PO" file called "fr_FR.po" , because that i dont translated yet
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

TiZ wrote:Arch Linux's makepkg utility was stripping the debug symbols out, even after I enabled them. I turned off that config option, and now you have your backtrace:

Code: Select all

trent:~$ gdb snes9x-gtk
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/snes9x-gtk 
[Thread debugging using libthread_db enabled]
[New Thread 0xb62b86f0 (LWP 30584)]
SDL sound driver initializing...
[New Thread 0xb3ef8b70 (LWP 30591)]
    --> (Frequency: 32000hz, Latency: 32ms)...OK

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb62b86f0 (LWP 30584)]
0xb760071d in EV_HandleEvents () from /usr/lib/libSDL-1.2.so.0
(gdb) bt
#0  0xb760071d in EV_HandleEvents () from /usr/lib/libSDL-1.2.so.0
#1  0xb7600cdd in SDL_SYS_JoystickUpdate () from /usr/lib/libSDL-1.2.so.0
#2  0xb75d95f0 in SDL_JoystickUpdate () from /usr/lib/libSDL-1.2.so.0
#3  0xb75ae4de in SDL_PumpEvents () from /usr/lib/libSDL-1.2.so.0
#4  0xb75ae9f7 in SDL_PollEvent () from /usr/lib/libSDL-1.2.so.0
#5  0x080cbb88 in JoyDevice::poll_events (this=0x9c4cda0) at src/gtk_control.cpp:335
#6  0x080cbbe6 in JoyDevice::get_event (this=0x9c4cda0, event=0xbf90cdf0)
    at src/gtk_control.cpp:640
#7  0x080cbd10 in S9xProcessEvents (block=1 '\001') at src/gtk_control.cpp:314
#8  0x080d4322 in S9xPauseFunc (data=0x0) at src/gtk_s9x.cpp:244
#9  0xb782044c in g_timeout_dispatch () from /usr/lib/libglib-2.0.so.0
#10 0xb781fd98 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0xb78233e0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#12 0xb782384f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0xb7cc9729 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x080d4a76 in main (argc=1, argv=0xbf90d194) at src/gtk_s9x.cpp:118
(gdb) quit
The program is running.  Exit anyway? (y or n) y
I didn't even load a rom. I just started snes9x-gtk, hit left on the d-pad, and it crashed.
Well, this confirms the problem is in SDL. If I guessed, I would assume it's going out of bounds on the joystick->hwdata->abs_map array. It looks like they're using the ABS_MAX constant for setting up the array when they should be using ABS_CNT. Can you do a

Code: Select all

 (gdb) print code
when the program crashes?
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: Translation Spanish

Post by BearOso »

inukaze wrote:HI There, man i try to compile the SOURCE , with my file of Spanish Translation

you can Download from :
http://www.megaupload.com/?d=RO6PK96V

I dont know, why when i compile the SOURCE , the Source dont make my file called "es_VE.po" to "es_VE.gmo" but the file fr_FR.po yes, someone can explainme what i should do to use my own translation plz ?

Well i cant transtale the Text of
Options > Preferences

In the Window Called "Settings of Snes9x"
In The Tab "Emulation"

I cant translate the next Texts :

"Window Behavior"
"The ESC Key should :
a ) Toggle The Menu Bar
b ) Exit Fullscreen mode
c ) Quit Snes9x "

That texts not are in the ".PO" file called "fr_FR.po" , because that i dont translated yet
See the section in the first post about translating. Basically, instead of copying the existing .po, you need to generate a template file so the new strings are translatable. If you want to add a new language to the compile, you just need to add es_VE to the ALL_LINGUAS line in configure.ac, then run the autogen.sh file to rebuild the configure scripts.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Post by inukaze »

See the section in the first post about translating. Basically, instead of copying the existing .po, you need to generate a template file so the new strings are translatable. If you want to add a new language to the compile, you just need to add es_VE to the ALL_LINGUAS line in configure.ac, then run the autogen.sh file to rebuild the configure scripts.
Well i see before the section but i dont understand at all the steps, in the first case i generated the translation with a file "snes9x-gtk-pot" but before was the same , jeje i dont knew are need to add lang in the configure.ac thanks for the information

sorry for all, its my first translation :$

Thanks for all :=)
zombie_ryushu
Snes9x White Belt
Posts: 29
Joined: Wed Jun 24, 2009 2:58 am

Just checked the SVN

Post by zombie_ryushu »

The full screen bug persists.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Spanish Venezuelan Translation Finish

Post by inukaze »

Hi there :=) , I've finish the Translation for Snes9x-gtk to Spanish
you can download the "po" file from

http://www.megaupload.com/?d=FJ4KOCLL

This is my final actual version of this translation
if you wanna compile with this lang you should

1 - download the SOURCE of snes9x-gtk-x.xx.tar.bz2
from : http://code.google.com/p/snes9x-gtk/downloads/list

2 - Extract the Sources

$> tar xfvj snes9x-gtk-x.xx.tar.bz2

3 - Edit configure.ac

Now with a text editor open the file
snes9x-x.xx-src/gtk/configure.ac

4 - ALL_LINGUAS=""

you seek the line ALL_LINGUAS="fr_FR" and now just add and space and es_VE by this way

ALL_LINGUAS="fr_FR es_VE"

5 - Save the file and build

$> ./autogen-sh
$> ./configure (--with(out)-option)
$> make
$> sudo make install

6 - run snes9x-gtk and now see the Spanish Menu :=)

Image
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

Don't worry about that, inukaze; Bearoso will do all this for you for the next release so it will be straight forward for end users =)
(btw, I think I should update the fr_FR translation a bit)

- EDIT - : updated the fr_FR.po file: http://kuro-hitsuji.net/~tukuyomi/stuff ... v75.po.zip
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Chat for Netplay

Post by inukaze »

Hi there, well i try to play over the "Internet"

ME = Server (Linux Ubuntu Jaunty , Snes9x-gtk 1.51 port 75)
Friend = Cliente (Windows XP SP2 , Snes9x 1.51)

Well we are in the same room but diferents ISP . This was just for Testing

I see 2 Important things

1 - The Windows Client is too slow for the netplay , my machine normal play

1.1 - If i be the client my machine is some slow , but the windows machine are much slow

2 - NetPlay dont have Chat , this is very usefull
Or a VoIP funtion how ioquake3

Well someone can add chat to netplay plz ?
just that

Well if someone can make the VoIP will be much better using the "mumble" sources , someone can compile the snes9x-gtk 1.51 native for windows that is just for try again the netplay

Thanks for read :=)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

zombie_ryushu:
I'll try to find a fix that works. Thanks for testing.

inukaze:
Thanks for the translation. I'll include it in the next release.
Regarding your problems,

for 1. - The server is responsible for handling the speed of gameplay. If it slows down, all the clients have to slow down to the same speed. As the server, there is also an additional CPU usage, so on lower-end systems, the speed will be lowered even more. There's not much you can do except get better machines, and always have the fastest one act as the server.

for 2. - The NetPlay protocol is very simple. Adding chat would require a new, non-backward compatible protocol, and would require new versions of all the ports to support it. I should also mention that NetPlay isn't "officially" supported by Snes9x. I don't think the Mumble project is license-compatible (GPL not LGPL), and it's probably easier to just set up a VoIP connection outside of Snes9x.

As for your last suggestion, Snes9x-gtk for Windows is unlikely to be useful. This is a GTK+/X11 port, so you'd need the Cygwin X11 server running, and that would add a good deal of overhead and not allow OpenGL or XVideo.

Tukuyomi:
Thanks for the updated translation.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Thank you

Post by inukaze »

Thanks for the info brother

well you can't use the part of source code of Zsnes 1.42 to see how to work the NetPlay of that emulator ?

For use the same protocol in the Snes9x , and maybe this allow the netplay betweens Snes9x and Zsnes

Well i dont knew the Cygwin X11 was need it to run Snes9x-gtk , well i going to download just for testing :=). and after the test i told you my experience XD

Well its just an idea , but if impossible , just forgot it
==================================
Another things :
Well the NetPlay i know its not offical supported yet, when i run the "./configure" the NetPlay not active still when i saw that i search more info about Snes9x NetPlay. The Best netplay was be of Zsnes 1.42 but under Ubuntu Jaunty dont work, when you try to run it you see a message of "Overflow" and all libs the emulator try to use.

The Zsnes 1.36 Works , but i see the next errors with NetPlay using the "ZBattle.net" (Software to search anothers players to use netplay)

1 - If me be the server (linux) when an windows machine try to connect to me , never found my IP

2 - If another pc is server (windows) well the connection is make when the ROM begin the emulator , exit inmediatly

3 - In the zbattle.net they gave a pre-compiled Version, in case of Errors they recommend , try to compile the version for myself , but the source code of 1.36 requieres nasm 0.98.x , and i dont know why i can't compile

Without the Zbattle.net , I dont have test yet :(


==================================

Thank you to you for Included my translation :=).
zombie_ryushu
Snes9x White Belt
Posts: 29
Joined: Wed Jun 24, 2009 2:58 am

CLI Only build?

Post by zombie_ryushu »

What about a CLI Only build?
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

snes9x is CLI only version. That's precisely why snes9x-gtk exist :)
Last edited by Tukuyomi on Wed Sep 02, 2009 5:39 pm, edited 1 time in total.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

zombie_ryushu:
Could you try the latest SVN? I think the issue is fixed now.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Snes9x-gtk

Post by inukaze »

Well man i dont use Snes9x because just its for CLI , in my particular case the Snes9x dont Support use OpenGL Render, too yet XVideo Render Just Software :(

The Pre-Compiled Version come with much Options , you can download the Snes9x-gtk from : http://code.google.com/p/snes9x-gtk/downloads/list

Someone can sayme where i can get the last libs of Xvideo , plz under ubuntu Jaunty i can't compile with that Option.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Snes9x-gtk Crashes for Inukaze

Post by inukaze »

USING "PortAudio"
Fallo de segmentacion = segmentation fault


1 - I Try use SDL Audio Driver
sometimes works but not all time

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 32ms)...OK
SDL sound driver initializing...
--> (Frequency: 48000hz, Latency: 21ms)...OK
Fallo de segmentacion

2 - I Try use OSS Audio Driver (Ever Failed)

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 32ms)...OK
OSS sound driver initializing...
--> (Device: /dev/dsp)...failed
Fallo de segmentacion

3 - Desactivating Echo Effect
(with SDL works)

4 - Change the Sound Buffer Size 32 another

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 64ms)...OK
PortAudio sound driver initializing...
--> (OSS)...No device info available.
--> (ALSA)...No device info available.
Couldn't initialize sound
Fallo de segmentacion

5 - Changing Playback Frecuency from 32 Hz (SNES Default) to another

Couldn't initialize sound
Map_LoROMMap
Fallo de segmentacion

But if your use driver "SDL" and Change the 32 (Snes Default) that works but if you change the Buffer Size from 32 for another value. you can experiment

a ) No sound or b ) Slowdown in FPS or c ) Nothing all normal :=)

Well if i found more Crash events i told you :=)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: Snes9x-gtk Crashes for Inukaze

Post by BearOso »

inukaze wrote:USING "PortAudio"
Fallo de segmentacion = segmentation fault


1 - I Try use SDL Audio Driver
sometimes works but not all time

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 32ms)...OK
SDL sound driver initializing...
--> (Frequency: 48000hz, Latency: 21ms)...OK
Fallo de segmentacion

2 - I Try use OSS Audio Driver (Ever Failed)

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 32ms)...OK
OSS sound driver initializing...
--> (Device: /dev/dsp)...failed
Fallo de segmentacion

3 - Desactivating Echo Effect
(with SDL works)

4 - Change the Sound Buffer Size 32 another

PortAudio sound driver initializing...
--> (OSS : /dev/dsp, latency 64ms)...OK
PortAudio sound driver initializing...
--> (OSS)...No device info available.
--> (ALSA)...No device info available.
Couldn't initialize sound
Fallo de segmentacion

5 - Changing Playback Frecuency from 32 Hz (SNES Default) to another

Couldn't initialize sound
Map_LoROMMap
Fallo de segmentacion

But if your use driver "SDL" and Change the 32 (Snes Default) that works but if you change the Buffer Size from 32 for another value. you can experiment

a ) No sound or b ) Slowdown in FPS or c ) Nothing all normal :=)

Well if i found more Crash events i told you :=)
Looks like a PulseAudio problem. It crashes, corrupts the mixer settings, doesn't output sound, or consumes huge CPU time on all my machines, so I'm not even going to try and debug it. I highly suggest you disable it.

On the other hand, if you get crashes or no sound without PulseAudio, I'd be interested in the settings you're using.
Post Reply