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

To Aru Majutsu no Index psp help

Post questions about game models here, or help out others!
Bigpet
ultra-n00b
Posts: 7
Joined: Wed Sep 25, 2013 3:08 pm

Re: To Aru Majutsu no Index psp help

Post by Bigpet »

I'm currently trying to extract the 3D models from the PSP game "toaru kagaku no railgun", which should use the same format.

I've uploaded the file here (edit: I just read the rules, is linking this now forbidden? I'm confused because there's already links in this thread) for people who are interested in helping.

Immediately before the game displays the model it makes the following file reads:

Code: Select all

0x0000029F	SHADE_UMDRead	0x0005	seek64	0x00159800	offset=0x00000000 whence=1(cur)
0x0000029F	SHADE_UMDRead	0x0005	seek64	0x01EEA800	offset=0x01EEA800 whence=0(set)
0x0000029F	SHADE_UMDRead	0x0005	read	0x00002800	data=0x08E4FBF0 size=0x00002800
0x000002A1	SHADE_UMDRead	0x0005	seek64	0x01EED000	offset=0x00000000 whence=1(cur)
0x000002A1	SHADE_UMDRead	0x0005	seek64	0x01EED000	offset=0x01EED000 whence=0(set)
0x000002A1	SHADE_UMDRead	0x0005	read	0x00001800	data=0x08E4FBF0 size=0x00001800
0x000002A3	SHADE_UMDRead	0x0005	seek64	0x01EEE800	offset=0x00000000 whence=1(cur)
0x000002A3	SHADE_UMDRead	0x0005	seek64	0x01EEE800	offset=0x01EEE800 whence=0(set)
0x000002A3	SHADE_UMDRead	0x0005	read	0x00002000	data=0x08E4FBF0 size=0x00002000
0x000002A5	SHADE_UMDRead	0x0005	seek64	0x01EF0800	offset=0x00000000 whence=1(cur)
0x000002A5	SHADE_UMDRead	0x0005	seek64	0x01EF0800	offset=0x01EF0800 whence=0(set)
0x000002A5	SHADE_UMDRead	0x0005	read	0x00002000	data=0x08E4FBF0 size=0x00002000
0x000002A7	SHADE_UMDRead	0x0005	seek64	0x01EF2800	offset=0x00000000 whence=1(cur)
0x000002A7	SHADE_UMDRead	0x0005	seek64	0x01EF2800	offset=0x01EF2800 whence=0(set)
0x000002A7	SHADE_UMDRead	0x0005	read	0x00001000	data=0x08E4FBF0 size=0x00001000
0x000002A9	SHADE_UMDRead	0x0005	seek64	0x01EF3800	offset=0x00000000 whence=1(cur)
0x000002A9	SHADE_UMDRead	0x0005	seek64	0x01EF3800	offset=0x01EF3800 whence=0(set)
0x000002A9	SHADE_UMDRead	0x0005	read	0x00000800	data=0x08E4FBF0 size=0x00000800
0x000002AB	SHADE_UMDRead	0x0005	seek64	0x01EF4000	offset=0x00000000 whence=1(cur)
0x000002AB	SHADE_UMDRead	0x0005	seek64	0x026BB800	offset=0x026BB800 whence=0(set)
0x000002AB	SHADE_UMDRead	0x0005	read	0x00001800	data=0x08E4FBF0 size=0x00001800
0x000002AD	SHADE_UMDRead	0x0005	seek64	0x026BD000	offset=0x00000000 whence=1(cur)
0x000002AD	SHADE_UMDRead	0x0005	seek64	0x01EF5800	offset=0x01EF5800 whence=0(set)
0x000002AD	SHADE_UMDRead	0x0005	read	0x00001800	data=0x08E4FBF0 size=0x00001800
0x000002AF	SHADE_UMDRead	0x0005	seek64	0x01EF7000	offset=0x00000000 whence=1(cur)
0x000002AF	SHADE_UMDRead	0x0005	seek64	0x01EF7000	offset=0x01EF7000 whence=0(set)
0x000002AF	SHADE_UMDRead	0x0005	read	0x00001000	data=0x08E4FBF0 size=0x00001000
0x000002B1	SHADE_UMDRead	0x0005	seek64	0x01EF8000	offset=0x00000000 whence=1(cur)
0x000002B1	SHADE_UMDRead	0x0005	seek64	0x02B66000	offset=0x02B66000 whence=0(set)
0x000002B1	SHADE_UMDRead	0x0005	read	0x00001800	data=0x08E4FBF0 size=0x00001800
0x000002B3	SHADE_UMDRead	0x0005	seek64	0x02B67800	offset=0x00000000 whence=1(cur)
0x000002B3	SHADE_UMDRead	0x0005	seek64	0x02B0F000	offset=0x02B0F000 whence=0(set)
0x000002B3	SHADE_UMDRead	0x0005	read	0x00057000	data=0x09A207E0 size=0x00057000
0x000002B5	SHADE_UMDRead	0x0005	seek64	0x02B66000	offset=0x00000000 whence=1(cur)
0x000002B5	SHADE_UMDRead	0x0005	seek64	0x03023800	offset=0x03023800 whence=0(set)
0x000002B5	SHADE_UMDRead	0x0005	read	0x00003800	data=0x08E4FBF0 size=0x00003800
0x000002B7	SHADE_UMDRead	0x0005	seek64	0x03027000	offset=0x00000000 whence=1(cur)
0x000002B7	SHADE_UMDRead	0x0005	seek64	0x0300E000	offset=0x0300E000 whence=0(set)
0x000002B7	SHADE_UMDRead	0x0005	read	0x00015800	data=0x09AE0FA0 size=0x00015800
0x000002B9	SHADE_UMDRead	0x0005	seek64	0x03023800	offset=0x00000000 whence=1(cur)
0x000002B9	SHADE_UMDRead	0x0005	seek64	0x03023800	offset=0x03023800 whence=0(set)
0x000002B9	SHADE_UMDRead	0x0005	read	0x00003800	data=0x08E4FBF0 size=0x00003800
0x000002BB	SHADE_UMDRead	0x0005	seek64	0x03027000	offset=0x00000000 whence=1(cur)
0x000002BB	SHADE_UMDRead	0x0005	seek64	0x03027000	offset=0x03027000 whence=0(set)
0x000002BB	SHADE_UMDRead	0x0005	read	0x00005800	data=0x09B11960 size=0x00005800
On further investigation we find that the 5th file in the USRDIR folder is GRP.BIN and the offsets are referring to that file. All of those offsets point to content that immediately follows some 0x00 padding, so we can be sure that this is the file that the offsets are referring to.

