Page 1 of 2

Nippon Ichi game (PS2)

Posted: Sun Oct 08, 2006 7:37 pm
by LustD
The contents of this post was deleted because of possible forum rules violation.

Posted: Wed Oct 11, 2006 7:26 pm
by LustD
I hope anyone can help me

Posted: Thu Oct 12, 2006 8:15 pm
by Mr.Mouse
Well, I've looked at it, but perhaps this is more a question for people like Xela. What I can gather from the data file, is that all graphics seem saved one after the other, but I haven't found an index part.

Posted: Sun Oct 15, 2006 7:44 pm
by LustD
Not really understand about index and Xela part, is that hard to do it?
I really hope you can help me Mr.Mouse

Posted: Sun Oct 15, 2006 8:54 pm
by alera
I have this game, and there is separeted file "sector.h" that has filenames and perhaps offsets.

I don't know what to look for in the file, but do know that the game is made from 3d tilemaps, they are probably just a 2d map that the game uses to create the 3d conterpart.

It does have 3d models but it mainly uses animated sprites

ps: What is Xela?
2: the two first offsets overlap so I guess they are relative from the last offset

Posted: Sun Oct 15, 2006 9:02 pm
by Mr.Mouse
alera wrote:I have this game, and there is separeted file "sector.h" that has filenames and perhaps offsets.

I don't know what to look for in the file, but do know that the game is made from 3d tilemaps, they are probably just a 2d map that the game uses to create the 3d conterpart.

It does have 3d models but it mainly uses animated sprites

ps: What is Xela?
2: the two first offsets overlap so I guess they are relative from the last offset
Thanks, will take a peek.

Xela is a forum regular and part of the team here, so a person!

Posted: Sun Oct 15, 2006 9:37 pm
by Mr.Mouse
After taking the peek in the sector.h file this is clear:

Code: Select all


// For each entry (0x28 bytes in lenght)

byte {0x20} - Filename (null-terminated)
uint32 - Offset block (blocks are 0x800 in size)
uint32 - Actual size in bytes

The file lists 822 files. However, at first sight they do not seem to refer to the files in the data2.dat file. The last entry in the sector.h file refers to a block beyond the total size of data2.dat, inferring that it must be a table of another file.

Posted: Sun Oct 15, 2006 9:59 pm
by alera
hmm there is only one more visible file in the dvd and that is sndpak.pak.

How exacly do these blocks work? is the data 2048 byte aligned?
The data file is 143mbs long which seems plenty for low resolution textures
and models.
Is this the data2.dat you are talking about? The only other option I can think of is a hidden track on the dvd.
Xela is a forum regular and part of the team here, so a person!
Oh! i see :)

Posted: Mon Oct 16, 2006 6:38 am
by LustD
Forgive me Mr.Mouse the reson why sector.h file dont match maybe because the one i upload is not Makai data.dat (maybe disgaea 1)
I uploaded new data.dat this time from makai kingdom

http://rapidshare.de/files/36922696/DATA.7z.html

Alera data2.dat in first post is data.dat i change the name and that the one cause confusion.

and i also attach sector.h file from makai, disgaea, disgaea 2

btw because each sector is different so then must you check all data.dat from each game to?

Posted: Mon Oct 16, 2006 7:17 am
by Mr.Mouse
Excellent! Now we have a match. The Disgaea sector matches the first data2.dat perfectly. Now I can write a script! ;)

Posted: Mon Oct 16, 2006 8:58 am
by Mr.Mouse

Code: Select all

# MexScript for Nippon Ichi DAT files (PS2) 
# By Mr.Mouse
# Note that this needs the right SECTOR.H file in the same
# folder as the DAT file! 
# --------
# Open the file sector.h in the same folder as the archive (FileDir) as file 1
Open FileDir sector.h 1 ;
# Calculate the size of the sector.h file
SavePos ST 1 ;
GoTo EOF 1 ;
SavePos ED 1 ;
# The last entry is extra, we don't need it, so set the max size 
Math ED -= 40 ;
# Go to start in sector.h
GoTo ST 1 ;
# Start the loop
Do ;
# Save the current offset and then get a null-terminated string
SavePos PE 1 ;
Get FileName String 1 ;
# There are 32 bytes reserved for a filename, so jump to the position after that
Math PE += 32 ;
GoTo PE 1 ;
# Get the block offset (blocks are 2048 in size) and size
Get BlockOff Long 1 ;
Get Size Long 1 ;
# Calculate the actual offset in the DAT file
Math BlockOff *= 2048 ;
Log FileName BlockOff Size 0 0 ;
# What position are we now at in the sector.h?
SavePos PE 1 ;
# Is this still less than the end (ED) of our sector.h? If no, quit. 
While PE < ED ;
You can run this one on the dat file, follow the guidelines in the script.
It's a MexScript, not compiled to BMS. So use the correct tool in MexCom (Run MexScript On...).

Posted: Mon Oct 16, 2006 10:37 am
by LustD
Thank you Mr.Mouse the script can open Disgaea, Disgaea 2 and Makai data.dat

But i kind a confuse with file inside this, i dont know how see the pic
Can you help me with this Mr.Mouse?

The file inside is .chr .dat .mda .pos .tx2

Posted: Mon Oct 16, 2006 3:00 pm
by mambox
the main purpose of scripts are usually to unpack files,when its done you may have custom formats whose not about unpacking method...my 2cents..

Posted: Mon Oct 16, 2006 5:52 pm
by Mr.Mouse
LustD wrote:Thank you Mr.Mouse the script can open Disgaea, Disgaea 2 and Makai data.dat

But i kind a confuse with file inside this, i dont know how see the pic
Can you help me with this Mr.Mouse?

The file inside is .chr .dat .mda .pos .tx2
Questions about specific file formats such as graphics and sounds go in the other forums (graphics, sounds etc).

Posted: Mon Oct 16, 2006 8:28 pm
by alera
I have only loaded one image so I still don't fully understand the format

short Width(has to be divided by 2)
short Height
short was 16 so it could be palette size
short was 2058... no idea
short offset to palette, it was 16 so it could also be the palette size
short was 1 :P
padding to 16
and the next 64 bytes is the actual palette (R, G, B + 0x80)
then the picture data