Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Constantine IMAGE.BIN file (PC version)

Featured Replies

  • Author
  • Localization

YAGAMI55, posted Mon Feb 08, 2021 10:32 pm (62077)


Ok
I find what is a lzo compression
but how reimport back
Can anyone help with this?
  • Author
  • Localization

aluigi, posted Tue Feb 09, 2021 9:08 am (62084)


Why do you say it's lzo?
Have you extracted it? script?
  • Author
  • Localization

YAGAMI55, posted Tue Feb 09, 2021 9:45 am (62086)


aluigi wrote:
Why do you say it's lzo?
Have you extracted it? script?

yes. its lzo1x


get FN FILENAME
get FILE_SIZE asize
set OFFSET 0
log FN 0 0
comtype lzo1x
append

for
Xmath POS "FILE_SIZE - OFFSET"
if POS > 16384
get SIZE SHORT
math OFFSET 2
Clog FN OFFSET SIZE 10000000
math OFFSET SIZE
GoTo OFFSET
else
log FN OFFSET 16384 // ?!
break
endif
next i

append
  • Author
  • Localization

YAGAMI55, posted Tue Feb 09, 2021 9:50 am (62087)


PS2 version has similar compression
but sounds not compress. this makes easy

but text source is compress(((
all textures, txt labels all compressed
i dont know what tools use. because all tool for game need a header
in this image.bin dont have header

needs like most zlib tool.
just compress without adding header in file and bingo
  • Author
  • Localization

aluigi, posted Wed Feb 17, 2021 11:17 pm (62342)


Interesting, if you have other samples with these different formats/compressions feel free to provide them.
  • Author
  • Localization

YAGAMI55, posted Wed Mar 03, 2021 5:51 pm (62643)


aluigi wrote:
Interesting, if you have other samples with these different formats/compressions feel free to provide them.

aluigi, ps2 and pc have identical type of archive.

the problem is that the toc table is also under lzo compression

simple structure:

information about archive (size) - lzo
toc table (each file offset and size) - lzo
files (texture,mesh etc) - lzo

I ask about write simple compress/decompress utility for this game
but no one want do this because its old game))))
  • Author
  • Localization

aluigi, posted Sat Mar 27, 2021 2:38 pm (63087)


