Hacking [Completed] Legend of Heroes: Trails in the Sky SC PSP Undub

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
Edit: Finished Disc 1 and Disc 2! Links at the bottom of this post.
----------------------------------------------------------------------------------------------
Not sure if anyone else has tried this before, but I have attempted to undub Trails in the Sky SC.

I have done this so far using UMDgen:

1. Extracted the Japanese ed6txxxx.vag voice files,
2. Replaced the English ed6txxxx.vag voice files (There are a total of 504 ed6txxxx voice files for both regions so there's no renaming jank needed here)
3. Restored LBA Integrity (This is so the game can actually run, otherwise it will black screen on startup)
4. Saving the completed project and running it in PPSSPP to test, yet my results yield english voices in battle still.

So far, as to double check my patched ISO has the right files, I re-extracted the voice files from the completed project, and they are the japanese voices that I patched in.

My problem is now that even though there are no english voice files within the ISO, (I am assuming this since I replaced every single one) english voice files still continue to play during gameplay.

What am I doing wrong with UMDgen? Is there a separate location where hidden voice files are called from? if so, I can't find them.

tl;dr Replaced English voice bits with Japanese voice bits and English voices still play even though they don't exist within the ISO anymore (Or so I think)

Also using Windows 10 if that makes any difference
----------------------------------------------------------------------------------------------
EDIT: Finished the Undub. Thanks again to flame1234 for helping me out. Patches are in .xdelta format, I can't upload .xdelta using the forum's Upload File button so I uploaded it to google drive instead. Hopefully it works for everyone and enjoy the undubbed battle voices!

Disc 1 Patch
https://drive.google.com/open?id=0B7MhjHaUoHoNU2lsOEEwcmRvMFk

Disc 2 Patch
https://drive.google.com/open?id=0B7MhjHaUoHoNbm1Neml5MEFiYkU
 
Last edited by KawaiiOtakuLord,
  • Like
Reactions: zeropain and Weyu

Zander1995

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
310
Trophies
0
Age
26
XP
678
Country
United States
It's entirely possible that it has a secondary archive holding the files that it calls. Had a similar problem when I attempted to replace graphics in Corpse Party PSP. I'd replace the graphic, but it wouldn't show up in-game because the game called a different file completely.

And not trying to be rude, but you made sure to run the correct ISO right? It could also be a simple mistake of running the wrong ISO.
 

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
Yeah at first I thought I ran the wrong ISO, but it's the right one with the japanese voice files patched in and english voices still playing.

I even dummied out the english sound files in the US ISO but the voices are still playing so I have no idea what to do. There's tons of files with arbitrary names with no rhyme or reason to them so I have no idea where to start to find the real voice file locations
 

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
954
Country
United States
There are packed files.

Convert your sounds vag -> wav (or whatever) using MFAudio.
ID the sounds you want to change.
Do a find in files search/grep/whatever you want to call it (is there a name for this operation?). Look for those vag filenames you ID'd within packed files and dummy them out.
Dummy them out: see the instructions here: http://gbatemp.net/threads/brandish-the-dark-revenant-translation.364870/page-5#post-4993638
Those entries will be 0x20 bytes long with the filename as the first 0x10 bytes.
Put any changed files back into the ISO and also delete those .vag files you ID'd from the se folder.
There's no need to change LBAs for any of that. I used UMDgen filelist export/import to just use the same data alignment as the original for this task in other games.
The EN voices should stop playing.
-------------------------------
At this point you need to add back the JA voices and you're done.
------------------------------
More info about what's happening:
The data in those packed files is compressed but you don't need to worry about the compression to do what you're doing.
Why is it compressed? Simple: the UMD drive is horribly slow. To speed up loading for real UMDs, these packed files. They're loaded into memory and they have a TOC on-board for the engine to know what file is where. Seeking (slow) is totally eliminated, or more accurately it only seeks once for a scene rather than once for each file needed. Data is then decompressed as needed during the scene. You're not using UMD, so this optimization is not needed anymore. The game is programmed to use the back-up files on the UMD if the needed files can't be found within the currently loaded packed files for whatever reason.

As you noted, if the necessary data IS present in the packed files, the backup copies on the UMD are totally ignored.
 

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
There are packed files.

Convert your sounds vag -> wav (or whatever) using MFAudio.
ID the sounds you want to change.
Do a find in files search/grep/whatever you want to call it (is there a name for this operation?). Look for those vag filenames you ID'd within packed files and dummy them out.
Dummy them out: see the instructions here: http://gbatemp.net/threads/brandish-the-dark-revenant-translation.364870/page-5#post-4993638
Those entries will be 0x20 bytes long with the filename as the first 0x10 bytes.
Put any changed files back into the ISO and also delete those .vag files you ID'd from the se folder.
There's no need to change LBAs for any of that. I used UMDgen filelist export/import to just use the same data alignment as the original for this task in other games.
The EN voices should stop playing.
-------------------------------
At this point you need to add back the JA voices and you're done.
------------------------------
More info about what's happening:
The data in those packed files is compressed but you don't need to worry about the compression to do what you're doing.
Why is it compressed? Simple: the UMD drive is horribly slow. To speed up loading for real UMDs, these packed files. They're loaded into memory and they have a TOC on-board for the engine to know what file is where. Seeking (slow) is totally eliminated, or more accurately it only seeks once for a scene rather than once for each file needed. Data is then decompressed as needed during the scene. You're not using UMD, so this optimization is not needed anymore. The game is programmed to use the back-up files on the UMD if the needed files can't be found within the currently loaded packed files for whatever reason.

As you noted, if the necessary data IS present in the packed files, the backup copies on the UMD are totally ignored.

Alright I think I am on the right track, correct me if I am wrong but I believe to have found one packed file that contain 3-4 compressed .wavs and .vags.

Looking through some other files, they seem to be the same case but there are atleast 1500 individual files that need to be edited to dummy out the voice files within them.

What's the quickest way to grep or whatever to search for the filenames? I've just been using a hex editor to individually look at every single file and seeing what they contain, as some of the files don't even contain voice files at all.

The voice files being ed6txxxx.vag and ed6txxxx.wav

I also think it's really weird that Trails in the Sky SC uses some weird UMD compression technique even though it's digital only in the US (but that's probably because it was physical in Japan)
compressed vag.jpg
compressed wav.jpg


Is this what I am looking for? Should I replace these filenames with 00's now? I know which files are to look for so I will spend some time looking into every file for them, dummy it out within this supposedly packed file (I still don't know if this is the right file to begin with) and hopefully get some results. I would appreciate a faster way to do this instead of manually looking through every file with a hex editor one by one though.
 
Last edited by KawaiiOtakuLord,

flame1234

Well-Known Member
Member
Joined
May 17, 2009
Messages
734
Trophies
0
XP
954
Country
United States
You're on the right track. Those are them. You're actually almost done. Nothing to do but try it.
You don't need to touch file contents, just the 0x20 byte TOC entries.
The game will search through the TOC, fail to find your files, and then access the backup copies.

Use find in files. I don't know how to use grep, but you could use that too (Google search to figure it out).
The main reason to use is it's faster, you could manually search too if you like but it will be slower and you may miss something.
Find in files in wxMEdit: CTRL+SHIFT+F
Capture.JPG
 

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
You're on the right track. Those are them. You're actually almost done. Nothing to do but try it.
You don't need to touch file contents, just the 0x20 byte TOC entries.
The game will search through the TOC, fail to find your files, and then access the backup copies.

Use find in files. I don't know how to use grep, but you could use that too (Google search to figure it out).
The main reason to use is it's faster, you could manually search too if you like but it will be slower and you may miss something.
Find in files in wxMEdit: CTRL+SHIFT+F
View attachment 66552

Whoa. It definitely worked! I'm actually kind of stunned. Thanks for helping me figure this stuff out man! You're a beast. :D
After dummying out the TOC entries, it finally started calling the files from the se folder like you said.
 

jijisama

Well-Known Member
Newcomer
Joined
Aug 19, 2014
Messages
54
Trophies
0
Age
34
XP
533
Country
Morocco
it's work man thank you very much @KawaiiOtakuLord i patch the game with delta patcher tested it in ppsspp and work time to finish the scond chapter i was waiting for the undub and you make it ! and i will not forget @flame1234 for the help man you are awsome respect to all the community
 
Last edited by jijisama,
  • Like
Reactions: KawaiiOtakuLord

asakapa619

Well-Known Member
Newcomer
Joined
Nov 25, 2012
Messages
75
Trophies
0
XP
396
Country
Philippines
Finally, @KawaiiOtakuLord thank u so much for ur effort to undub this piece of gem :) and also tnx to @flame1234 u guys are awesome!

