This document details the format of the .dpal file distributed some years ago with the Playmates Toy's DotPal (TM). * Introduction The .dpal file is a multi-part Microsoft RIFF file (http://en.wikipedia.org/wiki/RIFF). It contains two chunks of information: 1 - the audio (encoded as a WAV file) 2 - the control block containing a series of motions Each motion has a code and a duration. To play, the audio part is divided into chunks corresponding to the duration of each motion code, and sent along with that code to the DotPal. The audio is encoded as a mono stream sampled at 441000 Hz. Each unit of duration is 5.5125 samples. So, as an example, the following are the motions for 'yoink.dpal': Code Duration 0x80B6 0x32 0x8081 0x01C2 This means that code 0x80B6 is to be played for 275 samples and code 0x8081 is to be played for 2480 samples. So we would send two commands to the DotPal, one to play motion 0x80B6 and would be accompanied by 275 bytes of audio data, and and the other command would to play motion 0x8081, accompanied by 2480 bytes. The last motion in every .dpal is 0,0 - which ends the transaction. We don't know what the motion codes are. It would probably involve somebody videotaping the Dotpal and matching the codes to the timestamps. === File format === The following is the specific format of the file: Data Len Notes ------- ------ ------ ----- 'RIFF' 4 RIFF magic header file size 4 'IPAL' 4 Dotpal magic header 'hdr' 4 Start of the audio header Unparsed 24 An unknown payload 'data' 4 Start of the audio data audio_len 4 Length of the audio data audio_data audio_len The audio data (word aligned) 'ctrl' 4 Start of the control block ctrl_size 4 Size of the control block ctrl_count 2 Number of motions in the control block for each ctrl_count: motion_len 4 Length of the motion motion_value 2 Motion code motion_index 2 Motion Index (seems to always be 0xFFFF)