cIOSX rev21: controller lag [FIXED!]

Discussion in 'Wii - Hacking' started by netspy, Nov 2, 2010.

Nov 2, 2010
  1. BBogey

    Newcomer BBogey Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Country:
    Finland
    Because it's still buggy, many games are not working and it's slow.
     


  2. justmike

    Member justmike GBAtemp Fan

    Joined:
    Sep 15, 2008
    Messages:
    329
    Country:
    Australia
    Not worth it then.
     
  3. BBogey

    Newcomer BBogey Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Country:
    Finland
    Actually I haven't tested the compatability, what I tried was using base 58 in 250 and non of games was not working what I tested, but apparently it needs to be installed to 249 to work. In rev21 released thread there is some discussion about it.
     
  4. davebaol

    Member davebaol GBAtemp Advanced Fan

    Joined:
    Sep 3, 2010
    Messages:
    913
    Country:
    Italy
    @BBogey and every coder out there
    Can you please investigate about difference in loop.c between rev19 (no lag) and rev20 (first rev with lag)?

    I'm pretty sure ehci module in rev20 has been committed in date 2010-07-31 while ehci in rev19 is the older one committed in date 2010-02-27.
    Here is ehci module history: https://github.com/waninkoko/ehci-module/commits/master/

    Main difference in rev20 is the addition of es.c source which define a new function for retrieving title_id.
    This function is invoked by loop.c in the main loop when opening the device.

    Do you think this function call can cause the infamous lag?


    EDIT:
    I was a good coder 10 years ago, so I can inspect code and speculate on it but actually I'm not able to compile source for Wii. [​IMG]
     
  5. smf

    Member smf GBAtemp Advanced Fan

    Joined:
    Feb 23, 2009
    Messages:
    868
    Country:
    United Kingdom
    Western digital hard drives are well known for parking after something stupid like 2 seconds. I keep meaning to find the software that allows to change it, my laptop just sits there ticking as it stops and starts the hard drive constantly.
     
  6. BBogey

    Newcomer BBogey Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Country:
    Finland
    I tried to comment out the whole title id retrieval, but lag was still there.

    There is some thread settings and priority changed in start.s, I reverted the changes and lag disappears. But then loading times increases a lot.
    I also tried to revert just thread priority and the lag issue was solved but slow loading was still there.
     
  7. davebaol

    Member davebaol GBAtemp Advanced Fan

    Joined:
    Sep 3, 2010
    Messages:
    913
    Country:
    Italy
    Interesting.... after reverting just thread priority are loading times slower than original rev19?
     
  8. BBogey

    Newcomer BBogey Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Country:
    Finland
    Yes really slow, maybe about 5-10 times slower. I didn't measure it.
     
  9. x4mer

    Newcomer x4mer Member

    Joined:
    Apr 17, 2010
    Messages:
    31
    Country:
    Canada
    I put it in the rev21 modules folder, and built 249[56]rev21 & 250[57]rev21. At first it appeared to have fixed the problem, and my drive no longer blinked at all while idle. My drive doesn't go to sleep, so this seemed the perfect solution.

    However, if you sit on the Wario Shake It save select screen, there is still a problem. Once drive activity stops, wait at least 10 secs., and then hit 1 to go back to the title screen. When the black screen comes up on the way back to the title screen, the Wiimote communication error message box still shows up. It doesn't constantly blink, like the standard rev21, but it will show up as you exit, only if you wait more than 10 secs. There must still be some bad code in rev21, that's based around that timer interval.

    Thanks for posting the compiled module.
     
  10. netspy
    OP

    Newcomer netspy Advanced Member

    Joined:
    Sep 8, 2010
    Messages:
    92
    Country:
    United States
    Thanks BBogey, nice work !
    I can confirm what x4mer just said before. With your modified EHCI rev21, the controller lag occurs when you come back to the Warioland Shake It menu after waiting for a little while. With EHCI rev19, the lag seems to have disappeared completely.
     
  11. BBogey

    Newcomer BBogey Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Country:
    Finland
    It might be a different issue, so not related to hdd activity.

    Here's the changes between 2010-02-27 and 2010-07-31 commits.
    https://github.com/waninkoko/ehci-module/co...fbca327922c9837
    https://github.com/waninkoko/ehci-module/co...e0156881a1cd758

    So there are timer fixes and addition of the get titles es.c, es.h.

    Major addition in the loop.c was this get titles part. What that does actually do? I can comment it out and compile it, netspy or x4mer please privmsg if you like to test it.
     
  12. netspy
    OP

    Newcomer netspy Advanced Member

    Joined:
    Sep 8, 2010
    Messages:
    92
    Country:
    United States
    @Kryptical : Thanks, added.

    @BBogey : I am not sure I'll have the time to do much testing right now, but if it's OK for you, you can pm me the link, I can at least just quickly retry the Warioland : Shake It test.

    EDIT : BBogey, I sent you a PM. It seems to me the GetTitleID part is not the cause for the controller lag.
     
  13. justmike

    Member justmike GBAtemp Fan

    Joined:
    Sep 15, 2008
    Messages:
    329
    Country:
    Australia
    I might as well install cIOS249[56]-v21[EHCI-v19].wad then.

    Is it safe to do so, any problems encounted thus far or is it good to go?
     
  14. Lacius

    Member Lacius GBAtemp Psycho!

    Joined:
    May 11, 2008
    Messages:
    4,390
    Country:
    United States
    I have had nothing but positive results.
     
  15. davebaol

    Member davebaol GBAtemp Advanced Fan

    Joined:
    Sep 3, 2010
    Messages:
    913
    Country:
    Italy
    AFAIK only drawback is Shaun White Skateboarding doesn't work.
    For this game you MUST have rev20b or rev21 with base 56 or 57.
    Also hermes cios with base 57 does't work.
     
  16. justmike

    Member justmike GBAtemp Fan

    Joined:
    Sep 15, 2008
    Messages:
    329
    Country:
    Australia
    Ah, thanks for the responses.

    If Shaun White Skateboarding is the only game, I think I can live with that.
     
  17. kamiro04

    Newcomer kamiro04 Advanced Member

    Joined:
    Dec 3, 2010
    Messages:
    64
    Country:
    Argentina
    Hi Xflak, thanks for your great work!
    I was cheking the CFG USB Loader post (http://gbatemp.net/t147638-configurable-usb-loader?&st=13935) and it seems that they found a great combination with:

    cIOS249[57]-v21[EHCI-v19] for most games.
    cIOS250[56]-v21[EHCI-v19] for instrument games, Guitar Hero, Rock Band, WeSing, USing....

    Can you add this build options to your beta?
     
  18. Kryptical

    Member Kryptical GBAtemp Fan

    Joined:
    Jun 10, 2010
    Messages:
    312
    Location:
    Canada
    Country:
    Canada
    Black Ops seem to lag for me when the hard drive "thinks". Is it because my cIOS250[57] has EHCI v21? If it is then I would like to make a request to add cIOS250[57]-v21[EHCI-v19] to ModMii too.
     
  19. davebaol

    Member davebaol GBAtemp Advanced Fan

    Joined:
    Sep 3, 2010
    Messages:
    913
    Country:
    Italy
    Ok guys, after sleeping 10 years the old coder in me is risen again. [​IMG]

    I've fixed the lag issue in ehci module of rev21.
    It was a stupid bug inside the timer used by the watchdog.

    Here is the final result:
    • the lag is completely gone
    • the watchdog is alive and kicking (contrary to BBogey's solution)
    • Shaun White Skateboarding works perfectly on base 56 and 57 (previous cIOS249[56]-v21[EHCI-v19] doesn't support that game).
    I've heavily tested this solution with 4 different drives affected by lag issue, one of them (a Western Digital Elements SE - 2,5" - 1TB) manifesting severe symptoms, a 10 seconds cycle with the following base sequence:
    • 1 sec. LAG
    • 1 sec. NO LAG
    • 1 sec. LAG
    • 7 secs. NO LAG
    Now all my drives run fluently. [​IMG]

    Here is a compiled version of the fixed ehci module ready to build the cios with ModMii4.4.5B-BETA (just replace the module)
    http://www.mediafire.com/?h4izwbtbfazj5je


    Hope you like it [​IMG]

    EDIT:

    Instructions for building cIOS249[56]-v21 with fixed lag:[*]Download and unzip ModMii4.4.5B-BETA [*]Replace "modules\W19Modules\EHCI.app" with mine (see above)[*]Launch ModMii4.4.5B-BETA[*]Choose download page 4[*]Select 249BETA[*]Enter D to download the wad[*]Ignore the warning message
    It's absolutely normal since the EHCI module has been replaced so MD5 check fails.[*]Use MultiMod Manager to install cIOS249[56]-v21[EHCI-v19].wad
    NOTE: despite the file name it's a real rev21 without lag[*]Enjoy it [​IMG]
    CAUTION:
    After replacing EHCI.app in modules folder ModMii4.4.5B-BETA will actually generate all rev19 cios with mine EHCI module.
    If you want to download real rev19 wads you need to restore the original EHCI.app or else use standard ModMii4.4.5
     
  20. kamiro04

    Newcomer kamiro04 Advanced Member

    Joined:
    Dec 3, 2010
    Messages:
    64
    Country:
    Argentina
    Wow! thanks davebaol, I'll test it now!
    Do you remember of another problematic game you don't own that could be used to test it?

    EDIT: Tested and all working, I was having problems with Worms: Battle Islands - now with base 56 works great
    Just reposted this in the CFG Loader discussion so anybody with problems can test it and report back
    Thanks again!!!
     

Share This Page