mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
amstrad: Added a basic implementation of the Programmers Development System hardware for the CPC. Only lacks a way to set up a parallel connection between MESS instances to enable PC<->CPC communication. [Barry Rodewald]
This commit is contained in:
parent
451bf5592e
commit
12dad2dbf6
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7926,6 +7926,8 @@ src/mess/machine/concept.c svneol=native#text/plain
|
||||
src/mess/machine/concept_exp.c svneol=native#text/plain
|
||||
src/mess/machine/concept_exp.h svneol=native#text/plain
|
||||
src/mess/machine/corvushd.c svneol=native#text/plain
|
||||
src/mess/machine/cpc_pds.c svneol=native#text/plain
|
||||
src/mess/machine/cpc_pds.h svneol=native#text/plain
|
||||
src/mess/machine/cpc_rom.c svneol=native#text/plain
|
||||
src/mess/machine/cpc_rom.h svneol=native#text/plain
|
||||
src/mess/machine/cpc_ssa1.c svneol=native#text/plain
|
||||
|
@ -860,12 +860,14 @@ SLOT_INTERFACE_START(cpc_exp_cards)
|
||||
SLOT_INTERFACE("dkspeech", CPC_DKSPEECH)
|
||||
SLOT_INTERFACE("rom", CPC_ROM)
|
||||
SLOT_INTERFACE("multiface2", CPC_MFACE2)
|
||||
SLOT_INTERFACE("pds", CPC_PDS)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
SLOT_INTERFACE_START(cpcplus_exp_cards)
|
||||
SLOT_INTERFACE("ssa1", CPC_SSA1)
|
||||
SLOT_INTERFACE("dkspeech", CPC_DKSPEECH)
|
||||
SLOT_INTERFACE("rom", CPC_ROM)
|
||||
SLOT_INTERFACE("pds", CPC_PDS)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "machine/cpc_ssa1.h"
|
||||
#include "machine/cpc_rom.h"
|
||||
#include "machine/mface2.h"
|
||||
#include "machine/cpc_pds.h"
|
||||
#include "machine/ram.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
|
87
src/mess/machine/cpc_pds.c
Normal file
87
src/mess/machine/cpc_pds.c
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* cpc_pds.c -- CPC interface hardware for the Programmers Development System
|
||||
*
|
||||
* Created on: 10/02/2014
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpc_pds.h"
|
||||
#include "includes/amstrad.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type CPC_PDS = &device_creator<cpc_pds_device>;
|
||||
|
||||
|
||||
static Z80PIO_INTERFACE( pio_intf )
|
||||
{
|
||||
DEVCB_NULL, //m_out_int_cb;
|
||||
|
||||
DEVCB_NULL, //m_in_pa_cb;
|
||||
DEVCB_NULL, //m_out_pa_cb;
|
||||
DEVCB_NULL, //m_out_ardy_cb;
|
||||
|
||||
DEVCB_NULL, //m_in_pb_cb;
|
||||
DEVCB_NULL, //m_out_pb_cb;
|
||||
DEVCB_NULL, //m_out_brdy_cb;
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( cpc_pds )
|
||||
MCFG_Z80PIO_ADD("pio",XTAL_4MHz,pio_intf) // no clock on the PCB, so will presume that it uses the CPC's clock
|
||||
|
||||
// no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
machine_config_constructor cpc_pds_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( cpc_pds );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
cpc_pds_device::cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, CPC_PDS, "Programmers Development System (CPC Target)", tag, owner, clock, "cpc_pds", __FILE__),
|
||||
device_cpc_expansion_card_interface(mconfig, *this),
|
||||
m_pio(*this,"pio")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void cpc_pds_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_readwrite_handler(0xfbec,0xfbef,0,0,read8_delegate(FUNC(cpc_pds_device::pio_r),this),write8_delegate(FUNC(cpc_pds_device::pio_w),this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void cpc_pds_device::device_reset()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(cpc_pds_device::pio_r)
|
||||
{
|
||||
return m_pio->read(space,offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cpc_pds_device::pio_w)
|
||||
{
|
||||
m_pio->write(space,offset,data);
|
||||
}
|
56
src/mess/machine/cpc_pds.h
Normal file
56
src/mess/machine/cpc_pds.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* cpc_pds.h -- CPC interface hardware for the Programmers Development System
|
||||
*
|
||||
* Created on: 10/02/2014
|
||||
*
|
||||
* Contains a Z80 PIO used to communicate with PC-side hardware (8-bit ISA card containing an 8255 PPI),
|
||||
* connected via a 16-pin cable. Although it would seem that the C64 has a different cable that directly
|
||||
* interfaces with the user port.
|
||||
*
|
||||
* The Z80 PIO is mapped to the CPC at:
|
||||
* FBEC Z80 PIO Port A Data (8bit data to/from PC)
|
||||
* FBED Z80 PIO Port B Data (handshake to/from PC)
|
||||
* FBEE Z80 PIO Port A Control
|
||||
* FBEF Z80 PIO Port B Control
|
||||
*
|
||||
* More info: http://cpcwiki.eu/index.php/PDS_development_system
|
||||
*
|
||||
* TODO: Come up with some way to connect two instances of MESS, one running the PC software, the other
|
||||
* running the target side
|
||||
*/
|
||||
|
||||
#ifndef CPC_PDS_H_
|
||||
#define CPC_PDS_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/cpcexp.h"
|
||||
#include "machine/z80pio.h"
|
||||
|
||||
class cpc_pds_device : public device_t,
|
||||
public device_cpc_expansion_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cpc_pds_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_READ8_MEMBER(pio_r);
|
||||
DECLARE_WRITE8_MEMBER(pio_w);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
cpc_expansion_slot_device *m_slot;
|
||||
|
||||
required_device<z80pio_device> m_pio;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type CPC_PDS;
|
||||
|
||||
#endif /* CPC_PDS_H_ */
|
@ -914,6 +914,7 @@ $(MESSOBJ)/amstrad.a: \
|
||||
$(MESS_MACHINE)/cpcexp.o \
|
||||
$(MESS_MACHINE)/cpc_ssa1.o \
|
||||
$(MESS_MACHINE)/cpc_rom.o \
|
||||
$(MESS_MACHINE)/cpc_pds.o \
|
||||
$(MESS_MACHINE)/mface2.o \
|
||||
$(MESS_DRIVERS)/amstr_pc.o \
|
||||
$(MESS_MACHINE)/amstr_pc.o \
|
||||
|
Loading…
Reference in New Issue
Block a user