AuthorTopic: SNES Restrictions  (Read 10097 times)

Offline miascugh

  • 0010
  • *
  • Posts: 361
  • Karma: +0/-0
  • Schnitzelfiend
    • View Profile

Re: SNES Restrictions

Reply #10 on: October 13, 2006, 08:57:59 am
Uhm well, saying that he was having a "tough time" in the first place wasn't quite "honest and authentic" now, was it? Not that this post, or your post for that matter, was worth bringing it up again, enough going off-topic.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: SNES Restrictions

Reply #11 on: October 13, 2006, 09:05:43 am
the results of my search:

all sprites and tile DO have to be 16 colors

while the normal display mode allows 4,096 colors, however the full 32,768 colors can be accessed in another less common mode which canhave some sort of transparency and mixing of background layers
My source (emulator docs, either snes9x or zsnes) disagrees.
16 colors per sprite/tile; 256 colors onscreen at once, if you treat all layers as fully opaque with no blending.
In the overall 256 color palette, each color can be selected from a spectrum of 32768 colors (ie. 5bit r, 5bit g, 5bit b)
There is a hi-res mode that I haven't particularly researched; it doubles the vertical resolution if i recall correctly.
There *is* a direct color mode, as you mention; however it was very rarely used

Each layer can be set to draw normally, or using one of several blend modes:
Half Add (result = dest + (src / 2))
Full Add (result = dest + src)
Half sub (result = dest - (src / 2))
Full sub (result = dest - src)

I believe that blend modes can be applied individually to sprites, however I haven't verified this.

Blend modes do not require any specific screen mode AFAIK; it's just a property of the layer or sprite.

Because SNES used a tv, the 'hot' colors are not included in the color spectrum. This means that the 0..31 intensity range for each channel does not map directly to 0.255; The high end is chopped off, so the mapping is more like 0..248.
There is therefore a pure black but no pure white.

The intensity mapping I suggest looks like:
[0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248]
(grabbed quickly from a bit of my software)
Which makes it easy to enter or check in hex entry fields;; last digit of each component can only be 0 or 8.

Tiles and sprites are constrained to the usual power-of-2 sizes up to (64x64?)
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: SNES Restrictions

Reply #12 on: October 13, 2006, 07:23:02 pm
 it should be mentioned that an emulator, even a perfect emulator, is not an SNES, and like i said, ive never till now hear of more than the four thousand being available

that being said, you are most likely correct :P
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline Akira

  • 0010
  • *
  • Posts: 334
  • Karma: +0/-0
  • Heheheh
    • View Profile

Re: SNES Restrictions

Reply #13 on: October 13, 2006, 10:08:01 pm
Quote from: Wikipedia link=url=http://en.wikipedia.org/wiki/Snes#Technical_specifications
# Color Capability: 15-bit color depth (RGB555) for a total of 32,768 possible colors.

    * Palette: 256 entries
    * Maximum colors per background layer per scanline: 256
    * Maximum colors per sprite: 16 (color 0 is always transparent)
    * Maximum colors on-screen: 4,096 without blending and 32,768 using the color arithmetic circuitry for transparency effects by blending multiple backgrounds together.

# Resolution: between 256×224 and 512×448. Most games used common resolutions like 256×224, 256×240, 512×224 pixels. Interlace display mode is individually selectable for both the backround layers and sprites, but typically was only used for in-game menus, text boxes, and high resolution images.

    * A mode termed "pseudo high-resolution" was rarely used, but allowed for color blending between sets of two adjacent pixels. For example: Kirby's Dream Land 3 used this mode to blend dithered sprites.

# Maximum onscreen sprites: 128 (32 sprites per line, up to 34 8×8 character blocks per line).
# Maximum number of sprite pixels on one scanline: 272. The renderer was designed such that it could drop the pixels of the frontmost sprites instead of the rearmost sprites if a scanline exceeded the limit, allowing for creative clipping effects.
# Most common display modes:

    * Pixel-to-pixel Mode 1 comprised of three scrolling layers: two 16 color (4-bit) per tile layers and one 4 color (2-bit) layer
    * Per scanline affine mapped Mode 7 with 256 colors per tile and hardware assisted scaling and rotation
maximum colours on screen at once seems to be 4,096 though i don't know how you'd manage that with 256 pallete entries...
and if you want yer fancy 32,768 colours you need to blend multiple backgrounds together like adarias mentioned
thanks Dogmeat!

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: SNES Restrictions

Reply #14 on: October 15, 2006, 05:06:13 am
Additionally,
"" Maximum colors per background layer per scanline: 256"
"* Maximum colors on-screen: 4,096 without blending "

implies that you can change about 18.2 colors per scanline, though I can't imagine any practical application for this knowledge in sprite *making*.. In *programming* it would be more useful (I like raster effects)
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline hawken

  • 0010
  • *
  • Posts: 214
  • Karma: +0/-0
  • 8bit fantasy
    • hawkun
    • View Profile
    • my portfolio

Re: SNES Restrictions

Reply #15 on: October 16, 2006, 05:17:51 am
the 4096 mode is called "HAM". On the SNES it was hardly ever used, if anyone is aware of a game that uses it, please tell.

I used to make SNES games and I can confirm that the restrictions posted here are correct. Although often you will not be given 256 colours for making sprites, as you would want to keep more than half of the palette for other stuff (keeping the sprites' palette constant throughout).

so for example you may make 64 "base" colours for use throughout the game, another 128 from the on-screen restriction for custom background, foreground and special effect palette changes.  With the SNES, you can swap out any part of the palette at any time. So you may choose to keep another 32 colours for bad guys on one level, then use another set of 32 colours for other stuff or even swap that part out when you change levels.

not sure I was ever aware of the 16 colours per sprite, but I would hazard a guess that it's 16 colours per 8x8 pixel tile of a sprite. In all honesty I can't ever remember being given more than 16 colours to work with on any particular project anyway!
« Last Edit: October 16, 2006, 05:20:44 am by hawken »
twitter: https://twitter.com/hawkun
Pirate Pop Plus for 3DS, WiiU & Steam!