src/mess/machine/a2alfam2.c
| r0 | r15269 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2alfsm2.c |
| 4 | |
| 5 | Implementation of the ALF Apple Music II card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #include "a2alfam2.h" |
| 10 | #include "includes/apple2.h" |
| 11 | #include "sound/sn76496.h" |
| 12 | |
| 13 | /*************************************************************************** |
| 14 | PARAMETERS |
| 15 | ***************************************************************************/ |
| 16 | |
| 17 | //************************************************************************** |
| 18 | // GLOBAL VARIABLES |
| 19 | //************************************************************************** |
| 20 | |
| 21 | const device_type A2BUS_ALFAM2 = &device_creator<a2bus_alfam2_device>; |
| 22 | |
| 23 | #define SN1_TAG "sn76489_1" // left |
| 24 | #define SN2_TAG "sn76489_2" // center |
| 25 | #define SN3_TAG "sn76489_3" // right |
| 26 | |
| 27 | MACHINE_CONFIG_FRAGMENT( a2alfam2 ) |
| 28 | MCFG_SPEAKER_STANDARD_STEREO("alf_l", "alf_r") |
| 29 | MCFG_SOUND_ADD(SN1_TAG, SN76489, XTAL_3_579545MHz) |
| 30 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) |
| 31 | MCFG_SOUND_ADD(SN2_TAG, SN76489, XTAL_3_579545MHz) |
| 32 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) |
| 33 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) |
| 34 | MCFG_SOUND_ADD(SN3_TAG, SN76489, XTAL_3_579545MHz) |
| 35 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) |
| 36 | MACHINE_CONFIG_END |
| 37 | |
| 38 | /*************************************************************************** |
| 39 | FUNCTION PROTOTYPES |
| 40 | ***************************************************************************/ |
| 41 | |
| 42 | //------------------------------------------------- |
| 43 | // machine_config_additions - device-specific |
| 44 | // machine configurations |
| 45 | //------------------------------------------------- |
| 46 | |
| 47 | machine_config_constructor a2bus_alfam2_device::device_mconfig_additions() const |
| 48 | { |
| 49 | return MACHINE_CONFIG_NAME( a2alfam2 ); |
| 50 | } |
| 51 | |
| 52 | //************************************************************************** |
| 53 | // LIVE DEVICE |
| 54 | //************************************************************************** |
| 55 | |
| 56 | a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 57 | device_t(mconfig, type, name, tag, owner, clock), |
| 58 | device_a2bus_card_interface(mconfig, *this), |
| 59 | m_sn1(*this, SN1_TAG), |
| 60 | m_sn2(*this, SN2_TAG), |
| 61 | m_sn3(*this, SN3_TAG) |
| 62 | { |
| 63 | m_shortname = "a2alfam2"; |
| 64 | } |
| 65 | |
| 66 | a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 67 | device_t(mconfig, A2BUS_ALFAM2, "ALF Apple Music II", tag, owner, clock), |
| 68 | device_a2bus_card_interface(mconfig, *this), |
| 69 | m_sn1(*this, SN1_TAG), |
| 70 | m_sn2(*this, SN2_TAG), |
| 71 | m_sn3(*this, SN3_TAG) |
| 72 | { |
| 73 | m_shortname = "a2alfam2"; |
| 74 | } |
| 75 | |
| 76 | //------------------------------------------------- |
| 77 | // device_start - device-specific startup |
| 78 | //------------------------------------------------- |
| 79 | |
| 80 | void a2bus_alfam2_device::device_start() |
| 81 | { |
| 82 | // set_a2bus_device makes m_slot valid |
| 83 | set_a2bus_device(); |
| 84 | } |
| 85 | |
| 86 | void a2bus_alfam2_device::device_reset() |
| 87 | { |
| 88 | } |
| 89 | |
| 90 | void a2bus_alfam2_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data) |
| 91 | { |
| 92 | switch (offset) |
| 93 | { |
| 94 | case 0: |
| 95 | sn76496_w(m_sn1, 0, data); |
| 96 | break; |
| 97 | |
| 98 | case 1: |
| 99 | sn76496_w(m_sn2, 0, data); |
| 100 | break; |
| 101 | |
| 102 | case 2: |
| 103 | sn76496_w(m_sn3, 0, data); |
| 104 | break; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | bool a2bus_alfam2_device::take_c800() |
| 109 | { |
| 110 | return false; |
| 111 | } |
| 112 | |
src/mess/machine/a2alfam2.h
| r0 | r15269 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2alfam2.h |
| 4 | |
| 5 | Implementation of the ALF Apple Music II card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #ifndef __A2BUS_ALFAM2__ |
| 10 | #define __A2BUS_ALFAM2__ |
| 11 | |
| 12 | #include "emu.h" |
| 13 | #include "machine/a2bus.h" |
| 14 | |
| 15 | //************************************************************************** |
| 16 | // TYPE DEFINITIONS |
| 17 | //************************************************************************** |
| 18 | |
| 19 | class a2bus_alfam2_device: |
| 20 | public device_t, |
| 21 | public device_a2bus_card_interface |
| 22 | { |
| 23 | public: |
| 24 | // construction/destruction |
| 25 | a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); |
| 26 | a2bus_alfam2_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_sn1; |
| 32 | required_device<device_t> m_sn2; |
| 33 | required_device<device_t> m_sn3; |
| 34 | |
| 35 | protected: |
| 36 | virtual void device_start(); |
| 37 | virtual void device_reset(); |
| 38 | |
| 39 | // overrides of standard a2bus slot functions |
| 40 | virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data); |
| 41 | virtual bool take_c800(); |
| 42 | }; |
| 43 | |
| 44 | // device type definition |
| 45 | extern const device_type A2BUS_ALFAM2; |
| 46 | |
| 47 | #endif /* __A2BUS_ALFAM2__ */ |
| 48 | |
src/mess/drivers/apple2gs.c
| r15268 | r15269 | |
| 65 | 65 | #include "machine/a2memexp.h" |
| 66 | 66 | #include "machine/a2scsi.h" |
| 67 | 67 | #include "machine/a2softcard.h" |
| 68 | #include "machine/a2sam.h" |
| 69 | #include "machine/a2alfam2.h" |
| 68 | 70 | |
| 69 | 71 | static const gfx_layout apple2gs_text_layout = |
| 70 | 72 | { |
| r15268 | r15269 | |
| 223 | 225 | SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */ |
| 224 | 226 | SLOT_INTERFACE("memexp", A2BUS_MEMEXP) /* Apple II Memory Expansion Card */ |
| 225 | 227 | SLOT_INTERFACE("ramfactor", A2BUS_RAMFACTOR) /* Applied Engineering RamFactor */ |
| 228 | SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ |
| 229 | SLOT_INTERFACE("alfam2", A2BUS_ALFAM2) /* ALF Apple Music II */ |
| 226 | 230 | // SLOT_INTERFACE("softcard", A2BUS_SOFTCARD) /* Microsoft SoftCard */ // appears not to be IIgs compatible? |
| 227 | 231 | // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ |
| 228 | 232 | SLOT_INTERFACE_END |