diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-12-13 10:22:53 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-12-13 10:22:53 -0500 |
commit | 0d8cc3cd7dbc21245f365b482deb7b0d1de306dc (patch) | |
tree | d026b49fb951f4ab3a72aed9f47a91ad57244f74 | |
parent | 896ed1d9539667ee7a5cee96ae0b1249ef1cdf86 (diff) |
mbc55x: Add 8087 coprocessor
-rw-r--r-- | src/devices/cpu/i86/i86.h | 3 | ||||
-rw-r--r-- | src/mame/drivers/mbc55x.cpp | 11 | ||||
-rw-r--r-- | src/mame/includes/mbc55x.h | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h index 55202931ae1..09b2696e38b 100644 --- a/src/devices/cpu/i86/i86.h +++ b/src/devices/cpu/i86/i86.h @@ -369,6 +369,9 @@ public: template <class Object> devcb_base &set_if_handler(Object &&cb) { return m_out_if_func.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_esc_opcode_handler(Object &&cb) { return m_esc_opcode_handler.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_esc_data_handler(Object &&cb) { return m_esc_data_handler.set_callback(std::forward<Object>(cb)); } + auto if_handler() { return m_out_if_func.bind(); } + auto esc_opcode_handler() { return m_esc_opcode_handler.bind(); } + auto esc_data_handler() { return m_esc_data_handler.bind(); } protected: i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size); diff --git a/src/mame/drivers/mbc55x.cpp b/src/mame/drivers/mbc55x.cpp index e62bce4de00..636df2fba74 100644 --- a/src/mame/drivers/mbc55x.cpp +++ b/src/mame/drivers/mbc55x.cpp @@ -24,6 +24,7 @@ ToDo: #include "bus/rs232/rs232.h" #include "cpu/mcs48/mcs48.h" #include "machine/clock.h" +#include "machine/i8087.h" #include "machine/input_merger.h" #include "screen.h" #include "softlist.h" @@ -258,6 +259,14 @@ MACHINE_CONFIG_START(mbc55x_state::mbc55x) m_maincpu->set_addrmap(AS_PROGRAM, &mbc55x_state::mbc55x_mem); m_maincpu->set_addrmap(AS_IO, &mbc55x_state::mbc55x_io); m_maincpu->set_irq_acknowledge_callback(PIC8259_TAG, FUNC(pic8259_device::inta_cb)); + m_maincpu->esc_opcode_handler().set("coproc", FUNC(i8087_device::insn_w)); + m_maincpu->esc_data_handler().set("coproc", FUNC(i8087_device::addr_w)); + + i8087_device &i8087(I8087(config, "coproc", 14.318181_MHz_XTAL / 4)); + i8087.set_addrmap(AS_PROGRAM, &mbc55x_state::mbc55x_mem); + i8087.set_data_width(8); + i8087.irq().set(m_pic, FUNC(pic8259_device::ir6_w)); + i8087.busy().set_inputline("maincpu", INPUT_LINE_TEST); ADDRESS_MAP_BANK(config, m_iodecode); m_iodecode->endianness(ENDIANNESS_LITTLE); @@ -331,7 +340,7 @@ MACHINE_CONFIG_START(mbc55x_state::mbc55x) /* Software list */ MCFG_SOFTWARE_LIST_ADD("disk_list","mbc55x") - isa8_device &isa(ISA8(config, "isa", 0)); + isa8_device &isa(ISA8(config, "isa", 14.318181_MHz_XTAL / 4)); isa.set_cputag(m_maincpu); isa.irq7_callback().set(m_pic, FUNC(pic8259_device::ir7_w)); // all other IRQ and DRQ lines are NC //isa.iochck_callback().set_inputline(m_maincpu, INPUT_LINE_NMI)); diff --git a/src/mame/includes/mbc55x.h b/src/mame/includes/mbc55x.h index d841245aac2..4a73b3b44d9 100644 --- a/src/mame/includes/mbc55x.h +++ b/src/mame/includes/mbc55x.h @@ -114,7 +114,7 @@ public: void init_mbc55x(); - required_device<cpu_device> m_maincpu; + required_device<i8086_cpu_device> m_maincpu; required_device<address_map_bank_device> m_iodecode; uint32_t m_debug_machine; |