On the subject of Will's palette changes during the Friar attack...
At $16B28A (unheadered US ROM), there is a table that describes how bytes should be copied from ROM to RAM so that Will's palette changes during the Friar attack. The animation is divided into eight parts, represented by eight 6-byte hextets. The bytes of each hextet are: 1. Number of palettes to cycle through for this part of the animation; 2-3. Source ROM address to copy from, namely the first palette for this part of the animation; 4. Destination RAM address for the bytes read from ROM (actually the address is 2 * this + #$0a); 5. Number of bytes to copy, minus 1; 6. Number of frames the palette should appear for, minus 1.
Probably many more animations appear in tables nearby, but I haven't looked into those yet.
For the Friar, byte 1 is always 01 (each hextet loads exactly 1 palette), byte 4 is always 81 (Will's body), and byte 5 is always 1D (Will's body contains #$1e bytes, I guess).
The animation ends when the next hextet would have byte 1 = 00, i.e. when byte 6 is immediately followed by 00.
The Friar goes through the following palette sources, all in bank $16: B18D, 1 frame; B16F, 2 frames; B151, 3 frames; B133, 4 frames; B115, 5 frames; B0F7, 6 frames; B0D9, 7 frames; B0BB, 8 frames. The last one, B0BB, is Freedan's normal palette. I have no idea why these are stored in ROM in the opposite order from how they're used in the game. To change which palettes the Friar attack cycles through, you just have to change these address references, and (optionally) the number of frames that each one lasts. Or you could just change the palettes directly; I don't know whether they are used anywhere else.
I also have no idea which palette numbers in GaiaTheCreator correspond to these addresses. Care to enlighten me? :)
Amazing! Glad I could help!
AntwortenLöschenTHanks to both of you for this! I'm so stoked for the next release!
LöschenOn the subject of Will's palette changes during the Friar attack...
AntwortenLöschenAt $16B28A (unheadered US ROM), there is a table that describes how bytes should be copied from ROM to RAM so that Will's palette changes during the Friar attack. The animation is divided into eight parts, represented by eight 6-byte hextets. The bytes of each hextet are:
1. Number of palettes to cycle through for this part of the animation;
2-3. Source ROM address to copy from, namely the first palette for this part of the animation;
4. Destination RAM address for the bytes read from ROM (actually the address is 2 * this + #$0a);
5. Number of bytes to copy, minus 1;
6. Number of frames the palette should appear for, minus 1.
Probably many more animations appear in tables nearby, but I haven't looked into those yet.
For the Friar, byte 1 is always 01 (each hextet loads exactly 1 palette), byte 4 is always 81 (Will's body), and byte 5 is always 1D (Will's body contains #$1e bytes, I guess).
The animation ends when the next hextet would have byte 1 = 00, i.e. when byte 6 is immediately followed by 00.
The Friar goes through the following palette sources, all in bank $16:
B18D, 1 frame;
B16F, 2 frames;
B151, 3 frames;
B133, 4 frames;
B115, 5 frames;
B0F7, 6 frames;
B0D9, 7 frames;
B0BB, 8 frames.
The last one, B0BB, is Freedan's normal palette. I have no idea why these are stored in ROM in the opposite order from how they're used in the game. To change which palettes the Friar attack cycles through, you just have to change these address references, and (optionally) the number of frames that each one lasts. Or you could just change the palettes directly; I don't know whether they are used anywhere else.
I also have no idea which palette numbers in GaiaTheCreator correspond to these addresses. Care to enlighten me? :)