yrlf information 14 glöps
- general:
- level: user
- personal:
- first name: Ferdinand
- last name: B
- 4k wild Wild Raspberry Pi PICO4K by yrlf
- VGA rendering is inspired by and similar to the pico_scanvideo library from pico-extras, but rewritten completely from scratch to use my init list format (iovec).
PWM audio is done completely from scratch, with 100% partycoded shitty audio synthesis.
All library parts made for this prod are absolute hack and probably not very developer-friendly, but can definitely be improved to have a better developer interface. - isokadded on the 2022-09-11 23:21:02
- 4k wild Wild Raspberry Pi PICO4K by yrlf
- PICO4K is the first 4K (or smaller) prod on the Raspberry Pi Pico that actually achieves Audio and Video output.
(congratz to Mandelboot for making the first UART 256byte though)
The pico's SoC, RP2040, has a dual core Cortex-M0+ armv6m CPU running at 125MHz (SDK default clock), but can be overclocked a whole lot (easily to 250MHz, some have gotten it up to 300 or 400).
PICO4K is packed with a new exomizer-based packer (also released with the GitHub source archive) called picopack that lives in the first 256 bytes of flash and decompresses the rest of the intro into RAM. picopack is capable of packing and loading multiple parts, but only one part is used in this 4K.
After unpacking, PICO4K initializes clocks, gpio, pio, pwm, dma, interp, and irq via a custom initialization list format that saves useless load/store instructions and compresses better.
Core 0 runs the twister render in its main loop, and does VGA timing fifo refill and per-frame logic (VSYNC irq) in irq.
Core 1 runs the text scroller render in its main loop and does audio buffer refill in irq.
The twister is rendered out scanline by scanline with no framebuffer, while the text is rendered to a single 1bpp framebuffer. Text and twister are overlaid using hardware enable bits in the PIO.
Audio is synthesized into a ring buffer that is continuously DMA'd at 48kHz into the PWM unit with periodic interrupts when the audio ring buffer is half empty. - isokadded on the 2022-09-11 23:15:26
account created on the 2022-04-17 16:04:26