BTW im on disc 2 final boss and when Estelle dies she said "Im sorry" sometimes, but most of the time in japanese, its not a big deal but just want u to know.
 
Last edited by asakapa619,

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
Finally, @KawaiiOtakuLord thank u so much for ur effort to undub this piece of gem :) and also tnx to @flame1234 u guys are awesome!

BTW im on disc 2 final boss and when Estelle dies she said "Im sorry" sometimes, but most of the time in japanese, its not a big deal but just want u to know.

Glad to see you're enjoying my work! It means alot to me to hear you say that! :D

Also, are you loading a savestate into battle on PPSSPP? If so then some english voice clips are saved with the savestate.
This only happens if you are loading a savestate of when the game has the english files already loaded. So basically any savestate in battle before you patched it. Voices go back to Japanese once you get to the next battle however.

You can also load your file in-game to avoid this issue and then you can make new savestates.

If this isn't the case then I can always re-do the Disc 2 patch.
 
D

Deleted User

Guest
Haven't played this game but i did a quick look and nobody talks it's all tururururururuurur rururur rururur ruruur ruururururur ururur well you get the idea.
I was hoping for the annoying dub but i can't find it, is it just battles?
 

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
Haven't played this game but i did a quick look and nobody talks it's all tururururururuurur rururur rururur ruruur ruururururur ururur well you get the idea.
I was hoping for the annoying dub but i can't find it, is it just battles?

