øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1115.45e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3b56.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3b56.html.zxµ$h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0Pdf€OKtext/htmlISO-8859-1gzip@øÕf€ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 23:53:49 GMT0ó°° ®0®P®€§²ð®´$h^ÿÿÿÿÿÿÿÿÅ2f€ FF6 Improvement Project

Author Topic: FF6 Improvement Project  (Read 278338 times)

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: FF6 Improvement Project
« Reply #45 on: September 04, 2009, 10:19:28 AM »
Atlas is smart enough to insert TERRA as the control code (but not Terra, terra, or any other variation). I often find myself typing the name instead of the control code, so I set it up that the name would be dumped and inserted normally.

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: FF6 Improvement Project
« Reply #46 on: September 10, 2009, 03:14:00 AM »
I wouldn't bother using this for editing any of the fixed length text though; that's easy enough to do in a hex editor, easier than keeping track of spaces.

I'm curious about this: Keeping track of spaces is important for these, since the pointers for this dialogue are looking at specific addresses. But if you wanted to expand the text, I'm sure you could, and use the bank of FFs at the end of the battle dialogue for extra spaces. (Kinda like what you can do for item and spell descriptions?) What I'm curious about is, where would I look for the pointers to this dialogue in order to change the starting byte for each line of dialogue?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: FF6 Improvement Project
« Reply #47 on: September 10, 2009, 11:22:09 AM »
You mean the fixed width text? There aren't any pointers, not in the traditional sense. In order to expand this, you need to change the number of characters loaded and printed. Here's what prints the item names in the Item menu:

Code: [Select]
C3/80B9: A28B9E   LDX #$9E8B      (position onscreen, though a couple of people have mentioned this may be where in VRAM it is stored)
C3/80BC: 8E8121   STX $2181
C3/80BF: AD1242   LDA $4212
C3/80C2: 2940     AND #$40
C3/80C4: F0F9     BEQ $80BF
C3/80C6: 7B       TDC
C3/80C7: B96918   LDA $1869,Y (Load inventory item Y)
C3/80CA: C9FF     CMP #$FF (Is it the "empty" item?)
C3/80CC: F028     BEQ $80F6 (If so, skip to the next part)
C3/80CE: 8D1B21   STA $211B (Write the index out to be multiplied)
C3/80D1: 9C1B21   STZ $211B (It always does this...)
C3/80D4: A90D     LDA #$0D (Load 13)
C3/80D6: 8D1C21   STA $211C (Write it out to be multiplied)
C3/80D9: 8D1C21   STA $211C (Write it out again, as required)
C3/80DC: AE3421   LDX $2134 (Load X with the result of index * 13)
C3/80DF: A00D00   LDY #$000D (Start the count of letters at 13)
C3/80E2: BF00B3D2 LDA $D2B300,X (Load letter X of item name)
C3/80E6: 8D8021   STA $2180
C3/80E9: E8       INX
C3/80EA: 88       DEY
C3/80EB: D0F5     BNE $80E2
C3/80ED: A9C1     LDA #$C1       (colon in the font)
C3/80EF: 8D8021   STA $2180
C3/80F2: 9C8021   STZ $2180
C3/80F5: 60       RTS

All you need to do is change the value at C3/80D5 and C3/80E0 to the number of characters you want to load instead. I believe all of the fixed width text is loaded in the same manner. All you need to do is have the starting offset of the text you want (SNES HiROM format, no header), then search the disassemblies for something loading it.

