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!
zombie_ryushu
Snes9x White Belt
Posts: 29
Joined: Wed Jun 24, 2009 2:58 am

Fullscreen works perfectly.

Post by zombie_ryushu »

Fullscreen works perfectly.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Xvideo Libs

Post by inukaze »

Hi There someone can tell me , the website i can get the last Xvideo Libs for my Ubuntu Jaunty plz, i dont have that render in the version compiled by myself

Jeje and i dont found in the net :s sorry for that
Well thanks for readme and thank you
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 76

Post by BearOso »

I've put up a new revision with the translations and the fullscreen bug fix.

inukaze:
I think you just need the libxv-dev package for XVideo support.
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Freezed Snes9x-gtk

Post by inukaze »

Well well well, thanks for the info, i have now all options i wanna :=)

:O My translation its now included :=) Thanks for that

well bro i try again test netplay but i dont know why the emulator Freeze in both Case

myself be server (gnu/linux)
another be server (ms/windows)

Myself be the SERVER : GTK Gui Freezee :(
inukaze@inukaze:~$ snes9x-gtk

SDL sound driver initializing...
--> (Frequency: 32000hz, Latency: 32ms)...OK
Map_HiROMMap
CLIENT: Looking up server's hostname (127.0.0.1) @881
NPSetAction: Looking up server's hostname..., forced = 0 882
CLIENT: Creating socket @882
NPSetAction: Creating network socket..., forced = 0 882
CLIENT: Trying to connect to server @882...
NPSetAction: Trying to connect to Snes9X server..., forced = 0 882
CLIENT: Sending 'HELLO' message @882...
NPSetAction: Sending 'HELLO' message..., forced = 0 883
CLIENT: Waiting for 'WELCOME' reply from server @883...
NPSetAction: Waiting for 'HELLO' reply from server..., forced = 0 883
NPSetAction: SERVER: Attempting to accept client connection..., forced = 1 895
NPSetAction: Setting socket options..., forced = 1 895
NPSetAction: SERVER: Looking up new client's hostname..., forced = 1 895
Warning: SERVER: Player 1 on inukaze has connected.
NPSetAction: SERVER: Waiting for HELLO message from new client..., forced = 0 895
NPSetAction: Got HELLO from client..., forced = 1 895
NPSetAction: SERVER: Sending welcome information to new client..., forced = 1 895
NPSetAction: SERVER: Waiting for a response from the client..., forced = 1 895
CLIENT: Got 'WELCOME' reply @896
CLIENT: ResetJoyReadPos @896
CLIENT: Sending 'READY' to server @896...
NPSetAction: Sending 'READY' to the server..., forced = 0 896
NPSetAction: Sending ROM image to player 1..., forced = 1 896
CLIENT: ROM_IMAGE received @915
CLIENT: DiscardHeartbeats @916, finished @916
NPSetAction: Receiving ROM information..., forced = 0 916
CLIENT: Hi-ROM: Y, Size: 80000
CLIENT: Receiving ROM image @916...
NPSetAction: Receiving ROM image..., forced = 0 916
CLIENT: Receiving ROM filename @919...
NPSetAction: Receiving ROM filename..., forced = 0 919
Map_HiROMMap
CLIENT: ResetJoyReadPos @927
NPSetAction: SERVER: Sending S-RAM to player 1..., forced = 1 936
NPSetAction: SERVER: Sending RESET to all clients..., forced = 1 936
NPSetAction: , forced = 1 936
CLIENT: SRAM_DATA received @936
CLIENT: DiscardHeartbeats @937, finished @938
NPSetAction: Receiving S-RAM data..., forced = 0 938
NPSetAction: , forced = 1 938
CLIENT: RESET received @976
CLIENT: DiscardHeartbeats @976, finished @976
CLIENT: ResetJoyReadPos @977

Myself be the Client
inukaze@inukaze:~$ snes9x-gtk

SDL sound driver initializing...
--> (Frequency: 32000hz, Latency: 32ms)...OK
Map_HiROMMap
CLIENT: Looking up server's hostname (190.36.233.223) @795
NPSetAction: Looking up server's hostname..., forced = 0 795
CLIENT: Creating socket @795
NPSetAction: Creating network socket..., forced = 0 795
CLIENT: Trying to connect to server @795...
NPSetAction: Trying to connect to Snes9X server..., forced = 0 795
CLIENT: Sending 'HELLO' message @796...
NPSetAction: Sending 'HELLO' message..., forced = 0 797
CLIENT: Waiting for 'WELCOME' reply from server @797...
NPSetAction: Waiting for 'HELLO' reply from server..., forced = 0 797
CLIENT: Got 'WELCOME' reply @1032
CLIENT: ResetJoyReadPos @1032
CLIENT: Sending 'READY' to server @1032...
NPSetAction: Sending 'READY' to the server..., forced = 0 1033
CLIENT: FREEZE_FILE received @1320
CLIENT: DiscardHeartbeats @1320, finished @1320
CLIENT: Receiving freeze file information @1320...
NPSetAction: Receiving freeze file information..., forced = 0 1320
CLIENT: Receiving freeze file @1320...
NPSetAction: Receiving freeze file..., forced = 0 1320
NPSetAction: , forced = 1 1325
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:'
CLIENT: ResetJoyReadPos @1492


Freeze Too , but i dont know what its i had restart the pc , check filesystem (fsck) , and dont know why now the NetPlay cause me Freeze on GTK GUI.

Well thats its all for now , thank you ^^
littletux
Snes9x White Belt
Posts: 2
Joined: Sun Sep 06, 2009 7:32 am

executable stack ?

Post by littletux »

Hello,

I'd like to know if the executable stack is needed for snes9x-gtk to work or not ?

Adding these sections at the end of the assembler files makes the executable stack go away, but i've not tested the resulting binary yet...

Code: Select all

--- a/i386/cpuexec.S    2009-09-04 05:26:00.000000000 -0400
+++ b/i386/cpuexec.S    2009-09-04 05:28:02.000000000 -0400
@@ -709,3 +709,7 @@
        andl $~IRQ_PENDING_FLAG, Flags
 .irqsstillpending:
        ret
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
or

Code: Select all

--- a/i386/SPC.ASM      2009-09-04 07:01:26.000000000 -0400
+++ b/i386/SPC.ASM      2009-09-04 07:03:21.000000000 -0400
@@ -513,3 +513,7 @@
        mov edx, 32767
 CLIP16SMP2SKIP1:
        ret
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
Best regards,

ltx
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

In what file ??

Post by inukaze »

Jeje sorry man , but you can say me if i must edit what file in specific ??
Plz , i recompiled again just for tests :=)

