Structure of the OS/2 MM CD Player's database (Document Revision 1.00)

Reverse Engineered by Mads Orbesen Troest <motr96@sprog.auc.dk>

ABSTRACT:

 This document describes the format of the OS/2 MultiMedia CD Player's CD
 database. Though very basic (bordering to the crude), this database
 feature is actually quite useful; however, you might want to import or
 export to or from it, or perform other forms of maintenance. You might also
 merely want to share the database with another application of your own
 design. Or you may want to use the information for exporting the database to
 another CD player, because the standard OS/2 player is so annoying lame! ;-)


DISCLAIMER:

 The information presented in this document is - obviously - believed to be
 correct and error-free, but - as usual - the author cannot take any
 responsibility for what may or may not happen when you implement something
 based on this; neither can I guarantee the format won't ever change in newer
 revisions of the CD player (if, indeed, any such are to come)... :-)

 That said, I hope you'l find the information useful, and if you discover
 anything I haven't mentioned (or even an error ;-) feel very free to contact
 me. You're of course welcome to do that for any other reason as well. .-)


DATABASE FILE:

 The database is one standard OS/2 INI file, called CDP.INI. It is located in
 the \MMOS2 directory of your system. It is, as stated, a standard INI file,
 which can hence be accessed through the standard INI API calls. The following
 section describes the layout of the INI file.


DATABASE STRUCTURE:

 As you are most likely to know (I won't go into details about accessing the
 INI files, nor how they are organized; you're assumed to know this :-), OS/2
 INI files are basically a 2 dimensional array, where the first level is
 called "Application" and the second "Key".

 CDP.INI contains any number of "Applications", the ID of each being a unique
 code (an ASCII numerical string) identifying that particular CD. The form is
 "nnnnnnnn.nn". I am not entirely sure whether or not this is the official
 UPC ( Universal Product Code) present on /some/ CDs, but I would guess it
 is not, as a surprisingly large number of CDs do /not/ have this information.
 :-( I remember finding this out when programming a DOS CD player once; in
 that case I implemented my own "unique ID" scheme, and would guess the makers
 of the CD player has done the same thing. However, I cannot guarantee that,
 and as of right now I really have no method of testing it. If I find out,
 I'll descibe it in the next version of this document, if any such is deemed
 necesarry. Feel free to write me if you know, or if you want to hear if I've
 found out. :-)

 OK... Each "Application" (disc, that is) contains a number of "Keys", holding
 the information for that particular CD:

  IMMCDDiscTitle
   As you've probably guessed, this "Key" holds the title of the CD. This is
   contained in a plain-Jane ASCII string, which is /not/ zero-terminated.

  IMMCDDiscProgram
   For each CD you can define a default program (series of tracks to play) in
   the CD player. This program is contained in this "Key". It consists of an
   arbitrary number of bytes, each holding the (1-relative) number of track
   to play for that position; there are as many bytes as there are entries in
   the program. Example: "04 01 0E 09" would mean a 4-entry program playing
   the tracks 4, 1, 14 and 9. Oh, and just to make it completely straight, it
   is a string of bytes, not an ASCII-Hex string as I used in the example
   above. .-) Notice that there might not be a program; this is not an error.

  #
   The rest of the "Keys" are merely a list of all the tracks on the CD. Each
   "Key" ID is a numerical ASCII string holding the track number (in decimal).
   If there are 12 tracks on some CD, there will - in other words - be twelve
   "Keys" called "1", "2", "3" ... "11", "12". Each of these "Keys" contains a
   straight ASCII string (which is /not/ zero-terminated), holding the title
   of that particular track.


IS THAT IT?

 Yup, that's it! :-)


TECHIES:

 This information was - very simply - obtained by scanning my system for files
 containing a CD title I knew was in the database, and - as it turned out to
 be a standard INI file (something I quite suspected :-) - it was a rather
 simple matter of looking at it in an INI file editor (I used Initor) and
 observe (ah, and document ;-) this straight forward structure...


EXAMPLE DUMP:

 Now, here's - for reference (and also in order to demonstrate my excellent
 taste in music ;-) - a relatively raw dump of an entry in my CDP.INI:

  APPLICATION 70106531.62
   KEY IMMCDDiscTitle
    DATA Tindersticks: Tindersticks
   KEY IMMCDDiscProgram
    DATA x01 x02 x03 x04 x05 x06 x07 x08 x09 x0A x0B x0C x0D x0E x0F x10
   KEY 1
    DATA El Diablo En El Ojo
   KEY 2
    DATA A Night In
   KEY 3
    DATA My Sister
   KEY 4
    DATA Tiny Tears
   KEY 5
    DATA Snowy In F# Minor
   KEY 6
    DATA Seaweed
   KEY 7
    DATA Vertrauen II
   KEY 8
    DATA Talk To Me
   KEY 9
    DATA No More Affairs
   KEY 10
    DATA Singing
   KEY 11
    DATA Travelling Light
   KEY 12
    DATA Cherry Blossoms
   KEY 13
    DATA She's Gone
   KEY 14
    DATA Mistakes
   KEY 15
    DATA Vertrauen III
   KEY 16
    DATA Sleepy Song


CONTACT ME:

 Yep, do that for any reason whatsoever. ;-)

  Mads Orbesen Troest (Marvin of SIRIUS Cybernetics)
  Dyrskuevej 53, 1.MF
  DK-9200 Aalborg SV
  Denmark

  InterNet motr96@sprog.auc.dk (http://www.sprog.auc.dk/~motr96)
  FIDO Net 2:238/202
  OS/2 Net 81:445/202

( And far off in the distance, a dog barked... )

