how can we make sense of this data ?

this is not Arduino related so i will be posting it here .
so i played a DOS game a long time ago called "Prince of persia" , and it was great . i haven't done any real programming lately so i decided to write a game similar to that one .
my problem is the drawings , i can't draw the characters and places since i don't have any computer coloring talents . that's why i decided to extract the drawings from the old game itself .
here is a link for the game :

prince of persia : the shadow and the flame

the files that contain the images i need are (PRINCE.DAT , GUARD.DAT , MAP.DAT ... etc)
the thing is i have no clue on the format , pixel arrangement or the resolution .

is there any possible way for me to make sense of the content of these files ? thank you .

Best bet would be to look at the code that displays those and see what it does. That would tell you how the data is arranged. That might be hard. Your other option is to make a guess and try it. If it makes the picture you expect then awesome you're done. If not then make a new guess.

Edit the files within the orginal game. Make minor changes and see what they do. Over time they should make sense.

Someone on this board recently asked for the definition of hacking. This is exactly that definition.

Just got done reading that :smiley:

Delta_G:
Someone on this board recently asked for the definition of hacking. This is exactly that definition.

amine2:
is there any possible way for me to make sense of the content of these files ? thank you .

What happens if you try to open those files with a good image editing program? It may be able to figure out the encoding.

I would expect the data to be in a format that requires very little calculation in order to display the images.

...R

Ain't Google wonderful?

(First result for a very simple, obvious query string, of a subject I have no interest in or prior knowledge of. That's pretty bloody amazing.)

AWOL:
Ain't Google wonderful?

I tend to assume the OP will have tried Google before asking questions here - but obviously I should not.

...R

Robin2:
I tend to assume the OP will have tried Google before asking questions here - but obviously I should not.

...R

You're just too trusting, Robin2.

Delta_G:
Best bet would be to look at the code that displays those and see what it does. That would tell you how the data is arranged. That might be hard. Your other option is to make a guess and try it. If it makes the picture you expect then awesome you're done. If not then make a new guess.

thank you very much that's actually a good idea . i did attempt to do it with processing ,but i always get an intelligible image , the problem is that i don't know the pixel depth either nor the distribution of bits for colors . i will continue trying though .

extracting the code is too hard though , since the game is "relatively" complex , so finding the right code would be hard .

thank you

brenden_nerd_:
Edit the files within the orginal game. Make minor changes and see what they do. Over time they should make sense.

yes , that's actually a good idea , thank you very much .

Robin2:
What happens if you try to open those files with a good image editing program? It may be able to figure out the encoding.

I would expect the data to be in a format that requires very little calculation in order to display the images.

...R

thank you Robin .

yes i did attempt to do that , but those programs check the beginning of the file for the format data , if that is not found it sends an error code that the file is not an image file .
i did even attempt to insert the data into bitmap files ,but the variance in size causes the same error .

thank you .

AWOL:
Ain't Google wonderful?

http://www.princed.org/content/files/documentation/FormatSpecifications.pdf

(First result for a very simple, obvious query string, of a subject I have no interest in or prior knowledge of. That's pretty bloody amazing.)

Google is indeed wonderful , but it gave me nothing .
i did search for almost 3 hours .... thank you very much for pointing that out, and it would really be interesting to know what that String was .

Robin2:
I tend to assume the OP will have tried Google before asking questions here - but obviously I should not.

...R

i tried Google , but for some reason i did not come across that .

amine2:
Google is indeed wonderful , but it gave me nothing .
i did search for almost 3 hours .... thank you , and it would really be interesting to know what that String was .

"Prince of persia 2 .dat file format".

Hardly rocket surgery.

AWOL:
"Prince of persia 2 .dat file format".

Hardly rocket surgery.

i searched for .DAT file formats , and old game image and tile storage and graphics in DOS games for hours , the idea that the team would post a file of that specific game on the net didn't even cross my mind ...
well thank you AWOL

One thing I have learned is that if your compiler or interpreter returns a programming error it is usually useful to use the error message as a search term.

I guess the same goes for the names of game programs.

...R

Robin2:
I tend to assume the OP will have tried Google before asking questions here - but obviously I should not.

...R

A wise man once said

Robin2:
Your problem is an expectation that everyone else is as sensible and diligent as you are.

They aren't.

Get over it. :slight_smile:

...R

LOL

...R

Robin2:
One thing I have learned is that if your compiler or interpreter returns a programming error it is usually useful to use the error message as a search term.

I guess the same goes for the names of game programs.

...R

for what it's worth , i am sorry Robin , for not doing the proper research .