It is currently Sat Dec 16, 2017 6:18 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Nov 27, 2016 2:02 pm 
Offline

Joined: Fri Nov 15, 2013 5:45 am
Posts: 8
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.


Attachments:
File comment: Attachment 1
Link-archer.png
Link-archer.png [ 3.23 KiB | Viewed 1600 times ]
File comment: Attachment 2
pooyan2.PNG
pooyan2.PNG [ 26.61 KiB | Viewed 1600 times ]


Last edited by Immutable on Sat Dec 03, 2016 4:01 pm, edited 1 time in total.
Top
 Profile  
 
PostPosted: Sun Nov 27, 2016 2:39 pm 
Offline
User avatar

Joined: Wed Oct 16, 2013 7:55 am
Posts: 130
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.


Top
 Profile  
 
PostPosted: Sun Nov 27, 2016 3:21 pm 
Offline

Joined: Fri Nov 15, 2013 5:45 am
Posts: 8
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.


Top
 Profile  
 
PostPosted: Sun Nov 27, 2016 3:35 pm 
Offline
User avatar

Joined: Wed Oct 16, 2013 7:55 am
Posts: 130
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.


Top
 Profile  
 
PostPosted: Sun Nov 27, 2016 4:51 pm 
Offline

Joined: Fri Nov 15, 2013 5:45 am
Posts: 8
Found the offsets! I switched offset 0x000D2D from 'A9' to 'A7' and offset 0x000D43 from 'A9' to 'A7'. Thanks for the hint! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: lazygecko and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group