does anyone know how to convert a little-endian file into a big-endian file i want to replace Ricos model but the pc versions are little-endian and don't work all dds files work fine they don't need to be big-endian it seems.
if your wondering the tools for the PC version work on the 360 version but alot of the files are unknown also you need a Jtaged 360 or hacked dvd firmware to use mods.
any help/info would be much appreciated thank you.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Just Cause *.ARC file decompression
-
- advanced
- Posts: 51
- Joined: Sun Mar 28, 2010 4:10 am
- Has thanked: 1 time
- Been thanked: 7 times
Re: Just Cause *.ARC file decompression
I think it's best if you made your own topic for that. I'm still waiting for my answer in this one.Rocky5 wrote:does anyone know how to convert a little-endian file into a big-endian file i want to replace Ricos model but the pc versions are little-endian and don't work all dds files work fine they don't need to be big-endian it seems.
if your wondering the tools for the PC version work on the 360 version but alot of the files are unknown also you need a Jtaged 360 or hacked dvd firmware to use mods.
any help/info would be much appreciated thank you.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Just Cause *.ARC file decompression
you need to map out every part of the file and what it does to reverse the endian of a file.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Just Cause *.ARC file decompression
you would need to reverse the exe to see how the data is accessed i do not know how to do this
Re: Just Cause *.ARC file decompression
Are you looking for .arc extraction or something else? This is the first time I've written a BMS script.tgperson wrote:I think it's best if you made your own topic for that. I'm still waiting for my answer in this one.
Code: Select all
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
endian little
get header_count long 0
# block alignment
if header_count > 1
get block_alignment long 0
else
set block_alignment 2048
endif
# archive count
if header_count > 2
get archive_count long 0
else
set archive_count 1
endif
set header_size header_count
math header_size *= 4
get file_count asize
math file_count -= header_size
math file_count /= 12
print "Alignment of %block_alignment%."
print "%archive_count% archives."
print "%file_count% files."
print "Getting %archive_count% archive sizes..."
set total_block_count 0
for i = 0 < archive_count
get archive_path basename
String archive_path += i
String archive_path += ".arc"
open FDSE archive_path 1
get archive_block_count asize 1
math archive_block_count /= block_alignment
math total_block_count += archive_block_count
putarray 0 i total_block_count
print "%total_block_count%"
next i
print "Getting %file_count% file entries..."
for i = 0 < file_count
get entry.name_hash long 0
putarray 1 i entry.name_hash
get entry.block_offset long 0
putarray 2 i entry.block_offset
get entry.size long 0
putarray 3 i entry.size
next i
print "Extracting archives..."
set archive.block_offset 0
for i = 0 < archive_count
get archive.path basename
string archive.path += i
string archive.path += ".arc"
print "Extracting archive %archive.path%..."
open FDSE archive.path 1
getarray archive.block_count 0 i
for j = 0 < file_count
getarray entry.block_offset 2 j
if entry.block_offset >= archive.block_offset
if entry.block_offset < archive.block_count
getarray entry.name_hash 1 j
getarray entry.size 3 j
get entry.path basename
string entry.path += i
string entry.path += "/"
string entry.path += entry.name_hash
set entry.offset entry.block_offset
math entry.offset -= archive.block_offset
math entry.offset *= block_alignment
log entry.path entry.offset entry.size 1
endif
endif
next j
set archive.block_offset archive.block_count
next i
To do filenames you'll need to figure out what algorithm the game is using to hash the names, it isn't Jenkins hashlittle() like Just Cause 2.
I know that "weapons_pc.bin" is hashed to 0xBB02F83B.
https://blog.gib.me/
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Just Cause *.ARC file decompression
I think what they want is someone to map all the files out so they can port all the extracted resources from the pc to the xbox.
but very nice script.
but very nice script.
Re: Just Cause *.ARC file decompression
sorry i miss read the thread name this was for just cause 2
extraction of arc files is done both using BMS Script and now an actual program here.
The problem i have is the xbox 360 has Big-Endian coded files now the PC doesn't well we all know this but dds textures (L-E) work on the x360 so no need to convert but models, bin files and such must be Big-Endian or they wont load when the game is started, hens why i wanted to know how to convert them if possible.
I can give any resources needed (bar rbm files as these are not decrypted in the arc file yet will need to find them first 18000+ unknown files lol) for some one to see if they can convert the dds (textures) files to big-endian as bin (xml) files can already be converted to B-E.
extraction of arc files is done both using BMS Script and now an actual program here.
The problem i have is the xbox 360 has Big-Endian coded files now the PC doesn't well we all know this but dds textures (L-E) work on the x360 so no need to convert but models, bin files and such must be Big-Endian or they wont load when the game is started, hens why i wanted to know how to convert them if possible.
I can give any resources needed (bar rbm files as these are not decrypted in the arc file yet will need to find them first 18000+ unknown files lol) for some one to see if they can convert the dds (textures) files to big-endian as bin (xml) files can already be converted to B-E.
Last edited by Rocky5 on Mon Apr 12, 2010 6:49 pm, edited 1 time in total.
Re: Just Cause *.ARC file decompression
I recently committed updates to my file lists to include more 360 and PS3 content.Rocky5 wrote:extraction of arc files is done both using BMS Script and now an actual program here.
The problem i have is the xbox 360 has Big-Endian coded files now the PC doesn't well we all know this but dds textures (L-E) work on the x360 so no need to convert but models, bin files and such must be Big-Endian or they wont load when the game is started, hens why i wanted to know how to convert them if possible.
I can give any resources needed (bar rbm files as these are not decrypted in the arc file yet will need to find them first 18000+ unknown files lol) for some one to see if they can convert the dds (textures) files to big-endian as bin (xml) files can already be converted to B-E.
And I thought this thread was for Just Cause 1?
https://blog.gib.me/
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Re: Just Cause *.ARC file decompression
oh my bad lol sorry will make a new thread for Just Cause 2 Xbox 360 files.Rick wrote:I recently committed updates to my file lists to include more 360 and PS3 content.Rocky5 wrote:extraction of arc files is done both using BMS Script and now an actual program here.
The problem i have is the xbox 360 has Big-Endian coded files now the PC doesn't well we all know this but dds textures (L-E) work on the x360 so no need to convert but models, bin files and such must be Big-Endian or they wont load when the game is started, hens why i wanted to know how to convert them if possible.
I can give any resources needed (bar rbm files as these are not decrypted in the arc file yet will need to find them first 18000+ unknown files lol) for some one to see if they can convert the dds (textures) files to big-endian as bin (xml) files can already be converted to B-E.
And I thought this thread was for Just Cause 1?
and thank you for making these tools its much appreciated.
x360 eez support thanks man only need the dds and almost everything on the pc can be ported.
-
- advanced
- Posts: 51
- Joined: Sun Mar 28, 2010 4:10 am
- Has thanked: 1 time
- Been thanked: 7 times
Re: Just Cause *.ARC file decompression
Rocky5 wrote:sorry i miss read the thread name this was for just cause 2
Ya, I guess Rocky5 misread it again.Rick wrote:And I thought this thread was for Just Cause 1?
I have no idea how to figure out hashes. I was kind of hoping the actual plugin would be fixed, too. Where were you guys a month agoRick wrote:Are you looking for .arc extraction or something else? This is the first time I've written a BMS script.
To use, quickbms.exe extract_jc1.bms pc.tab extracted or whatnot.
To do filenames you'll need to figure out what algorithm the game is using to hash the names, it isn't Jenkins hashlittle() like Just Cause 2.
I know that "weapons_pc.bin" is hashed to 0xBB02F83B.
Ported to what from the PC? XBox 360? I'm pretty sure there's a reason they make separate versions of the game.Rocky5 wrote: oh my bad lol sorry will make a new thread for Just Cause 2 Xbox 360 files.
and thank you for making these tools its much appreciated.
x360 eez support thanks man only need the dds and almost everything on the pc can be ported.
-
- double-veteran
- Posts: 982
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 76 times
- Been thanked: 660 times
Re: Just Cause *.ARC file decompression
The contents of this post was deleted because of possible forum rules violation.
If you like what you see, why not click the little Thank You button? It will definitely motivate me!
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks
Re: Just Cause *.ARC file decompression
My script will probably work if you switch quickbms into big endian mode.
https://blog.gib.me/
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
-
- double-veteran
- Posts: 982
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 76 times
- Been thanked: 660 times
Re: Just Cause *.ARC file decompression
No, doesn't work. The PC version has a different structure than the Xbox 360 version. Try it on the sample file, you'll see that quickbms throws an error about not being able to open a certain file ( Error in myfopen() ).Rick wrote:My script will probably work if you switch quickbms into big endian mode.
If you like what you see, why not click the little Thank You button? It will definitely motivate me!
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Just Cause *.ARC file decompression
I have not fully understood if it was jc1 or jc2 (the format is enough similar) anyway I updated my justcause2 script to work with the archive you provided.
but note that I used a work-around because the tab file contains also invalid offsets:
http://aluigi.org/papers/bms/justcause2.bms
but note that I used a work-around because the tab file contains also invalid offsets:
http://aluigi.org/papers/bms/justcause2.bms
Last edited by aluigi on Thu Jun 03, 2010 9:21 pm, edited 1 time in total.