Previous 15994 Revisions Next

r14316 Thursday 2nd February, 2012 at 12:41:20 UTC by Miodrag Milanović
Added Covox support as slot device (no whatsnew)
[src/mess]mess.mak
[src/mess/machine]cntr_covox.c* cntr_covox.h* pc_lpt.c

src/mess/machine/pc_lpt.c
r14315r14316
77#include "emu.h"
88#include "pc_lpt.h"
99#include "machine/ctronics.h"
10#include "cntr_covox.h"
1011
1112
1213/***************************************************************************
r14315r14316
4950   DEVCB_NULL
5051};
5152
53static SLOT_INTERFACE_START(pc_centronics)
54   SLOT_INTERFACE("printer", CENTRONICS_PRINTER)
55   SLOT_INTERFACE("covox", CENTRONICS_COVOX)
56SLOT_INTERFACE_END
57
5258static MACHINE_CONFIG_FRAGMENT( pc_lpt )
53   MCFG_CENTRONICS_PRINTER_ADD("centronics", pc_centronics_config)
59   MCFG_CENTRONICS_ADD("centronics", pc_centronics_config, pc_centronics, "printer", NULL)
5460MACHINE_CONFIG_END
5561
5662
src/mess/machine/cntr_covox.c
r0r14316
1/***************************************************************************
2
3    Covox Speech Thing
4
5***************************************************************************/
6
7#include "emu.h"
8#include "sound/dac.h"
9#include "cntr_covox.h"
10
11//**************************************************************************
12//  COVOX DEVICE
13//**************************************************************************
14
15// device type definition
16const device_type CENTRONICS_COVOX = &device_creator<centronics_covox_device>;
17
18static MACHINE_CONFIG_FRAGMENT( covox )
19   /* sound hardware */
20   MCFG_SPEAKER_STANDARD_MONO("mono")
21
22   MCFG_SOUND_ADD("dac", DAC, 0)
23   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
24MACHINE_CONFIG_END
25
26
27/***************************************************************************
28    IMPLEMENTATION
29***************************************************************************/
30//-------------------------------------------------
31//  centronics_covox_device - constructor
32//-------------------------------------------------
33
34centronics_covox_device::centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
35    : device_t(mconfig, CENTRONICS_COVOX, "Covox Speech Thing", tag, owner, clock),
36     device_centronics_peripheral_interface( mconfig, *this )
37{
38}
39//-------------------------------------------------
40//  machine_config_additions - device-specific
41//  machine configurations
42//-------------------------------------------------
43
44machine_config_constructor centronics_covox_device::device_mconfig_additions() const
45{
46   return MACHINE_CONFIG_NAME( covox );
47}
48
49
50void centronics_covox_device::device_start()
51{
52   m_dac = subdevice("dac");
53}
54
55void centronics_covox_device::write(UINT8 data)
56{
57   m_data = data;
58   dac_w(m_dac, 0, data);
59}
No newline at end of file
src/mess/machine/cntr_covox.h
r0r14316
1/***************************************************************************
2
3    Covox Speech Thing
4
5***************************************************************************/
6
7#ifndef __CENTRONICS_COVOX_H__
8#define __CENTRONICS_COVOX_H__
9
10#include "machine/ctronics.h"
11
12// ======================> centronics_covox_device
13
14class centronics_covox_device :
15      public device_t,
16      public device_centronics_peripheral_interface
17{
18public:
19    // construction/destruction
20    centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
21
22   // optional information overrides
23   virtual machine_config_constructor device_mconfig_additions() const;
24   
25   virtual void write(UINT8 data);
26protected:
27    // device-level overrides
28    virtual void device_start();
29private:
30   device_t *m_dac;
31};
32// device type definition
33extern const device_type CENTRONICS_COVOX;
34
35#endif /* __CENTRONICS_COVOX_H__ */
src/mess/mess.mak
r14315r14316
514514   $(MESS_MACHINE)/ncr5380.o   \
515515   $(MESS_MACHINE)/ncr5390.o   \
516516   $(MESS_MACHINE)/pc_lpt.o   \
517   $(MESS_MACHINE)/cntr_covox.o \
517518   $(MESS_MACHINE)/pc_mouse.o   \
518519   $(MESS_MACHINE)/pcf8593.o   \
519520   $(MESS_MACHINE)/rs232.o      \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team