Keep in mind that expanding this even one character will completely throw off the existing names, and you'll need to be sure each one is now the new length. There are some fixed width dumping/insertion programs over at RHDN that might make this easier, but I've never used them. Alternatively, you could change these to load from a pointer table instead, which usually saves a ton of space. Maybe someone is feeling more ambitious and will teach you how to do that.

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: FF6 Improvement Project
« Reply #48 on: September 10, 2009, 01:33:33 PM »
The above only applies to inventory items/equipment, right?  Are there similar blocks of code for spells, espers, and/or character names?  I think I'll try this tonight or tomorrow.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: FF6 Improvement Project
« Reply #49 on: September 10, 2009, 01:39:55 PM »
There should be, yes. It's been so long since we expanded this stuff, I don't remember where they all are anymore. (Expanding is the easy part, making room (on the screen, not in the ROM) for that expanded text is a lot more difficult in most cases. Leno did a lot of that, so he'd be the person to ask about specifics.)
« Last Edit: September 10, 2009, 01:50:51 PM by Dragonsbrethren »

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 Improvement Project
« Reply #50 on: September 10, 2009, 03:48:48 PM »
The above only applies to inventory items/equipment, right?
Yes, I think so.

Quote
Are there similar blocks of code for spells
Code: [Select]
C3/4FB5: A00700  LDY #$0007    (spell letter length)
C3/4FB8: 84EB    STY $EB
C3/4FBA: A067F5  LDY #$F567    (spell name address)
C3/4FBD: 84EF    STY $EF
C3/4FBF: A9E6    LDA #$E6      (spell name bank)
C3/4FC1: 85F1    STA $F1
C3/4FC3: 60      RTS
Code: [Select]
Display spell name

C1/6019: EB      XBA (from only C1/5FBF)
C1/601A: A907    LDA #$07 (7 = spell name length)
C1/601C: 8510    STA $10
C1/601E: 8D6D61  STA $616D
C1/6021: 20CA18  JSR $18CA (half multiplier)
C1/6024: C220    REP #$20
C1/6026: AF164200 LDA $004216
C1/602A: AA      TAX
C1/602B: 7B      TDC
C1/602C: E220    SEP #$20
C1/602E: CE6D61  DEC $616D
C1/6031: BF68F5E6 LDA $E6F568,X (Load Spell name X)
C1/6035: C9FF    CMP #$FF
C1/6037: F009    BEQ $6042
C1/6039: 201161  JSR $6111
C1/603C: E8      INX
C1/603D: CE6D61  DEC $616D
C1/6040: D0EF    BNE $6031
C1/6042: 60      RTS

Quote
espers
Code: [Select]
C3/54FA: A00800  LDY #$0008      (esper name length)
C3/54FD: 84EB    STY $EB
C3/54FF: A0E1F6  LDY #$F6E1      (esper name address)
C3/5502: 84EF    STY $EF
C3/5504: A9E6    LDA #$E6        (esper name bank)
C3/5506: 85F1    STA $F1
C3/5508: 60      RTS
Code: [Select]
Esper name displaying in most menus (this is not used to generate the esper list!)
C3/34E6: 201935  JSR $3519
C3/34E9: B91E00  LDA $001E,Y
C3/34EC: C9FF    CMP #$FF
C3/34EE: F018    BEQ $3508      (branch if no esper equipped)
C3/34F0: 0A      ASL A
C3/34F1: 0A      ASL A
C3/34F2: 0A      ASL A
C3/34F3: AA      TAX
C3/34F4: A00800  LDY #$0008     (esper name length)
C3/34F7: BFE1F6E6 LDA $E6F6E1,X  (Load Esper name)
C3/34FB: 8D8021  STA $2180
C3/34FE: E8      INX
C3/34FF: 88      DEY
C3/3500: D0F5    BNE $34F7
C3/3502: 9C8021  STZ $2180
C3/3505: 4CD97F  JMP $7FD9
Code: [Select]
Display Esper name

C1/5FEF: 38      SEC (from only C1/5FC3)
C1/5FF0: E936    SBC #$36
C1/5FF2: EB      XBA
C1/5FF3: A908    LDA #$08 (8 = Esper name length)
C1/5FF5: 8510    STA $10
C1/5FF7: 8D6D61  STA $616D
C1/5FFA: 20CA18  JSR $18CA (half multiplier)
C1/5FFD: C220    REP #$20
C1/5FFF: AF164200 LDA $004216
C1/6003: AA      TAX
C1/6004: 7B      TDC
C1/6005: E220    SEP #$20
C1/6007: BFE1F6E6 LDA $E6F6E1,X (Load Esper name X)
C1/600B: C9FF    CMP #$FF
C1/600D: F009    BEQ $6018
C1/600F: 201161  JSR $6111
C1/6012: E8      INX
C1/6013: CE6D61  DEC $616D
C1/6016: D0EF    BNE $6007
C1/6018: 60      RTS

Quote
and/or character names?
Code: [Select]
Draw name of character onscreen at 16-bit Y
C3/34CF: 201935  JSR $3519
C3/34D2: A20600  LDX #$0006     (length of character name)
C3/34D5: B90200  LDA $0002,Y
C3/34D8: 8D8021  STA $2180      (write a letter)
C3/34DB: C8      INY
C3/34DC: CA      DEX
C3/34DD: D0F6    BNE $34D5
C3/34DF: 9C8021  STZ $2180      (termination)
C3/34E2: 4CD97F  JMP $7FD9      (finish the drawing process)

There is a little bit more, but this is the gist of it. And yes, as you can see it's all commented. The disassemblies are there for a reason, you know. :tongue:

119 bugs fixed and counting.

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: FF6 Improvement Project
« Reply #51 on: September 10, 2009, 09:58:26 PM »
Beautiful!   Time for some experiments, thanks!

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: FF6 Improvement Project
« Reply #52 on: September 13, 2009, 03:14:48 AM »
Wow, that is an absolute crapton of good information, thanks!

I was actually talking about the length of each battle dialogue sequence, and I was aware that I would have to repoint all the pointers if I were to expand the length of the text. That actually doesn't look like it would be that much work, since there don't appear to be that many battle dialogue sequences. I just wanted to make sure that the FFs at the end of the battle dialogue are the extra space allocated for the battle dialogue, and that I wouldn't be overwriting anything important if I did need to expand any of the text.

 :edit:
I just re-read your answer, DB, and I see what you mean about how any expansion of that would take some work to re-word. I'll try to keep what I have in mind within what's there, but if I can't, then we'll see how that will work.

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: FF6 Improvement Project
« Reply #53 on: September 13, 2009, 03:23:10 AM »
And for an update on this project: my job has moved me to an overnight shift, so I've actually got some free time to re-write the script. I didn't think to mention this, but it's why I've been so interested in script-related questions lately. So this may be a more extensive mod than I had originally planned on...
 :omg:

vivify93

  • Liquid Flame
  • *
  • Posts: 304
  • Gender: Male
  • White Wizard
    • View Profile
Re: FF6 Improvement Project
« Reply #54 on: September 13, 2009, 10:34:55 PM »
I am extremely interested in this.

May I ask something? Would it be possible to provide a small over-patch to change the HP restoring spells back to "Cure", and to change the poison removing spell to "Purify"?

Another thing. I see you imported Tzepish's esper improvements. I was wondering if it would be possible to also give Raiden the Speed + 2 level up bonus as well.
Hacking is hard. :sad:

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: FF6 Improvement Project
« Reply #55 on: September 15, 2009, 04:59:48 PM »
Would it be possible to provide a small over-patch to change the HP restoring spells back to "Cure", and to change the poison removing spell to "Purify"? Another thing. I see you imported Tzepish's esper improvements. I was wondering if it would be possible to also give Raiden the Speed + 2 level up bonus as well.

Those kinds of changes are fairly easy with FF3usME. That's how I did it...

Now...after doing some more with this battle dialogue, I don't think I'm explaining what I'd like to do. The battle dialogue I'm talking about is like this:
Code: [Select]
--
$10D400

WEDGE:<$01>
Hey! What's the matter?<$07><$01>
Do you know something we don't……?<$07><$00>

--
$10D44D

WEDGE:<$01>
Where's that light coming from?!<Input> Uwaaaaaaa!!!!<$07><$00>

--

That's from a file I'm putting together documenting the battle dialogue. I'd like to do something similar to what Pandora's Box has in the demo you put out some time ago, where this text is changed and even expanded in some cases (the Rock, Paper, Scissors scene when Edgar and Locke find out about Terra's magic).

What I'm asking is, can I change this without having to worry about where the game tries to find each string, or will I have to change pointers somewhere else in the ROM so the game will load the proper battle dialogue string?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: FF6 Improvement Project
« Reply #56 on: September 15, 2009, 05:09:43 PM »
You'll need to change pointers.

vivify93

  • Liquid Flame
  • *
  • Posts: 304
  • Gender: Male
  • White Wizard
    • View Profile
Re: FF6 Improvement Project
« Reply #57 on: September 15, 2009, 05:32:48 PM »
Those kinds of changes are fairly easy with FF3usME. That's how I did it...
No, no, no. I know it's possible to do. I meant, would it be possible for you to provide an over-patch for those to be done? Rather, not "would it be possible for you to provide", but "would you please kindly provide it"?

Not to mention that unless FFIIIusME started offering a dialogue editor, there are three references to the spell "Cure" in the dialogue--once in Vector (The Cure Castin' Kid) and twice with the woman and her child in Thamasa.
Hacking is hard. :sad:

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: FF6 Improvement Project
« Reply #58 on: September 17, 2009, 12:40:18 PM »
2 things

feel free 2 ignore this cuz I probably missed it

did u put the MP color switch? (u probably did and if so ignore this)

do u think u can provide a patch with all these changes soon?
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: FF6 Improvement Project
« Reply #59 on: September 20, 2009, 07:05:18 AM »
Not to mention that unless FFIIIusME started offering a dialogue editor, there are three references to the spell "Cure" in the dialogue--once in Vector (The Cure Castin' Kid) and twice with the woman and her child in Thamasa.

Yeah, that particular part is a work-in-progress until I can figure out Atlas enough to change those particular dialogue strings. I found the one for the Vector Kid, but I haven't come across the Thamasa one yet. I'm going through line-by-line and editing since work is sometimes SLOOOOOOW at night.


did u put the MP color switch? (u probably did and if so ignore this)

I did put that one in.  :happy:

Quote
do u think u can provide a patch with all these changes soon?
Quote
"would you please kindly provide it"?

I have a patch ready to go with the changes I've made so far...although I need to make a couple of new ones to reflect the +2 Speed for Raiden (great idea btw, Vivify!). It's also becoming obvious that I need to set up a website so I can host this mod and provide a link for RHDN. In the meantime, PM me your email address if you want the patch, and I'll send it to you.