MMBasic using sprites?

Heading into sprite handling on PicoCalc and hitting issues straight away. Whether I load a bmp to the screen and ‘sprite read’ from it OR ‘sprite load bmp’ from the bmp file itself I get the error “not available on physical display” ??

Read the manual again. Sprites are only available in the VGA and HDMI versions. PicoCalc uses an LCD so, no, sprites are not available on the PicoCalc

Hard to imagine this important function isn’t available due to the display type !. Sprites clearly work as can be seen in various emulators on the PicoCalc and I’ve had lcd pocket computers with sprite commands working perfectly.

…well, someone still have to implement it… it could be you… or, me…or, someone
else…

1 Like

Looks like we’re stuck with the huge task of writing our own routines to utilise the framebuffer commands ?. Another option may be the ‘gui bitmap’ command, will see how that goes, speed etc…

Another option would be to use the Lyra instead of the Pico. I built MMBasic for Linux on an old Pi devicre and copied the binary over to the Lyra ans it worked. I haven’t shared it since it was just a hack/test, and I didn’t want to bother setting up the actual build environment for the Lyra since I think I’ll be sticking with the Pico2 for a while (partly by choice and partly by necessity to test new builds).

But MMBasic for Linux runs on the Lyra and while I didn’t try much on it, if it supports sprites then I imagine they will work on there. MMBasic won’t have access to the WIFI and internet functions though, since they don’t exist in that build. Each version of MMBasic seems to have its own tradeoffs, due to the history of its development.

And, if the PicoCalc sees the kind of interest some of the other MMBasic platforms have had, it will probably get functionality from someone (likely not me as I’m not sure I have the time and expertise, at least in the short term) and PicoCalc may one day end up having features not available in the other versions.

Yes I have one yet not tried it yet due to needing two pins swapping to make the audio work (another on the way for that). I have zero Linux experience too and wonder what the performance of MMBasic will be on a Lyra, if its 256Mb flash will be of use too. Maybe there’s already a powerful and efficient compiling Basic for Linux out there…

Does MicroPython support sprites on this device?

1 Like

I’ve also got a Lyra that I haven’t modded for sound yet. That was part of the reason why I’ve decided to stay with the Pico2W, at least for now.

I do think the Lyra is plenty powerful though – in terms of processor speed and memory it will be more capable than a Pico2. And with a USB dongle it can have both wifi 2.4/5 and bluetooth which could be useful. I’m not sure if the 256MB of flash is usable (if not already, then probably someone will enable it in time), but it’s such a small amount that it’s probably not that useful anyway. May as well put a 128GB SD in it and use that for storage. :slight_smile: It might be interesting to use the built in flash for a swap file, since it’s faster than the SD, but I’m not sure if 256MB swap would be helpful or not in terms of performance. Since it’s still being actively developed/enhanced for PicoCalc, I’m planning to check back on it later, maybe when PicoMite stuff starts to cool down.

I suspect it would be easier to get MMBasic games and utilities and stuff from the Maximite and other “mite” devices working on the Linux version than on the PicoCalc version though. Since they both use the same display resolution though, I guess that would have to be adjusted in the code no matter which version was used.

No idea. I imagine someone has probably created a sprite library for MicroPython (maybe several?), but I’ve never really used MicroPython so it’s a total guess. From what I saw of the activity around supporting MicroPython on the PicoCalc it looked like they made progress a while ago on getting better graphics performance out of the device. I think they created a custom display library for the device. Sounded like they were bumping up against hardware limits though hitting maybe 20-30 frames per second (going from memory here, my numbers may be off). The PicoMite stuff has been notoriously slow in terms of graphics performance, by comparison. Although the recent display code changes should have helped some.

I’m thinking the 256Mb flash will be faster to boot from or just faster read of something that won’t need changing too often, maybe dual boot of say an emulator and Linux. Yes more powerful yet whatever you run will have Linux behind it and take away some of that power. MMBasic/picomite running directly on the core would be amazing. Will be interesting to see where it goes, maybe a touchscreen mod ?. One is already available :smiling_face_with_sunglasses:

I’m using the BLIT command and it works fine on my PicoCalc. You can load a BMP with the BLIT LOAD command.
If you want to use the layer buffer, you have to use a Pico 2 instead of a Pico 1 because of PicoCalc resolution (you can’t reserve a custom framebuffer size in memory).

2 Likes