øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1367.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd7da-3.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.100e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd7da-3.html.zx :h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °V2ÉOKtext/htmlISO-8859-1gzip0|Ö2ÉÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:24:50 GMT0ó°° ®0®P®€§²ð® :h^ÿÿÿÿÿÿÿÿA 2É FFV Sprite editing

Author Topic: FFV Sprite editing  (Read 12629 times)

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Sprite editing
« Reply #15 on: February 25, 2010, 06:34:58 AM »
No, nothing yet. I'll do some more looking today. Guys, give me a hand here.
If indirect addressing is used, the opcode we are looking for is DC (Long indirect Jump).

Tried some more corruption. Here is 31000-31500 (all random bytes):
http://img121.imageshack.us/img121/205/3100031500corrupted.png

It seems StrawberryMilk is right. Even if B+B are still ok, much other graphics got messed up, all of which also seems to be compressed. Doing some more tests now...

 :edit:
31500-31A00. Getting closer:
http://img15.imageshack.us/img15/6439/3150031a00corrupted.png

 :edit:
Okay it seems to be around here. 31D80-31DC0:
http://img706.imageshack.us/img706/3070/31d8031dc0corrupted.png
Apparently I was wrong. There is no B+B sprite, only two B's.

 :edit:
Heh, found the byte that controls Boco's position on the screen.  :happy:
http://img98.imageshack.us/img98/1865/31d8409.png
Give me some more time and I might crack this completely.
« Last Edit: February 25, 2010, 08:38:46 AM by Jorgur »

StrawberryMilk

  • Ymir
  • *
  • Posts: 11
  • Delicious calcium for strong pixels
    • View Profile
Re: FFV Sprite editing
« Reply #16 on: February 27, 2010, 12:13:48 AM »
where doing it man
where making it happen

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Sprite editing
« Reply #17 on: February 27, 2010, 12:34:20 PM »
It seems to be more complex than I thought. I only made sense out of 4 bytes, Boco's position on the screen and distance between his tiles. Other than that, nothing seems to have a pattern.

You should do some more detailed corruption. Try messing up fewer bytes at a time, until you think you located the actual graphics. If you do, I may be able to find the graphic loading procedures.
« Last Edit: February 27, 2010, 04:32:01 PM by Jorgur »

StrawberryMilk

  • Ymir
  • *
  • Posts: 11
  • Delicious calcium for strong pixels
    • View Profile
Re: FFV Sprite editing
« Reply #18 on: February 28, 2010, 12:37:19 AM »
But is it confirmed for C3/1000 - C3/3000? I don't want to spend hours on that section if it's not where I'll find it.

 :edit:
Also if you have any notes on the spots you have looked through, I'd appreciate it.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Sprite editing
« Reply #19 on: February 28, 2010, 06:53:57 AM »
I haven't found any graphics data, so nothing is confirmed. There is data there related to the graphics, but that's all I know.

Code: [Select]
1D84 Boco' X position
1D85 Boco's Y position (downwards)

1D8C X distance between Boco's tiles (inverted)
1D8D Y distance between Boco's tiles (inverted)
The only 4 bytes I made sense of.

StrawberryMilk

  • Ymir
  • *
  • Posts: 11
  • Delicious calcium for strong pixels
    • View Profile
Re: FFV Sprite editing
« Reply #20 on: March 01, 2010, 01:02:38 AM »
I finished going through C3/1000-1FFF corrupting two bytes at a time, nothing only affected Bartz's sprite. So I'll be looking for a while longer.

 :edit:

Messed around with it for a while longer and found that 206E messes up Bartz's eye when corrupted. I thought I saw some other bytes that messed with him but they seem to have just been messing with Boco when I re-tested them.

 :edit:

Also 208E spawns a pixel to the right and above his hand. As well as 209E in a slightly different spot. 2098 placed some pixels to the right of his face in his palette. 20BE seemed to do some strange things with both Bartz and Boco. Does this help at all, or is there something else I need to be looking for?
« Last Edit: March 01, 2010, 01:49:30 AM by StrawberryMilk »

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Sprite editing
« Reply #21 on: March 01, 2010, 08:00:34 AM »
I'm guessing these pixels are only graphical glitches, not actual changes in the graphics, judging by how spread out the results come. When you find a consecutive group of bytes, each contributing in some way to make out the actual graphics, you have most likely found the graphics data.

StrawberryMilk

  • Ymir
  • *
  • Posts: 11
  • Delicious calcium for strong pixels
    • View Profile
Re: FFV Sprite editing
« Reply #22 on: March 01, 2010, 01:08:34 PM »
It seems that the riding scene is loaded in a particular order and scattered throughout the code are bytes that, if tampered with, mess up the graphics loading for everything after it. Bartz's foot also seems to be seperate in the loading order than the rest of him.
After 2820, the background is already loaded and only Bartz's tiles become corrupted. (Except for his foot)
After 28C0, Bartz's head on just one of his three riding sprites is loaded.
After 2900, Bartz's head is uncorrupted on all sprites.
After 29C0, His body is mostly uncorrupted on all sprites.
And after 2A00, nothing seems to be corrupted at all.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Sprite editing
« Reply #23 on: March 02, 2010, 06:06:59 AM »
We need a bit more details than that. Try even fewer bytes, in the end only one byte at a time. See if you find any consecutive groups of bytes as I said.

Also, if you have a late game save, you should check out the ending sequences after corruption. The chance of finding graphics is greater there since it contains more of it.

Vehek

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: FFV Sprite editing
« Reply #24 on: November 11, 2010, 06:45:47 PM »
Two weeks ago, I was investigating FF5's compression, so I have some information in case you don't have it already. Bartz+Boco are part of a compressed block starting at 031E84. The stuff Jorgur messed with that affected position is part of a packet at 031D49.
The main compression routine is in bank $C3. (However, this routine isn't used for Bartz+Boco. A variant from a compressed block of routines is used instead.)
The compression is similar to FF6's, with at least two major differences:
  • The first two bytes are the decompressed size in FF5, not the compressed size. So, the decompression routine ends when it's written that many bytes
  • (This is very badly worded.) In the second byte to of a compressed/repeat-data-block, the bit-positions of the amount to copy and the bits for the offset are switched compared to FF6. That is, the upper 3 bits are the offset, the lower 5 bits after adding 3 to the number tell how many bytes to copy.

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: FFV Sprite editing
« Reply #25 on: November 13, 2010, 08:55:31 PM »
Good to know!

There's a single call to C3/0002 in the bank that controls combat animations (at C1/FB9A).  I know the magic sprites start at D9/0000, and while I know how to get there from the code, I haven't delved much into the decompression.  It looked like it was 3bpp, but I don't know anything other than that.

One step closer to being able to add in our own sprites  Thanks for the info!