The VG Resource
I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Spriters Resource (https://www.vg-resource.com/forum-110.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-114.html)
+---- Thread: I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) (/thread-38046.html)



I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) - skeddles - 10-20-2020

I am trying to rip some graphics from an old PC game, Swarm. I was able to find what seems like all of the games data files. The music and sounds are ogg and can be easily read. The graphics are stored with a few different file formats (which also change between versions of the game). SEQ16/fm16 were on the first version, and the later version uses SEQUENCE/FRAME. Some of these are most likely animated too, but I think the ones I was trying (and at the bottom of this post) are one frame.

I can't find any info on any of these formats. I tried opening the images as various formats, and tried decoding them in various programs such as TiledGDD, but can't seem to get anything other than noise out of them.

Here is what I believe the extra life icon looks like:
[Image: 77pvab6.png]

I've put together a few examples if anyone wants to look. Any advice is appreciated.
http://www.mediafire.com/file/uh7cnz58bol97fk/file-examples.zip/file


RE: I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) - rufaswan - 10-20-2020

Looking at those files, *.seq16 and *.frm16 are binary format that needs a lot of time to figure out, but *.sequence and *.frame are just compressed zlib data. A simple deflate() will do the trick.

The decoded *.sequence is just a text file. For example, the decoded "Extra Life Icon.Sequence.txt" looks like this:

Code:
CSequence
{
Frames Per Second=15
Blit Type=Transparent Mask
X Offset=0
Y Offset=0
Center Hot Spot=1
Blended With Black=1
Crop Clor 0=1
Use 8 Bit Alpha=0
Run Length Encode=1
Do Dither=1
Loss Less 2=0
JPEG Quality 2=80
Mipmap For Native Version=1
}
CSequenceFrameInfoList
{
Frame Infos=Array
{
Frame Info=CFrameInfo
{
Left=0
Top=0
Right=38
Bottom=38
UpperLeftXOffset=-19
UpperLeftYOffset=-19
}
}
WasRLE=1
Flags=55
Blit Type=Transparent Mask
FPS=15
}

The *.frame file is the image data. You can kind of see the airship outline from the decoded "Extra Life Icon.Frame.dec"

https://i.imgur.com/GaQITPb.png

I would assume there is a palette and it's located somewhere else. Or maybe it is 8-bpp true color image, so RGB323 data. And since it is in a set of 4, so maybe it is doing something strange like this:

https://i.imgur.com/eNA88IF.png

I have no idea. I don't know anything much about the game to go on.

- Rufas


RE: I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) - skeddles - 10-20-2020

Thanks for taking a look! You definitely got further than me. I check them out again in TiledGDD (idk if theres a better tool for this, it's the best one i could find), and it looks similar to your screenshots, probably separate channels.

[Image: X8SwZXM.png]

Do you have any suggestions on the next step to take? Will I have to do some hex/programming magic to combine the channels and figure out the palette?

Also I feel like the sequence files must still have image data in them somewhere, as the file sizes are pretty big (blue on black is over 500k), but perhaps they were compressed differently.

And are there any easy ways to do zlib deflate on windows? I tried a bunch of different ways but either got stuck or got garbage data


RE: I can't figure out how to read this file format (SEQUENCE / SEQ16 / frm16 / Frame) - rufaswan - 10-20-2020

(10-20-2020, 08:12 PM)skeddles Wrote: Do you have any suggestions on the next step to take? Will I have to do some hex/programming magic to combine the channels and figure out the palette?

I guess next thing you need to do is to figure out how the data transformed into in-game screenshot. Does it uses palettes and has palette-swap varieties? Is there any similar data but smaller and easier to play around/testing with?

It's a lot of try and error.

(10-20-2020, 08:12 PM)skeddles Wrote: Also I feel like the sequence files must still have image data in them somewhere, as the file sizes are pretty big (blue on black is over 500k), but perhaps they were compressed differently.

You are right. I check again and see there are actually multiple zlib data in there. I just decoded the first one. Blue on Black has a very big background image (opening/ending?), but no sprites.

(10-20-2020, 08:12 PM)skeddles Wrote: And are there any easy ways to do zlib deflate on windows? I tried a bunch of different ways but either got stuck or got garbage data

I used PHP to zlib decode them. The source code are included inside the zip file. They are for command-line:

Code:
php.exe  dec_sequence.php  Extra Life Icon.Sequence
php.exe  dec_frame.php  Extra Life Icon.Frame

You can download PHP here:
https://windows.php.net/downloads/releases/archives/php-7.0.33-Win32-VC14-x86.zip (32-bit windows)
https://windows.php.net/downloads/releases/archives/php-7.0.33-Win32-VC14-x64.zip (64-bit windows)

Good luck,
- Rufas