Chrono Compendium

Kajar Laboratories - Fan Works and Submissions => Chrono Trigger Modification => Topic started by: Vehek on June 15, 2006, 05:02:02 pm

Title: Sprite Assembly
Post by: Vehek on June 15, 2006, 05:02:02 pm
I think I may understand the sprite assembly data.
00 00 for example, loads tile 00, which in Chrono's sprites is the blank tile marked 00 in the attached image. 01 00 loads Crono's left (from his perspective) side of his hair. 10 00 loads the right side of his face. 11 00 loads the other side of his face, marked 11. Hopefully this is enough to establish in your mind the pattern of what tiles are loaded with what hex. The last 8 bytes of sprite assembly are divided into four groups of two, each group determining the X and Y position of (presumedly) four loaded tiles.
Revision Edit-The first 16 bytes load 8 tiles. In groups of 2, these are the the first rows of each four-tile group. The next 16 bytes are much the same, except they load the second row of their group.
The first four bytes load up the top two tiles for group 1, the next four bytes load up for group 2, and so on.

[attachment deleted by admin]
Title: Re: Sprite Assembly
Post by: Vargose on June 15, 2006, 05:13:05 pm
Great work Vehek. Custom Sprites here we come. lol.
Title: Re: Sprite Assembly
Post by: Vehek on June 15, 2006, 05:17:51 pm
Some of my work was inspired by some posts from the old ACMLM forum, where Temporal Flux was released
Quote from: Kyoufu Kawa on 11-29-04
Just telling that I can't quite grasp those eight bytes of sprite assembly data.

I can however tell you that the sprite, assuming Crono's idle forward anim, is split up in 16x16 blocks and each of the eight bytes controls a block's relative position. Seems rather negative too.

The 32 tile bytes are simply flag/tile combos. 4030 for Crono's left foot for example, flipped from 0030, his right foot.
I should note that in the actual data, the order for Crono's left foot is 30 40.
Title: Re: Sprite Assembly
Post by: Chrono'99 on June 15, 2006, 05:31:48 pm
It seems to be a great news! Though I have no idea what and where those 00 00 are meant to be
Title: Re: Sprite Assembly
Post by: Vehek on June 15, 2006, 05:33:59 pm
It seems to be a great news! Though I have no idea what and where those 00 00 are meant to be
00 00 is a loading of a single tile, the first tile of Crono's sprites, and that tile is blank. The 00 00 is at the start of the sprite assembly data for Crono. I haven't really checked others yet.

Edit- I currently have no idea how to reach graphics lower down, such as Crono kneeling down.
Title: Re: Sprite Assembly
Post by: Vehek on June 15, 2006, 07:46:30 pm
The main use of modifying sprite assembly would be forming new sprites that don't have to fit in the space shapes as the old one. For example, the CTCE team has trouble replacing Frog with Glenn because Frog is so small. Modifying the sprite assembly could solve that problem

I think I now know how to load tiles beyond 0xFF of the sprite graphics.
The sprite assembly hex XX 01 loads a tile from the second set of 256 tiles.
Title: Re: Sprite Assembly
Post by: justin3009 on June 15, 2006, 08:07:37 pm
interesting...
Title: Re: Sprite Assembly
Post by: Chickenlump on June 16, 2006, 12:33:43 am
I was working on this waaaaaay back when, but gave up, because I have the attention span of a stool sample. Seeing it in picture form makes it very easy to understand, especially if it works as described. Playable Schala, Nu, brand new sprites, FF6 characters fully animated as playable characters and/or enemies with ALL of their animations... (not just FF6, but any sprite rip from other games, Secret of Mana would work well with this engine)

Title: Re: Sprite Assembly
Post by: Vehek on June 16, 2006, 02:21:37 pm
I can combine XX 40 which reverses a tile with XX 0Y to load a tile from a later group of 256 tiles with XX 4Y.
Title: Re: Sprite Assembly
Post by: Vehek on June 17, 2006, 03:06:05 am
This might be considered double posting, but...
Yaaaaaargh! I wasted several hours trying to modify the 1000 AD soldier because it would seem that the byte that is supposedly sprite assembly in the sprite data is actually starting animation and vica versa! So for several hours, I was studying the sprite assembly of some other sprite! :shock:
Title: Re: Sprite Assembly
Post by: Chickenlump on June 17, 2006, 02:08:28 pm
Double posting on this board will not cause any problems and will be fine. This board isn't as strict and has nicer people by far than any other board I've been to. Since you are the thread's creator and are constantly contributing information, you can post 200 times in a row and nobody should say anything (if they do, they will get smacked down, by me *evil laugh*).

