Program Rendering Chip Overview
Since the Pokemon Mini does not drive a conventional display, it does not operate like typical display driver. The PRC was created as a method for driving a serial LCD display. It's entire purpose is to blit images from various locations in memory to an internal frame buffer, and then force it out to GDRAM in on the LCD Controller. This is all done transparently.
The PRC operates by monitering a display counter, which overflows aproximately 66 times a second. When the counter reaches specific values, the PRC triggers various components. It can operates in 3 stages, Map render, Sprite Render and Frame Copy. The values which the counters trigger on have not been determined.
During these various stages, the CPU is halted, and yields the bus to the PRC. Depending on the enabled stages, the PRC will read various locations from memory (cartridge and ram) and build a frame buffer to $1000 ~ $12FF. Depending on the complexity of the scene, and the enabled modes, developers lose varying amounts of processor time.
Since all three display stages can be enabled or disabled independantly, users can perform a number of tricks such as multiplexing sprites (by disabling frame copy on even frames, and map copy on odd frames, changing the sprites each time), running in a pure frame-buffered mode, or simply use the LCD controller manually by disabling the VPU all together.
The PRC shares ram with the CPU, so the more modes that are enabled, the less ram is usable by the developer.
Map Rendering Stage
Stage 1 of the PRC is a map renderer. This stage can render a variable size 8x8 tile based map to the frame buffer (located at $1000). This mode operates by using a 24bit address (PRC_MAP_*) as the base for the tile set, and a tile map located at $1360.
|0||12 x 16|
|1||16 x 12|
|2||24 x 8|
|3||24 x 16|
Tile maps are arranged in left to right order, wrapping around to the next line.