I just skeleton'd out a game on linux using crank / crankstart / rust ( GitHub - pd-rs/crank: A wrapper for cargo to use creating games for the Playdate handheld gaming system. )
It is working and I'm having a lot of luck using it in the simulator, but I'm finding it a bit confusing what I'm expected to do to mount the data drive and send data to the device.
I tried to use pdutil to send data to the datadisk ( if it matters, I'm a non sudo user on ubuntu)
I found this thread, with some helpful tips, Playdate SDK for Linux? - #23 by dormando, but I wasn't able to narrow to a reproducable set of steps
Are other folks having luck getting playdate to install apps / mount on linux?
Just to note, I've made some progress here by following some of dormando's steps. I'll try to write up more details of where I got, but now I think I am getting some linking error when it boots. I assume this is crank related, but I have the arm gcc installed, so not sure what is causing it.
The error I am currently getting "CAPI handler function wasn't located in loaded data."
Oddly, my game works in the simulator!
CAPI handler function wasn't located in loaded data.
This error message means that you built the PDX for the simulator but not for the device (i.e. your PDX is missing the file
using "crank package" instead of crank build fixed this! success!
(also, though there's some rough spots, the rust bindings for this are super rad!)
I'm looking at the firmware code instead of testing on the device, but if you don't have a pdex.bin file at all it'll assume it's a pure lua game, and then if your pdx doesn't have a main.pdz file inside it'll complain that that's missing. What I usually see when I get the
CAPI handler function wasn't located in loaded data error is that it's created a zero-byte pdex.bin file. I'm betting that happens because I have
make aliased to
make -j and our Makefile doesn't have dependencies set up quite right so it's copying pdex.bin to the output pdx before it's finished compiling. So I always run
make twice to get around this instead of sorting out the root problem.
That might be what's going on here. Or maybe not!