How to fix the connection issue while running in AHBPROT mode

Discussion in 'Wii - Hacking' started by davebaol, Jul 12, 2011.

  1. XFlak

    XFlak Wiitired but still kicking

    Member
    9
    Sep 12, 2009
    Canada
    Ontario
    being clean is overrated... I like my code the way I like my women... dirty [​IMG]


    sorry for the offtopic-ness: let the ahbprot debacle continue [​IMG]
     
  2. Coto

    Coto -

    Member
    7
    Jun 4, 2010
    Chile
    Dave, keep up the good work. The attitude you have is the correct if you ask me.

    -

    The second code will enable AHBPROT at any cost.

    Is there any drawback from ahbprot bit being set to 1 everytime someone reload a dol from HBC?
     
  3. davebaol
    OP

    davebaol GBAtemp Advanced Fan

    Member
    2
    Sep 3, 2010
    Italy
    for ahbprot those codes are absolutely equivalent because in both cases set_ahbprot(1) is executed

    EDIT2:
    @lulwut
    I don't know Coto's development skill but looking at his question it seems that for him my code is more clear LOL
    So it's just a matter of taste. Let's stop this useless OT.
     
  4. Coto

    Coto -

    Member
    7
    Jun 4, 2010
    Chile
    Yep, but I mean if re-enabling ahbprot while every dol reload,
    (ie. HBC[IOS58]>>APP[ahbprot=1]>>HBC[IOS58]>>APP2[ahbprot=1])

    Could it cause any troubles?
     
  5. tueidj

    tueidj I R Expert

    Member
    7
    Jan 8, 2009
    But they're not equivalent for setting AHBPROT and DVD Video because you use 2 separate patches (one of which has either not been tested or doesn't work, ask Jacobeian), which is the reason why I posted it in the first place - one patch is better than two no matter how you look at it. Can we stop pointlessly arguing semantics now? I was explaining for my reasons for posting it, obviously I'm not going to be stupid enough to do anything like this again.
     
  6. davebaol
    OP

    davebaol GBAtemp Advanced Fan

    Member
    2
    Sep 3, 2010
    Italy
    @tueidj
    Man, I've already said thanks for your patch. Much appreciated, really.
    I just don't like the way you do.
    Be irritating all the times is not a good dowry.
    You should learn to be less haughty imho.

    @Coto
    No, afaik it can't cause any trouble other than those already mentioned but not yet reported.
     
  7. tueidj

    tueidj I R Expert

    Member
    7
    Jan 8, 2009
    If people just said "thanks" (or even nothing at all) instead of questioning my motives and second guessing my "attitude" all the time, maybe I wouldn't be.
     
  8. scooby74029

    scooby74029 "fake coder"

    Member
    5
    May 7, 2010
    United States
    oklahoma, USA
    here's my 2 cents on tueidj

    at first i thought he was the biggest ass muncher ever, but he thought i would be like all the rest and not try to comply with the rules of gpl(for sneekycompiler)

    we had our differences but i have talked to him several time since that and ask for help

    and he always tries to help out in anyway he can(he usually tries to stay behind the scenes)

    so i say please everyone layoff

    this guy has a great deal of knowledge (that i personally would love to learn)that will benefit everyone in the end

    if we all just work together

    just over a year ago i didnt even know anything about the wii and windows programming

    now i am writing my own stuff and modifying other's programs and tueidj has helped me several times with things i didnt understand

    he put in terms i could relate to which helped alot

    i would hate to see him leave the scene because everyone is always raggin on the guy

    like i said just my 2 cents!!!
     
    XFlak likes this.
  9. Jacobeian

    Jacobeian GBAtemp Advanced Maniac

    Member
    3
    May 15, 2008
    Cuba
    in that case, sorry for having misjudged your attitude

    and yes, your solution is indeed better since it patches the IOS routine earlier, directly faking a correct TMD

    now, to get back on topic:
    would it be possible, for a "cleaner" solution, to modify libogc so an app would reject callbacks it didn't initiate itself ?
    I've tried looking into the IPC code but so far could not find any solution. maybe using a random id generated when starting a new app, that would be returned by the callback ? or is the returned data format fixed by IOS ?
     
  10. lulwut

    lulwut GBAtemp Fan

    Member
    1
    Mar 19, 2010
    it already does that. thats why apps dont crash with a DSI anymore
    instead, they are still unstable as fuck cause shits not clean yet
     
  11. tueidj

    tueidj I R Expert

    Member
    7
    Jan 8, 2009
    The app can't do anything about it. IOS returns a response by plonking a return value in the IPC buffer that was handed to it by HBC - this causes corruption in the new app's IPC buffer heap, which typically causes some other IPC command to crash later on. Nearly all libogc apps use the same fixed memory range for IPC buffers, you don't need HBC's source code to know what range to avoid using.
     
  12. jskyboo

    jskyboo GBAtemp Regular

    Member
    2
    Sep 12, 2009
    United States
    Ok then how do we change that to avoid using the range by HBC? I would like to know but have no idea where to look to change that. Do we need to use some libogc methods? When I search the libogc api I find no leads and since you say nearly all libogc apps don't change this where is there an example of doing this?
     
  13. tueidj

    tueidj I R Expert

    Member
    7
    Jan 8, 2009
    It's specified by devkitppc's default linkscript for building wii apps, rvl.ld:
    Code:
    __Arena2Lo = (0x90002000);
    __Arena2Hi = (0x933E0000);
    
    __gxregs = (__Arena1Hi + 31) & (-32);
    __ipcbufferLo = (0x933e0000);
    __ipcbufferHi = (0x93400000);
     
  14. jskyboo

    jskyboo GBAtemp Regular

    Member
    2
    Sep 12, 2009
    United States
    So does that mean anything between 0x93400000 and 0x93FFFFFF is fair game? Or are there restricted ranges or anything like that? "devkitppc's default linkscript" where is that? Doing a google search I can find other projects rvl.ld but I have no idea what they have changed without seeing the original. Do I just need a rvl.ld with __ipcbufferLo and __ipcbufferHi defined or are others needed as well?By "devkitppc[s default linkscript" do you mean the one in "devkitPPC\powerpc-eabi\lib"? So do I need the whole thing and just change __ipcbufferLo and __ipcbufferHi or just define those?
     
  15. davebaol
    OP

    davebaol GBAtemp Advanced Fan

    Member
    2
    Sep 3, 2010
    Italy
    I see, there's something in what you say. [​IMG]

    Can I update the 1st post with your code?
     
  16. madri1

    madri1 GBAtemp Regular

    Member
    3
    Feb 15, 2006
    France
    does that means that every homebrew compiled will avoid that area ?
    if not, how do we prevent using that area ?
     
Loading...