atmel-samd: enable picogame on PyBadge - #11430
Merged
Merged
Conversation
fontio is off when terminalio is off (the ja/ko/ru builds of boards that drop the terminal font), and picogame_canvas_text then fails to link.
Same shape as the raspberrypi backend: the first strip of a frame goes through the portable bus.send path (which sets the window), later strips are handed to shared_dma_transfer_start() on the display's SERCOM and the engine renders the next strip while the DMA drains the previous one. Strips over 65535 bytes (the DMAC transfer count) fall back to a blocking send. shared_dma_transfer_* carries the SAMD51 DMAC details a hand-rolled descriptor got wrong the first time: the "transfer never starts" errata kick, and draining the RX overflow left behind by a TX-only job (without that the next bus.send saw a stale SPI state and the board froze after a few frames). Measured on a PyBadge (SAMD51, 160x128 ST7735 at 24 MHz) with the picowing game: portable 55.2 fps, this backend 65.3 fps, +RGB444 82.3 fps. Cost +1604 B text with RGB444.
picogame with the DMA backend and RGB444 is 28356 B; the stock build has 5436 B free. Turn off bleio, frequencyio, i2ctarget, ps2io, pulseio and sdcardio, which are only reachable through the Feather header. Free after: 7716 B (en_US), 4840 B (fr), 10900 B (ja).
dhalbert
approved these changes
Sep 19, 2026
dhalbert
left a comment
Collaborator
There was a problem hiding this comment.
The newly turned-off modules look appropriate to me. I checked https://github.com/adafruit/Adafruit_Learning_System_Guides and don't see uses of those in existing projects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns on
picogamefor the PyBadge, with a SAMD DMA display backend and RGB444.picogame: Canvas.text raises NotImplementedError without fontio- the ja/ko/ru builds of this board turn off terminalio (and with it fontio);Canvas.textdid not link there.atmel-samd: picogame fast Display backend on the SERCOM SPI DMA- third implementation of the port contract next to raspberrypi and espressif. The engine composes the next strip while the DMA sends the previous one. +1604 B text together with RGB444.atmel-samd: enable picogame on pybadge.Measured on PyBadge (160x128 ST7735 at 24 MHz), picowing-class load, uncapped:
bus.sendFlash: picogame with the backend and RGB444 is 28356 B; the stock PyBadge has 5436 B free. The commit turns off following - they all are reachable through the Feather header only:
Free after: 7716 B (en_US), 4840 B (fr), 10900 B (ja). If more room is needed later there are possible candidates: