Project to hack in custom “wounded” sprites for the FFV heroes when they are Knocked Out. Has two phases: 1) control the palette change so that it doesn’t always revert to Freelancer colors; 2) insert new sprites upon KO, versus always using the same sprite.

Early Experiments

The routine that loads the Freelancer palette on battle start, for hero #1.

image.png

C1:266F  B7 74     LDA $74    ; unclear how the value $74 is pointing at the palette
C1:2671  9D F6 EC  STA $ECF6  ; offset where the palette is stored in WRAM

image.png

Manually pasting a different 32 bytes of another palette here…

image.png

Does lead to it showing up on KO, versus the Freelancer palette!

image.png

Values of Relevance

WRAM addresses (7E:xxxx) which hero? what Job? where KO palette?
character 1 (top of party) $2000 $2001 $ECF6
character 2 $2080 $2081 $ED16
character 3 $2100 $2101 $ED36
character 4 (bottom of party) $2180 $2181 $ED56
values for “which hero?”
Bartz 00 or 80
Lenna 09 or 89
Galuf 02 or 82
Faris 0B or 8B
Krile 0C or 8C

1st palette: C4:A3C0 #22: C4:A660 #44: C4:A920 #66: C4:ABE0 #88: C4:AEA0 #110: C4:B160

Useful reference:

https://www.ff6hacking.com/ff5wiki/index.php/FFV_RAM_map

Knight = 00 BlackMage = 10 ($0A) Freelancer = 21 ($15)

Krile freelancer palette 19 21 84 10 FF 7F 00 69 3F 53 1F 03 56 7A 2D 79 3F 3A DB 0D FF 3F 7F 40 5F 03 5F 72 A5 1E E5 3B

Achievement by Omission (Less is More)

<aside> 💡

The second Store to A operation @ C1:B1C7 can be NOP'd and the game does not crash-- it just keeps the same palette as before the K.O. (hint provided by Cubear).

</aside>

image.png

Confirmation that other in-battle palette loading still works as expected: Zombie, Stone, Poison, Old, and status auras (Haste shown) all resolve and clear correctly.

image.png

image.png

image.png

Phase 2 is using K.O. sprites that match the Job outfit, so they will want the Job palette; I'm roughly 16% through these new sprites already. Now I'm gonna race to the finish line so I can get them ready for Phase 2.