bus/cbus: Replace CPU finder with required_address_space; add pinout (nw)
This commit is contained in:
parent
8e27930740
commit
c69696b075
@ -55,7 +55,8 @@ device_pc9801cbus_card_interface::~device_pc9801cbus_card_interface()
|
||||
pc9801_slot_device::pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, PC9801CBUS_SLOT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_cpu(*this, finder_base::DUMMY_TAG),
|
||||
m_memspace(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_iospace(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_int_callback{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}
|
||||
{
|
||||
}
|
||||
@ -97,17 +98,17 @@ void pc9801_slot_device::device_start()
|
||||
|
||||
void pc9801_slot_device::install_io(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
|
||||
{
|
||||
int buswidth = this->io_space().data_width();
|
||||
int buswidth = m_iospace->data_width();
|
||||
switch(buswidth)
|
||||
{
|
||||
case 8:
|
||||
this->io_space().install_readwrite_handler(start, end, rhandler, whandler, 0);
|
||||
m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0);
|
||||
break;
|
||||
case 16:
|
||||
this->io_space().install_readwrite_handler(start, end, rhandler, whandler, 0xffff);
|
||||
m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0xffff);
|
||||
break;
|
||||
case 32:
|
||||
this->io_space().install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff);
|
||||
m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff);
|
||||
break;
|
||||
default:
|
||||
fatalerror("PC-9801-26: Bus width %d not supported\n", buswidth);
|
||||
|
@ -2,6 +2,60 @@
|
||||
// copyright-holders:Angelo Salese
|
||||
/**********************************************************************
|
||||
|
||||
<B> <A>
|
||||
+------+
|
||||
GND |[ 01 ]| GND
|
||||
V1 |[ 02 ]| V1
|
||||
V2 |[ 03 ]| V2
|
||||
DB001 |[ 04 ]| AB001
|
||||
DB011 |[ 05 ]| AB011
|
||||
DB021 |[ 06 ]| AB021
|
||||
DB031 |[ 07 ]| AB031
|
||||
DB041 |[ 08 ]| AB041
|
||||
DB051 |[ 09 ]| AB051
|
||||
DB061 |[ 10 ]| AB061
|
||||
GND |[ 11 ]| GND
|
||||
DB071 |[ 12 ]| AB071
|
||||
DB081 |[ 13 ]| AB081
|
||||
DB091 |[ 14 ]| AB091
|
||||
DB101 |[ 15 ]| AB101
|
||||
DB111 |[ 16 ]| AB111
|
||||
DB121 |[ 17 ]| AB121
|
||||
DB131 |[ 18 ]| AB131
|
||||
DB141 |[ 19 ]| AB141
|
||||
DB151 |[ 20 ]| AB151
|
||||
GND |[ 21 ]| GND
|
||||
+12 V |[ 22 ]| AB161
|
||||
+12 V |[ 23 ]| AB171
|
||||
"INT0" IR31 |[ 24 ]| AB181
|
||||
"INT1" IR51 |[ 25 ]| AB191
|
||||
"INT2" IR61 |[ 26 ]| AB201
|
||||
"INT3" IR91 |[ 27 ]| AB211
|
||||
"INT4" IR101/IR111 |[ 28 ]| AB221
|
||||
"INT5" IR121 |[ 29 ]| AB231
|
||||
"INT6" IR131 |[ 30 ]| INT0
|
||||
GND |[ 31 ]| GND
|
||||
-12 V |[ 32 ]| IOCHK0
|
||||
-12 V |[ 33 ]| IOR0
|
||||
RESET0 |[ 34 ]| IOW0
|
||||
DACK00 |[ 35 ]| MRC0
|
||||
DACK30/DACK20 |[ 36 ]| MWC0
|
||||
DRQ00 |[ 37 ]| S00 (INTA0)
|
||||
DRQ30/DRQ20 |[ 38 ]| S10 (NOWAIT0)
|
||||
WORD0 |[ 39 ]| S20 (SALE1)
|
||||
(EXHRQ10) CPKILL0 |[ 40 ]| LOCK (MACS0)
|
||||
GND |[ 41 ]| GND
|
||||
(EXHLA10) RQGT0 |[ 42 ]| CPUENB10
|
||||
DMATC0 |[ 43 ]| RFSH0
|
||||
NMI0 |[ 44 ]| BHE0
|
||||
MWE0 |[ 45 ]| IORDY1
|
||||
(EXHLA20) HLDA00 |[ 46 ]| SCLK1
|
||||
(EXHRQ20) HRQ00 |[ 47 ]| S18CLK1 = 307.2 kHz
|
||||
(SUBSRQ1) DMAHLD0 |[ 48 ]| POWER0
|
||||
+5 V |[ 49 ]| +5 V
|
||||
+5 V |[ 50 ]| +5 V
|
||||
+------+
|
||||
<B> <A>
|
||||
|
||||
**********************************************************************/
|
||||
#ifndef MAME_MACHINE_PC9801_CBUS_H
|
||||
@ -37,11 +91,10 @@ class pc9801_slot_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
template <typename T, typename U>
|
||||
pc9801_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&cpu_tag, U &&opts, char const *dflt)
|
||||
template <typename T>
|
||||
pc9801_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
|
||||
: pc9801_slot_device(mconfig, tag, owner, (uint32_t)0)
|
||||
{
|
||||
m_cpu.set_tag(std::forward<T>(cpu_tag));
|
||||
option_reset();
|
||||
opts(*this);
|
||||
set_default_option(dflt);
|
||||
@ -49,11 +102,14 @@ public:
|
||||
}
|
||||
pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
template <typename T> void set_memspace(T &&tag, int spacenum) { m_memspace.set_tag(std::forward<T>(tag), spacenum); }
|
||||
template <typename T> void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// configuration access
|
||||
template<std::size_t Line> auto int_cb() { return m_int_callback[Line].bind(); }
|
||||
|
||||
address_space &program_space() const { return m_cpu->space(AS_PROGRAM); }
|
||||
address_space &io_space() const { return m_cpu->space(AS_IO); }
|
||||
address_space &program_space() const { return *m_memspace; }
|
||||
address_space &io_space() const { return *m_iospace; }
|
||||
template<int I> void int_w(bool state) { m_int_callback[I](state); }
|
||||
void install_io(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
|
||||
@ -65,7 +121,8 @@ protected:
|
||||
|
||||
private:
|
||||
// device_pc9801_slot_card_interface *m_card;
|
||||
required_device<cpu_device> m_cpu;
|
||||
required_address_space m_memspace;
|
||||
required_address_space m_iospace;
|
||||
devcb_write_line m_int_callback[7];
|
||||
};
|
||||
|
||||
|
@ -2228,7 +2228,9 @@ void pc9801_state::pc9801_mouse(machine_config &config)
|
||||
|
||||
void pc9801_state::pc9801_cbus(machine_config &config)
|
||||
{
|
||||
pc9801_slot_device &cbus0(PC9801CBUS_SLOT(config, "cbus0", m_maincpu, pc9801_cbus_devices, "pc9801_26"));
|
||||
pc9801_slot_device &cbus0(PC9801CBUS_SLOT(config, "cbus0", pc9801_cbus_devices, "pc9801_26"));
|
||||
cbus0.set_memspace(m_maincpu, AS_PROGRAM);
|
||||
cbus0.set_iospace(m_maincpu, AS_IO);
|
||||
cbus0.int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<0>));
|
||||
cbus0.int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<0>));
|
||||
cbus0.int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<0>));
|
||||
@ -2237,7 +2239,9 @@ void pc9801_state::pc9801_cbus(machine_config &config)
|
||||
cbus0.int_cb<5>().set("ir12", FUNC(input_merger_device::in_w<0>));
|
||||
cbus0.int_cb<6>().set("ir13", FUNC(input_merger_device::in_w<0>));
|
||||
|
||||
pc9801_slot_device &cbus1(PC9801CBUS_SLOT(config, "cbus1", m_maincpu, pc9801_cbus_devices, nullptr));
|
||||
pc9801_slot_device &cbus1(PC9801CBUS_SLOT(config, "cbus1", pc9801_cbus_devices, nullptr));
|
||||
cbus1.set_memspace(m_maincpu, AS_PROGRAM);
|
||||
cbus1.set_iospace(m_maincpu, AS_IO);
|
||||
cbus1.int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<1>));
|
||||
cbus1.int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<1>));
|
||||
cbus1.int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<1>));
|
||||
|
Loading…
Reference in New Issue
Block a user