Lacrima Castle
HelpSearchMembersCalendar

Welcome Guest ( Log In | Register )

> RAI PAY ATTENTION TO THIS TOPIC, YU Sprites
Dr Strum
post Jul 18 2008, 09:39 PM
Post #1


Can Lead the Nation with a Microphone
***************

Group: Angels
Posts: 5427
Joined: 23-December 05
From: Seattle
Member No.: 1



Okay Rai, with no internet, I've been working on the sprites from YUPSP, or, in other words, the PTA files found on the YUPSP UMD. I have made some great progress, however, I cannot quite figure out how the sprites are assembled based on the PTAs. I have some sort of ordering data, but I think it might be more along the lines of animation, rather than actual frames. So, I shall give you what I have at the moment. If I don't continue on this later I'll probably be working on the compressed files until I get a response from you.

Research (read the top few paragraphs on PTA files, as well as the brief spec about halfway into the text)
Icon PTA
Icon TGA
Fry TGA
Fry PTA


Anyone else that wants to take a crack at it is welcome.


~~~
Писатель всегда будет в оппозиции к политике, пока сама политика будет в оппозиции к культуре.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Dr Strum
post Aug 7 2008, 05:42 PM
Post #2


Can Lead the Nation with a Microphone
***************

Group: Angels
Posts: 5427
Joined: 23-December 05
From: Seattle
Member No.: 1



OKAY RAI I WILL WALK YOU THROUGH THE FRY PTA FILE SO YOU MAYBE UNDERSTAND, AND SO MAYBE PEOPLE THAT WILL NEVER UNDERSTAND WILL LEAVE THIS THREAD ALONE
Some of this I actually only discovered last night.

These are all little endian.
CODE
00000000: 50 54 41 00 10 00 00 00 90 01 00 00 00 00 00 00

PTA header.
Int: Identifier, "PTA" (50 54 41 00)
Int: Animation info offsets offset (10 00 00 00)
Int: Frame info offsets offset (90 01 00 00)
Int: Probably padding. (00 00 00 00)

CODE
00000010: 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000070: 00 00 00 00 48 01 00 00 00 00 00 00 00 00 00 00
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000B0: 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF

Animation info offsets.
Fry's idle animation would be the first one (20 01 00 00), his other animation (not sure exactly what it is) is the one half way through (48 01 00 00). I think the spacing has to do with the script wanting to call a certain animation, like the idle animation is always animation indice zero, and whatever animation is described at 0x148 is always animation indice 24. The FF FF FF FF at the end I believe merely signifies the end of the section.

CODE
000000C0: 00 00 FC FF 04 00 00 00 01 00 FC FF 04 00 00 00
000000D0: 02 00 FC FF 04 00 00 00 03 00 FC FF 04 00 00 00
000000E0: 04 00 FC FF 04 00 00 00 05 00 FC FF 04 00 00 00
000000F0: 06 00 FC FF 04 00 00 00 07 00 FC FF 04 00 00 00
00000100: 08 00 FC FF 04 00 00 00 09 00 FC FF 04 00 00 00
00000110: 0A 00 FC FF 04 00 00 00 0B 00 FC FF 04 00 00 00

Animation info p1. They're split into chunks of four shorts (eight bytes)
Short: Frame ID. *
Short: Unknown.
Short: Unknown.
Short: Unknown.
This won't be read directly, so no end-of-section marker is necessary, unlike with most of the others.

CODE
00000120: C0 00 00 00 01 00 0C 00 C8 00 00 00 01 00 0C 00
00000130: D0 00 00 00 01 00 0C 00 D8 00 00 00 01 00 0C 00
00000140: 00 00 00 00 00 00 00 00 E0 00 00 00 01 00 0C 00
00000150: E8 00 00 00 01 00 0C 00 F0 00 00 00 01 00 0C 00
00000160: F8 00 00 00 01 00 0C 00 00 01 00 00 01 00 0C 00
00000170: 08 01 00 00 01 00 0C 00 10 01 00 00 01 00 0C 00
00000180: 18 01 00 00 01 00 0C 00 00 00 00 00 00 00 04 00

