Author Topic: FB Alpha 0.2.97.25 Release  (Read 15043 times)

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline Ashura-X

  • Member
  • ***
  • Posts: 138
  • Karma: +0/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #1 on: April 27, 2012, 03:17:47 PM »
Very nice news indeed !!!!

Thx for teh release )

Offline Hyllian

  • Newbies
  • *
  • Posts: 22
  • Karma: +3/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #2 on: April 27, 2012, 04:42:07 PM »
I'm curious about xBR performance.  :biggrin:

I have some optimizations in mind if necessary...

Offline msbhvn

  • New Member
  • *
  • Posts: 5
  • Karma: +0/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #3 on: April 27, 2012, 06:04:19 PM »
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.

Offline Hyllian

  • Newbies
  • *
  • Posts: 22
  • Karma: +3/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #4 on: April 27, 2012, 06:55:47 PM »
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:

Code: [Select]
#define RED_BLUE_MASK565 0xF81F
Create this variable:

Code: [Select]
static const unsigned short int pg_red_blue_mask = RED_BLUE_MASK565;
And redefine these macros:

Code: [Select]
#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.

kev

  • Guest
Re: FB Alpha 0.2.97.25 Release
« Reply #5 on: April 27, 2012, 06:56:40 PM »
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.

Offline Hyllian

  • Newbies
  • *
  • Posts: 22
  • Karma: +3/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #6 on: April 27, 2012, 07:37:15 PM »
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?

Offline neocvera

  • Newbies
  • *
  • Posts: 39
  • Karma: +1/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #7 on: April 27, 2012, 09:52:43 PM »
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.

Offline Hyllian

  • Newbies
  • *
  • Posts: 22
  • Karma: +3/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #8 on: April 27, 2012, 10:35:32 PM »
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

I've already released it for Kega Fusion. -->  DDT3x plugin for kega

Some screenshots running with snes9x-next.
« Last Edit: April 27, 2012, 11:03:30 PM by Hyllian »

Offline lantus

  • Expert
  • *****
  • Posts: 162
  • Karma: +32/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #9 on: April 27, 2012, 10:45:26 PM »
Cool update. The PGM audio has significantly improved.

you're welcome =)

Offline money_114

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #10 on: April 28, 2012, 12:54:19 AM »
new Chinese(Simplified) pack

Offline Porcelain

  • New Member
  • *
  • Posts: 4
  • Karma: +0/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #11 on: April 28, 2012, 01:02:55 AM »
Thanks for release.

Here's Japanese.flt of FB Alpha v0.2.97.25:

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: FB Alpha 0.2.97.25 Release
« Reply #12 on: April 28, 2012, 03:13:20 AM »
Thanks guys, I added the translations to the site.
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline zebrastripes

  • Newbies
  • *
  • Posts: 15
  • Karma: +0/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #13 on: April 28, 2012, 03:52:29 AM »
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.

Offline msbhvn

  • New Member
  • *
  • Posts: 5
  • Karma: +0/-0
Re: FB Alpha 0.2.97.25 Release
« Reply #14 on: April 28, 2012, 07:19:11 AM »
Here's a new cpu filter that maybe you wanna try on FBA for the next version:  DDT3x

I've already released it for Kega Fusion. -->  DDT3x plugin for kega

Some screenshots 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.