Show whole topic Feb 09, 2019 4:01 pm
riess Offline
Approved Member
Registered since: Feb 09, 2019
Location: -


Subject: M.A.X 2 Data Extractor
Hello everyone!

Few days ago I've started experimenting with reverse engineering MAX2 asset packages, mostly as fun/learning project.

So far I've got following to work:

- isolate assets from file
- decompress and unpack images with color palettes (eg. unit portraits, logos, interface backgrounds)
- isolate TXT files
- isolate UI files no idea how to get color for those (yet!)

The code can be found here:

https://github.com/rafalp/max2-extractor

Currently I am working on correctly isolating assets of type 5, which appear to be small images used around the UI. Eg. here's the lightbulb units sometimes display. It has 10 bytes long header followed by pixel data. First 4 bytes are image dimensions, but meaning of next 6 bytes I can't fathom.

But for now I don't know how to find colors for those pixels. It appears that those assets aren't compressed and are using palette stored elsewhere:

0F001900 07000C00 20000000 00001313 13131313 13000000 00000000 13F1F111 11111111 13000000 000013A9 11111111 11111111 13000000 13A911A0 A0111111 11111111 130013F1 11ACA011 11111111 11111111 13131111 A0111111 11111111 11111113 13111111 11111111 11111111 11111313 11111111 11111111 11111111 11131311 1111112C 112C112C 11111111 13131111 11112C11 11112C11 11111113 13111111 1111112C 11111111 11111300 13111111 112C112C 11111111 13000000 13111111 0A110A11 11111300 00000013 1111110A 110A1111 A9130000 00000013 1111B311 B411A913 00000000 00001311 11F111F1 11F11300 00000000 00001311 F1F5F111 13000000 00000000 001311F1 F5F11113 00000000 00000013 13B1AFB7 C0C01313 00000000 00001313 B7AFC5C7 C7131300 00000000 000013C3 C0B7C0BE 13000000 00000000 0013C5C5 CAC6C313 00000000 00000013 13B7AFC5 C7C71313 00000000 00000013 13D4D2D1 13130000 00000000 00000013 13CD1313 00000000 00

I've got some success by reusing the palette from M.A.X1 GFX tool, but while it produces good results for some images, it completely shredded others.

I've also managed to isolate binary data of what appears to be audio files (file header appears to contain bitrate number) but no idea how to convert those to WAV. Are there any resources available on how binary data for audio looked like in M.A.X 1?

Attachments:
BULB.PNG
Downloads: 3479
Filesize: 434 Byte
5_BULB.png
Downloads: 3468
Filesize: 450 Byte
5_BNMUMULT.png
Downloads: 3388
Filesize: 3.38 KB

This post has been edited 3 times. Last edit on Feb 09, 2019 4:40 pm by riess.