øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1456.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6adf.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.280e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6adf.html.zxw'h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈà•¤ûOKtext/htmlISO-8859-1gzip8:ÖûÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:05:35 GMT0ó°° ®0®P®€§²ð®v'h^ÿÿÿÿÿÿÿÿZ&û Changing the the sprites chocobo-riding uses

Author Topic: Changing the the sprites chocobo-riding uses  (Read 3188 times)

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Changing the the sprites chocobo-riding uses
« on: September 11, 2010, 07:10:34 PM »
I noticed the characters each have a set of unused sprites (right next to their tent sprite) that are either blank or filled with japanese letters for each character.  The weird thing is, these sprites are also blank for Leo and Banon also (attached is an example of what I'm talking about - a screencap of FF3UsSpriteEd with the unused sprites in question for Leo).  Would it be possible to change which sprites are used for the chocobo-riding to utilize the sprites in this location instead?  Then you could paste each character's chocobo riding sprites into the unused space, and add Leo and Banon chocobo-riding sprites to this area as well.

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Changing the the sprites chocobo-riding uses
« Reply #1 on: September 11, 2010, 07:19:44 PM »
Crap, it looks like Terra (and only Terra) uses that slot.  However, it's probably used only in specific events.  Those could be remapped to use the old chocobo-riding space.

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Changing the the sprites chocobo-riding uses
« Reply #2 on: September 11, 2010, 08:27:48 PM »
I actually have a custom Leo and Kefka riding sprite

I can still create a Banon, Merchant, and even Ghost if u want

(msg me and I can send them 2 u via email)
"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

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Changing the the sprites chocobo-riding uses
« Reply #3 on: September 11, 2010, 08:30:42 PM »
I already have custom sprites for Leo and Banon (from the other thread) - I'm asking about modifying the locations the sprites are loaded from for chocobo-riding so that there's enough room *for* the Banon and Leo sprites

Poco Loco

  • Cagnazzo
  • *
  • Posts: 356
  • Gender: Male
    • View Profile
    • FF6hacking.com
Re: Changing the the sprites chocobo-riding uses
« Reply #4 on: September 11, 2010, 08:46:55 PM »
damn maybe u can give me a Bannon 1 lolz

no I was just wondering in case u would need 1 or 2 that's all
"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

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Changing the the sprites chocobo-riding uses
« Reply #5 on: September 11, 2010, 09:07:03 PM »
The sprite Terra uses in that space is never used in the game. :angry: See? :happy:

In order to change which number in the sheet chocobo's use, you'd have to find what sets it, which is likely in C0. It's town/dungeon based, so it has to be there. As for the overworld stuff, you probably won't have to change that, but if you do, that's gonna be in EE. No, I don't know where this code is, cause it's not something I've ever bothered to look for. :cycle:

119 bugs fixed and counting.

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Changing the the sprites chocobo-riding uses
« Reply #6 on: September 12, 2010, 12:06:36 AM »
Well I was able to locate and modify the character's pose when he *dismounts* from the chocobo... it's gotta be near there.  The vehicle code (chocobos, airships) is in bank EE.

Code: [Select]
Draw the dismounting from a chocobo
EE/4DE8: 08      PHP
EE/4DE9: 8B      PHB
EE/4DEA: E220    SEP #$20       (8-bit accumulator)
EE/4DEC: AF6CB67E LDA $7EB66C
EE/4DF0: C928    CMP #$28
EE/4DF2: D00F    BNE $4E03
EE/4DF4: A980    LDA #$80
EE/4DF6: 8D4221  STA $2142      (Normal speaker balance)
EE/4DF9: A9D9    LDA #$D9
EE/4DFB: 8D4121  STA $2141      (Sound effect for departing chocobo)
EE/4DFE: A918    LDA #$18
EE/4E00: 8D4021  STA $2140      (APU I/O register 0)
EE/4E03: C220    REP #$20       (16-bit accumulator)
EE/4E05: AF6CB67E LDA $7EB66C
EE/4E09: C92000  CMP #$0020
EE/4E0C: 903A    BCC $4E48
EE/4E0E: C93000  CMP #$0030
EE/4E11: B009    BCS $4E1C
EE/4E13: A90400  LDA #$0004
EE/4E16: 8F62B67E STA $7EB662
EE/4E1A: 802C    BRA $4E48
EE/4E1C: AF62B67E LDA $7EB662
EE/4E20: 1A      INC A
EE/4E21: 290300  AND #$0003
EE/4E24: 8F62B67E STA $7EB662    (Save changes)
EE/4E28: AF6EB67E LDA $7EB66E
EE/4E2C: 18      CLC            (Clear Carry for addition)
EE/4E2D: 696000  ADC #$0060     (Add 96)
EE/4E30: 8F6EB67E STA $7EB66E    (Save changes)
EE/4E34: AF60B67E LDA $7EB660
EE/4E38: 1A      INC A
EE/4E39: 1A      INC A
EE/4E3A: 8F60B67E STA $7EB660    (Save changes)
EE/4E3E: C9F000  CMP #$00F0
EE/4E41: 3005    BMI $4E48
EE/4E43: A90B00  LDA #$000B
EE/4E46: 85CA    STA $CA        (This will finalize the dismounting)
EE/4E48: AF68B67E LDA $7EB668
EE/4E4C: C9B800  CMP #$00B8
EE/4E4F: B01B    BCS $4E6C
EE/4E51: 18      CLC            (Clear Carry for addition)
EE/4E52: 6F66B67E ADC $7EB666
EE/4E56: 8F68B67E STA $7EB668    (Save changes)
EE/4E5A: AF66B67E LDA $7EB666
EE/4E5E: 1A      INC A          (Add one)
EE/4E5F: 8F66B67E STA $7EB666    (Save changes)
EE/4E63: AF6AB67E LDA $7EB66A
EE/4E67: 3A      DEC A          (Decrease by one)
EE/4E68: 8F6AB67E STA $7EB66A    (Save changes)
EE/4E6C: AF6CB67E LDA $7EB66C
EE/4E70: C90900  CMP #$0009
EE/4E73: B005    BCS $4E7A
EE/4E75: A90F00  LDA #$000F     (Pose of character facing left with both arms up)
EE/4E78: 800D    BRA $4E87      (Branch to save the pose number)
EE/4E7A: C91000  CMP #$0010
EE/4E7D: B005    BCS $4E84
EE/4E7F: A90900  LDA #$0009     (Pose of character facing left while kneeling)
EE/4E82: 8003    BRA $4E87      (Skip the next instruction)
EE/4E84: A90100  LDA #$0001     (Pose of character facing down) (TDC, INC A...)
EE/4E87: E220    SEP #$20       (8-bit accumulator)
EE/4E89: 85F7    STA $F7        (Change pose number of map character)
EE/4E8B: AF60B67E LDA $7EB660
EE/4E8F: 8FD4B57E STA $7EB5D4
EE/4E93: AF6FB67E LDA $7EB66F
EE/4E97: 8FD2B57E STA $7EB5D2
EE/4E9B: AF62B67E LDA $7EB662
EE/4E9F: AA      TAX            (Transfer A to X)
EE/4EA0: BFE34DEE LDA $EE4DE3,X  (Load a pose number for the chocobo running off)
EE/4EA4: 8FD0B57E STA $7EB5D0
EE/4EA8: AF6AB67E LDA $7EB66A
EE/4EAC: 8FDAB57E STA $7EB5DA
EE/4EB0: AF68B67E LDA $7EB668
EE/4EB4: 8FDCB57E STA $7EB5DC
EE/4EB8: 7B      TDC            (Set 16-bit accumulator to zero)
EE/4EB9: A5F7    LDA $F7        (Pose number of map character)
EE/4EBB: AA      TAX            (Transfer A to X)
EE/4EBC: BF5248EE LDA $EE4852,X  (Is the upper half to be flipped horizontally?)
EE/4EC0: D00E    BNE $4ED0      (Branch if so)
EE/4EC2: BFD248EE LDA $EE48D2,X  (Is the bottom half to be flipped horizontally?)
EE/4EC6: D004    BNE $4ECC      (Branch if so)
EE/4EC8: A926    LDA #$26
EE/4ECA: 8010    BRA $4EDC
EE/4ECC: A927    LDA #$27
EE/4ECE: 800C    BRA $4EDC
EE/4ED0: BFD248EE LDA $EE48D2,X  (Is the bottom half to be flipped horizontally?)
EE/4ED4: D004    BNE $4EDA      (Branch if so)
EE/4ED6: A928    LDA #$28
EE/4ED8: 8002    BRA $4EDC      (Skip the next instruction)
EE/4EDA: A929    LDA #$29
EE/4EDC: 8FD8B57E STA $7EB5D8
EE/4EE0: C220    REP #$20       (16-bit accumulator)
EE/4EE2: AF6CB67E LDA $7EB66C
EE/4EE6: 1A      INC A          (Add one)
EE/4EE7: 8F6CB67E STA $7EB66C    (Save changes)
EE/4EEB: E230    SEP #$30       (8-bit accumulator and indexes)
EE/4EED: A9E6    LDA #$E6
EE/4EEF: 48      PHA
EE/4EF0: AB      PLB            (Set data bank register to E6)
EE/4EF1: A900    LDA #$00       (TDC...)
EE/4EF3: EB      XBA
EE/4EF4: AFFC1100 LDA $0011FC    (Palette number for map character)
EE/4EF8: 2907    AND #$07       (0 to 7)
EE/4EFA: 0A      ASL A          (Multiply by 2)
EE/4EFB: 0A      ASL A          (Multiply by 4)
EE/4EFC: 0A      ASL A          (Multiply by 8)
EE/4EFD: 0A      ASL A          (Multiply by 16)
EE/4EFE: 0A      ASL A          (Multiply by 32)
EE/4EFF: A8      TAY            (Set as palette index)
EE/4F00: A200    LDX #$00
EE/4F02: C220    REP #$20       (16-bit accumulator)
EE/4F04: B90080  LDA $8000,Y    (Load a character palette color)
EE/4F07: 9F00E17E STA $7EE100,X  (Save in RAM)
EE/4F0B: C8      INY
EE/4F0C: C8      INY
EE/4F0D: E8      INX
EE/4F0E: E8      INX
EE/4F0F: E020    CPX #$20       (Has the entire palette been copied?)
EE/4F11: D0F1    BNE $4F04      (If not, loop)
EE/4F13: AB      PLB
EE/4F14: 28      PLP
EE/4F15: 60      RTS


Vehek

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Changing the the sprites chocobo-riding uses
« Reply #7 on: September 16, 2010, 06:58:52 PM »
Figaro guards have riding poses, but are otherwise typical NPCs lacking most poses. Wouldn't this method mess up either them or one of the NPCs between their normal poses and their riding poses? (Unless you've changed that about them I suppose.)
And unless there's a bugfix for it out or you're not planning on taking him out into the overworld, you'd still get the sprite glitchup with Banon, right?