The format doesn't look simple at all to me:
Code:
01 00 00 80 46 90 1e 00 01 00 00 80 3e 90 1e 00   ....F.......>...
01 00 00 00 04 00 00 00 bd 15 00 00 01 00 00 80   ................
17 01 00 00 01 00 00 00 07 00 00 00 44 45 4d 4f   ............DEMO
4e 30 31 08 00 00 00 07 00 00 00 0c 00 00 00 04   N01.............
00 00 00 b1 ec 14 67 0b 00 00 00 07 00 00 00 0f   ......g.........
00 00 00 04 00 00 00 b1 ec 14 67 09 00 00 00 07   ..........g.....
00 00 00 0d 00 00 00 04 00 00 00 b1 ec 14 67 10   ..............g.
00 00 00 07 00 00 00 11 00 00 00 04 00 00 00 b1   ................
ec 14 67 0a 00 00 00 07 00 00 00 0e 00 00 00 04   ..g.............
00 00 00 b1 ec 14 67 02 00 00 00 0b 00 00 00 03   ......g.........
00 00 00 04 00 00 00 06 00 00 00 21 00 00 00 07   ...........!....
00 00 00 25 00 00 00 04 00 00 00 04 00 00 00 00   ...%............
40 00 00 01 00 00 80 2b 01 00 00 01 00 00 00 0b   @...... ........
00 00 00 53 4d 41 4c 4c 5f 44 45 4d 4f 4e 08 00   ...SMALL_DEMON..
00 00 0b 00 00 00 0c 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 0b 00 00 00 0b 00 00 00 0f 00 00 00 04 00   P...............
00 00 5b 3e 50 c7 09 00 00 00 0b 00 00 00 0d 00   ..[>P...........
00 00 04 00 00 00 5b 3e 50 c7 10 00 00 00 0b 00   ......[>P.......
00 00 11 00 00 00 04 00 00 00 5b 3e 50 c7 0a 00   ..........[>P...
00 00 0b 00 00 00 0e 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 02 00 00 00 0f 00 00 00 03 00 00 00 04 00   P...............
00 00 06 00 00 00 1b 00 00 00 07 00 00 00 23 00   ..............#.
00 00 04 00 00 00 04 00 00 00 00 20 00 00 01 00   ........... ....
00 80 1b 01 00 00 01 00 00 00 09 00 00 00 34 4d   ..............4M
44 45 4d 4f 4e 30 31 08 00 00 00 09 00 00 00 0c   DEMON01.........
00 00 00 04 00 00 00 f9 3d 6d 5b 0b 00 00 00 09   ........=m[.....
00 00 00 0f 00 00 00 04 00 00 00 f9 3d 6d 5b 09   ............=m[.
00 00 00 09 00 00 00 0d 00 00 00 04 00 00 00 f9   ................
3d 6d 5b 10 00 00 00 09 00 00 00 11 00 00 00 04   =m[.............
00 00 00 f9 3d 6d 5b 0a 00 00 00 09 00 00 00 0e   ....=m[.........
00 00 00 04 00 00 00 f9 3d 6d 5b 02 00 00 00 0d   ........=m[.....
00 00 00 03 00 00 00 04 00 00 00 06 00 00 00 1b   ................
00 00 00 07 00 00 00 21 00 00 00 04 00 00 00 04   .......!........
00 00 00 00 20 00 00 01 00 00 80 1f 01 00 00 01   .... ...........
00 00 00 0b 00 00 00 43 53 54 5f 42 52 49 43 4b   .......CST_BRICK
32 54 08 00 00 00 0b 00 00 00 0c 00 00 00 04 00   2T..............
00 00 e7 77 f1 0c 0b 00 00 00 0b 00 00 00 0f 00   ...w............
00 00 04 00 00 00 e7 77 f1 0c 09 00 00 00 0b 00   .......w........
00 00 0d 00 00 00 04 00 00 00 e7 77 f1 0c 10 00   ...........w....
00 00 0b 00 00 00 11 00 00 00 04 00 00 00 e7 77   ...............w
f1 0c 0a 00 00 00 0b 00 00 00 0e 00 00 00 04 00   ................
00 00 e7 77 f1 0c 02 00 00 00 0f 00 00 00 03 00   ...w............
00 00 04 00 00 00 06 00 00 00 15 00 00 00 07 00   ................
00 00 1d 00 00 00 04 00 00 00 04 00 00 00 04 00   ................
00 00 01 00 00 80 1f 01 00 00 01 00 00 00 0b 00   ................
00 00 43 53 54 5f 42 52 49 43 4b 33 54 08 00 00   ..CST_BRICK3T...

I can see that it's a sort of sequences of 32bit fields containing the type of information that follow but it doesn't look at toc at all.
  • Author
  • Localization

YAGAMI55, posted Wed May 05, 2021 10:38 am (63797)


aluigi wrote:
The format doesn't look simple at all to me:
Code:
01 00 00 80 46 90 1e 00 01 00 00 80 3e 90 1e 00   ....F.......>...
01 00 00 00 04 00 00 00 bd 15 00 00 01 00 00 80   ................
17 01 00 00 01 00 00 00 07 00 00 00 44 45 4d 4f   ............DEMO
4e 30 31 08 00 00 00 07 00 00 00 0c 00 00 00 04   N01.............
00 00 00 b1 ec 14 67 0b 00 00 00 07 00 00 00 0f   ......g.........
00 00 00 04 00 00 00 b1 ec 14 67 09 00 00 00 07   ..........g.....
00 00 00 0d 00 00 00 04 00 00 00 b1 ec 14 67 10   ..............g.
00 00 00 07 00 00 00 11 00 00 00 04 00 00 00 b1   ................
ec 14 67 0a 00 00 00 07 00 00 00 0e 00 00 00 04   ..g.............
00 00 00 b1 ec 14 67 02 00 00 00 0b 00 00 00 03   ......g.........
00 00 00 04 00 00 00 06 00 00 00 21 00 00 00 07   ...........!....
00 00 00 25 00 00 00 04 00 00 00 04 00 00 00 00   ...%............
40 00 00 01 00 00 80 2b 01 00 00 01 00 00 00 0b   @...... ........
00 00 00 53 4d 41 4c 4c 5f 44 45 4d 4f 4e 08 00   ...SMALL_DEMON..
00 00 0b 00 00 00 0c 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 0b 00 00 00 0b 00 00 00 0f 00 00 00 04 00   P...............
00 00 5b 3e 50 c7 09 00 00 00 0b 00 00 00 0d 00   ..[>P...........
00 00 04 00 00 00 5b 3e 50 c7 10 00 00 00 0b 00   ......[>P.......
00 00 11 00 00 00 04 00 00 00 5b 3e 50 c7 0a 00   ..........[>P...
00 00 0b 00 00 00 0e 00 00 00 04 00 00 00 5b 3e   ..............[>
50 c7 02 00 00 00 0f 00 00 00 03 00 00 00 04 00   P...............
00 00 06 00 00 00 1b 00 00 00 07 00 00 00 23 00   ..............#.
00 00 04 00 00 00 04 00 00 00 00 20 00 00 01 00   ........... ....
00 80 1b 01 00 00 01 00 00 00 09 00 00 00 34 4d   ..............4M
44 45 4d 4f 4e 30 31 08 00 00 00 09 00 00 00 0c   DEMON01.........
00 00 00 04 00 00 00 f9 3d 6d 5b 0b 00 00 00 09   ........=m[.....
00 00 00 0f 00 00 00 04 00 00 00 f9 3d 6d 5b 09   ............=m[.
00 00 00 09 00 00 00 0d 00 00 00 04 00 00 00 f9   ................
3d 6d 5b 10 00 00 00 09 00 00 00 11 00 00 00 04   =m[.............
00 00 00 f9 3d 6d 5b 0a 00 00 00 09 00 00 00 0e   ....=m[.........
00 00 00 04 00 00 00 f9 3d 6d 5b 02 00 00 00 0d   ........=m[.....
00 00 00 03 00 00 00 04 00 00 00 06 00 00 00 1b   ................
00 00 00 07 00 00 00 21 00 00 00 04 00 00 00 04   .......!........
00 00 00 00 20 00 00 01 00 00 80 1f 01 00 00 01   .... ...........
00 00 00 0b 00 00 00 43 53 54 5f 42 52 49 43 4b   .......CST_BRICK
32 54 08 00 00 00 0b 00 00 00 0c 00 00 00 04 00   2T..............
00 00 e7 77 f1 0c 0b 00 00 00 0b 00 00 00 0f 00   ...w............
00 00 04 00 00 00 e7 77 f1 0c 09 00 00 00 0b 00   .......w........
00 00 0d 00 00 00 04 00 00 00 e7 77 f1 0c 10 00   ...........w....
00 00 0b 00 00 00 11 00 00 00 04 00 00 00 e7 77   ...............w
f1 0c 0a 00 00 00 0b 00 00 00 0e 00 00 00 04 00   ................
00 00 e7 77 f1 0c 02 00 00 00 0f 00 00 00 03 00   ...w............
00 00 04 00 00 00 06 00 00 00 15 00 00 00 07 00   ................
00 00 1d 00 00 00 04 00 00 00 04 00 00 00 04 00   ................
00 00 01 00 00 80 1f 01 00 00 01 00 00 00 0b 00   ................
00 00 43 53 54 5f 42 52 49 43 4b 33 54 08 00 00   ..CST_BRICK3T...

I can see that it's a sort of sequences of 32bit fields containing the type of information that follow but it doesn't look at toc at all.

Its to hard toc. I stuck with this too

I find compress/decompress file size. but i not understand where is offset table for each file
  • Author
  • Localization

YAGAMI55, posted Tue Feb 28, 2023 1:17 pm (75601)


So. I recreate bms script what i found.
Realy compress files dosnt have toc. toc some one in other file (SLUS/SLES ?)

Code:
get FILE_SIZE asize
set OFFSET 0
comtype lzo1x

for
    xmath POS "FILE_SIZE - OFFSET"
    if POS > 16384
        get SIZE SHORT
        math OFFSET 2
      Clog "" OFFSET SIZE 10000000
        math OFFSET SIZE
        GoTo OFFSET
      else   
        log "" OFFSET 16384   
        break
 endif
next i


Last file in the sequence allways 16384 bytes

Ill try to reimport files. Some of them not import because new compress size is biger then original. And try run the game. in PCSX TLB_Miss - that incorrect toc error.


I cant understand this game(((

maybe need some deep debuging
  • Author
  • Localization

YAGAMI55, posted Wed Mar 01, 2023 9:50 am (75609)


Games works)
Hmmm... Finally i understand how it works. The .bin files its a sequence chunks compressed with lzo1x, then decompress all chunks they have equl size 16384 (dec) 4000 (hex). Then game unpack chunks and combine all chunk in one file.

the problem is that bms inserts files at offset and some of them are bigger than the extracted one.

For this game need special tools)
  • Author
  • Localization

rabatini, posted Wed Mar 01, 2023 2:18 pm (75612)


YAGAMI55 wrote:
Games works)
Hmmm... Finally i understand how it works. The .bin files its a sequence chunks compressed with lzo1x, then decompress all chunks they have equl size 16384 (dec) 4000 (hex). Then game unpack chunks and combine all chunk in one file.

the problem is that bms inserts files at offset and some of them are bigger than the extracted one.

For this game need special tools)

Even with reimport2/3?
Actually reimport 2/3 is kind useless for a lot of games.
Because the put the data in the end of file.
  • Author
  • Localization

YAGAMI55, posted Thu Mar 02, 2023 2:33 am (75623)


rabatini wrote:
YAGAMI55 wrote:
Games works)
Hmmm... Finally i understand how it works. The .bin files its a sequence chunks compressed with lzo1x, then decompress all chunks they have equl size 16384 (dec) 4000 (hex). Then game unpack chunks and combine all chunk in one file.

the problem is that bms inserts files at offset and some of them are bigger than the extracted one.

For this game need special tools)

Even with reimport2/3?
Actually reimport 2/3 is kind useless for a lot of games.
Because the put the data in the end of file.


Yeah. Seguence of file must be 1->2->3->4=1234(Image.bin) - Games work. After bms reimport 2/3 seguence looks like this 1->2->4->3
  • Author
  • Localization

rabatini, posted Thu Mar 02, 2023 11:37 am (75636)


YAGAMI55 wrote:
rabatini wrote:
YAGAMI55 wrote:
Games works)
Hmmm... Finally i understand how it works. The .bin files its a sequence chunks compressed with lzo1x, then decompress all chunks they have equl size 16384 (dec) 4000 (hex). Then game unpack chunks and combine all chunk in one file.

the problem is that bms inserts files at offset and some of them are bigger than the extracted one.

For this game need special tools)

Even with reimport2/3?
Actually reimport 2/3 is kind useless for a lot of games.
Because the put the data in the end of file.


Yeah. Seguence of file must be 1->2->3->4=1234(Image.bin) - Games work. After bms reimport 2/3 seguence looks like this 1->2->4->3

Yeah, unfortunately, the reimport 2/3 put bigger data than original in the end of file, and some games, it will crash.
I think a specific tool is needed.
  • Author
  • Localization

YAGAMI55, posted Fri Mar 03, 2023 10:33 am (75654)


Unpack and pack again image.bin is not a problem (i think)

This is really simple. But not for bms))) because bms need more VAR and MATH variable and custom functions to do this(
All compressed files in game have one thing - it a compressed size of chunk.
Let me explain

first 2 (little endian) bytes its a compreesed size of chunk. Then compressed chunk)
Image
Image
then next size and chunk

That all)

If end of Image.bin have size > 16384 - then do compress
if size=
I think the developers made such a chunky compression so that the PS2 and xbox orig would be less loaded. In case - 16384 have the best compression ratio in lzo1x algo
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.