~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/emu/sound/tms5220.h

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#ifndef __TMS5220_H__
4
4
#define __TMS5220_H__
5
5
 
6
 
void *tms5220_create(const device_config *device);
7
 
void tms5220_destroy(void *chip);
8
 
 
9
 
void tms5220_reset_chip(void *chip);
10
 
void tms5220_set_irq(void *chip, void (*func)(const device_config *, int));
11
 
 
12
 
void tms5220_data_write(void *chip, int data);
13
 
int tms5220_status_read(void *chip);
14
 
int tms5220_ready_read(void *chip);
15
 
int tms5220_cycles_to_ready(void *chip);
16
 
int tms5220_int_read(void *chip);
17
 
 
18
 
void tms5220_process(void *chip, INT16 *buffer, unsigned int size);
19
 
 
20
 
/* three variables added by R Nabet */
21
 
void tms5220_set_read(void *chip, int (*func)(const device_config *, int));
22
 
void tms5220_set_load_address(void *chip, void (*func)(const device_config *, int));
23
 
void tms5220_set_read_and_branch(void *chip, void (*func)(const device_config *));
24
 
 
25
 
 
26
 
enum _tms5220_variant
 
6
#include "devcb.h"
 
7
 
 
8
/* clock rate = 80 * output sample rate,     */
 
9
/* usually 640000 for 8000 Hz sample rate or */
 
10
/* usually 800000 for 10000 Hz sample rate.  */
 
11
 
 
12
typedef struct _tms5220_interface tms5220_interface;
 
13
struct _tms5220_interface
27
14
{
28
 
        variant_tms5220,        /* TMS5220_IS_TMS5220, TMS5220_IS_TMS5220C,  TMS5220_IS_TSP5220C */
29
 
        variant_tmc0285         /* TMS5220_IS_TMS5200, TMS5220_IS_CD2501 */
 
15
        devcb_write_line irq_func;              /* IRQ callback function */
 
16
 
 
17
        int (*read)(const device_config *device, int count);                    /* speech ROM read callback */
 
18
        void (*load_address)(const device_config *device, int data);    /* speech ROM load address callback */
 
19
        void (*read_and_branch)(const device_config *device);           /* speech ROM read and branch callback */
30
20
};
31
 
typedef enum _tms5220_variant tms5220_variant;
32
 
 
33
 
void tms5220_set_variant(void *chip, tms5220_variant new_variant);
 
21
 
 
22
/* Control lines - once written to will switch interface into
 
23
 * "true" timing behaviour.
 
24
 */
 
25
 
 
26
/* all lines with suffix q are active low! */
 
27
 
 
28
WRITE_LINE_DEVICE_HANDLER( tms5220_rsq_w );
 
29
WRITE_LINE_DEVICE_HANDLER( tms5220_wsq_w );
 
30
 
 
31
WRITE8_DEVICE_HANDLER( tms5220_data_w );
 
32
READ8_DEVICE_HANDLER( tms5220_status_r );
 
33
 
 
34
READ_LINE_DEVICE_HANDLER( tms5220_readyq_r );
 
35
READ_LINE_DEVICE_HANDLER( tms5220_intq_r );
 
36
 
 
37
 
 
38
double tms5220_time_to_ready(const device_config *device);
 
39
 
 
40
void tms5220_set_frequency(const device_config *device, int frequency);
 
41
 
 
42
DEVICE_GET_INFO( tms5220c );
 
43
DEVICE_GET_INFO( tms5220 );
 
44
DEVICE_GET_INFO( tmc0285 );
 
45
DEVICE_GET_INFO( tms5200 );
 
46
 
 
47
#define SOUND_TMS5220C DEVICE_GET_INFO_NAME( tms5220c )
 
48
#define SOUND_TMS5220 DEVICE_GET_INFO_NAME( tms5220 )
 
49
#define SOUND_TMC0285 DEVICE_GET_INFO_NAME( tmc0285 )
 
50
#define SOUND_TMS5200 DEVICE_GET_INFO_NAME( tms5200 )
 
51
 
34
52
 
35
53
#endif /* __TMS5220_H__ */