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:
  • 37 Vote(s) - 3.92 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crisis Core: Final Fantasy VII - ULUS10336
#50
@hyakki and corvenik:
(05-08-2010, 01:33 PM)corvenik Wrote: @hyakki: about the third part of the atrac filename, i were looking to the atraccodec.java class and this is what i found.

protected String generateID(int address, int length, int fileSize) {
int hashCode = Hash.getHashCodeFloatingMemory(0, address, length);

return String.format("Atrac-%08X-%08X", fileSize, hashCode);

So it seems that the third part is a hashcode, maybe gid15 knows more about this...

gid coded the hash generator, it's under jpcsp.util.Hash. The getHashCodeFloatingMemory does this:
Code:
public static int getHashCodeFloatingMemory(int hashCode, int addr, int lengthInBytes) {
                 IMemoryReader memoryReader = MemoryReader.getMemoryReader(addr, lengthInBytes, 4);
                 for (int i = 0; i < lengthInBytes; i += 4) {
                         int value = memoryReader.readNext();
                         hashCode ^= value + i;
                         hashCode += i;
                 }
  
                 return hashCode;
         }

You'll need to get the memory address and the lenght of the data used in sceAtracSetData and then apply that small algorithm.

Obviously, we can also allow an extra nomenclature to be also accepted aside from this one (e.g.: use the hash version for files to be decoded on a PSP and use another version for files manually decoded).
Just name the files as something like this, for example:
Atrac-[filesize]-[number].decat3
With "number" going from 0 up to the number of atrac files present in the game, just like a playlist. We'll then make JPCSP recognize these files and play them instead. Wink
Reply


Messages In This Thread
RE: CRISIS COFINAL FANTASY VII - ULUS10336 - by Hykem - 05-08-2010, 07:06 PM
patch ULES01048 - by MaXiMu - 05-26-2010, 01:33 AM
other bug detect - by MaXiMu - 03-13-2011, 11:56 AM
RE: other bug detect - by hyakki - 03-16-2011, 08:47 PM
Crisis Core Rendering Issue - by ishraqiyun77 - 03-11-2012, 11:13 PM
RE: Crisis Core Rendering Issue - by ishraqiyun77 - 03-13-2012, 05:55 PM
Frame error? - by isoepic - 04-22-2012, 03:40 PM
crisis core menu problem - by bigal80ak - 05-07-2012, 11:14 PM
Crisis Core Frame Error? - by isoepic - 08-02-2012, 12:19 AM

Forum Jump:


Users browsing this thread: 19 Guest(s)