Page 1 of 1

SDL and GTK problems

Posted: Fri May 23, 2008 10:23 am
by Zoltic

Hello,

 

First, excuse me for my poor english, I'm french and everybody knows that frenchies are not really good for foreign languages.

 

I used VBA before and found, yesterday, the "new" vba. Very happy am I.

 

So I downloaded SVN version this morning and compiled it on my Linux machine with SDL GUI.

 

I was verry surprized to see that the "video" key was no longer understood and to have a really small window (I use a 1600X1400 screen).

 

So I decided to try GTK version.

 

But.......

 

It is impossible to configure my joypad with this GUI. I thought it was because of a problem with my GTK configuration but "jscalibrate" works fine, as "kcontrol"

 

I tried with the SDL version all is good.

 

This is my old configuration file for VBA SDL, only part for the joystick.

 

Joy0_Left=1000

Joy0_Right=1001

Joy0_Up=1002

Joy0_Down=1003

Joy0_A=108a

Joy0_B=108b

Joy0_L=0061

Joy0_R=0073

Joy0_Start=1088

Joy0_Select=1089

Joy0_Speed=1086

Joy0_Capture=1087

 

These values were gave by SDL-Test and work fine.

 

If somebody knows how to configure joystick under GTK GUI and/or have a window greater in with SDL Gui he would be very welcomed.

 

Thank you


SDL and GTK problems

Posted: Fri May 23, 2008 5:10 pm
by xKiv

Changing window size with SDL frontend:

 

(in VisualBoyAdvance.cfg)

set

openGL=2

(you will get bilinear stretching, which should work - just resize the window like you would any other - use your windowmanager's features ...)

 

You might also want to try setting

openGLscale=N

where N is 2, 3, 4, ...

This sets a "default enlarging", but only when no filter is active (this means: when filter=0)

 

I don't know what you mean by "video key".

 

 


As for joypad ... I am 90% sure the GTK frontend doesn't use the same configuration file.

And it doesn't seem like it uses SDL eighter, so it wouldn't understand SDL codes ...

I have no idea how to set this properly, but maybe the autor of the GTK frontend will.


SDL and GTK problems

Posted: Fri May 23, 2008 11:38 pm
by Zoltic

Thank you for answer.

 

I tried "openGLscale=4" and it is exactly what I needed to have same size than with my old configuration. It's works very fine.

 

I used "video key" term because in the old VisualBoyAdvance.cfg (vba) we had :

Video setting. 0=1x, 1=2x, 2=3x, 3=4x.

video=3

 

And when I use old config file with vbam, I have :

....

Reading configuration file.

Unknown configuration key video

....

 

It was just to use the same term than the program.

 

I'am also sure that GTK don't use same "key number" than SDL because I put the "old" in the ~/.gvba/config file and it "translate" them by :


SDL and GTK problems

Posted: Sat May 24, 2008 7:52 am
by xKiv

Thank you for answer.

 

I tried "openGLscale=4" and it is exactly what I needed to have same size than with my old configuration. It's works very fine.

 

Ohh, good to see someone making use of a feature I coded for myself [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" width="20" height="20" />

 

I used "video key" term because in the old VisualBoyAdvance.cfg (vba) we had :

<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="96" data-ipsquote-contentclass="forums_Topic"><div>

Video setting. 0=1x, 1=2x, 2=3x, 3=4x.

video=3

</div></blockquote>
 

This is now "filter".

E.g.

filter=0 # scale x1 (nothing)

filter=1 # scale x2 (doubles height and width)

...

filter=17 # hq x4 (high quality 4-times stretch)

 

Filters usually give better quality but cost CPU usage (and they have fixed "zoom").

Stretching with OpenGL uses your graphics card, if possible.

 

And when I use old config file with vbam, I have :

<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="96" data-ipsquote-contentclass="forums_Topic"><div>

....

Reading configuration file.

Unknown configuration key video

....

 

It was just to use the same term than the program.

 

I'am also sure that GTK don't use same "key number" than SDL because I put the "old" in the ~/.gvba/config file and it "translate" them by :

</div></blockquote>
 

The GTK frontend should have GUI for configuring gamepad. Somewhere. I haven't even built it yet ...


SDL and GTK problems

Posted: Sat May 24, 2008 8:14 am
by bgK

Oh, and the GTK frontend doesn't support joypads yet. Maybe It will, sooner or later. Who knows ...


SDL and GTK problems

Posted: Sat May 24, 2008 9:34 am
by Zoltic

Thank you everybody for answers.

 

For me it's enough and this thread can be considered as closed unless somebody has more informations on the use of joypad with GTK.

 

Good work. If I can help, for example by translating in french or testing some prerelease versions, ask, I have some time now.

:msn_happy:


SDL and GTK problems

Posted: Sun Jun 01, 2008 12:54 am
by DancemasterGlenn

Sorry to re-open the discussion (I just got here)... I was just curious, why is the current joypad configuration in the vba config file unable to be used in the gtk version? Is it a matter of telling the gui to poll for controller values and send them back to that file, or am I completely missing the mark because I'm not a coder?

 

I guess on top of what you have now you'd need to add in SDL or something to do the actual polling... is that right?


SDL and GTK problems

Posted: Sun Jun 01, 2008 1:16 am
by xKiv

It's not THAT easy ... AFAIUI, both GTK and SDL have their own event loops ... which can't be easily used at the same time.


SDL and GTK problems

Posted: Sun Jun 01, 2008 1:45 am
by DancemasterGlenn

Oh, I had no intention of making it sound easy. It would be completely impossible for me, at the least. I'm trying to understand what would need to be done, if it was implemented.

 

I'm overjoyed to be using this emulator at all, much less with a nice gui on top of that. I can definitely wait for joypad support, I just like to know as much as I can about the process.