^^

Or if you can explainme how to patch some file of source with the command

$> patch -p0 < patch_sne9x-gtk

or something like that or well you can explain more specific :$ sorry by that :$

Thank you
littletux
Snes9x White Belt
Posts: 2
Joined: Sun Sep 06, 2009 7:32 am

full patch and instructions

Post by littletux »

Re,

If anyone want to help with testing, full patch is here :
http://zarb.org/~littletux/snes9x-gtk-1 ... tack.patch

Use this to patch :

Code: Select all

patch -p1 < snes9x-gtk-1.51.75-no-exec-stack.patch
Best regards,

ltx
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Thanks

Post by inukaze »

:=) i just put the patch file in the "snesx-1.51-src" folder and execute the patch command :=)

inukaze@inukaze:~/Escritorio/snes9x-1.51-src$ patch -p1 < snes9x-gtk-1.51.75-no-exec-stack.patch
patching file i386/cpuexec.S
patching file i386/sa1gs.S
patching file i386/cpuops.S
patching file i386/getset.S
patching file i386/spc700.S
patching file i386/sa1ops.S
patching file i386/SPC.ASM
patching file i386/ZSNES.ASM
patching file i386/C4.ASM
patching file i386/2XSAIMMX.ASM
patching file i386/sfxproc.asm
patching file i386/bilinear.asm
patching file i386/fxemu2.asm
patching file i386/fxemu2c.asm
patching file i386/zsnesc4.asm
patching file i386/fxemu2b.asm
patching file i386/fxtable.asm

