summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2026-04-01 11:01:01 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2026-04-01 11:01:01 +0700
commit6312c0f324c5a00955b6d813363a9992d21fb7a4 (patch)
treee29f39765ae777c32e67ac9d30059dead8f941d2
parent3e3105ee8dbe982ba11eec20270e64eb977d6cf8 (diff)
Revert "wip"
This reverts commit b8751a2541a0d7563153d91c61d7ea3b9e1a9406.
-rw-r--r--3rdparty/bgfx/src/bgfx.cpp2
-rw-r--r--3rdparty/bgfx/src/renderer_gl.cpp10
-rw-r--r--scripts/src/bus.lua4
-rw-r--r--src/devices/bus/multibus/dsd5217.cpp4
-rw-r--r--src/devices/bus/qic02/hle.cpp835
-rw-r--r--src/devices/bus/qic02/hle.h13
-rw-r--r--src/devices/bus/qic02/wangtek_5150eq.cpp137
-rw-r--r--src/devices/bus/qic02/wangtek_5150eq.h13
-rw-r--r--src/devices/machine/mc68681.cpp1
-rw-r--r--src/mame/layout/iris1400.lay4
-rw-r--r--src/mame/sgi/gl2.cpp433
-rw-r--r--src/mame/sgi/gl2.h13
-rw-r--r--src/mame/sgi/gl2/bp3.cpp84
-rw-r--r--src/mame/sgi/gl2/bp3.h13
-rw-r--r--src/mame/sgi/gl2/dc4.cpp105
-rw-r--r--src/mame/sgi/gl2/dc4.h51
-rw-r--r--src/mame/sgi/gl2/gf2.cpp90
-rw-r--r--src/mame/sgi/gl2/gf2.h13
-rw-r--r--src/mame/sgi/gl2/uc4.cpp248
-rw-r--r--src/mame/sgi/gl2/uc4.h65
-rw-r--r--src/mame/sgi/iris.cpp4
-rw-r--r--src/osd/modules/sound/xaudio2_sound.cpp8
22 files changed, 11 insertions, 2139 deletions
diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp
index 111b0ddbf36..d2aa92ad8ad 100644
--- a/3rdparty/bgfx/src/bgfx.cpp
+++ b/3rdparty/bgfx/src/bgfx.cpp
@@ -2637,7 +2637,7 @@ namespace bgfx
{ noop::rendererCreate, noop::rendererDestroy, BGFX_RENDERER_NOOP_NAME, false }, // Noop
#endif // BX_PLATFORM_OSX || BX_PLATFORM_IOS
{ nvn::rendererCreate, nvn::rendererDestroy, BGFX_RENDERER_NVN_NAME, !!BGFX_CONFIG_RENDERER_NVN }, // NVN
- { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!(BGFX_CONFIG_RENDERER_OPENGLES > 0) }, // OpenGLES
+ { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGLES }, // OpenGLES
{ gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGL }, // OpenGL
{ vk::rendererCreate, vk::rendererDestroy, BGFX_RENDERER_VULKAN_NAME, !!BGFX_CONFIG_RENDERER_VULKAN }, // Vulkan
{ webgpu::rendererCreate, webgpu::rendererDestroy, BGFX_RENDERER_WEBGPU_NAME, !!BGFX_CONFIG_RENDERER_WEBGPU }, // WebGPU
diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp
index 3ef0e70a334..ff860faec25 100644
--- a/3rdparty/bgfx/src/renderer_gl.cpp
+++ b/3rdparty/bgfx/src/renderer_gl.cpp
@@ -2396,7 +2396,7 @@ namespace bgfx { namespace gl
s_extension[Extension::ARB_shader_storage_buffer_object].m_initialize = false;
}
- if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES > 0)
+ if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES)
&& 0 == bx::strCmp(m_vendor, "Imagination Technologies")
&& !bx::strFind(m_version, "1.8@905891").isEmpty() )
{
@@ -2538,7 +2538,7 @@ namespace bgfx { namespace gl
s_textureFormat[TextureFormat::PTC22].m_supported |= ptc2Supported;
s_textureFormat[TextureFormat::PTC24].m_supported |= ptc2Supported;
- if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES > 0) )
+ if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) )
{
if (m_gles3)
{
@@ -3022,7 +3022,7 @@ namespace bgfx { namespace gl
g_caps.supported |= m_glctx.getCaps();
- if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES > 0) )
+ if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) )
{
m_srgbWriteControlSupport = s_extension[Extension::EXT_sRGB_write_control].m_supported;
@@ -6301,7 +6301,7 @@ namespace bgfx { namespace gl
char* temp = (char*)alloca(tempLen);
bx::StaticMemoryBlockWriter writer(temp, tempLen);
- if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES > 0)
+ if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES)
&& !s_renderGL->m_gles3)
{
bx::write(&writer
@@ -7279,7 +7279,7 @@ namespace bgfx { namespace gl
uint32_t dsFlags = _flags & (BGFX_CLEAR_DISCARD_DEPTH|BGFX_CLEAR_DISCARD_STENCIL);
if (BGFX_CLEAR_NONE != dsFlags)
{
- if (!BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES > 0)
+ if (!BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES)
&& (BGFX_CLEAR_DISCARD_DEPTH|BGFX_CLEAR_DISCARD_STENCIL) == dsFlags)
{
buffers[idx++] = GL_DEPTH_STENCIL_ATTACHMENT;
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 97d6a44b090..5bc9cbd54ee 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -4788,10 +4788,6 @@ if (BUSES["QIC02"]~=null) then
files {
MAME_DIR .. "src/devices/bus/qic02/qic02.cpp",
MAME_DIR .. "src/devices/bus/qic02/qic02.h",
- MAME_DIR .. "src/devices/bus/qic02/hle.cpp",
- MAME_DIR .. "src/devices/bus/qic02/hle.cpp",
- MAME_DIR .. "src/devices/bus/qic02/wangtek_5150eq.cpp",
- MAME_DIR .. "src/devices/bus/qic02/wangtek_5150eq.cpp",
}
end
diff --git a/src/devices/bus/multibus/dsd5217.cpp b/src/devices/bus/multibus/dsd5217.cpp
index 801d8cd9540..f8022a95fb5 100644
--- a/src/devices/bus/multibus/dsd5217.cpp
+++ b/src/devices/bus/multibus/dsd5217.cpp
@@ -17,7 +17,6 @@
#include "dsd5217.h"
#include "bus/qic02/qic02.h"
-#include "bus/qic02/hle.h"
#include "cpu/i8085/i8085.h"
#include "imagedev/floppy.h"
#include "imagedev/harddriv.h"
@@ -304,8 +303,7 @@ void multibus_dsd5217_device::device_add_mconfig(machine_config &config)
HARDDISK(config, m_hdd[0]);
HARDDISK(config, m_hdd[1]);
- QIC02_CONNECTOR(config, m_qic).option_add("hle", QIC02_HLE);
- m_qic->set_default_option("hle");
+ QIC02_CONNECTOR(config, m_qic);
m_qic->ack().set(m_dma, FUNC(am9517a_device::dreq0_w));
m_qic->rdy().set([this](int state) { if (!state) m_port70 |= 0x80; else m_port70 &= ~0x80; });
m_qic->exc().set_inputline(m_cpu, I8085_RST65_LINE).invert();
diff --git a/src/devices/bus/qic02/hle.cpp b/src/devices/bus/qic02/hle.cpp
deleted file mode 100644
index 8736c13dafa..00000000000
--- a/src/devices/bus/qic02/hle.cpp
+++ /dev/null
@@ -1,835 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * QIC-02 Controller (high-level emulation)
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-/*
- * QIC-11: 4 track, 450ft DC300XL - 20MB
- * QIC-24: 9 track, 450ft/600ft DC600A - 45MB/60MB
- * QIC-120: 15 track, DC6150, 125MB
- * QIC-150: 18 track, DC6150, 150MB
- *
- * QIC-02: 1/4-Inch Cartridge Tape Drive Intelligent Interface (rev F, 19-Apr-88)
- * QIC-36: 1/4-Inch Cartridge Tape Drive Basic Interface (rev C, 14-Sep-84)
- *
- * Wangtek Series 5000E: QIC-36
- * DC600A, DC300XL, DC615A, DC600XTD
- * Wangtek 5099EQ/5125EQ/5150EQ: QIC-02
- *
- *
- */
- /*
- *
- // IRIS 1400 tape drive specifications: 10,000 flux/inch, 100k/foot
- // 90 inches/second
- // 300 and 450 feet length
- // 10000fci, 450ft, 45ips, 45MB QIC (Archive, Wangtek, Cypher)
-
- */
-
-#include "emu.h"
-#include "hle.h"
-
-#include "imagedev/simh_tape_image.h"
-
-#define LOG_STATE (1U << 1)
-#define LOG_CONTROL (1U << 2)
-#define LOG_DATA (1U << 3)
-
-#define VERBOSE (LOG_GENERAL) //|LOG_STATE|LOG_CONTROL|LOG_DATA)
-#include "logmacro.h"
-
-enum command_type
-{
- STANDARD,
- OPTIONAL,
- RESERVED,
- VENDOR,
-};
-struct command
-{
- u8 command;
- u8 mask;
- command_type type;
- char const *const description;
-}
-commands[] =
-{
- { 0x00, 0xff, VENDOR, nullptr },
- { 0x01, 0xff, STANDARD, "select drive 1" },
- { 0x02, 0xff, STANDARD, "select drive 2" },
- { 0x03, 0xff, VENDOR, nullptr },
- { 0x04, 0xff, STANDARD, "select drive 3" },
- { 0x05, 0xff, VENDOR, nullptr },
- { 0x06, 0xfe, VENDOR, nullptr },
- { 0x08, 0xff, STANDARD, "select drive 4" },
- { 0x09, 0xff, VENDOR, nullptr },
- { 0x0a, 0xfe, VENDOR, nullptr },
- { 0x0c, 0xfc, VENDOR, nullptr },
-
- { 0x10, 0xff, VENDOR, nullptr },
- { 0x11, 0xff, OPTIONAL, "select drive 1, lock cartridge" },
- { 0x12, 0xff, OPTIONAL, "select drive 2, lock cartridge" },
- { 0x13, 0xff, VENDOR, nullptr },
- { 0x14, 0xff, OPTIONAL, "select drive 3, lock cartridge" },
- { 0x15, 0xff, VENDOR, nullptr },
- { 0x16, 0xfe, VENDOR, nullptr },
- { 0x18, 0xff, OPTIONAL, "select drive 4, lock cartridge" },
- { 0x19, 0xff, VENDOR, nullptr },
- { 0x1a, 0xfe, VENDOR, nullptr },
- { 0x1c, 0xfc, VENDOR, nullptr },
-
- { 0x20, 0xff, VENDOR, nullptr },
- { 0x21, 0xff, STANDARD, "position to beginning of tape" },
- { 0x22, 0xff, STANDARD, "erase the entire tape" },
- { 0x23, 0xff, VENDOR, nullptr },
- { 0x24, 0xff, STANDARD, "initialize cartridge" },
- { 0x25, 0xff, OPTIONAL, "select auto cartridge initialization" },
- { 0x26, 0xfe, VENDOR, nullptr },
- { 0x28, 0xf8, VENDOR, nullptr },
-
- { 0x30, 0xf0, VENDOR, nullptr },
-
- { 0x40, 0xff, STANDARD, "write" },
- { 0x41, 0xff, OPTIONAL, "write without underruns" },
- { 0x42, 0xfe, VENDOR, nullptr },
- { 0x44, 0xfc, VENDOR, nullptr },
- { 0x48, 0xff, OPTIONAL, "enter 6 byte parameter block" },
- { 0x49, 0xff, VENDOR, nullptr },
- { 0x4a, 0xfe, VENDOR, nullptr },
- { 0x4c, 0xfc, VENDOR, nullptr },
-
- { 0x50, 0xf0, VENDOR, nullptr },
-
- { 0x60, 0xff, STANDARD, "write file mark" },
- { 0x61, 0xff, RESERVED, nullptr },
- { 0x62, 0xfe, VENDOR, nullptr },
- { 0x64, 0xfc, VENDOR, nullptr },
- { 0x68, 0xf8, VENDOR, nullptr },
-
- { 0x70, 0xf0, OPTIONAL, "write N file marks" },
-
- { 0x80, 0xff, STANDARD, "read" },
- { 0x81, 0xff, OPTIONAL, "space forward" },
- { 0x82, 0xfe, VENDOR, nullptr },
- { 0x84, 0xff, OPTIONAL, "read reduced track density" },
- { 0x85, 0xff, OPTIONAL, "space forward reduced track density" },
- { 0x86, 0xfe, VENDOR, nullptr },
-
- { 0x88, 0xff, OPTIONAL, "read reverse" },
- { 0x89, 0xff, OPTIONAL, "space reverse" },
- { 0x8a, 0xfe, VENDOR, nullptr },
- { 0x8c, 0xff, OPTIONAL, "read reverse reduced track density" },
- { 0x8d, 0xff, OPTIONAL, "space reverse reduced track density" },
- { 0x8e, 0xfe, VENDOR, nullptr },
-
- { 0x90, 0xf0, VENDOR, nullptr },
-
- { 0xa0, 0xff, STANDARD, "read file mark" },
- { 0xa1, 0xff, VENDOR, nullptr },
- { 0xa2, 0xff, VENDOR, nullptr },
- { 0xa3, 0xff, OPTIONAL, "seek end of data" },
- { 0xa4, 0xff, OPTIONAL, "read file mark reduced track density" },
- { 0xa5, 0xff, VENDOR, nullptr },
- { 0xa6, 0xff, VENDOR, nullptr },
- { 0xa7, 0xff, OPTIONAL, "seek end of data reduced track density" },
- { 0xa8, 0xff, OPTIONAL, "read file mark reverse" },
- { 0xa9, 0xff, VENDOR, nullptr },
- { 0xaa, 0xfe, VENDOR, nullptr },
- { 0xac, 0xff, OPTIONAL, "read file mark reverse reduced track density" },
- { 0xad, 0xff, VENDOR, nullptr },
- { 0xae, 0xfe, VENDOR, nullptr },
-
- { 0xb0, 0xf0, OPTIONAL, "read N file marks" },
-
- { 0xc0, 0xff, STANDARD, "read status" },
- { 0xc1, 0xff, OPTIONAL, "read extended status 1" },
- { 0xc2, 0xff, OPTIONAL, "run self test 1" },
- { 0xc3, 0xff, VENDOR, nullptr },
- { 0xc4, 0xff, OPTIONAL, "read extended status 2" },
- { 0xc5, 0xff, VENDOR, nullptr },
- { 0xc6, 0xfe, VENDOR, nullptr },
- { 0xc8, 0xfe, VENDOR, nullptr },
- { 0xca, 0xff, OPTIONAL, "run self test 2" },
- { 0xcb, 0xff, VENDOR, nullptr },
- { 0xcc, 0xfc, VENDOR, nullptr },
-
- { 0xd0, 0xf0, VENDOR, nullptr },
-
- { 0xe0, 0xff, OPTIONAL, "read extended status 3" },
- { 0xe1, 0xff, VENDOR, nullptr },
- { 0xe2, 0xfe, VENDOR, nullptr },
- { 0xe4, 0xfc, VENDOR, nullptr },
- { 0xe8, 0xf0, VENDOR, nullptr },
-
- { 0xf0, 0xf0, VENDOR, nullptr },
-};
-
-namespace {
-
-enum hbc_mask : u8
-{
- HBC_ACK = 0x01, // acknowledge
- HBC_RDY = 0x02, // ready
- HBC_EXC = 0x04, // exception
- HBC_DIR = 0x08, // direction
- HBC_ONL = 0x10, // online
- HBC_REQ = 0x20, // request
- HBC_RST = 0x40, // reset
- HBC_XFR = 0x80, // transfer
-};
-
-enum state : u8
-{
- EXCEPTION,
- EXCEPTION_EXC,
- EXCEPTION_RDY,
- EXCEPTION_CMD,
- EXCEPTION_NRDY,
- EXCEPTION_DAT,
- EXCEPTION_REQ,
- EXCEPTION_NREQ,
-
- READY,
- COMMAND,
- COMMAND_RDY,
- COMMAND_NREQ,
- COMMAND_NRDY,
-
- EXECUTE,
-
- READ,
- READ_BLOCK,
- READ_BLOCK_1,
- READ_BLOCK_2,
- READ_BLOCK_3,
-};
-
-class qic02_hle_device
- : public device_t
- , public device_qic02_interface
-{
-public:
- qic02_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0)
- : device_t(mconfig, QIC02_HLE, tag, owner, clock)
- , device_qic02_interface(mconfig, *this)
- , m_tape(*this, "tape")
- , m_st{}
- {
- }
-
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- // device_qic02_interface implementation
- virtual void onl_w(int state) override;
- virtual void req_w(int state) override;
- virtual void rst_w(int state) override;
- virtual void xfr_w(int state) override;
-
- virtual u8 data_r() override;
- virtual void data_w(u8 data) override;
-
-protected:
- virtual void ack_w(int state) override;
- virtual void rdy_w(int state) override;
- virtual void exc_w(int state) override;
- virtual void dir_w(int state) override;
-
- void state_timer(int param = 0);
- int state_step();
- int command();
-
- void exception_po(); // power on/reset
- void exception_nc(); // no cartridge
- void exception_nd(); // no drive
- void exception_ic(); // illegal command
- void exception_fm(); // file mark
-
- void logstate();
-
-private:
- required_device<simh_tape_image_device> m_tape;
-
- emu_timer *m_timer;
-
- u8 m_ctrl; // host bus control
- u8 m_data; // host bus data
-
- u8 m_select;
-
- util::fifo<u8, 512> m_fifo;
- u8 m_cmd;
-
- u8 m_st[6];
-
- u8 m_state;
-
- u8 m_buf[512];
-
- unsigned m_blk = 0;
-};
-
-void qic02_hle_device::device_add_mconfig(machine_config &config)
-{
- SIMH_TAPE_IMAGE(config, m_tape).set_interface("tape");
-}
-
-void qic02_hle_device::device_start()
-{
- save_item(NAME(m_ctrl));
- save_item(NAME(m_data));
- save_item(NAME(m_st));
-
- m_ctrl = 0x00;
- m_data = 0x00;
-
- m_timer = timer_alloc(timer_expired_delegate(FUNC(qic02_hle_device::state_timer), this));
-}
-
-void qic02_hle_device::device_reset()
-{
- ack_w(1);
- rdy_w(1);
- exc_w(1);
- dir_w(1);
-
- exception_po();
-
- m_select = 1;
-
- if (m_tape->get_file())
- m_tape->get_file()->rewind(false);
-}
-
-void qic02_hle_device::ack_w(int state)
-{
- if (state == BIT(m_ctrl, 0))
- {
- LOGMASKED(LOG_CONTROL, "ack_w %d\n", state);
-
- if (!state)
- m_ctrl |= HBC_ACK;
- else
- m_ctrl &= ~HBC_ACK;
-
- logstate();
- qic().ack_w(state);
- }
-}
-void qic02_hle_device::rdy_w(int state)
-{
- if (state == BIT(m_ctrl, 1))
- {
- LOGMASKED(LOG_CONTROL, "rdy_w %d\n", state);
-
- if (!state)
- m_ctrl |= HBC_RDY;
- else
- m_ctrl &= ~HBC_RDY;
-
- logstate();
- qic().rdy_w(state);
- }
-}
-void qic02_hle_device::exc_w(int state)
-{
- if (state == BIT(m_ctrl, 2))
- {
- LOGMASKED(LOG_CONTROL, "exc_w %d\n", state);
-
- if (!state)
- m_ctrl |= HBC_EXC;
- else
- m_ctrl &= ~HBC_EXC;
-
- logstate();
- qic().exc_w(state);
- }
-}
-void qic02_hle_device::dir_w(int state)
-{
- if (state == BIT(m_ctrl, 3))
- {
- LOGMASKED(LOG_CONTROL, "dir_w %d\n", state);
-
- if (!state)
- m_ctrl |= HBC_DIR;
- else
- m_ctrl &= ~HBC_DIR;
-
- logstate();
- qic().dir_w(state);
- }
-}
-
-void qic02_hle_device::onl_w(int state)
-{
- if (state == BIT(m_ctrl, 4))
- {
- LOGMASKED(LOG_CONTROL, "%s: onl_w %d\n", machine().describe_context(), state);
- logerror("%s: onl_w %d\n", machine().describe_context(), state);
-
- if (!state)
- m_ctrl |= HBC_ONL;
- else
- m_ctrl &= ~HBC_ONL;
-
- m_timer->adjust(attotime::zero);
- logstate();
- }
-}
-void qic02_hle_device::req_w(int state)
-{
- if (state == BIT(m_ctrl, 5))
- {
- LOGMASKED(LOG_CONTROL, "%s: req_w %d\n", machine().describe_context(), state);
-
- if (!state)
- m_ctrl |= HBC_REQ;
- else
- m_ctrl &= ~HBC_REQ;
-
- m_timer->adjust(attotime::zero);
- logstate();
- }
-}
-void qic02_hle_device::rst_w(int state)
-{
- if (state == BIT(m_ctrl, 6))
- {
- LOGMASKED(LOG_CONTROL, "%s: rst_w %d\n", machine().describe_context(), state);
-
- if (!state)
- {
- m_ctrl |= HBC_RST;
-
- reset();
- }
- else
- m_ctrl &= ~HBC_RST;
-
- logstate();
- }
-}
-void qic02_hle_device::xfr_w(int state)
-{
- if (state == BIT(m_ctrl, 7))
- {
- LOGMASKED(LOG_CONTROL, "%s: xfr_w %d\n", machine().describe_context(), state);
-
- if (!state)
- m_ctrl |= HBC_XFR;
- else
- m_ctrl &= ~HBC_XFR;
-
- m_timer->adjust(attotime::zero);
- logstate();
- }
-}
-
-void qic02_hle_device::state_timer(int param)
-{
- int delay = state_step();
-
- if (delay < 0)
- return;
-
- m_timer->adjust(attotime::from_usec(delay));
-}
-
-
-int qic02_hle_device::state_step()
-{
- int delay = -1;
-
- // wait REQ
- // clr EXC
- // set RDY
-
- // wait !REQ
- // clr RDY
- // set DIR
-
- // loop:
- // set data
- // set RDY
-
- // wait REQ
- // clr RDY
- // clr data
-
- // wait !REQ
-
-
- switch (m_state)
- {
- case EXCEPTION:
- if (m_ctrl & HBC_REQ)
- {
- m_state = EXCEPTION_EXC;
- delay = 10; // REQ -> RDY >20μs (500μs nominal)
- }
- break;
- case EXCEPTION_EXC:
- if (m_data == 0xc0)
- {
- logerror("status\n");
-
- exc_w(1);
- m_state = EXCEPTION_RDY;
- delay = 10; // !EXC -> RDY >10μs
- }
- else
- m_state = EXCEPTION;
- break;
- case EXCEPTION_RDY:
- rdy_w(0);
- m_state = EXCEPTION_CMD;
- // wait !REQ
- break;
- case EXCEPTION_CMD:
- if (!(m_ctrl & HBC_REQ))
- {
- m_state = EXCEPTION_NRDY;
- delay = 50; // !REQ -> !RDY 20..100μs
- }
- break;
- case EXCEPTION_NRDY:
- // enqueue current status
- m_fifo.clear();
- logerror("st0 0x%02x st1 0x%02x dec 0x%04x urc 0x%04x\n", m_st[0], m_st[1], u16(m_st[3]) << 8 | m_st[2], u16(m_st[5]) << 8 | m_st[4]);
- for (u8 st : m_st)
- m_fifo.enqueue(st);
-
- // clear some st0 bits
- m_st[0] &= ~(ST0_ST0 | ST0_UDA | ST0_BNL | ST0_FIL);
- if (m_st[0])
- m_st[0] |= ST0_ST0;
-
- // clear some st1 bits
- m_st[1] &= ~(ST1_ST1 | ST1_ILL | ST1_NDT | ST1_MBD | ST1_POR);
- if (m_st[1])
- m_st[1] |= ST1_ST1;
-
- // clear data error counter
- m_st[2] = 0;
- m_st[3] = 0;
-
- // clear underrun counter
- m_st[4] = 0;
- m_st[5] = 0;
-
- rdy_w(1);
- dir_w(0);
- m_state = EXCEPTION_DAT;
- delay = 20; // !RDY -> RDY >20μs
- break;
-
- case EXCEPTION_DAT:
- m_data = m_fifo.dequeue();
- rdy_w(0);
- m_state = EXCEPTION_REQ;
- // wait REQ
- break;
- case EXCEPTION_REQ:
- if (m_ctrl & HBC_REQ)
- {
- rdy_w(1); // REQ -> !RDY <1μs
- m_data = 0;
- m_state = EXCEPTION_NREQ;
- // wait !REQ
- }
- break;
- case EXCEPTION_NREQ:
- if (!(m_ctrl & HBC_REQ))
- {
- m_state = m_fifo.empty() ? READY : EXCEPTION_DAT;
- delay = 50; // !REQ -> RDY 20..100μs
- }
- break;
-
- case READY:
- dir_w(1);
- rdy_w(0);
- m_state = COMMAND;
- // wait REQ
- break;
- case COMMAND:
- if (m_ctrl & HBC_REQ)
- {
- rdy_w(1); // REQ -> !RDY <1μs
- m_state = COMMAND_RDY;
- delay = 20; // !RDY -> RDY >20μs (500μs nominal)
- }
- break;
- case COMMAND_RDY:
- m_cmd = m_data;
- rdy_w(0);
- m_state = COMMAND_NREQ;
- // wait !REQ
- break;
- case COMMAND_NREQ:
- if (!(m_ctrl & HBC_REQ))
- {
- m_state = COMMAND_NRDY;
- delay = 50; // !REQ -> !RDY 20..100μs
- }
- break;
- case COMMAND_NRDY:
- rdy_w(1);
- m_state = EXECUTE;
-
- delay = command();
- break;
-
- case READ_BLOCK:
- {
- auto [status, length] = m_tape->get_file()->read_block(m_buf, std::size(m_buf));
-
- if (status == tape_status::OK)
- {
- m_fifo.clear();
- for (u8 const byte : m_buf)
- m_fifo.enqueue(byte);
-
- dir_w(0);
- m_data = m_fifo.dequeue();
- rdy_w(0);
-
- m_state = READ_BLOCK_1;
- delay = 0;
- }
- else
- {
- logerror("read %u blocks status %u\n", m_blk, u8(status));
- m_blk = 0;
-
- exception_fm();
-#if false
- if (status == tape_status::FILEMARK || status == tape_status::FILEMARK_EW)
- exception_fm();
- else if (status == tape_status::EOD || status == tape_status::EOD_EW)
- exception_eod();
- else if (status == tape_status::EOM)
- exception_eom();
- {
- //if (status == tape_status::EOD)
- //else if (status == tape_status::EOM)
- m_fifo.enqueue(0x00);
- m_fifo.enqueue(0x00);
- m_fifo.enqueue(0x00);
- m_fifo.enqueue(0x00);
- m_fifo.enqueue(0x00);
- m_fifo.enqueue(0x00);
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
- }
-#endif
- }
- }
- break;
- case READ_BLOCK_1:
- ack_w(0);
- m_state = READ_BLOCK_2;
- break;
- case READ_BLOCK_2:
- if (m_ctrl & HBC_XFR)
- {
- rdy_w(1);
- ack_w(1);
- m_state = READ_BLOCK_3;
- }
- break;
- case READ_BLOCK_3:
- if (!(m_ctrl & HBC_XFR))
- {
- if (!m_fifo.empty())
- {
- m_data = m_fifo.dequeue();
- ack_w(0);
-
- m_state = READ_BLOCK_2;
- }
- else
- {
- logerror("read block %u\n", m_blk++);
- m_state = READ_BLOCK;
- delay = 0;
- }
- }
- break;
- }
-
- return delay;
-}
-
-int qic02_hle_device::command()
-{
- int delay = -1;
-
- // wait command complete
- switch (m_cmd)
- {
- case CMD_SELECT1: logerror("select1\n"); m_select = 1; m_state = READY; delay = 20; break;
- case CMD_SELECT2: m_select = 2; m_state = READY; delay = 20; break;
- case CMD_SELECT3: m_select = 3; m_state = READY; delay = 20; break;
- case CMD_SELECT4: m_select = 4; m_state = READY; delay = 20; break;
- case CMD_BOT:
- logerror("bot\n");
- if (m_select == 1)
- {
- if (m_tape->get_file())
- {
- m_tape->get_file()->rewind(false);
- m_state = READY;
- delay = 5'000'000;
- }
- else
- exception_nc();
- }
- else
- exception_nd();
- break;
- //case CMD_ERASE: m_state = READY; delay = 20; break;
- //case CMD_INIT: m_state = READY; delay = 20; break;
- //case CMD_WRITE:
- //case CMD_WFM:
- case CMD_READ:
- logerror("read\n");
- if (m_select == 1)
- {
- if (m_ctrl & HBC_ONL)
- {
- m_fifo.clear();
- m_state = READ_BLOCK;
- delay = 2'500'000;
- }
- else
- exception_ic();
- }
- else
- exception_nd();
- break;
- case CMD_RFM:
- logerror("rfm\n");
- if (m_select == 1)
- {
- if (m_ctrl & HBC_ONL)
- {
- m_tape->get_file()->space_filemarks(1);
- m_state = READY;
- delay = 2'500'000;
- }
- else
- exception_ic();
- }
- else
- exception_nd();
- break;
- case CMD_STATUS:
- logerror("status\n");
- m_state = EXCEPTION_NRDY;
- delay = 50;
- break;
- default:
- exception_ic();
- break;
- }
-
- return delay;
-}
-
-void qic02_hle_device::logstate()
-{
- LOGMASKED(LOG_STATE, "host:%s,%s,%s,%s device:%s,%s,%s,%s\n",
- (m_ctrl & HBC_XFR) ? "XFR" : "", (m_ctrl & HBC_RST) ? "RST" : "", (m_ctrl & HBC_REQ) ? "REQ" : "", (m_ctrl & HBC_ONL) ? "ONL" : "",
- (m_ctrl & HBC_DIR) ? "DIR" : "", (m_ctrl & HBC_EXC) ? "EXC" : "", (m_ctrl & HBC_RDY) ? "RDY" : "", (m_ctrl & HBC_ACK) ? "ACK" : "");
-}
-
-u8 qic02_hle_device::data_r()
-{
- LOGMASKED(LOG_DATA, "%s: data_r 0x%02x\n", machine().describe_context(), m_data);
-
- return m_data;
-}
-void qic02_hle_device::data_w(u8 data)
-{
- LOGMASKED(LOG_DATA, "%s: data_w 0x%02x\n", machine().describe_context(), data);
-
- m_data = data;
-}
-
-void qic02_hle_device::exception_po()
-{
- logerror("exception_po\n");
-
- m_st[1] |= ST1_ST1 | ST1_POR;
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
-}
-void qic02_hle_device::exception_nc()
-{
- logerror("exception_nc\n");
-
- // cartridge absent after BOT, RET, ERASE, WRITE, WFM, READ or RFM
- // cartridge removed while drive selected
- m_st[0] |= ST0_ST0 | ST0_CNI;
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
-}
-void qic02_hle_device::exception_nd()
-{
- logerror("exception_nd\n");
-
- // drive not present after BOT, RET, ERASE, WRITE, WFM, READ or WFM
- m_st[0] |= ST0_ST0 | ST0_CNI | ST0_USL | ST0_WRP;
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
-}
-void qic02_hle_device::exception_ic()
-{
- logerror("exception_ic\n");
-
- m_st[1] |= ST1_ST1 | ST1_ILL;
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
-}
-void qic02_hle_device::exception_fm()
-{
- logerror("exception_fm\n");
-
- m_st[0] |= ST0_ST0 | ST0_FIL;
-
- dir_w(1);
- exc_w(0);
-
- m_state = EXCEPTION;
-}
-
-} // anonymous namespace
-
-DEFINE_DEVICE_TYPE_PRIVATE(QIC02_HLE, device_qic02_interface, qic02_hle_device, "qic02_hle", "QIC-02 Controller (HLE)")
diff --git a/src/devices/bus/qic02/hle.h b/src/devices/bus/qic02/hle.h
deleted file mode 100644
index e67b6bc4371..00000000000
--- a/src/devices/bus/qic02/hle.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_BUS_QIC02_HLE_H
-#define MAME_BUS_QIC02_HLE_H
-
-#pragma once
-
-#include "qic02.h"
-
-DECLARE_DEVICE_TYPE(QIC02_HLE, device_qic02_interface)
-
-#endif // MAME_BUS_QIC02_HLE_H
diff --git a/src/devices/bus/qic02/wangtek_5150eq.cpp b/src/devices/bus/qic02/wangtek_5150eq.cpp
deleted file mode 100644
index 3243358bf13..00000000000
--- a/src/devices/bus/qic02/wangtek_5150eq.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * Wangtek Series 5099EQ/5125EQ/5150EQ QIC-02 Interface Streaming 1/4 Inch Tape Cartridge Drive
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-/*
- * QIC-11: 4 track, 450ft DC300XL - 20MB
- * QIC-24: 9 track, 450ft/600ft DC600A - 45MB/60MB
- * QIC-120: 15 track, DC6150, 125MB
- * QIC-150: 18 track, DC6150, 150MB
- *
- * QIC-02: 1/4-Inch Cartridge Tape Drive Intelligent Interface (rev F, 19-Apr-88)
- * QIC-36: 1/4-Inch Cartridge Tape Drive Basic Interface (rev C, 14-Sep-84)
- *
- * Wangtek Series 5000E: QIC-36
- * DC600A, DC300XL, DC615A, DC600XTD
- * Wangtek 5099EQ/5125EQ/5150EQ: QIC-02
- *
- *
- */
-#include "emu.h"
-#include "wangtek_5150eq.h"
-
-#include "cpu/i8085/i8085.h"
-#include "machine/i8257.h"
-
-#include "imagedev/simh_tape_image.h"
-
-#define LOG_STATE (1U << 1)
-#define LOG_CONTROL (1U << 2)
-#define LOG_DATA (1U << 3)
-
-#define VERBOSE (LOG_GENERAL) //|LOG_STATE|LOG_CONTROL|LOG_DATA)
-#include "logmacro.h"
-
-namespace {
-
-class wangtek_5150eq_device
- : public device_t
- , public device_qic02_interface
-{
-public:
- wangtek_5150eq_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0)
- : device_t(mconfig, WANGTEK_5150EQ, tag, owner, clock)
- , device_qic02_interface(mconfig, *this)
- , m_cpu(*this, "cpu")
- , m_dma(*this, "dma")
- , m_tape(*this, "tape")
- {
- }
-
- virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- // device_qic02_interface implementation
- virtual void onl_w(int state) override {}
- virtual void req_w(int state) override {}
- virtual void rst_w(int state) override {}
- virtual void xfr_w(int state) override {}
-
- virtual u8 data_r() override { return 0; }
- virtual void data_w(u8 data) override {}
-
-protected:
- virtual void ack_w(int state) override {}
- virtual void rdy_w(int state) override {}
- virtual void exc_w(int state) override {}
- virtual void dir_w(int state) override {}
-
- void cpu_mem(address_map &map);
- void cpu_pio(address_map &map);
-
-private:
- required_device<i8085a_cpu_device> m_cpu;
- required_device<i8257_device> m_dma;
-
- required_device<simh_tape_image_device> m_tape;
-
-};
-
-void wangtek_5150eq_device::device_add_mconfig(machine_config &config)
-{
- I8085A(config, m_cpu, 7'200'200); // 18MHz / 2.5 (by PLL chip)?
- m_cpu->set_addrmap(AS_PROGRAM, &wangtek_5150eq_device::cpu_mem);
- m_cpu->set_addrmap(AS_IO, &wangtek_5150eq_device::cpu_pio);
-
- I8257(config, m_dma, 7'200'200 / 2);
-
- // U31 Wangtek custom write IC
- // U25 erase driver
- // TL041 read signal processor
- // BOT, EOT, LP, EW sensors
-
- SIMH_TAPE_IMAGE(config, m_tape).set_interface("tape");
-}
-
-void wangtek_5150eq_device::device_start()
-{
-}
-
-void wangtek_5150eq_device::device_reset()
-{
- if (m_tape->get_file())
- m_tape->get_file()->rewind(false);
-}
-
-void wangtek_5150eq_device::cpu_mem(address_map &map)
-{
- map(0x0000, 0x3fff).rom().region("cpu", 0);
- map(0x4000, 0x6000).ram(); // CXK5864BM-10L
-}
-void wangtek_5150eq_device::cpu_pio(address_map &map)
-{
-}
-
-ROM_START(wangtek_5150eq)
- ROM_REGION(0x4000, "cpu", 0)
- ROM_LOAD("32988_005__d60b.u17", 0x0000, 0x4000, CRC(9ad1a072) SHA1(ee97ca0971e707558a5ae02d173ca0d61cb263c3))
-ROM_END
-
-const tiny_rom_entry *wangtek_5150eq_device::device_rom_region() const
-{
- return ROM_NAME(wangtek_5150eq);
-}
-
-} // anonymous namespace
-
-DEFINE_DEVICE_TYPE_PRIVATE(WANGTEK_5150EQ, device_qic02_interface, wangtek_5150eq_device, "wangtek_5150eq", "Wangtek 5150EQ")
diff --git a/src/devices/bus/qic02/wangtek_5150eq.h b/src/devices/bus/qic02/wangtek_5150eq.h
deleted file mode 100644
index 0a927a8f228..00000000000
--- a/src/devices/bus/qic02/wangtek_5150eq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_BUS_QIC02_WANGTEK_5150EQ_H
-#define MAME_BUS_QIC02_WANGTEK_5150EQ_H
-
-#pragma once
-
-#include "qic02.h"
-
-DECLARE_DEVICE_TYPE(WANGTEK_5150EQ, device_qic02_interface)
-
-#endif // MAME_BUS_QIC02_WANGTEK_5150EQ_H
diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp
index fbbbb664377..53a14a704c6 100644
--- a/src/devices/machine/mc68681.cpp
+++ b/src/devices/machine/mc68681.cpp
@@ -1823,7 +1823,6 @@ void duart_channel::write_CR(uint8_t data)
void duart_channel::write_TX(uint8_t data)
{
- printf("%c", data);
if (!(SR & STATUS_TRANSMITTER_READY))
{
logerror("write_tx transmitter not ready (data 0x%02x discarded)\n", data);
diff --git a/src/mame/layout/iris1400.lay b/src/mame/layout/iris1400.lay
index 0b73df0b372..c31f42134bd 100644
--- a/src/mame/layout/iris1400.lay
+++ b/src/mame/layout/iris1400.lay
@@ -50,9 +50,5 @@ Silicon Graphics IRIS 1400.
<element name="LED7" ref="kbd_led"><bounds x="80" y="768" width="10" height="10" /></element>
<element name="LED8" ref="kbd_led"><bounds x="90" y="768" width="10" height="10" /></element> <!-- CAPS -->
- <element name="DS1" ref="kbd_led"><bounds x="120" y="768" width="10" height="10" /></element>
- <element name="DS2" ref="kbd_led"><bounds x="130" y="768" width="10" height="10" /></element>
- <element name="DS3" ref="kbd_led"><bounds x="140" y="768" width="10" height="10" /></element>
-
</view>
</mamelayout>
diff --git a/src/mame/sgi/gl2.cpp b/src/mame/sgi/gl2.cpp
deleted file mode 100644
index 0dbe2b3d3fb..00000000000
--- a/src/mame/sgi/gl2.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * SGI IRIS GL2 high-level emulation
- *
- * This device is an interim high-level emulation of a combination of GF2, UC4,
- * DC4 and BP3 boards. Currently, it supports the limited subset of functions
- * used by the IRIS 3130 firmware to display the monitor. When the hardware is
- * better understood and more software becomes usable, this device should be
- * replaced by individual Multibus devices emulating each of the four cards
- * mentioned earlier.
- *
- * Sources:
- * - IRIS 3.7 source code
- *
- * TODO:
- * - everything
- */
-
-#include "emu.h"
-
-#include "gl2.h"
-
-#include "emupal.h"
-#include "screen.h"
-
-#define VERBOSE (LOG_GENERAL)
-#include "logmacro.h"
-
-namespace {
-
-enum cfr_mask : u16
-{
- CFR_UPENABLEB = 0x0001,
- CFR_UPENABLEA = 0x0002,
- CFR_DSPENABLEB = 0x0004,
- CFR_DSPENABLEA = 0x0008,
- CFR_LDLINESTIP = 0x0010,
- CFR_FINISHLINE = 0x0020,
- CFR_INVERT = 0x0040,
- CFR_SCREENMASK = 0x0080,
- CFR_PFICD = 0x0100,
- CFR_PFICOLUMN = 0x0200,
- CFR_PFIYDOWN = 0x0400,
- CFR_PATTERN32 = 0x0800,
- CFR_PATTERN64 = 0x1000,
- CFR_ALLPATTERN = 0x2000,
- CFR_PFIXDOWN = 0x4000,
- CFR_PFIREAD = 0x8000,
-};
-enum ucr_mask : u16
-{
- UCR_BOARDDIS = 0x0100,
- UCR_MBENAB = 0x0200,
- UCR_INTRENAB = 0x0400,
- UCR_DMAENAB = 0x0800,
- UCR_ZERO = 0x1000, // read only
- UCR_VERTICAL = 0x2000, // read only
- UCR_VERTINTR = 0x4000, // read only
- UCR_BUSY = 0x8000, // read only
-
- UCR_WM = 0x0f00,
-};
-
-class sgi_gl2_device
- : public device_t
- , public device_multibus_interface
-{
-public:
- sgi_gl2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SGI_GL2, tag, owner, clock)
- , device_multibus_interface(mconfig, *this)
- , m_screen(*this, "screen")
- , m_cmap(*this, "cmap")
- , m_font(*this, "font", 0x8000, ENDIANNESS_BIG)
- , m_bp(nullptr)
- , m_installed(false)
- {
- }
-
- static constexpr feature_type imperfect_features() { return feature::GRAPHICS; }
-
-protected:
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- // GF2
- u16 fbc_readdpx_r();
- void fbc_clrint_w(u16 data);
- u16 fbc_flags_r();
- void fbc_flags_w(u16 data);
- u16 fbc_data_r();
- void fbc_data_w(u16 data);
- void ge_flags_w(u16 data);
-
- // DC4
- void flags_w(u16 data);
- template <unsigned Channel> void colormap_w(offs_t offset, u16 data, u16 mem_mask);
- u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect);
-
- // UC4
- u16 buf_r(offs_t offset);
- void buf_w(offs_t offset, u16 data, u16 mem_mask);
- u16 ucr_r();
- void ucr_w(u16 data);
- u16 cmd_r(offs_t offset);
- void cmd_w(offs_t offset, u16 data, u16 mem_mask);
-
- // BP4
- void bp_w(offs_t offset, u8 data, u8 mask);
-
-private:
- required_device<screen_device> m_screen;
- required_device<palette_device> m_cmap;
- memory_share_creator<u16> m_font;
-
- std::unique_ptr<u8[]> m_bp;
-
- u16 m_ed; // error delta
- u16 m_ec; // error correct
- u16 m_xs; // x start
- u16 m_xe; // x end
- u16 m_ys; // y start
- u16 m_ye; // y end
- u16 m_fma; // font memory address
- u16 m_da[4]; // dda address
- u16 m_dd[4]; // dda delta
- u8 m_md; // mode
- u8 m_rp; // repeat
- u16 m_cf; // config
-
- u16 m_ucr;
-
- u16 m_color;
- u16 m_we;
-
- u16 m_flags;
-
- util::fifo<u16, 16> m_params;
- u8 m_expect;
-
- bool m_installed;
-};
-
-void sgi_gl2_device::device_start()
-{
- m_bp = std::make_unique<u8[]>(0x10'0000); // 1024x1024x4 (not packed)
-
- save_item(NAME(m_ed));
- save_item(NAME(m_ec));
- save_item(NAME(m_xs));
- save_item(NAME(m_xe));
- save_item(NAME(m_ys));
- save_item(NAME(m_ye));
- save_item(NAME(m_fma));
- save_item(NAME(m_da));
- save_item(NAME(m_dd));
- save_item(NAME(m_md));
- save_item(NAME(m_rp));
- save_item(NAME(m_cf));
-
- save_item(NAME(m_ucr));
- save_item(NAME(m_color));
- save_item(NAME(m_we));
-
- save_pointer(NAME(m_bp), 0x10'0000);
-}
-
-void sgi_gl2_device::device_reset()
-{
- if (!m_installed)
- {
- // GF2 handlers
- m_bus->space(AS_IO).install_readwrite_handler(0x2000, 0x2001,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_readdpx_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_clrint_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x2400, 0x2401,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_flags_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_flags_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x2800, 0x2801,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_data_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::fbc_data_w)));
-
- m_bus->space(AS_IO).install_write_handler(0x2c00, 0x2c01,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::ge_flags_w)));
-
- // DC4 handlers
- m_bus->space(AS_IO).install_write_handler(0x4000, 0x4001,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::flags_w)));
- m_bus->space(AS_IO).install_write_handler(0x4200, 0x43ff,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::colormap_w<0>)));
- m_bus->space(AS_IO).install_write_handler(0x4400, 0x45ff,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::colormap_w<1>)));
- m_bus->space(AS_IO).install_write_handler(0x4600, 0x47ff,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::colormap_w<2>)));
-
- // UC4 handlers
- m_bus->space(AS_IO).install_readwrite_handler(0x3080, 0x30a5,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::buf_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::buf_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x3180, 0x3181,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::ucr_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::ucr_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x3200, 0x323f,
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::cmd_r)),
- emu::rw_delegate(*this, FUNC(sgi_gl2_device::cmd_w)));
-
- m_installed = true;
- }
-
- m_params.clear();
- m_expect = 0;
-}
-
-static const gfx_layout gl2_layout =
-{
- 8, 16, 1024, 1,
- { 0 },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 15 * 16, 14 * 16, 13 * 16, 12 * 16, 11 * 16, 10 * 16, 9 * 16, 8 * 16, 7 * 16, 6 * 16, 5 * 16, 4 * 16, 3 * 16, 2 * 16, 1 * 16, 0 * 16 },
- 16 * 16
-};
-
-static GFXDECODE_START(gl2_gfx)
- GFXDECODE_RAM("font", 0x0, gl2_layout, 0, 1)
-GFXDECODE_END
-
-void sgi_gl2_device::device_add_mconfig(machine_config &config)
-{
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_raw(1024 * 768 * 60, 1024, 0, 1024, 768, 0, 768);
- m_screen->set_screen_update(FUNC(sgi_gl2_device::screen_update));
-
- // MCM6168P45 x8x3 (4096x4 SRAM) 16K x3
- PALETTE(config, m_cmap);
- m_cmap->set_entries(4096);
-
- // gfxdecode is only to show the font data in the tile viewer
- GFXDECODE(config, "gfx", m_cmap, gl2_gfx);
-}
-
-u32 sgi_gl2_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect)
-{
- u8 const *src = m_bp.get();
-
- for (unsigned y = screen.visible_area().min_y; y <= screen.visible_area().max_y; y++)
- {
- for (unsigned x = screen.visible_area().min_x; x <= screen.visible_area().max_x; x++)
- {
- bitmap.pix(screen.visible_area().max_y - y, x) = m_cmap->pen_color(*src++);
- }
- }
-
- return 0;
-}
-
-u16 sgi_gl2_device::fbc_readdpx_r()
-{
- return 0;
-}
-
-void sgi_gl2_device::fbc_clrint_w(u16 data)
-{
- LOG("%s: fbc_clrint_w 0x%04x\n", machine().describe_context(), data);
-}
-
-u16 sgi_gl2_device::fbc_flags_r()
-{
- return 0x0002;
-}
-
-void sgi_gl2_device::fbc_flags_w(u16 data)
-{
- //LOG("%s: fbc_flags_w 0x%04x\n", machine().describe_context(), data);
-}
-
-u16 sgi_gl2_device::fbc_data_r()
-{
- return 0x40; // HACK: always ready
-}
-
-void sgi_gl2_device::fbc_data_w(u16 data)
-{
- LOG("%s: fbc_data_w 0x%04x expect %u\n", machine().describe_context(), data, m_expect);
-}
-
-void sgi_gl2_device::ge_flags_w(u16 data)
-{
- LOG("%s: ge_flags_w 0x%04x\n", machine().describe_context(), data);
-}
-
-u16 sgi_gl2_device::buf_r(offs_t offset)
-{
- switch (offset)
- {
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
- return m_da[offset & 0x3];
- }
-
- return 0;
-}
-
-void sgi_gl2_device::buf_w(offs_t offset, u16 data, u16 mem_mask)
-{
- static char const *const buf[] = {
- "", "LDED", "LDEC", "LDXS",
- "LDXE", "LDYS", "LDYE", "LDFMADDR",
- "LDDDASAF", "LDDDASAI", "LDDDAEAF", "LDDDAEAI",
- "LDDDASDF", "LDDDASDI", "LDDDAEDF", "LDDDAEDI",
- "LDMODE", "LDREPEAT", "LDCONFIG",
- };
-
- switch (offset)
- {
- case 0x01: m_ed = data & 0xfffU; break;
- case 0x02: m_ec = data & 0xfffU; break;
- case 0x03: m_xs = data & 0xfffU; break;
- case 0x04: m_xe = data & 0xfffU; break;
- case 0x05: m_ys = data & 0xfffU; break;
- case 0x06: m_ye = data & 0xfffU; break;
- case 0x07: m_fma = data; break;
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
- m_da[offset & 3] = data & 0xfffU;
- break;
- case 0x0c:
- case 0x0d:
- case 0x0e:
- case 0x0f:
- m_dd[offset & 3] = data & 0xfffU;
- break;
- case 0x10: m_md = data & 0xfU; break;
- case 0x11: m_rp = data; break;
- case 0x12: m_cf = data; break;
-
- default:
- LOG("%s: buf_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, buf[offset], data);
- break;
- }
-}
-
-u16 sgi_gl2_device::ucr_r()
-{
- return m_ucr;
-}
-
-void sgi_gl2_device::ucr_w(u16 data)
-{
- LOG("%s: ucr_w 0x%04x\n", machine().describe_context(), data);
-
- m_ucr = (m_ucr & ~UCR_WM) | (data & UCR_WM);
-}
-
-
-u16 sgi_gl2_device::cmd_r(offs_t offset) { return 0; }
-
-void sgi_gl2_device::cmd_w(offs_t offset, u16 data, u16 mem_mask)
-{
- static char const *const cmd[] = {
- "UC_READFONT", "UC_WRITEFONT", "UC_READREPEAT", "UC_SETADDRS",
- "UC_SAVEWORD", "UC_DRAWWORD", "UC_READLSTIP", "UC_NOOP",
- "", "UC_DRAWCHAR", "UC_FILLRECT", "UC_FILLTRAP",
- "UC_DRAWLINE1", "UC_DRAWLINE2", "UC_DRAWLINE4", "UC_DRAWLINE5",
- "UC_SETSCRMASKX", "UC_SETSCRMASKY", "", "",
- "UC_SETCOLORCD", "UC_SETCOLORAB", "UC_SETWECD", "UC_SETWEAB",
- "UC_READPIXELCD", "UC_READPIXELAB", "UC_DRAWPIXELCD", "UC_DRAWPIXELAB",
- "UC_DRAWLINE11", "UC_DRAWLINE10", "UC_DRAWLINE8", "UC_DRAWLINE7",
- };
-
- //LOG("%s: cmd_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, cmd[offset], data);
-
- switch (offset)
- {
- case 0x01: // UC_WRITEFONT
- m_font[m_fma++ & 0x3fff] = data;
- break;
- case 0x09: // UC_DRAWCHAR
- case 0x0a: // UC_FILLRECT
- for (int y = 0; y < m_ye - m_ys; y++)
- {
- u8 const data = m_font[(m_fma + (y & 0xfU)) & 0x3fff] >> 8;
- for (int x = 0; x < m_xe - m_xs; x++)
- {
- bp_w((m_ys + y) * 0x400 + m_xs + x, BIT(data, (x & 7) ^ 7) ? m_color : 0, m_we);
- }
- }
- break;
- case 0x15: m_color = data; break;
- case 0x17: m_we = data; break;
- default:
- LOG("%s: cmd_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, cmd[offset], data);
- break;
- }
-}
-
-void sgi_gl2_device::flags_w(u16 data)
-{
- LOG("%s: flags_w 0x%04x\n", machine().describe_context(), data);
-
- m_flags = data;
-}
-
-template <unsigned Channel> void sgi_gl2_device::colormap_w(offs_t offset, u16 data, u16 mem_mask)
-{
- unsigned const index = BIT(m_flags, 0, 4) << 8 | offset;
-
- switch (Channel)
- {
- case 0: m_cmap->set_pen_red_level(index, data); break;
- case 1: m_cmap->set_pen_green_level(index, data); break;
- case 2: m_cmap->set_pen_blue_level(index, data); break;
- }
-}
-
-void sgi_gl2_device::bp_w(offs_t offset, u8 data, u8 mask)
-{
- m_bp[offset] = (m_bp[offset] & ~mask) | (data & mask);
-}
-
-} // anonymous namespace
-
-DEFINE_DEVICE_TYPE_PRIVATE(SGI_GL2, device_multibus_interface, sgi_gl2_device, "sgi_gl2", "Silicon Graphics GL2")
diff --git a/src/mame/sgi/gl2.h b/src/mame/sgi/gl2.h
deleted file mode 100644
index 8a4579c724b..00000000000
--- a/src/mame/sgi/gl2.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_SGI_GL2_H
-#define MAME_SGI_GL2_H
-
-#pragma once
-
-#include "bus/multibus/multibus.h"
-
-DECLARE_DEVICE_TYPE(SGI_GL2, device_multibus_interface)
-
-#endif // MAME_SGI_GL2_H
diff --git a/src/mame/sgi/gl2/bp3.cpp b/src/mame/sgi/gl2/bp3.cpp
deleted file mode 100644
index d250713bae8..00000000000
--- a/src/mame/sgi/gl2/bp3.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * SGI IRIS BP3 Bitplane
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-
-/*
- * WIP
- * --
- * - each bit plane is 1024x1024x1
- * - BP3 consists of 4 bit planes
- * - 1024x768 displayed
- * - bitplanes can store different data depending on mode
- * - RGB mode: digital color codes, minimum 6 BP3 boards, 3x8-bit color
- * - color map mode: index into color map
- * - z-buffer mode: depth data (12 bitplanes also hold color map data)
- * - bitplanes are divided into halves A&B
- * - each half is used in double buffer mode
- * - single buffer mode: B1=8 A1=4 B0=2 A0=1
- * - double buffer mode: A1/B1=2 A0/B0=1
- * - lower numbered slots produce higher-order bitplane data
- * -
- */
-#include "emu.h"
-
-#include "bp3.h"
-
-#define VERBOSE (LOG_GENERAL)
-#include "logmacro.h"
-
-namespace {
-
-class sgi_bp3_device
- : public device_t
- , public device_multibus_interface
-{
-public:
- sgi_bp3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SGI_BP3, tag, owner, clock)
- , device_multibus_interface(mconfig, *this)
- , m_installed(false)
- {
- }
-
-protected:
- //virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- //virtual ioport_constructor device_input_ports() const override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
-private:
- bool m_installed;
-};
-
-void sgi_bp3_device::device_start()
-{
-}
-
-void sgi_bp3_device::device_reset()
-{
- if (!m_installed)
- {
- //m_bus->space(AS_IO).install_read_handler(0x1400, 0x1401, emu::rw_delegate(*this, FUNC(sgi_bp3_device::)));
- //m_bus->space(AS_IO).install_write_handler(0x1400, 0x1401, emu::rw_delegate(*this, FUNC(sgi_bp3_device::)));
-
- m_installed = true;
- }
-}
-
-void sgi_bp3_device::device_add_mconfig(machine_config &config)
-{
-}
-
-} // anonymous namespace
-
-DEFINE_DEVICE_TYPE_PRIVATE(SGI_BP3, device_multibus_interface, sgi_bp3_device, "sgi_bp3", "Silicon Graphics BP3 Bitplane")
diff --git a/src/mame/sgi/gl2/bp3.h b/src/mame/sgi/gl2/bp3.h
deleted file mode 100644
index 0bfeeacfb4f..00000000000
--- a/src/mame/sgi/gl2/bp3.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_SGI_BP3_H
-#define MAME_SGI_BP3_H
-
-#pragma once
-
-#include "bus/multibus/multibus.h"
-
-DECLARE_DEVICE_TYPE(SGI_BP3, device_multibus_interface)
-
-#endif // MAME_SGI_BP3_H
diff --git a/src/mame/sgi/gl2/dc4.cpp b/src/mame/sgi/gl2/dc4.cpp
deleted file mode 100644
index 2752d593927..00000000000
--- a/src/mame/sgi/gl2/dc4.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * SGI IRIS DC4 Display Controller
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-
-/*
- * WIP
- * --
- * - color map is 4096x24 RAM
- * - addressed with 12 bits, giving 4096 colors
- * - accessed from bitplanes and Multibus
- * - bitplanes (color lookup)
- * - Multibus (update color map)
- */
-#include "emu.h"
-
-#include "dc4.h"
-
-//#define VERBOSE (LOG_GENERAL)
-#include "logmacro.h"
-
-sgi_dc4_device::sgi_dc4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SGI_DC4, tag, owner, clock)
- , device_multibus_interface(mconfig, *this)
- , m_screen(*this, "screen")
- , m_cmap(*this, "cmap")
- , m_bp(nullptr)
- , m_installed(false)
-{
-}
-
-void sgi_dc4_device::device_start()
-{
- m_bp = std::make_unique<u8[]>(0x10'0000); // 1024x1024x4 (not packed)
-
- save_pointer(NAME(m_bp), 0x10'0000);
-}
-
-void sgi_dc4_device::device_reset()
-{
- if (!m_installed)
- {
- m_bus->space(AS_IO).install_write_handler(0x4000, 0x4001, emu::rw_delegate(*this, FUNC(sgi_dc4_device::flags_w)));
- m_bus->space(AS_IO).install_write_handler(0x4200, 0x43ff, emu::rw_delegate(*this, FUNC(sgi_dc4_device::colormap_w<0>)));
- m_bus->space(AS_IO).install_write_handler(0x4400, 0x45ff, emu::rw_delegate(*this, FUNC(sgi_dc4_device::colormap_w<1>)));
- m_bus->space(AS_IO).install_write_handler(0x4600, 0x47ff, emu::rw_delegate(*this, FUNC(sgi_dc4_device::colormap_w<2>)));
-
- m_installed = true;
- }
-}
-
-u32 sgi_dc4_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect)
-{
- u8 const *src = m_bp.get();
-
- for (unsigned y = screen.visible_area().min_y; y <= screen.visible_area().max_y; y++)
- {
- for (unsigned x = screen.visible_area().min_x; x <= screen.visible_area().max_x; x++)
- {
- bitmap.pix(screen.visible_area().max_y - y, x) = m_cmap->pen_color(*src++);
- }
- }
-
- return 0;
-}
-
-void sgi_dc4_device::device_add_mconfig(machine_config &config)
-{
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_raw(1024 * 768 * 60, 1024, 0, 1024, 768, 0, 768);
- m_screen->set_screen_update(FUNC(sgi_dc4_device::screen_update));
-
- // MCM6168P45 x8x3 (4096x4 SRAM) 16K x3
- PALETTE(config, m_cmap);
- m_cmap->set_entries(4096);
-}
-
-void sgi_dc4_device::flags_w(u16 data) { LOG("%s: flags_w 0x%04x\n", machine().describe_context(), data); m_flags = data; }
-
-template <unsigned Channel> void sgi_dc4_device::colormap_w(offs_t offset, u16 data, u16 mem_mask)
-{
- unsigned const index = BIT(m_flags, 0, 4) << 8 | offset;
-
- switch (Channel)
- {
- case 0: m_cmap->set_pen_red_level(index, data); break;
- case 1: m_cmap->set_pen_green_level(index, data); break;
- case 2: m_cmap->set_pen_blue_level(index, data); break;
- }
-}
-
-void sgi_dc4_device::bp_w(offs_t offset, u8 data, u8 mask)
-{
- m_bp[offset] = (m_bp[offset] & ~mask) | (data & mask);
-}
-
-DEFINE_DEVICE_TYPE(SGI_DC4, sgi_dc4_device, "sgi_dc4", "Silicon Graphics DC4 Display Controller")
diff --git a/src/mame/sgi/gl2/dc4.h b/src/mame/sgi/gl2/dc4.h
deleted file mode 100644
index 8b4e8d09382..00000000000
--- a/src/mame/sgi/gl2/dc4.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_SGI_DC4_H
-#define MAME_SGI_DC4_H
-
-#pragma once
-
-#include "bus/multibus/multibus.h"
-
-#include "emupal.h"
-#include "screen.h"
-
-class sgi_dc4_device
- : public device_t
- , public device_multibus_interface
-{
-public:
- sgi_dc4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
-
- void bp_w(offs_t offset, u8 data, u8 mask);
-
- static constexpr feature_type imperfect_features() { return feature::GRAPHICS; }
-
-protected:
- //virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- //virtual ioport_constructor device_input_ports() const override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rectangle const &cliprect);
-
- void flags_w(u16 data);
-
- template <unsigned Channel> void colormap_w(offs_t offset, u16 data, u16 mem_mask);
-
-private:
- required_device<screen_device> m_screen;
- required_device<palette_device> m_cmap;
-
- std::unique_ptr<u8[]> m_bp;
-
- u16 m_flags;
-
- bool m_installed;
-};
-
-DECLARE_DEVICE_TYPE(SGI_DC4, sgi_dc4_device)
-
-#endif // MAME_SGI_DC4_H
diff --git a/src/mame/sgi/gl2/gf2.cpp b/src/mame/sgi/gl2/gf2.cpp
deleted file mode 100644
index 5ca3a21fbea..00000000000
--- a/src/mame/sgi/gl2/gf2.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * SGI IRIS GF2 Geometry Pipeline/Frame Buffer Controller
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-
-#include "emu.h"
-
-#include "gf2.h"
-
-#define VERBOSE (LOG_GENERAL)
-#include "logmacro.h"
-
-namespace {
-
-class sgi_gf2_device
- : public device_t
- , public device_multibus_interface
-{
-public:
- sgi_gf2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SGI_GF2, tag, owner, clock)
- , device_multibus_interface(mconfig, *this)
- , m_installed(false)
- {
- }
-
- static constexpr feature_type unemulated_features() { return feature::GRAPHICS; }
-
-protected:
- //virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- //virtual ioport_constructor device_input_ports() const override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- u16 fbc_readdpx_r() { return 0; }
- void fbc_clrint_w(u16 data) { LOG("%s: fbc_clrint_w 0x%04x\n", machine().describe_context(), data); }
- u16 fbc_flags_r() { return 0x0002; }
- void fbc_flags_w(u16 data) { LOG("%s: fbc_flags_w 0x%04x\n", machine().describe_context(), data); }
- u16 fbc_data_r() { return 0; }
- void fbc_data_w(u16 data) { LOG("%s: fbc_data_w 0x%04x\n", machine().describe_context(), data); }
-
- void ge_flags_w(u16 data) { LOG("%s: ge_flags_w 0x%04x\n", machine().describe_context(), data); }
-
-private:
- bool m_installed;
-};
-
-void sgi_gf2_device::device_start()
-{
-}
-
-void sgi_gf2_device::device_reset()
-{
- if (!m_installed)
- {
- m_bus->space(AS_IO).install_readwrite_handler(0x2000, 0x2001,
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_readdpx_r)),
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_clrint_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x2400, 0x2401,
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_flags_r)),
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_flags_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x2800, 0x2801,
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_data_r)),
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::fbc_data_w)));
-
- m_bus->space(AS_IO).install_write_handler(0x2c00, 0x2c01,
- emu::rw_delegate(*this, FUNC(sgi_gf2_device::ge_flags_w)));
-
- m_installed = true;
- }
-}
-
-void sgi_gf2_device::device_add_mconfig(machine_config &config)
-{
-}
-
-} // anonymous namespace
-
-DEFINE_DEVICE_TYPE_PRIVATE(SGI_GF2, device_multibus_interface, sgi_gf2_device, "sgi_gf2", "Silicon Graphics GF2 Geometry Pipeline/Frame Buffer Controller")
diff --git a/src/mame/sgi/gl2/gf2.h b/src/mame/sgi/gl2/gf2.h
deleted file mode 100644
index de44a0e46c9..00000000000
--- a/src/mame/sgi/gl2/gf2.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_SGI_GF2_H
-#define MAME_SGI_GF2_H
-
-#pragma once
-
-#include "bus/multibus/multibus.h"
-
-DECLARE_DEVICE_TYPE(SGI_GF2, device_multibus_interface)
-
-#endif // MAME_SGI_GF2_H
diff --git a/src/mame/sgi/gl2/uc4.cpp b/src/mame/sgi/gl2/uc4.cpp
deleted file mode 100644
index 4c018d028cd..00000000000
--- a/src/mame/sgi/gl2/uc4.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-/*
- * SGI IRIS UC4 Update Controller
- *
- * Sources:
- * -
- *
- * TODO:
- * - everything
- */
-
-/*
- * WIP
- * --
- * - font ram MB81416-12 x4 (16384x4 RAM)
- * - counter low 8 bits -> rectadr
- * - counter hi 8 bits -> patadr
- */
-#include "emu.h"
-
-#include "uc4.h"
-
-#include "emupal.h"
-#include "screen.h"
-
-//#define VERBOSE (LOG_GENERAL)
-#include "logmacro.h"
-
-enum cfr_mask : u16
-{
- CFR_UPENABLEB = 0x0001,
- CFR_UPENABLEA = 0x0002,
- CFR_DSPENABLEB = 0x0004,
- CFR_DSPENABLEA = 0x0008,
- CFR_LDLINESTIP = 0x0010,
- CFR_FINISHLINE = 0x0020,
- CFR_INVERT = 0x0040,
- CFR_SCREENMASK = 0x0080,
- CFR_PFICD = 0x0100,
- CFR_PFICOLUMN = 0x0200,
- CFR_PFIYDOWN = 0x0400,
- CFR_PATTERN32 = 0x0800,
- CFR_PATTERN64 = 0x1000,
- CFR_ALLPATTERN = 0x2000,
- CFR_PFIXDOWN = 0x4000,
- CFR_PFIREAD = 0x8000,
-};
-enum ucr_mask : u16
-{
- UCR_BOARDDIS = 0x0100,
- UCR_MBENAB = 0x0200,
- UCR_INTRENAB = 0x0400,
- UCR_DMAENAB = 0x0800,
- UCR_ZERO = 0x1000, // read only
- UCR_VERTICAL = 0x2000, // read only
- UCR_VERTINTR = 0x4000, // read only
- UCR_BUSY = 0x8000, // read only
-
- UCR_WM = 0x0f00,
-};
-sgi_uc4_device::sgi_uc4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SGI_UC4, tag, owner, clock)
- , device_multibus_interface(mconfig, *this)
- , m_font(*this, "font", 0x8000, ENDIANNESS_BIG)
- , m_dc(*this, finder_base::DUMMY_TAG)
- , m_installed(false)
-{
-}
-
-void sgi_uc4_device::device_start()
-{
- save_item(NAME(m_ed));
- save_item(NAME(m_ec));
- save_item(NAME(m_xs));
- save_item(NAME(m_xe));
- save_item(NAME(m_ys));
- save_item(NAME(m_ye));
- save_item(NAME(m_fma));
- save_item(NAME(m_da));
- save_item(NAME(m_dd));
- save_item(NAME(m_md));
- save_item(NAME(m_rp));
- save_item(NAME(m_cf));
-
- save_item(NAME(m_ucr));
- save_item(NAME(m_color));
- save_item(NAME(m_we));
-}
-
-void sgi_uc4_device::device_reset()
-{
- if (!m_installed)
- {
- m_bus->space(AS_IO).install_readwrite_handler(0x3080, 0x30a5,
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::buf_r)),
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::buf_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x3180, 0x3181,
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::ucr_r)),
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::ucr_w)));
-
- m_bus->space(AS_IO).install_readwrite_handler(0x3200, 0x323f,
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::cmd_r)),
- emu::rw_delegate(*this, FUNC(sgi_uc4_device::cmd_w)));
-
- m_installed = true;
- }
-
- m_fma = 0;
- m_md = 0;
- m_rp = 0;
- m_cf = 0;
-
- m_ucr = 0;
-}
-
-static const gfx_layout uc4_layout =
-{
- 8, 16, 1024, 1,
- { 0 },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 15 * 16, 14 * 16, 13 * 16, 12 * 16, 11 * 16, 10 * 16, 9 * 16, 8 * 16, 7 * 16, 6 * 16, 5 * 16, 4 * 16, 3 * 16, 2 * 16, 1 * 16, 0 * 16 },
- 16 * 16
-};
-
-static GFXDECODE_START(uc4_gfx)
- GFXDECODE_RAM("font", 0x0, uc4_layout, 0, 1)
-GFXDECODE_END
-
-void sgi_uc4_device::device_add_mconfig(machine_config &config)
-{
- // gfxdecode is only to show the font data in the tile viewer
- PALETTE(config, "palette", palette_device::MONOCHROME);
- GFXDECODE(config, "gfx", "palette", uc4_gfx);
-}
-
-u16 sgi_uc4_device::buf_r(offs_t offset)
-{
- switch (offset)
- {
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
- return m_da[offset & 0x3];
- }
-
- return 0;
-}
-
-void sgi_uc4_device::buf_w(offs_t offset, u16 data, u16 mem_mask)
-{
- static char const *const buf[] = {
- "", "LDED", "LDEC", "LDXS",
- "LDXE", "LDYS", "LDYE", "LDFMADDR",
- "LDDDASAF", "LDDDASAI", "LDDDAEAF", "LDDDAEAI",
- "LDDDASDF", "LDDDASDI", "LDDDAEDF", "LDDDAEDI",
- "LDMODE", "LDREPEAT", "LDCONFIG",
- };
-
- switch (offset)
- {
- case 0x01: m_ed = data & 0xfffU; break;
- case 0x02: m_ec = data & 0xfffU; break;
- case 0x03: m_xs = data & 0xfffU; break;
- case 0x04: m_xe = data & 0xfffU; break;
- case 0x05: m_ys = data & 0xfffU; break;
- case 0x06: m_ye = data & 0xfffU; break;
- case 0x07: m_fma = data; break;
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
- m_da[offset & 3] = data & 0xfffU;
- break;
- case 0x0c:
- case 0x0d:
- case 0x0e:
- case 0x0f:
- m_dd[offset & 3] = data & 0xfffU;
- break;
- case 0x10: m_md = data & 0xfU; break;
- case 0x11: m_rp = data; break;
- case 0x12: m_cf = data; break;
-
- default:
- LOG("%s: buf_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, buf[offset], data);
- break;
- }
-}
-
-u16 sgi_uc4_device::ucr_r()
-{
- return m_ucr;
-}
-
-void sgi_uc4_device::ucr_w(u16 data)
-{
- LOG("%s: ucr_w 0x%04x\n", machine().describe_context(), data);
-
- m_ucr = (m_ucr & ~UCR_WM) | (data & UCR_WM);
-}
-
-
-u16 sgi_uc4_device::cmd_r(offs_t offset) { return 0; }
-
-void sgi_uc4_device::cmd_w(offs_t offset, u16 data, u16 mem_mask)
-{
- static char const *const cmd[] = {
- "UC_READFONT", "UC_WRITEFONT", "UC_READREPEAT", "UC_SETADDRS",
- "UC_SAVEWORD", "UC_DRAWWORD", "UC_READLSTIP", "UC_NOOP",
- "", "UC_DRAWCHAR", "UC_FILLRECT", "UC_FILLTRAP",
- "UC_DRAWLINE1", "UC_DRAWLINE2", "UC_DRAWLINE4", "UC_DRAWLINE5",
- "UC_SETSCRMASKX", "UC_SETSCRMASKY", "", "",
- "UC_SETCOLORCD", "UC_SETCOLORAB", "UC_SETWECD", "UC_SETWEAB",
- "UC_READPIXELCD", "UC_READPIXELAB", "UC_DRAWPIXELCD", "UC_DRAWPIXELAB",
- "UC_DRAWLINE11", "UC_DRAWLINE10", "UC_DRAWLINE8", "UC_DRAWLINE7",
- };
-
- //LOG("%s: cmd_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, cmd[offset], data);
-
- switch (offset)
- {
- case 0x01: // UC_WRITEFONT
- m_font[m_fma++ & 0x3fff] = data;
- break;
- case 0x09: // UC_DRAWCHAR
- case 0x0a: // UC_FILLRECT
- for (int y = 0; y < m_ye - m_ys; y++)
- {
- u8 const data = m_font[(m_fma + (y & 0xfU)) & 0x3fff] >> 8;
- for (int x = 0; x < m_xe - m_xs; x++)
- {
- m_dc->bp_w((m_ys + y) * 0x400 + m_xs + x, BIT(data, (x & 7) ^ 7) ? m_color : 0, m_we);
- }
- }
- break;
- case 0x15: m_color = data; break;
- case 0x17: m_we = data; break;
- default:
- LOG("%s: cmd_w 0x%02x %s(0x%04x)\n", machine().describe_context(), offset, cmd[offset], data);
- break;
- }
-}
-
-DEFINE_DEVICE_TYPE(SGI_UC4, sgi_uc4_device, "sgi_uc4", "Silicon Graphics UC4 Update Controller")
diff --git a/src/mame/sgi/gl2/uc4.h b/src/mame/sgi/gl2/uc4.h
deleted file mode 100644
index 93d9c710931..00000000000
--- a/src/mame/sgi/gl2/uc4.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Patrick Mackinlay
-
-#ifndef MAME_SGI_UC4_H
-#define MAME_SGI_UC4_H
-
-#pragma once
-
-#include "bus/multibus/multibus.h"
-
-#include "dc4.h"
-
-class sgi_uc4_device
- : public device_t
- , public device_multibus_interface
-{
-public:
- template <typename T> void set_dc(T &&tag) { m_dc.set_tag(std::forward<T>(tag)); }
-
- sgi_uc4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
-
- static constexpr feature_type imperfect_features() { return feature::GRAPHICS; }
-
-protected:
- //virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- //virtual ioport_constructor device_input_ports() const override ATTR_COLD;
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- u16 buf_r(offs_t offset);
- void buf_w(offs_t offset, u16 data, u16 mem_mask);
- u16 ucr_r();
- void ucr_w(u16 data);
- u16 cmd_r(offs_t offset);
- void cmd_w(offs_t offset, u16 data, u16 mem_mask);
-
-private:
- memory_share_creator<u16> m_font;
- optional_device<sgi_dc4_device> m_dc;
-
- u16 m_ed; // error delta
- u16 m_ec; // error correct
- u16 m_xs; // x start
- u16 m_xe; // x end
- u16 m_ys; // y start
- u16 m_ye; // y end
- u16 m_fma; // font memory address
- u16 m_da[4]; // dda address
- u16 m_dd[4]; // dda delta
- u8 m_md; // mode
- u8 m_rp; // repeat
- u16 m_cf; // config
-
- u16 m_ucr;
-
- u16 m_color;
- u16 m_we;
-
- bool m_installed;
-};
-
-DECLARE_DEVICE_TYPE(SGI_UC4, sgi_uc4_device)
-
-#endif // MAME_SGI_UC4_H
diff --git a/src/mame/sgi/iris.cpp b/src/mame/sgi/iris.cpp
index d1d205c071a..76cf18c7ad6 100644
--- a/src/mame/sgi/iris.cpp
+++ b/src/mame/sgi/iris.cpp
@@ -46,7 +46,6 @@
#include "pm2.h"
#include "gl1.h"
-#include "gl2.h"
#include "iris1400.lh"
@@ -145,7 +144,6 @@ static void iris_g_cards(device_slot_interface &device)
{
// graphics side cards
device.option_add("gl1", SGI_GL1);
- device.option_add("gl2", SGI_GL2);
}
// 20-slot chassis, card positions assumed from 2xxx
@@ -198,8 +196,6 @@ void iris_state::iris3130(machine_config &config)
m_slot[1]->set_default_option("ip2");
m_slot[2]->set_default_option("nex");
m_slot[3]->set_default_option("dsd");
-
- m_slot[19]->set_default_option("gl2");
}
ROM_START(iris1400)
diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp
index 7c2f1caeb3a..7ede9f7016b 100644
--- a/src/osd/modules/sound/xaudio2_sound.cpp
+++ b/src/osd/modules/sound/xaudio2_sound.cpp
@@ -244,9 +244,9 @@ private:
bool engine_error;
private:
- virtual void STDMETHODCALLTYPE OnProcessingPassStart() noexcept override { }
- virtual void STDMETHODCALLTYPE OnProcessingPassEnd() noexcept override { }
- virtual void STDMETHODCALLTYPE OnCriticalError(HRESULT error) noexcept override;
+ virtual void STDMETHODCALLTYPE OnProcessingPassStart() override { }
+ virtual void STDMETHODCALLTYPE OnProcessingPassEnd() override { }
+ virtual void STDMETHODCALLTYPE OnCriticalError(HRESULT error) override;
sound_xaudio2 & m_host;
};
@@ -903,7 +903,7 @@ sound_xaudio2::device_info::~device_info()
// IXAudio2EngineCallback::OnCriticalError
//============================================================
-void sound_xaudio2::device_info::OnCriticalError(HRESULT error) noexcept
+void sound_xaudio2::device_info::OnCriticalError(HRESULT error)
{
std::string name;
{