src/mess/machine/a2echoii.c
| r0 | r15433 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2echoii.c |
| 4 | |
| 5 | Implementation of the Street Electronics Echo II speech card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #include "a2echoii.h" |
| 10 | #include "includes/apple2.h" |
| 11 | #include "sound/tms5220.h" |
| 12 | |
| 13 | /*************************************************************************** |
| 14 | PARAMETERS |
| 15 | ***************************************************************************/ |
| 16 | |
| 17 | //************************************************************************** |
| 18 | // GLOBAL VARIABLES |
| 19 | //************************************************************************** |
| 20 | |
| 21 | const device_type A2BUS_ECHOII = &device_creator<a2bus_echoii_device>; |
| 22 | |
| 23 | #define TMS_TAG "tms5220" |
| 24 | |
| 25 | MACHINE_CONFIG_FRAGMENT( a2echoii ) |
| 26 | MCFG_SPEAKER_STANDARD_MONO("echoii") |
| 27 | MCFG_SOUND_ADD(TMS_TAG, TMS5220, 720000) |
| 28 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "echoii", 1.0) |
| 29 | MACHINE_CONFIG_END |
| 30 | |
| 31 | /*************************************************************************** |
| 32 | FUNCTION PROTOTYPES |
| 33 | ***************************************************************************/ |
| 34 | |
| 35 | //------------------------------------------------- |
| 36 | // machine_config_additions - device-specific |
| 37 | // machine configurations |
| 38 | //------------------------------------------------- |
| 39 | |
| 40 | machine_config_constructor a2bus_echoii_device::device_mconfig_additions() const |
| 41 | { |
| 42 | return MACHINE_CONFIG_NAME( a2echoii ); |
| 43 | } |
| 44 | |
| 45 | //************************************************************************** |
| 46 | // LIVE DEVICE |
| 47 | //************************************************************************** |
| 48 | |
| 49 | a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 50 | device_t(mconfig, type, name, tag, owner, clock), |
| 51 | device_a2bus_card_interface(mconfig, *this), |
| 52 | m_tms(*this, TMS_TAG) |
| 53 | { |
| 54 | m_shortname = "a2echoii"; |
| 55 | } |
| 56 | |
| 57 | a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 58 | device_t(mconfig, A2BUS_ECHOII, "Street Electronics Echo II", tag, owner, clock), |
| 59 | device_a2bus_card_interface(mconfig, *this), |
| 60 | m_tms(*this, TMS_TAG) |
| 61 | { |
| 62 | m_shortname = "a2echoii"; |
| 63 | } |
| 64 | |
| 65 | //------------------------------------------------- |
| 66 | // device_start - device-specific startup |
| 67 | //------------------------------------------------- |
| 68 | |
| 69 | void a2bus_echoii_device::device_start() |
| 70 | { |
| 71 | // set_a2bus_device makes m_slot valid |
| 72 | set_a2bus_device(); |
| 73 | } |
| 74 | |
| 75 | void a2bus_echoii_device::device_reset() |
| 76 | { |
| 77 | } |
| 78 | |
| 79 | UINT8 a2bus_echoii_device::read_c0nx(address_space &space, UINT8 offset) |
| 80 | { |
| 81 | switch (offset) |
| 82 | { |
| 83 | case 0: |
| 84 | return 0x1f | tms5220_status_r(m_tms, 0); |
| 85 | break; |
| 86 | } |
| 87 | |
| 88 | return 0; |
| 89 | } |
| 90 | |
| 91 | void a2bus_echoii_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data) |
| 92 | { |
| 93 | switch (offset) |
| 94 | { |
| 95 | case 0: |
| 96 | tms5220_data_w(m_tms, offset, data); |
| 97 | break; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | bool a2bus_echoii_device::take_c800() |
| 102 | { |
| 103 | return false; |
| 104 | } |
| 105 | |
src/mess/machine/a2echoii.h
| r0 | r15433 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2echoii.h |
| 4 | |
| 5 | Implementation of the Street Electronics Echo II speech card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #ifndef __A2BUS_ECHOII__ |
| 10 | #define __A2BUS_ECHOII__ |
| 11 | |
| 12 | #include "emu.h" |
| 13 | #include "machine/a2bus.h" |
| 14 | |
| 15 | //************************************************************************** |
| 16 | // TYPE DEFINITIONS |
| 17 | //************************************************************************** |
| 18 | |
| 19 | class a2bus_echoii_device: |
| 20 | public device_t, |
| 21 | public device_a2bus_card_interface |
| 22 | { |
| 23 | public: |
| 24 | // construction/destruction |
| 25 | a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); |
| 26 | a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 27 | |
| 28 | // optional information overrides |
| 29 | virtual machine_config_constructor device_mconfig_additions() const; |
| 30 | |
| 31 | required_device<device_t> m_tms; |
| 32 | |
| 33 | protected: |
| 34 | virtual void device_start(); |
| 35 | virtual void device_reset(); |
| 36 | |
| 37 | // overrides of standard a2bus slot functions |
| 38 | virtual UINT8 read_c0nx(address_space &space, UINT8 offset); |
| 39 | virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data); |
| 40 | virtual bool take_c800(); |
| 41 | }; |
| 42 | |
| 43 | // device type definition |
| 44 | extern const device_type A2BUS_ECHOII; |
| 45 | |
| 46 | #endif /* __A2BUS_ECHOII__ */ |
| 47 | |
src/mess/drivers/apple2.c
| r15432 | r15433 | |
| 208 | 208 | #include "machine/a2sam.h" |
| 209 | 209 | #include "machine/a2alfam2.h" |
| 210 | 210 | #include "machine/laser128.h" |
| 211 | #include "machine/a2echoii.h" |
| 211 | 212 | |
| 212 | 213 | /*************************************************************************** |
| 213 | 214 | PARAMETERS |
| r15432 | r15433 | |
| 626 | 627 | SLOT_INTERFACE("themill", A2BUS_THEMILL) /* Stellation Two The Mill (6809 card) */ |
| 627 | 628 | SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ |
| 628 | 629 | SLOT_INTERFACE("alfam2", A2BUS_ALFAM2) /* ALF Apple Music II */ |
| 630 | SLOT_INTERFACE("echoii", A2BUS_ECHOII) /* Street Electronics Echo II */ |
| 629 | 631 | // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ |
| 630 | 632 | SLOT_INTERFACE_END |
| 631 | 633 | |