MDI

From Video Game Music Preservation Foundation Wiki
Revision as of 15:30, 20 October 2014 by TheAlmightyGuru (talk | contribs)
Jump to: navigation, search
[[Category: Formats With {{{Header}}} Headers]] [[Category: Formats With {{{Content}}} Content]] [[Category: Formats With {{{Instruments}}} Instruments]]
Ad Lib MIDI
MDI.png
Developer: Ad Lib, Inc.
Header: {{{Header}}}
Content: {{{Content}}}
Instruments: {{{Instruments}}}
Target Output
Output - Digital Audio - No.png Output - MIDI - No.png Output - FM Synthesis - No.png Output - PSG - No.png
Released: 1989-05-08
First Game: ?
Extensions
  • *.mdi

The MDI format was created by Ad Lib, Inc. to upgrade from ROL format. It uses the MIDI structure but incorporates OPL2 commands that allow it to store instrument data and change modes, similar to how CMF works. Because the format is so similar to MIDI, some MIDI players are able to play the files, though they won't utilize the instrument data or set the song into the correct mode, so the song won't sound correct. The players which can play MDI files correctly are listed below.


Players

(Category)


Converters

(Category)


Games

Released

Title

Sample

1990-??-?? Golden Axe (DOS)
1991-??-?? Dark Ages (DOS)
1991-??-?? Prehistorik (DOS)
1992-??-?? Amberstar (DOS)
1992-??-?? Gear Works (DOS)
1992-??-?? Starfire (DOS)
1993-??-?? Ultimuh MCMLXVII (DOS)


Games That Use MDI

Technical

  • All MDI files begin with "MThd" MIDI header and contain "MTrk" at the start of the MIDI track.
  • The End Of Track "FF 2F 00" event is located at the end of file, but not included in the track.
  • Some Note Off events may have only Velocity parameter to trigger the note off.
  • Program Change events are not used in the track.


Sequencer-specific event format

These events are used to control OPL-compatible chip.

Delta-ticks

Event

Length

Ad Lib ID

Opcode

Data

00 FF 7F XX 00 00 3F XX XX XX .. XX


Possible opcodes

Opcode

Meaning

Byte #

Description

00 01 Patch (instrument change) 1 Voice / channel number for instrument
2 - 29 28 byte array of parameters (see BNK format)
00 02 Card mode 1 0 = melodic, 1 = percussive
00 03 Pitch bend sensitivity 1 1 - 12 inclusive


Channels utilization

Hex channel

MIDI channel

Use in melodic mode

Use in percussive mode

0x00 1 Normal instrument Normal instrument
0x01 2 Normal instrument Normal instrument
0x02 3 Normal instrument Normal instrument
0x03 4 Normal instrument Normal instrument
0x04 5 Normal instrument Normal instrument
0x05 6 Normal instrument Normal instrument
0x06 7 Normal instrument Bass drum
0x07 8 Normal instrument Snare drum
0x08 9 Normal instrument Tom tom
0x09 10 Normal instrument Top cymbal
0x0A 11 Normal instrument Hi-hat cymbal
0x0B 12 Unused Unused
0x0C 13 Unused Unused
0x0D 14 Unused Unused
0x0E 15 Unused Unused
0x0F 16 Unused Unused


Links