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!
hkl8324
Snes9x White Belt
Posts: 2
Joined: Thu Feb 26, 2009 3:44 pm

Post by hkl8324 »

Hello, I am using this on Mandriva 2009.0 and it is excellent.
But I have a stupid question, does it support spc7110 graphics pack?
If it supports, where to put the files?

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

Post by BearOso »

hkl8324 wrote:Hello, I am using this on Mandriva 2009.0 and it is excellent.
But I have a stupid question, does it support spc7110 graphics pack?
If it supports, where to put the files?

Thanks
Not a stupid question, it didn't. :-) I've readded the support to this port for revision 67. Add the packs to a subdirectory in the one the game is in, named respectively for the game you're playing (just like the other ports, if you've used them before). Here's the internal game names and directories, since I'm unfamiliar with a couple of them:

Code: Select all

"SUPER POWER LEAG 4   " SPL4-SP7
"MOMOTETSU HAPPY      " SMHT-SP7
"HU TENGAI MAKYO ZERO " FEOEZSP7
"JUMP TENGAIMAKYO ZERO" SJUMPSP7
And for others:         MISC-SP7
I haven't tested this, though, so let me know if there are problems.
hkl8324
Snes9x White Belt
Posts: 2
Joined: Thu Feb 26, 2009 3:44 pm

Post by hkl8324 »

BearOso wrote: I haven't tested this, though, so let me know if there are problems.
Thanks for the changes, the above games all works without a problem.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

byuu wrote:Hm, would you be able to merge zones' Snes9X-official changes? He added proper SPC7110 support, so that the graphics packs are not needed at all :D

Won't be an issue for at least a year or two, but I'm hoping that no emulators still use graphics packs for when Tomato and my FEoEZ translation is finished. We'll be editing the graphics directly, so graphics packs will be a no-go.
I wasn't aware zones had actually made any changes yet. Have you heard otherwise?
User avatar
zones
Official Mac OSX Porter/Dev
Posts: 908
Joined: Sat May 15, 2004 11:58 pm
Location: Japan

Post by zones »

In my build, SPC7110 emulation works well on mac and unix (CUI) port. SPC7110 snapshot will work but I've not tested yet.
Here's the changes since 1.51 but nothing changes for most games.

Code: Select all

- SPC7110 emulation.                                        (byuu, neviksti)
- Merged bsnes' SPC7110 emulation code. Note that the
  snapshot of SPC7110 games and Far East of Eden Zero's
  .rtc file are incompatible with 1.51.                     (zones)
- Removed graphics pack support. It's no more necessary.    (zones)
- Replaced S-RTC emulation code with bsnes' one to keep
  the good compatibility of .rtc files between the two
  emulators. As a result, Daikaijuu Monogatari II now
  outputs the .rtc file, and its snapshot and .srm file are
  incompatible with 1.51.                                   (zones)
- Fixed sound key-on/off.                                   (zones)
- Fixed the noise generation code.                          (zones)
- Fixed the echo buffer to refer ESA, only when the sound
  settings is compatible with the real SNES.                (zones)
- Removed incorrect BRR decoders.                           (zones)
- Fixed invalid memory accesses in C4 and OBC1 codes.       (zones)
- Fixed invalid memory accesses in BSX codes. My mistake.   (zones)
- Fixed the read value of $213e, $4210 and $4211.           (zones)
- Fixed the writing of word values at the memory boundary.  (zones)
- Fixed the bug that the unnecessary SA-1 emulation
  continues once any SA-1 games are launched.               (zones)
- Updated command-line options.                             (zones)
- Removed old color blending codes.                         (zones)
- Removed too old Snes96 and ZSNES snapshot support.        (zones)
- Code cleaning.                                            (zones)
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

I can't get it to compile at all on Xubuntu x86.

Code: Select all

hyperhacker@mercury:~/dev/win/src/snes9x-gtk/gtk$ ./configure --with-opengl --with-gtk --with-joystick --with-debugger
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether NLS is requested... yes
checking for intltool >= 0.23... 0.40.5 found
checking for intltool-update... /usr/bin/intltool-update
checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for catalogs to be installed...  fr_FR
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for GLIB... yes
checking for GLADE... yes
checking for LIBXML... yes
checking for PORTAUDIO... yes
checking for XTEST... yes
checking for GTKGL... yes
checking for SDL... yes
checking for XV... no
Cannot find libXv. Make sure the X11 development headers are installed.
--> Disabling Xv support.
checking for XRANDR... yes
checking for LIBPNG... yes
checking if the CPU is IA32... checking for nasm... /usr/bin/nasm
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzread in -lz... yes
checking for png_init_io in -lpng... yes
checking for mkstemp... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for stdint.h... (cached) yes
checking if sizeof(void *) == sizeof(int)... yes
checking if rightshift int8 is arithmetic... yes
checking if rightshift int16 is arithmetic... yes
checking if rightshift int32 is arithmetic... yes
checking if rightshift int64 is arithmetic... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating data/Makefile
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
# INTLTOOL_MAKEFILE

Snes9x will build with support for the following:

    OpenGL
!!! NOT able to use XVideo support
--- Needs recent X11 libraries and headers
    XRandR
    Joysticks
    NetPlay

