Thread: Hex Edit 101
View Single Post
Old 03-09-07, 10:52 AM   #11
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by privateer
Open the Hex Editor, select Tools and put a check on data inspecter.
Open Tools again and select Options, then appearance.
set columns to 25
I work with text on the left but select the way that suits you.
select Data inspecter, I have the 1st 6 boxes on the left checked.
Select OK.
Now open the NavalMine.dat and you should see something like this image.




Notice I have Ref's dat file format info. This is our main guide.
The 4 bytes in BLUE are important!
You are going to see this alot so make sure you understand this part.
The data Inspecter tells us the info to come is 51 bytes long.
Count the GREEN area and it's 51 bytes.
If you delete Kashmir in the left window, you need to lower
the count in blue to match the new length.
Click on the 33, open tools and select Encode number,
and set it up like below



Click OK and you should see that the 33 00 00 00
is now 2C 00 00 00

Small addition: String "Skip the first 20 bytes they seem to be always the same"
must to be "Skip the first 12 bytes. It's file header and we pass it".
Next data block is usual data block (chunk?) Type 1000 it can to have a name "Author's Description" (for exemple). It is important for creation of the program of Pack 3D type.
Next it's data block (chunk?) Type 0, SubType (version) 0 and size = 0 (all 12 bytes).
It's marker-block of beginig of data interesting us.
In the end of a file we have a marker-block of the end of data interesting us.
It's data block Type 0, SubType (or Version) 1 and size = 0 (all 12 bytes).

P.S. What is it chunk?
In the programming language (for example C ++) it refers to the data block ...

__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 03-09-07 at 11:21 AM.
Anvart is offline   Reply With Quote