I can't quite make out what these mean however, so I'm currently working on deciphering the GRP.BIN file


What I've found is that the header at the start of the file can be described as follows:

Code: Select all

struct filetable_entry{
	UNKNOWN x; //16bits
	short offset; //offset from beginning of file / BLOCK_SIZE
}

struct header{
	int HDR_LEN; //2335
	int BLOCK_SIZE;//2048 this means that files are 2KB aligned
	UNKNOWN rest; // 12bytes
	//10 00 00 00
	//10 00 00 00
	//FF FF 00 00
	filetable_entry files[HDR_LEN];
}
This header is followed by 0x00 padding until the first file referenced in the file table starts at 0x2800

I'm currently trying to figure out how the file blocks are compressed or how their header is comprised.

Most files start with 1 or 2 bytes (no discernable pattern for now) followed by the magic sequence

Code: Select all

SHTXPS
then followed by pretty long header that seems to end at 0x412 (going off of just the first few files, still haven't confirmed this pattern) after the beginning of the file block.


I would be very appreciative of some help, I'm new to this and can't recognize the patterns. I got no clue if this is some modified version of DEFLATE, just Huffman of whatever. I'm currently working on comparing the 412byte headers to see which values change based on file length or other factors
Last edited by Bigpet on Sat Sep 28, 2013 7:58 am, edited 1 time in total.
Bigpet
ultra-n00b
Posts: 7
Joined: Wed Sep 25, 2013 3:08 pm

Re: To Aru Majutsu no Index psp help

Post by Bigpet »

realized that there's a seperate fourm for images so I posted my findings regarding the image format there

I'll be posting any findings regarding the "PSC6" headered 3D model/animation format here
Bigpet
ultra-n00b
Posts: 7
Joined: Wed Sep 25, 2013 3:08 pm

Re: To Aru Majutsu no Index psp help

Post by Bigpet »

Well it's been a long time coming but I finally found vertecies

Image


it may not look like much but I know that these are the vertices for a head.

The offset to the vertex list is in 0x40 , at that position you need to skip 0x122 bytes and then there's the vertex data. 0xA wide and the first 6 bytes of that 0xA are 3 signed shorts with the vertex coordinates, that's right signed fucking shorts. Whos fucking idea was that?

Anyway, I've got my suspicions as to the index buffer, trying that now. If someone else wants to try his hand, here's the file I'm working on: https://dl.dropboxusercontent.com/u/158 ... /22046.PSC
Post Reply