1 /**********************************************************************************************
2  *
3  *   Ensoniq ES5505/6 driver
4  *   by Aaron Giles
5  *
6  **********************************************************************************************/
7 
8 #ifndef __ES5506_H__
9 #define __ES5506_H__
10 
11 typedef void (*irq_callback)(INT32 param);
12 typedef UINT16(port_read)();
13 
14 typedef struct _es5505_interface es5505_interface;
15 struct _es5505_interface
16 {
17 	const INT8 * region0;						/* memory region where the sample ROM lives */
18 	const INT8 * region1;						/* memory region where the sample ROM lives */
19 	void (*irq_callback)(INT32 state);	/* irq callback */
20 	UINT16 (*read_port)();			/* input port read */
21 };
22 
23 typedef struct _es5506_interface es5506_interface;
24 struct _es5506_interface
25 {
26 	const INT8 * region0;						/* memory region where the sample ROM lives */
27 	const INT8 * region1;						/* memory region where the sample ROM lives */
28 	const INT8 * region2;						/* memory region where the sample ROM lives */
29 	const INT8 * region3;						/* memory region where the sample ROM lives */
30 	void (*irq_callback)(INT32 state);	/* irq callback */
31 	UINT16 (*read_port)();			/* input port read */
32 };
33 
34 extern INT32 ES550X_twincobra2_pan_fix;
35 
36 void ES5506Update(INT16 *outputs, INT32 samples_len);
37 #define ES5505Update ES5506Update
38 void ES5506Init(INT32 clock, UINT8 *region0, UINT8 *region1, UINT8 *region2, UINT8 *region3, irq_callback callback);
39 void ES5506Exit();
40 void ES5506Reset();
41 void ES5506Write(UINT32 offset, UINT8 data);
42 UINT8 ES5506Read(UINT32 offset);
43 void es5506_voice_bank_w(INT32 voice, INT32 bank);
44 void ES5505Init(INT32 clock, UINT8 *region0, UINT8* region1, irq_callback callback);
45 #define ES5505Reset	ES5506Reset
46 #define ES5505Exit	ES5506Exit
47 void ES5505Write(UINT32 offset, UINT16 data);
48 UINT16 ES5505Read(UINT32 offset);
49 void es5505_voice_bank_w(INT32 voice, INT32 bank);
50 void ES5506Scan(INT32 nAction, INT32* pnMin);
51 void ES5506ScanRoutes(INT32 nAction, INT32* pnMin);
52 
53 void ES5506SetRoute(INT32 chip /*always 0*/, double nVolume, INT32 nRoute);
54 #define BURN_SND_ES5506_ROUTE_LEFT	1
55 #define BURN_SND_ES5506_ROUTE_RIGHT	2
56 #define BURN_SND_ES5506_ROUTE_BOTH	3
57 
58 #endif /* __ES5506_H__ */
59