I am looking to decompile the sprite data from an old DOS Game (Treasure Cove). If it helps any, I found that the game was written with the Borland C++ Programming Language.

It appears that the sprites are located in TLD files, though I am incapable of confirming or denying that. If my theory is correct, are there any programs capable of opening TLD files?

Screenshot of an analysis I just conducted.

What do you suggest I do with this information? It's in Borland C++, and I want to find a method of extracting it.

This file seems to contain Bitmap signatures. I looked for GIF signatures, and found nothing.

  • 1
    Hello and welcome to RE.SE! In the current state your question is too vague and broad. Can you add more details on the problem at hand, methods that you tried, whats the reason for your assumption etc. Right now your only query is "does a software like this exists" which is not an actual RE question. – sudhackar Dec 5 '19 at 3:54
  • My apologies for being vague. I used a HEX Editor to attempt to see if there’s any Bitmap or JPG data. I attempted to use Cheat Engine (There’s a snapshot feature that captures each visual object in separate layers). So far, I have no theory besides the TLD files. What do you suggest I do to extract the sprites? – SonAmyFan362 Dec 17 '19 at 23:48
  • 2
    I would suggest looking into TLD files with HEX Editor (like you did) and trying to find magic strings for some known format of that time period. For example GIF magic string is "GIF87a". This way you can confirm sprite format. After you confirm format you could look for the right tool to extract sprites. – Darius Kucinskas Dec 19 '19 at 15:30
  • Mmm’kay. And, what tools are advisable for JPG, BMP, or GIF? – SonAmyFan362 Dec 19 '19 at 16:32

There’s an application called QuickBMS that you could use to import/export data. Here’s a tutorial on how to do so, by creating BMS scripts: Making BMS Scripts

Also there are communities such as Xentax and ZenHax that are dedicated to videogame data extraction/modding.


Ok first you mention Borland C++ IIRC there where decompiler for this IDE/compiler that would create source code from the executable. Diging through decompiled source might help you learn about the gfx (looking for obvious stuff like accessing VGA registers or VRAM segment)... However can't remember how it was called ...

Now to improve your question and chance of valid result you need to add some info:

  1. some screenshots from game

    they might help us infer the resolution of sprites, gfx algorithms used and more... From resolution and approximate number of sprites in game you can guess the size of gfx data which might help you locate it. Also does the game use 16/256/... colors per pixel?

  2. test data files

    you simply can handle your files as data files and copy them onto screen as they where image of specified pixel width. You can view your files like this. If you spot repetitive patterns you use that part of file and try to change the width of "image" until you see images (or not). There are utilities that can do this for you like PV.EXE or write your own ...

    Here simple preview of your file as 512x??? 24 bit uncompressed image from 00000000h ofset:


    as you can see clearly there are some patterns... after a small bit of playing with the image width this looks like image to me:

    possible image

    there are more "images" in there some with 200 others with 201 pixels width however it looks like the scan lines does not align at first which might suggest RLE encoding ...

    I rendered 3 bytes as single pixel but most likely there is just 1 or 2 bytes per pixel and some kind of 256 color palette is used ... so the real resolution of images is around 200*2 or 200*3 ... depending on encoding

  3. once possible image source found try decoding it

    You need to found out the encoding if it is RAW, or RLE or LZW or differently packed/encoded, you need to know the bit width of pixels, image resolution etc ...

  4. in case you got more files you can infer chunk structure

    when you open your file in hex in many fileformats there is usual to have info on separate chunks of file into which it is divided where there is usual:


    for each or at least for the first chunk (others might be without signature) so try to find in hex from the start of a file number that is equal or slightly less than size of your file... if the position is consistent in all files you found header ...


    which might ease up the parsing/decoding separating images considerably...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.