Yes it's just battle voices, only the EVO version made for Vita is fully voiced
 

asakapa619

Well-Known Member
Newcomer
Joined
Nov 25, 2012
Messages
75
Trophies
0
XP
396
Country
Philippines
Glad to see you're enjoying my work! It means alot to me to hear you say that! :D

Also, are you loading a savestate into battle on PPSSPP? If so then some english voice clips are saved with the savestate.
This only happens if you are loading a savestate of when the game has the english files already loaded. So basically any savestate in battle before you patched it. Voices go back to Japanese once you get to the next battle however.

You can also load your file in-game to avoid this issue and then you can make new savestates.

If this isn't the case then I can always re-do the Disc 2 patch.

Not only disc-2 but also i did check disc-1 loading my save @ beginning of the game, and yeah the ENG voice is still there when estelle dies, btw im playing it in my psp and using loaded save game, just wanna ask if starting a new save file will fix it? again tnx for the undub glad that i check this thread once in a while hoping that someone might undub this game! guess my prayers are answered :)
 
Last edited by asakapa619,

KawaiiOtakuLord

Member
OP
Newcomer
Joined
Dec 1, 2015
Messages
10
Trophies
0
Age
28
XP
106
Country
United States
Not only disc-2 but also i did check disc-1 loading my save @ beginning of the game, and yeah the ENG voice is still there when estelle dies, btw im playing it in my psp and using loaded save game

