Hacking cIOSX rev21: controller lag [FIXED!]

Yuan

Well-Known Member
Member
Joined
Oct 1, 2007
Messages
1,291
Trophies
0
XP
371
Country
Brazil
kamiro04 said:
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?

Smash Bros Brawl

- Pause loop with rev20/21 EHCI

I will test it soon too.

EDIT: Fixed, cooking mama is lagless too!

Thanks a lot davebaol!
 

netspy

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2010
Messages
92
Trophies
1
XP
269
Country
United States
@nando: that's weird, I've never seen such a thing before. Maybe you could try to install ModMii again (in a standard path like C:\ModMii) ?

@davebaol: Thanks a lot ! That's really great !
I added your solution on the 1st page of this topic (I didn't have the time to test it yet, but from what I read it seems to be working fine).
Can you please tell us what the bug was and how you fixed it (i.e. what change you made in the source code) ?

Moreover, can someone get in touch with Waninkoko to tell him about the fix davebaol has found ? It could be useful if Waninkoko ever release another rev in a few months, he could include the fix.
 

nando

Well-Known Member
Member
Joined
Jan 1, 2008
Messages
2,263
Trophies
0
Website
Visit site
XP
1,023
Country
United States
alright, i need help. do i really need the beta to use the fixed EHCI module? or can i do it with the regular modmii. and we are replacing the EHCI file inside modmii/Modules/W21Modules?


i'm asking because i'm having a hell of a time downloading the beta. the link takes me to the download page but there are 6 unlabeled download buttons and i can't seem to select modmii.


i don't think i'll be able to get this working either way since i keep getting invalid files.
 

sock99

Well-Known Member
Newcomer
Joined
Feb 3, 2010
Messages
45
Trophies
0
Website
Visit site
XP
52
Country
France
nando said:
i'm asking because i'm having a hell of a time downloading the beta. the link takes me to the download page but there are 6 unlabeled download buttons and i can't seem to select modmii.

Source:
Modmii beta direct link removed by me - job done
 

nando

Well-Known Member
Member
Joined
Jan 1, 2008
Messages
2,263
Trophies
0
Website
Visit site
XP
1,023
Country
United States
thanks sock99

i'm still confused as to which EHCI file i'm replacing. i got modmii running, and i can make the wads, but modmii tells me i have a bad file.
 

netspy

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2010
Messages
92
Trophies
1
XP
269
Country
United States
It's normal that ModMii tells you the file is invalid, since it's a modified version and ModMii is not expecting such a resulting file. Don't worry about that.
 

davebaol

Well-Known Member
Member
Joined
Sep 3, 2010
Messages
912
Trophies
0
XP
192
Country
Italy
For building cIOS[]-v21 with fixed lag where is the slot and is the base follow this steps:[*]Download and unzip ModMii4.4.5B-BETA [*]Replace "modules\W21Modules\EHCI.app" with mine. [*]Launch ModMii4.4.5B-BETA[*]Choose download page 4[*]Select the slot and the base you want, for example "2502156 = cIOS249[56]-v21" and/or "2502157 = cIOS250[57]-v21"
NOTE 1: You can also choose base 37 or 38.
NOTE 2: Don't select the one with [EHCI-v19] appended.[*]Enter D to download the wad[*]Ignore the warning message
QUOTE said:
Checking entries in COPY_TO_SD\Download_Log.md5
COPY_TO_SD\WAD\cIOS[]-v21.wad: Invalid
Results: 1 files processed, 0 good files, 1 bad files.
It's absolutely normal since the EHCI module has been replaced so MD5 check fails.[*]Use MultiMod Manager to install the wad(s)
NOTE: despite the file name it's a real rev21 without lag[*]Enjoy it
cool.gif

CAUTION:
After replacing EHCI.app in modules folder ModMii4.4.5B-BETA will actually generate all rev21-LagFix cios with my EHCI module.
If you want to download official rev21 wads you need to restore the original EHCI.app


netspy said:
@davebaol: Thanks a lot ! That's really great !
I added your solution on the 1st page of this topic (I didn't have the time to test it yet, but from what I read it seems to be working fine).
Can you please tell us what the bug was and how you fixed it (i.e. what change you made in the source code) ?
I've fixed the wrong message management in timer.c by making a punctual rollback to rev19, just a few lines of code.
All the other sources committed by Wanikoko till 2010-12-25 (last EHCI module included in rev21) are untouched.

QUOTE(netspy @ Jan 26 2011, 08:05 AM)
Moreover, can someone get in touch with Waninkoko to tell him about the fix davebaol has found ? It could be useful if Waninkoko ever release another rev in a few months, he could include the fix.
Yeah of course, if somebody tell me via pm how to contact Waninkoko I'll be glad to give him the fixed source so he can commit the changes.
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
davebaol said:
Yeah of course, if somebody tell me via pm how to contact Waninkoko I'll be glad to give him the fixed source so he can commit the changes.
Why not just post the changes here, since you're already obligated to by the GPL.
 

churkus

Member
Newcomer
Joined
May 27, 2006
Messages
21
Trophies
0
XP
210
Country
If this lag issue is caused by HD spindown, you can take Seagate Expansion 500gb off this list, as it can be set to never spindown via the seagate manager software. if this has already been done, ignore!
 

jesquinas

Well-Known Member
Member
Joined
Apr 14, 2010
Messages
117
Trophies
0
XP
44
Country
I dont know where is the screen where you choose a save file in "Wario Land: Shake It!" .Can you tell me where is it for testing the lag issues in my hard disk?

Thanks.
 

davebaol

Well-Known Member
Member
Joined
Sep 3, 2010
Messages
912
Trophies
0
XP
192
Country
Italy
BBogey said:
daveabol, nice you fixed it!
Could you share the source or diff.

If you like to use the modified elf with other bases, just replace elf in rev21 folder, then build rev21 wads.
See this x4mers post.
Yeah I know. As you can see I've already built and tested base 57 too
davebaol said:
  • Shaun White Skateboarding works perfectly on base 56 and 57 (previous cIOS249[56]-v21[EHCI-v19] doesn't support that game).
Also you can easily change the slot with ShowMiiWads.
wink2.gif


tueidj said:
davebaol said:
Yeah of course, if somebody tell me via pm how to contact Waninkoko I'll be glad to give him the fixed source so he can commit the changes.
Why not just post the changes here, since you're already obligated to by the GPL.
Because right now I'm at work and the source is at home on my pc.
Please be patient, later I'll post the changes here.
happy.gif


QUOTE(netspy @ Jan 26 2011, 02:00 PM)
Thanks Churkus, but I set the spindown delay to 'Never' before testing, and the lag was there.
In fact the lag issue is spindown independent.
 

davebaol

Well-Known Member
Member
Joined
Sep 3, 2010
Messages
912
Trophies
0
XP
192
Country
Italy
Ok guys, sorry for double posting.
blush.gif


Since I can't post the changes right now and also a few people asked me via pm how I actually fixed the lag issue I'm gonna try to explain you what happened in EHCI module of rev 20 and 21.

Let's start looking at the diff in timer.c between rev19 and rev20 (first time lag issue appeared):
https://github.com/waninkoko/ehci-module/co...922c9837#diff-5

As you can see in rev20 the messages 0x555 and 0x666 have been unified in a single message 0x666.
Also the send/receive sequence has been changed by removing the send_message(0x555) above the cycle and the reveive_message() below the cycle.
And the start time of the timer has been set to 0 instead of 1 million.

Not sure, 'cause the issue is really subtle, but I suspect the timing logic in rev20/21 triggers 2 watchdogs in rapid sequence maybe even overlapped, so generating the tedious lag for certain drives.

If someone else has a better explanation I'll be glad to read it.
happy.gif


That's all for the time being
biggrin.gif
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
Thanks davebaol, now everything works perfect, no lags at all! Do you know why waninkokos module is 14,5kb and your compiled version 14,8kb? I compiled the official module and it's also 14,8kb, I don't understand why.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
    Karma177 @ Karma177: do y'all think having an sd card that has a write speed of 700kb/s is a bad idea? trying to...