Hello all, I have been working on something kind of cool. As the title says, bringing SDL support to Playdate! There is quite a bit of work to do still, but I finally got video to work. Here is a Minecraft clone (M4KC version) running on the simulator. I think the simulator uses SDL2 as well, so this is kinda funny. Should work for hardware, but not sure about perf, seems great on sim (better than lua). The Malloc log also seems paltry. But probably cause it’s not using Lua at all.
Basically the video driver converts the surface provided during run loop to a b&w image then dithers, once that is complete it writes directly to the frame buffer and flushes. Very little optimization currently, also am not a fan of the dithering algo (half-tone? I think?). Plan to put out in the open once I get some level of input working (gif is just hard coded values for mouse X/Y). The game in gif is: GitHub - sashakoshka/m4kc: Minecraft 4k: decompiled, translated to C using SDL for graphics and input, and improved upon with modification to support pd runloop. This has been a very fun way to both learn (more) c, the pd low level apis, SDL + SDL driver creation, and a bit of math. Trying to create a real patch to submit to SDL org is the goal.