mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
(MESS) Apple II: support Decillionix DX-1 sampler card. [R. Belmont]
This commit is contained in:
parent
54cb21bea7
commit
a601a9ad9c
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -420,6 +420,8 @@ src/emu/bus/a2bus/a2diskii.c svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2diskii.h svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2diskiing.c svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2diskiing.h svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2dx1.c svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2dx1.h svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2eauxslot.c svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2eauxslot.h svneol=native#text/plain
|
||||
src/emu/bus/a2bus/a2echoii.c svneol=native#text/plain
|
||||
|
112
src/emu/bus/a2bus/a2dx1.c
Normal file
112
src/emu/bus/a2bus/a2dx1.c
Normal file
@ -0,0 +1,112 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:R. Belmont
|
||||
/*********************************************************************
|
||||
|
||||
a2dx1.c
|
||||
|
||||
Implementation of the Decillionix DX-1 sampler card
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "a2dx1.h"
|
||||
#include "includes/apple2.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
/***************************************************************************
|
||||
PARAMETERS
|
||||
***************************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type A2BUS_DX1 = &device_creator<a2bus_dx1_device>;
|
||||
|
||||
#define DAC_TAG "dac"
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( a2dx1 )
|
||||
MCFG_SPEAKER_STANDARD_MONO("dx1spkr")
|
||||
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "dx1spkr", 1.00)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor a2bus_dx1_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( a2dx1 );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
a2bus_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) :
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_a2bus_card_interface(mconfig, *this),
|
||||
m_dac(*this, DAC_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, A2BUS_DX1, "Decillonix DX-1", tag, owner, clock, "a2dx1", __FILE__),
|
||||
device_a2bus_card_interface(mconfig, *this),
|
||||
m_dac(*this, DAC_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void a2bus_dx1_device::device_start()
|
||||
{
|
||||
// set_a2bus_device makes m_slot valid
|
||||
set_a2bus_device();
|
||||
}
|
||||
|
||||
void a2bus_dx1_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 1: // ADC input
|
||||
return 0;
|
||||
|
||||
case 3: // busy flag
|
||||
return 0x80; // indicate not busy
|
||||
|
||||
case 7: // 1-bit ADC input (bit 7 of c0n1, probably)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void a2bus_dx1_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 5: // volume
|
||||
break;
|
||||
|
||||
case 6:
|
||||
m_dac->write_unsigned8(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool a2bus_dx1_device::take_c800()
|
||||
{
|
||||
return false;
|
||||
}
|
49
src/emu/bus/a2bus/a2dx1.h
Normal file
49
src/emu/bus/a2bus/a2dx1.h
Normal file
@ -0,0 +1,49 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:R. Belmont
|
||||
/*********************************************************************
|
||||
|
||||
a2dx1.h
|
||||
|
||||
Implementation of the Decillionix DX-1 sampler card
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef __A2BUS_DX1__
|
||||
#define __A2BUS_DX1__
|
||||
|
||||
#include "emu.h"
|
||||
#include "a2bus.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class a2bus_dx1_device:
|
||||
public device_t,
|
||||
public device_a2bus_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
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);
|
||||
a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
required_device<dac_device> m_dac;
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// overrides of standard a2bus slot functions
|
||||
virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
|
||||
virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
|
||||
virtual bool take_c800();
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type A2BUS_DX1;
|
||||
|
||||
#endif /* __A2BUS_DX1__ */
|
@ -700,6 +700,7 @@ BUSOBJS += $(BUSOBJ)/a2bus/a2eramworks3.o
|
||||
BUSOBJS += $(BUSOBJ)/a2bus/a2corvus.o
|
||||
BUSOBJS += $(BUSOBJ)/a2bus/a2diskiing.o
|
||||
BUSOBJS += $(BUSOBJ)/a2bus/a2mcms.o
|
||||
BUSOBJS += $(BUSOBJ)/a2bus/a2dx1.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
|
@ -213,6 +213,7 @@ Apple 3.5 and Apple 5.25 drives - up to three devices
|
||||
#include "bus/a2bus/a2pic.h"
|
||||
#include "bus/a2bus/a2corvus.h"
|
||||
#include "bus/a2bus/a2mcms.h"
|
||||
#include "bus/a2bus/a2dx1.h"
|
||||
#include "bus/a2bus/a2estd80col.h"
|
||||
#include "bus/a2bus/a2eext80col.h"
|
||||
#include "bus/a2bus/a2eramworks3.h"
|
||||
@ -980,6 +981,7 @@ static SLOT_INTERFACE_START(apple2_cards)
|
||||
SLOT_INTERFACE("corvus", A2BUS_CORVUS) /* Corvus flat-cable HDD interface (must go in slot 6) */
|
||||
SLOT_INTERFACE("mcms1", A2BUS_MCMS1) /* Mountain Computer Music System, card 1 of 2 */
|
||||
SLOT_INTERFACE("mcms2", A2BUS_MCMS2) /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */
|
||||
SLOT_INTERFACE("dx1", A2BUS_DX1) /* Decillonix DX-1 sampler card */
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START(apple2eaux_cards)
|
||||
|
Loading…
Reference in New Issue
Block a user