Homebrew RetroArch - A new multi-system emulator

Status
Not open for further replies.

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
.

And I insist it is not our input drivers. We aren't doing anything out of the ordinary - and we are using the latest libogc version. If there is a bug, it has to be in either wiiuse or libogc.

I am not sure if this is the cause of input lag (probably not) but i noticed you were doing some stuff that I would consider as unoptimized code

the code i am looking at is here:

https://github.com/libretro/RetroArch/blob/master/gx/gx_input.c

Everytime inputs are polled (each 4 wii and each 4 gamecube controller ports):

(1) you are calling WPAD_Probe (to see what kind of expansion is connected), for every wiimotes: this is quite inefficient to do this every frame as it involves doing the expansion detection handshake again every time, an obvious optimization would be to do this only once on startup then save the controller type

(2) you are calling SI_GetType (to see if a gamecube controller is connected) on each gamecube ports: this is very uncommon to do that so i am not sure why you picked that method. What is sure is that it is once again not very optimized to call this every frame, especially since the function PAD_ScanPads already return a bitmask to indicate which ports are connected.


Like I said initially, it's very unlikely this could have so much noticeable effect as input lag but that's just two things that popped to my eyes when looking at your code...

Now I agree libwiiuse in libogc has some minor flaws (most notable one being poor support of 3rd part controller) but i never noticed any serious input lag in homebrew or people reporting some versions to be more laggy than others. This is still true for stand-alone emus, which are, for most of them, compiled with the latest libogc as well.


EDIT: i think i also spotted a bug in your polling function with the way you handle the use of wiimote+nunchuk combination. I can be wrong but it seems to me if a nunchuk is connected, any direction pressed on wiimote will be seen as two buttons being pressed (example: if up is being pressed, up and left will be registered by retroarch)
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I am not sure if this is the cause of input lag (probably not) but i noticed you were doing some stuff that I would consider as unoptimized code

the code i am looking at is here:

https://github.com/libretro/RetroArch/blob/master/gx/gx_input.c

Everytime inputs are polled (each 4 wii and each 4 gamecube controller ports):

(1) you are calling WPAD_Probe (to see what kind of expansion is connected), for every wiimotes: this is quite inefficient to do this every frame as it involves doing the expansion detection handshake again every time, an obvious optimization would be to do this only once on startup then save the controller type

(2) you are calling SI_GetType (to see if a gamecube controller is connected) on each gamecube ports: this is very uncommon to do that so i am not sure why you picked that method. What is sure is that it is once again not very optimized to call this every frame, especially since the function PAD_ScanPads already return a bitmask to indicate which ports are connected.


Like I said initially, it's very unlikely this could have so much noticeable effect as input lag but that's just two things that popped to my eyes when looking at your code...

Now I agree libwiiuse in libogc has some minor flaws (most notable one being poor support of 3rd part controller) but i never noticed any serious input lag in homebrew or people reporting some versions to be more laggy than others. This is still true for stand-alone emus, which are, for most of them, compiled with the latest libogc as well.


EDIT: i think i also spotted a bug in your polling function with the way you handle the use of wiimote+nunchuk combination. I can be wrong but it seems to me if a nunchuk is connected, any direction pressed on wiimote will be seen as two buttons being pressed (example: if up is being pressed, up and left will be registered by retroarch)


Is this something that could eventually be fixed in the near future?
 
  • Like
Reactions: Hielkenator

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States

mightymuffy

