I'm trying to figure out why this cart only runs at 10 FPS on a Raspberry Pi Zero. stat(1) returns 0.49 and stat(7) returns 30. However, the screen is only updating at 10-11 FPS. Other carts with higher stat(1) values don't show this problem, so it seems specific to something in this cart.
I can optimize to get the CPU usage down to 17%, and then the real framerate becomes acceptable. However, I'd actually like to understand why it is slow so I can work around it. (Also, I'd prefer to be able to use the whole CPU budget instead of just 17% of it!)
I assume what's happening is that the pico-8 CPU costs are optimistic for some instructions, and the actual cost on the Pi Zero hardware is higher. But which instructions?
Are there specific instructions I should be avoiding?
Are there specific types of drawing (like large map areas, or off-screen drawing) I should avoid?
Can I hook up a profiler to see what it is spending its time on?
The original raspberry pi post (https://www.lexaloffle.com/bbs/?tid=3085) says math-heavy carts run slowly. Is that still true?
Are there any performance tricks for writing carts that run well on a raspberry pi?