Previous 199869 Revisions Next

r31132 Saturday 28th June, 2014 at 03:22:02 UTC by R. Belmont
(MESS) Apple II: support Decillionix DX-1 sampler card. [R. Belmont]
[src/emu/bus]bus.mak
[src/emu/bus/a2bus]a2dx1.c* a2dx1.h*
[src/mess/drivers]apple2.c

trunk/src/emu/bus/bus.mak
r31131r31132
700700BUSOBJS += $(BUSOBJ)/a2bus/a2corvus.o
701701BUSOBJS += $(BUSOBJ)/a2bus/a2diskiing.o
702702BUSOBJS += $(BUSOBJ)/a2bus/a2mcms.o
703BUSOBJS += $(BUSOBJ)/a2bus/a2dx1.o
703704endif
704705
705706#-------------------------------------------------
trunk/src/emu/bus/a2bus/a2dx1.c
r0r31132
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
23const device_type A2BUS_DX1 = &device_creator<a2bus_dx1_device>;
24
25#define DAC_TAG         "dac"
26
27MACHINE_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)
31MACHINE_CONFIG_END
32
33/***************************************************************************
34    FUNCTION PROTOTYPES
35***************************************************************************/
36
37//-------------------------------------------------
38//  machine_config_additions - device-specific
39//  machine configurations
40//-------------------------------------------------
41
42machine_config_constructor a2bus_dx1_device::device_mconfig_additions() const
43{
44   return MACHINE_CONFIG_NAME( a2dx1 );
45}
46
47//**************************************************************************
48//  LIVE DEVICE
49//**************************************************************************
50
51a2bus_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
58a2bus_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
69void a2bus_dx1_device::device_start()
70{
71   // set_a2bus_device makes m_slot valid
72   set_a2bus_device();
73}
74
75void a2bus_dx1_device::device_reset()
76{
77}
78
79UINT8 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
96void 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
109bool a2bus_dx1_device::take_c800()
110{
111   return false;
112}
Property changes on: trunk/src/emu/bus/a2bus/a2dx1.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/emu/bus/a2bus/a2dx1.h
r0r31132
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
22class a2bus_dx1_device:
23   public device_t,
24   public device_a2bus_card_interface
25{
26public:
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
36protected:
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
47extern const device_type A2BUS_DX1;
48
49#endif /* __A2BUS_DX1__ */
Property changes on: trunk/src/emu/bus/a2bus/a2dx1.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/drivers/apple2.c
r31131r31132
213213#include "bus/a2bus/a2pic.h"
214214#include "bus/a2bus/a2corvus.h"
215215#include "bus/a2bus/a2mcms.h"
216#include "bus/a2bus/a2dx1.h"
216217#include "bus/a2bus/a2estd80col.h"
217218#include "bus/a2bus/a2eext80col.h"
218219#include "bus/a2bus/a2eramworks3.h"
r31131r31132
980981   SLOT_INTERFACE("corvus", A2BUS_CORVUS)  /* Corvus flat-cable HDD interface (must go in slot 6) */
981982   SLOT_INTERFACE("mcms1", A2BUS_MCMS1)  /* Mountain Computer Music System, card 1 of 2 */
982983   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 */
983985SLOT_INTERFACE_END
984986
985987static SLOT_INTERFACE_START(apple2eaux_cards)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team