ROM Hack Question about SDAT. files

Alpharage

Member
OP
Newcomer
Joined
Mar 31, 2015
Messages
13
Trophies
0
XP
114
Country
Germany
Uhm, so... since I find romhacking interesting, but I never was good with numbers and stuff, I decided to try to learn everything I can that does not require the use / knowledge of hexadecimal. So the simple, basic things like swapping sound data to undub and messing with fonts.

Recently I've picked up again to play the game "Avalon Code", and since it was an interesting game, but some things in it (like fonts and some sounds) were annoying, I messed around with it, trying to learn something useful while doing it. Now, while I do not particulary dislike the English dub (that I actually like), I found the Japanese voice to be more nice, expecially for the female characters (also, I love the language, and hearing it with english subtitles kinda help to recognize and lear some of it).

However, while I was quite content with the japanese voices in general, I strangely found the heroine's one quite annoying (I'm speaking about the sound the heroine makes in battle, while using a weapon), so I figured out I wanted to learn / try to find the source files for those voices, and swap them with the english ones (which in my opinion sounds more "fierce"). xD
Since the thing was a good occasion to try to learn something new, I decided to do it.

So, I managed to take out with DSLazy the undubbed (japanese voices) noah_sound_se.SDAT file, located in the data folder, and opened / extracted it with KIWI.DS. I did the same thing for the english noah_sound_se.SDAT, and then I managed the locate the two files in which there are the voices I wanted to change (WAVEARC_VOICE_HEROINE_ACT.swar and WAVEARC_VOICE_BASE_TIA.swar), so I swapped those files and repacked the folder with KIWI.DS to make it again into a SDAT. But, for some strange reason, when I repacked the rom with DSLazy, the game started up normally and all, but while the main background music was normal, the se / voice one was totally absent.
I figured out I did something wrong, so I tried to swap other different files (there were three folders in the sdat, with ssar., sbnk. and swar. files in them respectively, and in each folder there was a file named after the ones I wanted to change), but nothing worked. Checking the sdat. file I repacked with KIWI.DS, I found out the size was 0 byte, so I figured out I did something wrong while repacking as well.

I found a similar thread (this one), and an user suggested to rename the files into the sdat. file so they could match how they're ordered in KIWI.DS, so I was thinking about doing the same but... in the three folders, there are tons of file, an to rename them all it would take days (and I'm not 100% sure it would work, since I'm not sure I swapped all the required files or anything like that). owo



Now, If swapping those files it's impossible, I'll give up. But If it's possible, I'd like to learn how to do it and try it, as this knowledge might come in handy sometime later as well. Uhm... I'm kind of worried I didn't expain myself so clearly, but please bear with me... hope I didn't make too many mistakes. x3

PS: I also tried out VGMToolbox for extracting files, and VGMTrans to export them as wav. to be able to listen them and locate the ones I wanted to change.

So my questions are trhee:

1) If it is actually possible to change those particular sound files without messing anything else;
2) If yes, which files should I replace? There are corresponding files with the same name as the ones I located in three different format and folders (ssar., sbnk. and swar);
3) If it's actually necessary to rename / order the files before repacking with KIWI.DS, as there are tons of them and it would take days to do so, or If there is another way.


