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

Author Topic: Cant find smb3 palette  (Read 5392 times)

Hypnotic_rabbit

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Re: Cant find smb3 palette
« Reply #20 on: September 22, 2015, 09:27:52 pm »
Well thats interesting and i understand what you are saying pretty good but like iv been trying to explain, for the purpose that i am using thos FFs for they represent the transparent color. What the nes or an emu do with them is really irrelevant to my cause. When reading the data into my prog the ffs are the data that i have to work with(treating it like the transparent), and when i write them back to the rom they have to be ffs or else an emu wont know too get rid of them lol. I appreciate the info none the less... it might come in handy one day.

September 23, 2015, 01:04:29 am - (Auto Merged - Double Posts are not allowed before 7 days.)
but if you want to trace something down id love to know where it tells which levels use which palettes so i dont have to do it by hand lol that would be great
« Last Edit: September 23, 2015, 01:04:29 am by Hypnotic_rabbit »

Disch

  • Hero Member
  • *****
  • Posts: 2725
  • NES Junkie
    • View Profile
Re: Cant find smb3 palette
« Reply #21 on: September 23, 2015, 02:58:16 am »
like iv been trying to explain, for the purpose that i am using thos FFs for they represent the transparent color. What the nes or an emu do with them is really irrelevant to my cause.

I'd argue that this is the wrong approach, because $FF is actually black, not transparent.  There is no value to indicate transparency.  The position in the palette is what determines transparency.  $3F00, $3F04, $3F08, etc are always transparent.  It doesn't matter what value is written there.

You seem to be under the false impression that there's a specific color that is transparent.  There isn't.  That's simply not how NES graphics work.

Quote
When reading the data into my prog the ffs are the data that i have to work with(treating it like the transparent)

This will be problematic if someone uses $FF for black in their palette.  Your editor will render the graphics improperly.

Quote
and when i write them back to the rom they have to be ffs or else an emu wont know too get rid of them

Not true.  They're padding.  They only exist to pad out the palettes so that there are 4 entries instead of 3.  The values literally do not matter at all because they are completely unused by the game.  You could replace them with any value and you will see no visible difference in-game.

Hypnotic_rabbit

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Re: Cant find smb3 palette
« Reply #22 on: September 23, 2015, 03:41:23 am »
I dunno how we got so mixed up here lol but im aware that the positions define them and im also aware that ff is black as in $FFFFFF and not transparent and i know they are just "placeholders" for the transparent. I also know there is no hex color for transparent, Im just using FF because its already there. The editor wont allow for editing the first value only the other three so there is no chance a user can mess it up,  like you say the positions are the important part which of course ill code it to always put the FFs in the first position to make the 4 bytes. I understand what you mean by they are just padding and can be anything but it just makes it easier to use the value thats already used in the rom to represent the transparent. Somehow we got mixed up but i assure you we are on the same page lol. The only thing you really explained  that was helpful was that they can be anything because i was under the impression that what ever the game uses in that position to represent the transparent was important some how but when i think about its its totally not lol. Anyway any chance you can track down where the disassembly tells which palette goes with which levels for me? Iv looked and looked but i cant find much, only that they are givin index numbers and then called using that index number when needed. Where that is i dunno. I think i found where the background palettes are called but the sprite palettes i have no idea.

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Cant find smb3 palette
« Reply #23 on: September 23, 2015, 05:08:41 am »
Is it possible the game uses #FF as a "stop" coda? I've seen that a lot when it comes to data intended to be fed to the PPU Beast, especially in Miyamoto games.

Disch

  • Hero Member
  • *****
  • Posts: 2725
  • NES Junkie
    • View Profile
Re: Cant find smb3 palette
« Reply #24 on: September 23, 2015, 10:55:56 am »
im aware that the positions define them and im also aware that ff is black as in $FFFFFF

It's actually black because it's a mirror of $3F, and $3F is black in the NES palette:




But whatever.  It doesn't matter.  I'm probably being way more technical than I need to be.  As long as you understand the concept I should just keep my mouth shut.   ;D

Quote
Anyway any chance you can track down where the disassembly tells which palette goes with which levels for me?

Nope.  I do legwork when I'm curious about things or am otherwise in the mood.  I have no interest in digging up that code right now, so you're on your own.

Is it possible the game uses #FF as a "stop" coda? I've seen that a lot when it comes to data intended to be fed to the PPU Beast, especially in Miyamoto games.

Doesn't look like it.  The game seems to copy a whole block of $10 bytes to memory when loading the palettes, then goes back and overwrites the FFs with the backdrop color.  The value of FF itself seems to play absolutely no role.

Hypnotic_rabbit

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Re: Cant find smb3 palette
« Reply #25 on: September 23, 2015, 12:15:27 pm »
ahh you are right again the nes dont use rgb so ff is not really black i totally forgot about that lol. as for what palettes go with which levels i guess ill just have to track it down or do it  one by one, which would suck because levels like 1-5 use two bgs and two sprite palettes. Two for the main level and two for when you pop out of the pipe at the end, there is goes back to using 1-1 1-3 palettes. If you ever played the game you know it does that kind of shit all the way though. Im using two game genie codes to let me pick worlds and skip levels that help but its still a pain lol. But i appreciate the technical explanations for everything, the more info i got the better... thanks.

Disch

  • Hero Member
  • *****
  • Posts: 2725
  • NES Junkie
    • View Profile
Re: Cant find smb3 palette
« Reply #26 on: September 23, 2015, 12:35:15 pm »
ahh you are right again the nes dont use rgb so ff is not really black

But $FF is black because it's a mirror of $3F... and $3F is black (see above table)

besides... $FFFFFF in RGB would be white, not black.  $000000 would be black.

 ;)

Hypnotic_rabbit

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Re: Cant find smb3 palette
« Reply #27 on: September 23, 2015, 03:17:59 pm »
lol dammit,  You are right again,but i understand the mirroring concept and i have always got FFFFFF and 000000 mixed up.

September 23, 2015, 11:47:44 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
And for anyone reading this that's looking for the same thing i am iv done the legwork that disch didnt want to do lol, because i know how it is when you are looking for something and a thread never gets to the conclusion

palettes are in prg027.asm

which levels use which palettes are in \smb3-southbird-disassembly-2012\bin\SMB3\PRG\levels

example:

 1-1
(\smb3-southbird-disassembly-2012\bin\SMB3\PRG\levels\Plains\1-1.asm) <--level data

1-1 end pipe you have to fly up to

\smb3-southbird-disassembly-2012\bin\SMB3\PRG\levels\Plains\1-1Bonus.asm <--- end pipe that uses different palettes

LEVEL2_BGPAL_00 - 00 being the index for bg palettes in prg027.asm

LEVEL2_OBJPAL_08 - 08 being the index for the sprite palettes in prg027.asm

This explains  their level palettes and respective bonus pipes but as for levels like 1-5 and how it uses different palettes for the main level and different ones at the end, i dunno yet lol
« Last Edit: September 23, 2015, 11:47:44 pm by Hypnotic_rabbit »