^^ , Compiling now, after i run test Then I'll tell you how I was with this patch ^^
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

Netplay

Post by inukaze »

I have half good news xD jeje, the NetPlay works fine if im the server (Linux Machine)

But if the another be the server (windows machine) , the GTK Interfaze FREEZEE :( , but the Snes9x-gtk says "connected Player 2" :(

inukaze@inukaze:~$ snes9x-gtk
SDL sound driver initializing...
--> (Frequency: 32000hz, Latency: 32ms)...OK
CLIENT: Looking up server's hostname (190.36.235.163) @154
NPSetAction: Looking up server's hostname..., forced = 0 154
CLIENT: Creating socket @154
NPSetAction: Creating network socket..., forced = 0 154
CLIENT: Trying to connect to server @154...
NPSetAction: Trying to connect to Snes9X server..., forced = 0 154
CLIENT: Sending 'HELLO' message @158...
NPSetAction: Sending 'HELLO' message..., forced = 0 158
CLIENT: Waiting for 'WELCOME' reply from server @158...
NPSetAction: Waiting for 'HELLO' reply from server..., forced = 0 158
CLIENT: Got 'WELCOME' reply @225
CLIENT: ResetJoyReadPos @225
CLIENT: Sending 'READY' to server @225...
NPSetAction: Sending 'READY' to the server..., forced = 0 225
CLIENT: FREEZE_FILE received @401
CLIENT: DiscardHeartbeats @401, finished @401
CLIENT: Receiving freeze file information @401...
NPSetAction: Receiving freeze file information..., forced = 0 401
CLIENT: Receiving freeze file @401...
NPSetAction: Receiving freeze file..., forced = 0 401
NPSetAction: , forced = 1 408
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:'
CLIENT: ResetJoyReadPos @627
CLIENT: Pause - NO @771
GoodOld16bit
Snes9x White Belt
Posts: 2
Joined: Sat Sep 12, 2009 1:32 pm

Scanline filter

Post by GoodOld16bit »

Hi, I really like this port, (I belive it's better than other related projects), but I would like to tell that in my opinion the scanline filter is not so practical in use.
I use to like scanline filter with other emulators, because it helps giving old low resolution games a nice look, but to do so it have to work well, and displaying evenly spaced scanlines, by providing someway to scale the output image to an optimal size to keep a good pixel aspect.
With Snes9x i can't find a practical way to resize the window to get evenly spaced scanlines...
To explaing better I would like to post an image showing side by side tcomparison of the same game emulated by Sn/es9x and Gens/GS, The difference should be clear enough this way, but I don't see a way to post an image here (but I can send it by email if it can be useful). Will this kind of problem be solved?
Thanks for the great port and best regards[/img]
GoodOld16bit
Snes9x White Belt
Posts: 2
Joined: Sat Sep 12, 2009 1:32 pm

Post by GoodOld16bit »

Forgive me... I found it by myself...
Was View -> Change size -> and one of the options under "Correct Aspect".
inukaze
Snes9x White Belt
Posts: 17
Joined: Sat Aug 29, 2009 9:32 pm

The Patch

Post by inukaze »

Hi there my emulation brothers xD , dont worry about that ^^ , well i wanna know if in the new version of Snes9x-gtk , came with the Patch ???

And I wanna know if you dont think to make the GUI but QT3 or QT4 Version i think if you can make in QT3 , i prefer QT3 instead of QT4 , but you know the QT4 its the lastest version , well, its desicion of devs ^^
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

inukaze:
Even though I have netplay available, it is still fairly broken. Snes9x has a freeze-file sync issue where it always sends a "fail." It also has a problem with an inverted success code for sending the ROM image to clients. You'd have to recompile the Windows version to fix these, and I don't suggest doing so.

Your best chance for success is to make sure when your Windows port is a server is to ensure "Sync by Reset" is set and "Send ROM image to clients," or whatever it's called on Windows, is NOT set. It looks like you're hitting the freeze file sync bug.

I'm not really interested in changing toolkits. If you want QT, bsnes uses QT4 and is pretty much where the future of SNES emulation is at. You might not have the speed to run it, though.

littletux:
Are you disabling the executable stack because of kernel security? If this is the case, I'd just disable the assembly cores. The only cores actually used are the CX4 and SuperFX ones--the assembly for the main CPU is broken/out-of-date. You're not going to see much of a speed drop (if any) by disabling them.
zombie_ryushu
Snes9x White Belt
Posts: 29
Joined: Wed Jun 24, 2009 2:58 am

A non-critical fullscreen bug.

Post by zombie_ryushu »

I have a non-critical fullscreen bug.

Basically, it seems the way snes9x-gtk fullscreens, it resizes the desktop/KDE in the process. So if you have open windows when you launch full screen, it moves them, or it resizes them.
Tukuyomi
Snes9x White Belt
Posts: 32
Joined: Mon May 24, 2004 4:14 pm
Location: France

Post by Tukuyomi »

Try to uncheck "Change fullscreen resolution" in "Options -> Preferences", tab "Display"
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: A non-critical fullscreen bug.

Post by BearOso »

zombie_ryushu wrote:I have a non-critical fullscreen bug.

Basically, it seems the way snes9x-gtk fullscreens, it resizes the desktop/KDE in the process. So if you have open windows when you launch full screen, it moves them, or it resizes them.
This would be an issue with kwin not handling XRandR events properly. It assumes the desktop is resizing when the video mode changes and resizes all existing windows regardless. You can bug the kwin developers to fix it, or just not use mode-changing like Tukuyomi suggests. If you're using OpenGL or XV then you won't see a speed loss by using the desktop resolution.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 77

Post by BearOso »

A new revision is posted.

*edit*
And for some reason, the forums won't allow me to post accented characters (even though the preview works fine?). Tiberio's name with accents can be properly read here.
User avatar
DaVince
Snes9x White Belt
Posts: 4
Joined: Wed Sep 30, 2009 9:54 pm
Location: Amsterdam, Netherlands

Post by DaVince »

Hi, new at these forums (thanks to this thread!)

I think your work on this GTK version is totally awesome. It's got tons of features and works amazingly! But I have stumbled upon something really inconvenient...

When I try to configure the keyboard settings, it won't accept control keys like shift, ctrl and alt. These keys are used in my favourite (keyboard) control scheme, so I can only set up snes9x-gtk to use Z, X, in other words, for me less convenient keys. I tried editing the configuration XML manually but it uses long numbers instead of key labels. Could you fix the input please? :)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

DaVince wrote:Hi, new at these forums (thanks to this thread!)

I think your work on this GTK version is totally awesome. It's got tons of features and works amazingly! But I have stumbled upon something really inconvenient...

When I try to configure the keyboard settings, it won't accept control keys like shift, ctrl and alt. These keys are used in my favourite (keyboard) control scheme, so I can only set up snes9x-gtk to use Z, X, in other words, for me less convenient keys. I tried editing the configuration XML manually but it uses long numbers instead of key labels. Could you fix the input please? :)
I'm not actually sure which is more preferred: having modifiers keys apply combos to normal keys (e.g. Shift+F1), or having them act as independent keys on their own. I suppose I could provide an option to switch between behaviors.
Post Reply