The code to process .chr files is very messy. Mostly because I was fumbling trying to compute how many pixels I needed to jump for plotting a color and how many bites I needed to jump for reading data.
Kinda makes me wish uxn packed pixels using a simple "4-pixels per byte" scheme instead of a "two-channels per tile" format. Both pack the same information in the same space (2-bits per pixel), but 4-pixels per byte is easier to process, imo.
The pattern table is an area of memory connected to the PPU that defines the shapes of tiles that make up backgrounds and sprites. This data is also known as CHR, and the memory attached to the PPU which contains it may either be CHR-ROM or CHR-RAM.
@neauoire I assumed there was some relationship with your past work in the Famicom. However, I don't quite understand the layering advantage? Is it faster to do since the bits for each channel are separated?
(I don't have much historic context for .chr formats and the Famicom)
For example in Oquonie, I have the outline and fill for player assets as chr tiles, if I want to make the fill color of the character blink, I can draw only the second half of the chr tile for just repainting the fill, or both at once.
Capital
in reply to Capital • • •The code to process .chr files is very messy. Mostly because I was fumbling trying to compute how many pixels I needed to jump for plotting a color and how many bites I needed to jump for reading data.
Kinda makes me wish uxn packed pixels using a simple "4-pixels per byte" scheme instead of a "two-channels per tile" format. Both pack the same information in the same space (2-bits per pixel), but 4-pixels per byte is easier to process, imo.
Devine Lu Linvega
in reply to Capital • • •https://www.nesdev.org/wiki/PPU_pattern_tables
PPU pattern tables
NESdev WikiCapital
in reply to Devine Lu Linvega • • •@neauoire I assumed there was some relationship with your past work in the Famicom. However, I don't quite understand the layering advantage? Is it faster to do since the bits for each channel are separated?
(I don't have much historic context for .chr formats and the Famicom)
Devine Lu Linvega
in reply to Capital • • •mx alex tax1a - 2020 (4)
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to mx alex tax1a - 2020 (4) • • •method of representing pixel colors with several bitplanes of RAM
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)Capital
in reply to Devine Lu Linvega • • •