Say you have a PDB or PRC file from an old Palm device, and it has things you want. Some things this could be include calendar info, audio, text memos, etc. Things of various formats could be stored in these Palm Record files to be read by the device. The problem is that these files can’t necessarily be processed or simply extracted and immediately be useable.
These files typically have some header info, and then the actual file or files contents. Each file is stored in its own record, and larger files may need to be stored in multiple records possibly. Regardless, to break apart these files, I tried many different methods.
First, I analyzed some files with a text editor to inspect the idea of what I was looking at. I had a particular file I wanted to extract, an alarm sound called Concerto, as it isn’t available online in the original MIDI format. After finding the correct PDB file which contained about fifty records of MIDI sounds from a backup, I started attempting to dissect it.
One method included running a Java program to zip the contents as output, but it would create a massive massive file that could not actually be processed. Afterward, I analyzed the PDB file with a hex-editor to possibly break it apart. Some further research and someone suggested using API from a Java program written for Linux users to HotSync their devices called JSyncManager. This older program is open source, but to obtain the source code, I needed to use the obsolete CVS protocol to download it from Source Forge with the free version of CVSNT. The Java module that I needed got me nowhere.
I eventually ran into two lovely programs called PalmDump and PDBMake. PalmDump would output all the data of a PDB or PRC file in both Hex and ASCII form in two columns, into a single text file, and with separate headers for each record. This was helpful and helped me confirm that I was looking for record 3 from the file. However, I was getting lost to the point that I posted on the Reddit SlaveLabour network. But before anyone responded, I found the solution myself.
When taking the hexadecimal data and putting it into its own file using a hex-editor didn’t work. I tried putting a different MIDI of Game of Thrones music into a PDB file and saw something unusual in the header.
I then confirmed my suspicion when I discovered the program of Par. This program essentially lets you properly dump all the records into their own files from a PDB or PRC file, similar to extracting a ZIP archive. When comparing the hex data of record 3 which I knew to be a MIDI, to the Game of Thrones MIDI, I realized the file header for MIDI format required that it start with MThd. The header I was seeing for the file was PMrc..Concerto.MThd.
By removing that header up to the MThd with the hex-editor, I was able to playback the file as a MIDI! Sure, it didn’t sound exactly the same because of the different SoundFont included on Windows, giving it a piano instead of a beep. With WAVE audio files, the header starts with RIFF, but Palm adds its own stuff prepended at the beginning.