Skip to content

Releases: pimoroni/picosystem

Version 1.0.0 - MicroPython 1.23.0

12 Jul 13:13
e3615b5
Compare
Choose a tag to compare

⚠️ Warning: Due to a filesystem version change in MicroPython, flashing these builds will erase your files, back up your PicoSystem files first ⚠️

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

New Contributors

Full Changelog: v0.1.3...v1.0.0
MicroPython Changelog: micropython/micropython@v1.19...v1.23.0

Version 0.1.3

28 Jul 12:27
87a7463
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.1.2...v0.1.3

Version 0.1.2

02 Nov 15:09
2d102ca
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.1.1...v0.1.2

Version 0.1.1

29 Oct 17:18
b7809e3
Compare
Choose a tag to compare

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

22 Oct 16:22
d4cbc43
Compare
Choose a tag to compare

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.

⚠️ The special colour syntax for text has changed from "\rgbRGB" and "\rgbaRGBA" to just "\penRGBA".
🥳 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

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

Full Changelog: v0.0.7...v0.1.0

Version 0.0.7 - Alpha

21 Oct 22:37
c4a2271
Compare
Choose a tag to compare

What's Changed

⚠️ This version introduces a new text API, 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 with measure(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() and tick() in favour of quit() and start(). To implement your own main loop use flip() 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

21 Oct 13:13
3209138
Compare
Choose a tag to compare

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

⚠️ Alignment change also apply to the C++ SDK!

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 of while 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 the gc_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

21 Oct 12:18
3573fe1
Compare
Choose a tag to compare

What's Changed

⚠️ No changes to the C++ SDK!

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 of while 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 the gc_heap to accommodate this change
  • see: pimoroni/micropython@f826b9e

Full Changelog: v0.0.4...v0.0.5

v0.0.4 - Alpha

20 Oct 17:00
07afe5a
Compare
Choose a tag to compare

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.
⚠️ We cannot start the launcher by default in boot.py. This breaks Thonny since it runs on soft-reset.

New Contributors

  • @Fordi made their first contribution in #24

Full Changelog: v0.0.3...v0.0.4

v0.0.3 - Alpha

20 Oct 13:53
0c7de5e
Compare
Choose a tag to compare

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 *"

⚠️ Breaking: draw() is now draw(uint32_t tick) in C++ or draw(tick) in MicroPython
⚠️ MicroPython: from picosystem import * is obsolete, all API functions are now builtin for performance reasons

Full Changelog: v0.0.2...v0.0.3