This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Valkyria Chronicles 2 - ULUS10515
#21
(04-11-2011, 07:50 PM)Szarikow Wrote:
(04-03-2011, 03:20 PM)Hykem Wrote: Hmm...
Looks like this game attempts to load audio streams using an archive format (.AFS). This format has been starting to show up a lot lately. Undecided
I'm guessing the failed attempts to load those files may be one of the causes for the massive consumption of memory, so I'll see if FFMPEG can parse this format properly and look for the right streams only.

I do understand that the memory leak will get fixed eventually when proper .AFS support is implemented, but would it be possible to make some temporary solution to prevent those leaks?

Could you check this game with the latest revision, r2068? The fact that the async IO thread is now handling the file closing may help some games that repeatedly attempt to open/close the same files, but I suspect this will only get properly fixed after getting the decoder to recognize .AFS files. Sad
As a workaround, I believe there's a tool called adx2wav which may be capable of parsing the sound data from those archive files. But you would still have to replace all the files. Undecided
Reply
#22
Same stuff happens in r2068. I'll try the adx2wav. There is something I don't understand here though. Both music and voices are in ASF files. The music does not work, but somehow the voices do.
Reply
#23
I took a quick look at OD_STREAM.AFS, and it seems adx2wave can do the simple files like battle victory (play once audio not the kind that loops) but the big files (i assume these are the bgm?) it cant decode
so i'm thinking Jpcsp can handle the simple files (i heard the battle victory one play in jpcsp when i beat the first battle) but it has the same problem that adx2wav has with the big files ..but i could be wrong Smile


Attached Files Thumbnail(s)
   

.rar   log.rar (Size: 4.9 KB / Downloads: 92)
Reply
#24
I'm surprised SEGA still uses same file formats on PSP as they did on Dreamcast. So I extracted the files but I am not exactly sure how to put the wav files back into an ASF file.

Edit: I got critical exception from adx2wav, but I converted those using adxutil (those tracks sure are the BGMs). There is a Winamp plugin (written in c or c++ with source avilable) which plays ADX files just fine, though I have no idea if it supports looping. The plugin is called "Rob's ADX Plugin", but "IN_ADX" is probably easier to find Wink

Edit: All the ADX files in OD_Voice.ASF are tiny (and yes they contain the voices).

At least we learned something. We know jpcsp can't handle ADX files above certain size (somewhere around 1MB).
I wonder if ADX playback in general is causing the leaks or only those "big" files.
Reply
#25
(04-11-2011, 10:31 PM)Szarikow Wrote: I'm surprised SEGA still uses same file formats on PSP as they did on Dreamcast. So I extracted the files but I am not exactly sure how to put the wav files back into an ASF file.

Edit: I got critical exception from adx2wav, but I converted those using adxutil (those tracks sure are the BGMs). There is a Winamp plugin (written in c or c++ with source avilable) which plays ADX files just fine, though I have no idea if it supports looping. The plugin is called "Rob's ADX Plugin", but "IN_ADX" is probably easier to find Wink

Edit: All the ADX files in OD_Voice.ASF are tiny (and yes they contain the voices).

At least we learned something. We know jpcsp can't handle ADX files above certain size (somewhere around 1MB).
I wonder ADX playback in general is causing the leaks or only those "big" files.

Interesting, I was fooling around with another game that uses AFS files (Hexyz force) , and found out all the battle voice files can also be converted to wav (these don't decode with jpcsp either), oddly enough only the adxutil or the winamp plugin can convert them to wav (adx2wav doesn't do anything) and they are small files.

Im going to look into ffmpeg and see if there is a better decoder for the format, I looks like the adx support in ffmpeg is based off the adx2wav source

Edit:::
I found a new adx2wav (DC/SS adx to wav converter by bero)(44kb filesize and command line - but its oblivious modified from beros adx2wav(11kb))
anyhow this one can convert to wav the problem files from before it can also do the hexyz force afs files too, maybe it could work as another external decoder like himd


Attached Files Thumbnail(s)
   
Reply
#26
I see your ADXutil has a GUI. I was using a command line app (but it had the same name).
Reply
#27
That screenshot was before I found the other program <but the gui was useful since it told me what files had audio in them>.
I wanted to temporarily swap HIMDRENDER with the cmd of adx2wav (and change the bat file to accommodate the program) to see if it would auto decode, but I guess the OMA files get the headers (and content?) modified by jpcsp so it didn't work like I planned...
not to mention avx2wav outputs the files at 22050 hz , when jpcsp needs them in 44100 hz (would of worked but sounded funny) ...
Long story short I manually renamed and re-encoded some files then moved them to the Atrac dir to test and it worked jpcsp played voices in Hexyz Force (using the decoded files) ....
(I couldn't do this game since it doesn't put the files in the Atrac dir)

I think Jpcsp is going to need another external decoder (or another way to decode these files) since some adx files ffmpeg can't handle
Reply
#28
The command line ADXutil does output 44,1kHz and even handles ASF files. I wonder if it is possible to have jpcsp use decrypted wav files from outside the UMD image.

I managed to replace the ADX BGMs with wav ones in the AFS file and put it back onto the UMD image, but... jpcsp still tries to decode them as ADX files so there is no difference.
Oddly enough some of the wavs from the modified OD_STREAM.AFS file do play (same ones which played from the original AFS file in ADX format), but that's probably because those are small enough (like fanfares when you change class or win battle). Here is an INFO log (probably won't show anything new).

Maybe I should try using mp3 files and make all of them smaller than 1MB...

Edit: So I tested the mp3 files, but unlike the wav files thy are not played at all.


Attached Files
.7z   log.7z (Size: 2.23 KB / Downloads: 75)
Reply
#29
The decoding of small audio buffers has been improved in r2070. Does it help?
Reply
#30
(04-12-2011, 04:54 PM)gid15 Wrote: The decoding of small audio buffers has been improved in r2070. Does it help?

Unfortunately no.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)