Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 09, 2014 10:49 am

KitchUK wrote:I have a really weird problem with a couple of Neo Geo games. For example Art of fighting 3 and Metal Slug 3. Sometimes the music is noticeably slowed down an stuttered and other times it is fine. I understand that some games had slowdown but this seems to be different. It's almost as if the pi cannot handle it (sometimes). I have my pi set to 1ghz with 128 meg for the gpu and the cpu scaling governed is set to on demand. So strange how sometimes the music is fine. :?:
The same happens here with Metal Slug 2, but not with Metal Slug X....strange indeed!

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 09, 2014 11:19 am

I know metal slug does have slowdown as this was present in the arcade i.e. the animation became slower but the music was still in time and didn't stutter like treacle. The difference with Metal Slug 3 is that the sound stutters and its as if the Pi is having trouble with it. I'm not sure why as I'm overlcocked and all the others work fine. Very strange!?

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 09, 2014 2:16 pm

KitchUK
'I have a really weird problem with a couple of Neo Geo games. For example Art of fighting 3 and Metal Slug 3.'
Hard to say, could be FBA itself or due to issues noted below of the original Hardware (or if your outputting Analogue sound as opposed to HDMI). I do know Cave's 'Danmaku' DoDonPachi doesn't seem to display any slowdown at 900Mhz which surprised/impressed me as the original PGM Hardware is much more powerful than SNK's MVS. Perhaps you could try lowering your GPU allocation to 64MEG, see if that helps.

Vanfanel
'The same happens here with Metal Slug 2, but not with Metal Slug X....strange indeed!'
The original MVS Metal Slug 2 suffered horrendous slowdown (to which Arcade Owners and their patrons complained) so was rewritten as Metal Slug X to address the issue by rearranging elements during the levels to prevent bottle necks.
"The list of things I have heard now contains everything!"

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 09, 2014 5:12 pm

whelsy: Metal Slug 2 has horrible slowdowns on the original hardware, yes, but audio is constantly active and music never stops. In FBA, however, it crackles and pops in situations where not much is going on in the game: it's definitely an emulator issue.
I can tell "internal" slowdowns (present in the emulated systems) from "host-side" slowdows.

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiFBA released - Final Burn Alpha arcade emulator

Wed Feb 12, 2014 5:39 pm

Are there any good EmulationStation themes out there for FBA?

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Wed Feb 12, 2014 6:57 pm

Jessie wrote:Are there any good EmulationStation themes out there for FBA?
I know there's a good Capcom CPS one over at the RetroPie forums.

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Mon Feb 17, 2014 5:16 pm

Or maybe pick one of these DMT modes (if you're using a computer monitor):
Hmmm... Interesting, I was looking for a way to force the resolution but I didn't know I could force it at boot time :) I'll let you know very soon how it turned out, thanks !

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Tue Feb 18, 2014 10:53 am

Okay so eventually : I swapped the 17" monitor (1280x1024) I had acquired especially for this use (and an Amiga) with my main 24" 1080p screen...

Surprisingly, it really looks better now even though it should look worse from the same distance (blockier) !

So I disabled the bilinear filtering and enabled scanlines. I'm pretty satisfied with the result. Sure, it's not as nice as using complicated filters on a regular PC with MAME but that's the most the Pi can handle anyway. And it's pretty good !

So thanks to you guys for suggesting the issue was the monitor. (btw : forcing the resolution didn't give satisfactory results on the 17" anyway).

Now, I'm really hoping someone will carry on Squid's work as his 3 ports are the best ones on the Pi, it's sad to see there's no more progress anymore :)

BTW out of curiosity I tried retropie... It has a FBA version that is MUCH slower (but more compatible). Sadly Squid's FBA port doesn't support everything (R-Type, Toki, later DDP, PCE stuff are missing for instance :) Also, sound on Pulstar is broken, boohoo :( ;-)

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 11:47 am

Hello everyone :-)

After playing a little more with piFBA, I noticed there is a slight delay between keyboard input and ingame action. A fraction of a second. It seems a little annoying in some cases (fast shmups for instance). I checked in mame4all, and the delay seems to be smaller (I cannot measure it, but I wouldn't have noticed it under MAME4ALL while it was quite obvious in piFBA).

Do you guys have it too ? Do you know if it's possible to reduce it ?

I overclocked my Pi to "high" (I added some radiators to spread heat and do not use a case so I think it should be OK...). What about yours ? May an high overclocking level reduce the input lag ?

Cheers !!

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 11:52 am

bidinou
Its the emulator, PiFBA (amongst others e.g. Mednafen) suffer inherent latency (delay) in Keyboard Input. Using a Joypad/Joystick will solve the issue.
"The list of things I have heard now contains everything!"

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 12:06 pm

Hmm... As I use it with an i-pac2 interface (in an arcade cabinet), how can I work around this issue ? (apart from building a gamepad hack to connect my arcade cabinet buttons :))

Indeed, the I-Pac is detected as a keyboard...

Thanks for the reply !

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 12:36 pm

bidinou
Yup, the IPac is a Keyboard encoder (interprets keyboard inputs to Joystick), I do know lots of people use these devices in Cab builds, the problem being a PC is far more powerful than the RPi so the latency is negligible. If its a real problem (I'm guessing an input delay in a Title like DoDonPachi is going to be catastrophic!) I believe there are solutions available to connect the Arcade Inputs directly to the GPIO pins on the RPi, along with a bit of driver software (to interpret them). Or no doubt there are Arcade Controls to USB adaptors available!
"The list of things I have heard now contains everything!"

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 2:40 pm

Yep, I'll find a solution eventually. Meanwhile, it's not that bad :-)

I'm pretty suprised as the latency doesn't seem to be directly due to the keboard input ? For instance, in the shell, it's instant. Well... :)

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 4:56 pm

There's no logical relation between input lag and CPU power if the emulated game runs at 60FPS, wich CPS1 and CPS2 games do on PiFBA.

Whelsy: If there's such a relation, can you please explain it? Why would a "faster" PC provide less input lag if the emulator runs at the same fps, in real time (no n-buffer), and the polling rate is the same? Sounds like unicorns to me... :)

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 5:26 pm

Vanfanel wrote:There's no logical relation between input lag and CPU power if the emulated game runs at 60FPS, wich CPS1 and CPS2 games do on PiFBA.

Whelsy: If there's such a relation, can you please explain it? Why would a "faster" PC provide less input lag if the emulator runs at the same fps, in real time (no n-buffer), and the polling rate is the same? Sounds like unicorns to me... :)
Because the faster PC has more spare cycles to listen for input amongst other things like larger faster buses and interconnects. I've noticed that with games that run under a solid 60 fps the input lag is bad and I get repeats of some button presses and other odd control issues. Input lag can be for many reasons I'm sure but the CPU is definatly one of them.

cacophony555
Posts: 140
Joined: Sat Jan 18, 2014 5:54 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 5:45 pm

bidinou, most modern TVs include a "game" mode, which reduces input lag by cutting down on various video processing. So that's one easy thing to try if you haven't already.

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 21, 2014 6:46 pm

Hmm, I'm not sure to understand why the monitor would be at fault here ? As said, I get no lag for instance under the shell (same resolution, same Pi / monitor).

Thanks for the replies guys !

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiFBA released - Final Burn Alpha arcade emulator

Sat Feb 22, 2014 9:09 am

bidinou wrote:Hmm, I'm not sure to understand why the monitor would be at fault here ? As said, I get no lag for instance under the shell (same resolution, same Pi / monitor).

Thanks for the replies guys !
Some monitors (but generally this is more of an issue with HDMI TV sets) do some post-processing to the image. In the worst cases they can introduce somewhere around 20ms of lag.

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sat Feb 22, 2014 12:06 pm

Jessie wrote:
Vanfanel wrote:There's no logical relation between input lag and CPU power if the emulated game runs at 60FPS, wich CPS1 and CPS2 games do on PiFBA.

