Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Nippon Ichi game (PS2)

Old posts about game archives and other formats.
LustD
beginner
Posts: 34
Joined: Wed Jul 19, 2006 3:21 pm

Nippon Ichi game (PS2)

Post by LustD »

The contents of this post was deleted because of possible forum rules violation.
You do not have the required permissions to view the files attached to this post.
LustD
beginner
Posts: 34
Joined: Wed Jul 19, 2006 3:21 pm

Post by LustD »

I hope anyone can help me
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post 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.
LustD
beginner
Posts: 34
Joined: Wed Jul 19, 2006 3:21 pm

Post 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
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post 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
You do not have the required permissions to view the files attached to this post.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post 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!
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post 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.
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post 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 :)
LustD
beginner
Posts: 34
Joined: Wed Jul 19, 2006 3:21 pm

Post 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?
You do not have the required permissions to view the files attached to this post.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

Excellent! Now we have a match. The Disgaea sector matches the first data2.dat perfectly. Now I can write a script! ;)
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post 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...).
You do not have the required permissions to view the files attached to this post.
LustD
beginner
Posts: 34
Joined: Wed Jul 19, 2006 3:21 pm

Post 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
You do not have the required permissions to view the files attached to this post.
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post 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..
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post 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).
User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post 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
You do not have the required permissions to view the files attached to this post.
Post Reply