hyperhacker@mercury:~/dev/win/src/snes9x-gtk/gtk$ make
Making all in data
make[1]: Entering directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk/data'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk/data'
Making all in po
make[1]: Entering directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk/po'
file=`echo fr_FR | sed 's,.*/,,'`.gmo 	  && rm -f $file && /usr/bin/msgfmt -o $file fr_FR.po
make[1]: Leaving directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk/po'
make[1]: Entering directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk'
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/local/share/locale"\" -fexceptions   -O2 -Wall -W -pedantic -Wno-unused-parameter -pipe  -fomit-frame-pointer -DUSE_OPENGL -DUSE_JOYSTICK -DUSE_XRANDR -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/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -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/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I/usr/include/libxml2   -pthread   -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/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0   -I/usr/include/libpng12   -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL        -DZSNES_C4 -DZSNES_FX -DEXECUTE_SUPERFX_PER_LINE -DCORRECT_VRAM_READS -DDEBUGGER' -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 libjma_a-s9x-jma.o -MD -MP -MF .deps/libjma_a-s9x-jma.Tpo -c -o libjma_a-s9x-jma.o `test -f '../jma/s9x-jma.cpp' || echo './'`../jma/s9x-jma.cpp
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
make[1]: *** [libjma_a-s9x-jma.o] Error 2
make[1]: Leaving directory `/home/hyperhacker/dev/win/src/snes9x-gtk/gtk'
make: *** [all-recursive] Error 1
Without the --with-gtk I get the "no rule to make unix.o" error. I tried running ./gtk/configure from the main source directory and it created an invalid makefile, so now I can't even "make clean". >_<
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

WhyDoIHaveToRegister wrote:I can't get it to compile at all on Xubuntu x86.

Code: Select all

hyperhacker@mercury:~/dev/win/src/snes9x-gtk/gtk$ ./configure --with-opengl --with-gtk --with-joystick --with-debugger
I've fixed this in SVN. There was a random extra quote mark in the configure script inside the code for --with-debugger. Note that the debugger isn't going to work well in this port (if at all). If you want a quick fix, you can just pull the new SVN, or edit configure in the gtk directory and search for the line reading:

Code: Select all

CFLAGS="$CFLAGS -DDEBUGGER'"
and change it to this:

Code: Select all

CFLAGS="$CFLAGS -DDEBUGGER"
WhyDoIHaveToRegister
Snes9x White Belt
Posts: 7
Joined: Sat Feb 28, 2009 10:48 pm

Post by WhyDoIHaveToRegister »

Thanks, it still doesn't compile though.

Code: Select all

In file included from src/gtk_display.cpp:174:
src/gtk_display_driver_xv.h:171:34: error: X11/extensions/Xvlib.h: No such file or directory
Deathlike2
Snes9x Brown Belt
Posts: 1158
Joined: Mon Jan 10, 2005 6:34 am

Post by Deathlike2 »

It sounds very much like you're missing the lib for compiling.
Continuing FF4 Research...
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

WhyDoIHaveToRegister wrote:Thanks, it still doesn't compile though.

Code: Select all

In file included from src/gtk_display.cpp:174:
src/gtk_display_driver_xv.h:171:34: error: X11/extensions/Xvlib.h: No such file or directory
The build for no XV was missing a define exclusion. SVN is updated again. :-)
Haneda
Snes9x White Belt
Posts: 4
Joined: Mon Mar 02, 2009 6:20 pm

Post by Haneda »

Hello, I have used snes9x-gtk in the past. I have recently installed Debian Linux onto an older machine, and I'm trying to get snes9x-gtk working. Unfortunately, when trying to compile I get the following:
unzip/unzip.h:49:18: error: zlib.h: No such file or directory
among other errors that I assume are all to do with this one.

Can anyone offer advice as to how I can solve this problem?

EDIT: Haven't solved it yet, but doing a ./configure now reports that zlib.h exists on my system. I'll see how it goes, and if any other errors come up during compiling, I'll post them here. Until then, ignore this post.



EDIT2:
I no longer get the error, and the compile goes smoothly... until this:
make: *** No rule to make target `unix/unix.o', needed by `osnes9x'. Stop.

any ideas?
Last edited by Haneda on Mon Mar 02, 2009 7:17 pm, edited 1 time in total.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

As root, type this command

Code: Select all

# apt-get install zlibg1-dev
then try recompiling

EDIT:
Haneda wrote:Until then, ignore this post.
Too late 8)
Haneda
Snes9x White Belt
Posts: 4
Joined: Mon Mar 02, 2009 6:20 pm

Post by Haneda »

After almost half a year of not using Linux at all, and coming back to it after all this time, I actaually managed to forget how much of a bitch it can be to compile software from source.

Alas, snes9x-gtk is now compiled and working flawlessly, so you can ignore this post and my previous one. Now I need to go through these steps again though (after using it for a few days, I find that I quite like debian, so I want to install it on my main machine).
Ezekiel000
Snes9x White Belt
Posts: 12
Joined: Sat Feb 07, 2009 7:08 pm

Post by Ezekiel000 »

Haneda wrote:After almost half a year of not using Linux at all, and coming back to it after all this time, I actaually managed to forget how much of a bitch it can be to compile software from source.

Alas, snes9x-gtk is now compiled and working flawlessly, so you can ignore this post and my previous one. Now I need to go through these steps again though (after using it for a few days, I find that I quite like debian, so I want to install it on my main machine).
Couldn't you use the Ubuntu deb's on debian?
Haneda
Snes9x White Belt
Posts: 4
Joined: Mon Mar 02, 2009 6:20 pm

Post by Haneda »

Yes, but I prefer compiling from source.
Ezekiel000
Snes9x White Belt
Posts: 12
Joined: Sat Feb 07, 2009 7:08 pm

Post by Ezekiel000 »

Ah right no worries then.
Haneda
Snes9x White Belt
Posts: 4
Joined: Mon Mar 02, 2009 6:20 pm

Post by Haneda »

Hi, I'm letting you know that I've installed debian onto my main machine now, and I got snes9x-gtk to work well there too.
Post Reply