Author Topic: I'm having some trouble with sprite editing. (Now sprite assembly)  (Read 3051 times)

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #15 on: February 07, 2008, 12:45:52 am »
Thanks Justin. The grids for the environments in CT seem to start at 0x0100 judging from my experience with Prophet's Guile, so that was confuzzling. I'll redo the grid vertical axis labels tomorrow evening so we can have it up here accurately.

EDIT: Here's a re-up. This one may be accurate to the labels used in game.


As a quick example, I guess the third subtile from the left should be read 0x0002. Meaning, if two bytes are devoted to describing a subtile and the bytes are in Little Endian (reverse order), the bytes would read 02 00 in the ROM. Anyone know if this is theoretically correct?
« Last Edit: February 07, 2008, 01:00:22 am by FaustWolf »

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Re: I'm having some trouble with sprite editing.
« Reply #16 on: February 07, 2008, 09:12:49 am »
They are compressed, but not RLE compressed.  There is an archive on my website that has source code routines for Chrono Trigger's compression and decompression.

satchel_dawg

  • Guest
Re: I'm having some trouble with sprite editing.
« Reply #17 on: February 07, 2008, 12:52:32 pm »
i know the answer to this question is obvious, but what program can hack sprites?

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #18 on: February 07, 2008, 03:09:37 pm »
Editing sprites, use MSPaint to edit the sprites but to actually get them out of them game, i'd recommend using Tile Molester.  Very useful program, especially for getting the palettes and saving addressess for the sprites locations.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing.
« Reply #19 on: February 07, 2008, 04:02:08 pm »
How do you locate the sprite assembly for a given character? I haven't found any information on that.

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #20 on: February 07, 2008, 04:42:35 pm »
^ added to the breakpoint thread.  Create an empty test room that just loads your PCs and the sprite you want to study.  Set the breakpoint before entering the room.  When you enter, you'll get a breakpoint for each PC you have in your party (Accumulator will read 00-06 for those) and then the other sprite.  Ex: for Schala, it should read A:001B  Then search the offsets guide for (1B) Sprite Assembly index.  You'll end up with 1E2B48 start address in this case.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing.
« Reply #21 on: February 07, 2008, 05:11:15 pm »
What version has the sprite assembly separated? Everything I've found just says "Sprite Assembly" for the entire range, including what I just downloaded from Geiger's Crypt.

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #22 on: February 07, 2008, 06:47:38 pm »
Hrm, that last update is too old.

Another method is take the index, x3 then add $242300.  Go the offset of the result you get and that's the 3 byte pointer to the sprite assembly.  Using the exmaple in the previous post, the offset result is 242351, which shows pointer 482BDE. (1E2B48)

Or post the index and I can look up the range  :)


justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #23 on: February 07, 2008, 07:15:03 pm »
$24F600 + Enemy index * $0A + 1

The value there is the Sprite Assembly index.  Take that value, *3 + 242300.  That will give you the 3 byte pointer location.

Ex: Gato
Enemy Index $92
$92 * $0A * = $05B4 + 1 = $05B5
$24F600 + $05B5 = 24FBB5
The Sprite Assembly value at 24FBB5 is $76

$76 * 3 = $0162 + $242300 = $242462

Gato Sprite Assembly starts at $230000





Guard
Enemy Index $31

$31 * $0A = $01EA + 1 = $01EB
$24F600 + $01EB = 24F7EB
The Sprite Assembly value at 24F7EB is $21

$21 * 3 = $0063 + $242300 = $242363

Guard Sprite Assembly starts at $1D0000

OR

If you want to find the pointer address using breakpoints:

Set breakpoints before entering the room
C0470A
C04715

The Accumulator holds the address.

Ex: Guard
C0470A breakpoint - A:0000
C04715 breakpoint - A: 00DD

$1D0000

If there are multiple different enemies when entering an area, keep in mind you'll encounter multiple sets of breakpoints.


Magus - 1C0000
Crono - 1C27B0
Lucca - 1C4E70
Frog - 1C7490
Marle - 1C9AD8
Robo - 1CC080
Ayla - 1E0000 - 0000DE
Melchior - 1DB608

Found that in my other notes that I believe Geiger posted.


Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing.
« Reply #24 on: February 08, 2008, 12:19:05 am »
Ok, I tried using the math method to get the location, and put together a PHP script for it. I think it works right, but could someone double check?

http://maurtopia.com/sprite.php

Edit: Tested with both the two listed in Justin's post and Ozzie got the right values. Now to figure the rest out. x_x.

Edit 2: If anyone wants it, I can give the new version I made that reads directly from the ROM. You'll need the ability to run PHP scripts though.

I'm thoroughly confused with the whole sprite assembly, and what I've read hasn't helped.
« Last Edit: February 08, 2008, 08:07:21 pm by Mauron »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing. (Now sprite assembly)
« Reply #25 on: February 08, 2008, 09:59:46 pm »
Double post. Yay for separation.

I'm definitely in Ozzie's section, but I'm not clear on what code refers to what part.

Could someone help me break it up?

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: I'm having some trouble with sprite editing. (Now sprite assembly)
« Reply #26 on: February 08, 2008, 10:59:44 pm »
Ozzie's Sprite Assembly range is 235460-235DBF
Each frame $50 bytes, 30 Frames total ($1E)

First frame 235460-2354AF


Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing. (Now sprite assembly)
« Reply #27 on: February 09, 2008, 12:31:06 am »
Ok, it's starting to come together. I *think* the only three things left.

- The tiles are supposed to be in groups of four, which are placed based on the last eight bytes, right? How do you read those bytes?
- What's the purpose of the second to last eight bytes?
- Where do you define animated images vs stationary ones?

MagilsugaM

  • CC:DBT Dream Team
  • Time Traveler (+800)
  • *
  • Posts: 812
  • Never say never... Nothing is impossible...
    • View Profile
Re: I'm having some trouble with sprite editing. (Now sprite assembly)
« Reply #28 on: February 09, 2008, 02:13:25 am »
So you are respriting Ozzie.I ask in the forum for someone who can resprite

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: I'm having some trouble with sprite editing. (Now sprite assembly)
« Reply #29 on: February 09, 2008, 02:38:39 am »
Right now I'm just playing around with his for learning purposes.

I'm thinking I'll experiment with a mystics version of the Millennial Fair.