It is currently Mon Feb 18, 2019 1:07 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Feb 02, 2019 3:47 pm 
Offline
User avatar

Joined: Fri Sep 11, 2015 10:39 am
Posts: 136
I can't seem to find where I was reading it before, but I recall hearing that the genesis had some sort of additional option for its colors beyond just the 9-bit RGB color palette. Something about also having high and low or bright and dark or soemthing. I can't find where I read it, and wikipedia mentions it as "bright and shadow" modes.
What was this mode, and how did it work? It this actually adding an additional 1024 colors to the range, or were there special limitations on how they could be used?


Top
 Profile  
 
PostPosted: Sat Feb 02, 2019 3:54 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8136
Location: Seattle
When certain pixels are on top of each other (with complicated rules about exactly which pixels those are), the colors from the original R3G3B3 palette can be replaced with a version that is either "pastelized" or darkened.

It very approximately appears to be equivalent to averaging the original color with full-scale white or black. I don't know if the average is considered "digitally" exact, i.e. is the pastel version of <0,0,0> equivalent to <3,3,3>, <3.5,3.5,3.5>, <4,4,4> or something else?


Top
 Profile  
 
PostPosted: Sat Feb 02, 2019 4:05 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 905
Location: -29.794229 -55.795374
Maybe you're talking about shadow and highlight modes?


Top
 Profile  
 
PostPosted: Sat Feb 02, 2019 11:40 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 682
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
What you seek for is called Shadow/Highlight mode.

Code:
MD VDP DACs are interesting things with 17 possible output levels. Silicon
shots have revealed a sausage structure sitting between AVCC and AGND with
taps at various points over the length of it, each tap going to one of the
17 transistors that are controlled by 17 incoming logic signals.

Shadow/Highlight and SMS mode levels aren't generated in any analog trickery
as previously thought, they're just part of the predefined 17 levels.

N=Normal, S=Shadow, H=Highlight, s=SMS mode output
+-----+-------+------+------+
|  mV | Ratio | 8bit | NSHs |
+-----+-------+------+------+
|   0 | 0.000 |    0 | NS s |
| 108 | 0.113 |   29 |  S   |
| 192 | 0.202 |   52 | NS   |
| 261 | 0.274 |   70 |  S   |
| 324 | 0.341 |   87 | NS   |
| 368 | 0.387 |   99 |    s |
| 378 | 0.397 |  101 |  S   |
| 432 | 0.454 |  116 | NS   |
| 483 | 0.508 |  130 |  SH  |
| 537 | 0.565 |  144 | N H  |
| 588 | 0.618 |  158 |   H  |
| 604 | 0.634 |  162 |    s |
| 642 | 0.675 |  172 | N H  |
| 699 | 0.735 |  187 |   H  |
| 768 | 0.807 |  206 | N H  |
| 849 | 0.893 |  228 |   H  |
| 951 | 1.000 |  255 | N Hs |
+-----+-------+------+------+

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Tue Feb 05, 2019 6:46 pm 
Offline
User avatar

Joined: Fri Sep 11, 2015 10:39 am
Posts: 136
Okay, this looks like the mode I was talking about, so let me ask a couple questions about shadow/highlight mode that I have.

Was this performed per-pixel, or per-tile? (Or per-layer? Or per-palette or something?) ie, could you set it to operate on just one specific pixel, or do you set it to work on just one specific tile, etc. What is the smallest or most arbitrary unit you can apply this effect to?

Overlapping pixels keeps getting mentioned. Does the final color produced change depending on what is is overlapping, kind of like a transparency effect?

Any easy-to-reference examples of when this effect was used?


Top
 Profile  
 
PostPosted: Tue Feb 05, 2019 7:22 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8136
Location: Seattle
Marscaleb wrote:
Was this performed per-pixel, or per-tile? (Or per-layer? Or per-palette or something?) ie, could you set it to operate on just one specific pixel, or do you set it to work on just one specific tile, etc. What is the smallest or most arbitrary unit you can apply this effect to?
https://segaretro.org/Sega_Mega_Drive/S ... _highlight says that if Shadow/Highlight mode is enabled:
  • A tile on the foreground (plane A) with low priority is shadowed, with high priority it's normal.
    • Background (plane B) pixels are shadowed if the foreground is.
    • If a background tile has high priority, it will appear normal and on top of a low priority foreground tile.
    • Sprites are shadowed if the foreground is, unless their high priority bit is set, in which case they appear normal.
  • A pixel in a sprite using palette line 4, colour 15 will highlight the pixel beneath it (planes only).
    • If the pixel is shadowed by the first rule, it will appear normal.
  • A pixel in a sprite using palette line 4, colour 16 will shadow the pixel beneath it (planes only).
    • If the pixel is shadowed by the first rule, it will appear shadowed.
  • Sprites can't shadow/highlight other sprites. If sprite with a shadow/highlight pixel occludes another sprite, the plane will be visible through that pixel (with shadow/highlight applied).
  • Normal sprites can cover shadow/highlight sprites if they have a higher priority, as expected.
  • Pixels in sprites using colour 15 of palette lines 1, 2 or 3 will always appear normal. Possibly a bug.


So the most direct answer to your question is "some of all of the above"

Also, here's a thread where byuu was working on correctly emulating this mode

Quote:
Any easy-to-reference examples of when this effect was used?
Vectorman is cited as the canonical game that used shadow/hightlight to really push the number of simultaneous colors.


Top
 Profile  
 
PostPosted: Tue Feb 05, 2019 10:17 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11166
Location: Rio de Janeiro - Brazil
There's also Toy Story. The developer made a video explaining how he made the colorful images in the cutscenes of that game.


Top
 Profile  
 
PostPosted: Wed Feb 06, 2019 12:48 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 682
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Shadow/Highlight is controlled by tile priority (all low priority tiles get shadowed and anything underneath them) and specific sprite pixels. Sprite indexes 14 and 15 in last palette control if that pixel shadows or highlights an underlying pixel (Index 14 in sprites using other palettes are *always* showing normal pixels). There's also some priority between the pixels : shadowed+highlit pixel = normal pixel, all other cases produce expected result.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group