Whelsy: If there's such a relation, can you please explain it? Why would a "faster" PC provide less input lag if the emulator runs at the same fps, in real time (no n-buffer), and the polling rate is the same? Sounds like unicorns to me... :)
Because the faster PC has more spare cycles to listen for input amongst other things like larger faster buses and interconnects. I've noticed that with games that run under a solid 60 fps the input lag is bad and I get repeats of some button presses and other odd control issues. Input lag can be for many reasons I'm sure but the CPU is definatly one of them.
Input polling is done at a fixed rate, as far as I know.
I'm not talking about sub-60FPS emulated games, ONLY rock-solid 60FPS games: in that case, I see no reason for input lag.

cacophony555
Posts: 140
Joined: Sat Jan 18, 2014 5:54 pm

Re: PiFBA released - Final Burn Alpha arcade emulator

Sat Feb 22, 2014 6:06 pm

bidinou wrote:Hmm, I'm not sure to understand why the monitor would be at fault here ? As said, I get no lag for instance under the shell (same resolution, same Pi / monitor).

Thanks for the replies guys !
I would imagine the post processing time for typing in a shell window is significantly less than a running game at 60fps, so probably not a good test. The amount of lag various quite widely from TV to TV and the picture mode you pick can make a noticeable difference.

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 23, 2014 10:17 am

Hi ! So, just to try to make a quick recap... Input lag can be due to :

- the emulation core itself (buffers etc.)
- the keyboard polling in SDL input handling (done after the current frame display?)
- post-processing done by the monitor
- lack of spare CPU cycles ?
- display vs emulated system refresh frequency

Did I understand correctly ?

To what extent would it make a difference to use a USB gamepad / a GPIO connection instead of my I-Pac keyboard interface ? (so the USB gamepad wouldn't be polled ? but trigger events instead ?)

Are you 100% sure input events in SDL are treated faster when dealing with a USB peripheral instead of an USB keyboard ?

Best regards & thanks to all for your help !

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiFBA released - Final Burn Alpha arcade emulator

Sun Feb 23, 2014 9:37 pm

I would like to know the answer as well? I figured there would be no lag difference between a joystick device and a kb device. But if one is better my encoders let me select one or the other I could then make a better decision.

There is a way to measure input lag but it requires extra hardware, some hacking, and coding.

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Fri Feb 28, 2014 3:21 pm

Jesse : so, in your experience, there is lag with both a keyboard and a USB joystick, and it's pretty tough to make out which one is better.

Did you try (I guess not :-) with the GPIO interface ? As the USB stack is not used, it should be better ?

I was planning to do this, but it seems there wouldn't be enough pins for 2 players and all the buttons I need.

Can someone please confirm if there is still a visible lag when using the GPIO ?

Edit : according to this http://learn.adafruit.com/retro-gaming- ... pi/buttons there would be available 15 pins ; so for 2 players, it would mean 4 directions * 2 = 8 ; rest = 7 pins so 4 and 3 buttons per player.

But well, even so... This wouldn't be such a problem as the most important (directions & main buttons) would be covered anyway !

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: PiFBA released - Final Burn Alpha arcade emulator

Sat Mar 01, 2014 3:56 am

I would assume GPIO is the best because it dosent require the CPU overhead needed with USB. It was a consideration for me but in the end I decided that I wanted the ability to move from a R Pi to a full x86 pc if I felt the need and utilizing GPIO would have made that harder so I bought into KADE. I like their response time compared to my HORI sticks they are much faster.

bidinou
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France

Re: PiFBA released - Final Burn Alpha arcade emulator

Thu Mar 13, 2014 7:56 pm

Hmm, okay, so I guess I'll have to try it by myself and figure out if it's better :-) Also, I hope the situation will automagically improve itself with some next SDL / kernel / emulator versions :)

Apparently, one can just directly connect GPIO pins to the buttons / arcade sticks; cf : http://learn.adafruit.com/retro-gaming- ... pi/buttons

When I have some spare time, I'll try and report back here !

Return to “Gaming”