trunk/src/emu/bus/a2bus/a2dx1.c
| r0 | r31132 | |
| 1 | // license:BSD-3-Clause |
| 2 | // copyright-holders:R. Belmont |
| 3 | /********************************************************************* |
| 4 | |
| 5 | a2dx1.c |
| 6 | |
| 7 | Implementation of the Decillionix DX-1 sampler card |
| 8 | |
| 9 | *********************************************************************/ |
| 10 | |
| 11 | #include "a2dx1.h" |
| 12 | #include "includes/apple2.h" |
| 13 | #include "sound/dac.h" |
| 14 | |
| 15 | /*************************************************************************** |
| 16 | PARAMETERS |
| 17 | ***************************************************************************/ |
| 18 | |
| 19 | //************************************************************************** |
| 20 | // GLOBAL VARIABLES |
| 21 | //************************************************************************** |
| 22 | |
| 23 | const device_type A2BUS_DX1 = &device_creator<a2bus_dx1_device>; |
| 24 | |
| 25 | #define DAC_TAG "dac" |
| 26 | |
| 27 | MACHINE_CONFIG_FRAGMENT( a2dx1 ) |
| 28 | MCFG_SPEAKER_STANDARD_MONO("dx1spkr") |
| 29 | MCFG_SOUND_ADD(DAC_TAG, DAC, 0) |
| 30 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "dx1spkr", 1.00) |
| 31 | MACHINE_CONFIG_END |
| 32 | |
| 33 | /*************************************************************************** |
| 34 | FUNCTION PROTOTYPES |
| 35 | ***************************************************************************/ |
| 36 | |
| 37 | //------------------------------------------------- |
| 38 | // machine_config_additions - device-specific |
| 39 | // machine configurations |
| 40 | //------------------------------------------------- |
| 41 | |
| 42 | machine_config_constructor a2bus_dx1_device::device_mconfig_additions() const |
| 43 | { |
| 44 | return MACHINE_CONFIG_NAME( a2dx1 ); |
| 45 | } |
| 46 | |
| 47 | //************************************************************************** |
| 48 | // LIVE DEVICE |
| 49 | //************************************************************************** |
| 50 | |
| 51 | a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : |
| 52 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
| 53 | device_a2bus_card_interface(mconfig, *this), |
| 54 | m_dac(*this, DAC_TAG) |
| 55 | { |
| 56 | } |
| 57 | |
| 58 | a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 59 | device_t(mconfig, A2BUS_DX1, "Decillonix DX-1", tag, owner, clock, "a2dx1", __FILE__), |
| 60 | device_a2bus_card_interface(mconfig, *this), |
| 61 | m_dac(*this, DAC_TAG) |
| 62 | { |
| 63 | } |
| 64 | |
| 65 | //------------------------------------------------- |
| 66 | // device_start - device-specific startup |
| 67 | //------------------------------------------------- |
| 68 | |
| 69 | void a2bus_dx1_device::device_start() |
| 70 | { |
| 71 | // set_a2bus_device makes m_slot valid |
| 72 | set_a2bus_device(); |
| 73 | } |
| 74 | |
| 75 | void a2bus_dx1_device::device_reset() |
| 76 | { |
| 77 | } |
| 78 | |
| 79 | UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset) |
| 80 | { |
| 81 | switch (offset) |
| 82 | { |
| 83 | case 1: // ADC input |
| 84 | return 0; |
| 85 | |
| 86 | case 3: // busy flag |
| 87 | return 0x80; // indicate not busy |
| 88 | |
| 89 | case 7: // 1-bit ADC input (bit 7 of c0n1, probably) |
| 90 | return 0; |
| 91 | } |
| 92 | |
| 93 | return 0xff; |
| 94 | } |
| 95 | |
| 96 | void a2bus_dx1_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data) |
| 97 | { |
| 98 | switch (offset) |
| 99 | { |
| 100 | case 5: // volume |
| 101 | break; |
| 102 | |
| 103 | case 6: |
| 104 | m_dac->write_unsigned8(data); |
| 105 | break; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | bool a2bus_dx1_device::take_c800() |
| 110 | { |
| 111 | return false; |
| 112 | } |
trunk/src/emu/bus/a2bus/a2dx1.h
| r0 | r31132 | |
| 1 | // license:BSD-3-Clause |
| 2 | // copyright-holders:R. Belmont |
| 3 | /********************************************************************* |
| 4 | |
| 5 | a2dx1.h |
| 6 | |
| 7 | Implementation of the Decillionix DX-1 sampler card |
| 8 | |
| 9 | *********************************************************************/ |
| 10 | |
| 11 | #ifndef __A2BUS_DX1__ |
| 12 | #define __A2BUS_DX1__ |
| 13 | |
| 14 | #include "emu.h" |
| 15 | #include "a2bus.h" |
| 16 | #include "sound/dac.h" |
| 17 | |
| 18 | //************************************************************************** |
| 19 | // TYPE DEFINITIONS |
| 20 | //************************************************************************** |
| 21 | |
| 22 | class a2bus_dx1_device: |
| 23 | public device_t, |
| 24 | public device_a2bus_card_interface |
| 25 | { |
| 26 | public: |
| 27 | // construction/destruction |
| 28 | a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
| 29 | a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 30 | |
| 31 | // optional information overrides |
| 32 | virtual machine_config_constructor device_mconfig_additions() const; |
| 33 | |
| 34 | required_device<dac_device> m_dac; |
| 35 | |
| 36 | protected: |
| 37 | virtual void device_start(); |
| 38 | virtual void device_reset(); |
| 39 | |
| 40 | // overrides of standard a2bus slot functions |
| 41 | virtual UINT8 read_c0nx(address_space &space, UINT8 offset); |
| 42 | virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data); |
| 43 | virtual bool take_c800(); |
| 44 | }; |
| 45 | |
| 46 | // device type definition |
| 47 | extern const device_type A2BUS_DX1; |
| 48 | |
| 49 | #endif /* __A2BUS_DX1__ */ |
trunk/src/mess/drivers/apple2.c
| r31131 | r31132 | |
| 213 | 213 | #include "bus/a2bus/a2pic.h" |
| 214 | 214 | #include "bus/a2bus/a2corvus.h" |
| 215 | 215 | #include "bus/a2bus/a2mcms.h" |
| 216 | #include "bus/a2bus/a2dx1.h" |
| 216 | 217 | #include "bus/a2bus/a2estd80col.h" |
| 217 | 218 | #include "bus/a2bus/a2eext80col.h" |
| 218 | 219 | #include "bus/a2bus/a2eramworks3.h" |
| r31131 | r31132 | |
| 980 | 981 | SLOT_INTERFACE("corvus", A2BUS_CORVUS) /* Corvus flat-cable HDD interface (must go in slot 6) */ |
| 981 | 982 | SLOT_INTERFACE("mcms1", A2BUS_MCMS1) /* Mountain Computer Music System, card 1 of 2 */ |
| 982 | 983 | SLOT_INTERFACE("mcms2", A2BUS_MCMS2) /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */ |
| 984 | SLOT_INTERFACE("dx1", A2BUS_DX1) /* Decillonix DX-1 sampler card */ |
| 983 | 985 | SLOT_INTERFACE_END |
| 984 | 986 | |
| 985 | 987 | static SLOT_INTERFACE_START(apple2eaux_cards) |