Jump to content

IMGiv


REspawn

Recommended Posts

This is an early version app that will allow you to open IV PC IMG archives, it currently only supports viewing and extracting archive contents, this is to test the waters with R* and to give people access to the files so that other tools may be developed.

This application will be updated frequently over the coming days so check here regularly for updates.

 

The only requirement of using this app is that you supply the path to your GTAIV.exe file.

Any problems or questions just post them here.

 

Updated to version 1.1 - 15th Dec 2008

Download 551kb: IMGiv.rar

 

user posted image

Link to comment
Share on other sites

Any chance of getting the source code to this released or some documentation on the format?

Nice work btw.

Link to comment
Share on other sites

 

Any chance of getting the source code to this released or some documentation on the format?

Nice work btw.

Would be awesome if you could give us some information!

 

And ofcourse great work! icon14.gif

Link to comment
Share on other sites

Great, REspawn. This is supposed to open the IMG files of IV, but nothing about the RPFs, right?

 

I'm a bit confused about the file formats, both contains game files?

Link to comment
Share on other sites

 

Any chance of getting the source code to this released or some documentation on the format?

Nice work btw.

Would be awesome if you could give us some information!

 

And ofcourse great work! icon14.gif

Yes, it will be 100% open source.

Its written in C++, wxWidgets for the GUI, more info in the next day or two if R* don't sue.

 

@Jost_Vice - Just the IMG files, I haven't looked at the RPF files at all.

Link to comment
Share on other sites

Great work, REspawn, but something wrong with your size calculations.

 

Each RSC contains two segments: CPU (virtual) segment and GPU (physical) segment.

CPU seg contains one object with all included subobjects (in case of .wtd - rage::pgDictionary<rage::grcTexture>), GPU seg contains pixel/vertex data. You need segment sizes to resolve relocations.

 

 

struct RscHeader { DWORD dwMagick; DWORD dwVersion; DWORD dwFlags;};RscHeader header;// ... some code skippedDWORD cpuSize = (header.dwFlags&0x7FF) << (((header.dwFlags >> 11) & 0xF) + 8);DWORD gpuSize = ((header.dwFlags >> 15)&0x7FF) << (((header.dwFlags >> 26) & 0xF) + 8);// ... anothr part of code skippedint inLength = filelength (rscFile)-sizeof (RscHeader);int outLength = (int)(cpuSize+gpuSize);// ... allocate memory and read file int result = uncompress (outBuf, &outLength, inBuf, inLength);

 

 

Link to comment
Share on other sites

Great work, REspawn, but something wrong with your size calculations.

 

Heh, thats because the sizes that are displayed is the compressed RSC sizes (theres nothing wrong with that) and when exported, they get decompressed.

 

Ideally, I think each RSC should be exported as-is (compressed), and let the future RSC tools deal with the de/compression of them. If you look at the RSC files that are outside of the .img/.rpf archives (.whm, etc).. you'll notice that they are still compressed. However, the decompressed version is still useful for format REing smile.gif

Link to comment
Share on other sites

aru, look at this:

 

15.12.2008  10:38         5 771 264 brook_new_roads.wtd.listener15.12.2008  10:36         5 788 518 brook_new_roads.wtd.respawnInput file: brook_new_roads.wtdLoaded resource file: version=8, CPU_size = 0x1000, GPU_size = 0x580000Output file: brook_new_roads.wtd.listenerin = 3137524, out = 5771264OutSize = 5771264, err = 0Complete.

 

 

Link to comment
Share on other sites

Your work is cool, REspawn icon14.gif

I have got just only one question: why we need to have GTAIV.exe to make this programm workable? biggrin.gif Can you put this spesial parametres wich your program "read from exe" right into it?

user posted image
Link to comment
Share on other sites

@listener - Thanks for the info, I'm at work now but will check it out as soon as I get home

 

@aru- Yea, letting tools handle the decompression themselves is the way to go, and provides a nice common ground for everyone to work with.

 

@mr.Dageron - The reason for this is a legal one, I'm not sure how R* will react to tools, but having the AES key in my app might not be the best, so thats why it needs the path to the .exe. This im sure will become less of an issue over the next few weeks.

 

 

Link to comment
Share on other sites

It's possible to open files from x0?

Link to comment
Share on other sites

It writes me "AES Key did not match. Unable to continue"

 

What to do? I have official russian version of the game from 1C (legal of course)

Link to comment
Share on other sites

Maybe the .exe file error. If your version already has last patch updates, you should backup new exe and put old into directory. (old it is possible to get from first GTAIV realise)

user posted image
Link to comment
Share on other sites

Maybe the .exe file error. If your version already has last patch updates, you should backup new exe and put old into directory. (old it is possible to get from first GTAIV realise)

Could be... ß äî ñèõ ïîð íå ðàçîáðàëñÿ, ïàò÷åííàÿ ëè âåðñèÿ îò 1Ñ èëè íåò.

Link to comment
Share on other sites

 

aru, look at this:

 

15.12.2008  10:38         5 771 264 brook_new_roads.wtd.listener15.12.2008  10:36         5 788 518 brook_new_roads.wtd.respawnInput file: brook_new_roads.wtdLoaded resource file: version=8, CPU_size = 0x1000, GPU_size = 0x580000Output file: brook_new_roads.wtd.listenerin = 3137524, out = 5771264OutSize = 5771264, err = 0Complete.

 

 

 

Interesting... I wonder if REspawn is doing anything special... my current version of SparkIV just deflates the data and lets the deflater take care of the output size.

 

 

Your work is cool, REspawn icon14.gif

I have got just only one question: why we need to have GTAIV.exe to make this programm workable?  biggrin.gif Can you put this spesial parametres wich your program "read from exe" right into it?

 

 

Heh, including the AES encryption key into the program is an open invitation for Rockstar's lawyers to start sending DCMA/EUCD notices not only to the author but also the sites hosting the program (GTAForums, etc). As long as the key is not included, no DRM has been broken. Extracting it out of the exe is probably the best way to go.

Link to comment
Share on other sites

Interesting... I wonder if REspawn is doing anything special... my current version of SparkIV just deflates the data and lets the deflater take care of the output size.

Nope, nothing special at all, I just pass the data to zlib and let it take care of the output size itself, I'm at work ATM but will have a look when I get home.

 

@Kakashevich - I will have a look at your exe when I get home and post here with an update.

Link to comment
Share on other sites

aru, please, post some screens of your SparkIV smile.gif I am sure that it is as cool as OpenIV icon14.gif

 

What about encrypting code, will it description be on gtamodding.com? Or maybe the "way how to read it from exe"?

user posted image
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.