Invoke on something like dump/*.cst. Needs regex postprocessing, as is common. {{{#!python #!python import os, sys, zlib from struct import unpack for fname in sys.argv[1:]: with open(fname, "rb") as f: fdata = f.read() header = fdata[:8].decode("utf-8") if header != "CatScene": continue compressed_len = unpack(" 0: # guess oplen = code[i] if oplen != 1: print("oplen error") exit() i += 1 op = code[i] i += 1 if op in [0x20, 0x21, 0x30]: string = [] char = code[i] while char != 0: string += [char] i += 1 char = code[i] i += 1 string = bytes(string).decode("cp932") if op == 0x20: print(string.replace("\n", "").replace("\\n",""), end="") elif op in [0x02]: # linefeed print("") i += 1 elif op in [0x03]: # some other kind of linefeed (grisaia) print("") i += 1 else: print(f"\n\nunknown op {op:02X} at {i+headerlen+0x10:08X} in {fname}\n") exit() print("") }}}