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!
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

Can someone please try the following command with snes9x-gtk v70, please?

Code: Select all

$ LANG=fr_FR /$PREFIX/bin/snes9x-gtk
Can you see snes9x-gtk in french?
For some reason, I can't o_O... or am I missing something?
After unzipping the archive:

Code: Select all

tukuyomi@dejikochan:~/games/snes/snes9x/snes9x-1.51-src/gtk/po$ intltool-update fr_FR
.................................. done.
255 translated messages, 1 fuzzy translation, 74 untranslated messages.
tukuyomi@dejikochan:~/games/snes/snes9x/snes9x-1.51-src/gtk/po$
Nothing to report from the compilation, except the prefix I use (--prefix=$HOME/usr/local/)
Here is the relevant log, after editing fr_FR.po (starting from a fresh fr_FR.po file does not change a thing, snes9s-gtk still start in english...):

Code: Select all

tukuyomi@dejikochan:~/games/snes/snes9x/snes9x-1.51-src/gtk$ make install
Making install in data
make[1]: Entering directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/data'
make[2]: Entering directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/data'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/home/tukuyomi/usr/local/share/applications" || /bin/mkdir -p "/home/tukuyomi/usr/local/share/applications"
 /usr/bin/install -c -m 644 'snes9x.desktop' '/home/tukuyomi/usr/local/share/applications/snes9x.desktop'
test -z "/home/tukuyomi/usr/local/share/pixmaps" || /bin/mkdir -p "/home/tukuyomi/usr/local/share/pixmaps"
 /usr/bin/install -c -m 644 'snes9x.svg' '/home/tukuyomi/usr/local/share/pixmaps/snes9x.svg'
make[2]: Leaving directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/data'
make[1]: Leaving directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/data'
Making install in po
make[1]: Entering directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/po'
linguas="fr_FR "; 	for lang in $linguas; do 	  dir=/home/tukuyomi/usr/local/share/locale/$lang/LC_MESSAGES; 	  /bin/bash /home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/install-sh -d $dir; 	  if test -r $lang.gmo; then 	    /usr/bin/install -c -m 644 $lang.gmo $dir/snes9x-gtk.mo; 	    echo "installing $lang.gmo as $dir/snes9x-gtk.mo"; 	  else 	    /usr/bin/install -c -m 644 ./$lang.gmo $dir/snes9x-gtk.mo; 	    echo "installing ./$lang.gmo as" 		 "$dir/snes9x-gtk.mo"; 	  fi; 	  if test -r $lang.gmo.m; then 	    /usr/bin/install -c -m 644 $lang.gmo.m $dir/snes9x-gtk.mo.m; 	    echo "installing $lang.gmo.m as $dir/snes9x-gtk.mo.m"; 	  else 	    if test -r ./$lang.gmo.m ; then 	      /usr/bin/install -c -m 644 ./$lang.gmo.m 		$dir/snes9x-gtk.mo.m; 	      echo "installing ./$lang.gmo.m as" 		   "$dir/snes9x-gtk.mo.m"; 	    else 	      true; 	    fi; 	  fi; 	done
installing fr_FR.gmo as /home/tukuyomi/usr/local/share/locale/fr_FR/LC_MESSAGES/snes9x-gtk.mo
make[1]: Leaving directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk/po'
make[1]: Entering directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk'
make[2]: Entering directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk'
test -z "/home/tukuyomi/usr/local/bin" || /bin/mkdir -p "/home/tukuyomi/usr/local/bin"
  /usr/bin/install -c 'snes9x-gtk' '/home/tukuyomi/usr/local/bin/snes9x-gtk'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk'
