# MDP - mdp_version.h: Version Macros

#### Mega Drive Plugins v1.0.0
Revision 0

The MDP plugin interface uses a hard version numbering system. That is, the version number is used to determine whether or not a plugin is compatible with a given MDP host application.

MDP version numbers are 32-bit unsigned integers in the format 0xMMNNRRRR, where:

- MM: major version.
- NN: minor version.
- RRRR: revision number.

With regards to version compatibility, the major version number indicates mdp_t compatibility. If the interface major version number of the application's MDP support does not match the plugin's interface major version number, then the plugin is not compatible.

The minor version number indicates if any new backwards-compatible features have been added to the MDP specification. That is, if a new feature has been added that doesn't break the interface and doesn't require that plugins make use of it, the minor version number is incremented. Plugins can check the minor version of the host application's MDP interface via the mdp_host_t struct (which is passed to the plugin via the mdp_func_t.init function) and enable or disable features, if necessary.

The revision number is not used at all for version compatibility and can be used by the MDP host application developer for any purpose.

To ease the generation and parsing of MDP version numbers, mdp_version.h provides several macros.

Macro | Description
--- | ---
MDP_VERSION(major, minor, revision) | Create a 32-bit MDP version using the specified major, minor, and revision version numbers. The major and minor version numbers may not exceed 255, and the revision number may not exceed 65,535.
MDP_VERSION_MAJOR(mdp_version) | Extract the major version number from an MDP version number.
MDP_VERSION_MINOR(mdp_version) | Extract the minor version number from an MDP version number.
MDP_VERSION_REVISION(mdp_version) | Extract the revision number from an MDP version number.