How to change the Music in PhoenixWright ?

Discussion in 'NDS - ROM Hacking and Translations' started by kawlex, Mar 16, 2007.

Mar 16, 2007
  1. kawlex
    OP

    Newcomer kawlex Member

    Joined:
    Nov 21, 2006
    Messages:
    28
    Country:
    Germany
    Hi there,

    some time ago I read something about changing the cross examination music in PW Justice for All
    into the old one.

    Can someone tell me how to do so? : )

    I hate this new song,
    the old one rocked! [​IMG]
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,723
    Country:
    United Kingdom
    Apologies if you are familiar with hex editing already and I come off badly, I try and post this sort of thing so others who may not be quite so familiar can use it.

    You will need to deconstuct the DS file back into the individual components to get the soundfile, there are a couple of ways to do this but I favour ndstool and some batch files. I will copy and paste here if you prefer but this thread has all the info:
    http://ezflash.sosuke.com/viewtopic.php?t=457

    Once you get the rom disassembled you will have to get the sound file, I can not remember exactly what it was called but sound_data.sdat is the standard name.

    You will then need a hex editor, XVII32 is a good freeware one and x-ways forensics winhex is another nicer apayware one: http://www.x-ways.net/winhex/forensics.html

    The sound files of DS games go as follows (I will only list the stuff you are interested in for this hack)
    Start of file (bytes 8 through 12 are the length of the file if you do 32bit byte flip)
    Next is a list of names in ASCII, copy this into another file, replace the 00's with 0d0a and save as {name}.txt
    Search for FAT (in ASCII) or alternatively flip bytes 20 (hex) through 24 (hex) with a 32bit flip and you will come up with a list of hex numbers. These are the locations in the file of all the subfiles and the individual file lengths (they are not the same as the differences between offsets), these correspond to the list you just saved. Once again you will need to flip them. Check the results out against the original file (you will probably get a couple of ASCII characters like SSEQ or SWAR).

    Alter these numbers as you would a standard pointer system (I made an example file a couple of months back where tetris DS (Euro release) sounds were made to be the classic tetris music always rather than a few select levels if you are interested: http://www.4shared.com/file/3648242/758b38ce ).

    If you add files from another game make sure to change the file length at the start, this should not require it though as the sounds in question should already be in there (they are used in flashbacks).

    Hope this is useful.
     
  3. Sevael

    Member Sevael GBAtemp Regular

    Joined:
    Feb 16, 2003
    Messages:
    144
    Country:
    Canada
    I can save you about six hours' worth of time. I've already done this for the Japanese version, Gyakuten Saiban 2 (which has the full English text and voices, so it's fully playable by English speakers). You can download the modified sound_data.sdat file for it here.

    Just use NDSTool to replace the sound_data.sdat file in the Gyakuten Saiban 2 rom, then recompile the rom and you're good to go.

    Enjoy!
     
  4. kawlex
    OP

    Newcomer kawlex Member

    Joined:
    Nov 21, 2006
    Messages:
    28
    Country:
    Germany
    I didnt thought that this would take so long. [​IMG]
    So thx for the tutorial,
    but i think i will use Sevaels Version.
    Thx to you guys.
     

Share This Page