diff options
author | 2009-09-10 12:28:51 +0000 | |
---|---|---|
committer | 2009-09-10 12:28:51 +0000 | |
commit | 32e04ee9efb01c529f003c9ad5f608ad4381916a (patch) | |
tree | 877f255e371f408c96b9792268a23f40176ef2cb /src/emu/sound/cdp1863.h | |
parent | 7d526a162a08dc0d87a241d54ab15805c9816807 (diff) |
Added CDP1863 sound device for MESS.
Diffstat (limited to 'src/emu/sound/cdp1863.h')
-rw-r--r-- | src/emu/sound/cdp1863.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/emu/sound/cdp1863.h b/src/emu/sound/cdp1863.h new file mode 100644 index 00000000000..f366c3ca430 --- /dev/null +++ b/src/emu/sound/cdp1863.h @@ -0,0 +1,68 @@ +/********************************************************************** + + RCA CDP1863 CMOS 8-Bit Programmable Frequency Generator emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +********************************************************************** + _____ _____ + _RESET 1 |* \_/ | 16 Vdd + CLK 2 2 | | 15 OE + CLK 1 3 | | 14 OUT + STR 4 | CDP1863 | 13 DO7 + DI0 5 | | 12 DI6 + DI1 6 | | 11 DI5 + DI2 7 | | 10 DI4 + Vss 8 |_____________| 9 DI3 + +**********************************************************************/ + +#ifndef __CDP1863__ +#define __CDP1863__ + +/*************************************************************************** + MACROS / CONSTANTS +***************************************************************************/ + +#define CDP1863 DEVICE_GET_INFO_NAME(cdp1863) +#define SOUND_CDP1863 CDP1863 + +#define MDRV_CDP1863_ADD(_tag, _clock1, _clock2) \ + MDRV_DEVICE_ADD(_tag, SOUND, _clock1) \ + MDRV_DEVICE_CONFIG_DATAPTR(cdp1863_config, type, SOUND_CDP1863) \ + MDRV_DEVICE_CONFIG_DATA32(cdp1863_config, clock2, _clock2) + +#define CDP1863_INTERFACE(name) \ + const cdp1863_interface (name) = + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +typedef struct _cdp1863_config cdp1863_config; +struct _cdp1863_config +{ + const sound_config *type; + + int clock2; /* the clock 2 (pin 2) of the chip */ +}; + +/*************************************************************************** + PROTOTYPES +***************************************************************************/ + +/* device interface */ +DEVICE_GET_INFO( cdp1863 ); + +/* load tone latch */ +WRITE8_DEVICE_HANDLER( cdp1863_str_w ); + +/* output enable */ +WRITE_LINE_DEVICE_HANDLER( cdp1863_oe_w ); + +/* clock setters */ +void cdp1863_set_clk1(const device_config *device, int frequency) ATTR_NONNULL(1); +void cdp1863_set_clk2(const device_config *device, int frequency) ATTR_NONNULL(1); + +#endif |