Mega Man 5 - Color Editing troubleshoot

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Post Reply
Xraying
Posts: 2
Joined: Fri Dec 30, 2016 7:18 am

Mega Man 5 - Color Editing troubleshoot

Post by Xraying »

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.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Mega Man 5 - Color Editing troubleshoot

Post by koitsu »

Did you ask this over on the romhacking.net forum? If so, what'd they say? If not, why not?
Xraying
Posts: 2
Joined: Fri Dec 30, 2016 7:18 am

Re: Mega Man 5 - Color Editing troubleshoot

Post by Xraying »

I've been trying to make a account, but they still never accepted my request, so I hoped they could help me here.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Mega Man 5 - Color Editing troubleshoot

Post by koitsu »

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:
... 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 ...
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Mega Man 5 - Color Editing troubleshoot

Post by mikejmoffitt »

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.
Post Reply