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

Mega Man 5 - Color Editing troubleshoot
http://forums.nesdev.com/viewtopic.php?f=21&t=15321
Page 1 of 1

Author:  Xraying [ Fri Dec 30, 2016 7:23 am ]
Post subject:  Mega Man 5 - Color Editing troubleshoot

Hey there.
So I've been working on a hacked rom of Mega Man V.
Everything I am planning to do works fine, but there's one problem that really bothers me.

I changed Mega Man's sprite colors, only the blue and cyan parts.
When I play everything works fine, until I shoot. When I look at the HEX code the color code changes back to Mega Man's original colors, but when Mega Man gets hit his edited colors return, how do I fix this?

Thank you very much.

Author:  koitsu [ Fri Dec 30, 2016 8:46 am ]
Post subject:  Re: Mega Man 5 - Color Editing troubleshoot

Did you ask this over on the romhacking.net forum? If so, what'd they say? If not, why not?

Author:  Xraying [ Fri Dec 30, 2016 8:50 am ]
Post subject:  Re: Mega Man 5 - Color Editing troubleshoot

I've been trying to make a account, but they still never accepted my request, so I hoped they could help me here.

Author:  koitsu [ Fri Dec 30, 2016 10:37 am ]
Post subject:  Re: Mega Man 5 - Color Editing troubleshoot

Patience is virtue. That forum is a better place for romhacking than here. This forum is mainly for development (which can include romhacking, but isn't exclusively limited to such). No offense intended in the least (newbies are always welcome), but the technical calibre of folks here tends to be substantially higher.

Odds are, the location in the ROM you've modified to reflect the palette change needs to be done elsewhere in the ROM for the other "animation frames" (vaguely put). In other words: unless someone has already done the work for you, you get to reverse-engineer the game to figure out where it's being done.

I recommend using something like FCEUX to narrow down what exact palette entry (offset) is being used for the sprite/frame of animation in question. From that, you should be able to deduce the location in PPU RAM that correlates with that palette entry. You then can set a breakpoint in FCEUX's debugger for that PPU location, then reproduce the situation that causes the visual anomaly, and figure out what's responsible for writing that value to PPU RAM (the latter is the "heavy lifting" part). I can't tell exactly what you're referring to because grammatically your sentence is confusing; it refers to two separate things:

Quote:
... When I play everything works fine, until I shoot. When I look at the HEX code the color code changes back to Mega Man's original colors, but when Mega Man gets hit his edited colors return ...

Author:  mikejmoffitt [ Thu Jan 05, 2017 8:57 pm ]
Post subject:  Re: Mega Man 5 - Color Editing troubleshoot

Total guess: since Mega Man can power up a charged shot when B is held, I bet some routine related to checking the state of the B button after/around a shot resets his palette, since the shot charging changes his palette. You will want to maybe break on writes to $3F11-$3F1F once you press the B button, and find out what table or constants it's pulling from to write his palette.

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