fatbaldpieeater
Member
Joined
Nov 6, 2002
Messages
1,983
Trophies
3
Age
48
Location
Land o't pies
XP
3,277
Country
United Kingdom
^^^ - (Oh fukkin hell fire don't start all that off again you two!) I'm sure they already know about it, but if there's the slightest chance they don't then you 2 should be the LAST ones to report it. Whether the dev is a bit too sensitive or not is beside the point here, after the last episode you should be glad the Wii port is still being worked on, don't bring it all back up again for the sake of some resolution mode that few of us actually care about - you can still play your roms on it can you not?? ;)

Anyway.. did a bit more testing with the NES cores, and yeah I'm sticking with nestopia too. Still can't see the actual point of adding quicknes in (unless maybe fceu/nestopia weren't full speed enough on maybe the Xbox1/GC/or certain mobile phones?), but hey, it's another option for us.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
^^^ - (Oh fukkin hell fire don't start all that off again you two!) I'm sure they already know about it, but if there's the slightest chance they don't then you 2 should be the LAST ones to report it. Whether the dev is a bit too sensitive or not is beside the point here, after the last episode you should be glad the Wii port is still being worked on, don't bring it all back up again for the sake of some resolution mode that few of us actually care about - you can still play your roms on it can you not?? ;)

Anyway.. did a bit more testing with the NES cores, and yeah I'm sticking with nestopia too. Still can't see the actual point of adding quicknes in (unless maybe fceu/nestopia weren't full speed enough on maybe the Xbox1/GC/or certain mobile phones?), but hey, it's another option for us.


Nestopia is indeed awesome, QuickNES is unnecessary IMHO not sure why it's there but whatevs :D
 
  • Like
Reactions: mightymuffy

mightymuffy

fatbaldpieeater
Member
Joined
Nov 6, 2002
Messages
1,983
Trophies
3
Age
48
Location
Land o't pies
XP
3,277
Country
United Kingdom
Nestopia is indeed awesome, QuickNES is unnecessary IMHO not sure why it's there but whatevs :D

Maybe it supports a couple of mappers on some more obscure games that the other 2 don't.... but like you say whatevs - pretty sure all 3 cores run great, but nestopia wins it for me too. (I'm using Wiiflow anyway - sorting out NES games to pick which runs xx game best sounded a ballache, thankfully I don't need to do that!)
 
  • Like
Reactions: the_randomizer

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
^^^ - (Oh fukkin hell fire don't start all that off again you two!) I'm sure they already know about it, but if there's the slightest chance they don't then you 2 should be the LAST ones to report it. Whether the dev is a bit too sensitive or not is beside the point here, after the last episode you should be glad the Wii port is still being worked on, don't bring it all back up again for the sake of some resolution mode that few of us actually care about - you can still play your roms on it can you not?? ;)

Anyway.. did a bit more testing with the NES cores, and yeah I'm sticking with nestopia too. Still can't see the actual point of adding quicknes in (unless maybe fceu/nestopia weren't full speed enough on maybe the Xbox1/GC/or certain mobile phones?), but hey, it's another option for us.
When did honest user feedback become a war proposal?
Anyway I posted some of the issues on their suport forum.
I never mean any harm and I fully respect the devs of retroarch and the original devs of the l used emulators in the Wii build.
I rather see myself overpassionate.
 

Disorarara

Well-Known Member
Member
Joined
Sep 12, 2012
Messages
599
Trophies
1
Age
29
XP
1,181
Country
There is no overscan issue, use the custom resolution option to set the screen to the exact size you want and make sure to turn off scale integer.
 

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
There is no overscan issue, use the custom resolution option to set the screen to the exact size you want and make sure to turn off scale integer.
This is not what I mean.
If RA would display in proper 480p ( like any emu on Wii)
changing resolution is a VERY bad idea since on a proper CRT ot a SLG the image will garble and be full of artifacts.
YOU need proper 480p output to have this.
This has and always will be a problem with RA, the devs do not think it's a real problem.
To get full picture you could set the image to 448p ( or set it by hand witht he scaler ) for lcd tv's, but this will give different result depending on the brand of tv and it's upscale/downscale abilties. Case is it's not optimal especially with all those ratio and resolution differences in various FBA games.

RA is is not about authenticity and is more geared towards de LCD generation of users who do not give a shit about ratios and resolution and will settle with a 4:3 pacman game that is overscanned.FYI these generation of games cannot be fixed by simply setting the ratio by hand.
 

Disorarara

Well-Known Member
Member
Joined
Sep 12, 2012
Messages
599
Trophies
1
Age
29
XP
1,181
Country
This is not what I mean.
If RA would display in proper 480p ( like any emu on Wii)
changing resolution is a VERY bad idea since on a proper CRT ot a SLG the image will garble and be full of artifacts.
YOU need proper 480p output to have this.
This has and always will be a problem with RA, the devs do not think it's a real problem.
To get full picture you could set the image to 448p ( or set it by hand witht he scaler ) for lcd tv's, but this will give different result depending on the brand of tv and it's upscale/downscale abilties. Case is it's not optimal especially with all those ratio and resolution differences in various FBA games.

RA is is not about authenticity and is more geared towards de LCD generation of users who do not give a shit about ratios and resolution and will settle with a 4:3 pacman game that is overscanned.FYI these generation of games cannot be fixed by simply setting the ratio by hand.


Whoops, meant custom aspect ratio. I know what you're saying but I'm telling you that custom aspect ratio is essentially the same as the old overscan setting but with more control as you can control left and right too, just try it. And remember scale integer is OFF or else the screen will stretch too far or too narrow.
 
  • Like
Reactions: Hielkenator

LibretroRetroArc

Well-Known Member
Member
Joined
Aug 24, 2012
Messages
748
Trophies
0
XP
1,258
Country
Netherlands
This is not what I mean.
If RA would display in proper 480p ( like any emu on Wii)
changing resolution is a VERY bad idea since on a proper CRT ot a SLG the image will garble and be full of artifacts.
YOU need proper 480p output to have this.
This has and always will be a problem with RA, the devs do not think it's a real problem.
To get full picture you could set the image to 448p ( or set it by hand witht he scaler ) for lcd tv's, but this will give different result depending on the brand of tv and it's upscale/downscale abilties. Case is it's not optimal especially with all those ratio and resolution differences in various FBA games.

RA is is not about authenticity and is more geared towards de LCD generation of users who do not give a shit about ratios and resolution and will settle with a 4:3 pacman game that is overscanned.FYI these generation of games cannot be fixed by simply setting the ratio by hand.

Lulz, you really don't know what the hell you are talking about. Any engineer worth his salt would just be laughing at you right now.

Sorry but it's true.

If you were really this interested in 'accurate graphics', hell, then I say - throw your Wii in the trash right about now - since the GX scaler makes that pretty much a PHYSICAL IMPOSSIBILITY.
 
  • Like
Reactions: Hielkenator

LibretroRetroArc

Well-Known Member
Member
Joined
Aug 24, 2012
Messages
748
Trophies
0
XP
1,258
Country
Netherlands
Whoops, meant custom aspect ratio. I know what you're saying but I'm telling you that custom aspect ratio is essentially the same as the old overscan setting but with more control as you can control left and right too, just try it. And remember scale integer is OFF or else the screen will stretch too far or too narrow.

I think he just doesn't understand what you're saying.

Tried to tell him this many times over and over and he simply doesn't get it. He cannot look at the sourcecode either so there's no possible way for him to 'get' that this is essentially the same goddamn option, just given a different 'action label' inside a menu.

And then you wonder why my Wii activities are at an all-time low given an SDK that is known for erratic motion controls and 'know-it-alls' like this.
 
  • Like
Reactions: Hielkenator

LibretroRetroArc

Well-Known Member
Member
Joined
Aug 24, 2012
Messages
748
Trophies
0
XP
1,258
Country
Netherlands
I am not sure if this is the cause of input lag (probably not) but i noticed you were doing some stuff that I would consider as unoptimized code

the code i am looking at is here:

https://github.com/libretro/RetroArch/blob/master/gx/gx_input.c

Everytime inputs are polled (each 4 wii and each 4 gamecube controller ports):

(1) you are calling WPAD_Probe (to see what kind of expansion is connected), for every wiimotes: this is quite inefficient to do this every frame as it involves doing the expansion detection handshake again every time, an obvious optimization would be to do this only once on startup then save the controller type

(2) you are calling SI_GetType (to see if a gamecube controller is connected) on each gamecube ports: this is very uncommon to do that so i am not sure why you picked that method. What is sure is that it is once again not very optimized to call this every frame, especially since the function PAD_ScanPads already return a bitmask to indicate which ports are connected.


Like I said initially, it's very unlikely this could have so much noticeable effect as input lag but that's just two things that popped to my eyes when looking at your code...

Now I agree libwiiuse in libogc has some minor flaws (most notable one being poor support of 3rd part controller) but i never noticed any serious input lag in homebrew or people reporting some versions to be more laggy than others. This is still true for stand-alone emus, which are, for most of them, compiled with the latest libogc as well.


EDIT: i think i also spotted a bug in your polling function with the way you handle the use of wiimote+nunchuk combination. I can be wrong but it seems to me if a nunchuk is connected, any direction pressed on wiimote will be seen as two buttons being pressed (example: if up is being pressed, up and left will be registered by retroarch)

Tried all that and it didn't make any difference - the same issue is still there.

https://github.com/libretro/RetroArch/commit/749b9c0945a52fb80f7d0eab4a9add749bc4db3a

So if it's libogc - tell me which version I should be using then. At this point it is not really my fault this stuff is working incorrectly - and the right people should be bugged about it instead of me.
 
  • Like
Reactions: Hielkenator

jmckutchin

Well-Known Member
Member
Joined
Nov 26, 2008
Messages
222
Trophies
0
Location
Podunk, U.S.A
XP
314
Country
United States
I think he just doesn't understand what you're saying.

Tried to tell him this many times over and over and he simply doesn't get it. He cannot look at the sourcecode either so there's no possible way for him to 'get' that this is essentially the same goddamn option, just given a different 'action label' inside a menu.

And then you wonder why my Wii activities are on an all-time backburner given an SDK that is known for erratic motion controls and 'know-it-alls' like this.



I can understand an erratic SDK being an issue, but are you really going to let a few outspoken critics ruin it for the hundreds of grateful people that love and use RetroArch on Wii?

I know being a dev can be an (incredibly) thankless job sometimes, but there are a lot of people here who really appreciate your work. I hope your remember that next time you think about the Wii.
 
  • Like
Reactions: Hielkenator

LibretroRetroArc

Well-Known Member
Member
Joined
Aug 24, 2012
Messages
748
Trophies
0
XP
1,258
Country
Netherlands
I can understand an erratic SDK being an issue, but are you really going to let a few outspoken critics ruin it for the hundreds of grateful people that love and use RetroArch on Wii?

I know being a dev can be an (incredibly) thankless job sometimes, but there are a lot of people here who really appreciate your work. I hope your remember that next time you think about the Wii.

The fact nobody in here can even tell me something useful with regards to which SDK I SHOULD be using then if these supposed Wii controls can really be fixed makes me that much less motivated to really be spending a lot more time on this thing when there are much more important platforms like Android and iOS that people are using these days anyway and which require a lot of attention and work as well.

A homebrew scene is only as good as the guys at the top of the totem pole - if they can't feign to give a shit and make sure the development tools are catered to, then everything stops.
 
  • Like
Reactions: Hielkenator

CheatFreak47

Catgirl Expert
Member
Joined
Oct 11, 2011
Messages
1,574
Trophies
2
Age
28
Location
Michigan, USA
XP
2,774
Country
United States
Hey, could you add a thing that makes the text on files with longer file names scroll when highlighting them? I have many Sonic Genesis hacks, and many of the roms have the same file name up to a certain point, and the "guess what rom is the one you want" thing is wearing thin. If you don't know what I mean by a text rollover, look at how other Wii emulators handle longer file names.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: