The Incredible Machine

Discuss game modding
Post Reply
User avatar
movAX13h
Less than a nibble
Posts: 4
Joined: January 13th, 2017, 11:50 am

The Incredible Machine

Post by movAX13h »

Hello, has anyone figured out the SCN format of the bitmaps?

All palettes have only 16 colors though they would have space for 256 ... only 16 are used in TIM, TIM2 and TEMIM. I know it's hard to believe but it's true. The compression used in SCN format is not very effective. They would have done a better job storing 2 pixels in 1 byte instead.

This is the in-game palette of TIM (the first color is transparent):
Image

Here are two examples (formatted and commented in my hex editor):

PART23.BMP which is 16x16 and the SCN section contains 127 bytes of compressed data:
Image

PART28.BMP is only 16x15 in size and the SCN section contains 137 bytes of compressed data:
Image

The compressed stream seems to always end with 0 followed by 64.
I've modify the resource files to see how the sprites change in game but that did not reveal much because a lot changes by modifying a single byte.

Any hints appreciated, I've stared at these numbers for too long now already ;)
movAX13h
Nyerguds
Less than a nibble
Posts: 10
Joined: September 24th, 2017, 9:05 am

Re: The Incredible Machine

Post by Nyerguds »

I've been looking into the Dynamix games recently, and while I haven't been able to figure out the SCN or VQT storage formats, I did find out that most of their games accept replacements that have a much simpler BIN/VGA structure inside, for both SCN and BMP files. Basically, the BIN chunk contains a 4-bit image, and the VGA chunk contains the additional 4 bits for each pixel to "enrich" the bin image to 8-bit. In some games like Heart of China the original 4-bit image is actually usable, by using a vertical 16-colour slice of the colour palette; it seemed designed so each block of 16 colours were different varieties of the same colour. For reference, this is the 8-bit version.

I made a tool to convert to the BIN/VGA format, though any original information will probably need to be recovered from screenshots until I figure out how to decode these. The tool does allow opening even the formats it can't decode to show the dimensions of all frames, so that could help a bit.

http://www.oldgamesitalia.net/forum/ind ... opic=24162

By the way, like all Dynamix chunks, the first value of the OFF: section is also just the chunk size. The second seems to be where the data of each frame starts inside the SCN chunk, but since this file only has one frame, it's just 0 here.
Nyerguds
Less than a nibble
Posts: 10
Joined: September 24th, 2017, 9:05 am

Re: The Incredible Machine

Post by Nyerguds »

Hmm, I forgot about this thread. This format has actually since been figured out:

https://moddingwiki.shikadi.net/wiki/Th ... age_format

My modding tool even supports reading and writing it 8-)
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

Re: The Incredible Machine

Post by MrFlibble »

Nice!
Nyerguds
Less than a nibble
Posts: 10
Joined: September 24th, 2017, 9:05 am

Re: The Incredible Machine

Post by Nyerguds »

Huge thanks to Knt47, who did the main research of figuring out the compression format basics. Though he wasn't ambitious enough for my tastes; he stopped at just a viewer :D
User avatar
movAX13h
Less than a nibble
Posts: 4
Joined: January 13th, 2017, 11:50 am

Re: The Incredible Machine

Post by movAX13h »

Good job! Thanks!
Post Reply