arcusmaximus / VNTranslationTools

Tools for translating visual novels
MIT License
306 stars 47 forks source link

CSystem extraction Issue #97

Open RedEye13 opened 1 year ago

RedEye13 commented 1 year ago

Hello, while trying to decrypt the .a files of C System games I'm running into this issue

image

What I tried so far is

1- I'm using the latest version of VNTools v0.0.25 2- used both CSystem Tools and GARbro to extract the files didn't affect the result 3- tried a second game that I want to work on same thing happened 4- according to GARbro both games are using Grand Guignol no Yoru Director's Cut for encryption (at least that's the only one I found to get the images to display correctly) several others would only work on some of the pictures

Here's a link for the 2 games https://vndb.org/v32745 https://vndb.org/v29958

Also I zipped the .a files for one of them hopefully it helps input.zip

Cosetto commented 1 year ago

Same issue with #95, it's not encrypted, the scripts are unicode string

RedEye13 commented 1 year ago

Isn't this tool supposed to read Unicode strings? it always worked just fine with Kirikiri games that I tried in the past that had Unicode instead of Shift JIS also should I close the issue if it's the same as #95?

Cosetto commented 1 year ago

Nope, it hasn't been implied in Csystem script link

Cosetto commented 1 year ago

Maybe this code can help to read and write unicode string

        public static string ReadWordLengthUnicodeString(this BinaryReader reader)
        {
            var length = reader.ReadInt16();
            var bytes = reader.ReadBytes(length);
            return Encoding.Unicode.GetString(bytes);
        }

        public static void WriteWordLengthUnicodeString(this BinaryWriter writer, string s)
        {
            var bytes = Encoding.Unicode.GetBytes(s);
            writer.Write(Convert.ToUInt16(bytes.Length));
            writer.Write(bytes);
        }
onefive1156 commented 1 year ago

It seems to be encrypted image