It would be easier to copy the pointer table, and list the offsets so you know what you are editing for sure, kind of like what I did with the enemy AI list I posted awhile back. I may create another list just for sprite assembly and animation data (animation data is fun to edit, and very easy) in the next day or 8. Now that I have time again, I have alot of things I wish to get done, and this is one of them. :)


Animation data is essential for new sprites anyway. My first animation hack, I tracked down Crono's battle winning animation, and changed it to a spin and then had him laughing for a few frames.
Title: Re: Sprite Assembly
Post by: Vehek on June 17, 2006, 06:06:54 pm
The problem was that the sprite data byte marked "sprite assembly" in both Chrono Tweaker and Geiger's data format document, was actually the animation data byte. I discovered this after wiping out sprite assembly pointers one by one until I erased the 1000 AD guard's assembly pointer. I then discovered that the value of the pointer number was the same as the value marked "starting animation" in Chrono Tweaker.

Right now, I'm going to replace Tata with someone from FF6.
Title: Re: Sprite Assembly
Post by: but2002 on June 17, 2006, 06:07:53 pm
FF6? Nice!   BTW the doub;le posting is strict at the Qhimm Forums (http://forums.qhimm.com) so he is in a habit!~

 :D
Title: Re: Sprite Assembly
Post by: justin3009 on June 17, 2006, 06:24:36 pm
heh, this'll be funny :P
Title: Re: Sprite Assembly
Post by: Chickenlump on June 17, 2006, 06:27:41 pm
Ah, interesting. :)

Double posting here at the Compendium is a habit you guys can get into, especially given the overall intelligence of virtually all the members here. Talent is in no short supply in these forums, and restricting it would be silly.

I made a Sprite Assembly editor a very long time ago to edit Crono's sprite assembly, perhaps I can fix it up some, have a textbox that allows the user to input an offset, and have the proper amount of animation frames in a listbox, renamable to reflect what animation it is, and have the values be editable (no graphics or anything, just easier editing of values).

Vehek, could you post an example of the tile reversal with XX 4Y? I'm curious on how that would apply to a tile with 01 79 (for example), unless I'm misunderstanding (graphic page 1, tile 79 (121 in decimal)).
Title: Re: Sprite Assembly
Post by: justin3009 on June 17, 2006, 06:37:03 pm
I am really anxious to see this in action, once I have time off a bit, i'll study up on this.  I'd like to know as much stuff as I can on TF and any other thing we can do to modify CT.
Title: Re: Sprite Assembly
Post by: Vehek on June 17, 2006, 06:41:55 pm
Vehek, could you post an example of the tile reversal with XX 4Y? I'm curious on how that would apply to a tile with 01 79 (for example), unless I'm misunderstanding (graphic page 1, tile 79 (121 in decimal)).

My guess, would be that for your example you gave, you would enter in 79 41.

On another note, I haven't found any other special flags or whatever besides the mirroring flag I got from that post from the previous version of the ACMLM board.
Title: Re: Sprite Assembly
Post by: Vehek on June 18, 2006, 03:00:46 pm
Sadly, I've gotten a bit too bored with it to work on replacing Tata.

I just looked at the sprite assembly for Gato, and it's a bit different in some ways.

One difference is that the sprite assembly is 120 bytes long (versus the 40 bytes of sprites like Crono), so there are more tiles loaded and coordinates. The sprite size byte in the sprite data is probably involved in loading the sprite assembly this way.
Title: Re: Sprite Assembly
Post by: Vehek on June 20, 2006, 01:32:52 am
This is triple posting, but...
I decided to work on replacing a simpler character with only one frame of animation, the Truce Dome Director. It's pretty much just a novelty of course, but I might expand on it later.

Edit-Any characters you want me to replace? Try to keep the suggestions to characters with few animations.
Edit2-Bug:The patch causes the Future Room in the developers ending not to work.

[attachment deleted by admin]
Title: Re: Sprite Assembly
Post by: Vehek on June 21, 2006, 12:13:24 am
This has reached quadruple posting. Sigh.. I just don't know if I can fit this into an editing of a previous post...

New theory on how the tiles are grouped (for size 0 sprites).
0000 0000 0200 0100
0000 0000 2000 2100
0000 0000 1000 1100
0000 3100 3000 3040
This is Crono's assembly data, minus the X/Y coordinates.
The hex marked in blue loads the tiles for the hair and the face. Notice that those groups are not consecutive.

