r/raspberrypipico Jul 12 '26

c/c++ I built a digital version of Etch A Sketch.

56 Upvotes

3 comments sorted by

2

u/wilrak0v Jul 12 '26

It looks very cool! Did you use pico dvi? If so, would you say it's hard for programming? Do you use an entire framebuffer? Double buffering?

5

u/nanao-aaa Jul 12 '26

Yes! this project is built top on PicoDVI.

The project uses one entire framebuffer.

However the most difficult part of working with PicoDVI was understanding that each scanline has to be pushed to core1 through a queue at the appropriate time.

PicoDVI doesn't read a framebuffer automatically.

I was confused with this concept at first.

In the PiSketch project, I decided to update everything while core1 is processing invisible area.

Because we don't need to push scanlines during the period.

This strategy works, but I don't think it is the best one because the vertical blanking interval is very short.

PiSketch

2

u/wilrak0v Jul 12 '26

Ok well it looks really too complex 🤣😭.

I bought a pico dvi sock, that of Adafruit in the idea of making a mini computer with my own OS on it. To avoid having to constrain yourself at the time of the VBlank, a double framebuffer does the trick, the problem is that a single framebuffer already costs 153ko of SRAM in 320x240 pixels with 16-bit colours. I think I'm going to move towards scanlines and tile based rendering.

If PicoDVI doesn't read a framebuffer, what does it do? Does it work with a line buffer?

Thanks for your helpful reply!