Voice clip format?

Discussion in 'NDS - ROM Hacking and Translations' started by Necron, Apr 27, 2010.

Apr 27, 2010

Voice clip format? by Necron at 11:55 PM (3,050 Views / 0 Likes) 22 replies

  1. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    A friend had the idea of swapping the voice clips of valkyrie profile DS with the PSX ones. I whish to know if it possible to do, or almost the format the voices are compressed to know what I'm dealing with.
     


  2. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    uncompress the nds game with dsbuff
    look for a sound folder (.sdat or something indicating music)
    Get yourself vgmtrans or vgmtoolbox from source forge
    use vgm to open the music files and hope it can help you
    you can then change the sounds exported from vgmtrans with winavi with a downloaded codec

    as for the psx games well that you will have to look into yourself...
    all I know about for psx is hacking text
    use powerISO or alcolhol120% to open the psx iso
    and then look for the music files
    if your lucky you can just rip them direct if not they will have some special format and i have no idea how you will go from there

    the big problem with this is I am pretty sure you can get the music out of the ds game with vgm but putting new music back in is going to be trouble
    you will have to mess with offsets filenames string lengths and even then changing the new sounds from the psx to something the ds can use is something I don't think can be done right now

    this may not have been any help but its something

    so No I don't really think you can do it but still give it a try.
     
  3. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Well, thanks for answering. This gives me something to mess with in the game. With the psx voices, I think I can record or rip them with some programs I have in my PC. And with the reinserting, I will have to find some tutorials, I don´t know anything about hex [​IMG]
     
  4. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    well hex is part of it, if its one big .sdat file then you will have to deal with finding offsets for the sound files within that sound file and other files you will also have to deal with specific file length (in bytes), and finding (possibly changing) the sound file names within other files that redirect to that .sdat file

    this is why you see undubs but you hardly (I haven't yet) see sound replacement
    It can be done (if you could find a codec to save the psx music to something .sdat compatible)

    What you should do next is look up nds and psx sound file specifications and see if there really is that big a difference (I'm pretty sure there is but...)
     
  5. miruki

    Member miruki GBAtemp Advanced Fan

    Joined:
    Apr 23, 2008
    Messages:
    644
    Location:
    Awesometown
    Country:
    Germany
    There's one for Rhapsody, someone switched the Japanese songs from the DS game with the English ones from the PSX game.
     
  6. .Darky

    Member .Darky GBAtemp Maniac

    Joined:
    Nov 21, 2008
    Messages:
    1,163
    Location:
    Lima
    Country:
    Peru
    As far as I know, even undubbing the game didn't work. Someone tried the same undub method of Suikoden Tierkreis (import english script and options to the japanese game) and it didn't work either. Now, I imagine adding the voices from the PSX version would be extremely hard.
     
  7. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Link?
     
  8. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Allright, so I got the files from the game... CPK files, mod and one sdat file. The sdat contains BGMs and SFXs from the game. The Sound_Battle_VoiceX.cpk (x=1-5) contain the battle voices, and with CRI cpk unpacker, I got other files, but with no extention at all (they are called ID00001, ID00002... up to ID00235 in Sound_Battle_Voice1) and with my unexistant knowledge in HEX, I don't know what to do with them.

    Tried putting .aax and .adx in the extention (sigma harmonics had these format of sound inside the cpk files), but I cannot make it work. Any ideas or help?
     
  9. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    Did you get the winavi converter, download the codec (search for earlier postings on this subject - vgm)
    get yourself classic media player and try to open those files with it if it cannot identify them (usually does) then they are probably some very obscure format of music. doesn't matter the extension just open it anyways with classic media player it will tell you through one of it tools what it really is and then you can work from that.
    but the thing is if you know where the voice clips are that you need to replace then why bother with anything that doesnt't have to do with that?

    read up on pointers through the romhacking wiki available on gba temp and on romhacking.net (even if its for other systems it still helps). those unname/unknown files are probably only referenced by pointers if you are going to change the voices you will need to make sure you don't screw up the pointers for the unkown files too. I would still try to figure out what they are though just in case you do need to change them too.
    remember to check and double check everything pointer wise
    get a spread sheet compare the unpacked files to the packed one look for things you can only find in that specific unpacked file (the magicstamp name for the the file ie voice 1 scene 19 or some such something you can only find in that file)
    list it in one column that stuff 2nd column where you found it hex position wise(offset) in that file 3rd column (if you can find it in the unpacked file) where you found it hex position wise
    if your lucky you won't need this but I doubt it (those unnamed files leave me really doubting it)
    In the arm9.bin file you will probably find reference to the .sdat or .cpk file along with a bunch of names for files you cannot find unpacked with dsbuff or dslazy those file names are more than likely the found in the packed cpk files and what its looking for when it loads the them.
    nearby will these referenced names will be pointers (numbers)- pointing within the packed file to the unnamed files.
    you will still need to search the entire rom for reference to the file that has the voice clips you will also need to look for pointers where you found reference to that voice file for within the voice file just in case you need to change those pointers too.
    you need those numbers because you are going to need to change them when you change the voice files as if you can convert the psx voice files to what ds files are and repack them you are going to need to know the hex position(offset) of the new stuff so you don't screw the game up also remembering to rename everything the way the ds has it too or you are going to have to change that also.
    confused? uh sorry that happens...
    Have you found the psx voice files yet? whats there format? Do you have a converter for the sound files yet?
    Don't have a hex editor yet? get crytaltile2 it has a built in system for playing the audio files and a way to extract from .sdat (don't know about .cpk)
    also has A file system viewer that also can show offset for every file...
    If any experienced programmers have anything to say to help with this, then help, please?
     
  10. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Unfortunately, a friend of mine has my copy of VP for psx, so I can´t do this ATM, but in 2-3 days I´ll look the cd, but If I remember well, it has 3 files: the system, the slus_xxx.xx (game id) and a very large file called VALKYRIE, so I may figure I need to look into the biggest file. I have PSX multi converter, but it only extract a few images from the CD, so I will need other programs, maybe ask in a psx hacking forum.

    I will try to contact my two cousins, they are programmers, so they can help a little to figure out what those files are.

    It appears that I will have to learn to calculate all those HEX things, maybe it will take me a couple of months (maybe more with school in the middle), and thanks again ratsan for your help.

    Edit: it is possible to see what sector the game is reading when the voices are played with DeSmume?
     
  11. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    actually you could trace the files with an emulator but it is easier just to search the rom for the file names. that way you will know everything that needs or might need to be changed.
    just as you could do the same for the psx game okay.
     
  12. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
  13. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Thanks for the links rastsan, they contain very valuable info.
    I found this searching on gamefaqs boards http://www.gamefaqs.com/boards/genmessage....584&page=13
    it should be useful for repacking cpk files (if the CRI utlity does´t work with this, this utility is based on the utf_tab)
     
  14. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Update! Looking for some info, I found this:
    http://wiki.multimedia.cx/index.php?title=CRI_ADX_file
    http://wiki.multimedia.cx/index.php?title=CRI_ADX_ADPCM
    http://wiki.multimedia.cx/index.php?title=...FILM_Audio_Data

    It´s appears that the sound clips are not cpk itself, but another format (probable wrong, but I found some interesting things inside the Sound_Battle_Voice)
    At the end of the link above, it mentions the structure 80 01, and inside the file it is, also near the words (c )CRI, which the article says are in the end of the clip, which the Sound_Battle also has. I may be wrong, but looking this structure, we may be more close to the goal!

    P.D: rastsan, if you could take a look into the Sound_Battle_Voice1.cpk you may figure out some things (I assume you know some of hex, but if not, please hackers, help is needed here)
    P.D2: just found all the directly ripped PSX voice samples, with no edit.
     
  15. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    first I should ask which version of the Valkyrie profile DS you are trying to replace the j eu or u

    uh, its not near the end of the clip its before the audio data The asciii CRI thing it could be that the
    clip is literally so small that has it no need to list other audio data but I don't know.
    but now you have a clue as to what audio codec or audio tools you might need for editing the ds stuff

    If you could get youself a copy of CRI vibe 1.5
     
  16. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    OK, sent them a form, but I doubt I will get any answer. As for hex, I'm studying how to calculate pointers, and everything I need to identify the structure.

    BTW, U version.

    P.D: CRI Vibe seems to be the key to this undub... hope I get a copy (chances are 1/100000000000)
     
  17. fearofshorts

    Member fearofshorts GBAtemp Fan

    Joined:
    Jul 12, 2009
    Messages:
    479
    Location:
    Melbourne
    Country:
    Australia
    Wow! Nice work dedicating yourself to a project!
    Any plans for a public release if you continue?
     
  18. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    For now, that is a YES. I managed to get sound from the files!!! Now I need a program to convert them back, so I will need a help of someone. This probably will take some time.
     
  19. Necron
    OP

    Member Necron Lurking~

    Joined:
    Dec 29, 2008
    Messages:
    861
    Location:
    Mi casa
    Country:
    Chile
    Good news. I have edited the extracted voices, all is fine. But, the final step needs to be done. I need someone who can help me to rewrite the offsets and strings, so that way the voices play (I tried putting the packed files into the game, the game runs, but the voice clips are not played)

    I already sent a pm to psycoblaster, but he seems to be a busy guy, so if anyone know hex, please help [​IMG]
     
  20. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    extracted sound files from the ds game or the psx game? and what with?
    as much info as possible please...
    what you used to pack, the format and converter, etc.? and does the psx version have a different sound track for the voices than the ds?
    Important as you don't need to change something thats already there.
    Help the programmer by searching the ds rom for references to the .cpk files that need changing listing those references in a spreadsheet with the offsets listed also. list also any file names that were found in the unpacked voice files, they're (there(?)) offsets (within that file, and within the rom prefereably) list as much info as you can - I want to help you with this as I am working on the same type of thing for a couple of other projects of mine also (they don't deal with .cpk, so its easier, way easier I just keep the same file size and reinsert)
     

Share This Page