next up previous contents
Next: How to create DLLs Up: Device Development Previous: Device Development   Contents

Introduction to FDOs, DLLs and the CP in general

Of course, no player can play all formats without errors, support all soundcards or open all archive formats. While you would have to wait for a new version of ``normal'' players, you can do something against it for OPENCP by yourself.

From the technical point of view this is possible since CP 1.666. Here, the so-called FDOs were introduced, ``flatmode dynamic link objects''. All in all these are nothing different than DLLs which everyone knows from Windows, OS/2 or also Unix. FDOs contain egdrivers for soundcards. If a new soundcard was to be supported, not a new Cubic Player would have to be released but only a new FDO.

With an entry in cp.ini, you can embedd such a driver.

In Cubic Player 2, these FDOs were replaced by DLLs, ie in general only a different format (however, I am not sure whether FDO also supported imports.)

The format FDO had been invented by pascal, which means that it was not supported by any linker. A different thing is the case with the DLLs of CP2. They are simply normal LE-DLLs. Everybody who has done a little more with Watcom C and DOS4G or PMode/W should know the LE-format: It is used there by default.

In general, there is no great difference between LE-DLLs and LE-EXEs. LE-EXEs, however, usually contain no imports or exports (the right professional-version of DOS4GW, DOS4G, supports DLLs).

To reach that the player also works with the normal DOS4GW or even PMode/W, OPENCP contains a DLL-loader which loads these DLLs and links them to the main program. The main program merely consists only of this DLL-loader (later more about this).

Everyone who has Watcom C can create LE-DLLs. Of course it's also possible with other linkers and compilers, but you ought to use Watcom.


next up previous contents
Next: How to create DLLs Up: Device Development Previous: Device Development   Contents
documentation by doj / cubic