If you need to create custom sprite images for one of the demos, such as sprite_bounce, you can use the
First, create a 128x128 pixel .png image and place it in the pico/PicoDVI/software/assets directory. (You can also download one of the lovely sprites provided below.)
Next, from a terminal
cd pico/PicoDVI/software (your path may be different depending on where you installed it).
Run this command to convert the pt_128x128.png file:
./scripts/packtiles -sdmf rgab5515 assets/pt_128x128.png assets/pt_128x128_rgab5515.h
This will generate a converted .h file asset that can be compiled into the code.
To use this new asset in the sprite_bounce demo code, head to pico/PicoDVI/software/apps/sprite_bounce and open main.c in your editor.
You can look for one of the original sprites, such as (around line 24):
and swap that for the new one:
Then, swap out the asset used by the
berry[i].img = i % 2 ? pt_128x128 : raspberry_128x128;
Re-save the main.c file.
Now, you can build the app:
PICO_SDK_PATH=path/to/sdk cmake -DPICO_COPY_TO_RAM=1 ..
This will create the sprite_bounce.uf2 file we need and place it in the pico/PicoDVI/software/build/apps/sprite_bounce directory.
Now, you can flash the Pico with the new sprite_bounce.uf2 file just as shown previously on the Demo Code page!