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

Author Topic: Mario graphic & text hack - HUD pallette problem.  (Read 5543 times)

darkhog

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Mario graphic & text hack - HUD pallette problem.
« on: February 24, 2011, 12:53:39 pm »
As my first project (probably like every beginner romhacker) I decided to make something simple - Mario graphic and text hack. Also I decided to change font to my own - with gradient which caused troubles in Mario HUD and popping scores after killing goomba/taking mushroom or 1up after taking 1up shroom. Two words: Wrong palette.


Fortunately in game ROM there is 4 color subpalette which would be great for other things also. Saddly it is used only for Thank you Mario(...) text and maybe for few graphical sprites.


My question is how to change HUD so it'll have "Thank you mario" colors? I don't want to change palletes used for hud in normal/underworld/underwater and castle levels, because as far as I know those palletes are used for things like clouds, etc. I just want to change references, so game will draw every text using color subpalette from Thank you mario text.

flamepanther

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #1 on: February 24, 2011, 04:49:27 pm »
At any one time, the NES can only have four background pallets in memory.  The text will have to use one of the four sets of background colors that are loaded with the current stage, and it will use the same slot every time, regardless of what colors are in it.  Even if you can get the HUD text to use a different slot, you won't be able to get the exact "thank you Mario" colors on every level without first sacrificing one background pallet for shades of gray on every level.

If I remember correctly, the ending text in the castle levels uses the same slot as the greenery and pipes in the normal levels.



Also, it's a good idea to turn off HQ filtering while editing and testing graphics of any sort  :thumbsup:
« Last Edit: February 24, 2011, 04:59:20 pm by flamepanther »

darkhog

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #2 on: February 24, 2011, 10:10:36 pm »
Oh, OK - I can bear gray pipes since I want to replace almost everything except level design and music - and that only because I don't know how to hack levels and music. So how to change HUD's slot to the pipe one and change pipe's palette to the one used in Thank you text?

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6905
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #3 on: February 25, 2011, 12:45:54 am »
Technically each palette is only 3 colors. The main background color will always be color 1 of palette 1, and color 1 of the other 3 palettes is ignored (auto-replaced with the main BG color). That is a hardware limitation you can't get around.
"My watch says 30 chickens" Google, 2018

darkhog

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #4 on: February 25, 2011, 05:53:00 am »
Oh ok... Thanks for (unneeded) technical info about NES. So how can I change slot used for coloring HUD to the one used by pipes and (separate problem) how to change palette loaded into this slot to "thank you mario" palette?

frantik

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #5 on: February 26, 2011, 12:45:34 pm »
Oh ok... Thanks for (unneeded) technical info about NES. So how can I change slot used for coloring HUD to the one used by pipes

simply find where the text and palette are set in the SMB disassembly and then change the corresponding hex values in the rom.  Here's an address to get you started: "TopStatusBarLine" which is at $8752 ( 0x0762 ).  You might need some technical information about the NES to fully understand what I said, but don't worry, it's good for you ;)

Quote
and (separate problem) how to change palette loaded into this slot to "thank you mario" palette?

the thank you mario palette is the same as the pipe palette by default but it's just the same as whatever the existing palette is (for instance if you put coins where the text will appear, the text will have the same coin color)

darkhog

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #6 on: February 26, 2011, 12:58:09 pm »
Quote
the thank you mario palette is the same as the pipe palette by default but it's just the same as whatever the existing palette is (for instance if you put coins where the text will appear, the text will have the same coin color)

You did not fully understand me. I want pipe's palette slot to change to grey thank you mario (from now on let's call it t.y.m.) so pipes, etc. will be grey, then I want to assign pipe's slot to HUD, so HUD will be also grey. Unfortunately this slot is assigned by game's program and I know I will need to fiddle a bit with this. For now I must be happy that at least I can make text green using first part of Your reply.

//edit: By the way - only I see that Toad in this game show "double F*** you" sign?

frantik

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
Re: Mario graphic & text hack - HUD pallette problem.
« Reply #7 on: February 26, 2011, 01:19:56 pm »
I want pipe's palette slot to change to grey thank you mario (from now on let's call it t.y.m.) so pipes, etc. will be grey

pipes are already grey (in the castles).  you can only have 4 background palettes loaded in the nes at any one time, so you can change the pipes to be green in the castles and then the thanks mario text will also be green

this tool will let you tweak the palettes: http://www.swiftlytilting.com/download.php?file=SMB.Graphics.Workshop.v0.3.0.rar