![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
The converters the Benchmark example measures, the flush's chunk buffers as scratch memory, and the frame size. More...
Functions | |
| uint32_t | gfx_convertRows_ram (uint8_t *dst, uint16_t row, uint16_t rows) |
| Converts framebuffer rows into the panel's format, with the converter in SRAM. | |
| uint32_t | gfx_convertRows_flash (uint8_t *dst, uint16_t row, uint16_t rows) |
| Converts framebuffer rows into the panel's format, with the converter in flash (for comparison with gfx_convertRows_ram()). | |
| uint32_t | gfx_convertSpan_ram (uint8_t *dst, const uint8_t *src, uint32_t srcBytes) |
| Converts a run of framebuffer bytes into the panel's format (the SRAM converter every flush uses). | |
| uint8_t * | gfx_chunkScratch (void) |
| 1 KB of word-aligned scratch memory: the flush's chunk buffers. | |
| uint32_t | gfx_frameBytes (void) |
| Bytes the panel receives for a full frame in the current mode. | |
The converters the Benchmark example measures, the flush's chunk buffers as scratch memory, and the frame size.
| uint32_t gfx_convertRows_ram | ( | uint8_t * | dst, |
| uint16_t | row, | ||
| uint16_t | rows | ||
| ) |
Converts framebuffer rows into the panel's format, with the converter in SRAM.
_ram lives in SRAM, _flash lives in flash. Benchmarking both is how you measure the 3-wait-state penalty.
| dst | Where the panel-format bytes go. |
| row | First framebuffer row. |
| rows | How many rows. |
dst. | uint32_t gfx_convertRows_flash | ( | uint8_t * | dst, |
| uint16_t | row, | ||
| uint16_t | rows | ||
| ) |
Converts framebuffer rows into the panel's format, with the converter in flash (for comparison with gfx_convertRows_ram()).
| dst | Where the panel-format bytes go. |
| row | First framebuffer row. |
| rows | How many rows. |
dst. | uint32_t gfx_convertSpan_ram | ( | uint8_t * | dst, |
| const uint8_t * | src, | ||
| uint32_t | srcBytes | ||
| ) |
Converts a run of framebuffer bytes into the panel's format (the SRAM converter every flush uses).
| dst | Where the panel-format bytes go. |
| src | 4 bpp source bytes, two pixels each. |
| srcBytes | How many source bytes. |
dst. | uint8_t * gfx_chunkScratch | ( | void | ) |
1 KB of word-aligned scratch memory: the flush's chunk buffers.
2 * GFX_CHUNK_BYTES, idle from gfx_wait() until the next flush starts. Handy for decoding, masks, building a flash page, an SD card block - never across a flush. gfx_sprite4Rot() and gfx_textFx() use it, so it does not survive them either.
| uint32_t gfx_frameBytes | ( | void | ) |
Bytes the panel receives for a full frame in the current mode.