This is Crow!, the developer of the FFIV: The Lunarian Shuffle randomizer. ( Project blog can be found here: https://ff4-lunarianshuffle.blogspot.com/
I'm working on a new feature (called "lunacy mode") which will cause the game to shuffle your characters at the end of each battle that you win. That function appears to be working right, which I was pumped about! But then I decided I wanted the game to update what your characters looked like and stop to show a message so you can see who your new set is without having to go back to the party menu after every battle.
So, I'm attempting to overwrite the character sprite data (located in VRAM starting at address 0, with a new character every 0x800 bytes or 0x400 words as I understand it). My first attempt at this was to do a DMA transfer, mimicking what the game had done to load that data into VRAM in the first place. See a trace of the first iteration of my loop for this below:
However, VRAM was completely unchanged from before and after "sta $420b" was executed.
I spent a while trying to figure out what was wrong with the DMA transfer. Eventually I just wrote a super slow loop to do the same transfer without the help of the DMA. However, the VRAM continues to not change in any way
. See a partial trace of this below.
So, what did I do wrong? As I understand it, writing an address (in this case, 0000) to $00:2116, then writing data to $00:2118 / $00:2119 should make something
change in the VRAM.
Some more information in case it is relevant:
- When this code is run, HDMA is currently active on channels 0, 1, 2, and 7. The first three are targeting scroll registers. The last one is pointed at $2131, whose meaning I do not know.
- There are sprites using this art data currently active in the OAM.
- My code is not waiting for a VBlank interrupt or anything; it is being called directly after I have swapped the characters (thus necessitating the sprites to be updated).
I've been hitting my head against this problem for about 3 days now, so any help would be greatly appreciated.