READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

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 » Sun Oct 08, 2006 7:37 pm

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 » Wed Oct 11, 2006 7:26 pm

I hope anyone can help me

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Thu Oct 12, 2006 8:15 pm

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 » Sun Oct 15, 2006 7:44 pm

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 » Sun Oct 15, 2006 8:54 pm

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.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sun Oct 15, 2006 9:02 pm

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!

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sun Oct 15, 2006 9:37 pm

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 » Sun Oct 15, 2006 9:59 pm

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 » Mon Oct 16, 2006 6:38 am

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.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Mon Oct 16, 2006 7:17 am

Excellent! Now we have a match. The Disgaea sector matches the first data2.dat perfectly. Now I can write a script! ;)

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

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

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 » Mon Oct 16, 2006 10:37 am

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: 188
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox » Mon Oct 16, 2006 3:00 pm

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..

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Mon Oct 16, 2006 5:52 pm

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 » Mon Oct 16, 2006 8:28 pm

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