Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Star Ocean Anamnesis Tools

Post questions about game models here, or help out others!
User avatar
Acewell
VIP member
VIP member
Posts: 1274
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2416 times
Been thanked: 744 times

Re: Star Ocean Anamnesis Tools

Post by Acewell » Sat Mar 30, 2019 2:47 am

andthen619 wrote:
Wed Mar 27, 2019 6:30 pm
Is there a way to inject my modified textures back in?
not that i'm aware of, modding is not my area though. :)

User avatar
vainotechnik
ultra-n00b
Posts: 1
Joined: Fri Mar 29, 2019 2:30 pm
Has thanked: 1 time

Re: Star Ocean Anamnesis Tools

Post by vainotechnik » Sun Mar 31, 2019 11:45 am

Acewell wrote:
Mon Mar 04, 2019 5:28 am
fdtggf wrote:
Mon Mar 04, 2019 4:55 am
Bullet Girls Phantasia ps vita version
thanks, here is Noesis python script to open your aif samples. :D
tex_BulletGirlsPhantasia_PSVita_aif.zip
supports morton swizzled dxt1, dxt3, dxt5
Thanks for releasing the script! Very useful in exploring those lingerie images in the cpk data.

However my concern is that of the converted IQE / NEXS from asf files. It loads no texture at all?
I want to explore character / weapon textures in the game. :D

okitasan
ultra-n00b
Posts: 1
Joined: Thu Oct 18, 2018 1:46 am

Re: Star Ocean Anamnesis Tools

Post by okitasan » Tue Apr 02, 2019 1:42 pm

After the latest JP update SOADec nor the slz script are working anymore. Error screenshot. Sample files if needed, has some aif images and an old version of a model (working) and the new one (not working). Thank you for your wonderful tool.

akderebur
ultra-veteran
ultra-veteran
Posts: 405
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 51 times
Been thanked: 399 times

Re: Star Ocean Anamnesis Tools

Post by akderebur » Tue Apr 02, 2019 3:51 pm

okitasan wrote:
Tue Apr 02, 2019 1:42 pm
After the latest JP update SOADec nor the slz script are working anymore.
New encryption. Since this is an online game, keys are probably sent over the network and can be changed over time. So it would require constant finding of the keys. I also think that different files use different keys. Overall not worth the effort.

Technically model and texture tools still work. You are on your own for getting the decrypted files though.

otherself
ultra-n00b
Posts: 2
Joined: Fri Feb 03, 2012 5:26 pm
Has thanked: 5 times

Re: Star Ocean Anamnesis Tools

Post by otherself » Thu Apr 11, 2019 10:44 pm

The models from Bullet Girls Phantasia are not coming with UV. Am I the only one with this problem? Or...

Anyway, thanks for the program.

esterTion
ultra-n00b
Posts: 5
Joined: Fri Apr 26, 2019 2:05 am
Been thanked: 4 times

Re: Star Ocean Anamnesis Tools

Post by esterTion » Fri Apr 26, 2019 2:21 am

So someone requested me to take a look at this game's asset encryption.
Basically, there are two asset versions, marked by integer after the ADLD header. Decryption of two versions already exists on the first release of the game, so it’s not that the game updated the encryption, but changed from an older algorithm.

I also looked at your tool, and that XOR key guessing is pretty charming.
To properly obtain the key, first calculate the crc32 of the asset path, like “Character/cc0001_b01a.apk”. Note that here is not the standard crc32, the standard crc32 initialize the crc with value 0xFFFFFFFF, this initialize it with string length.
Then here’s the different, in v1 asset, convert crc to hex, and this is the xor key.
In v2 asset, pad this crc with 0 to 32 length, then convert this as hex to binary string, the result is the key for AES128, IV is hex2bin(“09375711857134629684891855841614”)

So if use this proper way to get the key, accurate asset path is needed.

Reference:
Standard crc32: https://opensource.apple.com/source/xnu ... rn/crc32.c

User avatar
chrrox
Moderator
Posts: 2557
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1289 times

Re: Star Ocean Anamnesis Tools

Post by chrrox » Sat Apr 27, 2019 2:11 am

What version are you looking at of the apk could you say what offset the function is at in that version.

esterTion
ultra-n00b
Posts: 5
Joined: Fri Apr 26, 2019 2:05 am
Been thanked: 4 times

Re: Star Ocean Anamnesis Tools

