koukdw / Aquarium_tools

12 stars 1 forks source link

Pc script format #4

Closed Cosetto closed 1 year ago

Cosetto commented 1 year ago

s.zip The pc version came out today and its script format is different. Is it possible to extract them?

koukdw commented 1 year ago

There's a few difference compared to the switch script

  1. There's a "magic" at the beginning taking 9 bytes
  2. The String format is different

I'm kinda working on a proper disassembler right now NeXAS.zip If you have 010 editor, you can see the format of aquarium pc with this template file.

Cosetto commented 1 year ago

Also do you know any better tools to extract pc archive? Since it uses utf-8, tools like GARbro failed to extract the correct Japanese name like this: image

koukdw commented 1 year ago

Idk i don't deal with the pac encryption much. Can't you modify one of the extractor to convert the filename to utf8 ?

Cosetto commented 1 year ago

I wish I knew how to. For example, this one, it doesn't mention the encoding or string's encode

koukdw commented 1 year ago

I wish I knew how to. For example, this one, it doesn't mention the encoding or string's encode

Add setlocale(LC_ALL, ".UTF8"); in the main.cpp and add #include <locale.h>

then use the bat script to compile with cmake. (you need visual studio and cmake installed), the files will be in build/Release folder if you click execute the release bat script

Cosetto commented 1 year ago

Oh wow, thanks so much. Now, I'm looking forward to the script tool There's an old disassembler for Nexas link, maybe you can make use of this

koukdw commented 1 year ago

Oh nice.

The thing is Entergram modify the engine alot for each games. I don't think it's possible to do something generic that could be use for every game.

Like for example the engine functions, you can get their names with aonatsu line chinese demo version made in unity. There's a c# enum with all their names (some also have an unity implementation), and a script parser. But the enum will only match with the pc version of aonatsu line. It doesn't match with any other game or on other platform. So if i want to support a new game i would need to look at the game binary and compare the functions with aonatsu line or other game where i already extracted the enums. (it's roughly 500 functions to go through everytime you want to add a game)

Parfait(2005) from giga also have a very early version of the compiler + the source script (it's not really usable since it's way too different) but it's still interesting to look at to get an idea how it look like (it's basically a variant of c)

http://www.doddlercon.com/main/?p=264 i found this too. Apparently he made a decompiler for baldr sky but it's not on github anymore.

Cosetto commented 1 year ago

Maybe simple extract/insert text tools like the python codes is fine, since the dev had done all the engine work for this game

Cosetto commented 1 year ago

It's here https://github.com/crskycode/NeXAS_Tool

koukdw commented 1 year ago

It's a start, i guess, i'll post a comment on his github repo with more information. Some fields are wrong. Which is normal it's a bit hard to figure out if you haven't reversed the binary.