Homebrew RELEASE pFBA: final burn alpha

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
43
XP
4,236
Country
France
Hi guys,

Just release a new version, spent quite some time on it to get perfect audio and such.. :)

Here is the changelog:

pFBA 1.54
  • switch: fix audio :)
  • switch: add 4 player support. When joycons are not docked (multiplayer), use "L STICK" button press for start or coin instead (+) or (-)). All players share the same button configuration for now.
  • switch: fix a random crash on exit (hopefully)
  • switch: lower font size
  • switch: use linear filtering as default option (faster)
  • pfba: fix button textures not deleted when changing menu
  • pfba: fix version not correctly handled on some platforms
  • pfba: fix missing rom path slash on new config
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Great work on the sound emulation. :) Will test the rest a little later.

For me CPS2 roms like Street Fighter Alpha 2 and Alpha 3 dont work (prior pFBA versions as well), I'll get a "driver init failure". Roms (/Romset) should be good - although I havent looked them up versioning wise (if they are in the most recent FBA version format).

Some input would be appreciated, if anyone else is experiencing the issue. :)
 
Last edited by notimp,

Kerbangman

Well-Known Member
Member
Joined
Sep 19, 2016
Messages
525
Trophies
0
Age
61
XP
689
Country
Great work on the sound emulation. :) Will test the rest a little later.

For me CPS2 roms like Street Fighter Alpha 2 and Alpha 3 dont work (prior pFBA versions as well), I'll get a "driver init failure". Roms (/Romset) should be good - although I havent looked them up versioning wise (if they are in the most recent FBA version format).

Some input would be appreciated, if anyone else is experiencing the issue. :)

notimp I have street fighter alpha 960229 Euro and alpha 3 980904 Euro and both work.
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
EDIT: On the second launch of pFBA 2P tiny controllers mode now works as expected. I'll rewrite that section. :)

On the second launch, when I took off the controllers in game, controllers stayed in "1 Player" configuration. I could go into the switch menu, switch them to "2Player tiny controllers configuration", then reenter pFBA, launch a game - and both controllers worked as promised (even taking on a customized button configuration, 2P start worked as well.).

That behavior is optimal imho.

The "auto switch to 2 player tiny controllers" I experienced the first time around, as soon as I took off the controllers - is not. :) (Breaks too many other usecases.) Behavior should be "stay in 1 player mode - unless tiny controller mode is selected (via Nintendos menu - or better - a toggle in the pFBA menu (if thats even possible))". :)

Text before the edit:
Two player integration currently is botched. :)

1. 2 Player Start doesnt seem to work/be mapped. So you cant enter 2P modes in many arcade titles.
2. As soon as you disconnect the two joypads from the switch - it switches to "tiny controllers" mode, this is an issue - as this outright breaks:

- Docked mode without a pro controller
- Playing vertical shooters as only 1 Player with the controllers detached.
- Normal Multiplayer with multiple "normal"/"segmented" controllers, should it become a thing in the future.

Switch multiplayer modes require a little more thought to be implemented.

I like the "quick switch" to "tiny controllers mode" - but @cpasjuste - you have to make this a menu toggle for Player 1 to hit - best, after having detached the controllers.

Tiny "controllers mode" will probably be the least used, on the system - although it is the most flashy. :) Docked Multiplayer (with several "normal"/"segmented" controllers) probably will be more important. Usage wise - handheld vs. docked is about 50/50 according to surveys. "Tiny controllers" mode is used less frequently.

--------------------- MERGED ---------------------------

notimp I have street fighter alpha 960229 Euro and alpha 3 980904 Euro and both work.
Thank you - so thats an issue on my part, confirmed. :)
edit: I have both SFA2 and SFA3 working now. Thank you again. :)
 
Last edited by notimp,

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
43
XP
4,236
Country
France
Two player integration currently is botched. :)

1. 2 Player Start doesnt seem to work/be mapped. So you cant enter 2P modes in many arcade titles.
2. As soon as you disconnect the two joypads from the switch - it switches to "tiny controllers" mode, this is an issue - as this outright breaks:

- Docked mode without a pro controller
- Playing vertical shooters as only 1 Player with the controllers detached.
- Normal Multiplayer with multiple "normal"/"segmented" controllers, should it become a thing in the future.

Switch multiplayer modes require a little more thought to be implemented.

I like the "quick switch" to "tiny controllers mode" - but @cpasjuste - you have to make this a menu toggle for Player 1 to hit - best, after having detached the controllers.

Tiny "controllers mode" will probably be the least used, on the system - although it is the most flashy. :) Docked Multiplayer (with several "normal"/"segmented" controllers) probably will be more important. Usage wise - handheld vs. docked is about 50/50 according to surveys. "Tiny controllers" mode is used less frequently.