Animation info p2.
Int: Number of frames. It seems. (C0 00 00 00)
Following are a list of frames, each split into eight byte chunks of data.
Short: Unknown (01 00)
Short: Unknown (0C 00)
Int: Offset in Animation info p1 of corresponding data (C8 00 00 00) **
I think the two shorts may somehow indicate the type of frame, for example, in this it's always 01000C00, but in other ones I'll find mixed values, such as 01000800, 01000400, etc.

CODE
00000190: 50 00 00 00 01 00 00 00 18 00 00 00 0C 00 00 00
000001A0: 48 00 00 00 01 00 00 00 90 00 00 00 64 01 00 00
000001B0: 00 03 00 00 64 01 00 00 90 00 00 00 EC 04 00 00
000001C0: FC 05 00 00 0C 07 00 00 94 08 00 00 F4 09 00 00
000001D0: 40 0B 00 00 F4 09 00 00 D0 0C 00 00 90 90 90 90

Frame assembly offsets. And some other info. Offset of beginning of this section = OffsetX (0x190 in this case)
Int: Length of section/offset to palette (50 00 00 00)
Int: Unknown (01 00 00 00)
Int: Offset from OffsetX to start of frame assembly offsets. (18 00 00 00 - probably always this)
Int: Number of frames (0C 00 00 00)
Int: Offset from OffsetX to PTX file/pixel data (48 00 00 00)
Int: Palettes (01 00 00 00)
Now we're at the offsets. There are twelve in this one, meaning, well, there are twelve int in a row, indicating the offset from OffsetX to the data for the frame's assembly.
After those twelve offsets will almost certainly be the PTX offset earlier mentioned, and, then, padding to align it to a sixteen-byte boundary (90 90 90 90).

CODE
000001E0: B0 B1 80 00 00 00 00 FF 50 22 4C FF B3 57 78 FF
000001F0: ...

Palette. Really no point in going into this. Just like all Sting image palettes it's apparently in BGRA format, a byte per colour field.

CODE
00000220: 0A 00 00 00 00 00 40 00 50 00 00 00 00 00 18 00
00000230: 08 00 00 00 18 00 08 00 30 00 10 00 00 00 18 00
00000240: 00 00 18 00 10 00 00 00 40 00 08 00 40 00 18 00
00000250: 00 00 40 00 00 00 18 00 18 00 00 00 68 00 08 00
00000260: 40 00 20 00 00 00 68 00 00 00 18 00 20 00 00 00
00000270: 88 00 08 00 38 00 28 00 00 00 88 00 00 00 10 00
00000280: 28 00 00 00 B8 00 08 00 40 00 30 00 00 00 B8 00
00000290: 00 00 10 00 30 00 00 00 E8 00 08 00 40 00 38 00
000002A0: 00 00 E8 00 00 00 10 00 38 00 00 00 18 01 08 00
000002B0: 40 00 40 00 00 00 E8 00 00 00 10 00 40 00 00 00
000002C0: F0 00 08 00 18 00 48 00 00 00 18 01 00 00 18 00
000002D0: 40 00 00 00 40 01 08 00 40 00 48 00 00 00 40 01
000002E0: 00 00 10 00 48 00 00 00 68 01 08 00 38 00 50 00
000002F0: 00 00 00 00

