Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SMS Graphics/Palette questions

Reply to topic
Author Message
  • Joined: 23 May 2017
  • Posts: 3
Reply with quote
SMS Graphics/Palette questions
Post Posted: Tue Apr 23, 2019 8:26 pm
I am developing a game (on modern hardware) meant to simulate the limitations of the SMS as perfectly as possible, so I have a question I hope someone can clarify regarding palettes.

I know there are two 16-color palettes, generally one reserved for sprites and another for background tiles.

I've heard it is possible to draw tiles or sprites with the opposite palette as well, but I was hoping someone could clarify whether this is so or if there are limitations. (my current understanding is that you can draw tiles with the sprite palette, but not sprites with the tile palette, is this correct?)

Also, can the 0 color (which represents transparency in sprites) in these palettes be different? In other words, say I need tiles that occlude a character sprite, and of course if you've drawn them this way, the 0 color would remain behind the sprite. If the 0 color was different for sprites and they were drawn to occlude sprites, and I have drawn a tile using the sprite palette, could that 0 color that is drawn behind the sprites be different? Or do these colors have to be the same?

I hope that makes sense. If anyone can clear up this confusion it would be greatly appreciated.
  View user's profile Send private message
  • Joined: 08 Sep 2018
  • Posts: 147
Reply with quote
Post Posted: Tue Apr 23, 2019 10:49 pm
Color 0 on both pallets are considered the cutout mask and background color depending on if the use is for a tile or sprite. Palettes just effect objects depending on where they are in vram (i think the first quarter of vram is palette 1 and the second quarter is palette 2), Ive called tiles form the sprite palette before as well as sprites from the tile palette. This helps add variation to tiles and to sprites. This is a popular trick to try and push more colors on screen than is commonly possible.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12823
  • Location: London
Reply with quote
Post Posted: Wed Apr 24, 2019 1:42 am
You can't have sprites using the background palette. Colour 0 can be any colour in either palette, it will never be drawn for sprites and if using foreground tiles for the background it will be drawn behind sprites while every other index is in front.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2470
Reply with quote
Post Posted: Thu May 02, 2019 9:01 pm
as said, background tiles can either use palette 0 or palette 1, sprites instead will only use palette 1, and will never draw pixels using the color 0 (so in that sense this color is unused - but by sprites only!)
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!