.82M (Heroes of Might and Magic)

From REWiki

Revision as of 20:52, 1 November 2006; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


Contents

Games

.82M files are used in Heroes of Might and Magic and Heroes of Might and Magic II. These files are raw audio files with the following settings:

Sample Size    : 8-bits 
Sample Encoding: signed (2's complement)
Channels       : 1
Sample Rate    : 22050

File Size

Varies with length of audio


Required

Yes


Compression

No


Structure

struct __attribute__((packed)){
   unsigned int riff;		// "RIFF"
   unsigned int size;		// size_d + 0x22
   unsigned int wave;		// "WAVE"
   unsigned int fmt;		// "FMT"
   unsigned int size_t;		// 0x10
   unsigned short int format;	// 0x01 pcm
   unsigned short int channels;	// 0x01 mono
   unsigned int samples;	// 22050
   unsigned int byteper;	// 22050 = channels * samples * bitsper / 8
   unsigned short int align;	// 1     = channels * bitsper / 8
   unsigned short int bitsper;	// 8
   unsigned int data;		// "DATA"
   unsigned int size_d;		//
} wavetable;

Notes

Can be open and converted with audio software that can handle RAW audio files. Can also be converted to a standard wave file with the code from here