nesdev.com
http://forums.nesdev.com/

Pooyan (with Zelda graphics) Hack - Solved!
http://forums.nesdev.com/viewtopic.php?f=21&t=15164
Page 1 of 1

Author:  Immutable [ Sun Nov 27, 2016 2:02 pm ]
Post subject:  Pooyan (with Zelda graphics) Hack - Solved!

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 1602 times ]
File comment: Attachment 2
pooyan2.PNG
pooyan2.PNG [ 26.61 KiB | Viewed 1602 times ]

Author:  dustmop [ Sun Nov 27, 2016 2:39 pm ]
Post subject:  Re: Pooyan (with Zelda graphics) Hack - Help Needed!

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.

Author:  Immutable [ Sun Nov 27, 2016 3:21 pm ]
Post subject:  Re: Pooyan (with Zelda graphics) Hack - Help Needed!

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.

Author:  dustmop [ Sun Nov 27, 2016 3:35 pm ]
Post subject:  Re: Pooyan (with Zelda graphics) Hack - Help Needed!

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.

Author:  Immutable [ Sun Nov 27, 2016 4:51 pm ]
Post subject:  Re: Pooyan (with Zelda graphics) Hack - Help Needed!

Found the offsets! I switched offset 0x000D2D from 'A9' to 'A7' and offset 0x000D43 from 'A9' to 'A7'. Thanks for the hint! :)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/