.bin Graphic File (Help)

Textures, recreate headers, conversions, algorithms and parsing of image files
artbarot
Posts: 5
Joined: Mon Feb 12, 2018 3:39 pm

.bin Graphic File (Help)

Post by artbarot »

Hello everyone

I need help with the extraction and convertion of this file "COIN.BIN".

https://mega.nz/#F!pIswUAjZ!SI_ZLhtU7Kmo1sOFt2K9pA

I believe you use use a BMS script(choro.BMS) to split "COIN.BIN" into 1 and 2, which are model information in 1.dat and texture information on 2.dat. I request help on figuring out 2.dat.

thank you in advance

eddit 2: Thank you so much allen

Trying to understand 3 files left .E3d (2 files) and title.GSL
Last edited by artbarot on Fri Apr 24, 2020 10:23 am, edited 3 times in total.
Allen
Posts: 156
Joined: Tue Sep 01, 2015 9:44 am

Re: .bin Graphic File (Help)

Post by Allen »

Received your email. I checked the file. Actually 1.dat contains some textures. I didn't find any textures in 2.dat. 2.dat should be a model file with a lot of floating point numbers in it.
Then I found out that textures are not fixed in a certain file. There is a sign that identifies it.

This is a Noesis script.

UPD: Add support 0x1040,0x1087
UPD2:Optimize the code
Last edited by Allen on Sun Apr 19, 2020 12:02 am, edited 2 times in total.
artbarot
Posts: 5
Joined: Mon Feb 12, 2018 3:39 pm

Re: .bin Graphic File (Help)

Post by artbarot »

This is amazing, thank you! I was almost losing motivation and going with a emulator ripping way but this changed it.

Are you sure about the comment for the 1 and 2.dat? https://imgur.com/a/9y8iMSa

"I found out that textures are not fixed in a certain file" do you mean they always start after some constant value ~(tim header)?
if idstring!=0x1012:
Allen
Posts: 156
Joined: Tue Sep 01, 2015 9:44 am

Re: .bin Graphic File (Help)

Post by Allen »

artbarot wrote:This is amazing, thank you! I was almost losing motivation and going with a emulator ripping way but this changed it.

Are you sure about the comment for the 1 and 2.dat? https://imgur.com/a/9y8iMSa

"I found out that textures are not fixed in a certain file" do you mean they always start after some constant value ~(tim header)?
if idstring!=0x1012:

After analyzing the current sample, yes.
This is an improved script that helps you identify textures (_tex) when extracting bin files.

Code: Select all

# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

get BIN_SIZE asize
get FOLDER basename
math i = 1
for i
   get OFFSET long
   savepos TMP
   if OFFSET == BIN_SIZE
      break
   endif
   get NEXT_OFFSET long
   xmath SIZE "NEXT_OFFSET - OFFSET"
   math tempOfs = OFFSET
   math tempOfs + 2
   goto tempOfs
   get type SHORT
   If type == 0x1012
      string NAME p "%s\%d_tex.dat" FOLDER i
   #You can continue to add other types here, according to your needs.
   #Elif type == 0x1000
   #   string NAME p "%s\%d_xxx.dat" FOLDER i
   #Elif type == 0xXXXX
   #   string NAME p "%s\%d_xxxx.mod" FOLDER i     
   Else
      string NAME p "%s\%d.dat" FOLDER i
   Endif
   log NAME OFFSET SIZE
   goto TMP
next i
Allen
Posts: 156
Joined: Tue Sep 01, 2015 9:44 am

Re: .bin Graphic File (Help)

Post by Allen »

Updated:
Add support 16bpp palette.
Add support 0x1040,0x1087
viewtopic.php?f=7&t=13153&p=54130#p54130