Previous 15994 Revisions Next

r15433 Saturday 9th June, 2012 at 21:49:38 UTC by R. Belmont
Apple II: Add the Street Electronics Echo II speech card [R. Belmont]
[src/mess]mess.mak
[src/mess/drivers]apple2.c
[src/mess/machine]a2echoii.c* a2echoii.h*

src/mess/machine/a2echoii.c
r0r15433
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
21const device_type A2BUS_ECHOII = &device_creator<a2bus_echoii_device>;
22
23#define TMS_TAG         "tms5220"
24
25MACHINE_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)
29MACHINE_CONFIG_END
30
31/***************************************************************************
32    FUNCTION PROTOTYPES
33***************************************************************************/
34
35//-------------------------------------------------
36//  machine_config_additions - device-specific
37//  machine configurations
38//-------------------------------------------------
39
40machine_config_constructor a2bus_echoii_device::device_mconfig_additions() const
41{
42   return MACHINE_CONFIG_NAME( a2echoii );
43}
44
45//**************************************************************************
46//  LIVE DEVICE
47//**************************************************************************
48
49a2bus_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
57a2bus_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
69void a2bus_echoii_device::device_start()
70{
71   // set_a2bus_device makes m_slot valid
72   set_a2bus_device();
73}
74
75void a2bus_echoii_device::device_reset()
76{
77}
78
79UINT8 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
91void 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
101bool a2bus_echoii_device::take_c800()
102{
103    return false;
104}
105
src/mess/machine/a2echoii.h
r0r15433
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
19class a2bus_echoii_device:
20    public device_t,
21    public device_a2bus_card_interface
22{
23public:
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
33protected:
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
44extern const device_type A2BUS_ECHOII;
45
46#endif /* __A2BUS_ECHOII__ */
47
src/mess/drivers/apple2.c
r15432r15433
208208#include "machine/a2sam.h"
209209#include "machine/a2alfam2.h"
210210#include "machine/laser128.h"
211#include "machine/a2echoii.h"
211212
212213/***************************************************************************
213214    PARAMETERS
r15432r15433
626627    SLOT_INTERFACE("themill", A2BUS_THEMILL)    /* Stellation Two The Mill (6809 card) */
627628    SLOT_INTERFACE("sam", A2BUS_SAM)    /* SAM Software Automated Mouth (8-bit DAC + speaker) */
628629    SLOT_INTERFACE("alfam2", A2BUS_ALFAM2)    /* ALF Apple Music II */
630    SLOT_INTERFACE("echoii", A2BUS_ECHOII)    /* Street Electronics Echo II */
629631//    SLOT_INTERFACE("scsi", A2BUS_SCSI)  /* Apple II SCSI Card */
630632SLOT_INTERFACE_END
631633
src/mess/mess.mak
r15432r15433
667667    $(MESS_MACHINE)/a2sam.o \
668668    $(MESS_MACHINE)/a2alfam2.o \
669669    $(MESS_MACHINE)/laser128.o \
670    $(MESS_MACHINE)/a2echoii.o \
670671   $(MESS_MACHINE)/lisa.o      \
671672   $(MESS_DRIVERS)/lisa.o      \
672673   $(MESS_MACHINE)/nubus.o     \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team