Colour palettes - Falmouth-Games-Academy/comp310-wiki GitHub Wiki

Abstract

The NES has a range of 64 pre-set colours of which 56 are unique (see figure 1). However, it is unable to show all of these at once.

Introduction

There seem to be varying opinions as to how many it can show at once. This video 1(https://www.youtube.com/watch?v=ar9WRwCiSr0&t=283s) says that it can only show 13 in the form of 4 colour palettes. Only a palette's worth of colour can be shown in each 16*16 pixel square. This site 3(http://www.thealmightyguru.com/Games/Hacking/Wiki/index.php/NES_Palette) says that the NES can show 25 separate colours on the screen at one time. To clear this up, 25 colours can be shown at once, 13 background colours (which source 1(https://www.youtube.com/watch?v=ar9WRwCiSr0&t=283s) was referring to) and 12 sprite colours. (which make up the 25 mentioned in 3(http://www.thealmightyguru.com/Games/Hacking/Wiki/index.php/NES_Palette)) 48 of the colours are the same 12 hues with 4 different brightness values, the other unique colours are mostly different shades of grey, black and white. 9(https://forums.nesdev.com/viewtopic.php?f=2&t=11128) This source also explains why there are multiple blacks.

NES colour palet

Figure 1 [5]

Yellow

In the colour pallet you may notice the lack of a ‘good’ yellow, this is because of how the colours are generated. A source suggests 8(https://www.quora.com/Why-in-the-NES-palette-of-64-colors-wasnt-a-good-yellow-included) that a colour wheel has been used to pick the colours. Between each colour it is equal rotation around the wheel and because of the small number of storage available yellow has been jumped over. It seems odd that they haven't changed the method to include a yellow, instead they have included other colours that probably aren't as popular. The reasoning behind this is to do with how the colours are generated using square waves of different frequencies meaning that hardware limitations have prevented yellow being included. 9(https://forums.nesdev.com/viewtopic.php?f=2&t=11128)

Picture Processing Unit

Picture Processing Unit also referred to as the PPU or NES PPU was created to work on Cathode Ray Tube (CRT) TVs in the 1980s. The PPU like TVs at that time drew the pixels onto the screens starting at the bottom from left to right in rows for each frame.

Raster effects are changes to the PPU whilst the screen is rendering such as keeping a HUD on screen while the rest of the screen changes. Usually, all the PPU memory is used during rendering while the CPU runs the code for the game6(http://www.dustmop.io/blog/2015/12/18/nes-graphics-part-3/).

Palette Restrictions

As shown in Figure 1 5(http://www.thealmightyguru.com/Games/Hacking/Wiki/images/e/e8/Palette_NTSC.png) the colour palette is quite limited, this meant that NES designers relied more on cool tones, which is why there are lots of NES games with more blues and greens 7(https://megacatstudios.com/blogs/press/creating-nes-graphics). The colour palette has no real yellow which is why you never see it in any games. However as seen in the picture of the palette there are far too many shades of black/dark colours that all look alike. The NES always loads eight palettes on the screen, four are for the backgrounds and four for the sprites. The palettes are loaded on a per-screen basis and cannot change unless you move to a new area to allow the NES graphics processor time to refresh and load new palettes. This is why, for example, in Super Mario Bros the colours only change when you go to the next level.

References