News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)  (Read 531 times)

N.Dpendent

  • Newbie
  • *
  • Posts: 3
    • View Profile
Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)
« on: January 28, 2020, 01:14:14 pm »
I try to colorize the 3 level forms of the Ninja black,i already found the right offsets.But when i level up,he still gets pink.If i use a door,he has my chosen black color.Same when i get hit,he turns blue...when i use a door again,he is black...I tryed every offset of the blue palette,but it still happens.Is there maybe a fade- or morph-command i have to disable?

I hope someone could give me a hint,what i`m doing wrong
« Last Edit: January 29, 2020, 01:11:58 am by N.Dpendent »

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 325
  • I am the baldest romhacker
    • View Profile
Re: Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)
« Reply #1 on: January 29, 2020, 08:00:59 am »
Use debugger and breakpoints to find out why something happens
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

FAST6191

  • Hero Member
  • *****
  • Posts: 2665
    • View Profile
Re: Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)
« Reply #2 on: January 29, 2020, 11:44:11 am »
What Cyneprepou4uk said. There are plenty of examples of GBA games using palette animation, dynamic palettes and palettes otherwise altered at runtime. The changing when going through a door is probably just an oversight on the part of the coders, and as it is so short and actually non interactive then nobody likely cared.
You need to figure out what does it (should be fairly easy as palettes are easy to find in memory, personally I would savestate before getting the level up and go from there whereas getting hit in that game can be achieved just about anywhere) and figure out what you want to do there -- do you set a different colour as part of the operation or prevent the code from doing anything being the main two things here. Most likely just the colours in question will be change but I have seen whole palettes changed when just one thing is changed in the game before so be aware of that one.

https://www.romhacking.net/documents/361/ is more for finding graphics but you just change it to be the palette section instead that you are watching. Though http://problemkaputt.de/gba.htm#debug is probably a better bet for a debug emulator these days.

EvilJagaGenius

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
    • The Jaga's Nest
Re: Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)
« Reply #3 on: January 29, 2020, 03:23:28 pm »
Use debugger and breakpoints to find out why something happens

More specifically, mGBA sounds like it'd be really good for this.  Open up the game in mGBA, go to Tools -> Open debugger console, and set a watchpoint for when the game reads/writes palettes.  The start of palette RAM is at 0x05000000, so if I wanted to watch when the game read or wrote the very first color in palette RAM, I'd enter the command "w 0x05000000" into the debugger console.  The game will pause, so enter the command "continue" to resume.  Then whenever the game reads or writes the first color, it'll stop execution and let you know.  From there, you can use the "trace" command to go through each following instruction, so if you go up to the point where it writes another value to around 0x05000000, you can learn how it's writing colors into palette RAM.

You'd have to replace 0x05000000 to wherever the ninja's palette goes in RAM, I'm not sure about the specifics of Ninja Five-0.  But I think that's how you would go about finding (and fixing) the problem.  Hope that helps!

(and if a more experienced hacker realizes I have no idea what I'm talking about, let me know)

N.Dpendent

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Ninja Five-0 Color still changes on Hit or Power-Up (GBA-Rom)
« Reply #4 on: January 29, 2020, 04:02:11 pm »
I read a lot about graphic effects and adresses of 5000000h but my rom ends at 3000000h or 4000000h.I also found an offset,where the colors at after obtaining an upgrade.But there is still that pink before turning to my palette...I think,it has to be a blend or fadeeffect,that i need to disable..And the problem is,i am new at romhacking and dont know what to look for in debug mode.I just wanna have a black ninja,that only changes his abilities