Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: Duke2go on October 26, 2020, 07:04:38 pm

Title: Changing default character colors in SMB3 NES
Post by: Duke2go on October 26, 2020, 07:04:38 pm
Hi,

I'm working on a graphics hack of SMB3 NES that uses Toad instead of Mario and Luigi. I've changed all of the sprites that I need, but when I tried to change the colors for the 2nd player from the Luigi green to a blue more like Toad in SMB2, I can hex edit the changes, but whenever I close the rom and reload it, or something significant happens like it becomes player 2's turn, the colors default back to green. This is really only occurring on the map screen and I was able to successfully change the colors in-level. I remember this being an issue with Megaman 1 and the only way to change Megaman's default colors was to use an obscure editor that somehow overwrites the default colors wherever the info is called from. I have a feeling this is going to be another "well do you know assembly" topic, but I don't, so I figured I'd ask people who knew more than I do. Thanks for any help you can offer.  :beer:

Duke
Title: Re: Changing default character colors in SMB3 NES
Post by: Cyneprepou4uk on October 26, 2020, 07:07:36 pm
How exactly did you change colors in hex?
Title: Re: Changing default character colors in SMB3 NES
Post by: Duke2go on October 26, 2020, 07:15:10 pm
I used the utilities included with FCEUX once I loaded the game. Specifically the PPU viewer to find out what palettes were currently being used and the hex editor in the program to find the values that matched. I then changed the values one at a time, since there weren't usually many to choose from, and when I found the right one I saved the changes. Learned how to do that years ago and thankfully it mostly still works.
Title: Re: Changing default character colors in SMB3 NES
Post by: Cyneprepou4uk on October 26, 2020, 07:27:06 pm
Did you change values in hex in View -> PPU Memory, or in View -> ROM File?
Title: Re: Changing default character colors in SMB3 NES
Post by: Duke2go on October 27, 2020, 05:03:11 am
Honestly, I think I edited in NES Memory. But when it wouldn't change and stay changed, I looked through the ROM memory and PPU for those values. So if the answer was there, I couldn't find it.
Title: Re: Changing default character colors in SMB3 NES
Post by: Cyneprepou4uk on October 27, 2020, 06:29:49 am
The colors you see in PPU Viewer are stored in PPU Memory at $3F00-$3F1F. Sometimes you can manually change these values in order to change colors on the screen, however sometimes it will be immediately overwritten back, in that case find them in NES Memory in $0000-$07FF and try to change there.

To create a hack with permanent color changes you need to find colors in ROM File (or in any other hex editor) and edit them here. Usually you can simply search for 3 main colors of a palette set, like bytes at $3F11-$3F13 or $3F15-$3F17 from PPU memory. If no luck, try these 3 bytes in a reverse order. If still no luck, then debugging with a Write breakpoint at PPU Memory color address.