Also, I'm sorry for asking so much all of a sudden. xD
I know I might sound stupid, because I don't actually have any kind of experience in romhacking at all... but it's quite difficult as there aren't guides related to this problem in my language, and I'd love to learn, If possible. So, thank you in advance for your time and patience, and sorry again for bothering. ^^
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,311
Country
United Kingdom
Short version. kiwi.ds' SDAT repacking tool is not great and seldom produces good outputs. Outside of the DS SDK it is the only one I know of though so you pretty much have to go manual for a lot of things, though you might be able to dodge the need for some of the really tedious stuff here.
Crystaltile2 ( http://filetrip.net/nds-downloads/utilities/download-crystaltile2-2010-09-06-f23649.html ) and tinke ( http://code.google.com/p/tinke/ ) have some ability to import files within SDAT, even if they would otherwise struggle to build one from scratch.

Yeah you should be able to swap the files around as much as you like. There are two occasions when it gets annoying
1) When you are swapping SSEQ files and the sound banks are not the same. If you can simply replace the bank then do so, if it is shared between others then find another bank to overwrite and redirect the SSEQ to that. I cover a variation on the theme for the hacking docs stick at the top of the forum ( http://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2014-edition-out.73394/ ).
2) When all the various voices/effects are bundled into one sub file, usually a SWAR. I encountered this when I was looking at Castlevania portrait of ruin -- there is a big archive of all the various voices (including odd things like the E3 presentation voiceover/demo voice) that totalled thousands of files... as Castlevania PoR has a button combo to launch the Japanese voices I just made a cheat to always have it happen ( https://gbatemp.net/threads/castlevania-portrait-of-ruin-us-undub-cheat.367014/ ). Theoretically though I could have gone through and repointed them.

On Italian ROM hacking guides I have seen a few and Italy has produced its fair share of good ROM hackers over the years. Guide wise there nothing quite to the extent of things I have seen in English but some good stuff I was considering translating from Italian to English (not that I speak a language spoken in Italy in centuries). I really should have noted the links. Poke around on http://gbarl.it/ for a while though and something should fall out.
Edit https://web.archive.org/web/20090605041501/http://www.freewebs.com/mgarrine_nds/ was one of them.
You might also want to have a look at the sites/nfos in things like http://www.romhacking.net/?page=tra...id=6&perpage=40&title=&author=&transsearch=Go as it would probably have been how I found the documents.

To that end there is not much point in answering the questions other than to say
1) yes, use tinke or crystaltile2, preferably tinke as CT2's import options can cause troubles.
2) If you converted them to wave and found what you want then change those. If it is just "WAVEARC_VOICE_HEROINE_ACT.swar and WAVEARC_VOICE_BASE_TIA.swar" then you can probably have it done in seconds with tinke.
3) kiwi.ds' tool is not great for this so this does not apply, generally you will want it to resemble the original as closely as you can and kiwi.ds' tool is not the best so yeah renaming is a good plan. Theoretically it should not matter -- I do not know if you have seen a SMAP file (vgmtoolbox would have made one) and the SDAT should be regenerated from that but again kiwi.ds' tool is not the best.

Do note that you will not be able to share a patch of this hack as you will have put in the copyrighted sound files -- it is the same reason we do not allow the conventional undub patches. A pity as it sounds like this will be a nice little hack but that is how this works.
 
  • Like
Reactions: Alpharage

Alpharage

Member
OP
Newcomer
Joined
Mar 31, 2015
Messages
13
Trophies
0
XP
114
Country
Germany
Short version. kiwi.ds' SDAT repacking tool is not great and seldom produces good outputs. Outside of the DS SDK it is the only one I know of though so you pretty much have to go manual for a lot of things, though you might be able to dodge the need for some of the really tedious stuff here.
Crystaltile2 ( http://filetrip.net/nds-downloads/utilities/download-crystaltile2-2010-09-06-f23649.html ) and tinke ( http://code.google.com/p/tinke/ ) have some ability to import files within SDAT, even if they would otherwise struggle to build one from scratch.

Yeah you should be able to swap the files around as much as you like. There are two occasions when it gets annoying
1) When you are swapping SSEQ files and the sound banks are not the same. If you can simply replace the bank then do so, if it is shared between others then find another bank to overwrite and redirect the SSEQ to that. I cover a variation on the theme for the hacking docs stick at the top of the forum ( http://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2014-edition-out.73394/ ).
2) When all the various voices/effects are bundled into one sub file, usually a SWAR. I encountered this when I was looking at Castlevania portrait of ruin -- there is a big archive of all the various voices (including odd things like the E3 presentation voiceover/demo voice) that totalled thousands of files... as Castlevania PoR has a button combo to launch the Japanese voices I just made a cheat to always have it happen ( https://gbatemp.net/threads/castlevania-portrait-of-ruin-us-undub-cheat.367014/ ). Theoretically though I could have gone through and repointed them.

On Italian ROM hacking guides I have seen a few and Italy has produced its fair share of good ROM hackers over the years. Guide wise there nothing quite to the extent of things I have seen in English but some good stuff I was considering translating from Italian to English (not that I speak a language spoken in Italy in centuries). I really should have noted the links. Poke around on http://gbarl.it/ for a while though and something should fall out.
Edit https://web.archive.org/web/20090605041501/http://www.freewebs.com/mgarrine_nds/ was one of them.
You might also want to have a look at the sites/nfos in things like http://www.romhacking.net/?page=tra...id=6&perpage=40&title=&author=&transsearch=Go as it would probably have been how I found the documents.

To that end there is not much point in answering the questions other than to say
1) yes, use tinke or crystaltile2, preferably tinke as CT2's import options can cause troubles.
2) If you converted them to wave and found what you want then change those. If it is just "WAVEARC_VOICE_HEROINE_ACT.swar and WAVEARC_VOICE_BASE_TIA.swar" then you can probably have it done in seconds with tinke.
3) kiwi.ds' tool is not great for this so this does not apply, generally you will want it to resemble the original as closely as you can and kiwi.ds' tool is not the best so yeah renaming is a good plan. Theoretically it should not matter -- I do not know if you have seen a SMAP file (vgmtoolbox would have made one) and the SDAT should be regenerated from that but again kiwi.ds' tool is not the best.

