xref: /freebsd/contrib/file/magic/Magdir/playdate (revision 069ac184)
1
2#------------------------------------------------------------------------------
3# $File: playdate,v 1.1 2022/11/04 13:34:48 christos Exp $
4#
5# Various native file formats for the Playdate portable video game console.
6#
7# These are unofficially documented at
8# https://github.com/jaames/playdate-reverse-engineering
9#
10# The SDK is a source for many test files, and can be used to
11# create others. https://play.date/dev/
12
13
14# pdi: static image
150	string	Playdate\ IMG	Playdate image data
16>12	belong&0x80	0x80	(compressed)
17>>20	lelong	x	%d x
18>>24	lelong	x	%d
19>12	belong&0x80	0x00	(uncompressed)
20>>16	leshort	x	%d x
21>>18	leshort	x	%d
22
23# pdt: multiple static images
240	string	Playdate\ IMT	Playdate image data set
25>12	belong&0x80	0x80	(compressed)
26>>20	lelong	x	%d x
27>>24	lelong	x	%d,
28>>28	lelong	x	%d cells
29>12	belong&0x80	0x00	(uncompressed)
30>>20	lelong	x	tile grid %d x
31>>24	lelong	x	%d
32
33# pds: string tables
340	string	Playdate\ STR	Playdate localization strings
35>12	belong&0x80	0x80	(compressed)
36>12	belong&0x80	0x00	(uncompressed)
37
38# pda: audio
390	string	Playdate\ AUD	Playdate audio file
40>12	lelong&0xffffff	x	%d Hz,
41>15	byte	0	unsigned, 8-bit PCM, 1 channel
42>15	byte	1	unsigned, 8-bit PCM, 2 channel
43>15	byte	2	signed, 16-bit little-endian PCM, 1 channel
44>15	byte	3	signed, 16-bit little-endian PCM, 1 channel
45>15	byte	4	4-bit ADPCM, 1 channel
46>15	byte	5	4-bit ADPCM, 2 channel
47
48# pda: video
490	string	Playdate\ VID	Playdate video file
50>24	leshort	x	%d x
51>26	leshort	x	%d,
52>16	leshort	x	%d frames,
53>20	lefloat x	%.2f FPS
54
55# pdz: executable package
56# Not a lot we can do, as it's a stream of entries with no summary information.
570	string	Playdate\ PDZ	Playdate executable package
58