]> 4ch.mooo.com Git - 16.git/blob - src/lib/vgmsnd/VGMFile.h
updating copy left. i am super fuckin busy with school, and trying to get life back...
[16.git] / src / lib / vgmsnd / VGMFile.h
1 #ifndef __VGMFILE_H__
2 #define __VGMFILE_H__
3
4 // Header file for VGM file handling
5
6 typedef struct _vgm_file_header
7 {
8         UINT32 fccVGM;
9         UINT32 lngEOFOffset;
10         UINT32 lngVersion;
11         UINT32 lngHzPSG;
12         UINT32 lngHzYM2413;
13         UINT32 lngGD3Offset;
14         UINT32 lngTotalSamples;
15         UINT32 lngLoopOffset;
16         UINT32 lngLoopSamples;
17         UINT32 lngRate;
18         UINT16 shtPSG_Feedback;
19         UINT8 bytPSG_SRWidth;
20         UINT8 bytPSG_Flags;
21         UINT32 lngHzYM2612;
22         UINT32 lngHzYM2151;
23         UINT32 lngDataOffset;
24         UINT32 lngHzSPCM;
25         UINT32 lngSPCMIntf;
26         UINT32 lngHzRF5C68;
27         UINT32 lngHzYM2203;
28         UINT32 lngHzYM2608;
29         UINT32 lngHzYM2610;
30         UINT32 lngHzYM3812;
31         UINT32 lngHzYM3526;
32         UINT32 lngHzY8950;
33         UINT32 lngHzYMF262;
34         UINT32 lngHzYMF278B;
35         UINT32 lngHzYMF271;
36         UINT32 lngHzYMZ280B;
37         UINT32 lngHzRF5C164;
38         UINT32 lngHzPWM;
39         UINT32 lngHzAY8910;
40         UINT8 bytAYType;
41         UINT8 bytAYFlag;
42         UINT8 bytAYFlagYM2203;
43         UINT8 bytAYFlagYM2608;
44         UINT8 bytVolumeModifier;
45         UINT8 bytReserved2;
46         INT8 bytLoopBase;
47         UINT8 bytLoopModifier;
48         UINT32 lngHzGBDMG;
49         UINT32 lngHzNESAPU;
50         UINT32 lngHzMultiPCM;
51         UINT32 lngHzUPD7759;
52         UINT32 lngHzOKIM6258;
53         UINT8 bytOKI6258Flags;
54         UINT8 bytK054539Flags;
55         UINT8 bytC140Type;
56         UINT8 bytReservedFlags;
57         UINT32 lngHzOKIM6295;
58         UINT32 lngHzK051649;
59         UINT32 lngHzK054539;
60         UINT32 lngHzHuC6280;
61         UINT32 lngHzC140;
62         UINT32 lngHzK053260;
63         UINT32 lngHzPokey;
64         UINT32 lngHzQSound;
65         UINT32 lngHzSCSP;
66 //      UINT32 lngHzOKIM6376;
67         //UINT8 bytReserved[0x04];
68         UINT32 lngExtraOffset;
69         UINT32 lngHzWSwan;
70         UINT32 lngHzVSU;
71         UINT32 lngHzSAA1099;
72         UINT32 lngHzES5503;
73         UINT32 lngHzES5506;
74         UINT8 bytES5503Chns;
75         UINT8 bytES5506Chns;
76         UINT8 bytC352ClkDiv;
77         UINT8 bytESReserved;
78         UINT32 lngHzX1_010;
79         UINT32 lngHzC352;
80         UINT32 lngHzGA20;
81 } VGM_HEADER;
82 typedef struct _vgm_header_extra
83 {
84         UINT32 DataSize;
85         UINT32 Chp2ClkOffset;
86         UINT32 ChpVolOffset;
87 } VGM_HDR_EXTRA;
88 typedef struct _vgm_extra_chip_data32
89 {
90         UINT8 Type;
91         UINT32 Data;
92 } VGMX_CHIP_DATA32;
93 typedef struct _vgm_extra_chip_data16
94 {
95         UINT8 Type;
96         UINT8 Flags;
97         UINT16 Data;
98 } VGMX_CHIP_DATA16;
99 typedef struct _vgm_extra_chip_extra32
100 {
101         UINT8 ChipCnt;
102         VGMX_CHIP_DATA32* CCData;
103 } VGMX_CHP_EXTRA32;
104 typedef struct _vgm_extra_chip_extra16
105 {
106         UINT8 ChipCnt;
107         VGMX_CHIP_DATA16* CCData;
108 } VGMX_CHP_EXTRA16;
109 typedef struct _vgm_header_extra_data
110 {
111         VGMX_CHP_EXTRA32 Clocks;
112         VGMX_CHP_EXTRA16 Volumes;
113 } VGM_EXTRA;
114
115 #define VOLUME_MODIF_WRAP       0xC0
116 typedef struct _vgm_gd3_tag
117 {
118         UINT32 fccGD3;
119         UINT32 lngVersion;
120         UINT32 lngTagLength;
121         wchar_t* strTrackNameE;
122         wchar_t* strTrackNameJ;
123         wchar_t* strGameNameE;
124         wchar_t* strGameNameJ;
125         wchar_t* strSystemNameE;
126         wchar_t* strSystemNameJ;
127         wchar_t* strAuthorNameE;
128         wchar_t* strAuthorNameJ;
129         wchar_t* strReleaseDate;
130         wchar_t* strCreator;
131         wchar_t* strNotes;
132 } GD3_TAG;
133 typedef struct _vgm_pcm_bank_data
134 {
135         UINT32 DataSize;
136         UINT8* Data;
137         UINT32 DataStart;
138 } VGM_PCM_DATA;
139 typedef struct _vgm_pcm_bank
140 {
141         UINT32 BankCount;
142         VGM_PCM_DATA* Bank;
143         UINT32 DataSize;
144         UINT8* Data;
145         UINT32 DataPos;
146         UINT32 BnkPos;
147 } VGM_PCM_BANK;
148
149 #define FCC_VGM 0x206D6756      // 'Vgm '
150 #define FCC_GD3 0x20336447      // 'Gd3 '
151
152 #endif  // __VGMFILE_H__