Jump to content
Visual Boy Advance-M
bgK

GTK GUI

Recommended Posts

I got tired of having no working GUI for VBA-M on Linux, so I ported the old GTK GUI to the new code base. It required only a few changes to compile. The new HQ4x scalers are missing, and there are propably a lot of other bugs. It's also not very fast right now, but it's enough for me. It should be buildable on Windows and MacOS without too much changes.

 

I added a CMake project that can compile the SDL and the GTK port. CMake is a very powerful (unlike qmake) and easy to use (unlike the autotools) build system that generates native project files (makefiles for linux, VC projects for Windows, and XCode projects for MacOS)

Share this post


Link to post
Share on other sites

Thanks :)

 

I'm willing to improve this GUI to make it more comfortable to use. Do you want me to integrate it with VBA-M ?

Share this post


Link to post
Share on other sites

Sure!

 

However, we like GUI files of course, to be in their seperate directories, so they don't interfere with each other. Like how the Qt4 GUI and current SDL port is now, as well as the current MFC Windows GUI.

Share this post


Link to post
Share on other sites

Great !

 

Of course, the GUIs should be in different folders. I made the required changes to remove the share directory of the previous version of the patch. However, I'm afraid the CMake files can't be moved. Anyway they're used by both the SDL and the GTK backends. New patch attached.

Share this post


Link to post
Share on other sites

I wrote a PortAudio sound driver to make the GTK build compile without the SDL library. You'll be able to reuse it for the QT port if you want.

Is it possible to have a SVN access so that I can commit my work ?

Share this post


Link to post
Share on other sites
Is it possible to have a SVN access so that I can commit my work ?

 

Yes, however you need a SourceForge account before I can give you SVN commit access.

Share this post


Link to post
Share on other sites

I think it's great that the developers are willing to support multiple toolkits (just like the developers of other emulators like Mupen64Plus).

Share this post


Link to post
Share on other sites

Is it possible to have a SVN access so that I can commit my work ?

 

Yes, however you need a SourceForge account before I can give you SVN commit access.

 

Thanks. My SF.net account is bgk.

 

deniseweird> No, the GTK GUI won't affect the QT GUI at all. I don't plan to make the GTK GUI a fully featured one. I want it to be simple to configure and to use.

Share this post


Link to post
Share on other sites

Thanks. It works fine. I just commited the GTK GUI.

To build it, you need cmake and the development files of glibmm, gtkmm, glademm, and portaudio.

Then you have to generate the makefile using "cmake ." and build the binaries with "make".

Share this post


Link to post
Share on other sites

Hi all!

 

I have been watching the progress of VBA-M and just wanted to say well done, and keep up the good work!

 

I tried to compile the fresh GTK GUI vba-m and I'm having some trouble.

 

I'm using ArchLinux.

 

Here's the output of make:

 

In file included from /home/george/LimeWire/vbam/src/gtk/window.h:36,

from /home/george/LimeWire/vbam/src/gtk/main.cpp:30:

/home/george/LimeWire/vbam/src/gtk/screenarea.h:65: error: ‘SigC’ has not been declared

/home/george/LimeWire/vbam/src/gtk/screenarea.h:65: error: ISO C++ forbids declaration of ‘Connection’ with no type

/home/george/LimeWire/vbam/src/gtk/screenarea.h:65: error: expected ‘;’ before ‘m_oCursorSig’

In file included from /home/george/LimeWire/vbam/src/gtk/main.cpp:30:

/home/george/LimeWire/vbam/src/gtk/window.h:259: error: ‘SigC’ has not been declared

/home/george/LimeWire/vbam/src/gtk/window.h:259: error: ISO C++ forbids declaration of ‘Connection’ with no type

/home/george/LimeWire/vbam/src/gtk/window.h:259: error: expected ‘;’ before ‘m_oEmuSig’

make[2]: *** [CMakeFiles/gvbam.dir/src/gtk/main.o] Error 1

make[1]: *** [CMakeFiles/gvbam.dir/all] Error 2

make: *** [all] Error 2

 

My guess is that GCC ver. 4.3.0 is the one responsible for this.

 

I'm also planning to create a PKGBUILD (kind of a package, more or less) for arch, and I can't wait for the Qt gui. Keep up the good work!

Share this post


Link to post
Share on other sites

Fixed. I don't even know why it worked on my system. Thanks for the bug report.

It's great to have packagers for Linux distros. Arch is really a nice distro, with a great community. The AUR system is just brilliant.

Share this post


Link to post
Share on other sites
I'm also planning to create a PKGBUILD (kind of a package, more or less) for arch

 

