Page 1 of 1

Treasure Cove String Table

Posted: Wed Oct 07, 2020 6:05 pm
by DosGuy362
Hi. I have tried to look into where the sprites are stored for Treasure Cove (Which is a DOS game, though, the computer seems to run it just fine on a Windows 7 Virtual Machine), and, at the moment, I have some leads. However, I decided to extract the Strings Table to see if there's anything interesting, and, to my surprise, there is. I just need some help in interpreting the Text File that's enclosed in the attachment (The Forum won't allow Text Files) in this post, as well as knowing how to proceed with this information. What's most interesting is the following: BNDL, FFNT, PMAP, SSND, and OTHR. Now, I think BNDL is a reference to a bundle (I could be wrong), FFNT refers to... a font, PMAP, SSND refers to sounds, and OTHR refers to other resources? Other interesting finds are RRGB, and a reference to WING32.DLL. Please correct me if I am wrong in any aspect of my analysis. I just need help in figuring out where the sprites are stored, and how to interpret the data that is presented in the output file. If it helps, I used Executable's strings lister and replacer 0.2.3a to generate the Text File.

Thanks in advance, and I look forward to extract the sprites with your help.

Re: Treasure Cove String Table

Posted: Wed Oct 07, 2020 10:59 pm
by ikskoks
I guess that sprites are probably in those DAT files https://imgur.com/a/piWQ7wG
But you need to reverse engineer DAT file format first to get sprites.

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 1:38 am
by DosGuy362
Hm. That's probable. However, in Versions 1 and 2, the only DAT file is users.dat, and there's slight differences. For example, the screenshot you uploaded shows me that the version you looked at is the original one (the dead giveaway is the DAT files, and the TCV.BAT file in the screenshot). I noticed a difference in how the different versions are launched. The DOS or original (whichever term you want to use) uses COVE.EXE, file size: 153 kilobytes. Version 1 has Tcvwin32.exe, size 192 kilobytes, and Version 2 has the same executable name, size: 195 kilobytes. The differing file sizes tell me that something is up.

Versions 1 and 2 must have a different way to store sprite data, probably partially within the executable in the later two versions, since there's no TLD, DAT, or DLL files other than users.dat (I suspect the TLD to be a similar type of file to DLL files, since they appear to serve the same purpose). The executable is suspected to store sprite data, since there's an executable called TCVWIN32.EXE in Versions 1.1 and 2, and the primary reason I believe the executable to be holding the sprite data is due to the file size. On the CD roms of each Version (1.1 and 2), there's TCVWIN.EXE, and TCVWIN32.EXE. For Version 1.1, you can notice that there's a folder called TCVWINCD, which sounds like a starting point for that particular version, because it contains DLL files. For Version 2, there's a folder called DATA, which contains TLD files. I am going to enclose some download links, so you can see which versions have which structure, and I hope to rip the sprites from each version, if possible. Now, your DAT file theory still sounds plausible, since from what I can tell, DAT files are basically data files, if I am correct? If that's the case, data can probably include sprite data. What's your suggested plan of action to reverse engineer DAT files?

In the meantime, I will try my best to understand how sprites were stored in those days, and it's possible they partially stored the sprites and background information in the executables. If that's the case, how do I confirm this, or did I already confirm it? Just wondering. Thanks for having replied. Not too many people have replied to my inquiries on doing this.

Download links
Version 1 link, Version 2 link.

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 12:02 pm
by ikskoks
Yeah, I was using other version, but now I have reverse engineered TLD archives from Treasure Cove 2.0
Here are tool and documentation
https://github.com/bartlomiejduda/Tools ... ure%20Cove
It will allow you to extract data and analyze it.

For now I was only able to see font in Tile Molester https://imgur.com/a/p5d9xdB
It is view of one of the extracted files from TCV.TLD archive.

the only DAT file is users.dat
I believe it is only save file as it appears only when you launch the game and
it stores your profile name on the beginning https://imgur.com/a/pYVQYV7
I called my user "Lel" https://imgur.com/a/DVrKmWT
DAT files are basically data files, if I am correct?
Yeah, probably.
What's your suggested plan of action to reverse engineer DAT files?
I think that there are two possible way to proceed. First is to open files in hex editor or any graphics tools viewtopic.php?f=33&t=15540
and try to find image data manually.
Second is to open executable in dissasembler and try to understand source code.
You can use tools like IDA Pro, x32dbg, Sysinternal's ProcessMonitor etc.

You can also read some tutorials how to do it here viewtopic.php?f=29&t=22266
(Expecially see "DOS Tutorials" section there)

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 3:15 pm
by DosGuy362
Cool stuff! So far, such a great start! I want to try out your Python Script, but, I need to know how to operate it. Like, does it run straight from CMD, or does it require to be run through a Python Commandline?

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 3:41 pm
by DosGuy362
There’s a strong chance that the sprites are in the BNDL files. I did a rapid Google Search, and although there’s nothing that I can find in regards to BNDL files in those days, the results suggest that they are bundle files. Sounds like another highly obvious place to search. I think that Version 1.1 refers to the BNDL files, and there seems to be a great amount of them. If I am wrong about this theory, what do bundle files contain?

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 6:10 pm
by ikskoks
I want to try out your Python Script, but, I need to know how to operate it. Like, does it run straight from CMD, or does it require to be run through a Python Commandline?
You can just follow these steps to run it:
1. Download and install Python 3
2. (optionally) Download and install Wing IDE Personal Edition
3. Change paths at the end of the script
4. Run script in Python (cmd) or in Wing IDE if you like.

You can see some tuts here https://www.google.com/search?client=fi ... hon+script
There’s a strong chance that the sprites are in the BNDL files.
After extracting files using my script you will see files with extension .ssnd, .lips, .ffnt etc.
Those are resource types defined at the beginning of TLD archives.
My guess would be that sprites are stored in .othr or .ao files, but I can't be sure, because
those files seems to be compressed.
what do bundle files contain?
Structure of BNDL files is very simple.
I have added this file on github to help you understand file format
https://github.com/bartlomiejduda/Tools ... format.txt

In my opinion, game reads those BNDL files to match file entries to some objects, levels etc.

Re: Treasure Cove String Table

Posted: Thu Oct 08, 2020 6:47 pm
by DosGuy362
I will try out the script, shortly. Thanks for letting me know how to run it. When I try out the script, I will try to read the OTHR files. I get the feeling that they are compressed, as I think it would make the game much larger than needed.

Re: Treasure Cove String Table

Posted: Fri Oct 09, 2020 2:20 pm
by ikskoks
I have just discovered quickbms script for Treasure series made by aluigi
http://aluigi.zenhax.com/bms/treasure_series.bms
It should work with DAT files from Treasure Cove 1.0
and with few other games from The Learning company.

Re: Treasure Cove String Table

Posted: Sat Oct 10, 2020 12:33 am
by DosGuy362
Thanks! Problem is, it spits out a lot of DAT files.

Re: Treasure Cove String Table

Posted: Sat Oct 10, 2020 9:46 am
by ikskoks
Yeah, it's common when file format is unknown.
But at least some graphics may be viewed https://imgur.com/a/9WkIzMp

Re: Treasure Cove String Table

Posted: Sat Oct 10, 2020 3:31 pm
by DosGuy362
That is so cool. How do you change the palette?

Re: Treasure Cove String Table

Posted: Sat Oct 10, 2020 3:35 pm
by ikskoks
First you need to find the palette :D

In TC 2.0 I would suggest to look in .rrgb files first,
but in TC 1.0 I have no idea where it could be stored.