Previous 199869 Revisions Next

r31747 Saturday 23rd August, 2014 at 01:01:26 UTC by Barry Rodewald
amstrad: added Amdrum expansion card [Barry Rodewald]
[src/emu/bus]bus.mak
[src/emu/bus/cpc]amdrum.c* amdrum.h*
[src/mess/drivers]amstrad.c
[src/mess/includes]amstrad.h

trunk/src/emu/bus/bus.mak
r31746r31747
10821082BUSOBJS += $(BUSOBJ)/cpc/cpc_rs232.o
10831083BUSOBJS += $(BUSOBJ)/cpc/mface2.o
10841084BUSOBJS += $(BUSOBJ)/cpc/symbfac2.o
1085BUSOBJS += $(BUSOBJ)/cpc/amdrum.o
10851086endif
10861087
10871088#-------------------------------------------------
trunk/src/emu/bus/cpc/amdrum.c
r0r31747
1/*
2 * amdrum.c
3 *
4 *  Created on: 23/08/2014
5 */
6
7#include "emu.h"
8#include "amdrum.h"
9#include "includes/amstrad.h"
10
11
12//**************************************************************************
13//  DEVICE DEFINITIONS
14//**************************************************************************
15
16const device_type CPC_AMDRUM = &device_creator<cpc_amdrum_device>;
17
18
19static MACHINE_CONFIG_FRAGMENT( cpc_amdrum )
20   MCFG_SPEAKER_STANDARD_MONO("mono")
21   MCFG_DAC_ADD("dac")
22   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
23   // no pass-through
24MACHINE_CONFIG_END
25
26machine_config_constructor cpc_amdrum_device::device_mconfig_additions() const
27{
28   return MACHINE_CONFIG_NAME( cpc_amdrum );
29}
30
31//**************************************************************************
32//  LIVE DEVICE
33//**************************************************************************
34
35cpc_amdrum_device::cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
36   device_t(mconfig, CPC_AMDRUM, "Amdrum", tag, owner, clock, "cpc_amdrum", __FILE__),
37   device_cpc_expansion_card_interface(mconfig, *this),
38   m_dac(*this,"dac")
39{
40}
41
42//-------------------------------------------------
43//  device_start - device-specific startup
44//-------------------------------------------------
45
46void cpc_amdrum_device::device_start()
47{
48   device_t* cpu = machine().device("maincpu");
49   address_space& space = cpu->memory().space(AS_IO);
50   m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner());
51
52   space.install_write_handler(0xff00,0xffff,0,0,write8_delegate(FUNC(cpc_amdrum_device::dac_w),this));
53}
54
55//-------------------------------------------------
56//  device_reset - device-specific reset
57//-------------------------------------------------
58
59void cpc_amdrum_device::device_reset()
60{
61   // TODO
62}
63
64WRITE8_MEMBER(cpc_amdrum_device::dac_w)
65{
66   m_dac->write_unsigned8(data);
67}
Property changes on: trunk/src/emu/bus/cpc/amdrum.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/emu/bus/cpc/amdrum.h
r0r31747
1/*
2 * amdrum.h
3 *
4 *  Created on: 23/08/2014
5 *
6 *  Cheetah Marketing Amdrum
7 *
8 *  I/O FFxx - 8-bit unsigned DAC, write only  (Ferranti ZN428E-8)
9 *  Lower 8 address bits are not decoded.
10 *
11 */
12
13#ifndef AMDRUM_H_
14#define AMDRUM_H_
15
16#include "emu.h"
17#include "cpcexp.h"
18#include "sound/dac.h"
19
20class cpc_amdrum_device  : public device_t,
21                     public device_cpc_expansion_card_interface
22{
23public:
24   // construction/destruction
25   cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
26
27   // optional information overrides
28   virtual machine_config_constructor device_mconfig_additions() const;
29
30   DECLARE_WRITE8_MEMBER(dac_w);
31protected:
32   // device-level overrides
33   virtual void device_start();
34   virtual void device_reset();
35
36private:
37   cpc_expansion_slot_device *m_slot;
38
39   required_device<dac_device> m_dac;
40};
41
42// device type definition
43extern const device_type CPC_AMDRUM;
44
45
46#endif /* AMDRUM_H_ */
Property changes on: trunk/src/emu/bus/cpc/amdrum.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/includes/amstrad.h
r31746r31747
2121#include "bus/cpc/cpc_pds.h"
2222#include "bus/cpc/cpc_rs232.h"
2323#include "bus/cpc/symbfac2.h"
24#include "bus/cpc/amdrum.h"
2425#include "machine/ram.h"
2526#include "imagedev/cassette.h"
2627#include "bus/centronics/ctronics.h"
trunk/src/mess/drivers/amstrad.c
r31746r31747
816816   SLOT_INTERFACE("rs232", CPC_RS232)
817817   SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
818818   SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
819   SLOT_INTERFACE("amdrum", CPC_AMDRUM)
819820SLOT_INTERFACE_END
820821
821822SLOT_INTERFACE_START(cpcplus_exp_cards)
r31746r31747
826827   SLOT_INTERFACE("rs232", CPC_RS232)
827828   SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
828829   SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
830   SLOT_INTERFACE("amdrum", CPC_AMDRUM)
829831SLOT_INTERFACE_END
830832
831833static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team