This is a set of patches updating the tildagon firmware to the latest ctx version, as well as making it use the callback mode - not for saving memory but speeding up applications where most content is static, like tetris and arc pong.
The value of gc.mem_free() was requested from mpremote just after launch, with at least for some of the values gc.collect() first.
Storing in IRAM has a bigger impact when it is the full framebuffer rather than just a scratch buffer - since there is less cache contention with a small scratch buffer.
things that didn't work/improve things:
| iram allocation | gc.mem_free() | menu idle at top | arc pong | wormhole | bubble | starfield | spinning cube | |
|---|---|---|---|---|---|---|---|---|
| the cases with drawlist - suffer from some edge handling in wormhole, and gradient offsets in matrix rain, the full-fb variants have no tearing though | ||||||||
| iram, new-ctx, drawlist, fullfb | 115200 | 1905520 | 18 | 17.7 | 5 | 15 | 9 | 16 |
| psram, new-ctx, drawlist, fullfb | 0 | 1774464 | 18 | 17 | 5 | 11.6 | 9 | 16 |
| the following setups have tearing visible in badgemon green transitions and wormhole | ||||||||
| iram, new-ctx, drawlist | 14400 | 1905424 | 18 | 17 | 4 | 15 | 10 | 16.5 |
| psram, new-ctx, drawlist | 0 | 1870544 | 18 | 17 | 4 | 14 | 10 | 16 |
| the ones below render all frames always, but have constant memory overhead | ||||||||
| iram, new-ctx | 115200 | 1903680 | 17 | 15 | 8 | 10 | 13 | 17 |
| iram | 115200 | 1936272 | 16.7 | 12.5 | 6.7 | 9.5 | 12 | 16.5 |
| psram, new-ctx | 0 | 1784768 | 14.5 | 11 | 7 | 8 | 11 | 16.7 |
| psram | 0 | 1807088 | 13.6 | 11 | 6.0 | 8 | 10.2 | 16.1 |