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

Author Topic: change palette assigned to a sprite  (Read 488 times)

sebastianangel

  • Full Member
  • ***
  • Posts: 206
  • you can always improve
    • View Profile
    • sega genesis
change palette assigned to a sprite
« on: May 30, 2021, 07:03:17 pm »
Hello everyone, I am writing to request technical help that would come in handy in several projects that I have in mind and as time passes I am rediscovering new things! In this case I am with a doubt as to how the color palette assigned to a sprite? example:

I am trying to learn since I don't know asm, but I found the palette change that Mario does when he takes the flower interesting and I thought if it could be applied in the same way to Toki when he takes the flower. the helmet

Thank you very much in advance I hope to continue learning this, what I like, greetings :woot!:

FAST6191

  • Hero Member
  • *****
  • Posts: 3163
    • View Profile
Re: change palette assigned to a sprite
« Reply #1 on: May 31, 2021, 07:03:33 am »
The OAM is what controls the palette choice
http://wiki.nesdev.com/w/index.php/PPU_OAM
http://wiki.nesdev.com/w/index.php/PPU_palettes

The OAM is updated fairly often (even more so when moving) so you might need to intercept the commands the game normally uses there rather than writing your own randomly like you can do for hardcoding some cheats (if doing infinite lives in a game I can go find everything that touches the life counter, however once per frame I might instead

NES palettes are a bit more limited in what is allowed compared to later consoles, and many games already fill the palettes available, so be prepared to compromise on what you can get done here as well.

sebastianangel

  • Full Member
  • ***
  • Posts: 206
  • you can always improve
    • View Profile
    • sega genesis
Re: change palette assigned to a sprite
« Reply #2 on: June 01, 2021, 09:14:55 am »
Thank you very much I really appreciate the time you spent in explaining me and giving me good data where to investigate to deepen my knowledge, I will try to find those addresses through fceux, greetings friend :beer: