mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Added a skeleton for the DEC DC7085 (aka "DZ") quad UART. [R. Belmont]
This commit is contained in:
parent
6d623fe87a
commit
b242f119b6
@ -3843,3 +3843,15 @@ if (MACHINES["AIC6250"]~=null) then
|
||||
MAME_DIR .. "src/devices/machine/aic6250.h",
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/dc7085.h,MACHINES["DC7085"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (MACHINES["DC7085"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/machine/dc7085.cpp",
|
||||
MAME_DIR .. "src/devices/machine/dc7085.h",
|
||||
}
|
||||
end
|
@ -678,6 +678,7 @@ MACHINES["IOPSIO2"] = true
|
||||
MACHINES["IOPTIMER"] = true
|
||||
MACHINES["Z8038"] = true
|
||||
MACHINES["AIC6250"] = true
|
||||
MACHINES["DC7085"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
-- specify available bus cores
|
||||
|
87
src/devices/machine/dc7085.cpp
Normal file
87
src/devices/machine/dc7085.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:R. Belmont
|
||||
|
||||
/*
|
||||
* An emulation of the Digital Equipment Corporation DC7085 (also called "DZ") quad-UART
|
||||
*
|
||||
* Used in:
|
||||
*
|
||||
* Several models of MIPS DECstation
|
||||
* Some VAXstations
|
||||
*
|
||||
* Sources:
|
||||
*
|
||||
* http://www.vanade.com/~blc/DS3100/pmax/DS3100.func.spec.pdf
|
||||
*
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "dc7085.h"
|
||||
|
||||
#define LOG_GENERAL (1U << 0)
|
||||
#define LOG_REG (1U << 1)
|
||||
|
||||
//#define VERBOSE (LOG_GENERAL|LOG_REG)
|
||||
|
||||
#include "logmacro.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(DC7085, dc7085_device, "dc7085", "Digital Equipment Corporation DC7085 Quad UART")
|
||||
|
||||
dc7085_device::dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, DC7085, tag, owner, clock),
|
||||
m_int_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
void dc7085_device::map(address_map &map)
|
||||
{
|
||||
map(0x00, 0x01).rw(FUNC(dc7085_device::status_r), FUNC(dc7085_device::control_w));
|
||||
map(0x04, 0x05).rw(FUNC(dc7085_device::rxbuffer_r), FUNC(dc7085_device::lineparams_w));
|
||||
map(0x10, 0x11).rw(FUNC(dc7085_device::txparams_r), FUNC(dc7085_device::txparams_w));
|
||||
map(0x14, 0x15).rw(FUNC(dc7085_device::modem_status_r), FUNC(dc7085_device::txdata_w));
|
||||
}
|
||||
|
||||
void dc7085_device::device_start()
|
||||
{
|
||||
m_int_cb.resolve_safe();
|
||||
}
|
||||
|
||||
void dc7085_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
u16 dc7085_device::status_r()
|
||||
{
|
||||
return 0x8000;
|
||||
}
|
||||
|
||||
u16 dc7085_device::rxbuffer_r()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 dc7085_device::txparams_r()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 dc7085_device::modem_status_r()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dc7085_device::control_w(u16 data)
|
||||
{
|
||||
}
|
||||
|
||||
void dc7085_device::lineparams_w(u16 data)
|
||||
{
|
||||
}
|
||||
|
||||
void dc7085_device::txparams_w(u16 data)
|
||||
{
|
||||
}
|
||||
|
||||
void dc7085_device::txdata_w(u16 data)
|
||||
{
|
||||
}
|
38
src/devices/machine/dc7085.h
Normal file
38
src/devices/machine/dc7085.h
Normal file
@ -0,0 +1,38 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:R. Belmont
|
||||
|
||||
#ifndef MAME_MACHINE_DC7085_H
|
||||
#define MAME_MACHINE_DC7085_H
|
||||
|
||||
#pragma once
|
||||
|
||||
class dc7085_device : public device_t
|
||||
{
|
||||
public:
|
||||
dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void map(address_map &map);
|
||||
|
||||
auto int_cb() { return m_int_cb.bind(); }
|
||||
|
||||
protected:
|
||||
// standard device_interface overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
devcb_write_line m_int_cb;
|
||||
|
||||
u16 status_r();
|
||||
u16 rxbuffer_r();
|
||||
u16 txparams_r();
|
||||
u16 modem_status_r();
|
||||
void control_w(u16 data);
|
||||
void lineparams_w(u16 data);
|
||||
void txparams_w(u16 data);
|
||||
void txdata_w(u16 data);
|
||||
private:
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(DC7085, dc7085_device)
|
||||
|
||||
#endif // MAME_MACHINE_DC7085_H
|
@ -69,6 +69,7 @@
|
||||
#include "machine/nscsi_hd.h"
|
||||
#include "machine/dec_lk201.h"
|
||||
#include "machine/am79c90.h"
|
||||
#include "machine/dc7085.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "screen.h"
|
||||
#include "video/bt459.h"
|
||||
@ -90,7 +91,8 @@ public:
|
||||
m_vrom(*this, "gfx"),
|
||||
m_bt459(*this, "bt459"),
|
||||
m_lance(*this, "am79c90"),
|
||||
m_kn01vram(*this, "vram")
|
||||
m_kn01vram(*this, "vram"),
|
||||
m_dz(*this, "dc7085")
|
||||
{ }
|
||||
|
||||
void kn01(machine_config &config);
|
||||
@ -140,6 +142,7 @@ private:
|
||||
optional_device<bt459_device> m_bt459;
|
||||
required_device<am79c90_device> m_lance;
|
||||
optional_shared_ptr<uint32_t> m_kn01vram;
|
||||
optional_device<dc7085_device> m_dz;
|
||||
|
||||
void kn01_map(address_map &map);
|
||||
void threemin_map(address_map &map);
|
||||
@ -600,7 +603,7 @@ void decstation_state::kn01_map(address_map &map)
|
||||
map(0x11000000, 0x1100003f).rw(FUNC(decstation_state::pcc_r), FUNC(decstation_state::pcc_w));
|
||||
map(0x12000000, 0x1200001f).rw(FUNC(decstation_state::bt478_palette_r), FUNC(decstation_state::bt478_palette_w));
|
||||
//map(0x18000000, 0x18000007).rw(m_lance, FUNC(am79c90_device::regs_r), FUNC(am79c90_device::regs_w)).umask32(0x0000ffff);
|
||||
map(0x1c000000, 0x1c000003).r(FUNC(decstation_state::dz_r));
|
||||
map(0x1c000000, 0x1c00001b).m(m_dz, FUNC(dc7085_device::map)).umask32(0xffff);
|
||||
map(0x1d000000, 0x1d0000ff).rw(m_rtc, FUNC(mc146818_device::read_direct), FUNC(mc146818_device::write_direct)).umask32(0x000000ff);
|
||||
map(0x1e000000, 0x1effffff).rw(FUNC(decstation_state::kn01_status_r), FUNC(decstation_state::kn01_control_w));
|
||||
map(0x1fc00000, 0x1fc3ffff).rom().region("user1", 0);
|
||||
@ -658,6 +661,8 @@ MACHINE_CONFIG_START(decstation_state::kn01)
|
||||
TIMER(config, m_scantimer, 0);
|
||||
m_scantimer->configure_scanline(FUNC(decstation_state::scanline_timer), "screen", 0, 1);
|
||||
|
||||
DC7085(config, m_dz, 0);
|
||||
|
||||
AM79C90(config, m_lance, XTAL(12'500'000));
|
||||
|
||||
MC146818(config, m_rtc, XTAL(32'768));
|
||||
|
Loading…
Reference in New Issue
Block a user