--------------------- MERGED ---------------------------


Thank you - so thats an issue on my part, confirmed. :)
Can you try to detach left joycon first ? Maybe I have a problem there where p1 is p2 so it wrongly switch +/- buttons (doesn't have my switch there). Also, when you reconnect your joycons it should work again as a single controller.

Else, what do you mean by docked mode without a pro controller ? You should be able to use any controller at any time, but using L trigger for either coin or start as soon as you detach the joycon.
Also, libnx seems to miss a function to identify the attached controllers, I'll try to take a closer look and make a request. There is still, for sure, some work to do on the input side.
 
Last edited by cpasjuste,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
@cpasjuste: I'll just rewrote the post above. On the second try - both controllers stayed in 1 player mode after being detatched, which imho is optimal.

I could then go into the Nintendo controller menu, set them to 2P tiny controllers mode, reenter pFBA - and play any rom in 2P mode. (2P start worked as well).

I'll investigate taking off one, before the other - and will try to replicate my first experience.

Auto switching to "2p tiny controllers mode" is suboptimal imho - as it breaks too many other usecases (taking off the controllers, to put them into the handle - still wanting to play 1P - f.e.)- there should be a toggle to make them "try to go into 2P tiny mode", or you should have to do it via nintendos controller settings (which already works right now). Imho.

edit: Reattaching > single controller worked btw, I think in both instances.
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Could reproduce all behaviors. :)

- 2P start (or maybe all 2P inputs?) not working only happens when you take off the right controller first, then the left. Its easily "solved" by reattaching them, and then taking off the left controller first. Both then register as 2P tiny controllers. 2P start then works.

- Default IS "2P tiny controllers mode" after detaching in pFBA. Which isnt as "bad" as I first thought, because as soon as you go back to the home menu, or the HBL menu, default for detaching becomes "1P mode, seperated controllers", so if you want one usecase, you detach before entering pFBA, if you want the other, you detach after entering pFBA, thats actually quite convenient. I'd say forget what I said above and leave it that way. :)

- If you go into standby "in game" in pFBA (not in menu, in game), and then resume the game (tripple tapping the lock screen away), detaching the controllers will have them stay in 1P mode - breaking "normal" pFBA behavior. This probably qualifies as a bug. But I see how it could be hellish to fix.. ;) This is also the cause, why I got a different behavior on my second try. :)

Everything works - maybe some kinks to iron out - but, man - pFBA just became a heck more attractive.. :) Think of all the brawlers you could play in 2P tiny controllers mode... :) edit: With proper sound. :)
 
Last edited by notimp,
  • Like
Reactions: cpasjuste

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
43
XP
4,236
Country
France
He he, I didn't even know we can switch controller modes from the Nintendo menus :)
I think one of the missing things is a way to identify controllers in libnx so I can know if/when/which button to swap or enable tiny mode only on detached joycons. Currently it seems I can only know if they are "railed" or not.
 
Last edited by cpasjuste,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Found another issue - this one is more meh... pressing... :/ ;)

When you standby/resume (from a game, but maybe also from the pFBA menu - not sure), for the entire session, regardless if you exit pFBA and reenter it, or not - when you detach controllers to go into "2P tiny controller mode" - the D-Pad inputs are switched by 90°. Buttons are switched as well.

As far as I could tell, this one is not easily fixable - you have to restart the switch and start over. Reattatching in this case still works fine to get to 1P mode, and controls in 1P mode are as they are supposed to be, so at least restarting is not an issue.. :)

Ill try to give you a step by step to reproduce. edit soon to follow.



edit: Yes - this is the "extended version" of the standby bug mentioned above. :)

Standby bug triggers from standby/resume in pFBA menu - or game (not only game, as indicated above).

- If you standby/resume (f.e. directly after launching the emu) in pFBA, then detach controllers, both controllers will stay in 1P mode, and not switch to 2P tiny controllers as the default pFBA behavior would be.

- If you then attach controllers, exit pFBA - relaunch pFBA, then detach the controllers again - the controllers will go into "2P tiny controllers" mode, but input directions will be switched by 90° (/wrong for 2P tiny controllers mode. Buttons afair are switched around as well).

Current solution is to restart the Switch.
 
Last edited by notimp,

Kerbangman

Well-Known Member
Member
Joined
Sep 19, 2016
Messages
525
Trophies
0
Age
61
XP
689
Country
@cpasjuste
Thanks for upping the number of pointers.

