[Tutorial] How to port Preloader hacks.ini

Discussion in 'Wii - Hacking' started by SifJar, Jul 19, 2009.

Jul 19, 2009
  1. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    When there is a new System Menu, many people complain that there is no hacks.ini for the new System Menu yet, so they can't use preloader hacks on the new System Menu. So I decided I'd write a quick tutorial on how to port the hacks from one System Menu to another. This works between different versions and different regions as well. So if you have a Japanese Wii and are annoyed there are no hacks, this will work for you as well.

    What you need:
    • NUSD
    • Key.bin (This is easy, just open a Hex Editor and paste the key in as a hex string and save as key.bin)
    • A hex editor (Any should do, I use XVI32)
    • Notepad
    • Calculator with Hex function, Windows calculator will do
    • Preloader hacks.ini file for any system menu
    First thing, get everything listed above. Then fire up NUSD, with key.bin in the same folder, and download the System Menu you have the hacks.ini for and the System Menu you want to port it to. Make sure you tick decrypt as well. The title will be 0000000100000002, and the version depends on which version and region you want. You should be able to find which one you need on wiibrew.org.

    Now take a look at the patch, or "hack", you want to port. (You do them one at a time)
    Let's take for example, the Move Disc Channel hack from System Menu 3.2E

    Code:
    [Move Disc channel]
    version=290
    offset=0x813A7E84
    value=0x60000000
    Let's take a look at that. The first line with the [ and ] is the name. The next line tells preloader which System Menu version this patch is for. The next line is the offset, which tells preloader where in the system menu to patch the value. The final line tells preloader what to make the value at that offset. Now the problem is, the offset is different for different System Menus. And that's what we need to change.

    Now the offset in the hacks.ini is not the one used by hex editors, so we need to do a quick calculation. Open up Windows Calculator and press View>Scientific, then select the Hex option. Then type in the offset from the hack (if there are several, do the first one) WITH the 0x at the start(You need to type the x on your keyboard I think), and then subtract 0x8132FAE0 from it. Now we have the offset we need.

    [​IMG][​IMG]

    Now open up the decrypted 00000008.app from the System Menu you have the hacks.ini of (in this case 3.2E) in a hex editor. You need to find in your hex editor the option of going to a certain address. In XVI32 it's under Address>Goto, but different hex editors may vary. Type in the offset we just got in Windows Calculator. This will take you to that address. This shows us what the value should be, before its patched by preloader. You then need to copy 8 numbers (4 little boxes) from that address onwards. Copy this into notepad. You also need to copy several "boxes" either side. Note that if the string at the address is 00000000, the hack can't be ported this way because it is an advanced patch, and this method works only for simple hacks.

    [​IMG][​IMG]
    [​IMG]
    [​IMG]

    Now open up the decrypted 00000008.app from the destination System Menu in a hex editor. You now need to search for the hex string you just copied from the last System Menu. Search for it, and when its found, hit search again. Hopefully it wont find it again, meaning this is the place. If it does find it again, go back to the first system menu and copy a few more boxes from either side as well, and try again. Do this until there is only one result.

    [​IMG][​IMG][​IMG]

    Now you need to find the offset in this System Menu. So look at the first digit from the string you copied from the original System Menu and find it in the new one. Take down the address of the currently highlighted box. In XVI32, this is displayed in the bottom left corner. Write this down somewhere.

    [​IMG]
    [​IMG]

    Now go back to Windows calcuator and put it back in Hex. Then type in the address of the value in the new System Menu and add 8132FAE0 (no 0x). This gives you the new offset. Then just go into notepad and type up your hacks.ini. You need to add 0x to the answer you got in calculator to get the offset.

    [​IMG][​IMG][​IMG]

    Code:
    [Move Disc Channel]
    version=417
    offset=0x813AF388
    value=0x60000000
    (here I ported it to 4.0U, even though it already exists for this System Menu, it was just for the sake of this tutorial)
    The first line remains the same. The second line is the new System Menu version, same as the one used for NUSD. The next line is the new offset, and the last line is the value, and that remains the same.

    If the hack you are porting contains more than one offset and value, you just do the same for each one.

    And then its ready for use. If you do port something to a new System Menu, please post at the wiki on WiiBrew.org

    Hopefully this was/will be useful to someone at some stage. If you need me to, I can clarify any parts as well. Just give us a shout.

    Oh, and thanks to : Crediar, for making preloader, da_letter_a, for a mentioning something that proved very helpful, WB3000 for NUSD and depeha, for his tutorial on phone port patching at : http://walkmans.wordpress.com/2008/01/07/patch-porting/

    EDIT: Added screenshots.
     


  2. Dteyn

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    Country:
    Canada
    Great job SifJar, nice tutorial. I'm sure this will come in handy when new system menu versions come out, I have a feeling Nintendo is working on System Menu v4.2 as we speak.

    Cheers! [​IMG]
     
  3. TheWiiNinja

    Member TheWiiNinja GBAtemp Regular

    Joined:
    Mar 14, 2009
    Messages:
    112
    Location:
    Texas
    Country:
    United States
    Thanks SifJar! I might try this out with 4.1U.......
     
  4. redia

    Member redia GBAtemp Fan

    Joined:
    Mar 9, 2008
    Messages:
    359
    Country:
    Switzerland
    SifJar,

    thank you very much.
    interesting tutorial.

    Cheers,
    R
     
  5. WiiCrazy

    Member WiiCrazy Be water my friend!

    Joined:
    May 8, 2008
    Messages:
    2,391
    Location:
    Istanbul
    Country:
    Turkey
    There is an easier way, use a menu loader (for example raven's, he uses a nice patch format) and note the addresses where the hacks are found so that for each new system menu version you don't need to do a lot of calculation...

    In the heat of this summer... well boring...
     
  6. SifJar
    OP

    Member SifJar Not a pirate

    Joined:
    Apr 4, 2009
    Messages:
    6,022
    Country:
    United Kingdom
    Thanks. I'll update with screenshots tomorrow.
     
  7. jservs7

    Member jservs7 GBAtemp Advanced Fan

    Joined:
    May 14, 2008
    Messages:
    891
    Country:
    Puerto Rico
    Sweet. So uhhhhhhhh, anyone make a hacks.ini for 4.1U yet? [​IMG]
     
  8. thc42O

    Banned thc42O Banned

    Joined:
    Jan 3, 2009
    Messages:
    470
    Country:
    Canada
    u ment to type 4.1u i hope.
     
  9. jservs7

    Member jservs7 GBAtemp Advanced Fan

    Joined:
    May 14, 2008
    Messages:
    891
    Country:
    Puerto Rico
    Damn those typos. [​IMG]
     
  10. Arm the Homeless

    Member Arm the Homeless Custom Title

    Joined:
    May 26, 2008
    Messages:
    1,762
    Location:
    /home/andy/
    Country:
    United States
    You meant to type "You meant to type 4.1U I hope..." I hope.
     
  11. jservs7

    Member jservs7 GBAtemp Advanced Fan

    Joined:
    May 14, 2008
    Messages:
    891
    Country:
    Puerto Rico
    Damn those typos. [​IMG] (Echo?)
     
  12. Dteyn

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    Country:
    Canada
    You mean to type, 'You meant to type "You meant to type 4.1U I hope...", I hope.', I hope.
     
  13. sess

    Member sess GBAtemp Fan

    Joined:
    Sep 20, 2008
    Messages:
    311
    Location:
    Sao Paulo
    Country:
    Brazil
    I tried just one, can anyone on 4.1U try and see if it works?


    [Move Disc Channel]
    version=449
    offset=0x813AF484
    value=0x60000000




    Also, c-c-c-combo breaker!
     
  14. markehmus

    Member markehmus GBAtemp Advanced Fan

    Joined:
    Jul 26, 2008
    Messages:
    891
    Location:
    in the GAME
    Country:
    Canada
    loads but doesnt move

    moves now humm wonder y?
     
  15. WiiBlaster

    Member WiiBlaster GBAtemp Maniac

    Joined:
    Nov 23, 2008
    Messages:
    1,189
    Country:
    United States
    it seems someone has posted the 4.1U hacks on wiiso, haven't tried them myself yet
     
  16. damysteryman

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

    Joined:
    Oct 4, 2007
    Messages:
    1,182
    Country:
    Antarctica
    I'm porting the hacks to 4.1U right now. I only have a few hacks left, then I'll update my hacks.ini and post it on wiibrew along with my 4.1E hacks which is already up there)

    And I never knew the information I gave to Dteyn would turn into a full blown tutorial/guide! Not Bad!
     
  17. pm_41

    Member pm_41 GBAtemp Regular

    Joined:
    Jul 1, 2009
    Messages:
    204
    Location:
    Lurking in my Wii's NAND
    Country:
    United States
    Sweet! Post here when done! [​IMG]
     
  18. sess

    Member sess GBAtemp Fan

    Joined:
    Sep 20, 2008
    Messages:
    311
    Location:
    Sao Paulo
    Country:
    Brazil
    Fuuuuuuuuuuuuuuuuuuuuuuuucccccccccckkkkkkkkk >___<

    I had the hacks.ini for 4.1U so ready, but I formatted the SD BEFORE copying it to my PC. *facepalm*

    By the way, these didn't work for me:

    Region Free games SD Menu
    No Menu BGM
    No sound at all
    Remove NoCopy Protection
     
  19. jurai

    Member jurai GBAtemp Fan

    Joined:
    Dec 23, 2005
    Messages:
    338
    Country:
    perhaps someone should write an automated app which can scan new system menu's for the old known values and spit out the offsets for new system menu versions?
     
  20. hanguker

    Newcomer hanguker Member

    Joined:
    Feb 2, 2009
    Messages:
    48
    Country:
    United States
    Thanks for this, but how do I get the Korean 3.3K (v326) System menu files?

    The NUSD won't find them.
     

Share This Page