Post by esterTion » Sat Apr 27, 2019 3:48 am

jp v2.7.0, 0xC99940

How to find this function in other version:
Find "Framework::CFileLoader::SetDecryptFunction" usage in "CGame::OnInitialize", F5, click on the off_xxx above the function call, function reference is at + 0x14 (6 int below)
There should be a obvious "MOV R2, #0x444C4441" at fourth instruction, this function exists at the first version of the game

User avatar
chrrox
Moderator
Posts: 2557
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1289 times

Re: Star Ocean Anamnesis Tools

Post by chrrox » Sun Apr 28, 2019 4:58 am

Can you show an example of a string and the correct crc and key.
are these the options you used? "32 -1 -1 0 0 1"

esterTion
ultra-n00b
Posts: 5
Joined: Fri Apr 26, 2019 2:05 am
Been thanked: 4 times

Re: Star Ocean Anamnesis Tools

Post by esterTion » Mon Apr 29, 2019 3:26 am

chrrox wrote:
Sun Apr 28, 2019 4:58 am
Can you show an example of a string and the correct crc and key.
Character/cc0001_b01a.apk 00000000000000000000003566186470
chrrox wrote:
Sun Apr 28, 2019 4:58 am
are these the options you used? "32 -1 -1 0 0 1"
What's this

User avatar
chrrox
Moderator
Posts: 2557
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1289 times

Re: Star Ocean Anamnesis Tools

Post by chrrox » Tue Apr 30, 2019 10:12 pm

what values do you put in this site to get it to work?
http://www.sunshine2k.de/coding/javascr ... rc_js.html

esterTion
ultra-n00b
Posts: 5
Joined: Fri Apr 26, 2019 2:05 am
Been thanked: 4 times

Re: Star Ocean Anamnesis Tools

Post by esterTion » Wed May 01, 2019 11:03 am

chrrox wrote:
Tue Apr 30, 2019 10:12 pm
what values do you put in this site to get it to work?
http://www.sunshine2k.de/coding/javascr ... rc_js.html
Weird, can't figure out the parameter

This is my code, CRCTABLE is from the above apple open source file

Code: Select all

function crc32_mod($str) {
  $remaining = strlen($str);
  $crc = 0;
  if ($remaining) {
    $crc = $remaining;
    /*
    crc32 standard:
    $crc = 0xFFFFFFFF;
    */
    $i = 0;
    do {
      $current_char = ord($str[$i]);
      $remaining--;$i++;
      $crc = CRCTABLE[($current_char ^ $crc) & 0xff] ^ ($crc >> 8);
    } while ($remaining);
  }
  return $crc;
}
Also, I've written an article about this
https://estertion.win/2019/04/%e6%98%9f ... %e6%b3%95/
(In Chinese, might auto play background music)

akderebur
ultra-veteran
ultra-veteran
Posts: 405
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 51 times
Been thanked: 399 times

Re: Star Ocean Anamnesis Tools

Post by akderebur » Thu May 02, 2019 2:52 pm

I have released a new version of SOADec for decrypting/decompressing the latest files. You can find it in the first post. Usage is the same. Credits to esterTion for figuring out the decryption method.

User avatar
einherjar007
advanced
Posts: 44
Joined: Sat Dec 23, 2017 7:56 am
Has thanked: 23 times
Been thanked: 2 times
Contact:

Re: Star Ocean Anamnesis Tools

Post by einherjar007 » Thu May 02, 2019 4:26 pm

esterTion, akderebur, fantastic job.

The new collaboration character (GGX Sol) has been confirmed, but it has been loaded successfully.
Of course, past models are also loaded properly.

alduin2000
ultra-n00b
Posts: 3
Joined: Tue Apr 30, 2019 1:34 pm

Re: Star Ocean Anamnesis Tools

Post by alduin2000 » Thu May 02, 2019 5:31 pm

Thanks akderebur and esterTion for your works!
I have a personal request, since no one have interest to extract files from Star Ocean 5, I really want to do. This game use the same file extention of Anamnesis, (.AIF) for textures and (.ASF) for 3D models. They are compressed in somekind of SLZ type but I really don't know.

In the attachments there are a couple a sample files, extracted from the PS4 version of the game.
samples.zip
Is this possible to use the SOADec tool for decompress these files?
You do not have the required permissions to view the files attached to this post.

Post Reply