Releases: pimoroni/picosystem
Version 1.0.0 - MicroPython 1.23.0
To say a lot has changed in MicroPython since PicoSystem v0.1.3 might be something of an understatement. It's been almost two years and MicroPython has seen over 2.3k commits.
What does this mean for PicoSystem? Not actually all that much in practice, but it's given us the opportunity to undo a lot of hacks and make PicoSystem a lot easier to build and maintain. We've also made it better and hopefully more stable. The vast majority of changes to this end were made in #104 and include:
- Bump to MicroPython v1.23.0
- No longer based upon a downstream hack of MicroPython, PicoSystem is now just a regular C/C++ module
- boot.py now imports picosystem and makes all of its methods globally available by adding them to
builtins
- We now use
MICROPY_BOARD_DIR
and have a local board definition for PicoSystem, makes full 15MB (16MB - 1MB firmware) available - Many small tweaks to avoid heap usage and increase stability
- Fixes to
init()
so you can call it twice, thrice, many times without it exploding - Added the C++ memory shim module, catches any rogue C++ allocations and redirects them to MicroPython's heap
- Display buffer is now allocated in C, MicroPython automatically takes up any free RAM for its heap
- "with examples" builds now use a pruned LittleFS filesystem, so you can flash them with a 2.2MB .uf2 rather than a 32MB .uf2 😱
- Many quality of life and CI tweaks to bring PicoSystem up to date and make it easier to maintain
What's Changed
- Buffer fixes by @ahnlak in #87
#include <array>
explicitly in examples which need it by @joewreschnig in #93- Fix error message for backlight() by @menehune23 in #98
- Fix typo by @J-J-B-J in #89
- Tick once, not twice, per game loop by @joewreschnig in #92
- MicroPython 1.23.0 by @Gadgetoid in #104
New Contributors
- @joewreschnig made their first contribution in #93
- @menehune23 made their first contribution in #98
- @J-J-B-J made their first contribution in #89
Full Changelog: v0.1.3...v1.0.0
MicroPython Changelog: micropython/micropython@v1.19...v1.23.0
Version 0.1.3
Notable Changes
PicoSystem has switched from MicroPython 1.18 to MicroPython 1.19. There are many changes that may or may not affect us, and you can read about them here: https://github.com/micropython/micropython/releases/tag/v1.19
The MicroPython API's Buffer
has been updated to support loading a file directly. This makes it much tidier and closer to the C++ API.
We've gone from:
WALLS = Buffer(160, 160)
open("gadgetoid-raycaster.16bpp", "rb").readinto(WALLS)
To the succinct:
WALLS = Buffer(160, 160, "gadgetoid-raycaster.16bpp")
Filename is optional, so the old approach will still work and you can update your code (or not) at your leisure!
That is, uh, pretty much it for now! No sense messing with perfection. 😆
What's Changed
- reset drawing state each time around the game loop by @lowfatcode in #66
- Fixed small grammar/spelling error by @CatRass in #69
- made blending more accurate, around 24 cycles per pixel now, fixed te… by @lowfatcode in #70
- Added (back) the missing playing() function by @ahnlak in #73
- make instructions more explicit by @splch in #72
- MicroPython: Textured raycaster example. by @Gadgetoid in #47
- Custom linker script for #54 by @Gadgetoid in #55
- removing syntax error by @prashantkamdar in #76
- Update MicroPython build instructions by @Gadgetoid in #78
- Updated micropython README to add info about sprite and text functions, along with a typo fix. by @ThePythonator in #81
- Bump to MicroPython v1.19 by @Gadgetoid in #80
- Buffer: Add support for loading spritesheet directly. by @Gadgetoid in #82
New Contributors
- @CatRass made their first contribution in #69
- @splch made their first contribution in #72
- @prashantkamdar made their first contribution in #76
- @ThePythonator made their first contribution in #81
Full Changelog: v0.1.2...v0.1.3
Version 0.1.2
Notable Changes
The MicroPython port now benefits from some fixes to drawing rectangles, and a fix to #46
In the C++ APIaudio_position
is now position
and audio_playing
is now playing
.
All The Things
- Improve text demo, clamp hue in hsv() utility function by @lowfatcode in #59
- Typo fix by @codepope in #60
- Circle fix by @lowfatcode in #62
- Tidy API by @lowfatcode in #64
- Tidy audio API by @lowfatcode in #63
- Fixed an infinite loop when text off screen and fixed word wrap bug by @lowfatcode in #65
New Contributors
Full Changelog: v0.1.1...v0.1.2
Version 0.1.1
Notable Changes
Added all of the SDK blend modes into MicroPython: COPY, ALPHA, MASK, PEN, DARKEN, LIGHTEN, ADD, SUBTRACT, MULTIPLY, DISSOLVE. Enjoy!
Add HFLIP and VFLIP flags to sprite
and blit
.
To flip a sprite you need to specify all eight arguments, eg:
sprite(0, 0, 0, 1, 1, 8, 8, HFLIP | VFLIP)
The above blits a single sprite, 0, in the top-left corner.
The PicoSystem MicroPython release has been configured to apply a 1.20v overvolt. This should make the 250MHz overclock more stable on marginal RP2040s.
All The Things
- better default font. tidied up text demo by @lowfatcode in #43
- added pen blend mode by @lowfatcode in #44
- added new blend modes include multiply, add, subtract, dissolve, etc.… by @lowfatcode in #45
- Attempt at naming the remaining sprites by @Fordi in #23
- added vertical and horizontal flip flags to blit() by @lowfatcode in #48
- switch blend demo to use default spritesheet by @lowfatcode in #49
- added better demo of different text styling effects by @lowfatcode in #50
- made text effects into parameterised lambda functions to allow easy a… by @lowfatcode in #51
- Added audio_playing() function by @ahnlak in #53
- SDK: Overvolt from 1.1v to 1.2v by @Gadgetoid in #57
- C++ API: Round 2 - Sprite naming with creator input by @Fordi in #52
- added new glitch effect by @lowfatcode in #56
- MicroPython: Blend modes and sprite/blit HFLIP/VFLIP flags by @Gadgetoid in #58
New Contributors
Full Changelog: v0.1.0...v0.1.1
Version 0.1.0
New MicroPython Goodies
This release includes three new demos ported over from C++: Text, Music and Audio.
These demos are a little rough around the edges, but you can find them in the launcher by holding "A" during boot.
🥳 You can now use "\spr001" to inline sprites in your text, eg: f"\\spr{LEAF:007} woo a leaf!"
🤔 No more Alpha? Bumped version to 0.1.0 to indicate that we (hopefully) shouldn't make any more breaking API changes
- The argument limit of
blit()
has been fixed so you can specify destination width/height for stretch blit. - Error text generated by our bindings will always include the offending function name. Eg:
pen(): a out of range. Expected 0 to 15
- Miscellaneous bugfixes.
- Documentation: https://github.com/pimoroni/picosystem/tree/main/micropython
- A Python file of strongly-typed stub functions you can use to code against: https://github.com/pimoroni/picosystem/blob/main/micropython/picosystem.py
flip()
now also updates input. Here's a working, if terrible, rock-paper-scissors that fits in a tweet (inspired by Kari):
import random
p=pressed
b='RPS'
t=text
s=l=0
pen(0,0,0);clear();pen();t("RPS=YBA",0,0)
while p(X)^1 and l<13:
flip()
for f in 0,1,2:
if p((Y,B,A)[f]):e=random.randint(0,2);s+=(0,1,-1)[f-e];t(f"{b[f]}v{b[e]}=\\pen{('00FFD','0F0FW','F00FL')[f-e]}\\penFFFF s={s}");l+=1
t("Bye")
What's Changed
- New text demo and bug fixes by @lowfatcode in #36
- text() now supports inline icons by @lowfatcode in #41
- MicroPython: Include function name in errors. IO in flip() by @Gadgetoid in #40
- MicroPython: Stubs & docstrings for VSCode by @Gadgetoid in #35
- MicroPython: Readme. by @Gadgetoid in #21
- Port Text example to MicroPython and fix blit() by @Gadgetoid in #42
Full Changelog: v0.0.7...v0.1.0
Version 0.0.7 - Alpha
What's Changed
text_length
has been replaced by measure()
in both C++ and MicroPython.
_reset()
and tick()
have been removed from MicroPython.
C++
- New text API
text_length
replaced withmeasure(text, &w, &h)
- Text can optionally set pen colour while displaying, use escape sequences
\rgbXXX
and\rgbaXXXX
in your string to set the colour.
MicroPython
- All "state" API functions now reset to default when called with 0 args
- Removed
_reset()
andtick()
in favour ofquit()
andstart()
. To implement your own main loop useflip()
maybe? - Added
flip()
for flipping REPL experiments to the screen. - New
help()
text. - General tidyup of bindings.
- Text can optionally set pen colour, use escape sequences
\\rgbXXX
and\\rgbaXXXX
to set the colour.pen(0xF, 0xF, 0xF) text("I can make a word \\rgbF00red\\rgbFFF just like that!")
Full Changelog: v0.0.6...v0.0.7
Version 0.0.6 - Alpha
What's Changed
This release is the same as v0.0.5 with one small fix- the display buffers have been aligned to avoid a 1-pixel offset in MicroPython. (Previously m_new
was guaranteeing uint32_t alignment)
Fixed in v0.0.6
- SDK: Force memory aligned display buffers. by @Gadgetoid in #33
New MicroPython API changes
- start() - enters a blocking main loop, calls MICROPY_EVENT_POLL_HOOK to keep subsystems running
- quit() - signals
start()
to break - Add
start()
to examples in place ofwhile True: tick()
- Fix launcher crashing when buttons pressed during startup
- Add "quit" menu item to launcher, to unblock for Thonny
- Reset "tick" on "quit" so applications launched from the launcher don't start at weird tick offsets
start()
enters a blocking main loop that dispatches update/draw calls to the Python functions.
When quit()
is called, start()
will drop out of the loop, clean up the cached update/draw pointers and reset "tick".
Your scripts should now look like this:
def update(tick):
pass
def draw(tick):
pass
start()
# You can put stuff here that runs after you `quit()`
tick()
and _reset()
are included for posterity, but these may both be deprecated since _reset()
happens implicitly when quit()
is called.
Stats & GC
- Fix calculation of "tick" us stats
- Above also fixes FPS counter
- Fix tick being double-incremented, and fix launcher to account for this
- Run the C equivalent of
gc.collect()
in the main loop - Try and sleep the is_flipping() loop a little... my PicoSystem is getting mighty warm!
OC/Buffer
- Overclock early to avoid an on-init change of clock doing bad things
- Give the
SCREEN
buffer back to C exclusively, MPY reduces thegc_heap
to accommodate this change - see: pimoroni/micropython@f826b9e
Full Changelog 0.0.5: v0.0.4...v0.0.5
Full Changelog 0.0.6: v0.0.5...v0.0.6
v0.0.5
What's Changed
New MicroPython API changes
- start() - enters a blocking main loop, calls MICROPY_EVENT_POLL_HOOK to keep subsystems running
- quit() - signals
start()
to break - Add
start()
to examples in place ofwhile True: tick()
- Fix launcher crashing when buttons pressed during startup
- Add "quit" menu item to launcher, to unblock for Thonny
- Reset "tick" on "quit" so applications launched from the launcher don't start at weird tick offsets
start()
enters a blocking main loop that dispatches update/draw calls to the Python functions.
When quit()
is called, start()
will drop out of the loop, clean up the cached update/draw pointers and reset "tick".
Your scripts should now look like this:
def update(tick):
pass
def draw(tick):
pass
start()
# You can put stuff here that runs after you `quit()`
tick()
and _reset()
are included for posterity, but these may both be deprecated since _reset()
happens implicitly when quit()
is called.
Stats & GC
- Fix calculation of "tick" us stats
- Above also fixes FPS counter
- Fix tick being double-incremented, and fix launcher to account for this
- Run the C equivalent of
gc.collect()
in the main loop - Try and sleep the is_flipping() loop a little... my PicoSystem is getting mighty warm!
OC/Buffer
- Overclock early to avoid an on-init change of clock doing bad things
- Give the
SCREEN
buffer back to C exclusively, MPY reduces thegc_heap
to accommodate this change - see: pimoroni/micropython@f826b9e
Full Changelog: v0.0.4...v0.0.5
v0.0.4 - Alpha
What's Changed
- Added new small font, default to small font when in pixel doubled mode by @lowfatcode in #27
- Remove 300ms delay before logoless boot by @Fordi in #24
- MicroPython: Fix macOS bug, _logo for launcher. by @Gadgetoid in #30
MicroPython
- Now uses the smol font.
- Fixed unable to connect to serial in macOS/Thonny, this was accomplished by removing default splash/delay at startup.
- Inherited double vsync default clear goodness from @Fordi
- Removed the default splash, powering on will always result in a black screen unless you set up a
main.py
with... something. - Added a new
_logo()
command to draw a fullscreen, centered logo from the internal ROM bitmask. This is used for the launcher splash.
reset()
is now _reset()
- must be called before __import__()
'ing another file, since it resets the update/draw
pointers.
boot.py
. This breaks Thonny since it runs on soft-reset.
New Contributors
Full Changelog: v0.0.3...v0.0.4
v0.0.3 - Alpha
What's Changed
This release includes some significant refactoring to the game loop, plus a new approach to MicroPython which bakes everything in as "builtins" rather than requiring "from picosystem import *"
draw()
is now draw(uint32_t tick)
in C++ or draw(tick)
in MicroPython
from picosystem import *
is obsolete, all API functions are now builtin for performance reasons
- CI: Add CPack setup and example release files. by @Gadgetoid in #20
- Fixed drawing of note stems by @lowfatcode in #22
- MicroPython: Switch module to builtin. by @Gadgetoid in #26
- SDK: Refactor game loop, add stats. by @lowfatcode in #25
Full Changelog: v0.0.2...v0.0.3