Thnx Broin a different thread, check the "continuing the ge2 translation" thread.
Thnx Broin a different thread, check the "continuing the ge2 translation" thread.
still watching?I'm still watching these threads... to see if the original team is indeed OK with someone else taking over (so far I've only see fans looking for extra help). At this point I could import texts from the officially localized PC game into its PSP version... But it's not like I'm gonna hijack their project or anything... Specially after years of hard work. Still, no need to cancel anything, I guess... XD
~Sky
According to the OP, the project got cancelled around January this year.So this project is alive right?
technically true, but the project has in fact been revived and is being worked on on another thread.According to the OP, the project got cancelled around January this year.
Oh thank god i think i cant play this game on my PSP i want to but GE2RB at Vita but i dont have too muck money hiks :'(technically true, but the project has in fact been revived and is being worked on on another thread.
technically true, but the project has in fact been revived and is being worked on on another thread.
What is the link for the other thread?
here you go
http://gbatemp.net/threads/continuing-the-god-eater-2-translation.458090/page-10#post-7515979B-)What is the link for the other thread?
If this is 100% done where might I find the English patchBrother conflict passion pink 2015 100%
@SkyBladeCloud , probably you aren't active to this kind of stuff anymore. but do you still have the knowledge to share PRES file structure and how they can be extracted into a proper directory/files and can be repacked?, i know about the blz2 stuff (zlib compression i believe). and i'm planning to dissect and repack god eater 2, at least on the 1.40 ISO + DLC side
using System.IO;
using System.Collections.Generic;
namespace GE2
{
class FileInfo
{
int[] offsets;
string[] infos;
public FileInfo(BinaryReader reader, int infoCount)
{
List<int> offsetList = new List<int>();
for(int i = 0; i < infoCount; ++i)
offsetList.Add(reader.ReadInt32());
offsets = offsetList.ToArray();
List<string> infoList = new List<string>();
for(int i = 0; i < infoCount; ++i)
{
reader.BaseStream.Position = offsets[i];
string info = "";
char c = reader.ReadChar();
while(c != '\0')
{
info += c;
c = reader.ReadChar();
}
infoList.Add(info);
}
infos = infoList.ToArray();
}
public string getName()
{
if(infos.Length == 0) return "";
return infos[0];
}
public string getType()
{
if(infos.Length < 2) return "";
return infos[1];
}
}
}
using System;
using System.IO;
namespace GE2
{
class FileData
{
string fileName;
string fileType;
string fullName;
BinaryReader binaryReader;
long offset;
int size;
int decSize;
public FileData(BinaryReader reader, int compressedSize, int decompressedSize, string name, string type)
{
fileName = name;
fileType = type;
fullName = fileName;
if(fileType != "") fullName += '.' + fileType;
binaryReader = reader;
offset = binaryReader.BaseStream.Position;
size = compressedSize;
decSize = decompressedSize;
}
public void extract(string outDirectory)
{
Console.WriteLine("Processing File: " + fullName);
binaryReader.BaseStream.Position = offset;
byte[] data = binaryReader.ReadBytes(size);
if(decSize != 0 && size != 0 && size < decSize)
{
data = BLZ2.decompress(data);
if(data.Length != decSize) throw new Exception("Error in decompression?");
}
switch(fileType)
{
case "res":
{
Directory.CreateDirectory(outDirectory + '/' + fullName);
Pres extracted = new Pres(data);
extracted.extract(outDirectory + '/' + fullName);
break;
}
case "tr2":
{
try
{
TR2 tr2 = new TR2(data);
StreamWriter writer = new StreamWriter(outDirectory + '/' + fullName + ".txt");
tr2.extract(writer);
writer.Flush();
writer.Close();
}
catch(Exception) { }
goto default;
}
default:
{
File.WriteAllBytes(outDirectory + '/' + fullName, data);
break;
}
}
}
}
}
using System.IO;
namespace GE2
{
class FileEntry
{
enum AddressMode
{
Package = 0x4,
Data = 0x5
};
int dataSector;
AddressMode addressMode;
int compressedSize;
int infoOffset;
int infoCount;
byte[] zeroes;
public int decompressedSize;
FileInfo info;
FileData data;
public FileEntry(BinaryReader reader)
{
int datum = reader.ReadInt32();
dataSector = datum & 0x0fffffff;
addressMode = (AddressMode)((datum & 0xf0000000) >> 28);
compressedSize = reader.ReadInt32();
infoOffset = reader.ReadInt32();
infoCount = reader.ReadInt32();
zeroes = reader.ReadBytes(0x0C);
decompressedSize = reader.ReadInt32();
if(datum == 0) return;
long currentOffset = reader.BaseStream.Position;
reader.BaseStream.Position = infoOffset;
info = new FileInfo(reader, infoCount);
int dataOffset;
BinaryReader dataReader;
switch(addressMode)
{
case AddressMode.Package: dataOffset = dataSector * 0x800; dataReader = Program.package; break;
case AddressMode.Data: dataOffset = dataSector * 0x800; dataReader = Program.data; break;
default: dataOffset = dataSector; dataReader = reader; break;
}
dataReader.BaseStream.Position = dataOffset;
data = new FileData(dataReader, compressedSize, decompressedSize, info.getName(), info.getType());
reader.BaseStream.Position = currentOffset;
}
public void extract(string outDirectory)
{
if(data != null)
data.extract(outDirectory);
}
}
}
using System.IO;
namespace GE2
{
class EntryGroup
{
int offset;
int entryCount;
FileEntry[] entries;
public EntryGroup(BinaryReader reader)
{
offset = reader.ReadInt32();
entryCount = reader.ReadInt32();
entries = new FileEntry[entryCount];
long currentOffset = reader.BaseStream.Position;
reader.BaseStream.Position = offset;
for(int i = 0; i < entryCount; ++i)
entries[i] = new FileEntry(reader);
reader.BaseStream.Position = currentOffset;
}
public void extract(string outDirectory)
{
for(int i = 0; i < entryCount; ++i)
entries[i].extract(outDirectory);
}
}
}
using System.IO;
namespace GE2
{
class Pres
{
int header;
int groupOffset;
byte groupCount;
byte groupVersion;
short unk;
int version;
int dataOffset;
EntryGroup[] groups;
public Pres(string file)
{
byte[] presData = File.ReadAllBytes(file);
process(presData);
}
public Pres(byte[] presData)
{
process(presData);
}
void process(byte[] presData)
{
BinaryReader reader = new BinaryReader(new MemoryStream(presData));
header = reader.ReadInt32();
groupOffset = reader.ReadInt32();
groupCount = reader.ReadByte();
groupVersion = reader.ReadByte();
unk = reader.ReadInt16();
version = reader.ReadInt32();
reader.BaseStream.Position = groupOffset; //Only PSP version?
groups = new EntryGroup[groupCount];
for(int i = 0; i < groupCount; ++i)
groups[i] = new EntryGroup(reader);
}
public void extract(string outDirectory)
{
for(int i = 0; i < groupCount; ++i)
groups[i].extract(outDirectory);
}
}
}