Skip to content

Pico Computer 3 v0.4 (test)

Choose a tag to compare

@UKTailwind UKTailwind released this 13 Jul 08:55

Pico Computer 3 v0.4 (test)

A MicroPython (RP2350B) firmware for the Pico Computer 3 standalone board.

Install

Hold BOOTSEL while powering up, then copy firmware.uf2 to the RPI-RP2
drive that appears. The board reboots into MicroPython; the REPL banner reads
MicroPython v1.29.0-preview on PICO COMPUTER 3 v0.4 with RP2350B.

What's new since v0.3

Audio: tracker music, tones and a synthesiser

  • MOD tracker playbackplay("/sd/song.mod", loop=True) plays Amiga MOD
    music with the hxcmod engine (returns the song title). mod_sample(n) fires
    one of the module's instrument samples as a sound effect mixed over the
    running music — background music plus game SFX from a single file.
  • tone(left, right, ms) — two independent sine-wave channels. Calling
    tone() again while one plays retunes it seamlessly (click-free), so
    melodies and arpeggios work.
  • sound(voice, side, wave, freq, vol) — a 4-voice synthesiser with
    sine / square / triangle / sawtooth / periodic-noise / white-noise waveforms
    per voice and side; volume changes ramp to avoid clicks.
  • pause() / resume() for the current playback.

Graphics: layers, off-screen buffers, a blitter and a sprite engine

  • Overlay layer + off-screen framebufferhdmi.layer() adds a
    transparent overlay merged live over the display (RGB320); hdmi.create()
    adds an off-screen buffer in PSRAM. hdmi.write("N"/"L"/"F") chooses where
    all drawing goes (including the image loaders and console), and
    hdmi.copy(src, dst) block-copies whole buffers.
  • hdmi.blit(x, y, w, h, x1, y1, src, dst, skip) — a rectangle blitter
    that copies within or between buffers (or to/from RAM (buffer, w, h)
    surfaces), with an optional skip colour for cut-out sprites; overlapping
    copies are safe in any direction.
  • hdmi.vsync() — wait for vertical blanking for tear-free updates and
    frame pacing (input and audio keep running while it waits).
  • pcsprite — a full sprite engine (import pcsprite): layers, AABB
    collisions (sprites, screen edges and static walls, edge-triggered), z-order
    and background scrolling — MMBasic sprite semantics on a dirty-rectangle /
    overlay-layer compositor. update() commits moves and returns collisions.

Input

  • keydown(n) — read which keys are held right now (not just typed
    characters) — essential for games: count, per-key codes, modifier and lock
    bitmaps.
  • keyboard.on_key(cb) — a callback on every keypress / auto-repeat.
  • Num Lock now defaults on and, when off, the numeric keypad acts as the
    navigation cluster (arrows / Home / End / PgUp / PgDn / Ins / Del).

Console

  • console("both" / "serial" / "screen") routes console output
    (MMBasic OPTION CONSOLE) — keep prints off the HDMI screen while testing
    graphics, or off the serial port; keyboard input always works. Power-up
    default is both.
  • On-screen editor scrolling now works: the pcconsole terminal emulator
    gained a scroll region (DECSTBM) and reverse index, so the pye editor
    scrolls correctly on the HDMI screen (not just over serial).

Reliability

  • DS3231 RTC survives a live CPU-clock change — the I2C bus is rebuilt when
    screen(mode, 315/378) changes the clock, so gettime/settime stay
    correct.
  • On-device test suiteboards/PICO_COMPUTER_3/tests/ (copy to the SD
    card, run("test_all.py")): pixel-verified automatic tests for the blitter,
    buffers, sprites and images, plus interactive tests for the keyboard, audio
    and console routing.

See USER_MANUAL.md (in the board directory) for full documentation.