Here's why the glitchup happens:
Code: (Novalia's Disassembly: Overworld chocobo rider sprite) [Select]
EE/8943: ADFB11  LDA $11FB      (Sprite number for map character)
EE/8946: 8D0242  STA $4202      (Save as multiplicand A)
EE/8949: A9A0    LDA #$A0
EE/894B: 8D0342  STA $4203      (Set multiplier B to 160)
EE/894E: EA      NOP
EE/894F: EA      NOP
EE/8950: EA      NOP
EE/8951: AE1642  LDX $4216      (Load the product)
EE/8954: 866A    STX $6A
EE/8956: A916    LDA #$16
EE/8958: 8D0342  STA $4203      (Set multiplier B to 22)
EE/895B: EA      NOP
EE/895C: EA      NOP
EE/895D: EA      NOP
EE/895E: AD1642  LDA $4216      (Load low byte of product)
EE/8961: 18      CLC            (Clear Carry for addition)
EE/8962: 656B    ADC $6B
EE/8964: 856B    STA $6B
EE/8966: AD1742  LDA $4217      (Load high byte of product)
EE/8969: 656C    ADC $6C
EE/896B: 856C    STA $6C
EE/896D: 18      CLC            (Clear Carry for addition)
EE/896E: A56A    LDA $6A
EE/8970: 6980    ADC #$80       (Add 128)
EE/8972: 856A    STA $6A        (Save changes)
EE/8974: A56B    LDA $6B
EE/8976: 6901    ADC #$01
EE/8978: 856B    STA $6B        (Save changes)
EE/897A: A56C    LDA $6C
EE/897C: 69D5    ADC #$D5
EE/897E: 856C    STA $6C        (Save changes)
Basically, the routine assumes that each spriteset's data takes up 0x16A0 bytes. But since that isn't true for Leo and the spritesets afterward, the offset it uses is wrong.

Admittedly, it isn't hard to change the routine to fix the problem.
« Last Edit: September 16, 2010, 07:40:35 PM by Vehek »