This article does not have any sources. (February 2014)
In computing, chr is a type of file format commonly used for graphics (i.e. 3D Max Characters and Homebrew NES Dev Graphics) and character sets.
chr Files In NES Dev[change | change source]
Usage[change | change source]
chr files are used to draw 8x8 tiles for homebrew NES development. To draw graphics for the NES such as backgrounds or sprites, they must be pieced together using 8x8 pixel tiles constrained to 4 colors.
Contents[change | change source]
The contents of a chr file can be summed up as multiple lines of bit strings. For example, take the first line of the chr file for the game Super Mario Bros.
When reading the file, it is interpreted as 2 equal length bit strings, such as
String 1 = 0000000000110000111100011111000100000000111100011100001001000010011001100110 String 2 = 0000000000000000000000000000000000000000000000011111001111110011111101111111
The position of these 2 bit strings represent a pixel in an 8x8 tile, going in row-column order. The color of the pixel can be found out using a simple formula:
|String 1 bit||String 2 bit||Color|
The color is irrelevant because it is chosen through the code by the programmer with the attribute table, so it is the bit combination that is significant and there is no storage of color values