mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
SGI GIO rename to GIO64 (#5125)
-gio: Renamed GIO slot device implementation to GIO64, nw
This commit is contained in:
parent
2112658a05
commit
78d3026f86
@ -969,15 +969,15 @@ end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/gio/gio.h,BUSES["GIO"] = true
|
||||
--@src/devices/bus/gio64/gio64.h,BUSES["GIO64"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["GIO"]~=null) then
|
||||
if (BUSES["GIO64"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/gio/gio.cpp",
|
||||
MAME_DIR .. "src/devices/bus/gio/gio.h",
|
||||
MAME_DIR .. "src/devices/bus/gio/newport.cpp",
|
||||
MAME_DIR .. "src/devices/bus/gio/newport.h",
|
||||
MAME_DIR .. "src/devices/bus/gio64/gio64.cpp",
|
||||
MAME_DIR .. "src/devices/bus/gio64/gio64.h",
|
||||
MAME_DIR .. "src/devices/bus/gio64/newport.cpp",
|
||||
MAME_DIR .. "src/devices/bus/gio64/newport.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -1,182 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz
|
||||
/***************************************************************************
|
||||
|
||||
gio.cpp - SGI GIO slot bus and GIO device emulation
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
// Display boards
|
||||
#include "newport.h"
|
||||
|
||||
#include "gio.h"
|
||||
|
||||
void gio_cards(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("xl8", GIO_XL8); /* SGI 8-bit XL board */
|
||||
device.option_add("xl24", GIO_XL24); /* SGI 24-bit XL board */
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(GIO_SLOT, gio_slot_device, "gio_slot", "SGI GIO Slot")
|
||||
|
||||
gio_slot_device::gio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: gio_slot_device(mconfig, GIO_SLOT, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
gio_slot_device::gio_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_slot_interface(mconfig, *this)
|
||||
, m_gio(*this, finder_base::DUMMY_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
void gio_slot_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
device_t *const card(get_card_device());
|
||||
if (card && !dynamic_cast<device_gio_card_interface *>(card))
|
||||
osd_printf_error("Card device %s (%s) does not implement device_gio_card_interface\n", card->tag(), card->name());
|
||||
}
|
||||
|
||||
void gio_slot_device::device_resolve_objects()
|
||||
{
|
||||
device_gio_card_interface *const gio_card(dynamic_cast<device_gio_card_interface *>(get_card_device()));
|
||||
if (gio_card)
|
||||
gio_card->set_gio(m_gio, tag());
|
||||
}
|
||||
|
||||
void gio_slot_device::device_start()
|
||||
{
|
||||
device_t *const card(get_card_device());
|
||||
if (card && !dynamic_cast<device_gio_card_interface *>(card))
|
||||
throw emu_fatalerror("gio_slot_device: card device %s (%s) does not implement device_gio_card_interface\n", card->tag(), card->name());
|
||||
}
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(GIO, gio_device, "gio", "SGI GIO Bus")
|
||||
|
||||
device_memory_interface::space_config_vector gio_device::memory_space_config() const
|
||||
{
|
||||
return space_config_vector {
|
||||
std::make_pair(0, &m_space_config)
|
||||
};
|
||||
}
|
||||
|
||||
gio_device::gio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: gio_device(mconfig, GIO, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
gio_device::gio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_space_config("GIO Space", ENDIANNESS_BIG, 64, 32, 0, address_map_constructor())
|
||||
, m_maincpu(*this, finder_base::DUMMY_TAG)
|
||||
, m_hpc3(*this, finder_base::DUMMY_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
void gio_device::device_resolve_objects()
|
||||
{
|
||||
}
|
||||
|
||||
void gio_device::device_start()
|
||||
{
|
||||
std::fill(std::begin(m_device_list), std::end(m_device_list), nullptr);
|
||||
|
||||
m_space = &space(0);
|
||||
m_space->install_readwrite_handler(0x00000000, 0x003fffff, read64_delegate(FUNC(gio_device::no_gfx_r), this), write64_delegate(FUNC(gio_device::no_gfx_w), this));
|
||||
m_space->install_readwrite_handler(0x00400000, 0x005fffff, read64_delegate(FUNC(gio_device::no_exp0_r), this), write64_delegate(FUNC(gio_device::no_exp0_w), this));
|
||||
m_space->install_readwrite_handler(0x00600000, 0x009fffff, read64_delegate(FUNC(gio_device::no_exp1_r), this), write64_delegate(FUNC(gio_device::no_exp1_w), this));
|
||||
}
|
||||
|
||||
READ64_MEMBER(gio_device::no_gfx_r) { return ~0ULL; }
|
||||
READ64_MEMBER(gio_device::no_exp0_r) { return ~0ULL; }
|
||||
READ64_MEMBER(gio_device::no_exp1_r) { return ~0ULL; }
|
||||
WRITE64_MEMBER(gio_device::no_gfx_w) { }
|
||||
WRITE64_MEMBER(gio_device::no_exp0_w) { }
|
||||
WRITE64_MEMBER(gio_device::no_exp1_w) { }
|
||||
|
||||
READ64_MEMBER(gio_device::read)
|
||||
{
|
||||
return m_space->read_qword(offset << 3, mem_mask);
|
||||
}
|
||||
|
||||
WRITE64_MEMBER(gio_device::write)
|
||||
{
|
||||
m_space->write_qword(offset << 3, data, mem_mask);
|
||||
}
|
||||
|
||||
device_gio_card_interface *gio_device::get_gio_card(int slot)
|
||||
{
|
||||
if (slot < 0)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (m_device_list[slot])
|
||||
{
|
||||
return m_device_list[slot];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void gio_device::add_gio_card(device_gio_card_interface::gio_slot_type_t slot_type, device_gio_card_interface *card)
|
||||
{
|
||||
m_device_list[slot_type] = card;
|
||||
card->install_device();
|
||||
}
|
||||
|
||||
|
||||
|
||||
device_gio_card_interface::device_gio_card_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
, m_gio(nullptr)
|
||||
, m_gio_slottag(nullptr)
|
||||
, m_slot_type(GIO_SLOT_COUNT)
|
||||
{
|
||||
}
|
||||
|
||||
device_gio_card_interface::~device_gio_card_interface()
|
||||
{
|
||||
}
|
||||
|
||||
void device_gio_card_interface::interface_validity_check(validity_checker &valid) const
|
||||
{
|
||||
}
|
||||
|
||||
void device_gio_card_interface::interface_pre_start()
|
||||
{
|
||||
device_slot_card_interface::interface_pre_start();
|
||||
|
||||
if (!m_gio)
|
||||
{
|
||||
fatalerror("Can't find SGI GIO device\n");
|
||||
}
|
||||
|
||||
if (GIO_SLOT_COUNT == m_slot_type)
|
||||
{
|
||||
if (!m_gio->started())
|
||||
throw device_missing_dependencies();
|
||||
|
||||
if (strcmp(m_gio_slottag, ":gio_gfx") == 0)
|
||||
m_slot_type = GIO_SLOT_GFX;
|
||||
else if (strcmp(m_gio_slottag, ":gio_exp0") == 0)
|
||||
m_slot_type = GIO_SLOT_EXP0;
|
||||
else if (strcmp(m_gio_slottag, ":gio_exp1") == 0)
|
||||
m_slot_type = GIO_SLOT_EXP1;
|
||||
else
|
||||
fatalerror("Slot %s incorrectly named for SGI GIO graphics slot\n", m_gio_slottag);
|
||||
|
||||
m_gio->add_gio_card(m_slot_type, this);
|
||||
}
|
||||
}
|
||||
|
||||
void device_gio_card_interface::set_gio(gio_device *gio, const char *slottag)
|
||||
{
|
||||
m_gio = gio;
|
||||
m_gio_slottag = slottag;
|
||||
}
|
182
src/devices/bus/gio64/gio64.cpp
Normal file
182
src/devices/bus/gio64/gio64.cpp
Normal file
@ -0,0 +1,182 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz
|
||||
/***************************************************************************
|
||||
|
||||
gio64.cpp - SGI GIO64 slot bus and GIO64 device emulation
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
// Display boards
|
||||
#include "newport.h"
|
||||
|
||||
#include "gio64.h"
|
||||
|
||||
void gio64_cards(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("xl8", GIO64_XL8); /* SGI 8-bit XL board */
|
||||
device.option_add("xl24", GIO64_XL24); /* SGI 24-bit XL board */
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(GIO64_SLOT, gio64_slot_device, "gio64_slot", "SGI GIO64 Slot")
|
||||
|
||||
gio64_slot_device::gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: gio64_slot_device(mconfig, GIO64_SLOT, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
gio64_slot_device::gio64_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_slot_interface(mconfig, *this)
|
||||
, m_gio64(*this, finder_base::DUMMY_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
void gio64_slot_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
device_t *const card(get_card_device());
|
||||
if (card && !dynamic_cast<device_gio64_card_interface *>(card))
|
||||
osd_printf_error("Card device %s (%s) does not implement device_gio64_card_interface\n", card->tag(), card->name());
|
||||
}
|
||||
|
||||
void gio64_slot_device::device_resolve_objects()
|
||||
{
|
||||
device_gio64_card_interface *const gio64_card(dynamic_cast<device_gio64_card_interface *>(get_card_device()));
|
||||
if (gio64_card)
|
||||
gio64_card->set_gio64(m_gio64, tag());
|
||||
}
|
||||
|
||||
void gio64_slot_device::device_start()
|
||||
{
|
||||
device_t *const card(get_card_device());
|
||||
if (card && !dynamic_cast<device_gio64_card_interface *>(card))
|
||||
throw emu_fatalerror("gio64_slot_device: card device %s (%s) does not implement device_gio64_card_interface\n", card->tag(), card->name());
|
||||
}
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(GIO64, gio64_device, "gio64", "SGI GIO64 Bus")
|
||||
|
||||
device_memory_interface::space_config_vector gio64_device::memory_space_config() const
|
||||
{
|
||||
return space_config_vector {
|
||||
std::make_pair(0, &m_space_config)
|
||||
};
|
||||
}
|
||||
|
||||
gio64_device::gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: gio64_device(mconfig, GIO64, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
gio64_device::gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_memory_interface(mconfig, *this)
|
||||
, m_space_config("GIO64 Space", ENDIANNESS_BIG, 64, 32, 0, address_map_constructor())
|
||||
, m_maincpu(*this, finder_base::DUMMY_TAG)
|
||||
, m_hpc3(*this, finder_base::DUMMY_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
void gio64_device::device_resolve_objects()
|
||||
{
|
||||
}
|
||||
|
||||
void gio64_device::device_start()
|
||||
{
|
||||
std::fill(std::begin(m_device_list), std::end(m_device_list), nullptr);
|
||||
|
||||
m_space = &space(0);
|
||||
m_space->install_readwrite_handler(0x00000000, 0x003fffff, read64_delegate(FUNC(gio64_device::no_gfx_r), this), write64_delegate(FUNC(gio64_device::no_gfx_w), this));
|
||||
m_space->install_readwrite_handler(0x00400000, 0x005fffff, read64_delegate(FUNC(gio64_device::no_exp0_r), this), write64_delegate(FUNC(gio64_device::no_exp0_w), this));
|
||||
m_space->install_readwrite_handler(0x00600000, 0x009fffff, read64_delegate(FUNC(gio64_device::no_exp1_r), this), write64_delegate(FUNC(gio64_device::no_exp1_w), this));
|
||||
}
|
||||
|
||||
READ64_MEMBER(gio64_device::no_gfx_r) { return ~0ULL; }
|
||||
READ64_MEMBER(gio64_device::no_exp0_r) { return ~0ULL; }
|
||||
READ64_MEMBER(gio64_device::no_exp1_r) { return ~0ULL; }
|
||||
WRITE64_MEMBER(gio64_device::no_gfx_w) { }
|
||||
WRITE64_MEMBER(gio64_device::no_exp0_w) { }
|
||||
WRITE64_MEMBER(gio64_device::no_exp1_w) { }
|
||||
|
||||
READ64_MEMBER(gio64_device::read)
|
||||
{
|
||||
return m_space->read_qword(offset << 3, mem_mask);
|
||||
}
|
||||
|
||||
WRITE64_MEMBER(gio64_device::write)
|
||||
{
|
||||
m_space->write_qword(offset << 3, data, mem_mask);
|
||||
}
|
||||
|
||||
device_gio64_card_interface *gio64_device::get_gio64_card(int slot)
|
||||
{
|
||||
if (slot < 0)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (m_device_list[slot])
|
||||
{
|
||||
return m_device_list[slot];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void gio64_device::add_gio64_card(device_gio64_card_interface::gio64_slot_type_t slot_type, device_gio64_card_interface *card)
|
||||
{
|
||||
m_device_list[slot_type] = card;
|
||||
card->install_device();
|
||||
}
|
||||
|
||||
|
||||
|
||||
device_gio64_card_interface::device_gio64_card_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
, m_gio64(nullptr)
|
||||
, m_gio64_slottag(nullptr)
|
||||
, m_slot_type(GIO64_SLOT_COUNT)
|
||||
{
|
||||
}
|
||||
|
||||
device_gio64_card_interface::~device_gio64_card_interface()
|
||||
{
|
||||
}
|
||||
|
||||
void device_gio64_card_interface::interface_validity_check(validity_checker &valid) const
|
||||
{
|
||||
}
|
||||
|
||||
void device_gio64_card_interface::interface_pre_start()
|
||||
{
|
||||
device_slot_card_interface::interface_pre_start();
|
||||
|
||||
if (!m_gio64)
|
||||
{
|
||||
fatalerror("Can't find SGI GIO64 device\n");
|
||||
}
|
||||
|
||||
if (GIO64_SLOT_COUNT == m_slot_type)
|
||||
{
|
||||
if (!m_gio64->started())
|
||||
throw device_missing_dependencies();
|
||||
|
||||
if (strcmp(m_gio64_slottag, ":gio64_gfx") == 0)
|
||||
m_slot_type = GIO64_SLOT_GFX;
|
||||
else if (strcmp(m_gio64_slottag, ":gio64_exp0") == 0)
|
||||
m_slot_type = GIO64_SLOT_EXP0;
|
||||
else if (strcmp(m_gio64_slottag, ":gio64_exp1") == 0)
|
||||
m_slot_type = GIO64_SLOT_EXP1;
|
||||
else
|
||||
fatalerror("Slot %s incorrectly named for SGI GIO64 graphics slot\n", m_gio64_slottag);
|
||||
|
||||
m_gio64->add_gio64_card(m_slot_type, this);
|
||||
}
|
||||
}
|
||||
|
||||
void device_gio64_card_interface::set_gio64(gio64_device *gio64, const char *slottag)
|
||||
{
|
||||
m_gio64 = gio64;
|
||||
m_gio64_slottag = slottag;
|
||||
}
|
@ -2,38 +2,38 @@
|
||||
// copyright-holders:Ryan Holtz
|
||||
/***************************************************************************
|
||||
|
||||
gio.h - SGI GIO slot bus and GIO device emulation
|
||||
gio64.h - SGI GIO64 slot bus and GIO64 device emulation
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_BUS_GIO_GIO_H
|
||||
#define MAME_BUS_GIO_GIO_H
|
||||
#ifndef MAME_BUS_GIO64_GIO64_H
|
||||
#define MAME_BUS_GIO64_GIO64_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpu/mips/r4000.h"
|
||||
#include "machine/hpc3.h"
|
||||
|
||||
class gio_device;
|
||||
class gio64_device;
|
||||
|
||||
class gio_slot_device : public device_t, public device_slot_interface
|
||||
class gio64_slot_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
template <typename T, typename U>
|
||||
gio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gio_tag, U &&opts, const char *dflt)
|
||||
: gio_slot_device(mconfig, tag, owner, (uint32_t)0)
|
||||
gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gio64_tag, U &&opts, const char *dflt)
|
||||
: gio64_slot_device(mconfig, tag, owner, (uint32_t)0)
|
||||
{
|
||||
option_reset();
|
||||
opts(*this);
|
||||
set_default_option(dflt);
|
||||
set_fixed(false);
|
||||
m_gio.set_tag(std::forward<T>(gio_tag));
|
||||
m_gio64.set_tag(std::forward<T>(gio64_tag));
|
||||
}
|
||||
gio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
gio_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
gio64_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_validity_check(validity_checker &valid) const override;
|
||||
@ -41,67 +41,67 @@ protected:
|
||||
virtual void device_start() override;
|
||||
|
||||
// configuration
|
||||
required_device<gio_device> m_gio;
|
||||
required_device<gio64_device> m_gio64;
|
||||
|
||||
DECLARE_READ32_MEMBER(timeout_r);
|
||||
DECLARE_WRITE32_MEMBER(timeout_w);
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(GIO_SLOT, gio_slot_device)
|
||||
DECLARE_DEVICE_TYPE(GIO64_SLOT, gio64_slot_device)
|
||||
|
||||
|
||||
// class representing interface-specific live GIO card
|
||||
class device_gio_card_interface : public device_slot_card_interface
|
||||
// class representing interface-specific live GIO64 card
|
||||
class device_gio64_card_interface : public device_slot_card_interface
|
||||
{
|
||||
friend class gio_device;
|
||||
friend class gio64_device;
|
||||
public:
|
||||
// construction/destruction
|
||||
virtual ~device_gio_card_interface();
|
||||
virtual ~device_gio64_card_interface();
|
||||
|
||||
// inline configuration
|
||||
void set_gio(gio_device *gio, const char *slottag);
|
||||
void set_gio64(gio64_device *gio64, const char *slottag);
|
||||
|
||||
virtual void mem_map(address_map &map) = 0;
|
||||
|
||||
protected:
|
||||
device_gio_card_interface(const machine_config &mconfig, device_t &device);
|
||||
device_gio64_card_interface(const machine_config &mconfig, device_t &device);
|
||||
|
||||
enum gio_slot_type_t : uint32_t
|
||||
enum gio64_slot_type_t : uint32_t
|
||||
{
|
||||
GIO_SLOT_GFX,
|
||||
GIO_SLOT_EXP0,
|
||||
GIO_SLOT_EXP1,
|
||||
GIO64_SLOT_GFX,
|
||||
GIO64_SLOT_EXP0,
|
||||
GIO64_SLOT_EXP1,
|
||||
|
||||
GIO_SLOT_COUNT
|
||||
GIO64_SLOT_COUNT
|
||||
};
|
||||
|
||||
virtual void interface_validity_check(validity_checker &valid) const override;
|
||||
virtual void interface_pre_start() override;
|
||||
virtual void install_device() = 0;
|
||||
|
||||
gio_device &gio() { assert(m_gio); return *m_gio; }
|
||||
gio64_device &gio64() { assert(m_gio64); return *m_gio64; }
|
||||
|
||||
gio_device *m_gio;
|
||||
const char *m_gio_slottag;
|
||||
gio_slot_type_t m_slot_type;
|
||||
gio64_device *m_gio64;
|
||||
const char *m_gio64_slottag;
|
||||
gio64_slot_type_t m_slot_type;
|
||||
};
|
||||
|
||||
|
||||
class gio_device : public device_t,
|
||||
class gio64_device : public device_t,
|
||||
public device_memory_interface
|
||||
{
|
||||
friend class device_gio_card_interface;
|
||||
friend class device_gio64_card_interface;
|
||||
public:
|
||||
// construction/destruction
|
||||
template <typename T, typename U>
|
||||
gio_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&hpc3_tag)
|
||||
: gio_device(mconfig, tag, owner, (uint32_t)0)
|
||||
gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&hpc3_tag)
|
||||
: gio64_device(mconfig, tag, owner, (uint32_t)0)
|
||||
{
|
||||
set_cpu_tag(std::forward<T>(cpu_tag));
|
||||
set_hpc3_tag(std::forward<U>(hpc3_tag));
|
||||
}
|
||||
|
||||
gio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// inline configuration
|
||||
template <typename T> void set_cpu_tag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
|
||||
@ -111,8 +111,8 @@ public:
|
||||
|
||||
const address_space_config m_space_config;
|
||||
|
||||
void add_gio_card(device_gio_card_interface::gio_slot_type_t slot_type, device_gio_card_interface *card);
|
||||
device_gio_card_interface *get_gio_card(int slot);
|
||||
void add_gio64_card(device_gio64_card_interface::gio64_slot_type_t slot_type, device_gio64_card_interface *card);
|
||||
device_gio64_card_interface *get_gio64_card(int slot);
|
||||
|
||||
template<typename T> void install_graphics(T &device, void (T::*map)(class address_map &map), uint64_t unitmask = ~u64(0))
|
||||
{
|
||||
@ -126,7 +126,7 @@ public:
|
||||
else if (index == 1)
|
||||
m_space->install_device(0x600000, 0x9fffff, device, map, unitmask);
|
||||
else
|
||||
fatalerror("Invalid SGIO GIO expansion slot index: %d\n", index);
|
||||
fatalerror("Invalid SGI GIO64 expansion slot index: %d\n", index);
|
||||
}
|
||||
|
||||
hpc3_base_device* get_hpc3() { return m_hpc3.target(); }
|
||||
@ -135,7 +135,7 @@ public:
|
||||
DECLARE_WRITE64_MEMBER(write);
|
||||
|
||||
protected:
|
||||
gio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_resolve_objects() override;
|
||||
@ -146,7 +146,7 @@ protected:
|
||||
required_device<hpc3_base_device> m_hpc3;
|
||||
address_space *m_space;
|
||||
|
||||
device_gio_card_interface *m_device_list[3];
|
||||
device_gio64_card_interface *m_device_list[3];
|
||||
|
||||
private:
|
||||
DECLARE_READ64_MEMBER(no_gfx_r);
|
||||
@ -157,9 +157,9 @@ private:
|
||||
DECLARE_WRITE64_MEMBER(no_exp1_w);
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(GIO, gio_device)
|
||||
DECLARE_DEVICE_TYPE(GIO64, gio64_device)
|
||||
|
||||
|
||||
void gio_cards(device_slot_interface &device);
|
||||
void gio64_cards(device_slot_interface &device);
|
||||
|
||||
#endif // MAME_BUS_GIO_GIO_H
|
@ -43,27 +43,27 @@
|
||||
#define VERBOSE (0)//(LOG_REX3 | LOG_COMMANDS)
|
||||
#include "logmacro.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(GIO_XL8, gio_xl8_device, "gio_xl8", "SGI 8-bit XL board")
|
||||
DEFINE_DEVICE_TYPE(GIO_XL24, gio_xl24_device, "gio_xl24", "SGI 24-bit XL board")
|
||||
DEFINE_DEVICE_TYPE(GIO64_XL8, gio64_xl8_device, "gio64_xl8", "SGI 8-bit XL board")
|
||||
DEFINE_DEVICE_TYPE(GIO64_XL24, gio64_xl24_device, "gio64_xl24", "SGI 24-bit XL board")
|
||||
|
||||
/*static*/ const uint32_t newport_base_device::s_host_shifts[4] = { 8, 8, 16, 32 };
|
||||
|
||||
newport_base_device::newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t global_mask)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_palette_interface(mconfig, *this)
|
||||
, device_gio_card_interface(mconfig, *this)
|
||||
, device_gio64_card_interface(mconfig, *this)
|
||||
, m_screen(*this, "screen")
|
||||
, m_global_mask(global_mask)
|
||||
{
|
||||
}
|
||||
|
||||
gio_xl8_device::gio_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: newport_base_device(mconfig, GIO_XL8, tag, owner, clock, 0x000000ff)
|
||||
gio64_xl8_device::gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: newport_base_device(mconfig, GIO64_XL8, tag, owner, clock, 0x000000ff)
|
||||
{
|
||||
}
|
||||
|
||||
gio_xl24_device::gio_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: newport_base_device(mconfig, GIO_XL24, tag, owner, clock, 0xffffffff)
|
||||
gio64_xl24_device::gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: newport_base_device(mconfig, GIO64_XL24, tag, owner, clock, 0xffffffff)
|
||||
{
|
||||
}
|
||||
|
||||
@ -762,12 +762,12 @@ uint32_t newport_base_device::cmap1_read()
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t gio_xl8_device::get_cmap_revision()
|
||||
uint32_t gio64_xl8_device::get_cmap_revision()
|
||||
{
|
||||
return 0xa1;
|
||||
}
|
||||
|
||||
uint32_t gio_xl24_device::get_cmap_revision()
|
||||
uint32_t gio64_xl24_device::get_cmap_revision()
|
||||
{
|
||||
return 0x02;
|
||||
}
|
||||
@ -972,12 +972,12 @@ void newport_base_device::xmap1_write(uint32_t data)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t gio_xl8_device::get_xmap_revision()
|
||||
uint32_t gio64_xl8_device::get_xmap_revision()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint32_t gio_xl24_device::get_xmap_revision()
|
||||
uint32_t gio64_xl24_device::get_xmap_revision()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ WRITE_LINE_MEMBER(newport_base_device::vblank_w)
|
||||
if (BIT(m_vc2.m_display_ctrl, 0))
|
||||
{
|
||||
m_rex3.m_status |= STATUS_VRINT;
|
||||
m_gio->get_hpc3()->raise_local_irq(1, ioc2_device::INT3_LOCAL1_RETRACE);
|
||||
m_gio64->get_hpc3()->raise_local_irq(1, ioc2_device::INT3_LOCAL1_RETRACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1749,7 +1749,7 @@ READ64_MEMBER(newport_base_device::rex3_r)
|
||||
LOGMASKED(LOG_REX3, "REX3 Status Read: %08x\n", m_rex3.m_status);
|
||||
uint32_t old_status = m_rex3.m_status;
|
||||
m_rex3.m_status &= ~STATUS_VRINT;
|
||||
m_gio->get_hpc3()->lower_local_irq(1, ioc2_device::INT3_LOCAL1_RETRACE);
|
||||
m_gio64->get_hpc3()->lower_local_irq(1, ioc2_device::INT3_LOCAL1_RETRACE);
|
||||
ret |= (uint64_t)(old_status | 3) << 32;
|
||||
}
|
||||
if (ACCESSING_BITS_0_31)
|
||||
@ -3920,7 +3920,7 @@ WRITE64_MEMBER(newport_base_device::rex3_w)
|
||||
|
||||
void newport_base_device::install_device()
|
||||
{
|
||||
m_gio->install_graphics(*this, &newport_base_device::mem_map);
|
||||
m_gio64->install_graphics(*this, &newport_base_device::mem_map);
|
||||
}
|
||||
|
||||
void newport_base_device::device_add_mconfig(machine_config &config)
|
@ -9,14 +9,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gio.h"
|
||||
#include "gio64.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define ENABLE_NEWVIEW_LOG (0)
|
||||
|
||||
class newport_base_device : public device_t
|
||||
, public device_palette_interface
|
||||
, public device_gio_card_interface
|
||||
, public device_gio64_card_interface
|
||||
{
|
||||
public:
|
||||
newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t global_mask);
|
||||
@ -317,27 +317,27 @@ protected:
|
||||
static const uint32_t s_host_shifts[4];
|
||||
};
|
||||
|
||||
class gio_xl8_device : public newport_base_device
|
||||
class gio64_xl8_device : public newport_base_device
|
||||
{
|
||||
public:
|
||||
gio_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
|
||||
gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
|
||||
|
||||
protected:
|
||||
virtual uint32_t get_cmap_revision() override;
|
||||
virtual uint32_t get_xmap_revision() override;
|
||||
};
|
||||
|
||||
class gio_xl24_device : public newport_base_device
|
||||
class gio64_xl24_device : public newport_base_device
|
||||
{
|
||||
public:
|
||||
gio_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
|
||||
gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
|
||||
|
||||
protected:
|
||||
virtual uint32_t get_cmap_revision() override;
|
||||
virtual uint32_t get_xmap_revision() override;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(GIO_XL8, gio_xl8_device)
|
||||
DECLARE_DEVICE_TYPE(GIO_XL24, gio_xl24_device)
|
||||
DECLARE_DEVICE_TYPE(GIO64_XL8, gio64_xl8_device)
|
||||
DECLARE_DEVICE_TYPE(GIO64_XL24, gio64_xl24_device)
|
||||
|
||||
#endif // MAME_BUS_GIO_NEWPORT_H
|
@ -17,9 +17,9 @@
|
||||
* 000a0000 - 07ffffff EISA Memory
|
||||
* 08000000 - 17ffffff Low System Memory
|
||||
* 18000000 - 1effffff RESERVED - Unused
|
||||
* 1f000000 - 1f3fffff GIO - GFX
|
||||
* 1f400000 - 1f5fffff GIO - EXP0
|
||||
* 1f600000 - 1f9fffff GIO - EXP1 - Unused
|
||||
* 1f000000 - 1f3fffff GIO64 - GFX
|
||||
* 1f400000 - 1f5fffff GIO64 - EXP0
|
||||
* 1f600000 - 1f9fffff GIO64 - EXP1 - Unused
|
||||
* 1fa00000 - 1fa1ffff Memory Controller
|
||||
* 1fb00000 - 1fb1a7ff HPC3 CHIP1
|
||||
* 1fb80000 - 1fb9a7ff HPC3 CHIP0
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/gio/gio.h"
|
||||
#include "bus/gio64/gio64.h"
|
||||
|
||||
#include "cpu/mips/r4000.h"
|
||||
|
||||
@ -81,10 +81,10 @@ public:
|
||||
, m_scsi_ctrl(*this, "scsibus:0:wd33c93")
|
||||
, m_hpc3(*this, "hpc3")
|
||||
, m_vino(*this, "vino")
|
||||
, m_gio(*this, "gio")
|
||||
, m_gio_gfx(*this, "gio_gfx")
|
||||
, m_gio_exp0(*this, "gio_exp0")
|
||||
, m_gio_exp1(*this, "gio_exp1")
|
||||
, m_gio64(*this, "gio64")
|
||||
, m_gio64_gfx(*this, "gio64_gfx")
|
||||
, m_gio64_exp0(*this, "gio64_exp0")
|
||||
, m_gio64_exp1(*this, "gio64_exp1")
|
||||
{
|
||||
}
|
||||
|
||||
@ -111,10 +111,10 @@ protected:
|
||||
required_device<wd33c93b_device> m_scsi_ctrl;
|
||||
required_device<hpc3_base_device> m_hpc3;
|
||||
optional_device<vino_device> m_vino;
|
||||
optional_device<gio_device> m_gio;
|
||||
optional_device<gio_slot_device> m_gio_gfx;
|
||||
optional_device<gio_slot_device> m_gio_exp0;
|
||||
optional_device<gio_slot_device> m_gio_exp1;
|
||||
optional_device<gio64_device> m_gio64;
|
||||
optional_device<gio64_slot_device> m_gio64_gfx;
|
||||
optional_device<gio64_slot_device> m_gio64_exp0;
|
||||
optional_device<gio64_slot_device> m_gio64_exp1;
|
||||
};
|
||||
|
||||
class ip24_state : public ip22_state
|
||||
@ -172,7 +172,7 @@ void ip22_state::ip22_base_map(address_map &map)
|
||||
{
|
||||
map(0x00000000, 0x0007ffff).bankrw("bank1"); /* mirror of first 512k of main RAM */
|
||||
map(0x08000000, 0x0fffffff).share("mainram").ram().w(FUNC(ip22_state::write_ram)); /* 128 MB of main RAM */
|
||||
map(0x1f000000, 0x1f9fffff).rw(m_gio, FUNC(gio_device::read), FUNC(gio_device::write));
|
||||
map(0x1f000000, 0x1f9fffff).rw(m_gio64, FUNC(gio64_device::read), FUNC(gio64_device::write));
|
||||
map(0x1fa00000, 0x1fa1ffff).rw(m_mem_ctrl, FUNC(sgi_mc_device::read), FUNC(sgi_mc_device::write));
|
||||
map(0x1fb00000, 0x1fb7ffff).r(FUNC(ip22_state::bus_error));
|
||||
map(0x1fb80000, 0x1fbfffff).m(m_hpc3, FUNC(hpc3_base_device::map));
|
||||
@ -244,11 +244,11 @@ void ip22_state::ip22_base(machine_config &config)
|
||||
NSCSI_CONNECTOR(config, "scsibus:6", scsi_devices, "cdrom", false);
|
||||
NSCSI_CONNECTOR(config, "scsibus:7", scsi_devices, nullptr, false);
|
||||
|
||||
// GIO
|
||||
GIO(config, m_gio, m_maincpu, m_hpc3);
|
||||
GIO_SLOT(config, m_gio_gfx, m_gio, gio_cards, "xl24");
|
||||
GIO_SLOT(config, m_gio_exp0, m_gio, gio_cards, nullptr);
|
||||
GIO_SLOT(config, m_gio_exp1, m_gio, gio_cards, nullptr);
|
||||
// GIO64
|
||||
GIO64(config, m_gio64, m_maincpu, m_hpc3);
|
||||
GIO64_SLOT(config, m_gio64_gfx, m_gio64, gio64_cards, "xl24");
|
||||
GIO64_SLOT(config, m_gio64_exp0, m_gio64, gio64_cards, nullptr);
|
||||
GIO64_SLOT(config, m_gio64_exp1, m_gio64, gio64_cards, nullptr);
|
||||
}
|
||||
|
||||
void ip22_state::ip225015(machine_config &config)
|
||||
|
Loading…
Reference in New Issue
Block a user