Welcome!
Final Burn Neo => FBN Development => Topic started by: Barry Harris on April 27, 2012, 03:12:35 PM
-
http://www.barryharris.me.uk/article_view.php?id=187
-
Very nice news indeed !!!!
Thx for teh release )
-
I'm curious about xBR performance. :biggrin:
I have some optimizations in mind if necessary...
-
Thanks for the credit on the xBR addition. All that Ctrl+C and Ctrl+V was really hard work! :wink:
Hyllian, your standalone code works on 24-bit/32-bit PNGs, but there were so many revisions and I don't speak Portuguese, so I couldn't really make out what was needed for xBR to work in 32-bit colour. Having RGB to YUV conversion as a function rather than a look-up table might affect performance, but the look-up table is created every frame in the current code, so it might even out. Hq2/3/4x 16-bit has the YUV look-up table initialised separately, so that would be another optimisation for xBR in 16-bit. Do any FBA emulated games run in 24/32 bit colour?
You might be interested to learn I added the CPU xBR filters to Snes9x as well, and it was just as easy as FBA was! It's not as good for Snes9x because it can already use the shader version via Cg, but I have integrated graphics in my PC and it runs shaders at about 8 fps maximum, so I put the CPU versions in and got 60fps. :biggrin:
I just think it's the nature of these pixel scaling functions being self contained that makes them easy to add to emulators that already have a structure in place for other algorithms. All you have to do is look how the other scalers are accessed and copy it.
-
Another good optimization I just figured out. Those alpha blend macros, It's possible to put red and blue calc together.
Just define this macro:
#define RED_BLUE_MASK565 0xF81F
Create this variable:
static const unsigned short int pg_red_blue_mask = RED_BLUE_MASK565;
And redefine these macros:
#define ALPHA_BLEND_32_W(dst, src) \
dst = ( \
(pg_red_blue_mask & ((dst & pg_red_blue_mask) + \
((((src & pg_red_blue_mask) - \
(dst & pg_red_blue_mask))) >>3))) | \
(pg_green_mask & ((dst & pg_green_mask) + \
((((src & pg_green_mask) - \
(dst & pg_green_mask))) >>3))))
#define ALPHA_BLEND_64_W(dst, src) \
dst = ( \
(pg_red_blue_mask & ((dst & pg_red_blue_mask) + \
((((src & pg_red_blue_mask) - \
(dst & pg_red_blue_mask))) >>2))) | \
(pg_green_mask & ((dst & pg_green_mask) + \
((((src & pg_green_mask) - \
(dst & pg_green_mask))) >>2))))
#define ALPHA_BLEND_192_W(dst, src) \
dst = ( \
(pg_red_blue_mask & ((dst & pg_red_blue_mask) + \
((((src & pg_red_blue_mask) - \
(dst & pg_red_blue_mask)) * 3) >>2))) | \
(pg_green_mask & ((dst & pg_green_mask) + \
((((src & pg_green_mask) - \
(dst & pg_green_mask)) * 3) >>2))))
#define ALPHA_BLEND_224_W(dst, src) \
dst = ( \
(pg_red_blue_mask & ((dst & pg_red_blue_mask) + \
((((src & pg_red_blue_mask) - \
(dst & pg_red_blue_mask)) * 7) >>3))) | \
(pg_green_mask & ((dst & pg_green_mask) + \
((((src & pg_green_mask) - \
(dst & pg_green_mask)) * 7) >>3))))
And one more optimizations would be to move those "if (flavour==x)" out of those main "For" loops.
-
Do any FBA emulated games run in 24/32 bit colour?
I'm not sure if any run 24/32 bit colour but I know some of them are 12bit colour (and some possibly other non-PC colour depths) and look "wrong" when using 16bit colour but right on 32bit but it's hard to see unless you have them running side by side, or are mentally ill.
-
Hyllian, your standalone code works on 24-bit/32-bit PNGs, but there were so many revisions and I don't speak Portuguese, so I couldn't really make out what was needed for xBR to work in 32-bit colour.
I don't think 32-bit version is necessary for these emulators.
Having RGB to YUV conversion as a function rather than a look-up table might affect performance, but the look-up table is created every frame in the current code, so it might even out. Hq2/3/4x 16-bit has the YUV look-up table initialised separately, so that would be another optimisation for xBR in 16-bit. Do any FBA emulated games run in 24/32 bit colour?
It's created just one time. There's a static var called 'initialized' which is set only one time.
Maybe the initialization can be optimized, indeed.
You might be interested to learn I added the CPU xBR filters to Snes9x as well, and it was just as easy as FBA was! It's not as good for Snes9x because it can already use the shader version via Cg, but I have integrated graphics in my PC and it runs shaders at about 8 fps maximum, so I put the CPU versions in and got 60fps. :biggrin:
It's great. Are you planning to add your contribution to the snes9x dev team?
-
Cool update. The PGM audio has significantly improved. The new filters are pretty neat to see in action. It took me a few tweaks and adjustments here and there but I was finally able to play full-screen and see them in action. For the most part, it seems as colors are more vibrant and overall look is smooth but not blurry. I did find a few anomalies in games where a "mesh" style graphic was going on (Samurai Shodown 2 - Galfordo/Hanzo arms) the way the filter interprets the graphic is a bit strange. Games like that also where there is zooming in and out (small and large sprites) looks a bit strange when it goes small (a lot of detail is lost). Still found myself playing longer instead of simply testing out games. Thank you.
-
Thanks for the credit on the xBR addition. All that Ctrl+C and Ctrl+V was really hard work! :wink:
Here's a new cpu filter that maybe you wanna try on FBA for the next version: DDT3x (http://pastebin.com/2mEruYBM)
I've already released it for Kega Fusion. --> DDT3x plugin for kega (http://cdn.anonfiles.com/1335579831465.zip)
Some screenshots (http://imgur.com/a/tTIwY) running with snes9x-next.
-
Cool update. The PGM audio has significantly improved.
you're welcome =)
-
new Chinese(Simplified) pack
-
Thanks for release.
Here's Japanese.flt of FB Alpha v0.2.97.25:
-
Thanks guys, I added the translations to the site.
-
Thankyou so much for adding the xBR filter. FYI, I'm using it through DirectX9 Alt (DirectX Graphics 9) as Enhanced (Direct3D 7) blitter was very slow.
-
Here's a new cpu filter that maybe you wanna try on FBA for the next version: DDT3x (http://pastebin.com/2mEruYBM)
I've already released it for Kega Fusion. --> DDT3x plugin for kega (http://cdn.anonfiles.com/1335579831465.zip)
Some screenshots (http://imgur.com/a/tTIwY) running with snes9x-next.
Here you go! And I actually worked out how to use diff properly this time! :biggrin:
I had to rename a couple of variables because they were clashing with 2xPM, but otherwise there were no big problems. DDT3x looks like bicubic, but without the softening effect. It's pretty good, but I prefer xBR.
-
Here you go! And I actually worked out how to use diff properly this time! :biggrin:
I had to rename a couple of variables because they were clashing with 2xPM, but otherwise there were no big problems. DDT3x looks like bicubic, but without the softening effect. It's pretty good, but I prefer xBR.
Wow, that was fast! Congrats!
-
Update UI language for 0.2.97.25
-
Here the french language pack.
Have a nice day and keep up the good work.
-
Thanks guys.
-
Concerning : Neo Geo development - Neo Geo 3D !
Hello guys !
Can you update FBA with this new homebrew please ...? : 'Neo-geo 3D, This Tech. Demo (very Cool) developped by Arnaud CARRE /Leonard-Oxygene (FRANCE)
http://www.pouet.net/prod.php?which=59253 'Oxygene - NeoGeo 3D !' : ROM + AVI
have FUN ! YM Musics ... Cool :)
Bye
Fred/FRONT !