mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
dmv: added HD interface. [Sandro Ronco]
This commit is contained in:
parent
3f63e4f466
commit
5d5e0345e0
10
hash/dmv.xml
10
hash/dmv.xml
@ -390,7 +390,7 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="zcom20hd" supported="no"> <!-- MS-DOS --> <!-- missing HDD emulation -->
|
<software name="zcom20hd">
|
||||||
<description>Z-Com v2.0 HD</description>
|
<description>Z-Com v2.0 HD</description>
|
||||||
<year>198?</year>
|
<year>198?</year>
|
||||||
<publisher><unknown></publisher>
|
<publisher><unknown></publisher>
|
||||||
@ -1282,7 +1282,7 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="dos211hd" supported="no"> <!-- MS-DOS --> <!-- missing HDD emulation -->
|
<software name="dos211hd"> <!-- MS-DOS -->
|
||||||
<description>MS-DOS v2.11 HD</description>
|
<description>MS-DOS v2.11 HD</description>
|
||||||
<year>198?</year>
|
<year>198?</year>
|
||||||
<publisher>Microsoft</publisher>
|
<publisher>Microsoft</publisher>
|
||||||
@ -1294,7 +1294,7 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="dos211hda" cloneof="dos211hd" supported="no"> <!-- MS-DOS --> <!-- missing HDD emulation -->
|
<software name="dos211hda" cloneof="dos211hd"> <!-- MS-DOS -->
|
||||||
<description>MS-DOS v2.11 HD (Alt)</description>
|
<description>MS-DOS v2.11 HD (Alt)</description>
|
||||||
<year>198?</year>
|
<year>198?</year>
|
||||||
<publisher>Microsoft</publisher>
|
<publisher>Microsoft</publisher>
|
||||||
@ -1306,7 +1306,7 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="dos211hdb" cloneof="dos211hd" supported="no"> <!-- MS-DOS --> <!-- missing HDD emulation -->
|
<software name="dos211hdb" cloneof="dos211hd"> <!-- MS-DOS -->
|
||||||
<description>MS-DOS v2.11 HD (Alt 2)</description>
|
<description>MS-DOS v2.11 HD (Alt 2)</description>
|
||||||
<year>198?</year>
|
<year>198?</year>
|
||||||
<publisher><unknown></publisher>
|
<publisher><unknown></publisher>
|
||||||
@ -1318,7 +1318,7 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="dos211hdc" cloneof="dos211hd" supported="no"> <!-- MS-DOS --> <!-- missing HDD emulation -->
|
<software name="dos211hdc" cloneof="dos211hd"> <!-- MS-DOS -->
|
||||||
<description>MS-DOS v2.11 HD (Alt 3)</description>
|
<description>MS-DOS v2.11 HD (Alt 3)</description>
|
||||||
<year>198?</year>
|
<year>198?</year>
|
||||||
<publisher><unknown></publisher>
|
<publisher><unknown></publisher>
|
||||||
|
@ -832,6 +832,8 @@ if (BUSES["DMV"]~=null) then
|
|||||||
files {
|
files {
|
||||||
MAME_DIR .. "src/devices/bus/dmv/dmvbus.cpp",
|
MAME_DIR .. "src/devices/bus/dmv/dmvbus.cpp",
|
||||||
MAME_DIR .. "src/devices/bus/dmv/dmvbus.h",
|
MAME_DIR .. "src/devices/bus/dmv/dmvbus.h",
|
||||||
|
MAME_DIR .. "src/devices/bus/dmv/k012.cpp",
|
||||||
|
MAME_DIR .. "src/devices/bus/dmv/k012.h",
|
||||||
MAME_DIR .. "src/devices/bus/dmv/k210.cpp",
|
MAME_DIR .. "src/devices/bus/dmv/k210.cpp",
|
||||||
MAME_DIR .. "src/devices/bus/dmv/k210.h",
|
MAME_DIR .. "src/devices/bus/dmv/k210.h",
|
||||||
MAME_DIR .. "src/devices/bus/dmv/k220.cpp",
|
MAME_DIR .. "src/devices/bus/dmv/k220.cpp",
|
||||||
|
122
src/devices/bus/dmv/k012.cpp
Normal file
122
src/devices/bus/dmv/k012.cpp
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Sandro Ronco
|
||||||
|
// thanks-to:rfka01
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
K012 Internal HD Interface
|
||||||
|
C3282 External HD Interface
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "k012.h"
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
IMPLEMENTATION
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
static INPUT_PORTS_START( dmv_k012 )
|
||||||
|
PORT_START("JUMPERS")
|
||||||
|
PORT_DIPNAME( 0x1f, 0x10, "IFSEL" ) PORT_DIPLOCATION("J:!1,J:!2,J:!3,J:!4,J:!5")
|
||||||
|
PORT_DIPSETTING( 0x01, "0A" )
|
||||||
|
PORT_DIPSETTING( 0x02, "1A" )
|
||||||
|
PORT_DIPSETTING( 0x04, "2A" )
|
||||||
|
PORT_DIPSETTING( 0x08, "3A" )
|
||||||
|
PORT_DIPSETTING( 0x10, "4A" ) // default
|
||||||
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// GLOBAL VARIABLES
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(DMV_K012, dmv_k012_device, "dmv_k012", "K012 Internal HD Interface")
|
||||||
|
DEFINE_DEVICE_TYPE(DMV_C3282, dmv_c3282_device, "dmv_c3282", "C3282 External HD Interface")
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// dmv_k012_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
dmv_k012_device::dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: dmv_k012_device(mconfig, DMV_K012, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
dmv_k012_device::dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: device_t(mconfig, type, tag, owner, clock)
|
||||||
|
, device_dmvslot_interface( mconfig, *this )
|
||||||
|
, m_hdc(*this, "hdc")
|
||||||
|
, m_bus(*this, DEVICE_SELF_OWNER)
|
||||||
|
, m_jumpers(*this, "JUMPERS")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// dmv_c3282_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
dmv_c3282_device::dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: dmv_k012_device(mconfig, DMV_C3282, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void dmv_k012_device::device_start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_reset - device-specific reset
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void dmv_k012_device::device_reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// input_ports - device-specific input ports
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
ioport_constructor dmv_k012_device::device_input_ports() const
|
||||||
|
{
|
||||||
|
return INPUT_PORTS_NAME( dmv_k012 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_add_mconfig - add device configuration
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void dmv_k012_device::device_add_mconfig(machine_config &config)
|
||||||
|
{
|
||||||
|
WD1000(config, m_hdc, 20_MHz_XTAL / 4); // WD1010
|
||||||
|
m_hdc->intrq_wr_callback().set(FUNC(dmv_k012_device::hdc_intrq_w));
|
||||||
|
|
||||||
|
// default drive is 10MB (306,4,17)
|
||||||
|
HARDDISK(config, "hdc:0", 0);
|
||||||
|
HARDDISK(config, "hdc:1", 0);
|
||||||
|
HARDDISK(config, "hdc:2", 0);
|
||||||
|
HARDDISK(config, "hdc:3", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dmv_k012_device::io_read(int ifsel, offs_t offset, uint8_t &data)
|
||||||
|
{
|
||||||
|
if ((1 << ifsel) == m_jumpers->read() && !(offset & 0x08))
|
||||||
|
data = m_hdc->read(machine().dummy_space(), offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dmv_k012_device::io_write(int ifsel, offs_t offset, uint8_t data)
|
||||||
|
{
|
||||||
|
if ((1 << ifsel) == m_jumpers->read() && !(offset & 0x08))
|
||||||
|
m_hdc->write(machine().dummy_space(), offset, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE_LINE_MEMBER(dmv_k012_device::hdc_intrq_w)
|
||||||
|
{
|
||||||
|
m_bus->m_out_irq_cb(state);
|
||||||
|
}
|
65
src/devices/bus/dmv/k012.h
Normal file
65
src/devices/bus/dmv/k012.h
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Sandro Ronco
|
||||||
|
// thanks-to:rfka01
|
||||||
|
#ifndef MAME_BUS_DMV_K012_H
|
||||||
|
#define MAME_BUS_DMV_K012_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "dmvbus.h"
|
||||||
|
#include "machine/wd1000.h"
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// TYPE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
// ======================> dmv_k012_device
|
||||||
|
|
||||||
|
class dmv_k012_device :
|
||||||
|
public device_t,
|
||||||
|
public device_dmvslot_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
// device-level overrides
|
||||||
|
virtual void device_start() override;
|
||||||
|
virtual void device_reset() override;
|
||||||
|
|
||||||
|
// optional information overrides
|
||||||
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
|
virtual ioport_constructor device_input_ports() const override;
|
||||||
|
|
||||||
|
// dmvcart_interface overrides
|
||||||
|
virtual void io_read(int ifsel, offs_t offset, uint8_t &data) override;
|
||||||
|
virtual void io_write(int ifsel, offs_t offset, uint8_t data) override;
|
||||||
|
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(hdc_intrq_w);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_device<wd1000_device> m_hdc;
|
||||||
|
required_device<dmvcart_slot_device> m_bus;
|
||||||
|
required_ioport m_jumpers;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ======================> dmv_c3282_device
|
||||||
|
|
||||||
|
class dmv_c3282_device :
|
||||||
|
public dmv_k012_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
DECLARE_DEVICE_TYPE(DMV_K012, dmv_k012_device)
|
||||||
|
DECLARE_DEVICE_TYPE(DMV_C3282, dmv_c3282_device)
|
||||||
|
|
||||||
|
#endif // MAME_BUS_DMV_K012_H
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
// expansion slots
|
// expansion slots
|
||||||
#include "bus/dmv/dmvbus.h"
|
#include "bus/dmv/dmvbus.h"
|
||||||
|
#include "bus/dmv/k012.h"
|
||||||
#include "bus/dmv/k210.h"
|
#include "bus/dmv/k210.h"
|
||||||
#include "bus/dmv/k220.h"
|
#include "bus/dmv/k220.h"
|
||||||
#include "bus/dmv/k230.h"
|
#include "bus/dmv/k230.h"
|
||||||
@ -258,8 +259,8 @@ WRITE8_MEMBER(dmv_state::fdd_motor_w)
|
|||||||
m_pit->write_gate0(0);
|
m_pit->write_gate0(0);
|
||||||
|
|
||||||
m_floppy_motor = 0;
|
m_floppy_motor = 0;
|
||||||
m_floppy0->get_device()->mon_w(m_floppy_motor);
|
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(m_floppy_motor);
|
||||||
m_floppy1->get_device()->mon_w(m_floppy_motor);
|
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(m_floppy_motor);
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_MEMBER(dmv_state::sys_status_r)
|
READ8_MEMBER(dmv_state::sys_status_r)
|
||||||
@ -284,7 +285,7 @@ READ8_MEMBER(dmv_state::sys_status_r)
|
|||||||
if (!(m_slot7->av16bit() || m_slot7a->av16bit()))
|
if (!(m_slot7->av16bit() || m_slot7a->av16bit()))
|
||||||
data |= 0x02;
|
data |= 0x02;
|
||||||
|
|
||||||
if (!m_floppy0->get_device()->ready_r())
|
if (m_floppy0->get_device() && !m_floppy0->get_device()->ready_r())
|
||||||
data |= 0x04;
|
data |= 0x04;
|
||||||
|
|
||||||
if (m_fdc->get_irq())
|
if (m_fdc->get_irq())
|
||||||
@ -617,7 +618,7 @@ void dmv_state::upd7220_map(address_map &map)
|
|||||||
/* Input ports */
|
/* Input ports */
|
||||||
INPUT_PORTS_START( dmv )
|
INPUT_PORTS_START( dmv )
|
||||||
PORT_START("CONFIG")
|
PORT_START("CONFIG")
|
||||||
PORT_CONFNAME( 0x01, 0x00, "Video Board" )
|
PORT_CONFNAME( 0x01, 0x01, "Video Board" )
|
||||||
PORT_CONFSETTING( 0x00, "Monochrome" )
|
PORT_CONFSETTING( 0x00, "Monochrome" )
|
||||||
PORT_CONFSETTING( 0x01, "Color" )
|
PORT_CONFSETTING( 0x01, "Color" )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
@ -709,8 +710,8 @@ WRITE_LINE_MEMBER( dmv_state::pit_out0 )
|
|||||||
if (!state)
|
if (!state)
|
||||||
{
|
{
|
||||||
m_floppy_motor = 1;
|
m_floppy_motor = 1;
|
||||||
m_floppy0->get_device()->mon_w(m_floppy_motor);
|
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(m_floppy_motor);
|
||||||
m_floppy1->get_device()->mon_w(m_floppy_motor);
|
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(m_floppy_motor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,6 +753,7 @@ static void dmv_slot2_6(device_slot_interface &device)
|
|||||||
device.option_add("k801", DMV_K801); // K801 RS-232 Switchable Interface
|
device.option_add("k801", DMV_K801); // K801 RS-232 Switchable Interface
|
||||||
device.option_add("k803", DMV_K803); // K803 RTC module
|
device.option_add("k803", DMV_K803); // K803 RTC module
|
||||||
device.option_add("k806", DMV_K806); // K806 Mouse module
|
device.option_add("k806", DMV_K806); // K806 Mouse module
|
||||||
|
device.option_add("c3282", DMV_C3282); // C3282 External HD Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dmv_slot7(device_slot_interface &device)
|
static void dmv_slot7(device_slot_interface &device)
|
||||||
@ -764,7 +766,7 @@ static void dmv_slot7(device_slot_interface &device)
|
|||||||
|
|
||||||
static void dmv_slot2a(device_slot_interface &device)
|
static void dmv_slot2a(device_slot_interface &device)
|
||||||
{
|
{
|
||||||
|
device.option_add("k012", DMV_K012); // K012 Internal HD Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dmv_slot7a(device_slot_interface &device)
|
static void dmv_slot7a(device_slot_interface &device)
|
||||||
|
Loading…
Reference in New Issue
Block a user