|
@@ -0,0 +1,33 @@
|
|
|
+package QuickVerifyCrap;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+import java.io.RandomAccessFile;
|
|
|
+
|
|
|
+public class GECTFormatSplitter
|
|
|
+{
|
|
|
+ public static void main(String[] args) throws Exception
|
|
|
+ {
|
|
|
+ RandomAccessFile base = new RandomAccessFile("/mnt/d/LOA/000023/002/CT-GREE.BIN","r");
|
|
|
+ String outbase = "/mnt/d/LOA/000023/toolref/3410";
|
|
|
+ int fcnt = 14;//Integer.reverseBytes(base.readInt());
|
|
|
+
|
|
|
+ base.seek(0x10000);
|
|
|
+ for(int i=0;i<fcnt;i++)
|
|
|
+ {
|
|
|
+ int ignored = base.readInt();
|
|
|
+ int ignored2=base.readInt();
|
|
|
+ int len = Integer.reverseBytes(base.readInt())*40;
|
|
|
+ int ignored3=base.readInt();
|
|
|
+ //base.readShort(); //ignored, constant
|
|
|
+ byte[] content = new byte[len];
|
|
|
+ base.read(content);
|
|
|
+
|
|
|
+
|
|
|
+ RandomAccessFile dump = new RandomAccessFile(outbase+ File.separator+"CTsubfile"+i,"rw");
|
|
|
+ dump.writeInt(Integer.reverseBytes(len+2));
|
|
|
+ dump.writeShort(Short.reverseBytes((short)16000));
|
|
|
+ dump.write(content);
|
|
|
+ dump.close();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|