NSMBW Mod ISO Builder v1.00

Discussion in 'Wii - Hacking' started by damysteryman, Jun 20, 2013.

Jun 20, 2013
  1. GreyRogue

    Member GreyRogue GBAtemp Regular

    Joined:
    Jun 21, 2013
    Messages:
    212
    Country:
    United States
    Actually, you could probably take out the long ones, I think they're already done by this line:
    wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml --source ../Cannon/
     


  2. markehmus

    Member markehmus GBAtemp Advanced Fan

    Joined:
    Jul 26, 2008
    Messages:
    915
    Location:
    in the GAME
    Country:
    Canada
    cannon and summer don't seem to work for me USAv2,
    freezes at the wrist strap warning.

    hummm - for me ...guess i'll need to read here a bit


    i think i got the insert part:
    "<memory offset="0x8034842B" value="3463FF82F4" />"
    but i'm lost on:
    "This plus the two copy/paste fixes and they both load now."
     
  3. alejandroues

    Newcomer alejandroues Advanced Member

    Joined:
    Dec 2, 2006
    Messages:
    54
    Country:
    Mexico
    Yes, now both work!!!
    Thanks!!!

    EDIT.
    1.- You have to add this line: <memory offset="0x8034842B" value="3463FF82F4" />
    to the file: "CS.xml" (located in "patch" folder)

    put it in order between these two (second short one).
    <memory offset="0x8034841F" value="3463FF82C4" />
    <memory offset="0x8034842B" value="3463FF82F4" />
    <memory offset="0x80348437" value="3463FF8324" />


    2.- You have to edit Build_ISO.bat

    locate:

    IF %MOD%==Cannon (
    SET XML=CannonP
    CALL :XMLMOD
    wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml

    and replace with:
    IF %MOD%==Cannon (
    SET XML=CannonP
    CALL :XMLMOD
    wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml --source ../Cannon/

    those are all the edits I did to make Summer and Cannon work with USAv1 (I don't know if this works for USAv2) (again, thanks to GreyRogue for the fix)


    3.- For Another you also need to edit Build_ISO.bat (thanks to Howard)

    locate:
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\EngEU\staffroll\staffroll.bin
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\FraEU\staffroll\staffroll.bin
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\SpaEU\staffroll\staffroll.bin

    and replace with:
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\EngUS\staffroll\staffroll.bin
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\FraUS\staffroll\staffroll.bin
    copy /b Another\Lang\staffroll.bin nsmb.d\files\US\SpaUS\staffroll\staffroll.bin


    EDIT2: :ph34r: ninja'd by GreyRogue
     
  4. GreyRogue

    Member GreyRogue GBAtemp Regular

    Joined:
    Jun 21, 2013
    Messages:
    212
    Country:
    United States
    http://gbatemp.net/threads/nsmbw-mod-iso-builder-v1-00.349853/page-3#post-4685496
    http://gbatemp.net/threads/nsmbw-mod-iso-builder-v1-00.349853/page-3#post-4685681

    Both are in the batch.
    The second needs to replace this line (missing '--source ../Cannon/' ):
    wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml

    Also it will probably run without this one but it should be fixed:
    http://gbatemp.net/threads/nsmbw-mod-iso-builder-v1-00.349853/page-2#post-4684309

    If you were adventurous you could rewrite the batch with these functions:
    http://gbatemp.net/threads/nsmbw-mod-iso-builder-v1-00.349853/page-3#post-4685499
    These would find and replace the files rather than having to explicitly copy each file.

    You could also take the long ones out of the xmls that are copies of the loader.bin files. wit is already applying those patches. (Well, you could leave part of the long ones. After all TeamDARK wuz There!)
     
  5. GreyRogue

    Member GreyRogue GBAtemp Regular

    Joined:
    Jun 21, 2013
    Messages:
    212
    Country:
    United States
    Don't forget this one. It's in that section.
    SET XML=CannonP
    with this
    IF %GAMEID%==SMNP01 SET XML=CannonP
    IF %GAMEID%==SMNE01 SET XML=CannonE
    IF %GAMEID%==SMNJ01 SET XML=CannonJ

    This one , too. (It already has ' --source ../SumSun/')
    SET XML=SumSunP
    with
    IF %GAMEID%==SMNP01 SET XML=SumSunP
    IF %GAMEID%==SMNE01 SET XML=SumSunE
    IF %GAMEID%==SMNJ01 SET XML=SumSunJ
     
  6. Howard

    Member Howard GBAtemp Fan

    Joined:
    May 1, 2012
    Messages:
    442
    Country:
    United States
  7. markehmus

    Member markehmus GBAtemp Advanced Fan

    Joined:
    Jul 26, 2008
    Messages:
    915
    Location:
    in the GAME
    Country:
    Canada
    awesome thanks!
    just came back to say it was pretty straight forward when i looked over the .bat
    but i see i got lots of help too
     
  8. DeltaDon

    Newcomer DeltaDon Member

    Joined:
    Jun 21, 2013
    Messages:
    18
    Country:
    United States
    How about someone make a pastebin link for the working bat and xml or put the files on mediafire or something?
    After making the changes as described, I get the same results that [Files Differ] so the patches are still not working here.
     
  9. alejandroues

    Newcomer alejandroues Advanced Member

    Joined:
    Dec 2, 2006
    Messages:
    54
    Country:
    Mexico
    I don't think it matters, because CannonX.xml and SumSunX.xml apply the same memory patches to all versions

    For Summer E, P and J:
    <memory offset="0x800E4914" value="3C600140" original="3C600120" />
    <memory offset="0x800E4994" value="3C600140" original="3C600120" />
    <memory offset="0x800E4A84" value="3C600140" original="3C600120" />
    <memory offset="0x80328130" value="80001800" original="8015BB20" />
    <memory offset="0x80328478" value="80001800" original="8015BC60" />
    <memory offset="0x80001800" valuefile="Loader.bin" />

    And for Cannon E, P and J:
    <memory offset="0x800E4914" value="3C600140" original="3C600120" />
    <memory offset="0x800E4994" value="3C600140" original="3C600120" />
    <memory offset="0x800E4A84" value="3C600140" original="3C600120" />
    <memory offset="0x80328130" value="80001800" original="8015BB20" />
    <memory offset="0x80328478" value="80001800" original="8015BC60" />
    <memory offset="0x80001800" valuefile="Loader.bin" />


    I think another doesn't need the change because it doesn't have Loader.bin


    The patches work, i've already told you that 2 of the patches are going to say [Files Differ] because they are for the different regions of the game; the batch "tries" to apply all 3 patches (E,P and J) to the iso you have.

    The only thing that the patch does is to change the name of the savegame (from wiimj2d to CannonM or SummSun)
     
  10. DeltaDon

    Newcomer DeltaDon Member

    Joined:
    Jun 21, 2013
    Messages:
    18
    Country:
    United States
    Here is the bat file after editing but it still gives the error ( the CS.xml has that line inserted too) <memory offset="0x8034842B" value="3463FF82F4" />

    What am I missing ?
     
  11. gl1mml1ng

    Member gl1mml1ng GBAtemp Regular

    Joined:
    Jun 26, 2012
    Messages:
    112
    Country:
    Germany
  12. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
  13. GreyRogue

    Member GreyRogue GBAtemp Regular

    Joined:
    Jun 21, 2013
    Messages:
    212
    Country:
    United States
    Ah, good point. Should have checked the contents.
     
  14. GreyRogue

    Member GreyRogue GBAtemp Regular

    Joined:
    Jun 21, 2013
    Messages:
    212
    Country:
    United States
    I thought the message was useful. I think it might be better to remove verbose from this patch than remove it from wit.
     
  15. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
    The status (exit status) is still there. The intention of "Command 'xx' returns with status ..." was only, that it appears on error messages. Than I have implemented the hint "files differ". And from now, the message is printed for errors, if verbose is set, and for hints, if verbose is set twice.
     
  16. damysteryman
    OP

    Member damysteryman I am too busy IRL these days...

    Joined:
    Oct 4, 2007
    Messages:
    1,190
    Country:
    Antarctica
    Small update. Sorry about the silly mistakes in the last release everyone!
    NSMBW_Mod_ISO_Builder_v1.01.zip

    Changelog:
    Code:
    v1.01
    - .wbfs output now creates a named subfolder for the game and names both
    the folder and file as per "standard" convention (uses "\name [GAMEID]\GAMEID.wbfs")
    - fixed Cannon and Summer Sun (stupidly left out one patch by accident)
    - fixed Another when used with USA NSMBW as a base
    - cleaned up batch file a bit, along with a few accidental mistakes
    Wiimm:
    I am having trouble with wit's dolpatch command, specifically when trying to patch an external file (such as Loader.bin) into the .dol file. Whenever I try to, instead of patching the file's contents into the .dol, it just fills the address I specify with all 00s, and only up to the first 1000 bytes, instead of the size of the external file. This appears to happen with both XML and LOAD sub-commands when dealing with an external file. I am using WIT v2.22a cygwin build, running under Windows 7, 32-bit to be specific.

    Also, may I please make a request too? would it be possible to raise the limit of XML <memory> patches past 1000 bytes? I ask, because Another SMBW has its Loader as a memory patch instead of an external file, and it ends up being over that 1000 byte limit.

    The main reason I ask about these, is so that way, I can remove the Loader.bin contents from my patch .xml files, therefore removing the need to distribute any part of these Mod's code or contents within my builder package.

    Also, if I may ask for a forum mod to remove the "v1.00" from the topic title? (Since it is now not really a good idea for me to have put it there? oops!)
     
  17. Speedster

    Member Speedster Hack ALL THE THINGS

    Joined:
    Apr 13, 2013
    Messages:
    176
    Country:
    United States
    Anyone have a download of Cannon? All the links I'm getting are to one page which says the account has too much traffic.
     
  18. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
    I will look in it in the next days.

    Until now I have seen maximal 20 bytes and so I thought, 1000 are more than enough. But no problem to make it with dynamic memory without limits (or 1MB).

    Are 1000 bytes for the condition (original="") enough?
     
  19. damysteryman
    OP

    Member damysteryman I am too busy IRL these days...

    Joined:
    Oct 4, 2007
    Messages:
    1,190
    Country:
    Antarctica
    Thanks for that man :)
    Yeah, seems like Another's loader patch is the only one that does that instead of an external file AFAIK. And thanks for that too man :)
    And yeah, that should be fine I would imagine, I am not checkingthe original bytes when adding the custom loader, since the address I add it to is the same for all versions of the game.
     
  20. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
    damysteryman

    Here I am (cygwin binary only): http://wit.wiimm.de/download/bin/cygwin/wit-r4518.exe
    I have found the bug (mistake while removing test code) and the new limit for data is now 4 MiB.
    But I haven't the time to test it now. So please praise me or blame the unknown programmer.

    Code:
    Changelog:
     
     - wit DOLPATCH
        - Bug fix: If loading a file, wrong data was used.
        - Tag memory, attribute value: 4 MiB of bytes are accepted now.
        - Sub command address=hexdata: 4 MiB of bytes are accepted now.
    
     

Share This Page