ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Aug 18, 2017 6:23 pm

All times are UTC




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Dec 03, 2016 2:36 pm 
User avatar

Joined: Fri Jun 24, 2016 2:28 pm
Posts: 6
I extract the zlib files from editing on GGS and i get something like this

-Data of the file (80h)
-Palette info (0400h)
-Texture info (x20000h)

The QRS format file it's
- Information 1 (xC0h)
-Texture info from zlib file (x20000h)
- Information 2 (x80h)
-Palette info from zlib file (x400h)
- Information 3 (x20h)



I need a way to convert that files, so i need a way to

ADD information 1
Code:
01 00 00 00 08 00 00 00 00 02 00 00 04 02 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
18 00 00 00 38 80 00 00 80 00 02 00 80 04 00 00
00 02 00 00 04 00 00 00 02 00 00 00 00 00 00 00
00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00
00 00 31 61 02 00 00 20 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 07 20 00 50
03 80 00 00 00 00 00 10 0E 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 00
80 00 00 00 00 01 00 00 52 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 53 00 00 00 00 00 00 00
00 A0 00 00 00 00 00 08 00 00 00 00 00 00 00 00



Put texture information of zlib file, 20000h of data starting on 480h of zlib file




Then ADD information 2

Code:
01 80 00 00 00 00 00 10 0E 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 50
03 80 00 00 00 00 00 10 0E 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 00
10 00 00 00 10 00 00 00 52 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 53 00 00 00 00 00 00 00
40 80 00 00 00 00 00 08 00 00 00 00 00 00 00 00



Add the palette information of zlib file, 400h of data starting on 80h of zlib file


And for finish the file add the information 3 to finish the file


Quote:
01 80 00 00 00 00 00 10 0E 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00



The information in codes aren't available on original files so must be added


Top
   
PostPosted: Sat Dec 03, 2016 2:59 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6422
Moved in the correct section but I think that you must post a pre and post example of I doubt someone will check this topic.


Top
   
PostPosted: Sat Dec 03, 2016 3:49 pm 
User avatar

Joined: Fri Jun 24, 2016 2:28 pm
Posts: 6
I posted on QuickBMS because the idea was do t with that with a script

Here are some examples

Thanks :)


Attachments:
conversion.zip [42.56 KiB]
Downloaded 32 times
Top
   
PostPosted: Sat Dec 03, 2016 6:45 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6422
Code:
set INFO1 binary "\x01\x00\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\x04\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x38\x80\x00\x00\x80\x00\x02\x00\x80\x04\x00\x00\x00\x02\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x61\x02\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x20\x00\x50\x03\x80\x00\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x01\x00\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00"
set INFO2 binary "\x01\x80\x00\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x00\x00\x50\x03\x80\x00\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x10\x00\x00\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x40\x80\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00"
set INFO3 binary "\x01\x80\x00\x00\x00\x00\x00\x10\x0E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x00\x00\x00\x00\x00\x00\x00"

math DATA_SIZE = 0x80
math PALETTE_SIZE = 0x400
get TEXTURE_SIZE asize
math TEXTURE_SIZE - DATA_SIZE
math TEXTURE_SIZE - PALETTE_SIZE

getdstring DATA DATA_SIZE
getdstring PALETTE PALETTE_SIZE
getdstring TEXTURE TEXTURE_SIZE

log MEMORY_FILE 0 0
append
putdstring INFO1 0xc0 MEMORY_FILE
putdstring TEXTURE TEXTURE_SIZE MEMORY_FILE
putdstring INFO2 0x80 MEMORY_FILE
putdstring PALETTE PALETTE_SIZE MEMORY_FILE
putdstring INFO3 0x20 MEMORY_FILE
append

get SIZE asize MEMORY_FILE
get NAME basename
string NAME + ".qrs"
log NAME 0 SIZE MEMORY_FILE


Top
   
PostPosted: Sat Dec 03, 2016 11:14 pm 
User avatar

Joined: Fri Jun 24, 2016 2:28 pm
Posts: 6
Wow... thanks a lot

its a way to append other script?

I tried to add it, but it only reads the first file and not the generated with that script


Top
   
PostPosted: Sun Dec 04, 2016 10:53 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6422
I don't know what you mean.


Top
   
PostPosted: Sun Dec 04, 2016 12:44 pm 
User avatar

Joined: Fri Jun 24, 2016 2:28 pm
Posts: 6
Launch a second script loading the result file for compress each file.

I attached with append codes but it loads the Zlib file and not the QRS one


Top
   
PostPosted: Sun Dec 04, 2016 1:27 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6422
You can't do that, mixing scripts and input/output...

What you can do is just the most simple solution:
- use my script on the files using a new empty folder
- run whatever script you want on the files of that new folder

Otherwise you can try to add the following instruction between my script and your appended other script:
open "." NAME

It will load the new generated file as current file.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited