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:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch audio dumping
#1
I wanted everything at onceSmile
Picked up the wav ripper, looked into the hex editor, and did two things:
1) stupid hack
Code:
//AtracCodec.java
//-----------------------------------------------------------------------------------------------------------------------------------
    protected String generateID(int address, int length, int fileSize) {
        int hashCode1 = Hash.getHashCodeFloatingMemory(0, address+60, 1);
        int hashCode2 = Hash.getHashCodeFloatingMemory(0, address+444, 1);
        int hashCode3 = Hash.getHashCodeFloatingMemory(0, address+2000, 1);
        String tmpstring;
        tmpstring = String.format("Atrac-%8dx%8dx%8d", hashCode1,hashCode2,hashCode3);
                return tmpstring.replace(" ","");
    }

// Hash.java
//-----------------------------------------------------------------------------------------------------------------------------------

    public static int getHashCodeFloatingMemory(int hashCode, int addr, int lengthInBytes) {
        IMemoryReader memoryReader = MemoryReader.getMemoryReader(addr, lengthInBytes, 4);
                hashCode =  memoryReader.readNext();
        return hashCode;
    }
2) make crappy tool(google copy-paste way) for renaming files and generate commant.txt
   
Then using this on Disgaea Aod ULUS10308 and .... 8798 wav's, 6.44gb raw pcm data. Two hours testing: playable with all sounds Smile

.7z   jpcsp_rename.7z (Size: 164.11 KB / Downloads: 264)
Reply
#2
Dont know how this can work...

How do you know those values (0, address+60, 1);(0, address+444, 1);(0, address+2000, 1);?
Reply
#3
So, lets go:
1) The size of the file that shows the emulator, do not always correspond to the size of the file to dump it.
2) The size of the file, which was a dump of the emulator, often not always correspond to the size of the file, which was a dump party wav ripper

So we have some problems when using the hash of the entire file in quality identifier.

3) There are files that immediately after the header, have over 2kb zeros in the data.
4) There at3 file size> 2kb ((1 804b minimal at3 file in Crisis Core.
5) Often headers in these two files can be the same.

This casts doubt profit from the use of hash on the part of the file.

So I used the easiest option came to mind: take 3 (for reliability) 32 bit values from different offsets of the file.
A) offset 0x3C (60 dec): closest to the header value, which has some unique numbers.
2) 444 and 2000 empirically combined offset for Disgaea, which gave a good result(minimal .at3 size - 5kb).

Update: for Disgaea is better to use instead 60-444-2000, 60-900-2200 values (in the original version did slip through a conflict between the names of files) for Crisis core - for example 60-400-1000.

The values of the offsets have to select for each game manually (with recompiling emulator of course), but you have all the sounds here and now.

The second version crappy tool:
.7z   jpcps_rename.7z (Size: 171.97 KB / Downloads: 225)
Reply
#4
now, i think i understand.
I used ur programm with crisiscore at3 files and 60-400-1000 values. Only 3 files give me warnings.

Code:
file000848.at3 ---> Atrac-78026x0x0.at3
file001308.at3 ---> Atrac-177200x0x0.at3
file001309.at3 ---> Atrac-176302x0x0.at3
Warnings:  3       Errors:  0

###########################################_DUPS_#########################################

the size of those files are
file000848.at3 ---> 82.212 bytes
file001308.at3 ---> 33.676 bytes
file001309.at3 ---> 33.484 bytes

I will try later with other offsets.
btw audio is working great on jpcsp Big Grin (and only 1.4GB of data)
Reply
#5
(06-19-2010, 01:22 PM)corvenik Wrote: now, i think i understand.
I used ur programm with crisiscore at3 files and 60-400-1000 values. Only 3 files give me warnings.

Code:
file000848.at3 ---> Atrac-78026x0x0.at3
file001308.at3 ---> Atrac-177200x0x0.at3
file001309.at3 ---> Atrac-176302x0x0.at3
Warnings:  3       Errors:  0

###########################################_DUPS_#########################################
Strange, only 3 warnings and no dups.
Which tool you used for dump at3?
Reply
#6
(06-20-2010, 03:02 AM)Agent69 Wrote: Strange, only 3 warnings and no dups.
Which tool you used for dump at3?

I used xpert+crisiscore plugin to dump video and audio.

if u want i can pass u those 3 files
Reply
#7
Nice tool, but it dump some 0sized at3 files (xpert2+crisiccore plugin).
Also 'Warning' - displays files, who have 2 zeroes in name, like Atrac-Nx0x0
Dont worry, if they have different names.
Reply
#8
I've added support in r1688 to read decoded atrac files using a simpler name scheme: Atrac-XXXXXXXX.at3.decoded (only the file length, no hash code). This only works when the atrac files have all different lengths...
Reply
#9
Unfortunately, this method works poorly.
Just small test on Crisis core:
was dumped 1325 files.
1173 of them - dups.
prooflog in attach Smile


Attached Files
.7z   test.7z (Size: 21.96 KB / Downloads: 173)
Reply
#10
(07-17-2010, 03:07 PM)gid15 Wrote: I've added support in r1688 to read decoded atrac files using a simpler name scheme: Atrac-XXXXXXXX.at3.decoded (only the file length, no hash code). This only works when the atrac files have all different lengths...

yeah alot of the files have the exact same filesize in bytes even though the content is different, the only way i could see is to caclulate a crc value but this would slow the emulator down, or calculate the value at some hex location in the file, so it could be atrac-legnth-hexvalue.at3 - but this isnt without problems since some files are really small..

on second though usually jpcsp has to copy the at3 file, so if it calculates a crc/md5/sha1 instead or while it copys maybe there wouldn't be much of a slowdown usually the files are small too like 4-10k.

here are just a few at3 files from cc (all identical filesize in bytes :X)
3,724 Atrac-00000E8C-0DFA4480.at3
3,724 Atrac-00000E8C-25020265.at3
3,724 Atrac-00000E8C-528F2746.at3
3,724 Atrac-00000E8C-65EA2980.at3
3,724 Atrac-00000E8C-913B5874.at3
3,724 Atrac-00000E8C-A9215173.at3
3,916 Atrac-00000F4C-2E2F22D1.at3
3,916 Atrac-00000F4C-8AFB863B.at3
3,916 Atrac-00000F4C-A91B7C28.at3
3,916 Atrac-00000F4C-CBFC1359.at3
3,916 Atrac-00000F4C-CE55C884.at3
3,916 Atrac-00000F4C-E5281827.at3
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)