mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
(MESS) dmv: added expansions slot interface. [rfka01, Sandro Ronco]
(MESS) dmv: added boot ROMs from 4 different boards. [rfka01]
This commit is contained in:
parent
8bdfa2ed04
commit
3655dc8ec8
14
.gitattributes
vendored
14
.gitattributes
vendored
@ -797,6 +797,18 @@ src/emu/bus/cpc/mface2.c svneol=native#text/plain
|
||||
src/emu/bus/cpc/mface2.h svneol=native#text/plain
|
||||
src/emu/bus/cpc/symbfac2.c svneol=native#text/plain
|
||||
src/emu/bus/cpc/symbfac2.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/dmv_dsk.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/dmv_dsk.h svneol=native#text/plain
|
||||
src/emu/bus/dmv/dmvbus.c svneol=native#text/plain
|
||||
src/emu/bus/dmv/dmvbus.h svneol=native#text/plain
|
||||
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/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
|
||||
src/emu/bus/dmv/ram.h svneol=native#text/plain
|
||||
src/emu/bus/ecbbus/ecbbus.c svneol=native#text/plain
|
||||
src/emu/bus/ecbbus/ecbbus.h svneol=native#text/plain
|
||||
src/emu/bus/ecbbus/grip.c svneol=native#text/plain
|
||||
@ -3665,6 +3677,8 @@ src/lib/formats/dfi_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/dfi_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/dim_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/dim_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/dmv_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/dmv_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/dsk_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/dsk_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/ep64_dsk.c svneol=native#text/plain
|
||||
|
@ -231,6 +231,21 @@ BUSOBJS += $(BUSOBJ)/coleco/std.o
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/dmv/dmv.h,BUSES += DMV
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter DMV,$(BUSES)),)
|
||||
OBJDIRS += $(BUSOBJ)/dmv
|
||||
BUSOBJS += $(BUSOBJ)/dmv/dmvbus.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k220.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k230.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/k806.o
|
||||
BUSOBJS += $(BUSOBJ)/dmv/ram.o
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/ecbbus/ecbbus.h,BUSES += ECBBUS
|
||||
|
54
src/emu/bus/dmv/dmv_dsk.c
Normal file
54
src/emu/bus/dmv/dmv_dsk.c
Normal file
@ -0,0 +1,54 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
/*********************************************************************
|
||||
|
||||
formats/dmv_dsk.c
|
||||
|
||||
NCR Decision Mate V format
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "formats/dmv_dsk.h"
|
||||
|
||||
dmv_format::dmv_format() : upd765_format(formats)
|
||||
{
|
||||
}
|
||||
|
||||
const char *dmv_format::name() const
|
||||
{
|
||||
return "dmv";
|
||||
}
|
||||
|
||||
const char *dmv_format::description() const
|
||||
{
|
||||
return "Decision Mate V disk image";
|
||||
}
|
||||
|
||||
const char *dmv_format::extensions() const
|
||||
{
|
||||
return "img";
|
||||
}
|
||||
|
||||
// gap size from hardware reference manual
|
||||
const dmv_format::format dmv_format::formats[] = {
|
||||
{
|
||||
floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
|
||||
2000,
|
||||
9, 40, 2,
|
||||
512, {},
|
||||
1, {},
|
||||
80, 50, 22, 80
|
||||
},
|
||||
{
|
||||
floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
|
||||
2000,
|
||||
8, 40, 2,
|
||||
512, {},
|
||||
1, {},
|
||||
80, 50, 22, 80
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
const floppy_format_type FLOPPY_DMV_FORMAT = &floppy_image_format_creator<dmv_format>;
|
28
src/emu/bus/dmv/dmv_dsk.h
Normal file
28
src/emu/bus/dmv/dmv_dsk.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*********************************************************************
|
||||
|
||||
formats/dmv_dsk.h
|
||||
|
||||
NCR Decision Mate V format
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef DMV_DSK_H_
|
||||
#define DMV_DSK_H_
|
||||
|
||||
#include "upd765_dsk.h"
|
||||
|
||||
class dmv_format : public upd765_format {
|
||||
public:
|
||||
dmv_format();
|
||||
|
||||
virtual const char *name() const;
|
||||
virtual const char *description() const;
|
||||
virtual const char *extensions() const;
|
||||
|
||||
private:
|
||||
static const format formats[];
|
||||
};
|
||||
|
||||
extern const floppy_format_type FLOPPY_DMV_FORMAT;
|
||||
|
||||
#endif /* DMV_DSK_H_ */
|
359
src/emu/bus/dmv/dmvbus.c
Normal file
359
src/emu/bus/dmv/dmvbus.c
Normal file
@ -0,0 +1,359 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/*********************************************************************
|
||||
|
||||
NCR Decision mate slot bus and module emulation
|
||||
|
||||
From the NCR System Technical manual:
|
||||
|
||||
"The lower part of the controller board contains the I/0 bus together with
|
||||
seven user-accessible connectors. These connectors are identified on the board
|
||||
as J1 through J7 (reading from left to right), and correspond to the seven slots
|
||||
(numbers 1 through 7) at the rear of the cabinet.
|
||||
Position J1 is reserved for the connection of any one of the memory expansion modules
|
||||
(K200, K202, K208).
|
||||
Position J7 is reserved for the connection of either the diagnostic module (K220),
|
||||
or the customer-installable 16-bit processor module (K231).
|
||||
Positions J2 through J6 are the general purpose slots for the connection of the peripheral
|
||||
adapter and other interfaces to the computer. These five positions are identical, and Figure 2.2
|
||||
defines the type of connector, while the pin assignments are shown in Figure 2.3."
|
||||
|
||||
Pinout (/ indicates an inverted signal, ie, one that would have a bar over it
|
||||
on a schematic diagram)
|
||||
|
||||
a c
|
||||
|-------------------------|
|
||||
|+5V 1 +5 V |
|
||||
| |
|
||||
| 2 +12 V |
|
||||
| |
|
||||
System Reset Output, act. low |RESET/ 3 RESET IN/| active low, general system RESET
|
||||
| |
|
||||
I/O Write |IOW/ 4 IOR/ | I/O read R/W lines are Processor control lines
|
||||
| |
|
||||
Memory Write |MEMW/ 5 MEMR/ | Memory read active low, Tri-State possible
|
||||
| |
|
||||
BD0-BD7: Switch by IFSEL |BD1 6 BDO | BD0 - BD7: Data-Bus lines (8 bit)
|
||||
(I/O-Read). Normal Output. | | bidirectional, active high
|
||||
|BD3 7 BD2 |
|
||||
| |
|
||||
Direction can be changed |BD5 8 BD4 | Bus-Driver to peripheral Bus (LS245)
|
||||
by DIR/ signal. | | automatic detection
|
||||
|BD7 9 BD6 |
|
||||
| |
|
||||
Ready Signal from the |READY DMA 10 ABTRI / | Address Bus Tri-State, active low signal
|
||||
mem. contr. (XACK), act. hi. | |
|
||||
End of Process-EOP signals that|EOP/ 11 | cf. 8234A-6 spec.
|
||||
DMA service has been completed | |
|
||||
|INTACK/ 12 IFSEL 4/ |
|
||||
| |
|
||||
Change peripheral from board |AUTO/ 13 DIR/ | Direction of the databus driver. Low signal
|
||||
type 1 to 2.NC on type 1 | | change to input.
|
||||
Test Hold. External request |THOLD/ 14 HLDA | Hold Acknowledge. A response from the Z80
|
||||
to set the Z80 in hold state. | | The Z80 CPU is in hold state, active high.
|
||||
Processor-Clock: inverse signal|PCLK/ 15 CLK1 | Clock Output 1 MHz
|
||||
of the CPU clock, freq. 4MHz | |
|
||||
Logic Ground |LGRD 16 TRAMD/ | Test RAM-Disable. For ext. ROM or RAM expansion.
|
||||
| | Switching with the System RAM, RAM output disabled. act. low
|
||||
|BA19 17 BA18 | BA0-BA19: Buffered 20bit Address Bus
|
||||
| |
|
||||
|BA17 18 BA16 |
|
||||
| |
|
||||
|BA15 19 BA14 | Range to 1MB Normal output, active high
|
||||
| |
|
||||
|BA13 20 BA12 |
|
||||
| |
|
||||
|BA11 21 BA10 | Tri-State possible with ABTRI/ signal
|
||||
| |
|
||||
|BA9 22 BA8 |
|
||||
| |
|
||||
|BA7 23 BA6 |
|
||||
| |
|
||||
|BA5 24 BA4 |
|
||||
| |
|
||||
|BA3 25 BA2 |
|
||||
| |
|
||||
|BA1 26 BAO |
|
||||
| |
|
||||
IFSEL 0-4, active low |IFSEL3/ 27 IFSEL2/ | The select of the I/O pprts in the peripherals is made
|
||||
The interface does not need | | by any IFSEL and BA3 (BA3/). (10 peripherals). Automatic
|
||||
own address decoder |IFSEL1/ 28 IFSELO/ | change of the data bus direction. This change is not possible
|
||||
| | while a dma function is performed
|
||||
DRQ0-DRQ1: DMA Request for |DRQ1 29 DRQ0 | Asynchr. channel requests are used by peripherals
|
||||
resp. channels, act. high | | to request DMA service
|
||||
DACK0-DACK1: |DACK1 / 30 DACK0/ | DMA-Acknowledge Channels 0 and 1, active low
|
||||
| | These lines indicate an active DMA channel
|
||||
|WAIT/ 31 INT/ |
|
||||
| |
|
||||
Logic Ground |LGRD 32 LGRD | Logic Ground
|
||||
|-------------------------|
|
||||
|
||||
Two additional plug/socket connections are possible on the bus. These are made on the solder side of the controller board
|
||||
and are designated J2A and J7 A. These connectors are not considered to be user accessible , rather for factory use ,
|
||||
or for use by field engineers and system integrators. Normally, these two connectors are used for:
|
||||
??? J2A - The connection of the fixed disk interface board, or a custom design board.
|
||||
??? J7A - The connection of the 16-bit processor board (factory option and kit K230).
|
||||
|
||||
The processor and diagnostics module for Slots J7 and J7A have the following additional signals in addition to the ones present on Slots J2-J6.
|
||||
Note that the middle row of the connector (row "b") carries some signals too:
|
||||
|
||||
A2 - OPT 2
|
||||
Signals A19-A26 and C19-C26 are called e.g. A7 instead of BA7 in the processor module schematic (fig. 2.14, page 2.21 System Technical Manual Hardware)
|
||||
Signals A6-A9 and C6-D9 are called e.g. D4 instead of BD4 in the processor module schematic
|
||||
B10 - READYP
|
||||
B11 - HOLD
|
||||
B12 - SWITCH 16/
|
||||
B13 - HLDA 16
|
||||
B14 - 16 BITAV
|
||||
B15 - STDMARQ
|
||||
B16 - LGRD
|
||||
B17 - 16 BITSET/
|
||||
B20 - MEMRQ/
|
||||
B32 - LGRD
|
||||
|
||||
The memory modules on J1 share the same physical connector with the other expansion modules, but carry different signals:
|
||||
|
||||
A1 - +5V C1 - +5V
|
||||
A2 C2
|
||||
A3 - AOUT7 C3
|
||||
A4 - AOUT6 C4 - AOUT5
|
||||
A5 - AOUT4 C5 - AOUT3
|
||||
A6 C6
|
||||
A7 C7
|
||||
A8 C8
|
||||
A9 C9
|
||||
A10 C10 - AOUT2
|
||||
A11 C11 - AOUT1
|
||||
A12 - OD0 C12 - AOUT0
|
||||
A13 - OD1 C13 - OD2
|
||||
A14 - OD3 C14
|
||||
A15 C15
|
||||
A16 - LGRD C16 - LGRD
|
||||
A17 C17
|
||||
A18 C18
|
||||
A19 - ID0 C19
|
||||
A20 - ID1 C20
|
||||
A21 - ID2 C21
|
||||
A22 - ID3 C22
|
||||
A23 - ID4 C23 - CAS7/
|
||||
A24 - ID5 C24 - CAS6/
|
||||
A25 - ID6 C25 - CAS5/
|
||||
A26 - ID7 C26 - CAS4/
|
||||
A27 - CAS2/ C27 - CAS1/
|
||||
A28 - CAS3/ C28
|
||||
A29 - OD4 C29 - OD5
|
||||
A30 - RAS/ C30 - WE/
|
||||
A31 - OD6 C31 - OD7
|
||||
A32 - LGRD C32 - LGRD
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
PARAMETERS
|
||||
***************************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMVCART_SLOT = &device_creator<dmvcart_slot_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// DMV cartridge interface
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_dmvslot_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_dmvslot_interface::device_dmvslot_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_dmvslot_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_dmvslot_interface::~device_dmvslot_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmvcart_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
dmvcart_slot_device::dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, DMVCART_SLOT, "Decision Mate V cartridge slot", tag, owner, clock, "dmvcart_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_prog_read_cb(*this),
|
||||
m_prog_write_cb(*this),
|
||||
m_out_irq_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmvcart_slot_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmvcart_slot_device::~dmvcart_slot_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmvcart_slot_device::device_start()
|
||||
{
|
||||
m_cart = dynamic_cast<device_dmvslot_interface *>(get_card_device());
|
||||
|
||||
// resolve callbacks
|
||||
m_prog_read_cb.resolve_safe(0);
|
||||
m_prog_write_cb.resolve_safe();
|
||||
m_out_irq_cb.resolve_safe();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
read
|
||||
-------------------------------------------------*/
|
||||
|
||||
bool dmvcart_slot_device::read(offs_t offset, UINT8 &data)
|
||||
{
|
||||
if (m_cart)
|
||||
return m_cart->read(offset, data);
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
write
|
||||
-------------------------------------------------*/
|
||||
|
||||
bool dmvcart_slot_device::write(offs_t offset, UINT8 data)
|
||||
{
|
||||
if (m_cart)
|
||||
return m_cart->write(offset, data);
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
read
|
||||
-------------------------------------------------*/
|
||||
|
||||
void dmvcart_slot_device::ram_read(UINT8 cas, offs_t offset, UINT8 &data)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->ram_read(cas, offset, data);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
write
|
||||
-------------------------------------------------*/
|
||||
|
||||
void dmvcart_slot_device::ram_write(UINT8 cas, offs_t offset, UINT8 data)
|
||||
{
|
||||
if (m_cart)
|
||||
return m_cart->ram_write(cas, offset, data);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
IO read
|
||||
-------------------------------------------------*/
|
||||
|
||||
void dmvcart_slot_device::io_read(address_space &space, int ifsel, offs_t offset, UINT8 &data)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->io_read(space, ifsel, offset, data);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
IO write
|
||||
-------------------------------------------------*/
|
||||
|
||||
void dmvcart_slot_device::io_write(address_space &space, int ifsel, offs_t offset, UINT8 data)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->io_write(space, ifsel, offset, data);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
av16bit
|
||||
-------------------------------------------------*/
|
||||
|
||||
bool dmvcart_slot_device::av16bit()
|
||||
{
|
||||
if (m_cart)
|
||||
return m_cart->av16bit();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
hold_w
|
||||
-------------------------------------------------*/
|
||||
|
||||
void dmvcart_slot_device::hold_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->hold_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq0_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq0_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq1_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq1_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq2_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq2_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq3_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq3_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq4_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq4_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq5_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq5_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq6_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq6_w(state);
|
||||
}
|
||||
|
||||
void dmvcart_slot_device::irq7_w(int state)
|
||||
{
|
||||
if (m_cart)
|
||||
m_cart->irq7_w(state);
|
||||
}
|
106
src/emu/bus/dmv/dmvbus.h
Normal file
106
src/emu/bus/dmv/dmvbus.h
Normal file
@ -0,0 +1,106 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/*********************************************************************
|
||||
|
||||
Decision Mate V expansion slot
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef __DMV_CART_H__
|
||||
#define __DMV_CART_H__
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
// ======================> device_dmvslot_interface
|
||||
|
||||
class device_dmvslot_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_dmvslot_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_dmvslot_interface();
|
||||
|
||||
virtual bool read(offs_t offset, UINT8 &data) { return false; }
|
||||
virtual bool write(offs_t offset, UINT8 data) { return false; }
|
||||
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) { }
|
||||
|
||||
// slot 1
|
||||
virtual void ram_read(UINT8 cas, offs_t offset, UINT8 &data) { }
|
||||
virtual void ram_write(UINT8 cas, offs_t offset, UINT8 data) { }
|
||||
|
||||
// slot 7 and 7A
|
||||
virtual bool av16bit() { return false; }
|
||||
virtual void hold_w(int state) { }
|
||||
virtual void irq0_w(int state) { }
|
||||
virtual void irq1_w(int state) { }
|
||||
virtual void irq2_w(int state) { }
|
||||
virtual void irq3_w(int state) { }
|
||||
virtual void irq4_w(int state) { }
|
||||
virtual void irq5_w(int state) { }
|
||||
virtual void irq6_w(int state) { }
|
||||
virtual void irq7_w(int state) { }
|
||||
};
|
||||
|
||||
|
||||
// ======================> dmvcart_slot_device
|
||||
|
||||
class dmvcart_slot_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~dmvcart_slot_device();
|
||||
|
||||
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); }
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
// reading and writing
|
||||
virtual bool read(offs_t offset, UINT8 &data);
|
||||
virtual bool write(offs_t offset, UINT8 data);
|
||||
virtual void ram_read(UINT8 cas, offs_t offset, UINT8 &data);
|
||||
virtual void ram_write(UINT8 cas, offs_t offset, UINT8 data);
|
||||
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 irq0_w(int state);
|
||||
virtual void irq1_w(int state);
|
||||
virtual void irq2_w(int state);
|
||||
virtual void irq3_w(int state);
|
||||
virtual void irq4_w(int state);
|
||||
virtual void irq5_w(int state);
|
||||
virtual void irq6_w(int state);
|
||||
virtual void irq7_w(int state);
|
||||
virtual bool av16bit();
|
||||
|
||||
// internal state
|
||||
devcb_read8 m_prog_read_cb;
|
||||
devcb_write8 m_prog_write_cb;
|
||||
devcb_write_line m_out_irq_cb;
|
||||
device_dmvslot_interface* m_cart;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMVCART_SLOT;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE CONFIGURATION MACROS
|
||||
***************************************************************************/
|
||||
|
||||
#define MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(_read_devcb, _write_devcb) \
|
||||
devcb = &dmvcart_slot_device::set_prog_read_callback(*device, DEVCB_##_read_devcb); \
|
||||
devcb = &dmvcart_slot_device::set_prog_write_callback(*device, DEVCB_##_write_devcb);
|
||||
|
||||
#define MCFG_DMVCART_SLOT_OUT_IRQ_CB(_devcb) \
|
||||
devcb = &dmvcart_slot_device::set_out_irq_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#endif /* __DMV_CART_H__ */
|
270
src/emu/bus/dmv/k220.c
Normal file
270
src/emu/bus/dmv/k220.c
Normal file
@ -0,0 +1,270 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/***************************************************************************
|
||||
|
||||
NCR DMV K220 Diagnostic module
|
||||
|
||||
to be inserted into slot 7 only
|
||||
|
||||
all semiconductors shown:
|
||||
|
||||
|-----------------------------------------------------------------------|
|
||||
| |
|
||||
| S S NEC D8255AC-5 |
|
||||
| PB1 E E |
|
||||
| X1 G G |
|
||||
| 1 2 SN84LS247N ROM1 |
|
||||
| LED1 |
|
||||
| LED2 SW1 SN74LS247N C |
|
||||
| LED3 TCA965 SW2 N |
|
||||
| 8302 SW3 PROM1 ROM2 1 |
|
||||
| LED4 SW4 |
|
||||
| LED5 TCA965 SW5 |
|
||||
| LED6 8240 SW6 |
|
||||
| SW7 M5L8253P-5 RAM |
|
||||
| LED7 SW8 |
|
||||
| LED8 SN7407N |
|
||||
| LED9 |
|
||||
| |
|
||||
| SN74LS14N DM74LS05N DM74LS00M DM74LS04N |
|
||||
|-----------------------------------------------------------------------|
|
||||
|
||||
PB1: Push Button
|
||||
X1: Crystal 24 MHz
|
||||
LED 1: red, 5V>
|
||||
LED 2: green, 5V-
|
||||
LED 3: red, 5V<
|
||||
LED 4: red, 12V>
|
||||
LED 5: green, 12V-
|
||||
LED 6: red, 12V<
|
||||
LED 7: green, PCLK/
|
||||
LED 8: green, MEMR/
|
||||
LED 9: green, HLDA
|
||||
SEG 1&2 Seven segment displays
|
||||
SW1-8 Switches marked top=>bottom Off / Start, S Run / Loop, M Mes / D Mes, CRT / LED, SEL 1, SEL 2, SEL 3, SEL 4
|
||||
PROM 1: TBP24S10N marked 32084
|
||||
ROM 1: MBM2764-30 marked 32564
|
||||
ROM 2: M5L2764K marked 32563
|
||||
RAM: HM6116LP-3
|
||||
|
||||
Inserting the diagnostics module into Slot 7 changes the DMV's memory map:
|
||||
|
||||
The diagnostics ROM is inserted between 0x2000 and 0x3FFF, the diagnostics RAM between 0xF000 and 0xF7FF with the diagnostics stack at 0xF700
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "k220.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( dmv_k220 )
|
||||
ROM_REGION(0x4000, "rom", 0)
|
||||
ROM_LOAD( "ncr_32563_diagnostics_rom.bin", 0x0000, 0x2000, CRC(57445768) SHA1(59b615437444789bf10ba6768cd3c43a69c7ed7b))
|
||||
ROM_LOAD( "ncr_32564_diagnostics_rom.bin", 0x2000, 0x2000, CRC(172e0c60) SHA1(eedae538636009a5b86fc78e50a03c72eeb0e73b))
|
||||
|
||||
ROM_REGION(0x0080, "prom", 0)
|
||||
ROM_LOAD( "u11.bin", 0x0000, 0x0080, NO_DUMP) // used for address decoding
|
||||
|
||||
ROM_REGION(0x0800, "ram", ROMREGION_ERASE)
|
||||
ROM_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k220 )
|
||||
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
|
||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(dmv_k220_device, porta_w))
|
||||
MCFG_I8255_IN_PORTB_CB(IOPORT("SWITCH"))
|
||||
MCFG_I8255_OUT_PORTC_CB(WRITE8(dmv_k220_device, portc_w))
|
||||
|
||||
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(XTAL_1MHz) // CLK1
|
||||
MCFG_PIT8253_OUT0_HANDLER(WRITELINE(dmv_k220_device, write_out0))
|
||||
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(dmv_k220_device, write_out1))
|
||||
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(dmv_k220_device, write_out2))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static INPUT_PORTS_START( dmv_k220 )
|
||||
PORT_START("SWITCH")
|
||||
PORT_DIPNAME( 0x01, 0x00, "Select 1" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x02, 0x00, "Select 2" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x04, 0x00, "Select 3" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x08, 0x00, "Select 4" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Maintenance" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Detail Message" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Continous Run" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR(On) )
|
||||
PORT_DIPNAME( 0x80, 0x80, "Diagnostic module" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR(On) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMV_K220 = &device_creator<dmv_k220_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k220_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k220_device::dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, DMV_K220, "K220 diagnostic", tag, owner, clock, "dmv_k220", __FILE__),
|
||||
device_dmvslot_interface( mconfig, *this ),
|
||||
m_pit(*this, "pit8253"),
|
||||
m_ppi(*this, "ppi8255"),
|
||||
m_ram(*this, "ram"),
|
||||
m_rom(*this, "rom")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k220_device::device_start()
|
||||
{
|
||||
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||
space.install_readwrite_handler(0x08, 0x0b, 0, 0, read8_delegate(FUNC(pit8253_device::read), &(*m_pit)), write8_delegate(FUNC(pit8253_device::write), &(*m_pit)), 0);
|
||||
space.install_readwrite_handler(0x0c, 0x0f, 0, 0, read8_delegate(FUNC(i8255_device::read), &(*m_ppi)), write8_delegate(FUNC(i8255_device::write), &(*m_ppi)), 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k220_device::device_reset()
|
||||
{
|
||||
// active the correct layout
|
||||
machine().render().first_target()->set_view(1);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor dmv_k220_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k220 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor dmv_k220_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( dmv_k220 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_rom_region
|
||||
//-------------------------------------------------
|
||||
|
||||
const rom_entry *dmv_k220_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k220 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// read
|
||||
//-------------------------------------------------
|
||||
|
||||
bool dmv_k220_device::read(offs_t offset, UINT8 &data)
|
||||
{
|
||||
if ((m_portc & 0x01) && offset >= 0x2000 && offset < 0x6000)
|
||||
{
|
||||
data = m_rom->base()[offset - 0x2000];
|
||||
return true;
|
||||
}
|
||||
else if ((m_portc & 0x02) && offset >= 0xf000 && offset < 0xf800)
|
||||
{
|
||||
data = m_ram->base()[offset];
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write
|
||||
//-------------------------------------------------
|
||||
|
||||
bool dmv_k220_device::write(offs_t offset, UINT8 data)
|
||||
{
|
||||
if ((m_portc & 0x01) && offset >= 0x2000 && offset < 0x4000)
|
||||
{
|
||||
logerror("k220: write on ROM %x %x\n", offset, data);
|
||||
return true;
|
||||
}
|
||||
else if ((m_portc & 0x02) && offset >= 0xf000 && offset < 0xf800)
|
||||
{
|
||||
m_ram->base()[offset] = data;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( dmv_k220_device::porta_w )
|
||||
{
|
||||
// 74LS247 BCD-to-Seven-Segment Decoder
|
||||
static UINT8 bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x58, 0x4c, 0x62, 0x69, 0x78, 0x00 };
|
||||
|
||||
output_set_digit_value(0, bcd2hex[(data >> 4) & 0x0f]);
|
||||
output_set_digit_value(1, bcd2hex[data & 0x0f]);
|
||||
};
|
||||
|
||||
|
||||
WRITE8_MEMBER( dmv_k220_device::portc_w )
|
||||
{
|
||||
/*
|
||||
xxxx ---- not connected
|
||||
---- x--- PIT gate 2
|
||||
---- -x-- PIT gate 1
|
||||
---- --x- enable RAM
|
||||
---- ---x enable ROM
|
||||
|
||||
*/
|
||||
m_pit->write_gate1(BIT(data, 2));
|
||||
m_pit->write_gate2(BIT(data, 3));
|
||||
|
||||
m_portc = data;
|
||||
};
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_k220_device::write_out0 )
|
||||
{
|
||||
m_pit->write_clk1(state);
|
||||
m_pit->write_clk2(state);
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_k220_device::write_out1 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_k220_device::write_out2 )
|
||||
{
|
||||
}
|
60
src/emu/bus/dmv/k220.h
Normal file
60
src/emu/bus/dmv/k220.h
Normal file
@ -0,0 +1,60 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
#pragma once
|
||||
|
||||
#ifndef __DMV_K220_H__
|
||||
#define __DMV_K220_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pit8253.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> dmv_k220_device
|
||||
|
||||
class dmv_k220_device :
|
||||
public device_t,
|
||||
public device_dmvslot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k220_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;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(porta_w);
|
||||
DECLARE_WRITE8_MEMBER(portc_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_out0);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_out1);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_out2);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual bool read(offs_t offset, UINT8 &data);
|
||||
virtual bool write(offs_t offset, UINT8 data);
|
||||
|
||||
private:
|
||||
required_device<pit8253_device> m_pit;
|
||||
required_device<i8255_device> m_ppi;
|
||||
required_memory_region m_ram;
|
||||
required_memory_region m_rom;
|
||||
|
||||
UINT8 m_portc;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMV_K220;
|
||||
|
||||
#endif /* __DMV_K220_H__ */
|
207
src/emu/bus/dmv/k230.c
Normal file
207
src/emu/bus/dmv/k230.c
Normal file
@ -0,0 +1,207 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/***************************************************************************
|
||||
|
||||
K230 Internal 8088 module without interrupt controller
|
||||
K231 External 8088 module without interrupt controller
|
||||
K235 Internal 8088 module with interrupt controller
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "k230.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( dmv_k230 )
|
||||
ROM_REGION(0x1000, "rom", 0)
|
||||
ROM_LOAD( "dmv_int_8088_32167.bin", 0x0000, 0x1000, CRC(f4a58880) SHA1(4f50ef25008851ae6f0c670f19d63f4e61249581))
|
||||
ROM_END
|
||||
|
||||
ROM_START( dmv_k231 )
|
||||
ROM_REGION(0x1000, "rom", 0)
|
||||
ROM_LOAD( "dmv_ext_8088_32167.bin", 0x0000, 0x1000, CRC(f4a58880) SHA1(4f50ef25008851ae6f0c670f19d63f4e61249581))
|
||||
ROM_END
|
||||
|
||||
ROM_START( dmv_k235 )
|
||||
ROM_REGION(0x1000, "rom", 0)
|
||||
ROM_LOAD( "dmv_int_8088_pic_33473.bin", 0x0000, 0x1000, CRC(104195dc) SHA1(08d48ca3b84ab26c1a764792e04ec4def7dad2ad))
|
||||
ROM_END
|
||||
|
||||
static ADDRESS_MAP_START(k230_mem, AS_PROGRAM, 8, dmv_k230_device)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE( 0x00000, 0x7ffff ) AM_READWRITE(program_r, program_w)
|
||||
AM_RANGE( 0x80000, 0xfffff ) AM_READ(rom_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(k230_io, AS_IO, 8, dmv_k230_device)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE( 0x00, 0xff ) 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
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE( 0x90, 0x91 ) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
|
||||
AM_RANGE( 0x00, 0xff ) AM_READWRITE(io_r, io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k230 )
|
||||
MCFG_CPU_ADD("maincpu", I8088, XTAL_24MHz / 6)
|
||||
MCFG_CPU_PROGRAM_MAP(k230_mem)
|
||||
MCFG_CPU_IO_MAP(k230_io)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k235 )
|
||||
MCFG_CPU_ADD("maincpu", V20, XTAL_24MHz / 6)
|
||||
MCFG_CPU_PROGRAM_MAP(k230_mem)
|
||||
MCFG_CPU_IO_MAP(k235_io)
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
|
||||
|
||||
MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMV_K230 = &device_creator<dmv_k230_device>;
|
||||
const device_type DMV_K231 = &device_creator<dmv_k231_device>;
|
||||
const device_type DMV_K235 = &device_creator<dmv_k235_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k230_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k230_device::dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, DMV_K230, "K230 8088 without interrupt controller", tag, owner, clock, "dmv_k230", __FILE__),
|
||||
device_dmvslot_interface( mconfig, *this ),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_rom(*this, "rom")
|
||||
{
|
||||
}
|
||||
|
||||
dmv_k230_device::dmv_k230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_dmvslot_interface( mconfig, *this ),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_rom(*this, "rom")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k231_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k231_device::dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_k230_device(mconfig, DMV_K231, "K231 8088 without interrupt controller", tag, owner, clock, "dmv_k231", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k235_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k235_device::dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_k230_device(mconfig, DMV_K235, "K235 8088 with interrupt controller", tag, owner, clock, "dmv_k235", __FILE__),
|
||||
m_pic(*this, "pic8259")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k230_device::device_start()
|
||||
{
|
||||
m_bus = static_cast<dmvcart_slot_device*>(owner());
|
||||
m_io = &machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k230_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor dmv_k230_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k230 );
|
||||
}
|
||||
|
||||
machine_config_constructor dmv_k235_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k235 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_rom_region
|
||||
//-------------------------------------------------
|
||||
|
||||
const rom_entry *dmv_k230_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k230 );
|
||||
}
|
||||
|
||||
const rom_entry *dmv_k231_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k231 );
|
||||
}
|
||||
|
||||
const rom_entry *dmv_k235_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k235 );
|
||||
}
|
||||
|
||||
bool dmv_k230_device::av16bit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void dmv_k230_device::hold_w(int state)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, state);
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_k230_device::rom_r)
|
||||
{
|
||||
return m_rom->base()[offset & 0x0fff];
|
||||
}
|
||||
|
||||
READ8_MEMBER( dmv_k230_device::io_r )
|
||||
{
|
||||
return m_io->read_byte(offset);
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
105
src/emu/bus/dmv/k230.h
Normal file
105
src/emu/bus/dmv/k230.h
Normal file
@ -0,0 +1,105 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
#pragma once
|
||||
|
||||
#ifndef __DMV_K230_H__
|
||||
#define __DMV_K230_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
|
||||
// K235
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "machine/pic8259.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> dmv_k230_device
|
||||
|
||||
class dmv_k230_device :
|
||||
public device_t,
|
||||
public device_dmvslot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
dmv_k230_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;
|
||||
|
||||
DECLARE_READ8_MEMBER(io_r);
|
||||
DECLARE_READ8_MEMBER(program_r);
|
||||
DECLARE_WRITE8_MEMBER(io_w);
|
||||
DECLARE_WRITE8_MEMBER(program_w);
|
||||
DECLARE_READ8_MEMBER(rom_r);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual void hold_w(int state);
|
||||
virtual bool av16bit();
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_memory_region m_rom;
|
||||
dmvcart_slot_device * m_bus;
|
||||
address_space * m_io;
|
||||
};
|
||||
|
||||
|
||||
// ======================> dmv_k231_device
|
||||
|
||||
class dmv_k231_device :
|
||||
public dmv_k230_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
};
|
||||
|
||||
|
||||
// ======================> dmv_k235_device
|
||||
|
||||
class dmv_k235_device :
|
||||
public dmv_k230_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k235_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;
|
||||
|
||||
void irq0_w(int state) { m_pic->ir0_w(state); }
|
||||
void irq1_w(int state) { m_pic->ir1_w(state); }
|
||||
void irq2_w(int state) { m_pic->ir2_w(state); }
|
||||
void irq3_w(int state) { m_pic->ir3_w(state); }
|
||||
void irq4_w(int state) { m_pic->ir4_w(state); }
|
||||
void irq5_w(int state) { m_pic->ir5_w(state); }
|
||||
void irq6_w(int state) { m_pic->ir6_w(state); }
|
||||
void irq7_w(int state) { m_pic->ir7_w(state); }
|
||||
|
||||
private:
|
||||
required_device<pic8259_device> m_pic;
|
||||
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMV_K230;
|
||||
extern const device_type DMV_K231;
|
||||
extern const device_type DMV_K235;
|
||||
|
||||
#endif /* __DMV_K230_H__ */
|
144
src/emu/bus/dmv/k806.c
Normal file
144
src/emu/bus/dmv/k806.c
Normal file
@ -0,0 +1,144 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/***************************************************************************
|
||||
|
||||
K806 Mouse module
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "k806.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( dmv_k806 )
|
||||
ROM_REGION( 0x0400, "mcu", 0 )
|
||||
ROM_LOAD( "dmv_mouse_8741a.bin", 0x0000, 0x0400, CRC(2163737a) SHA1(b82c14dba6c25cb1f60cf623989ca8c0c1ee4cc3))
|
||||
ROM_END
|
||||
|
||||
static ADDRESS_MAP_START( k806_io, AS_IO, 8, dmv_k806_device )
|
||||
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(port1_r, port1_w)
|
||||
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(portt1_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( dmv_k806 )
|
||||
MCFG_CPU_ADD("mcu", I8741, XTAL_6MHz)
|
||||
MCFG_CPU_IO_MAP(k806_io)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static INPUT_PORTS_START( dmv_k806 )
|
||||
PORT_START("JUMPERS")
|
||||
PORT_DIPNAME( 0x7f, 0x24, "K806 IFSEL" ) PORT_DIPLOCATION("J:!1,J:!2,J:!3,J:!4,J:!5,J:!6,J:!7")
|
||||
PORT_DIPSETTING( 0x21, "0A" )
|
||||
PORT_DIPSETTING( 0x41, "0B" )
|
||||
PORT_DIPSETTING( 0x22, "1A" )
|
||||
PORT_DIPSETTING( 0x42, "1B" )
|
||||
PORT_DIPSETTING( 0x24, "2A" ) // default
|
||||
PORT_DIPSETTING( 0x44, "2B" )
|
||||
PORT_DIPSETTING( 0x28, "3A" )
|
||||
PORT_DIPSETTING( 0x48, "3B" )
|
||||
PORT_DIPSETTING( 0x30, "4A" )
|
||||
PORT_DIPSETTING( 0x50, "4B" )
|
||||
PORT_DIPNAME( 0x380, 0x00, "K806 Mouse" ) PORT_DIPLOCATION("J:!8,J:!9,J:!10")
|
||||
PORT_DIPSETTING( 0x000, "Hawley, Alps" )
|
||||
PORT_DIPSETTING( 0x380, "Depraz" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMV_K806 = &device_creator<dmv_k806_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k806_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k806_device::dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, DMV_K806, "K806 mouse", tag, owner, clock, "dmv_k806", __FILE__),
|
||||
device_dmvslot_interface( mconfig, *this ),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_jumpers(*this, "JUMPERS")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k806_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_k806_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor dmv_k806_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( dmv_k806 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor dmv_k806_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( dmv_k806 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_rom_region
|
||||
//-------------------------------------------------
|
||||
|
||||
const rom_entry *dmv_k806_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( dmv_k806 );
|
||||
}
|
||||
|
||||
void dmv_k806_device::io_read(address_space &space, int ifsel, offs_t offset, UINT8 &data)
|
||||
{
|
||||
UINT8 jumpers = m_jumpers->read();
|
||||
if (BIT(jumpers, ifsel) && ((!BIT(offset, 3) && BIT(jumpers, 5)) || (BIT(offset, 3) && BIT(jumpers, 6))))
|
||||
data = m_mcu->upi41_master_r(space, offset & 1);
|
||||
}
|
||||
|
||||
void dmv_k806_device::io_write(address_space &space, int ifsel, offs_t offset, UINT8 data)
|
||||
{
|
||||
UINT8 jumpers = m_jumpers->read();
|
||||
if (BIT(jumpers, ifsel) && ((!BIT(offset, 3) && BIT(jumpers, 5)) || (BIT(offset, 3) && BIT(jumpers, 6))))
|
||||
m_mcu->upi41_master_w(space, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( dmv_k806_device::port1_r )
|
||||
{
|
||||
// TODO
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
READ8_MEMBER( dmv_k806_device::portt1_r )
|
||||
{
|
||||
return BIT(m_jumpers->read(), 7) ? 0 : 1;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( dmv_k806_device::port1_w )
|
||||
{
|
||||
// TODO
|
||||
};
|
53
src/emu/bus/dmv/k806.h
Normal file
53
src/emu/bus/dmv/k806.h
Normal file
@ -0,0 +1,53 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
#pragma once
|
||||
|
||||
#ifndef __DMV_K806_H__
|
||||
#define __DMV_K806_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> dmv_k806_device
|
||||
|
||||
class dmv_k806_device :
|
||||
public device_t,
|
||||
public device_dmvslot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k806_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;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
DECLARE_READ8_MEMBER(portt1_r);
|
||||
DECLARE_READ8_MEMBER(port1_r);
|
||||
DECLARE_WRITE8_MEMBER(port1_w);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
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);
|
||||
|
||||
private:
|
||||
required_device<upi41_cpu_device> m_mcu;
|
||||
required_ioport m_jumpers;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMV_K806;
|
||||
|
||||
#endif /* __DMV_K806_H__ */
|
96
src/emu/bus/dmv/ram.c
Normal file
96
src/emu/bus/dmv/ram.c
Normal file
@ -0,0 +1,96 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
/***************************************************************************
|
||||
|
||||
K200 64K RAM expansion
|
||||
K202 192K RAM expansion
|
||||
K208 448K RAM expansion
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "ram.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type DMV_K200 = &device_creator<dmv_k200_device>;
|
||||
const device_type DMV_K202 = &device_creator<dmv_k202_device>;
|
||||
const device_type DMV_K208 = &device_creator<dmv_k208_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_ram_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_ram_device::dmv_ram_device(const machine_config &mconfig, device_type type, UINT32 size, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_dmvslot_interface( mconfig, *this ),
|
||||
m_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k200_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k200_device::dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_ram_device(mconfig, DMV_K200, 1, "K200 64K RAM expansion", tag, owner, clock, "dmv_k200", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k202_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k202_device::dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_ram_device(mconfig, DMV_K202, 3, "K202 192K RAM expansion", tag, owner, clock, "dmv_k202", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// dmv_k208_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
dmv_k208_device::dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: dmv_ram_device(mconfig, DMV_K208, 7 , "K208 448K RAM expansion", tag, owner, clock, "dmv_k208", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_ram_device::device_start()
|
||||
{
|
||||
m_ram = machine().memory().region_alloc( "expram", m_size * 0x10000, 1, ENDIANNESS_LITTLE )->base();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// read
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_ram_device::ram_read(UINT8 cas, offs_t offset, UINT8 &data)
|
||||
{
|
||||
if (cas && cas <= m_size)
|
||||
data = m_ram[((cas - 1) << 16) | (offset & 0xffff)];
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write
|
||||
//-------------------------------------------------
|
||||
|
||||
void dmv_ram_device::ram_write(UINT8 cas, offs_t offset, UINT8 data)
|
||||
{
|
||||
if (cas && cas <= m_size)
|
||||
m_ram[((cas - 1) << 16) | (offset & 0xffff)] = data;
|
||||
}
|
71
src/emu/bus/dmv/ram.h
Normal file
71
src/emu/bus/dmv/ram.h
Normal file
@ -0,0 +1,71 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sandro Ronco
|
||||
#pragma once
|
||||
|
||||
#ifndef __DMV_RAM_H__
|
||||
#define __DMV_RAM_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "dmvbus.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================>
|
||||
|
||||
class dmv_ram_device :
|
||||
public device_t,
|
||||
public device_dmvslot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_ram_device(const machine_config &mconfig, device_type type, UINT32 size, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
// dmvcart_interface overrides
|
||||
virtual void ram_read(UINT8 cas, offs_t offset, UINT8 &data);
|
||||
virtual void ram_write(UINT8 cas, offs_t offset, UINT8 data);
|
||||
|
||||
private:
|
||||
UINT8 * m_ram;
|
||||
UINT8 m_size;
|
||||
};
|
||||
|
||||
|
||||
class dmv_k200_device :
|
||||
public dmv_ram_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class dmv_k202_device :
|
||||
public dmv_ram_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class dmv_k208_device :
|
||||
public dmv_ram_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type DMV_K200;
|
||||
extern const device_type DMV_K202;
|
||||
extern const device_type DMV_K208;
|
||||
|
||||
#endif /* __DMV_RAM_H__ */
|
54
src/lib/formats/dmv_dsk.c
Normal file
54
src/lib/formats/dmv_dsk.c
Normal file
@ -0,0 +1,54 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
/*********************************************************************
|
||||
|
||||
formats/dmv_dsk.c
|
||||
|
||||
NCR Decision Mate V format
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "formats/dmv_dsk.h"
|
||||
|
||||
dmv_format::dmv_format() : upd765_format(formats)
|
||||
{
|
||||
}
|
||||
|
||||
const char *dmv_format::name() const
|
||||
{
|
||||
return "dmv";
|
||||
}
|
||||
|
||||
const char *dmv_format::description() const
|
||||
{
|
||||
return "Decision Mate V disk image";
|
||||
}
|
||||
|
||||
const char *dmv_format::extensions() const
|
||||
{
|
||||
return "img";
|
||||
}
|
||||
|
||||
// gap size from hardware reference manual
|
||||
const dmv_format::format dmv_format::formats[] = {
|
||||
{
|
||||
floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
|
||||
2000,
|
||||
9, 40, 2,
|
||||
512, {},
|
||||
1, {},
|
||||
80, 50, 22, 80
|
||||
},
|
||||
{
|
||||
floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
|
||||
2000,
|
||||
8, 40, 2,
|
||||
512, {},
|
||||
1, {},
|
||||
80, 50, 22, 80
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
const floppy_format_type FLOPPY_DMV_FORMAT = &floppy_image_format_creator<dmv_format>;
|
28
src/lib/formats/dmv_dsk.h
Normal file
28
src/lib/formats/dmv_dsk.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*********************************************************************
|
||||
|
||||
formats/dmv_dsk.h
|
||||
|
||||
NCR Decision Mate V format
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef DMV_DSK_H_
|
||||
#define DMV_DSK_H_
|
||||
|
||||
#include "upd765_dsk.h"
|
||||
|
||||
class dmv_format : public upd765_format {
|
||||
public:
|
||||
dmv_format();
|
||||
|
||||
virtual const char *name() const;
|
||||
virtual const char *description() const;
|
||||
virtual const char *extensions() const;
|
||||
|
||||
private:
|
||||
static const format formats[];
|
||||
};
|
||||
|
||||
extern const floppy_format_type FLOPPY_DMV_FORMAT;
|
||||
|
||||
#endif /* DMV_DSK_H_ */
|
@ -139,6 +139,7 @@ FORMATSOBJS = \
|
||||
$(LIBOBJ)/formats/d88_dsk.o \
|
||||
$(LIBOBJ)/formats/dfi_dsk.o \
|
||||
$(LIBOBJ)/formats/dim_dsk.o \
|
||||
$(LIBOBJ)/formats/dmv_dsk.o \
|
||||
$(LIBOBJ)/formats/dsk_dsk.o \
|
||||
$(LIBOBJ)/formats/ep64_dsk.o \
|
||||
$(LIBOBJ)/formats/esq8_dsk.o \
|
||||
|
@ -18,6 +18,16 @@
|
||||
#include "machine/dmv_keyb.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "video/upd7220.h"
|
||||
#include "formats/dmv_dsk.h"
|
||||
|
||||
// expansion slots
|
||||
#include "bus/dmv/dmvbus.h"
|
||||
#include "bus/dmv/k220.h"
|
||||
#include "bus/dmv/k230.h"
|
||||
#include "bus/dmv/k806.h"
|
||||
#include "bus/dmv/ram.h"
|
||||
|
||||
|
||||
#include "dmv.lh"
|
||||
|
||||
class dmv_state : public driver_device
|
||||
@ -35,7 +45,19 @@ public:
|
||||
m_keyboard(*this, "keyboard"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_ram(*this, "ram"),
|
||||
m_bootrom(*this, "boot"),
|
||||
m_chargen(*this, "chargen"),
|
||||
m_slot1(*this, "slot1"),
|
||||
m_slot2(*this, "slot2"),
|
||||
m_slot2a(*this, "slot2a"),
|
||||
m_slot3(*this, "slot3"),
|
||||
m_slot4(*this, "slot4"),
|
||||
m_slot5(*this, "slot5"),
|
||||
m_slot6(*this, "slot6"),
|
||||
m_slot7(*this, "slot7"),
|
||||
m_slot7a(*this, "slot7a")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -47,10 +69,25 @@ public:
|
||||
required_device<floppy_connector> m_floppy1;
|
||||
required_device<dmv_keyboard_device> m_keyboard;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
required_device<palette_device> m_palette;
|
||||
required_memory_region m_ram;
|
||||
required_memory_region m_bootrom;
|
||||
required_memory_region m_chargen;
|
||||
|
||||
required_device<dmvcart_slot_device> m_slot1;
|
||||
required_device<dmvcart_slot_device> m_slot2;
|
||||
required_device<dmvcart_slot_device> m_slot2a;
|
||||
required_device<dmvcart_slot_device> m_slot3;
|
||||
required_device<dmvcart_slot_device> m_slot4;
|
||||
required_device<dmvcart_slot_device> m_slot5;
|
||||
required_device<dmvcart_slot_device> m_slot6;
|
||||
required_device<dmvcart_slot_device> m_slot7;
|
||||
required_device<dmvcart_slot_device> m_slot7a;
|
||||
|
||||
virtual void video_start();
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
void update_halt_line();
|
||||
|
||||
DECLARE_WRITE8_MEMBER(leds_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(dma_hrq_changed);
|
||||
@ -58,28 +95,46 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(dmac_dack3);
|
||||
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(pit_out0);
|
||||
DECLARE_WRITE_LINE_MEMBER(timint_w);
|
||||
DECLARE_WRITE8_MEMBER(fdd_motor_w);
|
||||
DECLARE_READ8_MEMBER(sys_status_r);
|
||||
DECLARE_WRITE8_MEMBER(tc_set_w);
|
||||
DECLARE_READ8_MEMBER(memory_read_byte);
|
||||
DECLARE_WRITE8_MEMBER(memory_write_byte);
|
||||
DECLARE_WRITE8_MEMBER(switch16_w);
|
||||
DECLARE_WRITE8_MEMBER(ramsel_w);
|
||||
DECLARE_WRITE8_MEMBER(romsel_w);
|
||||
DECLARE_READ8_MEMBER(kb_mcu_port1_r);
|
||||
DECLARE_WRITE8_MEMBER(kb_mcu_port1_w);
|
||||
DECLARE_WRITE8_MEMBER(kb_mcu_port2_w);
|
||||
DECLARE_WRITE8_MEMBER(rambank_w);
|
||||
DECLARE_READ8_MEMBER(program_r);
|
||||
DECLARE_WRITE8_MEMBER(program_w);
|
||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
required_device<palette_device> m_palette;
|
||||
void ifsel_r(address_space &space, int ifsel, offs_t offset, UINT8 &data);
|
||||
void ifsel_w(address_space &space, int ifsel, offs_t offset, UINT8 data);
|
||||
DECLARE_READ8_MEMBER(ifsel0_r) { UINT8 data = 0xff; ifsel_r(space, 0, offset, data); return data; }
|
||||
DECLARE_READ8_MEMBER(ifsel1_r) { UINT8 data = 0xff; ifsel_r(space, 1, offset, data); return data; }
|
||||
DECLARE_READ8_MEMBER(ifsel2_r) { UINT8 data = 0xff; ifsel_r(space, 2, offset, data); return data; }
|
||||
DECLARE_READ8_MEMBER(ifsel3_r) { UINT8 data = 0xff; ifsel_r(space, 3, offset, data); return data; }
|
||||
DECLARE_READ8_MEMBER(ifsel4_r) { UINT8 data = 0xff; ifsel_r(space, 4, offset, data); return data; }
|
||||
DECLARE_WRITE8_MEMBER(ifsel0_w) { ifsel_w(space, 0, offset, data); }
|
||||
DECLARE_WRITE8_MEMBER(ifsel1_w) { ifsel_w(space, 1, offset, data); }
|
||||
DECLARE_WRITE8_MEMBER(ifsel2_w) { ifsel_w(space, 2, offset, data); }
|
||||
DECLARE_WRITE8_MEMBER(ifsel3_w) { ifsel_w(space, 3, offset, data); }
|
||||
DECLARE_WRITE8_MEMBER(ifsel4_w) { ifsel_w(space, 4, offset, data); }
|
||||
|
||||
UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels );
|
||||
UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
|
||||
|
||||
bool m_ramoutdis;
|
||||
int m_switch16;
|
||||
int m_dma_hrq;
|
||||
int m_ram_bank;
|
||||
bool m_color_mode;
|
||||
int m_eop_line;
|
||||
int m_dack3_line;
|
||||
int m_sd_poll_state;
|
||||
int m_floppy_motor;
|
||||
UINT8 m_ram[0x2000];
|
||||
};
|
||||
|
||||
WRITE8_MEMBER(dmv_state::tc_set_w)
|
||||
@ -87,6 +142,12 @@ WRITE8_MEMBER(dmv_state::tc_set_w)
|
||||
m_fdc->tc_w(true);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::switch16_w)
|
||||
{
|
||||
m_switch16 = !m_switch16;
|
||||
update_halt_line();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::leds_w)
|
||||
{
|
||||
/*
|
||||
@ -109,12 +170,17 @@ WRITE8_MEMBER(dmv_state::leds_w)
|
||||
|
||||
WRITE8_MEMBER(dmv_state::ramsel_w)
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x1fff, m_ram);
|
||||
m_ramoutdis = false;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::romsel_w)
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x1fff, memregion("maincpu")->base());
|
||||
m_ramoutdis = true;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::rambank_w)
|
||||
{
|
||||
m_ram_bank = offset;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::fdd_motor_w)
|
||||
@ -145,8 +211,9 @@ READ8_MEMBER(dmv_state::sys_status_r)
|
||||
if (m_floppy_motor)
|
||||
data |= 0x01;
|
||||
|
||||
// 16-bit CPU not available
|
||||
data |= 0x02;
|
||||
// 16-bit CPU
|
||||
if (!(m_slot7->av16bit() || m_slot7a->av16bit()))
|
||||
data |= 0x02;
|
||||
|
||||
if (!m_floppy0->get_device()->ready_r())
|
||||
data |= 0x04;
|
||||
@ -159,21 +226,61 @@ READ8_MEMBER(dmv_state::sys_status_r)
|
||||
|
||||
UPD7220_DISPLAY_PIXELS_MEMBER( dmv_state::hgdc_display_pixels )
|
||||
{
|
||||
//TODO
|
||||
if (m_color_mode)
|
||||
{
|
||||
// 96KB videoram (32KB green + 32KB red + 32KB blue)
|
||||
UINT8 green = m_video_ram[0x00000 + (address & 0x7fff)];
|
||||
UINT8 red = m_video_ram[0x08000 + (address & 0x7fff)];
|
||||
UINT8 blue = m_video_ram[0x10000 + (address & 0x7fff)];
|
||||
|
||||
for(int xi=0; xi<8; xi++)
|
||||
{
|
||||
int r = ((red >> (7-xi)) & 1) ? 255 : 0;
|
||||
int g = ((green >> (7-xi)) & 1) ? 255 : 0;
|
||||
int b = ((blue >> (7-xi)) & 1) ? 255 : 0;
|
||||
|
||||
if (bitmap.cliprect().contains(x + xi, y))
|
||||
bitmap.pix32(y, x + xi) = rgb_t(r, g, b);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const rgb_t *palette = m_palette->palette()->entry_list_raw();
|
||||
|
||||
// 32KB videoram
|
||||
UINT8 gfx = m_video_ram[address & 0x7fff];
|
||||
|
||||
for(int xi=0;xi<8;xi++)
|
||||
{
|
||||
if (bitmap.cliprect().contains(x + xi, y))
|
||||
bitmap.pix32(y, x + xi) = ((gfx >> (7-xi)) & 1) ? palette[1] : palette[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UPD7220_DRAW_TEXT_LINE_MEMBER( dmv_state::hgdc_draw_text )
|
||||
{
|
||||
const rgb_t *palette = m_palette->palette()->entry_list_raw();
|
||||
UINT8 * chargen = memregion("maincpu")->base() + 0x1000;
|
||||
|
||||
for( int x = 0; x < pitch; x++ )
|
||||
{
|
||||
UINT8 tile = m_video_ram[((addr+x)*2) & 0x1ffff] & 0xff;
|
||||
UINT8 attr = m_video_ram[((addr+x)*2 + 1) & 0x1ffff] & 0xff;
|
||||
|
||||
rgb_t bg, fg;
|
||||
if (m_color_mode)
|
||||
{
|
||||
bg = rgb_t(attr & 0x20 ? 0 : 255, attr & 0x40 ? 0 : 255, attr & 0x80 ? 0 : 255);
|
||||
fg = rgb_t(attr & 0x04 ? 255 : 0, attr & 0x08 ? 255 : 0, attr & 0x10 ? 255 : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
const rgb_t *palette = m_palette->palette()->entry_list_raw();
|
||||
bg = palette[(attr & 1) ? 1 : 0];
|
||||
fg = palette[(attr & 1) ? 0 : 1];
|
||||
}
|
||||
|
||||
for( int yi = 0; yi < lr; yi++)
|
||||
{
|
||||
UINT8 tile_data = chargen[(tile*16+yi) & 0x7ff];
|
||||
UINT8 tile_data = m_chargen->base()[(tile*16+yi) & 0x7ff];
|
||||
|
||||
if(cursor_on && cursor_addr == addr+x) //TODO
|
||||
tile_data^=0xff;
|
||||
@ -191,7 +298,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( dmv_state::hgdc_draw_text )
|
||||
|
||||
if(yi >= 16) { pen = 0; }
|
||||
|
||||
bitmap.pix32(res_y, res_x) = palette[pen];
|
||||
bitmap.pix32(res_y, res_x) = pen ? fg : bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -201,10 +308,70 @@ static SLOT_INTERFACE_START( dmv_floppies )
|
||||
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
void dmv_state::ifsel_r(address_space &space, int ifsel, offs_t offset, UINT8 &data)
|
||||
{
|
||||
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
|
||||
for(int i=0; i<8; i++)
|
||||
slots[i]->io_read(space, ifsel, offset, data);
|
||||
}
|
||||
|
||||
void dmv_state::ifsel_w(address_space &space, int ifsel, offs_t offset, UINT8 data)
|
||||
{
|
||||
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
|
||||
for(int i=0; i<8; i++)
|
||||
slots[i]->io_write(space, ifsel, offset, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::program_w)
|
||||
{
|
||||
bool tramd = false;
|
||||
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
|
||||
for(int i=0; i<8 && !tramd; i++)
|
||||
tramd = slots[i]->write(offset, data);
|
||||
|
||||
if (!tramd)
|
||||
{
|
||||
int cas = (m_switch16 ? offset >> 16 : m_ram_bank) & 0x07;
|
||||
|
||||
if (cas == 0)
|
||||
m_ram->base()[offset & 0xffff] = data;
|
||||
else
|
||||
m_slot1->ram_write(cas, offset & 0xffff, data);
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_state::program_r)
|
||||
{
|
||||
UINT8 data = 0xff;
|
||||
if (m_ramoutdis && offset < 0x2000)
|
||||
{
|
||||
data = m_bootrom->base()[offset];
|
||||
}
|
||||
else
|
||||
{
|
||||
bool tramd = false;
|
||||
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
|
||||
for(int i=0; i<8 && !tramd; i++)
|
||||
tramd = slots[i]->read(offset, data);
|
||||
|
||||
if (!tramd)
|
||||
{
|
||||
int cas = (m_switch16 ? offset >> 16 : m_ram_bank) & 0x07;
|
||||
|
||||
if (cas == 0)
|
||||
data = m_ram->base()[offset & 0xffff];
|
||||
else
|
||||
m_slot1->ram_read(cas, offset & 0xffff, data);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START(dmv_mem, AS_PROGRAM, 8, dmv_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE( 0x0000, 0x1fff ) AM_ROM
|
||||
AM_RANGE( 0x2000, 0xffff ) AM_RAM
|
||||
AM_RANGE( 0x0000, 0xffff ) AM_READWRITE(program_r, program_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( dmv_io , AS_IO, 8, dmv_state)
|
||||
@ -221,8 +388,14 @@ static ADDRESS_MAP_START( dmv_io , AS_IO, 8, dmv_state)
|
||||
AM_RANGE(0x50, 0x51) AM_DEVICE("i8272", i8272a_device, map)
|
||||
AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
|
||||
AM_RANGE(0xa0, 0xa1) AM_DEVREADWRITE("upd7220", upd7220_device, read, write)
|
||||
AM_RANGE(0xd0, 0xd7) AM_WRITE(switch16_w)
|
||||
AM_RANGE(0xe0, 0xe7) AM_WRITE(rambank_w)
|
||||
|
||||
//AM_RANGE(0xe0, 0xe7) RAM bankswitch
|
||||
AM_RANGE(0x60, 0x6f) AM_READWRITE(ifsel0_r, ifsel0_w)
|
||||
AM_RANGE(0x70, 0x7f) AM_READWRITE(ifsel1_r, ifsel1_w)
|
||||
AM_RANGE(0x30, 0x3f) AM_READWRITE(ifsel2_r, ifsel2_w)
|
||||
AM_RANGE(0xb0, 0xbf) AM_READWRITE(ifsel3_r, ifsel3_w)
|
||||
AM_RANGE(0xc0, 0xcf) AM_READWRITE(ifsel4_r, ifsel4_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
READ8_MEMBER(dmv_state::kb_mcu_port1_r)
|
||||
@ -239,6 +412,8 @@ WRITE8_MEMBER(dmv_state::kb_mcu_port1_w)
|
||||
WRITE8_MEMBER(dmv_state::kb_mcu_port2_w)
|
||||
{
|
||||
m_speaker->level_w(BIT(data, 0));
|
||||
m_slot7a->irq1_w(BIT(data, 4));
|
||||
m_slot7->irq1_w(BIT(data, 4));
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( dmv_kb_ctrl_io, AS_IO, 8, dmv_state )
|
||||
@ -253,6 +428,10 @@ ADDRESS_MAP_END
|
||||
|
||||
/* Input ports */
|
||||
INPUT_PORTS_START( dmv )
|
||||
PORT_START("CONFIG")
|
||||
PORT_CONFNAME( 0x01, 0x00, "Video Board" )
|
||||
PORT_CONFSETTING( 0x00, "Monochrome" )
|
||||
PORT_CONFSETTING( 0x01, "Color" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
void dmv_state::machine_start()
|
||||
@ -261,15 +440,25 @@ void dmv_state::machine_start()
|
||||
|
||||
void dmv_state::machine_reset()
|
||||
{
|
||||
m_color_mode = ioport("CONFIG")->read() & 0x01;
|
||||
|
||||
m_ramoutdis = true;
|
||||
m_ram_bank = 0;
|
||||
m_eop_line = 0;
|
||||
m_dack3_line = 0;
|
||||
m_sd_poll_state = 0;
|
||||
m_floppy_motor = 1;
|
||||
m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x1fff, memregion("maincpu")->base());
|
||||
m_switch16 = 0;
|
||||
m_dma_hrq = 0;
|
||||
|
||||
update_halt_line();
|
||||
}
|
||||
|
||||
void dmv_state::video_start()
|
||||
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);
|
||||
}
|
||||
|
||||
/* F4 Character Displayer */
|
||||
@ -287,7 +476,7 @@ static const gfx_layout dmv_charlayout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( dmv )
|
||||
GFXDECODE_ENTRY("maincpu", 0x1000, dmv_charlayout, 0, 1)
|
||||
GFXDECODE_ENTRY("chargen", 0x0000, dmv_charlayout, 0, 1)
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -297,7 +486,8 @@ GFXDECODE_END
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_state::dma_hrq_changed )
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_dma_hrq = state;
|
||||
update_halt_line();
|
||||
|
||||
// Assert HLDA
|
||||
m_dmac->hack_w(state);
|
||||
@ -329,25 +519,52 @@ WRITE_LINE_MEMBER( dmv_state::pit_out0 )
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_state::timint_w )
|
||||
{
|
||||
m_slot7a->irq0_w(state);
|
||||
m_slot7->irq0_w(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( dmv_state::fdc_irq )
|
||||
{
|
||||
m_slot7a->irq6_w(state);
|
||||
m_slot7->irq6_w(state);
|
||||
|
||||
if (state)
|
||||
m_fdc->tc_w(false);
|
||||
}
|
||||
|
||||
READ8_MEMBER(dmv_state::memory_read_byte)
|
||||
{
|
||||
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
|
||||
return prog_space.read_byte(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(dmv_state::memory_write_byte)
|
||||
{
|
||||
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
|
||||
prog_space.write_byte(offset, data);
|
||||
}
|
||||
FLOPPY_FORMATS_MEMBER( dmv_state::floppy_formats )
|
||||
FLOPPY_DMV_FORMAT
|
||||
FLOPPY_FORMATS_END
|
||||
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot1)
|
||||
SLOT_INTERFACE("k200", DMV_K200) // K200 64K RAM expansion
|
||||
SLOT_INTERFACE("k202", DMV_K202) // K202 192K RAM expansion
|
||||
SLOT_INTERFACE("k208", DMV_K208) // K208 448K RAM expansion
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot2_6)
|
||||
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_END
|
||||
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot2a)
|
||||
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START(dmv_slot7a)
|
||||
SLOT_INTERFACE("k230", DMV_K230) // K230 Internal 8088 module without interrupt controller
|
||||
SLOT_INTERFACE("k235", DMV_K235) // K235 Internal 8088 module with interrupt controller
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static MACHINE_CONFIG_START( dmv, dmv_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu",Z80, XTAL_24MHz / 6)
|
||||
@ -366,11 +583,11 @@ static MACHINE_CONFIG_START( dmv, dmv_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||
MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
|
||||
MCFG_SCREEN_SIZE(640, 480)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
|
||||
MCFG_SCREEN_SIZE(640, 400)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", dmv)
|
||||
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
|
||||
MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
|
||||
MCFG_DEFAULT_LAYOUT(layout_dmv)
|
||||
|
||||
// devices
|
||||
@ -382,8 +599,14 @@ static MACHINE_CONFIG_START( dmv, dmv_state )
|
||||
MCFG_DEVICE_ADD( "dma8237", AM9517A, XTAL_4MHz )
|
||||
MCFG_I8237_OUT_HREQ_CB(WRITELINE(dmv_state, dma_hrq_changed))
|
||||
MCFG_I8237_OUT_EOP_CB(WRITELINE(dmv_state, dmac_eop))
|
||||
MCFG_I8237_IN_MEMR_CB(READ8(dmv_state, memory_read_byte))
|
||||
MCFG_I8237_OUT_MEMW_CB(WRITE8(dmv_state, memory_write_byte))
|
||||
MCFG_I8237_IN_MEMR_CB(READ8(dmv_state, program_r))
|
||||
MCFG_I8237_OUT_MEMW_CB(WRITE8(dmv_state, program_w))
|
||||
MCFG_I8237_IN_IOR_0_CB(LOGGER("DMA CH1", 0))
|
||||
MCFG_I8237_OUT_IOW_0_CB(LOGGER("DMA CH1", 0))
|
||||
MCFG_I8237_IN_IOR_1_CB(LOGGER("DMA CH2", 0))
|
||||
MCFG_I8237_OUT_IOW_1_CB(LOGGER("DMA CH2", 0))
|
||||
MCFG_I8237_IN_IOR_2_CB(DEVREAD8("upd7220", upd7220_device, dack_r))
|
||||
MCFG_I8237_OUT_IOW_2_CB(DEVWRITE8("upd7220", upd7220_device, dack_w))
|
||||
MCFG_I8237_IN_IOR_3_CB(DEVREAD8("i8272", i8272a_device, mdma_r))
|
||||
MCFG_I8237_OUT_IOW_3_CB(DEVWRITE8("i8272", i8272a_device, mdma_w))
|
||||
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(dmv_state, dmac_dack3))
|
||||
@ -391,28 +614,67 @@ static MACHINE_CONFIG_START( dmv, dmv_state )
|
||||
MCFG_I8272A_ADD( "i8272", true )
|
||||
MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(dmv_state, fdc_irq))
|
||||
MCFG_UPD765_DRQ_CALLBACK(DEVWRITELINE("dma8237", am9517a_device, dreq3_w))
|
||||
MCFG_FLOPPY_DRIVE_ADD("i8272:0", dmv_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("i8272:1", dmv_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("i8272:0", dmv_floppies, "525dd", dmv_state::floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("i8272:1", dmv_floppies, "525dd", dmv_state::floppy_formats)
|
||||
|
||||
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(50)
|
||||
MCFG_PIT8253_OUT0_HANDLER(WRITELINE(dmv_state, pit_out0))
|
||||
//MCFG_PIT8253_CLK2(XTAL_24MHz / 3 / 16)
|
||||
//MCFG_PIT8253_OUT2_HANDLER(WRITELINE(dmv_state, timint_w))
|
||||
MCFG_PIT8253_CLK2(XTAL_24MHz / 3 / 16)
|
||||
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(dmv_state, timint_w))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO( "mono" )
|
||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
MCFG_DEVICE_ADD("slot1", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot1, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot2", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot2a", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2a, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot3", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot4", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot5", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
|
||||
MCFG_DEVICE_ADD("slot6", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
|
||||
|
||||
MCFG_DEVICE_ADD("slot7", DMVCART_SLOT, 0)
|
||||
MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7, NULL, false)
|
||||
MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, program_r), WRITE8(dmv_state, program_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, program_r), WRITE8(dmv_state, program_w))
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( dmv )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "dmv_norm.bin", 0x0000, 0x2000, CRC(bf25f3f0) SHA1(0c7dd37704db4799e340cc836f887cd543e5c964))
|
||||
ROM_REGION( 0x2000, "boot", 0 )
|
||||
ROM_SYSTEM_BIOS(0, "c07", "C.07.00") // ROM bears the handwritten note "Color 7.0", this is from the machine that originally had Color, 68K and internal 8088
|
||||
ROM_SYSTEM_BIOS(1, "m07", "M.07.00") // Mono machine with internal 8088 and internal HD
|
||||
ROM_SYSTEM_BIOS(2, "m06", "M.06.00") // Mono machine
|
||||
ROM_SYSTEM_BIOS(3, "m05", "M.05.00") // Mono machine, marked "updated"
|
||||
|
||||
ROMX_LOAD( "dmv_mb_rom_33610.bin", 0x00000, 0x02000, CRC(bf25f3f0) SHA1(0c7dd37704db4799e340cc836f887cd543e5c964), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "dmv_mb_rom_33609.bin", 0x00000, 0x02000, CRC(120951b6) SHA1(57bef9cc6379dea5730bc1477e8896508e00a349), ROM_BIOS(2) )
|
||||
ROMX_LOAD( "dmv_mb_rom_32676.bin", 0x00000, 0x02000, CRC(7796519e) SHA1(8d5dd9c1e66c96fcca271b6f673d6a0e784acb33), ROM_BIOS(3) )
|
||||
ROMX_LOAD( "dmv_mb_rom_32664.bin", 0x00000, 0x02000, CRC(6624610e) SHA1(e9226be897d2c5f875784ab77dad8807f14c7714), ROM_BIOS(4) )
|
||||
|
||||
ROM_REGION(0x400, "kb_ctrl_mcu", 0)
|
||||
ROM_LOAD( "dmv_kb_ctrl_mcu.bin", 0x0000, 0x0400, CRC(a03af298) SHA1(144cba41294c46f5ca79b7ad8ced0e4408168775))
|
||||
ROMX_LOAD( "dmv_mb_8741_32678.bin", 0x00000, 0x00400, CRC(50d1dc4c) SHA1(2c8251d6c8df9f507e11bf920869657f4d074db1), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "dmv_mb_8741_32678.bin", 0x00000, 0x00400, CRC(50d1dc4c) SHA1(2c8251d6c8df9f507e11bf920869657f4d074db1), ROM_BIOS(2) )
|
||||
ROMX_LOAD( "dmv_mb_8741_32678.bin", 0x00000, 0x00400, CRC(50d1dc4c) SHA1(2c8251d6c8df9f507e11bf920869657f4d074db1), ROM_BIOS(3) )
|
||||
ROMX_LOAD( "dmv_mb_8741_32121.bin", 0x00000, 0x00400, CRC(a03af298) SHA1(144cba41294c46f5ca79b7ad8ced0e4408168775), ROM_BIOS(4) )
|
||||
|
||||
ROM_REGION(0x800, "chargen", 0)
|
||||
ROM_LOAD( "76161.bin", 0x00000, 0x00800, CRC(6e4df4f9) SHA1(20ff4fc48e55eaf5131f6573fff93e7f97d2f45d)) // same for both color and monochrome board
|
||||
|
||||
ROM_REGION(0x10000, "ram", ROMREGION_ERASE) // 64K RAM on mainboard
|
||||
ROM_END
|
||||
|
||||
/* Driver */
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<mamelayout version="2">
|
||||
<element name="led" defstate="0">
|
||||
<disk state="0">
|
||||
@ -48,6 +49,11 @@
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
<element name="digit" defstate="0">
|
||||
<led7seg>
|
||||
<color red="0.75" green="0.0" blue="0.0" />
|
||||
</led7seg>
|
||||
</element>
|
||||
|
||||
|
||||
<view name="Default Layout">
|
||||
@ -106,6 +112,69 @@
|
||||
</bezel>
|
||||
</view>
|
||||
|
||||
<view name="Diagnostic module">
|
||||
<screen index="0">
|
||||
<bounds x="30" y="0" width="640" height="480" />
|
||||
</screen>
|
||||
|
||||
<bezel name="led1" element="led">
|
||||
<bounds x="15" y="33" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led2" element="led">
|
||||
<bounds x="15" y="53" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led3" element="led">
|
||||
<bounds x="15" y="73" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led4" element="led">
|
||||
<bounds x="15" y="93" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led5" element="led">
|
||||
<bounds x="15" y="113" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led6" element="led">
|
||||
<bounds x="15" y="133" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led7" element="led">
|
||||
<bounds x="15" y="153" width="10" height="10" />
|
||||
</bezel>
|
||||
<bezel name="led8" element="led">
|
||||
<bounds x="15" y="173" width="10" height="10" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="label1" element="l1">
|
||||
<bounds x="0" y="30" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label2" element="l2">
|
||||
<bounds x="0" y="50" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label3" element="l3">
|
||||
<bounds x="0" y="70" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label4" element="l4">
|
||||
<bounds x="0" y="90" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label5" element="l5">
|
||||
<bounds x="0" y="110" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label6" element="l6">
|
||||
<bounds x="0" y="130" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label7" element="l7">
|
||||
<bounds x="0" y="150" width="15" height="16" />
|
||||
</bezel>
|
||||
<bezel name="label8" element="l8">
|
||||
<bounds x="0" y="170" width="15" height="16" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="digit0" element="digit">
|
||||
<bounds x="5" y="200" width="20" height="30" />
|
||||
</bezel>
|
||||
<bezel name="digit1" element="digit">
|
||||
<bounds x="5" y="240" width="20" height="30" />
|
||||
</bezel>
|
||||
</view>
|
||||
|
||||
<view name="Screen Only">
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
|
@ -52,7 +52,7 @@ INPUT_PORTS_START( dmv_keyboard )
|
||||
PORT_START("COL.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(UCHAR_MAMEKEY(BACKSLASH))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("00")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
|
||||
@ -112,7 +112,7 @@ INPUT_PORTS_START( dmv_keyboard )
|
||||
PORT_START("COL.7")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F14")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('`') PORT_CHAR('~')
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(UCHAR_MAMEKEY(ENTER))
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(UCHAR_MAMEKEY(ENTER)) PORT_NAME("Enter")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
|
||||
|
@ -575,6 +575,7 @@ BUSES += COLECO
|
||||
BUSES += COMPUCOLOR
|
||||
BUSES += COMX35
|
||||
BUSES += CPC
|
||||
BUSES += DMV
|
||||
BUSES += ECBBUS
|
||||
BUSES += ECONET
|
||||
BUSES += EP64
|
||||
|
Loading…
Reference in New Issue
Block a user