Edit-In a hex editor with rows of 16, the second two tiles of a four-tile group is at the same place in the next row as the first two tiles. The start of the second row of tiles is 16 bytes after the start of the first row.
Title: Re: Sprite Assembly
Post by: joemomma on June 21, 2006, 02:31:02 am
Sweetness (now you dont have to post 4 times in a row.)
Title: Re: Sprite Assembly
Post by: Chickenlump on June 21, 2006, 03:35:49 am
Sweetness (now you dont have to post 4 times in a row.)

Gwa ha ha, I was just about to do the same thing. :)
Truly awesome work Vehek. FF6 characters look great in Chrono Trigger, the palettes even fit them fine. I released a Terra is Your Momma hack as my first Chrono Trigger modification, and it became a part of GoodSnes complete ROM sets, and quite a few websites have it available as well. O_o (nice, but it was just a graphic replacement... heh.. nothing advanced, like you are doing. I'm a sham!).

Title: Re: Sprite Assembly
Post by: justin3009 on June 21, 2006, 08:07:22 am
That's Edgar..isn't it?  Heh, nice job.
Title: Re: Sprite Assembly
Post by: Vehek on June 21, 2006, 10:07:11 am
I mostly got lucky that I found a palette with similar colors.
I tried replacing the 1000 AD soldier with the soldier from FF6 and was using Crono's palette, creating a blue soldier. I got as far as replacing all the idle animations, but I gave it up, as it was causing 1000 AD Guardia Forest to crash....
Sigh...
The Director mod causes the the Future Age developer room to crash too....
Hopefully, I can learn what causes this and there won't be any problems.
Edit-
0000 0000 0200 0100 0000 0000 2000 2100
0000 0000 1000 1100 0000 3100 3000 3040

The colors I've marked the digits with show which tiles are in a 4-tile group. The X/Y coordinates are in the same order as the groups; the first x/y set controls the first 4-tile group, etc.
Title: Re: Sprite Assembly
Post by: Vehek on June 25, 2006, 08:04:03 pm
It appears my earlier guess on the size of size 1 assemblies was incorrect. They're actually 80 bytes long (50 in hex). There are 8 groups of 4-tile groups. Because there're more groups, the start of the second row of a group is 32 bytes after the start of the first row.
Title: Re: Sprite Assembly
Post by: Vargose on July 07, 2006, 02:47:39 pm
I wondered if Frog's sprite assembly was smaller or did it just fill in above him with the empty tile. So I put a little bit of graphics in the empty tile to confirm this. Frog's sprite assembly does just fill in with the empty tile. I have a picture of his running animation below. I am trying to confrim this now for his battle animations.

On a side not the guy at the bottom is Guile from Justin's hack Time's Illusion, looks alittle like Serge.

[attachment deleted by admin]
Title: Re: Sprite Assembly
Post by: Chrono'99 on July 07, 2006, 04:55:09 pm
This is very nice. Playable Schala and Glenn *might* be possible one day with this!

And, mmh... is that Serge at the bottom of the screen? It certainly looks like him (without scarf).
Title: Re: Sprite Assembly
Post by: justin3009 on July 07, 2006, 05:44:17 pm
No that is not serge.  It's one of the characters from our game ^^'

And also with this.  I highly doubt it, but could we be able to make 8 playable characters instead of 7 >_>
Title: Re: Sprite Assembly
Post by: Vargose on July 10, 2006, 10:44:41 am
From what I can tell there are 2 bytes per tile, and there are 16 tiles per frame. The ones I was working with were 4x4 boxes laid out like this. 1 is the first two bytes of the sprite assembly. 2 is the second and so on.



[attachment deleted by admin]
Title: Re: Sprite Assembly
Post by: Vargose on July 11, 2006, 10:18:06 am
Last night I found that sometimes the tiles are arranged differently. This probably has something to do with the last eight bytes of the sprite assembly data. I will be investigating
Title: Re: Sprite Assembly
Post by: Vehek on July 11, 2006, 11:23:36 am
The last 8 bytes, as I said before, contol X/Y coordinates. The first two control the placement of the first 4-tile group (the one you marked with 1, 2, 9, and 10).
Title: Re: Sprite Assembly
Post by: Vargose on July 11, 2006, 11:30:47 am
Thanks Vehek. Whats the relative point of origin?
Title: Re: Sprite Assembly
Post by: Vargose on August 16, 2006, 02:27:00 pm
You have four 16 by 16 squares to work with. You can make a 32 by 32 square, or a 16 by 64 rectangle, and L shape, or any other shape you can make (think tetris). The squares don't even have to touch neccessarily. You can even overlap them.