Disk Read Error Fix

Discussion in 'Wii - Hacking' started by knowitall599, Nov 8, 2008.

  1. knowitall599
    OP

    knowitall599 Banned

    Banned
    213
    0
    Oct 1, 2008
    United States
    Requiem4d and any other coder NEEDS to hear this: I know why the disk read error is happening. After a little less than one hour of staring at code I found out why. I need some help from the more expirienced coders to nail this problem though. So, I am going to post some sections of code and I will provide a description after that. Here:

    while (1)
    {
    void* dst = 0;
    int len = 0,offset = 0;
    int res = app_main(&dst, &len, &offset);

    if (!res){
    break;
    }

    dvddone = 0;
    ret = bwDVD_LowRead(dst,len,offset,__dvd_readidcb);
    while(ret>=0 && dvddone==0);
    DCFlushRange(dst, len);
    dogamehooks(dst,len);

    if(vipatchon){
    vidolpatcher(dst,len);
    }
    langpatcher(dst,len);
    }

    This while loop essentially makes the 1:1 backups compatible, but it contains a suspicious line. ret = bwDVD_LowRead(dst,len,offset,__dvd_readidcb); contains a very curious argument that may be the key to why we get the disk read error on 1:1 backups.


    s32 bwDVD_LowReset(dvdcallbacklow cb)
    {
    s32 ret;
    struct dicontext *ctx;
    struct dicommand *cmd;

    // printf("DVD_LowReset()\n");
    __dvd_reqinprogress = 1;

    ctx = __dvd_getcontext(cb);
    if(ctx==NULL) return IPC_ENOMEM;

    cmd = ctx->cmd;
    cmd->diReg[0] = (IOCTL_DI_RESETdiReg,sizeof(struct dicommand),NULL,0,__dvd_iostransactionCB,ctx);

    // printf("DVD_LowReset(%d)\n",ret);
    return ret;
    }

    I do not know what this does but I believe it has something to do with reseting the dvd drive. This function definition takes has one parameter dvdcallbacklow which is coincidentally passed an argument that the backup launcher uses to read backup games in another function. Hang with me for a second coders because I think that the problem lies here.



    while (1)
    {
    void* dst = 0;
    int len = 0,offset = 0;
    int res = app_main(&dst, &len, &offset);

    if (!res){
    break;
    }

    offset = offset
     
  2. nicksasa

    nicksasa GBAtemp Maniac

    Member
    1,410
    0
    Oct 25, 2008
    Belgium
    is this for softchip or wiigator 0.3
     
  3. knowitall599
    OP

    knowitall599 Banned

    Banned
    213
    0
    Oct 1, 2008
    United States
    This is for Wiigator 0.3.
     
  4. nicksasa

    nicksasa GBAtemp Maniac

    Member
    1,410
    0
    Oct 25, 2008
    Belgium
    you maybe found a bug but do you know the solution ? il look into the source again ...
     
  5. knowitall599
    OP

    knowitall599 Banned

    Banned
    213
    0
    Oct 1, 2008
    United States
    Lol, I do not know the solution. I will work on this later and I thank anyone who may help me find a solution.
     
  6. Psyko-killa

    Psyko-killa Member

    Newcomer
    25
    0
    Oct 14, 2008
    France
    France
    If someone have the solution,this guy will become my new god...i have this problem with cod5 and Qos T_T
     
  7. mihakase

    mihakase Member

    Newcomer
    13
    0
    Oct 23, 2008
    United States
    Saying something without saying anything. Fucking with people again.
     
  8. nicksasa

    nicksasa GBAtemp Maniac

    Member
    1,410
    0
    Oct 25, 2008
    Belgium
    i really want de blob and cod5 to work on wiigator 0.3 or softchip ...
     
  9. digitydogs

    digitydogs 404 Error: Member Not Found

    Member
    1,352
    0
    Oct 19, 2008
    United States
    Md,US
    As you can see its already fixed just wait for the gamma. No need beating a dead horse.
     
  10. Cyberxion

    Cyberxion Advanced Member

    Newcomer
    69
    0
    Sep 21, 2008
    United States
    Looks to me like he's pointing out a potential problem in hopes that it'll help those with a bit more knowledge. [​IMG]

    EDIT: And it also looks like those people already worked it out. [​IMG]
     
  11. luccax

    luccax Advanced Member

    Newcomer
    96
    0
    Sep 19, 2007
    Brazil
    That's DVD read eror. Nothing to do with Game's read disk error.
     
  12. chaoshawk

    chaoshawk Advanced Member

    Newcomer
    54
    0
    Oct 19, 2008
    Canada
    Wouldn't hurt for an early fix anyways. Keep it up guys.
     
  13. digitydogs

    digitydogs 404 Error: Member Not Found

    Member
    1,352
    0
    Oct 19, 2008
    United States
    Md,US
    From the sounds of it Read errors have been fixed period. if it was only one of the two i think he would have specified one.
     
  14. knowitall599
    OP

    knowitall599 Banned

    Banned
    213
    0
    Oct 1, 2008
    United States
    Ahh...I see now thanks luccax, but what is the difference?
     
  15. mihakase

    mihakase Member

    Newcomer
    13
    0
    Oct 23, 2008
    United States
    Yeah and if you've seen his prior thread where he "fixed" some bug, you'll find that he worded things in nearly the same way.

    "lol I found something wrong and changed something which fixed it, DL!!"

    The result?
    -People experienced placebos
    -Even people who actually knew what they were doing didn't understand *why* his change/changes worked
    -One (or a few) concluded that he was touching code that was irrelevant to the backup loading process to begin with
    -Two people called him out for just fucking with people

    The only difference here is this:
    "lol I found something but I think this could help! dunno why so have at it programmers!"

    Besides, I thought it had already been established that the disk read error problem isn't within the loaders themselves.
     
  16. luccax

    luccax Advanced Member

    Newcomer
    96
    0
    Sep 19, 2007
    Brazil
    That happens when loading the game, Game's disk error will happen when the game's running. Everything's fine with DVD read error, if it was not, it would give that error.
     
  17. Ozz465

    Ozz465 GBAtemp Regular

    Member
    291
    1
    Oct 27, 2008
    United States
    hopefully the gamma will play mk Armagedon .
     
  18. ebdynasty

    ebdynasty GBAtemp Regular

    Member
    125
    0
    Oct 29, 2008
    Wow, that sounds sick, I hope its released tommorow [​IMG]
     
  19. Cooler89

    Cooler89 GBAtemp Regular

    Member
    244
    0
    Sep 22, 2008
    United States
    even With the gamma it aint working but wiigator said he will fix it and the games are running more faster
     
  20. roy_hu

    roy_hu Member

    Newcomer
    29
    0
    Oct 21, 2008
    United States
    It was me that concluded his fix was nothing. He's fucking with people again this time. I don't even want to explain why the code he pointed out had no bug.