From d14e73e4fd8c8c19187ffe57fcfa1a22737b1284 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Thu, 31 Oct 2013 21:52:38 +0000 Subject: [PATCH] (MESS) Cleanup. (nw) --- .gitattributes | 6 +- src/emu/bus/abc1600/abc1600.c | 127 ------------ src/emu/bus/abc1600/abc1600.h | 227 ---------------------- src/emu/bus/abcbus/abc890.c | 4 +- src/emu/bus/abcbus/abc890.h | 2 +- src/emu/bus/abcbus/abcbus.c | 30 ++- src/emu/bus/abcbus/abcbus.h | 161 +++++++++++++-- src/emu/bus/abcbus/lux10828.c | 20 +- src/emu/bus/abcbus/lux10828.h | 4 +- src/emu/bus/abcbus/lux21046.c | 30 ++- src/emu/bus/abcbus/lux21046.h | 3 +- src/emu/bus/abcbus/lux21056.c | 4 +- src/emu/bus/abcbus/lux21056.h | 2 +- src/emu/bus/{abc1600 => abcbus}/lux4105.c | 58 ++---- src/emu/bus/{abc1600 => abcbus}/lux4105.h | 25 ++- src/emu/bus/bus.mak | 12 +- src/emu/emu.mak | 1 - src/mess/drivers/abc1600.c | 60 ++---- src/mess/drivers/abc80.c | 2 +- src/mess/drivers/abc80x.c | 6 +- src/mess/includes/abc1600.h | 10 +- src/mess/mess.mak | 1 - 22 files changed, 279 insertions(+), 516 deletions(-) delete mode 100644 src/emu/bus/abc1600/abc1600.c delete mode 100644 src/emu/bus/abc1600/abc1600.h rename src/emu/bus/{abc1600 => abcbus}/lux4105.c (86%) rename src/emu/bus/{abc1600 => abcbus}/lux4105.h (78%) diff --git a/.gitattributes b/.gitattributes index 855860c31ec..75b8eed58b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -410,10 +410,6 @@ src/emu/bus/a2bus/a2zipdrive.c svneol=native#text/plain src/emu/bus/a2bus/a2zipdrive.h svneol=native#text/plain src/emu/bus/a2bus/laser128.c svneol=native#text/plain src/emu/bus/a2bus/laser128.h svneol=native#text/plain -src/emu/bus/abc1600/abc1600.c svneol=native#text/plain -src/emu/bus/abc1600/abc1600.h svneol=native#text/plain -src/emu/bus/abc1600/lux4105.c svneol=native#text/plain -src/emu/bus/abc1600/lux4105.h svneol=native#text/plain src/emu/bus/abcbus/abc890.c svneol=native#text/plain src/emu/bus/abcbus/abc890.h svneol=native#text/plain src/emu/bus/abcbus/abcbus.c svneol=native#text/plain @@ -430,6 +426,8 @@ src/emu/bus/abcbus/lux21046.c svneol=native#text/plain src/emu/bus/abcbus/lux21046.h svneol=native#text/plain src/emu/bus/abcbus/lux21056.c svneol=native#text/plain src/emu/bus/abcbus/lux21056.h svneol=native#text/plain +src/emu/bus/abcbus/lux4105.c svneol=native#text/plain +src/emu/bus/abcbus/lux4105.h svneol=native#text/plain src/emu/bus/abcbus/sio.c svneol=native#text/plain src/emu/bus/abcbus/sio.h svneol=native#text/plain src/emu/bus/abcbus/slutprov.c svneol=native#text/plain diff --git a/src/emu/bus/abc1600/abc1600.c b/src/emu/bus/abc1600/abc1600.c deleted file mode 100644 index 1df388c05a0..00000000000 --- a/src/emu/bus/abc1600/abc1600.c +++ /dev/null @@ -1,127 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Luxor ABC 1600 Expansion Bus emulation - - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - -**********************************************************************/ - -#include "abc1600.h" - - - -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -const device_type ABC1600BUS_SLOT = &device_creator; - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// device_abc1600bus_card_interface - constructor -//------------------------------------------------- - -device_abc1600bus_card_interface::device_abc1600bus_card_interface(const machine_config &mconfig, device_t &device) - : device_slot_card_interface(mconfig, device) -{ - m_slot = dynamic_cast(device.owner()); -} - - -//------------------------------------------------- -// abc1600bus_slot_device - constructor -//------------------------------------------------- - -abc1600bus_slot_device::abc1600bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, ABC1600BUS_SLOT, "ABC 1600 bus slot", tag, owner, clock, "abc1600bus_slot", __FILE__), - device_slot_interface(mconfig, *this), - m_int(CLEAR_LINE), - m_pren(1), - m_trrq(1), - m_nmi(CLEAR_LINE), - m_xint2(CLEAR_LINE), - m_xint3(CLEAR_LINE), - m_xint4(CLEAR_LINE), - m_xint5(CLEAR_LINE) -{ -} - - -//------------------------------------------------- -// device_config_complete - perform any -// operations now that the configuration is -// complete -//------------------------------------------------- - -void abc1600bus_slot_device::device_config_complete() -{ - // inherit a copy of the static data - const abc1600bus_interface *intf = reinterpret_cast(static_config()); - if (intf != NULL) - { - *static_cast(this) = *intf; - } - - // or initialize to defaults if none provided - else - { - memset(&m_out_int_cb, 0, sizeof(m_out_int_cb)); - memset(&m_out_pren_cb, 0, sizeof(m_out_pren_cb)); - memset(&m_out_trrq_cb, 0, sizeof(m_out_trrq_cb)); - memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb)); - memset(&m_out_xint2_cb, 0, sizeof(m_out_xint2_cb)); - memset(&m_out_xint3_cb, 0, sizeof(m_out_xint3_cb)); - memset(&m_out_xint4_cb, 0, sizeof(m_out_xint4_cb)); - memset(&m_out_xint5_cb, 0, sizeof(m_out_xint5_cb)); - } -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void abc1600bus_slot_device::device_start() -{ - m_card = dynamic_cast(get_card_device()); - - // resolve callbacks - m_out_int_func.resolve(m_out_int_cb, *this); - m_out_pren_func.resolve(m_out_pren_cb, *this); - m_out_trrq_func.resolve(m_out_trrq_cb, *this); - m_out_nmi_func.resolve(m_out_nmi_cb, *this); - m_out_xint2_func.resolve(m_out_xint2_cb, *this); - m_out_xint3_func.resolve(m_out_xint3_cb, *this); - m_out_xint4_func.resolve(m_out_xint4_cb, *this); - m_out_xint5_func.resolve(m_out_xint5_cb, *this); - - // state saving - save_item(NAME(m_int)); - save_item(NAME(m_pren)); - save_item(NAME(m_trrq)); - save_item(NAME(m_nmi)); - save_item(NAME(m_xint2)); - save_item(NAME(m_xint3)); - save_item(NAME(m_xint4)); - save_item(NAME(m_xint5)); -} - - -//------------------------------------------------- -// SLOT_INTERFACE( abc1600bus_cards ) -//------------------------------------------------- - -SLOT_INTERFACE_START( abc1600bus_cards ) - SLOT_INTERFACE("4105", LUXOR_4105) // SASI interface -// SLOT_INTERFACE("4077", LUXOR_4077) // Winchester controller -// SLOT_INTERFACE("4004", LUXOR_4004) // ICOM I/O (Z80, Z80PIO, Z80SIO/2, Z80CTC, 2 Z80DMAs, 2 PROMs, 64KB RAM) - SLOT_INTERFACE("fast", LUXOR_55_21046) -SLOT_INTERFACE_END diff --git a/src/emu/bus/abc1600/abc1600.h b/src/emu/bus/abc1600/abc1600.h deleted file mode 100644 index 318369cd0ee..00000000000 --- a/src/emu/bus/abc1600/abc1600.h +++ /dev/null @@ -1,227 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Luxor ABC 1600 Expansion Bus emulation - - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - -********************************************************************** - - A B - -12 V --- * 1 * --- -12V - 0 V --- * 2 * --- 0 V - BPCLK* --- * 3 * --- BPCLK - 0 V --- * 4 * --- 0 V - INT* --- * 5 * --- 0 V - D7 --- * 6 * --- 0 V - D6 --- * 7 * --- - D5 --- * 8 * --- - D4 --- * 9 * --- - D3 --- * 10 * --- XINT*5^ - D2 --- * 11 * --- XINT*4^ - D1 --- * 12 * --- XINT*3^ - D0 --- * 13 * --- XINT*2^ - CSB* --- * 14 * --- XCSB*2^ - BRST* --- * 15 * --- XCSB*3^ - STAT* --- * 16 * --- XCSB*4^ - INP* --- * 17 * --- XCSB*5^ - C4* --- * 18 * --- - C3* --- * 19 * --- - C2* --- * 20 * --- - C1* --- * 21 * --- EXP*^ - OUT* --- * 22 * --- BUSEN*^ - CS* --- * 23 * --- DSTB* - NMI*^ --- * 24 * --- 0 V - OPS* --- * 25 * --- A4 - --- * 26 * --- A3 - TREN* --- * 27 * --- A2 - TRRQ* --- * 28 * --- A1 - PRAC* --- * 29 * --- A0 - PREN* --- * 30 * --- DIRW/R* - +5 V --- * 31 * --- +5 V - +12 V --- * 32 * --- +12 V - - ^ only connected on BUS0X - -**********************************************************************/ - -#pragma once - -#ifndef __ABC1600BUS__ -#define __ABC1600BUS__ - -#include "emu.h" - - - -//************************************************************************** -// CONSTANTS -//************************************************************************** - -#define ABC1600BUS_TAG "abc1600bus" - - - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define ABC1600BUS_INTERFACE(_name) \ - const abc1600bus_interface (_name) = - - -#define MCFG_ABC1600BUS_SLOT_ADD(_tag, _config, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, ABC1600BUS_SLOT, 0) \ - MCFG_DEVICE_CONFIG(_config) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> abc1600bus_interface - -struct abc1600bus_interface -{ - devcb_write_line m_out_int_cb; - devcb_write_line m_out_pren_cb; - devcb_write_line m_out_trrq_cb; - - // the following are connected only on BUS0X - devcb_write_line m_out_nmi_cb; - devcb_write_line m_out_xint2_cb; - devcb_write_line m_out_xint3_cb; - devcb_write_line m_out_xint4_cb; - devcb_write_line m_out_xint5_cb; -}; - - -// ======================> device_abc1600bus_card_interface - -class abc1600bus_slot_device; - -// class representing interface-specific live abc1600bus card -class device_abc1600bus_card_interface : public device_slot_card_interface -{ -public: - // construction/destruction - device_abc1600bus_card_interface(const machine_config &mconfig, device_t &device); - - // required operation overrides - virtual void abc1600bus_cs(UINT8 data) = 0; - virtual int abc1600bus_csb() = 0; - - // optional operation overrides - virtual UINT8 abc1600bus_inp() { return 0xff; }; - virtual void abc1600bus_out(UINT8 data) { }; - virtual UINT8 abc1600bus_stat() { return 0xff; }; - virtual UINT8 abc1600bus_ops() { return 0xff; }; - virtual void abc1600bus_c1(UINT8 data) { }; - virtual void abc1600bus_c2(UINT8 data) { }; - virtual void abc1600bus_c3(UINT8 data) { }; - virtual void abc1600bus_c4(UINT8 data) { }; - virtual void abc1600bus_tren(int state) { }; - virtual void abc1600bus_prac(int state) { }; - virtual UINT8 abc1600bus_exp() { return 0xff; }; - virtual int abc1600bus_xcsb2() { return 1; }; - virtual int abc1600bus_xcsb3() { return 1; }; - virtual int abc1600bus_xcsb4() { return 1; }; - virtual int abc1600bus_xcsb5() { return 1; }; - -public: - abc1600bus_slot_device *m_slot; -}; - - -// ======================> abc1600bus_slot_device - -class abc1600bus_slot_device : public device_t, - public device_slot_interface, - public abc1600bus_interface -{ -public: - // construction/destruction - abc1600bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // device-level overrides - virtual void device_start(); - virtual void device_config_complete(); - - // computer interface - void cs_w(UINT8 data) { if (m_card) m_card->abc1600bus_cs(data); } - DECLARE_READ_LINE_MEMBER( csb_r ) { return m_card ? m_card->abc1600bus_csb() : 1; } - void brst_w() { device_reset(); } - UINT8 inp_r() { return m_card ? m_card->abc1600bus_inp() : 0xff; } - void out_w(UINT8 data) { if (m_card) m_card->abc1600bus_out(data); } - UINT8 stat_r() { return m_card ? m_card->abc1600bus_stat() : 0xff; } - UINT8 ops_r() { return m_card ? m_card->abc1600bus_ops() : 0xff; } - void c1_w(UINT8 data) { if (m_card) m_card->abc1600bus_c1(data); } - void c2_w(UINT8 data) { if (m_card) m_card->abc1600bus_c2(data); } - void c3_w(UINT8 data) { if (m_card) m_card->abc1600bus_c3(data); } - void c4_w(UINT8 data) { if (m_card) m_card->abc1600bus_c4(data); } - UINT8 exp_r() { return m_card ? m_card->abc1600bus_exp() : 0xff; } - DECLARE_READ_LINE_MEMBER( xcsb2_r ) { return m_card ? m_card->abc1600bus_xcsb2() : 1; } - DECLARE_READ_LINE_MEMBER( xcsb3_r ) { return m_card ? m_card->abc1600bus_xcsb3() : 1; } - DECLARE_READ_LINE_MEMBER( xcsb4_r ) { return m_card ? m_card->abc1600bus_xcsb4() : 1; } - DECLARE_READ_LINE_MEMBER( xcsb5_r ) { return m_card ? m_card->abc1600bus_xcsb5() : 1; } - DECLARE_WRITE_LINE_MEMBER( tren_w ) { if (m_card) m_card->abc1600bus_tren(state); } - DECLARE_WRITE_LINE_MEMBER( prac_w ) { if (m_card) m_card->abc1600bus_prac(state); } - DECLARE_READ_LINE_MEMBER( int_r ) { return m_int; } - DECLARE_READ_LINE_MEMBER( pren_r ) { return m_pren; } - DECLARE_READ_LINE_MEMBER( trrq_r ) { return m_trrq; } - DECLARE_READ_LINE_MEMBER( nmi_r ) { return m_nmi; } - DECLARE_READ_LINE_MEMBER( xint2_r ) { return m_xint2; } - DECLARE_READ_LINE_MEMBER( xint3_r ) { return m_xint3; } - DECLARE_READ_LINE_MEMBER( xint4_r ) { return m_xint4; } - DECLARE_READ_LINE_MEMBER( xint5_r ) { return m_xint5; } - - // card interface - DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int = state; m_out_int_func(state); } - DECLARE_WRITE_LINE_MEMBER( pren_w ) { m_pren = state; m_out_pren_func(state); } - DECLARE_WRITE_LINE_MEMBER( trrq_w ) { m_trrq = state; m_out_trrq_func(state); } - DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi = state; m_out_nmi_func(state); } - DECLARE_WRITE_LINE_MEMBER( xint2_w ) { m_xint2 = state; m_out_xint2_func(state); } - DECLARE_WRITE_LINE_MEMBER( xint3_w ) { m_xint3 = state; m_out_xint3_func(state); } - DECLARE_WRITE_LINE_MEMBER( xint4_w ) { m_xint4 = state; m_out_xint4_func(state); } - DECLARE_WRITE_LINE_MEMBER( xint5_w ) { m_xint5 = state; m_out_xint5_func(state); } - -private: - devcb_resolved_write_line m_out_int_func; - devcb_resolved_write_line m_out_pren_func; - devcb_resolved_write_line m_out_trrq_func; - devcb_resolved_write_line m_out_nmi_func; - devcb_resolved_write_line m_out_xint2_func; - devcb_resolved_write_line m_out_xint3_func; - devcb_resolved_write_line m_out_xint4_func; - devcb_resolved_write_line m_out_xint5_func; - - device_abc1600bus_card_interface *m_card; - - int m_int; - int m_pren; - int m_trrq; - int m_nmi; - int m_xint2; - int m_xint3; - int m_xint4; - int m_xint5; -}; - - -// device type definition -extern const device_type ABC1600BUS_SLOT; - - -// slot devices -#include "lux4105.h" -#include "bus/abcbus/lux21046.h" - -SLOT_INTERFACE_EXTERN( abc1600bus_cards ); - - - -#endif diff --git a/src/emu/bus/abcbus/abc890.c b/src/emu/bus/abcbus/abc890.c index 436f6281ee1..094ac0f5279 100644 --- a/src/emu/bus/abcbus/abc890.c +++ b/src/emu/bus/abcbus/abc890.c @@ -207,11 +207,11 @@ UINT8 abc890_device::abcbus_inp() return data; } -void abc890_device::abcbus_utp(UINT8 data) +void abc890_device::abcbus_out(UINT8 data) { for (int i = 0; i < m_slots; i++) { - m_expansion_slot[i]->utp_w(data); + m_expansion_slot[i]->out_w(data); } } diff --git a/src/emu/bus/abcbus/abc890.h b/src/emu/bus/abcbus/abc890.h index d1b271a7f5e..be3232bcb28 100644 --- a/src/emu/bus/abcbus/abc890.h +++ b/src/emu/bus/abcbus/abc890.h @@ -52,7 +52,7 @@ protected: // device_abcbus_interface overrides virtual void abcbus_cs(UINT8 data); virtual UINT8 abcbus_inp(); - virtual void abcbus_utp(UINT8 data); + virtual void abcbus_out(UINT8 data); virtual UINT8 abcbus_stat(); virtual void abcbus_c1(UINT8 data); virtual void abcbus_c2(UINT8 data); diff --git a/src/emu/bus/abcbus/abcbus.c b/src/emu/bus/abcbus/abcbus.c index 2df4821a960..1aa8c9ecb96 100644 --- a/src/emu/bus/abcbus/abcbus.c +++ b/src/emu/bus/abcbus/abcbus.c @@ -43,10 +43,16 @@ device_abcbus_card_interface::device_abcbus_card_interface(const machine_config abcbus_slot_device::abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, ABCBUS_SLOT, "ABCBUS slot", tag, owner, clock, "abcbus_slot", __FILE__), device_slot_interface(mconfig, *this), - m_write_int(*this), + m_write_irq(*this), m_write_nmi(*this), m_write_rdy(*this), - m_write_resin(*this) + m_write_resin(*this), + m_write_pren(*this), + m_write_trrq(*this), + m_write_xint2(*this), + m_write_xint3(*this), + m_write_xint4(*this), + m_write_xint5(*this) { } @@ -60,10 +66,16 @@ void abcbus_slot_device::device_start() m_card = dynamic_cast(get_card_device()); // resolve callbacks - m_write_int.resolve_safe(); + m_write_irq.resolve_safe(); m_write_nmi.resolve_safe(); m_write_rdy.resolve_safe(); m_write_resin.resolve_safe(); + m_write_pren.resolve_safe(); + m_write_trrq.resolve_safe(); + m_write_xint2.resolve_safe(); + m_write_xint3.resolve_safe(); + m_write_xint4.resolve_safe(); + m_write_xint5.resolve_safe(); } @@ -86,3 +98,15 @@ SLOT_INTERFACE_START( abcbus_cards ) SLOT_INTERFACE("turbo", TURBO_KONTROLLER) SLOT_INTERFACE("xebec", LUXOR_55_21056) SLOT_INTERFACE_END + + +//------------------------------------------------- +// SLOT_INTERFACE( abc1600bus_cards ) +//------------------------------------------------- + +SLOT_INTERFACE_START( abc1600bus_cards ) + SLOT_INTERFACE("4105", LUXOR_4105) // SASI interface +// SLOT_INTERFACE("4077", LUXOR_4077) // Winchester controller +// SLOT_INTERFACE("4004", LUXOR_4004) // ICOM I/O (Z80, Z80PIO, Z80SIO/2, Z80CTC, 2 Z80DMAs, 2 PROMs, 64KB RAM) + SLOT_INTERFACE("fast", LUXOR_55_21046) +SLOT_INTERFACE_END diff --git a/src/emu/bus/abcbus/abcbus.h b/src/emu/bus/abcbus/abcbus.h index 600ddfbbc4f..c26103e1ea2 100644 --- a/src/emu/bus/abcbus/abcbus.h +++ b/src/emu/bus/abcbus/abcbus.h @@ -9,7 +9,9 @@ ********************************************************************** - a b + ABC 80 + + A B -12 V <-- * 1 * --> -12V 0 V --- * 2 * --- 0 V RESIN_ --> * 3 * --> XMEMWR_ @@ -43,10 +45,6 @@ +5 V <-- * 31 * --> +5 V +12 V <-- * 32 * --> +12 V -**********************************************************************/ - -/* - OUT 0 _OUT data output OUT 1 _CS card select OUT 2 _C1 command 1 @@ -58,7 +56,47 @@ IN 1 _STAT status in IN 7 RST reset -*/ +********************************************************************** + + ABC 1600 + + A B + -12 V --- * 1 * --- -12V + 0 V --- * 2 * --- 0 V + BPCLK* --- * 3 * --- BPCLK + 0 V --- * 4 * --- 0 V + INT* --- * 5 * --- 0 V + D7 --- * 6 * --- 0 V + D6 --- * 7 * --- + D5 --- * 8 * --- + D4 --- * 9 * --- + D3 --- * 10 * --- XINT*5^ + D2 --- * 11 * --- XINT*4^ + D1 --- * 12 * --- XINT*3^ + D0 --- * 13 * --- XINT*2^ + CSB* --- * 14 * --- XCSB*2^ + BRST* --- * 15 * --- XCSB*3^ + STAT* --- * 16 * --- XCSB*4^ + INP* --- * 17 * --- XCSB*5^ + C4* --- * 18 * --- + C3* --- * 19 * --- + C2* --- * 20 * --- + C1* --- * 21 * --- EXP*^ + OUT* --- * 22 * --- BUSEN*^ + CS* --- * 23 * --- DSTB* + NMI*^ --- * 24 * --- 0 V + OPS* --- * 25 * --- A4 + --- * 26 * --- A3 + TREN* --- * 27 * --- A2 + TRRQ* --- * 28 * --- A1 + PRAC* --- * 29 * --- A0 + PREN* --- * 30 * --- DIRW/R* + +5 V --- * 31 * --- +5 V + +12 V --- * 32 * --- +12 V + + ^ only connected on BUS0X + +**********************************************************************/ #pragma once @@ -85,6 +123,37 @@ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) +#define MCFG_ABCBUS_SLOT_IRQ_CALLBACK(_irq) \ + downcast(device)->set_irq_callback(DEVCB2_##_irq); + +#define MCFG_ABCBUS_SLOT_NMI_CALLBACK(_nmi) \ + downcast(device)->set_nmi_callback(DEVCB2_##_nmi); + +#define MCFG_ABCBUS_SLOT_RDY_CALLBACK(_rdy) \ + downcast(device)->set_rdy_callback(DEVCB2_##_rdy); + +#define MCFG_ABCBUS_SLOT_RESIN_CALLBACK(_resin) \ + downcast(device)->set_resin_callback(DEVCB2_##_resin); + +#define MCFG_ABCBUS_SLOT_PREN_CALLBACK(_pren) \ + downcast(device)->set_pren_callback(DEVCB2_##_pren); + +#define MCFG_ABCBUS_SLOT_TRRQ_CALLBACK(_trrq) \ + downcast(device)->set_trrq_callback(DEVCB2_##_trrq); + +#define MCFG_ABCBUS_SLOT_XINT2_CALLBACK(_xint2) \ + downcast(device)->set_xint2_callback(DEVCB2_##_xint2); + +#define MCFG_ABCBUS_SLOT_XINT3_CALLBACK(_xint3) \ + downcast(device)->set_xint3_callback(DEVCB2_##_xint3); + +#define MCFG_ABCBUS_SLOT_XINT4_CALLBACK(_xint4) \ + downcast(device)->set_xint4_callback(DEVCB2_##_xint4); + +#define MCFG_ABCBUS_SLOT_XINT5_CALLBACK(_xint5) \ + downcast(device)->set_xint5_callback(DEVCB2_##_xint5); + + //************************************************************************** // TYPE DEFINITIONS @@ -105,15 +174,28 @@ public: // optional operation overrides virtual UINT8 abcbus_inp() { return 0xff; }; - virtual void abcbus_utp(UINT8 data) { }; + virtual void abcbus_out(UINT8 data) { }; virtual UINT8 abcbus_stat() { return 0xff; }; virtual void abcbus_c1(UINT8 data) { }; virtual void abcbus_c2(UINT8 data) { }; virtual void abcbus_c3(UINT8 data) { }; virtual void abcbus_c4(UINT8 data) { }; + + // optional operation overrides for ABC 80 virtual UINT8 abcbus_xmemfl(offs_t offset) { return 0xff; }; virtual void abcbus_xmemw(offs_t offset, UINT8 data) { }; + // optional operation overrides for ABC 1600 + virtual int abcbus_csb() { return 1; } + virtual UINT8 abcbus_ops() { return 0xff; }; + virtual void abcbus_tren(int state) { }; + virtual void abcbus_prac(int state) { }; + virtual UINT8 abcbus_exp() { return 0xff; }; + virtual int abcbus_xcsb2() { return 1; }; + virtual int abcbus_xcsb3() { return 1; }; + virtual int abcbus_xcsb4() { return 1; }; + virtual int abcbus_xcsb5() { return 1; }; + public: abcbus_slot_device *m_slot; }; @@ -128,11 +210,22 @@ public: // construction/destruction abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + template void set_irq_callback(_irq irq) { m_write_irq.set_callback(irq); } + template void set_nmi_callback(_nmi nmi) { m_write_nmi.set_callback(nmi); } + template void set_rdy_callback(_rdy rdy) { m_write_rdy.set_callback(rdy); } + template void set_resin_callback(_resin resin) { m_write_resin.set_callback(resin); } + template void set_pren_callback(_pren pren) { m_write_pren.set_callback(pren); } + template void set_trrq_callback(_trrq trrq) { m_write_trrq.set_callback(trrq); } + template void set_xint2_callback(_xint2 xint2) { m_write_xint2.set_callback(xint2); } + template void set_xint3_callback(_xint3 xint3) { m_write_xint3.set_callback(xint3); } + template void set_xint4_callback(_xint4 xint4) { m_write_xint4.set_callback(xint4); } + template void set_xint5_callback(_xint5 xint5) { m_write_xint5.set_callback(xint5); } + // computer interface void cs_w(UINT8 data) { if (m_card) m_card->abcbus_cs(data); } UINT8 rst_r() { device_reset(); return 0xff; } UINT8 inp_r() { return m_card ? m_card->abcbus_inp() : 0xff; } - void utp_w(UINT8 data) { if (m_card) m_card->abcbus_utp(data); } + void out_w(UINT8 data) { if (m_card) m_card->abcbus_out(data); } UINT8 stat_r() { return m_card ? m_card->abcbus_stat() : 0xff; } void c1_w(UINT8 data) { if (m_card) m_card->abcbus_c1(data); } void c2_w(UINT8 data) { if (m_card) m_card->abcbus_c2(data); } @@ -140,11 +233,20 @@ public: void c4_w(UINT8 data) { if (m_card) m_card->abcbus_c4(data); } UINT8 xmemfl_r(offs_t offset) { return m_card ? m_card->abcbus_xmemfl(offset) : 0xff; } void xmemw_w(offs_t offset, UINT8 data) { if (m_card) m_card->abcbus_xmemw(offset, data); } + DECLARE_READ_LINE_MEMBER( csb_r ) { return m_card ? m_card->abcbus_csb() : 1; } + UINT8 ops_r() { return m_card ? m_card->abcbus_ops() : 0xff; } + UINT8 exp_r() { return m_card ? m_card->abcbus_exp() : 0xff; } + DECLARE_READ_LINE_MEMBER( xcsb2_r ) { return m_card ? m_card->abcbus_xcsb2() : 1; } + DECLARE_READ_LINE_MEMBER( xcsb3_r ) { return m_card ? m_card->abcbus_xcsb3() : 1; } + DECLARE_READ_LINE_MEMBER( xcsb4_r ) { return m_card ? m_card->abcbus_xcsb4() : 1; } + DECLARE_READ_LINE_MEMBER( xcsb5_r ) { return m_card ? m_card->abcbus_xcsb5() : 1; } + DECLARE_WRITE_LINE_MEMBER( tren_w ) { if (m_card) m_card->abcbus_tren(state); } + DECLARE_WRITE_LINE_MEMBER( prac_w ) { if (m_card) m_card->abcbus_prac(state); } DECLARE_WRITE8_MEMBER( cs_w ) { cs_w(data); } DECLARE_READ8_MEMBER( rst_r ) { return rst_r(); } DECLARE_READ8_MEMBER( inp_r ) { return inp_r(); } - DECLARE_WRITE8_MEMBER( utp_w ) { utp_w(data); } + DECLARE_WRITE8_MEMBER( out_w ) { out_w(data); } DECLARE_READ8_MEMBER( stat_r ) { return stat_r(); } DECLARE_WRITE8_MEMBER( c1_w ) { c1_w(data); } DECLARE_WRITE8_MEMBER( c2_w ) { c2_w(data); } @@ -153,24 +255,53 @@ public: DECLARE_READ8_MEMBER( xmemfl_r ) { return xmemfl_r(offset); } DECLARE_WRITE8_MEMBER( xmemw_w ) { xmemw_w(offset, data); } - // peripheral interface - DECLARE_WRITE_LINE_MEMBER( int_w ) { m_write_int(state); } - DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_write_nmi(state); } + DECLARE_READ_LINE_MEMBER( irq_r ) { return m_irq; } + DECLARE_READ_LINE_MEMBER( nmi_r ) { return m_nmi; } + DECLARE_READ_LINE_MEMBER( pren_r ) { return m_pren; } + DECLARE_READ_LINE_MEMBER( trrq_r ) { return m_trrq; } + DECLARE_READ_LINE_MEMBER( xint2_r ) { return m_xint2; } + DECLARE_READ_LINE_MEMBER( xint3_r ) { return m_xint3; } + DECLARE_READ_LINE_MEMBER( xint4_r ) { return m_xint4; } + DECLARE_READ_LINE_MEMBER( xint5_r ) { return m_xint5; } + + // card interface + DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_irq = state; m_write_irq(state); } + DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi = state; m_write_nmi(state); } DECLARE_WRITE_LINE_MEMBER( rdy_w ) { m_write_rdy(state); } DECLARE_WRITE_LINE_MEMBER( resin_w ) { m_write_resin(state); } + DECLARE_WRITE_LINE_MEMBER( pren_w ) { m_pren = state; m_write_pren(state); } + DECLARE_WRITE_LINE_MEMBER( trrq_w ) { m_trrq = state; m_write_trrq(state); } + DECLARE_WRITE_LINE_MEMBER( xint2_w ) { m_xint2 = state; m_write_xint2(state); } + DECLARE_WRITE_LINE_MEMBER( xint3_w ) { m_xint3 = state; m_write_xint3(state); } + DECLARE_WRITE_LINE_MEMBER( xint4_w ) { m_xint4 = state; m_write_xint4(state); } + DECLARE_WRITE_LINE_MEMBER( xint5_w ) { m_xint5 = state; m_write_xint5(state); } protected: // device-level overrides virtual void device_start(); virtual void device_reset() { if (m_card) get_card_device()->reset(); } -private: - devcb2_write_line m_write_int; + devcb2_write_line m_write_irq; devcb2_write_line m_write_nmi; devcb2_write_line m_write_rdy; devcb2_write_line m_write_resin; + devcb2_write_line m_write_pren; + devcb2_write_line m_write_trrq; + devcb2_write_line m_write_xint2; + devcb2_write_line m_write_xint3; + devcb2_write_line m_write_xint4; + devcb2_write_line m_write_xint5; device_abcbus_card_interface *m_card; + + int m_irq; + int m_nmi; + int m_pren; + int m_trrq; + int m_xint2; + int m_xint3; + int m_xint4; + int m_xint5; }; @@ -186,12 +317,14 @@ extern const device_type ABCBUS_SLOT; #include "lux10828.h" #include "lux21046.h" #include "lux21056.h" +#include "lux4105.h" #include "uni800.h" #include "sio.h" #include "slutprov.h" #include "turbo.h" SLOT_INTERFACE_EXTERN( abcbus_cards ); +SLOT_INTERFACE_EXTERN( abc1600bus_cards ); diff --git a/src/emu/bus/abcbus/lux10828.c b/src/emu/bus/abcbus/lux10828.c index 9515f7f1e91..7b5171df6ec 100644 --- a/src/emu/bus/abcbus/lux10828.c +++ b/src/emu/bus/abcbus/lux10828.c @@ -152,21 +152,21 @@ ROM_START( luxor_55_10828 ) ROM_REGION( 0x800, Z80_TAG, 0 ) ROM_DEFAULT_BIOS("mpi02n") // ABC 830 - ROM_SYSTEM_BIOS(0, "basf6106", "BASF 6106/08" ) + ROM_SYSTEM_BIOS( 0, "basf6106", "BASF 6106/08" ) ROMX_LOAD( "basf .02.7c", 0x000, 0x800, CRC(5daba200) SHA1(7881933760bed3b94f27585c0a6fc43e5d5153f5), ROM_BIOS(1) ) - ROM_SYSTEM_BIOS(1, "mpi02", "MPI 51" ) + ROM_SYSTEM_BIOS( 1, "mpi02", "MPI 51" ) ROMX_LOAD( "mpi .02.7c", 0x000, 0x800, CRC(2aac9296) SHA1(c01a62e7933186bdf7068d2e9a5bc36590544349), ROM_BIOS(2) ) - ROM_SYSTEM_BIOS(2, "mpi02n", "MPI 51 (newer)" ) + ROM_SYSTEM_BIOS( 2, "mpi02n", "MPI 51 (newer)" ) ROMX_LOAD( "new mpi .02.7c", 0x000, 0x800, CRC(ab788171) SHA1(c8e29965c04c85f2f2648496ea10c9c7ff95392f), ROM_BIOS(3) ) // ABC 832 - ROM_SYSTEM_BIOS(3, "micr1015", "Micropolis 1015 (v1.4)" ) + ROM_SYSTEM_BIOS( 3, "micr1015", "Micropolis 1015 (v1.4)" ) ROMX_LOAD( "micr 1.4.7c", 0x000, 0x800, CRC(a7bc05fa) SHA1(6ac3e202b7ce802c70d89728695f1cb52ac80307), ROM_BIOS(4) ) - ROM_SYSTEM_BIOS(4, "micr1115", "Micropolis 1115 (v2.3)" ) + ROM_SYSTEM_BIOS( 4, "micr1115", "Micropolis 1115 (v2.3)" ) ROMX_LOAD( "micr 2.3.7c", 0x000, 0x800, CRC(f2fc5ccc) SHA1(86d6baadf6bf1d07d0577dc1e092850b5ff6dd1b), ROM_BIOS(5) ) - ROM_SYSTEM_BIOS(5, "basf6118", "BASF 6118 (v1.2)" ) + ROM_SYSTEM_BIOS( 5, "basf6118", "BASF 6118 (v1.2)" ) ROMX_LOAD( "basf 1.2.7c", 0x000, 0x800, CRC(9ca1a1eb) SHA1(04973ad69de8da403739caaebe0b0f6757e4a6b1), ROM_BIOS(6) ) // ABC 838 - ROM_SYSTEM_BIOS(6, "basf6104", "BASF 6104, BASF 6115 (v1.0)" ) + ROM_SYSTEM_BIOS( 6, "basf6104", "BASF 6104, BASF 6115 (v1.0)" ) ROMX_LOAD( "basf 8 1.0.7c", 0x000, 0x800, NO_DUMP, ROM_BIOS(7) ) ROM_END @@ -530,10 +530,10 @@ UINT8 luxor_55_10828_device::abcbus_inp() //------------------------------------------------- -// abcbus_utp - +// abcbus_out - //------------------------------------------------- -void luxor_55_10828_device::abcbus_utp(UINT8 data) +void luxor_55_10828_device::abcbus_out(UINT8 data) { if (!m_cs) return; @@ -652,7 +652,7 @@ WRITE8_MEMBER( luxor_55_10828_device::status_w ) m_status = data & 0xfe; // interrupt - m_slot->int_w(BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE); + m_slot->irq_w(BIT(data, 0) ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/emu/bus/abcbus/lux10828.h b/src/emu/bus/abcbus/lux10828.h index 843d62a1b8f..757342e54b5 100644 --- a/src/emu/bus/abcbus/lux10828.h +++ b/src/emu/bus/abcbus/lux10828.h @@ -52,7 +52,7 @@ // ======================> luxor_55_10828_device class luxor_55_10828_device : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction @@ -84,7 +84,7 @@ protected: // device_abcbus_interface overrides virtual void abcbus_cs(UINT8 data); virtual UINT8 abcbus_inp(); - virtual void abcbus_utp(UINT8 data); + virtual void abcbus_out(UINT8 data); virtual UINT8 abcbus_stat(); virtual void abcbus_c1(UINT8 data); virtual void abcbus_c3(UINT8 data); diff --git a/src/emu/bus/abcbus/lux21046.c b/src/emu/bus/abcbus/lux21046.c index bc13fd4e919..96d88619b13 100644 --- a/src/emu/bus/abcbus/lux21046.c +++ b/src/emu/bus/abcbus/lux21046.c @@ -41,18 +41,19 @@ PCB Layout | | | LS10 LS266 S5 LS374 | | S3 | -| S1 LS240 | +| PAL* S1 LS240 | | | -| LS244 SW3 DM8131 | +| LS125* LS244 SW3 DM8131 | | | | | |--|-----------------------------|--| |------------CON1-------------| Notes: - All IC's shown. + All IC's shown. (* only stocked when used with the ABC 1600 computer) ROM - Toshiba TMM27128D-20 16Kx8 EPROM "CNTR 1.07 6490318-07" + PAL - PAL16R4 TC5565 - Toshiba TC5565PL-15 8Kx8 bit Static RAM Z80 - Zilog Z8400APS Z80A CPU Z80DMA - Zilog Z8410APS Z80A DMA @@ -65,9 +66,9 @@ Notes: SW1 - Disk drive type (SS/DS, SD/DD) SW2 - Disk drive model SW3 - ABC bus address - S1 - Interface type (A:? B:ABCBUS) - S3 - Interface type (A:? B:ABCBUS) - S5 - Interface type (A:? B:ABCBUS) + S1 - Interface type (A:ABC1600 B:ABCBUS) + S3 - Interface type (A:ABC1600 B:ABCBUS) + S5 - Interface type (A:ABC1600 B:ABCBUS) S6 - Amount of RAM installed (A:2KB, B:8KB) S7 - Number of drives connected (0:3, 1:2) *located on solder side S8 - Disk drive type (0:8", 1:5.25") @@ -111,6 +112,9 @@ ROM_START( luxor_55_21046 ) ROMX_LOAD( "cntr 108.6cd", 0x2000, 0x2000, CRC(229764cb) SHA1(a2e2f6f49c31b827efc62f894de9a770b65d109d), ROM_BIOS(2) ) ROM_SYSTEM_BIOS( 2, "v207", "DiAB v2.07 (1987-06-24)" ) ROMX_LOAD( "diab 207.6cd", 0x2000, 0x2000, CRC(86622f52) SHA1(61ad271de53152c1640c0b364fce46d1b0b4c7e2), ROM_BIOS(3) ) + + ROM_REGION( 0x104, "plds", 0 ) + ROM_LOAD( "pal16r4.2a", 0x000, 0x104, NO_DUMP) ROM_END @@ -466,6 +470,16 @@ void luxor_55_21046_device::abcbus_cs(UINT8 data) } +//------------------------------------------------- +// abcbus_csb - +//------------------------------------------------- + +int luxor_55_21046_device::abcbus_csb() +{ + return m_cs ? 0 : 1; +} + + //------------------------------------------------- // abcbus_stat - //------------------------------------------------- @@ -503,10 +517,10 @@ UINT8 luxor_55_21046_device::abcbus_inp() //------------------------------------------------- -// abcbus_utp - +// abcbus_out - //------------------------------------------------- -void luxor_55_21046_device::abcbus_utp(UINT8 data) +void luxor_55_21046_device::abcbus_out(UINT8 data) { if (m_cs) { diff --git a/src/emu/bus/abcbus/lux21046.h b/src/emu/bus/abcbus/lux21046.h index 529b238cb45..6733972321c 100644 --- a/src/emu/bus/abcbus/lux21046.h +++ b/src/emu/bus/abcbus/lux21046.h @@ -87,8 +87,9 @@ protected: // device_abcbus_interface overrides virtual void abcbus_cs(UINT8 data); + virtual int abcbus_csb(); virtual UINT8 abcbus_inp(); - virtual void abcbus_utp(UINT8 data); + virtual void abcbus_out(UINT8 data); virtual UINT8 abcbus_stat(); virtual void abcbus_c1(UINT8 data); virtual void abcbus_c3(UINT8 data); diff --git a/src/emu/bus/abcbus/lux21056.c b/src/emu/bus/abcbus/lux21056.c index baec2282071..8e3326d44c2 100644 --- a/src/emu/bus/abcbus/lux21056.c +++ b/src/emu/bus/abcbus/lux21056.c @@ -350,10 +350,10 @@ UINT8 luxor_55_21056_device::abcbus_inp() //------------------------------------------------- -// abcbus_utp - +// abcbus_out - //------------------------------------------------- -void luxor_55_21056_device::abcbus_utp(UINT8 data) +void luxor_55_21056_device::abcbus_out(UINT8 data) { if (m_cs) { diff --git a/src/emu/bus/abcbus/lux21056.h b/src/emu/bus/abcbus/lux21056.h index a61bfe3d15d..c5dc78b74d8 100644 --- a/src/emu/bus/abcbus/lux21056.h +++ b/src/emu/bus/abcbus/lux21056.h @@ -73,7 +73,7 @@ protected: // device_abcbus_interface overrides virtual void abcbus_cs(UINT8 data); virtual UINT8 abcbus_inp(); - virtual void abcbus_utp(UINT8 data); + virtual void abcbus_out(UINT8 data); virtual UINT8 abcbus_stat(); virtual void abcbus_c1(UINT8 data); virtual void abcbus_c3(UINT8 data); diff --git a/src/emu/bus/abc1600/lux4105.c b/src/emu/bus/abcbus/lux4105.c similarity index 86% rename from src/emu/bus/abc1600/lux4105.c rename to src/emu/bus/abcbus/lux4105.c index f145f1de806..076ea39f017 100644 --- a/src/emu/bus/abc1600/lux4105.c +++ b/src/emu/bus/abcbus/lux4105.c @@ -137,11 +137,11 @@ inline void luxor_4105_device::update_trrq_int() if (BIT(m_dma, 5)) { - m_slot->int_w(trrq ? CLEAR_LINE : ASSERT_LINE); + m_slot->irq_w(trrq ? CLEAR_LINE : ASSERT_LINE); } else { - m_slot->int_w(CLEAR_LINE); + m_slot->irq_w(CLEAR_LINE); } if (BIT(m_dma, 6)) @@ -155,6 +155,7 @@ inline void luxor_4105_device::update_trrq_int() } + //************************************************************************** // LIVE DEVICE //************************************************************************** @@ -164,8 +165,8 @@ inline void luxor_4105_device::update_trrq_int() //------------------------------------------------- luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, LUXOR_4105, "Luxor 4105", tag, owner, clock, "luxor_4105", __FILE__), - device_abc1600bus_card_interface(mconfig, *this), + : device_t(mconfig, LUXOR_4105, "Luxor 4105", tag, owner, clock, "lux4105", __FILE__), + device_abcbus_card_interface(mconfig, *this), m_sasibus(*this, SASIBUS_TAG ":host"), m_1e(*this, "1E"), m_5e(*this, "5E") @@ -179,8 +180,6 @@ luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char * void luxor_4105_device::device_start() { - m_slot = dynamic_cast(owner()); - // state saving save_item(NAME(m_cs)); save_item(NAME(m_data)); @@ -205,46 +204,31 @@ void luxor_4105_device::device_reset() } - -//************************************************************************** -// ABC 1600 BUS INTERFACE -//************************************************************************** - //------------------------------------------------- -// abc1600bus_cs - +// abcbus_cs - //------------------------------------------------- -void luxor_4105_device::abc1600bus_cs(UINT8 data) +void luxor_4105_device::abcbus_cs(UINT8 data) { m_cs = (data == m_5e->read()); } //------------------------------------------------- -// abc1600bus_csb - +// abcbus_csb - //------------------------------------------------- -int luxor_4105_device::abc1600bus_csb() +int luxor_4105_device::abcbus_csb() { return !m_cs; } //------------------------------------------------- -// abc1600bus_rst - +// abcbus_stat - //------------------------------------------------- -void luxor_4105_device::abc1600bus_brst() -{ - device_reset(); -} - - -//------------------------------------------------- -// abc1600bus_stat - -//------------------------------------------------- - -UINT8 luxor_4105_device::abc1600bus_stat() +UINT8 luxor_4105_device::abcbus_stat() { UINT8 data = 0xff; @@ -276,10 +260,10 @@ UINT8 luxor_4105_device::abc1600bus_stat() //------------------------------------------------- -// abc1600bus_inp - +// abcbus_inp - //------------------------------------------------- -UINT8 luxor_4105_device::abc1600bus_inp() +UINT8 luxor_4105_device::abcbus_inp() { UINT8 data = 0xff; @@ -308,10 +292,10 @@ UINT8 luxor_4105_device::abc1600bus_inp() //------------------------------------------------- -// abc1600bus_utp - +// abcbus_utp - //------------------------------------------------- -void luxor_4105_device::abc1600bus_out(UINT8 data) +void luxor_4105_device::abcbus_out(UINT8 data) { if (m_cs) { @@ -331,10 +315,10 @@ void luxor_4105_device::abc1600bus_out(UINT8 data) //------------------------------------------------- -// abc1600bus_c1 - +// abcbus_c1 - //------------------------------------------------- -void luxor_4105_device::abc1600bus_c1(UINT8 data) +void luxor_4105_device::abcbus_c1(UINT8 data) { if (m_cs) { @@ -344,10 +328,10 @@ void luxor_4105_device::abc1600bus_c1(UINT8 data) //------------------------------------------------- -// abc1600bus_c3 - +// abcbus_c3 - //------------------------------------------------- -void luxor_4105_device::abc1600bus_c3(UINT8 data) +void luxor_4105_device::abcbus_c3(UINT8 data) { if (m_cs) { @@ -361,10 +345,10 @@ void luxor_4105_device::abc1600bus_c3(UINT8 data) //------------------------------------------------- -// abc1600bus_c4 - +// abcbus_c4 - //------------------------------------------------- -void luxor_4105_device::abc1600bus_c4(UINT8 data) +void luxor_4105_device::abcbus_c4(UINT8 data) { if (m_cs) { diff --git a/src/emu/bus/abc1600/lux4105.h b/src/emu/bus/abcbus/lux4105.h similarity index 78% rename from src/emu/bus/abc1600/lux4105.h rename to src/emu/bus/abcbus/lux4105.h index 61a945525f1..73e4f68f9db 100644 --- a/src/emu/bus/abc1600/lux4105.h +++ b/src/emu/bus/abcbus/lux4105.h @@ -16,7 +16,7 @@ #include "emu.h" -#include "abc1600.h" +#include "abcbus.h" #include "machine/scsicb.h" @@ -36,7 +36,7 @@ // ======================> luxor_4105_device class luxor_4105_device : public device_t, - public device_abc1600bus_card_interface + public device_abcbus_card_interface { public: // construction/destruction @@ -56,22 +56,19 @@ protected: virtual void device_start(); virtual void device_reset(); - // device_abc1600bus_interface overrides - virtual void abc1600bus_cs(UINT8 data); - virtual int abc1600bus_csb(); - virtual void abc1600bus_brst(); - virtual UINT8 abc1600bus_inp(); - virtual void abc1600bus_out(UINT8 data); - virtual UINT8 abc1600bus_stat(); - virtual void abc1600bus_c1(UINT8 data); - virtual void abc1600bus_c3(UINT8 data); - virtual void abc1600bus_c4(UINT8 data); + // device_abcbus_interface overrides + virtual void abcbus_cs(UINT8 data); + virtual int abcbus_csb(); + virtual UINT8 abcbus_inp(); + virtual void abcbus_out(UINT8 data); + virtual UINT8 abcbus_stat(); + virtual void abcbus_c1(UINT8 data); + virtual void abcbus_c3(UINT8 data); + virtual void abcbus_c4(UINT8 data); private: inline void update_trrq_int(); - abc1600bus_slot_device *m_slot; - required_device m_sasibus; required_ioport m_1e; required_ioport m_5e; diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index d8822a5dbf6..50a1e749c51 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -14,17 +14,6 @@ BUSSRC = $(EMUSRC)/bus BUSOBJ = $(EMUOBJ)/bus -#------------------------------------------------- -# -#@src/emu/bus/abc1600/abc1600.h,BUSES += ABC1600 -#------------------------------------------------- - -ifneq ($(filter ABC1600,$(BUSES)),) -BUSOBJS += $(BUSOBJ)/abc1600/abc1600.o -BUSOBJS += $(BUSOBJ)/abc1600/lux4105.o -endif - - #------------------------------------------------- # #@src/emu/bus/abcbus/abcbus.h,BUSES += ABCBUS @@ -39,6 +28,7 @@ BUSOBJS += $(BUSOBJ)/abcbus/hdc.o BUSOBJS += $(BUSOBJ)/abcbus/lux10828.o BUSOBJS += $(BUSOBJ)/abcbus/lux21046.o BUSOBJS += $(BUSOBJ)/abcbus/lux21056.o +BUSOBJS += $(BUSOBJ)/abcbus/lux4105.o BUSOBJS += $(BUSOBJ)/abcbus/uni800.o BUSOBJS += $(BUSOBJ)/abcbus/sio.o BUSOBJS += $(BUSOBJ)/abcbus/slutprov.o diff --git a/src/emu/emu.mak b/src/emu/emu.mak index fa89bdfc786..6afe9265ff4 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -28,7 +28,6 @@ OBJDIRS += \ $(EMUOBJ)/debugint \ $(EMUOBJ)/audio \ $(EMUOBJ)/bus \ - $(EMUOBJ)/bus/abc1600 \ $(EMUOBJ)/bus/abcbus \ $(EMUOBJ)/bus/adam \ $(EMUOBJ)/bus/adamnet \ diff --git a/src/mess/drivers/abc1600.c b/src/mess/drivers/abc1600.c index acc7a116fa0..339bb9b4ea7 100644 --- a/src/mess/drivers/abc1600.c +++ b/src/mess/drivers/abc1600.c @@ -687,14 +687,14 @@ READ8_MEMBER( abc1600_state::cio_pa_r ) UINT8 data = 0; - data |= m_bus2->int_r(); - data |= m_bus1->int_r() << 1; + data |= m_bus2->irq_r(); + data |= m_bus1->irq_r() << 1; data |= m_bus0x->xint2_r() << 2; data |= m_bus0x->xint3_r() << 3; data |= m_bus0x->xint4_r() << 4; data |= m_bus0x->xint5_r() << 5; - data |= m_bus0x->int_r() << 6; - data |= m_bus0i->int_r() << 7; + data |= m_bus0x->irq_r() << 6; + data |= m_bus0i->irq_r() << 7; return data; } @@ -836,13 +836,6 @@ void abc1600_state::fdc_drq_w(bool state) // ABC1600BUS_INTERFACE( abcbus_intf ) //------------------------------------------------- -static ABC1600BUS_INTERFACE( bus0i_intf ) -{ - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa7_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_NULL, - DEVCB_NULL -}; - WRITE_LINE_MEMBER( abc1600_state::nmi_w ) { if (state == ASSERT_LINE) @@ -851,32 +844,6 @@ WRITE_LINE_MEMBER( abc1600_state::nmi_w ) } } -static ABC1600BUS_INTERFACE( bus0x_intf ) -{ - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa6_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_NULL, - DEVCB_NULL, - DEVCB_DRIVER_LINE_MEMBER(abc1600_state, nmi_w), - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa2_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa3_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa4_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa5_w) // really inverted but ASSERT_LINE takes care of that -}; - -static ABC1600BUS_INTERFACE( bus1_intf ) -{ - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa1_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_NULL, - DEVCB_NULL -}; - -static ABC1600BUS_INTERFACE( bus2_intf ) -{ - DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa0_w), // really inverted but ASSERT_LINE takes care of that - DEVCB_NULL, // DEVCB_DEVICE_LINE_MEMBER(Z8410AB1_2_TAG, z80dma_device, iei_w) inverted - DEVCB_DEVICE_LINE_MEMBER(Z8410AB1_2_TAG, z80dma_device, rdy_w) -}; - //------------------------------------------------- // rs232_port_interface rs232a_intf @@ -1016,10 +983,21 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state ) MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, default_rs232_devices, NULL) MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, NULL) MCFG_ABC_KEYBOARD_PORT_ADD("abc99", DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxtxcb_w), DEVWRITELINE(Z8470AB1_TAG, z80dart_device, dcdb_w)) - MCFG_ABC1600BUS_SLOT_ADD("bus0i", bus0i_intf, abc1600bus_cards, NULL) - MCFG_ABC1600BUS_SLOT_ADD("bus0x", bus0x_intf, abc1600bus_cards, NULL) - MCFG_ABC1600BUS_SLOT_ADD("bus1", bus1_intf, abc1600bus_cards, NULL) - MCFG_ABC1600BUS_SLOT_ADD("bus2", bus2_intf, abc1600bus_cards, "4105") + MCFG_ABCBUS_SLOT_ADD("bus0i", abc1600bus_cards, NULL) + MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa7_w)) + MCFG_ABCBUS_SLOT_ADD("bus0x", abc1600bus_cards, NULL) + MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa6_w)) + MCFG_ABCBUS_SLOT_NMI_CALLBACK(DEVWRITELINE(DEVICE_SELF, abc1600_state, nmi_w)) + MCFG_ABCBUS_SLOT_XINT2_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa2_w)) + MCFG_ABCBUS_SLOT_XINT3_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa3_w)) + MCFG_ABCBUS_SLOT_XINT4_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa4_w)) + MCFG_ABCBUS_SLOT_XINT5_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa5_w)) + MCFG_ABCBUS_SLOT_ADD("bus1", abc1600bus_cards, NULL) + MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa1_w)) + MCFG_ABCBUS_SLOT_ADD("bus2", abc1600bus_cards, "4105") + MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa0_w)) + //MCFG_ABCBUS_SLOT_PREN_CALLBACK(DEVWRITELINE(Z8410AB1_2_TAG, z80dma_device, iei_w)) + MCFG_ABCBUS_SLOT_TRRQ_CALLBACK(DEVWRITELINE(Z8410AB1_2_TAG, z80dma_device, rdy_w)) // internal ram MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/abc80.c b/src/mess/drivers/abc80.c index 5ac0c8305a2..f097d2e321e 100644 --- a/src/mess/drivers/abc80.c +++ b/src/mess/drivers/abc80.c @@ -186,7 +186,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( abc80_io, AS_IO, 8, abc80_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x17) - AM_RANGE(0x00, 0x00) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, utp_w) + AM_RANGE(0x00, 0x00) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, out_w) AM_RANGE(0x01, 0x01) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, stat_r, cs_w) AM_RANGE(0x02, 0x02) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c1_w) AM_RANGE(0x03, 0x03) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c2_w) diff --git a/src/mess/drivers/abc80x.c b/src/mess/drivers/abc80x.c index 7c7287cd319..f2e701c2df6 100644 --- a/src/mess/drivers/abc80x.c +++ b/src/mess/drivers/abc80x.c @@ -432,7 +432,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( abc800c_io, AS_IO, 8, abc800_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, utp_w) + AM_RANGE(0x00, 0x00) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, out_w) AM_RANGE(0x01, 0x01) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, stat_r, cs_w) AM_RANGE(0x02, 0x02) AM_MIRROR(0x18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c1_w) AM_RANGE(0x03, 0x03) AM_MIRROR(0x18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c2_w) @@ -491,7 +491,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( abc802_io, AS_IO, 8, abc802_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, utp_w) + AM_RANGE(0x00, 0x00) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, out_w) AM_RANGE(0x01, 0x01) AM_MIRROR(0x18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, stat_r, cs_w) AM_RANGE(0x02, 0x02) AM_MIRROR(0x18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c1_w) AM_RANGE(0x03, 0x03) AM_MIRROR(0x18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c2_w) @@ -539,7 +539,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( abc806_io, AS_IO, 8, abc806_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00, 0x00) AM_MIRROR(0xff18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, utp_w) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xff18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, inp_r, out_w) AM_RANGE(0x01, 0x01) AM_MIRROR(0xff18) AM_DEVREADWRITE(ABCBUS_TAG, abcbus_slot_device, stat_r, cs_w) AM_RANGE(0x02, 0x02) AM_MIRROR(0xff18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c1_w) AM_RANGE(0x03, 0x03) AM_MIRROR(0xff18) AM_DEVWRITE(ABCBUS_TAG, abcbus_slot_device, c2_w) diff --git a/src/mess/includes/abc1600.h b/src/mess/includes/abc1600.h index 2663b87d376..829e0e1600f 100644 --- a/src/mess/includes/abc1600.h +++ b/src/mess/includes/abc1600.h @@ -6,7 +6,7 @@ #define __ABC1600__ #include "emu.h" -#include "bus/abc1600/abc1600.h" +#include "bus/abcbus/abcbus.h" #include "cpu/m68000/m68000.h" #include "machine/8530scc.h" #include "machine/abckb.h" @@ -93,10 +93,10 @@ public: required_device m_floppy0; required_device m_floppy1; required_device m_floppy2; - required_device m_bus0i; - required_device m_bus0x; - required_device m_bus1; - required_device m_bus2; + required_device m_bus0i; + required_device m_bus0x; + required_device m_bus1; + required_device m_bus2; virtual void machine_start(); virtual void machine_reset(); diff --git a/src/mess/mess.mak b/src/mess/mess.mak index b78461ed49c..c4c3c621787 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -482,7 +482,6 @@ MACHINES += Z8536 # specify available bus cores #------------------------------------------------- -BUSES += ABC1600 BUSES += ABCBUS BUSES += ADAM BUSES += ADAMNET