Tuesday, October 6, 2009

Just for fun, some notes I made on MGS.


short x
short y
short z


cb_box.kmd
cb_boxNN.pcx

5 sides, 6?

2 sided faces?

number of meshes and number of faces?
01 00 00 00 01 00 00 00
and
01 00 00 00 0A 00 00 00

header data might be bounding boxes

fe89   ffff   fe76   ffff   fee9   ffff
65161, 65535, 65142, 65535, 65257, 65535

375,  0, 355, 0, 721, 0, 1, 0, 10, 0

looks like vertex data in the playstation fixed point format
short x
short y
short z
short pad


vert list
00000078h: 0000 6301 D102 FFFF 8AFE 6301 D102 FFFF
00000088h: 8AFE 76FE D102 FFFF 0000 76FE D102 FFFF
00000098h: 7701 76FE D002 FFFF 7601 76FE E9FE FFFF
000000a8h: 7601 6301 E9FE FFFF 7701 6301 D002 FFFF
000000b8h: 0000 6301 EAFE FFFF 0000 76FE EAFE FFFF
000000c8h: 89FE 76FE EAFE FFFF 89FE 6301 EAFE FFFF

verts at each point
03 02 01 00
07 06 05 04
09 05 06 08
0B 01 02 0A
00 07 04 03
08 06 07 00
00 01 0B 08
08 0B 0A 09
09 0A 02 03
03 04 05 09          

00000100h: FCFF B0F4 B0F4 FFFF 3909 C4F6 C0F6 FFFF
00000110h: 3909 3C09 C0F6 FFFF FCFF 500B B0F4 FFFF
00000120h: C0F6 3C09 C7F6 FFFF C7F6 3C09 4009 FFFF
00000130h: C7F6 C4F6 4009 FFFF C0F6 C4F6 C7F6 FFFF
00000140h: 0400 B0F4 500B FFFF 0400 500B 500B FFFF
00000150h: 4009 3C09 3909 FFFF 4009 C4F6 3909 FFFF 

    0  1  2  3
0  03 02 01 00
1  07 06 05 04
2  09 05 06 08
3  0B 01 02 0A
4  00 07 04 03
5  08 06 07 00
6  00 01 0B 08
7  08 0B 0A 09
8  09 0A 02 03
9  03 04 05 09

normals
7FF4 00
F4 0000
7F00 00
00 F700
F7F4 00
F4 7FF4
00F4 00
00 7F00
0000 F7
00 F7F4
00F4 7F
00 F400
F4F4 7F
F4 F77F
F700 00
00 007F
007F 00
FE F7F4
F77F 7F
00 F400
F4F4 7F
F4 743D
723D 72
3F 743F
743F 77
3F 773D
743D 

texture coordinates
DC AD DB AD
DC AD DB AD
DC AD 6C 55
6C 55 DC AD
DC AD DC AD

EOF
00                                

20 verts

it goes like this!!

list of verts
verts used in faces!   

must be followed by tex coords and normals


F5 FF FF FF
93 FF FF FF
DB FF FF FF
6C 00 00 00
ED FF FF FF
66 00 00 00     

00000028h: 30 F8 FF FF E4 DA FF FF 65 87 FF FF 35 0C 00 00 ; 0øÿÿäÚÿÿe‡ÿÿ5...
00000038h: 68 42 00 00 5E 9D FF FF 00 00 00 00 00 00 00 00 ; hB..^ÿÿ........
00000048h: 00 00 00 00 FF FF FF FF FF FF FF FF 61 00 00 00 ; ....ÿÿÿÿÿÿÿÿa...
00000058h: 20 37 00 00 28 3A 00 00 09 00 00 00 28 3B 00 00 ;  7..(:......(;..
00000068h: 70 3B 00 00 70 3C 00 00 70 3E 00 00 00 00 00 00 ; p;..p<..p>......

   
Header:
first header for entire file
first word in first dword is number of meshes defined
first word in second dword always matches the first word in first dword
next 6 dwords might be translation and rotation data or maybe rotation and bounding box


header for each mesh defined
first word in first dword is number of meshes defined
first word in second dword is number of verts in index table?
next 6 dwords might be translation and rotation data
5 dwords following, unknown



after 2 DWORDs FF FF FF FF FF FF FF FF

for each mesh defined
first word in first dword is number of verts defined
first word in second dword is offset to beginning of vert list
first word in third dword is beginning of vertex index table

first word in fourth dword is number of verts in second set of data
first word in fifth dword is beginning of second vert data
first word in sixth dword is beginning of second vert index table

first word in seventh dword is beginning of normal data?
first word in eighth dword is beginning of tex coord data?
last dword is empty


88 bytes per header per mesh(meshcount-1) in multi mesh instances
verts are signed

first short = num

No comments:

Post a Comment