Author Topic: Dream Devourer Raw Data  (Read 7722 times)

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #15 on: January 23, 2009, 08:07:57 pm »
I think I can get this done tomorrow. justin, is the patch attached to reply #5 okay to work with or have there been structural changes to the ROM since then?

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #16 on: January 23, 2009, 09:03:49 pm »
Use this one, I'm not really working on advancing on the script or maps or anything atm.  I'm trying to figure out how to get the VWF to work in battle.

[attachment deleted by admin]

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #17 on: January 27, 2009, 01:22:51 pm »
Well, as you can tell, I haven't made an ounce of progress on this yet. Hoping to get the graphics packs done tonight, then the assembly later on in the week.

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #18 on: January 27, 2009, 06:06:19 pm »
'tis fine.  Take your time.  I've got plenty of other things to work on while I wait.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #19 on: January 30, 2009, 08:33:53 pm »
Okay, graphics packs are ready for insertion. It looks like there's plenty of unused pointers for new graphics packs (well, 5 look open and we need 3) so that I can insert the Dream Devourer without having to overwrite Lavos.

What I'm wondering about at this point is the palette situation. No, wait a minute, on second thought everything looks good. What I'll do is actually use the same tileset and palette set used for the final Lavos battle, but only the Dream Devourer battle will have the Dream Devourer data mapped and activated. There's few enough palette shifts involved that both the Dream Devorer palettes and the background palettes will fit together comfortably.

Just to make this work as smoothly as possible, any recent updates to the ROM you'd like to reflect in a new patch before I do this tomorrow? I'll definitely have enough time to tackle it this time around.

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #20 on: January 30, 2009, 11:15:01 pm »
Nope, no new patches or anything.  It's been on halt for this =p

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #21 on: January 31, 2009, 07:07:46 pm »
Hmmm, slight problem -- possibly. The pointers for graphics packs are in the format (address) + C00000. There's a maximum of 3 bytes per GFX pack pointer, so the address for graphics packs can go up to 0x3FFFFF (for a pointer of 0xFFFFFF). Unfortunately, I was planning to use free space beginning at 0x42D559 before this issue dawned on me.

I imagine there's some way around this, since expanded ROMs are used all the time and lots of pointers are stored in this format. Do you know if this is the case?

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #22 on: January 31, 2009, 10:13:36 pm »
Huh?  If it can go up to 3FFFFF it should be able to go above that.  If you want 42D559 to be a pointer, make it 59D542

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #23 on: January 31, 2009, 10:24:16 pm »
From my understanding though, to make the game engine read address 0x42D559, the pointer would have to equal 0x102D559, or 59 D5 02 01, one byte too big for the game engine to handle.

For example, the first graphics pack has a pointer at address 0x362220 with a pointer value of 0xE52000, which points to address 0x252000. The reason why the upper bound is 0x3FFFFF is because 0xC00000 has to be added to it.

I worry that there's no way to express 0x42D559 using three bytes, because 0xC00000 would have to be added to it according to my understanding of how the game engine reads pointers to the graphics packs.

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #24 on: January 31, 2009, 10:43:29 pm »
Is that really how that works?  That's really weird.

Edit: No, that converts numbers 0-3 to A B C D E F,  Anything above that stays the same.  So it should be fine to load it anywhere.

Edit: The next one is 62 23 E5, reverse that and change the number and it's 25 23 62 (252362).  Anything ABOVE 3FFFFF for example, 410000 would just be 000041.  It doesn't have to be changed into a letter.
« Last Edit: January 31, 2009, 10:46:08 pm by justin3009 »

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #25 on: January 31, 2009, 10:46:58 pm »
Okay, I'll try it without the +C00000 addition and report in with my findings.

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #26 on: January 31, 2009, 10:48:36 pm »
Er, typoed

0 = C, 1 = D, 2 = E, 3 = F

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #27 on: February 01, 2009, 12:15:54 am »
It worked! Someday you'll have to explain the pointer scheme to me, but don't worry about it for now. The point is, I am empowered. The New Dream Devourer insertion continues.

justin3009

  • Moderator
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Dream Devourer Raw Data
« Reply #28 on: February 01, 2009, 12:25:40 am »
I'll just explain it to you while you're working.  It's actually really simple.  From what I've seen of Chrono Trigger there's 2 types of pointers, but there's probably more.

The first type is your basic 3 byte pointer, example 362220 = 2022F6.  C = 0 D = 1 E = 2 F = 3.  For any chunk of data that you know is being pointered to, you can do this.  The most obvious ones would be the Character Graphics and whatnot.  You take the address it's at, reverse it, and if the first number was 0-3, change it corresponding to the letters I listed above.

The second type is a 2 byte pointer.  May seem odd but it isn't.  There's a specific byte that tells what "bank" it's in.  Meaning that the main area that everything is in is labeled by 1 byte for the area, then the other 2 point to the exact location.

Example: 3FC457 (D7 C4) - Character Stats On Left: The bytes are are D7 C4, reverse that and plop on the other and you get 3F C4 D7 for the exact location.  There's a specific byte that's labeled "FF" that labels everything in that area in bank 3F.  It's kind of complicated but once you start futzing around with everything, it's 2nd nature.
« Last Edit: February 01, 2009, 12:28:21 am by justin3009 »

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Dream Devourer Raw Data
« Reply #29 on: February 06, 2009, 10:25:16 pm »
Dream Devourer assembly should be finished late tonight. I'll upload a patch based on the full modified ROM, and if you apply that patch to your latest full patch everything should mesh together okay.

There will probably be issues with Layer 3 spell effects messing with the appearance of the Dream Devourer's shell -- I never did figure that out yet. Like, when Lavos casts "Chaos," the shell turns weird colors while the Layer 3 spell effect is being played. We'll have to figure that one out.