diff options
author | 2015-09-13 08:41:44 +0200 | |
---|---|---|
committer | 2015-09-13 08:41:44 +0200 | |
commit | f88cefad27a1737c76e09d99c9fb43e173506081 (patch) | |
tree | 2d8167d03579c46e226471747eb4407bd00ed6fa /src/emu/bus/s100 | |
parent | e92ac9e0fa8e99869894bea00589bbb526be30aa (diff) |
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/emu/bus/s100')
-rw-r--r-- | src/emu/bus/s100/dj2db.c | 517 | ||||
-rw-r--r-- | src/emu/bus/s100/dj2db.h | 88 | ||||
-rw-r--r-- | src/emu/bus/s100/djdma.c | 127 | ||||
-rw-r--r-- | src/emu/bus/s100/djdma.h | 51 | ||||
-rw-r--r-- | src/emu/bus/s100/mm65k16s.c | 267 | ||||
-rw-r--r-- | src/emu/bus/s100/mm65k16s.h | 55 | ||||
-rw-r--r-- | src/emu/bus/s100/nsmdsa.c | 120 | ||||
-rw-r--r-- | src/emu/bus/s100/nsmdsa.h | 58 | ||||
-rw-r--r-- | src/emu/bus/s100/nsmdsad.c | 122 | ||||
-rw-r--r-- | src/emu/bus/s100/nsmdsad.h | 59 | ||||
-rw-r--r-- | src/emu/bus/s100/s100.c | 200 | ||||
-rw-r--r-- | src/emu/bus/s100/s100.h | 311 | ||||
-rw-r--r-- | src/emu/bus/s100/wunderbus.c | 528 | ||||
-rw-r--r-- | src/emu/bus/s100/wunderbus.h | 72 |
14 files changed, 0 insertions, 2575 deletions
diff --git a/src/emu/bus/s100/dj2db.c b/src/emu/bus/s100/dj2db.c deleted file mode 100644 index f32d32e3eb2..00000000000 --- a/src/emu/bus/s100/dj2db.c +++ /dev/null @@ -1,517 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Disk Jockey 2D/B floppy controller board emulation - -**********************************************************************/ - -/* - - TODO: - - - stall logic (read from fdc data register halts CPU until intrq/drq from FDC) - -*/ - -#include "dj2db.h" - - - -//************************************************************************** -// MACROS/CONSTANTS -//************************************************************************** - -#define MB8866_TAG "14b" -#define S1602_TAG "14d" -#define BR1941_TAG "13d" - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_DJ2DB = &device_creator<s100_dj2db_device>; - - -//------------------------------------------------- -// ROM( dj2db ) -//------------------------------------------------- - -ROM_START( dj2db ) - ROM_REGION( 0x400, "dj2db", ROMREGION_INVERT ) // 2708, inverted data outputs - ROM_LOAD( "bv-2 f8.11d", 0x000, 0x400, CRC(b6218d0b) SHA1(e4b2ae886c0dd7717e2e02ae2e202115d8ec2def) ) - - ROM_REGION( 0x220, "proms", 0 ) - ROM_LOAD( "8c-b f8.8c", 0x000, 0x200, NO_DUMP ) // 6301 - ROM_LOAD( "3d.3d", 0x200, 0x20, NO_DUMP ) // 6331 -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const rom_entry *s100_dj2db_device::device_rom_region() const -{ - return ROM_NAME( dj2db ); -} - - -//------------------------------------------------- -// COM8116_INTERFACE( brg_intf ) -//------------------------------------------------- - -WRITE_LINE_MEMBER( s100_dj2db_device::fr_w ) -{ - // S1602 RRC/TRC -} - -static SLOT_INTERFACE_START( s100_dj2db_floppies ) - SLOT_INTERFACE( "8dsdd", FLOPPY_8_DSDD ) -SLOT_INTERFACE_END - -WRITE_LINE_MEMBER( s100_dj2db_device::fdc_intrq_w ) -{ - if (state) m_bus->rdy_w(CLEAR_LINE); - - switch (m_j1a->read()) - { - case 0: m_bus->vi0_w(state); break; - case 1: m_bus->vi1_w(state); break; - case 2: m_bus->vi2_w(state); break; - case 3: m_bus->vi3_w(state); break; - case 4: m_bus->vi4_w(state); break; - case 5: m_bus->vi5_w(state); break; - case 6: m_bus->vi6_w(state); break; - case 7: m_bus->vi7_w(state); break; - case 8: m_bus->irq_w(state); break; - } -} - -WRITE_LINE_MEMBER( s100_dj2db_device::fdc_drq_w ) -{ - if (state) m_bus->rdy_w(CLEAR_LINE); -} - - -//------------------------------------------------- -// MACHINE_CONFIG_FRAGMENT( s100_dj2db ) -//------------------------------------------------- - -static MACHINE_CONFIG_FRAGMENT( s100_dj2db ) - MCFG_DEVICE_ADD(BR1941_TAG, COM8116, XTAL_5_0688MHz) - MCFG_COM8116_FR_HANDLER(WRITELINE(s100_dj2db_device, fr_w)) - - MCFG_MB8866_ADD(MB8866_TAG, XTAL_10MHz/5) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(s100_dj2db_device, fdc_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(s100_dj2db_device, fdc_drq_w)) - - MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":0", s100_dj2db_floppies, "8dsdd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":1", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":2", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":3", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor s100_dj2db_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( s100_dj2db ); -} - - -//------------------------------------------------- -// INPUT_PORTS( mm65k16s ) -//------------------------------------------------- - -static INPUT_PORTS_START( dj2db ) - PORT_START("SW1") - PORT_DIPNAME( 0xf8, 0xf8, "Power-On Jump Address" ) PORT_DIPLOCATION("SW1:1,2,3,4,5") PORT_CONDITION("SW1", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0xf8, "F800H" ) - PORT_DIPSETTING( 0xf0, "F000H" ) - PORT_DIPSETTING( 0xe8, "E800H" ) - PORT_DIPSETTING( 0xe0, "E000H" ) - PORT_DIPSETTING( 0xd8, "D800H" ) - PORT_DIPSETTING( 0xd0, "D000H" ) - PORT_DIPSETTING( 0xc8, "C800H" ) - PORT_DIPSETTING( 0xc0, "C000H" ) - PORT_DIPSETTING( 0xb8, "B800H" ) - PORT_DIPSETTING( 0xb0, "B000H" ) - PORT_DIPSETTING( 0xa8, "A800H" ) - PORT_DIPSETTING( 0xa0, "A000H" ) - PORT_DIPSETTING( 0x98, "9800H" ) - PORT_DIPSETTING( 0x90, "9000H" ) - PORT_DIPSETTING( 0x88, "8800H" ) - PORT_DIPSETTING( 0x80, "8000H" ) - PORT_DIPSETTING( 0x78, "7800H" ) - PORT_DIPSETTING( 0x70, "7000H" ) - PORT_DIPSETTING( 0x68, "6800H" ) - PORT_DIPSETTING( 0x60, "6000H" ) - PORT_DIPSETTING( 0x58, "5800H" ) - PORT_DIPSETTING( 0x50, "5000H" ) - PORT_DIPSETTING( 0x48, "4800H" ) - PORT_DIPSETTING( 0x40, "4000H" ) - PORT_DIPSETTING( 0x38, "3800H" ) - PORT_DIPSETTING( 0x30, "3000H" ) - PORT_DIPSETTING( 0x28, "2800H" ) - PORT_DIPSETTING( 0x20, "2000H" ) - PORT_DIPSETTING( 0x18, "1800H" ) - PORT_DIPSETTING( 0x10, "1000H" ) - PORT_DIPSETTING( 0x08, "0800H" ) - PORT_DIPSETTING( 0x00, "0000H" ) - PORT_DIPNAME( 0x04, 0x04, "Phantom Line" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x04, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - PORT_DIPNAME( 0x02, 0x02, "Bus Speed" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x02, "2 MHz" ) - PORT_DIPSETTING( 0x00, "4/6 MHz" ) - PORT_DIPNAME( 0x01, 0x01, "Power-On Jump" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x01, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - - PORT_START("SW2") - PORT_DIPNAME( 0x0f, 0x0f, "Baud Rate" ) PORT_DIPLOCATION("SW2:1,2,3,4") - PORT_DIPSETTING( 0x08, "110" ) - PORT_DIPSETTING( 0x0e, "1200" ) - PORT_DIPSETTING( 0x07, "9600" ) - PORT_DIPSETTING( 0x0f, "19200" ) - PORT_DIPNAME( 0x10, 0x00, "Word Length" ) PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x10, "8 Bits" ) - PORT_DIPSETTING( 0x00, "7 Bits" ) - PORT_DIPNAME( 0x20, 0x20, "Stop Bit Count" ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, "2 Stop Bits" ) - PORT_DIPSETTING( 0x00, "1 Stop Bit" ) - PORT_DIPNAME( 0x40, 0x40, "Parity" ) PORT_DIPLOCATION("SW2:7") PORT_CONDITION("SW2", 0x80, EQUALS, 0x00) - PORT_DIPSETTING( 0x40, "Even Parity" ) - PORT_DIPSETTING( 0x00, "Odd Parity" ) - PORT_DIPNAME( 0x80, 0x80, "Parity" ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("J4") - PORT_DIPNAME( 0x01, 0x00, "Power Up" ) - PORT_DIPSETTING( 0x00, "Inactive" ) - PORT_DIPSETTING( 0x01, "Active" ) - - PORT_START("J2") - PORT_DIPNAME( 0x01, 0x01, "Generate PHANTOM Signal" ) - PORT_DIPSETTING( 0x01, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - - PORT_START("J3A") - PORT_DIPNAME( 0xff, 0x00, "Bank Select" ) - PORT_DIPSETTING( 0x00, "Disabled" ) - PORT_DIPSETTING( 0x01, "DATA 0" ) - PORT_DIPSETTING( 0x02, "DATA 1" ) - PORT_DIPSETTING( 0x04, "DATA 2" ) - PORT_DIPSETTING( 0x08, "DATA 2" ) - PORT_DIPSETTING( 0x10, "DATA 3" ) - PORT_DIPSETTING( 0x20, "DATA 4" ) - PORT_DIPSETTING( 0x40, "DATA 6" ) - PORT_DIPSETTING( 0x80, "DATA 7" ) - - PORT_START("J1A") - PORT_DIPNAME( 0x0f, 0x09, "Interrupt" ) - PORT_DIPSETTING( 0x09, "Disabled") - PORT_DIPSETTING( 0x00, "VI0") - PORT_DIPSETTING( 0x01, "VI1") - PORT_DIPSETTING( 0x02, "VI2") - PORT_DIPSETTING( 0x03, "VI3") - PORT_DIPSETTING( 0x04, "VI4") - PORT_DIPSETTING( 0x05, "VI5") - PORT_DIPSETTING( 0x06, "VI6") - PORT_DIPSETTING( 0x07, "VI7") - PORT_DIPSETTING( 0x08, "PINT") -INPUT_PORTS_END - - -//------------------------------------------------- -// input_ports - device-specific input ports -//------------------------------------------------- - -ioport_constructor s100_dj2db_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( dj2db ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_dj2db_device - constructor -//------------------------------------------------- - -s100_dj2db_device::s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_DJ2DB, "DJ2DB", tag, owner, clock, "dj2db", __FILE__), - device_s100_card_interface(mconfig, *this), - m_fdc(*this, MB8866_TAG), - m_dbrg(*this, BR1941_TAG), - m_floppy0(*this, MB8866_TAG":0"), - m_floppy1(*this, MB8866_TAG":1"), - m_floppy2(*this, MB8866_TAG":2"), - m_floppy3(*this, MB8866_TAG":3"), - m_floppy(NULL), - m_rom(*this, "dj2db"), - m_ram(*this, "ram"), - m_j1a(*this, "J1A"), - m_j3a(*this, "J3A"), - m_j4(*this, "J4"), - m_sw1(*this, "SW1"), - m_drive(0), - m_head(1), - m_int_enbl(0), - m_access_enbl(0), - m_board_enbl(1), - m_phantom(1) -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_dj2db_device::device_start() -{ - // allocate memory - m_ram.allocate(0x400); - - // state saving - save_item(NAME(m_drive)); - save_item(NAME(m_head)); - save_item(NAME(m_int_enbl)); - save_item(NAME(m_access_enbl)); - save_item(NAME(m_board_enbl)); - save_item(NAME(m_phantom)); -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_dj2db_device::device_reset() -{ - m_board_enbl = m_j4->read(); -} - - -//------------------------------------------------- -// s100_smemr_r - memory read -//------------------------------------------------- - -UINT8 s100_dj2db_device::s100_smemr_r(address_space &space, offs_t offset) -{ - UINT8 data = 0; - -// if (!(m_board_enbl & m_phantom)) return 0; - - if ((offset >= 0xf800) && (offset < 0xfbf8)) - { - data = m_rom->base()[offset & 0x3ff] ^ 0xff; - } - else if (offset == 0xfbf8) // SERIAL IN - { - // UART inverted data - } - else if (offset == 0xfbf9) // SERIAL STAT - { - /* - - bit description - - 0 PE - 1 OE - 2 DR - 3 TBRE - 4 FE - 5 - 6 - 7 - - */ - } - else if (offset == 0xfbfa) // DISK STAT - { - /* - - bit description - - 0 HEAD - 1 DATA RQ - 2 INT RQ - 3 _TWO SIDED - 4 _INDEX - 5 - 6 - 7 _READY - - */ - - data |= !m_head; - data |= !m_fdc->drq_r() << 1; - data |= !m_fdc->intrq_r() << 2; - data |= (m_floppy ? m_floppy->twosid_r() : 1) << 3; - data |= (m_floppy ? m_floppy->idx_r() : 1) << 4; - data |= (m_floppy ? m_floppy->ready_r() : 1) << 7; - } - else if ((offset >= 0xfbfc) && (offset < 0xfc00)) - { - m_bus->rdy_w(ASSERT_LINE); - - data = m_fdc->gen_r(offset & 0x03); - } - else if ((offset >= 0xfc00) && (offset < 0x10000)) - { - data = m_ram[offset & 0x3ff]; - } - else - { - return 0; - } - - // LS241 inverts data - return data ^ 0xff; -} - - -//------------------------------------------------- -// s100_mwrt_w - memory write -//------------------------------------------------- - -void s100_dj2db_device::s100_mwrt_w(address_space &space, offs_t offset, UINT8 data) -{ -// if (!(m_board_enbl & m_phantom)) return; - - // LS96 inverts data - data ^= 0xff; - - if (offset == 0xfbf8) // SERIAL OUT - { - // UART inverted data - } - else if (offset == 0xfbf9) // DRIVE SEL - { - /* - - bit description - - 0 DRIVE 1 - 1 DRIVE 2 - 2 DRIVE 3 - 3 DRIVE 4 - 4 IN USE / SIDE SELECT - 5 INT ENBL - 6 _ACCESS ENBL - 7 START - - */ - - // drive select - m_floppy = NULL; - - if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); - if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); - if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); - if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); - - m_fdc->set_floppy(m_floppy); - - // side select - if (m_floppy) - { - m_floppy->ss_w(BIT(data, 4)); - m_floppy->mon_w(0); - } - - // interrupt enable - m_int_enbl = BIT(data, 5); - - // access enable - m_access_enbl = BIT(data, 6); - - // master reset - if (!BIT(data, 7)) m_fdc->soft_reset(); - } - else if (offset == 0xfbfa) // FUNCTION SEL - { - /* - - bit description - - 0 DOUBLE - 1 8A SET - 2 8A CLEAR - 3 LEDOFF - 4 - 5 - 6 - 7 - - */ - - // density select - m_fdc->dden_w(BIT(data, 0)); - } - else if (offset == 0xfbfb) // WAIT ENBL - { - fatalerror("Z80 WAIT not supported by MAME core\n"); - } - else if ((offset >= 0xfbfc) && (offset < 0xfc00)) - { - m_fdc->gen_w(offset & 0x03, data); - } - else if ((offset >= 0xfc00) && (offset < 0x10000)) - { - m_ram[offset & 0x3ff] = data; - } -} - - -//------------------------------------------------- -// s100_sinp_r - I/O read -//------------------------------------------------- - -UINT8 s100_dj2db_device::s100_sinp_r(address_space &space, offs_t offset) -{ - return 0; -} - - -//------------------------------------------------- -// s100_sout_w - I/O write -//------------------------------------------------- - -void s100_dj2db_device::s100_sout_w(address_space &space, offs_t offset, UINT8 data) -{ - if (offset == 0x41) - { - m_board_enbl = (data & m_j3a->read()) ? 1 : 0; - } -} - - -//------------------------------------------------- -// s100_phantom_w - phantom -//------------------------------------------------- - -void s100_dj2db_device::s100_phantom_w(int state) -{ - if (!BIT(m_sw1->read(), 2)) - { - m_phantom = state; - } - else - { - m_phantom = 1; - } -} diff --git a/src/emu/bus/s100/dj2db.h b/src/emu/bus/s100/dj2db.h deleted file mode 100644 index 460a45ff3dc..00000000000 --- a/src/emu/bus/s100/dj2db.h +++ /dev/null @@ -1,88 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Disk Jockey 2D/B floppy controller board emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_DJ2DB__ -#define __S100_DJ2DB__ - -#include "emu.h" -#include "s100.h" -#include "machine/com8116.h" -#include "machine/wd_fdc.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_dj2db_device - -class s100_dj2db_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual const rom_entry *device_rom_region() const; - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; - - // not really public - DECLARE_WRITE_LINE_MEMBER( fr_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - // device_s100_card_interface overrides - virtual UINT8 s100_smemr_r(address_space &space, offs_t offset); - virtual void s100_mwrt_w(address_space &space, offs_t offset, UINT8 data); - virtual UINT8 s100_sinp_r(address_space &space, offs_t offset); - virtual void s100_sout_w(address_space &space, offs_t offset, UINT8 data); - virtual void s100_phantom_w(int state); - -private: - // internal state - required_device<mb8866_t> m_fdc; - required_device<com8116_device> m_dbrg; - required_device<floppy_connector> m_floppy0; - required_device<floppy_connector> m_floppy1; - required_device<floppy_connector> m_floppy2; - required_device<floppy_connector> m_floppy3; - floppy_image_device *m_floppy; - required_memory_region m_rom; - optional_shared_ptr<UINT8> m_ram; - required_ioport m_j1a; - required_ioport m_j3a; - required_ioport m_j4; - required_ioport m_sw1; - - // floppy state - int m_drive; // selected drive - int m_head; // head loaded - int m_int_enbl; // interrupt enable - - // S-100 bus state - int m_access_enbl; // access enable - int m_board_enbl; // board enable - int m_phantom; // phantom -}; - - -// device type definition -extern const device_type S100_DJ2DB; - - -#endif diff --git a/src/emu/bus/s100/djdma.c b/src/emu/bus/s100/djdma.c deleted file mode 100644 index c0d93aed2f5..00000000000 --- a/src/emu/bus/s100/djdma.c +++ /dev/null @@ -1,127 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Disk Jockey/DMA floppy controller board emulation - -**********************************************************************/ - -#include "djdma.h" - - - -//************************************************************************** -// MACROS/CONSTANTS -//************************************************************************** - -#define Z80_TAG "14a" - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_DJDMA = &device_creator<s100_djdma_device>; - - -//------------------------------------------------- -// ROM( djdma ) -//------------------------------------------------- - -ROM_START( djdma ) - ROM_REGION( 0x1000, Z80_TAG, 0 ) - ROM_LOAD( "djdma 2.5 26c2.16d", 0x0000, 0x1000, CRC(71ff1924) SHA1(6907575954836364826b8fdef3c108bb93bf3d25) ) - - ROM_REGION( 0x500, "proms", 0 ) - ROM_LOAD( "djdma2x.3d", 0x000, 0x200, CRC(f9b1648b) SHA1(1ebe6dc8ccfbfa6c7dc98cb65fbc9fa21e3b687f) ) - ROM_LOAD( "dj-11c-a.11c", 0x200, 0x200, CRC(0c6c4af0) SHA1(8fdcd34e3d07add793ff9ba27c77af864e1731bb) ) - ROM_LOAD( "dja-12b.12b", 0x400, 0x100, CRC(040044af) SHA1(d069dc0e6b680cb8848d165aff6681ed2d750961) ) - - ROM_REGION( 0x104, "plds", 0 ) - ROM_LOAD( "djdma-2b.2b", 0x000, 0x104, CRC(d6925f2c) SHA1(1e58dfb7b8a2a5bbaa6589d4018042626fd5ceaf) ) // PAL16R4 - ROM_LOAD( "djdma 2c 81d5.2c", 0x0000, 0x10, NO_DUMP ) // ? -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const rom_entry *s100_djdma_device::device_rom_region() const -{ - return ROM_NAME( djdma ); -} - - -//------------------------------------------------- -// ADDRESS_MAP( djdma_mem ) -//------------------------------------------------- - -static ADDRESS_MAP_START( djdma_mem, AS_PROGRAM, 8, s100_djdma_device ) - AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("14a", 0) -ADDRESS_MAP_END - - -//------------------------------------------------- -// ADDRESS_MAP( djdma_io ) -//------------------------------------------------- - -static ADDRESS_MAP_START( djdma_io, AS_IO, 8, s100_djdma_device ) -ADDRESS_MAP_END - - -//------------------------------------------------- -// MACHINE_CONFIG_FRAGMENT( s100_djdma ) -//------------------------------------------------- - -static MACHINE_CONFIG_FRAGMENT( s100_djdma ) - MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_4MHz) - MCFG_CPU_PROGRAM_MAP(djdma_mem) - MCFG_CPU_IO_MAP(djdma_io) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor s100_djdma_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( s100_djdma ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_djdma_device - constructor -//------------------------------------------------- - -s100_djdma_device::s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_DJDMA, "DJDMA", tag, owner, clock, "djdma", __FILE__), - device_s100_card_interface(mconfig, *this) -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_djdma_device::device_start() -{ -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_djdma_device::device_reset() -{ -} diff --git a/src/emu/bus/s100/djdma.h b/src/emu/bus/s100/djdma.h deleted file mode 100644 index b5b54c972c4..00000000000 --- a/src/emu/bus/s100/djdma.h +++ /dev/null @@ -1,51 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Disk Jockey/DMA floppy controller board emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_DJDMA__ -#define __S100_DJDMA__ - -#include "emu.h" -#include "s100.h" -#include "cpu/z80/z80.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_djdma_device - -class s100_djdma_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - virtual const rom_entry *device_rom_region() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - -private: - // internal state -}; - - -// device type definition -extern const device_type S100_DJDMA; - - -#endif diff --git a/src/emu/bus/s100/mm65k16s.c b/src/emu/bus/s100/mm65k16s.c deleted file mode 100644 index 22240dd789a..00000000000 --- a/src/emu/bus/s100/mm65k16s.c +++ /dev/null @@ -1,267 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs MM65K16S memory board emulation - -**********************************************************************/ - -#include "mm65k16s.h" - - - -//************************************************************************** -// MACROS/CONSTANTS -//************************************************************************** - - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_MM65K16S = &device_creator<s100_mm65k16s_device>; - - -//------------------------------------------------- -// ROM( mm65k16s ) -//------------------------------------------------- - -ROM_START( mm65k16s ) - ROM_REGION( 0x10000, "proms", 0 ) - ROM_LOAD( "82s100.6c", 0x0000, 0x10000, NO_DUMP ) - - ROM_REGION( 0x10, "plds", 0 ) - ROM_LOAD( "pal14l4.6d", 0x0000, 0x10, NO_DUMP ) - ROM_LOAD( "pal16l2.16d", 0x0000, 0x10, NO_DUMP ) -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const rom_entry *s100_mm65k16s_device::device_rom_region() const -{ - return ROM_NAME( mm65k16s ); -} - - -//------------------------------------------------- -// INPUT_PORTS( mm65k16s ) -//------------------------------------------------- - -static INPUT_PORTS_START( mm65k16s ) - PORT_START("J6754") - PORT_DIPNAME( 0x01, 0x00, "Bank A Lower 32K" ) - PORT_DIPSETTING( 0x01, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - PORT_DIPNAME( 0x02, 0x00, "Bank A Upper 32K" ) - PORT_DIPSETTING( 0x02, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - PORT_DIPNAME( 0x04, 0x00, "Bank B Lower 32K" ) - PORT_DIPSETTING( 0x04, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - PORT_DIPNAME( 0x08, 0x00, "Bank B Upper 32K" ) - PORT_DIPSETTING( 0x08, "Disabled" ) - PORT_DIPSETTING( 0x00, "Enabled" ) - - PORT_START("J2") - PORT_DIPNAME( 0x01, 0x00, "Bank A Recognizes Phantom" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("J1") - PORT_DIPNAME( 0x01, 0x00, "Bank B Recognizes Phantom" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("5D") - PORT_DIPNAME( 0x03, 0x00, "First 16K Memory Addressing" ) PORT_DIPLOCATION("5D:1,2") - PORT_DIPSETTING( 0x00, "Block 0 (0000H-3FFFH)" ) - PORT_DIPSETTING( 0x02, "Block 1 (4000H-7FFFH)" ) - PORT_DIPSETTING( 0x01, "Block 2 (8000H-BFFFH)" ) - PORT_DIPSETTING( 0x03, "Block 3 (C000H-FFFFH" ) - PORT_DIPNAME( 0x0c, 0x08, "Second 16K Memory Addressing" ) PORT_DIPLOCATION("5D:3,4") - PORT_DIPSETTING( 0x00, "Block 0 (0000H-3FFFH)" ) - PORT_DIPSETTING( 0x08, "Block 1 (4000H-7FFFH)" ) - PORT_DIPSETTING( 0x04, "Block 2 (8000H-BFFFH)" ) - PORT_DIPSETTING( 0x0c, "Block 3 (C000H-FFFFH" ) - PORT_DIPNAME( 0x30, 0x10, "Third 16K Memory Addressing" ) PORT_DIPLOCATION("5D:5,6") - PORT_DIPSETTING( 0x00, "Block 0 (0000H-3FFFH)" ) - PORT_DIPSETTING( 0x20, "Block 1 (4000H-7FFFH)" ) - PORT_DIPSETTING( 0x10, "Block 2 (8000H-BFFFH)" ) - PORT_DIPSETTING( 0x30, "Block 3 (C000H-FFFFH" ) - PORT_DIPNAME( 0xc0, 0xc0, "Fourth 16K Memory Addressing" ) PORT_DIPLOCATION("5D:7,8") - PORT_DIPSETTING( 0x00, "Block 0 (0000H-3FFFH)" ) - PORT_DIPSETTING( 0x80, "Block 1 (4000H-7FFFH)" ) - PORT_DIPSETTING( 0x40, "Block 2 (8000H-BFFFH)" ) - PORT_DIPSETTING( 0xc0, "Block 3 (C000H-FFFFH" ) - - PORT_START("PAGE07") - PORT_DIPNAME( 0x0f, 0x00, "2K Segment Disable" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, "Page 0" ) - PORT_DIPSETTING( 0x01, "Page 1" ) - PORT_DIPSETTING( 0x02, "Page 2" ) - PORT_DIPSETTING( 0x03, "Page 3" ) - PORT_DIPSETTING( 0x04, "Page 4" ) - PORT_DIPSETTING( 0x05, "Page 5" ) - PORT_DIPSETTING( 0x06, "Page 6" ) - PORT_DIPSETTING( 0x07, "Page 7" ) - - PORT_START("J3") - PORT_DIPNAME( 0x01, 0x01, "Addressing Mode" ) - PORT_DIPSETTING( 0x01, "Extended Addressing" ) - PORT_DIPSETTING( 0x00, "Bank Select" ) - - PORT_START("1C") - PORT_DIPNAME( 0xff, 0x00, "Extended Addressing" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x01) - PORT_DIPSETTING( 0x00, "000000H" ) - // ... - PORT_DIPSETTING( 0xff, "FF0000H" ) - PORT_DIPNAME( 0xff, 0x40, "Bank Select Port" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "00H" ) - // ... - PORT_DIPSETTING( 0x40, "40H" ) - // ... - PORT_DIPSETTING( 0xff, "FFH" ) - - PORT_START("A0A7") - PORT_DIPNAME( 0x01, 0x01, "Bank Select Data Bit A0" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x01, "1" ) - PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit A1" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x02, "1" ) - PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit A2" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x04, "1" ) - PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit A3" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x08, "1" ) - PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit A4" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x10, "1" ) - PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit A5" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x20, "1" ) - PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit A6" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit A7" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x80, "1" ) - - PORT_START("0B7B") - PORT_DIPNAME( 0x01, 0x00, "Bank Select Data Bit 0B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x01, "1" ) - PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit 1B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x02, "1" ) - PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit 2B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x04, "1" ) - PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit 3B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x08, "1" ) - PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit 4B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x10, "1" ) - PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit 5B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x20, "1" ) - PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit 6B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit 7B" ) PORT_CONDITION("J3", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x80, "1" ) -INPUT_PORTS_END - - -//------------------------------------------------- -// input_ports - device-specific input ports -//------------------------------------------------- - -ioport_constructor s100_mm65k16s_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( mm65k16s ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_mm65k16s_device - constructor -//------------------------------------------------- - -s100_mm65k16s_device::s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_MM65K16S, "MM65K16S", tag, owner, clock, "mm65k16s", __FILE__), - device_s100_card_interface(mconfig, *this), - m_ram(*this, "ram") -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_mm65k16s_device::device_start() -{ - m_ram.allocate(0x10000); -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_mm65k16s_device::device_reset() -{ -} - - -//------------------------------------------------- -// s100_smemr_r - memory read -//------------------------------------------------- - -UINT8 s100_mm65k16s_device::s100_smemr_r(address_space &space, offs_t offset) -{ - UINT8 data = 0; - - if (offset < 0xf800) - { - data = m_ram[offset]; - } - - return data; -} - - -//------------------------------------------------- -// s100_mwrt_w - memory write -//------------------------------------------------- - -void s100_mm65k16s_device::s100_mwrt_w(address_space &space, offs_t offset, UINT8 data) -{ - if (offset < 0xf800) - { - m_ram[offset] = data; - } -} - - -//------------------------------------------------- -// s100_phantom_w - phantom -//------------------------------------------------- - -void s100_mm65k16s_device::s100_phantom_w(int state) -{ -} diff --git a/src/emu/bus/s100/mm65k16s.h b/src/emu/bus/s100/mm65k16s.h deleted file mode 100644 index 35d9cbc21c5..00000000000 --- a/src/emu/bus/s100/mm65k16s.h +++ /dev/null @@ -1,55 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs MM65K16S memory board emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_MM65K16S__ -#define __S100_MM65K16S__ - -#include "emu.h" -#include "s100.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_mm65k16s_device - -class s100_mm65k16s_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual const rom_entry *device_rom_region() const; - virtual ioport_constructor device_input_ports() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - // device_s100_card_interface overrides - virtual UINT8 s100_smemr_r(address_space &space, offs_t offset); - virtual void s100_mwrt_w(address_space &space, offs_t offset, UINT8 data); - virtual void s100_phantom_w(int state); - -private: - optional_shared_ptr<UINT8> m_ram; -}; - - -// device type definition -extern const device_type S100_MM65K16S; - - -#endif diff --git a/src/emu/bus/s100/nsmdsa.c b/src/emu/bus/s100/nsmdsa.c deleted file mode 100644 index 91fb4f46135..00000000000 --- a/src/emu/bus/s100/nsmdsa.c +++ /dev/null @@ -1,120 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - North Star MICRO-DISK System MDS-A (Single Density) emulation - -**********************************************************************/ - -#include "nsmdsa.h" - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_MDS_A = &device_creator<s100_mds_a_device>; - - -//------------------------------------------------- -// ROM( mds_a ) -//------------------------------------------------- - -ROM_START( mds_a ) - ROM_REGION( 0x100, "psel", 0 ) - ROM_LOAD( "psel.7g", 0x000, 0x100, NO_DUMP ) // 74S287 - - ROM_REGION( 0x100, "pgm", 0 ) - ROM_LOAD( "pgml.3f", 0x000, 0x100, NO_DUMP ) // 74S287 - ROM_LOAD( "pgmr.3e", 0x000, 0x100, NO_DUMP ) // 74S287 - ROM_LOAD( "horizon.bin", 0x000, 0x100, CRC(754e53e5) SHA1(875e42942d639b972252b87d86c3dc2133304967) BAD_DUMP ) -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const rom_entry *s100_mds_a_device::device_rom_region() const -{ - return ROM_NAME( mds_a ); -} - - -//------------------------------------------------- -// SLOT_INTERFACE( mds_a_floppies ) -//------------------------------------------------- - -static SLOT_INTERFACE_START( mds_a_floppies ) - SLOT_INTERFACE( "525sd", FLOPPY_525_SD ) // Shugart SA-400 -SLOT_INTERFACE_END - - -//------------------------------------------------- -// MACHINE_CONFIG_FRAGMENT( mds_a ) -//------------------------------------------------- - -static MACHINE_CONFIG_FRAGMENT( mds_a ) - MCFG_FLOPPY_DRIVE_ADD("floppy0", mds_a_floppies, "525sd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("floppy1", mds_a_floppies, "525sd", floppy_image_device::default_floppy_formats) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor s100_mds_a_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( mds_a ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_mds_a_device - constructor -//------------------------------------------------- - -s100_mds_a_device::s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_MDS_A, "MDS-A", tag, owner, clock, "nsmdsa", __FILE__), - device_s100_card_interface(mconfig, *this), - m_floppy0(*this, "floppy0"), - m_floppy1(*this, "floppy1"), - m_psel_rom(*this, "psel"), - m_pgm_rom(*this, "pgm") -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_mds_a_device::device_start() -{ -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_mds_a_device::device_reset() -{ -} - - -//------------------------------------------------- -// s100_smemr_r - memory read -//------------------------------------------------- - -UINT8 s100_mds_a_device::s100_smemr_r(address_space &space, offs_t offset) -{ - return 0; -} diff --git a/src/emu/bus/s100/nsmdsa.h b/src/emu/bus/s100/nsmdsa.h deleted file mode 100644 index 88a2f330391..00000000000 --- a/src/emu/bus/s100/nsmdsa.h +++ /dev/null @@ -1,58 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - North Star MICRO-DISK System MDS-A (Single Density) emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_MDS_A__ -#define __S100_MDS_A__ - -#include "emu.h" -#include "s100.h" -#include "imagedev/floppy.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_mds_a_device - -class s100_mds_a_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual const rom_entry *device_rom_region() const; - virtual machine_config_constructor device_mconfig_additions() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - // device_s100_card_interface overrides - virtual UINT8 s100_smemr_r(address_space &space, offs_t offset); - -private: - required_device<floppy_connector> m_floppy0; - required_device<floppy_connector> m_floppy1; - required_memory_region m_psel_rom; - required_memory_region m_pgm_rom; -}; - - -// device type definition -extern const device_type S100_MDS_A; - - - -#endif diff --git a/src/emu/bus/s100/nsmdsad.c b/src/emu/bus/s100/nsmdsad.c deleted file mode 100644 index d1a06407c6d..00000000000 --- a/src/emu/bus/s100/nsmdsad.c +++ /dev/null @@ -1,122 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - North Star MICRO-DISK System MDS-A-D (Double Density) emulation - -**********************************************************************/ - -#include "nsmdsad.h" - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_MDS_AD = &device_creator<s100_mds_ad_device>; - - -//------------------------------------------------- -// ROM( mds_ad ) -//------------------------------------------------- - -ROM_START( mds_ad ) - ROM_REGION( 0x100, "dsel", 0 ) - ROM_LOAD( "dsel.11c", 0x000, 0x100, NO_DUMP ) // 82S129 - - ROM_REGION( 0x100, "dpgm", 0 ) - ROM_LOAD( "dpgm.9d", 0x000, 0x100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48) ) - - ROM_REGION( 0x100, "dwe", 0 ) - ROM_LOAD( "dwe.4c", 0x000, 0x100, NO_DUMP ) // 82S129 -ROM_END - - -//------------------------------------------------- -// rom_region - device-specific ROM region -//------------------------------------------------- - -const rom_entry *s100_mds_ad_device::device_rom_region() const -{ - return ROM_NAME( mds_ad ); -} - - -//------------------------------------------------- -// SLOT_INTERFACE( mds_ad_floppies ) -//------------------------------------------------- - -static SLOT_INTERFACE_START( mds_ad_floppies ) - SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) // Shugart SA-400 -SLOT_INTERFACE_END - - -//------------------------------------------------- -// MACHINE_CONFIG_FRAGMENT( mds_ad ) -//------------------------------------------------- - -static MACHINE_CONFIG_FRAGMENT( mds_ad ) - MCFG_FLOPPY_DRIVE_ADD("floppy0", mds_ad_floppies, "525dd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("floppy1", mds_ad_floppies, "525dd", floppy_image_device::default_floppy_formats) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor s100_mds_ad_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( mds_ad ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_mds_ad_device - constructor -//------------------------------------------------- - -s100_mds_ad_device::s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_MDS_AD, "MDS-A-D", tag, owner, clock, "nsmdsad", __FILE__), - device_s100_card_interface(mconfig, *this), - m_floppy0(*this, "floppy0"), - m_floppy1(*this, "floppy1"), - m_dsel_rom(*this, "dsel"), - m_dpgm_rom(*this, "dpgm"), - m_dwe_rom(*this, "dwe") -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_mds_ad_device::device_start() -{ -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_mds_ad_device::device_reset() -{ -} - - -//------------------------------------------------- -// s100_smemr_r - memory read -//------------------------------------------------- - -UINT8 s100_mds_ad_device::s100_smemr_r(address_space &space, offs_t offset) -{ - return 0; -} diff --git a/src/emu/bus/s100/nsmdsad.h b/src/emu/bus/s100/nsmdsad.h deleted file mode 100644 index 1c156590ba1..00000000000 --- a/src/emu/bus/s100/nsmdsad.h +++ /dev/null @@ -1,59 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - North Star MICRO-DISK System MDS-A-D (Double Density) emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_MDS_AD__ -#define __S100_MDS_AD__ - -#include "emu.h" -#include "s100.h" -#include "imagedev/floppy.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_mds_ad_device - -class s100_mds_ad_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual const rom_entry *device_rom_region() const; - virtual machine_config_constructor device_mconfig_additions() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - // device_s100_card_interface overrides - virtual UINT8 s100_smemr_r(address_space &space, offs_t offset); - -private: - required_device<floppy_connector> m_floppy0; - required_device<floppy_connector> m_floppy1; - required_memory_region m_dsel_rom; - required_memory_region m_dpgm_rom; - required_memory_region m_dwe_rom; -}; - - -// device type definition -extern const device_type S100_MDS_AD; - - - -#endif diff --git a/src/emu/bus/s100/s100.c b/src/emu/bus/s100/s100.c deleted file mode 100644 index aee9ecbccf6..00000000000 --- a/src/emu/bus/s100/s100.c +++ /dev/null @@ -1,200 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - S-100 (IEEE-696/1983) bus emulation - -**********************************************************************/ - -#include "s100.h" - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_BUS = &device_creator<s100_bus_t>; -const device_type S100_SLOT = &device_creator<s100_slot_t>; - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// device_s100_card_interface - constructor -//------------------------------------------------- - -device_s100_card_interface::device_s100_card_interface(const machine_config &mconfig, device_t &device) - : device_slot_card_interface(mconfig, device) -{ -} - - -//------------------------------------------------- -// s100_slot_t - constructor -//------------------------------------------------- -s100_slot_t::s100_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_SLOT, "S100 slot", tag, owner, clock, "s100_slot", __FILE__), - device_slot_interface(mconfig, *this) -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_slot_t::device_start() -{ - m_bus = machine().device<s100_bus_t>(S100_TAG); - device_s100_card_interface *dev = dynamic_cast<device_s100_card_interface *>(get_card_device()); - if (dev) m_bus->add_card(dev); -} - - -//------------------------------------------------- -// s100_bus_t - constructor -//------------------------------------------------- - -s100_bus_t::s100_bus_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_BUS, "S100", tag, owner, clock, "s100", __FILE__), - m_write_irq(*this), - m_write_nmi(*this), - m_write_vi0(*this), - m_write_vi1(*this), - m_write_vi2(*this), - m_write_vi3(*this), - m_write_vi4(*this), - m_write_vi5(*this), - m_write_vi6(*this), - m_write_vi7(*this), - m_write_dma0(*this), - m_write_dma1(*this), - m_write_dma2(*this), - m_write_dma3(*this), - m_write_rdy(*this), - m_write_hold(*this), - m_write_error(*this) -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_bus_t::device_start() -{ - // resolve callbacks - m_write_irq.resolve_safe(); - m_write_nmi.resolve_safe(); - m_write_vi0.resolve_safe(); - m_write_vi1.resolve_safe(); - m_write_vi2.resolve_safe(); - m_write_vi3.resolve_safe(); - m_write_vi4.resolve_safe(); - m_write_vi5.resolve_safe(); - m_write_vi6.resolve_safe(); - m_write_vi7.resolve_safe(); - m_write_dma0.resolve_safe(); - m_write_dma1.resolve_safe(); - m_write_dma2.resolve_safe(); - m_write_dma3.resolve_safe(); - m_write_rdy.resolve_safe(); - m_write_hold.resolve_safe(); - m_write_error.resolve_safe(); -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_bus_t::device_reset() -{ -} - - -//------------------------------------------------- -// add_card - add card -//------------------------------------------------- - -void s100_bus_t::add_card(device_s100_card_interface *card) -{ - card->m_bus = this; - m_device_list.append(*card); -} - - -//------------------------------------------------- -// smemr_r - memory read -//------------------------------------------------- - -READ8_MEMBER( s100_bus_t::smemr_r ) -{ - UINT8 data = 0; - - device_s100_card_interface *entry = m_device_list.first(); - - while (entry) - { - data |= entry->s100_smemr_r(space, offset); - entry = entry->next(); - } - - return data; -} - - -//------------------------------------------------- -// mwrt_w - memory write -//------------------------------------------------- - -WRITE8_MEMBER( s100_bus_t::mwrt_w ) -{ - device_s100_card_interface *entry = m_device_list.first(); - - while (entry) - { - entry->s100_mwrt_w(space, offset, data); - entry = entry->next(); - } -} - - -//------------------------------------------------- -// sinp_r - I/O read -//------------------------------------------------- - -READ8_MEMBER( s100_bus_t::sinp_r ) -{ - UINT8 data = 0; - - device_s100_card_interface *entry = m_device_list.first(); - - while (entry) - { - data |= entry->s100_sinp_r(space, offset); - entry = entry->next(); - } - - return data; -} - - -//------------------------------------------------- -// sout_w - I/O write -//------------------------------------------------- - -WRITE8_MEMBER( s100_bus_t::sout_w ) -{ - device_s100_card_interface *entry = m_device_list.first(); - - while (entry) - { - entry->s100_sout_w(space, offset, data); - entry = entry->next(); - } -} diff --git a/src/emu/bus/s100/s100.h b/src/emu/bus/s100/s100.h deleted file mode 100644 index 9d622b573b6..00000000000 --- a/src/emu/bus/s100/s100.h +++ /dev/null @@ -1,311 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - S-100 (IEEE Std 696-1983) bus emulation - -********************************************************************** - - +8 V (B) 1 51 +8 V (B) - +16 V (B) 2 52 -16 V (B) - XRDY (S) 3 53 0 V - VI0* (S) 4 54 SLAVE CLR* (B) - VI1* (S) 5 55 TMA0* (M) - VI2* (S) 6 56 TMA1* (M) - VI3* (S) 7 57 TMA2* (M) - VI4* (S) 8 58 sXTRQ* (M) - VI5* (S) 9 59 A19 (M) - VI6* (S) 10 60 SIXTN* (S) - VI7* (S) 11 61 A20 (M) - NMI* (S) 12 62 A21 (M) - PWRFAIL* (B) 13 63 A22 (M) - TMA3* (M) 14 64 A23 (M) - A18 (M) 15 65 NDEF - A16 (M) 16 66 NDEF - A17 (M) 17 67 PHANTOM* (M/S) - SDSB* (M) 18 68 MWRT (B) - CDSB* (M) 19 69 RFU - 0 V 20 70 0 V - NDEF 21 71 RFU - ADSB* (M) 22 72 RDY (S) - DODSB* (M) 23 73 INT* (S) - phi (B) 24 74 HOLD* (M) - pSTVAL* (M) 25 75 RESET* (B) - pHLDA (M) 26 76 pSYNC (M) - RFU 27 77 pWR* (M) - RFU 28 78 pDBIN (M) - A5 (M) 29 79 A0 (M) - A4 (M) 30 80 A1 (M) - A3 (M) 31 81 A2 (M) - A15 (M) 32 82 A6 (M) - A12 (M) 33 83 A7 (M) - A9 (M) 34 84 A8 (M) - DO1 (M)/ED1 (M/S) 35 85 A13 (M) - DO0 (M)/ED0 (M/S) 36 86 A14 (M) - A10 (M) 37 87 A11 (M) - DO4 (M)/ED4 (M/S) 38 88 DO2 (M)/ED2 (M/S) - DO5 (M)/ED5 (M/S) 39 89 DO3 (M)/ED3 (M/S) - DO6 (M)/ED6 (M/S) 40 90 DO7 (M)/ED7 (M/S) - DI2 (M)/OD2 (M/S) 41 91 DI4 (M)/OD4 (M/S) - DI3 (M)/OD3 (M/S) 42 92 DI5 (M)/OD5 (M/S) - DI7 (M)/OD7 (M/S) 43 93 DI6 (M)/OD6 (M/S) - sM1 (M) 44 94 DI1 (M)/OD1 (M/S) - sOUT (M) 45 95 DI0 (M)/OD0 (M/S) - sINP (M) 46 96 sINTA (M) - sMEMR (M) 47 97 sWO* (M) - sHLTA (M) 48 98 ERROR* (S) - CLOCK (B) 49 99 POC* (B) - 0 V 50 100 0 V - -**********************************************************************/ - -#pragma once - -#ifndef __S100__ -#define __S100__ - -#include "emu.h" - - - -//************************************************************************** -// CONSTANTS -//************************************************************************** - -#define S100_TAG "s100" - - - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_S100_BUS_ADD() \ - MCFG_DEVICE_ADD(S100_TAG, S100_BUS, 0) - -#define MCFG_S100_SLOT_ADD(_tag, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, S100_SLOT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - - -#define MCFG_S100_IRQ_CALLBACK(_write) \ - devcb = &s100_bus_t::set_irq_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_NMI_CALLBACK(_write) \ - devcb = &s100_bus_t::set_nmi_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI0_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi0_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI1_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi1_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI2_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi2_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI3_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi3_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI4_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi4_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI5_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi5_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI6_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi6_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_VI7_CALLBACK(_write) \ - devcb = &s100_bus_t::set_vi7_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_DMA0_CALLBACK(_write) \ - devcb = &s100_bus_t::set_dma0_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_DMA1_CALLBACK(_write) \ - devcb = &s100_bus_t::set_dma1_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_DMA2_CALLBACK(_write) \ - devcb = &s100_bus_t::set_dma2_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_DMA3_CALLBACK(_write) \ - devcb = &s100_bus_t::set_dma3_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_RDY_CALLBACK(_write) \ - devcb = &s100_bus_t::set_rdy_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_HOLD_CALLBACK(_write) \ - devcb = &s100_bus_t::set_hold_wr_callback(*device, DEVCB_##_write); - -#define MCFG_S100_ERROR_CALLBACK(_write) \ - devcb = &s100_bus_t::set_error_wr_callback(*device, DEVCB_##_write); - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class s100_bus_t; - -// ======================> device_s100_card_interface - -class device_s100_card_interface : public device_slot_card_interface -{ - friend class s100_bus_t; - -public: - // construction/destruction - device_s100_card_interface(const machine_config &mconfig, device_t &device); - virtual ~device_s100_card_interface() { } - - device_s100_card_interface *next() const { return m_next; } - - // interrupts - virtual void s100_int_w(int state) { }; - virtual void s100_nmi_w(int state) { }; - virtual UINT8 s100_sinta_r(offs_t offset) { return 0; }; - - // vectored interrupts - virtual void s100_vi0_w(int state) { }; - virtual void s100_vi1_w(int state) { }; - virtual void s100_vi2_w(int state) { }; - virtual void s100_vi3_w(int state) { }; - virtual void s100_vi4_w(int state) { }; - virtual void s100_vi5_w(int state) { }; - virtual void s100_vi6_w(int state) { }; - virtual void s100_vi7_w(int state) { }; - - // memory access - virtual UINT8 s100_smemr_r(address_space &space, offs_t offset) { return 0; }; - virtual void s100_mwrt_w(address_space &space, offs_t offset, UINT8 data) { }; - - // I/O access - virtual UINT8 s100_sinp_r(address_space &space, offs_t offset) { return 0; }; - virtual void s100_sout_w(address_space &space, offs_t offset, UINT8 data) { }; - - // configuration access - virtual void s100_phlda_w(int state) { } - virtual void s100_shalta_w(int state) { } - virtual void s100_phantom_w(int state) { } - virtual void s100_sxtrq_w(int state) { } - virtual int s100_sixtn_r() { return 1; } - - // reset - virtual void s100_poc_w(int state) { } - virtual void s100_reset_w(int state) { } - virtual void s100_slave_clr_w(int state) { } - -public: - s100_bus_t *m_bus; - device_s100_card_interface *m_next; -}; - - - -// ======================> s100_bus_t - -class s100_bus_t : public device_t -{ -public: - // construction/destruction - s100_bus_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ~s100_bus_t() { m_device_list.detach_all(); } - - template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_irq.set_callback(object); } - template<class _Object> static devcb_base &set_nmi_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_nmi.set_callback(object); } - template<class _Object> static devcb_base &set_vi0_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi0.set_callback(object); } - template<class _Object> static devcb_base &set_vi1_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi1.set_callback(object); } - template<class _Object> static devcb_base &set_vi2_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi2.set_callback(object); } - template<class _Object> static devcb_base &set_vi3_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi3.set_callback(object); } - template<class _Object> static devcb_base &set_vi4_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi4.set_callback(object); } - template<class _Object> static devcb_base &set_vi5_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi5.set_callback(object); } - template<class _Object> static devcb_base &set_vi6_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi6.set_callback(object); } - template<class _Object> static devcb_base &set_vi7_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_vi7.set_callback(object); } - template<class _Object> static devcb_base &set_dma0_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_dma0.set_callback(object); } - template<class _Object> static devcb_base &set_dma1_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_dma1.set_callback(object); } - template<class _Object> static devcb_base &set_dma2_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_dma2.set_callback(object); } - template<class _Object> static devcb_base &set_dma3_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_dma3.set_callback(object); } - template<class _Object> static devcb_base &set_rdy_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_rdy.set_callback(object); } - template<class _Object> static devcb_base &set_hold_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_hold.set_callback(object); } - template<class _Object> static devcb_base &set_error_wr_callback(device_t &device, _Object object) { return downcast<s100_bus_t &>(device).m_write_error.set_callback(object); } - - void add_card(device_s100_card_interface *card); - - DECLARE_READ8_MEMBER( smemr_r ); - DECLARE_WRITE8_MEMBER( mwrt_w ); - - DECLARE_READ8_MEMBER( sinp_r ); - DECLARE_WRITE8_MEMBER( sout_w ); - - DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); } - DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_write_nmi(state); } - DECLARE_WRITE_LINE_MEMBER( vi0_w ) { m_write_vi0(state); } - DECLARE_WRITE_LINE_MEMBER( vi1_w ) { m_write_vi1(state); } - DECLARE_WRITE_LINE_MEMBER( vi2_w ) { m_write_vi2(state); } - DECLARE_WRITE_LINE_MEMBER( vi3_w ) { m_write_vi3(state); } - DECLARE_WRITE_LINE_MEMBER( vi4_w ) { m_write_vi4(state); } - DECLARE_WRITE_LINE_MEMBER( vi5_w ) { m_write_vi5(state); } - DECLARE_WRITE_LINE_MEMBER( vi6_w ) { m_write_vi6(state); } - DECLARE_WRITE_LINE_MEMBER( vi7_w ) { m_write_vi7(state); } - DECLARE_WRITE_LINE_MEMBER( dma0_w ) { m_write_dma0(state); } - DECLARE_WRITE_LINE_MEMBER( dma1_w ) { m_write_dma1(state); } - DECLARE_WRITE_LINE_MEMBER( dma2_w ) { m_write_dma2(state); } - DECLARE_WRITE_LINE_MEMBER( dma3_w ) { m_write_dma3(state); } - DECLARE_WRITE_LINE_MEMBER( rdy_w ) { m_write_rdy(state); } - DECLARE_WRITE_LINE_MEMBER( hold_w ) { m_write_hold(state); } - DECLARE_WRITE_LINE_MEMBER( error_w ) { m_write_error(state); } - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - -private: - devcb_write_line m_write_irq; - devcb_write_line m_write_nmi; - devcb_write_line m_write_vi0; - devcb_write_line m_write_vi1; - devcb_write_line m_write_vi2; - devcb_write_line m_write_vi3; - devcb_write_line m_write_vi4; - devcb_write_line m_write_vi5; - devcb_write_line m_write_vi6; - devcb_write_line m_write_vi7; - devcb_write_line m_write_dma0; - devcb_write_line m_write_dma1; - devcb_write_line m_write_dma2; - devcb_write_line m_write_dma3; - devcb_write_line m_write_rdy; - devcb_write_line m_write_hold; - devcb_write_line m_write_error; - - simple_list<device_s100_card_interface> m_device_list; -}; - - -// ======================> s100_slot_t - -class s100_slot_t : public device_t, - public device_slot_interface -{ -public: - // construction/destruction - s100_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // device-level overrides - virtual void device_start(); - -private: - s100_bus_t *m_bus; -}; - - - -// device type definition -extern const device_type S100_BUS; -extern const device_type S100_SLOT; - - - - -#endif diff --git a/src/emu/bus/s100/wunderbus.c b/src/emu/bus/s100/wunderbus.c deleted file mode 100644 index 4b269a80e93..00000000000 --- a/src/emu/bus/s100/wunderbus.c +++ /dev/null @@ -1,528 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Wunderbus I/O card emulation - -**********************************************************************/ - -#include "wunderbus.h" -#include "bus/rs232/rs232.h" - - - -//************************************************************************** -// MACROS/CONSTANTS -//************************************************************************** - -#define I8259A_TAG "13b" -#define INS8250_1_TAG "6d" -#define INS8250_2_TAG "5d" -#define INS8250_3_TAG "4d" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define RS232_C_TAG "rs232c" -#define UPD1990C_TAG "12a" - - - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -const device_type S100_WUNDERBUS = &device_creator<s100_wunderbus_device>; - - -//------------------------------------------------- -// pic8259_interface pic_intf -//------------------------------------------------- - -/* - - bit description - - IR0 S-100 VI0 - IR1 S-100 VI1 - IR2 S-100 VI2 - IR3 Serial Device 1 - IR4 Serial Device 2 - IR5 Serial Device 3 - IR6 Daisy PWR line - IR7 RT Clock TP line - -*/ - -WRITE_LINE_MEMBER( s100_wunderbus_device::pic_int_w ) -{ - m_bus->irq_w(state); -} - -static DEVICE_INPUT_DEFAULTS_START( terminal ) - DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_110 ) - DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_110 ) - DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 ) - DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) - DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) - DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 ) -DEVICE_INPUT_DEFAULTS_END - - -//------------------------------------------------- -// UPD1990A_INTERFACE( rtc_intf ) -//------------------------------------------------- - -WRITE_LINE_MEMBER( s100_wunderbus_device::rtc_tp_w ) -{ - if (state) - { - m_rtc_tp = state; - m_pic->ir7_w(m_rtc_tp); - } -} - - -//------------------------------------------------- -// MACHINE_CONFIG_FRAGMENT( s100_wunderbus ) -//------------------------------------------------- - -static MACHINE_CONFIG_FRAGMENT( s100_wunderbus ) - MCFG_PIC8259_ADD(I8259A_TAG, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, pic_int_w), VCC, NULL) - MCFG_DEVICE_ADD(INS8250_1_TAG, INS8250, XTAL_18_432MHz/10) - MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_txd)) - MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_dtr)) - MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(DEVWRITELINE(I8259A_TAG, pic8259_device, ir3_w)) - MCFG_DEVICE_ADD(INS8250_2_TAG, INS8250, XTAL_18_432MHz/10) - MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_txd)) - MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_dtr)) - MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(DEVWRITELINE(I8259A_TAG, pic8259_device, ir4_w)) - MCFG_DEVICE_ADD(INS8250_3_TAG, INS8250, XTAL_18_432MHz/10) - MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_C_TAG, rs232_port_device, write_txd)) - MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_C_TAG, rs232_port_device, write_dtr)) - MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE(RS232_C_TAG, rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(DEVWRITELINE(I8259A_TAG, pic8259_device, ir5_w)) - - MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, "terminal") - MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, rx_w)) - MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dcd_w)) - MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dsr_w)) - MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, ri_w)) - MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, cts_w)) - MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal) - - MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL) - MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, rx_w)) - MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dcd_w)) - MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dsr_w)) - MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, ri_w)) - MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, cts_w)) - - MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, NULL) - MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, rx_w)) - MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dcd_w)) - MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dsr_w)) - MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, ri_w)) - MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, cts_w)) - - MCFG_UPD1990A_ADD(UPD1990C_TAG, XTAL_32_768kHz, NULL, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, rtc_tp_w)) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor s100_wunderbus_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( s100_wunderbus ); -} - - -//------------------------------------------------- -// INPUT_PORTS( wunderbus ) -//------------------------------------------------- - -static INPUT_PORTS_START( wunderbus ) - PORT_START("7C") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("7C:1") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x3e, 0x12, "BASE Port Address" ) PORT_DIPLOCATION("7C:2,3,4,5,6") - PORT_DIPSETTING( 0x00, "00H" ) - PORT_DIPSETTING( 0x02, "08H" ) - PORT_DIPSETTING( 0x04, "10H" ) - PORT_DIPSETTING( 0x06, "18H" ) - PORT_DIPSETTING( 0x08, "20H" ) - PORT_DIPSETTING( 0x0a, "28H" ) - PORT_DIPSETTING( 0x0c, "30H" ) - PORT_DIPSETTING( 0x0e, "38H" ) - PORT_DIPSETTING( 0x10, "40H" ) - PORT_DIPSETTING( 0x12, "48H" ) - PORT_DIPSETTING( 0x14, "50H" ) - PORT_DIPSETTING( 0x16, "58H" ) - PORT_DIPSETTING( 0x18, "60H" ) - PORT_DIPSETTING( 0x1a, "68H" ) - PORT_DIPSETTING( 0x1c, "70H" ) - PORT_DIPSETTING( 0x1e, "78H" ) - PORT_DIPSETTING( 0x20, "80H" ) - PORT_DIPSETTING( 0x22, "88H" ) - PORT_DIPSETTING( 0x24, "90H" ) - PORT_DIPSETTING( 0x26, "98H" ) - PORT_DIPSETTING( 0x28, "A0H" ) - PORT_DIPSETTING( 0x2a, "A8H" ) - PORT_DIPSETTING( 0x2c, "B0H" ) - PORT_DIPSETTING( 0x2e, "B8H" ) - PORT_DIPSETTING( 0x30, "C0H" ) - PORT_DIPSETTING( 0x32, "C8H" ) - PORT_DIPSETTING( 0x34, "D0H" ) - PORT_DIPSETTING( 0x36, "D8H" ) - PORT_DIPSETTING( 0x38, "E0H" ) - PORT_DIPSETTING( 0x3a, "E8H" ) - PORT_DIPSETTING( 0x3c, "F0H" ) - PORT_DIPSETTING( 0x3e, "F8H" ) - PORT_DIPNAME( 0x40, 0x40, "FLAG2 Polarity" ) PORT_DIPLOCATION("7C:7") - PORT_DIPSETTING( 0x40, "Negative" ) - PORT_DIPSETTING( 0x00, "Positive" ) - PORT_DIPNAME( 0x80, 0x80, "FLAG1 Polarity" ) PORT_DIPLOCATION("7C:8") - PORT_DIPSETTING( 0x80, "Negative" ) - PORT_DIPSETTING( 0x00, "Positive" ) - - PORT_START("10A") - PORT_DIPNAME( 0x07, 0x00, "Baud Rate" ) PORT_DIPLOCATION("10A:1,2,3") - PORT_DIPSETTING( 0x00, "Automatic" ) - PORT_DIPSETTING( 0x01, "19200" ) - PORT_DIPSETTING( 0x02, "9600" ) - PORT_DIPSETTING( 0x03, "4800" ) - PORT_DIPSETTING( 0x04, "2400" ) - PORT_DIPSETTING( 0x05, "1200" ) - PORT_DIPSETTING( 0x06, "300" ) - PORT_DIPSETTING( 0x07, "110" ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("10A:4") - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("10A:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("10A:6") - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("10A:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("10A:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) -INPUT_PORTS_END - - -//------------------------------------------------- -// input_ports - device-specific input ports -//------------------------------------------------- - -ioport_constructor s100_wunderbus_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( wunderbus ); -} - - - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// s100_wunderbus_device - constructor -//------------------------------------------------- - -s100_wunderbus_device::s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, S100_WUNDERBUS, "Wunderbus I/O", tag, owner, clock, "s100_wunderbus", __FILE__), - device_s100_card_interface(mconfig, *this), - m_pic(*this, I8259A_TAG), - m_ace1(*this, INS8250_1_TAG), - m_ace2(*this, INS8250_2_TAG), - m_ace3(*this, INS8250_3_TAG), - m_rtc(*this, UPD1990C_TAG), - m_7c(*this, "7C"), - m_10a(*this, "10A") -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void s100_wunderbus_device::device_start() -{ -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void s100_wunderbus_device::device_reset() -{ -} - - -//------------------------------------------------- -// s100_vi0_w - vectored interrupt 0 -//------------------------------------------------- - -void s100_wunderbus_device::s100_vi0_w(int state) -{ - m_pic->ir0_w(state); -} - - -//------------------------------------------------- -// s100_vi1_w - vectored interrupt 1 -//------------------------------------------------- - -void s100_wunderbus_device::s100_vi1_w(int state) -{ - m_pic->ir1_w(state); -} - - -//------------------------------------------------- -// s100_vi2_w - vectored interrupt 2 -//------------------------------------------------- - -void s100_wunderbus_device::s100_vi2_w(int state) -{ - m_pic->ir2_w(state); -} - - -//------------------------------------------------- -// s100_sinp_r - I/O read -//------------------------------------------------- - -UINT8 s100_wunderbus_device::s100_sinp_r(address_space &space, offs_t offset) -{ - UINT8 address = (m_7c->read() & 0x3e) << 2; - if ((offset & 0xf8) != address) return 0; - - UINT8 data = 0; - - if ((offset & 0x07) < 7) - { - switch (m_group) - { - case 0: - switch (offset & 0x07) - { - case 0: // DAISY 0 IN (STATUS) - /* - - bit description - - 0 End of Ribbon - 1 Paper Out - 2 Cover Open - 3 Paper Feed Ready - 4 Carriage Ready - 5 Print Wheel Ready - 6 Check - 7 Printer Ready - - */ - break; - - case 1: // Switch/Parallel port flags - /* - - bit description - - 0 FLAG1 - 1 FLAG2 - 2 10A S6 - 3 10A S5 - 4 10A S4 - 5 10A S3 - 6 10A S2 - 7 10A S1 - - */ - - data = BITSWAP8(m_10a->read(),0,1,2,3,4,5,6,7) & 0xfc; - break; - - case 2: // R.T. Clock IN/RESET CLK. Int. - /* - - bit description - - 0 1990 Data Out - 1 1990 TP - 2 - 3 - 4 - 5 - 6 - 7 - - */ - - data |= m_rtc->data_out_r(); - data |= m_rtc->tp_r() << 1; - - // reset clock interrupt - m_rtc_tp = 0; - m_pic->ir7_w(m_rtc_tp); - break; - - case 3: // Parallel data IN - break; - - case 4: // 8259 0 register - case 5: // 8259 1 register - data = m_pic->read(space, offset & 0x01); - break; - - case 6: // not used - break; - } - break; - - case 1: - data = m_ace1->ins8250_r(space, offset & 0x07); - break; - - case 2: - data = m_ace2->ins8250_r(space, offset & 0x07); - break; - - case 3: - data = m_ace3->ins8250_r(space, offset & 0x07); - break; - } - } - - return data; -} - - -//------------------------------------------------- -// s100_sout_w - I/O write -//------------------------------------------------- - -void s100_wunderbus_device::s100_sout_w(address_space &space, offs_t offset, UINT8 data) -{ - UINT8 address = (m_7c->read() & 0x3e) << 2; - if ((offset & 0xf8) != address) return; - - if ((offset & 0x07) == 7) - { - m_group = data & 0x03; - } - else - { - switch (m_group) - { - case 0: - switch (offset & 0x07) - { - case 0: // DAISY 0 OUT - /* - - bit description - - 0 Data Bit 9 - 1 Data Bit 10 - 2 Data Bit 11 - 3 Data Bit 12 - 4 Paper Feed Strobe - 5 Carriage Strobe - 6 Print Wheel Strobe - 7 Restore - - */ - break; - - case 1: // DAISY 1 OUT - /* - - bit description - - 0 Data Bit 1 - 1 Data Bit 2 - 2 Data Bit 3 - 3 Data Bit 4 - 4 Data Bit 5 - 5 Data Bit 6 - 6 Data Bit 7 - 7 Data Bit 8 - - */ - break; - - case 2: // R.T. Clock OUT - /* - - bit description - - 0 1990 Data In - 1 1990 Clk - 2 1990 C0 - 3 1990 C1 - 4 1990 C2 - 5 1990 STB - 6 Ribbon Lift - 7 Select - - */ - - m_rtc->data_in_w(BIT(data, 0)); - m_rtc->clk_w(BIT(data, 1)); - m_rtc->c0_w(BIT(data, 2)); - m_rtc->c1_w(BIT(data, 3)); - m_rtc->c2_w(BIT(data, 4)); - m_rtc->stb_w(BIT(data, 5)); - break; - - case 3: // Par. data OUT - break; - - case 4: // 8259 0 register - case 5: // 8259 1 register - m_pic->write(space, offset & 0x01, data); - break; - - case 6: // Par. port cntrl. - /* - - bit description - - 0 POE - 1 _RST1 - 2 _RST2 - 3 _ATTN1 - 4 _ATTN2 - 5 - 6 - 7 - - */ - break; - } - break; - - case 1: - m_ace1->ins8250_w(space, offset & 0x07, data); - break; - - case 2: - m_ace2->ins8250_w(space, offset & 0x07, data); - break; - - case 3: - m_ace3->ins8250_w(space, offset & 0x07, data); - break; - } - } -} diff --git a/src/emu/bus/s100/wunderbus.h b/src/emu/bus/s100/wunderbus.h deleted file mode 100644 index 9b51f9afaee..00000000000 --- a/src/emu/bus/s100/wunderbus.h +++ /dev/null @@ -1,72 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Morrow Designs Wunderbus I/O card emulation - -**********************************************************************/ - -#pragma once - -#ifndef __S100_WUNDERBUS__ -#define __S100_WUNDERBUS__ - -#include "s100.h" -#include "machine/ins8250.h" -#include "machine/pic8259.h" -#include "machine/upd1990a.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> s100_wunderbus_device - -class s100_wunderbus_device : public device_t, - public device_s100_card_interface -{ -public: - // construction/destruction - s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; - - // not really public - DECLARE_WRITE_LINE_MEMBER( pic_int_w ); - DECLARE_WRITE_LINE_MEMBER( rtc_tp_w ); - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - // device_s100_card_interface overrides - virtual void s100_vi0_w(int state); - virtual void s100_vi1_w(int state); - virtual void s100_vi2_w(int state); - virtual UINT8 s100_sinp_r(address_space &space, offs_t offset); - virtual void s100_sout_w(address_space &space, offs_t offset, UINT8 data); - -private: - required_device<pic8259_device> m_pic; - required_device<ins8250_device> m_ace1; - required_device<ins8250_device> m_ace2; - required_device<ins8250_device> m_ace3; - required_device<upd1990a_device> m_rtc; - required_ioport m_7c; - required_ioport m_10a; - - UINT8 m_group; - int m_rtc_tp; -}; - - -// device type definition -extern const device_type S100_WUNDERBUS; - - -#endif |