Welcome!

Final Burn Neo => FBN Development => Topic started by: Romhack on April 23, 2014, 11:26:17 PM

Title: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on April 23, 2014, 11:26:17 PM
I started working on porting FBA to linux using one GUI code across multiple oses with Qt support. By now I only have emulation of video (no inputs or sound), for this I'll use SDL backends for portability. But at moment I'm focusing on reconstruct FBA GUI... the code is still at early stage.
(http://i57.tinypic.com/24pc2md.png)

This is a little demo:
https://www.youtube.com/watch?v=HmPCH08HpkE
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Barry Harris on April 24, 2014, 05:15:57 AM
Very nice work - I would be interested in this being applied to the main source tree when you ready if you are interested.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on April 24, 2014, 07:33:54 AM
That's very cool. I'd also be interested in seeing this in the main tree, i'd also help out building it if I had any time.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on April 24, 2014, 02:03:49 PM
That would be great, but there's a lot of work to be done yet.

My source tree is here:
https://bitbucket.org/zxmarcos/fba-qt

Rom scanning and reporting errors on load implemented...
(http://i60.tinypic.com/33ab5h2.png)
(http://i59.tinypic.com/289lqia.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: iq_132 on April 24, 2014, 02:11:40 PM
Wow! Looks great!
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Barry Harris on April 24, 2014, 07:20:57 PM
It looks very nice. Keep up the good work. :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on April 30, 2014, 01:52:44 AM
I'm trying to get sound but even with SDL backend it doesn't work.. :(
I don't understand how nAudNextSound, nAudSegCount, nAudSegLen and nAudAllocSegLen work together. That's very confusing...
And what is the fps magic? I didn't see any code related to that...
:S
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on April 30, 2014, 07:00:42 AM
FYI, I am not sure that SDL audio driver was ever fully tested.

As for the FPS stuff, that will be to make it frameskip and/or run without sound depending on which bit you mean.

Is there an easy way to get this building on OSX? I could take a quick look if so.

Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on April 30, 2014, 01:14:27 PM
Well, the source tree is here:
https://bitbucket.org/zxmarcos/fba-qt/src

To compile you'll need QtSDK (http://qt-project.org/downloads).
Dependencies are: SDL, libz and libpng.

EDIT:
I've got sound running (very buggy :)) with my QtMultimedia backend :)
https://www.youtube.com/watch?v=K19kbLuX0iA
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on April 30, 2014, 07:12:56 PM
I have it building and running on OSX. I had to make a few patches as it seems that clang is a bit harsher on certain bits of code when it comes to casting and type sizes than MSVC and GCC. Also there were a few things I had to do with regards to OpenGL as some of the headers are named slightly differently. Also, I had to change the build to include the version of libpng thats in the FBA sources.

I may now be able to help :)

And good work with the sound. In fact good work with the whole Qt thing :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 02, 2014, 04:35:34 PM
Looks nice! However that is the first version of code :D
I fixed sound backend using multithreaded code. The sound and fps are okay, however CPS-3 sound is not good, it seems to be playing slowly :S
https://www.youtube.com/watch?v=zua6x3C54_0

All changes are committed to bitbucket.

EDIT:
Title Screens :)
(http://i57.tinypic.com/seno7o.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 03, 2014, 08:49:54 AM
I have it building and running on OSX. I had to make a few patches as it seems that clang is a bit harsher on certain bits of code when it comes to casting and type sizes than MSVC and GCC. Also there were a few things I had to do with regards to OpenGL as some of the headers are named slightly differently. Also, I had to change the build to include the version of libpng thats in the FBA sources.

I may now be able to help :)

And good work with the sound. In fact good work with the whole Qt thing :)

This is awesome! Is it possible to update the source code with your patch? Mac has been waiting for FBA for years!
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 04, 2014, 10:01:14 AM
This is awesome! Is it possible to update the source code with your patch? Mac has been waiting for FBA for years!

Yeah, I can probably work on a pull request for Romhack. I just need to work out how to make the Qt creator project have some mac specific lines and get his latest code. there are also a few things that stop it being really usable with regards to rom loading. it seems that Qt on the mac likes to have a different path setup for accessing outside of the application package than Linux. Still, it is possible to run most of the games with a bit of messing around. I may spend some time on this later today if I get chance.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 04, 2014, 04:10:38 PM
Yeah, I can probably work on a pull request for Romhack. I just need to work out how to make the Qt creator project have some mac specific lines and get his latest code. there are also a few things that stop it being really usable with regards to rom loading. it seems that Qt on the mac likes to have a different path setup for accessing outside of the application package than Linux. Still, it is possible to run most of the games with a bit of messing around. I may spend some time on this later today if I get chance.
You can use Q_OS_MAC macro.
Or use platform scopes in project file: http://qt-project.org/doc/qt-5/qmake-language.html#platform-scope-values

EDIT:
Inputs are working (keyboard only).  I would use SDL but it requires a visible window (created with SDL_SetVideoMode) :p The good news is that joysticks don't need that.
https://www.youtube.com/watch?v=QTg1R0RGS-8
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 05, 2014, 08:53:56 PM
Yeah, I can probably work on a pull request for Romhack. I just need to work out how to make the Qt creator project have some mac specific lines and get his latest code. there are also a few things that stop it being really usable with regards to rom loading. it seems that Qt on the mac likes to have a different path setup for accessing outside of the application package than Linux. Still, it is possible to run most of the games with a bit of messing around. I may spend some time on this later today if I get chance.
Well, maybe compile Qt by yourself or use homebrew to install Qt would be easier to solve the PATH problem, install the binary from the official site may cause some issues.

BTW, I don't know which version of Qt is for this port, 4.8.x or 5.2.1?
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kenshiro on May 06, 2014, 06:49:21 AM
Nice work RomHack :) A port of FBA on Linux is something a lot of people wants to see!
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 07, 2014, 04:46:44 AM
Here is a test build for linux64.
https://www.dropbox.com/s/z8yp5gj3fksztr8/fbaqt-linux64.tar.bz2

