annotate vgm.h @ 989:d70000fdff0b

Implemented IR and undefined bits of info word for address error exception frames
author Michael Pavone <pavone@retrodev.com>
date Wed, 27 Apr 2016 21:39:17 -0700
parents a2034b8d7495
children 508522f08e4d
rev   line source
pavone@862 1 #ifndef VGM_H_
pavone@862 2 #define VGM_H_
pavone@862 3
pavone@862 4 #pragma pack(push, 1)
pavone@862 5 typedef struct {
pavone@862 6 char ident[4];
pavone@862 7 uint32_t eof_offset;
pavone@862 8 uint32_t version;
pavone@862 9 uint32_t sn76489_clk;
pavone@862 10 uint32_t ym2413_clk;
pavone@862 11 uint32_t gd3_offset;
pavone@862 12 uint32_t num_samples;
pavone@862 13 uint32_t loop_offset;
pavone@862 14 uint32_t loop_samples;
pavone@862 15 uint32_t rate;
pavone@862 16 uint16_t sn76489_fb;
pavone@862 17 uint8_t sn76489_shift;
pavone@862 18 uint8_t sn76489_flags;
pavone@862 19 uint32_t ym2612_clk;
pavone@862 20 uint32_t ym2151_clk;
pavone@862 21 uint32_t data_offset;
pavone@862 22 uint32_t sega_pcm_clk;
pavone@862 23 uint32_t sega_pcm_reg;
pavone@862 24 } vgm_header;
pavone@862 25
pavone@862 26 enum {
pavone@862 27 CMD_PSG_STEREO = 0x4F,
pavone@862 28 CMD_PSG,
pavone@862 29 CMD_YM2413,
pavone@862 30 CMD_YM2612_0,
pavone@862 31 CMD_YM2612_1,
pavone@862 32 CMD_YM2151,
pavone@862 33 CMD_YM2203,
pavone@862 34 CMD_YM2608_0,
pavone@862 35 CMD_YM2608_1,
pavone@862 36 CMD_YM2610_0,
pavone@862 37 CMD_YM2610_1,
pavone@862 38 CMD_YM3812,
pavone@862 39 CMD_YM3526,
pavone@862 40 CMD_Y8950,
pavone@862 41 CMD_YMZ280B,
pavone@862 42 CMD_YMF262_0,
pavone@862 43 CMD_YMF262_1,
pavone@862 44 CMD_WAIT = 0x61,
pavone@862 45 CMD_WAIT_60,
pavone@862 46 CMD_WAIT_50,
pavone@862 47 CMD_END = 0x66,
pavone@862 48 CMD_DATA,
pavone@862 49 CMD_PCM_WRITE,
pavone@862 50 CMD_WAIT_SHORT = 0x70,
pavone@862 51 CMD_YM2612_DAC = 0x80,
pavone@862 52 CMD_DAC_STREAM_SETUP = 0x90,
pavone@862 53 CMD_DAC_STREAM_DATA,
pavone@862 54 CMD_DAC_STREAM_FREQ,
pavone@862 55 CMD_DAC_STREAM_START,
pavone@862 56 CMD_DAC_STREAM_STOP,
pavone@862 57 CMD_DAC_STREAM_STARTFAST,
pavone@862 58 CMD_DATA_SEEK = 0xE0
pavone@862 59 };
pavone@862 60
pavone@862 61 enum {
pavone@862 62 DATA_YM2612_PCM = 0
pavone@862 63 };
pavone@862 64
pavone@862 65 #pragma pack(pop)
pavone@862 66
pavone@862 67 typedef struct {
pavone@862 68 struct data_block *next;
pavone@862 69 uint8_t *data;
pavone@862 70 uint32_t size;
pavone@862 71 uint8_t type;
pavone@862 72 } data_block;
pavone@862 73
pavone@862 74 #endif //VGM_H_