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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ATRAC3+ decoding idea
#1
Apparently there's a way to decode ATRAC3+ on a PSP using it's SDK. The following blog post contains sample C code to do it: http://cooleyes.fx-world.org/blog/?p=3

Basically it means that *probably* one could extract at3+ files from the game using jpcsp, transfer them to PSP and then decode them to PCM WAV (see the code). Then these files could be transferred back to PC and encoded with FLAC to avoid further lossless compression artifacts and to save space. Now everytime jpcsp hits dreaded thing during emulation it just needs to substitute it with proper converted FLAC counterpart.

Sure, it will require a PSP to do the conversion, space needed to store games will go up more than twice in size, but given current state of things with ATRAC3+ decoding (unlikely to happen at all) this might be the only chance to get rid of SonicStage or SoundForge for proper sound emulation and keep it all legal.

What do you think?
Reply
#2
1. Using anything from the official SDK is illegal.
2. If you do the effore to replace the files from the temp audio directory why would you use re-encodes from PSP? Just replace them with real PCM audio from the OST Disc, I did that on Kingdom: Hearts Birth By Sleep which gives a 200% boost in audio quality and clarity.
3. Using Flacs instead of WAVS it's indeed a good idea, i thought of it too BUT it draws quite alot of resources to decode which is not a good idea for PCs that are just barely being able to play some games. On top of that, straight decode from OMA to FLAC is impossible, you need to inject a third process/encoder from OMA to WAV to Flac which would add a huge lag.
4. Not every game uses that version of encoded ATRACs (KH:BBS example) and the current way of decoding (via soundstage) is more universal than the one on the SDK.

What you can do is write a decoder using stuff/source from the most late SDK of PS3 that leaked trying to get rid all of the Sony-copyrighted code and put it internaly on JPCSP which would defeat the reason to decode first to wav and then playback.
Reply
#3
Is better wait for Hykem to appear because he was working on it. As told by Shadow:
Shadow Wrote:Also hykem is about to make work atrac3+ codec so we might not need sonicstage in near future Big Grin
[Image: montcer.png]
Reply
#4
(09-12-2012, 01:49 AM)montcer9012 Wrote: Is better wait for Hykem to appear because he was working on it. As told by Shadow:
Shadow Wrote:Also hykem is about to make work atrac3+ codec so we might not need sonicstage in near future Big Grin
This is what I meant with that, I bet Shadow has exactly the same idea with:

(09-12-2012, 12:07 AM)VIRGIN KLM Wrote: What you can do is write a decoder using stuff/source from the most late SDK of PS3 that leaked trying to get rid all of the Sony-copyrighted code and put it internaly on JPCSP which would defeat the reason to decode first to wav and then playback.

I hope this won't mean that after this I won't be able to replace my audio files with my own WAVs because it's technically a way/mod to archieve better audio quality than from the one provided from game developers. You can consider this trick an equaly good quality upgrade mod like higher internal resolutions.
:'(

Reply
#5
knws, jpcsp already has "Jpcsp connector" to decoded files on the PSP you can find it under \ms0\PSP\GAME\JpcspConnector\ , though it might need some tweaking since most people opted to use the sonic stage solution and the old decode on psp way has been slowly depreciating.

It's been awhile since anything was heard from hykem, though he could still be working on it behind the scenes or maybe just really busy, as for an internal at3+ decoder it would probably not need to be decoded to wav first like the current implementation so I assume it would completely depreciate the need for the wav files.

btw
Actually the only need for sonic stage is for the "wavewriter" codec, the real magic happens in the OpenMG codec (this can be installed separately from ss) ... I was going to re-write himd to not use the wavewriter codec and to use something else so then the only requirement would be the openmg codec, but that kindof fell out of my priority's since hykem was working on a better solution and I have 0 free time now. :X
   
Reply
#6
(09-12-2012, 12:07 AM)VIRGIN KLM Wrote: 1. Using anything from the official SDK is illegal.
Shit... Sony. I should've expected that.

(09-12-2012, 04:51 AM)hyakki Wrote: I was going to re-write himd to not use the wavewriter codec and to use something else so then the only requirement would be the openmg codec, but that kindof fell out of my priority's since hykem was working on a better solution and I have 0 free time now. :X
I hope you would find some time to make it happen. It will be easier to bear with only one component instead of whole SS thing.

By the way... I have only few PSP titles and not interested in anything right now. Is it possible to run jpcsp, decode everything from game in tmp folder (using SS by now) and then just uninstall the thing. With everything decoded there should be no need for SS anymore to play particular decoded game, right?
Reply
#7
Okays, I finally have some progress on isolation. This is what I've done:

1. Create a folder somewhere, jpcsp\atrac3+ for example.

2. With SS installed fetch SonyWavWriter.ax from C:\Program Files\Common Files\Sony Shared\AVLib.
Adjust Program Files part to your architecture. Put it inside the folder.