make[1]: Leaving directory `/home/tukuyomi/games/snes/snes9x/snes9x-1.51-src/gtk'
tukuyomi@dejikochan:~/games/snes/snes9x/snes9x-1.51-src/gtk$ 
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: ...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. :)
I was more concerned about how GDK does fullscreening, whether or not it recreates the top-level or not. I don't think it does normally, but it might when the NETWM fullscreen hint is missing. I'll have to check.
Tukuyomi wrote: Can someone please try the following command with snes9x-gtk v70, please?
It works for me. I made sure to test it before release. Does this still happen if you go back to v69?
Nothing to report from the compilation, except the prefix I use (--prefix=$HOME/usr/local/)
Have you also installed the new translation file globally, where the message catalog can be picked up? Let me know if 69 still works, and if it does, I'll try to figure out what I screwed up.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

Well, snes9x-gtk v69 works as expected in french... with --prefix in my $HOME/usr/local/

snes9x-gtk v70 does not with --prefix in my $HOME/usr/local/, but does with --prefix in /usr/local (default) :)
BUT... Fichier -> _Quit is not translated oO (it's marked as fuzzy in fr_FR.po)

When installing snes9x-gtk in both /usr/local AND $HOME/usr/local, launching $HOME/usr/local/bin/snes9x-gtk is translated in french, but I suspect it to use /usr/local/share/locale/fr_FR/LC_MESSAGES/snes9x-gtk.mo, not the one in my $HOME/usr/local... but still, the Fichier -> Quit is not translated.

I hope it's enough clear for you to understand :s
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Tukuyomi wrote:Well, snes9x-gtk v69 works as expected in french... with --prefix in my $HOME/usr/local/

snes9x-gtk v70 does not with --prefix in my $HOME/usr/local/, but does with --prefix in /usr/local (default) :)
BUT... Fichier -> _Quit is not translated oO (it's marked as fuzzy in fr_FR.po)

When installing snes9x-gtk in both /usr/local AND $HOME/usr/local, launching $HOME/usr/local/bin/snes9x-gtk is translated in french, but I suspect it to use /usr/local/share/locale/fr_FR/LC_MESSAGES/snes9x-gtk.mo, not the one in my $HOME/usr/local... but still, the Fichier -> Quit is not translated.

I hope it's enough clear for you to understand :s
I'm aware the Fichier->Quit isn't translated. I noticed the #fuzzy line broke it after I posted everything for the release. :-)

As you say, the translation file won't be picked up from your user directory. I suspect it's trying to use an older file from either /usr/share/locale/fr_FR... or /usr/local/share/locale/fr_FR..., and the glade file changed so much in this release that the translation might not work if you're using a v69 translation file with v70. Installing to /usr/local guarantees the new file is in the right place to be used.
D--
Snes9x White Belt
Posts: 11
Joined: Mon Feb 09, 2009 10:11 am
Location: Beijing, China

Post by D-- »

New build error in 1.51.70 on Loongson2F architecture.

Code: Select all

g++ -DPACKAGE_NAME=\"snes9x-gtk\" -DPACKAGE_TARNAME=\"snes9x-gtk\" -DPACKAGE_VERSION=\"1.51\" -DPACKAGE_STRING=\"snes9x-gtk\ 1.51\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"snes9x-gtk\" -DVERSION=\"1.51\" -DGETTEXT_PACKAGE=\"snes9x-gtk\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_ZLIB_H=1 -I. -I. -I.. -DSNES9XLOCALEDIR=\""/usr/share/locale"\"   -fno-exceptions -fno-rtti -O1 -Wall -W -pedantic -Wno-unused-parameter -pipe -fomit-frame-pointer -fprofile-generate -mtune=loongson2f -march=loongson2f -fomit-frame-pointer -DUSE_OPENGL -DUSE_JOYSTICK -DUSE_XV -DUSE_PORTAUDIO -DUSE_OSS -DUSE_XRANDR -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1   -I/usr/include/libxml2   -pthread   -D_REENTRANT -I/usr/include/gtkglext-1.0 -I/usr/lib/gtkglext-1.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/include/atk-1.0   -I/usr/include/libpng12   -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL         -DCORRECT_VRAM_READS -DSDD1_DECOMP -DNETPLAY_SUPPORT -DJMA_SUPPORT -DNEW_COLOUR_BLENDING -DZLIB -DHAVE_LIBPNG -DHAVE_MKSTEMP -DHAVE_STRINGS_H -DHAVE_SYS_IOCTL_H -DHAVE_STDINT_H -DRIGHTSHIFT_int8_IS_SAR -DRIGHTSHIFT_int16_IS_SAR -DRIGHTSHIFT_int32_IS_SAR -DRIGHTSHIFT_int64_IS_SAR -DRIGHTSHIFT_IS_SAR -DCPU_SHUTDOWN -DSPC700_SHUTDOWN -DNO_INLINE_SET_GET -DUNZIP_SUPPORT -DSPC700_C -I. -I.. -I../unzip -MT snes9x_gtk-filter_hq2x.o -MD -MP -MF .deps/snes9x_gtk-filter_hq2x.Tpo -c -o snes9x_gtk-filter_hq2x.o `test -f 'src/filter_hq2x.cpp' || echo './'`src/filter_hq2x.cpp
{standard input}: Assembler messages:
{standard input}:163897: Warning: end of file not at end of a line; newline inserted
{standard input}:164987: Error: illegal operands `lw'
{standard input}:164987: Warning: missing .end at end of assembly
g++: Internal error: Killed (program cc1plus)
Why on earth is it thinking it can assemble something? Nothing in Snes9x is written in MIPSIII assembler. I checked through the file and related .h files but never saw any asm() or __asm__() calls. Can you think of what the problem is?

