It is currently Tue Sep 19, 2017 10:01 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Dec 30, 2016 7:23 am 
Offline

Joined: Fri Dec 30, 2016 7:18 am
Posts: 2
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.


Top
 Profile  
 
PostPosted: Fri Dec 30, 2016 8:46 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Did you ask this over on the romhacking.net forum? If so, what'd they say? If not, why not?


Top
 Profile  
 
PostPosted: Fri Dec 30, 2016 8:50 am 
Offline

Joined: Fri Dec 30, 2016 7:18 am
Posts: 2
I've been trying to make a account, but they still never accepted my request, so I hoped they could help me here.


Top
 Profile  
 
PostPosted: Fri Dec 30, 2016 10:37 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
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 ...


Top
 Profile  
 
PostPosted: Thu Jan 05, 2017 8:57 pm 
Offline
User avatar

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


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: No registered users and 5 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