Thanks a lot! I really appreciate it ^_^.

 

Honestly, this is why I like Linux: the whole package idea. I just wish MS thought of something like this for Windows. That way, there is no dependancy issues, and everything is a cinch.

 

But that topic is getting OT...

Share this post


Link to post
Share on other sites

OT: Microsoft got the MSI (Microsoft Installer), which has a sh*tload of features no individual can ever use :P

Share this post


Link to post
Share on other sites

bgK, thank you for your work.

Separation of sound system allowed me to reuse most of the code from src/win32/OpenAL.cpp (I already had OpenAL and libao, didn't wanted Portaudio without a very good reason).

It seems to work fine (I'm using openal-soft-1.3.253).

 

But my hate for cmake still grows. And on a related note, you should note somewhere that cmake 2.4.8 is required, with 2.4.6 it fails.

 

I added soundShutdown() to Window destructor, cause OpenAL was bitching about it.

BTW, it was not that obvious that calls to alGetError are invalid, if current context == NULL.

Share this post


Link to post
Share on other sites

Sorry for the late response but NG-Emu and these forums seem to be down most of the time that I am online.

 

No prob about the bug reports. If I find something I' ll be more than happy to report it.

 

Well, thanks for the fixes, vba-m now compiles succesfully with the gtk GUI.

 

However, I cannot start gvbam. Here's the error

 

$ gvbam

terminate called after throwing an instance of 'Glib::FileError'

Aborted

 

I'm using the following switch of cmake to compile : -DCMAKE_INSTALL_PREFIX=/usr

 

(Otherwise the files end up in /usr/local. I will test asap if the cmake . alone works correct)

 

Also two files (vba.glade and gbadvance.svg) end up in src/gtk, which is not very appropriate for these files I believe. Maybe /usr/share/vbam/gtk and /usr/share/icons would be more compatible with packaging standards of most distros?

Share this post


Link to post
Share on other sites

Well, if you read CMakeLists.txt (doing that is just oh-so-obvious) you would learn that you need to define DATA_INSTALL_DIR for cmake, too.

It's done this way, so there's a way for gvbam to work while still in the source tree.

It's not a nice way, cause you need to rerun cmake when you actually want to install (please correct me if I'm wrong), but otherwise you'd have to install to check if it's working.

It should probably be defined to share/vbam (or share/gvbam)

Share this post


Link to post
Share on other sites

Yes I know it's bad. But it's currently done to make it easy to launch gvbam from the source folder. I'll change that when the port is more mature.

To install in /usr, you have to launch cmake with :

cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DDATA_INSTALL_DIR:PATH=share/gvbam .

And to install in a chroot you have to launch :

make DESTDIR=/location/of/chroot install

 

I'm currently working on the graphic output system. I've made it possible to add other output modules in addition to the plain GTK one, and I've written an Xvideo output module. It gives a nice speed boost when compared to Gtk, thanks to the hardware scaling and filtering support. It also features freely modifiable window size.

The Xv output module can be enabled by setting use_Xv=1 in the config file (~/gvbam/config). I'm sorry, there is no menu for the moment. Can you please test it and tell me if it works on your system ?

Share this post


Link to post
Share on other sites

If that question was meant for me, then yes - Xvideo output seems to work.

Will you add soundShutdown() to Window destructor, cause it should be there anyway ?

I think that right after vOnFileClose(); is the correct place.

Share this post


Link to post
Share on other sites

If that question was meant for me, then yes - Xvideo output seems to work.

Will you add soundShutdown() to Window destructor, cause it should be there anyway ?

I think that right after vOnFileClose(); is the correct place.

 

Thanks, that's commited.

Share this post


Link to post
Share on other sites

Anybody interested in my copy/paste from src/win32/OpenAL.cpp to a file that I successfully use instead of sndPortAudio.cpp ?

 

I'll attach it here. There are a few changes.

oalBufferCount is constant for now as I would have to at least add a new config key to make this configurable

three commented ASSERT_SUCCESS macros are due to the issue I mentioned before (call to alGetError invalid, when current context == NULL)

added for g_new0 and g_free

changed ASSERT_SUCCESS macro to print error number instead of simply assert

 

BTW, why does the board reject this file while it's not packed ?

Share this post


Link to post
Share on other sites

<

Because the board only accepts certain file types.

 

 

It's nice to hear that my code is useful even for non-Windoze.

 

The ASSERT_SUCCESS macro and LOGALL are not really necessary anymore. They were however, when I was developing this code because the OpenAL documentation was very poor and I had to find out the voice's state under certain circumstances.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×