Frame assembly data. I am very not sure how this works. This following information is how I THINK it might work, but some of it either doesn't quite fit, or I am unable to test it for lack of other information.
Int: Unknown (0A 00 00 00)
Short: Unknown (00 00)
Short: Width maybe (40 00)
Short: Height maybe (50 00)
Short: Counter as found in LIM files and PTG files [I'm pretty sure about this, it seems to roll over at 0x200 just as always before, though I don't know exactly what it counts] (00 00)
Then I'm uncertain. I think what follows is either locations, or areas of pixels to read/write. I'm not sure, but multiples of eight (heights of the tiles) occur a lot. The counter means it could very well be like LIM/PTG files, meaning we write so many blank pixels/tiles, then so many filled in pixels/tiles, etc, and that's what these numbers indicate.

Following this info comes the PTX data - pretty much just ignore the first 32 bytes and you're right at the pixel data, which is stored two pixels per byte.

NOW, FOR A LITTLE DEMONSTRATION OF HOW ALL THE DATA GOES TOGETHER:

The first frame, putting together the animation data, you get this:
CODE
00000120:
000000C0
>>>0000 FFFC 0004 0000
0001, 000C
000000C8
>>>0001 FFFC 0004 0000
0001, 000C
000000D0
>>>0002 FFFC 0004 0000
0001, 000C
000000D8
>>>0003 FFFC 0004 0000
0001, 000C

So the only thing we know is that this animation is four frames, and we want frames 0, 1, 2 and 3.
They are located at OffsetX + 0x90, OffsetX + 0x164, OffsetX + 0x300 and OffsetX + 0x164 respectively. Note that the last frame is the same data as the second frame, that's because it loops 1->2->3->2, 1->2->3->2, etc.
So, here's said frame data:
Frame 1:
» Click to show Spoiler - click again to hide... «


Frame 2:
» Click to show Spoiler - click again to hide... «


Frame 3:
» Click to show Spoiler - click again to hide... «


Frame 4:
(see Frame 2)


So. Rai. THINK YOU CAN HELP NOW THAT I'VE GIVEN YOU MORE INFO AND A THOROUGH THROUGH TO PRETTY MUCH EVERYTHING I KNOW ABOUT THE FILE FORMAT?





* There's a failing in this filetype at this point, because there are different frame IDs, but often the ID will reference the same data as another ID, thus wasting (minimum) four bytes everytime this happens. Potentially more.

** Another failing, as, if all the animation info had been put together it would have saved more than splitting it up saves. A guaranteed four bytes per frame rather than a potential billion bytes for the stupidest animation ever.


