summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2019-04-06 14:22:55 +0200
committer Olivier Galibert <galibert@pobox.com>2019-04-06 14:25:43 +0200
commit8e551e167c5f4fda3fcff4393fbdcce49711dcbd (patch)
tree96e2ac233606be260e6147caac25cda1efda8885
parentf2f1643c453ec46297335e458c3f89f8cef0f59d (diff)
emumem: Remove obsolete alignement limit
emumem_mud: Correct start/end on big endian apollo, fccpu20, fccpu30: Correct vector lookup address pic8259: Avoid reacting to debugger reads [O. Galibert]
-rw-r--r--src/devices/bus/vme/vme_fccpu20.cpp2
-rw-r--r--src/devices/machine/pic8259.cpp17
-rw-r--r--src/emu/emumem.cpp19
-rw-r--r--src/emu/emumem_mud.cpp11
-rw-r--r--src/mame/drivers/apollo.cpp2
-rw-r--r--src/mame/drivers/fccpu30.cpp2
-rw-r--r--src/mame/machine/apollo.cpp20
7 files changed, 32 insertions, 41 deletions
diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp
index 657cff917cf..d9096ca13e2 100644
--- a/src/devices/bus/vme/vme_fccpu20.cpp
+++ b/src/devices/bus/vme/vme_fccpu20.cpp
@@ -254,7 +254,7 @@ DEVICE_INPUT_DEFAULTS_END
void vme_fccpu20_device::cpu_space_map(address_map &map)
{
- map(0xfffff2, 0xffffff).lr16("bim irq", [this](offs_t offset) -> u16 { return m_bim->iack(offset+1); });
+ map(0xfffffff2, 0xffffffff).lr16("bim irq", [this](offs_t offset) -> u16 { return m_bim->iack(offset+1); });
}
void vme_fccpu20_device::device_add_mconfig(machine_config &config)
diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp
index 40653cdf254..b7e048170ed 100644
--- a/src/devices/machine/pic8259.cpp
+++ b/src/devices/machine/pic8259.cpp
@@ -93,14 +93,16 @@ uint32_t pic8259_device::acknowledge()
/* is this IRQ pending and enabled? */
if ((m_irr & mask) && !(m_imr & mask))
{
- LOG("pic8259_acknowledge(): PIC acknowledge IRQ #%d\n", irq);
- if (!m_level_trig_mode)
- m_irr &= ~mask;
+ if (!machine().side_effects_disabled()) {
+ LOG("pic8259_acknowledge(): PIC acknowledge IRQ #%d\n", irq);
+ if (!m_level_trig_mode)
+ m_irr &= ~mask;
- if (!m_auto_eoi)
- m_isr |= mask;
+ if (!m_auto_eoi)
+ m_isr |= mask;
- set_timer();
+ set_timer();
+ }
if ((m_cascade!=0) && (m_master!=0) && (mask & m_slave))
{
@@ -122,7 +124,8 @@ uint32_t pic8259_device::acknowledge()
}
}
}
- logerror("Spurious IRQ\n");
+ if (!machine().side_effects_disabled())
+ logerror("Spurious IRQ\n");
if (is_x86())
return m_base + 7;
else
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index 092e44d9555..d5b53dda4b1 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -1131,28 +1131,9 @@ void address_space::check_optimize_all(const char *function, int width, offs_t a
}
}
- // Check if we have to adjust the unitmask and addresses
nunitmask = 0xffffffffffffffffU >> (64 - m_config.data_width());
if (unitmask)
nunitmask &= unitmask;
- if ((addrstart & default_lowbits_mask) || ((~addrend) & default_lowbits_mask)) {
- if ((addrstart ^ addrend) & ~default_lowbits_mask)
- fatalerror("%s: In range %x-%x mask %x mirror %x select %x, start or end is unaligned while the range spans more than one slot (granularity = %d).\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, default_lowbits_mask + 1);
- offs_t lowbyte = m_config.addr2byte(addrstart & default_lowbits_mask);
- offs_t highbyte = m_config.addr2byte((addrend & default_lowbits_mask) + 1);
- if (m_config.endianness() == ENDIANNESS_LITTLE) {
- u64 hmask = 0xffffffffffffffffU >> (64 - 8*highbyte);
- nunitmask = (nunitmask << (8*lowbyte)) & hmask;
- } else {
- u64 hmask = 0xffffffffffffffffU >> ((64 - m_config.data_width()) + 8*lowbyte);
- nunitmask = (nunitmask << (m_config.data_width() - 8*highbyte)) & hmask;
- }
-
- addrstart &= ~default_lowbits_mask;
- addrend |= default_lowbits_mask;
- if(changing_bits < default_lowbits_mask)
- changing_bits = default_lowbits_mask;
- }
nstart = addrstart;
nend = addrend;
diff --git a/src/emu/emumem_mud.cpp b/src/emu/emumem_mud.cpp
index 01e9916b9a0..cc8e54ec980 100644
--- a/src/emu/emumem_mud.cpp
+++ b/src/emu/emumem_mud.cpp
@@ -49,8 +49,14 @@ template<int Width, int AddrShift, int Endian> memory_units_descriptor<Width, Ad
std::array<uX, 4> umasks;
umasks.fill(unitmask);
- uX smask = ~make_bitmask<uX>((addrstart - m_addrstart) << (3 - AddrShift));
- uX emask = make_bitmask<uX>((addrend - m_addrend + 1) << (3 - AddrShift));
+ uX smask, emask;
+ if(Endian == ENDIANNESS_BIG) {
+ smask = make_bitmask<uX>(8*sizeof(uX) - ((addrstart - m_addrstart) << (3 - AddrShift)));
+ emask = ~make_bitmask<uX>(8*sizeof(uX) - ((addrend - m_addrend + 1) << (3 - AddrShift)));
+ } else {
+ smask = ~make_bitmask<uX>((addrstart - m_addrstart) << (3 - AddrShift));
+ emask = make_bitmask<uX>((addrend - m_addrend + 1) << (3 - AddrShift));
+ }
umasks[handler_entry::START] &= smask;
umasks[handler_entry::END] &= emask;
@@ -59,7 +65,6 @@ template<int Width, int AddrShift, int Endian> memory_units_descriptor<Width, Ad
for(u32 i=0; i<4; i++)
m_keymap[i] = mask_to_ukey<uX>(umasks[i]);
-
// Compute the shift
uX dmask = make_bitmask<uX>(bits_per_access);
u32 active_count = 0;
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index c464825e740..274e31feb2c 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -270,7 +270,7 @@ void apollo_state::apollo_bus_error()
void apollo_state::cpu_space_map(address_map &map)
{
- map(0xfffff2, 0xffffff).r(FUNC(apollo_state::apollo_irq_acknowledge));
+ map(0xfffffff2, 0xffffffff).r(FUNC(apollo_state::apollo_irq_acknowledge));
}
u16 apollo_state::apollo_irq_acknowledge(offs_t offset)
diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp
index c4b25baae9a..f99b8e9421d 100644
--- a/src/mame/drivers/fccpu30.cpp
+++ b/src/mame/drivers/fccpu30.cpp
@@ -661,7 +661,7 @@ static void fccpu30_vme_cards(device_slot_interface &device)
void cpu30_state::cpu_space_map(address_map &map)
{
- map(0xfffff2, 0xffffff).lr16("fga002 irq", [this](offs_t offset) -> u16 { return m_fga002->iack(); });
+ map(0xfffffff2, 0xffffffff).lr16("fga002 irq", [this](offs_t offset) -> u16 { return m_fga002->iack(); });
}
void cpu30_state::cpu30(machine_config &config)
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index 0f26ad3036f..736f86b678f 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -571,16 +571,18 @@ u16 apollo_state::apollo_pic_get_vector()
vector = m_pic8259_slave->acknowledge();
}
- // don't log ptm interrupts
- if (vector != APOLLO_IRQ_VECTOR+APOLLO_IRQ_PTM) {
- MLOG1(("apollo_pic_acknowledge: irq=%d vector=%x", vector & 0x0f, vector));
- }
+ if (!machine().side_effects_disabled()) {
+ // don't log ptm interrupts
+ if (vector != APOLLO_IRQ_VECTOR+APOLLO_IRQ_PTM) {
+ MLOG1(("apollo_pic_acknowledge: irq=%d vector=%x", vector & 0x0f, vector));
+ }
- if (apollo_is_dn3000()) {
- apollo_csr_set_status_register(APOLLO_CSR_SR_INTERRUPT_PENDING, 0);
- } else {
- // clear bit Interrupt Pending in Cache Status Register
- apollo_set_cache_status_register(this,0x10, 0x00);
+ if (apollo_is_dn3000()) {
+ apollo_csr_set_status_register(APOLLO_CSR_SR_INTERRUPT_PENDING, 0);
+ } else {
+ // clear bit Interrupt Pending in Cache Status Register
+ apollo_set_cache_status_register(this,0x10, 0x00);
+ }
}
return vector;
}