mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
amstrad: added Amdrum expansion card [Barry Rodewald]
This commit is contained in:
parent
a64c343843
commit
fdedeade69
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -785,6 +785,8 @@ src/emu/bus/comx35/ram.c svneol=native#text/plain
|
|||||||
src/emu/bus/comx35/ram.h svneol=native#text/plain
|
src/emu/bus/comx35/ram.h svneol=native#text/plain
|
||||||
src/emu/bus/comx35/thermal.c svneol=native#text/plain
|
src/emu/bus/comx35/thermal.c svneol=native#text/plain
|
||||||
src/emu/bus/comx35/thermal.h svneol=native#text/plain
|
src/emu/bus/comx35/thermal.h svneol=native#text/plain
|
||||||
|
src/emu/bus/cpc/amdrum.c svneol=native#text/plain
|
||||||
|
src/emu/bus/cpc/amdrum.h svneol=native#text/plain
|
||||||
src/emu/bus/cpc/cpc_pds.c svneol=native#text/plain
|
src/emu/bus/cpc/cpc_pds.c svneol=native#text/plain
|
||||||
src/emu/bus/cpc/cpc_pds.h svneol=native#text/plain
|
src/emu/bus/cpc/cpc_pds.h svneol=native#text/plain
|
||||||
src/emu/bus/cpc/cpc_rom.c svneol=native#text/plain
|
src/emu/bus/cpc/cpc_rom.c svneol=native#text/plain
|
||||||
|
@ -1082,6 +1082,7 @@ BUSOBJS += $(BUSOBJ)/cpc/cpc_pds.o
|
|||||||
BUSOBJS += $(BUSOBJ)/cpc/cpc_rs232.o
|
BUSOBJS += $(BUSOBJ)/cpc/cpc_rs232.o
|
||||||
BUSOBJS += $(BUSOBJ)/cpc/mface2.o
|
BUSOBJS += $(BUSOBJ)/cpc/mface2.o
|
||||||
BUSOBJS += $(BUSOBJ)/cpc/symbfac2.o
|
BUSOBJS += $(BUSOBJ)/cpc/symbfac2.o
|
||||||
|
BUSOBJS += $(BUSOBJ)/cpc/amdrum.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
67
src/emu/bus/cpc/amdrum.c
Normal file
67
src/emu/bus/cpc/amdrum.c
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* amdrum.c
|
||||||
|
*
|
||||||
|
* Created on: 23/08/2014
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "amdrum.h"
|
||||||
|
#include "includes/amstrad.h"
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// DEVICE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
const device_type CPC_AMDRUM = &device_creator<cpc_amdrum_device>;
|
||||||
|
|
||||||
|
|
||||||
|
static MACHINE_CONFIG_FRAGMENT( cpc_amdrum )
|
||||||
|
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||||
|
MCFG_DAC_ADD("dac")
|
||||||
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||||
|
// no pass-through
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
machine_config_constructor cpc_amdrum_device::device_mconfig_additions() const
|
||||||
|
{
|
||||||
|
return MACHINE_CONFIG_NAME( cpc_amdrum );
|
||||||
|
}
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
cpc_amdrum_device::cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
|
device_t(mconfig, CPC_AMDRUM, "Amdrum", tag, owner, clock, "cpc_amdrum", __FILE__),
|
||||||
|
device_cpc_expansion_card_interface(mconfig, *this),
|
||||||
|
m_dac(*this,"dac")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void cpc_amdrum_device::device_start()
|
||||||
|
{
|
||||||
|
device_t* cpu = machine().device("maincpu");
|
||||||
|
address_space& space = cpu->memory().space(AS_IO);
|
||||||
|
m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner());
|
||||||
|
|
||||||
|
space.install_write_handler(0xff00,0xffff,0,0,write8_delegate(FUNC(cpc_amdrum_device::dac_w),this));
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_reset - device-specific reset
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void cpc_amdrum_device::device_reset()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(cpc_amdrum_device::dac_w)
|
||||||
|
{
|
||||||
|
m_dac->write_unsigned8(data);
|
||||||
|
}
|
46
src/emu/bus/cpc/amdrum.h
Normal file
46
src/emu/bus/cpc/amdrum.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* amdrum.h
|
||||||
|
*
|
||||||
|
* Created on: 23/08/2014
|
||||||
|
*
|
||||||
|
* Cheetah Marketing Amdrum
|
||||||
|
*
|
||||||
|
* I/O FFxx - 8-bit unsigned DAC, write only (Ferranti ZN428E-8)
|
||||||
|
* Lower 8 address bits are not decoded.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AMDRUM_H_
|
||||||
|
#define AMDRUM_H_
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "cpcexp.h"
|
||||||
|
#include "sound/dac.h"
|
||||||
|
|
||||||
|
class cpc_amdrum_device : public device_t,
|
||||||
|
public device_cpc_expansion_card_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
|
||||||
|
// optional information overrides
|
||||||
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
|
|
||||||
|
DECLARE_WRITE8_MEMBER(dac_w);
|
||||||
|
protected:
|
||||||
|
// device-level overrides
|
||||||
|
virtual void device_start();
|
||||||
|
virtual void device_reset();
|
||||||
|
|
||||||
|
private:
|
||||||
|
cpc_expansion_slot_device *m_slot;
|
||||||
|
|
||||||
|
required_device<dac_device> m_dac;
|
||||||
|
};
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
extern const device_type CPC_AMDRUM;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* AMDRUM_H_ */
|
@ -816,6 +816,7 @@ SLOT_INTERFACE_START(cpc_exp_cards)
|
|||||||
SLOT_INTERFACE("rs232", CPC_RS232)
|
SLOT_INTERFACE("rs232", CPC_RS232)
|
||||||
SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
|
SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
|
||||||
SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
|
SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
|
||||||
|
SLOT_INTERFACE("amdrum", CPC_AMDRUM)
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
SLOT_INTERFACE_START(cpcplus_exp_cards)
|
SLOT_INTERFACE_START(cpcplus_exp_cards)
|
||||||
@ -826,6 +827,7 @@ SLOT_INTERFACE_START(cpcplus_exp_cards)
|
|||||||
SLOT_INTERFACE("rs232", CPC_RS232)
|
SLOT_INTERFACE("rs232", CPC_RS232)
|
||||||
SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
|
SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
|
||||||
SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
|
SLOT_INTERFACE("sf2", CPC_SYMBIFACE2)
|
||||||
|
SLOT_INTERFACE("amdrum", CPC_AMDRUM)
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
|
static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "bus/cpc/cpc_pds.h"
|
#include "bus/cpc/cpc_pds.h"
|
||||||
#include "bus/cpc/cpc_rs232.h"
|
#include "bus/cpc/cpc_rs232.h"
|
||||||
#include "bus/cpc/symbfac2.h"
|
#include "bus/cpc/symbfac2.h"
|
||||||
|
#include "bus/cpc/amdrum.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
#include "bus/centronics/ctronics.h"
|
#include "bus/centronics/ctronics.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user