~~~
Писатель всегда будет в оппозиции к политике, пока сама политика будет в оппозиции к культуре.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
Dr Sturm   RAI PAY ATTENTION TO THIS TOPIC   Jul 18 2008, 09:39 PM
Archeia   I looked at it over the net and what I got is that...   Jul 18 2008, 11:35 PM
Dr Sturm   I doubt it's a movie file format. Also, FUCK Y...   Jul 20 2008, 05:51 PM
Archeia   I found an AVI to PTA so it's possible :P Als...   Jul 21 2008, 03:25 AM
Dr Sturm   Sigh. No. It's not. Different types of PTA fi...   Jul 22 2008, 06:09 PM
sandpenguin   Sorry Sturm....wish could help it but it hell...   Jul 23 2008, 12:07 PM
Dr Sturm   Almost none of the files on the ROM have extension...   Jul 23 2008, 05:10 PM
Raijinili   1) HEY STURM I DIDN'T KNOW ABOUT THIS TOPIC NO...   Jul 24 2008, 05:49 AM
sandpenguin   Then, if some can't be read by normal one, sal...   Jul 24 2008, 12:43 PM
sandpenguin   I manage to read the tga. file but alas, there...   Aug 2 2008, 06:49 AM
Archeia   TGA files can be opened with Irfanview but oh well   Aug 4 2008, 08:03 AM
Dr Sturm   TGA files can be opened without third party softwa...   Aug 4 2008, 10:38 PM
Dr Sturm   OKAY RAI, I FIGURED OUT PART OF THE FRAME ASSEMBLY...   Aug 12 2008, 05:05 PM
Dr Sturm   Alright RAI. Sort of related to this, so I'm g...   Dec 29 2010, 01:32 AM
Dr Sturm   So, essentially the file structure (sans whatever ...   Dec 30 2010, 04:06 AM
Dr Sturm   Progress was been being made. Kitten: -1967 sound...   Dec 31 2010, 01:08 AM
Raijinili   I don't even remember what PTX is.   Dec 31 2010, 08:33 AM
Dr Sturm   Image Data. They can be stand alone images, but mo...   Dec 31 2010, 03:57 PM
Raijinili   I should graduate first.   Dec 31 2010, 08:52 PM
Dr Sturm   Pssh fuck that. Graduation is for newbs.   Jan 1 2011, 12:49 AM
Dr Sturm   So, I have two mysteries regarding the PTG files b...   Jan 7 2011, 08:32 PM
Dr Sturm   RAI, WE HAVE BEEN FANTASTIC IDIOTS The files are c...   May 23 2011, 03:03 AM
Raijinili   But I thought you decompressed with this! RAI...   Aug 21 2011, 07:14 PM
Raijinili   k Kitten too?   May 25 2011, 01:38 AM
Dr Sturm   Yeah.   May 25 2011, 01:49 AM
Raijinili   dang. well, get on that and share me.   May 26 2011, 04:39 AM
Dr Sturm   Get on what? I already unzipped everything in GG, ...   May 27 2011, 12:25 PM
Raijinili   Give me a specific task and talk to me about trans...   May 27 2011, 05:42 PM
Dr Sturm   Let me take care of the TPL files and then I'l...   May 30 2011, 02:06 AM
Dr Sturm   ALRIGHT I HAVE FIGURED IT OUT I FIGURED OUT THE SP...   Jul 1 2011, 05:05 PM
Raijinili   WHY ARE WE TALKING ABOUT THIS IN PUBLIC   Jul 2 2011, 04:53 AM
Dr Sturm   Why not? Do we want to hide this?   Jul 2 2011, 06:26 PM
Raijinili   1. There's no reason to show it. It's not ...   Jul 3 2011, 05:41 AM
Dr Sturm   1. There's no reason to show it. The more plac...   Jul 3 2011, 05:52 PM
Raijinili   Well, that's cause your brain is in a million ...   Jul 4 2011, 05:13 AM
Archeia   I was reading it and I found it interesting. I ch...   Jul 3 2011, 07:29 AM
Raijinili   HEY STURM I LOOKED AT GLORIA AND I NEED A WAY TO S...   Aug 21 2011, 05:56 AM
Dr Sturm   What do you mean "unfiltered"?   Aug 21 2011, 01:38 PM
Raijinili   Either the steps to unencrypt with Python or the u...   Aug 21 2011, 05:55 PM
Dr Sturm   Well, the encryption method needs to be determined...   Aug 21 2011, 06:58 PM
Dr Sturm   Well, yeah, but not all of the files are compresse...   Aug 22 2011, 01:14 PM
Raijinili   Well, yeah, but not all of the files are compress...   Apr 14 2019, 07:42 PM
Dr Sturm   Someone just emailed me and I'm incapable of ...   Jun 23 2015, 12:07 AM
Deathless   Just in case, that "someone" was me. I...   Jun 24 2015, 04:31 AM
Dr Strum   External libraries is cheats   Apr 22 2019, 05:36 PM
Raijinili   It's an included library. Anyway... https://i...   Apr 24 2019, 04:00 AM
Raijinili   I consider this work pretty much complete. https:/...   Apr 25 2019, 03:24 AM
Dr Strum   Cool shit, thanks Rai I haven't looked at thes...   Apr 29 2019, 08:31 PM
Raijinili   https://i.imgur.com/aNPMtlk.gif I doubled the siz...   Apr 30 2019, 03:35 AM


Reply to this topicStart new topic
8 User(s) are reading this topic (8 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd November 2024 - 11:36 AM