2. Now remove SS entirely. All components. Delete Sony registry entries from HKLM/HKCU,
clean C:\ProgramData and all Sony files under C:\Program Files and C:\Program Files\Common Files
that could be left by the uninstaller. Reboot.

3. During installation of SonicStage it downloads it's components from Sony servers.
Stop installation process after it's done downloading and fetch openmgsetup.zip
from your local tamp folder. Delete anything else. Put it in the folder.

4. Now extract openmgsetup.zip to openmgsetup subdirectory and install it.

5. Create install.bat file in the folder, near SonyWavWriter.ax, with the following contents:

Code:
@echo off

regsvr32.exe "%~dp0SonyWavWriter.ax"

And run it as administrator.

6. uninstall.bat to undo operation:

Code:
@echo off

regsvr32.exe /u "%~dp0SonyWavWriter.ax"

7. Try running jpcsp with Media Engine / SS decoding enabled and it all should work.

Now I just need to get rid of OpenMG installer and make this module portable.
Of course this won't be possible to distribute with jpcsp but at least it is something one
would be able to repeat on his/her side to get rid of all unnecessary SS junk.
Reply
#8
(09-12-2012, 12:29 PM)knws Wrote: Is it possible to run jpcsp, decode everything from game in tmp folder (using SS by now) and then just uninstall the thing. With everything decoded there should be no need for SS anymore to play particular decoded game, right?
You are right; if you look close onto your JPCSP tmp folder, for those games that need be decoded will be 2 files with the same name; one will be .oma and the other one is the .wav file that JPCSP will use because is the audio already decoded.

About SonicStage thing, is better do not modify Sony software because ... Sony has copyrighted all that and modify it without they permission will be considered as an infringement of their EULA product; that's why SonicStage must be installed stand-alone from JPCSP instead being packed with the emulator.

On the other side, i do understand you and i am sure everybody agree that install SonicStage/SoundForge (Which isn't free) just to play PSP games on all his glory is a really pain in the ass. Thanks for your tips on this subject.
[Image: montcer.png]
Reply
#9
(09-12-2012, 04:27 PM)montcer9012 Wrote: You are right; if you look close onto your JPCSP tmp folder, for those games that need be decoded will be 2 files with the same name; one will be .oma and the other one is the .wav file that JPCSP will use because is the audio already decoded.
These files only appear as I advance through the game. In order to get them all decoded I would need to finish the game entirely.

I need jpcsp to somehow batch-convert everything from game ISO without going through every game. I know that in past something like that was supported.

(09-12-2012, 04:27 PM)montcer9012 Wrote: About SonicStage thing, is better do not modify Sony software because ... Sony has copyrighted all that and modify it without they permission will be considered as an infringement of their EULA product; that's why SonicStage must be installed stand-alone from JPCSP instead being packed with the emulator.
There's nothing in SS EULA that prevents me from isolating it on my own PC and posting instructions here. Plus, everyone in US, for example, automatically have a right to backup thier software under 17 U.S.C. § 117 (http://www.law.cornell.edu/uscode/text/17/117) so any EULA which deems this as illegal is simply breaking US laws.
Reply
#10
(09-12-2012, 05:50 PM)knws Wrote: There's nothing in SS EULA that prevents me from isolating it on my own PC and posting instructions here. Plus, everyone in US, for example, automatically have a right to backup thier software under 17 U.S.C. § 117 (http://www.law.cornell.edu/uscode/text/17/117) so any EULA which deems this as illegal is simply breaking US laws.
Yeah, but EEUU flag only have 50 starts because they only own 50 states; not the globe (Yet). SS EULA is a Japanese contract which means that if you agree with that contract you agree to be under Japanese laws and for sure, Japanese laws will protect SONY. For sure you can put the instructions, but everybody that does it will break SONY's license and there's the problem; when you install SS you agree with his EULA and modifying SS break the agreement you did before.

And yes, SS's EULA forbidden modify SS software and in that case, using only a part of the product instead the whole product. Look:
SonicStage EULA.txt 18 KB Wrote:DESCRIPTION OF REQUIREMENTS, RESTRICTIONS, RIGHTS AND LIMITATIONS
Limitation on Reverse Engineering, Decompilation and Disassembly. You may not modify, reverse engineer, decompile, or disassemble the SOFTWARE in whole or in part.
Separation of Components. The SOFTWARE is licensed as a single product. Its component parts may not be separated for use on more than one computer unless expressly authorized by Sony.
...
GOVERNING LAW AND JURISDICTION
This EULA shall be governed by the laws of Japan...

Sony is one of the most protected companies man; remember what happen to GeoHot when he JailBreak PS3 OS; just for that he can't even say PS3, PlayStation, PSN and every brands that SONY own. Also, Japan is not an occidental country, which means they don't use our law system based on UK rules so even you are on the EEUU break the agreement on the EULA still break the contract.

As i say, i understand that you wanna help and you are welcome for that! However, Sony copyrighted material limit not only you, but developers of JPCSP to make a better work.
[Image: montcer.png]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)