Hi,
I need to be able to covert mmap files to bmp files and vise versa. I know MMAPper could do that task, but I can't integrated into my framework. I need one of the following:
1. Source code to MMAPper, so I could extract the conversion function/routine.
or
2. The header/format information to the mmap file. I already got the bmp file header/format information from wiki, but any additional information would help.
or
3. CLI to MMAPper, that way I could place a wrapper around the CLI. E.g. mmapper.exe <-bmp|-mmap> <input mmap/bmp file> output determine by arg option.
I prefer option 3 because it's the easiest to implement.
Thx in advance.
MMAPper Source Code
- StingRay68
- Hall of Fame
- Posts: 1078
- Joined: Mon Jan 09, 2012 7:23 pm
Re: MMAPper Source Code
You may want to PM JDHalfrack about the MMAP sourcecode, as I believe he wrote it.
I can give you specifics about the MMAP files if you wish to write your own code.
I can give you specifics about the MMAP files if you wish to write your own code.
Re: MMAPper Source Code
StingRay, thank you very much for the offer. I appreciate any help / information you could provide me.
Here is what I have done so far. I started out by trying to find the .dat file header format and came across the following site:
http://forum.xentax.com/viewtopic.php?t=1168
Ones I got that information (thanks to friendsofwatto), the rest was easy as I was able to write some code to insert, modify, remove, or add MMAP images to the DAT file. As a matter of fact, your DATeditor.exe was a great help to me in reverse engineer and verify some of my work.
Then I went on to try and get some information about TDBAccess.dll and came across the following site:
http://www.artemkh.com/
After I downloaded the DLL information (especially the tdbaccess.chm file, thanks to suchy and artemkh), I was able to link the UIS_LIB_PLAYERROLES.dat, StreamedData.db, and *.fra(.ros) within my code.
Anyway, I'm trying to improve the weapons / character icon feature within the game. I want my UI to be able to allow the user to add, modify, or remove any weapons / character icon they want. As you can see in order to do that, they have to be able to see the picture, at the same time I figure they could input the picture in BMP format for adding. The whole thing is being done in VB 10 Express, since it's free and compatible with the .chm notes.
Thx
Here is what I have done so far. I started out by trying to find the .dat file header format and came across the following site:
http://forum.xentax.com/viewtopic.php?t=1168
Ones I got that information (thanks to friendsofwatto), the rest was easy as I was able to write some code to insert, modify, remove, or add MMAP images to the DAT file. As a matter of fact, your DATeditor.exe was a great help to me in reverse engineer and verify some of my work.
Then I went on to try and get some information about TDBAccess.dll and came across the following site:
http://www.artemkh.com/
After I downloaded the DLL information (especially the tdbaccess.chm file, thanks to suchy and artemkh), I was able to link the UIS_LIB_PLAYERROLES.dat, StreamedData.db, and *.fra(.ros) within my code.
Anyway, I'm trying to improve the weapons / character icon feature within the game. I want my UI to be able to allow the user to add, modify, or remove any weapons / character icon they want. As you can see in order to do that, they have to be able to see the picture, at the same time I figure they could input the picture in BMP format for adding. The whole thing is being done in VB 10 Express, since it's free and compatible with the .chm notes.
Thx
- StingRay68
- Hall of Fame
- Posts: 1078
- Joined: Mon Jan 09, 2012 7:23 pm
Re: MMAPper Source Code
Watto is a good starting point to learn about the DAT files for Madden. It won't give you info on the MMAP files inside of them though.
First off, you do realize that what you are trying to code can already be accomplished by using existing editors and utils? If you want to improve upon the process for the player roles and weapons graphics though, I'm sure your work will be appreciated.
I'm going to paste in comments from my existing code...
// Madden Dat files are structured as follows (assuming portrait file):
// Terf header 16 bytes total, consisting of :
// 'TERF' 4 Bytes UINT32 = 1179796820
// Header length 4 bytes UINT32 = 16
// Unknown 4 bytes UINT32 = 83886594
// File Pad 2 bytes UNIT16 = 4
// Number of files 2 bytes UINT16
// Directory table consisting of:
// DIR1 4 bytes UINT32 = 827476292
// Directory length 4 bytes UINT32
// Followed by each file's starting offset and length 8 bytes total for each file
// Each file's offset 4 bytes UINT32
// Each file's length 4 bytes UINT32
// + Padding based on multiple of the filepad
// Compression table consisting of:
// 'COMP' 4 bytes UINT32 = 1347243843
// Compression table length 4 bytes UINT32
// For each file, Compression level (4 bytes) UINT32
// Uncompressed length (4 bytes) UINT32
// + Padding based on multiple of filepad
// Data table and file data consisting of:
// 'DATA' (4 bytes) UINT32
// Data total length (4 bytes) UINT32
// For each file, all file data. byte[] based on file size from directory
First off, you do realize that what you are trying to code can already be accomplished by using existing editors and utils? If you want to improve upon the process for the player roles and weapons graphics though, I'm sure your work will be appreciated.
I'm going to paste in comments from my existing code...
// Madden Dat files are structured as follows (assuming portrait file):
// Terf header 16 bytes total, consisting of :
// 'TERF' 4 Bytes UINT32 = 1179796820
// Header length 4 bytes UINT32 = 16
// Unknown 4 bytes UINT32 = 83886594
// File Pad 2 bytes UNIT16 = 4
// Number of files 2 bytes UINT16
// Directory table consisting of:
// DIR1 4 bytes UINT32 = 827476292
// Directory length 4 bytes UINT32
// Followed by each file's starting offset and length 8 bytes total for each file
// Each file's offset 4 bytes UINT32
// Each file's length 4 bytes UINT32
// + Padding based on multiple of the filepad
// Compression table consisting of:
// 'COMP' 4 bytes UINT32 = 1347243843
// Compression table length 4 bytes UINT32
// For each file, Compression level (4 bytes) UINT32
// Uncompressed length (4 bytes) UINT32
// + Padding based on multiple of filepad
// Data table and file data consisting of:
// 'DATA' (4 bytes) UINT32
// Data total length (4 bytes) UINT32
// For each file, all file data. byte[] based on file size from directory
- StingRay68
- Hall of Fame
- Posts: 1078
- Joined: Mon Jan 09, 2012 7:23 pm
Re: MMAPper Source Code
MMAP files... I'm not very good at explaining, hopefully I didnt forget anything, it's been a long time since I've posted the original info on this.
Hope it helps
MMAP Files 40 bytes for header, consisting of :
4 bytes MMAP
2 bytes # Elements ?
2 bytes # file listing?
4 bytes "00 01 02 03" Unknown
2 bytes # files
2 bytes # bitmaps
2 bytes # palettes
2 bytes unknown
4 bytes offset for File Table
4 bytes header length
4 bytes offset for Palette Table
4 bytes offset for FileName Table
4 bytes offset for extra info table
Bitmap table
For each bitmap:
<UInt16> _BitMapWidth;
<UInt16> _BitMapHeight;
<UInt32> _BitMapColor;
<UInt32> _BitMapSize;
<UInt32> _BitMapOffset;
+ Padding (on multiple of 32 bytes, total of Header + total of Bitmap table)
Byte arrays of each bitmap
Palette Table
for each palette:
<UInt16> _Palette_Unknown1;
<UInt16> _Palette_Unknown2;
<UInt32> _PaletteSize;
<UInt32> _PaletteOffset;
+ Padding of (on multiple of 32 bytes, total of palette table)
byte arrays of each palette
FileNames : 16 bytes per entry
File Table:
<UInt16> _Gfx_Palettes;
<UInt16> _Gfx_Bitmaps;
<UInt32> _Gfx_Bitmap_Offset;
<UInt32> _Gfx_Palette_Offset;
Extra Info table (if exists)
UInt32 _xitableoffset;
UInt32 _xilength;
UInt32 _xioffset;
byte array of extra info
And finally adding padding (based on multiple of the filepad from the Terf header, on the total bytes of the entire file so far)
Hope it helps
MMAP Files 40 bytes for header, consisting of :
4 bytes MMAP
2 bytes # Elements ?
2 bytes # file listing?
4 bytes "00 01 02 03" Unknown
2 bytes # files
2 bytes # bitmaps
2 bytes # palettes
2 bytes unknown
4 bytes offset for File Table
4 bytes header length
4 bytes offset for Palette Table
4 bytes offset for FileName Table
4 bytes offset for extra info table
Bitmap table
For each bitmap:
<UInt16> _BitMapWidth;
<UInt16> _BitMapHeight;
<UInt32> _BitMapColor;
<UInt32> _BitMapSize;
<UInt32> _BitMapOffset;
+ Padding (on multiple of 32 bytes, total of Header + total of Bitmap table)
Byte arrays of each bitmap
Palette Table
for each palette:
<UInt16> _Palette_Unknown1;
<UInt16> _Palette_Unknown2;
<UInt32> _PaletteSize;
<UInt32> _PaletteOffset;
+ Padding of (on multiple of 32 bytes, total of palette table)
byte arrays of each palette
FileNames : 16 bytes per entry
File Table:
<UInt16> _Gfx_Palettes;
<UInt16> _Gfx_Bitmaps;
<UInt32> _Gfx_Bitmap_Offset;
<UInt32> _Gfx_Palette_Offset;
Extra Info table (if exists)
UInt32 _xitableoffset;
UInt32 _xilength;
UInt32 _xioffset;
byte array of extra info
And finally adding padding (based on multiple of the filepad from the Terf header, on the total bytes of the entire file so far)
Re: MMAPper Source Code
Thanks StingRay, I'll put your information to good use. I'll try to keep this forum updated on my project.
Who is online
Users browsing this forum: No registered users and 1 guest