It may show different results on console, but in emulator her death quote is only in Japanese for me and I have no way to test it on console since my PSP is currently broken so I can't really test it ATM, but check your PMs, I sent you a way to fix it
 

asakapa619

Well-Known Member
Newcomer
Joined
Nov 25, 2012
Messages
75
Trophies
0
XP
396
Country
Philippines
Now all that is left is the 3rd chapter hope someone will translate that too, i know its doesn't have a massive script to translate unlike FC & SC and i still have a copy of it in japanese if somebody might take interest in translating it in ENG :)
 

Zander1995

Well-Known Member
Member
Joined
Nov 11, 2015
Messages
310
Trophies
0
Age
26
XP
678
Country
United States
Its nice to hear from XSEED, but what i mean is that hope someone will translate the psp version aswell :)
Not likely. Too much work just to port a translation when the PC version is already going to be vastly superior and the Vita version is much better than both.
 
General chit-chat
Help Users
  • mr_switch @ mr_switch:
    same
    Gift
  • Veho @ Veho:
    TRJ, I learned all those in school/college.
    Gift
  • Veho @ Veho:
    As part of some course or other.
    Gift
  • Veho @ Veho:
    I forgot to list Assembler, Pascal and Matlab scripting.
    Gift
  • phalk @ phalk:
    I know some pascal, c, php
    Gift
  • phalk @ phalk:
    and I'm a History teacher
    Gift
  • Veho @ Veho:
    Went over the basics in all of them, never took it anywhere.
    Gift
  • Veho @ Veho:
    I do use bash for my job though. It's useful.
    Gift
  • phalk @ phalk:
    Assembler is something I always wanted to learn
    Gift
  • phalk @ phalk:
    but.... nah
    Gift
  • Veho @ Veho:
    No point really.
    Gift
  • Veho @ Veho:
    Even the simplest device these days runs some sort of high level language.
    Gift
  • The Real Jdbye @ The Real Jdbye:
    @Veho all the IT stuff i've learned in school has been extremely basic... i knew most of it already
    Gift
  • The Real Jdbye @ The Real Jdbye:
    it's better to learn on your own, it goes much faster than the snail pace they teach you at in school
    Gift
  • Coto @ Coto:
    assembly is actually great, gets you to run everything about 80% faster than C massaged code
    Gift
  • Coto @ Coto:
    assembler syntax is dead easy, but "how to put pieces together" logic requires to have in mind the original idea, and the CPU layout, and that's like double the work of C stuff. It's best to write C first, add some unit tests, then go assembly, then run the unit tests
    Gift
  • The Real Jdbye @ The Real Jdbye:
    it can run faster than compiled code, but modern compilers are really good at optimization and you need to be even better at assembly to do a better job
    Gift
  • Coto @ Coto:
    with that all your assembler base will actually work
    Gift
  • Coto @ Coto:
    even on embedded systems, without a damned debugger
    Gift
  • The Real Jdbye @ The Real Jdbye:
    syntax is easy but the code is hard to read, you can't look at a piece of code and expect to understand it without looking at all the code around it to see how it all works together so it takes much longer to read the code, it takes longer to write it too because what might be 1 line of code in C might be 20 lines of assembly
    Gift
  • The Real Jdbye @ The Real Jdbye:
    the language is very simple to understand (because it's barely a language at all) understanding how all the instructions work together to form a whole is another matter, in general it's such a pain to work with that i would never recommend it unless you have a need for it. don't listen to this guy and learn assembly just because you want to make your code run faster, you are wasting your time, but if you run into a situation where your code isn't fast enough even after you enabled -Ofast and you NEED it to be faster, then you can consider assembly
    Gift
  • The Real Jdbye @ The Real Jdbye:
    @Coto have you tried -Ofast btw? ;)
    Gift
  • Gift
  • Psionic Roshambo @ Psionic Roshambo:
    I have o fast before but I suspect we are talking different Os lol
    Gift
  • Gift
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/bDoEWJP4D_Q