Hi everyone!
I am trying to change the color scheme of the peahat on the title screen *without changing the color scheme of Link*. (see Attachment 1)
Apparently, Link and the peahat share the same color scheme (see the red circled area of attachment 2). I am trying to change the color scheme of the peahat to agree with the green circled area.
Any help would be appreciated.
Do you have access to the source, or are you just modifying the binary of a ROM?
What you need to do is open FCEUX's Hex Editor, under Debug, go to the $200 page, and look at the sprites displayed on screen. Every 4th byte is the Y position of a sprite (starting at $200, then $204, then $208...) you need to find the values that matches the Peahat's Y position. 2 bytes later is the attribute of that sprite, you need to increase the attribute by 1 so that it's using palette 3 instead of 2. You can do this directly in the Hex Editor to see what happens, but these changes won't be saved. You can post a screenshot of the Hex Editor if you need help figuring this part out.
These sprites are being drawn by code, so you'll need need to modify the source (if you have it), or disassemble the ROM.
I'm familiar with the hex code editor - but not the debugger. If you can tell me what the offset is for the Y-position of the peahat (or the peahat's color scheme code), I'll try to take it from there.
According to the screenshot you posted, the peahat appeared at Y,X 153 and 136. However, the image is only 224 high, so it must have been exported with the top and bottom 8 pixels trimmed off (a setting in FCEUX), so the peahat is actually 153 + 8 = 161. Also, sprites appear in memory one pixel higher than they are rendered, meaning the sprites' Y positions should be 160. In hex that'll be $a0. Finally the peahat is made up of 4 sprites, so you'll want to look in the hex editor for bytes $a0 twice, and $a8 twice. Once you find those, try incrementing 2 bytes later like I described above and see if it works as desired.
Found the offsets! I switched offset 0x000D2D from 'A9' to 'A7' and offset 0x000D43 from 'A9' to 'A7'. Thanks for the hint!