next up previous contents
Next: Our first Cubic-DLL Up: Device Development Previous: How to create DLLs   Contents

the Internals

All DLLs of OPENCP are in cp.pak, which is a Quake-compatible .pak file. You can unpack it with normal Quake tools.

I roughly describe the most important DLLs which are in this .pak file:

arc*.dll
archive-reader (e.g. ARCZIP.DLL for .ZIP-files)
cpiface.dll
the interface (the screens with trackview and so on)
devi.dll
auxilary routine for the devices system that reads from
cp.ini (*) what devices are to be loaded and loads them
devp*.dll
player-devices, play samples
devs*.dll
sampler-devices, are more or less able to sample (e.g. for displaying the FFTs of Audio CDs)
devw*.dll
wavetable-devices, play more samples at the same time, either directly on the hardware (GUS, SB32...) or mix them and play them on DEVPs (DEVWMIX, DEVWMIXQ)
fstypes.dll
module-detection, song-infos for various module-formats are evaluated here
hardware.dll
routines for bending and using IRQs, the timer and DMAs so that not every device driver needs its own functions
load*.dll
module-loaders, load various formats
pfilesel.dll
the file selector
play*.dll
plays modules on various devices
(*)
Since version 2.0 many things are not directly retrieved from cp.ini but from an exported _dllinfo. Read more about this later.

A simplified overview about OPENCP:

cp.exe loads important DLLs, starts DEVI to get the desired devices, and starts the file selector. This program part asks the user which module he wants, seeks the corresponding LOADer, loads the module, seeks the corresponding PLAYer, and passes the module to it. The player seeks the corresponding devices and passes the data that should be played to them.

At the same time the player passes data to the interface, which was initialized some time before. The interface displays these data and evaluates inputs from the user.


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