mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
bbc: added preliminary slots for expansion
This commit is contained in:
parent
41d6025365
commit
91fa0d4397
@ -202,6 +202,58 @@ if (BUSES["ASTROCADE"]~=null) then
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/bbc/analogue/analogue.h,BUSES["BBC_ANALOGUE"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["BBC_ANALOGUE"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/bbc/analogue/analogue.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/analogue/analogue.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/bbc/1mhzbus/1mhzbus.h,BUSES["BBC_1MHZBUS"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["BBC_1MHZBUS"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/1mhzbus.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/1mhzbus.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/bbc/tube/tube.h,BUSES["BBC_TUBE"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["BBC_TUBE"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/bbc/userport/userport.h,BUSES["BBC_USERPORT"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["BBC_USERPORT"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/bbc/userport/userport.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/userport/userport.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/bw2/exp.h,BUSES["BW2"] = true
|
||||
|
@ -603,6 +603,10 @@ BUSES["APF"] = true
|
||||
BUSES["APRICOT_EXPANSION"] = true
|
||||
BUSES["ARCADIA"] = true
|
||||
BUSES["ASTROCADE"] = true
|
||||
BUSES["BBC_ANALOGUE"] = true
|
||||
BUSES["BBC_1MHZBUS"] = true
|
||||
BUSES["BBC_TUBE"] = true
|
||||
BUSES["BBC_USERPORT"] = true
|
||||
BUSES["BML3"] = true
|
||||
BUSES["BW2"] = true
|
||||
BUSES["C64"] = true
|
||||
|
112
src/devices/bus/bbc/1mhzbus/1mhzbus.cpp
Normal file
112
src/devices/bus/bbc/1mhzbus/1mhzbus.cpp
Normal file
@ -0,0 +1,112 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC 1MHz Bus emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "1mhzbus.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type BBC_1MHZBUS_SLOT = &device_creator<bbc_1mhzbus_slot_device>;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE BBC_1MHZBUS PORT INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_bbc_1mhzbus_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_1mhzbus_interface::device_bbc_1mhzbus_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<bbc_1mhzbus_slot_device *>(device.owner());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_bbc_1mhzbus_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_1mhzbus_interface::~device_bbc_1mhzbus_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_1mhzbus_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_1mhzbus_slot_device::bbc_1mhzbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, BBC_1MHZBUS_SLOT, "BBC Micro 1MHz Bus port", tag, owner, clock, "bbc_1mhzbus_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_1mhzbus_slot_device::device_start()
|
||||
{
|
||||
m_card = dynamic_cast<device_bbc_1mhzbus_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_1mhzbus_slot_device::device_reset()
|
||||
{
|
||||
if (get_card_device())
|
||||
{
|
||||
get_card_device()->reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE( bbc_1mhzbus_devices )
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// slot devices
|
||||
//#include "teletext.h"
|
||||
//#include "ieee488.h"
|
||||
//#include "music500.h"
|
||||
//#include "music5000.h"
|
||||
//#include "opus3.h"
|
||||
//#include "torchg400.h"
|
||||
//#include "torchg800.h"
|
||||
//#include "beebsid.h"
|
||||
//#include "prisma3.h"
|
||||
|
||||
|
||||
SLOT_INTERFACE_START( bbc_1mhzbus_devices )
|
||||
// SLOT_INTERFACE("teletext", BBC_TELETEXT) /* Acorn ANE01 Teletext Adapter */
|
||||
// SLOT_INTERFACE("ieee488", BBC_IEEE488) /* Acorn ANK01 IEEE488 Interface */
|
||||
// SLOT_INTERFACE("music500", BBC_MUSIC500) /* Acorn ANV02 Music500 */
|
||||
// SLOT_INTERFACE("music2000", BBC_MUSIC2000) /* Hybrid Music 2000 MIDI Interface */
|
||||
// SLOT_INTERFACE("music3000", BBC_MUSIC3000) /* Hybrid Music 3000 Expander */
|
||||
// SLOT_INTERFACE("music5000", BBC_MUSIC5000) /* Hybrid Music 5000 Synthesiser */
|
||||
// SLOT_INTERFACE("opus3", BBC_OPUS3) /* Opus Challenger 3 */
|
||||
// SLOT_INTERFACE("torchg400", BBC_TORCHG400) /* Torch Graduate G400 */
|
||||
// SLOT_INTERFACE("torchg800", BBC_TORCHG800) /* Torch Graduate G800 */
|
||||
// SLOT_INTERFACE("beebsid", BBC_BEEBSID) /* BeebSID */
|
||||
// SLOT_INTERFACE("prisma3", BBC_PRISMA3) /* Prisma 3 - Millipede 1989 */
|
||||
SLOT_INTERFACE_END
|
148
src/devices/bus/bbc/1mhzbus/1mhzbus.h
Normal file
148
src/devices/bus/bbc/1mhzbus/1mhzbus.h
Normal file
@ -0,0 +1,148 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC 1MHz Bus emulation
|
||||
|
||||
**********************************************************************
|
||||
|
||||
Pinout:
|
||||
|
||||
0V 1 2 R/W
|
||||
0V 3 4 1MHzE
|
||||
0V 5 6 NNMI
|
||||
0V 7 8 NIRQ
|
||||
0V 9 10 NPGFC
|
||||
0V 11 12 NPGFD
|
||||
0V 13 14 RST
|
||||
0V 15 16 Analog In
|
||||
0V 17 18 D0
|
||||
D1 19 20 D2
|
||||
D3 21 22 D4
|
||||
D5 23 24 D6
|
||||
D7 25 26 0V
|
||||
A0 27 28 A1
|
||||
A2 29 30 A3
|
||||
A4 31 32 A5
|
||||
A6 33 34 A7
|
||||
|
||||
Signal Definitions:
|
||||
|
||||
0 volts - This is connected to the main system 0 volts line. The reason for putting
|
||||
0V lines between the active signal lines is to reduce the interference
|
||||
between different signals.
|
||||
R/W (pin 2) - This is the read-not-write signal from the 6502 CPU, buffered by two
|
||||
74LS04 inverters.
|
||||
1MHzE (pin 4) - This is the 1MHz system timing clock. It is a 50% duty-cycle square wave.
|
||||
The 6502 CPU is operating at 2MHz, so the main processor clock is stretched
|
||||
whenever 1MHz bus peripherals are being accessed. The trailing edges of the
|
||||
1MHz and 2MHz processor clock are then coincidental. The processor clock
|
||||
is only ever truly 2MHz when accessing main memory.
|
||||
NNMI (pin 6) - Not Non-Maskable Interrupt. This is connected directly to the 6502 NMI input.
|
||||
It is pulled up to +5 volts with a 3K3 resistor. Both Disc and Econet systems
|
||||
rely heavily upon NMIs for their operation so take care. Note that NMIs are
|
||||
triggered on negative going edges of NMI signals.
|
||||
NIRQ (pin 8) - Not Interrupt Request. This is connected directly to the 6502 IRQ input. Any
|
||||
devices connected to this input should have open collector outputs. The line
|
||||
is pulled up to +5 volts with a 3K3 resistor. Interrupts from the 1MHz bus
|
||||
must not occur until the software on the main system is able to cope with
|
||||
them. All interrupts must therefore be disabled after a reset. Note that the
|
||||
main system software may operate very slowly if considerable use is made of
|
||||
interrupts. Certain functions such as the real time clock which is
|
||||
incremented every 10 mS will be affected if interrupts are masked for more
|
||||
than this period.
|
||||
NPGFC (pin 10) - Not page &FC. This signal is derived from the 6502 address bus. It goes low
|
||||
whenever page &FC is written to or read from. FRED is the name given to this
|
||||
page in memory.
|
||||
NPGGFD (pin 12) - Not page &FD. This signal is derived from the 6502 address bus. It goes low
|
||||
whenever page &FD is accessed. JIM is the name given to this page in memory.
|
||||
NRST (pin 14) - Not RESET. This is an active low output from the system reset line. It may
|
||||
be used to initialise peripherals whenever a power up or a BREAK causes a
|
||||
reset.
|
||||
Analog In (pin 16) - This is an input to the audio amplifier on the main computer. The amplified
|
||||
signal is produced over the speaker on the keyboard. Its input impedance is
|
||||
9K Ohms and a 3 volt RMS signal will produce maximum volume on the speaker.
|
||||
Note however that signals as large as this will cause distortion if the sound
|
||||
or speech is used at the same time.
|
||||
D0-D7 (pins 18-24) - This is a bi-directional 8 bit data bus which is connected via a 74LS245
|
||||
buffer (IC72) to the CPU. The direction of data transfer is determined by
|
||||
the R/W line signal. The buffer is enabled whenever FRED or JIM are accessed.
|
||||
A0-A7 (pins 27-34) - These are connected directly to the lower 8 CPU address lines via a 74LS244
|
||||
buffer (IC71) which is always enabled.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BBC_1MHZBUS_SLOT__
|
||||
#define __BBC_1MHZBUS_SLOT__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define BBC_1MHZBUS_SLOT_TAG "1mhzbus"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_BBC_1MHZBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, BBC_1MHZBUS_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
#define MCFG_BBC1MHZ_PASSTHRU_1MHZBUS_SLOT_ADD() \
|
||||
MCFG_BBC_1MHZBUS_SLOT_ADD(BBC_1MHZBUS_SLOT_TAG, 0, bbc_1mhzbus_devices, nullptr)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> bbc_1mhzbus_slot_device
|
||||
|
||||
class device_bbc_1mhzbus_interface;
|
||||
|
||||
class bbc_1mhzbus_slot_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_1mhzbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~bbc_1mhzbus_slot_device() {}
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
device_bbc_1mhzbus_interface *m_card;
|
||||
};
|
||||
|
||||
|
||||
// ======================> device_bbc_1mhzbus_interface
|
||||
|
||||
class device_bbc_1mhzbus_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_bbc_1mhzbus_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_bbc_1mhzbus_interface();
|
||||
|
||||
protected:
|
||||
bbc_1mhzbus_slot_device *m_slot;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type BBC_1MHZBUS_SLOT;
|
||||
|
||||
SLOT_INTERFACE_EXTERN( bbc_1mhzbus_devices );
|
||||
|
||||
|
||||
#endif
|
96
src/devices/bus/bbc/analogue/analogue.cpp
Normal file
96
src/devices/bus/bbc/analogue/analogue.cpp
Normal file
@ -0,0 +1,96 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC analogue port emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "analogue.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type BBC_ANALOGUE_SLOT = &device_creator<bbc_analogue_slot_device>;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE BBC_ANALOGUE PORT INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_bbc_analogue_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_analogue_interface::device_bbc_analogue_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<bbc_analogue_slot_device *>(device.owner());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_bbc_analogue_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_analogue_interface::~device_bbc_analogue_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_analogue_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_analogue_slot_device::bbc_analogue_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, BBC_ANALOGUE_SLOT, "BBC Micro Analogue port", tag, owner, clock, "bbc_analogue_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_analogue_slot_device::device_start()
|
||||
{
|
||||
m_card = dynamic_cast<device_bbc_analogue_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_analogue_slot_device::device_reset()
|
||||
{
|
||||
if (get_card_device())
|
||||
{
|
||||
get_card_device()->reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE( bbc_analogue_devices )
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// slot devices
|
||||
//#include "joystick.h"
|
||||
//#include "quinkey.h"
|
||||
|
||||
|
||||
SLOT_INTERFACE_START( bbc_analogue_devices )
|
||||
// SLOT_INTERFACE("joystick", BBC_JOYSTICKS) /* Acorn ANH01 BBC Micro Joysticks */
|
||||
// SLOT_INTERFACE("quinkey", BBC_QUINKEY) /* Microwriter Quinkey */
|
||||
SLOT_INTERFACE_END
|
98
src/devices/bus/bbc/analogue/analogue.h
Normal file
98
src/devices/bus/bbc/analogue/analogue.h
Normal file
@ -0,0 +1,98 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC analogue port emulation
|
||||
|
||||
**********************************************************************
|
||||
|
||||
Pinout:
|
||||
|
||||
+5V 1
|
||||
9 LPSTB
|
||||
0V 2
|
||||
10 PB1
|
||||
0V 3
|
||||
11 VREF
|
||||
CH3 4
|
||||
12 CH2
|
||||
Analogue GND 5
|
||||
13 PB0
|
||||
0V 6
|
||||
14 VREF
|
||||
CH1 7
|
||||
15 CH0
|
||||
Analogue GND 8
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BBC_ANALOGUE_SLOT__
|
||||
#define __BBC_ANALOGUE_SLOT__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define BBC_ANALOGUE_SLOT_TAG "analogue"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_BBC_ANALOGUE_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, BBC_ANALOGUE_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> bbc_analogue_slot_device
|
||||
|
||||
class device_bbc_analogue_interface;
|
||||
|
||||
class bbc_analogue_slot_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_analogue_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~bbc_analogue_slot_device() {}
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
device_bbc_analogue_interface *m_card;
|
||||
};
|
||||
|
||||
|
||||
// ======================> device_bbc_analogue_interface
|
||||
|
||||
class device_bbc_analogue_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_bbc_analogue_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_bbc_analogue_interface();
|
||||
|
||||
protected:
|
||||
bbc_analogue_slot_device *m_slot;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type BBC_ANALOGUE_SLOT;
|
||||
|
||||
SLOT_INTERFACE_EXTERN( bbc_analogue_devices );
|
||||
|
||||
|
||||
#endif
|
125
src/devices/bus/bbc/tube/tube.cpp
Normal file
125
src/devices/bus/bbc/tube/tube.cpp
Normal file
@ -0,0 +1,125 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC Tube emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "tube.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type BBC_TUBE_SLOT = &device_creator<bbc_tube_slot_device>;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE BBC_TUBE PORT INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_bbc_tube_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_tube_interface::device_bbc_tube_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<bbc_tube_slot_device *>(device.owner());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_bbc_tube_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_tube_interface::~device_bbc_tube_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_tube_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_tube_slot_device::bbc_tube_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, BBC_TUBE_SLOT, "BBC Micro Tube port", tag, owner, clock, "bbc_tube_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_slot_device::device_start()
|
||||
{
|
||||
m_card = dynamic_cast<device_bbc_tube_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_slot_device::device_reset()
|
||||
{
|
||||
if (get_card_device())
|
||||
{
|
||||
get_card_device()->reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE( bbc_tube_ext_devices )
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// slot devices
|
||||
//#include "6502copro.h"
|
||||
//#include "z80copro.h"
|
||||
//#include "32016copro.h"
|
||||
//#include "cambcopro.h"
|
||||
//#include "armcopro.h"
|
||||
//#include "unicopro.h"
|
||||
|
||||
|
||||
SLOT_INTERFACE_START( bbc_tube_ext_devices )
|
||||
// SLOT_INTERFACE("6502copro", BBC_6502_COPRO) /* Acorn ANC01 6502 2nd processor */
|
||||
// SLOT_INTERFACE("z80copro", BBC_Z80_COPRO) /* Acorn ANC04 Z80 2nd processor */
|
||||
// SLOT_INTERFACE("32016copro", BBC_32016_COPRO) /* Acorn ANC05 32016 2nd processor */
|
||||
// SLOT_INTERFACE("cambcopro", BBC_CAMB_COPRO) /* Acorn ANC06 Cambridge Co-Processor */
|
||||
// SLOT_INTERFACE("armcopro", BBC_ARM_COPRO) /* Acorn ANC13 ARM Evaluation System */
|
||||
// SLOT_INTERFACE("unicopro", BBC_UNIVERSAL) /* Acorn ANC21 Universal 2nd Processor Unit */
|
||||
// SLOT_INTERFACE("a500copro", BBC_A500_COPRO) /* Acorn A500 2nd Processor */
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE( bbc_tube_int_devices )
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// slot devices
|
||||
//#include "65c102copro.h"
|
||||
//#include "80186copro.h"
|
||||
//#include "arm7copro.h"
|
||||
|
||||
|
||||
SLOT_INTERFACE_START( bbc_tube_int_devices )
|
||||
// SLOT_INTERFACE("65c102copro", BBC_65C102_COPRO) /* Acorn ADC06 6502 co-processor */
|
||||
// SLOT_INTERFACE("80186copro", BBC_80186_COPRO) /* Acorn ADC08 80186 co-processor */
|
||||
// SLOT_INTERFACE("80286copro", BBC_80286_COPRO) /* Acorn ADC08 80286 co-processor */
|
||||
// SLOT_INTERFACE("arm7copro", BBC_ARM7_COPRO) /* Sprow ARM7 co-processor */
|
||||
SLOT_INTERFACE_END
|
110
src/devices/bus/bbc/tube/tube.h
Normal file
110
src/devices/bus/bbc/tube/tube.h
Normal file
@ -0,0 +1,110 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC Tube emulation
|
||||
|
||||
**********************************************************************
|
||||
|
||||
Pinout:
|
||||
|
||||
0V 1 2 R/NW (read/not-write)
|
||||
0V 3 4 2MHzE
|
||||
0V 5 6 NIRQ (not-interrupt request)
|
||||
0V 7 8 NTUBE
|
||||
0V 9 10 NRST (not-reset)
|
||||
0V 11 12 D0
|
||||
0V 13 14 D1
|
||||
0V 15 16 D2
|
||||
0V 17 18 D3
|
||||
0V 19 20 D4
|
||||
0V 21 22 D5
|
||||
0V 23 24 D6
|
||||
0V 25 26 D7
|
||||
0V 27 28 A0
|
||||
0V 29 30 A1
|
||||
+5V 31 32 A2
|
||||
+5V 33 34 A3
|
||||
+5V 35 36 A4
|
||||
+5V 37 38 A5
|
||||
+5V 39 40 A6
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BBC_TUBE_SLOT__
|
||||
#define __BBC_TUBE_SLOT__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define BBC_TUBE_SLOT_TAG "tube"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_BBC_TUBE_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, BBC_TUBE_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
#define MCFG_BBC_PASSTHRU_TUBE_SLOT_ADD() \
|
||||
MCFG_BBC_TUBE_SLOT_ADD(BBC_TUBE_SLOT_TAG, 0, bbc_tube_devices, nullptr)
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> bbc_tube_slot_device
|
||||
|
||||
class device_bbc_tube_interface;
|
||||
|
||||
class bbc_tube_slot_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_tube_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~bbc_tube_slot_device() {}
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
||||
device_bbc_tube_interface *m_card;
|
||||
};
|
||||
|
||||
|
||||
// ======================> device_bbc_tube_interface
|
||||
|
||||
class device_bbc_tube_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_bbc_tube_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_bbc_tube_interface();
|
||||
|
||||
protected:
|
||||
bbc_tube_slot_device *m_slot;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type BBC_TUBE_SLOT;
|
||||
|
||||
SLOT_INTERFACE_EXTERN( bbc_tube_ext_devices );
|
||||
SLOT_INTERFACE_EXTERN( bbc_tube_int_devices );
|
||||
|
||||
|
||||
#endif
|
102
src/devices/bus/bbc/userport/userport.cpp
Normal file
102
src/devices/bus/bbc/userport/userport.cpp
Normal file
@ -0,0 +1,102 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC User Port emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "userport.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type BBC_USERPORT_SLOT = &device_creator<bbc_userport_device>;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE BBC_USERPORT INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_bbc_userport_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_userport_interface::device_bbc_userport_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<bbc_userport_device *>(device.owner());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_bbc_userport_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_bbc_userport_interface::~device_bbc_userport_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_userport_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_userport_device::bbc_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, BBC_USERPORT_SLOT, "BBC Micro User port", tag, owner, clock, "bbc_userport_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this), m_device(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~bbc_userport_slot_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
//bbc_userport_device::~bbc_userport_device()
|
||||
//{
|
||||
//}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_userport_device::device_start()
|
||||
{
|
||||
m_device = dynamic_cast<device_bbc_userport_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
|
||||
UINT8 bbc_userport_device::read_portb()
|
||||
{
|
||||
UINT8 data = 0xff;
|
||||
if (m_device)
|
||||
data |= m_device->read_portb();
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE( bbc_userport_devices )
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// slot devices
|
||||
//#include "amxmouse.h"
|
||||
//#include "tracker.h"
|
||||
|
||||
|
||||
SLOT_INTERFACE_START( bbc_userport_devices )
|
||||
// SLOT_INTERFACE("amxmouse", BBC_AMXMOUSE) /* AMX Mouse */
|
||||
// SLOT_INTERFACE("tracker", BBC_TRACKER) /* Acorn Tracker Ball */
|
||||
// SLOT_INTERFACE("music4000", BBC_MUSIC4000) /* Hybrid Music 4000 Keyboard */
|
||||
SLOT_INTERFACE_END
|
104
src/devices/bus/bbc/userport/userport.h
Normal file
104
src/devices/bus/bbc/userport/userport.h
Normal file
@ -0,0 +1,104 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
BBC User Port emulation
|
||||
|
||||
**********************************************************************
|
||||
|
||||
Pinout:
|
||||
|
||||
+5V 1 2 CB1
|
||||
+5V 3 4 CB2
|
||||
0V 5 6 PB0
|
||||
0V 7 8 PB1
|
||||
0V 9 10 PB2
|
||||
0V 11 12 PB3
|
||||
0V 13 14 PB4
|
||||
0V 15 16 PB5
|
||||
0V 17 18 PB6
|
||||
0V 19 20 PB7
|
||||
|
||||
Signal Definitions:
|
||||
|
||||
Connected directly to the 6522 User VIA.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __BBC_USERPORT_SLOT__
|
||||
#define __BBC_USERPORT_SLOT__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class bbc_userport_device;
|
||||
|
||||
// ======================> device_bbc_userport_interface
|
||||
|
||||
class device_bbc_userport_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_bbc_userport_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_bbc_userport_interface();
|
||||
|
||||
virtual UINT8 read_portb() { return 0xff; };
|
||||
virtual UINT8 read_cb1() { return 0xff; };
|
||||
virtual UINT8 read_cb2() { return 0xff; };
|
||||
|
||||
protected:
|
||||
bbc_userport_device *m_slot;
|
||||
};
|
||||
|
||||
// ======================> bbc_userport_device
|
||||
|
||||
class bbc_userport_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~bbc_userport_device() {}
|
||||
|
||||
UINT8 read_portb();
|
||||
UINT8 read_cb1();
|
||||
UINT8 read_cb2();
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
protected:
|
||||
device_bbc_userport_interface *m_device;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type BBC_USERPORT_SLOT;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_BBC_USERPORT_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, BBC_USERPORT_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
#define MCFG_BBC_USERPORT_PB_HANDLER(_devcb) \
|
||||
devcb = &bbc_userport_device::set_pb_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_BBC_USERPORT_CB1_HANDLER(_devcb) \
|
||||
devcb = &bbc_userport_device::set_cb1_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_BBC_USERPORT_CB2_HANDLER(_devcb) \
|
||||
devcb = &bbc_userport_device::set_cb2_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
SLOT_INTERFACE_EXTERN( bbc_userport_devices );
|
||||
|
||||
|
||||
#endif
|
@ -899,10 +899,10 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca )
|
||||
|
||||
/* user via */
|
||||
MCFG_DEVICE_ADD("via6522_1", VIA6522, XTAL_16MHz / 16)
|
||||
MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_user_read_portb))
|
||||
MCFG_VIA6522_WRITEPA_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write))
|
||||
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(bbc_state, bbcb_via_user_write_portb))
|
||||
MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE("centronics", centronics_device, write_strobe))
|
||||
MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_user_read_portb))
|
||||
MCFG_VIA6522_WRITEPA_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write))
|
||||
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(bbc_state, bbcb_via_user_write_portb))
|
||||
MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE("centronics", centronics_device, write_strobe))
|
||||
MCFG_VIA6522_IRQ_HANDLER(INPUTLINE("maincpu", M6502_IRQ_LINE))
|
||||
|
||||
/* adc */
|
||||
@ -934,6 +934,12 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca )
|
||||
MCFG_ECONET_DATA_CALLBACK(DEVWRITELINE("mc6854", mc6854_device, set_rx))
|
||||
MCFG_ECONET_SLOT_ADD("econet254", 254, econet_devices, nullptr)
|
||||
|
||||
/* expansion ports */
|
||||
MCFG_BBC_ANALOGUE_SLOT_ADD("analogue", bbc_analogue_devices, nullptr)
|
||||
MCFG_BBC_1MHZBUS_SLOT_ADD("1mhzbus", bbc_1mhzbus_devices, nullptr)
|
||||
MCFG_BBC_TUBE_SLOT_ADD("tube", bbc_tube_ext_devices, nullptr)
|
||||
MCFG_BBC_USERPORT_SLOT_ADD("userport", bbc_userport_devices, nullptr)
|
||||
|
||||
/* software lists */
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_ls_b", "bbcb_cass")
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_ls_b", "bbcb_flop")
|
||||
@ -1067,9 +1073,23 @@ static MACHINE_CONFIG_DERIVED( abc110, bbcbp )
|
||||
MCFG_DEVICE_REMOVE("wd1770:1")
|
||||
|
||||
/* Add Z80 co-processor */
|
||||
//MCFG_DEVICE_MODIFY("tube")
|
||||
//MCFG_SLOT_DEFAULT_OPTION("z80copro")
|
||||
//MCFG_SLOT_FIXED(true)
|
||||
|
||||
/* Add ADAPTEC ACB-4000 Winchester Disc Controller */
|
||||
//MCFG_DEVICE_ADD(SCSIBUS_TAG, SCSI_PORT, 0)
|
||||
//MCFG_SCSI_DATA_INPUT_BUFFER("scsi_data_in")
|
||||
//MCFG_SCSI_MSG_HANDLER(DEVWRITELINE("scsi_ctrl_in", input_buffer_device, write_bit0))
|
||||
//MCFG_SCSI_BSY_HANDLER(WRITELINE(bbc_state, scsi_bsy_w))
|
||||
//MCFG_SCSI_REQ_HANDLER(WRITELINE(bbc_state, scsi_req_w))
|
||||
//MCFG_SCSI_IO_HANDLER(DEVWRITELINE("scsi_ctrl_in", input_buffer_device, write_bit6))
|
||||
//MCFG_SCSI_CD_HANDLER(DEVWRITELINE("scsi_ctrl_in", input_buffer_device, write_bit7))
|
||||
//MCFG_SCSIDEV_ADD(SCSIBUS_TAG ":" SCSI_PORT_DEVICE1, "harddisk", ACB4070, SCSI_ID_0)
|
||||
|
||||
//MCFG_SCSI_OUTPUT_LATCH_ADD("scsi_data_out", SCSIBUS_TAG)
|
||||
//MCFG_DEVICE_ADD("scsi_data_in", INPUT_BUFFER, 0)
|
||||
//MCFG_DEVICE_ADD("scsi_ctrl_in", INPUT_BUFFER, 0)
|
||||
/* Add 10MB ST-412 Winchester */
|
||||
|
||||
/* software lists */
|
||||
@ -1308,6 +1328,13 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
|
||||
MCFG_ECONET_CLK_CALLBACK(WRITELINE(bbc_state, econet_clk_w))
|
||||
MCFG_ECONET_DATA_CALLBACK(DEVWRITELINE("mc6854", mc6854_device, set_rx))
|
||||
MCFG_ECONET_SLOT_ADD("econet254", 254, econet_devices, nullptr)
|
||||
|
||||
/* expansion ports */
|
||||
MCFG_BBC_ANALOGUE_SLOT_ADD("analogue", bbc_analogue_devices, nullptr)
|
||||
MCFG_BBC_1MHZBUS_SLOT_ADD("1mhzbus", bbc_1mhzbus_devices, nullptr)
|
||||
MCFG_BBC_TUBE_SLOT_ADD("tube_ext", bbc_tube_ext_devices, nullptr)
|
||||
MCFG_BBC_TUBE_SLOT_ADD("tube_int", bbc_tube_int_devices, nullptr)
|
||||
MCFG_BBC_USERPORT_SLOT_ADD("userport", bbc_userport_devices, nullptr)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -29,6 +29,11 @@
|
||||
#include "sound/tms5220.h"
|
||||
#include "imagedev/cassette.h"
|
||||
|
||||
#include "bus/bbc/analogue/analogue.h"
|
||||
#include "bus/bbc/1mhzbus/1mhzbus.h"
|
||||
#include "bus/bbc/tube/tube.h"
|
||||
#include "bus/bbc/userport/userport.h"
|
||||
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user