(To be clear, if I hack up everything to completely remove the hq*x family of filters, it compiles fine. I don't think you can blame gcc for this.)

Code: Select all

d@medan:~/snes9x-gtk-1.51.70/gtk$ g++ -v
Using built-in specs.
Target: mipsel-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20090129-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,c++,java,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo --disable-plugin --with-java-home=/usr/lib/gcc-snapshot/java-1.5.0-gcj-4.4-1.5.0.0/jre --enable-java-home --with-jvm-root-dir=/usr/lib/gcc-snapshot/jvm --with-jvm-jar-dir=/usr/lib/gcc-snapshot/jvm-exports --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-mpfr --disable-libssp --disable-werror --build=mipsel-linux-gnu --host=mipsel-linux-gnu --target=mipsel-linux-gnu
Thread model: posix
gcc version 4.4.0 20090129 (experimental) [trunk revision 143770] (Debian 20090129-1) 
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

D-- wrote:New build error in 1.51.70 on Loongson2F architecture.
...
I don't think you can blame gcc for this.
...
gcc version 4.4.0 20090129 (experimental) [trunk revision 143770] (Debian 20090129-1)
The HQ*X filters are very macro-heavy, and can easily break if the compiler changes its handling of them. It looks more like you might need to update binutils to match your experimental version of gcc. The output generated by your gcc frontend doesn't seem to be compatible with your assembler.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

alexeena wrote:How do I install linux and get rid of windows xp? I just got a computer from a friend that had a corrupted version of windows xp. I tried uninstalling it through the command prompts but it says it wont work. I tried installing linux but after the boot screen it comes up with all these error messages. Im not planning on partitioning my hard drives. Does anyone know if you have to uninstall windows to make linux work right?
This is a bit offtopic but: Unless you have any data you want to save, you do not really need to do anything in Windows as preparation at all. Just download a distro (Ubuntu and Fedora seem popular), and install it. You Must partition your harddrive while doing so though, you cannot install any Linux (or FreeBSD, Haiku, etc) system on a FAT32 or NTFS drive! Just go through the installation, make sure you have a system partition (around 8GB, ext3 or ext4) and a swap partition (500MB maybe), or if it's too daunting for now, let the installer partition your drive automatically.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 71

Post by BearOso »

I've uploaded a new revision. This is mostly under-the-hood changes, but the removal of gtkglext might cause problems. I've confirmed that the OpenGL changes work correctly with the nvidia binary drivers and the open radeon drivers. If anyone experiences new problems with OpenGL in this release, be sure to report them.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

wubi installs Linux inside a "virtual" ext3(or 4) hard drive within the NTFS system.
After the installation, it requires a few Windows components to be loaded before actually start loading the linux system.
If alexeena wants to delete Windows after that, the linux distro won't boot anymore.
wubi is good for dual booting with Windows as primary OS.
adventure_of_link
Hero of Hyrule | Official Port Recruiter
Posts: 2588
Joined: Mon May 24, 2004 5:06 pm
Location: 255.255.255.255

Post by adventure_of_link »

Recent versions of ubuntu (and all deratives) can install in windows as well
Image

Unofficial Test Monkey For:
* Snes9X GX (Wii)
* Snes9X EX (Android)
* Snes9X 64-bits (PC/Mac)

ZSNES|Ben Heck|NSRT|Bob Smiley
caramel1982
Snes9x White Belt
Posts: 1
Joined: Tue May 19, 2009 4:20 pm

Post by caramel1982 »

adventure_of_link wrote:Recent versions of ubuntu (and all deratives) can install in windows as well
Cool. Great information. So I will try it later tonight when I reached home.

Simulation pret immobilier
ranmori
Snes9x White Belt
Posts: 1
Joined: Tue May 26, 2009 12:53 am

Post by ranmori »

simulation credit auto
Tukuyomi wrote:
wubi installs Linux inside a "virtual" ext3(or 4) hard drive within the NTFS system.
After the installation, it requires a few Windows components to be loaded before actually start loading the linux system.
If alexeena wants to delete Windows after that, the linux distro won't boot anymore.
wubi is good for dual booting with Windows as primary OS.
Most plausible thing I heard so far :D
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 72

Post by BearOso »

Revision 72 is posted. It adds a mixer to generate sound at regular intervals. This is to work around the Snes9x sound core's crazy sample generation policy. Some slightly odd sounds, particularly in the OSS driver, are fixed because of it. I've also added an audio driver that uses SDL. It's built when joystick support is enabled--by default if SDL is installed.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

Hello!
I've updated the fr translation file for snes9x-gtk a bit :
changed some strings, corrected some typos and removed bad translated things.
You can find the file here: http://kuro-hitsuji.net/~tukuyomi/stuff/fr_FR-v72.po.gz
By the way, the "bug" at http://www.snes9x.com/phpbb2/viewtopic. ... 5965#25965 is gone! Thank you for this great gtk port :)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 73

Post by BearOso »

I've uploaded another revision. This fixes a compile error reported by billb, and includes Tukuyomi's new translation file.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

So, here I am on Ubuntu 9.04 and trying out the latest build from the PPA ("72", apparently). I was trying the various sound output mechanisms, and it seems that only the "OSS" output method reliably gives me sound output (via PulseAudio). However, while testing the various options, I have discovered a way to reliably kill snes9x-gtk with a segfault:
  1. Start snes9x, go Options -> Preferences... -> Sound and make sure the current sound driver is not "Open Sound System". If it is, change it to one of the other options, cilck OK and restart snes9x.
  2. Go File -> Open ROM... and pick a game. I've been using Super Mario All-Stars just because it makes a distinctive sound very early on.
  3. While the game is playing, go Options -> Preferences... -> Sound and change the current driver back to "Open Sound System".
  4. In the terminal, I see "OSS sound driver initializing... --> (Device: /dev/dsp)...failed".
  5. Then, "Segmentation fault".
If I run the above steps in gdb, the backtrace starts off like this:

Code: Select all

#0  GtkAudioMixer::start (this=0x0) at src/gtk_audio_mixer.cpp:43
#1  0x000000000048a625 in S9xOSSSoundDriver::start (this=0x3906510)
    at src/gtk_sound_driver_oss.cpp:57
#2  0x0000000000483edf in S9xOpenROM (
    rom_filename=0x3c4c790 "/home/st/Documents/Super Mario All-Stars + Super Mario World (U).smc") at src/gtk_s9x.cpp:196
