Color palette (Generations I–II): Difference between revisions

m
Line 7: Line 7:
[[File:Game Boy DMG-01 Pokémon Red.jpg|thumb|right|200px|Pokémon Red on the Game Boy (DMG-01 model)]]
[[File:Game Boy DMG-01 Pokémon Red.jpg|thumb|right|200px|Pokémon Red on the Game Boy (DMG-01 model)]]
The original Game Boy plays games in monochrome coloring (either in grayscale, or using a set of tones of the same color).
The original Game Boy plays games in monochrome coloring (either in grayscale, or using a set of tones of the same color).


The Game Boy's color values are stored as 1 of 4 tones (2 bits), which are then used to display the entire game. The system also provides three palettes of tones. One tone palette is used by the tiled layers, and the other two tone palettes are used by all sprite objects. Each palette holds 4 entires of tones, where it is possible for each entry to be a unique tone, or the same tone (with 1 to 4 tones displayed at any given time).
The Game Boy's color values are stored as 1 of 4 tones (2 bits), which are then used to display the entire game. The system also provides three palettes of tones. One tone palette is used by the tiled layers, and the other two tone palettes are used by all sprite objects. Each palette holds 4 entires of tones, where it is possible for each entry to be a unique tone, or the same tone (with 1 to 4 tones displayed at any given time).


While all four tones in the background palette are displayed on screen, only three tones from each sprite palette can be displayed at once, due to their 'index 0' being mapped to transparency.
While all four tones in the background palette are displayed on screen, only three tones from each sprite palette can be displayed at once, due to their 'index 0' being mapped to transparency.
* This transparency is what allows sprites to properly display in front of (or behind) backgrounds.
* This transparency is what allows sprites to properly display in front of (or behind) backgrounds.


The system provides for two tiled layers - a moveable background, and a static "window" that can be overlayed on top. Both layers use the same background tone palette.
The system provides for two tiled layers - a moveable background, and a static "window" that can be overlayed on top. Both layers use the same background tone palette.


The {{wp|Raster_interrupt|horizontal interrupt}} programming technique was used to change a tone palette dynamically, during the middle of the screen being drawn on a given frame.
The {{wp|Raster_interrupt|horizontal interrupt}} programming technique was used to change a tone palette dynamically, during the middle of the screen being drawn on a given frame.
* This allowed the same background to display what appears to be more than one tone palette in use at the same time, which was more commonly used in the Generation II games.
* This allowed the same background to display what appears to be more than one tone palette in use at the same time, which was more commonly used in the Generation II games.
* This is the same programming technique responsible for the scrolling effects when trainer battles or wild encounters are begun.
* This is the same programming technique responsible for the scrolling effects when trainer battles or wild encounters are begun.


Regardless of the tone palettes and their tone entires, only 4 colors could ever be present on the screen of a Game Boy at any given time.
Regardless of the tone palettes and their tone entires, only 4 colors could ever be present on the screen of a Game Boy at any given time.
Line 28: Line 23:
* The Game Boy Pocket (MGB-001) features these 4 monochromatic  colors: black, dark gray, light gray, and white.
* The Game Boy Pocket (MGB-001) features these 4 monochromatic  colors: black, dark gray, light gray, and white.
* The Japan-only Game Boy Light (MGB-101) features these 4 monochromatic colors: black, dark cyan, cyan, and light cyan.
* The Japan-only Game Boy Light (MGB-101) features these 4 monochromatic colors: black, dark cyan, cyan, and light cyan.


Compatible games:
Compatible games: