1 /* Header for module A2player, generated by p2c 1.21alpha-07.Dec.93 */
9 # define vextern extern
13 #define MAX_IRQ_FREQ 1000
16 #define BYTE_NULL 0xff
18 #define WORD_NULL 0xffffL
19 /* p2c: typconst.inc, line 4: Warning: Mismatched '$' signs [241] */
22 /* p2c: typconst.inc, line 4:
23 * Warning: Expected a semicolon, found 'ffffffff' [227] */
26 typedef uchar tCHAR8x8[256][8];
27 typedef uchar tCHAR8x16[256][16];
34 typedef tRGB tRGB_PALETTE[256];
39 #define ef_FSlideDown 2
40 #define ef_TonePortamento 3
42 #define ef_TPortamVolSlide 5
43 #define ef_VibratoVolSlide 6
44 #define ef_FSlideUpFine 7
45 #define ef_FSlideDownFine 8
46 #define ef_SetModulatorVol 9
47 #define ef_VolSlide 10
48 #define ef_PositionJump 11
49 #define ef_SetInsVolume 12
50 #define ef_PatternBreak 13
51 #define ef_SetTempo 14
52 #define ef_SetSpeed 15
53 #define ef_TPortamVSlideFine 16
54 #define ef_VibratoVSlideFine 17
55 #define ef_SetCarrierVol 18
56 #define ef_SetWaveform 19
57 #define ef_VolSlideFine 20
58 #define ef_RetrigNote 21
61 #define ef_ArpggVSlide 24
62 #define ef_ArpggVSlideFine 25
63 #define ef_MultiRetrigNote 26
64 #define ef_FSlideUpVSlide 27
65 #define ef_FSlideDownVSlide 28
66 #define ef_FSlUpFineVSlide 29
67 #define ef_FSlDownFineVSlide 30
68 #define ef_FSlUpVSlF 31
69 #define ef_FSlDownVSlF 32
70 #define ef_FSlUpFineVSlF 33
71 #define ef_FSlDownFineVSlF 34
72 #define ef_Extended 35
73 #define ef_Extended2 36
74 #define ef_SetGlobalVolume 37
75 #define ef_SwapArpeggio 38
76 #define ef_SwapVibrato 39
77 #define ef_ForceInsVolume 40
78 #define ef_Extended3 41
79 #define ef_ExtraFineArpeggio 42
80 #define ef_ExtraFineVibrato 43
81 #define ef_ExtraFineTremolo 44
82 #define ef_SetCustomSpeedTab 45
83 #define ef_GlobalFSlideUp 46
84 #define ef_GlobalFSlideDown 47
85 #define ef_ex_SetTremDepth 0
86 #define ef_ex_SetVibDepth 1
87 #define ef_ex_SetAttckRateM 2
88 #define ef_ex_SetDecayRateM 3
89 #define ef_ex_SetSustnLevelM 4
90 #define ef_ex_SetRelRateM 5
91 #define ef_ex_SetAttckRateC 6
92 #define ef_ex_SetDecayRateC 7
93 #define ef_ex_SetSustnLevelC 8
94 #define ef_ex_SetRelRateC 9
95 #define ef_ex_SetFeedback 10
96 #define ef_ex_SetPanningPos 11
97 #define ef_ex_PatternLoop 12
98 #define ef_ex_PatternLoopRec 13
99 #define ef_ex_MacroKOffLoop 14
100 #define ef_ex_ExtendedCmd 15
101 #define ef_ex_cmd_RSS 0
102 #define ef_ex_cmd_ResetVol 1
103 #define ef_ex_cmd_LockVol 2
104 #define ef_ex_cmd_UnlockVol 3
105 #define ef_ex_cmd_LockVP 4
106 #define ef_ex_cmd_UnlockVP 5
107 #define ef_ex_cmd_VSlide_mod 6
108 #define ef_ex_cmd_VSlide_car 7
109 #define ef_ex_cmd_VSlide_def 8
110 #define ef_ex_cmd_LockPan 9
111 #define ef_ex_cmd_UnlockPan 10
112 #define ef_ex_cmd_VibrOff 11
113 #define ef_ex_cmd_TremOff 12
114 #define ef_ex_cmd_FVib_FGFS 13
115 #define ef_ex_cmd_FTrm_XFGFS 14
116 #define ef_ex_cmd_NoRestart 15
117 #define ef_ex2_PatDelayFrame 0
118 #define ef_ex2_PatDelayRow 1
119 #define ef_ex2_NoteDelay 2
120 #define ef_ex2_NoteCut 3
121 #define ef_ex2_FineTuneUp 4
122 #define ef_ex2_FineTuneDown 5
123 #define ef_ex2_GlVolSlideUp 6
124 #define ef_ex2_GlVolSlideDn 7
125 #define ef_ex2_GlVolSlideUpF 8
126 #define ef_ex2_GlVolSlideDnF 9
127 #define ef_ex2_GlVolSldUpXF 10
128 #define ef_ex2_GlVolSldDnXF 11
129 #define ef_ex2_VolSlideUpXF 12
130 #define ef_ex2_VolSlideDnXF 13
131 #define ef_ex2_FreqSlideUpXF 14
132 #define ef_ex2_FreqSlideDnXF 15
133 #define ef_ex3_SetConnection 0
134 #define ef_ex3_SetMultipM 1
135 #define ef_ex3_SetKslM 2
136 #define ef_ex3_SetTremoloM 3
137 #define ef_ex3_SetVibratoM 4
138 #define ef_ex3_SetKsrM 5
139 #define ef_ex3_SetSustainM 6
140 #define ef_ex3_SetMultipC 7
141 #define ef_ex3_SetKslC 8
142 #define ef_ex3_SetTremoloC 9
143 #define ef_ex3_SetVibratoC 10
144 #define ef_ex3_SetKsrC 11
145 #define ef_ex3_SetSustainC 12
153 typedef struct tFM_INST_DATA {
154 uchar AM_VIB_EG_modulator, AM_VIB_EG_carrier, KSL_VOLUM_modulator,
155 KSL_VOLUM_carrier, ATTCK_DEC_modulator, ATTCK_DEC_carrier,
156 SUSTN_REL_modulator, SUSTN_REL_carrier, WAVEFORM_modulator,
157 WAVEFORM_carrier, FEEDBACK_FM;
161 typedef struct tADTRACK2_INS {
162 tFM_INST_DATA fm_data;
169 typedef struct tARPEGGIO_TABLE {
170 uchar length, speed, loop_begin, loop_length, keyoff_pos;
175 typedef struct tVIBRATO_TABLE {
176 uchar length, speed, delay, loop_begin, loop_length, keyoff_pos;
181 typedef struct tREGISTER_TABLE_DEF {
182 tFM_INST_DATA fm_data;
183 /* p2c: a2player.pas, line 192:
184 * Warning: Symbol 'SMALLINT' is not defined [221] */
186 uchar panning, duration;
187 } tREGISTER_TABLE_DEF;
189 typedef long Smallint;
192 typedef struct tREGISTER_TABLE {
193 uchar length, loop_begin, loop_length, keyoff_pos, arpeggio_table,
195 tREGISTER_TABLE_DEF data[255];
199 typedef struct tMACRO_TABLE {
200 tARPEGGIO_TABLE arpeggio;
201 tVIBRATO_TABLE vibrato;
205 typedef struct tFM_PARAMETER_TABLE {
207 uchar attck, dec, sustn, rel, wform;
208 } adsrw_car, adsrw_mod;
209 uchar connect, feedb, multipM, kslM, tremM, vibrM, ksrM, sustM, multipC,
210 kslC, tremC, vibrC, ksrC, sustC;
211 } tFM_PARAMETER_TABLE;
214 typedef struct tADTRACK2_EVENT {
215 uchar note, instr_def, effect_def, effect, effect_def2, effect2;
219 typedef boolean tDIS_FMREG_COL[28];
222 typedef struct tFIXED_SONGDATA {
225 Char instr_names[255][43];
226 tADTRACK2_INS instr_data[255];
227 tREGISTER_TABLE instr_macros[255];
228 tMACRO_TABLE macro_table[255];
229 uchar pattern_order[0x80];
230 uchar tempo, speed, common_flag;
231 unsigned short patt_len;
233 unsigned short macro_speedup;
235 uchar lock_flags[20];
236 Char pattern_names[0x80][43];
237 tDIS_FMREG_COL dis_fmreg_col[255];
242 isPlaying, isPaused, isStopped
246 typedef tADTRACK2_EVENT tVARIABLE_DATA[8][20][0x100];
249 typedef tVARIABLE_DATA tPATTERN_DATA[16];
252 typedef uchar tDUMMY_BUFF[655350L];
255 typedef struct tOLD_ADTRACK2_INS {
256 tFM_INST_DATA fm_data;
262 typedef struct tOLD_FIXED_SONGDATA {
265 Char instr_names[250][33];
266 tOLD_ADTRACK2_INS instr_data[250];
267 uchar pattern_order[0x80];
268 uchar tempo, speed, common_flag;
269 } tOLD_FIXED_SONGDATA;
272 typedef struct tOLD_CHUNK {
273 uchar note, instr_def, effect_def, effect;
277 typedef tADTRACK2_EVENT tCHUNK;
280 typedef tOLD_CHUNK tOLD_VARIABLE_DATA1[0x10][0x40][9];
283 typedef tOLD_CHUNK tOLD_VARIABLE_DATA2[8][18][0x40];
286 typedef long tByteSet[9];
289 #define INSTRUMENT_SIZE (sizeof(tADTRACK2_INS))
290 #define CHUNK_SIZE (sizeof(tADTRACK2_EVENT))
291 #define PATTERN_SIZE (CHUNK_SIZE * 5120)
294 typedef struct tDECAY_BAR {
300 extern unsigned short opl3port;
301 extern short error_code;
302 extern uchar current_order, current_pattern, current_line, tempo, speed;
303 extern unsigned short macro_speedup;
304 extern boolean irq_mode;
305 extern uchar max_patterns;
306 extern boolean fast_forward;
307 extern uchar overall_volume, global_volume;
308 extern unsigned short song_timer, song_timer_tenths;
310 vextern unsigned short timer_temp, timer_det;
311 vextern long ticks, tick0, tickD, tickXF;
312 vextern boolean limit_exceeded;
314 vextern double time_playing;
315 vextern tVARIABLE_DATA *pattdata;
316 vextern tFIXED_SONGDATA songdata;
317 vextern tOLD_FIXED_SONGDATA old_songdata;
318 vextern tOLD_VARIABLE_DATA1 old_hash_buffer;
319 vextern tOLD_VARIABLE_DATA2 hash_buffer;
320 vextern uchar buffer[sizeof(tVARIABLE_DATA)];
321 extern Void (*external_irq_hook) PV();
322 extern long _delay_counter;
323 extern unsigned short irq_freq;
324 extern boolean irq_initialized, timer_fix, pattern_break, pattern_delay;
325 extern uchar next_line;
326 extern tPLAY_STATUS play_status;
327 extern boolean replay_forbidden, force_macro_keyon;
328 vextern tDECAY_BAR decay_bar[96];
331 extern Void start_playing PV();
332 extern Void set_overall_volume PP((int level));
333 extern Void stop_playing PV();
334 extern Void init_old_songdata PV();
335 extern Void init_songdata PV();
336 extern Void init_irq PV();
337 extern Void done_irq PV();
338 extern Void get_chunk PP((int pattern, int line, int channel,
339 tADTRACK2_EVENT *chunk));
340 extern Void put_chunk PP((int pattern, int line, int channel,
341 tADTRACK2_EVENT chunk));
342 extern Void count_order PP((uchar *entries));
343 extern Void timer_poll_proc PV();
344 extern Void opl3exp PP((int data));
346 extern short calc_following_order PP((int order));
347 extern Char *asciiz_string PP((Char *Result, Char *str));
352 #endif /*A2PLAYER_H*/