#3  0x000000000048677b in Snes9xWindow::try_open_rom (this=0x2fd2e30, 
    filename=0x3c4c790 "/home/st/Documents/Super Mario All-Stars + Super Mario World (U).smc") at src/gtk_s9xwindow.cpp:809
#4  0x000000000048692e in Snes9xWindow::open_rom_dialog (this=0x2fd2e30)
    at src/gtk_s9xwindow.cpp:794
Interestingly, if I switch to the OSS driver without a game playing, nothing happens until I start a game, then the crash occurs. Also, if snes9x-gtk is configured to use OSS and the OSS initialization fails (for example, because I forgot to pause my music player), it dies with the same backtrace.

I have also managed to get it to segfault if the OSS initialization succeeds, but then it segfaults in the bowels of PulseAudio, so I call that Not Your Fault.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Screwtape wrote:However, while testing the various options, I have discovered a way to reliably kill snes9x-gtk with a segfault: ...
I've fixed this issue in SVN. It was caused by the driver still trying to use an nonexistent mixer when it fails to initialize. I presume it's failing in the first place due to PulseAudio not releasing the audio device from the previous driver fast enough, though. Thanks for the report.
Arakageeta
Snes9x White Belt
Posts: 1
Joined: Sat Jun 06, 2009 8:11 pm

Post by Arakageeta »

I am trying to compile snes9x-1.51-src-gtk-73 on a PS3 running Xubuntu 9.04. Compilation fails on filter_hq2x.cpp-- gcc runs out of memory!! Both gcc 4.3 and ppu-gcc (gcc 4.1 explicitly targeted for the Cell's PPU) fail. I'm going to try LLVM and IBM's XLC next.

Any tips? Is there a clean way to remove hq2x filtering? (Note: I am compiling without OpenGL support since the PS3 doesn't really have it yet.)

I'm trying to find the compiler setup since the PS3 is such a terrible general-purpose platform. The stock snes9x package from PS3 Bodega only gets 18-20fps.


Edit: Following up. I got ppu-gcc to work. I think I just wasn't being patient enough for it to compile filter_hq2x.cpp; it takes a long time to compile on a PS3. However, gcc 4.3 still crashes. By the way, why is the default optimization for snesx-gtk -O2? Why not -O3 (or even -Os)?
zombie_ryushu
Snes9x White Belt
Posts: 29
Joined: Wed Jun 24, 2009 2:58 am

Issue with command Line launch

Post by zombie_ryushu »

I get Assertion failed errors trying to launch this application from the command line. How do I report a bug?
Post Reply