Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB serial commands
⚠️ This documentation is unofficial and is not affiliated with Panic. All of the content herein was gleaned from reverse-engineering Playdate tools and game files, and as such there may be mistakes or missing information.
- File Formats
 - Server
- Playdate API - Main Playdate server API
 
 - Misc
 
pdz.py- Unpacks all files from a.pdzfile container.pdex2elf.py- Converts apdex.binto an ELF file that can be analyzed in tools such as readelf, objdump or Ghidra, or compiled back to the same originalpdex.binbypdc.usbeval.py- Uses the Playdate's USBevalcommand to evaluate a Lua script over USB. Has access to the Lua runtime of the currently loaded game, except for system apps.
- pd-usb - JavaScript library for interacting with the Playdate's serial API from a WebUSB-compatible web browser.
 - unluac - Fork of the unluac Lua decompiler, modified to support Playdate-flavoured Lua.
 - lua54 - Fork of Lua that aims to match the custom tweaks that Panic added for Playdate-flavoured Lua.
 
- Zhuowei for this script for unpacking Playdate .pdx executables, which was the base for 
pdz.py - Scratchminer for their further reverse-engineering work on the Playdate's file formats, streaming protocol and Lua implementation.
 - Simon for helping with some ADPCM audio data reverse engineering
 - The folks at Panic for making such a wonderful and fascinating handheld!
 
2022-2023 James Daniel
Playdate is © Panic Inc. - this project isn't affiliated with or endorsed by them in any way.