ROM Hack Found obscure audio format in romfs, don't know how to open, unpack, or edit

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
So I was taking my first stab at making a layeredfs patch. I was hoping to make some audio mods to Marvel Ultimate Alliance 3 (seemed simple enough). For some reason the audio files in the romfs are either compressed or contained in this strange .ktsl2stbin\.ktsl2asbin format, which I have no idea how to edit into a playable format. Is this a normal thing to encounter when working with game audio? and does anyone know how to approach modifying these types of files.
 

masagrator

The patches guy
Member
Joined
Oct 14, 2018
Messages
5,335
Trophies
2
XP
9,721
Country
Poland
First question: yes
Second: if you have some experience, you can check with Hex editor if they are compressed or not. Probably one file contains Information about data from second file.

--------------------- MERGED ---------------------------

For example check if you can find
Code:
RIFF
In files with Hex editor. If they are common, then they are not compressed and using standard WAVE format.
 
Last edited by masagrator,

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
First question: yes
Second: if you have some experience, you can check with Hex editor if they are compressed or not. Probably one file contains Information about data from second file.

--------------------- MERGED ---------------------------

For example check if you can find
Code:
RIFF
In files with Hex editor. If they are common, then they are not compressed and using standard WAVE format.

Thanks! I made some solid progress with extracting them! Now to recompile...
 

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
I usually use Foobar2000 on windows to play audio files from switch games. It can then be converted to any common format like MP3 or M4A. Not sure if it helps, but I tried. :ninja:

That's what I ended up doing. Now I'm trying to find a way to convert common formats back to the weird one so that I can repack a new soundtrack.

So, what format are they really?

The extension is .ktss, which is really .kns, a format used by Koei Tecmo. Problem is they don't seem to have a standardized implementation across all of their games (different hex headers and other subformats), so there isn't anything at the moment for converting between this and standard formats.
 
  • Like
Reactions: OrGoN3

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
So I made some progress. I was able to use a dsp to ktss converter to get the replacement audio into the same format as the extracted parts (ktss). Everything plays fine in Foobar2000. However, I tried to replace the contents of the original ktslstbin file with hex editor and the game couldn't read the file at all (it booted, just without audio). Maybe because the replacement audio is larger than the original, which overwrote the padding and probably into the next track? Not sure if I can offset everything else because the game might be looking for specific headers for each audio file. So I may be restricted to the original track length. Hope that all makes sense. Thoughts anyone?
 

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
Got it! Here's a sample if anyone wants to try it out. I replaced the main menu theme (which sucks in my opinion) with the Avengers (2012) theme. Unfortunately I couldn't figure out loop points, so it only plays once, but that's fine for menu navigation for me. I was gonna do more but since I haven't worked out a script for easy repacking it would take a lonnggg time. Thank you everyone!

https://drive.google.com/file/d/14ATi_ImlCrhpUWRlvSUsypewwffGl4WY/view?usp=sharing
 
Last edited by RobCat030,

RobCat030

Active Member
OP
Newcomer
Joined
May 29, 2018
Messages
32
Trophies
0
Age
25
XP
341
Country
United States
May I ask you how you managed to extract the sounds from MUA 3? I've been wondering how to do that

Oof, not sure if I can remember but it wasn't easy. Once you have the romfs extracted, you need to extract the ktsl2stbin from the SOUNDS folder (not asbin, not sure how to extract those or what they contain). Put this in a batch file and drop onto it (courtesy of somebody named "Pingu!" on XeNTaX):

Code:
get BASENAME basename
for FILES = 0
    FindLoc OFFSET string "KTSS" ""
    if OFFSET == ""
        cleanexit
    endif
    goto OFFSET
    idstring "KTSS"
    get SIZE long
    set NAME string ""
    string NAME p "%s_%s.ktss" BASENAME FILES
    log NAME OFFSET SIZE
next FILES

Then you need a media player called foobar2000 and a plugin called vgmstream (google).

Hope this helps. If you can't work it out I can send you extracted and converted audio files (just tell me which one). Converting new wav files to recompile the ktsl2stbin is a whole other mess lol.
 

You may also like...

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Psi has a new girlfriend but I have known her for like 28 years
    +1
  • The Catboy @ The Catboy:
    Is she you?
    +1
  • K3N1 @ K3N1:
    Psi just become a sparkling vampire already
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The Catboy it's weird there was always something between us.... But neither of us was single at the same time.... But last night we found out we both are... And hmmm 🥰
  • Psionic Roshambo @ Psionic Roshambo:
    She has all my weak points smart funny blonde and she lights up the room when she walks in and nothing else exists when she is there
  • Psionic Roshambo @ Psionic Roshambo:
    I would eat the corn out of her.... Lol
  • Veho @ Veho:
    Psi! You're alive!
  • Veho @ Veho:
    ...and you have yet another new
    girlfried :rolleyes:
  • Veho @ Veho:
    MAKE HER SIGH A PRENUP
  • cearp @ cearp:
    PSI <3 🌽
  • Psionic Roshambo @ Psionic Roshambo:
    Lol Veho I'm down to 3
  • Psionic Roshambo @ Psionic Roshambo:
    Dumping one soon
  • Psionic Roshambo @ Psionic Roshambo:
    My Facebook has like 120 women now or something lol
  • Psionic Roshambo @ Psionic Roshambo:
    Each one hotter than the last...
  • K3N1 @ K3N1:
    Ordered a new SSD
  • Psionic Roshambo @ Psionic Roshambo:
    Your mom's an SSD lol
  • K3N1 @ K3N1:
    Your mom writes to me fast
  • K3N1 @ K3N1:
    I haven't placed an order with Newegg since like 2016 lol
  • Psionic Roshambo @ Psionic Roshambo:
    Amazon Is better lol
  • K3N1 @ K3N1:
    Hard to find a fast 2tb SSD for 130
  • Peretti @ Peretti:
    lately I downloaded super mario galaxy for wii, but in the first phase, right in the first cutscene of the game, the game freezes in that part, with the image appearing but completely frozen. I already had this problem with pikmin 2 but in the end I couldn't fix the problem. Has anyone had this problem, and if so, did you find a solution?
    Peretti @ Peretti: lately I downloaded super mario galaxy for wii, but in the first phase, right in the first...