Do note that you will not be able to share a patch of this hack as you will have put in the copyrighted sound files -- it is the same reason we do not allow the conventional undub patches. A pity as it sounds like this will be a nice little hack but that is how this works.


Ah, I remember you! You helped me out also some time ago. Thanks to your detailed reply, even If at that time I didn't know what to do, I felt like trying, and managed to learn something good. Thank you very much! :3

Also this time, I've successfully managed to swap the files with Tinke, adding the file I needed! Thank you very, very much once again! It sounds just awesome with the english heroine voice and the japanes ones for all the rest, and it was easier than I thought! Ahaha I kinda feel stupid now. <3

As for the copyright matter, I totally understand, thank you very much for advertising. But, I only have the US version of the game, it does mean to play this nice hack I have to buy the japanese cart as well? That wouldn't be a problem and I'd do it but... just asking in case. xD


PS: There are, indeed, some nice guides in my languages and people working on translating games. What I meant is that I didn't find a guide covering sdat. files in my language. I'm very grateful for your help! <3
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,311
Country
United Kingdom
Don't feel bad -- if kiwi.ds' tool had worked similar to something like ndstool but for SDAT (which is a reasonable expectation and is what it was aiming for) then it sounds like what you did would have worked. It would have been a bit long winded given I imagine you did the hack in tinke with probably about 20 clicks from start to finish that ultimately changed far less of the ROM but it would have worked.

On copyright... there are probably three countries (plus however you want to view Europe) all competing to figure out what goes (did you violate US copyright, Italian or Japanese, or indeed none) and some stuff I am not sure I have seen tested in court. If you had a copy of each region's game then I guess they would have a hard time demonstrating loss but play that how you will. I would not lose any sleep over anything you have done here though. The purpose of the warning though was just so you did not take your nice new hack and try to share it with the forum and unintentionally violate the copyrighted material rules.
 

Alpharage

Member
OP
Newcomer
Joined
Mar 31, 2015
Messages
13
Trophies
0
XP
114
Country
Germany
Don't feel bad -- if kiwi.ds' tool had worked similar to something like ndstool but for SDAT (which is a reasonable expectation and is what it was aiming for) then it sounds like what you did would have worked. It would have been a bit long winded given I imagine you did the hack in tinke with probably about 20 clicks from start to finish that ultimately changed far less of the ROM but it would have worked.

On copyright... there are probably three countries (plus however you want to view Europe) all competing to figure out what goes (did you violate US copyright, Italian or Japanese, or indeed none) and some stuff I am not sure I have seen tested in court. If you had a copy of each region's game then I guess they would have a hard time demonstrating loss but play that how you will. I would not lose any sleep over anything you have done here though. The purpose of the warning though was just so you did not take your nice new hack and try to share it with the forum and unintentionally violate the copyrighted material rules.


Thank you very much for your kind words. x3
Truth to be said, I've tried to use Tinke before going through all that stuff, but at that time I didn't know how to extract as wav., so I couldn't locate the file I needed. Then I just kind forgot about Tinke at all and gone through the long way. I suppose it's not too bad that Kiwi.ds doesn't work properly in that specific thing, as Tinke can do it just fine... the program's however pretty useful to extract sdat. and its file into wav. for preview, I suppose. c:

And, I uderstand, thank you very much for explaining and for everything, really! :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • The Real Jdbye @ The Real Jdbye:
    the vram is one advantage when it comes to AI but ends up being slower even with that and really AI is the only use case that needs more than 12gb vram right now
  • Psionic Roshambo @ Psionic Roshambo:
    Interesting lol
  • Psionic Roshambo @ Psionic Roshambo:
    I think I watched a video where two games at 4K where eating just over 16GB of RAM and it's the one case where the 7900XT and XTX pulled ahead (minus RTX of course)
  • Psionic Roshambo @ Psionic Roshambo:
    So my opinion is that they could age a bit better in the future, and maybe AMD will continue improving them via drivers like they tend to do. No guarantee there but they have done it in the past. Just a feeling I have.
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
    Psionic Roshambo @ Psionic Roshambo: @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to...