flat assembler
Message board for the users of flat assembler.

Index > DOS > cracking an old game

Author
Thread Post new topic Reply to topic
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 15 Jul 2010, 19:54
So i have this old game (thunderhawk) which a friend and i
have been screwing around with by basically editing some of
the games script files but we are limited to just that.
I would like to view the image files which seem to be compressed
and after much time with hex viewer cannot figure the format out...
Now i think if i dissasemble the MZ-EXE i can study the loader to get the formats.
I remember a lot of old games using huffman algo but had not checked 4 it yet.
Maybe you have an idea for an easy way?
Maybe a good dissasembler to reccomend?
This is purely for private fun so i think it is a valid reason to be cracking it.
If you are interested in helping or have any ideas or advice i would like to hear them.
Thanks.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 15 Jul 2010, 19:54
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 15 Jul 2010, 21:56
bitshifter,

Thunderhawk AH-73M? I have some notes left on its .MAC file format. IIRC, it's big-endian format, starting with two words (width in bytes and height in scanlines), then two bytes follow (bpp and flags). If flags & 2, palette is present as appropriate for bpp number of words in format 0x0RGB. After that, encoded bitmap follows (RLE?), but I can't find the rest of my notes.

As for disassembler, IDA is probably the best.
Post 15 Jul 2010, 21:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Jul 2010, 22:06
Also, if the file is packed, there were tons of DOS unpackers for all kinds of packers. Unless it is a custom protection (rare), you have a good chance to find some tool for it.
Post 15 Jul 2010, 22:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 15 Jul 2010, 23:44
Yes baldr, it is Thunderhawk AH-73M

I took a screenshot of one of the images and found the associated file.
Maybe you can make any sense of it?

Also, IDA looks good but demo version is 15mb
I can only touch a couple megs with my ip speed. (5kbps)


Description:
Download
Filename: Images.zip
Filesize: 8.65 KB
Downloaded: 484 Time(s)


_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 15 Jul 2010, 23:44
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 16 Jul 2010, 09:21
bitshifter,

The following information can be quite inaccurate: I didn't RE .MAC format completely.

Bitmap is stored as interleaved stripes for each of the planes (number of which is indicated in byte 4).
If byte at offset 5 has bit 0 set, stripes are compressed using RLE encoding, stored otherwise.

RLE compressed stream consists of «command byte» [«data byte(s)»] structures.
If command byte<128, data bytes is an array of (command byte+1) literal values.
If command byte>128, single data byte is repeated (257-command byte) times.
command byte==128 consumes/generates no data and probably used for padding.

I remember some issue with word-alignment of stripes (15-byte-wide picture was encoded using 16-byte plane stripes?) and something about encoding/decoding in 40-byte chunks (you may look for ATARI.TXT on fileformat.info, doesn't matter for decoding yourself).

Decoded plane stripes are combined (LSB to MSB in order of appearance) to produce 4-bit indices into palette (they don't indeed, it's just the feature of 320×200×4 video mode).

Palette-less images (those with bit 1 cleared at offset 5) are probably using current palette.

15 MB is around 1 hour at 5 kBps, is that too long? I remember 2400 bps modems (without error correction) and we've transferred 10+ MB files, long-distance, with them (ahhh, those FIDOnet days!). Anyway, IDA 4.9 can be stripped down (not much, ~50%) by removing non-DOS stuff. If you're interested, let me know.
Post 16 Jul 2010, 09:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.