I'm implementing fullscreen support. At first raster render was a bit slow (1920x1080), but with QGLWidget it's running smoothly :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 07, 2014, 09:17:09 PM
Building with Qt5.2.1 on OS X, no good :(
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 08, 2014, 02:40:53 PM
Yeah, that's not Qts fault that clang being a bit harsher than gcc. I have those fixed in my local tree but wanted to check against the latest version of FBA before I did any more with it.

I'll try and get a pull request done asap. As usual time is my enemy.

 
I also can't attach a build as it's more than 6mb zipped.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: dink on May 08, 2014, 04:06:55 PM
kev, http://sharesend.com is nice for swapping larger files :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 08, 2014, 06:45:29 PM
I've made a branch here: https://bitbucket.org/kjarmstrong/fba-qt

Also sent a pull request to Romhack.

I've only tested it with the latest Qt Creator. The only other dependency is the latest SDL 1.2 build, installed as per the instructions on the SDL site (i.e. make sure you have the lib in your frameworks directory)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 08, 2014, 06:48:30 PM
Build here (thanks for the suggestion Dink)

http://sharesend.com/g3o89a8g
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 09, 2014, 12:43:56 AM
This build doesn't work on my Mac(10.9.3 13D61), trying to build the source in my own environment, it works!

But it looks...

Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 09, 2014, 12:41:30 PM
Hiko: Did you get any error messages with my build? Also can you post your build somewhere so I can take a look here?
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 09, 2014, 04:44:50 PM
Thank's for the patch :)

---
I'll need to move emulation code to another thread. When I hide menu, go fullscreen or move window the UI thread is busy doing these things and doesn't call emulation handler in time, as side effect sound emulation thread is running and continue to request more sound, so we got a lot of buffer underflow...
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 09, 2014, 07:51:40 PM
Hiko: Did you get any error messages with my build? Also can you post your build somewhere so I can take a look here?

Hi Kev, it seems your build is not static, I show you the error message screenshots, and I attached my build here:
https://www.dropbox.com/s/j1lxfx203gy93ds/fbaqt.app.zip
 (https://www.dropbox.com/s/j1lxfx203gy93ds/fbaqt.app.zip)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 13, 2014, 04:08:15 PM
Rendering into QGLWidget from another thread is a hell! And performance is bad, the thread always block on swapBuffers :P
So I left Qt drawing system. I am now using ruby (http://byuu.org/programming/ruby/) for videobackends (audio/input in future :)), and for my surprise it's incredibly fast for rendering (OpenGL backend has shaders support for free :)). Now I have a responsive GUI and rendering is smoothly even when resize/move the window. All these things without another thread!
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 13, 2014, 06:11:09 PM
Awesome.  That sounds like a great idea :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on May 13, 2014, 06:31:03 PM
Shaders from higan  :biggrin:
(http://i59.tinypic.com/et6s03.png)
(http://i61.tinypic.com/kbt4pk.png)

Projection effect :D
(http://i61.tinypic.com/2v3smlt.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on May 15, 2014, 07:29:28 PM
Damn that's cool :) seems like it should be in the native windows build too :)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on May 31, 2014, 08:54:38 AM
How is it going now?
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: kev on June 01, 2014, 08:09:58 PM
I'm putting together another patch for romhack to get the latest additions building under osx. Also going to take a look at building under Windows.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on June 05, 2014, 12:31:41 AM
It's so good to know.

EMU in Mac's world is far behind windows, although the trend is for multi-platform. Can't wait for an OFFICIAL FBA on Mac... :biggrin:
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on June 07, 2014, 03:11:10 AM
I'm working on a new project file, much more robust with dependencies(m68k, perl scripts, etc...)  generated in build time and support to enable/disable drivers by system (this is good for devbuilds because reduces compilation times)...
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Hiko on July 23, 2014, 12:02:16 AM
Any news? :S
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on July 29, 2014, 11:31:24 PM
Lately I've very busy :(
Anyway, last addition was dips dialog, next thing to do is input dialog.
Also I need to work on building with FBA_DEBUG flag, it's broken...
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on September 01, 2014, 06:45:48 PM
QtMultimedia backend on Ubuntu 14.04 doesn't work properly :P problems with multithreading code...
I wrote a pulseaudio driver with simple API, now it's working fine, actually better than QtMultimedia.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Sturm on September 06, 2014, 12:45:49 AM
Are you from Sao Paulo, Romhack? Have you ever been in touch with the emulation scene running in the Garoa Hacker Clube?
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on September 09, 2014, 12:01:39 AM
Are you from Sao Paulo, Romhack? Have you ever been in touch with the emulation scene running in the Garoa Hacker Clube?
I am from Assis/SP, so I've never been there, anyway it seems to be an interesting place.

============
I improved and fixed some bugs on interface.
(http://i61.tinypic.com/5wxuw.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Barry Harris on September 10, 2014, 04:52:28 AM
I am from Assis/SP, so I've never been there, anyway it seems to be an interesting place.

============
I improved and fixed some bugs on interface.
(http://i61.tinypic.com/5wxuw.png)

Beautiful. Very nice work Romhack.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on September 10, 2014, 03:22:11 PM
Beautiful. Very nice work Romhack.
Thanks :)
====

First steps on Map game inputs.
(http://i57.tinypic.com/33pa5wx.png)

DIPSwitchs dialog working.
(http://i61.tinypic.com/124wux1.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on September 11, 2014, 03:05:38 PM
Even if I don't like that space between images and options group box...
(http://i59.tinypic.com/rk930h.png)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: dink on September 11, 2014, 05:34:54 PM
very nice!
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: hursit on December 29, 2014, 06:21:33 PM
Hello
please can you upload FBA for Yosemite.

thanks...
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: manliodp on February 09, 2015, 11:15:52 AM
Great work romhack,
I'm really envying you, not for KI but for your linux/qt port of FBA!!
Any hope to get the qt ui released/merged in the main source for poor linux users? :)

Thanks


Manlio
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: carson on April 08, 2015, 02:51:52 AM
I download the code and compile it succeed in ubuntun 14.10(installed in vmware), but fba shows black screen and it can not play the roms.like this:

Starting /home/chenzm/work/backbup/build-fbaqt-Desktop-Debug/fbaqt...
QXcbInputInit
Ruby Succefully initialized
QtSoundStop
QtSoundInit
QtSoundSetCallback
QtSoundGetNextSoundFiller
QtSoundSetCallback
RubyVidInit
QtSoundPlay
using null output device, none available



does anyone can help me ? I knonw it maybe a audio issue, but I do not know how to do next .please help .

Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on April 08, 2015, 05:39:11 PM
Please use lastest source code available here (http://www.barryharris.me.uk/fba_downloads.php).
Ruby was dropped from FBAQt because byuu won't update it anymore.  Now FBAQt uses its own OpenGL3.3 render.
QtSound driver doesn't work on newer Qt versions, I don't know why. Lastest version uses PulseAudio.
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: carson on April 15, 2015, 01:53:53 AM
Hello  Romhack

as you said, I got the latest code and build it with qt on my ununtu OS, I run it and found it shows:

Erro ao carregar o shader: 0:2(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

Erro ao carregar o shader: 0:2(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

does it means my system OpenGL is lowe than the fba wanted ? I found in the fba code said it would need the opengl 3.3 core.

so how to do this, need I update the OpenGL to 3.3 version ,but I think this ways maybe not a good idear, here is my grahic version:

chenzm@ubuntu:~$ glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE; 
OpenGL version string: 2.1 Mesa 10.3.2
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:


could you advise me how to do next ,thank you very much .
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: barbudreadmon on May 26, 2015, 08:30:34 PM
I was wondering, is FBA-Qt on linux having any issue with colors on konami games ?
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: mangamuscle on November 02, 2015, 03:28:08 PM
Is this port dead? I was really looking forward to using FBalpha in ubuntu/linux mint  :confused:
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: barbudreadmon on November 07, 2015, 01:03:45 PM
I don't know if this port is dead, but you can still run fba through retroarch + libretro-fba port on most platform (including linux on pc compatible)
Title: Re: Porting FBA to Linux (Win|OSX) with Qt
Post by: Romhack on November 08, 2015, 10:28:03 AM
The port is not dead, but I need to sync qmake project to FBA .37.