diff options
Diffstat (limited to 'src/mame/includes/interpro.h')
-rw-r--r-- | src/mame/includes/interpro.h | 202 |
1 files changed, 119 insertions, 83 deletions
diff --git a/src/mame/includes/interpro.h b/src/mame/includes/interpro.h index d2a08a9d47d..e40969ad172 100644 --- a/src/mame/includes/interpro.h +++ b/src/mame/includes/interpro.h @@ -9,16 +9,17 @@ #include "cpu/clipper/clipper.h" #include "machine/cammu.h" -#include "machine/ram.h" - #include "machine/interpro_ioga.h" #include "machine/interpro_mcga.h" #include "machine/interpro_sga.h" -#include "machine/interpro_srarb.h" +#include "machine/interpro_arbga.h" -#include "machine/z80scc.h" +#include "machine/ram.h" +#include "machine/28fxxx.h" #include "machine/mc146818.h" +#include "machine/z80scc.h" #include "machine/upd765.h" +#include "machine/i82586.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" @@ -27,69 +28,74 @@ #include "bus/rs232/rs232.h" +#include "bus/interpro/sr/sr.h" +#include "bus/interpro/sr/sr_cards.h" +#include "bus/interpro/keyboard/keyboard.h" + #include "formats/pc_dsk.h" -#define INTERPRO_CPU_TAG "cpu" -#define INTERPRO_MMU_TAG "mmu" - -#define INTERPRO_RTC_TAG "rtc" -#define INTERPRO_SCC1_TAG "scc1" -#define INTERPRO_SERIAL1_TAG "serial1" -#define INTERPRO_SERIAL2_TAG "serial2" -#define INTERPRO_SCC2_TAG "scc2" -#define INTERPRO_SERIAL3_TAG "serial3" -#define INTERPRO_SERIAL4_TAG "serial4" -#define INTERPRO_EPROM_TAG "eprom" -#define INTERPRO_FLASH_TAG "flash" -#define INTERPRO_TERMINAL_TAG "terminal" -#define INTERPRO_FDC_TAG "fdc" -#define INTERPRO_SCSI_TAG "scsi" -#define INTERPRO_SCSI_ADAPTER_TAG "adapter" -#define INTERPRO_SCSI_DEVICE_TAG INTERPRO_SCSI_TAG ":7:" INTERPRO_SCSI_ADAPTER_TAG - -#define INTERPRO_IOGA_TAG "ioga" -#define INTERPRO_MCGA_TAG "mcga" -#define INTERPRO_SGA_TAG "sga" -#define INTERPRO_SRARB_TAG "srarb" +#define INTERPRO_CPU_TAG "cpu" +#define INTERPRO_MMU_TAG "mmu" +#define INTERPRO_MCGA_TAG "mcga" +#define INTERPRO_SGA_TAG "sga" +#define INTERPRO_FDC_TAG "fdc" +#define INTERPRO_ARBGA_TAG "arbga" +#define INTERPRO_SCC1_TAG "scc1" +#define INTERPRO_SCC2_TAG "scc2" +#define INTERPRO_SERIAL_PORT0_TAG "serial0" +#define INTERPRO_SERIAL_PORT1_TAG "serial1" +#define INTERPRO_SERIAL_PORT2_TAG "serial2" +#define INTERPRO_KEYBOARD_PORT_TAG "kbd" +#define INTERPRO_RTC_TAG "rtc" +#define INTERPRO_SCSI_TAG "scsi" +#define INTERPRO_SCSI_ADAPTER_TAG "host" +#define INTERPRO_SCSI_DEVICE_TAG INTERPRO_SCSI_TAG ":7:" INTERPRO_SCSI_ADAPTER_TAG +#define INTERPRO_ETH_TAG "eth" +#define INTERPRO_IOGA_TAG "ioga" + +#define INTERPRO_IDPROM_TAG "idprom" +#define INTERPRO_EPROM_TAG "eprom" +#define INTERPRO_FLASH_TAG "flash" + +#define INTERPRO_SRBUS_TAG "sr" class interpro_state : public driver_device { public: interpro_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, INTERPRO_CPU_TAG), - m_mmu(*this, INTERPRO_MMU_TAG), - m_ram(*this, RAM_TAG), - m_scc1(*this, INTERPRO_SCC1_TAG), - m_scc2(*this, INTERPRO_SCC2_TAG), - m_rtc(*this, INTERPRO_RTC_TAG), - m_fdc(*this, INTERPRO_FDC_TAG), - m_scsibus(*this, INTERPRO_SCSI_TAG), - m_scsi(*this, INTERPRO_SCSI_DEVICE_TAG), - m_ioga(*this, INTERPRO_IOGA_TAG), - m_mcga(*this, INTERPRO_MCGA_TAG), - m_sga(*this, INTERPRO_SGA_TAG), - m_srarb(*this, INTERPRO_SRARB_TAG) - { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, INTERPRO_CPU_TAG) + , m_ram(*this, RAM_TAG) + , m_mcga(*this, INTERPRO_MCGA_TAG) + , m_sga(*this, INTERPRO_SGA_TAG) + , m_fdc(*this, INTERPRO_FDC_TAG) + , m_arbga(*this, INTERPRO_ARBGA_TAG) + , m_scc1(*this, INTERPRO_SCC1_TAG) + , m_scc2(*this, INTERPRO_SCC2_TAG) + , m_rtc(*this, INTERPRO_RTC_TAG) + , m_scsibus(*this, INTERPRO_SCSI_TAG) + , m_scsi(*this, INTERPRO_SCSI_DEVICE_TAG) + , m_eth(*this, INTERPRO_ETH_TAG) + , m_ioga(*this, INTERPRO_IOGA_TAG) + { + } required_device<clipper_device> m_maincpu; - required_device<cammu_device> m_mmu; - required_device<ram_device> m_ram; - // FIXME: not sure which one is the escc + required_device<interpro_mcga_device> m_mcga; + required_device<interpro_sga_device> m_sga; + required_device<upd765_family_device> m_fdc; + required_device<interpro_arbga_device> m_arbga; required_device<z80scc_device> m_scc1; required_device<z80scc_device> m_scc2; required_device<mc146818_device> m_rtc; - required_device<n82077aa_device> m_fdc; required_device<nscsi_bus_device> m_scsibus; - required_device<ncr53c94_device> m_scsi; + required_device<ncr53c90a_device> m_scsi; + required_device<i82586_base_device> m_eth; required_device<interpro_ioga_device> m_ioga; - required_device<interpro_fmcc_device> m_mcga; - required_device<interpro_sga_device> m_sga; - required_device<interpro_srarb_device> m_srarb; - DECLARE_DRIVER_INIT(ip2800); + DECLARE_DRIVER_INIT(common); enum sreg_error_mask { @@ -104,6 +110,7 @@ public: ERROR_BUSHOG = 0x0080 }; DECLARE_READ16_MEMBER(sreg_error_r); + DECLARE_WRITE16_MEMBER(sreg_led_w); enum sreg_status_mask @@ -118,63 +125,92 @@ public: enum sreg_ctrl1_mask { - CTRL1_FLOPLOW = 0x0001, - CTRL1_FLOPRDY = 0x0002, - CTRL1_LEDENA = 0x0004, - CTRL1_LEDDP = 0x0008, - CTRL1_ETHLOOP = 0x0010, // remote modem loopback - CTRL1_ETHDTR = 0x0020, - CTRL1_ETHRMOD = 0x0040, // remote modem configured active low - CTRL1_CLIPRESET = 0x0040, - CTRL1_FIFOACTIVE = 0x0080 + CTRL1_FLOPLOW = 0x0001, // 0 = 5.25" floppy selected + CTRL1_FLOPRDY = 0x0002, // 1 = plotter fifo empty? + CTRL1_LEDENA = 0x0004, // 0 = led display disabled + CTRL1_LEDDP = 0x0008, // 0 = led right decimal point disabled + CTRL1_ETHLOOP = 0x0010, // 1 = mmbe enabled + CTRL1_ETHDTR = 0x0020, // 0 = modem dtr pin activated + CTRL1_ETHRMOD = 0x0040, // 0 = sytem configured for remote modems + CTRL1_FIFOACTIVE = 0x0080 // 0 = plotter fifos reset }; - DECLARE_READ16_MEMBER(sreg_ctrl1_r) { return m_sreg_ctrl1; } + DECLARE_READ16_MEMBER(sreg_ctrl1_r) const { return m_sreg_ctrl1; } DECLARE_WRITE16_MEMBER(sreg_ctrl1_w); enum sreg_ctrl2_mask { - CTRL2_PWRUP = 0x0001, - CTRL2_PWRENA = 0x0002, - CTRL2_HOLDOFF = 0x0004, - CTRL2_EXTNMIENA = 0x0008, - CTRL2_COLDSTART = 0x0010, - CTRL2_RESET = 0x0020, - CTRL2_BUSENA = 0x0040, - CTRL2_FRCPARITY = 0x0080, - CTRL2_FLASHEN = 0x0080, - - CTRL2_WMASK = 0x000f + CTRL2_PWRUP = 0x0003, // 3 = power supply voltage adjusted up by 5% + CTRL2_HOLDOFF = 0x0004, // 0 = power supply will shut down 0.33 seconds after switch is turned off + CTRL2_EXTNMIENA = 0x0008, // 0 = power nmi disabled + CTRL2_COLDSTART = 0x0010, // 1 = cold start flag + CTRL2_RESET = 0x0020, // 0 = soft reset + CTRL2_BUSENA = 0x0040, // 0 = clear bus grant error + CTRL2_FLASHEN = 0x0080, // 0 = flash eprom writes disabled + + CTRL2_MASK = 0x004d }; - DECLARE_READ16_MEMBER(sreg_ctrl2_r) { return m_sreg_ctrl2; } - DECLARE_WRITE16_MEMBER(sreg_ctrl2_w); - DECLARE_READ16_MEMBER(sreg_ctrl3_r) { return m_sreg_ctrl3; } + DECLARE_READ16_MEMBER(sreg_ctrl2_r) const { return m_sreg_ctrl2; } + virtual DECLARE_WRITE16_MEMBER(sreg_ctrl2_w); + DECLARE_READ16_MEMBER(sreg_ctrl3_r) const { return m_sreg_ctrl3; } DECLARE_WRITE16_MEMBER(sreg_ctrl3_w) { m_sreg_ctrl3 = data; } - DECLARE_WRITE8_MEMBER(rtc_w); - DECLARE_READ8_MEMBER(rtc_r); - - DECLARE_READ8_MEMBER(idprom_r); - DECLARE_READ8_MEMBER(slot0_r); + DECLARE_READ8_MEMBER(nodeid_r); DECLARE_READ32_MEMBER(unmapped_r); DECLARE_WRITE32_MEMBER(unmapped_w); - DECLARE_READ8_MEMBER(scsi_r); - DECLARE_WRITE8_MEMBER(scsi_w); - DECLARE_FLOPPY_FORMATS(floppy_formats); protected: virtual void machine_start() override; virtual void machine_reset() override; -private: u16 m_sreg_error; u16 m_sreg_status; + u16 m_sreg_led; u16 m_sreg_ctrl1; u16 m_sreg_ctrl2; u16 m_sreg_ctrl3; }; +class turquoise_state : public interpro_state +{ +public: + turquoise_state(const machine_config &mconfig, device_type type, const char *tag) + : interpro_state(mconfig, type, tag) + , m_d_cammu(*this, INTERPRO_MMU_TAG "_d") + , m_i_cammu(*this, INTERPRO_MMU_TAG "_i") + { + } + + DECLARE_DRIVER_INIT(turquoise); + + DECLARE_WRITE8_MEMBER(sreg_error_w) { m_sreg_error = data; } + + required_device<cammu_c3_device> m_d_cammu; + required_device<cammu_c3_device> m_i_cammu; +}; + +class sapphire_state : public interpro_state +{ +public: + sapphire_state(const machine_config &mconfig, device_type type, const char *tag) + : interpro_state(mconfig, type, tag) + , m_mmu(*this, INTERPRO_MMU_TAG) + , m_flash_lo(*this, INTERPRO_FLASH_TAG "_lo") + , m_flash_hi(*this, INTERPRO_FLASH_TAG "_hi") + { + } + + DECLARE_DRIVER_INIT(sapphire); + + virtual DECLARE_WRITE16_MEMBER(sreg_ctrl2_w) override; + + required_device<cammu_c4_device> m_mmu; + + required_device<intel_28f010_device> m_flash_lo; + required_device<intel_28f010_device> m_flash_hi; +}; + #endif // MAME_INCLUDES_INTERPRO_H |