mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
(MESS) dmv: added K233 and K234 expansion modules. (nw)
This commit is contained in:
parent
24179c7522
commit
2bf26ae0c2
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -834,6 +834,8 @@ src/emu/bus/dmv/k220.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/k220.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/k230.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/k230.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/k233.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/k233.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/k806.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/k806.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/ram.c svneol=native#text/plain
|
||||
|
@ -270,6 +270,7 @@ OBJDIRS += $(BUSOBJ)/dmv
|
||||
BUSOBJS += $(BUSOBJ)/dmv/dmvbus.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k220.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k230.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k233.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k806.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/ram.o
|
||||
endif
|
||||
|
@ -199,7 +199,8 @@ dmvcart_slot_device::dmvcart_slot_device(const machine_config &mconfig, const ch
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_prog_read_cb(*this),
|
||||
m_prog_write_cb(*this),
|
||||
m_out_irq_cb(*this)
|
||||
m_out_irq_cb(*this),
|
||||
m_out_thold_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
@ -224,6 +225,7 @@ void dmvcart_slot_device::device_start()
|
||||
m_prog_read_cb.resolve_safe(0);
|
||||
m_prog_write_cb.resolve_safe();
|
||||
m_out_irq_cb.resolve_safe();
|
||||
m_out_thold_cb.resolve_safe();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
@ -310,6 +312,12 @@ void dmvcart_slot_device::hold_w(int state)
|
||||
m_cart->hold_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::switch16_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->switch16_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq0_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
// slot 7 and 7A
|
||||
virtual bool av16bit() { return false; }
|
||||
virtual void hold_w(int state) { }
|
||||
virtual void switch16_w(int state) { }
|
||||
virtual void irq0_w(int state) { }
|
||||
virtual void irq1_w(int state) { }
|
||||
virtual void irq2_w(int state) { }
|
||||
@ -58,6 +59,7 @@ public:
|
||||
template<class _Object> static devcb_base &set_prog_read_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_prog_read_cb.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_prog_write_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_prog_write_cb.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_out_irq_cb.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_out_thold_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_out_thold_cb.set_callback(object); }
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
@ -70,6 +72,7 @@ public:
|
||||
virtual void io_read(address_space &space, int ifsel, offs_t offset, UINT8 &data);
|
||||
virtual void io_write(address_space &space, int ifsel, offs_t offset, UINT8 data);
|
||||
virtual void hold_w(int state);
|
||||
virtual void switch16_w(int state);
|
||||
virtual void irq0_w(int state);
|
||||
virtual void irq1_w(int state);
|
||||
virtual void irq2_w(int state);
|
||||
@ -84,6 +87,7 @@ public:
|
||||
devcb_read8 m_prog_read_cb;
|
||||
devcb_write8 m_prog_write_cb;
|
||||
devcb_write_line m_out_irq_cb;
|
||||
devcb_write_line m_out_thold_cb;
|
||||
device_dmvslot_interface* m_cart;
|
||||
};
|
||||
|
||||
@ -103,4 +107,7 @@ extern const device_type DMVCART_SLOT;
|
||||
#define MCFG_DMVCART_SLOT_OUT_IRQ_CB(_devcb) \
|
||||
devcb = &dmvcart_slot_device::set_out_irq_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_DMVCART_SLOT_OUT_THOLD_CB(_devcb) \
|
||||
devcb = &dmvcart_slot_device::set_out_thold_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#endif /* __DMV_CART_H__ */
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
K230 Internal 8088 module without interrupt controller
|
||||
K231 External 8088 module without interrupt controller
|
||||
K234 External 68008 module
|
||||
K235 Internal 8088 module with interrupt controller
|
||||
|
||||
***************************************************************************/
|
||||
@ -43,6 +44,11 @@ static ADDRESS_MAP_START(k230_io, AS_IO, 8, dmv_k230_device)
|
||||
AM_RANGE( 0x00, 0xff ) AM_READWRITE(io_r, io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(k234_mem, AS_PROGRAM, 8, dmv_k230_device)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE( 0x00000, 0x7ffff ) AM_READWRITE(program_r, program_w)
|
||||
AM_RANGE( 0xfff00, 0xfffff ) AM_READWRITE(io_r, io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(k235_io, AS_IO, 8, dmv_k230_device)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
@ -52,13 +58,18 @@ static ADDRESS_MAP_START(k235_io, AS_IO, 8, dmv_k230_device)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k230 )
|
||||
MCFG_CPU_ADD("maincpu", I8088, XTAL_24MHz / 6)
|
||||
MCFG_CPU_ADD("maincpu", I8088, XTAL_15MHz / 3)
|
||||
MCFG_CPU_PROGRAM_MAP(k230_mem)
|
||||
MCFG_CPU_IO_MAP(k230_io)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k234 )
|
||||
MCFG_CPU_ADD("maincpu", M68008, XTAL_16MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(k234_mem)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k235 )
|
||||
MCFG_CPU_ADD("maincpu", V20, XTAL_24MHz / 6)
|
||||
MCFG_CPU_ADD("maincpu", V20, XTAL_15MHz / 3)
|
||||
MCFG_CPU_PROGRAM_MAP(k230_mem)
|
||||
MCFG_CPU_IO_MAP(k235_io)
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
|
||||
@ -73,6 +84,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
const device_type DMV_K230 = &device_creator<dmv_k230_device>;
|
||||
const device_type DMV_K231 = &device_creator<dmv_k231_device>;
|
||||
const device_type DMV_K234 = &device_creator<dmv_k234_device>;
|
||||
const device_type DMV_K235 = &device_creator<dmv_k235_device>;
|
||||
|
||||
//**************************************************************************
|
||||
@ -108,6 +120,15 @@ dmv_k231_device::dmv_k231_device(const machine_config &mconfig, const char *tag,
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k234_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k234_device::dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_k230_device(mconfig, DMV_K234, "K234 68008", tag, owner, clock, "dmv_k234", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k235_device - constructor
|
||||
//-------------------------------------------------
|
||||
@ -129,12 +150,26 @@ void dmv_k230_device::device_start()
|
||||
m_io = &machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||
}
|
||||
|
||||
void dmv_k234_device::device_start()
|
||||
{
|
||||
dmv_k230_device::device_start();
|
||||
m_io->install_readwrite_handler(0xd8, 0xdf, 0, 0, read8_delegate(FUNC(dmv_k234_device::snr_r), this), write8_delegate(FUNC(dmv_k234_device::snr_w), this), 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k230_device::device_reset()
|
||||
{
|
||||
m_switch16 = 0;
|
||||
m_hold = 0;
|
||||
}
|
||||
|
||||
void dmv_k234_device::device_reset()
|
||||
{
|
||||
dmv_k230_device::device_reset();
|
||||
m_snr = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -147,6 +182,11 @@ machine_config_constructor dmv_k230_device::device_mconfig_additions() const
|
||||
return MACHINE_CONFIG_NAME( dmv_k230 );
|
||||
}
|
||||
|
||||
machine_config_constructor dmv_k234_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k234 );
|
||||
}
|
||||
|
||||
machine_config_constructor dmv_k235_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k235 );
|
||||
@ -166,6 +206,11 @@ const rom_entry *dmv_k231_device::device_rom_region() const
|
||||
return ROM_NAME( dmv_k231 );
|
||||
}
|
||||
|
||||
const rom_entry *dmv_k234_device::device_rom_region() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const rom_entry *dmv_k235_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k235 );
|
||||
@ -178,7 +223,14 @@ bool dmv_k230_device::av16bit()
|
||||
|
||||
void dmv_k230_device::hold_w(int state)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, state);
|
||||
m_hold = state;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, (m_hold || !m_switch16) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
void dmv_k230_device::switch16_w(int state)
|
||||
{
|
||||
m_switch16 = state;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, (m_hold || !m_switch16) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_k230_device::rom_r)
|
||||
@ -194,14 +246,49 @@ READ8_MEMBER( dmv_k230_device::io_r )
|
||||
WRITE8_MEMBER( dmv_k230_device::io_w )
|
||||
{
|
||||
m_io->write_byte(offset, data);
|
||||
};
|
||||
}
|
||||
|
||||
READ8_MEMBER( dmv_k230_device::program_r )
|
||||
{
|
||||
return m_bus->m_prog_read_cb(space, offset);
|
||||
};
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( dmv_k230_device::program_w )
|
||||
{
|
||||
m_bus->m_prog_write_cb(space, offset, data);
|
||||
};
|
||||
}
|
||||
|
||||
void dmv_k234_device::hold_w(int state)
|
||||
{
|
||||
m_hold = state;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, (m_hold || !m_snr) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
void dmv_k234_device::switch16_w(int state)
|
||||
{
|
||||
if (m_switch16 != state)
|
||||
{
|
||||
m_snr = CLEAR_LINE;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
m_bus->m_out_thold_cb(CLEAR_LINE);
|
||||
m_switch16 = state;
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( dmv_k234_device::snr_r )
|
||||
{
|
||||
m_snr = ASSERT_LINE;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
m_maincpu->reset();
|
||||
m_bus->m_out_thold_cb(ASSERT_LINE);
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( dmv_k234_device::snr_w )
|
||||
{
|
||||
m_snr = ASSERT_LINE;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
m_maincpu->reset();
|
||||
m_bus->m_out_thold_cb(ASSERT_LINE);
|
||||
}
|
||||
|
@ -9,6 +9,9 @@
|
||||
#include "dmvbus.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
|
||||
// K234
|
||||
#include "cpu/m68000/m68000.h"
|
||||
|
||||
// K235
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "machine/pic8259.h"
|
||||
@ -46,13 +49,16 @@ protected:
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual void hold_w(int state);
|
||||
virtual void switch16_w(int state);
|
||||
virtual bool av16bit();
|
||||
|
||||
private:
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_memory_region m_rom;
|
||||
optional_memory_region m_rom;
|
||||
dmvcart_slot_device * m_bus;
|
||||
address_space * m_io;
|
||||
int m_switch16;
|
||||
int m_hold;
|
||||
};
|
||||
|
||||
|
||||
@ -70,6 +76,36 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// ======================> dmv_k234_device
|
||||
|
||||
class dmv_k234_device :
|
||||
public dmv_k230_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_READ8_MEMBER(snr_r);
|
||||
DECLARE_WRITE8_MEMBER(snr_w);
|
||||
|
||||
protected:
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual void hold_w(int state);
|
||||
virtual void switch16_w(int state);
|
||||
|
||||
private:
|
||||
int m_snr;
|
||||
};
|
||||
|
||||
|
||||
// ======================> dmv_k235_device
|
||||
|
||||
class dmv_k235_device :
|
||||
@ -100,6 +136,7 @@ private:
|
||||
// device type definition
|
||||
extern const device_type DMV_K230;
|
||||
extern const device_type DMV_K231;
|
||||
extern const device_type DMV_K234;
|
||||
extern const device_type DMV_K235;
|
||||
|
||||
#endif /* __DMV_K230_H__ */
|
||||
|
89
src/emu/bus/dmv/k233.c
Normal file
89
src/emu/bus/dmv/k233.c
Normal file
@ -0,0 +1,89 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/***************************************************************************
|
||||
|
||||
K233 16K Shared RAM
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "k233.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMV_K233 = &device_creator<dmv_k233_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k233_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k233_device::dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, DMV_K233, "K233 16K Shared RAM", tag, owner, clock, "dmv_k233", __FILE__),
|
||||
device_dmvslot_interface( mconfig, *this )
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k233_device::device_start()
|
||||
{
|
||||
m_ram = machine().memory().region_alloc( "sharedram", 0x4000, 1, ENDIANNESS_LITTLE )->base();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k233_device::device_reset()
|
||||
{
|
||||
m_enabled = false;
|
||||
}
|
||||
|
||||
void dmv_k233_device::io_write(address_space &space, int ifsel, offs_t offset, UINT8 data)
|
||||
{
|
||||
if (ifsel == 1)
|
||||
m_enabled = !m_enabled;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// read
|
||||
//-------------------------------------------------
|
||||
|
||||
bool dmv_k233_device::read(offs_t offset, UINT8 &data)
|
||||
{
|
||||
if (m_enabled && offset >= 0xc000 && offset < 0x10000)
|
||||
{
|
||||
data = m_ram[offset & 0x3fff];
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write
|
||||
//-------------------------------------------------
|
||||
|
||||
bool dmv_k233_device::write(offs_t offset, UINT8 data)
|
||||
{
|
||||
if (m_enabled && offset >= 0xc000 && offset < 0x10000)
|
||||
{
|
||||
m_ram[offset & 0x3fff] = data;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
44
src/emu/bus/dmv/k233.h
Normal file
44
src/emu/bus/dmv/k233.h
Normal file
@ -0,0 +1,44 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
#pragma once
|
||||
|
||||
#ifndef __DMV_K233_H__
|
||||
#define __DMV_K233_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================>
|
||||
|
||||
class dmv_k233_device :
|
||||
public device_t,
|
||||
public device_dmvslot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual void io_write(address_space &space, int ifsel, offs_t offset, UINT8 data);
|
||||
virtual bool read(offs_t offset, UINT8 &data);
|
||||
virtual bool write(offs_t offset, UINT8 data);
|
||||
|
||||
private:
|
||||
bool m_enabled;
|
||||
UINT8 * m_ram;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMV_K233;
|
||||
|
||||
#endif /* __DMV_K233_H__ */
|
@ -24,6 +24,7 @@
|
||||
#include "bus/dmv/dmvbus.h"
|
||||
#include "bus/dmv/k220.h"
|
||||
#include "bus/dmv/k230.h"
|
||||
#include "bus/dmv/k233.h"
|
||||
#include "bus/dmv/k806.h"
|
||||
#include "bus/dmv/ram.h"
|
||||
|
||||
@ -100,6 +101,8 @@ public:
|
||||
DECLARE_READ8_MEMBER(sys_status_r);
|
||||
DECLARE_WRITE8_MEMBER(tc_set_w);
|
||||
DECLARE_WRITE8_MEMBER(switch16_w);
|
||||
DECLARE_READ8_MEMBER(ramsel_r);
|
||||
DECLARE_READ8_MEMBER(romsel_r);
|
||||
DECLARE_WRITE8_MEMBER(ramsel_w);
|
||||
DECLARE_WRITE8_MEMBER(romsel_w);
|
||||
DECLARE_READ8_MEMBER(kb_mcu_port1_r);
|
||||
@ -110,6 +113,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(program_w);
|
||||
DECLARE_READ8_MEMBER(exp_program_r);
|
||||
DECLARE_WRITE8_MEMBER(exp_program_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(thold7_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(busint_w);
|
||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||
|
||||
UINT8 program_read(address_space &space, int cas, offs_t offset);
|
||||
@ -133,6 +138,7 @@ public:
|
||||
|
||||
bool m_ramoutdis;
|
||||
int m_switch16;
|
||||
int m_thold7;
|
||||
int m_dma_hrq;
|
||||
int m_ram_bank;
|
||||
bool m_color_mode;
|
||||
@ -173,6 +179,18 @@ WRITE8_MEMBER(dmv_state::leds_w)
|
||||
output_set_led_value(8-i, BIT(data, i));
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_state::ramsel_r)
|
||||
{
|
||||
m_ramoutdis = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_state::romsel_r)
|
||||
{
|
||||
m_ramoutdis = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::ramsel_w)
|
||||
{
|
||||
m_ramoutdis = false;
|
||||
@ -348,6 +366,21 @@ READ8_MEMBER(dmv_state::program_r)
|
||||
return program_read(space, m_ram_bank, offset);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_state::thold7_w )
|
||||
{
|
||||
if (m_thold7 != state)
|
||||
{
|
||||
m_thold7 = state;
|
||||
update_halt_line();
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_state::busint_w )
|
||||
{
|
||||
m_slot7a->irq2_w(state);
|
||||
m_slot7->irq2_w(state);
|
||||
}
|
||||
|
||||
void dmv_state::program_write(address_space &space, int cas, offs_t offset, UINT8 data)
|
||||
{
|
||||
bool tramd = false;
|
||||
@ -399,8 +432,8 @@ static ADDRESS_MAP_START( dmv_io , AS_IO, 8, dmv_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(leds_w)
|
||||
AM_RANGE(0x10, 0x10) AM_WRITE(ramsel_w)
|
||||
AM_RANGE(0x11, 0x11) AM_WRITE(romsel_w)
|
||||
AM_RANGE(0x10, 0x10) AM_READWRITE(ramsel_r, ramsel_w)
|
||||
AM_RANGE(0x11, 0x11) AM_READWRITE(romsel_r, romsel_w)
|
||||
AM_RANGE(0x12, 0x12) AM_WRITE(tc_set_w)
|
||||
AM_RANGE(0x13, 0x13) AM_READ(sys_status_r)
|
||||
AM_RANGE(0x14, 0x14) AM_WRITE(fdd_motor_w)
|
||||
@ -470,6 +503,7 @@ void dmv_state::machine_reset()
|
||||
m_sd_poll_state = 0;
|
||||
m_floppy_motor = 1;
|
||||
m_switch16 = 0;
|
||||
m_thold7 = 0;
|
||||
m_dma_hrq = 0;
|
||||
|
||||
update_halt_line();
|
||||
@ -477,9 +511,12 @@ void dmv_state::machine_reset()
|
||||
|
||||
void dmv_state::update_halt_line()
|
||||
{
|
||||
m_slot7->hold_w(!m_switch16 || m_dma_hrq ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_slot7a->hold_w(!m_switch16 || m_dma_hrq ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, m_switch16 || m_dma_hrq ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_slot7->hold_w(m_dma_hrq);
|
||||
m_slot7->switch16_w(m_switch16);
|
||||
m_slot7a->hold_w(m_dma_hrq);
|
||||
m_slot7a->switch16_w(m_switch16);
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, (m_thold7 || m_switch16 || m_dma_hrq) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
/* F4 Character Displayer */
|
||||
@ -568,12 +605,14 @@ static SLOT_INTERFACE_START(dmv_slot1)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot2_6)
|
||||
SLOT_INTERFACE("k233", DMV_K233) // K233 16K Shared RAM
|
||||
SLOT_INTERFACE("k806", DMV_K806) // K806 Mouse module
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot7)
|
||||
SLOT_INTERFACE("k220", DMV_K220) // K220 Diagnostic Module
|
||||
SLOT_INTERFACE("k231", DMV_K231) // K231 External 8088 module without interrupt controller
|
||||
SLOT_INTERFACE("k234", DMV_K234) // K234 External 68008 module
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
@ -667,9 +706,13 @@ static MACHINE_CONFIG_START( dmv, dmv_state )
|
||||
MCFG_DEVICE_ADD("slot7", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7, NULL, false)
|
||||
MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, exp_program_r), WRITE8(dmv_state, exp_program_w))
|
||||
MCFG_DMVCART_SLOT_OUT_THOLD_CB(WRITELINE(dmv_state, thold7_w))
|
||||
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, busint_w))
|
||||
MCFG_DEVICE_ADD("slot7a", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7a, "k230", false)
|
||||
MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, exp_program_r), WRITE8(dmv_state, exp_program_w))
|
||||
MCFG_DMVCART_SLOT_OUT_THOLD_CB(WRITELINE(dmv_state, thold7_w))
|
||||
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, busint_w))
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user