crankstart: Couldn't find pdz file main.pdz
Hi,
I’ve been using Crankstart to test my Chip-8 emulator on the Playdate Simulator and it’s been a joy to use! ❤️
I was curious if my “game” would also run on my real Playdate, but every time try to I upload the package with Device > Upload
the device crashes and displays the message: Couldn't find pdz file main.pdz
Curiously, I double-checked if it was also happening with the examples, with the Klondike and the Nine Lives demo, and it was indeed happening in all of the cases
The output .pdx file contains:
- pdex.bin
- pdex.dylib
- pdxinfo
While on a Playdate game the package usually contains:
- main.pdz
- pdxinfo
I’m on nightly-aarch64-apple-darwin and I’m running Crank and Crankstart on a M1 Pro Macbook Pro
Do you perhaps have any suggestions? I’ve tried everything but to no avail 😔
Thank you
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 31 (19 by maintainers)
Seems to be explained by https://github.com/pd-rs/crank/issues/24;
modem_path
defaults to/dev/cu.usbmodemPDU1_Y0005491
unlessPLAYDATE_SERIAL_DEVICE
is set.There’s apparently some way to try and find this but it’s only for Linux: https://github.com/pd-rs/crank/pull/38
Do check for permission requests that are popped up behind your active window.
That is certainly the cause. It works on the simulator because the simulator uses the dylib, not the binary.
I’m curious to see what you find about the hanging, if it’s reproducible! I’d try running through strace - that’s how I figured out an issue with the commands pdutil (via PlaydateSimulator) was sending to the device. Something like
strace -f -s256 -o sim.trace -- PlaydateSimulator
and then try to upload the game from the simulator. Or runcrank run --device
through strace instead, if that’s the problem area. There will be a ton in the output file, but something may stick out about the pdutil call, or something else in that area.My understanding is that pdz files are compiled lua, and since with crankstart we don’t use any lua, it shouldn’t be necessary; if it’s looking for pdz, my suspicion is that the pdx is missing something that tells Playdate it’s a C game. The
target/GAME.pdx
should havepdxinfo
,pdex.bin
, andpdex.so
/pdex.dylib
files, which yours does, so I’m not sure. FWIW, my pdxinfo only has name, version, pdxversion, and buildtime, so not much is required there. I really wish I could remember what caused this for me before, I’m sorry.I’m not sure why there needs to be a main.pdz file. I don’t have one and it works fine for me.
I know this is something that can happen with a game misconfiguration or a weird command rather than a crankstart issue because I see it once in a while when I change something, but I can’t quite remember what it is at the moment… I’ll see if I can track it down.
That wasn’t the case a few months ago, but I’ll take a look tomorrow and see what I can learn.