FBA_CONFIG :
{
VERSION = 154;
ROMS_PATHS :
{
ROMS_PATH0 = "/switch/pfba/roms/";
ROMS_PATH1 = "";
ROMS_PATH2 = "";
ROMS_PATH3 = "";
ROMS_PATH4 = "";
ROMS_PATH5 = "";
ROMS_PATH6 = "";
ROMS_PATH7 = "";
ROMS_PATH8 = "";
ROMS_PATH9 = "";
ROMS_PATH10 = "";
ROMS_PATH11 = "/switch/pfba/msx/";
ROMS_PATH12 = "/switch/pfba/sms/";
ROMS_PATH13 = "/switch/pfba/gamegear/";
ROMS_PATH14 = "/switch/pfba/sg1000/";
ROMS_PATH15 = "/switch/pfba/coleco/";
ROMS_PATH16 = "/switch/pfba/tg16/";
ROMS_PATH17 = "/switch/pfba/sgx/";
ROMS_PATH18 = "/switch/pfba/pce/";
ROMS_PATH19 = "/switch/pfba/megadriv/";
};
MAIN :
{
SHOW_ALL = 1;
SHOW_CLONES = 0;
SHOW_HARDWARE = 0;
FULLSCREEN = 1;
};
SKIN :
{
SKIN_FONT_SIZE = 20;
};
EMULATION :
{
SCALING = 3;
FILTER = 1;
EFFECT = 0;
ROTATION = 0;
SHOW_FPS = 0;
FRAMESKIP = 0;
NEOBIOS = 0;
AUDIO = 1;
};
JOYPAD :
{
JOY_UP = 13;
JOY_DOWN = 15;
JOY_LEFT = 12;
JOY_RIGHT = 14;
JOY_FIRE1 = 0;
JOY_FIRE2 = 1;
JOY_FIRE3 = 2;
JOY_FIRE4 = 3;
JOY_FIRE5 = 6;
JOY_FIRE6 = 7;
JOY_COIN1 = 11;
JOY_START1 = 10;
JOY_AXIS_LX = 0;
JOY_AXIS_LY = 1;
JOY_AXIS_RX = 2;
JOY_AXIS_RY = 3;
JOY_DEADZONE = 3;
};
};
 
Last edited by Kerbangman, , Reason: Found I missed out the / :)
  • Like
Reactions: Deleted User

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Genesis emulation feels a little more sluggish now, sad thing is, that this is purely subjective. :)
Did you cap framerates or apply frameskip?

Is there a FPS overlay that could be enabled?

I'll see if I can get this to show up on a video comparison. And again - it still could be just me.. ;)

edit: Looked at the audio track and it matched up pretty well. Could it be joystick sensitivity? :)
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Audio analysis over three minutes shows, that 1.54 and 1.52 run the genesis game in question at the same speed, but dang nabbit, game still feels different in both versions. For peace of mind, did you change something in between, that could explain that experience? (Input lag, joystick sensitivity in game, caping game at the same framerate as audio (...))

edit: Could it be this:

+ gfxFlushBuffers();
+ gfxSwapBuffers();
+ gfxWaitForVsync();

;)
 
Last edited by notimp,

Kerbangman

Well-Known Member
Member
Joined
Sep 19, 2016
Messages
525
Trophies
0
Age
61
XP
689
Country
Audio analysis over three minutes shows, that 1.54 and 1.52 run the genesis game in question at the same speed, but dang nabbit, game still feels different in both versions. For peace of mind, did you change something in between, that could explain that experience? (Input lag, joystick sensitivity in game, caping game at the same framerate as audio (...))

edit: Could it be this:

+ gfxFlushBuffers();
+ gfxSwapBuffers();
+ gfxWaitForVsync();

;)

Do you think the four player option has cut the joystick polling down?
 

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
43
XP
4,236
Country
France
Audio analysis over three minutes shows, that 1.54 and 1.52 run the genesis game in question at the same speed, but dang nabbit, game still feels different in both versions. For peace of mind, did you change something in between, that could explain that experience? (Input lag, joystick sensitivity in game, caping game at the same framerate as audio (...))

edit: Could it be this:

+ gfxFlushBuffers();
+ gfxSwapBuffers();
+ gfxWaitForVsync();

;)
I don't think it has something to do with vsync, as it was already used previously. I think it's possible that before i get correct audio it was not syncing correctly and so was running a little too fast. I'll take a closer look very soon as i also find it "different", but was not sure.
 
  • Like
Reactions: Masterwin

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
43
XP
4,236
Country
France
I'm not sure what/if there is a problem. Took a look at fps/delta time and it's indeed running at a constant 60 fps. I removed the crappy scanline code which could maybe add a micro delay but well.. I'll do more testing.

--------------------- MERGED ---------------------------

@notimp , i did upload a test build here : http://files.mydedibox.fr/files/Dev/nx/pfba-1.54-1_switch.zip
In this build i did deactivate some checks to wait/synchronize audio. It would need to be tested more, i'm not sure it improve rendering.. possible. Also need to be tested on a maximum number of roms to check if audio is not altered.

