Need some help with Music hacking

Discussion in 'NDS - ROM Hacking and Translations' started by KazoWAR, Aug 12, 2008.

Aug 12, 2008
  1. KazoWAR
    OP

    Member KazoWAR GBAtemp Advanced Maniac

    Joined:
    Aug 12, 2008
    Messages:
    1,752
    Location:
    Winter Haven
    Country:
    United States
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,746
    Country:
    United Kingdom
    There is a much simpler way (it is what the tetris sound hacks use to do exactly the same thing as what you want).

    You simply trick the SDAT file into reading the file of your choice, in the SDAT format will be the file names in plain ascii, copy and paste these into an spreadsheet
    find FAT entry (search for FAT in ascii) and then get the of offsets contained there. Line them up and find what you want. Overwrite the original sound file location/size/whatever string with the one from the one you want and that is it.

    You can do it all without pulling the rom apart (let alone the sdat file) or you can rip a single file with something like ndsts and as you have should not have changed the file length you can reinsert it with that too:
    http://www.no-intro.org/tools.htm

    SDAT specs (which should help if you want to understand a bit more about the sdat format):
    Programming style
    http://kiwi.ds.googlepages.com/sdat.html#sdat
    explanation/textbook style
    http://tahaxan.arcnor.com/index.php?option...8&Itemid=36
     
  3. KazoWAR
    OP

    Member KazoWAR GBAtemp Advanced Maniac

    Joined:
    Aug 12, 2008
    Messages:
    1,752
    Location:
    Winter Haven
    Country:
    United States
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,746
    Country:
    United Kingdom
    It has been a while (and writing up sound hacking is Thursdays job) so I am a bit hazy on this brand of hack right now.

    Re: the code box. I would ignore the ASCII conversion and look at the hex (it is a direct link to all the files), FAT is just useful to find the string without having to pull apart the header.

    What you should have got is a list of names from the first part and then the second lists are a couple of entries (something like file offset, file size, end of section (not necessarily file offset+file length))
    If you line them up you can get the locations of the files (probably worth a check in crystaltile2 or something just to make sure).
    Now all you have to do is overwrite the string with the file you want to change with the string in the file you want to change it to (I simple and paste/overwrite). It probably will not matter for a few strings like this but for a lot of them (like I did for tetris) you can set the width of the display to be equal to the length of the string (they are all the same) and you can keep track of where you are far easier.
     
  5. KazoWAR
    OP

    Member KazoWAR GBAtemp Advanced Maniac

    Joined:
    Aug 12, 2008
    Messages:
    1,752
    Location:
    Winter Haven
    Country:
    United States
    thanks for your help, i was able to get it work!
     
  6. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,746
    Country:
    United Kingdom
  7. KazoWAR
    OP

    Member KazoWAR GBAtemp Advanced Maniac

    Joined:
    Aug 12, 2008
    Messages:
    1,752
    Location:
    Winter Haven
    Country:
    United States
    i could, but i didnt think anyone would want to download it. i just did it out of bordem and that i probably herd the same music over 1000 times (i do alot of competive battleing) so i decided to try to make it play somthing else for a change.

    let me read on how to do the patch and ill make a new thread about the music hack.
     

Share This Page