mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
dimemory: Lift the cap on the number of address spaces per device [O. Galibert]
This commit is contained in:
parent
cb1930f6e6
commit
cbbbd07484
@ -9,40 +9,57 @@ creating address spaces, to which address maps can be associated.
|
||||
It's used for any device that provides a (logically) address/data bus
|
||||
other devices can be connected to. It's mainly, but not only, cpus.
|
||||
|
||||
The interface allows for up to four address spaces, numbered 0-3, with
|
||||
symbolic names associated to them in emumem.h for historical reasons.
|
||||
The interface allows for an unlimited set of address spaces, numbered
|
||||
with small positive values. The IDs should stay small because they
|
||||
index vectors to keep the lookup fast. Spaces number 0-3 have an
|
||||
associated constant name:
|
||||
|
||||
+------------+-------------+---------------+
|
||||
| Numeric ID | Symbolic ID | Symbolic name |
|
||||
+============+=============+===============+
|
||||
| 0 | AS_0 | AS_PROGRAM |
|
||||
+------------+-------------+---------------+
|
||||
| 1 | AS_1 | AS_DATA |
|
||||
+------------+-------------+---------------+
|
||||
| 2 | AS_2 | AS_IO |
|
||||
+------------+-------------+---------------+
|
||||
| 3 | AS_3 | AS_OPCODES |
|
||||
+------------+-------------+---------------+
|
||||
+----+---------------+
|
||||
| ID | Name |
|
||||
+====+===============+
|
||||
| 0 | AS_PROGRAM |
|
||||
+----+---------------+
|
||||
| 1 | AS_DATA |
|
||||
+----+---------------+
|
||||
| 2 | AS_IO |
|
||||
+----+---------------+
|
||||
| 3 | AS_OPCODES |
|
||||
+----+---------------+
|
||||
|
||||
Spaces 0 and 3, e.g. AS_PROGRAM and AS_OPCODE, are special for the
|
||||
debugger and some CPUs. AS_PROGRAM is use by the debugger and the
|
||||
cpus as the space from with the cpu reads its instructions for the
|
||||
disassembler. When present, AS_OPCODE is used by the debugger and
|
||||
some cpus to read the opcode part of the instruction. What opcode
|
||||
means is device-dependant, for instance for the z80 it's the initial
|
||||
byte(s) which are read with the M1 signal asserted. For the 68000 is
|
||||
means every instruction word plus the PC-relative accesses. The main,
|
||||
but not only, use of AS_OPCODE is to implement hardware decrypting
|
||||
instructions separately from the data.
|
||||
|
||||
2. Setup
|
||||
--------
|
||||
|
||||
| const address_space_config *\ **memory_space_config**\ (address_spacenum spacenum) const
|
||||
| std::vector<std::pair<int, const address_space_config *>>\ **memory_space_config**\ (int spacenum) const
|
||||
|
||||
The device must override that method to provide a vector of pairs
|
||||
comprising of a space number and its associated
|
||||
**address_space_config** describing its configuration. Some examples
|
||||
to look up when needed:
|
||||
* Standard two-space vector: v60_device
|
||||
* Conditional AS_OPCODE: z80_device
|
||||
* Inherit config and add a space: m6801_device
|
||||
* Inherit config and patch a space: tmpz84c011_device
|
||||
|
||||
The device must override that method to provide, for each of the four
|
||||
address spaces, either an **address_space_config** describing the
|
||||
space's configucation or **nullptr** if the space is not to be
|
||||
created.
|
||||
|
||||
| bool **has_configured_map**\ () const
|
||||
| bool **has_configured_map**\ (int index) const
|
||||
| bool **has_configured_map**\ (address_spacenum index) const
|
||||
|
||||
The **has_configured_map** method allows to test in the
|
||||
**memory_space_config** method whether an **address_map** has been
|
||||
associated with a given space. That allows to implement optional
|
||||
memory spaces, such as AS_OPCODES in certain cpu cores. The
|
||||
parameterless version tests for AS_PROGRAM/AS_0.
|
||||
parameterless version tests for space 0.
|
||||
|
||||
3. Associating maps to spaces
|
||||
-----------------------------
|
||||
@ -71,29 +88,28 @@ derivative.
|
||||
|
||||
| address_space &\ **space**\ () const
|
||||
| address_space &\ **space**\ (int index) const
|
||||
| address_space &\ **space**\ (address_spacenum index) const
|
||||
|
||||
Returns a given address space post-initialization. The parameterless
|
||||
version tests for AS_PROGRAM/AS_0. Aborts if the space doesn't exist.
|
||||
|
||||
| bool **has_space**\ () const
|
||||
| bool **has_space**\ (int index) const
|
||||
| bool **has_space**\ (address_spacenum index) const
|
||||
|
||||
Indicates whether a given space actually exists. The parameterless
|
||||
version tests for AS_PROGRAM/AS_0.
|
||||
|
||||
|
||||
5. Weird/to deprecate stuff
|
||||
---------------------------
|
||||
5. MMU support for disassembler
|
||||
-------------------------------
|
||||
|
||||
| bool **translate**\ (address_spacenum spacenum, int intention, offs_t &address)
|
||||
| bool **read**\ (address_spacenum spacenum, offs_t offset, int size, UINT64 &value)
|
||||
| bool **write**\ (address_spacenum spacenum, offs_t offset, int size, UINT64 value)
|
||||
| bool **readop**\ (offs_t offset, int size, UINT64 &value)
|
||||
| bool **translate**\ (int spacenum, int intention, offs_t &address)
|
||||
|
||||
These methods override how the debugger accesses memory for a cpu.
|
||||
Avoid them if you can. Otherwise, prepare for heavy-duty spelunking in
|
||||
complicated code.
|
||||
Does a logical to physical address translation through the device's
|
||||
MMU. spacenum gives the space number, intention the type of the
|
||||
future access (TRANSLATE_(READ|WRITE|FETCH)(|_USER|_DEBUG)) and
|
||||
address is an inout parameter with the address to translate and its
|
||||
translated version. Should return true if the translation went
|
||||
correctly, false if the address is unmapped.
|
||||
|
||||
If really required, should probably be part of cpu_device directly.
|
||||
Note that for some historical reason the device itself must override
|
||||
the virtual method **memory_translate** with the same signature.
|
||||
|
@ -66,7 +66,7 @@ const tiny_rom_entry *cbm2_hrg_device::device_rom_region() const
|
||||
// ADDRESS_MAP( hrg_a_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( hrg_a_map, AS_0, 8, cbm2_hrg_a_device )
|
||||
static ADDRESS_MAP_START( hrg_a_map, 0, 8, cbm2_hrg_a_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x7fff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -76,7 +76,7 @@ ADDRESS_MAP_END
|
||||
// ADDRESS_MAP( hrg_b_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( hrg_b_map, AS_0, 8, cbm2_hrg_b_device )
|
||||
static ADDRESS_MAP_START( hrg_b_map, 0, 8, cbm2_hrg_b_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x3fff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -96,7 +96,7 @@ MACHINE_CONFIG_MEMBER( cbm2_hrg_a_device::device_add_mconfig )
|
||||
|
||||
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_a_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, hrg_a_map)
|
||||
MCFG_EF936X_PALETTE("palette")
|
||||
MCFG_EF936X_BITPLANES_CNT(1);
|
||||
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
|
||||
@ -112,7 +112,7 @@ MACHINE_CONFIG_MEMBER( cbm2_hrg_b_device::device_add_mconfig )
|
||||
|
||||
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_b_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, hrg_b_map)
|
||||
MCFG_EF936X_PALETTE("palette")
|
||||
MCFG_EF936X_BITPLANES_CNT(1);
|
||||
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
|
||||
|
@ -32,12 +32,12 @@ DEFINE_DEVICE_TYPE(COMPIS_UHRG, compis_uhrg_device, "compis_uhrg", "Compis UHRG"
|
||||
// ADDRESS_MAP( upd7220_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( hrg_map, AS_0, 16, compis_hrg_device )
|
||||
static ADDRESS_MAP_START( hrg_map, 0, 16, compis_hrg_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x00000, 0x7fff) AM_RAM AM_SHARE("video_ram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( uhrg_map, AS_0, 16, compis_uhrg_device )
|
||||
static ADDRESS_MAP_START( uhrg_map, 0, 16, compis_uhrg_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x1ffff)
|
||||
AM_RANGE(0x00000, 0x1ffff) AM_RAM AM_SHARE("video_ram")
|
||||
ADDRESS_MAP_END
|
||||
@ -85,7 +85,7 @@ MACHINE_CONFIG_MEMBER( compis_hrg_device::device_add_mconfig )
|
||||
MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
|
||||
|
||||
MCFG_DEVICE_ADD(UPD7220_TAG, UPD7220, 2252500) // unknown clock
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, hrg_map)
|
||||
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(compis_hrg_device, display_pixels)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
|
||||
@ -103,7 +103,7 @@ MACHINE_CONFIG_MEMBER( compis_uhrg_device::device_add_mconfig )
|
||||
MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
|
||||
|
||||
MCFG_DEVICE_ADD(UPD7220_TAG, UPD7220, 2252500*2) // unknown clock
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, uhrg_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, uhrg_map)
|
||||
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(compis_uhrg_device, display_pixels)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
protected:
|
||||
dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
void install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
@ -129,13 +129,13 @@ isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_
|
||||
isa8_device::isa8_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_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
|
||||
m_mem_config("ISA 8-bit mem", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
|
||||
m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, nullptr),
|
||||
m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
|
||||
m_mem16_config("ISA 16-bit mem", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
|
||||
m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, nullptr),
|
||||
m_maincpu(nullptr),
|
||||
m_iospace(nullptr),
|
||||
m_prgspace(nullptr),
|
||||
m_memspace(nullptr),
|
||||
m_out_irq2_cb(*this),
|
||||
m_out_irq3_cb(*this),
|
||||
m_out_irq4_cb(*this),
|
||||
@ -153,18 +153,38 @@ isa8_device::isa8_device(const machine_config &mconfig, device_type type, const
|
||||
m_dma_eop[i] = false;
|
||||
}
|
||||
m_nmi_enabled = false;
|
||||
m_iowidth = m_prgwidth = 0;
|
||||
m_iowidth = m_memwidth = 0;
|
||||
m_allocspaces = false;
|
||||
}
|
||||
|
||||
READ8_MEMBER(isa8_device::prog_r)
|
||||
std::vector<std::pair<int, const address_space_config *>> isa8_device::memory_space_config() const
|
||||
{
|
||||
return m_prgspace->read_byte(offset);
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_ISA_MEM, &m_mem_config),
|
||||
std::make_pair(AS_ISA_IO, &m_io_config),
|
||||
std::make_pair(AS_ISA_MEMALT, &m_mem16_config),
|
||||
std::make_pair(AS_ISA_IOALT, &m_io16_config)
|
||||
};
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(isa8_device::prog_w)
|
||||
std::vector<std::pair<int, const address_space_config *>> isa16_device::memory_space_config() const
|
||||
{
|
||||
m_prgspace->write_byte(offset, data);
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_ISA_MEM, &m_mem16_config),
|
||||
std::make_pair(AS_ISA_IO, &m_io16_config),
|
||||
std::make_pair(AS_ISA_MEMALT, &m_mem_config),
|
||||
std::make_pair(AS_ISA_IOALT, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
READ8_MEMBER(isa8_device::mem_r)
|
||||
{
|
||||
return m_memspace->read_byte(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(isa8_device::mem_w)
|
||||
{
|
||||
m_memspace->write_byte(offset, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(isa8_device::io_r)
|
||||
@ -206,17 +226,17 @@ void isa8_device::device_start()
|
||||
|
||||
if (m_allocspaces)
|
||||
{
|
||||
m_iospace = &space(AS_IO);
|
||||
m_prgspace = &space(AS_PROGRAM);
|
||||
m_iospace = &space(AS_ISA_IO);
|
||||
m_memspace = &space(AS_ISA_MEM);
|
||||
m_iowidth = m_iospace->data_width();
|
||||
m_prgwidth = m_prgspace->data_width();
|
||||
m_memwidth = m_memspace->data_width();
|
||||
}
|
||||
else // use host CPU's program and I/O spaces directly
|
||||
{
|
||||
m_iospace = &m_maincpu->space(AS_IO);
|
||||
m_iowidth = m_maincpu->space_config(AS_IO)->m_databus_width;
|
||||
m_prgspace = &m_maincpu->space(AS_PROGRAM);
|
||||
m_prgwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
|
||||
m_memspace = &m_maincpu->space(AS_PROGRAM);
|
||||
m_memwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,20 +249,20 @@ void isa8_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
|
||||
void isa8_device::install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
|
||||
{
|
||||
int buswidth;
|
||||
address_space *space;
|
||||
|
||||
if (spacenum == AS_IO)
|
||||
if (spacenum == AS_ISA_IO)
|
||||
{
|
||||
space = m_iospace;
|
||||
buswidth = m_iowidth;
|
||||
}
|
||||
else if (spacenum == AS_PROGRAM)
|
||||
else if (spacenum == AS_ISA_MEM)
|
||||
{
|
||||
space = m_prgspace;
|
||||
buswidth = m_prgwidth;
|
||||
space = m_memspace;
|
||||
buswidth = m_memwidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -277,24 +297,24 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t
|
||||
|
||||
void isa8_device::install_memory(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
|
||||
{
|
||||
install_space(AS_PROGRAM, start, end, rhandler, whandler);
|
||||
install_space(AS_ISA_MEM, start, end, rhandler, whandler);
|
||||
}
|
||||
|
||||
void isa8_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
|
||||
{
|
||||
install_space(AS_IO, start, end, rhandler, whandler);
|
||||
install_space(AS_ISA_IO, start, end, rhandler, whandler);
|
||||
}
|
||||
|
||||
|
||||
void isa8_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
|
||||
{
|
||||
m_prgspace->install_readwrite_bank(start, end, 0, tag );
|
||||
machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(data);
|
||||
m_memspace->install_readwrite_bank(start, end, 0, tag );
|
||||
machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(data);
|
||||
}
|
||||
|
||||
void isa8_device::unmap_bank(offs_t start, offs_t end)
|
||||
{
|
||||
m_prgspace->unmap_readwrite(start, end);
|
||||
m_memspace->unmap_readwrite(start, end);
|
||||
}
|
||||
|
||||
void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const char *tag, const char *region)
|
||||
@ -304,22 +324,22 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const cha
|
||||
uint8_t *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000;
|
||||
memcpy(dest,src, end - start + 1);
|
||||
} else {
|
||||
m_prgspace->install_read_bank(start, end, 0, tag);
|
||||
m_prgspace->unmap_write(start, end);
|
||||
machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
|
||||
m_memspace->install_read_bank(start, end, 0, tag);
|
||||
m_memspace->unmap_write(start, end);
|
||||
machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
|
||||
}
|
||||
}
|
||||
|
||||
void isa8_device::unmap_rom(offs_t start, offs_t end)
|
||||
{
|
||||
m_prgspace->unmap_read(start, end);
|
||||
m_memspace->unmap_read(start, end);
|
||||
}
|
||||
|
||||
bool isa8_device::is_option_rom_space_available(offs_t start, int size)
|
||||
{
|
||||
m_maincpu = machine().device<cpu_device>(m_cputag);
|
||||
for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough
|
||||
if(m_prgspace->get_read_ptr(start + i)) return false;
|
||||
if(m_memspace->get_read_ptr(start + i)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -465,7 +485,7 @@ void isa16_device::device_start()
|
||||
|
||||
void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler)
|
||||
{
|
||||
int buswidth = m_prgwidth;
|
||||
int buswidth = m_memwidth;
|
||||
switch(buswidth)
|
||||
{
|
||||
case 16:
|
||||
@ -490,14 +510,14 @@ void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rh
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER(isa16_device::prog16_r)
|
||||
READ16_MEMBER(isa16_device::mem16_r)
|
||||
{
|
||||
return m_prgspace->read_word(offset<<1, mem_mask);
|
||||
return m_memspace->read_word(offset<<1, mem_mask);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(isa16_device::prog16_w)
|
||||
WRITE16_MEMBER(isa16_device::mem16_w)
|
||||
{
|
||||
m_prgspace->write_word(offset<<1, data, mem_mask);
|
||||
m_memspace->write_word(offset<<1, data, mem_mask);
|
||||
}
|
||||
|
||||
READ16_MEMBER(isa16_device::io16_r)
|
||||
@ -510,21 +530,21 @@ WRITE16_MEMBER(isa16_device::io16_w)
|
||||
m_iospace->write_word(offset<<1, data, mem_mask);
|
||||
}
|
||||
|
||||
READ16_MEMBER(isa16_device::prog16_swap_r)
|
||||
READ16_MEMBER(isa16_device::mem16_swap_r)
|
||||
{
|
||||
uint16_t rv;
|
||||
mem_mask = (mem_mask<<8) | (mem_mask>>8);
|
||||
|
||||
rv = m_prgspace->read_word(offset<<1, mem_mask);
|
||||
rv = m_memspace->read_word(offset<<1, mem_mask);
|
||||
|
||||
return (rv<<8) | (rv>>8);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(isa16_device::prog16_swap_w)
|
||||
WRITE16_MEMBER(isa16_device::mem16_swap_w)
|
||||
{
|
||||
mem_mask = (mem_mask<<8) | (mem_mask>>8);
|
||||
data = (data<<8) | (data>>8);
|
||||
m_prgspace->write_word(offset<<1, data, mem_mask);
|
||||
m_memspace->write_word(offset<<1, data, mem_mask);
|
||||
}
|
||||
|
||||
READ16_MEMBER(isa16_device::io16_swap_r)
|
||||
|
@ -186,6 +186,11 @@ class isa8_device : public device_t,
|
||||
public device_memory_interface
|
||||
{
|
||||
public:
|
||||
static constexpr int AS_ISA_MEM = 0;
|
||||
static constexpr int AS_ISA_IO = 1;
|
||||
static constexpr int AS_ISA_MEMALT = 2;
|
||||
static constexpr int AS_ISA_IOALT = 3;
|
||||
|
||||
// construction/destruction
|
||||
isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
// inline configuration
|
||||
@ -203,17 +208,7 @@ public:
|
||||
template <class Object> static devcb_base &set_out_drq3_callback(device_t &device, Object &&cb) { return downcast<isa8_device &>(device).m_out_drq3_cb.set_callback(std::forward<Object>(cb)); }
|
||||
|
||||
// for ISA8, put the 8-bit configs in the primary slots and the 16-bit configs in the secondary
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_DATA: return &m_program16_config;
|
||||
case AS_3: return &m_io16_config;
|
||||
default: fatalerror("isa: invalid memory space!\n");
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
template<typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), int bits = 8)
|
||||
@ -244,8 +239,8 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( drq3_w );
|
||||
|
||||
// 8 bit accessors for ISA-defined address spaces
|
||||
DECLARE_READ8_MEMBER(prog_r);
|
||||
DECLARE_WRITE8_MEMBER(prog_w);
|
||||
DECLARE_READ8_MEMBER(mem_r);
|
||||
DECLARE_WRITE8_MEMBER(mem_w);
|
||||
DECLARE_READ8_MEMBER(io_r);
|
||||
DECLARE_WRITE8_MEMBER(io_w);
|
||||
|
||||
@ -258,12 +253,12 @@ public:
|
||||
|
||||
virtual void set_dma_channel(uint8_t channel, device_isa8_card_interface *dev, bool do_eop);
|
||||
|
||||
const address_space_config m_program_config, m_io_config, m_program16_config, m_io16_config;
|
||||
const address_space_config m_mem_config, m_io_config, m_mem16_config, m_io16_config;
|
||||
|
||||
protected:
|
||||
isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
void install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
@ -273,8 +268,8 @@ protected:
|
||||
cpu_device *m_maincpu;
|
||||
|
||||
// address spaces
|
||||
address_space *m_iospace, *m_prgspace;
|
||||
int m_iowidth, m_prgwidth;
|
||||
address_space *m_iospace, *m_memspace;
|
||||
int m_iowidth, m_memwidth;
|
||||
bool m_allocspaces;
|
||||
|
||||
devcb_write_line m_out_irq2_cb;
|
||||
@ -370,17 +365,7 @@ public:
|
||||
void install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler);
|
||||
|
||||
// for ISA16, put the 16-bit configs in the primary slots and the 8-bit configs in the secondary
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program16_config;
|
||||
case AS_IO: return &m_io16_config;
|
||||
case AS_DATA: return &m_program_config;
|
||||
case AS_3: return &m_io_config;
|
||||
default: fatalerror("isa: invalid memory space!\n");
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq10_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( irq11_w );
|
||||
@ -397,13 +382,13 @@ public:
|
||||
void dack16_w(int line,uint16_t data);
|
||||
|
||||
// 16 bit accessors for ISA-defined address spaces
|
||||
DECLARE_READ16_MEMBER(prog16_r);
|
||||
DECLARE_WRITE16_MEMBER(prog16_w);
|
||||
DECLARE_READ16_MEMBER(mem16_r);
|
||||
DECLARE_WRITE16_MEMBER(mem16_w);
|
||||
DECLARE_READ16_MEMBER(io16_r);
|
||||
DECLARE_WRITE16_MEMBER(io16_w);
|
||||
// byte-swapped versions of 16-bit accessors
|
||||
DECLARE_READ16_MEMBER(prog16_swap_r);
|
||||
DECLARE_WRITE16_MEMBER(prog16_swap_w);
|
||||
DECLARE_READ16_MEMBER(mem16_swap_r);
|
||||
DECLARE_WRITE16_MEMBER(mem16_swap_w);
|
||||
DECLARE_READ16_MEMBER(io16_swap_r);
|
||||
DECLARE_WRITE16_MEMBER(io16_swap_w);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
DEFINE_DEVICE_TYPE(ISA8_NUM_9_REV, isa8_number_9_rev_device, "number_9_rev", "Number Nine Revolution 512x32/1024x8")
|
||||
|
||||
static ADDRESS_MAP_START( upd7220_map, AS_0, 16, isa8_number_9_rev_device )
|
||||
static ADDRESS_MAP_START( upd7220_map, 0, 16, isa8_number_9_rev_device )
|
||||
AM_RANGE(0x00000, 0x3ffff) AM_NOP
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -61,7 +61,7 @@ MACHINE_CONFIG_MEMBER( isa8_number_9_rev_device::device_add_mconfig )
|
||||
MCFG_PALETTE_ADD("palette", 4096)
|
||||
|
||||
MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4_433619MHz/2) // unknown clock
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, upd7220_map)
|
||||
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(isa8_number_9_rev_device, hgdc_display_pixels)
|
||||
MCFG_VIDEO_SET_SCREEN("screen")
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -866,7 +866,7 @@ msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_c
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( vlm_map, AS_0, 8, msx_cart_keyboard_master_device )
|
||||
static ADDRESS_MAP_START( vlm_map, 0, 8, msx_cart_keyboard_master_device )
|
||||
AM_RANGE(0x0000, 0xffff) AM_READ(read_vlm)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -876,7 +876,7 @@ MACHINE_CONFIG_MEMBER( msx_cart_keyboard_master_device::device_add_mconfig )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("vlm5030", VLM5030, XTAL_3_579545MHz)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, vlm_map)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconf
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( ymf278b_map, AS_0, 8, msx_cart_moonsound_device )
|
||||
static ADDRESS_MAP_START( ymf278b_map, 0, 8, msx_cart_moonsound_device )
|
||||
AM_RANGE(0x000000, 0x1fffff) AM_ROM
|
||||
AM_RANGE(0x200000, 0x3fffff) AM_RAM // 2MB sram for testing
|
||||
ADDRESS_MAP_END
|
||||
@ -39,7 +39,7 @@ MACHINE_CONFIG_MEMBER( msx_cart_moonsound_device::device_add_mconfig )
|
||||
// The moonsound cartridge has a separate stereo output.
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ymf278b", YMF278B, YMF278B_STD_CLOCK)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, ymf278b_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, ymf278b_map)
|
||||
MCFG_YMF278B_IRQ_HANDLER(WRITELINE(msx_cart_moonsound_device, irq_w))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
|
@ -69,7 +69,7 @@ const tiny_rom_entry *cbm8000_hsg_device::device_rom_region() const
|
||||
// ADDRESS_MAP( hsg_a_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( hsg_a_map, AS_0, 8, cbm8000_hsg_a_device )
|
||||
static ADDRESS_MAP_START( hsg_a_map, 0, 8, cbm8000_hsg_a_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x7fff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -79,7 +79,7 @@ ADDRESS_MAP_END
|
||||
// ADDRESS_MAP( hsg_b_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( hsg_b_map, AS_0, 8, cbm8000_hsg_b_device )
|
||||
static ADDRESS_MAP_START( hsg_b_map, 0, 8, cbm8000_hsg_b_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x3fff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -99,7 +99,7 @@ MACHINE_CONFIG_MEMBER( cbm8000_hsg_a_device::device_add_mconfig )
|
||||
|
||||
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, hsg_a_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, hsg_a_map)
|
||||
MCFG_EF936X_PALETTE("palette")
|
||||
MCFG_EF936X_BITPLANES_CNT(1);
|
||||
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
|
||||
@ -115,7 +115,7 @@ MACHINE_CONFIG_MEMBER( cbm8000_hsg_b_device::device_add_mconfig )
|
||||
|
||||
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, hsg_b_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, hsg_b_map)
|
||||
MCFG_EF936X_PALETTE("palette")
|
||||
MCFG_EF936X_BITPLANES_CNT(1);
|
||||
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
|
||||
|
@ -205,6 +205,13 @@ SLOT_INTERFACE_END
|
||||
|
||||
DEFINE_DEVICE_TYPE(VME, vme_device, "vme", "VME bus")
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> vme_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_a32_config)
|
||||
};
|
||||
}
|
||||
|
||||
// static_set_cputag - used to be able to lookup the CPU owning this VME bus
|
||||
void vme_device::static_set_cputag(device_t &device, const char *tag)
|
||||
{
|
||||
|
@ -142,14 +142,8 @@ public:
|
||||
static void static_set_cputag(device_t &device, const char *tag);
|
||||
static void static_use_owner_spaces(device_t &device);
|
||||
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_a32_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
const address_space_config m_a32_config;
|
||||
|
||||
void add_vme_card(device_vme_card_interface *card);
|
||||
|
@ -83,7 +83,7 @@ const tiny_rom_entry *wangpc_tig_device::device_rom_region() const
|
||||
// UPD7220_INTERFACE( hgdc0_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( upd7220_0_map, AS_0, 16, wangpc_tig_device )
|
||||
static ADDRESS_MAP_START( upd7220_0_map, 0, 16, wangpc_tig_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_RAM // frame buffer
|
||||
AM_RANGE(0x4000, 0x7fff) AM_RAM // font memory
|
||||
@ -98,7 +98,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( wangpc_tig_device::hgdc_draw_text )
|
||||
// UPD7220_INTERFACE( hgdc1_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, wangpc_tig_device )
|
||||
static ADDRESS_MAP_START( upd7220_1_map, 0, 16, wangpc_tig_device )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xffff)
|
||||
AM_RANGE(0x0000, 0xffff) AM_RAM // graphics memory
|
||||
ADDRESS_MAP_END
|
||||
@ -123,12 +123,12 @@ MACHINE_CONFIG_MEMBER( wangpc_tig_device::device_add_mconfig )
|
||||
MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette")
|
||||
|
||||
MCFG_DEVICE_ADD(UPD7720_0_TAG, UPD7220, XTAL_52_832MHz/28)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_0_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, upd7220_0_map)
|
||||
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(wangpc_tig_device, hgdc_draw_text)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
|
||||
MCFG_DEVICE_ADD(UPD7720_1_TAG, UPD7220, XTAL_52_832MHz/28)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_1_map)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, upd7220_1_map)
|
||||
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(wangpc_tig_device, hgdc_display_pixels)
|
||||
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -47,6 +47,14 @@ n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> n8x300_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
void n8x300_cpu_device::set_reg(uint8_t reg, uint8_t val)
|
||||
{
|
||||
switch(reg)
|
||||
|
@ -60,15 +60,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||
|
@ -649,26 +649,29 @@ void adsp21xx_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *adsp2100_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> adsp2100_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config :
|
||||
(spacenum == AS_DATA) ? &m_data_config :
|
||||
nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
const address_space_config *adsp2101_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> adsp2101_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config :
|
||||
(spacenum == AS_DATA) ? &m_data_config :
|
||||
nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
const address_space_config *adsp2181_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> adsp2181_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config :
|
||||
(spacenum == AS_DATA) ? &m_data_config :
|
||||
(spacenum == AS_IO) ? &m_io_config :
|
||||
nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -494,7 +494,7 @@ protected:
|
||||
virtual uint32_t execute_input_lines() const override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// interrupts
|
||||
virtual bool generate_irq(int which, int indx) override;
|
||||
@ -517,7 +517,7 @@ protected:
|
||||
virtual uint32_t execute_input_lines() const override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// interrupts
|
||||
virtual bool generate_irq(int which, int indx) override;
|
||||
@ -538,7 +538,7 @@ protected:
|
||||
virtual uint32_t execute_input_lines() const override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// interrupts
|
||||
virtual bool generate_irq(int which, int indx) override;
|
||||
|
@ -203,6 +203,13 @@ alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> alpha8201_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
/* Get next opcode argument and increment program counter */
|
||||
unsigned alpha8201_cpu_device::M_RDMEM_OPCODE()
|
||||
|
@ -75,7 +75,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -794,15 +794,13 @@ static const prom_load_t pl_madr_a91 =
|
||||
// device_memory_interface overrides
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config*alto2_cpu_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> alto2_cpu_device::memory_space_config() const
|
||||
{
|
||||
if (AS_0 == spacenum)
|
||||
return &m_ucode_config;
|
||||
if (AS_1 == spacenum)
|
||||
return &m_const_config;
|
||||
if (AS_2 == spacenum)
|
||||
return &m_iomem_config;
|
||||
return nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(0, &m_ucode_config),
|
||||
std::make_pair(1, &m_const_config),
|
||||
std::make_pair(2, &m_iomem_config)
|
||||
};
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -812,7 +810,7 @@ const address_space_config*alto2_cpu_device::memory_space_config(address_spacenu
|
||||
void alto2_cpu_device::device_start()
|
||||
{
|
||||
// get a pointer to the IO address space
|
||||
m_iomem = &space(AS_2);
|
||||
m_iomem = &space(2);
|
||||
|
||||
// Decode 2 pages of micro code PROMs to CROM
|
||||
// If m_cram_config == 1 or 3, only the first page will be used
|
||||
|
@ -230,7 +230,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
//! device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
//! device (P)ROMs
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
@ -118,6 +118,14 @@ am29000_cpu_device::am29000_cpu_device(const machine_config &mconfig, const char
|
||||
m_next_pc = 0;
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> am29000_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
void am29000_cpu_device::device_start()
|
||||
{
|
||||
|
@ -451,16 +451,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_DATA: return &m_data_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -68,6 +68,14 @@ amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const ch
|
||||
: amis2000_base_device(mconfig, AMI_S2152, tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4))
|
||||
{ }
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> amis2000_base_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// state_string_export - export state as a string
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual u32 disasm_min_opcode_bytes() const override { return 1; }
|
||||
|
@ -351,6 +351,14 @@ apexc_cpu_device::apexc_cpu_device(const machine_config &mconfig, const char *ta
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> apexc_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
word accessor functions
|
||||
|
@ -34,7 +34,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -36,7 +36,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -56,6 +56,13 @@ arcompact_device::arcompact_device(const machine_config &mconfig, const char *ta
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> arcompact_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
offs_t arcompact_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -228,6 +228,13 @@ DEFINE_DEVICE_TYPE(ARM, arm_cpu_device, "arm_le", "ARM (little)")
|
||||
DEFINE_DEVICE_TYPE(ARM_BE, arm_be_cpu_device, "arm_be", "ARM (big)")
|
||||
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> arm_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
arm_cpu_device::arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: arm_cpu_device(mconfig, ARM, tag, owner, clock, ENDIANNESS_LITTLE)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -118,6 +118,13 @@ sa1110_cpu_device::sa1110_cpu_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> arm7_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
void arm7_cpu_device::update_reg_ptr()
|
||||
{
|
||||
m_reg_group = sRegisterTable[GET_MODE];
|
||||
@ -436,7 +443,7 @@ bool arm7_cpu_device::arm7_tlb_translate(offs_t &addr, int flags)
|
||||
}
|
||||
|
||||
|
||||
bool arm7_cpu_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
|
||||
bool arm7_cpu_device::memory_translate(int spacenum, int intention, offs_t &address)
|
||||
{
|
||||
/* only applies to the program address space and only does something if the MMU's enabled */
|
||||
if( spacenum == AS_PROGRAM && ( m_control & COPRO_CTRL_MMU_EN ) )
|
||||
|
@ -67,8 +67,8 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_export(const device_state_entry &entry) override;
|
||||
|
@ -66,13 +66,11 @@ WRITE32_MEMBER(lpc210x_device::flash_w)
|
||||
}
|
||||
|
||||
|
||||
const address_space_config *lpc210x_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> lpc210x_device::memory_space_config() const
|
||||
{
|
||||
switch(spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
uint32_t m_TxPR[2];
|
||||
|
||||
|
@ -235,9 +235,11 @@ void asap_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *asap_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> asap_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -876,21 +876,13 @@ void avr8_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *avr8_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> avr8_device::memory_space_config() const
|
||||
{
|
||||
if (spacenum == AS_PROGRAM)
|
||||
{
|
||||
return &m_program_config;
|
||||
}
|
||||
else if (spacenum == AS_DATA)
|
||||
{
|
||||
return &m_data_config;
|
||||
}
|
||||
else if (spacenum == AS_IO)
|
||||
{
|
||||
return &m_io_config;
|
||||
}
|
||||
return nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,7 +120,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||
|
@ -72,6 +72,14 @@ ccpu_cpu_device::ccpu_cpu_device(const machine_config &mconfig, const char *tag,
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> ccpu_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
READ8_MEMBER( ccpu_cpu_device::read_jmi )
|
||||
{
|
||||
|
@ -72,16 +72,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_DATA: return &m_data_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -262,16 +262,12 @@ void clipper_device::execute_set_input(int inputnum, int state)
|
||||
* The CLIPPER has a true Harvard architecture. In the InterPro, these are tied back together
|
||||
* again by the MMU, which then directs the access to one of 3 address spaces: main, i/o or boot.
|
||||
*/
|
||||
const address_space_config *clipper_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> clipper_device::memory_space_config() const
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_insn_config;
|
||||
case AS_DATA: return &m_data_config;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_insn_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -195,7 +195,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
#if 0
|
||||
|
@ -314,6 +314,14 @@ cop446c_cpu_device::cop446c_cpu_device(const machine_config &mconfig, const char
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> cop400_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -157,10 +157,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr );
|
||||
}
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -408,19 +408,12 @@ void cosmac_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *cosmac_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> cosmac_device::memory_space_config() const
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM:
|
||||
return &m_program_config;
|
||||
|
||||
case AS_IO:
|
||||
return &m_io_config;
|
||||
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,7 +229,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -3401,6 +3401,12 @@ cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> cp1610_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -83,6 +83,13 @@ cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> cquestsnd_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
offs_t cquestsnd_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||
{
|
||||
@ -121,6 +128,12 @@ cquestlin_cpu_device::cquestlin_cpu_device(const machine_config &mconfig, const
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> cquestlin_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
offs_t cquestlin_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||
{
|
||||
@ -362,6 +375,12 @@ void cquestrot_cpu_device::state_string_export(const device_state_entry &entry,
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> cquestrot_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
LINE DRAWER INITIALIZATION AND SHUTDOWN
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
||||
@ -184,7 +184,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
@ -298,7 +298,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -88,21 +88,27 @@ drcbe_interface::drcbe_interface(drcuml_state &drcuml, drc_cache &cache, device_
|
||||
m_cache(cache),
|
||||
m_device(device),
|
||||
m_state(*(drcuml_machine_state *)cache.alloc_near(sizeof(m_state))),
|
||||
m_accessors((data_accessors *)cache.alloc_near(sizeof(*m_accessors) * ADDRESS_SPACES))
|
||||
m_accessors(nullptr)
|
||||
{
|
||||
// reset the machine state
|
||||
memset(m_accessors, 0, sizeof(*m_accessors) * ADDRESS_SPACES);
|
||||
memset(&m_state, 0, sizeof(m_state));
|
||||
|
||||
// find the spaces and fetch memory accessors
|
||||
device_memory_interface *memory;
|
||||
if (device.interface(memory))
|
||||
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_space); ++spacenum)
|
||||
{
|
||||
int count = memory->max_space_count();
|
||||
m_accessors = ((data_accessors *)cache.alloc_near(sizeof(*m_accessors) * count));
|
||||
memset(m_accessors, 0, sizeof(*m_accessors) * count);
|
||||
m_space.resize(count, nullptr);
|
||||
|
||||
for (int spacenum = 0; spacenum < count; ++spacenum)
|
||||
if (memory->has_space(spacenum))
|
||||
{
|
||||
m_space[spacenum] = &memory->space(spacenum);
|
||||
m_space[spacenum]->accessors(m_accessors[spacenum]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -141,12 +141,12 @@ public:
|
||||
|
||||
protected:
|
||||
// internal state
|
||||
drcuml_state & m_drcuml; // pointer back to our owner
|
||||
drc_cache & m_cache; // pointer to the cache
|
||||
device_t & m_device; // CPU device we are associated with
|
||||
address_space * m_space[ADDRESS_SPACES];// pointers to CPU's address space
|
||||
drcuml_machine_state & m_state; // state of the machine (in near cache)
|
||||
data_accessors * m_accessors; // memory accessors (in near cache)
|
||||
drcuml_state & m_drcuml; // pointer back to our owner
|
||||
drc_cache & m_cache; // pointer to the cache
|
||||
device_t & m_device; // CPU device we are associated with
|
||||
std::vector<address_space *> m_space; // pointers to CPU's address space
|
||||
drcuml_machine_state & m_state; // state of the machine (in near cache)
|
||||
data_accessors * m_accessors; // memory accessors (in near cache)
|
||||
};
|
||||
|
||||
|
||||
|
@ -201,11 +201,12 @@ void dsp16_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *dsp16_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> dsp16_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config :
|
||||
(spacenum == AS_DATA) ? &m_data_config :
|
||||
nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -305,9 +305,11 @@ void dsp32c_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *dsp32c_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> dsp32c_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -127,6 +127,14 @@ dsp56k_device::dsp56k_device(const machine_config &mconfig, const char *tag, dev
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> dsp56k_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
MEMORY ACCESSORS
|
||||
***************************************************************************/
|
||||
|
@ -229,7 +229,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -173,6 +173,14 @@ void e0c6200_cpu_device::do_interrupt()
|
||||
standard_irq_callback(m_irq_id);
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> e0c6200_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
void e0c6200_cpu_device::execute_run()
|
||||
{
|
||||
while (m_icount > 0)
|
||||
|
@ -31,7 +31,7 @@ protected:
|
||||
virtual void do_interrupt();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual u32 disasm_min_opcode_bytes() const override { return 2; }
|
||||
|
@ -1880,21 +1880,15 @@ void hyperstone_device::device_stop()
|
||||
|
||||
//-------------------------------------------------
|
||||
// memory_space_config - return the configuration
|
||||
// of the specified address space, or nullptr if
|
||||
// the space doesn't exist
|
||||
// of the address spaces
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *hyperstone_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> hyperstone_device::memory_space_config() const
|
||||
{
|
||||
if (spacenum == AS_PROGRAM)
|
||||
{
|
||||
return &m_program_config;
|
||||
}
|
||||
else if (spacenum == AS_IO)
|
||||
{
|
||||
return &m_io_config;
|
||||
}
|
||||
return nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||
|
@ -569,8 +569,10 @@ void es5510_device::device_reset() {
|
||||
memset(&ram_pp, 0, sizeof(ram_t));
|
||||
}
|
||||
|
||||
const address_space_config *es5510_device::memory_space_config(address_spacenum spacenum) const {
|
||||
return nullptr;
|
||||
std::vector<std::pair<int, const address_space_config *>> es5510_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
};
|
||||
}
|
||||
|
||||
uint64_t es5510_device::execute_clocks_to_cycles(uint64_t clocks) const {
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override;
|
||||
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override;
|
||||
virtual uint32_t execute_min_cycles() const override;
|
||||
|
@ -338,13 +338,11 @@ void esrip_device::device_stop()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *esrip_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> esrip_device::memory_space_config() const
|
||||
{
|
||||
if (spacenum == AS_PROGRAM)
|
||||
{
|
||||
return &m_program_config;
|
||||
}
|
||||
return nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,7 +133,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||
|
@ -75,6 +75,14 @@ f8_cpu_device::f8_cpu_device(const machine_config &mconfig, const char *tag, dev
|
||||
memset(m_r, 0x00, sizeof(m_r));
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> f8_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* ROMC (ROM cycles)
|
||||
|
@ -48,7 +48,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -117,6 +117,14 @@ g65816_device::g65816_device(const machine_config &mconfig, device_type type, co
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> g65816_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START(_5a22_map, AS_PROGRAM, 8, _5a22_device)
|
||||
AM_RANGE(0x4202, 0x4202) AM_MIRROR(0xbf0000) AM_WRITE(wrmpya_w)
|
||||
AM_RANGE(0x4203, 0x4203) AM_MIRROR(0xbf0000) AM_WRITE(wrmpyb_w)
|
||||
|
@ -77,7 +77,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -235,7 +235,7 @@
|
||||
#define NFLAG_8(A) (A)
|
||||
#define NFLAG_16(A) ((A)>>8)
|
||||
|
||||
#define CFLAG_AS_1() ((FLAG_C>>8)&1)
|
||||
#define CFLAG_1() ((FLAG_C>>8)&1)
|
||||
|
||||
|
||||
|
||||
|
@ -240,7 +240,7 @@
|
||||
int32_t result, r0, r1, carry; \
|
||||
r0 = REGISTER_A; \
|
||||
r1 = SRC; \
|
||||
carry = CFLAG_AS_1(); \
|
||||
carry = CFLAG_1(); \
|
||||
result = (r0 & 0x0f) + (r1 & 0x0f) + (carry << 0); \
|
||||
if (result > 0x09) result += 0x06; \
|
||||
carry = result > 0x0f; \
|
||||
@ -253,7 +253,7 @@
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
FLAG_C = tmp16 = REGISTER_A + SRC + CFLAG_AS_1(); \
|
||||
FLAG_C = tmp16 = REGISTER_A + SRC + CFLAG_1(); \
|
||||
FLAG_V = VFLAG_ADD_8(SRC, REGISTER_A, FLAG_C); \
|
||||
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(tmp16); \
|
||||
} \
|
||||
@ -266,7 +266,7 @@
|
||||
int32_t result, r0, r1, carry; \
|
||||
r0 = REGISTER_A; \
|
||||
r1 = SRC; \
|
||||
carry = CFLAG_AS_1(); \
|
||||
carry = CFLAG_1(); \
|
||||
if (!FLAG_D) \
|
||||
{ \
|
||||
result = r0 + r1 + carry; \
|
||||
@ -994,12 +994,12 @@
|
||||
#if FLAG_SET_M
|
||||
#define OP_ROL() \
|
||||
CLK(CLK_OP + CLK_IMPLIED); \
|
||||
FLAG_C = (REGISTER_A<<1) | CFLAG_AS_1(); \
|
||||
FLAG_C = (REGISTER_A<<1) | CFLAG_1(); \
|
||||
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(FLAG_C)
|
||||
#else
|
||||
#define OP_ROL() \
|
||||
CLK(CLK_OP + CLK_IMPLIED); \
|
||||
FLAG_C = (REGISTER_A<<1) | CFLAG_AS_1(); \
|
||||
FLAG_C = (REGISTER_A<<1) | CFLAG_1(); \
|
||||
FLAG_Z = REGISTER_A = MAKE_UINT_16(FLAG_C); \
|
||||
FLAG_N = NFLAG_16(FLAG_C); \
|
||||
FLAG_C = CFLAG_16(FLAG_C)
|
||||
@ -1011,14 +1011,14 @@
|
||||
#define OP_ROLM(MODE) \
|
||||
CLK(CLK_OP + CLK_RMW8 + CLK_W_##MODE); \
|
||||
DST = EA_##MODE(); \
|
||||
FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_AS_1(); \
|
||||
FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_1(); \
|
||||
FLAG_N = FLAG_Z = MAKE_UINT_8(FLAG_C); \
|
||||
write_8_##MODE(DST, FLAG_Z)
|
||||
#else
|
||||
#define OP_ROLM(MODE) \
|
||||
CLK(CLK_OP + CLK_RMW16 + CLK_W_##MODE); \
|
||||
DST = EA_##MODE(); \
|
||||
FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_AS_1(); \
|
||||
FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_1(); \
|
||||
FLAG_Z = MAKE_UINT_16(FLAG_C); \
|
||||
FLAG_N = NFLAG_16(FLAG_C); \
|
||||
FLAG_C = CFLAG_16(FLAG_C); \
|
||||
@ -1102,7 +1102,7 @@
|
||||
if(!FLAG_D) \
|
||||
{ \
|
||||
FLAG_C = ~FLAG_C; \
|
||||
FLAG_C = REGISTER_A - SRC - CFLAG_AS_1(); \
|
||||
FLAG_C = REGISTER_A - SRC - CFLAG_1(); \
|
||||
FLAG_V = VFLAG_SUB_8(SRC, REGISTER_A, FLAG_C); \
|
||||
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(FLAG_C); \
|
||||
FLAG_C = ~FLAG_C; \
|
||||
@ -1114,7 +1114,7 @@
|
||||
r0 = REGISTER_A; \
|
||||
r1 = SRC; \
|
||||
r1 ^= 0xff; \
|
||||
carry = CFLAG_AS_1(); \
|
||||
carry = CFLAG_1(); \
|
||||
result = (r0 & 0x0f) + (r1 & 0x0f) + (carry << 0); \
|
||||
if (result <= 0x0f) result -= 0x06; \
|
||||
carry = result > 0x0f; \
|
||||
@ -1133,7 +1133,7 @@
|
||||
r0 = REGISTER_A; \
|
||||
r1 = SRC; \
|
||||
r1 ^= 0xffff; \
|
||||
carry = CFLAG_AS_1(); \
|
||||
carry = CFLAG_1(); \
|
||||
if (!FLAG_D) \
|
||||
{ \
|
||||
result = r0 + r1 + carry; \
|
||||
@ -1450,7 +1450,7 @@
|
||||
#undef OP_XCE
|
||||
#define OP_XCE() \
|
||||
CLK(CLK_OP + CLK_IMPLIED); \
|
||||
SRC = CFLAG_AS_1(); \
|
||||
SRC = CFLAG_1(); \
|
||||
FLAG_C = FLAG_E<<8; \
|
||||
g65816i_set_flag_e(SRC)
|
||||
|
||||
|
@ -169,6 +169,13 @@ h6280_device::h6280_device(const machine_config &mconfig, const char *tag, devic
|
||||
m_opcode[op] = s_opcodetable[op];
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> h6280_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
const h6280_device::ophandler h6280_device::s_opcodetable[256] =
|
||||
{
|
||||
@ -2564,7 +2571,7 @@ WRITE8_MEMBER( h6280_device::timer_w )
|
||||
}
|
||||
}
|
||||
|
||||
bool h6280_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
|
||||
bool h6280_device::memory_translate(int spacenum, int intention, offs_t &address)
|
||||
{
|
||||
if (spacenum == AS_PROGRAM)
|
||||
address = translated(address);
|
||||
|
@ -85,8 +85,8 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||
|
@ -236,11 +236,12 @@ void h8_device::internal_update()
|
||||
internal_update(total_cycles());
|
||||
}
|
||||
|
||||
const address_space_config *h8_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> h8_device::memory_space_config() const
|
||||
{
|
||||
return
|
||||
spacenum == AS_PROGRAM ? &program_config :
|
||||
spacenum == AS_IO ? &io_config : nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &program_config),
|
||||
std::make_pair(AS_IO, &io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,7 +167,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -73,6 +73,12 @@ hcd62121_cpu_device::hcd62121_cpu_device(const machine_config &mconfig, const ch
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> hcd62121_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
u8 hcd62121_cpu_device::read_op()
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_export(const device_state_entry &entry) override;
|
||||
|
@ -120,6 +120,13 @@ hd61700_cpu_device::hd61700_cpu_device(const machine_config &mconfig, const char
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> hd61700_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - start up the device
|
||||
|
@ -87,7 +87,7 @@ protected:
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||
|
@ -149,6 +149,13 @@ hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, d
|
||||
: hmcs45_cpu_device(mconfig, HD44828, tag, owner, clock, IS_CMOS)
|
||||
{ }
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> hmcs40_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_DATA, &m_data_config)
|
||||
};
|
||||
}
|
||||
|
||||
// disasm
|
||||
void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
|
||||
|
@ -155,7 +155,7 @@ protected:
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual u32 disasm_min_opcode_bytes() const override { return 2; }
|
||||
|
@ -152,6 +152,14 @@ hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> hp_hybrid_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
void hp_hybrid_cpu_device::device_start()
|
||||
{
|
||||
m_reg_A = 0;
|
||||
|
@ -79,7 +79,7 @@ protected:
|
||||
virtual uint16_t execute_no_bpc_ioc(uint16_t opcode) = 0;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -131,6 +131,13 @@ pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag,
|
||||
set_vtlb_dynamic_entries(196);
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> i386_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
int i386_parity_table[256];
|
||||
MODRM_TABLE i386_MODRM_table[256];
|
||||
@ -4005,7 +4012,7 @@ void i386_device::execute_run()
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
bool i386_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
|
||||
bool i386_device::memory_translate(int spacenum, int intention, offs_t &address)
|
||||
{
|
||||
bool ret = true;
|
||||
if(spacenum == AS_PROGRAM)
|
||||
|
@ -59,8 +59,8 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_IO) ? &m_io_config : nullptr; }
|
||||
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -139,11 +139,12 @@ void i8008_device::device_reset()
|
||||
// the space doesn't exist
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *i8008_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> i8008_device::memory_space_config() const
|
||||
{
|
||||
return (spacenum == AS_PROGRAM) ? &m_program_config :
|
||||
(spacenum == AS_IO) ? &m_io_config :
|
||||
nullptr;
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -211,6 +211,14 @@ i8080a_cpu_device::i8080a_cpu_device(const machine_config &mconfig, const char *
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const address_space_config *>> i8085a_cpu_device::memory_space_config() const
|
||||
{
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void i8085a_cpu_device::device_config_complete()
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ protected:
|
||||
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 2); }
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -135,14 +135,12 @@ void i8089_device::device_reset()
|
||||
// space configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *i8089_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> i8089_device::memory_space_config() const
|
||||
{
|
||||
switch (spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
default: return nullptr;
|
||||
}
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -76,7 +76,7 @@ protected:
|
||||
int m_icount;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
address_space_config m_program_config;
|
||||
address_space_config m_io_config;
|
||||
|
@ -149,16 +149,19 @@ i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const address_space_config *i80186_cpu_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> i80186_cpu_device::memory_space_config() const
|
||||
{
|
||||
switch(spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
|
||||
default: return nullptr;
|
||||
}
|
||||
if(has_configured_map(AS_OPCODES))
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_OPCODES, &m_opcodes_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
else
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
uint8_t i80186_cpu_device::fetch_op()
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(int3_w) { external_int(3, state); }
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
protected:
|
||||
i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size);
|
||||
|
@ -282,15 +282,19 @@ void i80286_cpu_device::device_start()
|
||||
m_out_shutdown_func.resolve_safe();
|
||||
}
|
||||
|
||||
const address_space_config *i80286_cpu_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> i80286_cpu_device::memory_space_config() const
|
||||
{
|
||||
switch(spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
|
||||
default: return nullptr;
|
||||
}
|
||||
if(has_configured_map(AS_OPCODES))
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_OPCODES, &m_opcodes_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
else
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -367,7 +371,7 @@ void i80286_cpu_device::state_string_export(const device_state_entry &entry, std
|
||||
}
|
||||
}
|
||||
|
||||
bool i80286_cpu_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
|
||||
bool i80286_cpu_device::memory_translate(int spacenum, int intention, offs_t &address)
|
||||
{
|
||||
if(spacenum == AS_PROGRAM)
|
||||
address &= m_amask;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
typedef delegate<uint32_t (bool)> a20_cb;
|
||||
static void static_set_a20_callback(device_t &device, a20_cb object) { downcast<i80286_cpu_device &>(device).m_a20_callback = object; }
|
||||
@ -86,7 +86,7 @@ protected:
|
||||
|
||||
virtual uint32_t execute_input_lines() const override { return 1; }
|
||||
virtual void execute_set_input(int inputnum, int state) override;
|
||||
bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
|
||||
bool memory_translate(int spacenum, int intention, offs_t &address) override;
|
||||
|
||||
virtual void interrupt(int int_num, int trap = 1) override { if(trap) throw TRAP(int_num, (uint16_t)-1); else interrupt_descriptor(int_num, 0, 0); }
|
||||
virtual uint8_t read_port_byte(uint16_t port) override;
|
||||
|
@ -112,15 +112,19 @@ i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, device_type ty
|
||||
{
|
||||
}
|
||||
|
||||
const address_space_config *i8086_cpu_device::memory_space_config(address_spacenum spacenum) const
|
||||
std::vector<std::pair<int, const address_space_config *>> i8086_cpu_device::memory_space_config() const
|
||||
{
|
||||
switch(spacenum)
|
||||
{
|
||||
case AS_PROGRAM: return &m_program_config;
|
||||
case AS_IO: return &m_io_config;
|
||||
case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
|
||||
default: return nullptr;
|
||||
}
|
||||
if(has_configured_map(AS_OPCODES))
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_OPCODES, &m_opcodes_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
else
|
||||
return std::vector<std::pair<int, const address_space_config *>> {
|
||||
std::make_pair(AS_PROGRAM, &m_program_config),
|
||||
std::make_pair(AS_IO, &m_io_config)
|
||||
};
|
||||
}
|
||||
|
||||
uint8_t i8086_cpu_device::fetch_op()
|
||||
|
@ -344,7 +344,7 @@ public:
|
||||
i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
||||
virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
|
||||
|
||||
protected:
|
||||
i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user