Edit: seems faster/smoother, need to have some other reports and see if there is no audio problem with that.
 
Last edited by cpasjuste,
  • Like
Reactions: Masterwin

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,782
Trophies
1
XP
4,405
Country
Laos
Ran the test build - here is the subjective assessment. It feels better than before (judging from textboxes (clicking them away), it has a little less input lag than 1.54 (release build)), but it still feels less good that 1.52.

On the "feels" scale, so highly subjective - and would probably not survive a double blind test.

I've uploaded a test save which I used to assess the build.

http://www98.zippyshare.com/v/kPkhaFwz/file.html

Its for md_shadowrn - shortly before the end of the game, so if you dont want to spoil yourself the game, I guess - dont use it... ;)

Here are the responsiveness tests:

1. from the save location, press d/r (down/right - diagonally) on the joystick, and let the characters move (fast) through the area, while the entire area is scrolling. Diagonal movement speed on the characters is a little faster than non diagonal - try to stay diagonal. if you hit a obstical switch diagonal direction. Switching direction with the analog stick is also a little test on how instant the on screen characters will switch in their little walking animations (walking direction).

Subjective assessment - there are moments that feel like there is a slowdown in the screen scrolling, compaired to 1.52

2. from the save location, enter the door near by (left). After a little dialogue, this teleports you to the last short mission of the game. On the dialogue boxes you can check input lag, they are supposed to switch to the next one instantly. After the teleport, move up - and shoot at the enemies that spawn (A button to shoot, B button to switch target), on reaction. This feels extremely off on the 1.54 release build, a little less so on the test build, and "best" on 1.52.

Continue moving up and through the open doorframe - and you will trigger dialogue and the boss fight. Dialogue boxes again can be used to assess input lag. To get through the boss fight mashing A should be sufficient. :) - after he is done, more dialogue , and a video sequence - with more dialogue. Both feel off on 1.54, and a little better on 1.54-1, but still better on 1.52. :)

What made me realize that there was a difference, was the scrolling speed of (1.) while diagonal walking. I've played the game for about 30 hours, and the instant I loaded it up in 1.54 (release build), it felt wrong.

Also - I did about 20 test runs, through all the builds - to assess what I've just written. So at least this isnt just "first impression" stuff. ;) edit: Renaming the test build to 1.54-1 helps, btw. ;)

edit: Also test build crashes more often (during or shortly after startup). Just had a crash after the "scanning roms screen. Thats a first. :)
 
Last edited by notimp,

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,615
Trophies
1
Age
43
XP
5,931
Country
Germany
switch: add 4 player support. When joycons are not docked (multiplayer), use "L STICK" button press for start or coin instead (+) or (-)). All players share the same button configuration for now.
Hi cpasjuste! First of all, a big big thank you for this great piece of software!
I started hacking my Switch yesterday and pFBA - among all other emulators/libretro-cores - is just running very stable and very good. Was a great feeling to enjoy some Street Fighter III niceness on my Switch.
I had to change the button mapping to be the same as for native Street Fighter games on Nintendo platforms (like SF II on SNES or USF II on Switch).
If anyone's interested by the way, this is the mapping needed to have the default Nintendo console Street Fighter mapping:
Code:
JOY FIRE1: Y
JOY FIRE2: X
JOY FIRE3: L
JOY FIRE4: B
JOY FIRE5: A
JOY FIRE6: R
As you know you can do this game wise by highlighting the game in the main menu and press '-'. However if you mess things up, here's the pFBA default mapping again:
Code:
JOY FIRE1: A
JOY FIRE2: B
JOY FIRE3: X
JOY FIRE4: Y
JOY FIRE5: L
JOY FIRE6: R

But now to my problem ...
I've tried using pFBA with this sweet little guy here by 8Bitdo:
61RopK5sKGL._SY355_.jpg

This is 8Bitdo's normal SNES pad which has the exact same buttons as the good old original SNES pads and is not to be confused with 8Bitdo's PRO variant which has analog sticks as can be seen here.

It registers itself as a Nintendo Switch Pro Controller and I was able to enter the hbmenu, pFBA and even SF III with it.
However now comes the issue: I can press SELECT to insert coins but pressing START does nothing. I'm not able to play the game. I don't know whether the pad might be detected as one JoyCon by pFBA and waits for the analog stick (which isn't there) to be pressed but it would be nice if you could implement a fix so I can use this controller.
I have two of them and many of my friends have them too so it would be freakin' awesome to play some retro games with them on our beloved Switch with pFBA. :)
 
  • Like
Reactions: cpasjuste
General chit-chat
Help Users
  • No one is chatting at the moment.
    Skelletonike @ Skelletonike: 1H left, such a slow week.