Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Street Fighter III: 2nd Impact runs slowly in widescreen mode on lr-fbalpha after RetroPie update



  • After upgrading via the setup script, lr-fbalpha runs Street Fighter III: 2nd Impact slower than before, especially when ran in widescreen mode. This game used to run flawlessly in v4.4, however it is now slightly choppy with distorted, poppy sound.

    I have tested this on two different Raspberry Pi 3's (check my hardware below), and both exhibit the same behavior after upgrading. My best guess is this is tied to the Cyclone update, as that is when this issue first started occurring.

    Example of the game running in widescreen mode, with step-by-step instructions on how to enable said mode:

    Please let me know if there is more I can do to help, and thanks for providing us with such an amazing toy to play with!

    Raspberry Pi 3 Model B+ / Raspberry Pi 3
    CanaKit 2.5A Micro USB Power Supply
    RetroPie Version 4.4.8
    Retropie v4.4 base, upgraded via setup script
    USB Devices connected: 8-bit do SNES30
    Controller used: 8-bit do SNES30
    Emulator: lr-fbalpha



  • This post is deleted!

  • Global Moderator

    That was reported way back - check https://retropie.org.uk/forum/topic/19646 - and it's indeed related to the changes in the emulator. Try enabling the Frameskip core option in lr-fbalpha and see it it gets better, otherwise give lr-fbalpha-2012 a try.

    EDIT: Please don't open multiple topics with the same problem. I merged both topics - I assume you submitted it by mistake twice ?



  • My apologies for the double post; I was getting an error stating Akismet flagged my post as spam, but I guess my first attempt went through after all. Please feel free to delete the second post if you wish.

    I read through the thread you linked and I'm not sure it is the same issue. The thread states the reported bug is not an issue on the Pi3B+ (which I have), and that it occurs on all CPS3 games. I just gave Jojo's Adventure, Jojo's Bizarre Adventure and Street Fighter 3: Third Strike a whirl and they all ran flawlessly on the latest lr-fbalpha with stock frameskip. It seems to only be an issue with the widescreen mode in Street Fighter 3: 2nd Impact.

    Thank you for the quick response, I Iook forward to any future input.



  • @BugReporter It definitely sounds like the same issue, since sfiii2 was always the game most affected by those changes. As to why it's happening for you and not to the others, the widescreen hack is most likely responsible, because rendering is the bottleneck for the cps3 driver, and you are asking the game to render on a larger screen.

    Aside from the Frameskip option, which is really good on games where the rendering part is heavy, make sure you are using the latest version of the core (aka build it from source), i fixed an issue with widescreen mode some time ago, maybe you are affected by it.

    One last thing, it seems fbalpha is faster when built with clang instead of gcc (specifically on cps3 games, i heard of a 20% perf increase on android when built with clang), don't ask me how to use this information with retropie setup scripts though.



  • I'll also post instructions to build the core manually with clang :

    git clone https://github.com/libretro/fbalpha.git
    cd fbalpha
    CC=clang CXX=clang++ make -j4 -f makefile.libretro platform=rpi3
    

    Again, that's generic instructions, i don't know specifics for installing clang on retropie (maybe take a look at http://apt.llvm.org/ ?), neither how to use this core instead of the one provided by the retropie setup script.


  • Global Moderator

    @barbudreadmon It should enough to modify the scriptmodule and add the new CC/CXX vars before make. I actually have Clang7 installed on my Pi, I could give it a shot.

    @BugReporter What's the ROM name and what resolution are you using ?



  • @mitu said in Street Fighter III: 2nd Impact runs slowly in widescreen mode on lr-fbalpha after RetroPie update:

    I actually have Clang7 installed on my Pi, I could give it a shot.

    Yeah, feel free to test, honestly if this stuff improve performances on retropie, it should become the default when building fbalpha. I can think of other systems that might get the extra performance to run full speed on a rpi3 with this : irem m92/m107, late pgm games (svg, killbldp), maybe other systems like taito f3 or dataeast 156 ?

    FYI, i did some tests on my i7 2600k with the infamous killer instinct (infamous because awfully slow in fbalpha atm), i went from 30fps with gcc-7 to 45fps with clang-6


  • Global Moderator

    I've managed to get a Clang version of lr-fbalpha to compile, and ran a small test. Here it is.

    • I have clang7 manually installed, but I wanted to get a distro packaged version so, I installed clang-6 from Debian Backports (armhf).

    • Ran the compilation with

    CC=clang-6.0 CXX=clang++-6.0 make -f makefile.libretro platform=rpi3
    

    and it immediately exited with:

    clang-6: error: unknown argument: '-mvectorize-with-neon-quad'
    clang-6: error: unknown argument: '-mword-relocations'
    

    Turns out these are gcc specific, defined in makefile.libretro_common, so I took them out.

    • Compilation wen along, but stopped when trying to compile Cyclone.S:
    clang-6.0 -fno-optimize-sibling-calls -funsafe-math-optimizations -fsingle-precision-constant -std=gnu99 -ffast-math -O3 -DNDEBUG -fPIC -DUSE_CYCLONE -DINCLUDE_7Z_SUPPORT -D__LIBRETRO__ -DLSB_FIRST -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard  -mlittle-endian -munaligned-access -DUSE_SPEEDHACKS -funroll-loops -fforce-addr  -Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused -Wno-sequence-point -Wno-strict-aliasing -Wno-write-strings -Wno-pedantic -Isrc/burner/win32 -Isrc/burner/libretro/libretro-common/include -Isrc/burner/libretro -Isrc/burn -Isrc/cpu -Isrc/burn/snd -Isrc/burn/devices -Isrc/intf -Isrc/intf/input -Isrc/intf/cd -Isrc/intf/audio -Isrc/burner -Isrc/cpu -Isrc/cpu/i8039 -Isrc/cpu/i8051 -Isrc/cpu/i8x41 -Isrc/cpu/m6805 -Isrc/cpu/tms32010 -Isrc/cpu/upd7725 -Isrc/cpu/upd7810 -Isrc/cpu/v60 -Isrc/cpu/z80 -Isrc/cpu/z180 -Isrc/dep/libs/zlib -Isrc/dep/libs/lib7z -Isrc/burn/drv/capcom -Isrc/burn/drv/konami -Isrc/burn/drv/dataeast -Isrc/burn/drv/cave -Isrc/burn/drv/neogeo -Isrc/burn/drv/psikyo -Isrc/burn/drv/sega -Isrc/burn/drv/toaplan -Isrc/burn/drv/taito -Isrc/burn/drv/irem -Isrc/dep/generated -Isrc/dep/libs -Isrc/cpu/cyclone -c src/cpu/cyclone/Cyclone.S -o src/cpu/cyclone/Cyclone.o
    clang: warning: optimization flag '-fsingle-precision-constant' is not supported [-Wignored-optimization-argument]
    src/cpu/cyclone/Cyclone.S:111:3: error: invalid instruction, did you mean: ldrexh, ldrh?
      ldreqh r2,[r0],#2 ;@ counter is in next word
      ^
    src/cpu/cyclone/Cyclone.S:336:3: error: invalid instruction, did you mean: strb, strexb?
      streqb r3,[r7,#0x47] ;@ just clear IRQ if there is no callback
      ^
    src/cpu/cyclone/Cyclone.S:1615:3: error: invalid instruction, did you mean: ldrsh?
      ldreqsh r2,[r7,r2] ;@ r2=Rn.w
    
    #... and other 20 something similar errors.
    
    • At this point, I modified the makefile.libretro and set HAVE_CYCLONE=0 in the rpi3 profile, then cleaned and re-compiled again with
    CC=clang-6.0 CXX=clang++-6.0 HAVE_CYCLONE=0 make -j3 -f makefile.libretro platform=rpi3
    

    which managed to finish succesfully.

    • Copied the resulting fbalpha_libretro.so to /opt/retropie/libretrocores/lr-alpha/fbalpha_libretro_clang6.so, then added an entry for this core in /opt/retropie/configs/fba/emulators.cfg, so I could switch between the 2 cores at game start.

    I ran the sfiii2.zip ROM with both cores, switched the screen to wide from the diagnostic screen.

    1. Default core (compiled with gcc) from last week's repo. Game ran ok, no slowdown, maybe some small audio cracks (?). Played the 1st round, then switched to Frameskip=1 and fought 2nd round. Sound seemed less glitchy, but there were no slowdown. Exited after the 2nd round.
      Log file: https://pastebin.com/raw/LxSan138. Only 3 video frames dropped.

    2. Ran with the clang6 compiled core (today's checkout). The game seemed similar as speed, with the same small audio cracks (and had Frameskip=1 since the beginning). Played again 2 rounds, got to the next match and got kicked in the 1st round, after which I exited.
      Log file: https://pastebin.com/raw/8PaPs3BZ. Only 1 video frame dropped.

    Now, this is the 1st time I'm playing the game, so I can't say how well it worked 'before', but the 2 cores seemed pretty much to run the same. I haven't activated Cyclone in neither core (well, the clang6 core it couldn't have been anyway) and I'm not sure how much difference would have made if it would have been active.

    I have a 3B model, with a stock RetroPie 4.4 installation, 1080p over HDMI, no shaders/bezels and no other tweaks.

    Take this testing with a grain of salt, since I haven't played the game extensively and I'm not sure if other game areas could have noticeable slowdowns.



  • @mitu Could you try the following games ?

    • rtypeleo
    • svg
    • killbldp
    • firebarr

    None of them should run full speed on a rpi3 with a lr-fbalpha built with gcc (iirc they were running around ~55fps last time i tried them).


  • Global Moderator

    @barbudreadmon I'll dig them up from the ROMset I have and give them a spin tomorrow. I'll turn on the FPS counter also, pity it's not logged in the RA's logfile. I think I played R-Type Leo last year at some point and it seemed quite ok (got to 4th stage maybe ?).



  • @mitu said in Street Fighter III: 2nd Impact runs slowly in widescreen mode on lr-fbalpha after RetroPie update:

    I think I played R-Type Leo last year at some point and it seemed quite ok (got to 4th stage maybe ?).

    iirc the game run at a stable 55 fps.


  • Global Moderator

    @barbudreadmon OK, so I tried again with the list of games you mentioned last time. Played every game about 5 minutes and had Frameskip = 1 for all of them from the beginning. I also enabled Cyclone (except for R-Type Leo, I think). This time I enabled the FPS counter and jus took notice how it behaves, I think the final RA log message about dropped frames is not so relevant.
    Both cores play almost the same, there's no notable difference between them as far as I played.

    • rtypeleo - noticeable sound glitches (not so annoying), default runs at about 48 Fps. Increasing Frameskip to 2 makes it go to 50-52, but it's noticeable it's not running at full speed. Almost passed the first boss after the asteroid field.

    • firebarr - slowest of all, default (gcc) runs at about 48fps, but the sound artifacts and slowdown are more noticeable than for rtypeleo. The clang core runs about the same (46-48), but not better. I didn't increase the frameskip to 2, seems the game is quite taxing.

    • killbldp seemed to run fine, at about 60 fps, there's no noticeable slowdown. I played a match in both cores, seems fluid (remember it's still with frameskip = 1). If I remove the Frameskip, the FPS is around 58-59, but no noticeable slowdown.

    • svg this one I tested more. I noticed that if I pick one of the first characters, the FPS is ok (around 59), but if I pick for instance Wells, which has the 2 spinning blades animation, it dips to 55 for the round. Running again with frameskip = 2 makes the FPS go up again to 58-59.

    I re-tested sfiii2 with frameskip = 1 and looked at the FPS, seems to be around 58, still very playable to me (I have to learn to block though, I got kicked out from the first match). Game was still in widescreen mode.



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.